summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/6tunnel/6tunnel-0.10.ebuild19
-rw-r--r--net-misc/6tunnel/6tunnel-0.11_rc1.ebuild21
-rw-r--r--net-misc/6tunnel/Manifest2
-rw-r--r--net-misc/6tunnel/metadata.xml7
-rw-r--r--net-misc/adjtimex/Manifest2
-rw-r--r--net-misc/adjtimex/adjtimex-1.29-r1.ebuild59
-rw-r--r--net-misc/adjtimex/files/adjtimex-1.29-r1-gentoo-utc.patch30
-rw-r--r--net-misc/adjtimex/files/adjtimex.init35
-rw-r--r--net-misc/adjtimex/metadata.xml7
-rw-r--r--net-misc/aget/Manifest1
-rw-r--r--net-misc/aget/aget-0.4.1-r1.ebuild29
-rw-r--r--net-misc/aget/files/aget-0.4.1-r1.patch88
-rw-r--r--net-misc/aget/metadata.xml12
-rw-r--r--net-misc/aggregate-flim/Manifest1
-rw-r--r--net-misc/aggregate-flim/aggregate-flim-1.0.2.ebuild22
-rw-r--r--net-misc/aggregate-flim/metadata.xml8
-rw-r--r--net-misc/aggregate/Manifest1
-rw-r--r--net-misc/aggregate/aggregate-1.6.ebuild33
-rw-r--r--net-misc/aggregate/files/aggregate-1.6-build-fixup.patch14
-rw-r--r--net-misc/aggregate/metadata.xml14
-rw-r--r--net-misc/aiccu/Manifest1
-rw-r--r--net-misc/aiccu/aiccu-2007.01.15-r4.ebuild58
-rw-r--r--net-misc/aiccu/files/aiccu-2007.01.15-Makefile.patch79
-rw-r--r--net-misc/aiccu/files/aiccu-2007.01.15-r2-init.gentoo.patch33
-rw-r--r--net-misc/aiccu/files/aiccu-2007.01.15-setupscript.patch17
-rw-r--r--net-misc/aiccu/files/aiccu-2007.01.15-systemd.patch52
-rw-r--r--net-misc/aiccu/files/aiccu-2007.01.15-uclibc.patch29
-rw-r--r--net-misc/aiccu/metadata.xml8
-rw-r--r--net-misc/apt-cacher-ng/Manifest3
-rw-r--r--net-misc/apt-cacher-ng/apt-cacher-ng-0.8.3.ebuild119
-rw-r--r--net-misc/apt-cacher-ng/apt-cacher-ng-0.8.4.ebuild119
-rw-r--r--net-misc/apt-cacher-ng/apt-cacher-ng-0.8.5.ebuild119
-rw-r--r--net-misc/apt-cacher-ng/files/confd2
-rw-r--r--net-misc/apt-cacher-ng/files/cron.daily15
-rw-r--r--net-misc/apt-cacher-ng/files/initd33
-rw-r--r--net-misc/apt-cacher-ng/files/initd-r134
-rw-r--r--net-misc/apt-cacher-ng/files/logrotate15
-rw-r--r--net-misc/apt-cacher-ng/metadata.xml12
-rw-r--r--net-misc/apt-proxy/Manifest1
-rw-r--r--net-misc/apt-proxy/apt-proxy-1.3.0.ebuild70
-rw-r--r--net-misc/apt-proxy/files/apt-proxy17
-rw-r--r--net-misc/apt-proxy/files/apt-proxy-1.3.0-sh.patch11
-rw-r--r--net-misc/apt-proxy/metadata.xml10
-rw-r--r--net-misc/aria2/Manifest8
-rw-r--r--net-misc/aria2/aria2-1.15.2.ebuild133
-rw-r--r--net-misc/aria2/aria2-1.16.3.ebuild135
-rw-r--r--net-misc/aria2/aria2-1.16.5.ebuild136
-rw-r--r--net-misc/aria2/aria2-1.18.0.ebuild140
-rw-r--r--net-misc/aria2/aria2-1.18.5.ebuild148
-rw-r--r--net-misc/aria2/aria2-1.18.7.ebuild147
-rw-r--r--net-misc/aria2/aria2-1.18.9.ebuild147
-rw-r--r--net-misc/aria2/aria2-1.19.0.ebuild148
-rw-r--r--net-misc/aria2/files/aria2-1.18.5-fix-gnutls-2.x-compatibility.patch37
-rw-r--r--net-misc/aria2/metadata.xml25
-rw-r--r--net-misc/arm/Manifest2
-rw-r--r--net-misc/arm/arm-1.4.5.0-r2.ebuild54
-rw-r--r--net-misc/arm/arm-1.4.5.0_p20140714-r2.ebuild61
-rw-r--r--net-misc/arm/metadata.xml17
-rw-r--r--net-misc/arpd/Manifest1
-rw-r--r--net-misc/arpd/arpd-0.2-r1.ebuild42
-rw-r--r--net-misc/arpd/files/arpd-0.2-buildsystem-libevent-test.patch11
-rw-r--r--net-misc/arpd/files/arpd-0.2-libevent.patch28
-rw-r--r--net-misc/arpd/files/arpd.c.patch42
-rw-r--r--net-misc/arpd/metadata.xml8
-rw-r--r--net-misc/arpsponge/Manifest1
-rw-r--r--net-misc/arpsponge/arpsponge-3.12.2.ebuild62
-rw-r--r--net-misc/arpsponge/files/arpsponge.confd9
-rwxr-xr-xnet-misc/arpsponge/files/arpsponge.initd21
-rw-r--r--net-misc/arpsponge/metadata.xml8
-rw-r--r--net-misc/asterisk-core-sounds/Manifest72
-rw-r--r--net-misc/asterisk-core-sounds/asterisk-core-sounds-1.4.21-r1.ebuild69
-rw-r--r--net-misc/asterisk-core-sounds/asterisk-core-sounds-1.4.22.ebuild69
-rw-r--r--net-misc/asterisk-core-sounds/metadata.xml18
-rw-r--r--net-misc/asterisk-extra-sounds/Manifest18
-rw-r--r--net-misc/asterisk-extra-sounds/asterisk-extra-sounds-1.4.11.ebuild67
-rw-r--r--net-misc/asterisk-extra-sounds/metadata.xml19
-rw-r--r--net-misc/asterisk-g729/Manifest51
-rw-r--r--net-misc/asterisk-g729/asterisk-g729-11.0.3.1.5.ebuild124
-rw-r--r--net-misc/asterisk-g729/asterisk-g729-11.0.3.1.6.ebuild124
-rw-r--r--net-misc/asterisk-g729/metadata.xml8
-rw-r--r--net-misc/asterisk-moh-opsound/Manifest9
-rw-r--r--net-misc/asterisk-moh-opsound/asterisk-moh-opsound-2.03.ebuild52
-rw-r--r--net-misc/asterisk-moh-opsound/metadata.xml19
-rw-r--r--net-misc/asterisk-rate_engine/Manifest1
-rw-r--r--net-misc/asterisk-rate_engine/asterisk-rate_engine-0.5.4.ebuild41
-rw-r--r--net-misc/asterisk-rate_engine/files/rate-engine-0.5.4-astcfg.diff41
-rw-r--r--net-misc/asterisk-rate_engine/metadata.xml5
-rw-r--r--net-misc/asterisk-spandsp_codec_g726/Manifest1
-rw-r--r--net-misc/asterisk-spandsp_codec_g726/asterisk-spandsp_codec_g726-0.0.2_pre26.ebuild60
-rw-r--r--net-misc/asterisk-spandsp_codec_g726/files/asterisk-spandsp_codec_g726-0.0.2_pre26-spanddsp.patch15
-rw-r--r--net-misc/asterisk-spandsp_codec_g726/metadata.xml10
-rw-r--r--net-misc/asterisk/Manifest8
-rw-r--r--net-misc/asterisk/asterisk-11.17.1.ebuild324
-rw-r--r--net-misc/asterisk/asterisk-11.18.0.ebuild324
-rw-r--r--net-misc/asterisk/asterisk-13.3.2.ebuild325
-rw-r--r--net-misc/asterisk/asterisk-13.4.0.ebuild325
-rw-r--r--net-misc/asterisk/files/1.6.2/asterisk.logrotate325
-rw-r--r--net-misc/asterisk/files/1.6.2/asterisk.logrotate425
-rw-r--r--net-misc/asterisk/files/1.6.2/call_data.txt32
-rw-r--r--net-misc/asterisk/files/1.6.2/find_call_ids.sh17
-rw-r--r--net-misc/asterisk/files/1.6.2/find_call_sip_trace.sh21
-rw-r--r--net-misc/asterisk/files/1.6.2/sip_calc_auth25
-rw-r--r--net-misc/asterisk/files/1.8.0/asterisk.confd95
-rw-r--r--net-misc/asterisk/files/1.8.0/asterisk.initd7347
-rw-r--r--net-misc/asterisk/files/1.8.0/find_call_ids.sh68
-rw-r--r--net-misc/asterisk/files/1.8.0/find_call_sip_trace.sh76
-rw-r--r--net-misc/asterisk/files/asterisk.service23
-rw-r--r--net-misc/asterisk/files/asterisk.service.conf11
-rw-r--r--net-misc/asterisk/files/asterisk.tmpfiles.conf2
-rw-r--r--net-misc/asterisk/metadata.xml20
-rw-r--r--net-misc/astmanproxy/Manifest1
-rw-r--r--net-misc/astmanproxy/astmanproxy-1.28.2.ebuild49
-rw-r--r--net-misc/astmanproxy/files/astmanproxy-1.1-gentoo.diff31
-rw-r--r--net-misc/astmanproxy/files/astmanproxy-1.28.2-gentoo.diff39
-rwxr-xr-xnet-misc/astmanproxy/files/astmanproxy.rc620
-rw-r--r--net-misc/astmanproxy/metadata.xml10
-rw-r--r--net-misc/autossh/Manifest3
-rw-r--r--net-misc/autossh/autossh-1.4c.ebuild26
-rw-r--r--net-misc/autossh/autossh-1.4d.ebuild25
-rw-r--r--net-misc/autossh/autossh-1.4e.ebuild25
-rw-r--r--net-misc/autossh/metadata.xml8
-rw-r--r--net-misc/autoupnp/Manifest1
-rw-r--r--net-misc/autoupnp/autoupnp-0.4.6.ebuild33
-rw-r--r--net-misc/autoupnp/autoupnp-9999.ebuild40
-rw-r--r--net-misc/autoupnp/metadata.xml16
-rw-r--r--net-misc/axel/Manifest3
-rw-r--r--net-misc/axel/axel-1.1.ebuild53
-rw-r--r--net-misc/axel/axel-2.3-r1.ebuild54
-rw-r--r--net-misc/axel/axel-2.4-r1.ebuild52
-rw-r--r--net-misc/axel/axel-2.4-r2.ebuild49
-rw-r--r--net-misc/axel/files/axel-2.4-bffr-overflow.patch16
-rw-r--r--net-misc/axel/files/axel-2.4-buildsystem.patch23
-rw-r--r--net-misc/axel/files/axel-2.4-max-redir.patch16
-rw-r--r--net-misc/axel/metadata.xml7
-rw-r--r--net-misc/badvpn/Manifest5
-rw-r--r--net-misc/badvpn/badvpn-1.999.123-r3.ebuild82
-rw-r--r--net-misc/badvpn/badvpn-1.999.126.ebuild92
-rw-r--r--net-misc/badvpn/badvpn-1.999.127.ebuild93
-rw-r--r--net-misc/badvpn/badvpn-1.999.128.ebuild93
-rw-r--r--net-misc/badvpn/badvpn-1.999.129.ebuild93
-rw-r--r--net-misc/badvpn/files/badvpn-1.999.127-ncd.init24
-rw-r--r--net-misc/badvpn/files/badvpn-ncd.conf11
-rw-r--r--net-misc/badvpn/files/badvpn-ncd.init48
-rw-r--r--net-misc/badvpn/files/badvpn-ncd.service11
-rw-r--r--net-misc/badvpn/files/badvpn-server.conf11
-rw-r--r--net-misc/badvpn/files/badvpn-server.init48
-rw-r--r--net-misc/badvpn/metadata.xml47
-rw-r--r--net-misc/balance/Manifest1
-rw-r--r--net-misc/balance/balance-3.54-r1.ebuild35
-rw-r--r--net-misc/balance/files/balance-3.54-Makefile.patch52
-rw-r--r--net-misc/balance/metadata.xml8
-rw-r--r--net-misc/batctl/Manifest2
-rw-r--r--net-misc/batctl/batctl-2013.4.0.ebuild36
-rw-r--r--net-misc/batctl/batctl-2014.2.0.ebuild37
-rw-r--r--net-misc/batctl/metadata.xml9
-rw-r--r--net-misc/batman-adv/Manifest2
-rw-r--r--net-misc/batman-adv/batman-adv-2013.4.0.ebuild38
-rw-r--r--net-misc/batman-adv/batman-adv-2014.2.0.ebuild39
-rw-r--r--net-misc/batman-adv/metadata.xml15
-rw-r--r--net-misc/bfgminer/Manifest9
-rw-r--r--net-misc/bfgminer/bfgminer-3.10.10.ebuild166
-rw-r--r--net-misc/bfgminer/bfgminer-3.10.5.ebuild159
-rw-r--r--net-misc/bfgminer/bfgminer-3.10.8.ebuild159
-rw-r--r--net-misc/bfgminer/bfgminer-4.10.1.ebuild175
-rw-r--r--net-misc/bfgminer/bfgminer-4.10.2.ebuild175
-rw-r--r--net-misc/bfgminer/bfgminer-4.10.3.ebuild182
-rw-r--r--net-misc/bfgminer/bfgminer-5.0.0.ebuild195
-rw-r--r--net-misc/bfgminer/bfgminer-5.1.0.ebuild195
-rw-r--r--net-misc/bfgminer/bfgminer-5.2.0.ebuild202
-rw-r--r--net-misc/bfgminer/metadata.xml55
-rw-r--r--net-misc/bgpq/Manifest1
-rw-r--r--net-misc/bgpq/bgpq-1.0.9.9.ebuild35
-rw-r--r--net-misc/bgpq/metadata.xml15
-rw-r--r--net-misc/bgpq3/Manifest2
-rw-r--r--net-misc/bgpq3/bgpq3-0.1.21.ebuild32
-rw-r--r--net-misc/bgpq3/bgpq3-0.1.22.ebuild32
-rw-r--r--net-misc/bgpq3/metadata.xml25
-rw-r--r--net-misc/bird/Manifest5
-rw-r--r--net-misc/bird/bird-1.3.9.ebuild62
-rw-r--r--net-misc/bird/bird-1.4.3.ebuild62
-rw-r--r--net-misc/bird/bird-1.4.4.ebuild62
-rw-r--r--net-misc/bird/bird-1.4.5.ebuild62
-rw-r--r--net-misc/bird/bird-1.5.0.ebuild62
-rw-r--r--net-misc/bird/files/1.2.3-v4-v6-build.patch109
-rw-r--r--net-misc/bird/files/1.2.4-v4-v6-build.patch109
-rw-r--r--net-misc/bird/files/1.3.0-v4-v6-build.patch109
-rw-r--r--net-misc/bird/files/1.3.1-v4-v6-build.patch109
-rw-r--r--net-misc/bird/files/1.3.2-v4-v6-build.patch109
-rw-r--r--net-misc/bird/files/initd-v4-bird-1.2.339
-rw-r--r--net-misc/bird/files/initd-v4-bird-1.2.439
-rw-r--r--net-misc/bird/files/initd-v4-bird-1.3.042
-rw-r--r--net-misc/bird/files/initd-v4-bird-1.3.142
-rw-r--r--net-misc/bird/files/initd-v4-bird-1.3.242
-rw-r--r--net-misc/bird/files/initd-v4-bird-1.3.841
-rw-r--r--net-misc/bird/files/initd-v6-bird-1.2.339
-rw-r--r--net-misc/bird/files/initd-v6-bird-1.2.439
-rw-r--r--net-misc/bird/files/initd-v6-bird-1.3.042
-rw-r--r--net-misc/bird/files/initd-v6-bird-1.3.142
-rw-r--r--net-misc/bird/files/initd-v6-bird-1.3.242
-rw-r--r--net-misc/bird/files/initd-v6-bird-1.3.841
-rw-r--r--net-misc/bird/metadata.xml8
-rw-r--r--net-misc/blinkperl/Manifest1
-rw-r--r--net-misc/blinkperl/blinkperl-20030301-r1.ebuild33
-rw-r--r--net-misc/blinkperl/files/blinkperl-20030301-Makefile.patch20
-rw-r--r--net-misc/blinkperl/files/blinkperl-20030301-non-local.patch13
-rw-r--r--net-misc/blinkperl/files/blinkperl.confd3
-rw-r--r--net-misc/blinkperl/files/blinkperl.rc19
-rw-r--r--net-misc/blinkperl/metadata.xml10
-rw-r--r--net-misc/bopm/Manifest1
-rw-r--r--net-misc/bopm/bopm-3.1.3.ebuild57
-rw-r--r--net-misc/bopm/files/bopm.conf.d7
-rw-r--r--net-misc/bopm/files/bopm.init.d23
-rw-r--r--net-misc/bopm/metadata.xml5
-rw-r--r--net-misc/bridge-utils/Manifest1
-rw-r--r--net-misc/bridge-utils/bridge-utils-1.5.ebuild50
-rw-r--r--net-misc/bridge-utils/files/bridge-utils-1.5-linux-3.8.patch18
-rw-r--r--net-misc/bridge-utils/metadata.xml11
-rw-r--r--net-misc/bsdwhois/Manifest1
-rw-r--r--net-misc/bsdwhois/bsdwhois-1.43.2.1.ebuild23
-rw-r--r--net-misc/bsdwhois/metadata.xml5
-rw-r--r--net-misc/bti/Manifest1
-rw-r--r--net-misc/bti/bti-031-r1.ebuild43
-rw-r--r--net-misc/bti/files/bti-031-nonGNU.patch32
-rw-r--r--net-misc/bti/metadata.xml8
-rw-r--r--net-misc/bwwhois/Manifest1
-rw-r--r--net-misc/bwwhois/bwwhois-5.5.2-r2.ebuild46
-rw-r--r--net-misc/bwwhois/metadata.xml12
-rw-r--r--net-misc/cadaver/Manifest1
-rw-r--r--net-misc/cadaver/cadaver-0.23.3.ebuild45
-rw-r--r--net-misc/cadaver/files/cadaver-0.23.2-disable-nls.patch17
-rw-r--r--net-misc/cadaver/metadata.xml8
-rw-r--r--net-misc/capi4hylafax/Manifest3
-rw-r--r--net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.3-r1.ebuild142
-rw-r--r--net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.9.ebuild133
-rw-r--r--net-misc/capi4hylafax/files/capi4hylafax-01.03.00.99.300.3-recvdev.diff20
-rw-r--r--net-misc/capi4hylafax/files/capi4hylafax.confd19
-rw-r--r--net-misc/capi4hylafax/files/capi4hylafax.initd64
-rw-r--r--net-misc/capi4hylafax/metadata.xml19
-rw-r--r--net-misc/capiisdnmon/Manifest1
-rw-r--r--net-misc/capiisdnmon/capiisdnmon-0.42-r2.ebuild46
-rw-r--r--net-misc/capiisdnmon/files/capiisdnmon-0.42-capiv3.patch11
-rw-r--r--net-misc/capiisdnmon/files/capiisdnmon-0.42-gcc44.patch23
-rw-r--r--net-misc/capiisdnmon/metadata.xml10
-rw-r--r--net-misc/cbqinit/Manifest1
-rw-r--r--net-misc/cbqinit/cbqinit-0.7.3-r1.ebuild36
-rw-r--r--net-misc/cbqinit/files/cbq-1280.My_first_shaper.sample5
-rw-r--r--net-misc/cbqinit/files/cbqinit-0.7.3-gentoo.patch53
-rw-r--r--net-misc/cbqinit/files/rc_cbqinit17
-rw-r--r--net-misc/cbqinit/files/rc_cbqinit-r130
-rw-r--r--net-misc/cbqinit/metadata.xml10
-rw-r--r--net-misc/cbugzilla/Manifest1
-rw-r--r--net-misc/cbugzilla/cbugzilla-0.2.1.ebuild25
-rw-r--r--net-misc/cbugzilla/metadata.xml11
-rw-r--r--net-misc/cfengine/Manifest5
-rw-r--r--net-misc/cfengine/cfengine-2.2.10-r4.ebuild113
-rw-r--r--net-misc/cfengine/cfengine-3.3.9.ebuild132
-rw-r--r--net-misc/cfengine/cfengine-3.4.5.ebuild147
-rw-r--r--net-misc/cfengine/cfengine-3.5.3.ebuild144
-rw-r--r--net-misc/cfengine/cfengine-3.6.2.ebuild141
-rw-r--r--net-misc/cfengine/files/511666-segfault.patch20
-rw-r--r--net-misc/cfengine/files/admit-noclass-520696.patch15
-rwxr-xr-xnet-misc/cfengine/files/cf-execd.rc618
-rwxr-xr-xnet-misc/cfengine/files/cf-monitord.rc617
-rwxr-xr-xnet-misc/cfengine/files/cf-serverd.rc617
-rw-r--r--net-misc/cfengine/files/cfengine-2.2.10-snprintf_buffer_overflow.patch11
-rw-r--r--net-misc/cfengine/files/cfengine-3.4.5-acl.patch30
-rw-r--r--net-misc/cfengine/files/cfengine-3.4.5-ifconfig.patch42
-rw-r--r--net-misc/cfengine/files/cfengine-3.5.3-ifconfig.patch42
-rw-r--r--net-misc/cfengine/files/cfengine-3.6.2-ifconfig.patch11
-rwxr-xr-xnet-misc/cfengine/files/cfenvd.rc617
-rwxr-xr-xnet-misc/cfengine/files/cfexecd.rc617
-rwxr-xr-xnet-misc/cfengine/files/cfservd.rc617
-rw-r--r--net-misc/cfengine/metadata.xml42
-rw-r--r--net-misc/cgminer/Manifest5
-rw-r--r--net-misc/cgminer/cgminer-4.7.0.ebuild90
-rw-r--r--net-misc/cgminer/cgminer-4.8.0.ebuild95
-rw-r--r--net-misc/cgminer/cgminer-4.9.0.ebuild102
-rw-r--r--net-misc/cgminer/cgminer-4.9.1.ebuild102
-rw-r--r--net-misc/cgminer/cgminer-4.9.2.ebuild86
-rw-r--r--net-misc/cgminer/files/cgminer-4.3.5-system-jansson.patch47
-rw-r--r--net-misc/cgminer/files/cgminer-4.4.2-system-jansson.patch47
-rw-r--r--net-misc/cgminer/metadata.xml42
-rw-r--r--net-misc/cgterm/Manifest1
-rw-r--r--net-misc/cgterm/cgterm-1.6.ebuild33
-rw-r--r--net-misc/cgterm/files/cgterm-1.6-QA.patch46
-rw-r--r--net-misc/cgterm/metadata.xml8
-rw-r--r--net-misc/charm/Manifest2
-rw-r--r--net-misc/charm/charm-1.9.1.ebuild38
-rw-r--r--net-misc/charm/charm-1.9.2-r1.ebuild38
-rw-r--r--net-misc/charm/metadata.xml8
-rw-r--r--net-misc/chrome-remote-desktop/Manifest6
-rw-r--r--net-misc/chrome-remote-desktop/chrome-remote-desktop-40.0.2214.44.ebuild102
-rw-r--r--net-misc/chrome-remote-desktop/chrome-remote-desktop-41.0.2272.41-r1.ebuild106
-rw-r--r--net-misc/chrome-remote-desktop/chrome-remote-desktop-41.0.2272.41.ebuild102
-rw-r--r--net-misc/chrome-remote-desktop/chrome-remote-desktop-44.0.2403.44.ebuild106
-rw-r--r--net-misc/chrome-remote-desktop/files/chrome-remote-desktop-41.0.2272.41-always-sudo.patch18
-rw-r--r--net-misc/chrome-remote-desktop/files/chrome-remote-desktop-44.0.2403.44-always-sudo.patch20
-rw-r--r--net-misc/chrome-remote-desktop/files/chrome-remote-desktop.conf.d10
-rwxr-xr-xnet-misc/chrome-remote-desktop/files/chrome-remote-desktop.rc73
-rw-r--r--net-misc/chrome-remote-desktop/metadata.xml7
-rw-r--r--net-misc/chrony/Manifest1
-rw-r--r--net-misc/chrony/chrony-2.1.1.ebuild114
-rw-r--r--net-misc/chrony/files/chrony.logrotate11
-rw-r--r--net-misc/chrony/files/chronyd.conf12
-rw-r--r--net-misc/chrony/files/chronyd.init66
-rw-r--r--net-misc/chrony/files/chronyd.service-r212
-rw-r--r--net-misc/chrony/metadata.xml29
-rw-r--r--net-misc/clamz/Manifest2
-rw-r--r--net-misc/clamz/clamz-0.4.ebuild44
-rw-r--r--net-misc/clamz/clamz-0.5.ebuild44
-rw-r--r--net-misc/clamz/metadata.xml8
-rw-r--r--net-misc/clipgrab/Manifest2
-rw-r--r--net-misc/clipgrab/clipgrab-3.4.11.ebuild31
-rw-r--r--net-misc/clipgrab/clipgrab-3.4.9-r1.ebuild31
-rw-r--r--net-misc/clipgrab/files/clipgrab-3.2.0.10-obey.patch82
-rw-r--r--net-misc/clipgrab/files/clipgrab-3.2.1.0-obey.patch85
-rw-r--r--net-misc/clipgrab/files/clipgrab-3.4.2-obey.patch38
-rw-r--r--net-misc/clipgrab/metadata.xml8
-rw-r--r--net-misc/clockspeed-conf/Manifest1
-rw-r--r--net-misc/clockspeed-conf/clockspeed-conf-0.4.5-r1.ebuild30
-rw-r--r--net-misc/clockspeed-conf/files/clockspeed-conf-0.4.5-gentoo.patch26
-rw-r--r--net-misc/clockspeed-conf/metadata.xml7
-rw-r--r--net-misc/clockspeed/Manifest2
-rw-r--r--net-misc/clockspeed/clockspeed-0.62-r6.ebuild46
-rw-r--r--net-misc/clockspeed/files/clockspeed-0.62-gentoo.patch225
-rw-r--r--net-misc/clockspeed/files/ntpclockset57
-rw-r--r--net-misc/clockspeed/metadata.xml12
-rw-r--r--net-misc/clusterssh/Manifest1
-rw-r--r--net-misc/clusterssh/clusterssh-4.03.03.ebuild55
-rw-r--r--net-misc/clusterssh/clusterssh-9999.ebuild45
-rw-r--r--net-misc/clusterssh/files/clusterssh-4.01.01-testfix-1.patch87
-rw-r--r--net-misc/clusterssh/metadata.xml12
-rw-r--r--net-misc/cmst/Manifest1
-rw-r--r--net-misc/cmst/cmst-2015.03.01.ebuild41
-rw-r--r--net-misc/cmst/metadata.xml9
-rw-r--r--net-misc/cocaine-core/Manifest3
-rw-r--r--net-misc/cocaine-core/cocaine-core-0.11.2.5.ebuild25
-rw-r--r--net-misc/cocaine-core/cocaine-core-0.11.3.2.ebuild25
-rw-r--r--net-misc/cocaine-core/cocaine-core-0.9.2-r1.ebuild25
-rw-r--r--net-misc/cocaine-core/files/cocaine-core-0.11.2.5_binutils-2.23-compat.patch19
-rw-r--r--net-misc/cocaine-core/files/cocaine-core-0.9.2-boost-1.53.patch13
-rw-r--r--net-misc/cocaine-core/metadata.xml11
-rw-r--r--net-misc/connect/Manifest2
-rw-r--r--net-misc/connect/connect-1.100.ebuild35
-rw-r--r--net-misc/connect/connect-1.103.ebuild35
-rw-r--r--net-misc/connect/metadata.xml22
-rw-r--r--net-misc/connman/Manifest7
-rw-r--r--net-misc/connman/connman-1.21.ebuild65
-rw-r--r--net-misc/connman/connman-1.24.ebuild65
-rw-r--r--net-misc/connman/connman-1.25.ebuild65
-rw-r--r--net-misc/connman/connman-1.26.ebuild65
-rw-r--r--net-misc/connman/connman-1.27.ebuild66
-rw-r--r--net-misc/connman/connman-1.28.ebuild71
-rw-r--r--net-misc/connman/connman-1.29.ebuild71
-rw-r--r--net-misc/connman/files/connman-1.16-execinfo-assumptions.patch54
-rw-r--r--net-misc/connman/files/connman.confd15
-rw-r--r--net-misc/connman/files/connman.initd223
-rw-r--r--net-misc/connman/files/connman.service11
-rw-r--r--net-misc/connman/metadata.xml26
-rw-r--r--net-misc/corkscrew/Manifest1
-rw-r--r--net-misc/corkscrew/corkscrew-2.0.ebuild33
-rw-r--r--net-misc/corkscrew/metadata.xml11
-rw-r--r--net-misc/csync/Manifest1
-rw-r--r--net-misc/csync/csync-0.50.0.ebuild47
-rw-r--r--net-misc/csync/metadata.xml11
-rw-r--r--net-misc/curl/Manifest2
-rw-r--r--net-misc/curl/curl-7.42.1-r1.ebuild244
-rw-r--r--net-misc/curl/curl-7.42.1.ebuild243
-rw-r--r--net-misc/curl/curl-7.43.0.ebuild244
-rw-r--r--net-misc/curl/files/curl-7.30.0-prefix.patch21
-rw-r--r--net-misc/curl/files/curl-fix-gnutls-nettle.patch27
-rw-r--r--net-misc/curl/files/curl-respect-cflags-3.patch14
-rw-r--r--net-misc/curl/metadata.xml25
-rw-r--r--net-misc/dahdi-tools/Manifest8
-rw-r--r--net-misc/dahdi-tools/dahdi-tools-2.10.0.ebuild47
-rw-r--r--net-misc/dahdi-tools/dahdi-tools-2.10.1.ebuild54
-rw-r--r--net-misc/dahdi-tools/dahdi-tools-2.10.2.ebuild54
-rw-r--r--net-misc/dahdi-tools/dahdi-tools-2.6.2.ebuild47
-rw-r--r--net-misc/dahdi-tools/dahdi-tools-2.8.0.ebuild47
-rw-r--r--net-misc/dahdi-tools/dahdi-tools-2.9.0.1.ebuild47
-rw-r--r--net-misc/dahdi-tools/files/dahdi-autoconf.conf240
-rw-r--r--net-misc/dahdi-tools/files/dahdi-autoconf.init2225
-rw-r--r--net-misc/dahdi-tools/files/dahdi-autoconf.init3226
-rw-r--r--net-misc/dahdi-tools/files/dahdi.init237
-rw-r--r--net-misc/dahdi-tools/metadata.xml11
-rw-r--r--net-misc/dahdi/Manifest28
-rw-r--r--net-misc/dahdi/dahdi-2.10.0.1-r1.ebuild81
-rw-r--r--net-misc/dahdi/dahdi-2.10.0.1.ebuild81
-rw-r--r--net-misc/dahdi/dahdi-2.10.1.ebuild81
-rw-r--r--net-misc/dahdi/dahdi-2.10.2-r2.ebuild81
-rw-r--r--net-misc/dahdi/metadata.xml11
-rw-r--r--net-misc/datapipe/Manifest1
-rw-r--r--net-misc/datapipe/datapipe-1.0-r1.ebuild23
-rw-r--r--net-misc/datapipe/metadata.xml7
-rw-r--r--net-misc/dcetest/Manifest1
-rw-r--r--net-misc/dcetest/dcetest-2.0.ebuild31
-rw-r--r--net-misc/dcetest/metadata.xml21
-rw-r--r--net-misc/dhcdrop/Manifest1
-rw-r--r--net-misc/dhcdrop/dhcdrop-0.5.ebuild31
-rw-r--r--net-misc/dhcdrop/metadata.xml27
-rw-r--r--net-misc/dhcp/Manifest3
-rw-r--r--net-misc/dhcp/dhcp-4.2.5_p1-r1.ebuild247
-rw-r--r--net-misc/dhcp/dhcp-4.2.5_p1-r2.ebuild256
-rw-r--r--net-misc/dhcp/dhcp-4.2.5_p1.ebuild240
-rw-r--r--net-misc/dhcp/dhcp-4.3.1-r2.ebuild254
-rw-r--r--net-misc/dhcp/dhcp-4.3.2.ebuild254
-rw-r--r--net-misc/dhcp/files/dhcp-3.0-fix-perms.patch15
-rw-r--r--net-misc/dhcp/files/dhcp-3.0-paranoia.patch207
-rw-r--r--net-misc/dhcp/files/dhcp-3.0.3-dhclient-no-down.patch70
-rw-r--r--net-misc/dhcp/files/dhcp-3.1.3-dhclient-no-down.patch77
-rw-r--r--net-misc/dhcp/files/dhcp-4.0-dhclient-ntp.patch216
-rw-r--r--net-misc/dhcp/files/dhcp-4.2.0-errwarn-message.patch31
-rw-r--r--net-misc/dhcp/files/dhcp-4.2.2-bind-build-flags.patch14
-rw-r--r--net-misc/dhcp/files/dhcp-4.2.2-bind-disable.patch13
-rw-r--r--net-misc/dhcp/files/dhcp-4.2.2-bind-parallel-build.patch14
-rw-r--r--net-misc/dhcp/files/dhcp-4.2.2-dhclient-resolvconf.patch409
-rw-r--r--net-misc/dhcp/files/dhcp-4.2.2-dhclient-stdin-conf.patch113
-rw-r--r--net-misc/dhcp/files/dhcp-4.2.2-nogateway.patch46
-rw-r--r--net-misc/dhcp/files/dhcp-4.2.4-always-accept-4.patch29
-rw-r--r--net-misc/dhcp/files/dhcp-4.2.4-quieter-ping.patch72
-rw-r--r--net-misc/dhcp/files/dhcp-4.2.5-bindtodevice-inet6.patch19
-rw-r--r--net-misc/dhcp/files/dhcp-4.2.5-iproute2-path.patch15
-rw-r--r--net-misc/dhcp/files/dhcp-4.3.1-dhclient-resolvconf.patch411
-rw-r--r--net-misc/dhcp/files/dhcpd.conf228
-rwxr-xr-xnet-misc/dhcp/files/dhcpd.init5120
-rw-r--r--net-misc/dhcp/files/dhcpd.tmpfiles2
-rw-r--r--net-misc/dhcp/files/dhcpd4.service11
-rw-r--r--net-misc/dhcp/files/dhcpd6.service11
-rw-r--r--net-misc/dhcp/files/dhcrelay.conf16
-rwxr-xr-xnet-misc/dhcp/files/dhcrelay.init334
-rw-r--r--net-misc/dhcp/files/dhcrelay4.service10
-rw-r--r--net-misc/dhcp/files/dhcrelay4.service.conf3
-rw-r--r--net-misc/dhcp/files/dhcrelay6.conf8
-rw-r--r--net-misc/dhcp/files/dhcrelay6.service10
-rw-r--r--net-misc/dhcp/files/dhcrelay6.service.conf6
-rw-r--r--net-misc/dhcp/metadata.xml14
-rw-r--r--net-misc/dhcpcd-ui/Manifest2
-rw-r--r--net-misc/dhcpcd-ui/dhcpcd-ui-0.7.4.ebuild57
-rw-r--r--net-misc/dhcpcd-ui/dhcpcd-ui-0.7.5.ebuild57
-rw-r--r--net-misc/dhcpcd-ui/metadata.xml14
-rw-r--r--net-misc/dhcpcd/Manifest2
-rw-r--r--net-misc/dhcpcd/dhcpcd-6.9.0.ebuild120
-rw-r--r--net-misc/dhcpcd/dhcpcd-6.9.1.ebuild120
-rw-r--r--net-misc/dhcpcd/dhcpcd-9999.ebuild120
-rw-r--r--net-misc/dhcpcd/files/dhcpcd.initd17
-rw-r--r--net-misc/dhcpcd/files/dhcpcd.service10
-rw-r--r--net-misc/dhcpcd/metadata.xml17
-rw-r--r--net-misc/dhcpd-pools/Manifest1
-rw-r--r--net-misc/dhcpd-pools/dhcpd-pools-2.21.ebuild22
-rw-r--r--net-misc/dhcpd-pools/metadata.xml11
-rw-r--r--net-misc/dhcping/Manifest1
-rw-r--r--net-misc/dhcping/dhcping-1.2.ebuild13
-rw-r--r--net-misc/dhcping/metadata.xml7
-rw-r--r--net-misc/dibbler/Manifest3
-rw-r--r--net-misc/dibbler/dibbler-0.8.4.ebuild52
-rw-r--r--net-misc/dibbler/dibbler-1.0.0.ebuild52
-rw-r--r--net-misc/dibbler/dibbler-1.0.0_rc2.ebuild54
-rw-r--r--net-misc/dibbler/files/dibbler-client20
-rw-r--r--net-misc/dibbler/files/dibbler-client.service8
-rw-r--r--net-misc/dibbler/files/dibbler-relay20
-rw-r--r--net-misc/dibbler/files/dibbler-server20
-rw-r--r--net-misc/dibbler/metadata.xml8
-rw-r--r--net-misc/directvnc/Manifest2
-rw-r--r--net-misc/directvnc/directvnc-0.7.6-r1.ebuild43
-rw-r--r--net-misc/directvnc/directvnc-0.7.8.ebuild52
-rw-r--r--net-misc/directvnc/files/directvnc-0.7.6-mouse.patch30
-rw-r--r--net-misc/directvnc/files/directvnc-0.7.8-mouse.patch29
-rw-r--r--net-misc/directvnc/files/directvnc-mouse.patch77
-rw-r--r--net-misc/directvnc/metadata.xml15
-rw-r--r--net-misc/dleyna-server/Manifest1
-rw-r--r--net-misc/dleyna-server/dleyna-server-0.5.0.ebuild35
-rw-r--r--net-misc/dleyna-server/metadata.xml5
-rw-r--r--net-misc/dnetstats/Manifest1
-rw-r--r--net-misc/dnetstats/dnetstats-1.2.6-r3.ebuild52
-rw-r--r--net-misc/dnetstats/files/org.gentoo.pkexec.dnetstats.policy17
-rw-r--r--net-misc/dnetstats/metadata.xml6
-rw-r--r--net-misc/dropbear/Manifest6
-rw-r--r--net-misc/dropbear/dropbear-2013.60.ebuild103
-rw-r--r--net-misc/dropbear/dropbear-2013.62.ebuild103
-rw-r--r--net-misc/dropbear/dropbear-2014.63.ebuild101
-rw-r--r--net-misc/dropbear/dropbear-2014.65.ebuild99
-rw-r--r--net-misc/dropbear/dropbear-2014.66.ebuild99
-rw-r--r--net-misc/dropbear/dropbear-2015.67.ebuild99
-rw-r--r--net-misc/dropbear/files/dropbear-0.46-dbscp.patch20
-rw-r--r--net-misc/dropbear/files/dropbear-2013.62-multi-install-man.patch13
-rw-r--r--net-misc/dropbear/files/dropbear-2013.62-multi-no-relink.patch20
-rw-r--r--net-misc/dropbear/files/dropbear.conf.d6
-rw-r--r--net-misc/dropbear/files/dropbear.init.d39
-rw-r--r--net-misc/dropbear/metadata.xml28
-rw-r--r--net-misc/dropbox-cli/Manifest2
-rw-r--r--net-misc/dropbox-cli/dropbox-cli-1-r1.ebuild29
-rw-r--r--net-misc/dropbox-cli/dropbox-cli-1.6.0.ebuild29
-rw-r--r--net-misc/dropbox-cli/metadata.xml8
-rw-r--r--net-misc/dropbox/Manifest12
-rw-r--r--net-misc/dropbox/dropbox-2.10.2.ebuild105
-rw-r--r--net-misc/dropbox/dropbox-2.10.41-r1.ebuild106
-rw-r--r--net-misc/dropbox/dropbox-2.10.41.ebuild105
-rw-r--r--net-misc/dropbox/dropbox-2.4.10.ebuild104
-rw-r--r--net-misc/dropbox/dropbox-2.6.33.ebuild104
-rw-r--r--net-misc/dropbox/dropbox-2.8.4.ebuild104
-rw-r--r--net-misc/dropbox/dropbox-3.6.8.ebuild128
-rw-r--r--net-misc/dropbox/files/dropbox.conf14
-rw-r--r--net-misc/dropbox/files/dropbox.initd66
-rw-r--r--net-misc/dropbox/files/dropbox_at.service13
-rw-r--r--net-misc/dropbox/metadata.xml10
-rw-r--r--net-misc/efax/Manifest2
-rw-r--r--net-misc/efax/efax-0.9a-r4.ebuild40
-rw-r--r--net-misc/efax/files/efax-0.9a-fax-command.patch10
-rw-r--r--net-misc/efax/metadata.xml7
-rw-r--r--net-misc/electrum/Manifest2
-rw-r--r--net-misc/electrum/electrum-2.1.1.ebuild144
-rw-r--r--net-misc/electrum/electrum-2.3.3.ebuild144
-rw-r--r--net-misc/electrum/metadata.xml32
-rw-r--r--net-misc/elliptics-eblob/Manifest2
-rw-r--r--net-misc/elliptics-eblob/elliptics-eblob-0.0.1.ebuild41
-rw-r--r--net-misc/elliptics-eblob/elliptics-eblob-0.22.16.ebuild41
-rw-r--r--net-misc/elliptics-eblob/metadata.xml11
-rw-r--r--net-misc/elliptics/Manifest1
-rw-r--r--net-misc/elliptics/elliptics-2.19.2.6.ebuild71
-rw-r--r--net-misc/elliptics/files/elliptics.confd3
-rw-r--r--net-misc/elliptics/files/elliptics.initd35
-rw-r--r--net-misc/elliptics/metadata.xml11
-rw-r--r--net-misc/ethercard-diag/Manifest1
-rw-r--r--net-misc/ethercard-diag/ethercard-diag-20050321.1g-r1.ebuild33
-rw-r--r--net-misc/ethercard-diag/ethercard-diag-20050321.1g.ebuild27
-rw-r--r--net-misc/ethercard-diag/metadata.xml5
-rw-r--r--net-misc/exabgp/Manifest1
-rw-r--r--net-misc/exabgp/exabgp-3.2.17.ebuild19
-rw-r--r--net-misc/exabgp/metadata.xml11
-rw-r--r--net-misc/fakeidentd/Manifest2
-rw-r--r--net-misc/fakeidentd/fakeidentd-2.6.ebuild41
-rw-r--r--net-misc/fakeidentd/files/fakeidentd.confd6
-rw-r--r--net-misc/fakeidentd/files/fakeidentd.rc22
-rw-r--r--net-misc/fakeidentd/metadata.xml7
-rw-r--r--net-misc/fatrat/Manifest1
-rw-r--r--net-misc/fatrat/fatrat-1.2.0_beta2.ebuild57
-rw-r--r--net-misc/fatrat/files/fatrat-1.2.0_beta2-build.patch29
-rw-r--r--net-misc/fatrat/files/fatrat-1.2.0_beta2-libcrypto_linking.patch13
-rw-r--r--net-misc/fatrat/metadata.xml15
-rw-r--r--net-misc/flexget/Manifest4
-rw-r--r--net-misc/flexget/flexget-1.2.141.ebuild73
-rw-r--r--net-misc/flexget/flexget-1.2.192.ebuild75
-rw-r--r--net-misc/flexget/flexget-1.2.247.ebuild76
-rw-r--r--net-misc/flexget/flexget-1.2.315.ebuild76
-rw-r--r--net-misc/flexget/flexget-9999.ebuild76
-rw-r--r--net-misc/flexget/metadata.xml14
-rw-r--r--net-misc/fmirror/Manifest1
-rw-r--r--net-misc/fmirror/files/fmirror-crlf.patch11
-rw-r--r--net-misc/fmirror/fmirror-0.8.4-r2.ebuild43
-rw-r--r--net-misc/fmirror/metadata.xml7
-rw-r--r--net-misc/freerdp/Manifest4
-rw-r--r--net-misc/freerdp/files/freerdp-1.1-CVE-2014-0250.patch308
-rw-r--r--net-misc/freerdp/files/freerdp-1.1-cmake-3.1.patch68
-rw-r--r--net-misc/freerdp/files/freerdp-1.1.0_beta1-avx.patch61
-rw-r--r--net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-cmake.patch25
-rw-r--r--net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-ffmpeg.patch127
-rw-r--r--net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-uclibc.patch66
-rw-r--r--net-misc/freerdp/files/freerdp-armfp.patch84
-rw-r--r--net-misc/freerdp/files/freerdp-cmake-3.1.patch98
-rw-r--r--net-misc/freerdp/freerdp-1.1.0_beta1_p20130710-r1.ebuild105
-rw-r--r--net-misc/freerdp/freerdp-1.1.0_beta1_p20130710-r2.ebuild114
-rw-r--r--net-misc/freerdp/freerdp-1.1.0_beta1_p20150312.ebuild112
-rw-r--r--net-misc/freerdp/freerdp-1.2.0_beta1_pre20141115.ebuild106
-rw-r--r--net-misc/freerdp/freerdp-1.2.1_pre20150326.ebuild108
-rw-r--r--net-misc/freerdp/freerdp-9999.1.ebuild106
-rw-r--r--net-misc/freerdp/metadata.xml16
-rw-r--r--net-misc/gcap/Manifest1
-rw-r--r--net-misc/gcap/gcap-0.1.1-r1.ebuild23
-rw-r--r--net-misc/gcap/metadata.xml8
-rw-r--r--net-misc/geoipupdate/Manifest1
-rw-r--r--net-misc/geoipupdate/geoipupdate-2.2.1.ebuild28
-rw-r--r--net-misc/geoipupdate/metadata.xml8
-rw-r--r--net-misc/geomyidae/Manifest2
-rw-r--r--net-misc/geomyidae/geomyidae-0.26.2.ebuild50
-rw-r--r--net-misc/geomyidae/geomyidae-0.26.3.ebuild50
-rw-r--r--net-misc/geomyidae/metadata.xml8
-rw-r--r--net-misc/getdate/Manifest1
-rw-r--r--net-misc/getdate/getdate-1.2-r1.ebuild37
-rw-r--r--net-misc/getdate/metadata.xml8
-rw-r--r--net-misc/gip/Manifest2
-rw-r--r--net-misc/gip/files/gip-1.7.0.1-asneeded.patch33
-rw-r--r--net-misc/gip/gip-1.7.0.1.ebuild66
-rw-r--r--net-misc/gip/metadata.xml15
-rw-r--r--net-misc/gnome-online-miners/Manifest1
-rw-r--r--net-misc/gnome-online-miners/gnome-online-miners-3.14.3-r1.ebuild42
-rw-r--r--net-misc/gnome-online-miners/gnome-online-miners-3.14.3.ebuild41
-rw-r--r--net-misc/gnome-online-miners/metadata.xml8
-rw-r--r--net-misc/gnome-rdp/Manifest1
-rw-r--r--net-misc/gnome-rdp/gnome-rdp-0.3.0.9.ebuild36
-rw-r--r--net-misc/gnome-rdp/metadata.xml12
-rw-r--r--net-misc/gns3-converter/Manifest1
-rw-r--r--net-misc/gns3-converter/gns3-converter-1.2.3.ebuild20
-rw-r--r--net-misc/gns3-converter/metadata.xml12
-rw-r--r--net-misc/gns3-gui/Manifest2
-rw-r--r--net-misc/gns3-gui/gns3-gui-1.3.2.ebuild43
-rw-r--r--net-misc/gns3-gui/gns3-gui-1.3.3.ebuild38
-rw-r--r--net-misc/gns3-gui/metadata.xml11
-rw-r--r--net-misc/gns3-server/Manifest2
-rw-r--r--net-misc/gns3-server/gns3-server-1.3.2.ebuild44
-rw-r--r--net-misc/gns3-server/gns3-server-1.3.3.ebuild38
-rw-r--r--net-misc/gns3-server/metadata.xml11
-rw-r--r--net-misc/gofish/Manifest1
-rw-r--r--net-misc/gofish/files/gofish.confd27
-rw-r--r--net-misc/gofish/files/gofish.rc33
-rw-r--r--net-misc/gofish/gofish-1.2.ebuild41
-rw-r--r--net-misc/gofish/metadata.xml11
-rw-r--r--net-misc/gogoc/Manifest1
-rw-r--r--net-misc/gogoc/files/gogoc-1.2+gcc-4.6.patch26
-rw-r--r--net-misc/gogoc/files/gogoc-1.2-overflow.patch35
-rw-r--r--net-misc/gogoc/files/gogoc.rc42
-rw-r--r--net-misc/gogoc/files/gogoc.service12
-rw-r--r--net-misc/gogoc/gogoc-1.2-r2.ebuild96
-rw-r--r--net-misc/gogoc/gogoc-1.2-r3.ebuild97
-rw-r--r--net-misc/gogoc/metadata.xml14
-rw-r--r--net-misc/goog-sitemapgen/Manifest1
-rw-r--r--net-misc/goog-sitemapgen/files/goog-sitemapgen-1.5.patch8
-rw-r--r--net-misc/goog-sitemapgen/goog-sitemapgen-1.5.ebuild34
-rw-r--r--net-misc/goog-sitemapgen/metadata.xml21
-rw-r--r--net-misc/googlecl/Manifest1
-rw-r--r--net-misc/googlecl/files/googlecl-0.9.12-calendar_dates.patch64
-rw-r--r--net-misc/googlecl/googlecl-0.9.14.ebuild33
-rw-r--r--net-misc/googlecl/metadata.xml11
-rw-r--r--net-misc/grdesktop/Manifest1
-rw-r--r--net-misc/grdesktop/files/grdesktop-0.23-desktop.patch19
-rw-r--r--net-misc/grdesktop/grdesktop-0.23-r1.ebuild45
-rw-r--r--net-misc/grdesktop/metadata.xml7
-rw-r--r--net-misc/grive/Manifest3
-rw-r--r--net-misc/grive/files/grive-0.2.0-check-bfd.h.patch36
-rw-r--r--net-misc/grive/grive-0.2.0-r1.ebuild54
-rw-r--r--net-misc/grive/grive-0.3.0_pre20130503.ebuild72
-rw-r--r--net-misc/grive/grive-0.3.0_pre20141119.ebuild38
-rw-r--r--net-misc/grive/metadata.xml11
-rw-r--r--net-misc/gsasl/Manifest1
-rw-r--r--net-misc/gsasl/files/gsasl-gss-extra.patch21
-rw-r--r--net-misc/gsasl/gsasl-1.8.0-r1.ebuild73
-rw-r--r--net-misc/gsasl/metadata.xml13
-rw-r--r--net-misc/gsutil/Manifest15
-rw-r--r--net-misc/gsutil/files/dummy.boto6
-rw-r--r--net-misc/gsutil/files/gsutil-3.37-drop-http_proxy-clearing.patch35
-rw-r--r--net-misc/gsutil/files/gsutil-3.37-use-friendy-version-checks.patch20
-rw-r--r--net-misc/gsutil/files/gsutil-3.38-use-friendy-version-checks.patch20
-rw-r--r--net-misc/gsutil/files/gsutil-3.42-use-friendy-version-checks.patch20
-rw-r--r--net-misc/gsutil/files/gsutil-4.13-use-friendy-version-checks.patch24
-rw-r--r--net-misc/gsutil/files/gsutil-4.4-use-friendy-version-checks.patch22
-rw-r--r--net-misc/gsutil/files/gsutil-4.7-drop-http_proxy-clearing.patch36
-rw-r--r--net-misc/gsutil/files/gsutil-4.7-use-friendy-version-checks.patch22
-rw-r--r--net-misc/gsutil/files/gsutil-system-boto.patch23
-rw-r--r--net-misc/gsutil/gsutil-3.14.ebuild60
-rw-r--r--net-misc/gsutil/gsutil-3.18.ebuild60
-rw-r--r--net-misc/gsutil/gsutil-3.21.ebuild57
-rw-r--r--net-misc/gsutil/gsutil-3.37.ebuild44
-rw-r--r--net-misc/gsutil/gsutil-3.38.ebuild44
-rw-r--r--net-misc/gsutil/gsutil-3.42.ebuild44
-rw-r--r--net-misc/gsutil/gsutil-3.7.ebuild60
-rw-r--r--net-misc/gsutil/gsutil-4.11.ebuild44
-rw-r--r--net-misc/gsutil/gsutil-4.12.ebuild46
-rw-r--r--net-misc/gsutil/gsutil-4.13.ebuild46
-rw-r--r--net-misc/gsutil/gsutil-4.4.ebuild44
-rw-r--r--net-misc/gsutil/gsutil-4.5.ebuild44
-rw-r--r--net-misc/gsutil/gsutil-4.6.ebuild44
-rw-r--r--net-misc/gsutil/gsutil-4.7.ebuild45
-rw-r--r--net-misc/gsutil/gsutil-4.8.ebuild44
-rw-r--r--net-misc/gsutil/metadata.xml11
-rw-r--r--net-misc/gtkvncviewer/Manifest1
-rw-r--r--net-misc/gtkvncviewer/gtkvncviewer-0.4.ebuild38
-rw-r--r--net-misc/gtkvncviewer/metadata.xml11
-rw-r--r--net-misc/guacamole-server/Manifest5
-rw-r--r--net-misc/guacamole-server/files/guacd24
-rw-r--r--net-misc/guacamole-server/files/guacd.service11
-rw-r--r--net-misc/guacamole-server/guacamole-server-0.8.3.ebuild41
-rw-r--r--net-misc/guacamole-server/guacamole-server-0.9.0.ebuild41
-rw-r--r--net-misc/guacamole-server/guacamole-server-0.9.2.ebuild43
-rw-r--r--net-misc/guacamole-server/guacamole-server-0.9.3.ebuild55
-rw-r--r--net-misc/guacamole-server/guacamole-server-0.9.7.ebuild62
-rw-r--r--net-misc/guacamole-server/metadata.xml20
-rw-r--r--net-misc/guidedog/Manifest1
-rw-r--r--net-misc/guidedog/guidedog-1.1-r1.ebuild45
-rw-r--r--net-misc/guidedog/metadata.xml5
-rw-r--r--net-misc/gupnp-tools/Manifest2
-rw-r--r--net-misc/gupnp-tools/gupnp-tools-0.8.10.ebuild33
-rw-r--r--net-misc/gupnp-tools/gupnp-tools-0.8.9.ebuild34
-rw-r--r--net-misc/gupnp-tools/metadata.xml5
-rw-r--r--net-misc/gvrpcd/Manifest1
-rw-r--r--net-misc/gvrpcd/files/conf.gvrpcd6
-rw-r--r--net-misc/gvrpcd/files/gvrpcd-respect-ldflags.patch17
-rw-r--r--net-misc/gvrpcd/files/init.gvrpcd51
-rw-r--r--net-misc/gvrpcd/gvrpcd-1.3.ebuild36
-rw-r--r--net-misc/gvrpcd/metadata.xml15
-rw-r--r--net-misc/gwget/Manifest1
-rw-r--r--net-misc/gwget/files/gwget-1.0.4-glib-single-include.patch13
-rw-r--r--net-misc/gwget/files/gwget-1.0.4-libnotify-0.7.patch29
-rw-r--r--net-misc/gwget/gwget-1.0.4.ebuild55
-rw-r--r--net-misc/gwget/metadata.xml14
-rw-r--r--net-misc/gwhois/Manifest1
-rw-r--r--net-misc/gwhois/files/gwhois.xinetd18
-rw-r--r--net-misc/gwhois/gwhois-20120626.ebuild47
-rw-r--r--net-misc/gwhois/metadata.xml17
-rw-r--r--net-misc/hashcash/Manifest1
-rw-r--r--net-misc/hashcash/hashcash-1.22-r1.ebuild33
-rw-r--r--net-misc/hashcash/metadata.xml8
-rw-r--r--net-misc/hlfl/Manifest1
-rw-r--r--net-misc/hlfl/hlfl-0.60.1.ebuild30
-rw-r--r--net-misc/hlfl/metadata.xml7
-rw-r--r--net-misc/hotot/Manifest2
-rw-r--r--net-misc/hotot/hotot-0.9.8.14.ebuild66
-rw-r--r--net-misc/hotot/hotot-0.9.8.14_p20130514.ebuild67
-rw-r--r--net-misc/hotot/hotot-9999.ebuild66
-rw-r--r--net-misc/hotot/metadata.xml9
-rw-r--r--net-misc/hsc/Manifest1
-rw-r--r--net-misc/hsc/files/hsc-1.0b-cflags.patch45
-rw-r--r--net-misc/hsc/files/hsc-1.0b-glibc-2.10.patch12
-rw-r--r--net-misc/hsc/files/hsc-1.0b-nostrip.patch18
-rw-r--r--net-misc/hsc/files/hsc-1.0b-parmake.patch13
-rw-r--r--net-misc/hsc/hsc-1.0b.ebuild33
-rw-r--r--net-misc/hsc/metadata.xml5
-rw-r--r--net-misc/htbinit/Manifest1
-rw-r--r--net-misc/htbinit/files/htb.init-v0.8.5_tos.patch51
-rw-r--r--net-misc/htbinit/files/htb.init_find_fix.patch33
-rw-r--r--net-misc/htbinit/files/htb_0.8.5_esfq.diff53
-rw-r--r--net-misc/htbinit/files/htb_0.8.5_ipv6.diff128
-rw-r--r--net-misc/htbinit/files/htbinit.rc47
-rw-r--r--net-misc/htbinit/files/prio_rule.patch20
-rw-r--r--net-misc/htbinit/files/timecheck_fix.patch42
-rw-r--r--net-misc/htbinit/htbinit-0.8.5-r6.ebuild61
-rw-r--r--net-misc/htbinit/metadata.xml21
-rw-r--r--net-misc/htpdate/Manifest2
-rw-r--r--net-misc/htpdate/files/htpdate.conf12
-rw-r--r--net-misc/htpdate/files/htpdate.init-r121
-rw-r--r--net-misc/htpdate/htpdate-1.0.7.ebuild48
-rw-r--r--net-misc/htpdate/htpdate-1.1.1.ebuild41
-rw-r--r--net-misc/htpdate/metadata.xml8
-rw-r--r--net-misc/httpie/Manifest1
-rw-r--r--net-misc/httpie/httpie-0.9.2.ebuild23
-rw-r--r--net-misc/httpie/metadata.xml20
-rw-r--r--net-misc/httptunnel/Manifest1
-rw-r--r--net-misc/httptunnel/files/httptunnel-3.3-fix_write_stdin.patch12
-rw-r--r--net-misc/httptunnel/httptunnel-3.3-r2.ebuild31
-rw-r--r--net-misc/httptunnel/metadata.xml7
-rw-r--r--net-misc/httptype/Manifest1
-rw-r--r--net-misc/httptype/httptype-1.3.9-r1.ebuild23
-rw-r--r--net-misc/httptype/metadata.xml8
-rw-r--r--net-misc/htun/Manifest1
-rw-r--r--net-misc/htun/files/README.gentoo3
-rw-r--r--net-misc/htun/files/htun-0.9.6-glibc.patch14
-rw-r--r--net-misc/htun/files/htun-0.9.6-makefile.patch22
-rw-r--r--net-misc/htun/htun-0.9.6.ebuild39
-rw-r--r--net-misc/htun/metadata.xml8
-rw-r--r--net-misc/hylafaxplus/Manifest2
-rw-r--r--net-misc/hylafaxplus/files/hylafax-cryptglibc.patch98
-rw-r--r--net-misc/hylafaxplus/files/hylafaxplus-conf29
-rw-r--r--net-misc/hylafaxplus/files/hylafaxplus-init176
-rw-r--r--net-misc/hylafaxplus/files/ldconfig-patch10
-rw-r--r--net-misc/hylafaxplus/hylafaxplus-5.5.4-r1.ebuild176
-rw-r--r--net-misc/hylafaxplus/hylafaxplus-5.5.5.ebuild176
-rw-r--r--net-misc/hylafaxplus/metadata.xml21
-rw-r--r--net-misc/i2pd/Manifest2
-rw-r--r--net-misc/i2pd/files/99i2pd1
-rw-r--r--net-misc/i2pd/files/i2pd.1101
-rw-r--r--net-misc/i2pd/files/i2pd.conf4
-rw-r--r--net-misc/i2pd/files/i2pd.confd6
-rw-r--r--net-misc/i2pd/files/i2pd.initd24
-rw-r--r--net-misc/i2pd/files/i2pd.logrotate14
-rw-r--r--net-misc/i2pd/files/i2pd.service18
-rw-r--r--net-misc/i2pd/i2pd-0.5.0.ebuild63
-rw-r--r--net-misc/i2pd/i2pd-0.6.0.ebuild65
-rw-r--r--net-misc/i2pd/i2pd-9999.ebuild76
-rw-r--r--net-misc/i2pd/metadata.xml23
-rw-r--r--net-misc/iaxmodem/Manifest1
-rw-r--r--net-misc/iaxmodem/files/iaxmodem.cfg88
-rw-r--r--net-misc/iaxmodem/files/iaxmodem.confd6
-rw-r--r--net-misc/iaxmodem/files/iaxmodem.initd43
-rw-r--r--net-misc/iaxmodem/files/iaxmodem.logrotated9
-rw-r--r--net-misc/iaxmodem/iaxmodem-1.2.0.ebuild108
-rw-r--r--net-misc/iaxmodem/metadata.xml13
-rw-r--r--net-misc/icaclient/Manifest2
-rw-r--r--net-misc/icaclient/files/10ICAClient3
-rw-r--r--net-misc/icaclient/icaclient-12.1.0.ebuild189
-rw-r--r--net-misc/icaclient/metadata.xml17
-rw-r--r--net-misc/icecast/Manifest1
-rw-r--r--net-misc/icecast/files/icecast-2.3.3-fix-xiph_openssl.patch13
-rw-r--r--net-misc/icecast/files/icecast-2.3.3-libkate.patch28
-rw-r--r--net-misc/icecast/files/icecast.logrotate8
-rw-r--r--net-misc/icecast/files/icecast.service9
-rw-r--r--net-misc/icecast/files/icecast.xml180
-rw-r--r--net-misc/icecast/files/init.d.icecast-220
-rw-r--r--net-misc/icecast/icecast-2.4.2.ebuild83
-rw-r--r--net-misc/icecast/metadata.xml13
-rw-r--r--net-misc/ices/Manifest2
-rw-r--r--net-misc/ices/files/ices.initd17
-rw-r--r--net-misc/ices/files/ices.initd-r114
-rw-r--r--net-misc/ices/ices-2.0.1-r1.ebuild44
-rw-r--r--net-misc/ices/ices-2.0.2.ebuild43
-rw-r--r--net-misc/ices/metadata.xml5
-rw-r--r--net-misc/identicurse/Manifest1
-rw-r--r--net-misc/identicurse/files/0.9-config_json_path.patch22
-rw-r--r--net-misc/identicurse/files/identicurse-gzipped_readme.patch15
-rw-r--r--net-misc/identicurse/identicurse-0.9.ebuild34
-rw-r--r--net-misc/identicurse/metadata.xml8
-rw-r--r--net-misc/ifenslave/Manifest2
-rw-r--r--net-misc/ifenslave/ifenslave-1.1.0-r6.ebuild55
-rw-r--r--net-misc/ifenslave/metadata.xml11
-rw-r--r--net-misc/igmpproxy/Manifest1
-rw-r--r--net-misc/igmpproxy/files/igmpproxy-conf.d6
-rw-r--r--net-misc/igmpproxy/files/igmpproxy-init.d25
-rw-r--r--net-misc/igmpproxy/files/igmpproxy.service9
-rw-r--r--net-misc/igmpproxy/igmpproxy-0.1-r1.ebuild25
-rw-r--r--net-misc/igmpproxy/metadata.xml14
-rw-r--r--net-misc/iodine/Manifest1
-rw-r--r--net-misc/iodine/files/iodine-0.7.0-TestMessage.patch12
-rw-r--r--net-misc/iodine/files/iodine-0.7.0-new-systemd.patch33
-rw-r--r--net-misc/iodine/files/iodined-1.init62
-rw-r--r--net-misc/iodine/files/iodined.conf44
-rw-r--r--net-misc/iodine/files/iodined.init62
-rw-r--r--net-misc/iodine/iodine-0.7.0.ebuild51
-rw-r--r--net-misc/iodine/metadata.xml18
-rw-r--r--net-misc/ip-sentinel/Manifest1
-rw-r--r--net-misc/ip-sentinel/files/ip-sentinel.cfg11
-rw-r--r--net-misc/ip-sentinel/files/ip-sentinel.conf.d11
-rw-r--r--net-misc/ip-sentinel/files/ip-sentinel.init50
-rw-r--r--net-misc/ip-sentinel/ip-sentinel-0.12.ebuild68
-rw-r--r--net-misc/ip-sentinel/metadata.xml20
-rw-r--r--net-misc/ipcalc/Manifest1
-rw-r--r--net-misc/ipcalc/ipcalc-0.41.ebuild20
-rw-r--r--net-misc/ipcalc/metadata.xml5
-rw-r--r--net-misc/iperf/Manifest3
-rw-r--r--net-misc/iperf/files/iperf-3.0.5-flags.patch31
-rw-r--r--net-misc/iperf/files/iperf-bidirectional-tcp-server.patch23
-rw-r--r--net-misc/iperf/files/iperf-cast-to-max_size_t-instead-of-int.patch20
-rw-r--r--net-misc/iperf/files/iperf-die-on-bind-fail.patch19
-rw-r--r--net-misc/iperf/files/iperf-fix-bandwidth-limit.patch21
-rw-r--r--net-misc/iperf/files/iperf-fix-format-security-ftbfs.patch96
-rw-r--r--net-misc/iperf/files/iperf-ipv6_mcast_check.patch22
-rw-r--r--net-misc/iperf/files/iperf.confd6
-rw-r--r--net-misc/iperf/files/iperf.initd-r115
-rw-r--r--net-misc/iperf/iperf-2.0.5-r2.ebuild39
-rw-r--r--net-misc/iperf/iperf-3.0.11.ebuild28
-rw-r--r--net-misc/iperf/iperf-3.1_beta3.ebuild30
-rw-r--r--net-misc/iperf/metadata.xml8
-rw-r--r--net-misc/ipsc/Manifest1
-rw-r--r--net-misc/ipsc/ipsc-0.4.3.2-r2.ebuild37
-rw-r--r--net-misc/ipsc/metadata.xml10
-rw-r--r--net-misc/ipsorcery/Manifest1
-rw-r--r--net-misc/ipsorcery/ipsorcery-2.0.9-r1.ebuild32
-rw-r--r--net-misc/ipsorcery/metadata.xml8
-rw-r--r--net-misc/ipsvd/Manifest1
-rw-r--r--net-misc/ipsvd/files/ipsvd-1.0.0-fix-parallel-make.diff42
-rw-r--r--net-misc/ipsvd/ipsvd-1.0.0-r1.ebuild50
-rw-r--r--net-misc/ipsvd/metadata.xml28
-rw-r--r--net-misc/iputils/Manifest2
-rw-r--r--net-misc/iputils/files/021109-uclibc-no-ether_ntohost.patch24
-rw-r--r--net-misc/iputils/files/iputils-20071127-nonroot-floodping.patch11
-rw-r--r--net-misc/iputils/files/iputils-20100418-so_mark.patch22
-rw-r--r--net-misc/iputils/files/iputils-20121221-crypto-build.patch35
-rw-r--r--net-misc/iputils/files/iputils-20121221-makefile.patch61
-rw-r--r--net-misc/iputils/files/iputils-20121221-openssl.patch92
-rw-r--r--net-misc/iputils/files/iputils-20121221-owl-pingsock.diff224
-rw-r--r--net-misc/iputils/files/iputils-20121221-parallel-doc.patch74
-rw-r--r--net-misc/iputils/files/iputils-20121221-printf-size.patch64
-rw-r--r--net-misc/iputils/files/iputils-20121221-strtod.patch45
-rw-r--r--net-misc/iputils/files/iputils-20121221-tftpd-setid.patch34
-rw-r--r--net-misc/iputils/files/iputils-20121221-tftpd-syslog.patch38
-rw-r--r--net-misc/iputils/files/iputils-99999999-openssl.patch97
-rw-r--r--net-misc/iputils/files/iputils-99999999-tftpd-syslog.patch38
-rw-r--r--net-misc/iputils/files/rarpd.conf.d8
-rwxr-xr-xnet-misc/iputils/files/rarpd.init.d20
-rw-r--r--net-misc/iputils/iputils-20121221-r1.ebuild104
-rw-r--r--net-misc/iputils/iputils-20121221-r2.ebuild151
-rw-r--r--net-misc/iputils/iputils-20121221.ebuild98
-rw-r--r--net-misc/iputils/iputils-99999999.ebuild146
-rw-r--r--net-misc/iputils/metadata.xml18
-rw-r--r--net-misc/ipv6calc/Manifest3
-rw-r--r--net-misc/ipv6calc/files/ipv6calc-0.96.0-fix-link-order.patch48
-rw-r--r--net-misc/ipv6calc/ipv6calc-0.94.1.ebuild54
-rw-r--r--net-misc/ipv6calc/ipv6calc-0.97.4.ebuild60
-rw-r--r--net-misc/ipv6calc/ipv6calc-0.98.0.ebuild66
-rw-r--r--net-misc/ipv6calc/metadata.xml17
-rw-r--r--net-misc/ipx-utils/Manifest1
-rw-r--r--net-misc/ipx-utils/files/ipx-utils-1.1-makefile.patch24
-rw-r--r--net-misc/ipx-utils/files/ipx-utils-1.1-proc.patch13
-rw-r--r--net-misc/ipx-utils/files/ipx.confd27
-rw-r--r--net-misc/ipx-utils/files/ipx.init43
-rw-r--r--net-misc/ipx-utils/ipx-utils-1.1-r3.ebuild34
-rw-r--r--net-misc/ipx-utils/metadata.xml8
-rw-r--r--net-misc/isatapd/Manifest1
-rw-r--r--net-misc/isatapd/files/isatapd.service-r215
-rw-r--r--net-misc/isatapd/files/isatapd.service.conf30
-rw-r--r--net-misc/isatapd/isatapd-0.9.7-r2.ebuild35
-rw-r--r--net-misc/isatapd/metadata.xml9
-rw-r--r--net-misc/italc/Manifest1
-rw-r--r--net-misc/italc/files/italc-2.0.0-gcc-4.7.patch15
-rw-r--r--net-misc/italc/italc-2.0.0.ebuild70
-rw-r--r--net-misc/italc/metadata.xml10
-rw-r--r--net-misc/ixp4xx/Manifest3
-rw-r--r--net-misc/ixp4xx/files/2.1/10-oe-ixethdb-header.patch11
-rw-r--r--net-misc/ixp4xx/files/2.1/11-oe-bit-macro.patch14
-rw-r--r--net-misc/ixp4xx/files/2.1/12-oe-ixnpemhconfigisr-is-private.patch18
-rw-r--r--net-misc/ixp4xx/files/2.1/13-oe-le.patch13
-rw-r--r--net-misc/ixp4xx/files/2.1/30-oe-Makefile.patch26
-rw-r--r--net-misc/ixp4xx/files/2.1/31-oe-2.6.patch137
-rw-r--r--net-misc/ixp4xx/files/2.1/32-oe-invalidate-cache.patch110
-rw-r--r--net-misc/ixp4xx/files/2.1/33-oe-ixp4xx-header.patch103
-rw-r--r--net-misc/ixp4xx/files/2.1/34-oe-le.patch65
-rw-r--r--net-misc/ixp4xx/files/2.1/35-oe-assert.patch37
-rw-r--r--net-misc/ixp4xx/files/2.1/40-yvasilev-oslinux.patch20
-rw-r--r--net-misc/ixp4xx/files/2.1/41-oemod-Makefile.patch55
-rw-r--r--net-misc/ixp4xx/files/2.1/42-yvasilev-Makefile-ixp400.patch13
-rw-r--r--net-misc/ixp4xx/files/2.1/43-yvasilev-Makefile-ixp400_eth.patch35
-rw-r--r--net-misc/ixp4xx/files/2.1/50-oemod-ixp400_eth.patch171
-rw-r--r--net-misc/ixp4xx/files/2.1/README1
-rw-r--r--net-misc/ixp4xx/ixp4xx-2.1.ebuild52
-rw-r--r--net-misc/ixp4xx/metadata.xml6
-rw-r--r--net-misc/java-wakeonlan/Manifest1
-rw-r--r--net-misc/java-wakeonlan/files/java-wakeonlan-1.0.0-build.xml.patch43
-rw-r--r--net-misc/java-wakeonlan/java-wakeonlan-1.0.0-r2.ebuild59
-rw-r--r--net-misc/java-wakeonlan/metadata.xml5
-rw-r--r--net-misc/jigdo/Manifest1
-rw-r--r--net-misc/jigdo/files/jigdo-0.7.3-gcc43.patch80
-rw-r--r--net-misc/jigdo/files/jigdo-0.7.3-strip.patch23
-rw-r--r--net-misc/jigdo/jigdo-0.7.3-r2.ebuild39
-rw-r--r--net-misc/jigdo/metadata.xml15
-rw-r--r--net-misc/jlj/Manifest1
-rw-r--r--net-misc/jlj/jlj-2.12.ebuild26
-rw-r--r--net-misc/jlj/metadata.xml9
-rw-r--r--net-misc/jrdesktop/Manifest1
-rw-r--r--net-misc/jrdesktop/jrdesktop-0.3.1.0.ebuild33
-rw-r--r--net-misc/jrdesktop/metadata.xml15
-rw-r--r--net-misc/jumpgate/Manifest1
-rw-r--r--net-misc/jumpgate/jumpgate-0.7.ebuild28
-rw-r--r--net-misc/jumpgate/metadata.xml8
-rw-r--r--net-misc/jwhois/Manifest2
-rw-r--r--net-misc/jwhois/files/jwhois-3.2.3-whois-de.patch18
-rw-r--r--net-misc/jwhois/files/jwhois-4.0-connect-logic.patch15
-rw-r--r--net-misc/jwhois/jwhois-3.2.3-r1.ebuild36
-rw-r--r--net-misc/jwhois/jwhois-4.0-r1.ebuild31
-rw-r--r--net-misc/jwhois/jwhois-4.0.ebuild29
-rw-r--r--net-misc/jwhois/metadata.xml5
-rw-r--r--net-misc/keychain/Manifest3
-rw-r--r--net-misc/keychain/files/keychain-2.7.1-openssh-6.8.patch47
-rw-r--r--net-misc/keychain/files/keychain-2.8.0-posix-sh.patch35
-rw-r--r--net-misc/keychain/keychain-2.7.1-r1.ebuild26
-rw-r--r--net-misc/keychain/keychain-2.7.1-r2.ebuild32
-rw-r--r--net-misc/keychain/keychain-2.8.0.ebuild29
-rw-r--r--net-misc/keychain/keychain-2.8.1.ebuild23
-rw-r--r--net-misc/keychain/metadata.xml14
-rw-r--r--net-misc/knemo/Manifest1
-rw-r--r--net-misc/knemo/knemo-0.7.6-r1.ebuild38
-rw-r--r--net-misc/knemo/metadata.xml5
-rw-r--r--net-misc/knock/Manifest2
-rw-r--r--net-misc/knock/files/knockd.confd.29
-rw-r--r--net-misc/knock/files/knockd.initd.225
-rw-r--r--net-misc/knock/knock-0.6.ebuild48
-rw-r--r--net-misc/knock/knock-0.7.ebuild48
-rw-r--r--net-misc/knock/metadata.xml11
-rw-r--r--net-misc/knutclient/Manifest1
-rw-r--r--net-misc/knutclient/files/knutclient-1.0.5-desktop.patch15
-rw-r--r--net-misc/knutclient/knutclient-1.0.5.ebuild24
-rw-r--r--net-misc/knutclient/metadata.xml5
-rw-r--r--net-misc/ksshaskpass/Manifest1
-rw-r--r--net-misc/ksshaskpass/ksshaskpass-0.5.3-r1.ebuild54
-rw-r--r--net-misc/ksshaskpass/metadata.xml5
-rw-r--r--net-misc/kumofs/Manifest1
-rw-r--r--net-misc/kumofs/files/kumo-gateway.confd4
-rw-r--r--net-misc/kumofs/files/kumo-gateway.initd26
-rw-r--r--net-misc/kumofs/files/kumo-manager.confd6
-rw-r--r--net-misc/kumofs/files/kumo-manager.initd27
-rw-r--r--net-misc/kumofs/files/kumo-server.confd6
-rw-r--r--net-misc/kumofs/files/kumo-server.initd27
-rw-r--r--net-misc/kumofs/kumofs-0.4.13.ebuild37
-rw-r--r--net-misc/kumofs/metadata.xml10
-rw-r--r--net-misc/kvpnc/Manifest2
-rw-r--r--net-misc/kvpnc/files/kvpnc-0.9.6a-gcc47.patch11
-rw-r--r--net-misc/kvpnc/files/kvpnc-0.9.6a-ifconfig.patch38
-rw-r--r--net-misc/kvpnc/files/kvpnc-0.9.6a-scriptsec.patch15
-rw-r--r--net-misc/kvpnc/kvpnc-0.9.6a-r2.ebuild53
-rw-r--r--net-misc/kvpnc/metadata.xml5
-rw-r--r--net-misc/l7-filter-userspace/Manifest2
-rw-r--r--net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-arm-ppc-getopt-help-fix.patch21
-rw-r--r--net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-datatype.patch11
-rw-r--r--net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-libnetfilter_conntrack-0.0.100.patch104
-rw-r--r--net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-map-access-threadsafe.patch55
-rw-r--r--net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-pattern-loading-leak.patch10
-rw-r--r--net-misc/l7-filter-userspace/l7-filter-userspace-0.11.ebuild33
-rw-r--r--net-misc/l7-filter-userspace/l7-filter-userspace-0.12_beta1.ebuild33
-rw-r--r--net-misc/l7-filter-userspace/metadata.xml9
-rw-r--r--net-misc/l7-protocols/Manifest1
-rw-r--r--net-misc/l7-protocols/l7-protocols-2009.05.28.ebuild64
-rw-r--r--net-misc/l7-protocols/metadata.xml17
-rw-r--r--net-misc/lambdamoo/Manifest1
-rw-r--r--net-misc/lambdamoo/files/1.8.1-enable-outbound.patch13
-rw-r--r--net-misc/lambdamoo/files/lambdamoo.conf6
-rw-r--r--net-misc/lambdamoo/files/lambdamoo.rc48
-rw-r--r--net-misc/lambdamoo/lambdamoo-1.8.1-r2.ebuild47
-rw-r--r--net-misc/lambdamoo/metadata.xml10
-rw-r--r--net-misc/lanmap/Manifest1
-rw-r--r--net-misc/lanmap/files/lanmap-81-make.patch69
-rw-r--r--net-misc/lanmap/files/lanmap-81-printf-format.patch11
-rw-r--r--net-misc/lanmap/lanmap-81-r1.ebuild41
-rw-r--r--net-misc/lanmap/lanmap-81-r2.ebuild43
-rw-r--r--net-misc/lanmap/metadata.xml6
-rw-r--r--net-misc/lcr/lcr-9999.ebuild54
-rw-r--r--net-misc/lcr/metadata.xml15
-rw-r--r--net-misc/leapcast/Manifest1
-rw-r--r--net-misc/leapcast/leapcast-0.1.3-r1.ebuild27
-rw-r--r--net-misc/leapcast/leapcast-9999.ebuild27
-rw-r--r--net-misc/leapcast/metadata.xml11
-rw-r--r--net-misc/libreswan/Manifest6
-rwxr-xr-xnet-misc/libreswan/files/ipsec.service19
-rw-r--r--net-misc/libreswan/files/libreswan-3.7-curl.patch30
-rw-r--r--net-misc/libreswan/files/libreswan-3.7-openrc-pidfile.patch37
-rw-r--r--net-misc/libreswan/files/libreswan-3.7-openrc.patch24
-rw-r--r--net-misc/libreswan/libreswan-3.10.ebuild99
-rw-r--r--net-misc/libreswan/libreswan-3.12.ebuild99
-rw-r--r--net-misc/libreswan/libreswan-3.13.ebuild99
-rw-r--r--net-misc/libreswan/libreswan-3.7-r1.ebuild101
-rw-r--r--net-misc/libreswan/libreswan-3.8.ebuild100
-rw-r--r--net-misc/libreswan/libreswan-3.9.ebuild100
-rw-r--r--net-misc/libreswan/libreswan-9999.ebuild99
-rw-r--r--net-misc/libreswan/metadata.xml11
-rw-r--r--net-misc/libss7/Manifest1
-rw-r--r--net-misc/libss7/files/1.0.2-ldflags.patch12
-rw-r--r--net-misc/libss7/files/1.0.2-no-ldconfig.patch11
-rw-r--r--net-misc/libss7/files/1.0.2-werror-idiocy.patch12
-rw-r--r--net-misc/libss7/libss7-1.0.2.ebuild32
-rw-r--r--net-misc/libss7/metadata.xml8
-rw-r--r--net-misc/libteam/Manifest3
-rw-r--r--net-misc/libteam/libteam-1.0.ebuild58
-rw-r--r--net-misc/libteam/libteam-1.11.ebuild61
-rw-r--r--net-misc/libteam/libteam-1.14.ebuild55
-rw-r--r--net-misc/libteam/metadata.xml18
-rw-r--r--net-misc/linux-eoip/Manifest1
-rw-r--r--net-misc/linux-eoip/linux-eoip-0.5.ebuild37
-rw-r--r--net-misc/linux-eoip/metadata.xml21
-rw-r--r--net-misc/linux-identd/Manifest1
-rw-r--r--net-misc/linux-identd/files/identd.init21
-rw-r--r--net-misc/linux-identd/files/identd.xinetd9
-rw-r--r--net-misc/linux-identd/linux-identd-1.3-r1.ebuild36
-rw-r--r--net-misc/linux-identd/metadata.xml8
-rw-r--r--net-misc/linuxptp/Manifest1
-rw-r--r--net-misc/linuxptp/linuxptp-1.5.ebuild37
-rw-r--r--net-misc/linuxptp/metadata.xml14
-rw-r--r--net-misc/liveice/Manifest1
-rw-r--r--net-misc/liveice/liveice-2000530-r1.ebuild38
-rw-r--r--net-misc/liveice/metadata.xml7
-rw-r--r--net-misc/livestreamer/Manifest4
-rw-r--r--net-misc/livestreamer/livestreamer-1.11.1.ebuild24
-rw-r--r--net-misc/livestreamer/livestreamer-1.12.1.ebuild39
-rw-r--r--net-misc/livestreamer/livestreamer-1.12.2.ebuild39
-rw-r--r--net-misc/livestreamer/livestreamer-1.7.2.ebuild22
-rw-r--r--net-misc/livestreamer/metadata.xml12
-rw-r--r--net-misc/lksctp-tools/Manifest2
-rw-r--r--net-misc/lksctp-tools/files/lksctp-tools-1.0.13-build.patch30
-rw-r--r--net-misc/lksctp-tools/files/lksctp-tools-1.0.8-prefix.patch13
-rw-r--r--net-misc/lksctp-tools/lksctp-tools-1.0.13.ebuild48
-rw-r--r--net-misc/lksctp-tools/lksctp-tools-1.0.16.ebuild46
-rw-r--r--net-misc/lksctp-tools/metadata.xml22
-rw-r--r--net-misc/lldpd/Manifest2
-rw-r--r--net-misc/lldpd/files/lldpd-0.7.11-bash-completion-dir.patch9
-rw-r--r--net-misc/lldpd/files/lldpd-0.7.11-zsh-completion-dir.patch7
-rw-r--r--net-misc/lldpd/files/lldpd-confd-15
-rw-r--r--net-misc/lldpd/files/lldpd-initd-420
-rw-r--r--net-misc/lldpd/files/lldpd.service12
-rw-r--r--net-misc/lldpd/lldpd-0.7.11-r3.ebuild100
-rw-r--r--net-misc/lldpd/lldpd-0.7.13.ebuild101
-rw-r--r--net-misc/lldpd/metadata.xml35
-rw-r--r--net-misc/logmein-hamachi/Manifest2
-rw-r--r--net-misc/logmein-hamachi/files/logmein-hamachi.confd16
-rw-r--r--net-misc/logmein-hamachi/files/logmein-hamachi.initd77
-rw-r--r--net-misc/logmein-hamachi/files/logmein-hamachi.service10
-rw-r--r--net-misc/logmein-hamachi/logmein-hamachi-2.1.0.139.ebuild65
-rw-r--r--net-misc/logmein-hamachi/metadata.xml9
-rw-r--r--net-misc/mdidentd/Manifest1
-rw-r--r--net-misc/mdidentd/files/1.04a-glibc210.patch32
-rw-r--r--net-misc/mdidentd/files/1.04a-pidfile.patch17
-rw-r--r--net-misc/mdidentd/files/1.04a-security.patch77
-rw-r--r--net-misc/mdidentd/files/mdidentd.conf.d3
-rw-r--r--net-misc/mdidentd/files/mdidentd.init.d21
-rw-r--r--net-misc/mdidentd/mdidentd-1.04c.ebuild45
-rw-r--r--net-misc/mdidentd/metadata.xml5
-rw-r--r--net-misc/mediatomb/Manifest4
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.12.0.confd28
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.12.0.config144
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.12.0.initd22
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.12.1-avformatcontext-pointer.patch19
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.12.1-flac-metadata.patch446
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.12.1-inotify-hard-links.patch34
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.12.1-libav9.patch42
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.12.1-libextractor.patch675
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.12.1-libmp4v2.patch187
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.12.1-mozjs187.patch260
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.12.1-system-ar.patch35
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.12.1-system-uuid.patch36
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.12.1-thumb-cache.patch237
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.12.1-thumbnail-locking.patch71
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.12.1-youtube-dl.patch141
-rw-r--r--net-misc/mediatomb/files/mediatomb-0.12.1.initd29
-rw-r--r--net-misc/mediatomb/mediatomb-0.12.1-r7.ebuild161
-rw-r--r--net-misc/mediatomb/mediatomb-0.12.1-r8.ebuild157
-rw-r--r--net-misc/mediatomb/mediatomb-0.12.2_pre20150118-r1.ebuild123
-rw-r--r--net-misc/mediatomb/mediatomb-0.12.2_pre20150118.ebuild120
-rw-r--r--net-misc/mediatomb/metadata.xml24
-rw-r--r--net-misc/megatools/Manifest3
-rw-r--r--net-misc/megatools/files/megatools-1.9.92-fuse.patch42
-rw-r--r--net-misc/megatools/megatools-1.9.93.ebuild44
-rw-r--r--net-misc/megatools/megatools-1.9.94.ebuild44
-rw-r--r--net-misc/megatools/megatools-1.9.95.ebuild44
-rw-r--r--net-misc/megatools/metadata.xml22
-rw-r--r--net-misc/memcached/Manifest5
-rw-r--r--net-misc/memcached/files/1.1.12/conf28
-rw-r--r--net-misc/memcached/files/1.1.12/init48
-rw-r--r--net-misc/memcached/files/1.1.13/conf28
-rw-r--r--net-misc/memcached/files/1.1.13/init47
-rw-r--r--net-misc/memcached/files/1.2.6/conf32
-rw-r--r--net-misc/memcached/files/1.2.6/init75
-rw-r--r--net-misc/memcached/files/1.3.3/conf35
-rw-r--r--net-misc/memcached/files/1.3.3/init77
-rw-r--r--net-misc/memcached/files/memcached-1.2.2-fbsd.patch12
-rw-r--r--net-misc/memcached/files/memcached-1.3.3-gcc4-slab-fixup.patch25
-rw-r--r--net-misc/memcached/files/memcached-1.4.0-fix-as-needed-linking.patch47
-rw-r--r--net-misc/memcached/files/memcached-1.4.17-EWOULDBLOCK.patch21
-rw-r--r--net-misc/memcached/files/memcached-1.4.4-as-needed.patch31
-rw-r--r--net-misc/memcached/files/memcached.confd40
-rw-r--r--net-misc/memcached/files/memcached.init93
-rw-r--r--net-misc/memcached/files/memcached.init290
-rw-r--r--net-misc/memcached/files/memcached.service12
-rw-r--r--net-misc/memcached/memcached-1.2.6-r1.ebuild59
-rw-r--r--net-misc/memcached/memcached-1.2.8-r1.ebuild61
-rw-r--r--net-misc/memcached/memcached-1.3.3-r5.ebuild63
-rw-r--r--net-misc/memcached/memcached-1.4.17-r3.ebuild82
-rw-r--r--net-misc/memcached/memcached-1.4.17.ebuild79
-rw-r--r--net-misc/memcached/memcached-1.4.24.ebuild83
-rw-r--r--net-misc/memcached/metadata.xml25
-rw-r--r--net-misc/metadata.xml37
-rw-r--r--net-misc/mico/Manifest3
-rw-r--r--net-misc/mico/metadata.xml16
-rw-r--r--net-misc/mico/mico-2.3.13-r7.ebuild126
-rw-r--r--net-misc/mico/mico-9999.ebuild135
-rw-r--r--net-misc/midentd/Manifest1
-rw-r--r--net-misc/midentd/files/2.3.1-pidfile.patch19
-rw-r--r--net-misc/midentd/files/midentd.conf.d6
-rw-r--r--net-misc/midentd/files/midentd.rc18
-rw-r--r--net-misc/midentd/metadata.xml7
-rw-r--r--net-misc/midentd/midentd-2.3.1-r1.ebuild42
-rw-r--r--net-misc/mikutter/Manifest1
-rw-r--r--net-misc/mikutter/files/mikutter6
-rw-r--r--net-misc/mikutter/files/mikutter-0.2.2.1537-disable-bundler.patch31
-rw-r--r--net-misc/mikutter/metadata.xml7
-rw-r--r--net-misc/mikutter/mikutter-3.1.1.ebuild72
-rw-r--r--net-misc/mikutter/mikutter-9999.ebuild72
-rw-r--r--net-misc/mindterm/Manifest1
-rw-r--r--net-misc/mindterm/files/mindterm-3.2-missingclasses.patch19
-rw-r--r--net-misc/mindterm/metadata.xml5
-rw-r--r--net-misc/mindterm/mindterm-3.4.ebuild56
-rw-r--r--net-misc/minidlna/Manifest3
-rw-r--r--net-misc/minidlna/files/minidlna-1.0.18-Makefile.patch11
-rw-r--r--net-misc/minidlna/files/minidlna-1.0.23-r1.initd53
-rw-r--r--net-misc/minidlna/files/minidlna-1.0.23.confd14
-rw-r--r--net-misc/minidlna/files/minidlna-1.0.25.confd14
-rw-r--r--net-misc/minidlna/files/minidlna-1.1.0.initd53
-rw-r--r--net-misc/minidlna/files/minidlna-1.1.0.service13
-rw-r--r--net-misc/minidlna/files/minidlna-1.1.2.initd53
-rw-r--r--net-misc/minidlna/files/minidlna-1.1.2.service11
-rw-r--r--net-misc/minidlna/metadata.xml17
-rw-r--r--net-misc/minidlna/minidlna-1.1.3.ebuild86
-rw-r--r--net-misc/minidlna/minidlna-1.1.4.ebuild93
-rw-r--r--net-misc/minissdpd/Manifest3
-rw-r--r--net-misc/minissdpd/files/minissdpd-1.2-remove-initd.patch14
-rw-r--r--net-misc/minissdpd/files/minissdpd-1.2-respect-CC.patch12
-rw-r--r--net-misc/minissdpd/files/minissdpd.confd10
-rw-r--r--net-misc/minissdpd/files/minissdpd.initd-r161
-rw-r--r--net-misc/minissdpd/files/minissdpd.initd-r261
-rw-r--r--net-misc/minissdpd/metadata.xml8
-rw-r--r--net-misc/minissdpd/minissdpd-1.2.20141204.ebuild36
-rw-r--r--net-misc/minissdpd/minissdpd-1.3-r1.ebuild35
-rw-r--r--net-misc/minissdpd/minissdpd-1.3.20150527.ebuild35
-rw-r--r--net-misc/minissdpd/minissdpd-1.3.ebuild36
-rw-r--r--net-misc/miniupnpd/Manifest1
-rw-r--r--net-misc/miniupnpd/files/miniupnpd-1.10-build.patch83
-rw-r--r--net-misc/miniupnpd/files/miniupnpd-conf.d2
-rw-r--r--net-misc/miniupnpd/files/miniupnpd-init.d23
-rw-r--r--net-misc/miniupnpd/metadata.xml11
-rw-r--r--net-misc/miniupnpd/miniupnpd-1.10_pre20141209.ebuild63
-rw-r--r--net-misc/miredo/Manifest2
-rw-r--r--net-misc/miredo/files/miredo-1.2.5-configure-libcap.diff33
-rw-r--r--net-misc/miredo/files/miredo-1.2.5-ip-path.patch28
-rw-r--r--net-misc/miredo/files/miredo.conf.22
-rw-r--r--net-misc/miredo/files/miredo.rc.214
-rw-r--r--net-misc/miredo/metadata.xml18
-rw-r--r--net-misc/miredo/miredo-1.2.5-r2.ebuild61
-rw-r--r--net-misc/miredo/miredo-1.2.6.ebuild61
-rw-r--r--net-misc/mknbi/Manifest1
-rw-r--r--net-misc/mknbi/files/mknbi-1.4.3-nossp.patch11
-rw-r--r--net-misc/mknbi/files/mknbi-1.4.4-gcc4.patch27
-rw-r--r--net-misc/mknbi/metadata.xml10
-rw-r--r--net-misc/mknbi/mknbi-1.4.4.ebuild55
-rw-r--r--net-misc/mobile-broadband-provider-info/Manifest1
-rw-r--r--net-misc/mobile-broadband-provider-info/metadata.xml5
-rw-r--r--net-misc/mobile-broadband-provider-info/mobile-broadband-provider-info-20120614.ebuild16
-rw-r--r--net-misc/modemmanager/Manifest6
-rw-r--r--net-misc/modemmanager/files/01-org.freedesktop.ModemManager1.rules7
-rw-r--r--net-misc/modemmanager/metadata.xml12
-rw-r--r--net-misc/modemmanager/modemmanager-1.4.0.ebuild109
-rw-r--r--net-misc/modemmanager/modemmanager-1.4.10.ebuild108
-rw-r--r--net-misc/modemmanager/modemmanager-1.4.2.ebuild108
-rw-r--r--net-misc/modemmanager/modemmanager-1.4.4.ebuild108
-rw-r--r--net-misc/modemmanager/modemmanager-1.4.6.ebuild108
-rw-r--r--net-misc/modemmanager/modemmanager-1.4.8.ebuild108
-rw-r--r--net-misc/monmotha/Manifest1
-rw-r--r--net-misc/monmotha/files/monmotha.rc641
-rw-r--r--net-misc/monmotha/metadata.xml8
-rw-r--r--net-misc/monmotha/monmotha-2.3.8.ebuild45
-rw-r--r--net-misc/mosh/Manifest2
-rw-r--r--net-misc/mosh/files/mosh-1.2.5-git-version.patch16
-rw-r--r--net-misc/mosh/metadata.xml31
-rw-r--r--net-misc/mosh/mosh-1.2.4.ebuild58
-rw-r--r--net-misc/mosh/mosh-1.2.5-r1.ebuild72
-rw-r--r--net-misc/mosh/mosh-1.2.5.ebuild61
-rw-r--r--net-misc/mosh/mosh-9999.ebuild59
-rw-r--r--net-misc/mrouted/Manifest1
-rw-r--r--net-misc/mrouted/files/mrouted.rc30
-rw-r--r--net-misc/mrouted/metadata.xml7
-rw-r--r--net-misc/mrouted/mrouted-3.9.5.ebuild40
-rw-r--r--net-misc/mulk/Manifest2
-rw-r--r--net-misc/mulk/files/mulk-0.6.0-large-file.patch32
-rw-r--r--net-misc/mulk/metadata.xml15
-rw-r--r--net-misc/mulk/mulk-0.6.0.ebuild44
-rw-r--r--net-misc/mulk/mulk-0.7.0.ebuild40
-rw-r--r--net-misc/nat-traverse/Manifest1
-rw-r--r--net-misc/nat-traverse/metadata.xml8
-rw-r--r--net-misc/nat-traverse/nat-traverse-0.6.ebuild21
-rw-r--r--net-misc/ncp/Manifest1
-rw-r--r--net-misc/ncp/metadata.xml13
-rw-r--r--net-misc/ncp/ncp-1.2.4.ebuild43
-rw-r--r--net-misc/ndisc6/Manifest2
-rw-r--r--net-misc/ndisc6/files/rdnssd.conf2
-rw-r--r--net-misc/ndisc6/files/rdnssd.rc25
-rw-r--r--net-misc/ndisc6/files/rdnssd.rc-125
-rw-r--r--net-misc/ndisc6/files/resolvconf7
-rw-r--r--net-misc/ndisc6/files/resolvconf-17
-rw-r--r--net-misc/ndisc6/metadata.xml9
-rw-r--r--net-misc/ndisc6/ndisc6-0.9.9-r2.ebuild25
-rw-r--r--net-misc/ndisc6/ndisc6-0.9.9.ebuild25
-rw-r--r--net-misc/ndisc6/ndisc6-1.0.2.ebuild25
-rw-r--r--net-misc/ndppd/Manifest1
-rw-r--r--net-misc/ndppd/files/ndppd.initd14
-rw-r--r--net-misc/ndppd/metadata.xml11
-rw-r--r--net-misc/ndppd/ndppd-0.2.3.ebuild25
-rw-r--r--net-misc/nemesis/Manifest1
-rw-r--r--net-misc/nemesis/files/1.4-libnet-1.0.patch127
-rw-r--r--net-misc/nemesis/files/1.4_beta3-libnet-1.0.patch123
-rw-r--r--net-misc/nemesis/files/nemesis-1.4-fileio.patch37
-rw-r--r--net-misc/nemesis/files/nemesis-1.4-libnet-1.0.patch127
-rw-r--r--net-misc/nemesis/files/nemesis-1.4-prototcp.patch33
-rw-r--r--net-misc/nemesis/metadata.xml12
-rw-r--r--net-misc/nemesis/nemesis-1.4-r1.ebuild28
-rw-r--r--net-misc/nemesis/nemesis-1.4.ebuild31
-rw-r--r--net-misc/netcf/Manifest1
-rw-r--r--net-misc/netcf/metadata.xml11
-rw-r--r--net-misc/netcf/netcf-0.1.9.ebuild31
-rw-r--r--net-misc/netctl/Manifest2
-rw-r--r--net-misc/netctl/metadata.xml12
-rw-r--r--net-misc/netctl/netctl-1.10.ebuild81
-rw-r--r--net-misc/netctl/netctl-1.9.ebuild81
-rw-r--r--net-misc/netctl/netctl-9999.ebuild80
-rw-r--r--net-misc/netdate/Manifest1
-rw-r--r--net-misc/netdate/metadata.xml7
-rw-r--r--net-misc/netdate/netdate-1.2.ebuild26
-rw-r--r--net-misc/netfleet/Manifest1
-rw-r--r--net-misc/netfleet/metadata.xml10
-rw-r--r--net-misc/netfleet/netfleet-0.2.1.ebuild26
-rw-r--r--net-misc/netifrc/Manifest5
-rw-r--r--net-misc/netifrc/metadata.xml11
-rw-r--r--net-misc/netifrc/netifrc-0.2.2.ebuild66
-rw-r--r--net-misc/netifrc/netifrc-0.2.3.ebuild66
-rw-r--r--net-misc/netifrc/netifrc-0.2.4.ebuild66
-rw-r--r--net-misc/netifrc/netifrc-0.3.0.ebuild69
-rw-r--r--net-misc/netifrc/netifrc-0.3.1.ebuild70
-rw-r--r--net-misc/netifrc/netifrc-9999.ebuild70
-rw-r--r--net-misc/netkit-bootparamd/Manifest1
-rw-r--r--net-misc/netkit-bootparamd/files/0.17-jumpstart.patch25
-rw-r--r--net-misc/netkit-bootparamd/files/bootparamd.confd3
-rw-r--r--net-misc/netkit-bootparamd/files/bootparamd.initd26
-rw-r--r--net-misc/netkit-bootparamd/metadata.xml8
-rw-r--r--net-misc/netkit-bootparamd/netkit-bootparamd-0.17-r2.ebuild39
-rw-r--r--net-misc/netkit-bootparamd/netkit-bootparamd-0.17-r3.ebuild45
-rw-r--r--net-misc/netkit-bootpd/Manifest1
-rw-r--r--net-misc/netkit-bootpd/files/netkit-bootpd-2.4-misc.patch86
-rw-r--r--net-misc/netkit-bootpd/files/netkit-bootpd-2.4.patch701
-rw-r--r--net-misc/netkit-bootpd/metadata.xml8
-rw-r--r--net-misc/netkit-bootpd/netkit-bootpd-2.4-r1.ebuild39
-rw-r--r--net-misc/netkit-fingerd/Manifest1
-rw-r--r--net-misc/netkit-fingerd/files/fingerd.xinetd10
-rw-r--r--net-misc/netkit-fingerd/files/netkit-fingerd-0.17-name-check.patch26
-rw-r--r--net-misc/netkit-fingerd/files/netkit-fingerd-0.17-r2-gentoo.diff22
-rw-r--r--net-misc/netkit-fingerd/metadata.xml5
-rw-r--r--net-misc/netkit-fingerd/netkit-fingerd-0.17-r3.ebuild48
-rw-r--r--net-misc/netkit-routed/Manifest1
-rw-r--r--net-misc/netkit-routed/files/netkit-routed-0.17-printf.patch20
-rw-r--r--net-misc/netkit-routed/files/netkit-routed-0.17-time.patch20
-rw-r--r--net-misc/netkit-routed/files/routed.confd16
-rw-r--r--net-misc/netkit-routed/files/routed.initd21
-rw-r--r--net-misc/netkit-routed/metadata.xml7
-rw-r--r--net-misc/netkit-routed/netkit-routed-0.17-r4.ebuild47
-rw-r--r--net-misc/netkit-rsh/Manifest3
-rw-r--r--net-misc/netkit-rsh/files/rexec.pamd-pambase6
-rw-r--r--net-misc/netkit-rsh/files/rexec.xinetd12
-rw-r--r--net-misc/netkit-rsh/files/rlogin.pamd-pambase9
-rw-r--r--net-misc/netkit-rsh/files/rlogin.xinetd12
-rw-r--r--net-misc/netkit-rsh/files/rsh.pamd-pambase11
-rw-r--r--net-misc/netkit-rsh/files/rsh.xinetd12
-rw-r--r--net-misc/netkit-rsh/metadata.xml5
-rw-r--r--net-misc/netkit-rsh/netkit-rsh-0.17-r10.ebuild77
-rw-r--r--net-misc/netkit-rsh/netkit-rsh-0.17-r9.ebuild77
-rw-r--r--net-misc/netkit-rusers/Manifest1
-rw-r--r--net-misc/netkit-rusers/files/netkit-rusers-0.17-include.patch30
-rw-r--r--net-misc/netkit-rusers/metadata.xml8
-rw-r--r--net-misc/netkit-rusers/netkit-rusers-0.17-r1.ebuild42
-rw-r--r--net-misc/netkit-rwall/Manifest1
-rw-r--r--net-misc/netkit-rwall/metadata.xml8
-rw-r--r--net-misc/netkit-rwall/netkit-rwall-0.17-r1.ebuild40
-rw-r--r--net-misc/netkit-rwho/Manifest2
-rw-r--r--net-misc/netkit-rwho/files/netkit-rwho-0.17-confd4
-rw-r--r--net-misc/netkit-rwho/files/netkit-rwho-0.17-cron8
-rw-r--r--net-misc/netkit-rwho/files/netkit-rwho-0.17-printf.patch23
-rw-r--r--net-misc/netkit-rwho/files/netkit-rwho-0.17-rc17
-rw-r--r--net-misc/netkit-rwho/metadata.xml5
-rw-r--r--net-misc/netkit-rwho/netkit-rwho-0.17-r4.ebuild48
-rw-r--r--net-misc/netkit-talk/Manifest1
-rw-r--r--net-misc/netkit-talk/files/netkit-talk-0.17-ipv6.diff56
-rw-r--r--net-misc/netkit-talk/files/netkit-talk-0.17-time.patch20
-rw-r--r--net-misc/netkit-talk/files/talk.xinetd13
-rw-r--r--net-misc/netkit-talk/metadata.xml7
-rw-r--r--net-misc/netkit-talk/netkit-talk-0.17-r5.ebuild56
-rw-r--r--net-misc/netkit-telnetd/Manifest2
-rw-r--r--net-misc/netkit-telnetd/files/net.issue.sample4
-rw-r--r--net-misc/netkit-telnetd/files/netkit-telnetd-0.17-cflags-gnu_source.patch23
-rw-r--r--net-misc/netkit-telnetd/files/netkit-telnetd-0.17-gentoo.patch81
-rw-r--r--net-misc/netkit-telnetd/files/telnetd.xinetd10
-rw-r--r--net-misc/netkit-telnetd/metadata.xml11
-rw-r--r--net-misc/netkit-telnetd/netkit-telnetd-0.17-r10.ebuild81
-rw-r--r--net-misc/netkit-timed/Manifest1
-rw-r--r--net-misc/netkit-timed/files/0.17-CFLAG-DEF-fix.patch55
-rw-r--r--net-misc/netkit-timed/files/0.17-timed-opt-parsing.patch12
-rw-r--r--net-misc/netkit-timed/files/timed.rc620
-rw-r--r--net-misc/netkit-timed/metadata.xml8
-rw-r--r--net-misc/netkit-timed/netkit-timed-0.17-r9.ebuild42
-rw-r--r--net-misc/netpipe/Manifest1
-rw-r--r--net-misc/netpipe/metadata.xml7
-rw-r--r--net-misc/netpipe/netpipe-1.0.0_beta2-r1.ebuild30
-rw-r--r--net-misc/netpipe/netpipe-1.0.0_beta2.ebuild33
-rw-r--r--net-misc/netpipes/Manifest1
-rw-r--r--net-misc/netpipes/files/netpipes-4.2-string.patch10
-rw-r--r--net-misc/netpipes/metadata.xml5
-rw-r--r--net-misc/netpipes/netpipes-4.2-r2.ebuild34
-rw-r--r--net-misc/netprofiles-ims/Manifest1
-rw-r--r--net-misc/netprofiles-ims/metadata.xml7
-rw-r--r--net-misc/netprofiles-ims/netprofiles-ims-0.1.0134.ebuild18
-rw-r--r--net-misc/netsed/Manifest2
-rw-r--r--net-misc/netsed/metadata.xml10
-rw-r--r--net-misc/netsed/netsed-0.01b.ebuild34
-rw-r--r--net-misc/netstat-nat/Manifest1
-rw-r--r--net-misc/netstat-nat/files/netstat-nat-1.4.10-install.patch11
-rw-r--r--net-misc/netstat-nat/metadata.xml5
-rw-r--r--net-misc/netstat-nat/netstat-nat-1.4.10.ebuild19
-rw-r--r--net-misc/networkmanager-openconnect/Manifest3
-rw-r--r--net-misc/networkmanager-openconnect/files/0.9.10.0/0016-Add-HOTP-support.patch148
-rw-r--r--net-misc/networkmanager-openconnect/files/0.9.10.0/0017-Always-return-success-from-auth-dialog.patch68
-rw-r--r--net-misc/networkmanager-openconnect/files/0.9.10.0/0025-Support-libopenconnect.so.4.patch127
-rw-r--r--net-misc/networkmanager-openconnect/files/0.9.10.0/0026-Drop-support-for-libopenconnect.so.1.patch283
-rw-r--r--net-misc/networkmanager-openconnect/files/0.9.10.0/0028-Update-to-new-hash-handling-fix-to-match-stored-cert.patch185
-rw-r--r--net-misc/networkmanager-openconnect/metadata.xml9
-rw-r--r--net-misc/networkmanager-openconnect/networkmanager-openconnect-0.9.10.0-r1.ebuild51
-rw-r--r--net-misc/networkmanager-openconnect/networkmanager-openconnect-0.9.10.0.ebuild51
-rw-r--r--net-misc/networkmanager-openconnect/networkmanager-openconnect-1.0.0.ebuild46
-rw-r--r--net-misc/networkmanager-openconnect/networkmanager-openconnect-1.0.2.ebuild46
-rw-r--r--net-misc/networkmanager-openswan/Manifest4
-rw-r--r--net-misc/networkmanager-openswan/metadata.xml9
-rw-r--r--net-misc/networkmanager-openswan/networkmanager-openswan-0.9.8.4-r1.ebuild52
-rw-r--r--net-misc/networkmanager-openswan/networkmanager-openswan-1.0.0.ebuild42
-rw-r--r--net-misc/networkmanager-openswan/networkmanager-openswan-1.0.2.ebuild43
-rw-r--r--net-misc/networkmanager-openvpn/Manifest4
-rw-r--r--net-misc/networkmanager-openvpn/metadata.xml9
-rw-r--r--net-misc/networkmanager-openvpn/networkmanager-openvpn-0.9.10.0.ebuild52
-rw-r--r--net-misc/networkmanager-openvpn/networkmanager-openvpn-0.9.8.4.ebuild56
-rw-r--r--net-misc/networkmanager-openvpn/networkmanager-openvpn-1.0.0-r1.ebuild54
-rw-r--r--net-misc/networkmanager-openvpn/networkmanager-openvpn-1.0.0.ebuild52
-rw-r--r--net-misc/networkmanager-openvpn/networkmanager-openvpn-1.0.2.ebuild54
-rw-r--r--net-misc/networkmanager-pptp/Manifest4
-rw-r--r--net-misc/networkmanager-pptp/metadata.xml9
-rw-r--r--net-misc/networkmanager-pptp/networkmanager-pptp-0.9.10.0.ebuild51
-rw-r--r--net-misc/networkmanager-pptp/networkmanager-pptp-0.9.8.4.ebuild51
-rw-r--r--net-misc/networkmanager-pptp/networkmanager-pptp-1.0.0.ebuild51
-rw-r--r--net-misc/networkmanager-pptp/networkmanager-pptp-1.0.2.ebuild51
-rw-r--r--net-misc/networkmanager-sstp/Manifest1
-rw-r--r--net-misc/networkmanager-sstp/metadata.xml18
-rw-r--r--net-misc/networkmanager-sstp/networkmanager-sstp-0.9.8.ebuild54
-rw-r--r--net-misc/networkmanager-vpnc/Manifest4
-rw-r--r--net-misc/networkmanager-vpnc/metadata.xml9
-rw-r--r--net-misc/networkmanager-vpnc/networkmanager-vpnc-0.9.10.0.ebuild50
-rw-r--r--net-misc/networkmanager-vpnc/networkmanager-vpnc-0.9.8.6.ebuild55
-rw-r--r--net-misc/networkmanager-vpnc/networkmanager-vpnc-1.0.0.ebuild52
-rw-r--r--net-misc/networkmanager-vpnc/networkmanager-vpnc-1.0.2.ebuild52
-rw-r--r--net-misc/networkmanager/Manifest5
-rw-r--r--net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules7
-rw-r--r--net-misc/networkmanager/files/10-openrc-status-r435
-rw-r--r--net-misc/networkmanager/files/conf.d.NetworkManager4
-rwxr-xr-xnet-misc/networkmanager/files/init.d.NetworkManager57
-rw-r--r--net-misc/networkmanager/files/networkmanager-0.9.10.0-arpingpath.patch16
-rw-r--r--net-misc/networkmanager/files/networkmanager-0.9.8.4-pre-sleep.patch131
-rw-r--r--net-misc/networkmanager/files/networkmanager-0.9.8.9-fix-crash-on-wifi-rescan.patch47
-rw-r--r--net-misc/networkmanager/files/networkmanager-1.0.0-find-helpers.patch23
-rw-r--r--net-misc/networkmanager/files/networkmanager-1.0.0-lto-switch.patch36
-rw-r--r--net-misc/networkmanager/files/networkmanager-1.0.0-remove-bashisms.patch44
-rw-r--r--net-misc/networkmanager/files/networkmanager-1.0.2-configure-dhcpcd.patch31
-rw-r--r--net-misc/networkmanager/files/nm-system-settings.conf-ifnet6
-rw-r--r--net-misc/networkmanager/metadata.xml27
-rw-r--r--net-misc/networkmanager/networkmanager-0.9.10.1_pre20141101.ebuild302
-rw-r--r--net-misc/networkmanager/networkmanager-0.9.8.10-r1.ebuild252
-rw-r--r--net-misc/networkmanager/networkmanager-1.0.0.ebuild305
-rw-r--r--net-misc/networkmanager/networkmanager-1.0.2-r1.ebuild298
-rw-r--r--net-misc/networkmanager/networkmanager-1.0.2.ebuild292
-rw-r--r--net-misc/networkmanager/networkmanager-1.0.4-r1.ebuild342
-rw-r--r--net-misc/networkmanager/networkmanager-1.0.4.ebuild296
-rw-r--r--net-misc/ng-utils/Manifest1
-rw-r--r--net-misc/ng-utils/metadata.xml7
-rw-r--r--net-misc/ng-utils/ng-utils-0.6.ebuild19
-rw-r--r--net-misc/npapi-sdk/Manifest2
-rw-r--r--net-misc/npapi-sdk/metadata.xml16
-rw-r--r--net-misc/npapi-sdk/npapi-sdk-0.27.2.ebuild18
-rw-r--r--net-misc/npapi-sdk/npapi-sdk-0.27.ebuild17
-rw-r--r--net-misc/npapi-sdk/npapi-sdk-9999.ebuild30
-rw-r--r--net-misc/nstx/Manifest2
-rw-r--r--net-misc/nstx/files/nstx-1.1_beta6_00-linux-tuntap.patch465
-rw-r--r--net-misc/nstx/files/nstx-1.1_beta6_01-bind-interface-name.patch134
-rw-r--r--net-misc/nstx/files/nstx-1.1_beta6_02-warn-on-frag.patch22
-rw-r--r--net-misc/nstx/files/nstx-1.1_beta6_03-delete-dwrite.patch18
-rw-r--r--net-misc/nstx/files/nstx-1.1_beta6_04-delete-werror.patch9
-rw-r--r--net-misc/nstx/files/nstx-1.1_beta6_05-respect-ldflags.patch19
-rw-r--r--net-misc/nstx/files/nstxcd.conf46
-rw-r--r--net-misc/nstx/files/nstxcd.init104
-rw-r--r--net-misc/nstx/files/nstxd.conf35
-rw-r--r--net-misc/nstx/files/nstxd.init95
-rw-r--r--net-misc/nstx/metadata.xml7
-rw-r--r--net-misc/nstx/nstx-1.1_beta6-r3.ebuild55
-rw-r--r--net-misc/ntp/Manifest8
-rwxr-xr-xnet-misc/ntp/files/man-pages/genmans.sh75
-rw-r--r--net-misc/ntp/files/man-pages/ntp.conf.5.patch27
-rw-r--r--net-misc/ntp/files/man-pages/ntp.xsl218
-rw-r--r--net-misc/ntp/files/ntp-4.2.4_p5-adjtimex.patch33
-rw-r--r--net-misc/ntp/files/ntp-4.2.4_p7-nano.patch20
-rw-r--r--net-misc/ntp/files/ntp-4.2.8-ipc-caps.patch16
-rw-r--r--net-misc/ntp/files/ntp-4.2.8-ntp-keygen-no-openssl.patch164
-rw-r--r--net-misc/ntp/files/ntp-client.confd21
-rw-r--r--net-misc/ntp/files/ntp-client.rc32
-rw-r--r--net-misc/ntp/files/ntp.conf54
-rw-r--r--net-misc/ntp/files/ntpd.confd6
-rw-r--r--net-misc/ntp/files/ntpd.rc36
-rw-r--r--net-misc/ntp/files/ntpd.rc-r123
-rw-r--r--net-misc/ntp/files/ntpd.service-r110
-rw-r--r--net-misc/ntp/files/ntpd.service-r211
-rw-r--r--net-misc/ntp/files/ntpdate.service13
-rw-r--r--net-misc/ntp/files/ntpdate.service-r114
-rw-r--r--net-misc/ntp/files/ntpdate.service.conf2
-rw-r--r--net-misc/ntp/files/sntp.confd4
-rw-r--r--net-misc/ntp/files/sntp.rc27
-rw-r--r--net-misc/ntp/files/sntp.service-r113
-rw-r--r--net-misc/ntp/files/sntp.service-r214
-rw-r--r--net-misc/ntp/files/sntp.service.conf2
-rw-r--r--net-misc/ntp/metadata.xml20
-rw-r--r--net-misc/ntp/ntp-4.2.6_p5-r10.ebuild136
-rw-r--r--net-misc/ntp/ntp-4.2.6_p5-r11.ebuild136
-rw-r--r--net-misc/ntp/ntp-4.2.8-r1.ebuild129
-rw-r--r--net-misc/ntp/ntp-4.2.8-r2.ebuild140
-rw-r--r--net-misc/ntp/ntp-4.2.8-r3.ebuild136
-rw-r--r--net-misc/ntp/ntp-4.2.8_p2.ebuild128
-rw-r--r--net-misc/ntp/ntp-4.2.8_p3.ebuild128
-rw-r--r--net-misc/ntpclient/Manifest1
-rw-r--r--net-misc/ntpclient/metadata.xml7
-rw-r--r--net-misc/ntpclient/ntpclient-2010.365.ebuild32
-rw-r--r--net-misc/nut-monitor/Manifest1
-rw-r--r--net-misc/nut-monitor/files/nut-monitor-1.3-paths.patch48
-rw-r--r--net-misc/nut-monitor/files/nut-monitor-1.3-paths2.patch11
-rw-r--r--net-misc/nut-monitor/metadata.xml7
-rw-r--r--net-misc/nut-monitor/nut-monitor-1.3-r2.ebuild54
-rw-r--r--net-misc/nx/Manifest4
-rw-r--r--net-misc/nx/files/1.5.0/nx-x11-1.5.0-tmp-exec.patch11
-rw-r--r--net-misc/nx/files/1.5.0/nxcomp-1.5.0-pic.patch20
-rw-r--r--net-misc/nx/files/nx-3.2.0-nxproxy_read_from_stdin.patch68
-rw-r--r--net-misc/nx/files/nx-3.3.0-cflags.patch54
-rw-r--r--net-misc/nx/files/nx-3.5.0.17-cflags_ar_ranlib.patch100
-rw-r--r--net-misc/nx/files/nx-3.5.0.30-fix_X11_underlinking.patch11
-rw-r--r--net-misc/nx/metadata.xml6
-rw-r--r--net-misc/nx/nx-3.5.0.20.ebuild96
-rw-r--r--net-misc/nx/nx-3.5.0.28.ebuild104
-rw-r--r--net-misc/nx/nx-3.5.0.30.ebuild107
-rw-r--r--net-misc/nx/nx-3.5.0.32.ebuild105
-rw-r--r--net-misc/nxplayer/Manifest4
-rw-r--r--net-misc/nxplayer/metadata.xml6
-rw-r--r--net-misc/nxplayer/nxplayer-4.6.12.7.ebuild40
-rw-r--r--net-misc/nxplayer/nxplayer-4.6.3.13.ebuild40
-rw-r--r--net-misc/ocsync/Manifest2
-rw-r--r--net-misc/ocsync/metadata.xml11
-rw-r--r--net-misc/ocsync/ocsync-0.90.4.ebuild58
-rw-r--r--net-misc/ocsync/ocsync-0.91.4.ebuild56
-rw-r--r--net-misc/ofono/Manifest3
-rw-r--r--net-misc/ofono/files/ofono-1.12-sys-types.patch21
-rw-r--r--net-misc/ofono/files/ofono.initd22
-rw-r--r--net-misc/ofono/metadata.xml21
-rw-r--r--net-misc/ofono/ofono-1.14.ebuild67
-rw-r--r--net-misc/ofono/ofono-1.15.ebuild67
-rw-r--r--net-misc/ofono/ofono-1.16.ebuild67
-rw-r--r--net-misc/oidentd/Manifest1
-rw-r--r--net-misc/oidentd/files/oidentd-2.0.7-confd4
-rw-r--r--net-misc/oidentd/files/oidentd-2.0.7-init41
-rw-r--r--net-misc/oidentd/files/oidentd-2.0.8-bind-to-ipv6-too.patch17
-rw-r--r--net-misc/oidentd/files/oidentd-2.0.8-masquerading.patch43
-rw-r--r--net-misc/oidentd/files/oidentd.conf22
-rw-r--r--net-misc/oidentd/files/oidentd.service9
-rw-r--r--net-misc/oidentd/files/oidentd.socket10
-rw-r--r--net-misc/oidentd/files/oidentd_at.service7
-rw-r--r--net-misc/oidentd/files/oidentd_masq.conf10
-rw-r--r--net-misc/oidentd/metadata.xml14
-rw-r--r--net-misc/oidentd/oidentd-2.0.8-r5.ebuild49
-rw-r--r--net-misc/olsrd/Manifest1
-rw-r--r--net-misc/olsrd/files/olsrd26
-rw-r--r--net-misc/olsrd/files/olsrd-0.6.1-build_fix.patch11
-rw-r--r--net-misc/olsrd/files/olsrd-0.6.3-make-gtk.patch22
-rw-r--r--net-misc/olsrd/metadata.xml8
-rw-r--r--net-misc/olsrd/olsrd-0.6.4-r1.ebuild88
-rw-r--r--net-misc/omniORB/Manifest1
-rw-r--r--net-misc/omniORB/files/ldflags.patch11
-rw-r--r--net-misc/omniORB/files/omniNames22
-rw-r--r--net-misc/omniORB/files/omniORB-4.1.4-format-security.patch16
-rw-r--r--net-misc/omniORB/files/omniORB-4.1.4-openssl-1.patch31
-rw-r--r--net-misc/omniORB/metadata.xml10
-rw-r--r--net-misc/omniORB/omniORB-4.1.4-r2.ebuild91
-rw-r--r--net-misc/openconnect/Manifest7
-rw-r--r--net-misc/openconnect/files/openconnect.conf.in26
-rw-r--r--net-misc/openconnect/files/openconnect.init.in123
-rw-r--r--net-misc/openconnect/files/openconnect.init.in-r2144
-rw-r--r--net-misc/openconnect/files/openconnect.init.in-r3145
-rw-r--r--net-misc/openconnect/files/openconnect.init.in-r489
-rw-r--r--net-misc/openconnect/files/openconnect.logrotate8
-rw-r--r--net-misc/openconnect/metadata.xml20
-rw-r--r--net-misc/openconnect/openconnect-4.08.ebuild144
-rw-r--r--net-misc/openconnect/openconnect-6.00.ebuild153
-rw-r--r--net-misc/openconnect/openconnect-7.02.ebuild150
-rw-r--r--net-misc/openconnect/openconnect-7.06-r1.ebuild159
-rw-r--r--net-misc/openconnect/openconnect-7.06.ebuild158
-rw-r--r--net-misc/openntpd/Manifest3
-rw-r--r--net-misc/openntpd/files/openntpd-20080406-dns-timeout.patch46
-rw-r--r--net-misc/openntpd/files/openntpd-20080406-pidfile.patch141
-rw-r--r--net-misc/openntpd/files/openntpd-20080406-signal.patch57
-rw-r--r--net-misc/openntpd/files/openntpd-5.7_p4-nolibtls.patch49
-rw-r--r--net-misc/openntpd/files/openntpd.conf.d-20080406-r67
-rw-r--r--net-misc/openntpd/files/openntpd.init.d-20080406-r615
-rw-r--r--net-misc/openntpd/files/openntpd.service-20080406-r411
-rw-r--r--net-misc/openntpd/metadata.xml19
-rw-r--r--net-misc/openntpd/openntpd-4.0_pre20080406.ebuild105
-rw-r--r--net-misc/openntpd/openntpd-5.7_p4-r1.ebuild86
-rw-r--r--net-misc/openr2/Manifest1
-rw-r--r--net-misc/openr2/files/1.3.0-respect-user-cflags.patch15
-rw-r--r--net-misc/openr2/metadata.xml11
-rw-r--r--net-misc/openr2/openr2-1.3.0.ebuild27
-rw-r--r--net-misc/openrdate/Manifest1
-rw-r--r--net-misc/openrdate/files/openrdate-1.1.3-rename.patch29
-rw-r--r--net-misc/openrdate/files/openrdate-confd13
-rw-r--r--net-misc/openrdate/files/openrdate-initd27
-rw-r--r--net-misc/openrdate/metadata.xml10
-rw-r--r--net-misc/openrdate/openrdate-1.2.ebuild33
-rw-r--r--net-misc/openssh-blacklist/Manifest1
-rw-r--r--net-misc/openssh-blacklist/files/blacklist-encode.c249
-rw-r--r--net-misc/openssh-blacklist/metadata.xml5
-rw-r--r--net-misc/openssh-blacklist/openssh-blacklist-0.4.1.ebuild41
-rw-r--r--net-misc/openssh/Manifest15
-rw-r--r--net-misc/openssh/files/openssh-4.7_p1-GSSAPI-dns.patch127
-rw-r--r--net-misc/openssh/files/openssh-6.3_p1-x509-hpn14v2-glue.patch51
-rw-r--r--net-misc/openssh/files/openssh-6.6.1_p1-x509-glue.patch17
-rw-r--r--net-misc/openssh/files/openssh-6.6.1_p1-x509-hpn14v5-glue.patch26
-rw-r--r--net-misc/openssh/files/openssh-6.7_p1-openssl-ignore-status.patch17
-rw-r--r--net-misc/openssh/files/openssh-6.7_p1-sctp-x509-glue.patch42
-rw-r--r--net-misc/openssh/files/openssh-6.7_p1-sshd-gssapi-multihomed.patch162
-rw-r--r--net-misc/openssh/files/openssh-6.7_p1-x509-glue.patch46
-rw-r--r--net-misc/openssh/files/openssh-6.7_p1-xmalloc-include.patch11
-rw-r--r--net-misc/openssh/files/openssh-6.8_p1-sctp-x509-glue.patch90
-rw-r--r--net-misc/openssh/files/openssh-6.8_p1-ssh-keygen-no-ssh1.patch40
-rw-r--r--net-misc/openssh/files/openssh-6.8_p1-sshd-gssapi-multihomed.patch162
-rw-r--r--net-misc/openssh/files/openssh-6.8_p1-ssl-engine-configure.patch31
-rw-r--r--net-misc/openssh/files/openssh-6.8_p1-teraterm-hpn-glue.patch15
-rw-r--r--net-misc/openssh/files/openssh-6.8_p1-teraterm.patch69
-rw-r--r--net-misc/openssh/files/openssh-6.9_p1-x509-warnings.patch24
-rw-r--r--net-misc/openssh/files/sshd.confd21
-rw-r--r--net-misc/openssh/files/sshd.pam_include.24
-rwxr-xr-xnet-misc/openssh/files/sshd.rc6.485
-rw-r--r--net-misc/openssh/files/sshd.service11
-rw-r--r--net-misc/openssh/files/sshd.socket10
-rw-r--r--net-misc/openssh/files/sshd_at.service8
-rw-r--r--net-misc/openssh/metadata.xml37
-rw-r--r--net-misc/openssh/openssh-6.7_p1-r4.ebuild324
-rw-r--r--net-misc/openssh/openssh-6.7_p1.ebuild323
-rw-r--r--net-misc/openssh/openssh-6.8_p1-r5.ebuild332
-rw-r--r--net-misc/openssh/openssh-6.9_p1-r1.ebuild323
-rw-r--r--net-misc/openssh/openssh-6.9_p1-r2.ebuild312
-rw-r--r--net-misc/openvpn-auth-ldap/Manifest1
-rw-r--r--net-misc/openvpn-auth-ldap/files/2.0.4_pre20131110-gentoo.patch47
-rw-r--r--net-misc/openvpn-auth-ldap/files/2.0.4_pre20131110-objc.patch33
-rw-r--r--net-misc/openvpn-auth-ldap/metadata.xml11
-rw-r--r--net-misc/openvpn-auth-ldap/openvpn-auth-ldap-2.0.4_pre20131110.ebuild53
-rw-r--r--net-misc/openvpn/Manifest3
-rw-r--r--net-misc/openvpn/files/2.3.6-disable-compression.patch18
-rw-r--r--net-misc/openvpn/files/2.3.6-null-cipher.patch46
-rw-r--r--net-misc/openvpn/files/65openvpn1
-rwxr-xr-xnet-misc/openvpn/files/down.sh33
-rw-r--r--net-misc/openvpn/files/openvpn-2.1.conf18
-rwxr-xr-xnet-misc/openvpn/files/openvpn-2.1.init133
-rw-r--r--net-misc/openvpn/files/openvpn.init63
-rw-r--r--net-misc/openvpn/files/openvpn.service12
-rw-r--r--net-misc/openvpn/files/openvpn.tmpfile1
-rwxr-xr-xnet-misc/openvpn/files/up.sh100
-rw-r--r--net-misc/openvpn/metadata.xml23
-rw-r--r--net-misc/openvpn/openvpn-2.3.6-r1.ebuild133
-rw-r--r--net-misc/openvpn/openvpn-2.3.6-r2.ebuild134
-rw-r--r--net-misc/openvpn/openvpn-2.3.6.ebuild132
-rw-r--r--net-misc/openvpn/openvpn-2.3.7.ebuild129
-rw-r--r--net-misc/openvpn/openvpn-2.3.8.ebuild129
-rw-r--r--net-misc/openvpn/openvpn-9999.ebuild133
-rw-r--r--net-misc/openvswitch/Manifest6
-rw-r--r--net-misc/openvswitch/files/atomic-test.patch14
-rw-r--r--net-misc/openvswitch/files/configure.patch15
-rw-r--r--net-misc/openvswitch/files/kernel-3.11-support.patch68
-rw-r--r--net-misc/openvswitch/files/kernel-3.12-support.patch19
-rw-r--r--net-misc/openvswitch/files/openvswitch.tmpfiles1
-rw-r--r--net-misc/openvswitch/files/ovs-controller-r123
-rw-r--r--net-misc/openvswitch/files/ovs-controller.service9
-rw-r--r--net-misc/openvswitch/files/ovs-controller_conf7
-rw-r--r--net-misc/openvswitch/files/ovs-vswitchd-r122
-rw-r--r--net-misc/openvswitch/files/ovs-vswitchd.service13
-rw-r--r--net-misc/openvswitch/files/ovs-vswitchd_conf6
-rw-r--r--net-misc/openvswitch/files/ovsdb-server-r135
-rw-r--r--net-misc/openvswitch/files/ovsdb-server.service14
-rw-r--r--net-misc/openvswitch/files/ovsdb-server_conf16
-rw-r--r--net-misc/openvswitch/files/ovsdb-server_conf216
-rw-r--r--net-misc/openvswitch/files/prevent-traceback.patch107
-rw-r--r--net-misc/openvswitch/files/xcp-interface-reconfigure-2.3.2.patch20
-rw-r--r--net-misc/openvswitch/files/xcp-interface-reconfigure.patch20
-rw-r--r--net-misc/openvswitch/metadata.xml15
-rw-r--r--net-misc/openvswitch/openvswitch-1.11.0.ebuild145
-rw-r--r--net-misc/openvswitch/openvswitch-2.0.0-r3.ebuild160
-rw-r--r--net-misc/openvswitch/openvswitch-2.1.3.ebuild152
-rw-r--r--net-misc/openvswitch/openvswitch-2.3.0.ebuild151
-rw-r--r--net-misc/openvswitch/openvswitch-2.3.1.ebuild157
-rw-r--r--net-misc/openvswitch/openvswitch-2.3.2.ebuild157
-rw-r--r--net-misc/orbited/Manifest1
-rw-r--r--net-misc/orbited/files/orbited.cfg42
-rw-r--r--net-misc/orbited/files/orbited.init31
-rw-r--r--net-misc/orbited/metadata.xml10
-rw-r--r--net-misc/orbited/orbited-0.7.10-r1.ebuild37
-rw-r--r--net-misc/orbited/orbited-0.7.10-r2.ebuild37
-rw-r--r--net-misc/owncloud-client/Manifest4
-rw-r--r--net-misc/owncloud-client/metadata.xml12
-rw-r--r--net-misc/owncloud-client/owncloud-client-1.8.0.ebuild96
-rw-r--r--net-misc/owncloud-client/owncloud-client-1.8.1.ebuild96
-rw-r--r--net-misc/owncloud-client/owncloud-client-1.8.3.ebuild97
-rw-r--r--net-misc/owncloud-client/owncloud-client-1.8.4.ebuild97
-rw-r--r--net-misc/packETH/Manifest3
-rw-r--r--net-misc/packETH/files/packETH-1.7.3-libs-and-flags.patch15
-rw-r--r--net-misc/packETH/metadata.xml8
-rw-r--r--net-misc/packETH/packETH-1.7.2.ebuild31
-rw-r--r--net-misc/packETH/packETH-1.7.3.ebuild30
-rw-r--r--net-misc/packETH/packETH-1.8.ebuild31
-rw-r--r--net-misc/pavuk/Manifest1
-rw-r--r--net-misc/pavuk/files/pavuk-0.9.36_pre20120215-fix-gtkmulticol-segfault.patch26
-rw-r--r--net-misc/pavuk/files/pavuk-0.9.36_pre20120215-fix-underlinking.patch10
-rw-r--r--net-misc/pavuk/files/pavuk-0.9.36_pre20120215-pcre-fix.patch12
-rw-r--r--net-misc/pavuk/files/pavuk-0.9.36_pre20120215-tl_selectr-overflow-fix.patch13
-rw-r--r--net-misc/pavuk/metadata.xml18
-rw-r--r--net-misc/pavuk/pavuk-0.9.36_pre20120215-r2.ebuild111
-rw-r--r--net-misc/pcapfix/Manifest1
-rw-r--r--net-misc/pcapfix/metadata.xml7
-rw-r--r--net-misc/pcapfix/pcapfix-0.7.ebuild27
-rw-r--r--net-misc/pedro/Manifest2
-rw-r--r--net-misc/pedro/files/pedro-1.5-portage.patch20
-rw-r--r--net-misc/pedro/files/pedro-1.6-portage.patch20
-rw-r--r--net-misc/pedro/metadata.xml8
-rw-r--r--net-misc/pedro/pedro-1.6.ebuild45
-rw-r--r--net-misc/pen/Manifest1
-rw-r--r--net-misc/pen/metadata.xml7
-rw-r--r--net-misc/pen/pen-0.25.1.ebuild24
-rw-r--r--net-misc/pimpd/Manifest1
-rw-r--r--net-misc/pimpd/metadata.xml7
-rw-r--r--net-misc/pimpd/pimpd-0.8.ebuild25
-rw-r--r--net-misc/pipes/Manifest2
-rw-r--r--net-misc/pipes/metadata.xml23
-rw-r--r--net-misc/pipes/pipes-1.16.1.ebuild30
-rw-r--r--net-misc/pipes/pipes-1.16.ebuild37
-rw-r--r--net-misc/plowshare/Manifest5
-rw-r--r--net-misc/plowshare/files/plowshare-2.1.0-fix_git_invocation.patch56
-rw-r--r--net-misc/plowshare/metadata.xml15
-rw-r--r--net-misc/plowshare/plowshare-1.2.0.ebuild73
-rw-r--r--net-misc/plowshare/plowshare-2.0.1.ebuild92
-rw-r--r--net-misc/plowshare/plowshare-2.1.0-r1.ebuild68
-rw-r--r--net-misc/plowshare/plowshare-2.1.1.ebuild66
-rw-r--r--net-misc/pmsvn/Manifest3
-rw-r--r--net-misc/pmsvn/metadata.xml11
-rw-r--r--net-misc/pmsvn/pmsvn-1.0.5.ebuild41
-rw-r--r--net-misc/pmsvn/pmsvn-1.0.6.ebuild36
-rw-r--r--net-misc/pmsvn/pmsvn-1.0.7.ebuild35
-rw-r--r--net-misc/polly/Manifest2
-rw-r--r--net-misc/polly/metadata.xml12
-rw-r--r--net-misc/polly/polly-0.93.11.ebuild51
-rw-r--r--net-misc/polly/polly-0.93.12.ebuild53
-rw-r--r--net-misc/portfwd/Manifest1
-rw-r--r--net-misc/portfwd/files/portfwd-0.28-64bit.patch30
-rw-r--r--net-misc/portfwd/files/portfwd.confd3
-rw-r--r--net-misc/portfwd/files/portfwd.init39
-rw-r--r--net-misc/portfwd/files/portfwd.service8
-rw-r--r--net-misc/portfwd/metadata.xml16
-rw-r--r--net-misc/portfwd/portfwd-0.29.ebuild48
-rw-r--r--net-misc/portspoof/Manifest2
-rw-r--r--net-misc/portspoof/metadata.xml13
-rw-r--r--net-misc/portspoof/portspoof-1.1.ebuild29
-rw-r--r--net-misc/portspoof/portspoof-1.3.ebuild37
-rw-r--r--net-misc/portspoof/portspoof-9999.ebuild37
-rw-r--r--net-misc/pps-tools/Manifest2
-rw-r--r--net-misc/pps-tools/files/pps-tools-0.0.20120407-build.patch53
-rw-r--r--net-misc/pps-tools/files/pps-tools-0.0.20120407-install.patch28
-rw-r--r--net-misc/pps-tools/metadata.xml8
-rw-r--r--net-misc/pps-tools/pps-tools-0.0.20110710.ebuild42
-rw-r--r--net-misc/pps-tools/pps-tools-0.0.20120407.ebuild27
-rw-r--r--net-misc/proxychains/Manifest2
-rw-r--r--net-misc/proxychains/files/proxychains-4.10-makefile.patch45
-rw-r--r--net-misc/proxychains/files/proxychains-4.8.1-makefile.patch42
-rw-r--r--net-misc/proxychains/metadata.xml11
-rw-r--r--net-misc/proxychains/proxychains-4.10.ebuild47
-rw-r--r--net-misc/proxychains/proxychains-4.8.1.ebuild47
-rw-r--r--net-misc/proxyper/Manifest2
-rw-r--r--net-misc/proxyper/files/proxyper.init20
-rw-r--r--net-misc/proxyper/metadata.xml7
-rw-r--r--net-misc/proxyper/proxyper-341a.ebuild52
-rw-r--r--net-misc/proxyper/proxyper-347a.ebuild54
-rw-r--r--net-misc/proxytunnel/Manifest1
-rw-r--r--net-misc/proxytunnel/files/proxytunnel-allowTLS.patch22
-rw-r--r--net-misc/proxytunnel/metadata.xml17
-rw-r--r--net-misc/proxytunnel/proxytunnel-1.9.1-r1.ebuild38
-rw-r--r--net-misc/ps3mediaserver/Manifest3
-rw-r--r--net-misc/ps3mediaserver/files/ps3mediaserver.confd7
-rw-r--r--net-misc/ps3mediaserver/files/ps3mediaserver.initd19
-rw-r--r--net-misc/ps3mediaserver/metadata.xml20
-rw-r--r--net-misc/ps3mediaserver/ps3mediaserver-1.82.0.ebuild89
-rw-r--r--net-misc/ps3mediaserver/ps3mediaserver-1.90.0.ebuild88
-rw-r--r--net-misc/ps3mediaserver/ps3mediaserver-1.90.1.ebuild88
-rw-r--r--net-misc/pssh/Manifest1
-rw-r--r--net-misc/pssh/metadata.xml8
-rw-r--r--net-misc/pssh/pssh-2.3.1-r1.ebuild36
-rw-r--r--net-misc/ptpd/Manifest1
-rw-r--r--net-misc/ptpd/files/ptpd2.confd4
-rw-r--r--net-misc/ptpd/files/ptpd2.rc57
-rw-r--r--net-misc/ptpd/files/ptpd2.service11
-rw-r--r--net-misc/ptpd/metadata.xml21
-rw-r--r--net-misc/ptpd/ptpd-2.3.1.ebuild56
-rw-r--r--net-misc/puf/Manifest1
-rw-r--r--net-misc/puf/metadata.xml10
-rw-r--r--net-misc/puf/puf-1.0.0.ebuild16
-rw-r--r--net-misc/pump/Manifest2
-rw-r--r--net-misc/pump/metadata.xml10
-rw-r--r--net-misc/pump/pump-0.8.24-r4.ebuild57
-rw-r--r--net-misc/putty/Manifest3
-rw-r--r--net-misc/putty/metadata.xml18
-rw-r--r--net-misc/putty/putty-0.64.ebuild88
-rw-r--r--net-misc/putty/putty-0.65.ebuild88
-rw-r--r--net-misc/putty/putty-9999.ebuild94
-rw-r--r--net-misc/pycnb/Manifest1
-rw-r--r--net-misc/pycnb/metadata.xml15
-rw-r--r--net-misc/pycnb/pycnb-0.0.4.ebuild22
-rw-r--r--net-misc/pyhoca-cli/Manifest1
-rw-r--r--net-misc/pyhoca-cli/metadata.xml8
-rw-r--r--net-misc/pyhoca-cli/pyhoca-cli-0.5.0.2-r1.ebuild31
-rw-r--r--net-misc/pyhoca-gui/Manifest1
-rw-r--r--net-misc/pyhoca-gui/metadata.xml10
-rw-r--r--net-misc/pyhoca-gui/pyhoca-gui-0.5.0.4-r1.ebuild35
-rw-r--r--net-misc/pymazon/Manifest2
-rw-r--r--net-misc/pymazon/files/amz.xml11
-rw-r--r--net-misc/pymazon/metadata.xml8
-rw-r--r--net-misc/pymazon/pymazon-0.9-r1.ebuild60
-rw-r--r--net-misc/pymazon/pymazon-0.9.1.ebuild60
-rw-r--r--net-misc/python-x2go/Manifest2
-rw-r--r--net-misc/python-x2go/metadata.xml9
-rw-r--r--net-misc/python-x2go/python-x2go-0.5.0.3.ebuild24
-rw-r--r--net-misc/python-x2go/python-x2go-0.5.0.4.ebuild24
-rw-r--r--net-misc/pytvshows/Manifest1
-rw-r--r--net-misc/pytvshows/files/pytvshows-0.2-ezrss.it.patch30
-rw-r--r--net-misc/pytvshows/files/pytvshows-0.2-feedurl.patch279
-rw-r--r--net-misc/pytvshows/files/pytvshows-0.2-improved-re.patch15
-rw-r--r--net-misc/pytvshows/metadata.xml10
-rw-r--r--net-misc/pytvshows/pytvshows-0.2-r1.ebuild33
-rw-r--r--net-misc/pytvshows/pytvshows-0.2-r2.ebuild30
-rw-r--r--net-misc/qtm/Manifest1
-rw-r--r--net-misc/qtm/metadata.xml12
-rw-r--r--net-misc/qtm/qtm-1.3.17.ebuild43
-rw-r--r--net-misc/quagga/Manifest3
-rw-r--r--net-misc/quagga/files/quagga-0.99.22.4-ipctl-forwarding.patch22
-rw-r--r--net-misc/quagga/files/quagga-services.init.344
-rw-r--r--net-misc/quagga/files/quagga.pam26
-rw-r--r--net-misc/quagga/files/systemd/babeld.service16
-rw-r--r--net-misc/quagga/files/systemd/bgpd.service16
-rw-r--r--net-misc/quagga/files/systemd/isisd.service16
-rw-r--r--net-misc/quagga/files/systemd/ospf6d.service16
-rw-r--r--net-misc/quagga/files/systemd/ospfd.service16
-rw-r--r--net-misc/quagga/files/systemd/pimd.service17
-rw-r--r--net-misc/quagga/files/systemd/quagga.conf1
-rw-r--r--net-misc/quagga/files/systemd/ripd.service16
-rw-r--r--net-misc/quagga/files/systemd/ripngd.service16
-rw-r--r--net-misc/quagga/files/systemd/zebra.service16
-rw-r--r--net-misc/quagga/metadata.xml44
-rw-r--r--net-misc/quagga/quagga-0.99.23.1.ebuild116
-rw-r--r--net-misc/quagga/quagga-0.99.24.1.ebuild122
-rw-r--r--net-misc/quickshare/Manifest1
-rw-r--r--net-misc/quickshare/metadata.xml8
-rw-r--r--net-misc/quickshare/quickshare-1.0.ebuild43
-rw-r--r--net-misc/r8168/Manifest1
-rw-r--r--net-misc/r8168/metadata.xml11
-rw-r--r--net-misc/r8168/r8168-8.040.00.ebuild32
-rw-r--r--net-misc/rabbitmq-server/Manifest4
-rw-r--r--net-misc/rabbitmq-server/files/rabbitmq-script-wrapper54
-rwxr-xr-xnet-misc/rabbitmq-server/files/rabbitmq-server.init-r323
-rw-r--r--net-misc/rabbitmq-server/files/rabbitmq.service16
-rw-r--r--net-misc/rabbitmq-server/metadata.xml9
-rw-r--r--net-misc/rabbitmq-server/rabbitmq-server-3.2.4.ebuild95
-rw-r--r--net-misc/rabbitmq-server/rabbitmq-server-3.3.4.ebuild101
-rw-r--r--net-misc/rabbitmq-server/rabbitmq-server-3.5.1.ebuild101
-rw-r--r--net-misc/rabbitmq-server/rabbitmq-server-3.5.3.ebuild101
-rw-r--r--net-misc/raccess/Manifest1
-rw-r--r--net-misc/raccess/files/raccess-0.7-asneeded.patch11
-rw-r--r--net-misc/raccess/files/raccess-0.7-glibc210.patch585
-rw-r--r--net-misc/raccess/files/raccess-0.7-r1-asneeded.patch11
-rw-r--r--net-misc/raccess/metadata.xml8
-rw-r--r--net-misc/raccess/raccess-0.7.ebuild36
-rw-r--r--net-misc/radvd/Manifest4
-rw-r--r--net-misc/radvd/files/radvd-1.9.1.init71
-rw-r--r--net-misc/radvd/files/radvd-2.10-musl-libc-fix.patch87
-rw-r--r--net-misc/radvd/files/radvd.conf11
-rw-r--r--net-misc/radvd/files/radvd.service15
-rw-r--r--net-misc/radvd/files/radvd.tmpfilesd1
-rw-r--r--net-misc/radvd/metadata.xml12
-rw-r--r--net-misc/radvd/radvd-1.15.ebuild67
-rw-r--r--net-misc/radvd/radvd-1.9.8.ebuild64
-rw-r--r--net-misc/radvd/radvd-2.10.ebuild68
-rw-r--r--net-misc/radvd/radvd-2.11-r1.ebuild73
-rw-r--r--net-misc/radvd/radvd-2.11.ebuild69
-rw-r--r--net-misc/rancid-git/Manifest1
-rw-r--r--net-misc/rancid-git/files/rancid-2.3.8-buildsystem.patch64
-rw-r--r--net-misc/rancid-git/files/rancid-2.3.8-config.patch33
-rw-r--r--net-misc/rancid-git/files/rancid-2.3.8-mailprefix.patch178
-rw-r--r--net-misc/rancid-git/metadata.xml15
-rw-r--r--net-misc/rancid-git/rancid-git-2.3.8.ebuild114
-rw-r--r--net-misc/rancid/Manifest1
-rw-r--r--net-misc/rancid/files/rancid-2.3.8-buildsystem.patch64
-rw-r--r--net-misc/rancid/files/rancid-2.3.8-config.patch33
-rw-r--r--net-misc/rancid/files/rancid-2.3.8-mailprefix.patch178
-rw-r--r--net-misc/rancid/metadata.xml16
-rw-r--r--net-misc/rancid/rancid-2.3.8.ebuild113
-rw-r--r--net-misc/rdate/Manifest1
-rw-r--r--net-misc/rdate/files/rdate-confd17
-rw-r--r--net-misc/rdate/files/rdate-initd-1.4-r327
-rw-r--r--net-misc/rdate/metadata.xml7
-rw-r--r--net-misc/rdate/rdate-1.4-r3.ebuild27
-rw-r--r--net-misc/rdate/rdate-1.4-r4.ebuild38
-rw-r--r--net-misc/rdesktop/Manifest4
-rw-r--r--net-misc/rdesktop/files/rdesktop-1.6.0-smartcard_configure.patch22
-rw-r--r--net-misc/rdesktop/files/rdesktop-1.6.0-sound_configure.patch15
-rw-r--r--net-misc/rdesktop/files/rdesktop-1.7.0-libao_crash.patch18
-rw-r--r--net-misc/rdesktop/files/rdesktop-keymap-additional64
-rw-r--r--net-misc/rdesktop/files/rdesktop-keymap-cs122
-rw-r--r--net-misc/rdesktop/files/rdesktop-keymap-sk124
-rw-r--r--net-misc/rdesktop/metadata.xml18
-rw-r--r--net-misc/rdesktop/rdesktop-1.7.1.ebuild82
-rw-r--r--net-misc/rdesktop/rdesktop-1.8.1.ebuild84
-rw-r--r--net-misc/rdesktop/rdesktop-1.8.2.ebuild84
-rw-r--r--net-misc/rdesktop/rdesktop-1.8.3.ebuild75
-rw-r--r--net-misc/redir/Manifest1
-rw-r--r--net-misc/redir/files/redir-2.2.1-include.patch10
-rw-r--r--net-misc/redir/metadata.xml8
-rw-r--r--net-misc/redir/redir-2.2.1.ebuild37
-rw-r--r--net-misc/remmina/Manifest4
-rw-r--r--net-misc/remmina/files/remmina-1.0.0_p20121004-avahi.patch68
-rw-r--r--net-misc/remmina/files/remmina-external_tools.patch11
-rw-r--r--net-misc/remmina/metadata.xml17
-rw-r--r--net-misc/remmina/remmina-1.0.0_p20130723.ebuild84
-rw-r--r--net-misc/remmina/remmina-1.1.1.ebuild87
-rw-r--r--net-misc/remmina/remmina-1.1.2.ebuild89
-rw-r--r--net-misc/remmina/remmina-1.2.0_rc3.ebuild90
-rw-r--r--net-misc/remmina/remmina-9999.ebuild87
-rw-r--r--net-misc/rinetd/Manifest1
-rw-r--r--net-misc/rinetd/files/rinetd.rc23
-rw-r--r--net-misc/rinetd/metadata.xml7
-rw-r--r--net-misc/rinetd/rinetd-0.62-r1.ebuild34
-rw-r--r--net-misc/ris-linux/Manifest1
-rw-r--r--net-misc/ris-linux/files/binlsrv.confd2
-rw-r--r--net-misc/ris-linux/files/binlsrv.initd31
-rw-r--r--net-misc/ris-linux/files/setup.py9
-rw-r--r--net-misc/ris-linux/metadata.xml7
-rw-r--r--net-misc/ris-linux/ris-linux-0.4-r1.ebuild38
-rw-r--r--net-misc/rsync/Manifest3
-rw-r--r--net-misc/rsync/files/rsync-3.1.1_pre1-avoid_infinite_wait_reading_secrets_file.patch79
-rw-r--r--net-misc/rsync/files/rsyncd.conf-3.0.9-r115
-rw-r--r--net-misc/rsync/files/rsyncd.conf.d5
-rw-r--r--net-misc/rsync/files/rsyncd.init.d-r112
-rw-r--r--net-misc/rsync/files/rsyncd.logrotate9
-rw-r--r--net-misc/rsync/files/rsyncd.service12
-rw-r--r--net-misc/rsync/files/rsyncd.xinetd-3.0.9-r110
-rw-r--r--net-misc/rsync/metadata.xml8
-rw-r--r--net-misc/rsync/rsync-3.0.9-r3.ebuild75
-rw-r--r--net-misc/rsync/rsync-3.1.0-r1.ebuild76
-rw-r--r--net-misc/rsync/rsync-3.1.1.ebuild75
-rw-r--r--net-misc/rwbs/Manifest1
-rw-r--r--net-misc/rwbs/files/rwbs.conf21
-rw-r--r--net-misc/rwbs/files/rwbs.rc21
-rw-r--r--net-misc/rwbs/metadata.xml7
-rw-r--r--net-misc/rwbs/rwbs-0.27-r1.ebuild36
-rw-r--r--net-misc/rwhoisd/Manifest1
-rw-r--r--net-misc/rwhoisd/files/rwhoisd17
-rw-r--r--net-misc/rwhoisd/files/rwhoisd-destdir-1.5.9.5.patch39
-rw-r--r--net-misc/rwhoisd/files/rwhoisd.conf7
-rw-r--r--net-misc/rwhoisd/metadata.xml8
-rw-r--r--net-misc/rwhoisd/rwhoisd-1.5.9.5-r2.ebuild47
-rw-r--r--net-misc/rygel/Manifest2
-rw-r--r--net-misc/rygel/metadata.xml9
-rw-r--r--net-misc/rygel/rygel-0.24.4.ebuild91
-rw-r--r--net-misc/rygel/rygel-0.26.1.ebuild81
-rw-r--r--net-misc/s3cmd/Manifest2
-rw-r--r--net-misc/s3cmd/metadata.xml20
-rw-r--r--net-misc/s3cmd/s3cmd-1.0.1.ebuild33
-rw-r--r--net-misc/s3cmd/s3cmd-1.5.2-r1.ebuild31
-rw-r--r--net-misc/samplicator/Manifest2
-rw-r--r--net-misc/samplicator/files/samplicator.886
-rw-r--r--net-misc/samplicator/files/samplicator.conf8
-rw-r--r--net-misc/samplicator/files/samplicator.initd40
-rw-r--r--net-misc/samplicator/metadata.xml21
-rw-r--r--net-misc/samplicator/samplicator-1.3.6.ebuild54
-rw-r--r--net-misc/samplicator/samplicator-1.3.7_beta6.ebuild57
-rw-r--r--net-misc/scponly/Manifest1
-rw-r--r--net-misc/scponly/files/scponly-4.8-gcc4.4.0.patch15
-rw-r--r--net-misc/scponly/files/scponly-4.8-rsync.patch212
-rw-r--r--net-misc/scponly/metadata.xml30
-rw-r--r--net-misc/scponly/scponly-4.8-r5.ebuild249
-rw-r--r--net-misc/secpanel/Manifest1
-rw-r--r--net-misc/secpanel/metadata.xml15
-rw-r--r--net-misc/secpanel/secpanel-0.6.1.ebuild48
-rw-r--r--net-misc/selfdhcp/Manifest1
-rw-r--r--net-misc/selfdhcp/files/selfdhcp-0.2a-buffer-overflow.patch11
-rw-r--r--net-misc/selfdhcp/metadata.xml11
-rw-r--r--net-misc/selfdhcp/selfdhcp-0.2a-r1.ebuild33
-rw-r--r--net-misc/sendfile/Manifest1
-rw-r--r--net-misc/sendfile/files/sendfiled11
-rw-r--r--net-misc/sendfile/metadata.xml7
-rw-r--r--net-misc/sendfile/sendfile-2.1b-r1.ebuild58
-rw-r--r--net-misc/ser/Manifest5
-rw-r--r--net-misc/ser/files/ethz-1.0-ser-0.9.0.diff14
-rw-r--r--net-misc/ser/files/ldap-1.0-ser-0.9.0.diff13
-rw-r--r--net-misc/ser/files/ldaps-1.0-ser-0.9.0.diff17
-rw-r--r--net-misc/ser/files/ser-0.9.7-extmod-ldap.diff11
-rw-r--r--net-misc/ser/files/ser-0.9.7-extmod-ldaps.diff11
-rw-r--r--net-misc/ser/files/ser-0.9.7-mysql.diff11
-rw-r--r--net-misc/ser/files/ser-0.9.7-radius.diff13
-rw-r--r--net-misc/ser/files/ser.confd11
-rwxr-xr-xnet-misc/ser/files/ser.rc622
-rw-r--r--net-misc/ser/files/silomail-1.0-ser-0.9.0.diff13
-rw-r--r--net-misc/ser/metadata.xml5
-rw-r--r--net-misc/ser/ser-0.9.7-r1.ebuild178
-rw-r--r--net-misc/ser2net/Manifest3
-rw-r--r--net-misc/ser2net/files/ser2net-2.7-b230400.diff20
-rw-r--r--net-misc/ser2net/files/ser2net.confd27
-rw-r--r--net-misc/ser2net/files/ser2net.initd55
-rw-r--r--net-misc/ser2net/metadata.xml12
-rw-r--r--net-misc/ser2net/ser2net-2.10.0.ebuild32
-rw-r--r--net-misc/ser2net/ser2net-2.7-r1.ebuild41
-rw-r--r--net-misc/ser2net/ser2net-2.9.1.ebuild32
-rw-r--r--net-misc/sgopherd/Manifest1
-rw-r--r--net-misc/sgopherd/metadata.xml11
-rw-r--r--net-misc/sgopherd/sgopherd-13.01.ebuild41
-rw-r--r--net-misc/shigofumi/Manifest1
-rw-r--r--net-misc/shigofumi/metadata.xml11
-rw-r--r--net-misc/shigofumi/shigofumi-0.3.ebuild51
-rw-r--r--net-misc/shigofumi/shigofumi-9999.ebuild51
-rw-r--r--net-misc/shmux/Manifest2
-rw-r--r--net-misc/shmux/files/shmux-1.0.2-tinfo.patch11
-rw-r--r--net-misc/shmux/metadata.xml17
-rw-r--r--net-misc/shmux/shmux-1.0.2.ebuild38
-rw-r--r--net-misc/shmux/shmux-1.0.ebuild31
-rw-r--r--net-misc/shout/Manifest1
-rw-r--r--net-misc/shout/files/implicitdecls.patch12
-rw-r--r--net-misc/shout/files/ldflags.patch21
-rw-r--r--net-misc/shout/files/shout-0.8.0-overflow.patch26
-rw-r--r--net-misc/shout/files/variables.diff45
-rw-r--r--net-misc/shout/metadata.xml5
-rw-r--r--net-misc/shout/shout-0.8.0-r2.ebuild42
-rw-r--r--net-misc/sipcalc/Manifest1
-rw-r--r--net-misc/sipcalc/metadata.xml7
-rw-r--r--net-misc/sipcalc/sipcalc-1.1.6.ebuild13
-rw-r--r--net-misc/siproxd/Manifest2
-rw-r--r--net-misc/siproxd/files/siproxd-0.8.1-amd64_static_build.patch26
-rw-r--r--net-misc/siproxd/files/siproxd-libtool-2.4.patch13
-rwxr-xr-xnet-misc/siproxd/files/siproxd.rc631
-rwxr-xr-xnet-misc/siproxd/files/siproxd.rc731
-rw-r--r--net-misc/siproxd/files/siproxd.rc822
-rw-r--r--net-misc/siproxd/metadata.xml10
-rw-r--r--net-misc/siproxd/siproxd-0.8.0-r2.ebuild108
-rw-r--r--net-misc/siproxd/siproxd-0.8.1-r1.ebuild110
-rw-r--r--net-misc/sipsak/Manifest1
-rw-r--r--net-misc/sipsak/files/0.9.6_p1-callback.patch12
-rw-r--r--net-misc/sipsak/metadata.xml10
-rw-r--r--net-misc/sipsak/sipsak-0.9.6_p1-r1.ebuild36
-rw-r--r--net-misc/sipsak/sipsak-0.9.6_p1.ebuild31
-rw-r--r--net-misc/sitecopy/Manifest2
-rw-r--r--net-misc/sitecopy/files/sitecopy-0.16.6-01-remote-dynamic-rc.patch134
-rw-r--r--net-misc/sitecopy/files/sitecopy-0.16.6-02-french-po-fix.patch22
-rw-r--r--net-misc/sitecopy/files/sitecopy-0.16.6-03-wrong-memory-397155.patch15
-rw-r--r--net-misc/sitecopy/files/sitecopy-0.16.6-06-sftpdriver.c-fix-for-new-openssh.patch13
-rw-r--r--net-misc/sitecopy/files/sitecopy-0.16.6-10-bts410703-preserve-storage-files-sigint.patch52
-rw-r--r--net-misc/sitecopy/files/sitecopy-0.16.6-20-bts549721-add-compatibility-for-neon-0.29.0.patch17
-rw-r--r--net-misc/sitecopy/files/sitecopy-0.16.6-30-bts320586-manpage-document-sftp.patch59
-rw-r--r--net-misc/sitecopy/metadata.xml14
-rw-r--r--net-misc/sitecopy/sitecopy-0.16.6-r1.ebuild88
-rw-r--r--net-misc/sjphone/Manifest1
-rw-r--r--net-misc/sjphone/metadata.xml5
-rw-r--r--net-misc/sjphone/sjphone-1.60.2235.ebuild38
-rw-r--r--net-misc/sks/Manifest1
-rw-r--r--net-misc/sks/files/sks-1.1.5-disable-warn-error-a.patch29
-rw-r--r--net-misc/sks/files/sks-1.1.5-eddsa.patch84
-rw-r--r--net-misc/sks/files/sks-db.initd25
-rw-r--r--net-misc/sks/files/sks-db.service11
-rw-r--r--net-misc/sks/files/sks-recon.initd26
-rw-r--r--net-misc/sks/files/sks-recon.service11
-rw-r--r--net-misc/sks/files/sks.confd4
-rw-r--r--net-misc/sks/metadata.xml15
-rw-r--r--net-misc/sks/sks-1.1.5-r1.ebuild117
-rw-r--r--net-misc/sks/sks-1.1.5.ebuild114
-rw-r--r--net-misc/slimrat/metadata.xml12
-rw-r--r--net-misc/slimrat/slimrat-9999.ebuild60
-rw-r--r--net-misc/smb4k/Manifest1
-rw-r--r--net-misc/smb4k/metadata.xml9
-rw-r--r--net-misc/smb4k/smb4k-1.2.0.ebuild29
-rw-r--r--net-misc/smbc/Manifest1
-rw-r--r--net-misc/smbc/files/smbc-1.2.2-cflags.patch13
-rw-r--r--net-misc/smbc/files/smbc-1.2.2-size_t.patch16
-rw-r--r--net-misc/smbc/metadata.xml11
-rw-r--r--net-misc/smbc/smbc-1.2.2-r2.ebuild41
-rw-r--r--net-misc/snarf/Manifest1
-rw-r--r--net-misc/snarf/files/snarf-basename-patch.diff147
-rw-r--r--net-misc/snarf/files/snarf-fix-off-by-ones.diff45
-rw-r--r--net-misc/snarf/files/snarf-unlink-empty.diff37
-rw-r--r--net-misc/snarf/metadata.xml12
-rw-r--r--net-misc/snarf/snarf-7.0-r3.ebuild35
-rw-r--r--net-misc/sobby/Manifest1
-rw-r--r--net-misc/sobby/files/sobby-conf-0.4.77
-rwxr-xr-xnet-misc/sobby/files/sobby-init-0.4.722
-rw-r--r--net-misc/sobby/files/sobby.xml14
-rw-r--r--net-misc/sobby/metadata.xml9
-rw-r--r--net-misc/sobby/sobby-0.4.8.ebuild59
-rw-r--r--net-misc/socat/Manifest2
-rw-r--r--net-misc/socat/files/socat-1.7.2.1-long-long.patch64
-rw-r--r--net-misc/socat/files/socat-1.7.2.4-linux-3.17.patch14
-rw-r--r--net-misc/socat/files/socat-1.7.3.0-filan-build.patch30
-rw-r--r--net-misc/socat/metadata.xml5
-rw-r--r--net-misc/socat/socat-1.7.3.0.ebuild50
-rw-r--r--net-misc/socat/socat-2.0.0_beta8.ebuild52
-rw-r--r--net-misc/socat/socat-9999.ebuild53
-rw-r--r--net-misc/sock/Manifest1
-rw-r--r--net-misc/sock/metadata.xml7
-rw-r--r--net-misc/sock/sock-1.1.ebuild20
-rw-r--r--net-misc/socket/Manifest1
-rw-r--r--net-misc/socket/files/socket-1.5-makefile.patch14
-rw-r--r--net-misc/socket/metadata.xml8
-rw-r--r--net-misc/socket/socket-1.5.ebuild33
-rw-r--r--net-misc/sparkleshare/Manifest1
-rw-r--r--net-misc/sparkleshare/metadata.xml5
-rw-r--r--net-misc/sparkleshare/sparkleshare-1.1.0.ebuild40
-rw-r--r--net-misc/spice-gtk/Manifest4
-rw-r--r--net-misc/spice-gtk/files/0.12-parallel-install.patch16
-rw-r--r--net-misc/spice-gtk/files/0.14-Deal-with-libusbredirparser.pc-rename-to-libusbredir.patch57
-rw-r--r--net-misc/spice-gtk/files/0001-build-sys-fix-out-of-tree-build-with-vala.patch35
-rw-r--r--net-misc/spice-gtk/files/spice-gtk-0.20-add-spice-channel-string-to-type.patch84
-rw-r--r--net-misc/spice-gtk/files/spice-gtk-0.21-fix-g-clear-pointer-on-old-glib.patch22
-rw-r--r--net-misc/spice-gtk/files/spice-gtk-0.25-Do-not-depend-on-libsoup-directly.patch29
-rw-r--r--net-misc/spice-gtk/files/spice-gtk-0.25-Introduce-enable-disable-webdav-option.patch54
-rw-r--r--net-misc/spice-gtk/files/spice-gtk-0.25-missing_gio_libs.patch12
-rw-r--r--net-misc/spice-gtk/files/spice.protocol12
-rw-r--r--net-misc/spice-gtk/files/spice.schemas41
-rw-r--r--net-misc/spice-gtk/metadata.xml27
-rw-r--r--net-misc/spice-gtk/spice-gtk-0.20-r1.ebuild170
-rw-r--r--net-misc/spice-gtk/spice-gtk-0.21.ebuild174
-rw-r--r--net-misc/spice-gtk/spice-gtk-0.25-r1.ebuild180
-rw-r--r--net-misc/spice-gtk/spice-gtk-0.28.ebuild159
-rw-r--r--net-misc/spiped/Manifest1
-rw-r--r--net-misc/spiped/files/spiped.confd21
-rw-r--r--net-misc/spiped/files/spiped.initd46
-rw-r--r--net-misc/spiped/metadata.xml15
-rw-r--r--net-misc/spiped/spiped-1.5.0.ebuild38
-rw-r--r--net-misc/spread/Manifest2
-rw-r--r--net-misc/spread/files/spread.init.d26
-rw-r--r--net-misc/spread/metadata.xml7
-rw-r--r--net-misc/spread/spread-4.1.0.ebuild38
-rw-r--r--net-misc/spread/spread-4.3.0.ebuild37
-rw-r--r--net-misc/ssh-askpass-fullscreen/Manifest1
-rw-r--r--net-misc/ssh-askpass-fullscreen/files/99ssh_askpass2
-rw-r--r--net-misc/ssh-askpass-fullscreen/files/ssh-askpass-fullscreen-0.4-fix-grab.patch23
-rw-r--r--net-misc/ssh-askpass-fullscreen/files/ssh-askpass-fullscreen-1.0-libX11.patch27
-rw-r--r--net-misc/ssh-askpass-fullscreen/files/ssh-askpass-fullscreen.179
-rw-r--r--net-misc/ssh-askpass-fullscreen/metadata.xml8
-rw-r--r--net-misc/ssh-askpass-fullscreen/ssh-askpass-fullscreen-1.0-r1.ebuild39
-rw-r--r--net-misc/ssh-chain/Manifest1
-rw-r--r--net-misc/ssh-chain/metadata.xml11
-rw-r--r--net-misc/ssh-chain/ssh-chain-20131217.ebuild38
-rw-r--r--net-misc/sshpass/Manifest1
-rw-r--r--net-misc/sshpass/files/sshpass-1.04-ssh5.6.patch16
-rw-r--r--net-misc/sshpass/metadata.xml18
-rw-r--r--net-misc/sshpass/sshpass-1.05.ebuild17
-rw-r--r--net-misc/sslh/Manifest3
-rw-r--r--net-misc/sslh/files/sslh.conf.d-28
-rwxr-xr-xnet-misc/sslh/files/sslh.init.d-221
-rw-r--r--net-misc/sslh/metadata.xml7
-rw-r--r--net-misc/sslh/sslh-1.15.ebuild39
-rw-r--r--net-misc/sslh/sslh-1.16.ebuild44
-rw-r--r--net-misc/sslh/sslh-1.17.ebuild43
-rw-r--r--net-misc/sslwrap/Manifest1
-rw-r--r--net-misc/sslwrap/files/sslwrap-2.0.6-build.patch147
-rw-r--r--net-misc/sslwrap/metadata.xml7
-rw-r--r--net-misc/sslwrap/sslwrap-2.0.6-r2.ebuild35
-rw-r--r--net-misc/sstp-client/Manifest1
-rw-r--r--net-misc/sstp-client/metadata.xml16
-rw-r--r--net-misc/sstp-client/sstp-client-1.0.9-r1.ebuild54
-rw-r--r--net-misc/ssvnc/Manifest2
-rw-r--r--net-misc/ssvnc/files/Makefile.libvncauth7
-rw-r--r--net-misc/ssvnc/files/Makefile.vncviewer8
-rw-r--r--net-misc/ssvnc/files/ssvnc-1.0.27-build.patch56
-rw-r--r--net-misc/ssvnc/files/ssvnc-1.0.29-build.patch44
-rw-r--r--net-misc/ssvnc/metadata.xml10
-rw-r--r--net-misc/ssvnc/ssvnc-1.0.28.ebuild62
-rw-r--r--net-misc/ssvnc/ssvnc-1.0.29.ebuild62
-rw-r--r--net-misc/stargazer/Manifest1
-rw-r--r--net-misc/stargazer/files/logrotate9
-rw-r--r--net-misc/stargazer/files/mans/rscriptd.851
-rw-r--r--net-misc/stargazer/files/mans/sgauth.854
-rw-r--r--net-misc/stargazer/files/mans/sgconf.1160
-rw-r--r--net-misc/stargazer/files/mans/sgconf_xml.179
-rw-r--r--net-misc/stargazer/files/mans/sgconv.142
-rw-r--r--net-misc/stargazer/files/mans/stargazer.864
-rw-r--r--net-misc/stargazer/files/patches/stg-2.408-build-upstream.patch214
-rw-r--r--net-misc/stargazer/files/patches/stg-2.408-build.patch179
-rw-r--r--net-misc/stargazer/files/patches/stg-2.408-correct-paths.patch186
-rw-r--r--net-misc/stargazer/files/patches/stg-2.408-fix-crash-on-stop.patch190
-rw-r--r--net-misc/stargazer/files/patches/stg-2.408-makefile-build-upstream.patch386
-rw-r--r--net-misc/stargazer/files/patches/stg-2.408-makefile-firebird-upstream.patch13
-rw-r--r--net-misc/stargazer/files/patches/stg-2.408-makefile.patch203
-rw-r--r--net-misc/stargazer/files/patches/stg-2.408-on-upstream.patch151
-rw-r--r--net-misc/stargazer/files/patches/stg-2.408-radius-upstream.patch31
-rw-r--r--net-misc/stargazer/files/patches/stg-2.408-rscriptd-upstream.patch26
-rw-r--r--net-misc/stargazer/files/patches/stg-2.408-rscriptd.conf-upstream.patch80
-rw-r--r--net-misc/stargazer/files/patches/stg-2.408-sgauth.conf-upstream.patch112
-rw-r--r--net-misc/stargazer/files/patches/stg-2.408-sgconv-upstream.patch40
-rw-r--r--net-misc/stargazer/files/patches/stg-2.408-static-libs.patch10
-rw-r--r--net-misc/stargazer/files/rscriptd23
-rw-r--r--net-misc/stargazer/files/sgauth27
-rw-r--r--net-misc/stargazer/metadata.xml51
-rw-r--r--net-misc/stargazer/stargazer-2.408.ebuild559
-rw-r--r--net-misc/stone/Manifest1
-rw-r--r--net-misc/stone/files/stone-2.3e-makefile.patch20
-rw-r--r--net-misc/stone/files/stone.man464
-rw-r--r--net-misc/stone/metadata.xml8
-rw-r--r--net-misc/stone/stone-2.3e-r1.ebuild47
-rw-r--r--net-misc/streamtuner/Manifest2
-rw-r--r--net-misc/streamtuner/files/streamtuner-0.99.99-audacious.patch60
-rw-r--r--net-misc/streamtuner/files/streamtuner-0.99.99-gentoo.patch181
-rw-r--r--net-misc/streamtuner/files/streamtuner-0.99.99-shoutcast-2.patch5
-rw-r--r--net-misc/streamtuner/files/streamtuner-0.99.99-shoutcast.patch40
-rw-r--r--net-misc/streamtuner/files/streamtuner-0.99.99-stack_increase.patch5
-rw-r--r--net-misc/streamtuner/metadata.xml9
-rw-r--r--net-misc/streamtuner/streamtuner-0.99.99-r5.ebuild59
-rw-r--r--net-misc/strongswan/Manifest1
-rw-r--r--net-misc/strongswan/files/ipsec34
-rw-r--r--net-misc/strongswan/metadata.xml109
-rw-r--r--net-misc/strongswan/strongswan-5.3.2.ebuild302
-rw-r--r--net-misc/stunnel/Manifest6
-rw-r--r--net-misc/stunnel/files/stunnel43
-rw-r--r--net-misc/stunnel/files/stunnel.conf61
-rw-r--r--net-misc/stunnel/files/stunnel.tmpfiles.conf1
-rw-r--r--net-misc/stunnel/metadata.xml18
-rw-r--r--net-misc/stunnel/stunnel-5.14.ebuild80
-rw-r--r--net-misc/stunnel/stunnel-5.17.ebuild85
-rw-r--r--net-misc/stunnel/stunnel-5.18.ebuild87
-rw-r--r--net-misc/stunnel/stunnel-5.19.ebuild87
-rw-r--r--net-misc/stunnel/stunnel-5.20.ebuild89
-rw-r--r--net-misc/stunnel/stunnel-5.22.ebuild89
-rw-r--r--net-misc/stuntman/Manifest2
-rw-r--r--net-misc/stuntman/files/initd.v121
-rw-r--r--net-misc/stuntman/files/stuntman.confd7
-rw-r--r--net-misc/stuntman/files/stuntman.initd13
-rw-r--r--net-misc/stuntman/metadata.xml8
-rw-r--r--net-misc/stuntman/stuntman-1.2.6-r1.ebuild36
-rw-r--r--net-misc/stuntman/stuntman-1.2.6.ebuild38
-rw-r--r--net-misc/stuntman/stuntman-1.2.7.ebuild36
-rw-r--r--net-misc/suite3270/Manifest20
-rw-r--r--net-misc/suite3270/files/Makefile.in10
-rw-r--r--net-misc/suite3270/files/configure-3.3.5.patch72
-rw-r--r--net-misc/suite3270/files/makeconv-3.3.5.patch79
-rw-r--r--net-misc/suite3270/files/suite3270-3.3.10_p3-fix-x3270-dbcs.patch20
-rw-r--r--net-misc/suite3270/metadata.xml19
-rw-r--r--net-misc/suite3270/suite3270-3.3.10_p3-r1.ebuild90
-rw-r--r--net-misc/suite3270/suite3270-3.3.10_p3.ebuild94
-rw-r--r--net-misc/suite3270/suite3270-3.3.12_p10.ebuild101
-rw-r--r--net-misc/suite3270/suite3270-3.3.12_p12.ebuild114
-rw-r--r--net-misc/suite3270/suite3270-3.3.13_p7.ebuild114
-rw-r--r--net-misc/suite3270/suite3270-3.3.14_p11.ebuild118
-rw-r--r--net-misc/suite3270/suite3270-3.3.14_p6.ebuild118
-rw-r--r--net-misc/suite3270/suite3270-3.3.14_p7.ebuild118
-rw-r--r--net-misc/suite3270/suite3270-3.3.14_p9.ebuild118
-rw-r--r--net-misc/suite3270/suite3270-3.3.15_p4.ebuild118
-rw-r--r--net-misc/suite3270/suite3270-3.3.15_p7.ebuild118
-rw-r--r--net-misc/suite3270/suite3270-3.3.15_p9.ebuild118
-rw-r--r--net-misc/suite3270/suite3270-3.3.5_p8.ebuild93
-rw-r--r--net-misc/suite3270/suite3270-3.3.6.ebuild83
-rw-r--r--net-misc/suite3270/suite3270-3.3.7.ebuild83
-rw-r--r--net-misc/suite3270/suite3270-3.3.7_p5.ebuild83
-rw-r--r--net-misc/suite3270/suite3270-3.3.7_p8.ebuild83
-rw-r--r--net-misc/suite3270/suite3270-3.3.8.ebuild82
-rw-r--r--net-misc/suite3270/suite3270-3.3.9_p12.ebuild85
-rw-r--r--net-misc/suite3270/suite3270-3.4_p4.ebuild112
-rw-r--r--net-misc/suite3270/suite3270-3.4_p5.ebuild112
-rw-r--r--net-misc/switzerland/Manifest1
-rw-r--r--net-misc/switzerland/files/Makefile12
-rw-r--r--net-misc/switzerland/metadata.xml14
-rw-r--r--net-misc/switzerland/switzerland-0.1.0.ebuild45
-rw-r--r--net-misc/taptap/Manifest1
-rw-r--r--net-misc/taptap/metadata.xml7
-rw-r--r--net-misc/taptap/taptap-1.0.ebuild32
-rw-r--r--net-misc/taylor-uucp/Manifest1
-rw-r--r--net-misc/taylor-uucp/files/taylor-uucp-1.07-gentoo.patch120
-rw-r--r--net-misc/taylor-uucp/metadata.xml9
-rw-r--r--net-misc/taylor-uucp/taylor-uucp-1.07-r2.ebuild58
-rw-r--r--net-misc/tcpsound/Manifest1
-rw-r--r--net-misc/tcpsound/files/tcpsound-0.3.1-makefile.patch52
-rw-r--r--net-misc/tcpsound/files/tcpsound-0.3.1-misc.patch22
-rw-r--r--net-misc/tcpsound/metadata.xml5
-rw-r--r--net-misc/tcpsound/tcpsound-0.3.1-r1.ebuild32
-rw-r--r--net-misc/teamviewer/Manifest2
-rw-r--r--net-misc/teamviewer/files/teamviewer-9.0.32150-gentoo.patch138
-rwxr-xr-xnet-misc/teamviewer/files/teamviewer.sh47
-rw-r--r--net-misc/teamviewer/files/teamviewerd.conf6
-rw-r--r--net-misc/teamviewer/files/teamviewerd.init31
-rw-r--r--net-misc/teamviewer/files/teamviewerd9.init26
-rw-r--r--net-misc/teamviewer/metadata.xml12
-rw-r--r--net-misc/teamviewer/teamviewer-10.0.41499-r1.ebuild130
-rw-r--r--net-misc/teamviewer/teamviewer-9.0.32150.ebuild133
-rw-r--r--net-misc/telnet-bsd/Manifest1
-rw-r--r--net-misc/telnet-bsd/files/telnet-bsd-1.2-fbsd.patch105
-rw-r--r--net-misc/telnet-bsd/files/telnetd.xinetd10
-rw-r--r--net-misc/telnet-bsd/metadata.xml7
-rw-r--r--net-misc/telnet-bsd/telnet-bsd-1.2-r1.ebuild48
-rw-r--r--net-misc/termpkg/Manifest2
-rw-r--r--net-misc/termpkg/files/termnetd.confd14
-rw-r--r--net-misc/termpkg/files/termnetd.initd52
-rw-r--r--net-misc/termpkg/files/termpkg-3.3-ttydforfax.diff28
-rw-r--r--net-misc/termpkg/files/termpkg-3.3.9.1-gcc43.diff11
-rw-r--r--net-misc/termpkg/files/ttyd.confd63
-rw-r--r--net-misc/termpkg/files/ttyd.initd96
-rw-r--r--net-misc/termpkg/metadata.xml17
-rw-r--r--net-misc/termpkg/termpkg-3.3.9.1-r1.ebuild65
-rw-r--r--net-misc/termpkg/termpkg-3.3.9.1.ebuild58
-rw-r--r--net-misc/termtter/Manifest1
-rw-r--r--net-misc/termtter/metadata.xml10
-rw-r--r--net-misc/termtter/termtter-2.2.2.ebuild38
-rw-r--r--net-misc/throttle/Manifest1
-rw-r--r--net-misc/throttle/metadata.xml11
-rw-r--r--net-misc/throttle/throttle-1.2.ebuild17
-rw-r--r--net-misc/tiers/Manifest2
-rw-r--r--net-misc/tiers/files/tiers-1.1-gcc43.patch118
-rw-r--r--net-misc/tiers/files/tiers1.1-gccfixes.patch201
-rw-r--r--net-misc/tiers/metadata.xml7
-rw-r--r--net-misc/tiers/tiers-1.1.ebuild49
-rw-r--r--net-misc/tigervnc/Manifest10
-rw-r--r--net-misc/tigervnc/files/1.3.1-CVE-2014-8240.patch78
-rw-r--r--net-misc/tigervnc/files/tigervnc.confd9
-rw-r--r--net-misc/tigervnc/files/tigervnc.initd73
-rw-r--r--net-misc/tigervnc/metadata.xml14
-rw-r--r--net-misc/tigervnc/tigervnc-1.3.1-r1.ebuild199
-rw-r--r--net-misc/tigervnc/tigervnc-1.3.1-r2.ebuild198
-rw-r--r--net-misc/tigervnc/tigervnc-1.3.1-r3.ebuild202
-rw-r--r--net-misc/tigervnc/tigervnc-1.3.1-r4.ebuild201
-rw-r--r--net-misc/tigervnc/tigervnc-1.4.2-r1.ebuild199
-rw-r--r--net-misc/tigervnc/tigervnc-1.4.2-r2.ebuild200
-rw-r--r--net-misc/tightvnc/Manifest3
-rw-r--r--net-misc/tightvnc/files/1.3.10-sparc.patch24
-rw-r--r--net-misc/tightvnc/files/1.3.9-arm.patch12
-rw-r--r--net-misc/tightvnc/files/1.3.9-fbsd.patch29
-rw-r--r--net-misc/tightvnc/files/1.3.9-sh.patch28
-rw-r--r--net-misc/tightvnc/files/README.JavaViewer423
-rw-r--r--net-misc/tightvnc/files/server-CVE-2007-1003.patch36
-rw-r--r--net-misc/tightvnc/files/server-CVE-2007-1351-1352.patch49
-rw-r--r--net-misc/tightvnc/files/tightvnc-1.3.10-java-build.patch20
-rw-r--r--net-misc/tightvnc/files/tightvnc-1.3.10-pathfixes.patch16
-rw-r--r--net-misc/tightvnc/files/tightvnc-1.3.8-darwin.patch24
-rw-r--r--net-misc/tightvnc/files/tightvnc-1.3.8-imake-tmpdir.patch37
-rw-r--r--net-misc/tightvnc/files/tightvnc-1.3.8-mips.patch89
-rw-r--r--net-misc/tightvnc/files/tightvnc-1.3.8-pathfixes.patch23
-rw-r--r--net-misc/tightvnc/files/tightvnc-1.3.9-java-build.patch19
-rw-r--r--net-misc/tightvnc/files/tightvnc.confd9
-rw-r--r--net-misc/tightvnc/files/tightvnc.initd57
-rw-r--r--net-misc/tightvnc/metadata.xml13
-rw-r--r--net-misc/tightvnc/tightvnc-1.3.10-r2.ebuild134
-rw-r--r--net-misc/tinc/Manifest3
-rw-r--r--net-misc/tinc/files/tinc.networks13
-rw-r--r--net-misc/tinc/files/tincd-r179
-rw-r--r--net-misc/tinc/files/tincd.conf20
-rw-r--r--net-misc/tinc/files/tincd_at.service10
-rw-r--r--net-misc/tinc/metadata.xml20
-rw-r--r--net-misc/tinc/tinc-1.0.25.ebuild46
-rw-r--r--net-misc/tinc/tinc-1.0.26.ebuild46
-rw-r--r--net-misc/tinc/tinc-1.1_pre11.ebuild73
-rw-r--r--net-misc/tipcutils/Manifest2
-rw-r--r--net-misc/tipcutils/files/tipcutils-2.0.0-rename_configuration_message_field.patch14
-rw-r--r--net-misc/tipcutils/metadata.xml12
-rw-r--r--net-misc/tipcutils/tipcutils-2.0.0.ebuild36
-rw-r--r--net-misc/tipcutils/tipcutils-2.0.3.ebuild23
-rw-r--r--net-misc/tlsdate/Manifest7
-rw-r--r--net-misc/tlsdate/files/tlsdate-0.0.4-compiler-flags.patch72
-rw-r--r--net-misc/tlsdate/files/tlsdate-0.0.4-configure-user-group.patch66
-rw-r--r--net-misc/tlsdate/files/tlsdate.confd8
-rwxr-xr-xnet-misc/tlsdate/files/tlsdate.rc17
-rw-r--r--net-misc/tlsdate/files/tlsdated.confd15
-rwxr-xr-xnet-misc/tlsdate/files/tlsdated.rc19
-rw-r--r--net-misc/tlsdate/metadata.xml11
-rw-r--r--net-misc/tlsdate/tlsdate-0.0.1.ebuild25
-rw-r--r--net-misc/tlsdate/tlsdate-0.0.11.ebuild58
-rw-r--r--net-misc/tlsdate/tlsdate-0.0.12-r1.ebuild67
-rw-r--r--net-misc/tlsdate/tlsdate-0.0.12-r2.ebuild72
-rw-r--r--net-misc/tlsdate/tlsdate-0.0.12.ebuild58
-rw-r--r--net-misc/tlsdate/tlsdate-0.0.13.ebuild66
-rw-r--r--net-misc/tlsdate/tlsdate-0.0.4-r1.ebuild36
-rw-r--r--net-misc/tlsdate/tlsdate-0.0.4-r2.ebuild48
-rw-r--r--net-misc/tlsdate/tlsdate-0.0.4.ebuild31
-rw-r--r--net-misc/tlsdate/tlsdate-0.0.5.ebuild48
-rw-r--r--net-misc/tlsdate/tlsdate-0.0.6.ebuild48
-rw-r--r--net-misc/tn5250/Manifest1
-rw-r--r--net-misc/tn5250/metadata.xml11
-rw-r--r--net-misc/tn5250/tn5250-0.17.4.ebuild52
-rw-r--r--net-misc/tokyotyrant/Manifest1
-rw-r--r--net-misc/tokyotyrant/files/fix_makefiles-1.4.41.patch85
-rw-r--r--net-misc/tokyotyrant/files/fix_testsuite.patch104
-rw-r--r--net-misc/tokyotyrant/files/tokyotyrant.confd15
-rw-r--r--net-misc/tokyotyrant/files/tokyotyrant.initd38
-rw-r--r--net-misc/tokyotyrant/metadata.xml8
-rw-r--r--net-misc/tokyotyrant/tokyotyrant-1.1.41-r1.ebuild65
-rw-r--r--net-misc/tor/Manifest3
-rw-r--r--net-misc/tor/files/README.gentoo8
-rw-r--r--net-misc/tor/files/tor-0.2.3.14_alpha-torrc.sample.patch31
-rw-r--r--net-misc/tor/files/tor.conf1
-rw-r--r--net-misc/tor/files/tor.confd3
-rw-r--r--net-misc/tor/files/tor.initd-r784
-rw-r--r--net-misc/tor/files/tor.service21
-rw-r--r--net-misc/tor/files/torrc-r17
-rw-r--r--net-misc/tor/metadata.xml17
-rw-r--r--net-misc/tor/tor-0.2.6.10.ebuild101
-rw-r--r--net-misc/tor/tor-0.2.6.7.ebuild100
-rw-r--r--net-misc/tor/tor-0.2.7.2_alpha.ebuild101
-rw-r--r--net-misc/ttytter/Manifest1
-rw-r--r--net-misc/ttytter/metadata.xml11
-rw-r--r--net-misc/ttytter/ttytter-2.1.00.ebuild36
-rw-r--r--net-misc/ucarp/Manifest1
-rw-r--r--net-misc/ucarp/files/ucarp.8148
-rw-r--r--net-misc/ucarp/files/ucarp.confd30
-rw-r--r--net-misc/ucarp/files/ucarp.initd-r159
-rw-r--r--net-misc/ucarp/files/vip-down-default.sh7
-rw-r--r--net-misc/ucarp/files/vip-down-default.sh-r17
-rw-r--r--net-misc/ucarp/files/vip-up-default.sh7
-rw-r--r--net-misc/ucarp/files/vip-up-default.sh-r17
-rw-r--r--net-misc/ucarp/metadata.xml5
-rw-r--r--net-misc/ucarp/ucarp-1.5.2-r3.ebuild48
-rw-r--r--net-misc/ucarp/ucarp-1.5.2-r4.ebuild48
-rw-r--r--net-misc/udpcast/Manifest1
-rw-r--r--net-misc/udpcast/files/udpcast-20120424-fd_set.patch11
-rw-r--r--net-misc/udpcast/files/udpcast-20120424-gentoo.patch12
-rw-r--r--net-misc/udpcast/metadata.xml13
-rw-r--r--net-misc/udpcast/udpcast-20120424-r1.ebuild34
-rw-r--r--net-misc/udpcast/udpcast-20120424.ebuild27
-rw-r--r--net-misc/udpxy/Manifest1
-rw-r--r--net-misc/udpxy/files/udpxy-1.0.21.2-LDFLAGS.patch11
-rw-r--r--net-misc/udpxy/files/udpxy.confd24
-rw-r--r--net-misc/udpxy/files/udpxy.initd21
-rw-r--r--net-misc/udpxy/files/udpxy.service9
-rw-r--r--net-misc/udpxy/metadata.xml7
-rw-r--r--net-misc/udpxy/udpxy-1.0.23.7-r1.ebuild34
-rw-r--r--net-misc/uftp/Manifest2
-rw-r--r--net-misc/uftp/files/logrotate16
-rw-r--r--net-misc/uftp/files/uftp-3.7_makefile.patch79
-rw-r--r--net-misc/uftp/files/uftpd.conf8
-rw-r--r--net-misc/uftp/files/uftpd.init24
-rw-r--r--net-misc/uftp/files/uftpproxyd.conf5
-rw-r--r--net-misc/uftp/files/uftpproxyd.init24
-rw-r--r--net-misc/uftp/metadata.xml12
-rw-r--r--net-misc/uftp/uftp-3.7.1.ebuild46
-rw-r--r--net-misc/uftp/uftp-3.7.ebuild46
-rw-r--r--net-misc/unison/Manifest15
-rw-r--r--net-misc/unison/files/unison-2.27.57-as-needed.patch11
-rw-r--r--net-misc/unison/files/unison-mymap.patch13
-rw-r--r--net-misc/unison/metadata.xml5
-rw-r--r--net-misc/unison/unison-2.27.157.ebuild86
-rw-r--r--net-misc/unison/unison-2.32.52.ebuild87
-rw-r--r--net-misc/unison/unison-2.40.102.ebuild82
-rw-r--r--net-misc/unison/unison-2.45.4.ebuild82
-rw-r--r--net-misc/unison/unison-2.48.3.ebuild82
-rw-r--r--net-misc/unix2tcp/Manifest1
-rw-r--r--net-misc/unix2tcp/metadata.xml7
-rw-r--r--net-misc/unix2tcp/unix2tcp-0.8.2.ebuild22
-rw-r--r--net-misc/urlview/Manifest1
-rw-r--r--net-misc/urlview/files/include-fix.patch11
-rw-r--r--net-misc/urlview/files/no-trailing-newline.patch11
-rw-r--r--net-misc/urlview/files/urlview-0.9-DESTDIR.patch23
-rw-r--r--net-misc/urlview/files/urlview-0.9-tinfo.patch21
-rw-r--r--net-misc/urlview/metadata.xml18
-rw-r--r--net-misc/urlview/urlview-0.9.ebuild48
-rw-r--r--net-misc/usbip/Manifest1
-rw-r--r--net-misc/usbip/metadata.xml9
-rw-r--r--net-misc/usbip/usbip-3.19.ebuild53
-rw-r--r--net-misc/utelnetd/Manifest1
-rw-r--r--net-misc/utelnetd/files/utelnetd.initd16
-rw-r--r--net-misc/utelnetd/metadata.xml8
-rw-r--r--net-misc/utelnetd/utelnetd-0.1.9-r1.ebuild32
-rw-r--r--net-misc/valve/Manifest1
-rw-r--r--net-misc/valve/metadata.xml7
-rw-r--r--net-misc/valve/valve-1.0.ebuild30
-rw-r--r--net-misc/vconfig/Manifest1
-rw-r--r--net-misc/vconfig/metadata.xml10
-rw-r--r--net-misc/vconfig/vconfig-1.9.ebuild39
-rw-r--r--net-misc/vde/Manifest3
-rw-r--r--net-misc/vde/files/vde-2.2.2-gcc43.patch60
-rw-r--r--net-misc/vde/files/vde-2.2.2-slirpvde-buffer-overflow.patch49
-rw-r--r--net-misc/vde/files/vde.conf10
-rw-r--r--net-misc/vde/files/vde.init26
-rw-r--r--net-misc/vde/metadata.xml25
-rw-r--r--net-misc/vde/vde-2.2.2.ebuild40
-rw-r--r--net-misc/vde/vde-2.3.1.ebuild48
-rw-r--r--net-misc/vde/vde-2.3.2-r1.ebuild66
-rw-r--r--net-misc/vde/vde-2.3.2-r2.ebuild68
-rw-r--r--net-misc/vde/vde-2.3.2.ebuild57
-rw-r--r--net-misc/vinagre/Manifest2
-rw-r--r--net-misc/vinagre/files/vinagre-3.14.3-freerdp.patch39
-rw-r--r--net-misc/vinagre/files/vinagre-3.14.3-freerdp2.patch35
-rw-r--r--net-misc/vinagre/files/vinagre-3.16.1-freerdp.patch38
-rw-r--r--net-misc/vinagre/metadata.xml13
-rw-r--r--net-misc/vinagre/vinagre-3.14.3-r1.ebuild74
-rw-r--r--net-misc/vinagre/vinagre-3.14.3.ebuild67
-rw-r--r--net-misc/vinagre/vinagre-3.16.1.ebuild73
-rw-r--r--net-misc/vino/Manifest2
-rw-r--r--net-misc/vino/metadata.xml10
-rw-r--r--net-misc/vino/vino-3.14.2.ebuild69
-rw-r--r--net-misc/vino/vino-3.16.0.ebuild67
-rw-r--r--net-misc/vmnet/Manifest2
-rw-r--r--net-misc/vmnet/metadata.xml7
-rw-r--r--net-misc/vmnet/vmnet-0.4.ebuild46
-rw-r--r--net-misc/vmpsd/Manifest1
-rw-r--r--net-misc/vmpsd/files/vmpsd-1.3-64bit.patch38
-rw-r--r--net-misc/vmpsd/files/vmpsd-1.4-snmp-support.patch56
-rw-r--r--net-misc/vmpsd/metadata.xml10
-rw-r--r--net-misc/vmpsd/vmpsd-1.4.ebuild42
-rw-r--r--net-misc/vncrec/Manifest1
-rw-r--r--net-misc/vncrec/files/vncrec-0.2-includes.patch21
-rw-r--r--net-misc/vncrec/metadata.xml7
-rw-r--r--net-misc/vncrec/vncrec-0.2-r1.ebuild50
-rw-r--r--net-misc/vncsnapshot/Manifest1
-rw-r--r--net-misc/vncsnapshot/files/vncsnapshot-1.2a-amd64grey.patch12
-rw-r--r--net-misc/vncsnapshot/metadata.xml11
-rw-r--r--net-misc/vncsnapshot/vncsnapshot-1.2a.ebuild44
-rw-r--r--net-misc/vpnc/Manifest2
-rw-r--r--net-misc/vpnc/files/vpnc-0.5.3_p514-as-needed.patch47
-rw-r--r--net-misc/vpnc/files/vpnc-2.init103
-rw-r--r--net-misc/vpnc/files/vpnc-3.init103
-rw-r--r--net-misc/vpnc/files/vpnc-tmpfiles.conf1
-rw-r--r--net-misc/vpnc/files/vpnc.confd4
-rw-r--r--net-misc/vpnc/files/vpnc.service20
-rw-r--r--net-misc/vpnc/metadata.xml20
-rw-r--r--net-misc/vpnc/vpnc-0.5.3_p527-r1.ebuild74
-rw-r--r--net-misc/vpnc/vpnc-0.5.3_p550.ebuild72
-rw-r--r--net-misc/vpncwatch/Manifest2
-rw-r--r--net-misc/vpncwatch/files/vpncwatch-1.7-Makefile.patch21
-rw-r--r--net-misc/vpncwatch/files/vpncwatch-1.7-gcc4.3.patch11
-rw-r--r--net-misc/vpncwatch/files/vpncwatch-1.7-literal.patch11
-rw-r--r--net-misc/vpncwatch/files/vpncwatch-1.8-Makefile.patch23
-rw-r--r--net-misc/vpncwatch/files/vpncwatch-1.8.1-Makefile.patch23
-rw-r--r--net-misc/vpncwatch/metadata.xml10
-rw-r--r--net-misc/vpncwatch/vpncwatch-1.8.1.ebuild29
-rw-r--r--net-misc/vpncwatch/vpncwatch-1.8.ebuild29
-rw-r--r--net-misc/vrrpd/Manifest2
-rw-r--r--net-misc/vrrpd/files/vrrpd-1.9-rollup.patch37
-rw-r--r--net-misc/vrrpd/metadata.xml11
-rw-r--r--net-misc/vrrpd/vrrpd-1.0.ebuild26
-rw-r--r--net-misc/vrrpd/vrrpd-1.9.ebuild34
-rw-r--r--net-misc/vtun/Manifest2
-rw-r--r--net-misc/vtun/files/vtun-3.0.2-build-racing-condition-fix.patch17
-rw-r--r--net-misc/vtun/files/vtun-3.0.2-includes.patch72
-rw-r--r--net-misc/vtun/files/vtun-3.0.2-remove-config-presence-check.patch13
-rw-r--r--net-misc/vtun/files/vtun-3.0.3-includes.patch62
-rw-r--r--net-misc/vtun/files/vtun.rc33
-rw-r--r--net-misc/vtun/files/vtund-start.conf33
-rw-r--r--net-misc/vtun/metadata.xml11
-rw-r--r--net-misc/vtun/vtun-3.0.2-r2.ebuild54
-rw-r--r--net-misc/vtun/vtun-3.0.3.ebuild54
-rw-r--r--net-misc/wakeonlan/Manifest1
-rw-r--r--net-misc/wakeonlan/files/wakeonlan-0.41-ethers-lookup.patch90
-rw-r--r--net-misc/wakeonlan/metadata.xml9
-rw-r--r--net-misc/wakeonlan/wakeonlan-0.41-r2.ebuild27
-rw-r--r--net-misc/wget/Manifest4
-rw-r--r--net-misc/wget/files/wget-1.13.4-openssl-pkg-config.patch31
-rw-r--r--net-misc/wget/files/wget-1.14-gnutls-ssl.patch68
-rw-r--r--net-misc/wget/files/wget-1.14-pkg-config.patch200
-rw-r--r--net-misc/wget/files/wget-1.14-texi2pod.patch32
-rw-r--r--net-misc/wget/files/wget-1.14-wgetrc.patch31
-rw-r--r--net-misc/wget/files/wget-1.15-pkg-config.patch190
-rw-r--r--net-misc/wget/files/wget-1.15-test_fix.patch26
-rw-r--r--net-misc/wget/files/wget-1.16-fix-proxy-test-race.patch96
-rw-r--r--net-misc/wget/files/wget-1.16-openssl-header.patch31
-rw-r--r--net-misc/wget/files/wget-1.16-openssl-no-ssl3.patch34
-rw-r--r--net-misc/wget/files/wget-1.16-pkg-config.patch200
-rw-r--r--net-misc/wget/files/wget-1.16-tests-skip.patch27
-rw-r--r--net-misc/wget/metadata.xml12
-rw-r--r--net-misc/wget/wget-1.16.1.ebuild93
-rw-r--r--net-misc/wget/wget-1.16.2.ebuild87
-rw-r--r--net-misc/wget/wget-1.16.3.ebuild87
-rw-r--r--net-misc/wget/wget-1.16.ebuild97
-rw-r--r--net-misc/whatmask/Manifest1
-rw-r--r--net-misc/whatmask/metadata.xml8
-rw-r--r--net-misc/whatmask/whatmask-1.2-r1.ebuild22
-rw-r--r--net-misc/whois/Manifest5
-rw-r--r--net-misc/whois/files/whois-4.7.2-config-file.patch12
-rw-r--r--net-misc/whois/files/whois-5.1.5-po_fixes.patch22
-rw-r--r--net-misc/whois/metadata.xml5
-rw-r--r--net-misc/whois/whois-5.0.25.ebuild61
-rw-r--r--net-misc/whois/whois-5.0.26.ebuild61
-rw-r--r--net-misc/whois/whois-5.1.5.ebuild62
-rw-r--r--net-misc/whois/whois-5.2.10.ebuild61
-rw-r--r--net-misc/whois/whois-5.2.9.ebuild61
-rw-r--r--net-misc/wicd/Manifest4
-rw-r--r--net-misc/wicd/files/add-wpa-psk-hex-template.patch29
-rw-r--r--net-misc/wicd/files/wicd-1.7.1-provide-net.patch11
-rw-r--r--net-misc/wicd/files/wicd-1.7.1_beta2-init.patch11
-rw-r--r--net-misc/wicd/files/wicd-1.7.1_pre20111210-wpa-psk-hex-template.patch30
-rw-r--r--net-misc/wicd/files/wicd-1.7.2.4-fix-dbus-error.patch16
-rw-r--r--net-misc/wicd/files/wicd-1.7.2.4-fix-desktop-categories.patch20
-rw-r--r--net-misc/wicd/files/wicd-1.7.2.4-second-urwid.patch43
-rw-r--r--net-misc/wicd/files/wicd-1.7.2.4-urwid.patch66
-rw-r--r--net-misc/wicd/files/wicd-1.7.3-add-missing-gnome-shell-extension.patch39
-rw-r--r--net-misc/wicd/files/wicd-1.7.3-undefined-LANG.patch24
-rw-r--r--net-misc/wicd/files/wicd-1.7.3-urwid-1.3.0.patch15
-rw-r--r--net-misc/wicd/files/wicd-init-sve-start.patch10
-rw-r--r--net-misc/wicd/files/wicd-init.d24
-rw-r--r--net-misc/wicd/metadata.xml23
-rw-r--r--net-misc/wicd/wicd-1.7.2.4-r3.ebuild142
-rw-r--r--net-misc/wicd/wicd-1.7.3-r1.ebuild142
-rw-r--r--net-misc/wicd/wicd-1.7.3.ebuild139
-rw-r--r--net-misc/wol/Manifest1
-rw-r--r--net-misc/wol/metadata.xml16
-rw-r--r--net-misc/wol/wol-0.7.1-r1.ebuild19
-rw-r--r--net-misc/wput/Manifest1
-rw-r--r--net-misc/wput/files/wput-0.6-gentoo.diff18
-rw-r--r--net-misc/wput/files/wput-0.6-respectldflags.patch13
-rw-r--r--net-misc/wput/metadata.xml11
-rw-r--r--net-misc/wput/wput-0.6.1.ebuild40
-rw-r--r--net-misc/x11-ssh-askpass/Manifest1
-rw-r--r--net-misc/x11-ssh-askpass/metadata.xml8
-rw-r--r--net-misc/x11-ssh-askpass/x11-ssh-askpass-1.2.4.1-r1.ebuild39
-rw-r--r--net-misc/x11rdp/Manifest2
-rw-r--r--net-misc/x11rdp/files/xorg-cve-2011-4028+4029.patch22
-rw-r--r--net-misc/x11rdp/files/xorg-server-1.9-cve-2013-1940.patch31
-rw-r--r--net-misc/x11rdp/files/xorg-server-1.9-cve-2013-4396.patch43
-rw-r--r--net-misc/x11rdp/files/xorg-server-1.9-nouveau-default.patch30
-rw-r--r--net-misc/x11rdp/files/xorg-server-disable-acpi.patch31
-rw-r--r--net-misc/x11rdp/files/xrdp-0.8.0-0001-Include-xorg-list.h-to-fix-build-errors.patch25
-rw-r--r--net-misc/x11rdp/files/xrdp-0.8.0-0002-Remove-dither-printing.patch40
-rw-r--r--net-misc/x11rdp/metadata.xml8
-rw-r--r--net-misc/x11rdp/x11rdp-0.8.0.1.9.5.ebuild185
-rw-r--r--net-misc/x2goclient/Manifest5
-rw-r--r--net-misc/x2goclient/metadata.xml6
-rw-r--r--net-misc/x2goclient/x2goclient-4.0.2.0.ebuild79
-rw-r--r--net-misc/x2goclient/x2goclient-4.0.3.1.ebuild79
-rw-r--r--net-misc/x2goclient/x2goclient-4.0.3.2.ebuild79
-rw-r--r--net-misc/x2goclient/x2goclient-4.0.4.0.ebuild79
-rw-r--r--net-misc/x2goclient/x2goclient-4.0.5.0.ebuild79
-rw-r--r--net-misc/x2goserver/Manifest6
-rw-r--r--net-misc/x2goserver/files/x2gocleansessions.service10
-rw-r--r--net-misc/x2goserver/files/x2goserver-4.0.1.18-fix_local_desktop_sharing.patch19
-rw-r--r--net-misc/x2goserver/files/x2goserver-4.0.1.18-prevent_bash_failures_xsession.patch27
-rw-r--r--net-misc/x2goserver/files/x2goserver-4.0.1.18-use_printf.patch58
-rw-r--r--net-misc/x2goserver/files/x2goserver.init21
-rw-r--r--net-misc/x2goserver/metadata.xml9
-rw-r--r--net-misc/x2goserver/x2goserver-4.0.1.12.ebuild83
-rw-r--r--net-misc/x2goserver/x2goserver-4.0.1.15.ebuild82
-rw-r--r--net-misc/x2goserver/x2goserver-4.0.1.16.ebuild82
-rw-r--r--net-misc/x2goserver/x2goserver-4.0.1.17.ebuild82
-rw-r--r--net-misc/x2goserver/x2goserver-4.0.1.18-r1.ebuild85
-rw-r--r--net-misc/x2goserver/x2goserver-4.0.1.18-r2.ebuild90
-rw-r--r--net-misc/x2goserver/x2goserver-4.0.1.18.ebuild82
-rw-r--r--net-misc/x2goserver/x2goserver-4.0.1.19.ebuild85
-rw-r--r--net-misc/xrdp/Manifest1
-rw-r--r--net-misc/xrdp/files/startwm.sh8
-rw-r--r--net-misc/xrdp/files/xrdp-0.8.0-crypt-null-return.patch36
-rw-r--r--net-misc/xrdp/files/xrdp-initd28
-rw-r--r--net-misc/xrdp/files/xrdp-sesman.pamd4
-rw-r--r--net-misc/xrdp/metadata.xml11
-rw-r--r--net-misc/xrdp/xrdp-0.8.0-r1.ebuild152
-rw-r--r--net-misc/yajhfc/Manifest2
-rw-r--r--net-misc/yajhfc/metadata.xml11
-rw-r--r--net-misc/yajhfc/yajhfc-0.5.2.ebuild33
-rw-r--r--net-misc/yajhfc/yajhfc-0.5.7.ebuild53
-rw-r--r--net-misc/yandex-disk/Manifest4
-rw-r--r--net-misc/yandex-disk/metadata.xml15
-rw-r--r--net-misc/yandex-disk/yandex-disk-0.1.5.758_p1.ebuild44
-rw-r--r--net-misc/yandex-disk/yandex-disk-0.1.5.870_p1.ebuild44
-rw-r--r--net-misc/yaydl/Manifest1
-rw-r--r--net-misc/yaydl/metadata.xml11
-rw-r--r--net-misc/yaydl/yaydl-1.5.2.ebuild47
-rw-r--r--net-misc/youtube-dl/Manifest3
-rw-r--r--net-misc/youtube-dl/metadata.xml10
-rw-r--r--net-misc/youtube-dl/youtube-dl-2015.04.03.ebuild72
-rw-r--r--net-misc/youtube-dl/youtube-dl-2015.07.28.ebuild87
-rw-r--r--net-misc/youtube-dl/youtube-dl-2015.08.06.1.ebuild87
-rw-r--r--net-misc/youtube-viewer/Manifest1
-rw-r--r--net-misc/youtube-viewer/metadata.xml18
-rw-r--r--net-misc/youtube-viewer/youtube-viewer-3.1.1.ebuild91
-rw-r--r--net-misc/youtube-viewer/youtube-viewer-9999.ebuild74
-rw-r--r--net-misc/ytalk/Manifest1
-rw-r--r--net-misc/ytalk/files/ytalk-3.3.0-tinfo.patch47
-rw-r--r--net-misc/ytalk/metadata.xml9
-rw-r--r--net-misc/ytalk/ytalk-3.3.0.ebuild27
-rw-r--r--net-misc/zssh/Manifest1
-rw-r--r--net-misc/zssh/files/zssh-1.5a-gentoo-include.diff11
-rw-r--r--net-misc/zssh/metadata.xml15
-rw-r--r--net-misc/zssh/zssh-1.5c-r1.ebuild46
-rw-r--r--net-misc/zsync/Manifest2
-rw-r--r--net-misc/zsync/files/zsync-0.6.2-zlib-1.2.3-support.patch201
-rw-r--r--net-misc/zsync/metadata.xml25
-rw-r--r--net-misc/zsync/zsync-0.6.2-r1.ebuild47
2639 files changed, 111678 insertions, 0 deletions
diff --git a/net-misc/6tunnel/6tunnel-0.10.ebuild b/net-misc/6tunnel/6tunnel-0.10.ebuild
new file mode 100644
index 000000000000..759a4e407011
--- /dev/null
+++ b/net-misc/6tunnel/6tunnel-0.10.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="TCP proxy for applications that don't speak IPv6"
+HOMEPAGE="http://toxygen.net/6tunnel"
+SRC_URI="http://toxygen.net/6tunnel/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="s390 x86"
+IUSE=""
+
+DEPEND=""
+
+src_install() {
+ dobin 6tunnel || die
+ doman 6tunnel.1
+}
diff --git a/net-misc/6tunnel/6tunnel-0.11_rc1.ebuild b/net-misc/6tunnel/6tunnel-0.11_rc1.ebuild
new file mode 100644
index 000000000000..adb3d3ea6760
--- /dev/null
+++ b/net-misc/6tunnel/6tunnel-0.11_rc1.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="TCP proxy for applications that don't speak IPv6"
+HOMEPAGE="http://toxygen.net/6tunnel"
+SRC_URI="http://toxygen.net/6tunnel/${P/_/}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~s390"
+IUSE=""
+
+DEPEND=""
+
+S=${WORKDIR}/6tunnel-0.11
+
+src_install() {
+ dobin 6tunnel || die
+ doman 6tunnel.1
+}
diff --git a/net-misc/6tunnel/Manifest b/net-misc/6tunnel/Manifest
new file mode 100644
index 000000000000..85248f91c522
--- /dev/null
+++ b/net-misc/6tunnel/Manifest
@@ -0,0 +1,2 @@
+DIST 6tunnel-0.10.tar.gz 37882 SHA256 3cd467038bc8185baee10bc0f627a25897cd4bc9c83b8273d20b84a640c7636b
+DIST 6tunnel-0.11rc1.tar.gz 38126 SHA256 29f3b148d3569ce6ef4f34d37c8158acadb27964a54554e8d6746612fe46ba66
diff --git a/net-misc/6tunnel/metadata.xml b/net-misc/6tunnel/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/net-misc/6tunnel/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/adjtimex/Manifest b/net-misc/adjtimex/Manifest
new file mode 100644
index 000000000000..2d3cd915626a
--- /dev/null
+++ b/net-misc/adjtimex/Manifest
@@ -0,0 +1,2 @@
+DIST adjtimex_1.29-2.diff.gz 51735 SHA256 54293c8aff704a8077b4d0ec31e8a21cf8de93e145e0e8644ec91e132da6e577 SHA512 cc78cf9fd93cb243019952f877cb9730a5755d87336fc1a956162e957fd579de3770cb6bbba58ac9b6d350ee631ed294303360d0aa4153b12a31eb1bb4e35924 WHIRLPOOL 24f5a37ffa2b7b81b0d2f0d4755bd26e07e6bc32896858d574a96bb02c8df3d71f8acbeba9363c0ee37fdca59dba0a8a83f33014b562f85bd5b7abbdb99100d3
+DIST adjtimex_1.29.orig.tar.gz 85551 SHA256 04b9e8b66e77276ed07e78de89af37fd1aa12725923de853480827c4fafd176a SHA512 5a48cdc538866c06562f62e369c08d60978c791ed91565262c0179c6fa25dd343963992d00e10f32475fdc00b458f81cf9c61adbfa9e1b7a8d4981ebeeff5649 WHIRLPOOL f22f4ba2f0945ca53f4967094b10df1a741d705b07f86ae3e024ebb3624acc6cfd56d12414c2a00b1f0747a07c80d65fa0e7471816879cb3c159b5b079228112
diff --git a/net-misc/adjtimex/adjtimex-1.29-r1.ebuild b/net-misc/adjtimex/adjtimex-1.29-r1.ebuild
new file mode 100644
index 000000000000..20cb55ce4ed3
--- /dev/null
+++ b/net-misc/adjtimex/adjtimex-1.29-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils fixheadtails toolchain-funcs
+
+DEBIAN_PV="2"
+MY_P="${P/-/_}"
+DEBIAN_URI="mirror://debian/pool/main/${PN:0:1}/${PN}"
+DEBIAN_PATCH="${MY_P}-${DEBIAN_PV}.diff.gz"
+DEBIAN_SRC="${MY_P}.orig.tar.gz"
+DESCRIPTION="display or set the kernel time variables"
+HOMEPAGE="http://www.ibiblio.org/linsearch/lsms/adjtimex.html"
+SRC_URI="${DEBIAN_URI}/${DEBIAN_PATCH}
+ ${DEBIAN_URI}/${DEBIAN_SRC}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc x86"
+IUSE=""
+
+DEPEND="sys-apps/sed"
+RDEPEND=""
+
+src_prepare() {
+ cd "${WORKDIR}"
+ epatch "${DISTDIR}"/${DEBIAN_PATCH}
+ cd "${S}"
+ for i in debian/adjtimexconfig debian/adjtimexconfig.8 ; do
+ sed -e 's|/etc/default/adjtimex|/etc/conf.d/adjtimex|' \
+ -i.orig ${i}
+ sed -e 's|^/sbin/adjtimex |/usr/sbin/adjtimex |' \
+ -i.orig ${i}
+ done
+ epatch "${FILESDIR}"/${PN}-1.29-r1-gentoo-utc.patch
+ ht_fix_file debian/adjtimexconfig
+ sed -i \
+ -e '/CFLAGS = -Wall -t/,/endif/d' \
+ -e '/$(CC).* -o/s|$(CFLAGS)|& $(LDFLAGS)|g' \
+ Makefile.in || die "sed Makefile.in"
+}
+
+src_configure() {
+ tc-export CC
+ default
+}
+
+src_install() {
+ dodoc README* ChangeLog
+ doman adjtimex.8 debian/adjtimexconfig.8
+ dosbin adjtimex debian/adjtimexconfig
+ newinitd "${FILESDIR}"/adjtimex.init adjtimex
+}
+
+pkg_postinst() {
+ einfo "Please run adjtimexconfig to create the configuration file"
+}
diff --git a/net-misc/adjtimex/files/adjtimex-1.29-r1-gentoo-utc.patch b/net-misc/adjtimex/files/adjtimex-1.29-r1-gentoo-utc.patch
new file mode 100644
index 000000000000..ac8730d1ee7d
--- /dev/null
+++ b/net-misc/adjtimex/files/adjtimex-1.29-r1-gentoo-utc.patch
@@ -0,0 +1,30 @@
+--- adjtimex-1.29-debian/debian/adjtimexconfig 2011-12-23 21:29:32.962449759 +0100
++++ adjtimex-1.29/debian/adjtimexconfig 2011-12-23 21:30:00.610638657 +0100
+@@ -3,6 +3,18 @@
+ conffile=/etc/default/adjtimex
+ startfile=/etc/init.d/adjtimex
+
++# Get UTC setting
++params=''
++if [ -f /etc/conf.d/clock ]; then
++ #baselayout-1
++ source /etc/conf.d/clock
++ [ "$CLOCK" == "UTC" ] && params='--utc'
++elif [ -f /etc/conf.d/hwclock ]; then
++ #baselayout-2
++ source /etc/conf.d/hwclock
++ [ "$clock" == "UTC" ] && params='--utc'
++fi
++
+ echo -n "Comparing clocks (this will take 70 sec)..."
+
+ # Get the parameters
+@@ -11,7 +23,7 @@
+ baseline=`awk '/<= tick/{print ($1+$NF)/2}' /etc/adj.adjust`
+ hz=`awk '/USER_HZ/{print $3}' /etc/adj.adjust`
+ /usr/sbin/adjtimex --tick $baseline --frequency 0
+-/usr/sbin/adjtimex --adjust --force-adjust >/etc/adj.adjust
++/usr/sbin/adjtimex ${params} --adjust --force-adjust >/etc/adj.adjust
+ echo "done."
+ ticks=`tail -n 1 /etc/adj.adjust|awk '{print $6}'`
+ freq=`tail -n 1 /etc/adj.adjust|awk '{print $7}'`
diff --git a/net-misc/adjtimex/files/adjtimex.init b/net-misc/adjtimex/files/adjtimex.init
new file mode 100644
index 000000000000..8586deb12c6c
--- /dev/null
+++ b/net-misc/adjtimex/files/adjtimex.init
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DAEMON=adjtimex
+OPTS="--tick ${TICK} --frequency ${FREQ}"
+CONFD="/etc/conf.d/${DAEMON}"
+
+depend() {
+ before ntp-client ntpd
+ need localmount
+}
+
+checkconfig() {
+ if [ ! -f "${CONFD}" ]; then
+ eerror "Configuration file not found!"
+ eerror "You must run adjtimexconfig to create it."
+ return 1
+ fi
+}
+
+
+start() {
+ checkconfig || return 1
+ ebegin "Regulating system clock with ${DAEMON}..."
+ /usr/sbin/${DAEMON} ${OPTS}
+ eend $?
+}
+
+stop() {
+ :
+}
+
+# vim: ts=4 sw=4 ft=gentoo-init-d:
diff --git a/net-misc/adjtimex/metadata.xml b/net-misc/adjtimex/metadata.xml
new file mode 100644
index 000000000000..c6d862855eb5
--- /dev/null
+++ b/net-misc/adjtimex/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-misc/aget/Manifest b/net-misc/aget/Manifest
new file mode 100644
index 000000000000..06934808d3f7
--- /dev/null
+++ b/net-misc/aget/Manifest
@@ -0,0 +1 @@
+DIST aget-0.4.1.tar.gz 12783 RMD160 4a23d722b0e4d6c632c40006aa5e67d5acfd4b88 SHA1 6f7bc1676fd506207a1a168c587165b902d9d609 SHA256 d17393c7f44aab38028ae71f14b572ba1839b6e085fb2092b6ebe68bc931df4d
diff --git a/net-misc/aget/aget-0.4.1-r1.ebuild b/net-misc/aget/aget-0.4.1-r1.ebuild
new file mode 100644
index 000000000000..c29fea9cad97
--- /dev/null
+++ b/net-misc/aget/aget-0.4.1-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="multithreaded HTTP download accelerator"
+HOMEPAGE="http://www.enderunix.org/aget/"
+SRC_URI="http://www.enderunix.org/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~mips ~ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PF}.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install || die
+ dodoc AUTHORS ChangeLog README* THANKS TODO || die
+}
diff --git a/net-misc/aget/files/aget-0.4.1-r1.patch b/net-misc/aget/files/aget-0.4.1-r1.patch
new file mode 100644
index 000000000000..fe804901528c
--- /dev/null
+++ b/net-misc/aget/files/aget-0.4.1-r1.patch
@@ -0,0 +1,88 @@
+
+Subsequent snprintf calls treat the buffer as having size GETREQSIZ, so
+drop the subtraction. Fix for http://bugs.gentoo.org/337874 by Kevin Pyle
+
+--- aget-0.4.1/Aget.c
++++ aget-0.4.1/Aget.c
+@@ -86,7 +86,7 @@
+ }
+
+ /* Get the starting time, prepare GET format string, and start the threads */
+- fmt = (char *)calloc(GETREQSIZ - 2, sizeof(char));
++ fmt = (char *)calloc(GETREQSIZ, sizeof(char));
+ time(&t_start);
+ for (i = 0; i < nthreads; i++) {
+ soffset = calc_offset(req->clength, i, nthreads);
+@@ -139,7 +139,7 @@
+
+ nthreads = h->nthreads;
+
+- fmt = (char *)calloc(GETREQSIZ - 2, sizeof(char));
++ fmt = (char *)calloc(GETREQSIZ, sizeof(char));
+
+ wthread = (struct thread_data *)malloc(nthreads * sizeof(struct thread_data));
+ memcpy(req, &h->req, sizeof(struct request));
+
+Fix useless memset that set 0 bytes to the value of GETRECVSIZ, rather
+than setting GETRECVSIZ bytes to the value of 0. By Kevin Pyle.
+
+--- aget-0.4.1/Download.c
++++ aget-0.4.1/Download.c
+@@ -107,7 +107,7 @@
+ pthread_mutex_unlock(&bwritten_mutex);
+
+ while (td->offset < foffset) {
+- memset(rbuf, GETRECVSIZ, 0);
++ memset(rbuf, 0, GETRECVSIZ);
+ dr = recv(sd, rbuf, GETRECVSIZ, 0);
+ if ((td->offset + dr) > foffset)
+ dw = pwrite(td->fd, rbuf, foffset - td->offset, td->offset);
+--- aget-0.4.1/Head.c 2010-09-20 03:41:27.236019179 +0200
++++ aget-0.4.1/Head.c 2010-09-20 03:43:00.087098655 +0200
+@@ -1,5 +1,4 @@
+ #ifndef SOLARIS
+-#define _XOPEN_SOURCE 500
+ #endif
+
+
+--- aget-0.4.1/Misc.c
++++ aget-0.4.1/Misc.c
+@@ -129,7 +129,7 @@
+ fprintf(stderr, "\t\t-h this screen\n");
+ fprintf(stderr, "\t\t-v version info\n");
+ fprintf(stderr, "\n");
+- fprintf(stderr, "http//www.enderunix.org/aget/\n");
++ fprintf(stderr, "http://www.enderunix.org/aget/\n");
+ }
+
+ /* reverse a given string */
+--- aget-0.4.1/Makefile
++++ aget-0.4.1/Makefile
+@@ -2,20 +2,21 @@
+ # http://www.enderunix.org/aget/
+
+ OBJS = main.o Aget.o Misc.o Head.o Signal.o Download.o Resume.o
+-CFLAGS = -g -W
+-LDFLAGS = -pthread
++CFLAGS +=
++LDFLAGS += -pthread
+ CC = gcc
+ STRIP = strip
+
+-all: $(OBJS)
+- $(CC) -o aget $(OBJS) $(LDFLAGS)
++all: aget
++aget: $(OBJS)
++ $(LINK.o) $^ $(OUTPUT_OPTION)
+
+ strip: $(all)
+ $(STRIP) aget
+
+ install:
+- cp -f aget /usr/local/bin/aget
+- cp -f aget.1 /usr/share/man/man1/
++ install -m 0755 -D aget $(DESTDIR)/usr/bin/aget
++ install -m 0644 -D aget.1 $(DESTDIR)/usr/share/man/man1/aget.1
+
+ clean:
+ rm -f aget *.o core.* *~
diff --git a/net-misc/aget/metadata.xml b/net-misc/aget/metadata.xml
new file mode 100644
index 000000000000..d89103058ab7
--- /dev/null
+++ b/net-misc/aget/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+</maintainer>
+<longdescription>Aget fetches HTTP URLs in a manner similar to wget, but segments the retrieval into multiple parts to increase download speed. It can be many times as fast as wget in some circumstances.</longdescription>
+<longdescription lang="ja">Aget は wget 風の振舞いで URL 上から HTTP
+経由で取り寄せますが、異なる点としてはダウンロードのスピードアップのため対象を分割します。分割しても
+wget と変わらない場合もあります。</longdescription>
+</pkgmetadata>
diff --git a/net-misc/aggregate-flim/Manifest b/net-misc/aggregate-flim/Manifest
new file mode 100644
index 000000000000..478546877ed0
--- /dev/null
+++ b/net-misc/aggregate-flim/Manifest
@@ -0,0 +1 @@
+DIST aggregate-1.0.2.tar.gz 51074 SHA256 019dc17498515f470015a427891f8e70f4ec424ab9960e10cdfb6462bec607c0
diff --git a/net-misc/aggregate-flim/aggregate-flim-1.0.2.ebuild b/net-misc/aggregate-flim/aggregate-flim-1.0.2.ebuild
new file mode 100644
index 000000000000..7ab52e655672
--- /dev/null
+++ b/net-misc/aggregate-flim/aggregate-flim-1.0.2.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+MY_PN="${PN/-flim}"
+MY_P="${MY_PN}-${PV}"
+DESCRIPTION="aggregate is a tool for aggregating CIDR networks"
+HOMEPAGE="http://www.vergenet.net/linux/aggregate-flim/"
+SRC_URI="http://www.vergenet.net/linux/aggregate-flim/download/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+DEPEND="dev-libs/vanessa-logger"
+#RDEPEND=""
+S=${WORKDIR}/${MY_P}
+
+src_install() {
+ newbin aggregate aggregate-flim
+ newman aggregate.8 aggregate-flim.8
+ dodoc AUTHORS ChangeLog INSTALL NEWS README
+}
diff --git a/net-misc/aggregate-flim/metadata.xml b/net-misc/aggregate-flim/metadata.xml
new file mode 100644
index 000000000000..967fdca5659a
--- /dev/null
+++ b/net-misc/aggregate-flim/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>robbat2@gentoo.org</email>
+</maintainer>
+<longdescription>aggregate is a tool for aggregating CIDR networks. Input is read from stdin and output is written to stdout. It undestands IPv4 networks represented as network/prefix, network/netmask and start_address - end_addres. It is able to read input in any one of these formats and output in the same or a different format.</longdescription>
+</pkgmetadata>
diff --git a/net-misc/aggregate/Manifest b/net-misc/aggregate/Manifest
new file mode 100644
index 000000000000..8bb8e99bfa61
--- /dev/null
+++ b/net-misc/aggregate/Manifest
@@ -0,0 +1 @@
+DIST aggregate-1.6.tar.gz 20566 SHA256 166503005cd8722c730e530cc90652ddfa198a25624914c65dffc3eb87ba5482
diff --git a/net-misc/aggregate/aggregate-1.6.ebuild b/net-misc/aggregate/aggregate-1.6.ebuild
new file mode 100644
index 000000000000..32729cc0eeab
--- /dev/null
+++ b/net-misc/aggregate/aggregate-1.6.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Take a list of prefixes and perform two optimisations to reduce the length of the prefix list"
+HOMEPAGE="http://dist.automagic.org/"
+SRC_URI="${HOMEPAGE}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ~mips ppc sparc x86"
+IUSE=""
+
+RDEPEND="dev-lang/perl"
+DEPEND=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-build-fixup.patch
+}
+
+src_configure() {
+ tc-export CC
+ econf
+}
+
+src_install() {
+ dobin aggregate aggregate-ios || die
+ doman aggregate{,-ios}.1
+ dodoc HISTORY
+}
diff --git a/net-misc/aggregate/files/aggregate-1.6-build-fixup.patch b/net-misc/aggregate/files/aggregate-1.6-build-fixup.patch
new file mode 100644
index 000000000000..51c9f9f96128
--- /dev/null
+++ b/net-misc/aggregate/files/aggregate-1.6-build-fixup.patch
@@ -0,0 +1,14 @@
+diff -Nuar aggregate-1.6.orig/Makefile.in aggregate-1.6/Makefile.in
+--- aggregate-1.6.orig/Makefile.in 2002-03-06 08:59:37.000000000 -0800
++++ aggregate-1.6/Makefile.in 2008-10-10 01:31:42.613937925 -0700
+@@ -25,8 +25,8 @@
+ INSTALL = @INSTALL@
+ DEFS = @DEFS@
+ LIBS = @LIBS@
+-CFLAGS = -O
+-LDFLAGS = -s
++CFLAGS +=
++LDFLAGS +=
+ prefix = @prefix@
+
+ SHELL = /bin/sh
diff --git a/net-misc/aggregate/metadata.xml b/net-misc/aggregate/metadata.xml
new file mode 100644
index 000000000000..425b0dbd3a80
--- /dev/null
+++ b/net-misc/aggregate/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>robbat2@gentoo.org</email>
+</maintainer>
+<longdescription>aggregate is a tool for aggregating CIDR networks. Input is read from stdin and output is written to stdout. It understands IPv4 networks represented as network/prefix, network/netmask and start_address - end_address. It is able to read input in any one of these formats and output in the same or a different format.</longdescription>
+<longdescription lang="ja">
+Aggregate は CIDR ネットワークをアグリゲートするツールです。
+stdin を入力とし、stdoutを出力とします。IPv4 を network/prefix または
+network/netmask 、start_address - end_address の記述形式で理解します。
+それ等記述形式の入力を読み込み、同じ形式又は異なる形式で出力します。
+</longdescription>
+</pkgmetadata>
diff --git a/net-misc/aiccu/Manifest b/net-misc/aiccu/Manifest
new file mode 100644
index 000000000000..d3919d5dc977
--- /dev/null
+++ b/net-misc/aiccu/Manifest
@@ -0,0 +1 @@
+DIST aiccu_20070115.tar.gz 70056 SHA256 2260f426c13471169ccff8cb4a3908dc5f79fda18ddb6a55363e7824e6c4c760 SHA512 15b2f0dab51843e58abbd8a0cc13139e492057ee348e368e1b65476bb2760119e88982cd03ffc6ec2cb563a1b7a061e1f66a98861eaad15972d486ac17b7bc78 WHIRLPOOL a5743e9c28ec3b9f6bc43f1b715553842a13872f18281239ed76d3b322e3a4c3c3e0f0c5d80b47694bbedaf831d1b3feed285af9f37174cac323b2c1814813d7
diff --git a/net-misc/aiccu/aiccu-2007.01.15-r4.ebuild b/net-misc/aiccu/aiccu-2007.01.15-r4.ebuild
new file mode 100644
index 000000000000..339ace8e057f
--- /dev/null
+++ b/net-misc/aiccu/aiccu-2007.01.15-r4.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils linux-info systemd toolchain-funcs
+
+DESCRIPTION="AICCU Client to configure an IPv6 tunnel to SixXS"
+HOMEPAGE="http://www.sixxs.net/tools/aiccu"
+SRC_URI="http://www.sixxs.net/archive/sixxs/aiccu/unix/${PN}_${PV//\./}.tar.gz"
+
+LICENSE="SixXS"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ppc sparc x86"
+IUSE="systemd"
+
+RDEPEND="
+ net-libs/gnutls
+ sys-apps/iproute2
+ systemd? ( sys-apps/systemd )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+S=${WORKDIR}/${PN}
+
+CONFIG_CHECK="~TUN"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-r2-init.gentoo.patch \
+ "${FILESDIR}"/${P}-Makefile.patch \
+ "${FILESDIR}"/${P}-setupscript.patch \
+ "${FILESDIR}"/${P}-uclibc.patch \
+ "${FILESDIR}"/${P}-systemd.patch
+}
+
+src_compile() {
+ # Don't use main Makefile since it requires additional
+ # dependencies which are useless for us.
+ emake CC=$(tc-getCC) STRIP= -C unix-console \
+ HAVE_SYSTEMD=$(usex systemd 1 0)
+}
+
+src_install() {
+ dosbin unix-console/${PN}
+
+ insopts -m 600
+ insinto /etc
+ doins doc/${PN}.conf
+ newinitd doc/${PN}.init.gentoo ${PN}
+
+ use systemd && systemd_dounit doc/${PN}.service
+
+ dodoc doc/{HOWTO,README,changelog}
+}
diff --git a/net-misc/aiccu/files/aiccu-2007.01.15-Makefile.patch b/net-misc/aiccu/files/aiccu-2007.01.15-Makefile.patch
new file mode 100644
index 000000000000..c0eabbefd906
--- /dev/null
+++ b/net-misc/aiccu/files/aiccu-2007.01.15-Makefile.patch
@@ -0,0 +1,79 @@
+--- unix-console/Makefile.old 2010-06-28 21:56:32.287782600 +0200
++++ unix-console/Makefile 2010-06-28 22:15:56.232637681 +0200
+@@ -25,14 +25,11 @@ CWARNS += -W -Wall -Wshadow -Wpointer-ar
+ # CWARNS += -Wpacked
+
+ #CFLAGS += $(CWARNS) -D_GNU_SOURCE -D_DEBUG -g3 -O0
+-CFLAGS += $(CWARNS) -D_GNU_SOURCE
++CFLAGS ?= $(CWARNS) -O3
++CFLAGS += -D_GNU_SOURCE
+ CC = @gcc
+ RM = rm
+-
+-# Add -O3 when nothing is specified yet
+-ifeq ($(shell echo $(CFLAGS) | grep -c "\-O"),0)
+-CFLAGS += -O3
+-endif
++STRIP = strip
+
+ # This is a console client
+ CFLAGS += -D AICCU_CONSOLE
+@@ -42,7 +39,7 @@ CFLAGS += -D AICCU_CONSOLE
+ # Currently defaultly builds only on Linux, but other platforms might easily also support it
+ ifeq ($(shell uname | grep -c "Linux"),1)
+ CFLAGS += -D AICCU_GNUTLS
+-LDFLAGS += -lgnutls
++LIBS += -lgnutls
+ endif
+
+ # Linux
+@@ -50,7 +47,7 @@ ifeq ($(shell uname | grep -c "Linux"),1
+ CFLAGS += -D_LINUX -D HAS_IFHEAD -D AICCU_TYPE="\"linux\""
+ SRCS += ../common/aiccu_linux.c
+ OBJS += ../common/aiccu_linux.o
+-LDFLAGS += -lpthread -lresolv
++LIBS += -lpthread -lresolv
+ endif
+
+ # FreeBSD
+@@ -118,7 +115,7 @@ ifeq ($(shell uname | grep -c "Darwin"),
+ CFLAGS += -D_DARWIN -D NEED_IFHEAD -D AICCU_TYPE="\"darwin\""
+ SRCS += ../common/aiccu_darwin.c
+ OBJS += ../common/aiccu_darwin.o
+-LDFLAGS += -lresolv
++LIBS += -lresolv
+ endif
+
+ # SunOS / Solaris
+@@ -126,7 +123,7 @@ ifeq ($(shell uname | grep -c "SunOS"),1
+ CFLAGS += -D_SUNOS -D AICCU_TYPE="\"sunos\""
+ SRCS += ../common/aiccu_sunos.c
+ OBJS += ../common/aiccu_sunos.o
+-LDFLAGS += -lsocket -lnsl -lresolv
++LIBS += -lsocket -lnsl -lresolv
+ endif
+
+ # AIX
+@@ -137,17 +134,19 @@ CFLAGS += -D AICCU_CONSOLE
+ CFLAGS += -D_AIX -D AICCU_TYPE="\"aix\""
+ SRCS += ../common/aiccu_aix.c
+ OBJS += ../common/aiccu_aix.o
+-LDFLAGS += -lpthread
++LIBS += -lpthread
+ endif
+
+
+ all: aiccu
+
+ aiccu: $(OBJS) ${SRCS} ${INCS}
+- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
+ ifeq ($(shell echo $(CFLAGS) | grep -c "DEBUG"),0)
+ ifeq ($(shell echo "$(RPM_OPT_FLAGS)" | wc -c),1)
+- strip $@
++ifdef STRIP
++ $(STRIP) $@
++endif
+ endif
+ endif
+
diff --git a/net-misc/aiccu/files/aiccu-2007.01.15-r2-init.gentoo.patch b/net-misc/aiccu/files/aiccu-2007.01.15-r2-init.gentoo.patch
new file mode 100644
index 000000000000..35ca2b8a6719
--- /dev/null
+++ b/net-misc/aiccu/files/aiccu-2007.01.15-r2-init.gentoo.patch
@@ -0,0 +1,33 @@
+--- aiccu/doc/aiccu.init.gentoo
++++ aiccu/doc/aiccu.init.gentoo
+@@ -2,7 +2,7 @@
+
+ depend() {
+ need net
+- after ntp-client
++ after ntp-client ntpd
+ }
+
+ checkconfig() {
+@@ -23,14 +23,19 @@
+ start() {
+ checkconfig || return 1
+ ebegin "Starting aiccu"
+- start-stop-daemon --start --oknodo --quiet --exec /usr/sbin/aiccu -- start
++ start-stop-daemon --start --quiet --exec /usr/sbin/aiccu -- start
+ eend $?
+ }
+
+
+ stop() {
+ ebegin "Stopping aiccu"
+- start-stop-daemon --stop --oknodo --quiet --exec /usr/sbin/aiccu -- stop
++ start-stop-daemon --stop --pidfile /var/run/aiccu.pid --quiet --exec /usr/sbin/aiccu -- stop
+ eend $?
+ }
+
++restart() {
++ stop
++ sleep 3
++ start
++}
diff --git a/net-misc/aiccu/files/aiccu-2007.01.15-setupscript.patch b/net-misc/aiccu/files/aiccu-2007.01.15-setupscript.patch
new file mode 100644
index 000000000000..8981530435f3
--- /dev/null
+++ b/net-misc/aiccu/files/aiccu-2007.01.15-setupscript.patch
@@ -0,0 +1,17 @@
+--- aiccu/unix-console/main.c
++++ aiccu/unix-console/main.c
+@@ -471,6 +471,14 @@
+ */
+ if (aiccu_setup(hTunnel, true))
+ {
++
++ /* Running setup script */
++ if (g_aiccu->setupscript)
++ {
++ aiccu_exec("%s", g_aiccu->setupscript);
++ }
++
++
+ /* We need to stay running when doing Heartbeat or AYIYA */
+ if ( strcasecmp(hTunnel->sType, "6in4-heartbeat") == 0 ||
+ strcasecmp(hTunnel->sType, "ayiya") == 0)
diff --git a/net-misc/aiccu/files/aiccu-2007.01.15-systemd.patch b/net-misc/aiccu/files/aiccu-2007.01.15-systemd.patch
new file mode 100644
index 000000000000..e8616d04b3fc
--- /dev/null
+++ b/net-misc/aiccu/files/aiccu-2007.01.15-systemd.patch
@@ -0,0 +1,52 @@
+--- /dev/null
++++ aiccu-2007.01.15/doc/aiccu.service
+@@ -0,0 +1,13 @@
++[Unit]
++Description=Automatic IPv6 Connectivity Client Utility
++After=time-sync.target network.target
++ConditionPathExists=/etc/aiccu.conf
++
++
++[Service]
++Type=notify
++ExecStart=/usr/sbin/aiccu start
++ExecStop=/usr/sbin/aiccu stop
++
++[Install]
++WantedBy=multi-user.target
+--- aiccu-2007.01.15/unix-console/Makefile
++++ aiccu-2007.01.15/unix-console/Makefile
+@@ -48,6 +48,10 @@ ifeq ($(shell uname | grep -c "Linux"),1)
+ SRCS += ../common/aiccu_linux.c
+ OBJS += ../common/aiccu_linux.o
+ LIBS += -lpthread -lresolv
++ifeq (1,$(HAVE_SYSTEMD))
++LIBS += $(shell pkg-config --libs libsystemd 2>/dev/null || pkg-config --libs libsystemd-daemon)
++CFLAGS += -DHAVE_SYSTEMD
++endif
+ endif
+
+ # FreeBSD
+--- aiccu-2007.01.15/unix-console/main.c
++++ aiccu-2007.01.15/unix-console/main.c
+@@ -12,6 +12,9 @@
+
+ #include "../common/aiccu.h"
+ #include "../common/tun.h"
++#ifdef HAVE_SYSTEMD
++#include <systemd/sd-daemon.h>
++#endif
+
+ #ifndef _WIN32
+ /* Enable/Disable heartbeating */
+@@ -478,6 +481,10 @@ int main(int argc, char *argv[])
+ aiccu_exec("%s", g_aiccu->setupscript);
+ }
+
++#ifdef HAVE_SYSTEMD
++ /* Tell systemd we are operational. */
++ sd_notify(0, "READY=1");
++#endif
+
+ /* We need to stay running when doing Heartbeat or AYIYA */
+ if ( strcasecmp(hTunnel->sType, "6in4-heartbeat") == 0 ||
diff --git a/net-misc/aiccu/files/aiccu-2007.01.15-uclibc.patch b/net-misc/aiccu/files/aiccu-2007.01.15-uclibc.patch
new file mode 100644
index 000000000000..56341dea72f4
--- /dev/null
+++ b/net-misc/aiccu/files/aiccu-2007.01.15-uclibc.patch
@@ -0,0 +1,29 @@
+--- aiccu/common/resolver.c
++++ aiccu/common/resolver.c
+@@ -26,7 +26,7 @@
+
+ int getrrs(const char *label, int rrtype, void gotrec(unsigned int num, int type, const char *record))
+ {
+-#ifdef _LINUX
++#if defined(_LINUX) && ! defined(__UCLIBC__)
+ struct __res_state res;
+ #endif
+ unsigned char answer[8192];
+@@ -38,7 +38,7 @@
+ uint16_t type = 0, class = 0;
+ uint32_t ttl = 0;
+
+-#ifdef _LINUX
++#if defined(_LINUX) && ! defined(__UCLIBC__)
+ memset(&res, 0, sizeof(res));
+ res.options = RES_DEBUG;
+ res_ninit(&res);
+@@ -47,7 +47,7 @@
+ #endif
+
+ memset(answer, 0, sizeof(answer));
+-#ifdef _LINUX
++#if defined(_LINUX) && ! defined(__UCLIBC__)
+ ret = res_nquery(&res, label, C_IN, rrtype, answer, sizeof(answer));
+ #else
+ ret = res_query(label, C_IN, rrtype, answer, sizeof(answer));
diff --git a/net-misc/aiccu/metadata.xml b/net-misc/aiccu/metadata.xml
new file mode 100644
index 000000000000..5b80fb94c393
--- /dev/null
+++ b/net-misc/aiccu/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>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-misc/apt-cacher-ng/Manifest b/net-misc/apt-cacher-ng/Manifest
new file mode 100644
index 000000000000..0fda26e7c198
--- /dev/null
+++ b/net-misc/apt-cacher-ng/Manifest
@@ -0,0 +1,3 @@
+DIST apt-cacher-ng_0.8.3.orig.tar.xz 294116 SHA256 d86a6616b56094b6888a10ff40ae374beac2bc3525ab7b9e7159c4f4dfd00c49 SHA512 dbccec0ba44af34870bdf5650ae594552a7816d1203210f9a09826c0dec6d74f24c07bd0d18ab3df6f9068f15c601e54aa0892e68f6bfca4b59ae300c4313210 WHIRLPOOL 0fee51e0834f1e18ff020c933a52c7745fd23ccb3cde50ea71a10662643ccf55710f77314c344e18b07b534c9346bb010b14229fd9cf9afc0202a53baad2e84f
+DIST apt-cacher-ng_0.8.4.orig.tar.xz 297168 SHA256 efa8c0e9300f7dda5e1a52d30aaad8c3b2c3ef9e45b0e8592797b40f2e433214 SHA512 b564cc81bfc45e35d77d32216212608ee5adc3bcd49a61212c825b381507cda1912e15d9f5e177042d6c5e87991288ad4ad10972f1e400d4d85c5c6cc8a8d07c WHIRLPOOL cdccf30a574d3a400ea1b40e8ef2fc6d0ac5e214981951746fd684dd8abcf4a1a11047f8396977bc126dd7096c319e50304eec19ddf90d82dfe9ac7ab9c9482b
+DIST apt-cacher-ng_0.8.5.orig.tar.xz 303260 SHA256 f4e80adb02ad68a5f79a23335f1cc1e6b8a610b2c70749d9a1ce44171766775c SHA512 6c39ff8a37f074c1e2befc4acfa9685b2349cd364bdf808862bb77bbefa4bcf5bebf3dca3924cd55132d7c29aa0a55c553f483c763ccd46c3dbad8f1da3ab58e WHIRLPOOL 3530e6ffe6553753603751b8e5994b030dc2faa24cdb3ff98f21328e25070ba8750e17e040e4bcc0a40a589037441f645d9553837d1ed4de41c8e3e58c460e18
diff --git a/net-misc/apt-cacher-ng/apt-cacher-ng-0.8.3.ebuild b/net-misc/apt-cacher-ng/apt-cacher-ng-0.8.3.ebuild
new file mode 100644
index 000000000000..0d437886948e
--- /dev/null
+++ b/net-misc/apt-cacher-ng/apt-cacher-ng-0.8.3.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils eutils toolchain-funcs user
+
+DESCRIPTION="Yet another implementation of an HTTP proxy for Debian/Ubuntu software packages written in C++"
+HOMEPAGE="
+ http://www.unix-ag.uni-kl.de/~bloch/acng/
+ http://packages.qa.debian.org/a/apt-cacher-ng.html
+"
+LICENSE="BSD-4 ZLIB public-domain"
+SLOT="0"
+SRC_URI="mirror://debian/pool/main/a/${PN}/${PN}_${PV}.orig.tar.xz"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="doc fuse systemd tcpd"
+
+COMMON_DEPEND="
+ app-arch/bzip2
+ app-arch/xz-utils
+ sys-libs/zlib
+ systemd? (
+ sys-apps/systemd
+ )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ dev-util/cmake
+ >sys-devel/gcc-4.8
+ virtual/pkgconfig
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ dev-lang/perl
+ fuse? ( sys-fs/fuse )
+ tcpd? ( sys-apps/tcp-wrappers )
+"
+
+S=${WORKDIR}/${P/_}
+
+pkg_pretend() {
+ if [[ $(gcc-major-version) = 4 ]]; then
+ if [[ $(gcc-minor-version) -lt 8 ]]; then
+ die "GCC 4.8 or greater is required but you have $(gcc-major-version).$(gcc-minor-version)"
+ fi
+ else
+ die "GCC 4.8 or greater is required but you have $(gcc-major-version).$(gcc-minor-version)"
+ fi
+}
+
+pkg_setup() {
+ # add new user & group for daemon
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_configure(){
+ mycmakeargs="-DCMAKE_INSTALL_PREFIX=/usr"
+ if use fuse; then
+ mycmakeargs="-DHAVE_FUSE_25=yes ${mycmakeargs}"
+ else
+ mycmakeargs="-DHAVE_FUSE_25=no ${mycmakeargs}"
+ fi
+ if use tcpd; then
+ mycmakeargs="-DHAVE_LIBWRAP=yes ${mycmakeargs}"
+ else
+ mycmakeargs="-DHAVE_LIBWRAP=no ${mycmakeargs}"
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ pushd ${CMAKE_BUILD_DIR}
+ dosbin ${PN}
+ if use fuse; then
+ dobin acngfs
+ fi
+ popd
+
+ newinitd "${FILESDIR}"/initd-r1 ${PN}
+ newconfd "${FILESDIR}"/confd ${PN}
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/logrotate ${PN}
+
+ doman doc/man/${PN}*
+ if use fuse; then
+ doman doc/man/acngfs*
+ fi
+
+ # Documentation
+ dodoc README TODO VERSION INSTALL ChangeLog
+ if use doc; then
+ dodoc doc/*.pdf
+ dohtml doc/html/*
+ docinto examples/conf
+ dodoc conf/*
+ fi
+
+ # perl daily cron script
+ dosbin scripts/expire-caller.pl
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/cron.daily ${PN}
+
+ # default configuration
+ insinto /etc/${PN}
+ newins conf/acng.conf ${PN}.conf
+ doins $( echo conf/* | sed 's|conf/acng.conf||g' )
+
+ keepdir /var/log/${PN}
+ # Some directories must exists
+ keepdir /var/log/${PN}
+ fowners -R ${PN}:${PN} \
+ /etc/${PN} \
+ /var/log/${PN}
+}
diff --git a/net-misc/apt-cacher-ng/apt-cacher-ng-0.8.4.ebuild b/net-misc/apt-cacher-ng/apt-cacher-ng-0.8.4.ebuild
new file mode 100644
index 000000000000..0d437886948e
--- /dev/null
+++ b/net-misc/apt-cacher-ng/apt-cacher-ng-0.8.4.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils eutils toolchain-funcs user
+
+DESCRIPTION="Yet another implementation of an HTTP proxy for Debian/Ubuntu software packages written in C++"
+HOMEPAGE="
+ http://www.unix-ag.uni-kl.de/~bloch/acng/
+ http://packages.qa.debian.org/a/apt-cacher-ng.html
+"
+LICENSE="BSD-4 ZLIB public-domain"
+SLOT="0"
+SRC_URI="mirror://debian/pool/main/a/${PN}/${PN}_${PV}.orig.tar.xz"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="doc fuse systemd tcpd"
+
+COMMON_DEPEND="
+ app-arch/bzip2
+ app-arch/xz-utils
+ sys-libs/zlib
+ systemd? (
+ sys-apps/systemd
+ )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ dev-util/cmake
+ >sys-devel/gcc-4.8
+ virtual/pkgconfig
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ dev-lang/perl
+ fuse? ( sys-fs/fuse )
+ tcpd? ( sys-apps/tcp-wrappers )
+"
+
+S=${WORKDIR}/${P/_}
+
+pkg_pretend() {
+ if [[ $(gcc-major-version) = 4 ]]; then
+ if [[ $(gcc-minor-version) -lt 8 ]]; then
+ die "GCC 4.8 or greater is required but you have $(gcc-major-version).$(gcc-minor-version)"
+ fi
+ else
+ die "GCC 4.8 or greater is required but you have $(gcc-major-version).$(gcc-minor-version)"
+ fi
+}
+
+pkg_setup() {
+ # add new user & group for daemon
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_configure(){
+ mycmakeargs="-DCMAKE_INSTALL_PREFIX=/usr"
+ if use fuse; then
+ mycmakeargs="-DHAVE_FUSE_25=yes ${mycmakeargs}"
+ else
+ mycmakeargs="-DHAVE_FUSE_25=no ${mycmakeargs}"
+ fi
+ if use tcpd; then
+ mycmakeargs="-DHAVE_LIBWRAP=yes ${mycmakeargs}"
+ else
+ mycmakeargs="-DHAVE_LIBWRAP=no ${mycmakeargs}"
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ pushd ${CMAKE_BUILD_DIR}
+ dosbin ${PN}
+ if use fuse; then
+ dobin acngfs
+ fi
+ popd
+
+ newinitd "${FILESDIR}"/initd-r1 ${PN}
+ newconfd "${FILESDIR}"/confd ${PN}
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/logrotate ${PN}
+
+ doman doc/man/${PN}*
+ if use fuse; then
+ doman doc/man/acngfs*
+ fi
+
+ # Documentation
+ dodoc README TODO VERSION INSTALL ChangeLog
+ if use doc; then
+ dodoc doc/*.pdf
+ dohtml doc/html/*
+ docinto examples/conf
+ dodoc conf/*
+ fi
+
+ # perl daily cron script
+ dosbin scripts/expire-caller.pl
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/cron.daily ${PN}
+
+ # default configuration
+ insinto /etc/${PN}
+ newins conf/acng.conf ${PN}.conf
+ doins $( echo conf/* | sed 's|conf/acng.conf||g' )
+
+ keepdir /var/log/${PN}
+ # Some directories must exists
+ keepdir /var/log/${PN}
+ fowners -R ${PN}:${PN} \
+ /etc/${PN} \
+ /var/log/${PN}
+}
diff --git a/net-misc/apt-cacher-ng/apt-cacher-ng-0.8.5.ebuild b/net-misc/apt-cacher-ng/apt-cacher-ng-0.8.5.ebuild
new file mode 100644
index 000000000000..0d437886948e
--- /dev/null
+++ b/net-misc/apt-cacher-ng/apt-cacher-ng-0.8.5.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils eutils toolchain-funcs user
+
+DESCRIPTION="Yet another implementation of an HTTP proxy for Debian/Ubuntu software packages written in C++"
+HOMEPAGE="
+ http://www.unix-ag.uni-kl.de/~bloch/acng/
+ http://packages.qa.debian.org/a/apt-cacher-ng.html
+"
+LICENSE="BSD-4 ZLIB public-domain"
+SLOT="0"
+SRC_URI="mirror://debian/pool/main/a/${PN}/${PN}_${PV}.orig.tar.xz"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="doc fuse systemd tcpd"
+
+COMMON_DEPEND="
+ app-arch/bzip2
+ app-arch/xz-utils
+ sys-libs/zlib
+ systemd? (
+ sys-apps/systemd
+ )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ dev-util/cmake
+ >sys-devel/gcc-4.8
+ virtual/pkgconfig
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ dev-lang/perl
+ fuse? ( sys-fs/fuse )
+ tcpd? ( sys-apps/tcp-wrappers )
+"
+
+S=${WORKDIR}/${P/_}
+
+pkg_pretend() {
+ if [[ $(gcc-major-version) = 4 ]]; then
+ if [[ $(gcc-minor-version) -lt 8 ]]; then
+ die "GCC 4.8 or greater is required but you have $(gcc-major-version).$(gcc-minor-version)"
+ fi
+ else
+ die "GCC 4.8 or greater is required but you have $(gcc-major-version).$(gcc-minor-version)"
+ fi
+}
+
+pkg_setup() {
+ # add new user & group for daemon
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_configure(){
+ mycmakeargs="-DCMAKE_INSTALL_PREFIX=/usr"
+ if use fuse; then
+ mycmakeargs="-DHAVE_FUSE_25=yes ${mycmakeargs}"
+ else
+ mycmakeargs="-DHAVE_FUSE_25=no ${mycmakeargs}"
+ fi
+ if use tcpd; then
+ mycmakeargs="-DHAVE_LIBWRAP=yes ${mycmakeargs}"
+ else
+ mycmakeargs="-DHAVE_LIBWRAP=no ${mycmakeargs}"
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ pushd ${CMAKE_BUILD_DIR}
+ dosbin ${PN}
+ if use fuse; then
+ dobin acngfs
+ fi
+ popd
+
+ newinitd "${FILESDIR}"/initd-r1 ${PN}
+ newconfd "${FILESDIR}"/confd ${PN}
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/logrotate ${PN}
+
+ doman doc/man/${PN}*
+ if use fuse; then
+ doman doc/man/acngfs*
+ fi
+
+ # Documentation
+ dodoc README TODO VERSION INSTALL ChangeLog
+ if use doc; then
+ dodoc doc/*.pdf
+ dohtml doc/html/*
+ docinto examples/conf
+ dodoc conf/*
+ fi
+
+ # perl daily cron script
+ dosbin scripts/expire-caller.pl
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/cron.daily ${PN}
+
+ # default configuration
+ insinto /etc/${PN}
+ newins conf/acng.conf ${PN}.conf
+ doins $( echo conf/* | sed 's|conf/acng.conf||g' )
+
+ keepdir /var/log/${PN}
+ # Some directories must exists
+ keepdir /var/log/${PN}
+ fowners -R ${PN}:${PN} \
+ /etc/${PN} \
+ /var/log/${PN}
+}
diff --git a/net-misc/apt-cacher-ng/files/confd b/net-misc/apt-cacher-ng/files/confd
new file mode 100644
index 000000000000..72e76de133d1
--- /dev/null
+++ b/net-misc/apt-cacher-ng/files/confd
@@ -0,0 +1,2 @@
+# Additional options that are passed to the Daemon.
+DAEMON_OPTS=" -c /etc/apt-cacher-ng "
diff --git a/net-misc/apt-cacher-ng/files/cron.daily b/net-misc/apt-cacher-ng/files/cron.daily
new file mode 100644
index 000000000000..b5ea1436709c
--- /dev/null
+++ b/net-misc/apt-cacher-ng/files/cron.daily
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Run the expire function of apt-cacher-ng non-interactively (unless errors
+# are detected).
+
+# optional, specify hostname to appear in error messages and links
+# HOSTNAME=externallyVisibleHostName
+# export HOSTNAME
+
+# optional, specify IP address to connect to
+# ACNGIP=10.0.1.3
+# export ACNGIP
+
+if test -r /usr/sbin/expire-caller.pl ; then
+ perl /usr/sbin/expire-caller.pl || echo Check error messages in /var/log/apt-cacher-ng/maint_*.log
+fi
diff --git a/net-misc/apt-cacher-ng/files/initd b/net-misc/apt-cacher-ng/files/initd
new file mode 100644
index 000000000000..7718da4dae8c
--- /dev/null
+++ b/net-misc/apt-cacher-ng/files/initd
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+NAME="apt-cacher-ng"
+DAEMON="/usr/sbin/$NAME"
+RUNDIR="/var/run/$NAME"
+PIDFILE="$RUNDIR/$NAME.pid"
+SOCKETFILE="$RUNDIR/$NAME.socket"
+DAEMON_OPTS="$DAEMON_OPTS pidfile=$PIDFILE SocketPath=$SOCKETFILE foreground=0"
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting $NAME"
+ checkpath -d -m 0755 -o ${NAME}:${NAME} ${RUNDIR}
+ start-stop-daemon --start --exec $DAEMON \
+ --user $NAME --group $NAME \
+ --pidfile $PIDFILE \
+ -- $DAEMON_OPTS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping $NAME"
+ start-stop-daemon --stop --retry 15 --exec $DAEMON \
+ --pidfile $PIDFILE
+ rm -f $PIDFILE
+ eend $?
+}
diff --git a/net-misc/apt-cacher-ng/files/initd-r1 b/net-misc/apt-cacher-ng/files/initd-r1
new file mode 100644
index 000000000000..dfbdd04bb085
--- /dev/null
+++ b/net-misc/apt-cacher-ng/files/initd-r1
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DAEMON="/usr/sbin/${RC_SVCNAME}"
+RUNDIR="/var/run/${RC_SVCNAME}"
+CACHEDIR="var/cache/${RC_SVCNAME}"
+PIDFILE="${RUNDIR}/${RC_SVCNAME}.pid"
+SOCKETFILE="${RUNDIR}/${RC_SVCNAME}.socket"
+DAEMON_OPTS="${DAEMON_OPTS} pidfile=${PIDFILE} SocketPath=${SOCKETFILE} foreground=0"
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting ${RC_SVCNAME}"
+ checkpath -d -m 0755 -o ${RC_SVCNAME}:${RC_SVCNAME} "${RUNDIR}"
+ checkpath -d -m 0755 -o ${RC_SVCNAME}:${RC_SVCNAME} "${CACHEDIR}"
+ start-stop-daemon --start --exec ${DAEMON} \
+ --user ${RC_SVCNAME} --group ${RC_SVCNAME} \
+ --pidfile ${PIDFILE} \
+ -- ${DAEMON_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${RC_SVCNAME}"
+ start-stop-daemon --stop --retry 15 --exec ${DAEMON} \
+ --pidfile ${PIDFILE}
+ rm -f ${PIDFILE}
+ eend $?
+}
diff --git a/net-misc/apt-cacher-ng/files/logrotate b/net-misc/apt-cacher-ng/files/logrotate
new file mode 100644
index 000000000000..330f2b6b6616
--- /dev/null
+++ b/net-misc/apt-cacher-ng/files/logrotate
@@ -0,0 +1,15 @@
+/var/log/apt-cacher-ng/*.log {
+ size 10M
+ missingok
+ rotate 12
+ compress
+ delaycompress
+ notifempty
+ create
+ postrotate
+ if [ -s /var/run/apt-cacher-ng/apt-cacher-ng.pid ] ; then
+ kill -s USR1 "$(cat /var/run/apt-cacher-ng/apt-cacher-ng.pid)"
+ fi
+ endscript
+}
+
diff --git a/net-misc/apt-cacher-ng/metadata.xml b/net-misc/apt-cacher-ng/metadata.xml
new file mode 100644
index 000000000000..0322df9ead62
--- /dev/null
+++ b/net-misc/apt-cacher-ng/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>deb-tools</herd>
+<maintainer>
+<email>jer@gentoo.org</email>
+<name>Jeroen Roovers</name>
+</maintainer>
+<use>
+<flag name="fuse">Install the <pkg>sys-fs/fuse</pkg> based acngfs, to use a userspace filesystem for the apt cache.</flag>
+</use>
+</pkgmetadata>
diff --git a/net-misc/apt-proxy/Manifest b/net-misc/apt-proxy/Manifest
new file mode 100644
index 000000000000..07bac2357095
--- /dev/null
+++ b/net-misc/apt-proxy/Manifest
@@ -0,0 +1 @@
+DIST apt-proxy_1.3.0.tar.gz 37951 SHA256 12e5c5361ba3050a715f21c8191a1f52e255d179af10e3d110271651cb739ea9 SHA512 300d4684e726f0ac6ece0cf9dfe5c805f187651d36a38530cdf125f730f6c261dc1edd7ac5c0f54d6396a6aa8e3f007fa70a4c90e96bf672dfe9081c9a5b36d0 WHIRLPOOL 407a76367657baca536e5b753ea5ff01b9571d34f1b1d37d163c4586c09bd6a99168754ab22937994677e445941252374800d50258d61e4e5341a2b5865e67d4
diff --git a/net-misc/apt-proxy/apt-proxy-1.3.0.ebuild b/net-misc/apt-proxy/apt-proxy-1.3.0.ebuild
new file mode 100644
index 000000000000..dd454bee1532
--- /dev/null
+++ b/net-misc/apt-proxy/apt-proxy-1.3.0.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils user
+
+DESCRIPTION="Caching proxy for the Debian package system"
+HOMEPAGE="http://sourceforge.net/projects/apt-proxy/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="sys-apps/xinetd"
+
+pkg_setup () {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /dev/null ${PN}
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-sh.patch
+}
+
+src_install() {
+ dosbin ${PN}
+
+ insinto /etc/${PN}
+ doins ${PN}.conf
+
+ insinto /etc/xinetd.d
+ doins "${FILESDIR}"/${PN}
+
+ dodoc README INSTALL HISTORY
+ doman ${PN}.{8,conf.5}
+
+ # Create the log file with the proper permissions
+ dodir /var/log
+ touch "${D}"/var/log/${PN}.log
+ fowners ${PN}:${PN} /var/log/${PN}.log
+
+ # Create the cache directories and set the proper permissions
+ dodir /var/cache/${PN}
+ keepdir /var/cache/${PN}
+ fowners ${PN}:${PN} /var/cache/${PN}
+}
+
+pkg_postinst() {
+ einfo ""
+ einfo "Don't forget to modify the /etc/${PN}/${PN}.conf"
+ einfo "file to fit your needs..."
+ einfo ""
+ einfo "Also note that ${PN} is called from running xinetd"
+ einfo "and you have to enable it first (/etc/xinetd.d/${PN})..."
+ einfo ""
+}
+
+pkg_postrm() {
+ einfo ""
+ einfo "You have to remove the ${PN} cache by hand. It's located"
+ einfo "in the \"/var/cache/${PN}\" dir..."
+ einfo ""
+ einfo "You can also remove the ${PN} user and group..."
+ einfo ""
+}
diff --git a/net-misc/apt-proxy/files/apt-proxy b/net-misc/apt-proxy/files/apt-proxy
new file mode 100644
index 000000000000..40db15ac96e9
--- /dev/null
+++ b/net-misc/apt-proxy/files/apt-proxy
@@ -0,0 +1,17 @@
+# default: off
+# description: this is a proxy for debian packages.
+# $Id$
+
+service apt-proxy
+{
+ type = UNLISTED
+ port = 9999
+ protocol = tcp
+ socket_type = stream
+ only_from = 0.0.0.0
+ wait = no
+ user = apt-proxy
+ server = /usr/sbin/apt-proxy
+ server_args = /var/log/apt-proxy.log
+ disable = yes
+}
diff --git a/net-misc/apt-proxy/files/apt-proxy-1.3.0-sh.patch b/net-misc/apt-proxy/files/apt-proxy-1.3.0-sh.patch
new file mode 100644
index 000000000000..9f6b97625af3
--- /dev/null
+++ b/net-misc/apt-proxy/files/apt-proxy-1.3.0-sh.patch
@@ -0,0 +1,11 @@
+--- apt-proxy 2002-04-04 14:30:19.000000000 +0200
++++ apt-proxy.new 2003-03-13 00:49:48.000000000 +0100
+@@ -1,5 +1,7 @@
+-#!/bin/ash
++#!/bin/sh
+ # (You may safely change the above to /bin/sh if you do not have ash available)
++### I really modified it (was /bin/ash)
++### Radek Podgorny <radek@podgorny.cz> (for Gentoo)
+ #
+ # $Id$
+ # Copyright Paul Russell <rusty@samba.org>
diff --git a/net-misc/apt-proxy/metadata.xml b/net-misc/apt-proxy/metadata.xml
new file mode 100644
index 000000000000..f270708b4def
--- /dev/null
+++ b/net-misc/apt-proxy/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">apt-proxy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/aria2/Manifest b/net-misc/aria2/Manifest
new file mode 100644
index 000000000000..8d0df88aaeb7
--- /dev/null
+++ b/net-misc/aria2/Manifest
@@ -0,0 +1,8 @@
+DIST aria2-1.15.2.tar.bz2 2043212 SHA256 6400431f4248f7a779ae8216ec2711b56ad7481fc659f06db1f22ed97b260836 SHA512 6fc09ba1f682d13db829a3f5881a06ea0d0d2c1622511408f149cc109a12a01b19cec34caeeac10982061e9633bbb67e9ec40c23ee39a418fec6fb604af23bbe WHIRLPOOL b9544bb5359fc22dca5ba4e5328086deb0cf7d40fc69e7528ed57f14a89b30ffa6022ab7bfbe5f2fbd150b3974272286ff2f26d011bccaf5f973ccca00f2a44e
+DIST aria2-1.16.3.tar.bz2 2082238 SHA256 989f8eb5599394681d75e18acf3d4261870cc2dce70b813ce84305dc3c9e50a2 SHA512 c9d09a8f45df6e3a472709460ec42ed5db189a72652b2dbdb515b84e1acd221bffb151baf0b2036b180e07a5b6a82350327cb6dbad9268cf5eaeed9c47abe21e WHIRLPOOL 60523ce102dac5e6e4bbd1a8eecf8fcf6059aed5e8d7b01db551e64bc9244fcd75efc14a29840ffdb84b74d5809bed494fb707eba9f5189ff613f54b4d2bf6b3
+DIST aria2-1.16.5.tar.bz2 2152749 SHA256 06aee1f296b984a8aed54ac7d7bc52eb2b4315273ec555bf3b06c10214528eed SHA512 44544daad15b0f9fb63eccff855d0775bad7131f427d7ad75326cd875392a445ca36e1f1cb1a870276d554e708dd1850b20be1b4bbcf8e7fc9874478c848a754 WHIRLPOOL e49383afd04a5d7d55152cdfb9026885cea39d843b49d864d78c372559bd3706391d2748931da5b96839a92826775292c5e925e947d500653899f8eb1d9be819
+DIST aria2-1.18.0.tar.bz2 2080003 SHA256 ad811508d5153d138de2c43228c36fa046574bf2e94e108af558db7722f6513a SHA512 bb52ef1c6963db6649fbcde2110d6ba659a7f8f5851c7f5d9bdbebbdff7e68cc5e435a8a1ae32c5e78bb812d6e84caab9d14ee8cc435c24902c6499a3df1aca8 WHIRLPOOL 0e6f022719c05991033ef4651c8d58cafcd14a6a81d7e476aa168e3d52293abe148958ed00b92552d6e9a4fb7ffd10634658e6c2820c2c8654b493ea14a4e82a
+DIST aria2-1.18.5.tar.bz2 2102797 SHA256 25e21f94bb278a8624e0e4e131e740d105f7d5570290053beb8ae6c33fb9ce3f SHA512 bb08305026db77c9e58d7b059d7b68a0bfbffcbdcf2898117ed37f7e23b95675c9744de50b789658cc9cad81f40ef422f0936499ccdbeb37eaa2f7281c8adff9 WHIRLPOOL 483a75d4efb28839b85de06dc18b5ed05f3e49b91f24dde189add4ce9a5912d7587b3ba2309b2a394addf7676ed121f9707da240e5c33e8a4757341f27c6efde
+DIST aria2-1.18.7.tar.bz2 2141933 SHA256 358bda2a7b1d5aca1acc4b528f32bd01f5db819c067e7a4bbfab08d23500368f SHA512 d8b70d0235eb96289ebeb4adc4c5a917785dcd15ebae884b367b3645717bc969ded9c0f520be773fc80ed5dd112fd5937bee6cb0e8c238dc39debbf8862b25a3 WHIRLPOOL 714c2d88ef5a66e3d08970aa02dfa1a2da284042faf5e6e8ad6bb6f6706c8c4ba1d44681ef0f6c58ced052debb000cebcc0266b45226f31983bb3e3790149d7c
+DIST aria2-1.18.9.tar.bz2 2151923 SHA256 e24bca91edbe8fff52615420085317ce22faec4a0a9c34843f86dbcc2a79c4b2 SHA512 6a701f23167255a8ea135c6c9455a11d0eddf007fbcc1c3af663dd98825c0812d7db0214be963a06740e60d8b6fdae92bee5062aa4864b212b959e97ac857d74 WHIRLPOOL 0996dbbcd9828e8a977275f889e14a0e5a8fc0dc5d1a05a7550542cab27de252597389a796da98590935d02a81fdf302f9d078c8c0068af0587a2437ee01e85a
+DIST aria2-1.19.0.tar.bz2 2155310 SHA256 ae2b6fce7a0974c9156415cccf2395cd258580ab34eec2b34a8e76120b7240ce SHA512 ba505b45f84266543cb403752cc3592469545dea806e77bd7b7fec1fbe7ed5baf14372cf6dea840ccbdd054cd0c92cdeb4516eb52b167aca03909000f02aec95 WHIRLPOOL b13502f9dd646832799af6a0db199e87abae042c0e48b778f9b782d56d838c5b9d36bc04c487534f3fe1c59e970dc34702facc5508927325e34bcffa39946519
diff --git a/net-misc/aria2/aria2-1.15.2.ebuild b/net-misc/aria2/aria2-1.15.2.ebuild
new file mode 100644
index 000000000000..53100fa649b3
--- /dev/null
+++ b/net-misc/aria2/aria2-1.15.2.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit bash-completion-r1 eutils
+
+DESCRIPTION="A download utility with segmented downloading with BitTorrent support"
+HOMEPAGE="http://aria2.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 ~ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+SLOT="0"
+IUSE="adns bittorrent +gnutls +libxml2 metalink +nettle nls sqlite scripts ssl test xmlrpc"
+
+CDEPEND="sys-libs/zlib
+ ssl? (
+ gnutls? ( >=net-libs/gnutls-1.2.9 )
+ !gnutls? ( dev-libs/openssl ) )
+ adns? ( >=net-dns/c-ares-1.5.0 )
+ bittorrent? (
+ ssl? (
+ gnutls? (
+ nettle? ( >=dev-libs/nettle-2.4[gmp] >=dev-libs/gmp-5 )
+ !nettle? ( >=dev-libs/libgcrypt-1.2.2:0 ) ) )
+ !ssl? (
+ nettle? ( >=dev-libs/nettle-2.4[gmp] >=dev-libs/gmp-5 )
+ !nettle? ( >=dev-libs/libgcrypt-1.2.2:0 ) ) )
+ metalink? (
+ libxml2? ( >=dev-libs/libxml2-2.6.26 )
+ !libxml2? ( dev-libs/expat ) )
+ sqlite? ( dev-db/sqlite:3 )
+ xmlrpc? (
+ libxml2? ( >=dev-libs/libxml2-2.6.26 )
+ !libxml2? ( dev-libs/expat ) )"
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( >=dev-util/cppunit-1.12.0 )"
+RDEPEND="${CDEPEND}
+ nls? ( virtual/libiconv virtual/libintl )
+ scripts? ( dev-lang/ruby )"
+
+pkg_setup() {
+ if use scripts && use !xmlrpc && use !metalink; then
+ ewarn "Please note that you may need to enable USE=xmlrpc to run the aria2rpc"
+ ewarn "and aria2mon scripts against the local aria2."
+ fi
+}
+
+src_prepare() {
+ epatch_user
+ sed -i -e "s|/tmp|${T}|" test/*.cc test/*.txt || die "sed failed"
+}
+
+src_configure() {
+ # Notes:
+ # - always enable gzip/http compression since zlib should always be available anyway
+ # - always enable epoll since we can assume kernel 2.6.x
+ # - other options for threads: solaris, pth, win32
+ local myconf=(
+ --enable-epoll
+ --enable-threads=posix
+ --with-libz
+ $(use_enable nls)
+ $(use_enable metalink)
+ $(use_with sqlite sqlite3)
+ $(use_enable bittorrent)
+ $(use_with adns libcares)
+ )
+
+ # SSL := gnutls / openssl
+ # USE=ssl
+ # + USE=gnutls -> gnutls
+ # + USE=-gnutls -> openssl
+
+ if use ssl; then
+ myconf+=( $(use_with gnutls) $(use_with !gnutls openssl) )
+ else
+ myconf+=( --without-gnutls --without-openssl )
+ fi
+
+ # message-digest := nettle / gcrypt / openssl
+ # bignum := nettle+gmp / gcrypt / openssl
+ # bittorrent := message-digest + bignum
+ # USE=bittorrent
+ # + USE=(ssl -gnutls) -> openssl
+ # + USE=nettle -> nettle+gmp
+ # + USE=-nettle -> gcrypt
+
+ if use !bittorrent || use ssl && use !gnutls; then
+ myconf+=( --without-libgcrypt --without-libnettle --without-libgmp )
+ else
+ myconf+=( $(use_with !nettle libgcrypt)
+ $(use_with nettle libnettle) $(use_with nettle libgmp) )
+ fi
+
+ # metalink+xmlrpc := libxml2 / expat
+ # USE=(metalink || xmlrpc)
+ # + USE=libxml2 -> libxml2
+ # + USE=-libxml2 -> expat
+
+ if use metalink || use xmlrpc; then
+ myconf+=( $(use_with !libxml2 libexpat) $(use_with libxml2) )
+ else
+ myconf+=( --without-libexpat --without-libxml2 )
+ fi
+
+ # Note:
+ # - always enable gzip/http compression since zlib should always be available anyway
+ # - always enable epoll since we can assume kernel 2.6.x
+ # - other options for threads: solaris, pth, win32
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+ rm -rf "${D}"/usr/share/doc/aria2 \
+ "${D}"/usr/share/doc/${PF}/README{,.html}
+
+ dobashcomp doc/bash_completion/aria2c
+ use scripts && dobin doc/xmlrpc/aria2{mon,rpc}
+}
+
+pkg_postinst() {
+ if use xmlrpc || use metalink; then
+ elog "If you would like to use the additional aria2mon and aria2rpc tools,"
+ elog "you need to have \033[1mdev-lang/ruby\033[0m installed."
+ fi
+}
diff --git a/net-misc/aria2/aria2-1.16.3.ebuild b/net-misc/aria2/aria2-1.16.3.ebuild
new file mode 100644
index 000000000000..13d72b6e71ff
--- /dev/null
+++ b/net-misc/aria2/aria2-1.16.3.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit bash-completion-r1 eutils
+
+DESCRIPTION="A download utility with segmented downloading with BitTorrent support"
+HOMEPAGE="http://aria2.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+SLOT="0"
+IUSE="adns bittorrent +gnutls +libxml2 metalink +nettle nls sqlite scripts ssl test xmlrpc"
+
+CDEPEND="sys-libs/zlib
+ ssl? (
+ app-misc/ca-certificates
+ gnutls? ( >=net-libs/gnutls-1.2.9 )
+ !gnutls? ( dev-libs/openssl ) )
+ adns? ( >=net-dns/c-ares-1.5.0 )
+ bittorrent? (
+ ssl? (
+ gnutls? (
+ nettle? ( >=dev-libs/nettle-2.4[gmp] >=dev-libs/gmp-5 )
+ !nettle? ( >=dev-libs/libgcrypt-1.2.2:0 ) ) )
+ !ssl? (
+ nettle? ( >=dev-libs/nettle-2.4[gmp] >=dev-libs/gmp-5 )
+ !nettle? ( >=dev-libs/libgcrypt-1.2.2:0 ) ) )
+ metalink? (
+ libxml2? ( >=dev-libs/libxml2-2.6.26 )
+ !libxml2? ( dev-libs/expat ) )
+ sqlite? ( dev-db/sqlite:3 )
+ xmlrpc? (
+ libxml2? ( >=dev-libs/libxml2-2.6.26 )
+ !libxml2? ( dev-libs/expat ) )"
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( >=dev-util/cppunit-1.12.0 )"
+RDEPEND="${CDEPEND}
+ nls? ( virtual/libiconv virtual/libintl )
+ scripts? ( dev-lang/ruby )"
+
+pkg_setup() {
+ if use scripts && use !xmlrpc && use !metalink; then
+ ewarn "Please note that you may need to enable USE=xmlrpc to run the aria2rpc"
+ ewarn "and aria2mon scripts against the local aria2."
+ fi
+}
+
+src_prepare() {
+ epatch_user
+ sed -i -e "s|/tmp|${T}|" test/*.cc test/*.txt || die "sed failed"
+}
+
+src_configure() {
+ # Notes:
+ # - always enable gzip/http compression since zlib should always be available anyway
+ # - always enable epoll since we can assume kernel 2.6.x
+ # - other options for threads: solaris, pth, win32
+ local myconf=(
+ --enable-epoll
+ --enable-threads=posix
+ --with-libz
+ --with-ca-bundle="${EPREFIX}/etc/ssl/certs/ca-certificates.crt"
+ $(use_enable nls)
+ $(use_enable metalink)
+ $(use_with sqlite sqlite3)
+ $(use_enable bittorrent)
+ $(use_with adns libcares)
+ )
+
+ # SSL := gnutls / openssl
+ # USE=ssl
+ # + USE=gnutls -> gnutls
+ # + USE=-gnutls -> openssl
+
+ if use ssl; then
+ myconf+=( $(use_with gnutls) $(use_with !gnutls openssl) )
+ else
+ myconf+=( --without-gnutls --without-openssl )
+ fi
+
+ # message-digest := nettle / gcrypt / openssl
+ # bignum := nettle+gmp / gcrypt / openssl
+ # bittorrent := message-digest + bignum
+ # USE=bittorrent
+ # + USE=(ssl -gnutls) -> openssl
+ # + USE=nettle -> nettle+gmp
+ # + USE=-nettle -> gcrypt
+
+ if use !bittorrent || use ssl && use !gnutls; then
+ myconf+=( --without-libgcrypt --without-libnettle --without-libgmp )
+ else
+ myconf+=( $(use_with !nettle libgcrypt)
+ $(use_with nettle libnettle) $(use_with nettle libgmp) )
+ fi
+
+ # metalink+xmlrpc := libxml2 / expat
+ # USE=(metalink || xmlrpc)
+ # + USE=libxml2 -> libxml2
+ # + USE=-libxml2 -> expat
+
+ if use metalink || use xmlrpc; then
+ myconf+=( $(use_with !libxml2 libexpat) $(use_with libxml2) )
+ else
+ myconf+=( --without-libexpat --without-libxml2 )
+ fi
+
+ # Note:
+ # - always enable gzip/http compression since zlib should always be available anyway
+ # - always enable epoll since we can assume kernel 2.6.x
+ # - other options for threads: solaris, pth, win32
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+ rm -rf "${D}"/usr/share/doc/aria2 \
+ "${D}"/usr/share/doc/${PF}/README{,.html}
+
+ dobashcomp doc/bash_completion/aria2c
+ use scripts && dobin doc/xmlrpc/aria2{mon,rpc}
+}
+
+pkg_postinst() {
+ if use xmlrpc || use metalink; then
+ elog "If you would like to use the additional aria2mon and aria2rpc tools,"
+ elog "you need to have \033[1mdev-lang/ruby\033[0m installed."
+ fi
+}
diff --git a/net-misc/aria2/aria2-1.16.5.ebuild b/net-misc/aria2/aria2-1.16.5.ebuild
new file mode 100644
index 000000000000..4f3360c6573c
--- /dev/null
+++ b/net-misc/aria2/aria2-1.16.5.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit bash-completion-r1 eutils
+
+DESCRIPTION="A download utility with segmented downloading with BitTorrent support"
+HOMEPAGE="http://aria2.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+SLOT="0"
+IUSE="adns bittorrent +gnutls +libxml2 metalink +nettle nls sqlite scripts ssl test xmlrpc"
+
+CDEPEND="sys-libs/zlib
+ ssl? (
+ app-misc/ca-certificates
+ gnutls? ( >=net-libs/gnutls-1.2.9 )
+ !gnutls? ( dev-libs/openssl ) )
+ adns? ( >=net-dns/c-ares-1.5.0 )
+ bittorrent? (
+ ssl? (
+ gnutls? (
+ nettle? ( >=dev-libs/nettle-2.4[gmp] >=dev-libs/gmp-5 )
+ !nettle? ( >=dev-libs/libgcrypt-1.2.2:0 ) ) )
+ !ssl? (
+ nettle? ( >=dev-libs/nettle-2.4[gmp] >=dev-libs/gmp-5 )
+ !nettle? ( >=dev-libs/libgcrypt-1.2.2:0 ) ) )
+ metalink? (
+ libxml2? ( >=dev-libs/libxml2-2.6.26 )
+ !libxml2? ( dev-libs/expat ) )
+ sqlite? ( dev-db/sqlite:3 )
+ xmlrpc? (
+ libxml2? ( >=dev-libs/libxml2-2.6.26 )
+ !libxml2? ( dev-libs/expat ) )"
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( >=dev-util/cppunit-1.12.0 )"
+RDEPEND="${CDEPEND}
+ nls? ( virtual/libiconv virtual/libintl )
+ scripts? ( dev-lang/ruby )"
+
+pkg_setup() {
+ if use scripts && use !xmlrpc && use !metalink; then
+ ewarn "Please note that you may need to enable USE=xmlrpc to run the aria2rpc"
+ ewarn "and aria2mon scripts against the local aria2."
+ fi
+}
+
+src_prepare() {
+ epatch_user
+ sed -i -e "s|/tmp|${T}|" test/*.cc test/*.txt || die "sed failed"
+}
+
+src_configure() {
+ local myconf=(
+ # threads, epoll: check for best portability
+
+ # do not try to compile and run a test LIBXML program
+ --disable-xmltest
+ # zlib should always be available anyway
+ --with-libz
+ --with-ca-bundle="${EPREFIX}/etc/ssl/certs/ca-certificates.crt"
+
+ # optional features
+ $(use_enable bittorrent)
+ $(use_enable metalink)
+ $(use_enable nls)
+ $(use_with sqlite sqlite3)
+ $(use_with adns libcares)
+ )
+
+ # SSL := gnutls / openssl
+ # USE=ssl
+ # + USE=gnutls -> gnutls
+ # + USE=-gnutls -> openssl
+
+ if use ssl; then
+ myconf+=( $(use_with gnutls) $(use_with !gnutls openssl) )
+ else
+ myconf+=( --without-gnutls --without-openssl )
+ fi
+
+ # message-digest := nettle / gcrypt / openssl
+ # bignum := nettle+gmp / gcrypt / openssl
+ # bittorrent := message-digest + bignum
+ # USE=bittorrent
+ # + USE=(ssl -gnutls) -> openssl
+ # + USE=nettle -> nettle+gmp
+ # + USE=-nettle -> gcrypt
+
+ if use !bittorrent || use ssl && use !gnutls; then
+ myconf+=( --without-libgcrypt --without-libnettle --without-libgmp )
+ else
+ myconf+=( $(use_with !nettle libgcrypt)
+ $(use_with nettle libnettle) $(use_with nettle libgmp) )
+ fi
+
+ # metalink+xmlrpc := libxml2 / expat
+ # USE=(metalink || xmlrpc)
+ # + USE=libxml2 -> libxml2
+ # + USE=-libxml2 -> expat
+
+ if use metalink || use xmlrpc; then
+ myconf+=( $(use_with !libxml2 libexpat) $(use_with libxml2) )
+ else
+ myconf+=( --without-libexpat --without-libxml2 )
+ fi
+
+ # Note:
+ # - always enable gzip/http compression since zlib should always be available anyway
+ # - always enable epoll since we can assume kernel 2.6.x
+ # - other options for threads: solaris, pth, win32
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+ rm -rf "${D}"/usr/share/doc/aria2 \
+ "${D}"/usr/share/doc/${PF}/README{,.html}
+
+ dobashcomp doc/bash_completion/aria2c
+ use scripts && dobin doc/xmlrpc/aria2{mon,rpc}
+}
+
+pkg_postinst() {
+ if use xmlrpc || use metalink; then
+ elog "If you would like to use the additional aria2mon and aria2rpc tools,"
+ elog "you need to have \033[1mdev-lang/ruby\033[0m installed."
+ fi
+}
diff --git a/net-misc/aria2/aria2-1.18.0.ebuild b/net-misc/aria2/aria2-1.18.0.ebuild
new file mode 100644
index 000000000000..8f9dd49635b3
--- /dev/null
+++ b/net-misc/aria2/aria2-1.18.0.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit bash-completion-r1 eutils
+
+DESCRIPTION="A download utility with segmented downloading with BitTorrent support"
+HOMEPAGE="http://aria2.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="adns bittorrent +gnutls libuv +libxml2 metalink +nettle nls sqlite scripts ssl test xmlrpc"
+
+CDEPEND="sys-libs/zlib:0=
+ ssl? (
+ app-misc/ca-certificates
+ gnutls? ( >=net-libs/gnutls-1.2.9:0= )
+ !gnutls? ( dev-libs/openssl:0= ) )
+ adns? ( >=net-dns/c-ares-1.5.0:0= )
+ bittorrent? (
+ ssl? (
+ gnutls? (
+ nettle? ( >=dev-libs/nettle-2.4:0=[gmp] >=dev-libs/gmp-5:0= )
+ !nettle? ( >=dev-libs/libgcrypt-1.2.2:0= ) ) )
+ !ssl? (
+ nettle? ( >=dev-libs/nettle-2.4:0=[gmp] >=dev-libs/gmp-5:0= )
+ !nettle? ( >=dev-libs/libgcrypt-1.2.2:0= ) ) )
+ libuv? ( dev-libs/libuv:0= )
+ metalink? (
+ libxml2? ( >=dev-libs/libxml2-2.6.26:2= )
+ !libxml2? ( dev-libs/expat:0= ) )
+ sqlite? ( dev-db/sqlite:3= )
+ xmlrpc? (
+ libxml2? ( >=dev-libs/libxml2-2.6.26:2= )
+ !libxml2? ( dev-libs/expat:0= ) )"
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( >=dev-util/cppunit-1.12.0:0 )"
+RDEPEND="${CDEPEND}
+ nls? ( virtual/libiconv virtual/libintl )
+ scripts? ( dev-lang/ruby )"
+
+pkg_setup() {
+ if use scripts && use !xmlrpc && use !metalink; then
+ ewarn "Please note that you may need to enable USE=xmlrpc to run the aria2rpc"
+ ewarn "and aria2mon scripts against the local aria2."
+ fi
+}
+
+src_prepare() {
+ epatch_user
+ sed -i -e "s|/tmp|${T}|" test/*.cc test/*.txt || die "sed failed"
+}
+
+src_configure() {
+ local myconf=(
+ # threads, epoll: check for best portability
+
+ # do not try to compile and run a test LIBXML program
+ --disable-xmltest
+ # enable the shared library
+ --enable-libaria2
+ # zlib should always be available anyway
+ --with-libz
+ --with-ca-bundle="${EPREFIX}/etc/ssl/certs/ca-certificates.crt"
+
+ # optional features
+ $(use_enable bittorrent)
+ $(use_enable metalink)
+ $(use_enable nls)
+ $(use_with sqlite sqlite3)
+ $(use_with adns libcares)
+ $(use_with libuv)
+ )
+
+ # SSL := gnutls / openssl
+ # USE=ssl
+ # + USE=gnutls -> gnutls
+ # + USE=-gnutls -> openssl
+
+ if use ssl; then
+ myconf+=( $(use_with gnutls) $(use_with !gnutls openssl) )
+ else
+ myconf+=( --without-gnutls --without-openssl )
+ fi
+
+ # message-digest := nettle / gcrypt / openssl
+ # bignum := nettle+gmp / gcrypt / openssl
+ # bittorrent := message-digest + bignum
+ # USE=bittorrent
+ # + USE=(ssl -gnutls) -> openssl
+ # + USE=nettle -> nettle+gmp
+ # + USE=-nettle -> gcrypt
+
+ if use !bittorrent || use ssl && use !gnutls; then
+ myconf+=( --without-libgcrypt --without-libnettle --without-libgmp )
+ else
+ myconf+=( $(use_with !nettle libgcrypt)
+ $(use_with nettle libnettle) $(use_with nettle libgmp) )
+ fi
+
+ # metalink+xmlrpc := libxml2 / expat
+ # USE=(metalink || xmlrpc)
+ # + USE=libxml2 -> libxml2
+ # + USE=-libxml2 -> expat
+
+ if use metalink || use xmlrpc; then
+ myconf+=( $(use_with !libxml2 libexpat) $(use_with libxml2) )
+ else
+ myconf+=( --without-libexpat --without-libxml2 )
+ fi
+
+ # Note:
+ # - always enable gzip/http compression since zlib should always be available anyway
+ # - always enable epoll since we can assume kernel 2.6.x
+ # - other options for threads: solaris, pth, win32
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+ rm -rf "${D}"/usr/share/doc/aria2 \
+ "${D}"/usr/share/doc/${PF}/README{,.html}
+
+ dobashcomp doc/bash_completion/aria2c
+ use scripts && dobin doc/xmlrpc/aria2{mon,rpc}
+}
+
+pkg_postinst() {
+ if use xmlrpc || use metalink; then
+ elog "If you would like to use the additional aria2mon and aria2rpc tools,"
+ elog "you need to have \033[1mdev-lang/ruby\033[0m installed."
+ fi
+}
diff --git a/net-misc/aria2/aria2-1.18.5.ebuild b/net-misc/aria2/aria2-1.18.5.ebuild
new file mode 100644
index 000000000000..391a622df328
--- /dev/null
+++ b/net-misc/aria2/aria2-1.18.5.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit bash-completion-r1 eutils
+
+DESCRIPTION="A download utility with segmented downloading with BitTorrent support"
+HOMEPAGE="http://aria2.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="adns bittorrent +gnutls jemalloc libuv +libxml2 metalink +nettle nls sqlite scripts ssl tcmalloc test xmlrpc"
+
+CDEPEND="sys-libs/zlib:0=
+ ssl? (
+ app-misc/ca-certificates
+ gnutls? ( >=net-libs/gnutls-1.2.9:0= )
+ !gnutls? ( dev-libs/openssl:0= ) )
+ adns? ( >=net-dns/c-ares-1.5.0:0= )
+ bittorrent? (
+ ssl? (
+ gnutls? (
+ nettle? ( >=dev-libs/nettle-2.4:0=[gmp] >=dev-libs/gmp-5:0= )
+ !nettle? ( >=dev-libs/libgcrypt-1.2.2:0= ) ) )
+ !ssl? (
+ nettle? ( >=dev-libs/nettle-2.4:0=[gmp] >=dev-libs/gmp-5:0= )
+ !nettle? ( >=dev-libs/libgcrypt-1.2.2:0= ) ) )
+ jemalloc? ( dev-libs/jemalloc )
+ libuv? ( dev-libs/libuv:0= )
+ metalink? (
+ libxml2? ( >=dev-libs/libxml2-2.6.26:2= )
+ !libxml2? ( dev-libs/expat:0= ) )
+ sqlite? ( dev-db/sqlite:3= )
+ tcmalloc? ( dev-util/google-perftools )
+ xmlrpc? (
+ libxml2? ( >=dev-libs/libxml2-2.6.26:2= )
+ !libxml2? ( dev-libs/expat:0= ) )"
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( >=dev-util/cppunit-1.12.0:0 )"
+RDEPEND="${CDEPEND}
+ nls? ( virtual/libiconv virtual/libintl )
+ scripts? ( dev-lang/ruby )"
+
+REQUIRED_USE="jemalloc? ( !tcmalloc )
+ tcmalloc? ( !jemalloc )"
+
+pkg_setup() {
+ if use scripts && use !xmlrpc && use !metalink; then
+ ewarn "Please note that you may need to enable USE=xmlrpc to run the aria2rpc"
+ ewarn "and aria2mon scripts against the local aria2."
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-fix-gnutls-2.x-compatibility.patch"
+ epatch_user
+ sed -i -e "s|/tmp|${T}|" test/*.cc test/*.txt || die "sed failed"
+}
+
+src_configure() {
+ local myconf=(
+ # threads, epoll: check for best portability
+
+ # do not try to compile and run a test LIBXML program
+ --disable-xmltest
+ # enable the shared library
+ --enable-libaria2
+ # zlib should always be available anyway
+ --with-libz
+ --with-ca-bundle="${EPREFIX}/etc/ssl/certs/ca-certificates.crt"
+
+ # optional features
+ $(use_enable bittorrent)
+ $(use_enable metalink)
+ $(use_enable nls)
+ $(use_with sqlite sqlite3)
+ $(use_with adns libcares)
+ $(use_with libuv)
+ $(use_with jemalloc)
+ $(use_with tcmalloc)
+ )
+
+ # SSL := gnutls / openssl
+ # USE=ssl
+ # + USE=gnutls -> gnutls
+ # + USE=-gnutls -> openssl
+
+ if use ssl; then
+ myconf+=( $(use_with gnutls) $(use_with !gnutls openssl) )
+ else
+ myconf+=( --without-gnutls --without-openssl )
+ fi
+
+ # message-digest := nettle / gcrypt / openssl
+ # bignum := nettle+gmp / gcrypt / openssl
+ # bittorrent := message-digest + bignum
+ # USE=bittorrent
+ # + USE=(ssl -gnutls) -> openssl
+ # + USE=nettle -> nettle+gmp
+ # + USE=-nettle -> gcrypt
+
+ if use !bittorrent || use ssl && use !gnutls; then
+ myconf+=( --without-libgcrypt --without-libnettle --without-libgmp )
+ else
+ myconf+=( $(use_with !nettle libgcrypt)
+ $(use_with nettle libnettle) $(use_with nettle libgmp) )
+ fi
+
+ # metalink+xmlrpc := libxml2 / expat
+ # USE=(metalink || xmlrpc)
+ # + USE=libxml2 -> libxml2
+ # + USE=-libxml2 -> expat
+
+ if use metalink || use xmlrpc; then
+ myconf+=( $(use_with !libxml2 libexpat) $(use_with libxml2) )
+ else
+ myconf+=( --without-libexpat --without-libxml2 )
+ fi
+
+ # Note:
+ # - always enable gzip/http compression since zlib should always be available anyway
+ # - always enable epoll since we can assume kernel 2.6.x
+ # - other options for threads: solaris, pth, win32
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+ rm -rf "${D}"/usr/share/doc/aria2 \
+ "${D}"/usr/share/doc/${PF}/README{,.html}
+
+ dobashcomp doc/bash_completion/aria2c
+ use scripts && dobin doc/xmlrpc/aria2{mon,rpc}
+}
+
+pkg_postinst() {
+ if use xmlrpc || use metalink; then
+ elog "If you would like to use the additional aria2mon and aria2rpc tools,"
+ elog "you need to have \033[1mdev-lang/ruby\033[0m installed."
+ fi
+}
diff --git a/net-misc/aria2/aria2-1.18.7.ebuild b/net-misc/aria2/aria2-1.18.7.ebuild
new file mode 100644
index 000000000000..897ac32f32bd
--- /dev/null
+++ b/net-misc/aria2/aria2-1.18.7.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit bash-completion-r1 eutils
+
+DESCRIPTION="A download utility with segmented downloading with BitTorrent support"
+HOMEPAGE="http://aria2.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="adns bittorrent +gnutls jemalloc libuv +libxml2 metalink +nettle nls sqlite scripts ssl tcmalloc test xmlrpc"
+
+CDEPEND="sys-libs/zlib:0=
+ ssl? (
+ app-misc/ca-certificates
+ gnutls? ( >=net-libs/gnutls-1.2.9:0= )
+ !gnutls? ( dev-libs/openssl:0= ) )
+ adns? ( >=net-dns/c-ares-1.5.0:0= )
+ bittorrent? (
+ ssl? (
+ gnutls? (
+ nettle? ( >=dev-libs/nettle-2.4:0=[gmp] >=dev-libs/gmp-5:0= )
+ !nettle? ( >=dev-libs/libgcrypt-1.2.2:0= ) ) )
+ !ssl? (
+ nettle? ( >=dev-libs/nettle-2.4:0=[gmp] >=dev-libs/gmp-5:0= )
+ !nettle? ( >=dev-libs/libgcrypt-1.2.2:0= ) ) )
+ jemalloc? ( dev-libs/jemalloc )
+ libuv? ( dev-libs/libuv:0= )
+ metalink? (
+ libxml2? ( >=dev-libs/libxml2-2.6.26:2= )
+ !libxml2? ( dev-libs/expat:0= ) )
+ sqlite? ( dev-db/sqlite:3= )
+ tcmalloc? ( dev-util/google-perftools )
+ xmlrpc? (
+ libxml2? ( >=dev-libs/libxml2-2.6.26:2= )
+ !libxml2? ( dev-libs/expat:0= ) )"
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( >=dev-util/cppunit-1.12.0:0 )"
+RDEPEND="${CDEPEND}
+ nls? ( virtual/libiconv virtual/libintl )
+ scripts? ( dev-lang/ruby )"
+
+REQUIRED_USE="jemalloc? ( !tcmalloc )
+ tcmalloc? ( !jemalloc )"
+
+pkg_setup() {
+ if use scripts && use !xmlrpc && use !metalink; then
+ ewarn "Please note that you may need to enable USE=xmlrpc to run the aria2rpc"
+ ewarn "and aria2mon scripts against the local aria2."
+ fi
+}
+
+src_prepare() {
+ epatch_user
+ sed -i -e "s|/tmp|${T}|" test/*.cc test/*.txt || die "sed failed"
+}
+
+src_configure() {
+ local myconf=(
+ # threads, epoll: check for best portability
+
+ # do not try to compile and run a test LIBXML program
+ --disable-xmltest
+ # enable the shared library
+ --enable-libaria2
+ # zlib should always be available anyway
+ --with-libz
+ --with-ca-bundle="${EPREFIX}/etc/ssl/certs/ca-certificates.crt"
+
+ # optional features
+ $(use_enable bittorrent)
+ $(use_enable metalink)
+ $(use_enable nls)
+ $(use_with sqlite sqlite3)
+ $(use_with adns libcares)
+ $(use_with libuv)
+ $(use_with jemalloc)
+ $(use_with tcmalloc)
+ )
+
+ # SSL := gnutls / openssl
+ # USE=ssl
+ # + USE=gnutls -> gnutls
+ # + USE=-gnutls -> openssl
+
+ if use ssl; then
+ myconf+=( $(use_with gnutls) $(use_with !gnutls openssl) )
+ else
+ myconf+=( --without-gnutls --without-openssl )
+ fi
+
+ # message-digest := nettle / gcrypt / openssl
+ # bignum := nettle+gmp / gcrypt / openssl
+ # bittorrent := message-digest + bignum
+ # USE=bittorrent
+ # + USE=(ssl -gnutls) -> openssl
+ # + USE=nettle -> nettle+gmp
+ # + USE=-nettle -> gcrypt
+
+ if use !bittorrent || use ssl && use !gnutls; then
+ myconf+=( --without-libgcrypt --without-libnettle --without-libgmp )
+ else
+ myconf+=( $(use_with !nettle libgcrypt)
+ $(use_with nettle libnettle) $(use_with nettle libgmp) )
+ fi
+
+ # metalink+xmlrpc := libxml2 / expat
+ # USE=(metalink || xmlrpc)
+ # + USE=libxml2 -> libxml2
+ # + USE=-libxml2 -> expat
+
+ if use metalink || use xmlrpc; then
+ myconf+=( $(use_with !libxml2 libexpat) $(use_with libxml2) )
+ else
+ myconf+=( --without-libexpat --without-libxml2 )
+ fi
+
+ # Note:
+ # - always enable gzip/http compression since zlib should always be available anyway
+ # - always enable epoll since we can assume kernel 2.6.x
+ # - other options for threads: solaris, pth, win32
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+ rm -rf "${D}"/usr/share/doc/aria2 \
+ "${D}"/usr/share/doc/${PF}/README{,.html}
+
+ dobashcomp doc/bash_completion/aria2c
+ use scripts && dobin doc/xmlrpc/aria2{mon,rpc}
+}
+
+pkg_postinst() {
+ if use xmlrpc || use metalink; then
+ elog "If you would like to use the additional aria2mon and aria2rpc tools,"
+ elog "you need to have \033[1mdev-lang/ruby\033[0m installed."
+ fi
+}
diff --git a/net-misc/aria2/aria2-1.18.9.ebuild b/net-misc/aria2/aria2-1.18.9.ebuild
new file mode 100644
index 000000000000..493e87fce7d3
--- /dev/null
+++ b/net-misc/aria2/aria2-1.18.9.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit bash-completion-r1 eutils
+
+DESCRIPTION="A download utility with segmented downloading with BitTorrent support"
+HOMEPAGE="http://aria2.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="adns bittorrent +gnutls jemalloc libuv +libxml2 metalink +nettle nls sqlite scripts ssl tcmalloc test xmlrpc"
+
+CDEPEND="sys-libs/zlib:0=
+ ssl? (
+ app-misc/ca-certificates
+ gnutls? ( >=net-libs/gnutls-1.2.9:0= )
+ !gnutls? ( dev-libs/openssl:0= ) )
+ adns? ( >=net-dns/c-ares-1.5.0:0= )
+ bittorrent? (
+ ssl? (
+ gnutls? (
+ nettle? ( >=dev-libs/nettle-2.4:0=[gmp] >=dev-libs/gmp-5:0= )
+ !nettle? ( >=dev-libs/libgcrypt-1.2.2:0= ) ) )
+ !ssl? (
+ nettle? ( >=dev-libs/nettle-2.4:0=[gmp] >=dev-libs/gmp-5:0= )
+ !nettle? ( >=dev-libs/libgcrypt-1.2.2:0= ) ) )
+ jemalloc? ( dev-libs/jemalloc )
+ libuv? ( dev-libs/libuv:0= )
+ metalink? (
+ libxml2? ( >=dev-libs/libxml2-2.6.26:2= )
+ !libxml2? ( dev-libs/expat:0= ) )
+ sqlite? ( dev-db/sqlite:3= )
+ tcmalloc? ( dev-util/google-perftools )
+ xmlrpc? (
+ libxml2? ( >=dev-libs/libxml2-2.6.26:2= )
+ !libxml2? ( dev-libs/expat:0= ) )"
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( >=dev-util/cppunit-1.12.0:0 )"
+RDEPEND="${CDEPEND}
+ nls? ( virtual/libiconv virtual/libintl )
+ scripts? ( dev-lang/ruby )"
+
+REQUIRED_USE="jemalloc? ( !tcmalloc )
+ tcmalloc? ( !jemalloc )"
+
+pkg_setup() {
+ if use scripts && use !xmlrpc && use !metalink; then
+ ewarn "Please note that you may need to enable USE=xmlrpc to run the aria2rpc"
+ ewarn "and aria2mon scripts against the local aria2."
+ fi
+}
+
+src_prepare() {
+ epatch_user
+ sed -i -e "s|/tmp|${T}|" test/*.cc test/*.txt || die "sed failed"
+}
+
+src_configure() {
+ local myconf=(
+ # threads, epoll: check for best portability
+
+ # do not try to compile and run a test LIBXML program
+ --disable-xmltest
+ # enable the shared library
+ --enable-libaria2
+ # zlib should always be available anyway
+ --with-libz
+ --with-ca-bundle="${EPREFIX}/etc/ssl/certs/ca-certificates.crt"
+
+ # optional features
+ $(use_enable bittorrent)
+ $(use_enable metalink)
+ $(use_enable nls)
+ $(use_with sqlite sqlite3)
+ $(use_with adns libcares)
+ $(use_with libuv)
+ $(use_with jemalloc)
+ $(use_with tcmalloc)
+ )
+
+ # SSL := gnutls / openssl
+ # USE=ssl
+ # + USE=gnutls -> gnutls
+ # + USE=-gnutls -> openssl
+
+ if use ssl; then
+ myconf+=( $(use_with gnutls) $(use_with !gnutls openssl) )
+ else
+ myconf+=( --without-gnutls --without-openssl )
+ fi
+
+ # message-digest := nettle / gcrypt / openssl
+ # bignum := nettle+gmp / gcrypt / openssl
+ # bittorrent := message-digest + bignum
+ # USE=bittorrent
+ # + USE=(ssl -gnutls) -> openssl
+ # + USE=nettle -> nettle+gmp
+ # + USE=-nettle -> gcrypt
+
+ if use !bittorrent || use ssl && use !gnutls; then
+ myconf+=( --without-libgcrypt --without-libnettle --without-libgmp )
+ else
+ myconf+=( $(use_with !nettle libgcrypt)
+ $(use_with nettle libnettle) $(use_with nettle libgmp) )
+ fi
+
+ # metalink+xmlrpc := libxml2 / expat
+ # USE=(metalink || xmlrpc)
+ # + USE=libxml2 -> libxml2
+ # + USE=-libxml2 -> expat
+
+ if use metalink || use xmlrpc; then
+ myconf+=( $(use_with !libxml2 libexpat) $(use_with libxml2) )
+ else
+ myconf+=( --without-libexpat --without-libxml2 )
+ fi
+
+ # Note:
+ # - always enable gzip/http compression since zlib should always be available anyway
+ # - always enable epoll since we can assume kernel 2.6.x
+ # - other options for threads: solaris, pth, win32
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+ rm -rf "${D}"/usr/share/doc/aria2 \
+ "${D}"/usr/share/doc/${PF}/README{,.html}
+
+ dobashcomp doc/bash_completion/aria2c
+ use scripts && dobin doc/xmlrpc/aria2{mon,rpc}
+}
+
+pkg_postinst() {
+ if use xmlrpc || use metalink; then
+ elog "If you would like to use the additional aria2mon and aria2rpc tools,"
+ elog "you need to have \033[1mdev-lang/ruby\033[0m installed."
+ fi
+}
diff --git a/net-misc/aria2/aria2-1.19.0.ebuild b/net-misc/aria2/aria2-1.19.0.ebuild
new file mode 100644
index 000000000000..367eb2bfcfda
--- /dev/null
+++ b/net-misc/aria2/aria2-1.19.0.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit bash-completion-r1 eutils
+
+DESCRIPTION="A download utility with segmented downloading with BitTorrent support"
+HOMEPAGE="http://aria2.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="adns bittorrent +gnutls jemalloc libuv +libxml2 metalink +nettle nls sqlite scripts ssh ssl tcmalloc test xmlrpc"
+
+CDEPEND="sys-libs/zlib:0=
+ ssl? (
+ app-misc/ca-certificates
+ gnutls? ( >=net-libs/gnutls-1.2.9:0= )
+ !gnutls? ( dev-libs/openssl:0= ) )
+ adns? ( >=net-dns/c-ares-1.5.0:0= )
+ bittorrent? (
+ ssl? (
+ gnutls? (
+ nettle? ( >=dev-libs/nettle-2.4:0=[gmp] >=dev-libs/gmp-5:0= )
+ !nettle? ( >=dev-libs/libgcrypt-1.2.2:0= ) ) )
+ !ssl? (
+ nettle? ( >=dev-libs/nettle-2.4:0=[gmp] >=dev-libs/gmp-5:0= )
+ !nettle? ( >=dev-libs/libgcrypt-1.2.2:0= ) ) )
+ jemalloc? ( dev-libs/jemalloc )
+ libuv? ( dev-libs/libuv:0= )
+ metalink? (
+ libxml2? ( >=dev-libs/libxml2-2.6.26:2= )
+ !libxml2? ( dev-libs/expat:0= ) )
+ sqlite? ( dev-db/sqlite:3= )
+ ssh? ( net-libs/libssh2:= )
+ tcmalloc? ( dev-util/google-perftools )
+ xmlrpc? (
+ libxml2? ( >=dev-libs/libxml2-2.6.26:2= )
+ !libxml2? ( dev-libs/expat:0= ) )"
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( >=dev-util/cppunit-1.12.0:0 )"
+RDEPEND="${CDEPEND}
+ nls? ( virtual/libiconv virtual/libintl )
+ scripts? ( dev-lang/ruby )"
+
+REQUIRED_USE="jemalloc? ( !tcmalloc )
+ tcmalloc? ( !jemalloc )"
+
+pkg_setup() {
+ if use scripts && use !xmlrpc && use !metalink; then
+ ewarn "Please note that you may need to enable USE=xmlrpc to run the aria2rpc"
+ ewarn "and aria2mon scripts against the local aria2."
+ fi
+}
+
+src_prepare() {
+ epatch_user
+ sed -i -e "s|/tmp|${T}|" test/*.cc test/*.txt || die "sed failed"
+}
+
+src_configure() {
+ local myconf=(
+ # threads, epoll: check for best portability
+
+ # do not try to compile and run a test LIBXML program
+ --disable-xmltest
+ # enable the shared library
+ --enable-libaria2
+ # zlib should always be available anyway
+ --with-libz
+ --with-ca-bundle="${EPREFIX}/etc/ssl/certs/ca-certificates.crt"
+
+ # optional features
+ $(use_enable bittorrent)
+ $(use_enable metalink)
+ $(use_enable nls)
+ $(use_with sqlite sqlite3)
+ $(use_with adns libcares)
+ $(use_with libuv)
+ $(use_with jemalloc)
+ $(use_with tcmalloc)
+ )
+
+ # SSL := gnutls / openssl
+ # USE=ssl
+ # + USE=gnutls -> gnutls
+ # + USE=-gnutls -> openssl
+
+ if use ssl; then
+ myconf+=( $(use_with gnutls) $(use_with !gnutls openssl) )
+ else
+ myconf+=( --without-gnutls --without-openssl )
+ fi
+
+ # message-digest := nettle / gcrypt / openssl
+ # bignum := nettle+gmp / gcrypt / openssl
+ # bittorrent := message-digest + bignum
+ # USE=bittorrent
+ # + USE=(ssl -gnutls) -> openssl
+ # + USE=nettle -> nettle+gmp
+ # + USE=-nettle -> gcrypt
+
+ if use !bittorrent || use ssl && use !gnutls; then
+ myconf+=( --without-libgcrypt --without-libnettle --without-libgmp )
+ else
+ myconf+=( $(use_with !nettle libgcrypt)
+ $(use_with nettle libnettle) $(use_with nettle libgmp) )
+ fi
+
+ # metalink+xmlrpc := libxml2 / expat
+ # USE=(metalink || xmlrpc)
+ # + USE=libxml2 -> libxml2
+ # + USE=-libxml2 -> expat
+
+ if use metalink || use xmlrpc; then
+ myconf+=( $(use_with !libxml2 libexpat) $(use_with libxml2) )
+ else
+ myconf+=( --without-libexpat --without-libxml2 )
+ fi
+
+ # Note:
+ # - always enable gzip/http compression since zlib should always be available anyway
+ # - always enable epoll since we can assume kernel 2.6.x
+ # - other options for threads: solaris, pth, win32
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+ rm -rf "${D}"/usr/share/doc/aria2 \
+ "${D}"/usr/share/doc/${PF}/README{,.html}
+
+ dobashcomp doc/bash_completion/aria2c
+ use scripts && dobin doc/xmlrpc/aria2{mon,rpc}
+}
+
+pkg_postinst() {
+ if use xmlrpc || use metalink; then
+ elog "If you would like to use the additional aria2mon and aria2rpc tools,"
+ elog "you need to have \033[1mdev-lang/ruby\033[0m installed."
+ fi
+}
diff --git a/net-misc/aria2/files/aria2-1.18.5-fix-gnutls-2.x-compatibility.patch b/net-misc/aria2/files/aria2-1.18.5-fix-gnutls-2.x-compatibility.patch
new file mode 100644
index 000000000000..2c3628c3473f
--- /dev/null
+++ b/net-misc/aria2/files/aria2-1.18.5-fix-gnutls-2.x-compatibility.patch
@@ -0,0 +1,37 @@
+From 13a202df070dd58bb930549c62627dcd97b02b86 Mon Sep 17 00:00:00 2001
+From: Nils Maier <maierman@web.de>
+Date: Sat, 12 Apr 2014 02:51:21 +0200
+Subject: [PATCH] Fix GnuTLS 2.x compatiblity
+
+Closes GH-216
+---
+ src/LibgnutlsTLSSession.cc | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/LibgnutlsTLSSession.cc b/src/LibgnutlsTLSSession.cc
+index 61c4550..94abf6f 100644
+--- a/src/LibgnutlsTLSSession.cc
++++ b/src/LibgnutlsTLSSession.cc
+@@ -75,6 +75,7 @@ GnuTLSSession::~GnuTLSSession()
+
+ int GnuTLSSession::init(sock_t sockfd)
+ {
++#if GNUTLS_VERSION_NUMBER >= 0x030000
+ unsigned int flags = tlsContext_->getSide() == TLS_CLIENT ?
+ GNUTLS_CLIENT : GNUTLS_SERVER;
+ #ifdef A2_DISABLE_OCSP
+@@ -84,6 +85,11 @@ int GnuTLSSession::init(sock_t sockfd)
+ #endif // A2_DISABLE_OCSP
+
+ rv_ = gnutls_init(&sslSession_, flags);
++#else // GNUTLS_VERSION_NUMBER >= 0x030000
++ rv_ = gnutls_init(
++ &sslSession_,
++ tlsContext_->getSide() == TLS_CLIENT ? GNUTLS_CLIENT : GNUTLS_SERVER);
++#endif // GNUTLS_VERSION_NUMBER >= 0x030000
+ if(rv_ != GNUTLS_E_SUCCESS) {
+ return TLS_ERR_ERROR;
+ }
+--
+1.9.3
+
diff --git a/net-misc/aria2/metadata.xml b/net-misc/aria2/metadata.xml
new file mode 100644
index 000000000000..605a48a66e8e
--- /dev/null
+++ b/net-misc/aria2/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>dev-zero@gentoo.org</email>
+ <name>Tiziano Müller</name>
+ </maintainer>
+ <maintainer>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <use>
+ <flag name="bittorrent">Enable support for the bittorrent protocol.</flag>
+ <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> to replace the malloc() implementation with a possibly faster one</flag>
+ <flag name="libuv">Use <pkg>dev-libs/libuv</pkg> backend.</flag>
+ <flag name="libxml2">Use <pkg>dev-libs/libxml2</pkg> for XML parsing (preferred) instead of <pkg>dev-libs/expat</pkg>.</flag>
+ <flag name="nettle">Use <pkg>dev-libs/nettle</pkg> and <pkg>dev-libs/gmp</pkg> for bittorrent/metalink crypto instead of <pkg>dev-libs/libgcrypt</pkg> (when <pkg>dev-libs/openssl</pkg> is not being used).</flag>
+ <flag name="metalink">Enable support for metalink.</flag>
+ <flag name="scripts">Install additional scripts which use aria2's xmlrpc functionality.</flag>
+ <flag name="ssh">Enable SFTP support.</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">aria2</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/arm/Manifest b/net-misc/arm/Manifest
new file mode 100644
index 000000000000..f01257876e88
--- /dev/null
+++ b/net-misc/arm/Manifest
@@ -0,0 +1,2 @@
+DIST arm-1.4.5.0.tar.bz2 303760 SHA256 fc0e771585dde3803873b4807578060f0556cf1cac6c38840a714ffada3b28fa SHA512 60560761ba55f39c5b1ddafec9e67dc0cd052804224bf40a229d1a8c8ce87635465147933686078d02584b8681710c99ec169490550d33b7fab5212ac6933519 WHIRLPOOL 12c4aef7a9bb15fe8defc112d98def6a7f0d120588c9831a22aca49fb1bd5a76f7ce1f8eff9d675e682464c31f7335a340c6427ad57cb6545b497941eac86fad
+DIST arm-1.4.5.0_p20140714.tar.gz 185569 SHA256 08c81a781dbffbad7f1a76a6211edece03a2721f6f6327352b4a9b952dda4286 SHA512 65145796958a71385f5b8bf0a0a05cd123f5481718480d65d8d48dc3a4cc4fd198158cfe8e5b2a4dbe98818d3d93642694bed18ca6f9ca4bf7f668eb769aee9f WHIRLPOOL 23df21a1c62634a96b201cdc60e165118f80d702b974fd795a58020f1f5a7c191e8977872c31b71ba72f2a18deefcbcd16e74041218fe97d2bf39fe0bc7398b7
diff --git a/net-misc/arm/arm-1.4.5.0-r2.ebuild b/net-misc/arm/arm-1.4.5.0-r2.ebuild
new file mode 100644
index 000000000000..d1317db6efe4
--- /dev/null
+++ b/net-misc/arm/arm-1.4.5.0-r2.ebuild
@@ -0,0 +1,54 @@
+# 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'
+DISTUTILS_SINGLE_IMPL=1
+
+inherit distutils-r1
+
+DESCRIPTION="A ncurses-based status monitor for Tor relays"
+HOMEPAGE="http://www.atagar.com/arm/"
+SRC_URI="http://www.atagar.com/arm/resources/static/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86 ~x86-fbsd"
+IUSE=""
+
+# Note: While we depend on net-misc/tor, we strictly speaking
+# don't have to because it could run on a different machine.
+RDEPEND="
+ >=net-misc/tor-0.2.1.27
+ app-admin/sudo
+ sys-process/lsof
+ net-dns/bind-tools
+ virtual/man"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+python_prepare_all() {
+ python_fix_shebang .
+
+ distutils-r1_python_prepare_all
+}
+
+python_install() {
+ distutils-r1_python_install \
+ --docPath "${EPREFIX}/usr/share/doc/${PF}"
+
+ sed -i -e "s:python:${EPYTHON}:" "${ED}"usr/bin/arm || die
+}
+
+pkg_postinst() {
+ elog "Some graphing data issues have been noted in testing"
+ elog "when run as root. It is not recommended to run arm as"
+ elog "root until those issues have been isolated and fixed."
+ elog
+ elog "Trouble with graphs under app-misc/screen? Try:"
+ elog 'TERM="rxvt-unicode" arm'
+}
diff --git a/net-misc/arm/arm-1.4.5.0_p20140714-r2.ebuild b/net-misc/arm/arm-1.4.5.0_p20140714-r2.ebuild
new file mode 100644
index 000000000000..59c45cf2f133
--- /dev/null
+++ b/net-misc/arm/arm-1.4.5.0_p20140714-r2.ebuild
@@ -0,0 +1,61 @@
+# 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="ncurses"
+inherit vcs-snapshot distutils-r1
+
+DESCRIPTION="A ncurses-based status monitor for Tor relays"
+HOMEPAGE="http://www.atagar.com/arm/"
+COMMIT_ID="ac7923e31f52d3cf51b538ddf799162d67c04ecc"
+SRC_URI="https://gitweb.torproject.org/arm.git/snapshot/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE="test"
+
+DEPEND="test? ( dev-python/mock[${PYTHON_USEDEP}] )
+ dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND=">=net-libs/stem-1.2.2_p20140718[${PYTHON_USEDEP}]
+ net-misc/tor"
+
+python_prepare_all() {
+ sed -i -e "s/.version import VERSION/ import __version__ as VERSION/"\
+ -e "s/, 'arm.cli'//"\
+ -e "s/arm.cli/arm/g"\
+ -e "s/'arm.stem'//"\
+ -e "/gui/d"\
+ -e "s/\"arm\/settings.cfg\",//"\
+ -e "/install-purelib/d"\
+ -e "/eggPath/d" setup.py || die
+ sed -i -e "s/1.4.6_dev/${PV}/" arm/__init__.py || die
+ sed -i -e "s/line.replace(/line.replace(u/" arm/util/ui_tools.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_install() {
+ distutils-r1_python_install --docPath "${EPREFIX}"/usr/share/doc/${PF}
+ # Workaround until setup.py is fixed upstream
+ python_moduleinto arm
+ python_domodule arm/config
+ python_replicate_script "${ED}"/usr/bin/run_arm
+}
+python_install_all() {
+ distutils-r1_python_install_all --docPath "${EPREFIX}"/usr/share/doc/${PF}
+}
+
+python_test() {
+ ${PYTHON} run_tests.py || die
+}
+
+pkg_postinst() {
+ elog "Some graphing data issues have been noted in testing"
+ elog "when run as root. It is not recommended to run arm as"
+ elog "root until those issues have been isolated and fixed."
+ elog
+ elog "Trouble with graphs under app-misc/screen? Try:"
+ elog 'TERM="rxvt-unicode" arm'
+}
diff --git a/net-misc/arm/metadata.xml b/net-misc/arm/metadata.xml
new file mode 100644
index 000000000000..9134ba92a2e9
--- /dev/null
+++ b/net-misc/arm/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>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <maintainer>
+ <email>jesse@boldandbusted.com</email>
+ <name>Jesse Adelman</name>
+ </maintainer>
+ <maintainer>
+ <email>mrueg@gentoo.org</email>
+ <name>Manuel Rüger</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/arpd/Manifest b/net-misc/arpd/Manifest
new file mode 100644
index 000000000000..c2b1f539700e
--- /dev/null
+++ b/net-misc/arpd/Manifest
@@ -0,0 +1 @@
+DIST arpd-0.2.tar.gz 49437 SHA256 21d55de1506b3dbbfddb1b57e782a5fbf7140d299fbb08f4a8e48daaaa8489e7
diff --git a/net-misc/arpd/arpd-0.2-r1.ebuild b/net-misc/arpd/arpd-0.2-r1.ebuild
new file mode 100644
index 000000000000..051c40eeeeec
--- /dev/null
+++ b/net-misc/arpd/arpd-0.2-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit autotools eutils
+
+DESCRIPTION="ARP server which claims all unassigned addresses (for network monitoring or simulation)"
+HOMEPAGE="http://www.citi.umich.edu/u/provos/honeyd/"
+SRC_URI="http://www.citi.umich.edu/u/provos/honeyd/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc ~ppc64 sparc x86"
+IUSE=""
+
+DEPEND=">=dev-libs/libdnet-1.4
+ >=dev-libs/libevent-0.6
+ net-libs/libpcap
+ !sys-apps/iproute2"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/arpd.c.patch
+ epatch "${FILESDIR}"/${P}-libevent.patch
+
+ #fix bug 337481, replace test on libevent.a with libevent.so
+ epatch "${FILESDIR}"/${P}-buildsystem-libevent-test.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf --with-libdnet="${EPREFIX}"/usr --with-libevent="${EPREFIX}"/usr
+}
+
+src_install() {
+ dosbin arpd || die
+ doman arpd.8 || die
+}
diff --git a/net-misc/arpd/files/arpd-0.2-buildsystem-libevent-test.patch b/net-misc/arpd/files/arpd-0.2-buildsystem-libevent-test.patch
new file mode 100644
index 000000000000..c0c0f47712a8
--- /dev/null
+++ b/net-misc/arpd/files/arpd-0.2-buildsystem-libevent-test.patch
@@ -0,0 +1,11 @@
+--- configure.in.orig 2003-02-09 19:30:33.000000000 +0100
++++ configure.in 2010-09-17 00:33:36.138294836 +0200
+@@ -62,7 +62,7 @@
+ ;;
+ *)
+ AC_MSG_RESULT($withval)
+- if test -f $withval/include/event.h -a -f $withval/lib/libevent.a; then
++ if test -f $withval/include/event.h -a -f $withval/lib/libevent.so; then
+ owd=`pwd`
+ if cd $withval; then withval=`pwd`; cd $owd; fi
+ EVENTINC="-I$withval/include"
diff --git a/net-misc/arpd/files/arpd-0.2-libevent.patch b/net-misc/arpd/files/arpd-0.2-libevent.patch
new file mode 100644
index 000000000000..2d5998f8c8d3
--- /dev/null
+++ b/net-misc/arpd/files/arpd-0.2-libevent.patch
@@ -0,0 +1,28 @@
+--- arpd.orig/arpd.c 2010-02-03 20:03:07.098748175 +0100
++++ arpd/arpd.c 2010-02-03 20:06:24.469749941 +0100
+@@ -445,9 +445,6 @@
+ void
+ terminate_handler(int sig)
+ {
+- extern int event_gotsig;
+-
+- event_gotsig = 1;
+ arpd_sig = sig;
+ }
+
+@@ -464,7 +461,6 @@
+ main(int argc, char *argv[])
+ {
+ struct event recv_ev;
+- extern int (*event_sigcb)(void);
+ char *dev;
+ int c, debug;
+ FILE *fp;
+@@ -524,7 +520,6 @@
+ perror("signal");
+ return (-1);
+ }
+- event_sigcb = arpd_signal;
+
+ event_dispatch();
+
diff --git a/net-misc/arpd/files/arpd.c.patch b/net-misc/arpd/files/arpd.c.patch
new file mode 100644
index 000000000000..732ed16c92d7
--- /dev/null
+++ b/net-misc/arpd/files/arpd.c.patch
@@ -0,0 +1,42 @@
+--- arpd.c.orig 2005-03-30 15:13:37.136590624 -0700
++++ arpd.c 2005-03-30 15:23:50.295231384 -0700
+@@ -265,7 +265,7 @@
+ spa->addr_ip, tha->addr_eth, tpa->addr_ip);
+
+ if (op == ARP_OP_REQUEST) {
+- syslog(LOG_DEBUG, __FUNCTION__ ": who-has %s tell %s",
++ syslog(LOG_DEBUG, __FUNCTION__, ": who-has %s tell %s",
+ addr_ntoa(tpa), addr_ntoa(spa));
+ } else if (op == ARP_OP_REPLY) {
+ syslog(LOG_INFO, "arp reply %s is-at %s",
+@@ -282,7 +282,7 @@
+ int error;
+
+ if (addr_cmp(addr, &arpd_ifent.intf_addr) == 0) {
+- syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s",
++ syslog(LOG_DEBUG, __FUNCTION__, ": %s at %s",
+ addr_ntoa(addr), addr_ntoa(&arpd_ifent.intf_link_addr));
+ return (0);
+ }
+@@ -291,10 +291,10 @@
+ error = arp_get(arpd_arp, &arpent);
+
+ if (error == -1) {
+- syslog(LOG_DEBUG, __FUNCTION__ ": no entry for %s",
++ syslog(LOG_DEBUG, __FUNCTION__, ": no entry for %s",
+ addr_ntoa(addr));
+ } else {
+- syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s",
++ syslog(LOG_DEBUG, __FUNCTION__, ": %s at %s",
+ addr_ntoa(addr), addr_ntoa(&arpent.arp_ha));
+ }
+ return (error);
+@@ -423,7 +423,7 @@
+ if ((req = SPLAY_FIND(tree, &arpd_reqs, &tmp)) != NULL) {
+ addr_pack(&src.arp_ha, ADDR_TYPE_ETH, ETH_ADDR_BITS,
+ ethip->ar_sha, ETH_ADDR_LEN);
+- syslog(LOG_DEBUG, __FUNCTION__ ": %s at %s",
++ syslog(LOG_DEBUG, __FUNCTION__, ": %s at %s",
+ addr_ntoa(&req->pa), addr_ntoa(&src.arp_ha));
+
+ /* This address is claimed */
diff --git a/net-misc/arpd/metadata.xml b/net-misc/arpd/metadata.xml
new file mode 100644
index 000000000000..243b1ca9f63a
--- /dev/null
+++ b/net-misc/arpd/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>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/arpsponge/Manifest b/net-misc/arpsponge/Manifest
new file mode 100644
index 000000000000..8b45413e09ae
--- /dev/null
+++ b/net-misc/arpsponge/Manifest
@@ -0,0 +1 @@
+DIST arpsponge-3.12.2.tar.gz 105507 SHA256 1b0f5062eb9c6c11cdafd5cc26b35275e71c5305bb91b827bab2f21f578a64cc SHA512 49106e03c03080b45f8c27f483dc2b95d588d156685966acc4e5c28d068a503c98aa3ef16fbdb8a8da6bae5dbe378b92dc82c932201cf5ce48cda4d006245a5b WHIRLPOOL d0877b052837d3d2dd15f74e925a9138be6ed1d7b18817937b4d513bdc140a7c2220ceb253d99cac69b81396dd3ea8d30bc78c2327ed354a1dbb95f0429ee529
diff --git a/net-misc/arpsponge/arpsponge-3.12.2.ebuild b/net-misc/arpsponge/arpsponge-3.12.2.ebuild
new file mode 100644
index 000000000000..a6b73e448f10
--- /dev/null
+++ b/net-misc/arpsponge/arpsponge-3.12.2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit perl-module
+
+DESCRIPTION="Sweeps up stray ARP queries from a peering LAN"
+HOMEPAGE="https://www.ams-ix.net/downloads/arpsponge/"
+SRC_URI="https://www.ams-ix.net/downloads/${PN}/${PV}/${P}.tar.gz"
+LICENSE="|| ( GPL-1+ Artistic )"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ dev-lang/perl
+ dev-perl/IO-String
+ dev-perl/NetAddr-IP
+ dev-perl/NetPacket
+ dev-perl/Net-ARP
+ dev-perl/Net-Pcap
+ dev-perl/Readonly
+ dev-perl/TermReadKey
+ dev-perl/Term-ReadLine-Gnu
+ virtual/perl-Data-Dumper
+ virtual/perl-File-Path
+ virtual/perl-Getopt-Long
+ virtual/perl-Sys-Syslog
+ virtual/perl-Time-HiRes
+"
+
+DEPEND="${RDEPEND}
+ sys-devel/make
+"
+
+src_install() {
+ perl_set_version
+ insinto ${VENDOR_LIB}/M6
+ doins lib/M6/ReadLine.pm
+
+ insinto ${VENDOR_LIB}/M6/ARP
+ doins lib/M6/ARP/Base.pm
+ doins lib/M6/ARP/Const.pm
+ doins lib/M6/ARP/Control.pm
+ doins lib/M6/ARP/Log.pm
+ doins lib/M6/ARP/NetPacket.pm
+ doins lib/M6/ARP/Sponge.pm
+ doins lib/M6/ARP/Table.pm
+ doins lib/M6/ARP/Util.pm
+ doins lib/M6/ARP/Queue.pm
+
+ insinto ${VENDOR_LIB}/M6/ARP/Control
+ doins lib/M6/ARP/Control/Base.pm
+ doins lib/M6/ARP/Control/Client.pm
+ doins lib/M6/ARP/Control/Server.pm
+
+ newinitd "${FILESDIR}/arpsponge.initd" arpsponge
+ newconfd "${FILESDIR}/arpsponge.confd" arpsponge
+ dosbin sbin/asctl sbin/arpsponge sbin/aslogtail
+ doman man/asctl.8 man/arpsponge.8 man/aslogtail.8
+ dodoc doc/command_mapping.txt doc/arpsponge_architecture.txt
+}
diff --git a/net-misc/arpsponge/files/arpsponge.confd b/net-misc/arpsponge/files/arpsponge.confd
new file mode 100644
index 000000000000..4f941f483a2a
--- /dev/null
+++ b/net-misc/arpsponge/files/arpsponge.confd
@@ -0,0 +1,9 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Mandatory arguments: IPADDR/PREFIXLEN dev IFNAME
+# Example: 192.168.0.0/24 dev eth0
+# For further information see "perldoc arpsponge" or "man arpsponge".
+
+ARPSPONGE_OPTS=""
diff --git a/net-misc/arpsponge/files/arpsponge.initd b/net-misc/arpsponge/files/arpsponge.initd
new file mode 100755
index 000000000000..bfdeb8e40a48
--- /dev/null
+++ b/net-misc/arpsponge/files/arpsponge.initd
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting ARP sponge"
+ start-stop-daemon --start --quiet --exec /usr/sbin/arpsponge \
+ -- --daemon ${ARPSPONGE_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ARP sponge"
+ start-stop-daemon --stop --quiet -n arpsponge
+ eend $?
+}
diff --git a/net-misc/arpsponge/metadata.xml b/net-misc/arpsponge/metadata.xml
new file mode 100644
index 000000000000..3ed4669f55a4
--- /dev/null
+++ b/net-misc/arpsponge/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>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/asterisk-core-sounds/Manifest b/net-misc/asterisk-core-sounds/Manifest
new file mode 100644
index 000000000000..8c8be8850f68
--- /dev/null
+++ b/net-misc/asterisk-core-sounds/Manifest
@@ -0,0 +1,72 @@
+DIST asterisk-core-sounds-en-alaw-1.4.21.tar.gz 7542917 SHA256 c1b2841a48cc21e0bb1645e065c9a58142f5dd1bfe4069f9712927438089ac61
+DIST asterisk-core-sounds-en-alaw-1.4.22.tar.gz 8533300 SHA256 396fe6bb150fb76bd69a26d9aabe5d56a95de347194d84dd80aaa2bbab8ae8ac
+DIST asterisk-core-sounds-en-g722-1.4.21.tar.gz 8048225 SHA256 d066cdefc66f0bea90723973bc383a19ba5fb371684abc0b6ac6216cf7f3965a
+DIST asterisk-core-sounds-en-g722-1.4.22.tar.gz 9058583 SHA256 5cbc97a98a29ca75d6a6b0e84eaa10e8c3057aff27b33685cace5591e68dc230
+DIST asterisk-core-sounds-en-g729-1.4.21.tar.gz 1116090 SHA256 303a37fffbcfe143c27d8d82babd5506b1b2d3ed7c25b4f5c9d04ea021c1a294
+DIST asterisk-core-sounds-en-g729-1.4.22.tar.gz 1281828 SHA256 ecefc211f44503a707bd93110673ecfa8bee59b0af6056875fdf8fda4c37d536
+DIST asterisk-core-sounds-en-gsm-1.4.21.tar.gz 1785758 SHA256 8a77918aa34a9a88056683908d7eece62fd3ed8f577e56f69bba6860d5280314
+DIST asterisk-core-sounds-en-gsm-1.4.22.tar.gz 2042362 SHA256 79175197a651c25bb62988e721023e9bb711c7eef28aca2ecba291d43ee3e667
+DIST asterisk-core-sounds-en-siren14-1.4.21.tar.gz 6800650 SHA256 56807beed9b776376888e9e17981eddcfa61f89e3f56a198f1fc05cd23decaf2
+DIST asterisk-core-sounds-en-siren14-1.4.22.tar.gz 7777912 SHA256 ebe0654f4d4c54f70a495f3e49dc842320d07cbb21fe2df5e046265bb4e5aa29
+DIST asterisk-core-sounds-en-siren7-1.4.21.tar.gz 4297051 SHA256 85df26eaa6ea4c6d5320e4d60b06a02f94023cda05f9035bb0278924154125c6
+DIST asterisk-core-sounds-en-siren7-1.4.22.tar.gz 4939217 SHA256 7f10b52116953cb25ad9ba53adb921e13996a33084d23e05f82aec9806fcb102
+DIST asterisk-core-sounds-en-sln16-1.4.21.tar.gz 31127736 SHA256 d557515ebe16f2438447f8900ebc4bf5e9270a91f4b3a93a12053c2b3552809b
+DIST asterisk-core-sounds-en-sln16-1.4.22.tar.gz 35390902 SHA256 2c88f0be490fc3a1ad50e791064cc4603cae739b2493e8fac7cbd90de1915dd4
+DIST asterisk-core-sounds-en-ulaw-1.4.21.tar.gz 7663285 SHA256 8f9ee4e9f23eace060581219dded55124baed6dafcbe67c56dba2be979ba2ee8
+DIST asterisk-core-sounds-en-ulaw-1.4.22.tar.gz 8683123 SHA256 21ffd22e98eb35dc56bb69a076dffde534192116525ccd358b46cf8a663b1a72
+DIST asterisk-core-sounds-en-wav-1.4.21.tar.gz 15317471 SHA256 8246c60c359e9f508ada5e06b54d1c502846cdfc5047ebf2e8030f551bfcb105
+DIST asterisk-core-sounds-en-wav-1.4.22.tar.gz 17394370 SHA256 04cd727e8a01e02e9cb1de27eea5f6c060ccc60be9ad77b6a39b7bc15a169f1c
+DIST asterisk-core-sounds-es-alaw-1.4.21.tar.gz 10665934 SHA256 376ce92d63bfcbcc35af338831c21098b509468c8000ddd310cc7365952868ae
+DIST asterisk-core-sounds-es-alaw-1.4.22.tar.gz 12153981 SHA256 dfd3d07dd89ea09fc6ea15e998674e62ad0067d4118f0877c705529b93bc5b75
+DIST asterisk-core-sounds-es-g722-1.4.21.tar.gz 11104818 SHA256 87847917b6a63d00891adff53a1da3fa225b4a6790eeea6941df36dd6ebcd920
+DIST asterisk-core-sounds-es-g722-1.4.22.tar.gz 12519197 SHA256 d3d1e14b14c3c1f026b28256d6f67ecc9f8951a655646d62ae884dc624363645
+DIST asterisk-core-sounds-es-g729-1.4.21.tar.gz 1541057 SHA256 ad224c6f768f7cf6a9584649de6e9975a981e9e8a2eb936ba6d0d6dec8cdcf91
+DIST asterisk-core-sounds-es-g729-1.4.22.tar.gz 1771355 SHA256 afac894ec8a59830b45e0502a0a0bf7e1da50b9413cd3cb3b21918d153f78b70
+DIST asterisk-core-sounds-es-gsm-1.4.21.tar.gz 2479262 SHA256 a4df63cfa37809478d659588fc85564f5fca9311434968f3875c2a3840c87dad
+DIST asterisk-core-sounds-es-gsm-1.4.22.tar.gz 2846711 SHA256 f4cf1b25c081c6941024d7991d3fedac120ae433a0f9960bb3663c58f0331f47
+DIST asterisk-core-sounds-es-siren14-1.4.21.tar.gz 9300088 SHA256 de1f2e45deef4061b0f12c4545f6a9a299e5cdaaf86d231a81a0f7437bd08d4b
+DIST asterisk-core-sounds-es-siren14-1.4.22.tar.gz 10668439 SHA256 78237ce85e4c8962afe0b4b3f7ea35eed3511f571a806614c5e77fbc0124c80f
+DIST asterisk-core-sounds-es-siren7-1.4.21.tar.gz 5953949 SHA256 48c710b24e2ac60251a861db273771b6600480ea489dae43bed4dbf2fd3970ae
+DIST asterisk-core-sounds-es-siren7-1.4.22.tar.gz 6856025 SHA256 da30c63b2a4332fb5d5671f8ecf89744cc57ed914046cf0e540fa59a14ad4401
+DIST asterisk-core-sounds-es-sln16-1.4.21.tar.gz 43767861 SHA256 1c85fd4de3e42a3e22fa6ce07cb2ade75b863baa351fb0d1cc6b8b1b14bca8cf
+DIST asterisk-core-sounds-es-sln16-1.4.22.tar.gz 50127209 SHA256 32662a9815e7b3c735aaa0d570fb904a9473ca10b3e783de5e1c55aa42fd76f5
+DIST asterisk-core-sounds-es-ulaw-1.4.21.tar.gz 10802067 SHA256 ccc286e392f99b6ecd1daf1f97d682475be59383b075dc0e06eacb9026c233e8
+DIST asterisk-core-sounds-es-ulaw-1.4.22.tar.gz 12340977 SHA256 c89961b5b67b4ad4a139200a9fad50000512e5d000a46b277183216c3e94f02a
+DIST asterisk-core-sounds-es-wav-1.4.21.tar.gz 21594568 SHA256 9b4bcd1be5ba010f506750e963b879807696cf709513ab04b4f8d6f74276ed57
+DIST asterisk-core-sounds-es-wav-1.4.22.tar.gz 24712090 SHA256 e167f56fa8ebbbd7754ef191ee155e629442b688a20aa457c36b55e7f6800cc7
+DIST asterisk-core-sounds-fr-alaw-1.4.21.tar.gz 7802733 SHA256 19f5faaecfcd7c839675de221637fb28a9d882597ab06c16563c268e4f9b130d
+DIST asterisk-core-sounds-fr-alaw-1.4.22.tar.gz 8813861 SHA256 baeb52211812f6b77ddc83962ed67240af434e333c2757523a46165289f14d69
+DIST asterisk-core-sounds-fr-g722-1.4.21.tar.gz 8576649 SHA256 b01bdf6c72aaa1c50a8d2fbb8cd491dafe4b60d99e80ddfa2e9bbf6362be6c3a
+DIST asterisk-core-sounds-fr-g722-1.4.22.tar.gz 9467644 SHA256 9d52de05ada8ec7fe1626e9a41c50af6cb0a2d8fb09ed7d11e02b9d9d3a69174
+DIST asterisk-core-sounds-fr-g729-1.4.21.tar.gz 1201891 SHA256 7796dafefd67567ddbf18caa633671b17a67cd36ed21ea919f78eeca7c092283
+DIST asterisk-core-sounds-fr-g729-1.4.22.tar.gz 1344791 SHA256 68983b61a0d535ed739ab59da20e82164e8856ae048ae4c3cf05e895ce83c32f
+DIST asterisk-core-sounds-fr-gsm-1.4.21.tar.gz 1897139 SHA256 e3f55c1024b68a464a8a738f0e34e049d6ea35dd2b39be77d400ec1c7e56e5e6
+DIST asterisk-core-sounds-fr-gsm-1.4.22.tar.gz 2128144 SHA256 c0cb2a84ad2d82fbb04434f8de20fcdfb8e5dc7bb07cf18ec07e99c0d7ef7aac
+DIST asterisk-core-sounds-fr-siren14-1.4.21.tar.gz 7282008 SHA256 92088d0dfa3a8320da98bb4ebc21e2fb147c99f2f555ff117b0b90aea7dc4bf6
+DIST asterisk-core-sounds-fr-siren14-1.4.22.tar.gz 8140068 SHA256 165f890d522f91fc2721f6fc6f63708b6793a7033fc6c0017e0d84b5c119213b
+DIST asterisk-core-sounds-fr-siren7-1.4.21.tar.gz 4598263 SHA256 1524cf8dccdd886c3d5ad16e5eb09642004d5572b35b5ea82eaaf7dcd9da4ac1
+DIST asterisk-core-sounds-fr-siren7-1.4.22.tar.gz 5162570 SHA256 9fd1781f573c12877d011f50282cf2b8a70e7c3dd183a3a1801300f626de252c
+DIST asterisk-core-sounds-fr-sln16-1.4.21.tar.gz 32346434 SHA256 705b00c01e8e573b925ef40f784806cc9ff7b69f89d43eca119af8a61f715cc0
+DIST asterisk-core-sounds-fr-sln16-1.4.22.tar.gz 36567733 SHA256 c9662b5c8c2a59bb0fd036f6f79fe7e399a970017965cfb501a2972fca3a2ec0
+DIST asterisk-core-sounds-fr-ulaw-1.4.21.tar.gz 7995267 SHA256 f5967aa8660eb2162f4bdae2622f334b2e78396b53f5a3f103423a913fb3be38
+DIST asterisk-core-sounds-fr-ulaw-1.4.22.tar.gz 9027425 SHA256 0bbd24f702de48f8ec11e91a24a1559eedcf472afa5c2a169f343e99508df191
+DIST asterisk-core-sounds-fr-wav-1.4.21.tar.gz 15858675 SHA256 957725f14ad09161c841ef7b02a9f5b505ddd0ea5ed28cbdbee9f98472832b94
+DIST asterisk-core-sounds-fr-wav-1.4.22.tar.gz 17944749 SHA256 260a18bdf46df29badf922bb80d3f9db901faaa000f188712d41c0b4d1b8ab11
+DIST asterisk-core-sounds-ru-alaw-1.4.21.tar.gz 8064249 SHA256 f62809f304bf066aa84d34a8010145523e1739d95217e9bca01b5180cd66ac2b
+DIST asterisk-core-sounds-ru-alaw-1.4.22.tar.gz 8152975 SHA256 60ef0b8d1471d45620ae87b35bd97822513a4b379c872a897c80c84a03521f82
+DIST asterisk-core-sounds-ru-g722-1.4.21.tar.gz 8595025 SHA256 79c724f85a09d190e14b3e3f1b6f7fcad2af897af9a613d0024e8c5891a416b1
+DIST asterisk-core-sounds-ru-g722-1.4.22.tar.gz 8674954 SHA256 25368981f01486818cc8851841b72d48f4fe8ef7dea68b73638e988520235520
+DIST asterisk-core-sounds-ru-g729-1.4.21.tar.gz 1213557 SHA256 627bc3f0c283b0f7046cf04394b9a5bc979e8e4a16b2dd696cdff8457feb537c
+DIST asterisk-core-sounds-ru-g729-1.4.22.tar.gz 1284150 SHA256 25d777e101172d1530342f376656b06b64998628b4d39d8b2eb41afc8fb7749e
+DIST asterisk-core-sounds-ru-gsm-1.4.21.tar.gz 1940666 SHA256 781706fc1d4b7aa8f0a4d6f24d51af17b46b7e8743f97bbe1dd3ebaa888093de
+DIST asterisk-core-sounds-ru-gsm-1.4.22.tar.gz 2037430 SHA256 5f2eeb24bedb44245f230dbe2f9bbe78f66297ec6af4111d93a705bb03431136
+DIST asterisk-core-sounds-ru-siren14-1.4.21.tar.gz 6958245 SHA256 f8233bdd3e858b691de58e3f00b7bbadb2b201f0ce29d18c1e6145b759a1e865
+DIST asterisk-core-sounds-ru-siren14-1.4.22.tar.gz 7294734 SHA256 3c65d91d4cdb7865751872d2fbb4ea40ffda62e059107fe691325bc9d105e0b6
+DIST asterisk-core-sounds-ru-siren7-1.4.21.tar.gz 4717552 SHA256 a7fc878f1ffc49f856f35ada7f1d439935471ee01e34875b0d446cc5597b5d02
+DIST asterisk-core-sounds-ru-siren7-1.4.22.tar.gz 4965841 SHA256 81187002139d3494a1f059a1f4228d65c5539dcedc79d128b337ee7697666b85
+DIST asterisk-core-sounds-ru-sln16-1.4.21.tar.gz 33125360 SHA256 fe9595725021eb47a67e0cd610c8be426b150dd88de0b99a8b05361380e2d19d
+DIST asterisk-core-sounds-ru-sln16-1.4.22.tar.gz 33592783 SHA256 3ffa1e5181b8e5775865a4ecd4e34fdb76bd4e8dd825839fb10323751afc9283
+DIST asterisk-core-sounds-ru-ulaw-1.4.21.tar.gz 8299885 SHA256 09319bb1726b5f0b3e1b08e97c966a1440f596736b59977cfb4cfdd93fcc29a6
+DIST asterisk-core-sounds-ru-ulaw-1.4.22.tar.gz 8460881 SHA256 cb2f50ce8a62ddc69b2884af21e5d8c942b294366d0174e9b3ee4ace2d2693fa
+DIST asterisk-core-sounds-ru-wav-1.4.21.tar.gz 16446330 SHA256 e6be4623b0b404618f91ba2d9ae75230dc7c804d960666211a5ce2c059020156
+DIST asterisk-core-sounds-ru-wav-1.4.22.tar.gz 16591836 SHA256 eea2cf8ff81d1c32bb6375b1f4629ad6914871ba433867ff842c13519087985d
diff --git a/net-misc/asterisk-core-sounds/asterisk-core-sounds-1.4.21-r1.ebuild b/net-misc/asterisk-core-sounds/asterisk-core-sounds-1.4.21-r1.ebuild
new file mode 100644
index 000000000000..017a3885b1f7
--- /dev/null
+++ b/net-misc/asterisk-core-sounds/asterisk-core-sounds-1.4.21-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="Core sounds for asterisk"
+HOMEPAGE="http://www.asterisk.org/"
+LINGUAS="^en fr es ru" # ^ is used to indicate to the loops below to NOT set this as an optional
+CODECS="alaw g722 g729 +gsm siren7 siren14 sln16 ulaw wav"
+
+SRC_URI=""
+IUSE=""
+for c in ${CODECS}; do
+ [[ "${c}" != +* ]] && IUSE+=" ${c}"
+done
+for l in ${LINGUAS}; do
+ [[ "${l}" != ^* ]] && IUSE+=" linguas_${l}" && SRC_URI+=" linguas_${l}? ("
+ for c in ${CODECS}; do
+ [[ "${c}" != +* ]] &&
+ SRC_URI+=" ${c#+}? ( http://downloads.asterisk.org/pub/telephony/sounds/releases/${PN}-${l#^}-${c#+}-${PV}.tar.gz )" ||
+ SRC_URI+=" http://downloads.asterisk.org/pub/telephony/sounds/releases/${PN}-${l#^}-${c#+}-${PV}.tar.gz"
+ done
+ [[ "${l}" = ^* ]] || SRC_URI+=" )"
+done
+
+LICENSE="CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+DEPEND=">=net-misc/asterisk-1.4"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ local ar
+
+ for ar in ${A}; do
+ l="${ar#${PN}-}"
+ l=${l%%-*}
+ c="${ar#${PN}-*-}"
+ c=${c%%-*}
+ ebegin "Unpacking ${c} audio files for \"${l}\""
+ [ -d "${WORKDIR}/${l}" ] || mkdir "${WORKDIR}/${l}" || die "Error creating unpack directory"
+ tar xf "${DISTDIR}/${ar}" -C "${WORKDIR}/${l}" || die "Error unpacking ${ar}"
+ eend $?
+ done
+}
+
+src_install() {
+ for l in ${LINGUAS}; do
+ if [[ "${l}" = ^* ]] || use linguas_${l}; then
+ l="${l#^}"
+ ebegin "Installing documentation for \"${l}\""
+ dodoc ${l}/CHANGES-${PN%-sounds}-${l}-${PV} ${l}/${PN#asterisk-}-${l}.txt
+ rm ${l}/CHANGES-${PN%-sounds}-${l}-${PV} ${l}/${PN#asterisk-}-${l}.txt
+ eend $?
+ fi
+ done
+
+ diropts -m 0770 -o asterisk -g asterisk
+ insopts -m 0660 -o asterisk -g asterisk
+
+ ebegin "Installing audio files"
+ dodir /var/lib/asterisk/sounds
+ insinto /var/lib/asterisk/sounds
+ doins -r .
+ eend $?
+}
diff --git a/net-misc/asterisk-core-sounds/asterisk-core-sounds-1.4.22.ebuild b/net-misc/asterisk-core-sounds/asterisk-core-sounds-1.4.22.ebuild
new file mode 100644
index 000000000000..017a3885b1f7
--- /dev/null
+++ b/net-misc/asterisk-core-sounds/asterisk-core-sounds-1.4.22.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="Core sounds for asterisk"
+HOMEPAGE="http://www.asterisk.org/"
+LINGUAS="^en fr es ru" # ^ is used to indicate to the loops below to NOT set this as an optional
+CODECS="alaw g722 g729 +gsm siren7 siren14 sln16 ulaw wav"
+
+SRC_URI=""
+IUSE=""
+for c in ${CODECS}; do
+ [[ "${c}" != +* ]] && IUSE+=" ${c}"
+done
+for l in ${LINGUAS}; do
+ [[ "${l}" != ^* ]] && IUSE+=" linguas_${l}" && SRC_URI+=" linguas_${l}? ("
+ for c in ${CODECS}; do
+ [[ "${c}" != +* ]] &&
+ SRC_URI+=" ${c#+}? ( http://downloads.asterisk.org/pub/telephony/sounds/releases/${PN}-${l#^}-${c#+}-${PV}.tar.gz )" ||
+ SRC_URI+=" http://downloads.asterisk.org/pub/telephony/sounds/releases/${PN}-${l#^}-${c#+}-${PV}.tar.gz"
+ done
+ [[ "${l}" = ^* ]] || SRC_URI+=" )"
+done
+
+LICENSE="CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+DEPEND=">=net-misc/asterisk-1.4"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ local ar
+
+ for ar in ${A}; do
+ l="${ar#${PN}-}"
+ l=${l%%-*}
+ c="${ar#${PN}-*-}"
+ c=${c%%-*}
+ ebegin "Unpacking ${c} audio files for \"${l}\""
+ [ -d "${WORKDIR}/${l}" ] || mkdir "${WORKDIR}/${l}" || die "Error creating unpack directory"
+ tar xf "${DISTDIR}/${ar}" -C "${WORKDIR}/${l}" || die "Error unpacking ${ar}"
+ eend $?
+ done
+}
+
+src_install() {
+ for l in ${LINGUAS}; do
+ if [[ "${l}" = ^* ]] || use linguas_${l}; then
+ l="${l#^}"
+ ebegin "Installing documentation for \"${l}\""
+ dodoc ${l}/CHANGES-${PN%-sounds}-${l}-${PV} ${l}/${PN#asterisk-}-${l}.txt
+ rm ${l}/CHANGES-${PN%-sounds}-${l}-${PV} ${l}/${PN#asterisk-}-${l}.txt
+ eend $?
+ fi
+ done
+
+ diropts -m 0770 -o asterisk -g asterisk
+ insopts -m 0660 -o asterisk -g asterisk
+
+ ebegin "Installing audio files"
+ dodir /var/lib/asterisk/sounds
+ insinto /var/lib/asterisk/sounds
+ doins -r .
+ eend $?
+}
diff --git a/net-misc/asterisk-core-sounds/metadata.xml b/net-misc/asterisk-core-sounds/metadata.xml
new file mode 100644
index 000000000000..e9e074098f0a
--- /dev/null
+++ b/net-misc/asterisk-core-sounds/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>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+ <use>
+ <flag name="alaw">Install the sounds files for the alaw codec.</flag>
+ <flag name="g722">Install the sounds files for the g722 codec.</flag>
+ <flag name="g729">Install the sounds files for the g729 codec.</flag>
+ <flag name="siren7">Install the sounds files for the siren7 codec.</flag>
+ <flag name="siren14">Install the sounds files for the siren14 codec.</flag>
+ <flag name="sln16">Install the sounds files for the sln16 codec.</flag>
+ <flag name="ulaw">Install the sounds files for the ulaw codec.</flag>
+ <flag name="wav">Install the sounds files for the wav codec.</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/asterisk-extra-sounds/Manifest b/net-misc/asterisk-extra-sounds/Manifest
new file mode 100644
index 000000000000..c4c66797c492
--- /dev/null
+++ b/net-misc/asterisk-extra-sounds/Manifest
@@ -0,0 +1,18 @@
+DIST asterisk-extra-sounds-en-alaw-1.4.11.tar.gz 13870284 SHA256 ab9e91747f9ad424b14e8f5508018eeaf06a854e4f5b1234b60a712f7ba451bd
+DIST asterisk-extra-sounds-en-g722-1.4.11.tar.gz 14184931 SHA256 cc302da7156a134e1c11bd960e4aef088ee403b443e67aaa10c780e3d75957ed
+DIST asterisk-extra-sounds-en-g729-1.4.11.tar.gz 2102012 SHA256 e8589bf4f88c6ba75315be8c55f2bfde7086b62050d5815f4b41cb43b8e1fbb0
+DIST asterisk-extra-sounds-en-gsm-1.4.11.tar.gz 3349898 SHA256 d5f031cc31ebebec99ce3fcf44ff947bd7b27b5e9565a7b3a6185c2d1bda094c
+DIST asterisk-extra-sounds-en-siren14-1.4.11.tar.gz 11770392 SHA256 cd62cc292ce506d7ce1acf37caed07c986eb96eb795073deae289cbf0fe324fc
+DIST asterisk-extra-sounds-en-siren7-1.4.11.tar.gz 8001319 SHA256 2af1ebba33566f47593eb0ccdc99d6a20865c6338ffa81e1fae1c2237c28d576
+DIST asterisk-extra-sounds-en-sln16-1.4.11.tar.gz 56596426 SHA256 5d3836e512cfcb06feff7f6e64229a5f7ca5d4186b21c079a7b998109c242d68
+DIST asterisk-extra-sounds-en-ulaw-1.4.11.tar.gz 14277966 SHA256 22dd692dde962683601599926efa9281624fce469776bccbd6f5c6b727e77a4a
+DIST asterisk-extra-sounds-en-wav-1.4.11.tar.gz 27948533 SHA256 34cefb8aa31021e947c77033b99ced9d62f9d8785b45a04bd12675a0eddd9ed5
+DIST asterisk-extra-sounds-fr-alaw-1.4.11.tar.gz 11474936 SHA256 2f042b94474000d15d373c727c9ad9dd4151ce6100b7cc7486748babc3879836
+DIST asterisk-extra-sounds-fr-g722-1.4.11.tar.gz 12976829 SHA256 0bc0f9fe98d528625db827d474cd619f79abbb9d1495936e41f86b69d63f3f2d
+DIST asterisk-extra-sounds-fr-g729-1.4.11.tar.gz 1868622 SHA256 687b6e2f7632372a125acb97ead9b597819ec02c4b77cd6e62fd070b34fd9b26
+DIST asterisk-extra-sounds-fr-gsm-1.4.11.tar.gz 2930043 SHA256 1608776dbad3a97aad525eb4087d5c9944d7856ff8e015afeb353c5e97b38746
+DIST asterisk-extra-sounds-fr-siren14-1.4.11.tar.gz 10811820 SHA256 bcf7b3528c2e8a37badd9d5fa4aeac6357bd113974288345ca9e56fcdb1080e3
+DIST asterisk-extra-sounds-fr-siren7-1.4.11.tar.gz 7128320 SHA256 a02d8d554ec365dd32a747845457323e649928dce1ac0cfffd6910b622130981
+DIST asterisk-extra-sounds-fr-sln16-1.4.11.tar.gz 48517491 SHA256 d130ca16550dbc85ccba3ce791a4b1aadbde6e88b84579cc0446af3e6e4870a6
+DIST asterisk-extra-sounds-fr-ulaw-1.4.11.tar.gz 11818928 SHA256 7a20535f45ed4415e7adf6f2e19dcb6419bee8262ac11611778ed8e6eabbf0cf
+DIST asterisk-extra-sounds-fr-wav-1.4.11.tar.gz 23829634 SHA256 d3891730151e0a76c0a811499040379535d3ab7b63ee10f3a2e12b5c083887c0
diff --git a/net-misc/asterisk-extra-sounds/asterisk-extra-sounds-1.4.11.ebuild b/net-misc/asterisk-extra-sounds/asterisk-extra-sounds-1.4.11.ebuild
new file mode 100644
index 000000000000..afa88d81e7d2
--- /dev/null
+++ b/net-misc/asterisk-extra-sounds/asterisk-extra-sounds-1.4.11.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+DESCRIPTION="Extra sounds for asterisk"
+HOMEPAGE="http://www.asterisk.org/"
+LINGUAS="^en fr" # ^ is used to indicate to the loops below to NOT set this as an optional
+CODECS="alaw g722 g729 +gsm siren7 siren14 sln16 ulaw wav"
+
+SRC_URI=""
+IUSE="${CODECS}"
+for l in ${LINGUAS}; do
+ [[ "${l}" != ^* ]] && IUSE+=" linguas_${l}" && SRC_URI+=" linguas_${l}? ("
+ for c in ${CODECS}; do
+ SRC_URI+=" ${c#+}? ( http://downloads.asterisk.org/pub/telephony/sounds/releases/${PN}-${l#^}-${c#+}-${PV}.tar.gz )"
+ done
+ [[ "${l}" = ^* ]] || SRC_URI+=" )"
+done
+
+LICENSE="CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+DEPEND=">=net-misc/asterisk-1.4"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ local ar
+
+ for ar in ${A}; do
+ l="${ar#${PN}-}"
+ l=${l%%-*}
+ echo ">>> Unpacking $ar to ${WORKDIR}/${l}"
+ [ -d "${WORKDIR}/${l}" ] || mkdir "${WORKDIR}/${l}" || die "Error creating unpack directory"
+ tar xf "${DISTDIR}/${ar}" -C "${WORKDIR}/${l}" || die "Error unpacking ${ar}"
+ done
+}
+
+src_install() {
+ for l in ${LINGUAS}; do
+ if [[ "${l}" = ^* ]] || use linguas_${l}; then
+ l="${l#^}"
+ dodoc ${l}/CHANGES-${PN%-sounds}-${l}-${PV} ${l}/${PN#asterisk-}-${l}.txt
+ rm ${l}/CHANGES-${PN%-sounds}-${l}-${PV} ${l}/${PN#asterisk-}-${l}.txt
+ fi
+ done
+
+ diropts -m 0770 -o asterisk -g asterisk
+ insopts -m 0660 -o asterisk -g asterisk
+
+ dodir /var/lib/asterisk/sounds
+ insinto /var/lib/asterisk/sounds
+ doins -r .
+}
+
+pkg_postinst() {
+ local c has_once_codec=
+
+ for c in ${CODECS}; do
+ use ${c#+} && has_one_codec=1
+ done
+
+ [ -n "${has_one_codec}" ] || ewarn "You have none of the codec use flags (${CODECS}) set. You need to have at least one set in order for this package to be useful."
+}
diff --git a/net-misc/asterisk-extra-sounds/metadata.xml b/net-misc/asterisk-extra-sounds/metadata.xml
new file mode 100644
index 000000000000..a2a28b936d0e
--- /dev/null
+++ b/net-misc/asterisk-extra-sounds/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+ <use>
+ <flag name="alaw">Install the sounds files for the alaw codec.</flag>
+ <flag name="g722">Install the sounds files for the g722 codec.</flag>
+ <flag name="g729">Install the sounds files for the g729 codec.</flag>
+ <flag name="gsm">Install the sounds files for the +gsm codec.</flag>
+ <flag name="siren7">Install the sounds files for the siren7 codec.</flag>
+ <flag name="siren14">Install the sounds files for the siren14 codec.</flag>
+ <flag name="sln16">Install the sounds files for the sln16 codec.</flag>
+ <flag name="ulaw">Install the sounds files for the ulaw codec.</flag>
+ <flag name="wav">Install the sounds files for the wav codec.</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/asterisk-g729/Manifest b/net-misc/asterisk-g729/Manifest
new file mode 100644
index 000000000000..7126a859f7be
--- /dev/null
+++ b/net-misc/asterisk-g729/Manifest
@@ -0,0 +1,51 @@
+DIST asthostid-x86_32 1166416 SHA256 c6a208e4842a8137cd0efe86d0b4b82fe995bfb443d935e9a6fa6c69e3c191f8 SHA512 ce1ca53281af99f15b74ea8034d8ea7db1cebbf4d35274381d03f4c7e28293be64c81a6188c5a9d168ce9af208820db235b1c5c9c9f8fcd11a14045e05cbc647 WHIRLPOOL ba83aa3bdcb3552ab35dfa1d536860a6dcaa50fcbf91bad1e7af8e7caae3af4812e2a169d9520dd9c6ddf376ff32afa7aaf9eaa3d485ff1d68e293498cc5ee34
+DIST asthostid-x86_64 1166416 SHA256 c6a208e4842a8137cd0efe86d0b4b82fe995bfb443d935e9a6fa6c69e3c191f8 SHA512 ce1ca53281af99f15b74ea8034d8ea7db1cebbf4d35274381d03f4c7e28293be64c81a6188c5a9d168ce9af208820db235b1c5c9c9f8fcd11a14045e05cbc647 WHIRLPOOL ba83aa3bdcb3552ab35dfa1d536860a6dcaa50fcbf91bad1e7af8e7caae3af4812e2a169d9520dd9c6ddf376ff32afa7aaf9eaa3d485ff1d68e293498cc5ee34
+DIST astregister-x86_32 1178780 SHA256 14cbcfc5e6b3aa03c2885816aef87b5d96ee34b3c7f70b1b536a975423c5358d SHA512 4e6009df693878c4fcd034de122d11a5f69a085e2228604994dfce460301d70a418672e3af2fe35c22a9618dc28cb77ed0702b20e41429fb10bd28dbb085a55d WHIRLPOOL 763dfd25442a69372bffef191647972a05fbe7f06b25440e46d010f59afb74a4d219b8b704420df3b8c0a65a22ea90435713220bdaa06bc270e43065f0cc11c1
+DIST astregister-x86_64 1178780 SHA256 14cbcfc5e6b3aa03c2885816aef87b5d96ee34b3c7f70b1b536a975423c5358d SHA512 4e6009df693878c4fcd034de122d11a5f69a085e2228604994dfce460301d70a418672e3af2fe35c22a9618dc28cb77ed0702b20e41429fb10bd28dbb085a55d WHIRLPOOL 763dfd25442a69372bffef191647972a05fbe7f06b25440e46d010f59afb74a4d219b8b704420df3b8c0a65a22ea90435713220bdaa06bc270e43065f0cc11c1
+DIST benchg729-x86_32 2948664 SHA256 47a33e8588843cd7245b8ed483e061da39f12ee10c602476e302fa35ca7985e9 SHA512 e03d699f6f4cbd2d22cbab534eb032977373ef56320d061c45bd5f0a34f5f88a2f9185491d3c6ef6365c923e5703abc795eedff981e351472f3254307666d941 WHIRLPOOL ea8f0d65ac572b8827770724e400ae48b1318bb749d12fe61c3d5837459f11e9de2ee3605ea3fc86391972c01f2a994851628aab3d9aa6cf12703a3199380144
+DIST benchg729-x86_64 2358320 SHA256 bb2694fd5676eb9049933d785f79713a11fbdec0c49917787e4415866c1e25a3 SHA512 1239c64a6da40a8d0ef24f69fc31571a756e280757040e853ddbe3800c3d2a911d454a85b4474e3b5afd585ba56cc28a8f1ef17006211fe336c0cb223ee63ef9 WHIRLPOOL af1830efaa67d5a97c308524738ea642b426cc50478eab8eb496f1c1474140cd83e54a1f65d219f45bd57c029c08861359b083f052768fe177c7fc79477a9a4b
+DIST codec_g729a-11.0_3.1.5-athlon_32.tar.gz 403854 SHA256 c7a78449a5fe4f03893aa9c4e415830b4847089f4dfaecc622a2646f4c5c5ff6 SHA512 8da743dc946633f9a4f6754f938ed90591c58792346322eb3ed53f1a6b31137c2a5ba62b8856f2dc03546a05e16e2c08ba3bb5154b4e41123669293c9d335545 WHIRLPOOL 15df98054b68ca9d77d1fc229b8e8c6a16bbcc0cdc6e03ce038b55ad2849b5f9d8b134ddcfbabef9572bb0d1b30b4bf4fa014631fda3947b4d439d96660c1dd8
+DIST codec_g729a-11.0_3.1.5-athlon_xp_32.tar.gz 403409 SHA256 04395a18c3ae9889be40c0aa171806e382a5ab5ac7603186cee039c00faa872c SHA512 a7bb535adc55910444648d142b064a52e9fd8492f94338e2f26df3eb24ddb71436ab90d4beb39e2d452dcecb8fae25869ab5d52cb290368398850d60718233a3 WHIRLPOOL 9b9aa3d70961c94d87b7d0518d9496dfe44a65d880c4091e2a6771804e66e810213eb213c3536bfee01415f6370f0c7dea3906a5cc32808d2a6fd06e4f63e3f8
+DIST codec_g729a-11.0_3.1.5-barcelona_32.tar.gz 411880 SHA256 726d2b14f9cd210d113c4ef07e7cb1a60448caebb172eec16831cfdc0a6f2f99 SHA512 3bead54be5dd1d006844b6b8a7064777ea7774c90dc8d4d6d1528b64f0ade6c962806ece216ebda976dff730c235e132b2a820232ae1403681e6f86adf8bff24 WHIRLPOOL 3d7669161340d7060f86a4bc0d606af8746ec235fa04e2713ebd37453728a842b155bcf93ad1a065b4e444fdbd58fe1d46b3f42bab73faa86b4c7a99b678cc2e
+DIST codec_g729a-11.0_3.1.5-barcelona_64.tar.gz 464638 SHA256 dd23e224554a25fd8832cf5e64700122443ce8ffe980fa514b6af082d9a79c1f SHA512 f9e3b6dde8c212569e4ff94dc30abc22db967fe2fca9c5b087c29689c7e8667dae41e3f265dea4afc9da15d72047bd39e0e7f643d875e50ff7b003ed8c3ef5fa WHIRLPOOL aec9e3f04ebb7224b702dc892483b068c19fcf7743e9a5f118065663042bc43ed1cbd414b48c6caf381140135a7281c1c7290ac3b47bab5646c67026696f1d3b
+DIST codec_g729a-11.0_3.1.5-c3_2_32.tar.gz 404444 SHA256 2092329f86b2b58fc0a2451be6706ef2e8c892674b20f77f47a9df2eb3f59c55 SHA512 3a135fe006797066966f9e8f4ca6323dba35669bcec18cc028b98776f57adf911da17befb2fd04a8081bd1488263ab3c0f5b639d6d2dcc9b728a3238b4bcf91e WHIRLPOOL 996d4ebc6ced44ce096ad9fb14c380de8a7112c3c0e2b6938e7d7dea889808e19b7eb40357ba25f23d9aa15ba953d1f6d9f76378da27f7d35c35c8da636beec7
+DIST codec_g729a-11.0_3.1.5-c3_32.tar.gz 405421 SHA256 875bd2b6c25cbbf0f98829d6794eaeee355fcd17434d57a687531c6ca3d8b8ff SHA512 1b3c07d142c517847d00004041623e5b5f0c003dfe74dd299f4399659175c03e0846b2b6a5403c60ae44e765c74d18f73cd4d0509c81e145e0fe07a2eadb0630 WHIRLPOOL b3813d77c98a02b0fa4a2fd73c8881a8f9804fa108e2abaf7ac7b4728023c730e0875b19193e3a75cb571488f0ec13f27fca3ba64dc3e4df7871fd0bf0655c9b
+DIST codec_g729a-11.0_3.1.5-core2_32.tar.gz 410492 SHA256 e7adab08af2d96eaa9fd15743c66118b9d5a5bd018b9cf2d7aa3f1b56dd0f82c SHA512 431a9d0a35e7f966e52a4ca7d0c5e05753eeb3b714d6847600714d55959724ab745bceb0915c571382ab38bb160b9035b509325ba77e6fcb97623e7df0160044 WHIRLPOOL 9dedc30ecc48eac7a3058d0cbce5ad5b6c678a8e290d0d1f2e65e6e0b2b38d79a36347cbdba4ccc37547c91478d2e222416d27e12e5934413c6b98c6fef87c5c
+DIST codec_g729a-11.0_3.1.5-core2_64.tar.gz 464466 SHA256 a0f6b51ce186174a5a6d326075c5f6a06897fc159487aa64ebcd25eb1a591343 SHA512 bfd67de08e81301d46f708575d1cb0c97daee3cb004eddb9ea0eb0c72dab803147eee4bc6b4a0c9baf766b5086a1dacfd0d360def4960289b8c69c89a2d25534 WHIRLPOOL ac4149b45ed334b4b44b0111c460989153cc7f9af7ad457af9e13b111feb1c861471dabbed7fd03aba2ce86ab85cd728cfd659fc85143ad002830429453b43d6
+DIST codec_g729a-11.0_3.1.5-generic_32.tar.gz 402872 SHA256 dbcd92d9cfbc6bd807634bfa9f3535203532f97de632ab2b979f043819a33f69 SHA512 ddb2023c5f6d02238d42dbadb1b2b3d28c43a046eead3db7651ac5b5db6c8b98c49bf948f41b0bfaef5816f2c391764ed511f9fe49b340dfd1338529b25f0dde WHIRLPOOL d969cc7632e01ff95e86ad49fbf693b6c6a92c1e5aa3b31f51432e66f58a28c09d0f4b00be90490aac978be89550978794674d2fbabafa128171cc4c094b28b7
+DIST codec_g729a-11.0_3.1.5-generic_64.tar.gz 464215 SHA256 6c8feca459d1309904b5f7f712874577e0ac7206fe062c702a7671c07fb7153e SHA512 6c08626f8e0b3e7e0431c8cd10bc3192891272261c23a1aa4e43647a991c6df4b503da54a4dd3b3e446f1ae5a2d3d0ff2f9890f51e8c321a1ab40ca7fd418285 WHIRLPOOL a9ba2e6c1b8252e79aaefe18da9dd9b7cb643537c24895ca5ad8edbd5b31fe211705184a7c308344c338f3226c450350dd58dbb3dd1b599aa4f6d998282a8939
+DIST codec_g729a-11.0_3.1.5-i686_32.tar.gz 403806 SHA256 523c11abf89724e426c031bced01626ee066c61c5406b665ef306d242c7ae2e8 SHA512 b2cf9c2838fc2221ad782aaeaed4c2ab2aed94877cdc6dd10a23e064e8001b836cbd7d4a0c013500f67162d638040fa7a695a9d0b14ec22b421c01dc0a0065ca WHIRLPOOL f01de125fa66f6a3a71f0e935db78fef4b217384cff4e39f22dd9609332ebcf697fb6e76ef44da52c55678f3f4a2f9138c80809ee60d5881def08f0dd26d4dd7
+DIST codec_g729a-11.0_3.1.5-k6_3_32.tar.gz 406282 SHA256 850ba147bd0b11483ffa39d1b4bb3b5b2ea887b4688249e931c5413712a64b90 SHA512 f5ae04daa4b110b003b98d2d448db8bb370e94c291423f1b324839aabb01cbb13921edc6e9b56684456086f075370ed033074c0d9d72741b736720d01c2cd294 WHIRLPOOL f0a4191f5bd89a04af2b9547b6de3e6b4effad626bb6aa50d8d601fedc437f5d4e439345539cee1e21b5e470dedd50221161c96b083816a4cb82f2e8e792fb93
+DIST codec_g729a-11.0_3.1.5-nocona_32.tar.gz 411116 SHA256 965ff6a520dcd00f6a49a264491c82f01a05f20a62c9ecc96dd73c4eb4bd3d0e SHA512 537a0b68817a76984cea335cb3107850c4addbd953c154678f63d91957d38ed5398035ba9aa302d141a6356a4de4cc439193bd069ec3a14a3831e3e1333d298f WHIRLPOOL 4a74b42b5dfd8df356e6cd92cd170501b8ed748954e20c191e992a131ae8368e3f3a92b183b569539f14def53e7af4a378cd078444a3e967bff7628aea35aa0d
+DIST codec_g729a-11.0_3.1.5-nocona_64.tar.gz 463088 SHA256 5bfdbffca9d60785a807bb336ad75a0f98241ded3ae229c17347597e76fd2ed6 SHA512 191f2f479188b3f681e18503f44a92eb48294c2f85bcea80d43bfc75f01a4e66a02ff19e09b6712b06205389946ff333c842773bdb9cf41874c117b7c3947780 WHIRLPOOL 9a0dc965f75abf6bdc2e8c5547440d8960519903012e207a8c358a47eb1616504c31c74bd5abb593f589faf1d5d6cb2ce715b3836d533fd3df89dd138728a73b
+DIST codec_g729a-11.0_3.1.5-opteron_32.tar.gz 413573 SHA256 2efebc3320b8830606c217b208e95597049ed3a82ec8caee47a7e0325bf2309e SHA512 a16d26db435860f27fbd2cca1025a118c838340f8efe48fc73e0a51d203b7499119f14fb5bbb83e16bb34e3865f001000676d523659b4c140c99bae0dee6eb72 WHIRLPOOL b613d50e1c258f8ec7feb1e332f76b7cb292ffc62be3de47533e16f1f2d66d9f9c46e4fc0b4c4ef35c265cf932b12f23b9d812c84aa8126ed64fbf3311f5d1a2
+DIST codec_g729a-11.0_3.1.5-opteron_64.tar.gz 465658 SHA256 2a95833ed76dd8eafa69328f54a94cc6167ab4787e303faf26017ca8fdb5afed SHA512 54f1f739b8a078a9f7c7a457ec80a52624fad6278dedca76f37ff1be3fe507b9aa2e5fd033b8ca5eb99026a498185c85a0ba044c543bc6a6586280da304787e0 WHIRLPOOL 88b73f4aace812fdd0d78bb62f9170ffa49867198b3276756eb21969a52c4d94a1668aceefa12bc13e5b5cef9fc7e23735609dd58cd283ab79722a3cf07b75b9
+DIST codec_g729a-11.0_3.1.5-opteron_sse3_32.tar.gz 413509 SHA256 d16e030692b820a3c1c32b66569390d7b9a53e9836c94ffffb8ec8f6221a8033 SHA512 ee6afd47b11432de5bd22725776906be69e3835412ec143d7e8017395e46ffc83c7ad412a167606441a2e572adaa27a71eea2f64a91d82634015aaf09cf09dd8 WHIRLPOOL f9d6fde85d94e787fd555d017195f786a0978850fd1ad18c7e1f0cb9ff873f81f0f7007499533b6d99b65cd012f06bfdef795a7e899f94e9d71dfbd73639793e
+DIST codec_g729a-11.0_3.1.5-opteron_sse3_64.tar.gz 465591 SHA256 2a3322da37baf70e53f1332012a15cf258783d1d9e0fec9eb429d3b7f4a57b8c SHA512 91bc192b2feb3bcd3f9ee1e6d338e60a7e31f6c6af132597694406f44c4bc697df6e97f9929c2a03731e93e9576ec81194eacd21f883b7aa078d402baffbc3a4 WHIRLPOOL b7af18a6aeb4f2d2a3ae865d5d484361de6eb1d141d4cf460845941ad94f2e46f8569740af4a316bcaff7e5559fc90ad3e1c69b5c07815ff4bb1f9f524d19cef
+DIST codec_g729a-11.0_3.1.5-pentium3m_32.tar.gz 404457 SHA256 7c24726b038c6cbd1a23ddd79e4746a88a02a242365c6271249f42e3375a2040 SHA512 106e4c3be4784f13e6d599cdabe99ed7ec1f4d1d339da96055db4d012074bfca04cdeffb50d88dcd02b0d8eabee08ff362d532d3572723fa5e3d1611af49f436 WHIRLPOOL c1bcb45c046b257b4afe2d6ac6fb5548cdd07d6763d36c4526379e3409b8253f88bed741e40229d5ddf4d4963e495ed71ce0ce52584b0cc439f600904f8f7d89
+DIST codec_g729a-11.0_3.1.5-pentium4m_32.tar.gz 409011 SHA256 5e81fdd0a6c36a5611aa1720eed4b61fc7c00e2a5af3c9bde0690f68b532e229 SHA512 83a37a736edfd4a5d03e22983573e216da0e2ddb2a44054b94d43642932ff20afa1b55858d3be2f0197c24fc8a1e81ff2c7826c1a959a058669e9104a7e92151 WHIRLPOOL 2770511c965f9227113584ebfe65b191989c3211767c03afda96a2fb8c380781124dcc57f1360710edb3a4264f30f9ae52775107522c48180de07be0b15ac1cb
+DIST codec_g729a-11.0_3.1.5-pentium_m_32.tar.gz 413125 SHA256 7df3f2de56c5791537d23f7f8819318d6974f77bb887305b9f7f4af580b9ce5c SHA512 d1531d3a11ad8dd61d72364d63fae2e1bcb2d35984c70deb240e6ab513264314f00d74108f0f46fad2ae52b1deafbccbfc4153445362410ec646a2df5de94391 WHIRLPOOL b55951ca4bf95ad508dd7e687bed4ed73a3639c4053b119527776304fdb490543384c3627972e7f850845c6083a4a6f73631c98b1786acea4e3d60ca7998ffd7
+DIST codec_g729a-11.0_3.1.5-prescott_32.tar.gz 411126 SHA256 ccf75a1793bd851f33547f1e5a2063741768976b0d804b0962eec92b66a72247 SHA512 9ede6d14a2b0ea7bb5094dd87c7943e582dd3e49dba564131a0382e9f645ccd35ba85c96288124860e405b030de4f6a717124540053e897b2e4d5de190feebac WHIRLPOOL 556ce3f8224c3ff6b6f4b68da1aea5a1a5daa287ab761851c9d3897769a710aa4f9cb113f0be6a53c5eb3059302c4be86341f379080caac1deecac5265b4a63d
+DIST codec_g729a-11.0_3.1.6-athlon_32.tar.gz 397172 SHA256 e16bc44fa1cfae0a40fe01d3efa28a109eb256810823245dd39f74c99a3fe5ad SHA512 a08a482d686790e66bdef49a31a2b79a5a93f36565e77d7514123382ee9fbb6c1ecee48d0608a349ebda8c01b524280010da6bc03ddf206061d6504451624f00 WHIRLPOOL aadd4b88bef8d683e65b02f693e79d7fd5e064b68aac3df260d05f2961838c63eb026c36299d1a97345a8677812359dc1eca4e9049bfa130927a8c1c645e2259
+DIST codec_g729a-11.0_3.1.6-athlon_xp_32.tar.gz 397179 SHA256 6fd3c9334f1c57ec6ab3b02072a5cfe6b88d14c1da7a85f9b6e3ade89fcfd8cb SHA512 8de895251fa76fbd9b0b2d93f365aa4cdcd514a0bd00dfb9af661d5ba50849a9d3c7cc44dbd2bb4256dddf61307d64744f90a12f012ae8292b2827fa8ffb7c95 WHIRLPOOL f9b99b91db9e3b992b4609e64864661060df4f01367133d7ddfd61499e6c4e95fcb5cf407ecbf3ed34182ac92bd90bee628fc96d65618e088e28659d13c91aa0
+DIST codec_g729a-11.0_3.1.6-barcelona_32.tar.gz 397215 SHA256 2ccfa65bec2d41e32805043a075198680b16a962c0a243898ca83a371a59d606 SHA512 104a66449ad2453e68f27f7d4d6f80d12b2a186387ac39b90094a916dc1627e42e2c8829dd4c228a8f3bb0a40d71e912e01eba79c6330e4cb5c3d0a6a95db133 WHIRLPOOL ee0f0009cc49a583f00da05cec9bee6d7e8300bd34b2e2ece5dad1b6eee32b9210caee0633ef5cce9fea93f9b65a171a29f452483c93e6af555416efe4322c8c
+DIST codec_g729a-11.0_3.1.6-barcelona_64.tar.gz 453437 SHA256 5a9eb3febcd91bb26a3aaa0068493d7bec782db3547fd7e3e1683e4b9258ef41 SHA512 b9079f27f84a63e1d863af9589af848fbe052c9e9d31e65ca2c3b08f76e5afba76b236e9f85281f98d83d8082342807578d8ff183a4f8df18cd0fd7a8ffe8ae4 WHIRLPOOL b6fe69dfadc4f79de45110e4e8e0c5669b43cdc4f0527d8799a24de2e5136f577044cbad27694e81b23fc0dee09ef364cba9a8f6666c060db71f7f7d76a713a3
+DIST codec_g729a-11.0_3.1.6-c3_2_32.tar.gz 397547 SHA256 18f609b8086fa3f68491b9b66bb77d9608aa1818da2a4686d8e4fe7a799b03dd SHA512 6503920db56914c4d05ee23827d91387a5af85e7ea2524bc8d6c46250d31d126a54b422a092b0ef80418511cc1e63f3a603cab46623cc07b6be87353d7b3ffa8 WHIRLPOOL be80095af5344e320730df4af68d86cf5cd6486445248cf88d2b68ef0dc9c076bbe7627c76d55acffea39643731dedf835aeae9818c851b700e514aee17b1c13
+DIST codec_g729a-11.0_3.1.6-c3_32.tar.gz 397306 SHA256 9780e6488455ae6540f731cf3cb5bae09dd828e7b8913c78f9a8684f15de9cc3 SHA512 1e68ffe81af906ad93c8bbc69349f9e81bd6562cfe5d39251e4b7d51df422058f71b6d856b733358330242b909e156787cfa0c086ef5adc50a8dffde7fffe446 WHIRLPOOL 46d808ee4e10ef9eda92cbef9dfe46c037bb41b4c54b2e278b1d800dcbd29aeebb8f8046b78220b2aac6ae92886efef028ea43d03e14abc84084f3a8b1433414
+DIST codec_g729a-11.0_3.1.6-core2_32.tar.gz 397176 SHA256 8c9f3dfc60e3597eb24e887310f1cb9077284b2f3b0b1793e36e7d6e1bbe2af3 SHA512 1e1fd5edf26a5be5fa70529bcdc658796fcd8145ac04d0a8561552e76c48263b8194b02b9ec98893bcc5d73e34659ae45b289bebdd1e8e328683ba8f1642cc4d WHIRLPOOL 03d11b05d61b58f1d2edb1c804eb11a071b5995941b7f4cd61da28f3aeb16db332efd1c9b0adc32b2c3825590f345ce67d0f81a3f1d7daf436125aecf1ff8a93
+DIST codec_g729a-11.0_3.1.6-core2_64.tar.gz 453545 SHA256 0875b54e3f7e894c7628549c3b900813fab19a16ccc0d4399612542f40c1e8ad SHA512 813bff86d19df1458e62a4b0b65421d0d94acb99afc1c80c7f8e12aa806e67d6f432c88290035ed8225993cd54a6ac9fbadf90fe67b5a2cb70850e1f404212e5 WHIRLPOOL aadef598d98c7371f21dbe6ad75cfa4fb647fb7ad76dafd13f00fe1934bd9efff6f620c802e4a3a322e45fc867bc0eb53fef01030d569afda7c63f4310baff67
+DIST codec_g729a-11.0_3.1.6-generic_32.tar.gz 397190 SHA256 23954c6dc5be6ef6b510fa2ceec248a47653497d7e2cd65a28c2c65f57bee874 SHA512 76e38b9ecc8aa6449f499185fe3aeb98bcfa9aa4eb538807b20936d9e233a94ded25ba589ad9782071845c522c465adb1a41a63eec4b4ee714cfef36a9fe23eb WHIRLPOOL cf7181681e86e8f2eeab94d7a561c6c21f8995e181517eb08b71080dbfbbe0cfc4c55e4a6ec2135d32fdf4aa1a15d69eab5ea9e7d30f7e0587f59a0ee1c25bf4
+DIST codec_g729a-11.0_3.1.6-generic_64.tar.gz 453604 SHA256 72caf518e187dad98f4460d3e2100f83b5fe9e63b8a52ddc5f9c4ac7ea518b38 SHA512 5b66df2362b131d91f5a0b95b2ffbefde8f3b68e1f5e6b6c860666afaa4dd73e17aa5f3b942db0828c065af5124506df478d3e4d2b6b2965b39f7a80790b736c WHIRLPOOL 34a437791546c7ef0a861a2c04c33d4efe7d94592a19c7ee2d43d2a0b51e28145be5f75515afcce44aae5f7783a60d3cace1028bbfbf312f31e188ddd5dc8e01
+DIST codec_g729a-11.0_3.1.6-i686_32.tar.gz 397196 SHA256 012b038cc9786557b0a41880a8a95f9d609c00e2923284332709ef8b9b35214e SHA512 802e41b88fd1115addd45e8706a93858375f1efeed899e7102e27eaa97b07dc25c0467ef61257d23f855bc7f37177c731ca16ba61a95f52e3153770406bdfa8d WHIRLPOOL f72f9fb249c444ee4c0f290f7449e09272bf305ced5940adff4ad61c09a84106f6c71c68287890f58b4d298ae576437cf19d0198ccd2fcee4dcee842211a7bb8
+DIST codec_g729a-11.0_3.1.6-k6_3_32.tar.gz 397323 SHA256 d2f478cfc153ecdd2c69e938d7dfd41959ad756cb47a94e252cbf54a52b1e2bc SHA512 ad90f61538e0ad5eb485b35bf903e897de494daf9cfe6adc13aa5dc8dddead9a6fa4fdb05ffb8f364c53a03c1a7b7dc35e69fc6cb985b06a3943e16f3b9ad3f0 WHIRLPOOL d6e3b84d55051d265ab22f040be0b8d9782bc8fee845699efad07adecb560dc3104883ab2cc0c13d700c5d5cd5eb19eb9149b62d1d3d331d861bc1e704f0efe1
+DIST codec_g729a-11.0_3.1.6-nocona_32.tar.gz 397143 SHA256 653ca1f1cf60b9e2b142af459e0da1006e0a11810fd39877cbbe9c8e61c12f46 SHA512 0d61a03ac74a79f1c3fcdb6908ad0bd7c8dc80d94dc0d95c5c875ffa46635931b1c227f0e9f28469e9f5ec0cfac1d468c54c8c0b23008042b2990f7ac501d495 WHIRLPOOL e41007369e8ab194f61788e0c19a35c1df867386277b4e7bd9470d30d266eca675e6b50dad6c38ea16b258307d626efe302a908bbf677d413da2abbc4f80062d
+DIST codec_g729a-11.0_3.1.6-nocona_64.tar.gz 453296 SHA256 88183f53ae82577d3188e7de772c485c3434417f135159d96cf20ccb6d2a81b6 SHA512 b6fa29d4ad00842f746bcdbd8941eed6aa96b285413f6561d31b8bba66873a3ac0a25891d27714d6bccb91fb760d078d9774ab9e2a6af94f83dd80c0486e1f60 WHIRLPOOL 52f78e4bd2752e414a70c7b91bf6e88214e85d956703e328b4693bf378093229cf494e2758b1378a01e11332ac0d37dc4df8de4243b634b9c6db453e3eaffcb4
+DIST codec_g729a-11.0_3.1.6-opteron_32.tar.gz 397298 SHA256 e650bb33fa595a0d79c527160c3bbe060a0d228ab661d26d9004459930eedceb SHA512 9dea626643607b31ae5af8a2df804fd13449aec497972bbc5ff0cd95c83c976703d8776c71eef46f298ff54b3e0c9c98ec2a5ced42ece7b2391cfc72425d11bc WHIRLPOOL 89c933ad2b2457b3fc12f145e11d3a901605f78cd1d00434bd8be6f2f52428bcf38f096991bcd65f3329c2df55b55dee6e318076f98b9fa8fae994237ede80cf
+DIST codec_g729a-11.0_3.1.6-opteron_64.tar.gz 453554 SHA256 5f15361e2a954783a31ea93142bb2b997c03eefed5f20e6195a239c5053ba712 SHA512 fd4862071f1d3cf03d75c8ccc54c6ef8b0e5f3b13fca54bc748748dd85811b0e22bcff44b3515d219f4fa284174d202d7ab53f6d677b77e360018bc202fa5c18 WHIRLPOOL 5b207147ed2960bebe66da1017016f7bf4a096c2274e737dd18340c1bf88bcf47fcdd1a930d61612dfbcb8d7e134bd2982019d58705b286198bc194cc96fc839
+DIST codec_g729a-11.0_3.1.6-opteron_sse3_32.tar.gz 397309 SHA256 304900c653a624ca75412ac96c5659f0e9eab1e8df9f1a6b7c915a704ca930dd SHA512 f5bc219f183758b3ccc2175678febe3fd57456db08b487ddd3e8f215ad70f188331f9fd61423f7d3daa1dcc70e849ebe8597bed5f508735ff3a50a66f6357502 WHIRLPOOL 8efe83a12e80d41fb8d7d09c3a88469f97c1cd5d07613f87f0db0c4f4c458723c4bce0c7ba95715767b25182f43e2ce6c499163bca17e10aa1c0f0bd5625764c
+DIST codec_g729a-11.0_3.1.6-opteron_sse3_64.tar.gz 453555 SHA256 85597bcc21093b82d0664e47ceeb28ae83d69425c3a3e1ee6ac0af2d10531ac2 SHA512 e413f5a21ed3ee425dff31d246f96aa771bc52149c3ea6103939e6717fce44edb293d78473c3a49df5747cf5a166e35e5ce5d6a1227fc96297eb8d657711db04 WHIRLPOOL f3bc1456bf3821848674082fe10fafc996a8c4ffa12ddbc5ff406e3d5d7fefa970eed454c631a183fe337ec7e1bef1988093bedc61b33fc218f48c35c5930024
+DIST codec_g729a-11.0_3.1.6-pentium3m_32.tar.gz 397551 SHA256 4a3e0e81b442ecd33246a9221e530b0fedb47832de2555aaac11c29f454e6910 SHA512 776749afd3ad82a924247aa27876dd80169d39411e15ae97b145922b31e0f4713d3a23099063c7d93e98378f79924e61cd8bae6efe1918955048d1ef286e21f0 WHIRLPOOL cf87aed9f7b09603526d1123c40ae2aa880ea5a7a1019a5ae019e5395d9fb08903de8988996321e3c1b8fb5e09087f03aa1b035cb2357131faba8bd411d30456
+DIST codec_g729a-11.0_3.1.6-pentium4m_32.tar.gz 397066 SHA256 52a5e0b699b309febb2c44e1f1c57fcfd297bc6b3e8f6eb49607627d563fc802 SHA512 8f875d442c698013d43b407d805a84a6d0a5d02bb89e0d5327601b157f58d0f5754d551e4cc28ad43282389c762349e17711c2fbadeb6375159983d0d953335e WHIRLPOOL 1cfb1e392f0d40861fc9faad5f3dd701bc963dc7be038ff0f93cdcaac21c5fea9ba263c72642ad6e407d3ff4e061e85c51d825bf5cabd96cc98a6a465ade437d
+DIST codec_g729a-11.0_3.1.6-pentium_m_32.tar.gz 397552 SHA256 c3065fd37e557b387a9701f12caf9a37af8876ccf2d63d2c618b227d36b093f1 SHA512 1cb5a78e40fdb4fcda87efe3eef5d94e1f8b12699a702964f87ead1e7c5eea9e9ec18762b85a3c14207c731b9afa40c0b65eca23ea4155d5f7048d199843a6a6 WHIRLPOOL ead35bef10671d3b29d6b447d633c9a4e781fdda5337732a2c435150835f94fb510c24d668c5265487ad93feba042b1e50e0fae045ecf55228910e8b10b4ca2e
+DIST codec_g729a-11.0_3.1.6-prescott_32.tar.gz 397150 SHA256 4ffc84f3818f8dcf052b96994897affb07951ea1fbda2941a7135898d3af33db SHA512 2d6269232dc2e8d8f9b283ec374035378b942615e36f86e34e40f910b43e69460e461eefdcf27ef35e36f8164a8ea001f74b72093ac1183ea0412912279c2064 WHIRLPOOL 18666af084af6342e7e9e3cc03cc828a43bef5c9608375e3a190a4f8b8114e78d86b16ebd077f4f0c14e09a47f384a4e8cf98b46c77ad72dafb1b86ddcc807bf
+DIST collect-g729-stats.sh 4857 SHA256 901aeac3b3b5e11d8ef983820d1761cb5404a9240c9500f59e670ced2966c074 SHA512 82887e07dcb6177ce0fd11ffd5f47b985f2f65c187ab7bc892b2e9fb9527f0fabbc389b3aed1ed2bcfbe1cb04d3eef518007acc46f9f022e2898694480639431 WHIRLPOOL f6ca60583a1b14ef45f8b27efede5a836e42713810877930944ff0ba718c6d79b3355af56f2e28c7f59944ca386283ca6dae46034bca33178eb61a3a4f6b7745
diff --git a/net-misc/asterisk-g729/asterisk-g729-11.0.3.1.5.ebuild b/net-misc/asterisk-g729/asterisk-g729-11.0.3.1.5.ebuild
new file mode 100644
index 000000000000..74e616a7aa34
--- /dev/null
+++ b/net-misc/asterisk-g729/asterisk-g729-11.0.3.1.5.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit versionator multilib
+
+DESCRIPTION="G.729 codec and supporting files for asterisk"
+HOMEPAGE="http://store.digium.com/productview.php?product_code=G729CODEC"
+
+BENCH_PV=1.0.8
+
+AST_PV=11.0
+MY_PV=$(replace_version_separator 2 _)
+
+SRC_URI="x86? (
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-athlon_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-athlon_xp_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-barcelona_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-c3_2_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-c3_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-core2_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-generic_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-i686_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-k6_3_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-nocona_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-opteron_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-opteron_sse3_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-pentium3m_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-pentium4m_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-pentium_m_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-prescott_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/benchg729/x86-32/benchg729-${BENCH_PV}-x86_32 -> benchg729-x86_32
+ http://downloads.digium.com/pub/register/x86-32/register -> astregister-x86_32
+ http://downloads.digium.com/pub/register/x86-32/asthostid -> asthostid-x86_32
+)
+amd64? (
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-barcelona_64.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-core2_64.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-generic_64.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-nocona_64.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-opteron_64.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-opteron_sse3_64.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/benchg729/x86-64/benchg729-${BENCH_PV}-x86_64 -> benchg729-x86_64
+ http://downloads.digium.com/pub/register/x86-64/register -> astregister-x86_64
+ http://downloads.digium.com/pub/register/x86-64/asthostid -> asthostid-x86_64
+)
+http://g729.uls.co.za/static/g729-stats-collector/collect-g729-stats.sh"
+
+LICENSE="Digium"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND} =net-misc/asterisk-11*"
+
+RESTRICT="mirror strip"
+
+QA_FLAGS_IGNORED_amd64="usr/lib64/asterisk/modules/codec_g729a.so usr/sbin/benchg729"
+QA_FLAGS_IGNORED_x86="usr/lib/asterisk/modules/codec_g729a.so usr/sbin/benchg729"
+QA_PREBUILT="usr/sbin/benchg729 usr/sbin/asthostid usr/sbin/astregister"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ local binsuffix
+ local b
+
+ if use x86; then
+ binsuffix=x86_32
+ elif use amd64; then
+ binsuffix=x86_64
+ else
+ die "Ebuild only functions for x86 and amd64."
+ fi
+
+ for b in astregister asthostid benchg729; do
+ cp "${DISTDIR}/${b}-${binsuffix}" "${WORKDIR}/${b}" || die
+ fperms 755 ${b}
+ done
+
+ cp "${DISTDIR}/collect-g729-stats.sh" "${WORKDIR}" || die
+}
+
+src_compile() {
+ ./benchg729 | tee benchdata
+ variant=$(sed -nre "s/^Recommended flavor for this system is '([^']*)'.*/\1/p" < benchdata)
+ [ -d codec_g729a-${MY_PV}-${variant}_${size} ] || variant=generic
+ [ -z $variant ] && variant=generic
+}
+
+src_install() {
+ local size
+
+ if use x86; then
+ size=32
+ elif use amd64; then
+ size=64
+ else
+ die "Ebuild only functions for x86 and amd64."
+ fi
+
+ dosbin astregister
+ dosbin asthostid
+ dosbin benchg729
+ dosbin collect-g729-stats.sh
+
+ dodoc codec_g729a-${MY_PV}-${variant}_${size}/LICENSE
+ dodoc codec_g729a-${MY_PV}-${variant}_${size}/README
+ insinto usr/$(get_libdir)/asterisk/modules/
+ doins "codec_g729a-${MY_PV}-${variant}_${size}/codec_g729a.so"
+}
+
+pkg_postinst() {
+ einfo "Please note that Digium's register utility has been installed as astregister"
+ einfo
+ einfo "Please consider participating in the G.729 stats collection that ULS"
+ einfo "is performing. This will assist in picking better variants for more"
+ einfo "processors as we gather more statistics. All you need to do is run"
+ einfo "the collect-g729-stats.sh command."
+ [ "${variant}" = "generic" ] && einfo "You are using the generic flavor of the codec, in order to install a more appropriate one please install a G.729 license and remerge this package (${PN})."
+}
diff --git a/net-misc/asterisk-g729/asterisk-g729-11.0.3.1.6.ebuild b/net-misc/asterisk-g729/asterisk-g729-11.0.3.1.6.ebuild
new file mode 100644
index 000000000000..bd99283428ec
--- /dev/null
+++ b/net-misc/asterisk-g729/asterisk-g729-11.0.3.1.6.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit versionator multilib
+
+DESCRIPTION="G.729 codec and supporting files for asterisk"
+HOMEPAGE="http://store.digium.com/productview.php?product_code=G729CODEC"
+
+BENCH_PV=1.0.8
+
+AST_PV=11.0
+MY_PV=$(replace_version_separator 2 _)
+
+SRC_URI="x86? (
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-athlon_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-athlon_xp_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-barcelona_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-c3_2_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-c3_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-core2_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-generic_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-i686_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-k6_3_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-nocona_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-opteron_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-opteron_sse3_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-pentium3m_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-pentium4m_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-pentium_m_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-32/codec_g729a-${MY_PV}-prescott_32.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/benchg729/x86-32/benchg729-${BENCH_PV}-x86_32 -> benchg729-x86_32
+ http://downloads.digium.com/pub/register/x86-32/register -> astregister-x86_32
+ http://downloads.digium.com/pub/register/x86-32/asthostid -> asthostid-x86_32
+)
+amd64? (
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-barcelona_64.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-core2_64.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-generic_64.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-nocona_64.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-opteron_64.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/asterisk-${AST_PV}/x86-64/codec_g729a-${MY_PV}-opteron_sse3_64.tar.gz
+ http://downloads.digium.com/pub/telephony/codec_g729/benchg729/x86-64/benchg729-${BENCH_PV}-x86_64 -> benchg729-x86_64
+ http://downloads.digium.com/pub/register/x86-64/register -> astregister-x86_64
+ http://downloads.digium.com/pub/register/x86-64/asthostid -> asthostid-x86_64
+)
+http://g729.uls.co.za/static/g729-stats-collector/collect-g729-stats.sh"
+
+LICENSE="Digium"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND} =net-misc/asterisk-11*"
+
+RESTRICT="mirror strip"
+
+QA_FLAGS_IGNORED_amd64="usr/lib64/asterisk/modules/codec_g729a.so usr/sbin/benchg729"
+QA_FLAGS_IGNORED_x86="usr/lib/asterisk/modules/codec_g729a.so usr/sbin/benchg729"
+QA_PREBUILT="usr/sbin/benchg729 usr/sbin/asthostid usr/sbin/astregister"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ local binsuffix
+ local b
+
+ if use x86; then
+ binsuffix=x86_32
+ elif use amd64; then
+ binsuffix=x86_64
+ else
+ die "Ebuild only functions for x86 and amd64."
+ fi
+
+ for b in astregister asthostid benchg729; do
+ cp "${DISTDIR}/${b}-${binsuffix}" "${WORKDIR}/${b}" || die
+ fperms 755 ${b}
+ done
+
+ cp "${DISTDIR}/collect-g729-stats.sh" "${WORKDIR}" || die
+}
+
+src_compile() {
+ ./benchg729 | tee benchdata
+ variant=$(sed -nre "s/^Recommended flavor for this system is '([^']*)'.*/\1/p" < benchdata)
+ [ -d codec_g729a-${MY_PV}-${variant}_${size} ] || variant=generic
+ [ -z $variant ] && variant=generic
+}
+
+src_install() {
+ local size
+
+ if use x86; then
+ size=32
+ elif use amd64; then
+ size=64
+ else
+ die "Ebuild only functions for x86 and amd64."
+ fi
+
+ dosbin astregister
+ dosbin asthostid
+ dosbin benchg729
+ dosbin collect-g729-stats.sh
+
+ dodoc codec_g729a-${MY_PV}-${variant}_${size}/LICENSE
+ dodoc codec_g729a-${MY_PV}-${variant}_${size}/README
+ insinto usr/$(get_libdir)/asterisk/modules/
+ doins "codec_g729a-${MY_PV}-${variant}_${size}/codec_g729a.so"
+}
+
+pkg_postinst() {
+ einfo "Please note that Digium's register utility has been installed as astregister"
+ einfo
+ einfo "Please consider participating in the G.729 stats collection that ULS"
+ einfo "is performing. This will assist in picking better variants for more"
+ einfo "processors as we gather more statistics. All you need to do is run"
+ einfo "the collect-g729-stats.sh command."
+ [ "${variant}" = "generic" ] && einfo "You are using the generic flavor of the codec, in order to install a more appropriate one please install a G.729 license and remerge this package (${PN})."
+}
diff --git a/net-misc/asterisk-g729/metadata.xml b/net-misc/asterisk-g729/metadata.xml
new file mode 100644
index 000000000000..3ed4669f55a4
--- /dev/null
+++ b/net-misc/asterisk-g729/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>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/asterisk-moh-opsound/Manifest b/net-misc/asterisk-moh-opsound/Manifest
new file mode 100644
index 000000000000..448aa3c01652
--- /dev/null
+++ b/net-misc/asterisk-moh-opsound/Manifest
@@ -0,0 +1,9 @@
+DIST asterisk-moh-opsound-alaw-2.03.tar.gz 7496413 SHA256 8b6d63486fd58fd535eaed394f9bd32ecdf6e650975aaa258941f423c8150b81
+DIST asterisk-moh-opsound-g722-2.03.tar.gz 7924391 SHA256 05d206cebfb3433e1bd7fddcf8886cc043e1b21b42ba80a762302e5cf90377ad
+DIST asterisk-moh-opsound-g729-2.03.tar.gz 1103000 SHA256 0147ca9a97f0c550227aacb7793499057c4d2c64e021c95f93722f27d5549585
+DIST asterisk-moh-opsound-gsm-2.03.tar.gz 1777967 SHA256 b0fb7b52b05094a3d5298c965e98717f9907d65a9ec47604ac05d8b06a96e940
+DIST asterisk-moh-opsound-siren14-2.03.tar.gz 6518720 SHA256 521cf5dbde700b2ab14cc9b78093a38104de96914179f0be846fe1d004f67f72
+DIST asterisk-moh-opsound-siren7-2.03.tar.gz 4233366 SHA256 b3abaf1334162e15a9cb2a57289377323d70348afac653577792560b0ee290f2
+DIST asterisk-moh-opsound-sln16-2.03.tar.gz 31309094 SHA256 30a47e80f182c8ee860354924c2d2ee687f936a2858b8a6a209ba97b86c88eaf
+DIST asterisk-moh-opsound-ulaw-2.03.tar.gz 7479839 SHA256 95b163d7f931d58864aba2cfe32156accca7af782c850fb867a85ce88c02573c
+DIST asterisk-moh-opsound-wav-2.03.tar.gz 15359473 SHA256 449fb810d16502c3052fedf02f7e77b36206ac5a145f3dacf4177843a2fcb538
diff --git a/net-misc/asterisk-moh-opsound/asterisk-moh-opsound-2.03.ebuild b/net-misc/asterisk-moh-opsound/asterisk-moh-opsound-2.03.ebuild
new file mode 100644
index 000000000000..cafbe05c6013
--- /dev/null
+++ b/net-misc/asterisk-moh-opsound/asterisk-moh-opsound-2.03.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+DESCRIPTION="asterisk moh music"
+HOMEPAGE="http://www.asterisk.org/"
+CODECS="alaw g722 g729 +gsm siren7 siren14 sln16 ulaw wav"
+
+SRC_URI=""
+for c in ${CODECS}; do
+ SRC_URI+=" ${c#+}? ( http://downloads.asterisk.org/pub/telephony/sounds/releases/${PN}-${c#+}-${PV}.tar.gz )"
+done
+
+IUSE="${CODECS}"
+LICENSE="CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+DEPEND=">=net-misc/asterisk-1.4"
+
+src_install() {
+ local c
+
+ for c in ${CODECS}; do
+ if use ${c#+}; then
+ for pf in CREDITS LICENSE CHANGES; do
+ dodoc "$pf-$PN-${c#+}"
+ rm "$pf-$PN-${c#+}"
+ done
+ fi
+ done
+
+ diropts -m 0770 -o asterisk -g asterisk
+ insopts -m 0660 -o asterisk -g asterisk
+
+ dodir /var/lib/asterisk/moh
+ insinto /var/lib/asterisk/moh
+ doins -r .
+
+}
+
+pkg_postinst() {
+ local c has_once_codec=
+
+ for c in ${CODECS}; do
+ use ${c#+} && has_one_codec=1
+ done
+
+ [ -n "${has_one_codec}" ] || ewarn "You have none of the codec use flags (${CODECS}) set. You need to have at least one set in order for this package to be useful."
+}
diff --git a/net-misc/asterisk-moh-opsound/metadata.xml b/net-misc/asterisk-moh-opsound/metadata.xml
new file mode 100644
index 000000000000..a2a28b936d0e
--- /dev/null
+++ b/net-misc/asterisk-moh-opsound/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+ <use>
+ <flag name="alaw">Install the sounds files for the alaw codec.</flag>
+ <flag name="g722">Install the sounds files for the g722 codec.</flag>
+ <flag name="g729">Install the sounds files for the g729 codec.</flag>
+ <flag name="gsm">Install the sounds files for the +gsm codec.</flag>
+ <flag name="siren7">Install the sounds files for the siren7 codec.</flag>
+ <flag name="siren14">Install the sounds files for the siren14 codec.</flag>
+ <flag name="sln16">Install the sounds files for the sln16 codec.</flag>
+ <flag name="ulaw">Install the sounds files for the ulaw codec.</flag>
+ <flag name="wav">Install the sounds files for the wav codec.</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/asterisk-rate_engine/Manifest b/net-misc/asterisk-rate_engine/Manifest
new file mode 100644
index 000000000000..a3bc714eb4e5
--- /dev/null
+++ b/net-misc/asterisk-rate_engine/Manifest
@@ -0,0 +1 @@
+DIST rate-engine-0.5.4.tar.gz 28883 SHA256 6077a6ece87e7e460d1a2dc45bc7907ee836327d5d7dbc211343f04f16fede83
diff --git a/net-misc/asterisk-rate_engine/asterisk-rate_engine-0.5.4.ebuild b/net-misc/asterisk-rate_engine/asterisk-rate_engine-0.5.4.ebuild
new file mode 100644
index 000000000000..fcd6076a48a5
--- /dev/null
+++ b/net-misc/asterisk-rate_engine/asterisk-rate_engine-0.5.4.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+MY_PN="rate-engine"
+
+DESCRIPTION="Asterisk application for least-cost routing"
+HOMEPAGE="http://www.trollphone.org/files/"
+SRC_URI="http://www.trollphone.org/files/${MY_PN}-${PV}.tar.gz"
+
+IUSE=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+
+DEPEND="dev-libs/libpcre
+ virtual/mysql
+ >=net-misc/asterisk-1.0.5-r1
+ !>=net-misc/asterisk-1.1.0"
+
+S=${WORKDIR}/${MY_PN}-${PV}
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ # cflag fixes, install fixes and changes for asterisk-config
+ epatch "${FILESDIR}"/${MY_PN}-${PV}-astcfg.diff
+}
+
+src_compile() {
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install samples || die
+ dodoc ChangeLog DISCLAIMER NEWS README TODO *.sql *.conf*
+}
diff --git a/net-misc/asterisk-rate_engine/files/rate-engine-0.5.4-astcfg.diff b/net-misc/asterisk-rate_engine/files/rate-engine-0.5.4-astcfg.diff
new file mode 100644
index 000000000000..fe2772d660cc
--- /dev/null
+++ b/net-misc/asterisk-rate_engine/files/rate-engine-0.5.4-astcfg.diff
@@ -0,0 +1,41 @@
+--- rate-engine-0.5.4/Makefile.orig 2005-02-21 04:42:24.046680160 +0100
++++ rate-engine-0.5.4/Makefile 2005-02-21 04:47:38.049944408 +0100
+@@ -10,7 +10,7 @@
+
+ DEBUG+= -g -fno-inline-functions
+
+-CFLAGS+= -O3 -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow \
++CFLAGS+= -fPIC -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow \
+ $(DEBUG) -D_REENTRANT -I/usr/include/pcre
+ LDFLAGS+= $(DEBUG)
+ LDLIBS+= -lpthread
+@@ -26,9 +26,9 @@
+ OBJS:= $(SRCS:%.c=%.o)
+ MOD= rate_engine.so
+
+-ASTLIBDIR= /usr/lib/asterisk/modules
+-ASTCONFDIR= /etc/asterisk
+-BINDIR= /usr/bin
++ASTLIBDIR= $(shell /usr/bin/asterisk-config --modulesdir)
++ASTCONFDIR= $(shell /usr/bin/asterisk-config --sysconfdir)
++BINDIR= $(shell /usr/bin/asterisk-config --bindir)
+
+ .PHONY: all
+
+@@ -50,12 +50,14 @@
+ .PHONY: install
+
+ install: all
+- install -m 755 $(MOD) $(ASTLIBDIR)
++ if [ ! -d $(DESTDIR)$(ASTLIBDIR) ]; then mkdir -p $(DESTDIR)$(ASTLIBDIR); fi
++ install -m 755 $(MOD) $(DESTDIR)$(ASTLIBDIR)
+
+ .PHONY: samples
+
+ samples:
+- install -m 644 rate_engine.conf.sample $(ASTCONFDIR)/rate_engine.conf
++ if [ ! -d $(DESTDIR)$(ASTCONFDIR) ]; then mkdir -p $(DESTDIR)$(ASTCONFDIR); fi
++ install -m 644 rate_engine.conf.sample $(DESTDIR)$(ASTCONFDIR)/rate_engine.conf
+
+ ifneq ($(wildcard .depend),)
+ include .depend
diff --git a/net-misc/asterisk-rate_engine/metadata.xml b/net-misc/asterisk-rate_engine/metadata.xml
new file mode 100644
index 000000000000..1db71bb6e0e4
--- /dev/null
+++ b/net-misc/asterisk-rate_engine/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>chainsaw@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/net-misc/asterisk-spandsp_codec_g726/Manifest b/net-misc/asterisk-spandsp_codec_g726/Manifest
new file mode 100644
index 000000000000..0b4c23555573
--- /dev/null
+++ b/net-misc/asterisk-spandsp_codec_g726/Manifest
@@ -0,0 +1 @@
+DIST spandsp-0.0.2pre26_codec_g726.c.bz2 2867 SHA256 a5bfc64e2e45b8dc8799cdade8a8cdc82b103dd55a233e5725df8eb42d42264d
diff --git a/net-misc/asterisk-spandsp_codec_g726/asterisk-spandsp_codec_g726-0.0.2_pre26.ebuild b/net-misc/asterisk-spandsp_codec_g726/asterisk-spandsp_codec_g726-0.0.2_pre26.ebuild
new file mode 100644
index 000000000000..a9a33ae8d939
--- /dev/null
+++ b/net-misc/asterisk-spandsp_codec_g726/asterisk-spandsp_codec_g726-0.0.2_pre26.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+LIB_CODEC_G726="codec_g726-32"
+SRC_CODEC_G726="spandsp-${PV/_}_codec_g726.c"
+
+DESCRIPTION="SpanDSP ITU G.726-32kbps codec for Asterisk"
+HOMEPAGE="http://soft-switch.org/downloads/spandsp/spandsp-0.0.2pre26/"
+SRC_URI="mirror://gentoo/${SRC_CODEC_G726}.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+DEPEND=">=media-libs/spandsp-0.0.2_pre26
+ >=net-misc/asterisk-1.2.0"
+
+S="${WORKDIR}"
+
+do_compile() {
+ echo "${@}" && "${@}"
+}
+
+src_unpack() {
+ unpack ${A}
+
+ epatch "${FILESDIR}/${P}-spanddsp.patch"
+ # patch include declarations
+ sed -e 's:^\(#include.*\)"\(asterisk/.*\)":\1<\2>:g' \
+ -e 's:^\(#include.*\)"\(asterisk\.h\)":\1<asterisk/\2>:g' \
+ "${SRC_CODEC_G726}" > "${LIB_CODEC_G726}.c" \
+ || die "unpack failed"
+}
+
+src_compile() {
+ do_compile $(tc-getCC) -D_GNU_SOURCE -fPIC ${CFLAGS} ${LDFLAGS} -lspandsp -lm \
+ -shared -o ${LIB_CODEC_G726}.so ${LIB_CODEC_G726}.c || die "compile failed"
+}
+
+src_install() {
+ exeinto /usr/$(get_libdir)/asterisk/modules
+ doexe ${LIB_CODEC_G726}.so || die
+}
+
+pkg_postinst() {
+ echo
+ elog "To enable the SpanDSP G.726-32 codec, you have to"
+ elog "disable the G.726 codec shipped with Asterisk in"
+ elog "your /etc/asterisk/modules.conf:"
+ echo
+ elog " noload => codec_g726.so"
+ echo
+ elog "Now you can use the SpanDSP codec instead:"
+ echo
+ elog " load => ${LIB_CODEC_G726}.so"
+ echo
+}
diff --git a/net-misc/asterisk-spandsp_codec_g726/files/asterisk-spandsp_codec_g726-0.0.2_pre26-spanddsp.patch b/net-misc/asterisk-spandsp_codec_g726/files/asterisk-spandsp_codec_g726-0.0.2_pre26-spanddsp.patch
new file mode 100644
index 000000000000..b0c825427a1f
--- /dev/null
+++ b/net-misc/asterisk-spandsp_codec_g726/files/asterisk-spandsp_codec_g726-0.0.2_pre26-spanddsp.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/show_bug.cgi?id=252378
+
+--- spandsp-0.0.2pre26_codec_g726.c 2008-12-24 13:46:26.000000000 +0100
++++ spandsp-0.0.2pre26_codec_g726.c 2008-12-24 13:53:20.000000000 +0100
+@@ -25,8 +25,10 @@
+ #include <string.h>
+ #include <unistd.h>
+
++#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES /* we need g726_state_s definition */
+ #include <spandsp.h>
+
++#define _PLC_H_ /* asterisk/plc.h conflicts with spandsp/plc.h */
+ #include "asterisk.h"
+
+ ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.1 $")
diff --git a/net-misc/asterisk-spandsp_codec_g726/metadata.xml b/net-misc/asterisk-spandsp_codec_g726/metadata.xml
new file mode 100644
index 000000000000..8479914d0c45
--- /dev/null
+++ b/net-misc/asterisk-spandsp_codec_g726/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>chainsaw@gentoo.org</email></maintainer>
+ <longdescription lang="en">
+ SpanDSP ITU G.726-32kbps codec for Asterisk. It's a replacement
+ for Asterisk's own G.726 codec, which isn't fully compliant to
+ ITU specs.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest
new file mode 100644
index 000000000000..21fbe8422d10
--- /dev/null
+++ b/net-misc/asterisk/Manifest
@@ -0,0 +1,8 @@
+DIST asterisk-11.17.1.tar.gz 35002041 SHA256 c22d5dfb6c901cdeb8a12ffb34c35565ccfd993d0c6ab7638fd11e5cd64e00b2 SHA512 cb7616d6868721bb91ff47a9601d81cce6e3670c6d484849a33fa58ff060a5a4993eb87cf0251baa88e63ba3b97a07c4a6ec3f6bab2980b087a9e140d2c9024e WHIRLPOOL f538ff11fc6d7c297a9a9a534d275132e7c84d41a9ffa2de8b1ffb2d596cf681ebed6f86001b1075d8cc648e7eee0f64af5dc4518ead41cf1ebec75a9b2f6535
+DIST asterisk-11.18.0.tar.gz 34831035 SHA256 605b823e2362c543512a0af7427db123c3b846edf45bed722232cc35c8824b10 SHA512 cc7148443bd8d730c7a97489eae6c50b08eabe66301b1e6723a24719859ecf6a9499640899dbf8a8bb74cf89a58e61ccccdd9307ee65e67ed277a8ea56639839 WHIRLPOOL 82801b1a3e95d8962313cf7bb5dcf3ee66039e76438a2d2ba6b0cffef5dbeb8f50cacabfae99de083c2a2191a0de39a078bad984fc7e2c36c3b3b7bbb60f1a1f
+DIST asterisk-13.3.2.tar.gz 31978637 SHA256 ff87592a49156e2f7c03a39a12d099a610e71c3135ca9548429b4066fc76aaa5 SHA512 cfe2dec45d6162c0e9455de9a7a83b52c9041620b31c4fed835973c6a2805e9a51badc0637d6838dc52fbcceb01abb87f3fabddce1c8de3bd0f5ca65c5a39b06 WHIRLPOOL 3de98c03c8b0433a6072814724963c57cd1823d0f07a8bd6ca4d33cbe6c9a2f48ed7917db943fb37ac3c784de420178e625a6bedbf87eb7f92f425092e5b9148
+DIST asterisk-13.4.0.tar.gz 32009886 SHA256 2049012665e99d2967b18d1594ae752307db7e967235877f1e058e6fb5b4c045 SHA512 5f6843d8a635e274bfae5ca5d5305f5764fa2cee3c6d83d73d681cd8a672aba6452d4deb0cbe9e3a61c657aab8563b0138b311ff6a8d42d28fce65c5dcad783a WHIRLPOOL 9d7b7f742ed0b42451663e1b2047ed46d09e0cf0b6b24d3a450fe59d60a5ee6dfac94331cb0fbfe522ca988c400e9e7947c24808b510695420929b4fd7553283
+DIST gentoo-asterisk-patchset-3.15.tar.bz2 5570 SHA256 c9c4fb87b9b57a55b034510a2847eeb145cce31ef3d8df75d92036f93daa54eb SHA512 c4c51e46abeaf4cb37ff9725159e3b73451f83d6d59d65ea173a29dae2270d0276d9af89ce8145e5ba1b117e37ae651df37713831a2f5ff38e7c8da58820e241 WHIRLPOOL 334c887ffe0fd2b681bc8bd79922f6049d2b98ffe998451b2175a22e7560d4e581d6786316202c18826591fe019790c2464df85afd356d5f8257f5238c75c401
+DIST gentoo-asterisk-patchset-3.16.tar.bz2 5018 SHA256 9c393aba3272b19ae7c7d79302c288ddb6d6b0368c72fbbeda11569ab751be6d SHA512 83d0be42f935068afd130ecf6768355d6f9702238c829e1482135d320f99e6a2ad9dd39814ea139e8a8e9009ecb99a6b3d5ed5f2cc778353d03a09183d7a06a0 WHIRLPOOL cc6a032aaa781a4eb29f913578bd10245775d9915f5a934f7c2982f44cf063cf3030b764e628b6e17f4f023558fb50e73116a19c77738ae5e8de85c0c672dfd9
+DIST gentoo-asterisk-patchset-4.01.tar.bz2 6483 SHA256 ecd6b5e495d73444b15bfea3d69541abe8bf68274e5a130547a56aa5cfc7f455 SHA512 541c992b578ede198e91a10d954c398396f7068c34cc94be163497d2aa279605c702e8969dd8eda67334055c4a537d0930a7e140a91ebbb4580fdaf43bf203c3 WHIRLPOOL e36c58bdd1f41d10976d3b1c4e9b08b0436d9652845bcbda59c62a4599d14d03dcd661a54cfd32a1e04daaf6df8ae18b087944dcf0ded403391780d5219e965e
+DIST gentoo-asterisk-patchset-4.02.tar.bz2 5945 SHA256 91797fe6d2e543180b80ec02d4b00bd3bcb95b4108f7e21b559f76554ab506b4 SHA512 3a25359b11b9c4e5aa2542be9d5421beb25301443b056ba9173963c6a671da092ef1200b891857e182eda3be8819564f814f81e2b39e8647a60be04973849c2b WHIRLPOOL 9d2fb75646bef18b56fbe554a447e2b3d43f82dd9a06f219fcf841b1c3360fa37e24f2cf92f41526de224844384824765192bf2508c457eb6d7e7983be09f6d1
diff --git a/net-misc/asterisk/asterisk-11.17.1.ebuild b/net-misc/asterisk/asterisk-11.17.1.ebuild
new file mode 100644
index 000000000000..1a4d6a4b9a1c
--- /dev/null
+++ b/net-misc/asterisk/asterisk-11.17.1.ebuild
@@ -0,0 +1,324 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools base eutils linux-info multilib user systemd
+
+MY_P="${PN}-${PV/_/-}"
+
+DESCRIPTION="Asterisk: A Modular Open Source PBX System"
+HOMEPAGE="http://www.asterisk.org/"
+SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz
+ mirror://gentoo/gentoo-asterisk-patchset-3.15.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+IUSE_VOICEMAIL_STORAGE="
+ +voicemail_storage_file
+ voicemail_storage_odbc
+ voicemail_storage_imap
+"
+IUSE="${IUSE_VOICEMAIL_STORAGE} alsa bluetooth calendar +caps cluster curl dahdi debug doc freetds gtalk http iconv ilbc xmpp ldap libedit lua mysql newt +samples odbc osplookup oss portaudio postgres radius selinux snmp span speex srtp static syslog vorbis"
+IUSE_EXPAND="VOICEMAIL_STORAGE"
+REQUIRED_USE="gtalk? ( xmpp )
+ ^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} )
+ voicemail_storage_odbc? ( odbc )
+"
+
+EPATCH_SUFFIX="patch"
+PATCHES=( "${WORKDIR}/asterisk-patchset" )
+
+CDEPEND="dev-db/sqlite:3
+ dev-libs/popt
+ dev-libs/libxml2
+ dev-libs/openssl:*
+ sys-libs/ncurses
+ sys-libs/zlib
+ alsa? ( media-libs/alsa-lib )
+ bluetooth? ( net-wireless/bluez )
+ calendar? ( net-libs/neon
+ dev-libs/libical
+ dev-libs/iksemel )
+ caps? ( sys-libs/libcap )
+ cluster? ( sys-cluster/corosync )
+ curl? ( net-misc/curl )
+ dahdi? ( >=net-libs/libpri-1.4.12_beta2
+ net-misc/dahdi-tools )
+ freetds? ( dev-db/freetds )
+ gtalk? ( dev-libs/iksemel )
+ http? ( dev-libs/gmime:2.6 )
+ iconv? ( virtual/libiconv )
+ ilbc? ( dev-libs/ilbc-rfc3951 )
+ xmpp? ( dev-libs/iksemel )
+ ldap? ( net-nds/openldap )
+ libedit? ( dev-libs/libedit )
+ lua? ( dev-lang/lua:* )
+ mysql? ( virtual/mysql )
+ newt? ( dev-libs/newt )
+ odbc? ( dev-db/unixODBC )
+ osplookup? ( net-libs/osptoolkit )
+ portaudio? ( media-libs/portaudio )
+ postgres? ( dev-db/postgresql:* )
+ radius? ( net-dialup/radiusclient-ng )
+ snmp? ( net-analyzer/net-snmp )
+ span? ( media-libs/spandsp )
+ speex? ( media-libs/speex )
+ srtp? ( net-libs/libsrtp )
+ vorbis? ( media-libs/libvorbis )"
+
+DEPEND="${CDEPEND}
+ !net-libs/openh323
+ !net-libs/pjsip
+ voicemail_storage_imap? ( virtual/imap-c-client )
+ virtual/pkgconfig
+"
+
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-asterisk )
+ syslog? ( virtual/logger )"
+
+PDEPEND="net-misc/asterisk-core-sounds
+ net-misc/asterisk-extra-sounds
+ net-misc/asterisk-moh-opsound"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ CONFIG_CHECK="~!NF_CONNTRACK_SIP"
+ local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users
+ have reported that this module dropped critical SIP packets in their deployments. You
+ may want to disable it if you see such problems."
+ check_extra_config
+
+ enewgroup asterisk
+ enewgroup dialout 20
+ enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout"
+}
+
+src_prepare() {
+ base_src_prepare
+ AT_M4DIR=autoconf eautoreconf
+}
+
+src_configure() {
+ local vmst
+
+ econf \
+ --libdir="/usr/$(get_libdir)" \
+ --localstatedir="/var" \
+ --with-crypto \
+ --with-gsm=internal \
+ --with-popt \
+ --with-ssl \
+ --with-z \
+ --without-pwlib \
+ $(use_with caps cap) \
+ $(use_with http gmime) \
+ $(use_with newt) \
+ $(use_with portaudio)
+
+ # Blank out sounds/sounds.xml file to prevent
+ # asterisk from installing sounds files (we pull them in via
+ # asterisk-{core,extra}-sounds and asterisk-moh-opsound.
+ >"${S}"/sounds/sounds.xml
+
+ # That NATIVE_ARCH chatter really is quite bothersome
+ sed -i 's/NATIVE_ARCH=/NATIVE_ARCH=0/' build_tools/menuselect-deps || die "Unable to squelch noisy build system"
+
+ # Compile menuselect binary for optional components
+ emake menuselect.makeopts
+
+ # Broken functionality is forcibly disabled (bug #360143)
+ menuselect/menuselect --disable chan_misdn menuselect.makeopts
+ menuselect/menuselect --disable chan_ooh323 menuselect.makeopts
+
+ # Utility set is forcibly enabled (bug #358001)
+ menuselect/menuselect --enable smsq menuselect.makeopts
+ menuselect/menuselect --enable streamplayer menuselect.makeopts
+ menuselect/menuselect --enable aelparse menuselect.makeopts
+ menuselect/menuselect --enable astman menuselect.makeopts
+
+ # this is connected, otherwise it would not find
+ # ast_pktccops_gate_alloc symbol
+ menuselect/menuselect --enable chan_mgcp menuselect.makeopts
+ menuselect/menuselect --enable res_pktccops menuselect.makeopts
+
+ # SSL is forcibly enabled, IAX2 & DUNDI are expected to be available
+ menuselect/menuselect --enable pbx_dundi menuselect.makeopts
+ menuselect/menuselect --enable func_aes menuselect.makeopts
+ menuselect/menuselect --enable chan_iax2 menuselect.makeopts
+
+ # SQlite3 is now the main database backend, enable related features
+ menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts
+ menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts
+
+ # The others are based on USE-flag settings
+ use_select() {
+ local state=$(use "$1" && echo enable || echo disable)
+ shift # remove use from parameters
+
+ while [[ -n $1 ]]; do
+ menuselect/menuselect --${state} "$1" menuselect.makeopts
+ shift
+ done
+ }
+
+ use_select alsa chan_alsa
+ use_select bluetooth chan_mobile
+ use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar}
+ use_select cluster res_corosync
+ use_select curl func_curl res_config_curl res_curl
+ use_select dahdi app_dahdibarge app_dahdiras app_meetme chan_dahdi codec_dahdi res_timing_dahdi
+ use_select freetds {cdr,cel}_tds
+ use_select gtalk chan_motif
+ use_select http res_http_post
+ use_select iconv func_iconv
+ use_select xmpp res_xmpp
+ use_select ilbc codec_ilbc format_ilbc
+ use_select ldap res_config_ldap
+ use_select lua pbx_lua
+ use_select mysql app_mysql cdr_mysql res_config_mysql
+ use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc
+ use_select osplookup app_osplookup
+ use_select oss chan_oss
+ use_select postgres {cdr,cel}_pgsql res_config_pgsql
+ use_select radius {cdr,cel}_radius
+ use_select snmp res_snmp
+ use_select span res_fax_spandsp
+ use_select speex {codec,func}_speex
+ use_select srtp res_srtp
+ use_select syslog cdr_syslog
+ use_select vorbis format_ogg_vorbis
+
+ # Voicemail storage ...
+ for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do
+ if use ${vmst}; then
+ menuselect/menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts
+ fi
+ done
+
+ if use debug; then
+ for o in DONT_OPTIMIZE DEBUG_THREADS BETTER_BACKTRACES; do
+ menuselect/menuselect --enable $o menuselect.makeopts
+ done
+ fi
+}
+
+src_compile() {
+ ASTLDFLAGS="${LDFLAGS}" emake
+}
+
+src_install() {
+ mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die
+ emake DESTDIR="${D}" installdirs
+ emake DESTDIR="${D}" install
+
+ if use radius; then
+ insinto /etc/radiusclient-ng/
+ doins contrib/dictionary.digium
+ fi
+ diropts -m 0750 -o root -g asterisk
+ keepdir /etc/asterisk
+ if use samples; then
+ emake DESTDIR="${D}" samples
+ for conffile in "${D}"etc/asterisk/*.*
+ do
+ chown root:root $conffile
+ chmod 0644 $conffile
+ done
+ einfo "Sample files have been installed"
+ else
+ einfo "Skipping installation of sample files..."
+ rm -f "${D}"var/lib/asterisk/mohmp3/* || die
+ rm -f "${D}"var/lib/asterisk/sounds/demo-* || die
+ rm -f "${D}"var/lib/asterisk/agi-bin/* || die
+ rm -f "${D}"etc/asterisk/* || die
+ fi
+ rm -rf "${D}"var/spool/asterisk/voicemail/default || die
+
+ # keep directories
+ diropts -m 0770 -o asterisk asterisk
+ keepdir /var/lib/asterisk
+ keepdir /var/spool/asterisk
+ keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail}
+ diropts -m 0750 -o asterisk -g asterisk
+ keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
+
+ newinitd "${FILESDIR}"/1.8.0/asterisk.initd7 asterisk
+ newconfd "${FILESDIR}"/1.8.0/asterisk.confd asterisk
+
+ systemd_dounit "${FILESDIR}"/asterisk.service
+ systemd_newtmpfilesd "${FILESDIR}"/asterisk.tmpfiles.conf asterisk.conf
+ systemd_install_serviced "${FILESDIR}"/asterisk.service.conf
+
+ # install the upgrade documentation
+ #
+ dodoc README UPGRADE* BUGS CREDITS
+
+ # install extra documentation
+ #
+ if use doc
+ then
+ dodoc doc/*.txt
+ dodoc doc/*.pdf
+ fi
+
+ # install SIP scripts; bug #300832
+ #
+ dodoc "${FILESDIR}/1.6.2/sip_calc_auth"
+ dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh"
+ dodoc "${FILESDIR}/1.8.0/find_call_ids.sh"
+ dodoc "${FILESDIR}/1.6.2/call_data.txt"
+
+ # install logrotate snippet; bug #329281
+ #
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/1.6.2/asterisk.logrotate3" asterisk
+}
+
+pkg_postinst() {
+ #
+ # Announcements, warnings, reminders...
+ #
+ einfo "Asterisk has been installed"
+ echo
+ elog "If you want to know more about asterisk, visit these sites:"
+ elog "http://www.asteriskdocs.org/"
+ elog "http://www.voip-info.org/wiki-Asterisk"
+ echo
+ elog "http://www.automated.it/guidetoasterisk.htm"
+ echo
+ elog "Gentoo VoIP IRC Channel:"
+ elog "#gentoo-voip @ irc.freenode.net"
+ echo
+ echo
+ elog "Please read the Asterisk 11 upgrade document:"
+ elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+11"
+}
+
+pkg_config() {
+ einfo "Do you want to reset file permissions and ownerships (y/N)?"
+
+ read tmp
+ tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')"
+
+ if [[ "$tmp" = "y" ]] ||\
+ [[ "$tmp" = "yes" ]]
+ then
+ einfo "Resetting permissions to defaults..."
+
+ for x in spool run lib log; do
+ chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk
+ chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk
+ done
+
+ chown -R root:asterisk "${ROOT}"etc/asterisk
+ chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk
+
+ einfo "done"
+ else
+ einfo "skipping"
+ fi
+}
diff --git a/net-misc/asterisk/asterisk-11.18.0.ebuild b/net-misc/asterisk/asterisk-11.18.0.ebuild
new file mode 100644
index 000000000000..a2f9bb40a5a1
--- /dev/null
+++ b/net-misc/asterisk/asterisk-11.18.0.ebuild
@@ -0,0 +1,324 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools base eutils linux-info multilib user systemd
+
+MY_P="${PN}-${PV/_/-}"
+
+DESCRIPTION="Asterisk: A Modular Open Source PBX System"
+HOMEPAGE="http://www.asterisk.org/"
+SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz
+ mirror://gentoo/gentoo-asterisk-patchset-3.16.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE_VOICEMAIL_STORAGE="
+ +voicemail_storage_file
+ voicemail_storage_odbc
+ voicemail_storage_imap
+"
+IUSE="${IUSE_VOICEMAIL_STORAGE} alsa bluetooth calendar +caps cluster curl dahdi debug doc freetds gtalk http iconv ilbc xmpp ldap libedit lua mysql newt +samples odbc osplookup oss portaudio postgres radius selinux snmp span speex srtp static syslog vorbis"
+IUSE_EXPAND="VOICEMAIL_STORAGE"
+REQUIRED_USE="gtalk? ( xmpp )
+ ^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} )
+ voicemail_storage_odbc? ( odbc )
+"
+
+EPATCH_SUFFIX="patch"
+PATCHES=( "${WORKDIR}/asterisk-patchset" )
+
+CDEPEND="dev-db/sqlite:3
+ dev-libs/popt
+ dev-libs/libxml2
+ dev-libs/openssl:*
+ sys-libs/ncurses
+ sys-libs/zlib
+ alsa? ( media-libs/alsa-lib )
+ bluetooth? ( net-wireless/bluez )
+ calendar? ( net-libs/neon
+ dev-libs/libical
+ dev-libs/iksemel )
+ caps? ( sys-libs/libcap )
+ cluster? ( sys-cluster/corosync )
+ curl? ( net-misc/curl )
+ dahdi? ( >=net-libs/libpri-1.4.12_beta2
+ net-misc/dahdi-tools )
+ freetds? ( dev-db/freetds )
+ gtalk? ( dev-libs/iksemel )
+ http? ( dev-libs/gmime:2.6 )
+ iconv? ( virtual/libiconv )
+ ilbc? ( dev-libs/ilbc-rfc3951 )
+ xmpp? ( dev-libs/iksemel )
+ ldap? ( net-nds/openldap )
+ libedit? ( dev-libs/libedit )
+ lua? ( dev-lang/lua:* )
+ mysql? ( virtual/mysql )
+ newt? ( dev-libs/newt )
+ odbc? ( dev-db/unixODBC )
+ osplookup? ( net-libs/osptoolkit )
+ portaudio? ( media-libs/portaudio )
+ postgres? ( dev-db/postgresql:* )
+ radius? ( net-dialup/radiusclient-ng )
+ snmp? ( net-analyzer/net-snmp )
+ span? ( media-libs/spandsp )
+ speex? ( media-libs/speex )
+ srtp? ( net-libs/libsrtp )
+ vorbis? ( media-libs/libvorbis )"
+
+DEPEND="${CDEPEND}
+ !net-libs/openh323
+ !net-libs/pjsip
+ voicemail_storage_imap? ( virtual/imap-c-client )
+ virtual/pkgconfig
+"
+
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-asterisk )
+ syslog? ( virtual/logger )"
+
+PDEPEND="net-misc/asterisk-core-sounds
+ net-misc/asterisk-extra-sounds
+ net-misc/asterisk-moh-opsound"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ CONFIG_CHECK="~!NF_CONNTRACK_SIP"
+ local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users
+ have reported that this module dropped critical SIP packets in their deployments. You
+ may want to disable it if you see such problems."
+ check_extra_config
+
+ enewgroup asterisk
+ enewgroup dialout 20
+ enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout"
+}
+
+src_prepare() {
+ base_src_prepare
+ AT_M4DIR=autoconf eautoreconf
+}
+
+src_configure() {
+ local vmst
+
+ econf \
+ --libdir="/usr/$(get_libdir)" \
+ --localstatedir="/var" \
+ --with-crypto \
+ --with-gsm=internal \
+ --with-popt \
+ --with-ssl \
+ --with-z \
+ --without-pwlib \
+ $(use_with caps cap) \
+ $(use_with http gmime) \
+ $(use_with newt) \
+ $(use_with portaudio)
+
+ # Blank out sounds/sounds.xml file to prevent
+ # asterisk from installing sounds files (we pull them in via
+ # asterisk-{core,extra}-sounds and asterisk-moh-opsound.
+ >"${S}"/sounds/sounds.xml
+
+ # That NATIVE_ARCH chatter really is quite bothersome
+ sed -i 's/NATIVE_ARCH=/NATIVE_ARCH=0/' build_tools/menuselect-deps || die "Unable to squelch noisy build system"
+
+ # Compile menuselect binary for optional components
+ emake menuselect.makeopts
+
+ # Broken functionality is forcibly disabled (bug #360143)
+ menuselect/menuselect --disable chan_misdn menuselect.makeopts
+ menuselect/menuselect --disable chan_ooh323 menuselect.makeopts
+
+ # Utility set is forcibly enabled (bug #358001)
+ menuselect/menuselect --enable smsq menuselect.makeopts
+ menuselect/menuselect --enable streamplayer menuselect.makeopts
+ menuselect/menuselect --enable aelparse menuselect.makeopts
+ menuselect/menuselect --enable astman menuselect.makeopts
+
+ # this is connected, otherwise it would not find
+ # ast_pktccops_gate_alloc symbol
+ menuselect/menuselect --enable chan_mgcp menuselect.makeopts
+ menuselect/menuselect --enable res_pktccops menuselect.makeopts
+
+ # SSL is forcibly enabled, IAX2 & DUNDI are expected to be available
+ menuselect/menuselect --enable pbx_dundi menuselect.makeopts
+ menuselect/menuselect --enable func_aes menuselect.makeopts
+ menuselect/menuselect --enable chan_iax2 menuselect.makeopts
+
+ # SQlite3 is now the main database backend, enable related features
+ menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts
+ menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts
+
+ # The others are based on USE-flag settings
+ use_select() {
+ local state=$(use "$1" && echo enable || echo disable)
+ shift # remove use from parameters
+
+ while [[ -n $1 ]]; do
+ menuselect/menuselect --${state} "$1" menuselect.makeopts
+ shift
+ done
+ }
+
+ use_select alsa chan_alsa
+ use_select bluetooth chan_mobile
+ use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar}
+ use_select cluster res_corosync
+ use_select curl func_curl res_config_curl res_curl
+ use_select dahdi app_dahdibarge app_dahdiras app_meetme chan_dahdi codec_dahdi res_timing_dahdi
+ use_select freetds {cdr,cel}_tds
+ use_select gtalk chan_motif
+ use_select http res_http_post
+ use_select iconv func_iconv
+ use_select xmpp res_xmpp
+ use_select ilbc codec_ilbc format_ilbc
+ use_select ldap res_config_ldap
+ use_select lua pbx_lua
+ use_select mysql app_mysql cdr_mysql res_config_mysql
+ use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc
+ use_select osplookup app_osplookup
+ use_select oss chan_oss
+ use_select postgres {cdr,cel}_pgsql res_config_pgsql
+ use_select radius {cdr,cel}_radius
+ use_select snmp res_snmp
+ use_select span res_fax_spandsp
+ use_select speex {codec,func}_speex
+ use_select srtp res_srtp
+ use_select syslog cdr_syslog
+ use_select vorbis format_ogg_vorbis
+
+ # Voicemail storage ...
+ for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do
+ if use ${vmst}; then
+ menuselect/menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts
+ fi
+ done
+
+ if use debug; then
+ for o in DONT_OPTIMIZE DEBUG_THREADS BETTER_BACKTRACES; do
+ menuselect/menuselect --enable $o menuselect.makeopts
+ done
+ fi
+}
+
+src_compile() {
+ ASTLDFLAGS="${LDFLAGS}" emake
+}
+
+src_install() {
+ mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die
+ emake DESTDIR="${D}" installdirs
+ emake DESTDIR="${D}" install
+
+ if use radius; then
+ insinto /etc/radiusclient-ng/
+ doins contrib/dictionary.digium
+ fi
+ diropts -m 0750 -o root -g asterisk
+ keepdir /etc/asterisk
+ if use samples; then
+ emake DESTDIR="${D}" samples
+ for conffile in "${D}"etc/asterisk/*.*
+ do
+ chown root:root $conffile
+ chmod 0644 $conffile
+ done
+ einfo "Sample files have been installed"
+ else
+ einfo "Skipping installation of sample files..."
+ rm -f "${D}"var/lib/asterisk/mohmp3/* || die
+ rm -f "${D}"var/lib/asterisk/sounds/demo-* || die
+ rm -f "${D}"var/lib/asterisk/agi-bin/* || die
+ rm -f "${D}"etc/asterisk/* || die
+ fi
+ rm -rf "${D}"var/spool/asterisk/voicemail/default || die
+
+ # keep directories
+ diropts -m 0770 -o asterisk asterisk
+ keepdir /var/lib/asterisk
+ keepdir /var/spool/asterisk
+ keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail}
+ diropts -m 0750 -o asterisk -g asterisk
+ keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
+
+ newinitd "${FILESDIR}"/1.8.0/asterisk.initd7 asterisk
+ newconfd "${FILESDIR}"/1.8.0/asterisk.confd asterisk
+
+ systemd_dounit "${FILESDIR}"/asterisk.service
+ systemd_newtmpfilesd "${FILESDIR}"/asterisk.tmpfiles.conf asterisk.conf
+ systemd_install_serviced "${FILESDIR}"/asterisk.service.conf
+
+ # install the upgrade documentation
+ #
+ dodoc README UPGRADE* BUGS CREDITS
+
+ # install extra documentation
+ #
+ if use doc
+ then
+ dodoc doc/*.txt
+ dodoc doc/*.pdf
+ fi
+
+ # install SIP scripts; bug #300832
+ #
+ dodoc "${FILESDIR}/1.6.2/sip_calc_auth"
+ dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh"
+ dodoc "${FILESDIR}/1.8.0/find_call_ids.sh"
+ dodoc "${FILESDIR}/1.6.2/call_data.txt"
+
+ # install logrotate snippet; bug #329281
+ #
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/1.6.2/asterisk.logrotate4" asterisk
+}
+
+pkg_postinst() {
+ #
+ # Announcements, warnings, reminders...
+ #
+ einfo "Asterisk has been installed"
+ echo
+ elog "If you want to know more about asterisk, visit these sites:"
+ elog "http://www.asteriskdocs.org/"
+ elog "http://www.voip-info.org/wiki-Asterisk"
+ echo
+ elog "http://www.automated.it/guidetoasterisk.htm"
+ echo
+ elog "Gentoo VoIP IRC Channel:"
+ elog "#gentoo-voip @ irc.freenode.net"
+ echo
+ echo
+ elog "Please read the Asterisk 11 upgrade document:"
+ elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+11"
+}
+
+pkg_config() {
+ einfo "Do you want to reset file permissions and ownerships (y/N)?"
+
+ read tmp
+ tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')"
+
+ if [[ "$tmp" = "y" ]] ||\
+ [[ "$tmp" = "yes" ]]
+ then
+ einfo "Resetting permissions to defaults..."
+
+ for x in spool run lib log; do
+ chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk
+ chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk
+ done
+
+ chown -R root:asterisk "${ROOT}"etc/asterisk
+ chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk
+
+ einfo "done"
+ else
+ einfo "skipping"
+ fi
+}
diff --git a/net-misc/asterisk/asterisk-13.3.2.ebuild b/net-misc/asterisk/asterisk-13.3.2.ebuild
new file mode 100644
index 000000000000..f7c69b9237c1
--- /dev/null
+++ b/net-misc/asterisk/asterisk-13.3.2.ebuild
@@ -0,0 +1,325 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools base eutils linux-info multilib user systemd
+
+MY_P="${PN}-${PV/_/-}"
+
+DESCRIPTION="Asterisk: A Modular Open Source PBX System"
+HOMEPAGE="http://www.asterisk.org/"
+SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz
+ mirror://gentoo/gentoo-asterisk-patchset-4.01.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE_VOICEMAIL_STORAGE="
+ +voicemail_storage_file
+ voicemail_storage_odbc
+ voicemail_storage_imap
+"
+IUSE="${IUSE_VOICEMAIL_STORAGE} alsa bluetooth calendar +caps cluster curl dahdi debug doc freetds gtalk http iconv ilbc xmpp ldap libedit lua mysql newt +samples odbc osplookup oss portaudio postgres radius selinux snmp span speex srtp static syslog vorbis"
+IUSE_EXPAND="VOICEMAIL_STORAGE"
+REQUIRED_USE="gtalk? ( xmpp )
+ ^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} )
+ voicemail_storage_odbc? ( odbc )
+"
+
+EPATCH_SUFFIX="patch"
+PATCHES=( "${WORKDIR}/asterisk-patchset" )
+
+CDEPEND="dev-db/sqlite:3
+ dev-libs/popt
+ dev-libs/jansson
+ dev-libs/libxml2
+ dev-libs/openssl:*
+ sys-libs/ncurses
+ sys-libs/zlib
+ alsa? ( media-libs/alsa-lib )
+ bluetooth? ( net-wireless/bluez )
+ calendar? ( net-libs/neon
+ dev-libs/libical
+ dev-libs/iksemel )
+ caps? ( sys-libs/libcap )
+ cluster? ( sys-cluster/corosync )
+ curl? ( net-misc/curl )
+ dahdi? ( >=net-libs/libpri-1.4.12_beta2
+ net-misc/dahdi-tools )
+ freetds? ( dev-db/freetds )
+ gtalk? ( dev-libs/iksemel )
+ http? ( dev-libs/gmime:2.6 )
+ iconv? ( virtual/libiconv )
+ ilbc? ( dev-libs/ilbc-rfc3951 )
+ xmpp? ( dev-libs/iksemel )
+ ldap? ( net-nds/openldap )
+ libedit? ( dev-libs/libedit )
+ lua? ( dev-lang/lua:* )
+ mysql? ( virtual/mysql )
+ newt? ( dev-libs/newt )
+ odbc? ( dev-db/unixODBC )
+ osplookup? ( net-libs/osptoolkit )
+ portaudio? ( media-libs/portaudio )
+ postgres? ( dev-db/postgresql:* )
+ radius? ( net-dialup/radiusclient-ng )
+ snmp? ( net-analyzer/net-snmp )
+ span? ( media-libs/spandsp )
+ speex? ( media-libs/speex )
+ srtp? ( net-libs/libsrtp )
+ vorbis? ( media-libs/libvorbis )"
+
+DEPEND="${CDEPEND}
+ !net-libs/openh323
+ !net-libs/pjsip
+ voicemail_storage_imap? ( virtual/imap-c-client )
+ virtual/pkgconfig
+"
+
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-asterisk )
+ syslog? ( virtual/logger )"
+
+PDEPEND="net-misc/asterisk-core-sounds
+ net-misc/asterisk-extra-sounds
+ net-misc/asterisk-moh-opsound"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ CONFIG_CHECK="~!NF_CONNTRACK_SIP"
+ local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users
+ have reported that this module dropped critical SIP packets in their deployments. You
+ may want to disable it if you see such problems."
+ check_extra_config
+
+ enewgroup asterisk
+ enewgroup dialout 20
+ enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout"
+}
+
+src_prepare() {
+ base_src_prepare
+ AT_M4DIR=autoconf eautoreconf
+}
+
+src_configure() {
+ local vmst
+
+ econf \
+ --libdir="/usr/$(get_libdir)" \
+ --localstatedir="/var" \
+ --with-crypto \
+ --with-gsm=internal \
+ --with-popt \
+ --with-ssl \
+ --with-z \
+ --without-pwlib \
+ $(use_with caps cap) \
+ $(use_with http gmime) \
+ $(use_with newt) \
+ $(use_with portaudio)
+
+ # Blank out sounds/sounds.xml file to prevent
+ # asterisk from installing sounds files (we pull them in via
+ # asterisk-{core,extra}-sounds and asterisk-moh-opsound.
+ >"${S}"/sounds/sounds.xml
+
+ # That NATIVE_ARCH chatter really is quite bothersome
+ sed -i 's/NATIVE_ARCH=/NATIVE_ARCH=0/' build_tools/menuselect-deps || die "Unable to squelch noisy build system"
+
+ # Compile menuselect binary for optional components
+ emake menuselect.makeopts
+
+ # Broken functionality is forcibly disabled (bug #360143)
+ menuselect/menuselect --disable chan_misdn menuselect.makeopts
+ menuselect/menuselect --disable chan_ooh323 menuselect.makeopts
+
+ # Utility set is forcibly enabled (bug #358001)
+ menuselect/menuselect --enable smsq menuselect.makeopts
+ menuselect/menuselect --enable streamplayer menuselect.makeopts
+ menuselect/menuselect --enable aelparse menuselect.makeopts
+ menuselect/menuselect --enable astman menuselect.makeopts
+
+ # this is connected, otherwise it would not find
+ # ast_pktccops_gate_alloc symbol
+ menuselect/menuselect --enable chan_mgcp menuselect.makeopts
+ menuselect/menuselect --enable res_pktccops menuselect.makeopts
+
+ # SSL is forcibly enabled, IAX2 & DUNDI are expected to be available
+ menuselect/menuselect --enable pbx_dundi menuselect.makeopts
+ menuselect/menuselect --enable func_aes menuselect.makeopts
+ menuselect/menuselect --enable chan_iax2 menuselect.makeopts
+
+ # SQlite3 is now the main database backend, enable related features
+ menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts
+ menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts
+
+ # The others are based on USE-flag settings
+ use_select() {
+ local state=$(use "$1" && echo enable || echo disable)
+ shift # remove use from parameters
+
+ while [[ -n $1 ]]; do
+ menuselect/menuselect --${state} "$1" menuselect.makeopts
+ shift
+ done
+ }
+
+ use_select alsa chan_alsa
+ use_select bluetooth chan_mobile
+ use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar}
+ use_select cluster res_corosync
+ use_select curl func_curl res_config_curl res_curl
+ use_select dahdi app_dahdibarge app_dahdiras app_meetme chan_dahdi codec_dahdi res_timing_dahdi
+ use_select freetds {cdr,cel}_tds
+ use_select gtalk chan_motif
+ use_select http res_http_post
+ use_select iconv func_iconv
+ use_select xmpp res_xmpp
+ use_select ilbc codec_ilbc format_ilbc
+ use_select ldap res_config_ldap
+ use_select lua pbx_lua
+ use_select mysql app_mysql cdr_mysql res_config_mysql
+ use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc
+ use_select osplookup app_osplookup
+ use_select oss chan_oss
+ use_select postgres {cdr,cel}_pgsql res_config_pgsql
+ use_select radius {cdr,cel}_radius
+ use_select snmp res_snmp
+ use_select span res_fax_spandsp
+ use_select speex {codec,func}_speex
+ use_select srtp res_srtp
+ use_select syslog cdr_syslog
+ use_select vorbis format_ogg_vorbis
+
+ # Voicemail storage ...
+ for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do
+ if use ${vmst}; then
+ menuselect/menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts
+ fi
+ done
+
+ if use debug; then
+ for o in DONT_OPTIMIZE DEBUG_THREADS BETTER_BACKTRACES; do
+ menuselect/menuselect --enable $o menuselect.makeopts
+ done
+ fi
+}
+
+src_compile() {
+ ASTLDFLAGS="${LDFLAGS}" emake
+}
+
+src_install() {
+ mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die
+ emake DESTDIR="${D}" installdirs
+ emake DESTDIR="${D}" install
+
+ if use radius; then
+ insinto /etc/radiusclient-ng/
+ doins contrib/dictionary.digium
+ fi
+ diropts -m 0750 -o root -g asterisk
+ keepdir /etc/asterisk
+ if use samples; then
+ emake DESTDIR="${D}" samples
+ for conffile in "${D}"etc/asterisk/*.*
+ do
+ chown root:root $conffile
+ chmod 0644 $conffile
+ done
+ einfo "Sample files have been installed"
+ else
+ einfo "Skipping installation of sample files..."
+ rm -f "${D}"var/lib/asterisk/mohmp3/* || die
+ rm -f "${D}"var/lib/asterisk/sounds/demo-* || die
+ rm -f "${D}"var/lib/asterisk/agi-bin/* || die
+ rm -f "${D}"etc/asterisk/* || die
+ fi
+ rm -rf "${D}"var/spool/asterisk/voicemail/default || die
+
+ # keep directories
+ diropts -m 0770 -o asterisk asterisk
+ keepdir /var/lib/asterisk
+ keepdir /var/spool/asterisk
+ keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail}
+ diropts -m 0750 -o asterisk -g asterisk
+ keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
+
+ newinitd "${FILESDIR}"/1.8.0/asterisk.initd7 asterisk
+ newconfd "${FILESDIR}"/1.8.0/asterisk.confd asterisk
+
+ systemd_dounit "${FILESDIR}"/asterisk.service
+ systemd_newtmpfilesd "${FILESDIR}"/asterisk.tmpfiles.conf asterisk.conf
+ systemd_install_serviced "${FILESDIR}"/asterisk.service.conf
+
+ # install the upgrade documentation
+ #
+ dodoc README UPGRADE* BUGS CREDITS
+
+ # install extra documentation
+ #
+ if use doc
+ then
+ dodoc doc/*.txt
+ dodoc doc/*.pdf
+ fi
+
+ # install SIP scripts; bug #300832
+ #
+ dodoc "${FILESDIR}/1.6.2/sip_calc_auth"
+ dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh"
+ dodoc "${FILESDIR}/1.8.0/find_call_ids.sh"
+ dodoc "${FILESDIR}/1.6.2/call_data.txt"
+
+ # install logrotate snippet; bug #329281
+ #
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/1.6.2/asterisk.logrotate3" asterisk
+}
+
+pkg_postinst() {
+ #
+ # Announcements, warnings, reminders...
+ #
+ einfo "Asterisk has been installed"
+ echo
+ elog "If you want to know more about asterisk, visit these sites:"
+ elog "http://www.asteriskdocs.org/"
+ elog "http://www.voip-info.org/wiki-Asterisk"
+ echo
+ elog "http://www.automated.it/guidetoasterisk.htm"
+ echo
+ elog "Gentoo VoIP IRC Channel:"
+ elog "#gentoo-voip @ irc.freenode.net"
+ echo
+ echo
+ elog "Please read the Asterisk 13 upgrade document:"
+ elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+13"
+}
+
+pkg_config() {
+ einfo "Do you want to reset file permissions and ownerships (y/N)?"
+
+ read tmp
+ tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')"
+
+ if [[ "$tmp" = "y" ]] ||\
+ [[ "$tmp" = "yes" ]]
+ then
+ einfo "Resetting permissions to defaults..."
+
+ for x in spool run lib log; do
+ chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk
+ chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk
+ done
+
+ chown -R root:asterisk "${ROOT}"etc/asterisk
+ chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk
+
+ einfo "done"
+ else
+ einfo "skipping"
+ fi
+}
diff --git a/net-misc/asterisk/asterisk-13.4.0.ebuild b/net-misc/asterisk/asterisk-13.4.0.ebuild
new file mode 100644
index 000000000000..7d7b383a319d
--- /dev/null
+++ b/net-misc/asterisk/asterisk-13.4.0.ebuild
@@ -0,0 +1,325 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools base eutils linux-info multilib user systemd
+
+MY_P="${PN}-${PV/_/-}"
+
+DESCRIPTION="Asterisk: A Modular Open Source PBX System"
+HOMEPAGE="http://www.asterisk.org/"
+SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz
+ mirror://gentoo/gentoo-asterisk-patchset-4.02.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE_VOICEMAIL_STORAGE="
+ +voicemail_storage_file
+ voicemail_storage_odbc
+ voicemail_storage_imap
+"
+IUSE="${IUSE_VOICEMAIL_STORAGE} alsa bluetooth calendar +caps cluster curl dahdi debug doc freetds gtalk http iconv ilbc xmpp ldap libedit lua mysql newt +samples odbc osplookup oss portaudio postgres radius selinux snmp span speex srtp static syslog vorbis"
+IUSE_EXPAND="VOICEMAIL_STORAGE"
+REQUIRED_USE="gtalk? ( xmpp )
+ ^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} )
+ voicemail_storage_odbc? ( odbc )
+"
+
+EPATCH_SUFFIX="patch"
+PATCHES=( "${WORKDIR}/asterisk-patchset" )
+
+CDEPEND="dev-db/sqlite:3
+ dev-libs/popt
+ dev-libs/jansson
+ dev-libs/libxml2
+ dev-libs/openssl:*
+ sys-libs/ncurses
+ sys-libs/zlib
+ alsa? ( media-libs/alsa-lib )
+ bluetooth? ( net-wireless/bluez )
+ calendar? ( net-libs/neon
+ dev-libs/libical
+ dev-libs/iksemel )
+ caps? ( sys-libs/libcap )
+ cluster? ( sys-cluster/corosync )
+ curl? ( net-misc/curl )
+ dahdi? ( >=net-libs/libpri-1.4.12_beta2
+ net-misc/dahdi-tools )
+ freetds? ( dev-db/freetds )
+ gtalk? ( dev-libs/iksemel )
+ http? ( dev-libs/gmime:2.6 )
+ iconv? ( virtual/libiconv )
+ ilbc? ( dev-libs/ilbc-rfc3951 )
+ xmpp? ( dev-libs/iksemel )
+ ldap? ( net-nds/openldap )
+ libedit? ( dev-libs/libedit )
+ lua? ( dev-lang/lua:* )
+ mysql? ( virtual/mysql )
+ newt? ( dev-libs/newt )
+ odbc? ( dev-db/unixODBC )
+ osplookup? ( net-libs/osptoolkit )
+ portaudio? ( media-libs/portaudio )
+ postgres? ( dev-db/postgresql:* )
+ radius? ( net-dialup/radiusclient-ng )
+ snmp? ( net-analyzer/net-snmp )
+ span? ( media-libs/spandsp )
+ speex? ( media-libs/speex )
+ srtp? ( net-libs/libsrtp )
+ vorbis? ( media-libs/libvorbis )"
+
+DEPEND="${CDEPEND}
+ !net-libs/openh323
+ !net-libs/pjsip
+ voicemail_storage_imap? ( virtual/imap-c-client )
+ virtual/pkgconfig
+"
+
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-asterisk )
+ syslog? ( virtual/logger )"
+
+PDEPEND="net-misc/asterisk-core-sounds
+ net-misc/asterisk-extra-sounds
+ net-misc/asterisk-moh-opsound"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ CONFIG_CHECK="~!NF_CONNTRACK_SIP"
+ local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users
+ have reported that this module dropped critical SIP packets in their deployments. You
+ may want to disable it if you see such problems."
+ check_extra_config
+
+ enewgroup asterisk
+ enewgroup dialout 20
+ enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout"
+}
+
+src_prepare() {
+ base_src_prepare
+ AT_M4DIR=autoconf eautoreconf
+}
+
+src_configure() {
+ local vmst
+
+ econf \
+ --libdir="/usr/$(get_libdir)" \
+ --localstatedir="/var" \
+ --with-crypto \
+ --with-gsm=internal \
+ --with-popt \
+ --with-ssl \
+ --with-z \
+ --without-pwlib \
+ $(use_with caps cap) \
+ $(use_with http gmime) \
+ $(use_with newt) \
+ $(use_with portaudio)
+
+ # Blank out sounds/sounds.xml file to prevent
+ # asterisk from installing sounds files (we pull them in via
+ # asterisk-{core,extra}-sounds and asterisk-moh-opsound.
+ >"${S}"/sounds/sounds.xml
+
+ # That NATIVE_ARCH chatter really is quite bothersome
+ sed -i 's/NATIVE_ARCH=/NATIVE_ARCH=0/' build_tools/menuselect-deps || die "Unable to squelch noisy build system"
+
+ # Compile menuselect binary for optional components
+ emake menuselect.makeopts
+
+ # Broken functionality is forcibly disabled (bug #360143)
+ menuselect/menuselect --disable chan_misdn menuselect.makeopts
+ menuselect/menuselect --disable chan_ooh323 menuselect.makeopts
+
+ # Utility set is forcibly enabled (bug #358001)
+ menuselect/menuselect --enable smsq menuselect.makeopts
+ menuselect/menuselect --enable streamplayer menuselect.makeopts
+ menuselect/menuselect --enable aelparse menuselect.makeopts
+ menuselect/menuselect --enable astman menuselect.makeopts
+
+ # this is connected, otherwise it would not find
+ # ast_pktccops_gate_alloc symbol
+ menuselect/menuselect --enable chan_mgcp menuselect.makeopts
+ menuselect/menuselect --enable res_pktccops menuselect.makeopts
+
+ # SSL is forcibly enabled, IAX2 & DUNDI are expected to be available
+ menuselect/menuselect --enable pbx_dundi menuselect.makeopts
+ menuselect/menuselect --enable func_aes menuselect.makeopts
+ menuselect/menuselect --enable chan_iax2 menuselect.makeopts
+
+ # SQlite3 is now the main database backend, enable related features
+ menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts
+ menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts
+
+ # The others are based on USE-flag settings
+ use_select() {
+ local state=$(use "$1" && echo enable || echo disable)
+ shift # remove use from parameters
+
+ while [[ -n $1 ]]; do
+ menuselect/menuselect --${state} "$1" menuselect.makeopts
+ shift
+ done
+ }
+
+ use_select alsa chan_alsa
+ use_select bluetooth chan_mobile
+ use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar}
+ use_select cluster res_corosync
+ use_select curl func_curl res_config_curl res_curl
+ use_select dahdi app_dahdibarge app_dahdiras app_meetme chan_dahdi codec_dahdi res_timing_dahdi
+ use_select freetds {cdr,cel}_tds
+ use_select gtalk chan_motif
+ use_select http res_http_post
+ use_select iconv func_iconv
+ use_select xmpp res_xmpp
+ use_select ilbc codec_ilbc format_ilbc
+ use_select ldap res_config_ldap
+ use_select lua pbx_lua
+ use_select mysql app_mysql cdr_mysql res_config_mysql
+ use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc
+ use_select osplookup app_osplookup
+ use_select oss chan_oss
+ use_select postgres {cdr,cel}_pgsql res_config_pgsql
+ use_select radius {cdr,cel}_radius
+ use_select snmp res_snmp
+ use_select span res_fax_spandsp
+ use_select speex {codec,func}_speex
+ use_select srtp res_srtp
+ use_select syslog cdr_syslog
+ use_select vorbis format_ogg_vorbis
+
+ # Voicemail storage ...
+ for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do
+ if use ${vmst}; then
+ menuselect/menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts
+ fi
+ done
+
+ if use debug; then
+ for o in DONT_OPTIMIZE DEBUG_THREADS BETTER_BACKTRACES; do
+ menuselect/menuselect --enable $o menuselect.makeopts
+ done
+ fi
+}
+
+src_compile() {
+ ASTLDFLAGS="${LDFLAGS}" emake
+}
+
+src_install() {
+ mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die
+ emake DESTDIR="${D}" installdirs
+ emake DESTDIR="${D}" install
+
+ if use radius; then
+ insinto /etc/radiusclient-ng/
+ doins contrib/dictionary.digium
+ fi
+ diropts -m 0750 -o root -g asterisk
+ keepdir /etc/asterisk
+ if use samples; then
+ emake DESTDIR="${D}" samples
+ for conffile in "${D}"etc/asterisk/*.*
+ do
+ chown root:root $conffile
+ chmod 0644 $conffile
+ done
+ einfo "Sample files have been installed"
+ else
+ einfo "Skipping installation of sample files..."
+ rm -f "${D}"var/lib/asterisk/mohmp3/* || die
+ rm -f "${D}"var/lib/asterisk/sounds/demo-* || die
+ rm -f "${D}"var/lib/asterisk/agi-bin/* || die
+ rm -f "${D}"etc/asterisk/* || die
+ fi
+ rm -rf "${D}"var/spool/asterisk/voicemail/default || die
+
+ # keep directories
+ diropts -m 0770 -o asterisk asterisk
+ keepdir /var/lib/asterisk
+ keepdir /var/spool/asterisk
+ keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail}
+ diropts -m 0750 -o asterisk -g asterisk
+ keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
+
+ newinitd "${FILESDIR}"/1.8.0/asterisk.initd7 asterisk
+ newconfd "${FILESDIR}"/1.8.0/asterisk.confd asterisk
+
+ systemd_dounit "${FILESDIR}"/asterisk.service
+ systemd_newtmpfilesd "${FILESDIR}"/asterisk.tmpfiles.conf asterisk.conf
+ systemd_install_serviced "${FILESDIR}"/asterisk.service.conf
+
+ # install the upgrade documentation
+ #
+ dodoc README UPGRADE* BUGS CREDITS
+
+ # install extra documentation
+ #
+ if use doc
+ then
+ dodoc doc/*.txt
+ dodoc doc/*.pdf
+ fi
+
+ # install SIP scripts; bug #300832
+ #
+ dodoc "${FILESDIR}/1.6.2/sip_calc_auth"
+ dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh"
+ dodoc "${FILESDIR}/1.8.0/find_call_ids.sh"
+ dodoc "${FILESDIR}/1.6.2/call_data.txt"
+
+ # install logrotate snippet; bug #329281
+ #
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/1.6.2/asterisk.logrotate4" asterisk
+}
+
+pkg_postinst() {
+ #
+ # Announcements, warnings, reminders...
+ #
+ einfo "Asterisk has been installed"
+ echo
+ elog "If you want to know more about asterisk, visit these sites:"
+ elog "http://www.asteriskdocs.org/"
+ elog "http://www.voip-info.org/wiki-Asterisk"
+ echo
+ elog "http://www.automated.it/guidetoasterisk.htm"
+ echo
+ elog "Gentoo VoIP IRC Channel:"
+ elog "#gentoo-voip @ irc.freenode.net"
+ echo
+ echo
+ elog "Please read the Asterisk 13 upgrade document:"
+ elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+13"
+}
+
+pkg_config() {
+ einfo "Do you want to reset file permissions and ownerships (y/N)?"
+
+ read tmp
+ tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')"
+
+ if [[ "$tmp" = "y" ]] ||\
+ [[ "$tmp" = "yes" ]]
+ then
+ einfo "Resetting permissions to defaults..."
+
+ for x in spool run lib log; do
+ chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk
+ chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk
+ done
+
+ chown -R root:asterisk "${ROOT}"etc/asterisk
+ chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk
+
+ einfo "done"
+ else
+ einfo "skipping"
+ fi
+}
diff --git a/net-misc/asterisk/files/1.6.2/asterisk.logrotate3 b/net-misc/asterisk/files/1.6.2/asterisk.logrotate3
new file mode 100644
index 000000000000..69296c99e66d
--- /dev/null
+++ b/net-misc/asterisk/files/1.6.2/asterisk.logrotate3
@@ -0,0 +1,25 @@
+/var/log/asterisk/messages /var/log/asterisk/queue_log {
+ missingok
+ notifempty
+
+ postrotate
+ /usr/sbin/asterisk -rnx "logger reload" || /bin/true
+ endscript
+}
+
+/var/log/asterisk/debug /var/log/asterisk/full {
+ missingok
+ notifempty
+ daily
+
+ postrotate
+ /usr/sbin/asterisk -rnx "logger reload" || /bin/true
+ endscript
+}
+
+/var/log/asterisk/cdr-csv/*.csv /var/log/asterisk/cdr-custom/*.csv {
+ missingok
+ notifempty
+ weekly
+ rotate 52
+}
diff --git a/net-misc/asterisk/files/1.6.2/asterisk.logrotate4 b/net-misc/asterisk/files/1.6.2/asterisk.logrotate4
new file mode 100644
index 000000000000..857a970b3aa4
--- /dev/null
+++ b/net-misc/asterisk/files/1.6.2/asterisk.logrotate4
@@ -0,0 +1,25 @@
+/var/log/asterisk/messages /var/log/asterisk/queue_log {
+ missingok
+ notifempty
+
+ postrotate
+ /etc/init.d/asterisk --quiet status && /usr/sbin/asterisk -rnx "logger reload" || /bin/true
+ endscript
+}
+
+/var/log/asterisk/debug /var/log/asterisk/full {
+ missingok
+ notifempty
+ daily
+
+ postrotate
+ /etc/init.d/asterisk --quiet status && /usr/sbin/asterisk -rnx "logger reload" || /bin/true
+ endscript
+}
+
+/var/log/asterisk/cdr-csv/*.csv /var/log/asterisk/cdr-custom/*.csv {
+ missingok
+ notifempty
+ weekly
+ rotate 52
+}
diff --git a/net-misc/asterisk/files/1.6.2/call_data.txt b/net-misc/asterisk/files/1.6.2/call_data.txt
new file mode 100644
index 000000000000..ba9cbbba98b5
--- /dev/null
+++ b/net-misc/asterisk/files/1.6.2/call_data.txt
@@ -0,0 +1,32 @@
+It's sometimes useful to look at SIP conversations in retrospect. If you have
+a troublesome system, enable sip debug (in the CLI: sip set debug on), set up
+logger.conf to log it to some file and then you can use the two scripts here to
+extract the SIP converssations as seen by asterisk.
+
+find_call_ids.sh:
+
+This script will locate Call-ID values given an A and B number. Just invoke it with:
+
+find_call_ids.sh /path/to/log A-num B-num
+
+eg:
+
+find_call_ids.sh /var/log/asterisk/debug 102 105
+
+To find the Call-IDs for calls going from ext 102 to ext 105 (depends on your
+exact setup and the actual values being passed in the SIP INVITE packets)
+
+find_call_sip_trace.sh
+
+This script will extract a SIP conversation from the log for one or more
+Call-ID values. Invoke with:
+
+find_call_sip_trace.sh /path/to/log Call-ID [...]
+
+Eg:
+
+find_call_sip_trace.sh /var/log/asterisk/debug 12341665haf434qgrq3@192.168.0.5 123123@192.168.0.3
+
+This will find the SIP packets for those two conversations from the log
+(interleaving the packets in the order asterisk output them - useful for
+analysing the two SIP legs of the same call).
diff --git a/net-misc/asterisk/files/1.6.2/find_call_ids.sh b/net-misc/asterisk/files/1.6.2/find_call_ids.sh
new file mode 100644
index 000000000000..c4689bd1579d
--- /dev/null
+++ b/net-misc/asterisk/files/1.6.2/find_call_ids.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+logfile=$1
+anum=$2
+bnum=$3
+
+function usage()
+{
+ echo "USAGE: $1 logfile anum bnum"
+ exit -1
+}
+
+[ -r "${logfile}" ] || usage $0
+[ -n "${anum}" ] || usage $0
+[ -n "${bnum}" ] || usage $0
+
+grep -B2 -P '^INVITE sip:'"${bnum}"'@.*\n(([^F].*|F[^r].*|Fr[^o].*|Fro[^m].*|From[^:]|From:.*<sip:'"${anum}"'@.*>.*)\r\n)+\r\n' "${logfile}" | awk '$4 ~ "^VERBOSE" { dt=$1" "$2" "$3 } $1=="Call-ID:" { if (cid != $2) { cid=$2; print dt" "cid; }}'
diff --git a/net-misc/asterisk/files/1.6.2/find_call_sip_trace.sh b/net-misc/asterisk/files/1.6.2/find_call_sip_trace.sh
new file mode 100644
index 000000000000..5b2e69e517b4
--- /dev/null
+++ b/net-misc/asterisk/files/1.6.2/find_call_sip_trace.sh
@@ -0,0 +1,21 @@
+#! /bin/bash
+
+logfile=$1
+callid=$2
+
+function usage()
+{
+ echo "USAGE: $1 logfile Call-ID [Call-ID ...]"
+ exit -1
+}
+
+[ -r "${logfile}" ] || usage $0
+[ -n "${callid}" ] || usage $0
+
+shift; shift;
+while [ $# -gt 0 ]; do
+ callid="${callid}|$1"
+ shift
+done
+
+dos2unix < "${logfile}" | grep -P '^.*\n<--- (SIP read|(Reliably )?(Ret|T)ransmitting) .*\n([^<\n].*\n)*Call-ID: ('"${callid//./\\.}"')\n((|[^<\n].*)\n)*<-+>$|^.* chan_sip.c: (Reliably )?(Ret|T)ransmitting .*\n([^-\n].*\n)*Call-ID: ('"${callid//./\\.}"')\n((|[^-\n].*)\n)*---$'
diff --git a/net-misc/asterisk/files/1.6.2/sip_calc_auth b/net-misc/asterisk/files/1.6.2/sip_calc_auth
new file mode 100644
index 000000000000..3f050ada5738
--- /dev/null
+++ b/net-misc/asterisk/files/1.6.2/sip_calc_auth
@@ -0,0 +1,25 @@
+#! /bin/bash
+
+[ $# -lt 7 ] && echo "USAGE: $0 username realm password method uri algorithm nonce" && exit 1
+
+un=$1
+realm=$2
+pw=$3
+method=$4
+uri=$5
+alg=$6
+nonce=$7
+
+echo "Using $un@$realm (secret $pw) for method $method to $uri with nonce $nonce (alg=$alg)"
+
+a1=$un:$realm:$pw
+a2=$method:$uri
+ha1=$(echo -n "$a1" | openssl $alg)
+ha2=$(echo -n "$a2" | openssl $alg)
+resp=$(echo -n "$ha1:$nonce:$ha2" | openssl $alg)
+
+echo "a1=$a1"
+echo "a2=$a2"
+echo "ha1=$ha1"
+echo "ha2=$ha2"
+echo "resp=$resp"
diff --git a/net-misc/asterisk/files/1.8.0/asterisk.confd b/net-misc/asterisk/files/1.8.0/asterisk.confd
new file mode 100644
index 000000000000..2ecbb6e10db3
--- /dev/null
+++ b/net-misc/asterisk/files/1.8.0/asterisk.confd
@@ -0,0 +1,95 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+#
+# Additional options for asterisk
+#
+# see "asterisk -h" for a list of options
+#
+ASTERISK_OPTS=""
+
+#
+# User and group to run asterisk as
+#
+# Value: double-colon separated list of user and group, or empty to run as root:
+#
+#
+# "asterisk:asterisk" to run as user "asterisk" and group "asterisk"
+#
+# "asterisk" to run as user "asterisk" and all groups that user "asterisk" is a member of
+#
+# ":asterisk" to run as user "root" and group "asterisk"
+#
+# "" to run as user "root" and group "root"
+#
+ASTERISK_USER="asterisk"
+
+#
+# Nicelevel
+#
+# Set the priority of the asterisk process
+#
+# Value: (highest) -20..19 (lowest)
+#
+#ASTERISK_NICE="19"
+
+# Send crash notifications emails to this address
+# (needs a working mail service and /usr/sbin/sendmail to do so (e.g. ssmtp))
+#
+# Value: Email address or empty to disable
+#
+#ASTERISK_NOTIFY_EMAIL="root"
+
+#
+# Send asterisk's output to this terminal
+#
+# Value: Full path to device node or a number
+#
+#ASTERISK_TTY="/dev/tty9"
+
+#
+# Start an asterisk console on the terminal specified by ASTERISK_TTY
+#
+# Warning! Use only for debugging, this is a potential security issue!
+#
+# Value: yes or no/empty
+#
+ASTERISK_CONSOLE="no"
+
+#
+# Maximum size of core files.
+#
+# Value: Size in bytes, unlimited for no limit or empty to disable.
+#
+ASTERISK_CORE_SIZE="unlimited"
+
+#
+# ASTERISK_CORE_DIR
+#
+# Value: Directory (will be created if non-existant), default is /tmp
+#
+ASTERISK_CORE_DIR="/var/lib/asterisk/coredump"
+
+#
+# Max number of filedescriptors
+#
+# Value: Number of descriptors
+#
+ASTERISK_MAX_FD="4096"
+
+#
+# Delay time before restarting asterisk after a crash.
+#
+# Value: Number of seconds to sleep after a crash before restarting.
+#
+ASTERISK_RESTART_DELAY=5
+
+#
+# Kill these tasks after asterisk crashed
+#
+# Warning! This will kill _ALL_ tasks with the specified names!
+#
+# Value: Space separated list of names in double quotes (e.g. "mpg123 mad")
+#
+#ASTERISK_CLEANUP_ON_CRASH="mpg123 asterisk-mpg123 mad"
diff --git a/net-misc/asterisk/files/1.8.0/asterisk.initd7 b/net-misc/asterisk/files/1.8.0/asterisk.initd7
new file mode 100644
index 000000000000..ef7d4077490a
--- /dev/null
+++ b/net-misc/asterisk/files/1.8.0/asterisk.initd7
@@ -0,0 +1,347 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_started_commands="forcestop reload"
+
+depend() {
+ need net
+ use nscd dns dahdi mysql postgresql slapd capi
+}
+
+is_running() {
+ [ -r "${ast_rundir}/asterisk.pid" ] || return 1
+ PID="$(cat "${ast_rundir}/asterisk.pid")"
+ [ -d "/proc/${PID}" ] || return 1
+ EXE="$(readlink -f /proc/${PID}/exe)"
+ EXE="${EXE% (deleted)}" # in case asterisk got upgraded and we're still looking at an old one.
+ [ "${EXE}" = /usr/sbin/asterisk ] || return 1 # pid got re-used for another process.
+
+ # PID reported in pidfile is active, and is still an asterisk instance.
+ return 0
+}
+
+# Sets up a few variables for us for use
+# ast_instancename: eg, asterisk when RC_SVCNAME=asterisk, or asterisk(foo) when asterisk.foo.
+# ast_rundir: directory to be used as run folder (pid and ctl files).
+# ast_spooldir:
+setup_svc_variables()
+{
+ local t
+
+ ast_instancename=asterisk
+ ast_rundir=/var/run/${RC_SVCNAME}
+ ast_logdir=/var/log/${RC_SVCNAME}
+ ast_spooldir=/var/spool/${RC_SVCNAME}
+ ast_confdir=/etc/${RC_SVCNAME/.//}
+
+ if [ "${RC_SVCNAME}" != "asterisk" ]; then
+ t="${RC_SVCNAME#asterisk.}"
+ if [ "${RC_SVCNAME}" = "${t}" ]; then
+ eerror "Invalid SVCNAME of ${RC_SVCNAME}, must be of the format asterisk.name."
+ return 1
+ fi
+ ast_instancename+="(${t})"
+ fi
+
+ [ -n "${ASTERISK_RUNDIR}" ] && ast_rundir="${ASTERISK_RUNDIR}"
+ [ -n "${ASTERISK_LOGDIR}" ] && ast_logdir="${ASTERISK_LOGDIR}"
+ [ -n "${ASTERISK_SPOOLDIR}" ] && ast_spooldir="${ASTERISK_SPOOLDIR}"
+ [ -n "${ASTERISK_CONFDIR}" ] && ast_confdir="${ASTERISK_CONFDIR}"
+
+ return 0
+}
+
+asterisk_run_loop() {
+ local result=0 signal=0
+
+ echo "Initializing ${ast_instancename} wrapper"
+ OPTS="$*"
+
+ trap "rm -f '${ast_rundir}/wrapper_loop.running'" EXIT
+ touch "${ast_rundir}/wrapper_loop.running"
+
+ while [ -r "${ast_rundir}/wrapper_loop.running" ]; do
+ if [ -n "${TTY}" ]; then
+ /usr/bin/stty -F "${TTY}" sane
+ ${NICE} /usr/sbin/asterisk -C "${ast_confdir}/asterisk.conf" ${OPTS} >"${TTY}" 2>&1 <"${TTY}"
+ result=$?
+ else
+ ${NICE} /usr/sbin/asterisk -C "${ast_confdir}/asterisk.conf" ${OPTS} 2>&1 >/dev/null
+ result=$?
+ fi
+
+ if [ "$result" -eq 0 ]; then
+ echo "Asterisk terminated normally"
+ break
+ else
+ if [ "$result" -gt 128 ]; then
+ signal="$(expr "$result" - 128)"
+ MSG="Asterisk terminated with Signal: $signal"
+
+ CORE_TARGET="core-$(date "+%Y%m%d-%H%M%S")"
+
+ local CORE_DUMPED=0
+ if [ -f "${ASTERISK_CORE_DIR}/core" ]; then
+ mv "${ASTERISK_CORE_DIR}/core" \
+ "${ASTERISK_CORE_DIR}/${CORE_TARGET}"
+ CORE_DUMPED=1
+
+ elif [ -f "${ASTERISK_CORE_DIR}/core.${PID}" ]; then
+ mv "${ASTERISK_CORE_DIR}/core.${PID}" \
+ "${ASTERISK_CORE_DIR}/${CORE_TARGET}"
+ CORE_DUMPED=1
+
+ fi
+
+ [ $CORE_DUMPED -eq 1 ] && \
+ MSG="${MSG}\n\rCore dumped: ${ASTERISK_CORE_DIR}/${CORE_TARGET}"
+ else
+ MSG="Asterisk terminated with return code: $result"
+ fi
+
+ # kill left-over tasks
+ for X in ${ASTERISK_CLEANUP_ON_CRASH}; do
+ kill -9 "$(pidof "${X}")";
+ done
+ fi
+
+ [ -n "${TTY}" ] \
+ && echo "${MSG}" >"${TTY}" \
+ || echo "${MSG}"
+
+
+ if [ -n "${ASTERISK_NOTIFY_EMAIL}" ] && \
+ [ -x /usr/sbin/sendmail ]; then
+ echo -e -n "Subject: Asterisk crashed\r\n${MSG}\r\n" |\
+ /usr/sbin/sendmail "${ASTERISK_NOTIFY_EMAIL}"
+ fi
+ sleep "${ASTERISK_RESTART_DELAY}"
+ echo "Restarting Asterisk..."
+ done
+
+ echo "Terminating wrapper loop."
+ return 0
+}
+
+start() {
+ local OPTS USER GROUP PID
+ local tmp x
+
+ local OPTS ARGS
+
+ setup_svc_variables || return $?
+
+ ebegin "Starting ${ast_instancename} PBX"
+
+ eindent
+
+ # filter (redundant) arguments
+ OPTS="$(echo "${ASTERISK_OPTS}" | sed -re "s:-[cfF]::g")"
+
+ # default options
+ OPTS="${OPTS} -f" # don't fork / detach breaks wrapper script...
+
+ # mangle yes/no options
+ ASTERISK_CONSOLE="$(echo ${ASTERISK_CONSOLE} | tr '[:lower:]' '[:upper:]')"
+ ASTERISK_WAITBOOTED="$(echo "${ASTERISK_WAITBOOTED}" | tr '[:lower:]' '[:upper:]')"
+
+ ASTERISK_RESTART_DELAY="$(echo "${ASTERISK_RESTART_DELAY}" | sed -re 's/^([0-9]*).*/\1/')"
+ [ -z "${ASTERISK_RESTART_DELAY}" ] && ASTERISK_RESTART_DELAY=5
+
+ if [ -n "${ASTERISK_CORE_SIZE}" ] &&
+ [ "${ASTERISK_CORE_SIZE}" != "0" ]; then
+ ulimit -c ${ASTERISK_CORE_SIZE}
+
+ if [ -n "${ASTERISK_CORE_DIR}" ] && \
+ [ ! -d "${ASTERISK_CORE_DIR}" ]
+ then
+ mkdir -m750 -p "${ASTERISK_CORE_DIR}"
+
+ if [ -n "${ASTERISK_USER}" ]; then
+ chown -R "${ASTERISK_USER}" "${ASTERISK_CORE_DIR}"
+ fi
+ fi
+ ASTERISK_CORE_DIR="${ASTERISK_CORE_DIR:-/tmp}"
+
+ cd "${ASTERISK_CORE_DIR}"
+ einfo "Core dump size : ${ASTERISK_CORE_SIZE}"
+ einfo "Core dump location : ${ASTERISK_CORE_DIR}"
+
+ OPTS="${OPTS} -g"
+ fi
+
+ if [ -n "${ASTERISK_MAX_FD}" ]; then
+ ulimit -n ${ASTERISK_MAX_FD}
+ einfo "Max open filedescriptors : ${ASTERISK_MAX_FD}"
+ fi
+
+ if [ -n "${ASTERISK_NICE}" ]; then
+ if [ ${ASTERISK_NICE} -ge -20 ] && \
+ [ ${ASTERISK_NICE} -le 19 ]; then
+ einfo "Nice level : ${ASTERISK_NICE}"
+ NICE="nice -n ${ASTERISK_NICE} --"
+ else
+ eerror "Nice value must be between -20 and 19"
+ return 1
+ fi
+ else
+ NICE=""
+ fi
+
+ if [ -n "${ASTERISK_NOTIFY_EMAIL}" ]; then
+ if [ -x /usr/sbin/sendmail ]; then
+ einfo "Email notifications go to : ${ASTERISK_NOTIFY_EMAIL}"
+ else
+ ewarn "Notifications disabled, /usr/sbin/sendmail doesn't exist or is not executable!"
+ unset ASTERISK_NOTIFY_EMAIL
+ fi
+ fi
+
+ if [ -n "${ASTERISK_TTY}" ]; then
+ for x in ${ASTERISK_TTY} \
+ /dev/tty${ASTERISK_TTY} \
+ /dev/vc/${ASTERISK_TTY}
+ do
+ if [ -c "${x}" ]; then
+ TTY="${x}"
+ fi
+ done
+ [ -n "${TTY}" ] && \
+ einfo "Messages are sent to : ${TTY}"
+ fi
+
+ if [ "${ASTERISK_CONSOLE}" = "YES" ] && [ -n "${TTY}" ]; then
+ einfo "Starting Asterisk console : ${ASTERISK_CONSOLE}"
+ OPTS="${OPTS} -c"
+ fi
+
+ if [ -n "${ASTERISK_USER}" ]; then
+ USER="$(echo $ASTERISK_USER | sed 's/:.*//')"
+ GROUP="$(echo $ASTERISK_USER | awk -F: '/.*:.*/ { print $2 }')"
+ if [ -n "${USER}" ]; then
+ if ! getent passwd "${USER}" &>/dev/null; then
+ eerror "Requested to run asterisk as ${USER}, which doesn't exist."
+ return 1
+ fi
+ OPTS="${OPTS} -U ${USER}"
+ fi
+ if [ -n "${GROUP}" ]; then
+ if ! getent group "${GROUP}" &>/dev/null; then
+ eerror "Requested to run asterisk with group ${USER}, which doesn't exist."
+ return 1
+ fi
+ OPTS="${OPTS} -G ${GROUP}"
+ GROUP=":${GROUP}" # make it look nice...
+ fi
+ checkpath -d -m 0755 -o ${USER}${GROUP} "${ast_logdir}" "${ast_rundir}" "${ast_spooldir}"
+ find "${ast_logdir}" "${ast_rundir}" "${ast_spooldir}" ! -user "${USER}" | while read element; do
+ ewarn "${USER} is not the owner of $element, or permissions are insufficient, fixing."
+ chown ${USER} "${element}"
+ chmod u+rX "${element}"
+ done;
+ einfo "Starting asterisk as : ${USER}${GROUP}"
+ else
+ checkpath -d -m 0755 -o root:root "${ast_logdir}" "${ast_rundir}"
+ ewarn "Starting asterisk as root is not recommended."
+ fi
+
+ asterisk_run_loop ${OPTS} 2>&1 | logger -t "wrapper:${ast_instancename}" &
+ result=$?
+
+ if [ $result -eq 0 ]; then
+ # 2 seconds should be enough for asterisk to start
+ sleep 2
+ is_running
+ result=$?
+
+ [ $result -eq 0 ] || wrapperstop
+ fi
+
+ eoutdent
+ eend $result
+
+ if [ $result -eq 0 -a "${ASTERISK_WAITBOOTED}" = "YES" ]; then
+ ebegin "Waiting for ${ast_instancename} to fully boot"
+ /usr/sbin/asterisk -C "${ast_confdir}/asterisk.conf" -r -x "core waitfullybooted" &>/dev/null
+ eend $?
+ fi
+
+ return $result
+}
+
+wrapperstop() {
+ # Accomodate system upgrades (so a previous version of the wrapper script that still uses a pid file may be running).
+ if [ -r "${ast_rundir}/wrapper_loop.pid" ]; then
+ ebegin "Killing wrapper script"
+ kill "$(cat /var/run/asterisk/wrapper_loop.pid)"
+ eend $?
+ fi
+
+ # The new one (due to "hardened" requirements) uses a simpler
+ # flag to indicate running or shutting down.
+ if [ -r "${ast_rundir}/wrapper_loop.running" ]; then
+ ebegin "Signalling wrapper script to terminate"
+ rm "${ast_rundir}/wrapper_loop.running"
+ eend $?
+ fi
+
+ return 0
+}
+
+forcestop() {
+ setup_svc_variables || return $?
+
+ # Just to be sure - when we want to forcestop we should make it all tear down.
+ wrapperstop
+
+ ebegin "Stopping asterisk PBX"
+ start-stop-daemon --stop --pidfile /var/run/asterisk/asterisk.pid
+ eend $?
+}
+
+stop() {
+ setup_svc_variables || return $?
+
+ wrapperstop
+
+ if ! is_running; then
+ eerror "Asterisk is not running!"
+ return 0
+ fi
+
+ ebegin "Stopping asterisk PBX gracefully"
+ /usr/sbin/asterisk -C "${ast_confdir}/asterisk.conf" -r -x "core stop gracefully" &>/dev/null
+ # Now we have to wait until asterisk has _really_ stopped.
+ sleep 1
+ if is_running; then
+ einfon "Waiting for asterisk to shutdown ."
+ local cnt=0
+ while is_running; do
+ cnt="$(expr $cnt + 1)"
+ if [ $cnt -gt 60 ] ; then
+ # Waited 120 seconds now. Fail.
+ echo
+ eend 1 "Failed."
+ return
+ fi
+ sleep 2
+ echo -n "."
+ done
+ echo
+ fi
+ eend 0
+}
+
+reload() {
+ setup_svc_variables || return $?
+
+ if is_running; then
+ ebegin "Forcing asterisk to reload configuration"
+ /usr/sbin/asterisk -C "${ast_confdir}/asterisk.conf" -r -x "module reload" &>/dev/null
+ eend $?
+ else
+ eerror "Asterisk is not running!"
+ fi
+}
diff --git a/net-misc/asterisk/files/1.8.0/find_call_ids.sh b/net-misc/asterisk/files/1.8.0/find_call_ids.sh
new file mode 100644
index 000000000000..321f3dacd624
--- /dev/null
+++ b/net-misc/asterisk/files/1.8.0/find_call_ids.sh
@@ -0,0 +1,68 @@
+#! /bin/bash
+
+logfile=$1
+anum=$2
+bnum=$3
+
+function usage()
+{
+ echo "USAGE: $1 logfile anum bnum"
+ exit -1
+}
+
+[ -r "${logfile}" ] || usage $0
+[ -n "${anum}" ] || usage $0
+[ -n "${bnum}" ] || usage $0
+
+#echo "Finding calls from '${anum}' to '${bnum}' in ${logfile}."
+
+# modes:
+# 0 - not processing an INVITE.
+# 1 - processing an INVITE.
+# 2 - from matched (processing).
+dos2unix < "${logfile}" | awk '
+ BEGIN { mode = 0 }
+ mode==0 && $4~"^VERBOSE" {
+ dt=$1" "$2" "$3
+ }
+
+ mode==0 && $1=="INVITE" && $2 ~ "^sip:'"${bnum}"'@" {
+ #print
+
+ mode=1
+
+ split($2, a, "[:@]")
+ bnum=a[2]
+ }
+
+ mode==1 && $1=="From:" {
+ #print
+ if ($3 ~ "^<sip:'"${anum}"'@.*>") {
+ mode=2
+ split($3, a, "[:@]")
+ anum=a[2]
+ } else {
+ #print "From does not match ... leaving block."
+ mode = 0
+ }
+ }
+
+ mode!=0 && $1=="Call-ID:" {
+ callid=$2
+
+ if (NF!=2) {
+ print "WTF @ Call-ID header having NF!=2"
+ }
+ }
+
+ mode==1 && $0=="" {
+ #print "Leaving block (no match)"
+ mode = 0
+ }
+
+ mode==2 && $0=="" {
+ #print "Leaving block (match)"
+ print dt " " anum " " bnum " " callid
+ mode = 0
+ }
+'
diff --git a/net-misc/asterisk/files/1.8.0/find_call_sip_trace.sh b/net-misc/asterisk/files/1.8.0/find_call_sip_trace.sh
new file mode 100644
index 000000000000..06ae824def5c
--- /dev/null
+++ b/net-misc/asterisk/files/1.8.0/find_call_sip_trace.sh
@@ -0,0 +1,76 @@
+#! /bin/bash
+
+logfile=$1
+callid=$2
+
+function usage()
+{
+ echo "USAGE: $1 logfile Call-ID [Call-ID ...]"
+ exit -1
+}
+
+[ -r "${logfile}" ] || usage $0
+[ -n "${callid}" ] || usage $0
+
+shift; shift;
+while [ $# -gt 0 ]; do
+ callid="${callid}|$1"
+ shift
+done
+
+# modes:
+# 0 - searching for SIP start block ...
+# 1 - transmit of sorts
+# 2 - receive
+
+dos2unix < "${logfile}" | awk '
+ BEGIN { mode = 0 }
+ mode==0 && $4~"^VERBOSE" {
+ dt=$1" "$2" "$3
+ }
+
+ mode!=0 && $1 == "Call-ID:" {
+ #print
+
+ if ($2 ~ /('"${callid}"')/) {
+ callidmatch=1
+ } else {
+ #print $2" does not match ^('"${callid}"')$"
+ mode=0
+ }
+ }
+
+ (mode==1 && $0=="---") || (mode==2 && $0=="<------------->") {
+ if (callidmatch) {
+ print dt" "sipmode"\n"pckt"---"
+ }
+
+ mode=0
+ }
+
+ mode!=0 {
+ pckt = pckt $0 "\n"
+ }
+
+ mode==0 && $0 ~ "chan_sip[.]c: .*[tT]ransmitting" {
+ #print
+
+ if ($6 == "Retransmitting") {
+ sipmode = $6" "$7" to "$NF
+ } else {
+ sipmode = "Transmitting to "$NF
+ }
+
+ mode=1
+ pckt=""
+ callidmatch=0
+ }
+
+ mode==0 && $0 ~ "SIP read from" {
+ #print
+ mode=2
+ pckt=""
+ callidmatch=0
+ sipmode="Received from "$5":"
+ }
+'
diff --git a/net-misc/asterisk/files/asterisk.service b/net-misc/asterisk/files/asterisk.service
new file mode 100644
index 000000000000..08245d9fe87f
--- /dev/null
+++ b/net-misc/asterisk/files/asterisk.service
@@ -0,0 +1,23 @@
+[Unit]
+Description=Asterisk PBX and telephony daemon.
+After=network.target
+
+[Service]
+Type=simple
+WorkingDirectory=/var/lib/asterisk
+User=asterisk
+Group=asterisk
+ExecStart=/usr/sbin/asterisk -f -C /etc/asterisk/asterisk.conf
+ExecStop=/usr/sbin/asterisk -rx 'core stop now'
+ExecReload=/usr/sbin/asterisk -rx 'core reload'
+
+LimitNOFILE=4096
+ProtectSystem=full
+ProtectHome=yes
+PrivateTmp=yes
+
+Restart=always
+RestartSec=5
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/asterisk/files/asterisk.service.conf b/net-misc/asterisk/files/asterisk.service.conf
new file mode 100644
index 000000000000..b7f83b71c5b0
--- /dev/null
+++ b/net-misc/asterisk/files/asterisk.service.conf
@@ -0,0 +1,11 @@
+# Uncomment the following 7 lines to start asterisk with a console on tty7
+#
+# Warning! Use only for debugging, this is a potential security issue!
+#
+# [Service]
+# ExecStart=
+# ExecStart=/usr/sbin/asterisk -f -c -C /etc/asterisk/asterisk.conf
+# TTYPath=/dev/tty7
+# StandardInput=tty
+# StandardOutput=tty
+# StandardError=tty
diff --git a/net-misc/asterisk/files/asterisk.tmpfiles.conf b/net-misc/asterisk/files/asterisk.tmpfiles.conf
new file mode 100644
index 000000000000..637302a27373
--- /dev/null
+++ b/net-misc/asterisk/files/asterisk.tmpfiles.conf
@@ -0,0 +1,2 @@
+d /var/run/asterisk 0750 asterisk asterisk
+d /var/spool/asterisk 0750 asterisk asterisk
diff --git a/net-misc/asterisk/metadata.xml b/net-misc/asterisk/metadata.xml
new file mode 100644
index 000000000000..dd374a53ea13
--- /dev/null
+++ b/net-misc/asterisk/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+ <use>
+ <flag name="newt">Include additional tools that require redhats windowing toolkit</flag>
+ <flag name="dahdi">Support Digium compatible hardware (formerly known as Zaptel).</flag>
+ <flag name="span">Enable support for the spandsp codec</flag>
+ <flag name="samples">Install sample sound and configuration files (default: on)</flag>
+ <flag name="srtp">Enable support for encrypted voice transmission (secure RTP)</flag>
+ <flag name="gtalk">Enable support for Google Talk services</flag>
+ <flag name="osplookup">Support secure peering using the Open Settlement Protocol</flag>
+ <flag name="http">Enable embedded web server</flag>
+ <flag name="cluster">Enable high-availability support through the Corosync Cluster Engine</flag>
+ <flag name="ilbc">Enable the Internet Low Bitrate Codec (iLBC)</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/astmanproxy/Manifest b/net-misc/astmanproxy/Manifest
new file mode 100644
index 000000000000..c35b8ae678b8
--- /dev/null
+++ b/net-misc/astmanproxy/Manifest
@@ -0,0 +1 @@
+DIST astmanproxy-1.28.2.tar.gz 65506 SHA256 09c2b5750d69c9ca8d9611cb648a5cedb0fa7102540642b06654e3ac5c31ed4b SHA512 a37caaca42649b19d40b9b0cfe61c6a0e31d7d0de50378565a6add1b27ba09dd6044c7ac2d9b38c424f143fc12acbfa0931c59492399ee34db063ed73cce9293 WHIRLPOOL 08b9d9b186ce424f309efddefa05cc91856cfbfea2b60d65030a15a0868bc1f72717431ba1f884eb0dea411d18fd950c6e17af5c356eae5db030879a0d34cc67
diff --git a/net-misc/astmanproxy/astmanproxy-1.28.2.ebuild b/net-misc/astmanproxy/astmanproxy-1.28.2.ebuild
new file mode 100644
index 000000000000..1e14e7a6b831
--- /dev/null
+++ b/net-misc/astmanproxy/astmanproxy-1.28.2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit base multilib toolchain-funcs
+
+DESCRIPTION="Proxy for the Asterisk manager interface"
+HOMEPAGE="https://github.com/davies147/astmanproxy/"
+SRC_URI="https://github.com/davies147/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+IUSE=""
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND=""
+PATCHES=( "${FILESDIR}/${P}-gentoo.diff" )
+
+src_prepare() {
+ base_src_prepare
+
+ # Fix multilib
+ sed -i -e "s#/usr/lib/#/usr/$(get_libdir)/#" "${S}/Makefile" \
+ || die "multilib sed failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" \
+ LDFLAGS="${LDFLAGS}" \
+ LD="$(tc-getLD)" \
+ RAWLDFLAGS="$(raw-ldflags)"
+}
+
+src_install() {
+ dosbin astmanproxy
+
+ dodoc README VERSIONS
+
+ docinto samples
+ dodoc samples/*
+
+ insinto /etc/asterisk
+ doins configs/astmanproxy.conf
+ doins configs/astmanproxy.users
+
+ newinitd "${FILESDIR}"/astmanproxy.rc6 astmanproxy
+}
diff --git a/net-misc/astmanproxy/files/astmanproxy-1.1-gentoo.diff b/net-misc/astmanproxy/files/astmanproxy-1.1-gentoo.diff
new file mode 100644
index 000000000000..b713cdc7d514
--- /dev/null
+++ b/net-misc/astmanproxy/files/astmanproxy-1.1-gentoo.diff
@@ -0,0 +1,31 @@
+--- astmanproxy-1.1/Makefile.orig 2005-07-13 04:35:49.000000000 +0200
++++ astmanproxy-1.1/Makefile 2005-07-13 04:37:43.000000000 +0200
+@@ -1,8 +1,8 @@
+ VERSION := 1.1
+ DESTDIR :=
+-PREFIX:= /usr/local
+-CONFDIR:=/etc/asterisk
+-CONFDIR_REAL := $(DESTDIR)/etc/asterisk
++PREFIX := /usr
++CONFDIR := /etc
++CONFDIR_REAL := $(DESTDIR)$(CONFDIR)
+
+ BINDIR := $(DESTDIR)$(PREFIX)/sbin
+ LIBDIR := $(DESTDIR)/usr/lib/astmanproxy
+@@ -14,7 +14,7 @@
+ DEFINES:='-DPROXY_VERSION="$(VERSION)"' '-DCDIR="$(CONFDIR)"' '-DCFILE="$(CONFFILE)"' '-DMDIR="$(MODDIR)"'
+
+ # Add -g below for debug/GDB symbols
+-CFLAGS := $(DEFINES) -Wall -O2 -rdynamic -D_REENTRANT
++CFLAGS += -Wall -rdynamic -D_REENTRANT -fPIC $(DEFINES)
+
+ CC := gcc
+ LD := ld
+--- astmanproxy-1.1/astmanproxy.conf.orig 2005-07-13 04:38:53.000000000 +0200
++++ astmanproxy-1.1/astmanproxy.conf 2005-07-13 04:38:59.000000000 +0200
+@@ -57,4 +57,4 @@
+ autofilter = on
+
+ ; location of logfile -- will be owned by proc_user/proc_group
+-logfile = /var/log/asterisk/astmanproxy.log
++logfile = /var/log/astmanproxy.log
diff --git a/net-misc/astmanproxy/files/astmanproxy-1.28.2-gentoo.diff b/net-misc/astmanproxy/files/astmanproxy-1.28.2-gentoo.diff
new file mode 100644
index 000000000000..68534cd61086
--- /dev/null
+++ b/net-misc/astmanproxy/files/astmanproxy-1.28.2-gentoo.diff
@@ -0,0 +1,39 @@
+diff -uNr astmanproxy-1.28.2.ORIG/Makefile astmanproxy-1.28.2/Makefile
+--- astmanproxy-1.28.2.ORIG/Makefile 2014-02-10 11:18:06.027132570 +0000
++++ astmanproxy-1.28.2/Makefile 2014-02-10 11:21:07.382135291 +0000
+@@ -17,7 +17,7 @@
+
+ CC := gcc
+ INCLUDES :=
+-PREFIX:= /usr/local
++PREFIX:= /usr
+ BINDIR := $(DESTDIR)$(PREFIX)/sbin
+
+ # For compilation dependencies
+@@ -27,7 +27,7 @@
+ LIBS := -lssl
+
+ # Add -g below for debug/GDB symbols
+-CFLAGS:=-Wall -O2 -D_REENTRANT -D_GNU_SOURCE -fPIC -Isrc/include -I/usr/include/openssl
++CFLAGS += -Wall -O2 -D_REENTRANT -D_GNU_SOURCE -fPIC -Isrc/include -I/usr/include/openssl
+
+ ifeq (${OSARCH},Darwin)
+ LIBS+=-lresolv
+@@ -62,7 +62,7 @@
+ DEFINES+='-DMDIR="$(MODDIR)"' '-DPDIR="$(PERMDIR)"' '-DPFILE="$(PERMFILE)"'
+
+ PROXYCERT := $(CERTDIR)/proxy-server.pem
+-PROXYSSLCONF := $(CONFDIR)/proxy-ssl.conf
++PROXYSSLCONF := $(DESTDIR)$(CONFDIR)/proxy-ssl.conf
+
+ CFLAGS += $(DEFINES)
+
+@@ -76,7 +76,7 @@
+ SRCS := $(MODS:%=src/%.c)
+ HDRS := src/include/astmanproxy.h
+
+-all: astmanproxy cert
++all: astmanproxy
+
+ astmanproxy: $(OBJS) $(SOBJS)
+ $(CC) $(CFLAGS) -o $@ $(ASTLINK) $(OBJS) $(LIBS)
diff --git a/net-misc/astmanproxy/files/astmanproxy.rc6 b/net-misc/astmanproxy/files/astmanproxy.rc6
new file mode 100755
index 000000000000..dcb0a936ab90
--- /dev/null
+++ b/net-misc/astmanproxy/files/astmanproxy.rc6
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting astmanproxy"
+ start-stop-daemon --start --exec /usr/sbin/astmanproxy
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping astmanproxy"
+ start-stop-daemon --stop --exec /usr/sbin/astmanproxy
+ eend $?
+}
diff --git a/net-misc/astmanproxy/metadata.xml b/net-misc/astmanproxy/metadata.xml
new file mode 100644
index 000000000000..15557bab0515
--- /dev/null
+++ b/net-misc/astmanproxy/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>chainsaw@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">davies147/astmanproxy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/autossh/Manifest b/net-misc/autossh/Manifest
new file mode 100644
index 000000000000..805a980fff19
--- /dev/null
+++ b/net-misc/autossh/Manifest
@@ -0,0 +1,3 @@
+DIST autossh-1.4c.tgz 65191 SHA256 6fcaba6a409a46bdf832086736bb8f09d245ebce11027f41d39588a95dc7fd1d
+DIST autossh-1.4d.tgz 65637 SHA256 00008fe458bde4c94e98bfa96e1e6e18c4107a1f9fc8a538556b82e91ddedc16 SHA512 2f4cdba7753a32f376fc9036b7fa8d0af968eab168a65ab4cdb7723731844e5daa503eef4eade77730d592690cc4c5cb6839f3767b9baf785ae4980af4823793 WHIRLPOOL 964dc991c225483394ac346c14b49a468dc4586572c7b63b1c07851dd0cc25ca8fd38ce064c622b86076526791537b937d8a3343c50767a96fb68f1c798c980c
+DIST autossh-1.4e.tgz 65852 SHA256 9e8e10a59d7619176f4b986e256f776097a364d1be012781ea52e08d04679156 SHA512 2f71403ee005103c6a3e2e669f6b26153161c95c8dacd3e73d61673461b3512348636877760d911341771e744c0a682b107df4ac48621661ff36a9fc0191f2fb WHIRLPOOL 83ebb35b113e3b3b69ec88a692da2170d7fd726d83ba225daef45507076e91f4a112d0648b8c414da1d38c7c7b5f7a30e5366c3ef2e9ce7123d8fbcf385fac11
diff --git a/net-misc/autossh/autossh-1.4c.ebuild b/net-misc/autossh/autossh-1.4c.ebuild
new file mode 100644
index 000000000000..6ad34782bd2c
--- /dev/null
+++ b/net-misc/autossh/autossh-1.4c.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Automatically restart SSH sessions and tunnels"
+HOMEPAGE="http://www.harding.motd.ca/autossh/"
+SRC_URI="http://www.harding.motd.ca/${PN}/${P}.tgz"
+
+LICENSE="BSD"
+KEYWORDS="amd64 ~arm ~hppa ppc ~ppc64 ~sparc x86 ~amd64-linux ~ia64-linux ~x86-linux"
+SLOT="0"
+IUSE=""
+
+RDEPEND="net-misc/openssh"
+
+src_prepare() {
+ sed -i -e "s:\$(CC):& \$(LDFLAGS):" Makefile.in || die
+}
+
+src_install() {
+ dobin autossh
+ dodoc CHANGES README autossh.host rscreen
+ doman autossh.1
+}
diff --git a/net-misc/autossh/autossh-1.4d.ebuild b/net-misc/autossh/autossh-1.4d.ebuild
new file mode 100644
index 000000000000..65c78f810108
--- /dev/null
+++ b/net-misc/autossh/autossh-1.4d.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Automatically restart SSH sessions and tunnels"
+HOMEPAGE="http://www.harding.motd.ca/autossh/"
+SRC_URI="http://www.harding.motd.ca/${PN}/${P}.tgz"
+
+LICENSE="BSD"
+KEYWORDS="amd64 ~arm ~hppa ppc ~ppc64 ~sparc x86 ~amd64-linux ~ia64-linux ~x86-linux"
+SLOT="0"
+
+RDEPEND="net-misc/openssh"
+
+src_prepare() {
+ sed -i -e "s:\$(CC):& \$(LDFLAGS):" Makefile.in || die
+}
+
+src_install() {
+ dobin autossh
+ dodoc CHANGES README autossh.host rscreen
+ doman autossh.1
+}
diff --git a/net-misc/autossh/autossh-1.4e.ebuild b/net-misc/autossh/autossh-1.4e.ebuild
new file mode 100644
index 000000000000..7e60c992b9b3
--- /dev/null
+++ b/net-misc/autossh/autossh-1.4e.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Automatically restart SSH sessions and tunnels"
+HOMEPAGE="http://www.harding.motd.ca/autossh/"
+SRC_URI="http://www.harding.motd.ca/${PN}/${P}.tgz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux"
+SLOT="0"
+
+RDEPEND="net-misc/openssh"
+
+src_prepare() {
+ sed -i -e "s:\$(CC):& \$(LDFLAGS):" Makefile.in || die
+}
+
+src_install() {
+ dobin autossh
+ dodoc CHANGES README autossh.host rscreen
+ doman autossh.1
+}
diff --git a/net-misc/autossh/metadata.xml b/net-misc/autossh/metadata.xml
new file mode 100644
index 000000000000..157326a7e891
--- /dev/null
+++ b/net-misc/autossh/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>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/autoupnp/Manifest b/net-misc/autoupnp/Manifest
new file mode 100644
index 000000000000..2633bf042912
--- /dev/null
+++ b/net-misc/autoupnp/Manifest
@@ -0,0 +1 @@
+DIST autoupnp-0.4.6.tar.bz2 240257 SHA256 a8d0a207074fafdb322510fd29a25eb4bf62da9468ea3dc45e7c9740faeccab7 SHA512 570ae76d940879a375e9336cb62cce8b2e007c57df6cbebee5878cf6a71d1fe5853218166ba0ee794586fa20a7c62b158aae9242b30880f6fe110c9bb1502ba1 WHIRLPOOL 4b2d848f36e3f2848e6f08f71296b5cf3fe7794bdfc9e6495428b3b3ae9283ed15e81de0bec2fdf0b36173d59a4c7dbec5dbef30bf3a0ba24e320de313cb20ab
diff --git a/net-misc/autoupnp/autoupnp-0.4.6.ebuild b/net-misc/autoupnp/autoupnp-0.4.6.ebuild
new file mode 100644
index 000000000000..bd42f10eefd1
--- /dev/null
+++ b/net-misc/autoupnp/autoupnp-0.4.6.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools-utils eutils
+
+DESCRIPTION="Automatic open port forwarder using UPnP"
+HOMEPAGE="https://bitbucket.org/mgorny/autoupnp/"
+SRC_URI="https://www.bitbucket.org/mgorny/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="libnotify"
+
+RDEPEND="net-libs/miniupnpc
+ libnotify? ( x11-libs/libtinynotify )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ myeconfargs=(
+ $(use_with libnotify)
+ )
+
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+ prune_libtool_files --all
+}
diff --git a/net-misc/autoupnp/autoupnp-9999.ebuild b/net-misc/autoupnp/autoupnp-9999.ebuild
new file mode 100644
index 000000000000..f9ce1293d53b
--- /dev/null
+++ b/net-misc/autoupnp/autoupnp-9999.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+#if LIVE
+AUTOTOOLS_AUTORECONF=yes
+EGIT_REPO_URI="http://bitbucket.org/mgorny/${PN}.git"
+
+inherit git-r3
+#endif
+
+inherit autotools-utils
+
+DESCRIPTION="Automatic open port forwarder using UPnP"
+HOMEPAGE="https://bitbucket.org/mgorny/autoupnp/"
+SRC_URI="https://www.bitbucket.org/mgorny/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="libnotify"
+
+RDEPEND="net-libs/miniupnpc:0=
+ libnotify? ( x11-libs/libtinynotify:0= )"
+DEPEND="${RDEPEND}"
+
+#if LIVE
+KEYWORDS=
+SRC_URI=
+#endif
+
+src_configure() {
+ myeconfargs=(
+ $(use_with libnotify)
+ )
+
+ autotools-utils_src_configure
+}
diff --git a/net-misc/autoupnp/metadata.xml b/net-misc/autoupnp/metadata.xml
new file mode 100644
index 000000000000..1ceb5b062490
--- /dev/null
+++ b/net-misc/autoupnp/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>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <upstream>
+ <maintainer status="active">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <bugs-to>https://bitbucket.org/mgorny/autoupnp/issues/</bugs-to>
+ <remote-id type="bitbucket">mgorny/autoupnp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/axel/Manifest b/net-misc/axel/Manifest
new file mode 100644
index 000000000000..23bc717c19dd
--- /dev/null
+++ b/net-misc/axel/Manifest
@@ -0,0 +1,3 @@
+DIST axel-1.1.tar.gz 45650 SHA256 398ea22b9805e563c3f703377ae6fedd4e339e6702f0f2af11ac7a8180d3eb43 SHA512 a0de04c7a616b8ad4445d8ca9a07dd4e8eacc726adf7771e6d0e1918fca1d22dc114744f4eb34ea53e3e09a08b6fc9ab987aae712284b460aa142df2b742dbc4 WHIRLPOOL 018e2dc856c3accbb926e551ed285a7cb6bb0eb88e17d023f5a805495e452467bb751ffc5c5f2d84c221587cabb726204fa544a3c77ed9b63602205b73a01b81
+DIST axel-2.3.tar.bz2 44827 SHA256 9b373cd840eb905551d5e16089dfa01e17b2bdb6f8d5cd3d59a8c0a6b4c19ac4
+DIST axel-2.4.tar.bz2 44995 SHA256 ebc7d40e989c680d2afa632a17e5208101608924cf446da20814a6f3c3338612 SHA512 34d73cea19f2bf393aa8d3e4b6c24296f8b1d4e6177da6f4728763e013d5d9d073aa5dae31d0ff175126e8fcbd973daf94674a70f100afc9e7d00b92b78b8ec9 WHIRLPOOL 373af984738008572847ae0ed84a518d0b61323e3612f48affa96175792b0856c2bd13601ddcdd0c81ead5059ee41130759bf9b0ada2a2654f767ec69d992a0f
diff --git a/net-misc/axel/axel-1.1.ebuild b/net-misc/axel/axel-1.1.ebuild
new file mode 100644
index 000000000000..2e97ada1401e
--- /dev/null
+++ b/net-misc/axel/axel-1.1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DOWNLOAD_ID=2287
+
+DESCRIPTION="Light Unix download accelerator"
+HOMEPAGE="http://axel.alioth.debian.org/"
+SRC_URI="http://alioth.debian.org/frs/download.php/${DOWNLOAD_ID}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 hppa ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="debug nls"
+
+RDEPEND="nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ # Set LDFLAGS and fix expr
+ sed -i -e 's/expr/& --/' -e "s/^LFLAGS=$/&${LDFLAGS}/" configure
+}
+
+src_compile() {
+ local myconf
+
+ use debug && myconf="--debug=1"
+ use nls && myconf="--i18n=1"
+ econf \
+ --strip=0 \
+ --etcdir=/etc \
+ ${myconf} \
+ || die
+
+ emake CFLAGS="${CFLAGS}" CC="$(tc-getCC)" || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc API CHANGES CREDITS README axelrc.example
+}
+
+pkg_postinst() {
+ einfo 'To use axel with portage, try these settings in your make.conf'
+ einfo
+ einfo ' FETCHCOMMAND="/usr/bin/axel -a -o \${DISTDIR}/\${FILE} \${URI}"'
+ einfo ' RESUMECOMMAND="${FETCHCOMMAND}"'
+}
diff --git a/net-misc/axel/axel-2.3-r1.ebuild b/net-misc/axel/axel-2.3-r1.ebuild
new file mode 100644
index 000000000000..81905b863f99
--- /dev/null
+++ b/net-misc/axel/axel-2.3-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="light Unix download accelerator"
+HOMEPAGE="http://axel.alioth.debian.org/"
+SRC_URI="http://alioth.debian.org/frs/download.php/2718/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ppc ~ppc64 sparc x86 ~x86-fbsd"
+IUSE="debug nls"
+
+RDEPEND="nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+RDEPEND="${RDEPEND}"
+
+#S="${WORKDIR}/${PN}-1.1"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ # Set LDFLAGS and fix expr
+ sed -i -e 's/expr/& --/' -e "s/^LFLAGS=$/&${LDFLAGS}/" configure
+}
+
+src_compile() {
+ local myconf
+
+ use debug && myconf="--debug=1"
+ use nls && myconf="--i18n=1"
+ econf \
+ --strip=0 \
+ --etcdir=/etc \
+ ${myconf} \
+ || die
+
+ emake CFLAGS="${CFLAGS}" CC="$(tc-getCC)" || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc API CHANGES CREDITS README axelrc.example
+}
+
+pkg_postinst() {
+ einfo 'To use axel with portage, try these settings in your make.conf'
+ einfo
+ einfo ' FETCHCOMMAND='\''/usr/bin/axel -a -o "\${DISTDIR}/\${FILE}.axel" "\${URI}" && mv "\${DISTDIR}/\${FILE}.axel" "\${DISTDIR}/\${FILE}"'\'
+ einfo ' RESUMECOMMAND="${FETCHCOMMAND}"'
+}
diff --git a/net-misc/axel/axel-2.4-r1.ebuild b/net-misc/axel/axel-2.4-r1.ebuild
new file mode 100644
index 000000000000..b4bc67b05476
--- /dev/null
+++ b/net-misc/axel/axel-2.4-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DOWNLOAD_ID=3016
+
+DESCRIPTION="Light Unix download accelerator"
+HOMEPAGE="http://axel.alioth.debian.org/"
+SRC_URI="http://alioth.debian.org/frs/download.php/${DOWNLOAD_ID}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris"
+IUSE="debug nls"
+
+DEPEND="nls? ( sys-devel/gettext )"
+RDEPEND="nls? ( virtual/libintl )"
+
+src_prepare() {
+ append-lfs-flags
+ sed -i -e "s/^LFLAGS=$/&${LDFLAGS}/" configure || die "sed failed"
+}
+
+src_configure() {
+ local myconf=""
+
+ use debug && myconf+=" --debug=1"
+ use nls && myconf+=" --i18n=$(use nls && echo 1 || echo 0)"
+ econf \
+ --strip=0 \
+ ${myconf}
+}
+
+src_compile() {
+ emake CFLAGS="${CPPFLAGS} ${CFLAGS}" CC="$(tc-getCC)" || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc API CHANGES CREDITS README axelrc.example || die "dodoc failed"
+}
+
+pkg_postinst() {
+ einfo 'To use axel with portage, try these settings in your make.conf'
+ einfo
+ einfo ' FETCHCOMMAND='\''axel -a -o "\${DISTDIR}/\${FILE}.axel" "\${URI}" && mv "\${DISTDIR}/\${FILE}.axel" "\${DISTDIR}/\${FILE}"'\'
+ einfo ' RESUMECOMMAND="${FETCHCOMMAND}"'
+}
diff --git a/net-misc/axel/axel-2.4-r2.ebuild b/net-misc/axel/axel-2.4-r2.ebuild
new file mode 100644
index 000000000000..f6eacf841651
--- /dev/null
+++ b/net-misc/axel/axel-2.4-r2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DOWNLOAD_ID=3016
+
+DESCRIPTION="Light Unix download accelerator"
+HOMEPAGE="http://axel.alioth.debian.org/"
+SRC_URI="http://alioth.debian.org/frs/download.php/${DOWNLOAD_ID}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc64-solaris"
+IUSE="debug nls"
+
+DEPEND="nls? ( sys-devel/gettext )"
+RDEPEND="nls? ( virtual/libintl )"
+
+DOCS=( API CHANGES CREDITS README axelrc.example )
+
+src_prepare() {
+ append-lfs-flags
+ epatch \
+ "${FILESDIR}"/${P}-buildsystem.patch \
+ "${FILESDIR}"/${P}-bffr-overflow.patch \
+ "${FILESDIR}"/${P}-max-redir.patch
+ tc-export CC
+}
+
+src_configure() {
+ local myconf=""
+
+ use debug && myconf+=" --debug=1"
+ use nls && myconf+=" --i18n=$(use nls && echo 1 || echo 0)"
+ econf \
+ --strip=0 \
+ ${myconf}
+}
+
+pkg_postinst() {
+ einfo 'To use axel with portage, try these settings in your make.conf'
+ einfo
+ einfo ' FETCHCOMMAND='\''axel -a -o "\${DISTDIR}/\${FILE}.axel" "\${URI}" && mv "\${DISTDIR}/\${FILE}.axel" "\${DISTDIR}/\${FILE}"'\'
+ einfo ' RESUMECOMMAND="${FETCHCOMMAND}"'
+}
diff --git a/net-misc/axel/files/axel-2.4-bffr-overflow.patch b/net-misc/axel/files/axel-2.4-bffr-overflow.patch
new file mode 100644
index 000000000000..24fae8ce19c0
--- /dev/null
+++ b/net-misc/axel/files/axel-2.4-bffr-overflow.patch
@@ -0,0 +1,16 @@
+ http.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/http.c b/http.c
+index 5d64e9b..db91701 100644
+--- a/http.c
++++ b/http.c
+@@ -164,7 +164,7 @@ int http_exec( http_t *conn )
+ {
+ i ++;
+ }
+- strncat( conn->headers, s, MAX_QUERY );
++ strncat( conn->headers, s, MAX_QUERY - 1);
+ }
+
+ #ifdef DEBUG
diff --git a/net-misc/axel/files/axel-2.4-buildsystem.patch b/net-misc/axel/files/axel-2.4-buildsystem.patch
new file mode 100644
index 000000000000..a1571f0fc576
--- /dev/null
+++ b/net-misc/axel/files/axel-2.4-buildsystem.patch
@@ -0,0 +1,23 @@
+ Makefile | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 1c3863a..b43fcff 100644
+--- a/Makefile
++++ b/Makefile
+@@ -51,13 +51,13 @@ uninstall-etc:
+ ### MAIN PROGRAM
+
+ $(OUTFILE): axel.o conf.o conn.o ftp.o http.o search.o tcp.o text.o
+- $(CC) *.o -o $(OUTFILE) $(LFLAGS)
++ $(CC) $(LDFLAGS) *.o -o $(OUTFILE) $(LFLAGS)
+ ifndef DEBUG
+ -$(STRIP) $(OUTFILE)
+ endif
+
+ .c.o:
+- $(CC) -c $*.c -o $*.o -Wall $(CFLAGS)
++ $(CC) $(CPPFLAGS) -c $*.c -o $*.o -Wall $(CFLAGS)
+
+ install-bin:
+ mkdir -p $(DESTDIR)$(BINDIR)/
diff --git a/net-misc/axel/files/axel-2.4-max-redir.patch b/net-misc/axel/files/axel-2.4-max-redir.patch
new file mode 100644
index 000000000000..f52796c35e2d
--- /dev/null
+++ b/net-misc/axel/files/axel-2.4-max-redir.patch
@@ -0,0 +1,16 @@
+ axel.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/axel.h b/axel.h
+index e90d30d..f6ebfe8 100644
+--- a/axel.h
++++ b/axel.h
+@@ -66,7 +66,7 @@
+ /* Compiled-in settings */
+ #define MAX_STRING 1024
+ #define MAX_ADD_HEADERS 10
+-#define MAX_REDIR 5
++#define MAX_REDIR 25
+ #define AXEL_VERSION_STRING "2.4"
+ #define DEFAULT_USER_AGENT "Axel " AXEL_VERSION_STRING " (" ARCH ")"
+
diff --git a/net-misc/axel/metadata.xml b/net-misc/axel/metadata.xml
new file mode 100644
index 000000000000..c845479d513e
--- /dev/null
+++ b/net-misc/axel/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/badvpn/Manifest b/net-misc/badvpn/Manifest
new file mode 100644
index 000000000000..c96b0ff33736
--- /dev/null
+++ b/net-misc/badvpn/Manifest
@@ -0,0 +1,5 @@
+DIST badvpn-1.999.123.tar.bz2 905823 SHA256 e971ec1c093da2ada77d14592ceefcd263ae2831ff95a3da8ee55a13495abb40 SHA512 24e591aeb907f3e5249e1b01ce62fb18a7e60898952b874ada633fa4ac31c1b456184245a67563f6977f080f9ae93da5c39049948b2eecc1e526b0c0c366b6d1 WHIRLPOOL d2440a8c427cb7c25e493fba7e9320e2ac201e9b82b6cb5f08a752b77c2121efe70694e317eff1c1c90da50e398b341e1e6bf9469f57c19a5ab9861d5a2531c8
+DIST badvpn-1.999.126.tar.bz2 936233 SHA256 188440a6d2fa575162f65baf4b8a2645d6fda71ef1a20794ec0be42a3053f2ff SHA512 3d0bbe3c8f91a3cb758b78a0fce4fd111f93fa0578ce06f0a8db5cc575d02f52248b37e7fa097447589257e47084a607a9df7078448ef44ae9fb66eb59e8b9e2 WHIRLPOOL 6767bc359c92d85d91f7b32d15c17bd0f33dcaa36716d8cc3b87eb59a110d7d26d91b38145e9f47cce3950f49470756ade29c6768b956f27108fff143248ac79
+DIST badvpn-1.999.127.tar.bz2 962224 SHA256 d20c79d69a7aa9eac1e0bf9a52fb9c9cdca78be123b6d17d59ff277f282e7943 SHA512 7484a817795392a52b44d3bf68765652739029aae8c16965b433bbfb4ca67ea70048f76376ba445196aac07a8f19f97696917ad24fe2bcb34025adda1f18a9fb WHIRLPOOL a3030691d50add2f76854b3a4c3cd1a66c3d3c53b0780c592e0a7337907c7d253a4ea552c57c26e03abc0adf5c4d2f416b18a3e74bc3a6af9b9182927cd721f5
+DIST badvpn-1.999.128.tar.bz2 1000636 SHA256 d6b28d5d566470dd1b0584b14b7ffab8159e4f604c1facbf9ef3a3ddbc0c9bfc SHA512 7d59e8365c10e7164c6c74b95d5f212ae0c480870bea31a6fb4ed25883f28bb6365e09a9271a9ecedccccd886e5f5e50a6f6df406ee3c40fad40031bbd3f049b WHIRLPOOL 5541a8d91a48f69fb5646451c276d0dd8844e508f9a33d553f08c5aabbe2c6d5bab8bd6073829641facec861d507cfce7c346497bc3f321033dd46c036f719d9
+DIST badvpn-1.999.129.tar.gz 1327123 SHA256 f4fd6fef72203acee10af7d7a6198f6f5fdfc00d9607f0924f6ebae84d570f1d SHA512 7a305198d7b4aaa31e567ff1f1bf23e0a65070d8eae78e7ed6be1a3a3b7bce7fcba32c0eb8ae549ef1851a61675afc1770f52dedf131658036b7b6414fdd4e4e WHIRLPOOL 821a4228ff1f3e2fbc5af7db07536ffeeed7c35ad6a9238948f3c9b350ddf556fbc69e036ce08ed2bc9c7c805b653ff1532c336b37b67acb40ccf41e7bacb6a2
diff --git a/net-misc/badvpn/badvpn-1.999.123-r3.ebuild b/net-misc/badvpn/badvpn-1.999.123-r3.ebuild
new file mode 100644
index 000000000000..045e993aac4e
--- /dev/null
+++ b/net-misc/badvpn/badvpn-1.999.123-r3.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils cmake-utils user
+
+MY_P=${PN}-${PV/_rc/rc}
+DESCRIPTION="Peer-to-peer VPN, NCD scripting language, tun2socks proxifier"
+HOMEPAGE="http://code.google.com/p/badvpn/"
+SRC_URI="http://badvpn.googlecode.com/files/${MY_P}.tar.bz2"
+
+LICENSE="BSD"
+KEYWORDS="amd64 x86"
+SLOT="0"
+TARGETS="+client +ncd +server +tun2socks +udpgw"
+IUSE="${TARGETS} debug"
+
+COMMON_DEPEND="
+ client? (
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/openssl
+ )
+ server? (
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/openssl
+ )
+ ncd? (
+ dev-libs/openssl
+ )"
+RDEPEND="${COMMON_DEPEND}
+ ncd? (
+ net-firewall/iptables
+ net-wireless/wpa_supplicant
+ sys-apps/iproute2
+ >=virtual/udev-171
+ )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+# we need at least one target
+REQUIRED_USE="|| ( ${TARGETS//+/} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewuser ${PN}
+}
+
+src_prepare() {
+ # allow user to easily apply patches
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_NOTHING_BY_DEFAULT=1
+ $(cmake-utils_use_build client CLIENT)
+ $(cmake-utils_use_build server SERVER)
+ $(cmake-utils_use_build ncd NCD)
+ $(cmake-utils_use_build tun2socks TUN2SOCKS)
+ $(cmake-utils_use_build udpgw UDPGW)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc ChangeLog
+
+ if use server; then
+ newinitd "${FILESDIR}"/${PN}-server.init ${PN}-server
+ newconfd "${FILESDIR}"/${PN}-server.conf ${PN}-server
+ fi
+
+ if use ncd; then
+ newinitd "${FILESDIR}"/${PN}-ncd.init ${PN}-ncd
+ newconfd "${FILESDIR}"/${PN}-ncd.conf ${PN}-ncd
+ fi
+}
diff --git a/net-misc/badvpn/badvpn-1.999.126.ebuild b/net-misc/badvpn/badvpn-1.999.126.ebuild
new file mode 100644
index 000000000000..21e2a19d7cd5
--- /dev/null
+++ b/net-misc/badvpn/badvpn-1.999.126.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils cmake-utils user toolchain-funcs
+
+MY_P=${PN}-${PV/_rc/rc}
+DESCRIPTION="Peer-to-peer VPN, NCD scripting language, tun2socks proxifier"
+HOMEPAGE="http://code.google.com/p/badvpn/"
+SRC_URI="http://badvpn.googlecode.com/files/${MY_P}.tar.bz2"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~arm ~x86"
+SLOT="0"
+TARGETS="+client +ncd +server +tun2socks +udpgw"
+IUSE="${TARGETS} debug"
+# tests are only ncd related
+RESTRICT="!ncd? ( test )"
+
+COMMON_DEPEND="
+ client? (
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/openssl
+ )
+ server? (
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/openssl
+ )
+ ncd? (
+ dev-libs/openssl
+ )"
+RDEPEND="${COMMON_DEPEND}
+ ncd? (
+ sys-apps/iproute2
+ >=virtual/udev-171
+ )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+# we need at least one target
+REQUIRED_USE="|| ( ${TARGETS//+/} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewuser ${PN}
+}
+
+src_prepare() {
+ # allow user to easily apply patches
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_NOTHING_BY_DEFAULT=1
+ $(cmake-utils_use_build client CLIENT)
+ $(cmake-utils_use_build server SERVER)
+ $(cmake-utils_use_build ncd NCD)
+ $(cmake-utils_use_build tun2socks TUN2SOCKS)
+ $(cmake-utils_use_build udpgw UDPGW)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ # OOHMSA: do this on portage level?
+ tc-is-cross-compiler && die "these tests do not work when cross compiling!"
+
+ einfo "Running NCD tests"
+ cd "${S}"/ncd/tests || die
+ bash ./run_tests "${CMAKE_BUILD_DIR}/ncd/badvpn-ncd" \
+ || die "one or more tests failed"
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc ChangeLog
+
+ if use server; then
+ newinitd "${FILESDIR}"/${PN}-server.init ${PN}-server
+ newconfd "${FILESDIR}"/${PN}-server.conf ${PN}-server
+ fi
+
+ if use ncd; then
+ newinitd "${FILESDIR}"/${PN}-ncd.init ${PN}-ncd
+ newconfd "${FILESDIR}"/${PN}-ncd.conf ${PN}-ncd
+ fi
+}
diff --git a/net-misc/badvpn/badvpn-1.999.127.ebuild b/net-misc/badvpn/badvpn-1.999.127.ebuild
new file mode 100644
index 000000000000..6839d4288a93
--- /dev/null
+++ b/net-misc/badvpn/badvpn-1.999.127.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils cmake-utils user toolchain-funcs systemd
+
+MY_P=${PN}-${PV/_rc/rc}
+DESCRIPTION="Peer-to-peer VPN, NCD scripting language, tun2socks proxifier"
+HOMEPAGE="http://code.google.com/p/badvpn/"
+SRC_URI="http://badvpn.googlecode.com/files/${MY_P}.tar.bz2"
+
+LICENSE="BSD"
+KEYWORDS="amd64 arm x86"
+SLOT="0"
+TARGETS="+client +ncd +server +tun2socks +udpgw"
+IUSE="${TARGETS} debug"
+# tests are only ncd related
+RESTRICT="!ncd? ( test )"
+
+COMMON_DEPEND="
+ client? (
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/openssl
+ )
+ server? (
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/openssl
+ )
+ ncd? (
+ dev-libs/openssl
+ )"
+RDEPEND="${COMMON_DEPEND}
+ ncd? (
+ sys-apps/iproute2
+ >=virtual/udev-171
+ )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+# we need at least one target
+REQUIRED_USE="|| ( ${TARGETS//+/} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewuser ${PN}
+}
+
+src_prepare() {
+ # allow user to easily apply patches
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_NOTHING_BY_DEFAULT=1
+ $(cmake-utils_use_build client CLIENT)
+ $(cmake-utils_use_build server SERVER)
+ $(cmake-utils_use_build ncd NCD)
+ $(cmake-utils_use_build tun2socks TUN2SOCKS)
+ $(cmake-utils_use_build udpgw UDPGW)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ # OOHMSA: do this on portage level?
+ tc-is-cross-compiler && die "these tests do not work when cross compiling!"
+
+ einfo "Running NCD tests"
+ cd "${S}"/ncd/tests || die
+ bash ./run_tests "${CMAKE_BUILD_DIR}/ncd/badvpn-ncd" \
+ || die "one or more tests failed"
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc ChangeLog
+
+ if use server; then
+ newinitd "${FILESDIR}"/${PN}-server.init ${PN}-server
+ newconfd "${FILESDIR}"/${PN}-server.conf ${PN}-server
+ fi
+
+ if use ncd; then
+ newinitd "${FILESDIR}"/${P}-ncd.init ${PN}-ncd
+ newconfd "${FILESDIR}"/${PN}-ncd.conf ${PN}-ncd
+ systemd_dounit "${FILESDIR}"/badvpn-ncd.service
+ fi
+}
diff --git a/net-misc/badvpn/badvpn-1.999.128.ebuild b/net-misc/badvpn/badvpn-1.999.128.ebuild
new file mode 100644
index 000000000000..26a39c92f408
--- /dev/null
+++ b/net-misc/badvpn/badvpn-1.999.128.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils cmake-utils user toolchain-funcs systemd
+
+MY_P=${PN}-${PV/_rc/rc}
+DESCRIPTION="Peer-to-peer VPN, NCD scripting language, tun2socks proxifier"
+HOMEPAGE="http://code.google.com/p/badvpn/"
+SRC_URI="http://badvpn.googlecode.com/files/${MY_P}.tar.bz2"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~arm ~x86"
+SLOT="0"
+TARGETS="+client +ncd +server +tun2socks +udpgw"
+IUSE="${TARGETS} debug"
+# tests are only ncd related
+RESTRICT="!ncd? ( test )"
+
+COMMON_DEPEND="
+ client? (
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/openssl
+ )
+ server? (
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/openssl
+ )
+ ncd? (
+ dev-libs/openssl
+ )"
+RDEPEND="${COMMON_DEPEND}
+ ncd? (
+ sys-apps/iproute2
+ >=virtual/udev-171
+ )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+# we need at least one target
+REQUIRED_USE="|| ( ${TARGETS//+/} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewuser ${PN}
+}
+
+src_prepare() {
+ # allow user to easily apply patches
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_NOTHING_BY_DEFAULT=1
+ $(cmake-utils_use_build client CLIENT)
+ $(cmake-utils_use_build server SERVER)
+ $(cmake-utils_use_build ncd NCD)
+ $(cmake-utils_use_build tun2socks TUN2SOCKS)
+ $(cmake-utils_use_build udpgw UDPGW)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ # OOHMSA: do this on portage level?
+ tc-is-cross-compiler && die "these tests do not work when cross compiling!"
+
+ einfo "Running NCD tests"
+ cd "${S}"/ncd/tests || die
+ bash ./run_tests "${CMAKE_BUILD_DIR}/ncd/badvpn-ncd" \
+ || die "one or more tests failed"
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc ChangeLog
+
+ if use server; then
+ newinitd "${FILESDIR}"/${PN}-server.init ${PN}-server
+ newconfd "${FILESDIR}"/${PN}-server.conf ${PN}-server
+ fi
+
+ if use ncd; then
+ newinitd "${FILESDIR}"/${PN}-1.999.127-ncd.init ${PN}-ncd
+ newconfd "${FILESDIR}"/${PN}-ncd.conf ${PN}-ncd
+ systemd_dounit "${FILESDIR}"/badvpn-ncd.service
+ fi
+}
diff --git a/net-misc/badvpn/badvpn-1.999.129.ebuild b/net-misc/badvpn/badvpn-1.999.129.ebuild
new file mode 100644
index 000000000000..92622948a84b
--- /dev/null
+++ b/net-misc/badvpn/badvpn-1.999.129.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils cmake-utils user toolchain-funcs systemd
+
+MY_P=${PN}-${PV/_rc/rc}
+DESCRIPTION="Peer-to-peer VPN, NCD scripting language, tun2socks proxifier"
+HOMEPAGE="https://github.com/ambrop72/badvpn https://code.google.com/p/badvpn/"
+SRC_URI="https://github.com/ambrop72/badvpn/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="amd64 ~arm x86"
+SLOT="0"
+TARGETS="+client +ncd +server +tun2socks +udpgw"
+IUSE="${TARGETS} debug"
+# tests are only ncd related
+RESTRICT="!ncd? ( test )"
+
+COMMON_DEPEND="
+ client? (
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/openssl
+ )
+ server? (
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/openssl
+ )
+ ncd? (
+ dev-libs/openssl
+ )"
+RDEPEND="${COMMON_DEPEND}
+ ncd? (
+ sys-apps/iproute2
+ >=virtual/udev-171
+ )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+# we need at least one target
+REQUIRED_USE="|| ( ${TARGETS//+/} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewuser ${PN}
+}
+
+src_prepare() {
+ # allow user to easily apply patches
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_NOTHING_BY_DEFAULT=1
+ $(cmake-utils_use_build client CLIENT)
+ $(cmake-utils_use_build server SERVER)
+ $(cmake-utils_use_build ncd NCD)
+ $(cmake-utils_use_build tun2socks TUN2SOCKS)
+ $(cmake-utils_use_build udpgw UDPGW)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ # OOHMSA: do this on portage level?
+ tc-is-cross-compiler && die "these tests do not work when cross compiling!"
+
+ einfo "Running NCD tests"
+ cd "${S}"/ncd/tests || die
+ bash ./run_tests "${CMAKE_BUILD_DIR}/ncd/badvpn-ncd" \
+ || die "one or more tests failed"
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc ChangeLog
+
+ if use server; then
+ newinitd "${FILESDIR}"/${PN}-server.init ${PN}-server
+ newconfd "${FILESDIR}"/${PN}-server.conf ${PN}-server
+ fi
+
+ if use ncd; then
+ newinitd "${FILESDIR}"/${PN}-1.999.127-ncd.init ${PN}-ncd
+ newconfd "${FILESDIR}"/${PN}-ncd.conf ${PN}-ncd
+ systemd_dounit "${FILESDIR}"/badvpn-ncd.service
+ fi
+}
diff --git a/net-misc/badvpn/files/badvpn-1.999.127-ncd.init b/net-misc/badvpn/files/badvpn-1.999.127-ncd.init
new file mode 100644
index 000000000000..509a17f71f18
--- /dev/null
+++ b/net-misc/badvpn/files/badvpn-1.999.127-ncd.init
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Released under the 3-clause BSD license.
+
+command="${ncd_exec:-"/usr/bin/badvpn-ncd"}"
+command_args="${ncd_args} --config-file ${ncd_config:-/etc/ncd.conf}"
+command_background="YES"
+description="Network Configuration Daemon"
+pidfile="/var/run/${RC_SVCNAME}.pid"
+
+depend() {
+ need localmount
+ after bootmisc
+ before netmount
+}
+
+start_pre() {
+ if yesno "${ncd_syslog:-NO}"; then
+ command_args="${command_args}
+ --logger syslog
+ --syslog-ident \"${ncd_syslog_ident:-${RC_SVCNAME}}\"
+ --channel-loglevel ncd_log_msg info"
+ fi
+}
diff --git a/net-misc/badvpn/files/badvpn-ncd.conf b/net-misc/badvpn/files/badvpn-ncd.conf
new file mode 100644
index 000000000000..ad34c66f7ca3
--- /dev/null
+++ b/net-misc/badvpn/files/badvpn-ncd.conf
@@ -0,0 +1,11 @@
+# NCD program file.
+#ncd_config="/etc/ncd.conf"
+
+# enable or disable syslog.
+#ncd_syslog="NO"
+
+# Syslog identification.
+#ncd_syslog_ident="ncd"
+
+# Additional arguments.
+#ncd_args=""
diff --git a/net-misc/badvpn/files/badvpn-ncd.init b/net-misc/badvpn/files/badvpn-ncd.init
new file mode 100644
index 000000000000..e07af6773567
--- /dev/null
+++ b/net-misc/badvpn/files/badvpn-ncd.init
@@ -0,0 +1,48 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Released under the 3-clause BSD license.
+
+command="${ncd_exec:-"/usr/bin/badvpn-ncd"}"
+command_args="${ncd_args} --config-file ${ncd_config:-/etc/ncd.conf}"
+command_background="YES"
+description="Network Configuration Daemon"
+pidfile="/var/run/${RC_SVCNAME}.pid"
+
+depend() {
+ need localmount
+ after bootmisc
+ before netmount
+ if yesno "${ncd_syslog:-NO}"; then
+ use logger
+ fi
+}
+
+start_pre() {
+ if yesno "${ncd_syslog:-NO}"; then
+ command_args="${command_args}
+ --logger syslog
+ --syslog-ident \"${ncd_syslog_ident:-${RC_SVCNAME}}\""
+ fi
+}
+
+start()
+{
+ [ -n "$command" ] || return 0
+ local _background=
+ ebegin "Starting ${name:-$RC_SVCNAME}"
+ if yesno "${command_background}"; then
+ if [ -z "${pidfile}" ]; then
+ eend 1 "command_background option used but no pidfile specified"
+ return 1
+ fi
+ _background="--background --make-pidfile"
+ fi
+ eval start-stop-daemon --start \
+ --exec $command \
+ ${procname:+--name} $procname \
+ ${pidfile:+--pidfile} $pidfile \
+ $_background $start_stop_daemon_args \
+ -- $command_args
+ eend $? "Failed to start $RC_SVCNAME"
+ return $?
+}
diff --git a/net-misc/badvpn/files/badvpn-ncd.service b/net-misc/badvpn/files/badvpn-ncd.service
new file mode 100644
index 000000000000..6ca7aa515e00
--- /dev/null
+++ b/net-misc/badvpn/files/badvpn-ncd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Network Configuation Daemon
+After=syslog.target
+
+[Service]
+ExecStart=/usr/bin/badvpn-ncd --logger syslog --syslog-ident ncd --loglevel warning --channel-loglevel ncd_log_msg info /etc/ncd.conf
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/net-misc/badvpn/files/badvpn-server.conf b/net-misc/badvpn/files/badvpn-server.conf
new file mode 100644
index 000000000000..ed5103d3d0ef
--- /dev/null
+++ b/net-misc/badvpn/files/badvpn-server.conf
@@ -0,0 +1,11 @@
+# User account to run server as.
+#vpn_user="badvpn"
+
+# Enable or disable syslog.
+#vpn_syslog="NO"
+
+# Syslog identification.
+#vpn_syslog_ident="badvpn-server"
+
+# Arguments to badvpn-server.
+vpn_args="--listen-addr 0.0.0.0:7179"
diff --git a/net-misc/badvpn/files/badvpn-server.init b/net-misc/badvpn/files/badvpn-server.init
new file mode 100644
index 000000000000..94e3518854cd
--- /dev/null
+++ b/net-misc/badvpn/files/badvpn-server.init
@@ -0,0 +1,48 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Released under the 3-clause BSD license.
+
+command="${vpn_exec:-/usr/bin/badvpn-server}"
+command_args="${vpn_args}"
+command_background="YES"
+description="BadVPN server"
+pidfile="/var/run/${RC_SVCNAME}.pid"
+start_stop_daemon_args="--user \"${vpn_user:-badvpn}\""
+
+depend() {
+ need localmount
+ after bootmisc
+ if yesno "${vpn_syslog:-NO}"; then
+ use logger
+ fi
+}
+
+start_pre() {
+ if yesno "${vpn_syslog:-NO}"; then
+ command_args="${command_args}
+ --logger syslog
+ --syslog-ident \"${vpn_syslog_ident:-${RC_SVCNAME}}\""
+ fi
+}
+
+start()
+{
+ [ -n "$command" ] || return 0
+ local _background=
+ ebegin "Starting ${name:-$RC_SVCNAME}"
+ if yesno "${command_background}"; then
+ if [ -z "${pidfile}" ]; then
+ eend 1 "command_background option used but no pidfile specified"
+ return 1
+ fi
+ _background="--background --make-pidfile"
+ fi
+ eval start-stop-daemon --start \
+ --exec $command \
+ ${procname:+--name} $procname \
+ ${pidfile:+--pidfile} $pidfile \
+ $_background $start_stop_daemon_args \
+ -- $command_args
+ eend $? "Failed to start $RC_SVCNAME"
+ return $?
+}
diff --git a/net-misc/badvpn/metadata.xml b/net-misc/badvpn/metadata.xml
new file mode 100644
index 000000000000..417e9d2734ed
--- /dev/null
+++ b/net-misc/badvpn/metadata.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>williamh@gentoo.org</email>
+ <description>backup Maintainer, CC him on bugs</description>
+ </maintainer>
+ <maintainer>
+ <email>ambrop7@gmail.com</email>
+ <name>Ambroz Bizjak</name>
+ <description>Proxy maintainer. CC him on bugs</description>
+ </maintainer>
+ <upstream>
+ <maintainer status="active">
+ <email>ambrop7@gmail.com</email>
+ <name>Ambroz Bizjak</name>
+ </maintainer>
+ <doc lang="en">https://code.google.com/p/badvpn/w/list</doc>
+ <bugs-to>https://github.com/ambrop72/badvpn/issues</bugs-to>
+ <remote-id type='github'>ambrop72/badvpn</remote-id>
+ <remote-id type="google-code">badvpn</remote-id>
+ </upstream>
+ <use>
+ <flag name="client">Build the badvpn-client program, a daemon that
+ runs on endpoints of the VPN.</flag>
+ <flag name="server">Build the badvpn-server program, a central
+ server that manages the VPN network.</flag>
+ <flag name="ncd">Build NCD, a lightweight scripting language
+ especially suited for network configurations.</flag>
+ <flag name="tun2socks">Build tun2socks, a program which implements
+ a TUN device that forwards TCP traffic through a SOCKS5
+ server.</flag>
+ <flag name="udpgw">Build udpgw, a small daemon which allows tun2socks to forward UDP traffic.</flag> </use>
+ <longdescription lang="en">
+ BadVPN is an open-source peer-to-peer VPN system. It provides a
+ Layer 2 (Ethernet) network between the peers (VPN nodes). The peers
+ connect to a central server which acts as a chat server for them to
+ establish direct connections between each other (data connections).
+ These connections are used for transferring network data (Ethernet
+ frames), and can be secured with a multitude of mechanisms.
+
+ The BadVPN package also includes other network-related software,
+ like tun2socks and NCD.
+ </longdescription>
+</pkgmetadata>
+
diff --git a/net-misc/balance/Manifest b/net-misc/balance/Manifest
new file mode 100644
index 000000000000..1558ce12cc14
--- /dev/null
+++ b/net-misc/balance/Manifest
@@ -0,0 +1 @@
+DIST balance-3.54.tar.gz 35166 SHA256 170b1a5dd60a566a785b72afde42a349e20fe01f53263db1279f71ef188efe45 SHA512 addddc3f76b3f85fc56ea2a8139660405d2ece43a087e20e9d57db1c0bdbbf4bd34f94c8e42936e9291c0462b3f0abae0ed97fec48540de730afd3c9898fb79d WHIRLPOOL ff4dff4c1548c2276077f2bd83d82cc64bf19feae3d48b835b48c131f5a605afdf0903459185668251328960e1a96fc644e5dbdde3a70063bdca78fc6ba5fb65
diff --git a/net-misc/balance/balance-3.54-r1.ebuild b/net-misc/balance/balance-3.54-r1.ebuild
new file mode 100644
index 000000000000..6287494e3629
--- /dev/null
+++ b/net-misc/balance/balance-3.54-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="TCP Load Balancing Port Forwarder"
+HOMEPAGE="http://www.inlab.de/balance.html"
+SRC_URI="http://www.inlab.de/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc"
+
+DEPEND="doc? ( app-text/ghostscript-gpl
+ sys-apps/groff )"
+RDEPEND=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-Makefile.patch
+ tc-export CC
+ use doc || touch balance.pdf
+}
+
+src_install() {
+ default
+
+ #autocreated on program start, if missing
+ rmdir "${D}"/var/run/${PN}
+
+ use doc && dodoc balance.pdf
+}
diff --git a/net-misc/balance/files/balance-3.54-Makefile.patch b/net-misc/balance/files/balance-3.54-Makefile.patch
new file mode 100644
index 000000000000..8b231aaa8316
--- /dev/null
+++ b/net-misc/balance/files/balance-3.54-Makefile.patch
@@ -0,0 +1,52 @@
+--- balance-3.54/Makefile
++++ balance-3.54/Makefile
+@@ -1,14 +1,14 @@
+ # $Id$
+
+ #CFLAGS=-g -I.
+-CFLAGS=-O2 -Wall -Wstrict-prototypes -Wuninitialized
++CFLAGS+=-Wall -Wstrict-prototypes -Wuninitialized
+
+ # uncomment for any OS other than Cygwin
+ BALANCE=balance
+ ROOT=root
+ INSTALL=install
+ BINDIR=/usr/sbin
+-MANDIR=${BINDIR}/../man/man1
++MANDIR=/usr/share/man/man1
+
+ # uncomment for Solaris:
+ # LIBRARIES=-lsocket -lnsl
+@@ -20,13 +20,13 @@
+ # BALANCE=balance.exe
+ # ROOT=Administrators
+
+-CC=gcc
++CC?=gcc
+ RELEASE=3.54
+
+ all: balance
+
+ balance: balance.o butils.o
+- $(CC) $(CFLAGS) -I. -o balance balance.o butils.o $(LIBRARIES)
++ $(CC) $(CFLAGS) $(LDFLAGS) -I. -o balance balance.o butils.o $(LIBRARIES)
+
+ balance.o: balance.c balance.h
+ $(CC) $(CFLAGS) -I. -c balance.c
+@@ -48,12 +48,15 @@
+ rm -f $(BALANCE) *.o balance.ps balance.pdf
+
+ install:
++ $(INSTALL) -o $(ROOT) -g $(ROOT) -m 755 -d \
++ $(DESTDIR)$(BINDIR) \
++ $(DESTDIR)$(MANDIR)
+ $(INSTALL) -o $(ROOT) -g $(ROOT) -m 755 $(BALANCE) \
+ $(DESTDIR)$(BINDIR)/$(BALANCE)
+ $(INSTALL) -o $(ROOT) -g $(ROOT) -m 755 balance.1 \
+ $(DESTDIR)$(MANDIR)
+ mkdir -p $(DESTDIR)/var/run/balance
+- chmod 1777 $(DESTDIR)/var/run/balance
++ chmod 1755 $(DESTDIR)/var/run/balance
+
+ release: balance.pdf
+ rm -rf ./releases/balance-$(RELEASE)
diff --git a/net-misc/balance/metadata.xml b/net-misc/balance/metadata.xml
new file mode 100644
index 000000000000..243b1ca9f63a
--- /dev/null
+++ b/net-misc/balance/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>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/batctl/Manifest b/net-misc/batctl/Manifest
new file mode 100644
index 000000000000..6bc9c05808c0
--- /dev/null
+++ b/net-misc/batctl/Manifest
@@ -0,0 +1,2 @@
+DIST batctl-2013.4.0.tar.gz 53074 SHA256 4deae3b6664d0d13acf7a8ece74175a31a72fe58fb15cb9112a9a2014b32cb4c SHA512 1c099f8b5633923669e41a01b8364f3b665de2c67efe05a1938e1977ffe6067e91be308f3445492001acd5e6fc0c9c930610edf351bda6920579b80b45811011 WHIRLPOOL 8ac0a563b4899b715542dad6b6761603f0fe6538e42dfdd5473049fb5ee112195cf078e2282b4cd33761591fa20b11c8365a4cd9138d376450c507537e1112fa
+DIST batctl-2014.2.0.tar.gz 56536 SHA256 872b4835d29e907e1c9e7181a6a6c34ead1aceda748b752d4f1afcd4fb2913c2 SHA512 4d78cd0914dce293b9a88c26f2b0f692fd8061aef6f47deeea433a0e700f6d11e608043981e1859dd36ed58b7bbe31483937b1f05070a210b0d55875160d2ca6 WHIRLPOOL 55b3db86a55c6a754735c763fd10323099f33d79e4d619c67efa865b93c616983ed5d5a104771ee3e442e8554a6a25f5176ed9596be4646557fe33e892f71a6f
diff --git a/net-misc/batctl/batctl-2013.4.0.ebuild b/net-misc/batctl/batctl-2013.4.0.ebuild
new file mode 100644
index 000000000000..aaddc031e64b
--- /dev/null
+++ b/net-misc/batctl/batctl-2013.4.0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit linux-info toolchain-funcs
+
+DESCRIPTION="BATMAN advanced control and management tool"
+HOMEPAGE="http://www.open-mesh.org/"
+SRC_URI="http://downloads.open-mesh.org/batman/stable/sources/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+pkg_setup() {
+ if ( linux_config_exists && linux_chkconfig_present BATMAN_ADV ) \
+ || ! has_version net-misc/batman-adv ; then
+ ewarn "You need the batman-adv kernel module,"
+ ewarn "either from the kernel tree or via net-misc/batman-adv"
+ fi
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" V=1 REVISION=gentoo-"${PVR}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install
+ dodoc README
+}
diff --git a/net-misc/batctl/batctl-2014.2.0.ebuild b/net-misc/batctl/batctl-2014.2.0.ebuild
new file mode 100644
index 000000000000..ddd68782bd75
--- /dev/null
+++ b/net-misc/batctl/batctl-2014.2.0.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit linux-info toolchain-funcs
+
+DESCRIPTION="BATMAN advanced control and management tool"
+HOMEPAGE="http://www.open-mesh.org/"
+SRC_URI="http://downloads.open-mesh.org/batman/stable/sources/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/libnl:3"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+pkg_setup() {
+ if ( linux_config_exists && linux_chkconfig_present BATMAN_ADV ) \
+ || ! has_version net-misc/batman-adv ; then
+ ewarn "You need the batman-adv kernel module,"
+ ewarn "either from the kernel tree or via net-misc/batman-adv"
+ fi
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" V=1 REVISION=gentoo-"${PVR}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install
+ dodoc README
+}
diff --git a/net-misc/batctl/metadata.xml b/net-misc/batctl/metadata.xml
new file mode 100644
index 000000000000..59acc2cc580e
--- /dev/null
+++ b/net-misc/batctl/metadata.xml
@@ -0,0 +1,9 @@
+<?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>
+</pkgmetadata>
+
diff --git a/net-misc/batman-adv/Manifest b/net-misc/batman-adv/Manifest
new file mode 100644
index 000000000000..c2e9dfbaedfe
--- /dev/null
+++ b/net-misc/batman-adv/Manifest
@@ -0,0 +1,2 @@
+DIST batman-adv-2013.4.0.tar.gz 138232 SHA256 a9b1b7542c94cc6bf7c97b7b0d02bf071b5632a64480ae419358b9cb9cab6870 SHA512 e4f29b9bf9b13a6afe25ed138e4c811b8a3b09917c435ccd5a7720b60922f215e5bb04322d9299cf6464f4f0ade892f913e3510dc19907efa475abab4a84dfa3 WHIRLPOOL 56cd2eeccd4317459162afb3995f992e90795099c2e0dde29b7f5a7ba8b2e2aa0b09d16927c1ebe580113388ced7654fef23f0af4b63466ef793202526a5eab9
+DIST batman-adv-2014.2.0.tar.gz 170320 SHA256 34764607e1ce4256105d2c49e3445fedd2bd5d56480e011a7b66449a0baeab52 SHA512 35650aa3eb8b4ddd70284d42a41ac81ea5b9184ee22cb0cbf322312b45cb0761e5344c4c20543480b58d37c9616299355694560bd38677144a9f258b5b027daa WHIRLPOOL 4b8bc3c397414245f7b88906e65c833abf4e70e4f587a2ff98524cd3648f627190f977d635d44eac10016ca18d00ead3a0f6c668f32d7d984d36a99e89b812ae
diff --git a/net-misc/batman-adv/batman-adv-2013.4.0.ebuild b/net-misc/batman-adv/batman-adv-2013.4.0.ebuild
new file mode 100644
index 000000000000..a8fe845b0189
--- /dev/null
+++ b/net-misc/batman-adv/batman-adv-2013.4.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+CONFIG_CHECK="~!CONFIG_BATMAN_ADV"
+MODULE_NAMES="${PN}(net:${S}:${S})"
+BUILD_TARGETS="all"
+
+inherit eutils linux-mod
+
+DESCRIPTION="Better approach to mobile Ad-Hoc networking on layer 2 kernel module"
+HOMEPAGE="http://www.open-mesh.org/"
+SRC_URI="http://downloads.open-mesh.org/batman/stable/sources/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bla dat debug nc"
+
+DEPEND=""
+RDEPEND=""
+
+src_compile() {
+ BUILD_PARAMS="CONFIG_BATMAN_ADV_DEBUG=$(usex debug y n)"
+ BUILD_PARAMS+=" CONFIG_BATMAN_ADV_BLA=$(usex bla y n)"
+ BUILD_PARAMS+=" CONFIG_BATMAN_ADV_DAT=$(usex dat y n)"
+ BUILD_PARAMS+=" CONFIG_BATMAN_ADV_NC=$(usex nc y n)"
+ export BUILD_PARAMS
+ export KERNELPATH="${KERNEL_DIR}"
+ linux-mod_src_compile
+}
+
+src_install() {
+ linux-mod_src_install
+ dodoc README CHANGELOG
+}
diff --git a/net-misc/batman-adv/batman-adv-2014.2.0.ebuild b/net-misc/batman-adv/batman-adv-2014.2.0.ebuild
new file mode 100644
index 000000000000..31ab40ce6a3d
--- /dev/null
+++ b/net-misc/batman-adv/batman-adv-2014.2.0.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+CONFIG_CHECK="~!BATMAN_ADV ~LIBCRC32C ~CRC16"
+MODULE_NAMES="${PN}(net:${S}:${S})"
+BUILD_TARGETS="all"
+
+inherit eutils linux-mod
+
+DESCRIPTION="Better approach to mobile Ad-Hoc networking on layer 2 kernel module"
+HOMEPAGE="http://www.open-mesh.org/"
+SRC_URI="http://downloads.open-mesh.org/batman/stable/sources/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bla dat debug nc mcast"
+
+DEPEND=""
+RDEPEND=""
+
+src_compile() {
+ BUILD_PARAMS="CONFIG_BATMAN_ADV_DEBUG=$(usex debug y n)"
+ BUILD_PARAMS+=" CONFIG_BATMAN_ADV_BLA=$(usex bla y n)"
+ BUILD_PARAMS+=" CONFIG_BATMAN_ADV_DAT=$(usex dat y n)"
+ BUILD_PARAMS+=" CONFIG_BATMAN_ADV_NC=$(usex nc y n)"
+ BUILD_PARAMS+=" CONFIG_BATMAN_ADV_NC=$(usex mcast y n)"
+ export BUILD_PARAMS
+ export KERNELPATH="${KERNEL_DIR}"
+ linux-mod_src_compile
+}
+
+src_install() {
+ linux-mod_src_install
+ dodoc README CHANGELOG
+}
diff --git a/net-misc/batman-adv/metadata.xml b/net-misc/batman-adv/metadata.xml
new file mode 100644
index 000000000000..91ea9dfad76e
--- /dev/null
+++ b/net-misc/batman-adv/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>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+<use>
+ <flag name="bla">B.A.T.M.A.N. bridge loop avoidance</flag>
+ <flag name="dat">B.A.T.M.A.N. distributed arp table</flag>
+ <flag name="nc">B.A.T.M.A.N. network coding</flag>
+ <flag name="mcast">B.A.T.M.A.N. multicast optimizations</flag>
+</use>
+</pkgmetadata>
+
diff --git a/net-misc/bfgminer/Manifest b/net-misc/bfgminer/Manifest
new file mode 100644
index 000000000000..3f78149a8619
--- /dev/null
+++ b/net-misc/bfgminer/Manifest
@@ -0,0 +1,9 @@
+DIST bfgminer-3.10.10.tbz2 1087392 SHA256 b361d6f195e4c91eb01b08f0907615029fc9bd7d58c017bc7943d0333c4ba018 SHA512 c8f6ee424dfd948f543c4ef20885f683acd9fc8925eb4cd2b4255b4b1073b5a58303f468adff2e9689df16833d4a1cdabc9f464d241d9eb1c8c5df0eae322cf0 WHIRLPOOL aabce648db6026f6a4527dafa6ed7e64b03cb9b0e5993a8a48b22c93683b78f992f0cb67c03dd2c72945bc92a42fa514a7a28a97a7e73149ddf1fd5e840c8d6a
+DIST bfgminer-3.10.5.tbz2 1091287 SHA256 224e02979ed27f7cebe47ca7a17fa9a1ecce7680531c3995daade54cc3be2807 SHA512 500745b09ced2102cb7bfee8dbe3e44bf69c3220fff5d2fdc642a1b4c0674f36a1786c1e384ab641dde5b3149713d9b0a4e520cfd50c2cc89710fe54f1315303 WHIRLPOOL 0b4299b56b86cc4633225a321c957ce47fd719f3132c32f34618de2e7b15fc388a39cc3627959207490d7f8fb263942cc3be5a710b9cbe7114988364ba1a43fa
+DIST bfgminer-3.10.8.tbz2 1090429 SHA256 d9e67dfab78c3400954285d5f7d931f057bc8f491aacd387eb2ebe0d71414258 SHA512 dd42963d051cd64ab7b93404e2fe65b2de277b1e31af78defc595955a09064102ef006352c91a94c91b77aebbff967eb6ee04c4b625752331ff679a612f762fd WHIRLPOOL 74bdd376d6908c23d3308075e36eacac3523b24991e459b87411ef041a95e4ac07c03aa89a080847e07dfea5032c2093779e52de638374b54e7081b883e1bf33
+DIST bfgminer-4.10.1.tar.xz 986132 SHA256 a7862aabf8470c71fb275e2561ab9c1b1f1c19ba58d054048947c467f270330a SHA512 2e23d57261ce7ebc20b3b5a61e0454a69c06966bd8a04de85102e13f94052e527e04eff0314c323c54ca690b200a16b011b73a821a049993c4db5196b233cc94 WHIRLPOOL 4e82cee09452f1baac54320f3dd2c13e07c44ad395fed5762d5cceb505c593689b981c2ddde920a3f617528a0d2cd7d8c2bf81c1d50ddad8c44a260c4a1f8052
+DIST bfgminer-4.10.2.tar.xz 996560 SHA256 f7977bdf2ecd07962cf365b045ef440afd31b38034d3268091ccf74c84644b43 SHA512 1630007b437b78f3314a46a7064070cdaa64c9547311e3021717430d6364803d1cec91bb66d483cd6cee35c6422168b6413e91fade18d536df729caf5d17ab09 WHIRLPOOL e4d65b4ecfb94bff649b4e5625df1b2336747f863c8be86679b06b048e04ceb32ff0a716c621276373b489bedc6ce2884d2792af742874ab3cf7ef0e309f1e70
+DIST bfgminer-4.10.3.tar.xz 988552 SHA256 c9e4ac3754dad838d3a8120afd499751ac2e8b15fe6dd6d18be28fc1ec72355a SHA512 99b684382c61c9e2eb0a3469af0f33ddb427f8f612bbad5623de29168547c7a87d065b18134b7e944163dcb429a9025f42c19ff8ac68cfeed705e008ef6292fb WHIRLPOOL b0887909dc878d9cf914bd092f3abbc2527a30cb4359f31cafbcc417cffa145bc3d3ab7a4809e8b068d8545ee5f01078cde753e37a615dc4532a2a352d75987a
+DIST bfgminer-5.0.0.tar.xz 1012092 SHA256 f1dada4d83737f7bc9623ad695a07a88808d8103c9c7617ce18825d241e328fd SHA512 fc1b116347e0b2af4e2c7f895368abe156019be5495e286df2f90708c16c1739e7362682389eb88ce64835d53545a5603eab4818d70018f7f872a28b4ec6c797 WHIRLPOOL 95085f7ddc374579520bae130b12923669c5788c0ea21e7377e57e907ed997936f6a413d9067c0121410bde42b33c0b194774794965a86328b60f3cf0d881165
+DIST bfgminer-5.1.0.tar.xz 1024292 SHA256 436595e8b3af267e8fed023ac6b5f208a385d891d0c3c1c41b8aa13f1c1e69c9 SHA512 826f3b1b2a3c0c0ce66ce888308cc531a2f8cf8212771bc07a650cf2811aeb40ed1d41ba1ffc8b3b16719cf261a5ce9d087bfa17603255cc53f0866b7ddc5459 WHIRLPOOL 9e1310b47f678c17840216e82f99d3c06152ad2efd49096ce27e31614282da62359bcca1e0a812ca2433fc933c5848ae0a8c271ccb2b7c8a7102e7d25b022ad2
+DIST bfgminer-5.2.0.tar.xz 1017012 SHA256 0cec8a4012d5784f781201d245bee834b0085274a24737ff3a4d0a28d48edc28 SHA512 5bb930d3cf9aed0ae9eaabbd92c3a26146a7308e61bcf5ebdf67f8f5f70a7bae1df0bad51312b4bdfabcc10547b0d991a1117db5f6b98b1047c1dae6fd880f85 WHIRLPOOL f18d4d029d6296d130bbb439b1323fe9ae8dfd89ddc3cdd3f4f85742969a17ccadb7ad49ff3527e9399d4b60ff6b7c2bd83cd291003e0f676af4307141b635da
diff --git a/net-misc/bfgminer/bfgminer-3.10.10.ebuild b/net-misc/bfgminer/bfgminer-3.10.10.ebuild
new file mode 100644
index 000000000000..26093d157c86
--- /dev/null
+++ b/net-misc/bfgminer/bfgminer-3.10.10.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Modular Bitcoin ASIC/FPGA/GPU/CPU miner in C"
+HOMEPAGE="https://bitcointalk.org/?topic=168174"
+SRC_URI="http://luke.dashjr.org/programs/bitcoin/files/${PN}/${PV}/${P}.tbz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
+
+# TODO: knc (needs i2c-tools header)
+IUSE="+adl antminer avalon bifury bitforce bfsb bigpic bitfury cpumining drillbit examples hardened hashbuster hashbuster2 hashfast icarus klondike +libusb littlefury lm_sensors metabank modminer nanofury ncurses +opencl proxy proxy_getwork proxy_stratum screen scrypt twinfury +udev unicode x6500 ztex"
+REQUIRED_USE='
+ || ( antminer avalon bfsb bifury bigpic bitforce bitfury cpumining drillbit hashbuster hashbuster2 hashfast icarus klondike littlefury metabank modminer nanofury opencl proxy twinfury x6500 ztex )
+ adl? ( opencl )
+ bfsb? ( bitfury )
+ bigpic? ( bitfury )
+ drillbit? ( bitfury )
+ hashbuster? ( bitfury )
+ hashbuster2? ( bitfury libusb )
+ klondike? ( libusb )
+ littlefury? ( bitfury )
+ lm_sensors? ( opencl )
+ metabank? ( bitfury )
+ nanofury? ( bitfury )
+ scrypt? ( || ( cpumining opencl proxy ) )
+ twinfury? ( bitfury )
+ unicode? ( ncurses )
+ proxy? ( || ( proxy_getwork proxy_stratum ) )
+ proxy_getwork? ( proxy )
+ proxy_stratum? ( proxy )
+ x6500? ( libusb )
+ ztex? ( libusb )
+'
+
+DEPEND='
+ net-misc/curl
+ ncurses? (
+ sys-libs/ncurses[unicode?]
+ )
+ >=dev-libs/jansson-2
+ net-libs/libblkmaker:=
+ udev? (
+ virtual/udev
+ )
+ hashbuster? (
+ dev-libs/hidapi
+ )
+ libusb? (
+ virtual/libusb:1
+ )
+ lm_sensors? (
+ sys-apps/lm_sensors
+ )
+ nanofury? (
+ dev-libs/hidapi
+ )
+ proxy_getwork? (
+ net-libs/libmicrohttpd
+ )
+ proxy_stratum? (
+ dev-libs/libevent
+ )
+ screen? (
+ app-misc/screen
+ || (
+ >=sys-apps/coreutils-8.15
+ sys-freebsd/freebsd-bin
+ app-misc/realpath
+ )
+ )
+'
+RDEPEND="${DEPEND}
+ opencl? (
+ || (
+ virtual/opencl
+ virtual/opencl-sdk
+ dev-util/ati-stream-sdk
+ dev-util/ati-stream-sdk-bin
+ dev-util/amdstream
+ dev-util/amd-app-sdk
+ dev-util/amd-app-sdk-bin
+ dev-util/nvidia-cuda-sdk[opencl]
+ dev-util/intel-opencl-sdk
+ )
+ )
+"
+DEPEND="${DEPEND}
+ virtual/pkgconfig
+ >=dev-libs/uthash-1.9.7
+ sys-apps/sed
+ cpumining? (
+ amd64? (
+ >=dev-lang/yasm-1.0.1
+ )
+ x86? (
+ >=dev-lang/yasm-1.0.1
+ )
+ )
+"
+
+src_configure() {
+ local CFLAGS="${CFLAGS}"
+ local with_curses
+ use hardened && CFLAGS="${CFLAGS} -nopie"
+
+ if use ncurses; then
+ if use unicode; then
+ with_curses='--with-curses=ncursesw'
+ else
+ with_curses='--with-curses=ncurses'
+ fi
+ else
+ with_curses='--without-curses'
+ fi
+
+ CFLAGS="${CFLAGS}" \
+ econf \
+ --docdir="/usr/share/doc/${PF}" \
+ $(use_enable adl) \
+ $(use_enable antminer) \
+ $(use_enable avalon) \
+ $(use_enable bifury) \
+ $(use_enable bitforce) \
+ $(use_enable bfsb) \
+ $(use_enable bigpic) \
+ $(use_enable bitfury) \
+ $(use_enable cpumining) \
+ $(use_enable drillbit) \
+ $(use_enable hashbuster) \
+ $(use_enable hashbuster2 hashbusterusb) \
+ $(use_enable hashfast) \
+ $(use_enable icarus) \
+ $(use_enable klondike) \
+ $(use_enable littlefury) \
+ $(use_enable metabank) \
+ $(use_enable modminer) \
+ $(use_enable nanofury) \
+ $(use_enable opencl) \
+ $(use_enable scrypt) \
+ $(use_enable twinfury) \
+ --with-system-libblkmaker \
+ $with_curses \
+ $(use_with udev libudev) \
+ $(use_with lm_sensors sensors) \
+ $(use_with proxy_getwork libmicrohttpd) \
+ $(use_with proxy_stratum libevent) \
+ $(use_enable x6500) \
+ $(use_enable ztex)
+}
+
+src_install() {
+ emake install DESTDIR="$D"
+ if ! use examples; then
+ rm -r "${D}/usr/share/doc/${PF}/rpc-examples"
+ fi
+ if ! use screen; then
+ rm "${D}/usr/bin/start-bfgminer.sh"
+ fi
+}
diff --git a/net-misc/bfgminer/bfgminer-3.10.5.ebuild b/net-misc/bfgminer/bfgminer-3.10.5.ebuild
new file mode 100644
index 000000000000..09f7262daba9
--- /dev/null
+++ b/net-misc/bfgminer/bfgminer-3.10.5.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Modular Bitcoin ASIC/FPGA/GPU/CPU miner in C"
+HOMEPAGE="https://bitcointalk.org/?topic=168174"
+SRC_URI="http://luke.dashjr.org/programs/bitcoin/files/${PN}/${PV}/${P}.tbz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~mips ~ppc ~ppc64 x86"
+
+# TODO: knc (needs i2c-tools header)
+IUSE="+adl antminer avalon bifury bitforce bfsb bigpic bitfury cpumining drillbit examples hardened hashbuster hashbuster2 hashfast icarus klondike +libusb littlefury lm_sensors metabank modminer nanofury ncurses +opencl proxy proxy_getwork proxy_stratum screen scrypt twinfury +udev unicode x6500 ztex"
+REQUIRED_USE='
+ || ( antminer avalon bfsb bifury bigpic bitforce bitfury cpumining drillbit hashbuster hashbuster2 hashfast icarus klondike littlefury metabank modminer nanofury opencl proxy twinfury x6500 ztex )
+ adl? ( opencl )
+ bfsb? ( bitfury )
+ bigpic? ( bitfury )
+ drillbit? ( bitfury )
+ hashbuster? ( bitfury )
+ hashbuster2? ( bitfury libusb )
+ klondike? ( libusb )
+ littlefury? ( bitfury )
+ lm_sensors? ( opencl )
+ metabank? ( bitfury )
+ nanofury? ( bitfury )
+ scrypt? ( || ( cpumining opencl ) )
+ twinfury? ( bitfury )
+ unicode? ( ncurses )
+ proxy? ( || ( proxy_getwork proxy_stratum ) )
+ proxy_getwork? ( proxy )
+ proxy_stratum? ( proxy )
+ x6500? ( libusb )
+ ztex? ( libusb )
+'
+
+DEPEND='
+ net-misc/curl
+ ncurses? (
+ sys-libs/ncurses[unicode?]
+ )
+ >=dev-libs/jansson-2
+ net-libs/libblkmaker
+ udev? (
+ virtual/udev
+ )
+ hashbuster? (
+ dev-libs/hidapi
+ )
+ libusb? (
+ virtual/libusb:1
+ )
+ lm_sensors? (
+ sys-apps/lm_sensors
+ )
+ nanofury? (
+ dev-libs/hidapi
+ )
+ proxy_getwork? (
+ net-libs/libmicrohttpd
+ )
+ proxy_stratum? (
+ dev-libs/libevent
+ )
+ screen? (
+ app-misc/screen
+ || (
+ >=sys-apps/coreutils-8.15
+ sys-freebsd/freebsd-bin
+ app-misc/realpath
+ )
+ )
+'
+RDEPEND="${DEPEND}
+ opencl? (
+ || (
+ virtual/opencl
+ dev-util/nvidia-cuda-sdk[opencl]
+ )
+ )
+"
+DEPEND="${DEPEND}
+ virtual/pkgconfig
+ >=dev-libs/uthash-1.9.7
+ sys-apps/sed
+ cpumining? (
+ amd64? (
+ >=dev-lang/yasm-1.0.1
+ )
+ x86? (
+ >=dev-lang/yasm-1.0.1
+ )
+ )
+"
+
+src_configure() {
+ local CFLAGS="${CFLAGS}"
+ local with_curses
+ use hardened && CFLAGS="${CFLAGS} -nopie"
+
+ if use ncurses; then
+ if use unicode; then
+ with_curses='--with-curses=ncursesw'
+ else
+ with_curses='--with-curses=ncurses'
+ fi
+ else
+ with_curses='--without-curses'
+ fi
+
+ CFLAGS="${CFLAGS}" \
+ econf \
+ --docdir="/usr/share/doc/${PF}" \
+ $(use_enable adl) \
+ $(use_enable antminer) \
+ $(use_enable avalon) \
+ $(use_enable bifury) \
+ $(use_enable bitforce) \
+ $(use_enable bfsb) \
+ $(use_enable bigpic) \
+ $(use_enable bitfury) \
+ $(use_enable cpumining) \
+ $(use_enable drillbit) \
+ $(use_enable hashbuster) \
+ $(use_enable hashbuster2 hashbusterusb) \
+ $(use_enable hashfast) \
+ $(use_enable icarus) \
+ $(use_enable klondike) \
+ $(use_enable littlefury) \
+ $(use_enable metabank) \
+ $(use_enable modminer) \
+ $(use_enable nanofury) \
+ $(use_enable opencl) \
+ $(use_enable scrypt) \
+ $(use_enable twinfury) \
+ --with-system-libblkmaker \
+ $with_curses \
+ $(use_with udev libudev) \
+ $(use_with lm_sensors sensors) \
+ $(use_with proxy_getwork libmicrohttpd) \
+ $(use_with proxy_stratum libevent) \
+ $(use_enable x6500) \
+ $(use_enable ztex)
+}
+
+src_install() {
+ emake install DESTDIR="$D"
+ if ! use examples; then
+ rm -r "${D}/usr/share/doc/${PF}/rpc-examples"
+ fi
+ if ! use screen; then
+ rm "${D}/usr/bin/start-bfgminer.sh"
+ fi
+}
diff --git a/net-misc/bfgminer/bfgminer-3.10.8.ebuild b/net-misc/bfgminer/bfgminer-3.10.8.ebuild
new file mode 100644
index 000000000000..bd156beb5f10
--- /dev/null
+++ b/net-misc/bfgminer/bfgminer-3.10.8.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Modular Bitcoin ASIC/FPGA/GPU/CPU miner in C"
+HOMEPAGE="https://bitcointalk.org/?topic=168174"
+SRC_URI="http://luke.dashjr.org/programs/bitcoin/files/${PN}/${PV}/${P}.tbz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
+
+# TODO: knc (needs i2c-tools header)
+IUSE="+adl antminer avalon bifury bitforce bfsb bigpic bitfury cpumining drillbit examples hardened hashbuster hashbuster2 hashfast icarus klondike +libusb littlefury lm_sensors metabank modminer nanofury ncurses +opencl proxy proxy_getwork proxy_stratum screen scrypt twinfury +udev unicode x6500 ztex"
+REQUIRED_USE='
+ || ( antminer avalon bfsb bifury bigpic bitforce bitfury cpumining drillbit hashbuster hashbuster2 hashfast icarus klondike littlefury metabank modminer nanofury opencl proxy twinfury x6500 ztex )
+ adl? ( opencl )
+ bfsb? ( bitfury )
+ bigpic? ( bitfury )
+ drillbit? ( bitfury )
+ hashbuster? ( bitfury )
+ hashbuster2? ( bitfury libusb )
+ klondike? ( libusb )
+ littlefury? ( bitfury )
+ lm_sensors? ( opencl )
+ metabank? ( bitfury )
+ nanofury? ( bitfury )
+ scrypt? ( || ( cpumining opencl proxy ) )
+ twinfury? ( bitfury )
+ unicode? ( ncurses )
+ proxy? ( || ( proxy_getwork proxy_stratum ) )
+ proxy_getwork? ( proxy )
+ proxy_stratum? ( proxy )
+ x6500? ( libusb )
+ ztex? ( libusb )
+'
+
+DEPEND='
+ net-misc/curl
+ ncurses? (
+ sys-libs/ncurses[unicode?]
+ )
+ >=dev-libs/jansson-2
+ net-libs/libblkmaker:=
+ udev? (
+ virtual/udev
+ )
+ hashbuster? (
+ dev-libs/hidapi
+ )
+ libusb? (
+ virtual/libusb:1
+ )
+ lm_sensors? (
+ sys-apps/lm_sensors
+ )
+ nanofury? (
+ dev-libs/hidapi
+ )
+ proxy_getwork? (
+ net-libs/libmicrohttpd
+ )
+ proxy_stratum? (
+ dev-libs/libevent
+ )
+ screen? (
+ app-misc/screen
+ || (
+ >=sys-apps/coreutils-8.15
+ sys-freebsd/freebsd-bin
+ app-misc/realpath
+ )
+ )
+'
+RDEPEND="${DEPEND}
+ opencl? (
+ || (
+ virtual/opencl
+ dev-util/nvidia-cuda-sdk[opencl]
+ )
+ )
+"
+DEPEND="${DEPEND}
+ virtual/pkgconfig
+ >=dev-libs/uthash-1.9.7
+ sys-apps/sed
+ cpumining? (
+ amd64? (
+ >=dev-lang/yasm-1.0.1
+ )
+ x86? (
+ >=dev-lang/yasm-1.0.1
+ )
+ )
+"
+
+src_configure() {
+ local CFLAGS="${CFLAGS}"
+ local with_curses
+ use hardened && CFLAGS="${CFLAGS} -nopie"
+
+ if use ncurses; then
+ if use unicode; then
+ with_curses='--with-curses=ncursesw'
+ else
+ with_curses='--with-curses=ncurses'
+ fi
+ else
+ with_curses='--without-curses'
+ fi
+
+ CFLAGS="${CFLAGS}" \
+ econf \
+ --docdir="/usr/share/doc/${PF}" \
+ $(use_enable adl) \
+ $(use_enable antminer) \
+ $(use_enable avalon) \
+ $(use_enable bifury) \
+ $(use_enable bitforce) \
+ $(use_enable bfsb) \
+ $(use_enable bigpic) \
+ $(use_enable bitfury) \
+ $(use_enable cpumining) \
+ $(use_enable drillbit) \
+ $(use_enable hashbuster) \
+ $(use_enable hashbuster2 hashbusterusb) \
+ $(use_enable hashfast) \
+ $(use_enable icarus) \
+ $(use_enable klondike) \
+ $(use_enable littlefury) \
+ $(use_enable metabank) \
+ $(use_enable modminer) \
+ $(use_enable nanofury) \
+ $(use_enable opencl) \
+ $(use_enable scrypt) \
+ $(use_enable twinfury) \
+ --with-system-libblkmaker \
+ $with_curses \
+ $(use_with udev libudev) \
+ $(use_with lm_sensors sensors) \
+ $(use_with proxy_getwork libmicrohttpd) \
+ $(use_with proxy_stratum libevent) \
+ $(use_enable x6500) \
+ $(use_enable ztex)
+}
+
+src_install() {
+ emake install DESTDIR="$D"
+ if ! use examples; then
+ rm -r "${D}/usr/share/doc/${PF}/rpc-examples"
+ fi
+ if ! use screen; then
+ rm "${D}/usr/bin/start-bfgminer.sh"
+ fi
+}
diff --git a/net-misc/bfgminer/bfgminer-4.10.1.ebuild b/net-misc/bfgminer/bfgminer-4.10.1.ebuild
new file mode 100644
index 000000000000..edd840685ec2
--- /dev/null
+++ b/net-misc/bfgminer/bfgminer-4.10.1.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Modular Bitcoin ASIC/FPGA/GPU/CPU miner in C"
+HOMEPAGE="https://bitcointalk.org/?topic=168174"
+SRC_URI="http://luke.dashjr.org/programs/bitcoin/files/${PN}/${PV}/${P}.txz -> ${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
+
+# TODO: knc (needs i2c-tools header)
+# TODO: minergate (needs actual miner_gate)
+# TODO: titan
+IUSE="adl antminer avalon avalonmm bfx bifury bitforce bfsb bigpic bitfury cointerra cpumining drillbit dualminer examples gridseed hardened hashbuster hashbuster2 hashfast icarus jingtian klondike +libusb littlefury lm_sensors metabank modminer nanofury ncurses opencl proxy proxy_getwork proxy_stratum rockminer screen scrypt twinfury +udev udev-broad-rules unicode x6500 zeusminer ztex"
+REQUIRED_USE='
+ || ( antminer avalon avalonmm bfsb bfx bifury bigpic bitforce bitfury cointerra cpumining drillbit dualminer gridseed hashbuster hashbuster2 hashfast icarus klondike littlefury metabank modminer nanofury opencl proxy twinfury x6500 zeusminer ztex )
+ adl? ( opencl )
+ bfsb? ( bitfury )
+ bfx? ( bitfury libusb )
+ bigpic? ( bitfury )
+ drillbit? ( bitfury )
+ dualminer? ( icarus )
+ gridseed? ( scrypt )
+ hashbuster? ( bitfury )
+ hashbuster2? ( bitfury libusb )
+ klondike? ( libusb )
+ littlefury? ( bitfury )
+ lm_sensors? ( opencl )
+ metabank? ( bitfury )
+ nanofury? ( bitfury )
+ scrypt? ( || ( cpumining dualminer gridseed opencl proxy zeusminer ) )
+ twinfury? ( bitfury )
+ unicode? ( ncurses )
+ proxy? ( || ( proxy_getwork proxy_stratum ) )
+ proxy_getwork? ( proxy )
+ proxy_stratum? ( proxy )
+ x6500? ( libusb )
+ zeusminer? ( scrypt )
+ ztex? ( libusb )
+'
+
+DEPEND='
+ net-misc/curl
+ ncurses? (
+ sys-libs/ncurses[unicode?]
+ )
+ >=dev-libs/jansson-2
+ dev-libs/libbase58
+ net-libs/libblkmaker
+ udev? (
+ virtual/udev
+ )
+ hashbuster? (
+ dev-libs/hidapi
+ )
+ libusb? (
+ virtual/libusb:1
+ )
+ lm_sensors? (
+ sys-apps/lm_sensors
+ )
+ nanofury? (
+ dev-libs/hidapi
+ )
+ proxy_getwork? (
+ net-libs/libmicrohttpd
+ )
+ proxy_stratum? (
+ dev-libs/libevent
+ )
+ screen? (
+ app-misc/screen
+ || (
+ >=sys-apps/coreutils-8.15
+ sys-freebsd/freebsd-bin
+ app-misc/realpath
+ )
+ )
+'
+RDEPEND="${DEPEND}
+ opencl? (
+ || (
+ virtual/opencl
+ dev-util/nvidia-cuda-sdk[opencl]
+ )
+ )
+"
+DEPEND="${DEPEND}
+ virtual/pkgconfig
+ >=dev-libs/uthash-1.9.7
+ sys-apps/sed
+ cpumining? (
+ amd64? (
+ >=dev-lang/yasm-1.0.1
+ )
+ x86? (
+ >=dev-lang/yasm-1.0.1
+ )
+ )
+"
+
+src_configure() {
+ local CFLAGS="${CFLAGS}"
+ local with_curses
+ use hardened && CFLAGS="${CFLAGS} -nopie"
+
+ if use ncurses; then
+ if use unicode; then
+ with_curses='--with-curses=ncursesw'
+ else
+ with_curses='--with-curses=ncurses'
+ fi
+ else
+ with_curses='--without-curses'
+ fi
+
+ CFLAGS="${CFLAGS}" \
+ econf \
+ --docdir="/usr/share/doc/${PF}" \
+ $(use_enable adl) \
+ $(use_enable antminer) \
+ $(use_enable avalon) \
+ $(use_enable avalonmm) \
+ $(use_enable bifury) \
+ $(use_enable bitforce) \
+ $(use_enable bfsb) \
+ $(use_enable bfx) \
+ $(use_enable bigpic) \
+ $(use_enable bitfury) \
+ $(use_enable cointerra) \
+ $(use_enable cpumining) \
+ $(use_enable drillbit) \
+ $(use_enable dualminer) \
+ $(use_enable gridseed) \
+ $(use_enable hashbuster) \
+ $(use_enable hashbuster2 hashbusterusb) \
+ $(use_enable hashfast) \
+ $(use_enable icarus) \
+ $(use_enable jingtian) \
+ $(use_enable klondike) \
+ $(use_enable littlefury) \
+ $(use_enable metabank) \
+ $(use_enable modminer) \
+ $(use_enable nanofury) \
+ $(use_enable opencl) \
+ $(use_enable rockminer) \
+ $(use_enable scrypt) \
+ $(use_enable twinfury) \
+ --with-system-libblkmaker \
+ $with_curses \
+ $(use_with udev libudev) \
+ $(use_enable udev-broad-rules broad-udevrules) \
+ $(use_with lm_sensors sensors) \
+ $(use_with proxy_getwork libmicrohttpd) \
+ $(use_with proxy_stratum libevent) \
+ $(use_enable x6500) \
+ $(use_enable zeusminer) \
+ $(use_enable ztex)
+}
+
+src_install() {
+ emake install DESTDIR="$D"
+ if ! use examples; then
+ rm -r "${D}/usr/share/doc/${PF}/rpc-examples"
+ fi
+ if ! use screen; then
+ rm "${D}/usr/bin/start-bfgminer.sh"
+ fi
+}
diff --git a/net-misc/bfgminer/bfgminer-4.10.2.ebuild b/net-misc/bfgminer/bfgminer-4.10.2.ebuild
new file mode 100644
index 000000000000..edd840685ec2
--- /dev/null
+++ b/net-misc/bfgminer/bfgminer-4.10.2.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Modular Bitcoin ASIC/FPGA/GPU/CPU miner in C"
+HOMEPAGE="https://bitcointalk.org/?topic=168174"
+SRC_URI="http://luke.dashjr.org/programs/bitcoin/files/${PN}/${PV}/${P}.txz -> ${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
+
+# TODO: knc (needs i2c-tools header)
+# TODO: minergate (needs actual miner_gate)
+# TODO: titan
+IUSE="adl antminer avalon avalonmm bfx bifury bitforce bfsb bigpic bitfury cointerra cpumining drillbit dualminer examples gridseed hardened hashbuster hashbuster2 hashfast icarus jingtian klondike +libusb littlefury lm_sensors metabank modminer nanofury ncurses opencl proxy proxy_getwork proxy_stratum rockminer screen scrypt twinfury +udev udev-broad-rules unicode x6500 zeusminer ztex"
+REQUIRED_USE='
+ || ( antminer avalon avalonmm bfsb bfx bifury bigpic bitforce bitfury cointerra cpumining drillbit dualminer gridseed hashbuster hashbuster2 hashfast icarus klondike littlefury metabank modminer nanofury opencl proxy twinfury x6500 zeusminer ztex )
+ adl? ( opencl )
+ bfsb? ( bitfury )
+ bfx? ( bitfury libusb )
+ bigpic? ( bitfury )
+ drillbit? ( bitfury )
+ dualminer? ( icarus )
+ gridseed? ( scrypt )
+ hashbuster? ( bitfury )
+ hashbuster2? ( bitfury libusb )
+ klondike? ( libusb )
+ littlefury? ( bitfury )
+ lm_sensors? ( opencl )
+ metabank? ( bitfury )
+ nanofury? ( bitfury )
+ scrypt? ( || ( cpumining dualminer gridseed opencl proxy zeusminer ) )
+ twinfury? ( bitfury )
+ unicode? ( ncurses )
+ proxy? ( || ( proxy_getwork proxy_stratum ) )
+ proxy_getwork? ( proxy )
+ proxy_stratum? ( proxy )
+ x6500? ( libusb )
+ zeusminer? ( scrypt )
+ ztex? ( libusb )
+'
+
+DEPEND='
+ net-misc/curl
+ ncurses? (
+ sys-libs/ncurses[unicode?]
+ )
+ >=dev-libs/jansson-2
+ dev-libs/libbase58
+ net-libs/libblkmaker
+ udev? (
+ virtual/udev
+ )
+ hashbuster? (
+ dev-libs/hidapi
+ )
+ libusb? (
+ virtual/libusb:1
+ )
+ lm_sensors? (
+ sys-apps/lm_sensors
+ )
+ nanofury? (
+ dev-libs/hidapi
+ )
+ proxy_getwork? (
+ net-libs/libmicrohttpd
+ )
+ proxy_stratum? (
+ dev-libs/libevent
+ )
+ screen? (
+ app-misc/screen
+ || (
+ >=sys-apps/coreutils-8.15
+ sys-freebsd/freebsd-bin
+ app-misc/realpath
+ )
+ )
+'
+RDEPEND="${DEPEND}
+ opencl? (
+ || (
+ virtual/opencl
+ dev-util/nvidia-cuda-sdk[opencl]
+ )
+ )
+"
+DEPEND="${DEPEND}
+ virtual/pkgconfig
+ >=dev-libs/uthash-1.9.7
+ sys-apps/sed
+ cpumining? (
+ amd64? (
+ >=dev-lang/yasm-1.0.1
+ )
+ x86? (
+ >=dev-lang/yasm-1.0.1
+ )
+ )
+"
+
+src_configure() {
+ local CFLAGS="${CFLAGS}"
+ local with_curses
+ use hardened && CFLAGS="${CFLAGS} -nopie"
+
+ if use ncurses; then
+ if use unicode; then
+ with_curses='--with-curses=ncursesw'
+ else
+ with_curses='--with-curses=ncurses'
+ fi
+ else
+ with_curses='--without-curses'
+ fi
+
+ CFLAGS="${CFLAGS}" \
+ econf \
+ --docdir="/usr/share/doc/${PF}" \
+ $(use_enable adl) \
+ $(use_enable antminer) \
+ $(use_enable avalon) \
+ $(use_enable avalonmm) \
+ $(use_enable bifury) \
+ $(use_enable bitforce) \
+ $(use_enable bfsb) \
+ $(use_enable bfx) \
+ $(use_enable bigpic) \
+ $(use_enable bitfury) \
+ $(use_enable cointerra) \
+ $(use_enable cpumining) \
+ $(use_enable drillbit) \
+ $(use_enable dualminer) \
+ $(use_enable gridseed) \
+ $(use_enable hashbuster) \
+ $(use_enable hashbuster2 hashbusterusb) \
+ $(use_enable hashfast) \
+ $(use_enable icarus) \
+ $(use_enable jingtian) \
+ $(use_enable klondike) \
+ $(use_enable littlefury) \
+ $(use_enable metabank) \
+ $(use_enable modminer) \
+ $(use_enable nanofury) \
+ $(use_enable opencl) \
+ $(use_enable rockminer) \
+ $(use_enable scrypt) \
+ $(use_enable twinfury) \
+ --with-system-libblkmaker \
+ $with_curses \
+ $(use_with udev libudev) \
+ $(use_enable udev-broad-rules broad-udevrules) \
+ $(use_with lm_sensors sensors) \
+ $(use_with proxy_getwork libmicrohttpd) \
+ $(use_with proxy_stratum libevent) \
+ $(use_enable x6500) \
+ $(use_enable zeusminer) \
+ $(use_enable ztex)
+}
+
+src_install() {
+ emake install DESTDIR="$D"
+ if ! use examples; then
+ rm -r "${D}/usr/share/doc/${PF}/rpc-examples"
+ fi
+ if ! use screen; then
+ rm "${D}/usr/bin/start-bfgminer.sh"
+ fi
+}
diff --git a/net-misc/bfgminer/bfgminer-4.10.3.ebuild b/net-misc/bfgminer/bfgminer-4.10.3.ebuild
new file mode 100644
index 000000000000..163781356fb7
--- /dev/null
+++ b/net-misc/bfgminer/bfgminer-4.10.3.ebuild
@@ -0,0 +1,182 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Modular Bitcoin ASIC/FPGA/GPU/CPU miner in C"
+HOMEPAGE="https://bitcointalk.org/?topic=168174"
+SRC_URI="http://luke.dashjr.org/programs/bitcoin/files/${PN}/${PV}/${P}.txz -> ${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
+
+# TODO: knc (needs i2c-tools header)
+# TODO: minergate (needs actual miner_gate)
+# TODO: titan
+IUSE="adl antminer avalon avalonmm bfx bifury bitforce bfsb bigpic bitfury cointerra cpumining drillbit dualminer examples gridseed hardened hashbuster hashbuster2 hashfast icarus jingtian klondike +libusb littlefury lm_sensors metabank modminer nanofury ncurses opencl proxy proxy_getwork proxy_stratum rockminer screen scrypt twinfury +udev udev-broad-rules unicode x6500 zeusminer ztex"
+REQUIRED_USE='
+ || ( antminer avalon avalonmm bfsb bfx bifury bigpic bitforce bitfury cointerra cpumining drillbit dualminer gridseed hashbuster hashbuster2 hashfast icarus klondike littlefury metabank modminer nanofury opencl proxy twinfury x6500 zeusminer ztex )
+ adl? ( opencl )
+ bfsb? ( bitfury )
+ bfx? ( bitfury libusb )
+ bigpic? ( bitfury )
+ drillbit? ( bitfury )
+ dualminer? ( icarus )
+ gridseed? ( scrypt )
+ hashbuster? ( bitfury )
+ hashbuster2? ( bitfury libusb )
+ klondike? ( libusb )
+ littlefury? ( bitfury )
+ lm_sensors? ( opencl )
+ metabank? ( bitfury )
+ nanofury? ( bitfury )
+ scrypt? ( || ( cpumining dualminer gridseed opencl proxy zeusminer ) )
+ twinfury? ( bitfury )
+ unicode? ( ncurses )
+ proxy? ( || ( proxy_getwork proxy_stratum ) )
+ proxy_getwork? ( proxy )
+ proxy_stratum? ( proxy )
+ x6500? ( libusb )
+ zeusminer? ( scrypt )
+ ztex? ( libusb )
+'
+
+DEPEND='
+ net-misc/curl
+ ncurses? (
+ sys-libs/ncurses[unicode?]
+ )
+ >=dev-libs/jansson-2
+ dev-libs/libbase58
+ net-libs/libblkmaker
+ udev? (
+ virtual/udev
+ )
+ hashbuster? (
+ dev-libs/hidapi
+ )
+ libusb? (
+ virtual/libusb:1
+ )
+ lm_sensors? (
+ sys-apps/lm_sensors
+ )
+ nanofury? (
+ dev-libs/hidapi
+ )
+ proxy_getwork? (
+ net-libs/libmicrohttpd
+ )
+ proxy_stratum? (
+ dev-libs/libevent
+ )
+ screen? (
+ app-misc/screen
+ || (
+ >=sys-apps/coreutils-8.15
+ sys-freebsd/freebsd-bin
+ app-misc/realpath
+ )
+ )
+'
+RDEPEND="${DEPEND}
+ opencl? (
+ || (
+ virtual/opencl
+ virtual/opencl-sdk
+ dev-util/ati-stream-sdk
+ dev-util/ati-stream-sdk-bin
+ dev-util/amdstream
+ dev-util/amd-app-sdk
+ dev-util/amd-app-sdk-bin
+ dev-util/nvidia-cuda-sdk[opencl]
+ dev-util/intel-opencl-sdk
+ )
+ )
+"
+DEPEND="${DEPEND}
+ virtual/pkgconfig
+ >=dev-libs/uthash-1.9.7
+ sys-apps/sed
+ cpumining? (
+ amd64? (
+ >=dev-lang/yasm-1.0.1
+ )
+ x86? (
+ >=dev-lang/yasm-1.0.1
+ )
+ )
+"
+
+src_configure() {
+ local CFLAGS="${CFLAGS}"
+ local with_curses
+ use hardened && CFLAGS="${CFLAGS} -nopie"
+
+ if use ncurses; then
+ if use unicode; then
+ with_curses='--with-curses=ncursesw'
+ else
+ with_curses='--with-curses=ncurses'
+ fi
+ else
+ with_curses='--without-curses'
+ fi
+
+ CFLAGS="${CFLAGS}" \
+ econf \
+ --docdir="/usr/share/doc/${PF}" \
+ $(use_enable adl) \
+ $(use_enable antminer) \
+ $(use_enable avalon) \
+ $(use_enable avalonmm) \
+ $(use_enable bifury) \
+ $(use_enable bitforce) \
+ $(use_enable bfsb) \
+ $(use_enable bfx) \
+ $(use_enable bigpic) \
+ $(use_enable bitfury) \
+ $(use_enable cointerra) \
+ $(use_enable cpumining) \
+ $(use_enable drillbit) \
+ $(use_enable dualminer) \
+ $(use_enable gridseed) \
+ $(use_enable hashbuster) \
+ $(use_enable hashbuster2 hashbusterusb) \
+ $(use_enable hashfast) \
+ $(use_enable icarus) \
+ $(use_enable jingtian) \
+ $(use_enable klondike) \
+ $(use_enable littlefury) \
+ $(use_enable metabank) \
+ $(use_enable modminer) \
+ $(use_enable nanofury) \
+ $(use_enable opencl) \
+ $(use_enable rockminer) \
+ $(use_enable scrypt) \
+ $(use_enable twinfury) \
+ --with-system-libblkmaker \
+ $with_curses \
+ $(use_with udev libudev) \
+ $(use_enable udev-broad-rules broad-udevrules) \
+ $(use_with lm_sensors sensors) \
+ $(use_with proxy_getwork libmicrohttpd) \
+ $(use_with proxy_stratum libevent) \
+ $(use_enable x6500) \
+ $(use_enable zeusminer) \
+ $(use_enable ztex)
+}
+
+src_install() {
+ emake install DESTDIR="$D"
+ if ! use examples; then
+ rm -r "${D}/usr/share/doc/${PF}/rpc-examples"
+ fi
+ if ! use screen; then
+ rm "${D}/usr/bin/start-bfgminer.sh"
+ fi
+}
diff --git a/net-misc/bfgminer/bfgminer-5.0.0.ebuild b/net-misc/bfgminer/bfgminer-5.0.0.ebuild
new file mode 100644
index 000000000000..cd79ef780970
--- /dev/null
+++ b/net-misc/bfgminer/bfgminer-5.0.0.ebuild
@@ -0,0 +1,195 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Modular Bitcoin ASIC/FPGA/GPU/CPU miner in C"
+HOMEPAGE="https://bitcointalk.org/?topic=168174"
+SRC_URI="http://luke.dashjr.org/programs/bitcoin/files/${PN}/${PV}/${P}.txz -> ${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
+
+# TODO: knc (needs i2c-tools header)
+# TODO: kncasic & titan (need systemwide knc-asic install)
+# TODO: minergate (needs actual miner_gate)
+IUSE="adl antminer avalon avalonmm bfsb bfx bifury bigpic bitforce bitfury cointerra cpumining drillbit dualminer examples gridseed hardened hashbuster hashbuster2 hashfast icarus jingtian keccak klondike +libusb littlefury lm_sensors metabank minion modminer nanofury ncurses opencl proxy proxy_getwork proxy_stratum rockminer screen scrypt +sha256d twinfury +udev udev-broad-rules unicode x6500 zeusminer ztex"
+REQUIRED_USE='
+ || ( keccak scrypt sha256d )
+ || ( antminer avalon avalonmm bfsb bfx bifury bigpic bitforce bitfury cointerra cpumining drillbit dualminer gridseed hashbuster hashbuster2 hashfast icarus klondike littlefury metabank modminer nanofury opencl proxy twinfury x6500 zeusminer ztex )
+ adl? ( opencl )
+ antminer? ( sha256d )
+ avalon? ( sha256d )
+ avalonmm? ( sha256d )
+ bfsb? ( sha256d bitfury )
+ bfx? ( sha256d bitfury libusb )
+ bifury? ( sha256d )
+ bigpic? ( sha256d bitfury )
+ bitforce? ( sha256d )
+ bitfury? ( sha256d )
+ cointerra? ( sha256d )
+ drillbit? ( sha256d bitfury )
+ dualminer? ( || ( sha256d scrypt ) icarus )
+ gridseed? ( scrypt )
+ hashbuster? ( sha256d bitfury )
+ hashbuster2? ( sha256d bitfury libusb )
+ hashfast? ( sha256d )
+ icarus? ( || ( scrypt sha256d ) )
+ jingtian? ( sha256d )
+ keccak? ( || ( cpumining opencl proxy ) )
+ klondike? ( sha256d libusb )
+ littlefury? ( sha256d bitfury )
+ lm_sensors? ( opencl )
+ metabank? ( sha256d bitfury )
+ minion? ( sha256d )
+ modminer? ( sha256d )
+ nanofury? ( sha256d bitfury )
+ scrypt? ( || ( cpumining dualminer gridseed opencl proxy zeusminer ) )
+ sha256d? ( || ( antminer avalon avalonmm bfx bifury bitforce bfsb bigpic bitfury cointerra cpumining drillbit dualminer hashbuster hashbuster2 hashfast icarus jingtian klondike littlefury metabank modminer nanofury opencl proxy rockminer twinfury x6500 ztex ) )
+ twinfury? ( bitfury )
+ unicode? ( ncurses )
+ proxy? ( || ( proxy_getwork proxy_stratum ) )
+ proxy_getwork? ( proxy )
+ proxy_stratum? ( proxy )
+ rockminer? ( sha256d )
+ twinfury? ( sha256d )
+ x6500? ( sha256d libusb )
+ zeusminer? ( scrypt )
+ ztex? ( sha256d libusb )
+'
+
+DEPEND='
+ net-misc/curl
+ ncurses? (
+ sys-libs/ncurses[unicode?]
+ )
+ >=dev-libs/jansson-2
+ dev-libs/libbase58
+ net-libs/libblkmaker
+ udev? (
+ virtual/udev
+ )
+ hashbuster? (
+ dev-libs/hidapi
+ )
+ libusb? (
+ virtual/libusb:1
+ )
+ lm_sensors? (
+ sys-apps/lm_sensors
+ )
+ nanofury? (
+ dev-libs/hidapi
+ )
+ proxy_getwork? (
+ net-libs/libmicrohttpd
+ )
+ proxy_stratum? (
+ dev-libs/libevent
+ )
+ screen? (
+ app-misc/screen
+ || (
+ >=sys-apps/coreutils-8.15
+ sys-freebsd/freebsd-bin
+ app-misc/realpath
+ )
+ )
+'
+RDEPEND="${DEPEND}
+ opencl? (
+ || (
+ virtual/opencl
+ dev-util/nvidia-cuda-sdk[opencl]
+ )
+ )
+"
+DEPEND="${DEPEND}
+ virtual/pkgconfig
+ >=dev-libs/uthash-1.9.7
+ sys-apps/sed
+ cpumining? (
+ amd64? (
+ >=dev-lang/yasm-1.0.1
+ )
+ x86? (
+ >=dev-lang/yasm-1.0.1
+ )
+ )
+"
+
+src_configure() {
+ local CFLAGS="${CFLAGS}"
+ local with_curses
+ use hardened && CFLAGS="${CFLAGS} -nopie"
+
+ if use ncurses; then
+ if use unicode; then
+ with_curses='--with-curses=ncursesw'
+ else
+ with_curses='--with-curses=ncurses'
+ fi
+ else
+ with_curses='--without-curses'
+ fi
+
+ CFLAGS="${CFLAGS}" \
+ econf \
+ --docdir="/usr/share/doc/${PF}" \
+ $(use_enable adl) \
+ $(use_enable antminer) \
+ $(use_enable avalon) \
+ $(use_enable avalonmm) \
+ $(use_enable bifury) \
+ $(use_enable bitforce) \
+ $(use_enable bfsb) \
+ $(use_enable bfx) \
+ $(use_enable bigpic) \
+ $(use_enable bitfury) \
+ $(use_enable cointerra) \
+ $(use_enable cpumining) \
+ $(use_enable drillbit) \
+ $(use_enable dualminer) \
+ $(use_enable gridseed) \
+ $(use_enable hashbuster) \
+ $(use_enable hashbuster2 hashbusterusb) \
+ $(use_enable hashfast) \
+ $(use_enable icarus) \
+ $(use_enable jingtian) \
+ $(use_enable keccak) \
+ $(use_enable klondike) \
+ $(use_enable littlefury) \
+ $(use_enable metabank) \
+ $(use_enable minion) \
+ $(use_enable modminer) \
+ $(use_enable nanofury) \
+ $(use_enable opencl) \
+ $(use_enable rockminer) \
+ $(use_enable scrypt) \
+ $(use_enable sha256d) \
+ $(use_enable twinfury) \
+ --with-system-libblkmaker \
+ $with_curses \
+ $(use_with udev libudev) \
+ $(use_enable udev-broad-rules broad-udevrules) \
+ $(use_with lm_sensors sensors) \
+ $(use_with proxy_getwork libmicrohttpd) \
+ $(use_with proxy_stratum libevent) \
+ $(use_enable x6500) \
+ $(use_enable zeusminer) \
+ $(use_enable ztex)
+}
+
+src_install() {
+ emake install DESTDIR="$D"
+ if ! use examples; then
+ rm -r "${D}/usr/share/doc/${PF}/rpc-examples"
+ fi
+ if ! use screen; then
+ rm "${D}/usr/bin/start-bfgminer.sh"
+ fi
+}
diff --git a/net-misc/bfgminer/bfgminer-5.1.0.ebuild b/net-misc/bfgminer/bfgminer-5.1.0.ebuild
new file mode 100644
index 000000000000..cd79ef780970
--- /dev/null
+++ b/net-misc/bfgminer/bfgminer-5.1.0.ebuild
@@ -0,0 +1,195 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Modular Bitcoin ASIC/FPGA/GPU/CPU miner in C"
+HOMEPAGE="https://bitcointalk.org/?topic=168174"
+SRC_URI="http://luke.dashjr.org/programs/bitcoin/files/${PN}/${PV}/${P}.txz -> ${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
+
+# TODO: knc (needs i2c-tools header)
+# TODO: kncasic & titan (need systemwide knc-asic install)
+# TODO: minergate (needs actual miner_gate)
+IUSE="adl antminer avalon avalonmm bfsb bfx bifury bigpic bitforce bitfury cointerra cpumining drillbit dualminer examples gridseed hardened hashbuster hashbuster2 hashfast icarus jingtian keccak klondike +libusb littlefury lm_sensors metabank minion modminer nanofury ncurses opencl proxy proxy_getwork proxy_stratum rockminer screen scrypt +sha256d twinfury +udev udev-broad-rules unicode x6500 zeusminer ztex"
+REQUIRED_USE='
+ || ( keccak scrypt sha256d )
+ || ( antminer avalon avalonmm bfsb bfx bifury bigpic bitforce bitfury cointerra cpumining drillbit dualminer gridseed hashbuster hashbuster2 hashfast icarus klondike littlefury metabank modminer nanofury opencl proxy twinfury x6500 zeusminer ztex )
+ adl? ( opencl )
+ antminer? ( sha256d )
+ avalon? ( sha256d )
+ avalonmm? ( sha256d )
+ bfsb? ( sha256d bitfury )
+ bfx? ( sha256d bitfury libusb )
+ bifury? ( sha256d )
+ bigpic? ( sha256d bitfury )
+ bitforce? ( sha256d )
+ bitfury? ( sha256d )
+ cointerra? ( sha256d )
+ drillbit? ( sha256d bitfury )
+ dualminer? ( || ( sha256d scrypt ) icarus )
+ gridseed? ( scrypt )
+ hashbuster? ( sha256d bitfury )
+ hashbuster2? ( sha256d bitfury libusb )
+ hashfast? ( sha256d )
+ icarus? ( || ( scrypt sha256d ) )
+ jingtian? ( sha256d )
+ keccak? ( || ( cpumining opencl proxy ) )
+ klondike? ( sha256d libusb )
+ littlefury? ( sha256d bitfury )
+ lm_sensors? ( opencl )
+ metabank? ( sha256d bitfury )
+ minion? ( sha256d )
+ modminer? ( sha256d )
+ nanofury? ( sha256d bitfury )
+ scrypt? ( || ( cpumining dualminer gridseed opencl proxy zeusminer ) )
+ sha256d? ( || ( antminer avalon avalonmm bfx bifury bitforce bfsb bigpic bitfury cointerra cpumining drillbit dualminer hashbuster hashbuster2 hashfast icarus jingtian klondike littlefury metabank modminer nanofury opencl proxy rockminer twinfury x6500 ztex ) )
+ twinfury? ( bitfury )
+ unicode? ( ncurses )
+ proxy? ( || ( proxy_getwork proxy_stratum ) )
+ proxy_getwork? ( proxy )
+ proxy_stratum? ( proxy )
+ rockminer? ( sha256d )
+ twinfury? ( sha256d )
+ x6500? ( sha256d libusb )
+ zeusminer? ( scrypt )
+ ztex? ( sha256d libusb )
+'
+
+DEPEND='
+ net-misc/curl
+ ncurses? (
+ sys-libs/ncurses[unicode?]
+ )
+ >=dev-libs/jansson-2
+ dev-libs/libbase58
+ net-libs/libblkmaker
+ udev? (
+ virtual/udev
+ )
+ hashbuster? (
+ dev-libs/hidapi
+ )
+ libusb? (
+ virtual/libusb:1
+ )
+ lm_sensors? (
+ sys-apps/lm_sensors
+ )
+ nanofury? (
+ dev-libs/hidapi
+ )
+ proxy_getwork? (
+ net-libs/libmicrohttpd
+ )
+ proxy_stratum? (
+ dev-libs/libevent
+ )
+ screen? (
+ app-misc/screen
+ || (
+ >=sys-apps/coreutils-8.15
+ sys-freebsd/freebsd-bin
+ app-misc/realpath
+ )
+ )
+'
+RDEPEND="${DEPEND}
+ opencl? (
+ || (
+ virtual/opencl
+ dev-util/nvidia-cuda-sdk[opencl]
+ )
+ )
+"
+DEPEND="${DEPEND}
+ virtual/pkgconfig
+ >=dev-libs/uthash-1.9.7
+ sys-apps/sed
+ cpumining? (
+ amd64? (
+ >=dev-lang/yasm-1.0.1
+ )
+ x86? (
+ >=dev-lang/yasm-1.0.1
+ )
+ )
+"
+
+src_configure() {
+ local CFLAGS="${CFLAGS}"
+ local with_curses
+ use hardened && CFLAGS="${CFLAGS} -nopie"
+
+ if use ncurses; then
+ if use unicode; then
+ with_curses='--with-curses=ncursesw'
+ else
+ with_curses='--with-curses=ncurses'
+ fi
+ else
+ with_curses='--without-curses'
+ fi
+
+ CFLAGS="${CFLAGS}" \
+ econf \
+ --docdir="/usr/share/doc/${PF}" \
+ $(use_enable adl) \
+ $(use_enable antminer) \
+ $(use_enable avalon) \
+ $(use_enable avalonmm) \
+ $(use_enable bifury) \
+ $(use_enable bitforce) \
+ $(use_enable bfsb) \
+ $(use_enable bfx) \
+ $(use_enable bigpic) \
+ $(use_enable bitfury) \
+ $(use_enable cointerra) \
+ $(use_enable cpumining) \
+ $(use_enable drillbit) \
+ $(use_enable dualminer) \
+ $(use_enable gridseed) \
+ $(use_enable hashbuster) \
+ $(use_enable hashbuster2 hashbusterusb) \
+ $(use_enable hashfast) \
+ $(use_enable icarus) \
+ $(use_enable jingtian) \
+ $(use_enable keccak) \
+ $(use_enable klondike) \
+ $(use_enable littlefury) \
+ $(use_enable metabank) \
+ $(use_enable minion) \
+ $(use_enable modminer) \
+ $(use_enable nanofury) \
+ $(use_enable opencl) \
+ $(use_enable rockminer) \
+ $(use_enable scrypt) \
+ $(use_enable sha256d) \
+ $(use_enable twinfury) \
+ --with-system-libblkmaker \
+ $with_curses \
+ $(use_with udev libudev) \
+ $(use_enable udev-broad-rules broad-udevrules) \
+ $(use_with lm_sensors sensors) \
+ $(use_with proxy_getwork libmicrohttpd) \
+ $(use_with proxy_stratum libevent) \
+ $(use_enable x6500) \
+ $(use_enable zeusminer) \
+ $(use_enable ztex)
+}
+
+src_install() {
+ emake install DESTDIR="$D"
+ if ! use examples; then
+ rm -r "${D}/usr/share/doc/${PF}/rpc-examples"
+ fi
+ if ! use screen; then
+ rm "${D}/usr/bin/start-bfgminer.sh"
+ fi
+}
diff --git a/net-misc/bfgminer/bfgminer-5.2.0.ebuild b/net-misc/bfgminer/bfgminer-5.2.0.ebuild
new file mode 100644
index 000000000000..136a2b86f119
--- /dev/null
+++ b/net-misc/bfgminer/bfgminer-5.2.0.ebuild
@@ -0,0 +1,202 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Modular Bitcoin ASIC/FPGA/GPU/CPU miner in C"
+HOMEPAGE="https://bitcointalk.org/?topic=168174"
+SRC_URI="http://luke.dashjr.org/programs/bitcoin/files/${PN}/${PV}/${P}.txz -> ${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
+
+# TODO: knc (needs i2c-tools header)
+# TODO: kncasic & titan (need systemwide knc-asic install)
+# TODO: minergate (needs actual miner_gate)
+IUSE="adl antminer avalon avalonmm bfsb bfx bifury bigpic bitforce bitfury cointerra cpumining drillbit dualminer examples gridseed hardened hashbuster hashbuster2 hashfast icarus jingtian keccak klondike +libusb littlefury lm_sensors metabank minion modminer nanofury ncurses opencl proxy proxy_getwork proxy_stratum rockminer screen scrypt +sha256d twinfury +udev udev-broad-rules unicode x6500 zeusminer ztex"
+REQUIRED_USE='
+ || ( keccak scrypt sha256d )
+ || ( antminer avalon avalonmm bfsb bfx bifury bigpic bitforce bitfury cointerra cpumining drillbit dualminer gridseed hashbuster hashbuster2 hashfast icarus klondike littlefury metabank modminer nanofury opencl proxy twinfury x6500 zeusminer ztex )
+ adl? ( opencl )
+ antminer? ( sha256d )
+ avalon? ( sha256d )
+ avalonmm? ( sha256d )
+ bfsb? ( sha256d bitfury )
+ bfx? ( sha256d bitfury libusb )
+ bifury? ( sha256d )
+ bigpic? ( sha256d bitfury )
+ bitforce? ( sha256d )
+ bitfury? ( sha256d )
+ cointerra? ( sha256d )
+ drillbit? ( sha256d bitfury )
+ dualminer? ( || ( sha256d scrypt ) icarus )
+ gridseed? ( scrypt )
+ hashbuster? ( sha256d bitfury )
+ hashbuster2? ( sha256d bitfury libusb )
+ hashfast? ( sha256d )
+ icarus? ( || ( scrypt sha256d ) )
+ jingtian? ( sha256d )
+ keccak? ( || ( cpumining opencl proxy ) )
+ klondike? ( sha256d libusb )
+ littlefury? ( sha256d bitfury )
+ lm_sensors? ( opencl )
+ metabank? ( sha256d bitfury )
+ minion? ( sha256d )
+ modminer? ( sha256d )
+ nanofury? ( sha256d bitfury )
+ scrypt? ( || ( cpumining dualminer gridseed opencl proxy zeusminer ) )
+ sha256d? ( || ( antminer avalon avalonmm bfx bifury bitforce bfsb bigpic bitfury cointerra cpumining drillbit dualminer hashbuster hashbuster2 hashfast icarus jingtian klondike littlefury metabank modminer nanofury opencl proxy rockminer twinfury x6500 ztex ) )
+ twinfury? ( bitfury )
+ unicode? ( ncurses )
+ proxy? ( || ( proxy_getwork proxy_stratum ) )
+ proxy_getwork? ( proxy )
+ proxy_stratum? ( proxy )
+ rockminer? ( sha256d )
+ twinfury? ( sha256d )
+ x6500? ( sha256d libusb )
+ zeusminer? ( scrypt )
+ ztex? ( sha256d libusb )
+'
+
+DEPEND='
+ net-misc/curl
+ ncurses? (
+ sys-libs/ncurses[unicode?]
+ )
+ >=dev-libs/jansson-2
+ dev-libs/libbase58
+ net-libs/libblkmaker
+ udev? (
+ virtual/udev
+ )
+ hashbuster? (
+ dev-libs/hidapi
+ )
+ libusb? (
+ virtual/libusb:1
+ )
+ lm_sensors? (
+ sys-apps/lm_sensors
+ )
+ nanofury? (
+ dev-libs/hidapi
+ )
+ proxy_getwork? (
+ net-libs/libmicrohttpd
+ )
+ proxy_stratum? (
+ dev-libs/libevent
+ )
+ screen? (
+ app-misc/screen
+ || (
+ >=sys-apps/coreutils-8.15
+ sys-freebsd/freebsd-bin
+ app-misc/realpath
+ )
+ )
+'
+RDEPEND="${DEPEND}
+ opencl? (
+ || (
+ virtual/opencl
+ virtual/opencl-sdk
+ dev-util/ati-stream-sdk
+ dev-util/ati-stream-sdk-bin
+ dev-util/amdstream
+ dev-util/amd-app-sdk
+ dev-util/amd-app-sdk-bin
+ dev-util/nvidia-cuda-sdk[opencl]
+ dev-util/intel-opencl-sdk
+ )
+ )
+"
+DEPEND="${DEPEND}
+ virtual/pkgconfig
+ >=dev-libs/uthash-1.9.7
+ sys-apps/sed
+ cpumining? (
+ amd64? (
+ >=dev-lang/yasm-1.0.1
+ )
+ x86? (
+ >=dev-lang/yasm-1.0.1
+ )
+ )
+"
+
+src_configure() {
+ local CFLAGS="${CFLAGS}"
+ local with_curses
+ use hardened && CFLAGS="${CFLAGS} -nopie"
+
+ if use ncurses; then
+ if use unicode; then
+ with_curses='--with-curses=ncursesw'
+ else
+ with_curses='--with-curses=ncurses'
+ fi
+ else
+ with_curses='--without-curses'
+ fi
+
+ CFLAGS="${CFLAGS}" \
+ econf \
+ --docdir="/usr/share/doc/${PF}" \
+ $(use_enable adl) \
+ $(use_enable antminer) \
+ $(use_enable avalon) \
+ $(use_enable avalonmm) \
+ $(use_enable bifury) \
+ $(use_enable bitforce) \
+ $(use_enable bfsb) \
+ $(use_enable bfx) \
+ $(use_enable bigpic) \
+ $(use_enable bitfury) \
+ $(use_enable cointerra) \
+ $(use_enable cpumining) \
+ $(use_enable drillbit) \
+ $(use_enable dualminer) \
+ $(use_enable gridseed) \
+ $(use_enable hashbuster) \
+ $(use_enable hashbuster2 hashbusterusb) \
+ $(use_enable hashfast) \
+ $(use_enable icarus) \
+ $(use_enable jingtian) \
+ $(use_enable keccak) \
+ $(use_enable klondike) \
+ $(use_enable littlefury) \
+ $(use_enable metabank) \
+ $(use_enable minion) \
+ $(use_enable modminer) \
+ $(use_enable nanofury) \
+ $(use_enable opencl) \
+ $(use_enable rockminer) \
+ $(use_enable scrypt) \
+ $(use_enable sha256d) \
+ $(use_enable twinfury) \
+ --with-system-libblkmaker \
+ $with_curses \
+ $(use_with udev libudev) \
+ $(use_enable udev-broad-rules broad-udevrules) \
+ $(use_with lm_sensors sensors) \
+ $(use_with proxy_getwork libmicrohttpd) \
+ $(use_with proxy_stratum libevent) \
+ $(use_enable x6500) \
+ $(use_enable zeusminer) \
+ $(use_enable ztex)
+}
+
+src_install() {
+ emake install DESTDIR="$D"
+ if ! use examples; then
+ rm -r "${D}/usr/share/doc/${PF}/rpc-examples"
+ fi
+ if ! use screen; then
+ rm "${D}/usr/bin/start-bfgminer.sh"
+ fi
+}
diff --git a/net-misc/bfgminer/metadata.xml b/net-misc/bfgminer/metadata.xml
new file mode 100644
index 000000000000..00d5daf29b7b
--- /dev/null
+++ b/net-misc/bfgminer/metadata.xml
@@ -0,0 +1,55 @@
+<?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>
+ <maintainer>
+ <email>luke_gentoo_bitcoin@dashjr.org</email>
+ <name>Luke Dashjr</name>
+ </maintainer>
+ <use>
+ <flag name='adl'>Enable support for controlling fans and overclocking on AMD cards with AMD Display Library</flag>
+ <flag name='antminer'>Enable support for mining with AntMiner U1 sticks</flag>
+ <flag name='avalon'>Enable support for mining with Avalon 1 ASIC modules</flag>
+ <flag name='avalonmm'>Enable support for mining with Avalon 2/3 ASIC modules</flag>
+ <flag name='bifury'>Enable support for mining with Bi*fury USB sticks</flag>
+ <flag name='bitforce'>Enable support for mining with ButterFly Labs BitFORCE ASICs and/or FPGAs</flag>
+ <flag name='bfsb'>Enable support for mining on BFSB host Raspberry Pi</flag>
+ <flag name='bfx'>Enable support for mining with BFx2 USB sticks</flag>
+ <flag name='bigpic'>Enable support for mining with Big Picture Mining USB sticks (Red/BlueFury, BF1, etc)</flag>
+ <flag name='bitfury'>Enable support for mining with 55nm Bitfury-based devices</flag>
+ <flag name='cointerra'>Enable support for mining with CoinTerra TerraMiner.</flag>
+ <flag name='cpumining'>Enable support for mining with CPUs</flag>
+ <flag name='drillbit'>Enable support for mining with Drillbit boards</flag>
+ <flag name='dualminer'>Enable support for mining with DualMiner USB sticks</flag>
+ <flag name='gridseed'>Enable support for mining with 5-chip GridSeed orbs</flag>
+ <flag name='hashbuster'>Enable support for mining with HashBuster nano boards</flag>
+ <flag name='hashbuster2'>Enable support for mining with HashBuster micro boards</flag>
+ <flag name='hashfast'>Enable support for mining with HashFast devices</flag>
+ <flag name='icarus'>Enable support for mining with Icarus-compatible devices (including Block Erupter Sapphire ASICs)</flag>
+ <flag name='jingtian'>Enable support for mining on JingTian boards via SPI/GPIO</flag>
+ <flag name='keccak'>Enable support for mining with Keccak miners</flag>
+ <flag name='klondike'>Enable support for mining with Klondike USB miners</flag>
+ <flag name='libusb'>Use libusb</flag>
+ <flag name='littlefury'>Enable support for mining with LittleFury USB sticks</flag>
+ <flag name='metabank'>Enable support for mining on Metabank host Raspberry Pi</flag>
+ <flag name='minion'>Enable support for mining on minion chips via SPI (BlackArrow Prospero)</flag>
+ <flag name='modminer'>Enable support for mining with ModMiner FPGAs</flag>
+ <flag name='nanofury'>Enable support for mining with NanoFury USB sticks</flag>
+ <flag name='opencl'>Enable support for mining with OpenCL-capable devices (GPUs)</flag>
+ <flag name='proxy'>Enable support for virtual proxy device</flag>
+ <flag name='proxy_getwork'>Enable proxy support for getwork protocol (often used with Block Erupter Blades)</flag>
+ <flag name='proxy_stratum'>Enable proxy support for stratum protocol</flag>
+ <flag name='rockminer'>Enable support for mining with RockMiner devices</flag>
+ <flag name='screen'>Provide start-bfgminer.sh script to launch BFGMiner in app-misc/screen</flag>
+ <flag name='scrypt'>Enable support for scrypt mining algorithm</flag>
+ <flag name='sha256d'>Enable support for SHA256d mining algorithm</flag>
+ <flag name='twinfury'>Enable support for mining with Twinfury USB sticks</flag>
+ <flag name='udev-broad-rules'>Enable broader udev rules that may match non-mining devices</flag>
+ <flag name='x6500'>Enable support for mining with X6500 FPGAs</flag>
+ <flag name='zeusminer'>Enable support for mining with ZeusMiner units</flag>
+ <flag name='ztex'>Enable support for mining with Ztex FPGAs</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/bgpq/Manifest b/net-misc/bgpq/Manifest
new file mode 100644
index 000000000000..49889936d7a3
--- /dev/null
+++ b/net-misc/bgpq/Manifest
@@ -0,0 +1 @@
+DIST bgpq-1.0.9.9.tgz 63472 SHA256 7c7262178964d57efde209d78de26ecd8dfe9b319525395376cc7667ea7977f6 SHA512 d5d23b778b8b511471e654325c09e20d110de0dcadb16cd88ff76123d3b1b0e4986557bdf46d83801e03cef145f24c9724c4e0ee83d693c1d5f090e74a09a54e WHIRLPOOL 371d8a8f145d77ec3d332a19bb1068d5d8b24488b995833a3c386f6784b84a2a8b16c74e0790337f2e8b83e1a81b1e1ee12733725f646cc3b31febc5e365f5a9
diff --git a/net-misc/bgpq/bgpq-1.0.9.9.ebuild b/net-misc/bgpq/bgpq-1.0.9.9.ebuild
new file mode 100644
index 000000000000..1e514b22ffa9
--- /dev/null
+++ b/net-misc/bgpq/bgpq-1.0.9.9.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Generate access-lists for Cisco/Juniper routers"
+HOMEPAGE="http://www.lexa.ru/snar/bgpq.html"
+SRC_URI="http://snar.spb.ru/prog/bgpq/${P}.tgz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="sys-devel/flex"
+RDEPEND=""
+
+src_prepare() {
+ # Respect CFLAGS and LDFLAGS
+ sed -i \
+ -e '/^CFLAGS+=/s/+=-g /=/' \
+ -e '/^LDADD/s/@LIBS@/@LDFLAGS@ @LIBS@/' \
+ Makefile.in || die 'sed on Makefile.in failed'
+
+ epatch_user
+}
+
+src_install() {
+ dobin bgpq
+ doman bgpq.8
+ dodoc CHANGES
+ dohtml *.html
+}
diff --git a/net-misc/bgpq/metadata.xml b/net-misc/bgpq/metadata.xml
new file mode 100644
index 000000000000..0d6e4e2054d6
--- /dev/null
+++ b/net-misc/bgpq/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>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <longdescription lang="en">
+ bgpq allows to generate different config entries with prefix lists, useful for Cisco/Juniper routers and their software analogs, such as Quagga.
+ </longdescription>
+ <longdescription lang="ru">
+ bgpq позволяет создавать различные чaсти конфигурационных файлов со списком сетей для маршрутизаторов Cisco/Juniper и их программных аналогов,
+ таких как Quagga.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/bgpq3/Manifest b/net-misc/bgpq3/Manifest
new file mode 100644
index 000000000000..69c5e3ec6721
--- /dev/null
+++ b/net-misc/bgpq3/Manifest
@@ -0,0 +1,2 @@
+DIST bgpq3-0.1.21.tgz 62181 SHA256 ba3a4b9703984ad17c3a5aa4fb69248323372de2dfd1680b37fa066d2f6eb9ec SHA512 173bf0267c0010d90fd652e89cd9c389bddbb4019a706bf7f53dd1d2b3dd1b2fb7b88b92abd3b0ba7fe784539c023f9a33f26551a17a53a29a523e0ad3a6ccc3 WHIRLPOOL 90fe382bcfb749ed5f6ece37ac9f125fa94509a39d062104875767f7f73f4fa75265dfc77ef1e895478d70f0b32ab3556357cc29ea05c976e6b1568083e3cdcb
+DIST bgpq3-0.1.22.tgz 62550 SHA256 ce1aa4321573565f5b87966725fa198b238c4c4b13ea855ff6d80071f6b77814 SHA512 c2d0d1f209bdd1016a0c5d3e048b3700c1725b6c4135ba8d47daf3ef03fc05f31a190b640d143f3b6ac8b529754539285673caaf3dbf9cc11d80df1b8920f79c WHIRLPOOL 4a77bb35332eedb0371c4bcd858c6189ae8c4fe95f515c49df19ab6c8edecc9f080a94f9c349b62799d05dfe2e7c2acd244f4bab8eb28bc4ccee11337dc54aeb
diff --git a/net-misc/bgpq3/bgpq3-0.1.21.ebuild b/net-misc/bgpq3/bgpq3-0.1.21.ebuild
new file mode 100644
index 000000000000..1fe2a78537bd
--- /dev/null
+++ b/net-misc/bgpq3/bgpq3-0.1.21.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Generate access-lists for Cisco/Juniper routers, successor of bgpq"
+HOMEPAGE="http://snar.spb.ru/prog/bgpq3/"
+SRC_URI="http://snar.spb.ru/prog/bgpq3/${P}.tgz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
+
+src_prepare() {
+ # Respect CFLAGS and LDFLAGS
+ sed -i \
+ -e '/^CFLAGS=/s/-g //' \
+ -e '/^CFLAGS=/s/ -O0//' \
+ Makefile.in || die 'sed on Makefile.in failed'
+
+ epatch_user
+}
+
+src_install() {
+ dobin bgpq3
+ doman bgpq3.8
+ dodoc CHANGES
+ dohtml *.html
+}
diff --git a/net-misc/bgpq3/bgpq3-0.1.22.ebuild b/net-misc/bgpq3/bgpq3-0.1.22.ebuild
new file mode 100644
index 000000000000..4673d9a4b30e
--- /dev/null
+++ b/net-misc/bgpq3/bgpq3-0.1.22.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Generate access-lists for Cisco/Juniper routers, successor of bgpq"
+HOMEPAGE="http://snar.spb.ru/prog/bgpq3/"
+SRC_URI="http://snar.spb.ru/prog/bgpq3/${P}.tgz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
+
+src_prepare() {
+ # Respect CFLAGS
+ sed -i \
+ -e '/^CFLAGS=/s/-g //' \
+ -e '/^CFLAGS=/s/ -O0//' \
+ Makefile.in || die 'sed on Makefile.in failed'
+
+ epatch_user
+}
+
+src_install() {
+ dobin bgpq3
+ doman bgpq3.8
+ dodoc CHANGES
+ dohtml *.html
+}
diff --git a/net-misc/bgpq3/metadata.xml b/net-misc/bgpq3/metadata.xml
new file mode 100644
index 000000000000..1e87335024ff
--- /dev/null
+++ b/net-misc/bgpq3/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <longdescription lang="en">
+ bgpq3 allows to generate different config entries with prefix lists, useful for Cisco/Juniper routers and their software analogs, such as Quagga.
+ This program is a successor of bgpq from same author, main difference - it supports IPv6.
+ </longdescription>
+ <longdescription lang="ru">
+ bgpq3 позволяет создавать различные чaсти конфигурационных файлов со списком сетей для маршрутизаторов Cisco/Juniper и их программных аналогов,
+ таких как Quagga.
+ Данная программа - идейный наследник bgpq от того же автора, основное отличие - поддержка IPv6.
+ </longdescription>
+ <upstream>
+ <maintainer>
+ <email>snar@snar.spb.ru</email>
+ <name>Alexandre Snarskii</name>
+ </maintainer>
+ <remote-id type="github">snar/bgpq3</remote-id>
+ <bugs-to>https://github.com/snar/bgpq3/issues</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/bird/Manifest b/net-misc/bird/Manifest
new file mode 100644
index 000000000000..5738fed8fa2b
--- /dev/null
+++ b/net-misc/bird/Manifest
@@ -0,0 +1,5 @@
+DIST bird-1.3.9.tar.gz 994681 SHA256 928073d9f6c768869c002a0c732d48159dc50530ed90fb7f3da76a6febd0cf94 SHA512 b9961fc1aeff81273606d645c0d66d3f4bdd7ef2539bf41105d1c8b360905a74d789f3bd38ef378068579334426911f21b50926e45f56d7d791276e80cf2f258 WHIRLPOOL 2e4bd405f8117827dc186b0223c0126ab00d9d5a6da905bfde7e24471ab758a25eb39a2df33cb94bc7877a4f46a9327bf7fc09bec797ca8fb695f3b54213fed5
+DIST bird-1.4.3.tar.gz 1277383 SHA256 5d05fdc938af0522414ff38704b908e5f2afb290687e7d9006f682855c0962d6 SHA512 39866d8e2859bb0db2581a971b42d626af77746f09fff3e5b151429fff99dc2f707eb0855d40a5a46a84aab01f096a3e769cbce6d0cdd5c6cee2e7dcd4aba853 WHIRLPOOL fbea11f1893a09a1014576e24240913bc119df61ffa4cb856d546f8a56a6a819628b44c0b0cae0736ba19e3578a192dad5f063a3d0d731d8042cf1eef633ff19
+DIST bird-1.4.4.tar.gz 1282882 SHA256 ef506afa5852202379256c0db71c8db577e59babde79d63b8f40863de2270136 SHA512 12a91eb87002692458dab3674a05a2918e2663303e4af4204b9ac343a2440f888febbc0cea865ecdbb876641947804e0764950214a6db99eb1246cd71c50c6d9 WHIRLPOOL 5224238ccc1984cb5aeeeda44ba07959489ff60b959f3faf9444bee4b8679bb43d87331579dff5f627587dde9d5f2a0627e5fb4d6cdfa9a183585dc600bdc80b
+DIST bird-1.4.5.tar.gz 1284666 SHA256 ff485f0c64c5f762458e0f09e327e2f518a14b0247194c62ffa480d1eb3f9ffc SHA512 fba60e7daacfdf86e3fa9cb4dc627d33928b4b84dca98d3bfbd378265e422b7ecfe10c2d17369d295afe8a5f1f2e771209bbd54710485a19d64e6551f16d6b94 WHIRLPOOL 894401301e1756f2b2cf27d6829a911e51f81569a92b375ec0a504f1aa1563b37396eb929ccf1423e5387ca181ab2669a08a26040da52c4134128ebc5bc36ba4
+DIST bird-1.5.0.tar.gz 1300141 SHA256 79d5c4254e25f5890626830ca42aae03735716bdf152ddd8368473d2b3c17b5d SHA512 6814a1393d192083bc9807fd9c56e4bfe169aa34b70811f10da61c79d2fd4b18827bd4f3ea70d9ceba32125e54afb3f8df388416bff619c6f7e838a171f70ae8 WHIRLPOOL 2bd9429fef41dc4be09c9ece7ea6a109237c8d405ef16f5748516a3ec6ce3423ae05796e9ea875d08e476ea0da91ae617a9a90f574085decdab2bcdc40a7274d
diff --git a/net-misc/bird/bird-1.3.9.ebuild b/net-misc/bird/bird-1.3.9.ebuild
new file mode 100644
index 000000000000..865581af10d7
--- /dev/null
+++ b/net-misc/bird/bird-1.3.9.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A routing daemon implementing OSPF, RIPv2 & BGP for IPv4 or IPv6"
+HOMEPAGE="http://bird.network.cz"
+SRC_URI="ftp://bird.network.cz/pub/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug ipv6"
+
+RDEPEND="sys-libs/ncurses
+ sys-libs/readline"
+DEPEND="sys-devel/flex
+ sys-devel/bison
+ sys-devel/m4"
+
+src_prepare() {
+ mkdir ipv6
+ tar c --exclude ipv6 . | tar x -C ipv6
+}
+
+src_configure() {
+ econf \
+ --enable-client \
+ --disable-ipv6 \
+ --localstatedir="${EPREFIX}/var" \
+ $(use_enable debug)
+
+ if use ipv6; then
+ cd ipv6
+ econf \
+ --enable-client \
+ --enable-ipv6 \
+ --localstatedir="${EPREFIX}/var" \
+ $(use_enable debug)
+ fi
+}
+
+src_compile() {
+ emake
+ if use ipv6; then
+ cd ipv6
+ emake
+ fi
+}
+
+src_install() {
+ if use ipv6; then
+ newbin ipv6/birdc birdc6
+ newsbin ipv6/bird bird6
+ newinitd "${FILESDIR}/initd-v6-${PN}-1.3.8" bird6
+ fi
+ dobin birdc
+ dosbin bird
+ newinitd "${FILESDIR}/initd-v4-${PN}-1.3.8" bird
+ dodoc doc/bird.conf.example
+}
diff --git a/net-misc/bird/bird-1.4.3.ebuild b/net-misc/bird/bird-1.4.3.ebuild
new file mode 100644
index 000000000000..40e3c4abda40
--- /dev/null
+++ b/net-misc/bird/bird-1.4.3.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="A routing daemon implementing OSPF, RIPv2 & BGP for IPv4 or IPv6"
+HOMEPAGE="http://bird.network.cz"
+SRC_URI="ftp://bird.network.cz/pub/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug ipv6"
+
+RDEPEND="sys-libs/ncurses
+ sys-libs/readline"
+DEPEND="sys-devel/flex
+ sys-devel/bison
+ sys-devel/m4"
+
+src_prepare() {
+ mkdir ipv6
+ tar c --exclude ipv6 . | tar x -C ipv6
+}
+
+src_configure() {
+ econf \
+ --enable-client \
+ --disable-ipv6 \
+ --localstatedir="${EPREFIX}/var" \
+ $(use_enable debug)
+
+ if use ipv6; then
+ cd ipv6
+ econf \
+ --enable-client \
+ --enable-ipv6 \
+ --localstatedir="${EPREFIX}/var" \
+ $(use_enable debug)
+ fi
+}
+
+src_compile() {
+ emake
+ if use ipv6; then
+ cd ipv6
+ emake
+ fi
+}
+
+src_install() {
+ if use ipv6; then
+ newbin ipv6/birdc birdc6
+ newsbin ipv6/bird bird6
+ newinitd "${FILESDIR}/initd-v6-${PN}-1.3.8" bird6
+ fi
+ dobin birdc
+ dosbin bird
+ newinitd "${FILESDIR}/initd-v4-${PN}-1.3.8" bird
+ dodoc doc/bird.conf.example
+}
diff --git a/net-misc/bird/bird-1.4.4.ebuild b/net-misc/bird/bird-1.4.4.ebuild
new file mode 100644
index 000000000000..40e3c4abda40
--- /dev/null
+++ b/net-misc/bird/bird-1.4.4.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="A routing daemon implementing OSPF, RIPv2 & BGP for IPv4 or IPv6"
+HOMEPAGE="http://bird.network.cz"
+SRC_URI="ftp://bird.network.cz/pub/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug ipv6"
+
+RDEPEND="sys-libs/ncurses
+ sys-libs/readline"
+DEPEND="sys-devel/flex
+ sys-devel/bison
+ sys-devel/m4"
+
+src_prepare() {
+ mkdir ipv6
+ tar c --exclude ipv6 . | tar x -C ipv6
+}
+
+src_configure() {
+ econf \
+ --enable-client \
+ --disable-ipv6 \
+ --localstatedir="${EPREFIX}/var" \
+ $(use_enable debug)
+
+ if use ipv6; then
+ cd ipv6
+ econf \
+ --enable-client \
+ --enable-ipv6 \
+ --localstatedir="${EPREFIX}/var" \
+ $(use_enable debug)
+ fi
+}
+
+src_compile() {
+ emake
+ if use ipv6; then
+ cd ipv6
+ emake
+ fi
+}
+
+src_install() {
+ if use ipv6; then
+ newbin ipv6/birdc birdc6
+ newsbin ipv6/bird bird6
+ newinitd "${FILESDIR}/initd-v6-${PN}-1.3.8" bird6
+ fi
+ dobin birdc
+ dosbin bird
+ newinitd "${FILESDIR}/initd-v4-${PN}-1.3.8" bird
+ dodoc doc/bird.conf.example
+}
diff --git a/net-misc/bird/bird-1.4.5.ebuild b/net-misc/bird/bird-1.4.5.ebuild
new file mode 100644
index 000000000000..40e3c4abda40
--- /dev/null
+++ b/net-misc/bird/bird-1.4.5.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="A routing daemon implementing OSPF, RIPv2 & BGP for IPv4 or IPv6"
+HOMEPAGE="http://bird.network.cz"
+SRC_URI="ftp://bird.network.cz/pub/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug ipv6"
+
+RDEPEND="sys-libs/ncurses
+ sys-libs/readline"
+DEPEND="sys-devel/flex
+ sys-devel/bison
+ sys-devel/m4"
+
+src_prepare() {
+ mkdir ipv6
+ tar c --exclude ipv6 . | tar x -C ipv6
+}
+
+src_configure() {
+ econf \
+ --enable-client \
+ --disable-ipv6 \
+ --localstatedir="${EPREFIX}/var" \
+ $(use_enable debug)
+
+ if use ipv6; then
+ cd ipv6
+ econf \
+ --enable-client \
+ --enable-ipv6 \
+ --localstatedir="${EPREFIX}/var" \
+ $(use_enable debug)
+ fi
+}
+
+src_compile() {
+ emake
+ if use ipv6; then
+ cd ipv6
+ emake
+ fi
+}
+
+src_install() {
+ if use ipv6; then
+ newbin ipv6/birdc birdc6
+ newsbin ipv6/bird bird6
+ newinitd "${FILESDIR}/initd-v6-${PN}-1.3.8" bird6
+ fi
+ dobin birdc
+ dosbin bird
+ newinitd "${FILESDIR}/initd-v4-${PN}-1.3.8" bird
+ dodoc doc/bird.conf.example
+}
diff --git a/net-misc/bird/bird-1.5.0.ebuild b/net-misc/bird/bird-1.5.0.ebuild
new file mode 100644
index 000000000000..3854a10f0ee9
--- /dev/null
+++ b/net-misc/bird/bird-1.5.0.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="A routing daemon implementing OSPF, RIPv2 & BGP for IPv4 or IPv6"
+HOMEPAGE="http://bird.network.cz"
+SRC_URI="ftp://bird.network.cz/pub/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug ipv6"
+
+RDEPEND="sys-libs/ncurses
+ sys-libs/readline"
+DEPEND="sys-devel/flex
+ sys-devel/bison
+ sys-devel/m4"
+
+src_prepare() {
+ mkdir ipv6
+ tar c --exclude ipv6 . | tar x -C ipv6
+}
+
+src_configure() {
+ econf \
+ --enable-client \
+ --disable-ipv6 \
+ --localstatedir="${EPREFIX}/var" \
+ $(use_enable debug)
+
+ if use ipv6; then
+ cd ipv6
+ econf \
+ --enable-client \
+ --enable-ipv6 \
+ --localstatedir="${EPREFIX}/var" \
+ $(use_enable debug)
+ fi
+}
+
+src_compile() {
+ emake
+ if use ipv6; then
+ cd ipv6
+ emake
+ fi
+}
+
+src_install() {
+ if use ipv6; then
+ newbin ipv6/birdc birdc6
+ newsbin ipv6/bird bird6
+ newinitd "${FILESDIR}/initd-v6-${PN}-1.3.8" bird6
+ fi
+ dobin birdc
+ dosbin bird
+ newinitd "${FILESDIR}/initd-v4-${PN}-1.3.8" bird
+ dodoc doc/bird.conf.example
+}
diff --git a/net-misc/bird/files/1.2.3-v4-v6-build.patch b/net-misc/bird/files/1.2.3-v4-v6-build.patch
new file mode 100644
index 000000000000..12f9e216efec
--- /dev/null
+++ b/net-misc/bird/files/1.2.3-v4-v6-build.patch
@@ -0,0 +1,109 @@
+diff -uNr bird-1.2.3.ORIG//tools/Makefile.in bird-1.2.3/tools/Makefile.in
+--- bird-1.2.3.ORIG//tools/Makefile.in 2010-06-07 14:15:41.000000000 +0100
++++ bird-1.2.3/tools/Makefile.in 2010-06-07 14:15:58.000000000 +0100
+@@ -3,13 +3,13 @@
+
+ include Rules
+
+-.PHONY: all daemon client subdir depend clean distclean tags docs userdocs progdocs
++.PHONY: all daemon client subdir depend clean distclean tags docs userdocs progdocs almost-clean
+
+ all: sysdep/paths.h .dep-stamp subdir daemon @CLIENT@
+
+-daemon: $(exedir)/bird
++daemon: $(exedir)/bird@SUFFIX6@
+
+-client: $(exedir)/birdc
++client: $(exedir)/birdc@SUFFIX6@
+
+ bird-dep := $(addsuffix /all.o, $(static-dirs)) conf/all.o lib/birdlib.a
+
+@@ -27,10 +27,10 @@
+ set -e ; for a in $(dynamic-dirs) ; do $(MAKE) -C $$a $@ ; done
+ set -e ; for a in $(static-dirs) $(client-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done
+
+-$(exedir)/bird: $(bird-dep)
++$(exedir)/bird@SUFFIX6@: $(bird-dep)
+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+-$(exedir)/birdc: $(birdc-dep)
++$(exedir)/birdc@SUFFIX6@: $(birdc-dep)
+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(CLIENT_LIBS)
+
+ .dir-stamp: sysdep/paths.h
+@@ -54,25 +54,42 @@
+ tags:
+ cd $(srcdir) ; etags -lc `find $(static-dirs) $(addprefix $(objdir)/,$(dynamic-dirs)) $(client-dirs) -name *.[chY]`
+
+-install: all
++install-gen:
+ $(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir) $(DESTDIR)/$(localstatedir)/run
+- $(INSTALL_PROGRAM) -s $(exedir)/bird $(DESTDIR)/$(sbindir)/bird@SUFFIX6@
++
++install-bin: install-gen
++ $(INSTALL_PROGRAM) $(exedir)/bird $(DESTDIR)/$(sbindir)/
++ if test -n "@CLIENT@" ; then \
++ $(INSTALL_PROGRAM) $(exedir)/birdc $(DESTDIR)/$(sbindir)/ ; \
++ fi
++ if ! test -f $(DESTDIR)/$(sysconfdir)/bird.conf ; then \
++ $(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/$(sysconfdir)/bird.conf ; \
++ else \
++ echo "Not overwriting old bird.conf" ; \
++ fi
++
++install-bin6: install-gen
++ $(INSTALL_PROGRAM) $(exedir)/bird $(DESTDIR)/$(sbindir)/
+ if test -n "@CLIENT@" ; then \
+- $(INSTALL_PROGRAM) -s $(exedir)/birdc $(DESTDIR)/$(sbindir)/birdc@SUFFIX6@ ; \
++ $(INSTALL_PROGRAM) $(exedir)/birdc6 $(DESTDIR)/$(sbindir)/birdc ; \
+ fi
+- if ! test -f $(DESTDIR)/$(sysconfdir)/bird@SUFFIX6@.conf ; then \
+- $(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/$(sysconfdir)/bird@SUFFIX6@.conf ; \
++ if ! test -f $(DESTDIR)/$(sysconfdir)/bird6.conf ; then \
++ $(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/$(sysconfdir)/bird6.conf ; \
+ else \
+- echo "Not overwriting old bird@SUFFIX@.conf" ; \
++ echo "Not overwriting old bird6.conf" ; \
+ fi
+
++install: all install-bin@SUFFIX6@
++
+ install-docs:
+ $(INSTALL) -d $(DESTDIR)/$(docdir)
+ $(INSTALL_DATA) $(srcdir)/doc/{bird,prog}{,-*}.html $(DESTDIR)/$(docdir)/
+
+-clean:
++almost-clean:
+ find . -name "*.[oa]" -o -name core -o -name depend -o -name "*.html" | xargs rm -f
+ rm -f conf/cf-lex.c conf/cf-parse.* conf/commands.h conf/keywords.h
++
++clean: almost-clean
+ rm -f $(exedir)/bird $(exedir)/birdc $(exedir)/bird.ctl $(exedir)/bird6.ctl .dep-stamp
+
+ distclean: clean
+diff -uNr bird-1.2.3.ORIG//tools/Makefile-top.in bird-1.2.3/tools/Makefile-top.in
+--- bird-1.2.3.ORIG//tools/Makefile-top.in 2010-06-07 14:15:41.000000000 +0100
++++ bird-1.2.3/tools/Makefile-top.in 2010-06-07 14:15:58.000000000 +0100
+@@ -3,16 +3,19 @@
+
+ objdir=@objdir@
+
+-all depend tags install install-docs:
++all depend tags install install-docs install-bin install-bin6:
+ $(MAKE) -C $(objdir) $@
+
+ docs userdocs progdocs:
+ $(MAKE) -C doc $@
+
+-clean:
+- $(MAKE) -C $(objdir) clean
++almost-clean:
++ $(MAKE) -C $(objdir) almost-clean
+ find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core -or -name depend -or -name ".#*" | xargs rm -f
+
++clean: almost-clean
++ $(MAKE) -C $(objdir) clean
++
+ distclean: clean
+ $(MAKE) -C doc distclean
+ rm -rf $(objdir) autom4te.cache
diff --git a/net-misc/bird/files/1.2.4-v4-v6-build.patch b/net-misc/bird/files/1.2.4-v4-v6-build.patch
new file mode 100644
index 000000000000..83a2710f7591
--- /dev/null
+++ b/net-misc/bird/files/1.2.4-v4-v6-build.patch
@@ -0,0 +1,109 @@
+diff -uNr bird-1.2.4.ORIG//tools/Makefile.in bird-1.2.4/tools/Makefile.in
+--- bird-1.2.4.ORIG//tools/Makefile.in 2010-09-06 15:38:39.000000000 +0100
++++ bird-1.2.4/tools/Makefile.in 2010-09-06 15:38:56.000000000 +0100
+@@ -3,13 +3,13 @@
+
+ include Rules
+
+-.PHONY: all daemon client subdir depend clean distclean tags docs userdocs progdocs
++.PHONY: all daemon client subdir depend clean distclean tags docs userdocs progdocs almost-clean
+
+ all: sysdep/paths.h .dep-stamp subdir daemon @CLIENT@
+
+-daemon: $(exedir)/bird
++daemon: $(exedir)/bird@SUFFIX6@
+
+-client: $(exedir)/birdc
++client: $(exedir)/birdc@SUFFIX6@
+
+ bird-dep := $(addsuffix /all.o, $(static-dirs)) conf/all.o lib/birdlib.a
+
+@@ -27,10 +27,10 @@
+ set -e ; for a in $(dynamic-dirs) ; do $(MAKE) -C $$a $@ ; done
+ set -e ; for a in $(static-dirs) $(client-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done
+
+-$(exedir)/bird: $(bird-dep)
++$(exedir)/bird@SUFFIX6@: $(bird-dep)
+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+-$(exedir)/birdc: $(birdc-dep)
++$(exedir)/birdc@SUFFIX6@: $(birdc-dep)
+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(CLIENT_LIBS)
+
+ .dir-stamp: sysdep/paths.h
+@@ -54,25 +54,42 @@
+ tags:
+ cd $(srcdir) ; etags -lc `find $(static-dirs) $(addprefix $(objdir)/,$(dynamic-dirs)) $(client-dirs) -name *.[chY]`
+
+-install: all
++install-gen:
+ $(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir) $(DESTDIR)/$(localstatedir)/run
+- $(INSTALL_PROGRAM) -s $(exedir)/bird $(DESTDIR)/$(sbindir)/bird@SUFFIX6@
++
++install-bin: install-gen
++ $(INSTALL_PROGRAM) $(exedir)/bird $(DESTDIR)/$(sbindir)/
++ if test -n "@CLIENT@" ; then \
++ $(INSTALL_PROGRAM) $(exedir)/birdc $(DESTDIR)/$(sbindir)/ ; \
++ fi
++ if ! test -f $(DESTDIR)/$(sysconfdir)/bird.conf ; then \
++ $(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/$(sysconfdir)/bird.conf ; \
++ else \
++ echo "Not overwriting old bird.conf" ; \
++ fi
++
++install-bin6: install-gen
++ $(INSTALL_PROGRAM) $(exedir)/bird $(DESTDIR)/$(sbindir)/
+ if test -n "@CLIENT@" ; then \
+- $(INSTALL_PROGRAM) -s $(exedir)/birdc $(DESTDIR)/$(sbindir)/birdc@SUFFIX6@ ; \
++ $(INSTALL_PROGRAM) $(exedir)/birdc6 $(DESTDIR)/$(sbindir)/birdc ; \
+ fi
+- if ! test -f $(DESTDIR)/$(sysconfdir)/bird@SUFFIX6@.conf ; then \
+- $(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/$(sysconfdir)/bird@SUFFIX6@.conf ; \
++ if ! test -f $(DESTDIR)/$(sysconfdir)/bird6.conf ; then \
++ $(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/$(sysconfdir)/bird6.conf ; \
+ else \
+- echo "Not overwriting old bird@SUFFIX@.conf" ; \
++ echo "Not overwriting old bird6.conf" ; \
+ fi
+
++install: all install-bin@SUFFIX6@
++
+ install-docs:
+ $(INSTALL) -d $(DESTDIR)/$(docdir)
+ $(INSTALL_DATA) $(srcdir)/doc/{bird,prog}{,-*}.html $(DESTDIR)/$(docdir)/
+
+-clean:
++almost-clean:
+ find . -name "*.[oa]" -o -name core -o -name depend -o -name "*.html" | xargs rm -f
+ rm -f conf/cf-lex.c conf/cf-parse.* conf/commands.h conf/keywords.h
++
++clean: almost-clean
+ rm -f $(exedir)/bird $(exedir)/birdc $(exedir)/bird.ctl $(exedir)/bird6.ctl .dep-stamp
+
+ distclean: clean
+diff -uNr bird-1.2.4.ORIG//tools/Makefile-top.in bird-1.2.4/tools/Makefile-top.in
+--- bird-1.2.4.ORIG//tools/Makefile-top.in 2010-09-06 15:38:39.000000000 +0100
++++ bird-1.2.4/tools/Makefile-top.in 2010-09-06 15:38:56.000000000 +0100
+@@ -3,16 +3,19 @@
+
+ objdir=@objdir@
+
+-all depend tags install install-docs:
++all depend tags install install-docs install-bin install-bin6:
+ $(MAKE) -C $(objdir) $@
+
+ docs userdocs progdocs:
+ $(MAKE) -C doc $@
+
+-clean:
+- $(MAKE) -C $(objdir) clean
++almost-clean:
++ $(MAKE) -C $(objdir) almost-clean
+ find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core -or -name depend -or -name ".#*" | xargs rm -f
+
++clean: almost-clean
++ $(MAKE) -C $(objdir) clean
++
+ distclean: clean
+ $(MAKE) -C doc distclean
+ rm -rf $(objdir) autom4te.cache
diff --git a/net-misc/bird/files/1.3.0-v4-v6-build.patch b/net-misc/bird/files/1.3.0-v4-v6-build.patch
new file mode 100644
index 000000000000..9e321836b850
--- /dev/null
+++ b/net-misc/bird/files/1.3.0-v4-v6-build.patch
@@ -0,0 +1,109 @@
+diff -uNr bird-1.3.0.ORIG//tools/Makefile-top.in bird-1.3.0/tools/Makefile-top.in
+--- bird-1.3.0.ORIG//tools/Makefile-top.in 2011-03-31 10:42:08.264002882 +0100
++++ bird-1.3.0/tools/Makefile-top.in 2011-03-31 10:42:32.083002944 +0100
+@@ -3,16 +3,19 @@
+
+ objdir=@objdir@
+
+-all depend tags install install-docs:
++all depend tags install install-docs install-bin install-bin6:
+ $(MAKE) -C $(objdir) $@
+
+ docs userdocs progdocs:
+ $(MAKE) -C doc $@
+
+-clean:
+- $(MAKE) -C $(objdir) clean
++almost-clean:
++ $(MAKE) -C $(objdir) almost-clean
+ find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core -or -name depend -or -name ".#*" | xargs rm -f
+
++clean: almost-clean
++ $(MAKE) -C $(objdir) clean
++
+ distclean: clean
+ $(MAKE) -C doc distclean
+ rm -rf $(objdir) autom4te.cache
+diff -uNr bird-1.3.0.ORIG//tools/Makefile.in bird-1.3.0/tools/Makefile.in
+--- bird-1.3.0.ORIG//tools/Makefile.in 2011-03-31 10:42:08.265002882 +0100
++++ bird-1.3.0/tools/Makefile.in 2011-03-31 10:42:32.083002944 +0100
+@@ -3,13 +3,13 @@
+
+ include Rules
+
+-.PHONY: all daemon client subdir depend clean distclean tags docs userdocs progdocs
++.PHONY: all daemon client subdir depend clean distclean tags docs userdocs progdocs almost-clean
+
+ all: sysdep/paths.h .dep-stamp subdir daemon @CLIENT@
+
+-daemon: $(exedir)/bird
++daemon: $(exedir)/bird@SUFFIX6@
+
+-client: $(exedir)/birdc
++client: $(exedir)/birdc@SUFFIX6@
+
+ bird-dep := $(addsuffix /all.o, $(static-dirs)) conf/all.o lib/birdlib.a
+
+@@ -27,10 +27,10 @@
+ set -e ; for a in $(dynamic-dirs) ; do $(MAKE) -C $$a $@ ; done
+ set -e ; for a in $(static-dirs) $(client-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done
+
+-$(exedir)/bird: $(bird-dep)
++$(exedir)/bird@SUFFIX6@: $(bird-dep)
+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+-$(exedir)/birdc: $(birdc-dep)
++$(exedir)/birdc@SUFFIX6@: $(birdc-dep)
+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(CLIENT_LIBS)
+
+ .dir-stamp: sysdep/paths.h
+@@ -54,25 +54,42 @@
+ tags:
+ cd $(srcdir) ; etags -lc `find $(static-dirs) $(addprefix $(objdir)/,$(dynamic-dirs)) $(client-dirs) -name *.[chY]`
+
+-install: all
++install-gen:
+ $(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir) $(DESTDIR)/$(localstatedir)/run
+- $(INSTALL_PROGRAM) -s $(exedir)/bird $(DESTDIR)/$(sbindir)/bird@SUFFIX6@
++
++install-bin: install-gen
++ $(INSTALL_PROGRAM) $(exedir)/bird $(DESTDIR)/$(sbindir)/
++ if test -n "@CLIENT@" ; then \
++ $(INSTALL_PROGRAM) $(exedir)/birdc $(DESTDIR)/$(sbindir)/ ; \
++ fi
++ if ! test -f $(DESTDIR)/$(sysconfdir)/bird.conf ; then \
++ $(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/$(sysconfdir)/bird.conf ; \
++ else \
++ echo "Not overwriting old bird.conf" ; \
++ fi
++
++install-bin6: install-gen
++ $(INSTALL_PROGRAM) $(exedir)/bird $(DESTDIR)/$(sbindir)/
+ if test -n "@CLIENT@" ; then \
+- $(INSTALL_PROGRAM) -s $(exedir)/birdc $(DESTDIR)/$(sbindir)/birdc@SUFFIX6@ ; \
++ $(INSTALL_PROGRAM) $(exedir)/birdc6 $(DESTDIR)/$(sbindir)/birdc ; \
+ fi
+- if ! test -f $(DESTDIR)/$(sysconfdir)/bird@SUFFIX6@.conf ; then \
+- $(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/$(sysconfdir)/bird@SUFFIX6@.conf ; \
++ if ! test -f $(DESTDIR)/$(sysconfdir)/bird6.conf ; then \
++ $(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/$(sysconfdir)/bird6.conf ; \
+ else \
+- echo "Not overwriting old bird@SUFFIX@.conf" ; \
++ echo "Not overwriting old bird6.conf" ; \
+ fi
+
++install: all install-bin@SUFFIX6@
++
+ install-docs:
+ $(INSTALL) -d $(DESTDIR)/$(docdir)
+ $(INSTALL_DATA) $(srcdir)/doc/{bird,prog}{,-*}.html $(DESTDIR)/$(docdir)/
+
+-clean:
++almost-clean:
+ find . -name "*.[oa]" -o -name core -o -name depend -o -name "*.html" | xargs rm -f
+ rm -f conf/cf-lex.c conf/cf-parse.* conf/commands.h conf/keywords.h
++
++clean: almost-clean
+ rm -f $(exedir)/bird $(exedir)/birdc $(exedir)/bird.ctl $(exedir)/bird6.ctl .dep-stamp
+
+ distclean: clean
diff --git a/net-misc/bird/files/1.3.1-v4-v6-build.patch b/net-misc/bird/files/1.3.1-v4-v6-build.patch
new file mode 100644
index 000000000000..3d6d0e2ee5f3
--- /dev/null
+++ b/net-misc/bird/files/1.3.1-v4-v6-build.patch
@@ -0,0 +1,109 @@
+diff -uNr bird-1.3.1.ORIG//tools/Makefile-top.in bird-1.3.1/tools/Makefile-top.in
+--- bird-1.3.1.ORIG//tools/Makefile-top.in 2011-05-02 12:57:26.799971384 +0100
++++ bird-1.3.1/tools/Makefile-top.in 2011-05-02 12:57:42.587971260 +0100
+@@ -3,16 +3,19 @@
+
+ objdir=@objdir@
+
+-all depend tags install install-docs:
++all depend tags install install-docs install-bin install-bin6:
+ $(MAKE) -C $(objdir) $@
+
+ docs userdocs progdocs:
+ $(MAKE) -C doc $@
+
+-clean:
+- $(MAKE) -C $(objdir) clean
++almost-clean:
++ $(MAKE) -C $(objdir) almost-clean
+ find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core -or -name depend -or -name ".#*" | xargs rm -f
+
++clean: almost-clean
++ $(MAKE) -C $(objdir) clean
++
+ distclean: clean
+ $(MAKE) -C doc distclean
+ rm -rf $(objdir) autom4te.cache
+diff -uNr bird-1.3.1.ORIG//tools/Makefile.in bird-1.3.1/tools/Makefile.in
+--- bird-1.3.1.ORIG//tools/Makefile.in 2011-05-02 12:57:26.799971384 +0100
++++ bird-1.3.1/tools/Makefile.in 2011-05-02 12:57:42.588971277 +0100
+@@ -3,13 +3,13 @@
+
+ include Rules
+
+-.PHONY: all daemon client subdir depend clean distclean tags docs userdocs progdocs
++.PHONY: all daemon client subdir depend clean distclean tags docs userdocs progdocs almost-clean
+
+ all: sysdep/paths.h .dep-stamp subdir daemon @CLIENT@
+
+-daemon: $(exedir)/bird
++daemon: $(exedir)/bird@SUFFIX6@
+
+-client: $(exedir)/birdc
++client: $(exedir)/birdc@SUFFIX6@
+
+ bird-dep := $(addsuffix /all.o, $(static-dirs)) conf/all.o lib/birdlib.a
+
+@@ -27,10 +27,10 @@
+ set -e ; for a in $(dynamic-dirs) ; do $(MAKE) -C $$a $@ ; done
+ set -e ; for a in $(static-dirs) $(client-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done
+
+-$(exedir)/bird: $(bird-dep)
++$(exedir)/bird@SUFFIX6@: $(bird-dep)
+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+-$(exedir)/birdc: $(birdc-dep)
++$(exedir)/birdc@SUFFIX6@: $(birdc-dep)
+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(CLIENT_LIBS)
+
+ .dir-stamp: sysdep/paths.h
+@@ -55,25 +55,42 @@
+ tags:
+ cd $(srcdir) ; etags -lc `find $(static-dirs) $(addprefix $(objdir)/,$(dynamic-dirs)) $(client-dirs) -name *.[chY]`
+
+-install: all
++install-gen:
+ $(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir) $(DESTDIR)/$(localstatedir)/run
+- $(INSTALL_PROGRAM) -s $(exedir)/bird $(DESTDIR)/$(sbindir)/bird@SUFFIX6@
++
++install-bin: install-gen
++ $(INSTALL_PROGRAM) $(exedir)/bird $(DESTDIR)/$(sbindir)/
++ if test -n "@CLIENT@" ; then \
++ $(INSTALL_PROGRAM) $(exedir)/birdc $(DESTDIR)/$(sbindir)/ ; \
++ fi
++ if ! test -f $(DESTDIR)/$(sysconfdir)/bird.conf ; then \
++ $(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/$(sysconfdir)/bird.conf ; \
++ else \
++ echo "Not overwriting old bird.conf" ; \
++ fi
++
++install-bin6: install-gen
++ $(INSTALL_PROGRAM) $(exedir)/bird $(DESTDIR)/$(sbindir)/
+ if test -n "@CLIENT@" ; then \
+- $(INSTALL_PROGRAM) -s $(exedir)/birdc $(DESTDIR)/$(sbindir)/birdc@SUFFIX6@ ; \
++ $(INSTALL_PROGRAM) $(exedir)/birdc6 $(DESTDIR)/$(sbindir)/birdc ; \
+ fi
+- if ! test -f $(DESTDIR)/$(sysconfdir)/bird@SUFFIX6@.conf ; then \
+- $(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/$(sysconfdir)/bird@SUFFIX6@.conf ; \
++ if ! test -f $(DESTDIR)/$(sysconfdir)/bird6.conf ; then \
++ $(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/$(sysconfdir)/bird6.conf ; \
+ else \
+- echo "Not overwriting old bird@SUFFIX@.conf" ; \
++ echo "Not overwriting old bird6.conf" ; \
+ fi
+
++install: all install-bin@SUFFIX6@
++
+ install-docs:
+ $(INSTALL) -d $(DESTDIR)/$(docdir)
+ $(INSTALL_DATA) $(srcdir)/doc/{bird,prog}{,-*}.html $(DESTDIR)/$(docdir)/
+
+-clean:
++almost-clean:
+ find . -name "*.[oa]" -o -name core -o -name depend -o -name "*.html" | xargs rm -f
+ rm -f conf/cf-lex.c conf/cf-parse.* conf/commands.h conf/keywords.h
++
++clean: almost-clean
+ rm -f $(exedir)/bird $(exedir)/birdc $(exedir)/bird.ctl $(exedir)/bird6.ctl .dep-stamp
+
+ distclean: clean
diff --git a/net-misc/bird/files/1.3.2-v4-v6-build.patch b/net-misc/bird/files/1.3.2-v4-v6-build.patch
new file mode 100644
index 000000000000..134c31faeab4
--- /dev/null
+++ b/net-misc/bird/files/1.3.2-v4-v6-build.patch
@@ -0,0 +1,109 @@
+diff -uNr bird-1.3.2.ORIG/tools/Makefile.in bird-1.3.2/tools/Makefile.in
+--- bird-1.3.2.ORIG/tools/Makefile.in 2011-11-07 10:53:52.881139861 +0000
++++ bird-1.3.2/tools/Makefile.in 2011-11-07 10:54:08.606140225 +0000
+@@ -3,13 +3,13 @@
+
+ include Rules
+
+-.PHONY: all daemon client subdir depend clean distclean tags docs userdocs progdocs
++.PHONY: all daemon client subdir depend clean distclean tags docs userdocs progdocs almost-clean
+
+ all: sysdep/paths.h .dep-stamp subdir daemon @CLIENT@
+
+-daemon: $(exedir)/bird
++daemon: $(exedir)/bird@SUFFIX6@
+
+-client: $(exedir)/birdc
++client: $(exedir)/birdc@SUFFIX6@
+
+ bird-dep := $(addsuffix /all.o, $(static-dirs)) conf/all.o lib/birdlib.a
+
+@@ -27,10 +27,10 @@
+ set -e ; for a in $(dynamic-dirs) ; do $(MAKE) -C $$a $@ ; done
+ set -e ; for a in $(static-dirs) $(client-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done
+
+-$(exedir)/bird: $(bird-dep)
++$(exedir)/bird@SUFFIX6@: $(bird-dep)
+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+-$(exedir)/birdc: $(birdc-dep)
++$(exedir)/birdc@SUFFIX6@: $(birdc-dep)
+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(CLIENT_LIBS)
+
+ .dir-stamp: sysdep/paths.h
+@@ -55,25 +55,42 @@
+ tags:
+ cd $(srcdir) ; etags -lc `find $(static-dirs) $(addprefix $(objdir)/,$(dynamic-dirs)) $(client-dirs) -name *.[chY]`
+
+-install: all
++install-gen:
+ $(INSTALL) -d $(DESTDIR)/$(sbindir) $(DESTDIR)/$(sysconfdir) $(DESTDIR)/$(localstatedir)/run
+- $(INSTALL_PROGRAM) -s $(exedir)/bird $(DESTDIR)/$(sbindir)/bird@SUFFIX6@
++
++install-bin: install-gen
++ $(INSTALL_PROGRAM) $(exedir)/bird $(DESTDIR)/$(sbindir)/
++ if test -n "@CLIENT@" ; then \
++ $(INSTALL_PROGRAM) $(exedir)/birdc $(DESTDIR)/$(sbindir)/ ; \
++ fi
++ if ! test -f $(DESTDIR)/$(sysconfdir)/bird.conf ; then \
++ $(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/$(sysconfdir)/bird.conf ; \
++ else \
++ echo "Not overwriting old bird.conf" ; \
++ fi
++
++install-bin6: install-gen
++ $(INSTALL_PROGRAM) $(exedir)/bird $(DESTDIR)/$(sbindir)/
+ if test -n "@CLIENT@" ; then \
+- $(INSTALL_PROGRAM) -s $(exedir)/birdc $(DESTDIR)/$(sbindir)/birdc@SUFFIX6@ ; \
++ $(INSTALL_PROGRAM) $(exedir)/birdc6 $(DESTDIR)/$(sbindir)/birdc ; \
+ fi
+- if ! test -f $(DESTDIR)/$(sysconfdir)/bird@SUFFIX6@.conf ; then \
+- $(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/$(sysconfdir)/bird@SUFFIX6@.conf ; \
++ if ! test -f $(DESTDIR)/$(sysconfdir)/bird6.conf ; then \
++ $(INSTALL_DATA) $(srcdir)/doc/bird.conf.example $(DESTDIR)/$(sysconfdir)/bird6.conf ; \
+ else \
+- echo "Not overwriting old bird@SUFFIX@.conf" ; \
++ echo "Not overwriting old bird6.conf" ; \
+ fi
+
++install: all install-bin@SUFFIX6@
++
+ install-docs:
+ $(INSTALL) -d $(DESTDIR)/$(docdir)
+ $(INSTALL_DATA) $(srcdir)/doc/{bird,prog}{,-*}.html $(DESTDIR)/$(docdir)/
+
+-clean:
++almost-clean:
+ find . -name "*.[oa]" -o -name core -o -name depend -o -name "*.html" | xargs rm -f
+ rm -f conf/cf-lex.c conf/cf-parse.* conf/commands.h conf/keywords.h
++
++clean: almost-clean
+ rm -f $(exedir)/bird $(exedir)/birdc $(exedir)/bird.ctl $(exedir)/bird6.ctl .dep-stamp
+
+ distclean: clean
+diff -uNr bird-1.3.2.ORIG/tools/Makefile-top.in bird-1.3.2/tools/Makefile-top.in
+--- bird-1.3.2.ORIG/tools/Makefile-top.in 2011-11-07 10:53:52.881139861 +0000
++++ bird-1.3.2/tools/Makefile-top.in 2011-11-07 10:54:08.603140225 +0000
+@@ -3,16 +3,19 @@
+
+ objdir=@objdir@
+
+-all depend tags install install-docs:
++all depend tags install install-docs install-bin install-bin6:
+ $(MAKE) -C $(objdir) $@
+
+ docs userdocs progdocs:
+ $(MAKE) -C doc $@
+
+-clean:
+- $(MAKE) -C $(objdir) clean
++almost-clean:
++ $(MAKE) -C $(objdir) almost-clean
+ find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core -or -name depend -or -name ".#*" | xargs rm -f
+
++clean: almost-clean
++ $(MAKE) -C $(objdir) clean
++
+ distclean: clean
+ $(MAKE) -C doc distclean
+ rm -rf $(objdir) autom4te.cache
diff --git a/net-misc/bird/files/initd-v4-bird-1.2.3 b/net-misc/bird/files/initd-v4-bird-1.2.3
new file mode 100644
index 000000000000..8d2014f3f40a
--- /dev/null
+++ b/net-misc/bird/files/initd-v4-bird-1.2.3
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EXE=bird
+CLI=birdc
+SOCK="/var/run/${EXE}.ctl"
+
+depend() {
+ need net
+ use logger
+}
+
+checkconfig() {
+ if [ ! -f "/etc/${EXE}.conf" ]; then
+ eerror "Please create /etc/${EXE}.conf"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Starting BIRD"
+ "/usr/sbin/${EXE}" -c "/etc/${EXE}.conf" -s "${SOCK}"
+ eend $? "Failed to start BIRD"
+}
+
+stop() {
+ ebegin "Stopping BIRD"
+ if [ -f "${SOCK}" ]; then
+ echo "down" | "/usr/sbin/${CLI}" -s "${SOCK}" &>/dev/null
+ eend $? "Failed to stop BIRD"
+ else
+ eend 0
+ fi
+}
diff --git a/net-misc/bird/files/initd-v4-bird-1.2.4 b/net-misc/bird/files/initd-v4-bird-1.2.4
new file mode 100644
index 000000000000..91ae47dafada
--- /dev/null
+++ b/net-misc/bird/files/initd-v4-bird-1.2.4
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EXE=bird
+CLI=birdc
+SOCK="/var/run/${EXE}.ctl"
+
+depend() {
+ need net
+ use logger
+}
+
+checkconfig() {
+ if [ ! -f "/etc/${EXE}.conf" ]; then
+ eerror "Please create /etc/${EXE}.conf"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Starting BIRD"
+ "/usr/sbin/${EXE}" -c "/etc/${EXE}.conf" -s "${SOCK}"
+ eend $? "Failed to start BIRD"
+}
+
+stop() {
+ ebegin "Stopping BIRD"
+ if [ -f "${SOCK}" ]; then
+ echo "down" | "/usr/sbin/${CLI}" -s "${SOCK}" &>/dev/null
+ eend $? "Failed to stop BIRD"
+ else
+ eend 0
+ fi
+}
diff --git a/net-misc/bird/files/initd-v4-bird-1.3.0 b/net-misc/bird/files/initd-v4-bird-1.3.0
new file mode 100644
index 000000000000..bd3293143ff9
--- /dev/null
+++ b/net-misc/bird/files/initd-v4-bird-1.3.0
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+opts="reload"
+
+EXE=bird
+SOCK="/var/run/${EXE}.ctl"
+
+depend() {
+ need net
+ use logger
+}
+
+checkconfig() {
+ if [ ! -f "/etc/${EXE}.conf" ]; then
+ eerror "Please create /etc/${EXE}.conf"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+ ebegin "Starting BIRD"
+ start-stop-daemon --start --exec /usr/sbin/${EXE} -- -c "/etc/${EXE}.conf" -s "${SOCK}"
+ eend $? "Failed to start BIRD"
+}
+
+stop() {
+ ebegin "Stopping BIRD"
+ start-stop-daemon --stop --exec /usr/sbin/${EXE}
+ eend $? "Failed to stop BIRD"
+}
+
+reload() {
+ service_started "${SVCNAME}" || return
+ ebegin "Reloading BIRD"
+ start-stop-daemon --stop --signal HUP --oknodo --exec /usr/sbin/${EXE}
+ eend $? "Failed to reload BIRD"
+}
diff --git a/net-misc/bird/files/initd-v4-bird-1.3.1 b/net-misc/bird/files/initd-v4-bird-1.3.1
new file mode 100644
index 000000000000..bd3293143ff9
--- /dev/null
+++ b/net-misc/bird/files/initd-v4-bird-1.3.1
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+opts="reload"
+
+EXE=bird
+SOCK="/var/run/${EXE}.ctl"
+
+depend() {
+ need net
+ use logger
+}
+
+checkconfig() {
+ if [ ! -f "/etc/${EXE}.conf" ]; then
+ eerror "Please create /etc/${EXE}.conf"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+ ebegin "Starting BIRD"
+ start-stop-daemon --start --exec /usr/sbin/${EXE} -- -c "/etc/${EXE}.conf" -s "${SOCK}"
+ eend $? "Failed to start BIRD"
+}
+
+stop() {
+ ebegin "Stopping BIRD"
+ start-stop-daemon --stop --exec /usr/sbin/${EXE}
+ eend $? "Failed to stop BIRD"
+}
+
+reload() {
+ service_started "${SVCNAME}" || return
+ ebegin "Reloading BIRD"
+ start-stop-daemon --stop --signal HUP --oknodo --exec /usr/sbin/${EXE}
+ eend $? "Failed to reload BIRD"
+}
diff --git a/net-misc/bird/files/initd-v4-bird-1.3.2 b/net-misc/bird/files/initd-v4-bird-1.3.2
new file mode 100644
index 000000000000..bd3293143ff9
--- /dev/null
+++ b/net-misc/bird/files/initd-v4-bird-1.3.2
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+opts="reload"
+
+EXE=bird
+SOCK="/var/run/${EXE}.ctl"
+
+depend() {
+ need net
+ use logger
+}
+
+checkconfig() {
+ if [ ! -f "/etc/${EXE}.conf" ]; then
+ eerror "Please create /etc/${EXE}.conf"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+ ebegin "Starting BIRD"
+ start-stop-daemon --start --exec /usr/sbin/${EXE} -- -c "/etc/${EXE}.conf" -s "${SOCK}"
+ eend $? "Failed to start BIRD"
+}
+
+stop() {
+ ebegin "Stopping BIRD"
+ start-stop-daemon --stop --exec /usr/sbin/${EXE}
+ eend $? "Failed to stop BIRD"
+}
+
+reload() {
+ service_started "${SVCNAME}" || return
+ ebegin "Reloading BIRD"
+ start-stop-daemon --stop --signal HUP --oknodo --exec /usr/sbin/${EXE}
+ eend $? "Failed to reload BIRD"
+}
diff --git a/net-misc/bird/files/initd-v4-bird-1.3.8 b/net-misc/bird/files/initd-v4-bird-1.3.8
new file mode 100644
index 000000000000..33702e7b0fa3
--- /dev/null
+++ b/net-misc/bird/files/initd-v4-bird-1.3.8
@@ -0,0 +1,41 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_started_commands="reload"
+
+EXE=bird
+SOCK="/var/run/${EXE}.ctl"
+
+depend() {
+ need net
+ use logger
+}
+
+checkconfig() {
+ if [ ! -f "/etc/${EXE}.conf" ]; then
+ eerror "Please create /etc/${EXE}.conf"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+ ebegin "Starting BIRD"
+ start-stop-daemon --start --exec /usr/sbin/${EXE} -- -c "/etc/${EXE}.conf" -s "${SOCK}"
+ eend $? "Failed to start BIRD"
+}
+
+stop() {
+ ebegin "Stopping BIRD"
+ start-stop-daemon --stop --exec /usr/sbin/${EXE}
+ eend $? "Failed to stop BIRD"
+}
+
+reload() {
+ ebegin "Reloading BIRD"
+ start-stop-daemon --stop --signal HUP --oknodo --exec /usr/sbin/${EXE}
+ eend $? "Failed to reload BIRD"
+}
diff --git a/net-misc/bird/files/initd-v6-bird-1.2.3 b/net-misc/bird/files/initd-v6-bird-1.2.3
new file mode 100644
index 000000000000..71152d71a026
--- /dev/null
+++ b/net-misc/bird/files/initd-v6-bird-1.2.3
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EXE=bird6
+CLI=birdc6
+SOCK="/var/run/${EXE}.ctl"
+
+depend() {
+ need net
+ use logger
+}
+
+checkconfig() {
+ if [ ! -f "/etc/${EXE}.conf" ]; then
+ eerror "Please create /etc/${EXE}.conf"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Starting BIRD"
+ "/usr/sbin/${EXE}" -c "/etc/${EXE}.conf" -s "${SOCK}"
+ eend $? "Failed to start BIRD"
+}
+
+stop() {
+ ebegin "Stopping BIRD"
+ if [ -f "${SOCK}" ]; then
+ echo "down" | "/usr/sbin/${CLI}" -s "${SOCK}" &>/dev/null
+ eend $? "Failed to stop BIRD"
+ else
+ eend 0
+ fi
+}
diff --git a/net-misc/bird/files/initd-v6-bird-1.2.4 b/net-misc/bird/files/initd-v6-bird-1.2.4
new file mode 100644
index 000000000000..71152d71a026
--- /dev/null
+++ b/net-misc/bird/files/initd-v6-bird-1.2.4
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EXE=bird6
+CLI=birdc6
+SOCK="/var/run/${EXE}.ctl"
+
+depend() {
+ need net
+ use logger
+}
+
+checkconfig() {
+ if [ ! -f "/etc/${EXE}.conf" ]; then
+ eerror "Please create /etc/${EXE}.conf"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Starting BIRD"
+ "/usr/sbin/${EXE}" -c "/etc/${EXE}.conf" -s "${SOCK}"
+ eend $? "Failed to start BIRD"
+}
+
+stop() {
+ ebegin "Stopping BIRD"
+ if [ -f "${SOCK}" ]; then
+ echo "down" | "/usr/sbin/${CLI}" -s "${SOCK}" &>/dev/null
+ eend $? "Failed to stop BIRD"
+ else
+ eend 0
+ fi
+}
diff --git a/net-misc/bird/files/initd-v6-bird-1.3.0 b/net-misc/bird/files/initd-v6-bird-1.3.0
new file mode 100644
index 000000000000..6ab4003f6286
--- /dev/null
+++ b/net-misc/bird/files/initd-v6-bird-1.3.0
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+opts="reload"
+
+EXE=bird6
+SOCK="/var/run/${EXE}.ctl"
+
+depend() {
+ need net
+ use logger
+}
+
+checkconfig() {
+ if [ ! -f "/etc/${EXE}.conf" ]; then
+ eerror "Please create /etc/${EXE}.conf"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+ ebegin "Starting BIRD"
+ start-stop-daemon --start --exec /usr/sbin/${EXE} -- -c "/etc/${EXE}.conf" -s "${SOCK}"
+ eend $? "Failed to start BIRD"
+}
+
+stop() {
+ ebegin "Stopping BIRD"
+ start-stop-daemon --stop --exec /usr/sbin/${EXE}
+ eend $? "Failed to stop BIRD"
+}
+
+reload() {
+ service_started "${SVCNAME}" || return
+ ebegin "Reloading BIRD"
+ start-stop-daemon --stop --signal HUP --oknodo --exec /usr/sbin/${EXE}
+ eend $? "Failed to reload BIRD"
+}
diff --git a/net-misc/bird/files/initd-v6-bird-1.3.1 b/net-misc/bird/files/initd-v6-bird-1.3.1
new file mode 100644
index 000000000000..6ab4003f6286
--- /dev/null
+++ b/net-misc/bird/files/initd-v6-bird-1.3.1
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+opts="reload"
+
+EXE=bird6
+SOCK="/var/run/${EXE}.ctl"
+
+depend() {
+ need net
+ use logger
+}
+
+checkconfig() {
+ if [ ! -f "/etc/${EXE}.conf" ]; then
+ eerror "Please create /etc/${EXE}.conf"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+ ebegin "Starting BIRD"
+ start-stop-daemon --start --exec /usr/sbin/${EXE} -- -c "/etc/${EXE}.conf" -s "${SOCK}"
+ eend $? "Failed to start BIRD"
+}
+
+stop() {
+ ebegin "Stopping BIRD"
+ start-stop-daemon --stop --exec /usr/sbin/${EXE}
+ eend $? "Failed to stop BIRD"
+}
+
+reload() {
+ service_started "${SVCNAME}" || return
+ ebegin "Reloading BIRD"
+ start-stop-daemon --stop --signal HUP --oknodo --exec /usr/sbin/${EXE}
+ eend $? "Failed to reload BIRD"
+}
diff --git a/net-misc/bird/files/initd-v6-bird-1.3.2 b/net-misc/bird/files/initd-v6-bird-1.3.2
new file mode 100644
index 000000000000..6ab4003f6286
--- /dev/null
+++ b/net-misc/bird/files/initd-v6-bird-1.3.2
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+opts="reload"
+
+EXE=bird6
+SOCK="/var/run/${EXE}.ctl"
+
+depend() {
+ need net
+ use logger
+}
+
+checkconfig() {
+ if [ ! -f "/etc/${EXE}.conf" ]; then
+ eerror "Please create /etc/${EXE}.conf"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+ ebegin "Starting BIRD"
+ start-stop-daemon --start --exec /usr/sbin/${EXE} -- -c "/etc/${EXE}.conf" -s "${SOCK}"
+ eend $? "Failed to start BIRD"
+}
+
+stop() {
+ ebegin "Stopping BIRD"
+ start-stop-daemon --stop --exec /usr/sbin/${EXE}
+ eend $? "Failed to stop BIRD"
+}
+
+reload() {
+ service_started "${SVCNAME}" || return
+ ebegin "Reloading BIRD"
+ start-stop-daemon --stop --signal HUP --oknodo --exec /usr/sbin/${EXE}
+ eend $? "Failed to reload BIRD"
+}
diff --git a/net-misc/bird/files/initd-v6-bird-1.3.8 b/net-misc/bird/files/initd-v6-bird-1.3.8
new file mode 100644
index 000000000000..6e5342639007
--- /dev/null
+++ b/net-misc/bird/files/initd-v6-bird-1.3.8
@@ -0,0 +1,41 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_started_commands="reload"
+
+EXE=bird6
+SOCK="/var/run/${EXE}.ctl"
+
+depend() {
+ need net
+ use logger
+}
+
+checkconfig() {
+ if [ ! -f "/etc/${EXE}.conf" ]; then
+ eerror "Please create /etc/${EXE}.conf"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+ ebegin "Starting BIRD"
+ start-stop-daemon --start --exec /usr/sbin/${EXE} -- -c "/etc/${EXE}.conf" -s "${SOCK}"
+ eend $? "Failed to start BIRD"
+}
+
+stop() {
+ ebegin "Stopping BIRD"
+ start-stop-daemon --stop --exec /usr/sbin/${EXE}
+ eend $? "Failed to stop BIRD"
+}
+
+reload() {
+ ebegin "Reloading BIRD"
+ start-stop-daemon --stop --signal HUP --oknodo --exec /usr/sbin/${EXE}
+ eend $? "Failed to reload BIRD"
+}
diff --git a/net-misc/bird/metadata.xml b/net-misc/bird/metadata.xml
new file mode 100644
index 000000000000..f117080362f9
--- /dev/null
+++ b/net-misc/bird/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>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+</pkgmetadata> \ No newline at end of file
diff --git a/net-misc/blinkperl/Manifest b/net-misc/blinkperl/Manifest
new file mode 100644
index 000000000000..648433b2d68f
--- /dev/null
+++ b/net-misc/blinkperl/Manifest
@@ -0,0 +1 @@
+DIST blinkperl-2003-02-08.tar.gz 64918 SHA256 f131d00432df6b991d38d035565ba471508de822caed1cb7422ace03f11382b0 SHA512 4759e00b179ecc210af7b0a83d0eb18ffd09d1659b38ae4a3de346bc7d5b7d6c319e80f0b28981eb643d165581b2dc35ce78ad59c6b97f1d4b1ce6df33127c9e WHIRLPOOL ec33b073d20677364b28dc94750d6a688f6a0a173d24900d8954e50ef0cb66ef34f1de4772e3f71e70188a47a34ae6ea9dcbb0f50b2b064ceaf0df000f3aac2d
diff --git a/net-misc/blinkperl/blinkperl-20030301-r1.ebuild b/net-misc/blinkperl/blinkperl-20030301-r1.ebuild
new file mode 100644
index 000000000000..1a1d0eed9707
--- /dev/null
+++ b/net-misc/blinkperl/blinkperl-20030301-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+MY_P="${PN}-2003-02-08"
+S=${WORKDIR}/${PN}
+
+DESCRIPTION="blinkperl is a telnet server, which plays BlinkenLight movies"
+SRC_URI="mirror://sourceforge/blinkserv/${MY_P}.tar.gz"
+HOMEPAGE="http://blinkserv.sourceforge.net/"
+
+SLOT="0"
+KEYWORDS="~hppa x86"
+LICENSE="GPL-2"
+IUSE=""
+DEPEND=""
+RDEPEND="dev-lang/perl dev-perl/Term-ANSIScreen"
+
+src_unpack() {
+ unpack ${A}
+
+ epatch "${FILESDIR}"/${P}-non-local.patch
+ epatch "${FILESDIR}"/${P}-Makefile.patch
+}
+
+src_install() {
+ make PREFIX=/usr DESTDIR="${D}" install || die
+
+ newinitd "${FILESDIR}"/blinkperl.rc blinkperl
+ newconfd "${FILESDIR}"/blinkperl.confd blinkperl
+}
diff --git a/net-misc/blinkperl/files/blinkperl-20030301-Makefile.patch b/net-misc/blinkperl/files/blinkperl-20030301-Makefile.patch
new file mode 100644
index 000000000000..1f8d3bee0df6
--- /dev/null
+++ b/net-misc/blinkperl/files/blinkperl-20030301-Makefile.patch
@@ -0,0 +1,20 @@
+Do not install into /usr/man and be consistent about the package name.
+
+--- blinkperl/Makefile.orig 2003-02-08 15:58:10.000000000 +0100
++++ blinkperl/Makefile 2008-11-27 21:14:03.000000000 +0100
+@@ -1,12 +1,12 @@
+ SHELL=/bin/sh
+-PREFIX=/usr/local
+-MANDIR=${PREFIX}/man
++PREFIX=/usr
+ BINDIR=${PREFIX}/bin
+ SHAREDIR=${PREFIX}/share
++MANDIR=${SHAREDIR}/man
+ #
+ # Be sure to modify $moviedir in blinkserver.pl if you modify it here!
+ #
+-BLINKENPERLSHAREDIR=${SHAREDIR}/blinkenperl
++BLINKENPERLSHAREDIR=${SHAREDIR}/blinkperl
+ MOVIEDIR=${BLINKENPERLSHAREDIR}/movies
+
+ # Enable "make install DESTDIR=some-path" to make it easier
diff --git a/net-misc/blinkperl/files/blinkperl-20030301-non-local.patch b/net-misc/blinkperl/files/blinkperl-20030301-non-local.patch
new file mode 100644
index 000000000000..3394918ebb47
--- /dev/null
+++ b/net-misc/blinkperl/files/blinkperl-20030301-non-local.patch
@@ -0,0 +1,13 @@
+Do not install in locale/share and be consistent about the package name.
+
+--- blinkperl/blinkserver.pl.orig 2003-02-06 19:38:00.000000000 +0100
++++ blinkperl/blinkserver.pl 2008-11-27 21:14:24.000000000 +0100
+@@ -21,7 +21,7 @@
+
+ # be sure to modify ${MOVIEDIR} in the Makefile
+ # (if you want to use "make install"), if you modify it here!
+-my $moviedir = "/usr/local/share/blinkenperl/movies" ; # where to find the movies
++my $moviedir = "/usr/share/blinkperl/movies" ; # where to find the movies
+ my $blmext = "blm" ; # extensions of blm files in the movie directory
+
+
diff --git a/net-misc/blinkperl/files/blinkperl.confd b/net-misc/blinkperl/files/blinkperl.confd
new file mode 100644
index 000000000000..3eab7db5a977
--- /dev/null
+++ b/net-misc/blinkperl/files/blinkperl.confd
@@ -0,0 +1,3 @@
+# config what port to listen for telnet connections on
+BLINKPORT="10001"
+
diff --git a/net-misc/blinkperl/files/blinkperl.rc b/net-misc/blinkperl/files/blinkperl.rc
new file mode 100644
index 000000000000..b5b07bda1c1e
--- /dev/null
+++ b/net-misc/blinkperl/files/blinkperl.rc
@@ -0,0 +1,19 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting blinkserver"
+ start-stop-daemon -o --background --quiet --start --exec /usr/bin/blinkserver.pl --pidfile /var/run/blinkserver.pid -- --port=${BLINKPORT}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping blinkserver"
+ start-stop-daemon -o --quiet --stop --name blinkserver.pl
+ eend $?
+}
diff --git a/net-misc/blinkperl/metadata.xml b/net-misc/blinkperl/metadata.xml
new file mode 100644
index 000000000000..2f6c6408bf0b
--- /dev/null
+++ b/net-misc/blinkperl/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">blinkserv</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/bopm/Manifest b/net-misc/bopm/Manifest
new file mode 100644
index 000000000000..cca38bc764fa
--- /dev/null
+++ b/net-misc/bopm/Manifest
@@ -0,0 +1 @@
+DIST bopm-3.1.3.tar.gz 819273 SHA256 6062e80e57785b7f992f71c1d1b4c99c12ea0f20bd7c4d2c0fe2c1f57fdcbf59
diff --git a/net-misc/bopm/bopm-3.1.3.ebuild b/net-misc/bopm/bopm-3.1.3.ebuild
new file mode 100644
index 000000000000..fcb8b0c3de95
--- /dev/null
+++ b/net-misc/bopm/bopm-3.1.3.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils user
+
+DESCRIPTION="Blitzed Open Proxy Monitor"
+HOMEPAGE="http://www.blitzed.org/bopm/"
+SRC_URI="http://static.blitzed.org/www.blitzed.org/${PN}/files/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ sys-apps/sed"
+
+src_compile() {
+ econf \
+ --sysconfdir=/etc \
+ --datadir=/usr/share/doc/${PF} \
+ --localstatedir=/var/log/bopm || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install () {
+ sed -i \
+ -e 's!/some/path/bopm.pid!/var/run/bopm/bopm.pid!' \
+ -e 's!/some/path/scan.log!/var/log/bopm/scan.log!' bopm.conf.sample
+
+ make \
+ DESTDIR="${D}" \
+ sysconfdir="${D}"/etc \
+ datadir=/usr/share/doc/${PF} \
+ localstatedir="${D}"/var/log/bopm \
+ install || die "install failed"
+
+ fperms 600 /etc/bopm.conf
+
+ # Remove libopm related files, because bopm links statically to it
+ # If anybody wants libopm, please install net-libs/libopm
+ rm -r "${D}"/usr/lib "${D}"/usr/include
+
+ newinitd "${FILESDIR}"/bopm.init.d bopm
+ newconfd "${FILESDIR}"/bopm.conf.d bopm
+
+ dodoc ChangeLog INSTALL README TODO
+}
+
+pkg_postinst() {
+ enewuser bopm
+
+ install -d -m 0700 -o bopm -g root "${ROOT}"/var/log/bopm
+ install -d -m 0700 -o bopm -g root "${ROOT}"/var/run/bopm
+ chown bopm "${ROOT}"/etc/bopm.conf
+}
diff --git a/net-misc/bopm/files/bopm.conf.d b/net-misc/bopm/files/bopm.conf.d
new file mode 100644
index 000000000000..d6fd35a30542
--- /dev/null
+++ b/net-misc/bopm/files/bopm.conf.d
@@ -0,0 +1,7 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Config file for /etc/init.d/bopm
+
+BOPM_UID=bopm
diff --git a/net-misc/bopm/files/bopm.init.d b/net-misc/bopm/files/bopm.init.d
new file mode 100644
index 000000000000..2bf7c5dcd1d6
--- /dev/null
+++ b/net-misc/bopm/files/bopm.init.d
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+opts="depend start stop"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting Blitzed Open Proxy Monitor"
+ start-stop-daemon --start --quiet --chuid ${BOPM_UID} --exec /usr/bin/bopm
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Blitzed Open Proxy Monitor"
+ kill $(</var/run/bopm/bopm.pid)
+ eend $?
+ rm -f /var/run/bopm/bopm.pid
+}
diff --git a/net-misc/bopm/metadata.xml b/net-misc/bopm/metadata.xml
new file mode 100644
index 000000000000..6ef15e900f17
--- /dev/null
+++ b/net-misc/bopm/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-irc</herd>
+</pkgmetadata>
diff --git a/net-misc/bridge-utils/Manifest b/net-misc/bridge-utils/Manifest
new file mode 100644
index 000000000000..7ee4c1cb58dc
--- /dev/null
+++ b/net-misc/bridge-utils/Manifest
@@ -0,0 +1 @@
+DIST bridge-utils-1.5.tar.gz 33243 SHA256 42f9e5fb8f6c52e63a98a43b81bd281c227c529f194913e1c51ec48a393b6688 SHA512 4e525fbd3defb509664ef3b728d9e5edfb92beaebdb5d7733d8203fb38cb3f4bb54d02dc1e28813889a2ee19c78b9b47da6d99c8032481a7fd7f104658dea7c3 WHIRLPOOL f11eb95ae9b562cb301bb1f657d87878f0a0729a2129b90fa5957747f078f3afe2ebdadd1eb7ea4a59e544acc8194cf1744126db9ba3f3704210bc18ee3480fa
diff --git a/net-misc/bridge-utils/bridge-utils-1.5.ebuild b/net-misc/bridge-utils/bridge-utils-1.5.ebuild
new file mode 100644
index 000000000000..dda72365896b
--- /dev/null
+++ b/net-misc/bridge-utils/bridge-utils-1.5.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 linux-info toolchain-funcs
+
+DESCRIPTION="Tools for configuring the Linux kernel 802.1d Ethernet Bridge"
+HOMEPAGE="http://bridge.sourceforge.net/"
+SRC_URI="mirror://sourceforge/bridge/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 sparc x86"
+IUSE="selinux"
+
+DEPEND="virtual/os-headers"
+RDEPEND="selinux? ( sec-policy/selinux-brctl )"
+
+CONFIG_CHECK="~BRIDGE"
+WARNING_BRIDGE="CONFIG_BRIDGE is required to get bridge devices in the kernel"
+
+get_headers() {
+ CTARGET=${CTARGET:-${CHOST}}
+ dir=/usr/include
+ tc-is-cross-compiler && dir=/usr/${CTARGET}/usr/include
+ echo "${dir}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-linux-3.8.patch
+ eautoreconf
+}
+
+src_configure() {
+ # use santitized headers and not headers from /usr/src
+ econf \
+ --prefix=/ \
+ --libdir=/usr/$(get_libdir) \
+ --includedir=/usr/include \
+ --with-linux-headers="$(get_headers)"
+}
+
+src_install () {
+ emake install DESTDIR="${D}"
+ dodoc AUTHORS ChangeLog README THANKS TODO \
+ doc/{FAQ,FIREWALL,HOWTO,PROJECTS,RPM-GPG-KEY,SMPNOTES,WISHLIST}
+ [ -f "${D}"/sbin/brctl ] || die "upstream makefile failed to install binary"
+}
diff --git a/net-misc/bridge-utils/files/bridge-utils-1.5-linux-3.8.patch b/net-misc/bridge-utils/files/bridge-utils-1.5-linux-3.8.patch
new file mode 100644
index 000000000000..49ebb4e9da28
--- /dev/null
+++ b/net-misc/bridge-utils/files/bridge-utils-1.5-linux-3.8.patch
@@ -0,0 +1,18 @@
+unfortunately if_bridge.h from Linux 3.8+ is not self-contained and the struct
+for ip6 is missing
+
+http://bugs.gentoo.org/460262
+
+this is not unheard of with Linux headers, for example, <linux/cdrom.h> needs
+<limits.h> to get INT_MAX
+
+--- libbridge/libbridge.h
++++ libbridge/libbridge.h
+@@ -20,6 +20,7 @@
+ #define _LIBBRIDGE_H
+
+ #include <sys/socket.h>
++#include <netinet/ip6.h>
+ #include <linux/if.h>
+ #include <linux/if_bridge.h>
+
diff --git a/net-misc/bridge-utils/metadata.xml b/net-misc/bridge-utils/metadata.xml
new file mode 100644
index 000000000000..61bd84d24ccf
--- /dev/null
+++ b/net-misc/bridge-utils/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>base-system</herd>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">bridge</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/bsdwhois/Manifest b/net-misc/bsdwhois/Manifest
new file mode 100644
index 000000000000..59c07cb0e35d
--- /dev/null
+++ b/net-misc/bsdwhois/Manifest
@@ -0,0 +1 @@
+DIST bsdwhois-1.43.2.1.tar.gz 85895 SHA256 b0db304f3becbecac7701399210e6c1badb5646b5c9e9683937656ccbc9b5655 SHA512 c1b3f93b8d7f838478d59cb70a7326fba84f87e1fcb4af9e7cc64ac1928adf96b0e6facbd6dfabaa7d146f0d1ea1abe1330771be4c7a6f3590d3c9e86a3b53dc WHIRLPOOL 5c7092a5275d4ccbb3098f2419db2867e83f3e15c0ee43d90e547547ce94de2dbf58036c72093d1c2b8232f9c92cfcdcb3196902c1c49fd6876bcddefe3521c8
diff --git a/net-misc/bsdwhois/bsdwhois-1.43.2.1.ebuild b/net-misc/bsdwhois/bsdwhois-1.43.2.1.ebuild
new file mode 100644
index 000000000000..58dfac3a8b8a
--- /dev/null
+++ b/net-misc/bsdwhois/bsdwhois-1.43.2.1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="FreeBSD Whois Client"
+HOMEPAGE="http://www.freebsd.org/"
+SRC_URI="http://utenti.gufi.org/~drizzt/codes/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+IUSE="userland_BSD"
+
+src_install() {
+ default
+
+ if ! use userland_BSD; then
+ mv "${ED}"/usr/share/man/man1/{whois,bsdwhois}.1
+ mv "${ED}"/usr/bin/{whois,bsdwhois}
+ fi
+}
diff --git a/net-misc/bsdwhois/metadata.xml b/net-misc/bsdwhois/metadata.xml
new file mode 100644
index 000000000000..ecedda4aa2cc
--- /dev/null
+++ b/net-misc/bsdwhois/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>bsd</herd>
+</pkgmetadata>
diff --git a/net-misc/bti/Manifest b/net-misc/bti/Manifest
new file mode 100644
index 000000000000..eb52053b5f8a
--- /dev/null
+++ b/net-misc/bti/Manifest
@@ -0,0 +1 @@
+DIST bti-031.tar.bz2 89027 SHA256 1b2f509a818ec6b1a036daff9d56a9c7b2640741df3d0ec89376775890187cd5 SHA512 d930013eb45bdfbaa914444460f74448c8bb62f255b2db5c771736ba7c5bb71d0cf4651db76eba0f05fbd6c6a175c7bc8942d7657588bd27e18bf409bf02d9fd WHIRLPOOL 43cf7b10e01cc0f0c076faec79f9ce2f18fdd23350a72d1d081638f2d0c55f323e395fe088379455e6846b12df13a76fcbd4cc6f4bfc2835040e5c961734ed01
diff --git a/net-misc/bti/bti-031-r1.ebuild b/net-misc/bti/bti-031-r1.ebuild
new file mode 100644
index 000000000000..d6cf7562cc44
--- /dev/null
+++ b/net-misc/bti/bti-031-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit bash-completion-r1 eutils
+
+DESCRIPTION="A command line twitter/identi.ca client"
+HOMEPAGE="http://gregkh.github.com/bti/"
+SRC_URI="mirror://kernel/software/web/bti/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+RDEPEND="
+ net-misc/curl
+ dev-libs/libxml2
+ dev-libs/libpcre
+ net-libs/liboauth
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+# Readline is dynamically loaded, for whatever reason, and can use
+# libedit as an alternative...
+RDEPEND="${RDEPEND}
+ || ( sys-libs/readline dev-libs/libedit )"
+
+DOCS=( bti.example README RELEASE-NOTES )
+
+src_prepare() {
+ # Allow compilation on non-GNU systems, bug #384311
+ epatch "${FILESDIR}/${PN}-031-nonGNU.patch"
+}
+
+src_install() {
+ default
+ dobashcomp bti-bashcompletion
+}
diff --git a/net-misc/bti/files/bti-031-nonGNU.patch b/net-misc/bti/files/bti-031-nonGNU.patch
new file mode 100644
index 000000000000..14b10c1fb832
--- /dev/null
+++ b/net-misc/bti/files/bti-031-nonGNU.patch
@@ -0,0 +1,32 @@
+Avoid using strchrnul, it's a GNU addition. The code in question,
+actually doesn't really benefit from strchrnul's behaviour.
+
+--- config.c
++++ config.c
+@@ -351,20 +351,21 @@
+ * marker if it occurs at the beginning of the line, or after
+ * whitespace
+ */
+- hashmarker = strchrnul(line, '#');
++ hashmarker = strchr(line, '#');
+ if (line == hashmarker)
+ line[0] = '\0';
+ else {
+- while (hashmarker[0] != '\0') {
++ while (hashmarker != NULL) {
+ --hashmarker;
+- if (isblank(hashmarker[0]))
++ if (isblank(hashmarker[0])) {
+ hashmarker[0] = '\0';
+- else {
++ break;
++ } else {
+ /*
+ * false positive; '#' occured
+ * within a string
+ */
+- hashmarker = strchrnul(hashmarker+2, '#');
++ hashmarker = strchr(hashmarker+2, '#');
+ }
+ }
+ }
diff --git a/net-misc/bti/metadata.xml b/net-misc/bti/metadata.xml
new file mode 100644
index 000000000000..b14c9fbb1755
--- /dev/null
+++ b/net-misc/bti/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>gregkh@gentoo.org</email>
+ <name>Greg Kroah-Hartman</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/bwwhois/Manifest b/net-misc/bwwhois/Manifest
new file mode 100644
index 000000000000..15193b4d20d7
--- /dev/null
+++ b/net-misc/bwwhois/Manifest
@@ -0,0 +1 @@
+DIST whois-5.5.2.tgz 50008 SHA256 8ccc9107d8c0d348ddc250597ea0b5f4122076bcce5e8ef2bc32e87f77f5fc8d SHA512 ee6c1fa183fa009a6e47ec0c51815a215f29e24bd443683a2df8f02bca822cb91c5fb91148aaea37c5d9c993e2c7ad39d310c7cd9358ea6a7fa88ec2c8aaba16 WHIRLPOOL 737745a9309da3968d2f897a3fe878471624c1fb6386d7700699afb2b755f01f69e4ed09445f602203a48bcc4c3ea5c4cfbe79d64d051904e94b7ad245bf3774
diff --git a/net-misc/bwwhois/bwwhois-5.5.2-r2.ebuild b/net-misc/bwwhois/bwwhois-5.5.2-r2.ebuild
new file mode 100644
index 000000000000..90b6b18f9461
--- /dev/null
+++ b/net-misc/bwwhois/bwwhois-5.5.2-r2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+GENTOO_DEPEND_ON_PERL_SUBSLOT=yes
+inherit perl-app
+
+MY_P="${P/bw/}"
+
+DESCRIPTION="Perl-based whois client designed to work with the new Shared Registration System"
+SRC_URI="http://whois.bw.org/dist/${MY_P}.tgz"
+HOMEPAGE="http://whois.bw.org/"
+
+LICENSE="|| ( Artistic GPL-2 )"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND="dev-lang/perl"
+RDEPEND="${DEPEND}
+ virtual/perl-Getopt-Long"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ # bug #440390
+ sed -i -e '/^\.ru/s/ripn.ru/ripn.net/' tld.conf || die 'sed on tld.conf failed'
+}
+
+src_install() {
+ exeinto usr/bin
+ newexe whois bwwhois
+
+ newman whois.1 bwwhois.1
+
+ insinto /etc/whois
+ doins whois.conf tld.conf sd.conf
+
+ perl_set_version
+ insinto "${VENDOR_LIB}"
+ doins bwInclude.pm
+
+ dodoc HISTORY INSTALL README
+}
diff --git a/net-misc/bwwhois/metadata.xml b/net-misc/bwwhois/metadata.xml
new file mode 100644
index 000000000000..1b9fb5b7d4b0
--- /dev/null
+++ b/net-misc/bwwhois/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>zlogene@gentoo.org</email>
+ <name>Mikle Kolyada</name>
+ </maintainer>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/cadaver/Manifest b/net-misc/cadaver/Manifest
new file mode 100644
index 000000000000..c9b03cc69dc2
--- /dev/null
+++ b/net-misc/cadaver/Manifest
@@ -0,0 +1 @@
+DIST cadaver-0.23.3.tar.gz 831884 SHA256 fd4ce68a3230ba459a92bcb747fc6afa91e46d803c1d5ffe964b661793c13fca
diff --git a/net-misc/cadaver/cadaver-0.23.3.ebuild b/net-misc/cadaver/cadaver-0.23.3.ebuild
new file mode 100644
index 000000000000..def16c40a2b4
--- /dev/null
+++ b/net-misc/cadaver/cadaver-0.23.3.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit autotools eutils
+
+DESCRIPTION="Command-line WebDAV client"
+HOMEPAGE="http://www.webdav.org/cadaver"
+SRC_URI="http://www.webdav.org/cadaver/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ppc64 ~sparc x86"
+IUSE="nls"
+
+RDEPEND=">=net-libs/neon-0.27.0"
+DEPEND="${RDEPEND}
+ sys-devel/gettext"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-0.23.2-disable-nls.patch"
+
+ rm -fr lib/{expat,intl,neon}
+ sed \
+ -e "/NE_REQUIRE_VERSIONS/s/29/& 30/" \
+ -e "s:lib/neon/Makefile lib/intl/Makefile ::" \
+ -i configure.ac || die "sed configure.ac failed"
+ sed -e "s/^\(SUBDIRS.*=\).*/\1/" -i Makefile.in || die "sed Makefile.in failed"
+ cp /usr/share/gettext/po/Makefile.in.in po || die "cp failed"
+
+ AT_M4DIR="m4 m4/neon" eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ --with-libs=/usr
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc BUGS ChangeLog FAQ NEWS README THANKS TODO
+}
diff --git a/net-misc/cadaver/files/cadaver-0.23.2-disable-nls.patch b/net-misc/cadaver/files/cadaver-0.23.2-disable-nls.patch
new file mode 100644
index 000000000000..6610d479b30d
--- /dev/null
+++ b/net-misc/cadaver/files/cadaver-0.23.2-disable-nls.patch
@@ -0,0 +1,17 @@
+Fix building with --disable-nls.
+--- src/cadaver.c.~1~ 2007-08-22 14:17:27.000000000 +0200
++++ src/cadaver.c 2008-03-29 08:58:57.248793293 +0100
+@@ -838,11 +838,12 @@
+
+ progname = argv[0];
+
++#ifdef ENABLE_NLS
++
+ #ifdef HAVE_SETLOCALE
+ setlocale(LC_ALL, "");
+ #endif
+
+-#ifdef ENABLE_NLS
+ bindtextdomain(PACKAGE_NAME, LOCALEDIR);
+ textdomain(PACKAGE_NAME);
+ #endif /* ENABLE_NLS */
diff --git a/net-misc/cadaver/metadata.xml b/net-misc/cadaver/metadata.xml
new file mode 100644
index 000000000000..72e4e11f0b84
--- /dev/null
+++ b/net-misc/cadaver/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>proxy-maintainers</herd>
+ <maintainer>
+ <email>arfrever.fta@gmail.com</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/capi4hylafax/Manifest b/net-misc/capi4hylafax/Manifest
new file mode 100644
index 000000000000..eb5adcf141e1
--- /dev/null
+++ b/net-misc/capi4hylafax/Manifest
@@ -0,0 +1,3 @@
+DIST capi4hylafax_01.03.00.99.svn.300-3.diff.gz 155360 SHA256 dec167255e2307d12b5093e11ddbb6b1f96d0ac94985643579cfd6b534313ed2
+DIST capi4hylafax_01.03.00.99.svn.300-9.diff.gz 160179 SHA256 5c116fcefa6604a351c31507644c26fb43e0dc89e51f97ee748a52a5eebbc4af
+DIST capi4hylafax_01.03.00.99.svn.300.orig.tar.gz 533410 SHA256 8c5433fda85d5f178382c0a4fbc07cf22fc22c448146a4b7a090bc6a0b1789c2
diff --git a/net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.3-r1.ebuild b/net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.3-r1.ebuild
new file mode 100644
index 000000000000..319c72afd147
--- /dev/null
+++ b/net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.3-r1.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils versionator autotools
+
+FAX_SPOOL_DIR="/var/spool/fax"
+
+MY_PV1="$(get_version_component_range 1-4)"
+MY_PV2="$(get_version_component_range 5)"
+MY_PV3="$(get_version_component_range 6)"
+MY_P="${PN}_${MY_PV1}.svn.${MY_PV2}"
+
+DESCRIPTION="capi4hylafax adds a faxcapi modem to the hylafax enviroment"
+SRC_URI="mirror://debian/pool/main/c/capi4hylafax/${MY_P}.orig.tar.gz
+ mirror://debian/pool/main/c/capi4hylafax/${MY_P}-${MY_PV3}.diff.gz"
+HOMEPAGE="http://packages.qa.debian.org/c/capi4hylafax.html"
+
+S="${WORKDIR}/${PN}-svn"
+
+IUSE="unicode"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc x86"
+
+DEPEND="net-dialup/capi4k-utils
+ media-libs/tiff
+ virtual/jpeg
+ sys-libs/zlib"
+
+RDEPEND="${DEPEND}
+ dev-util/dialog"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # apply debian patches + update configs
+ epatch "${WORKDIR}/${MY_P}-${MY_PV3}.diff"
+
+ # apply bugfix patch (see bug #145982)
+ epatch "${FILESDIR}/${P}-recvdev.diff"
+
+ eautoreconf
+
+ # fix location of fax spool
+ for i in config.faxCAPI Readme_src src/defaults.h.in debian/*.1; do
+ [ -f "${i}" ] && sed -i -e "s:/var/spool/hylafax:${FAX_SPOOL_DIR}:g" "${i}"
+ done
+
+ # fix location of fax config
+ sed -i -e "s:/etc/hylafax:${FAX_SPOOL_DIR}/etc:g" setupconffile
+
+ # fix name and location of logfile
+ sed -i -e "s:/var/spool/fax/log/capi4hylafax:/var/log/${PN}.log:" config.faxCAPI
+ sed -i -e "s:/tmp/capifax.log:/var/log/${PN}.log:" src/defaults.h.in config.faxCAPI
+
+ # patch man pages
+ sed -i -e "s:/usr/share/doc/capi4hylafax/:/usr/share/doc/${PF}/html/:g" \
+ -e "s:c2send:c2faxsend:g" -e "s:c2recv:c2faxrecv:g" \
+ -e "s:CAPI4HYLAFAXCONFIG \"1\":C2FAXADDMODEM \"8\":g" \
+ -e "s:capi4hylafaxconfig:c2faxaddmodem:g" debian/*.1
+ cp -f debian/capi4hylafaxconfig.1 debian/c2faxaddmodem.8
+
+ # if specified, convert all relevant files from latin1 to UTF-8
+ if use unicode; then
+ for i in config.faxCAPI; do
+ einfo "Converting ${i} to UTF-8"
+ iconv -f latin1 -t utf8 -o "${i}~" "${i}" && mv -f "${i}~" "${i}" || rm -f "${i}~"
+ done
+ fi
+}
+
+src_compile() {
+ econf --with-hylafax-spooldir="${FAX_SPOOL_DIR}" || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ keepdir "${FAX_SPOOL_DIR}"/{etc,recvq,pollq,log,status}
+ fowners uucp:uucp "${FAX_SPOOL_DIR}" "${FAX_SPOOL_DIR}"/{etc,recvq,pollq,log,status}
+ fperms 0700 "${FAX_SPOOL_DIR}"
+
+ make DESTDIR="${D}" install || die "make install failed"
+
+ # install setup script
+ newsbin setupconffile c2faxaddmodem
+
+ # install sample config
+ insinto "${FAX_SPOOL_DIR}/etc"
+ newins config.faxCAPI config.faxCAPI.default
+
+ # install docs
+ dodoc AUTHORS ChangeLog Readme_src
+ newdoc debian/changelog ChangeLog.debian
+ dohtml README.html LIESMICH.html
+
+ # install man pages
+ doman debian/c2fax*.[18]
+
+ # install examples
+ insinto /usr/share/doc/${PF}/examples
+ doins sample_faxrcvd faxrcvd config.faxCAPI fritz_pic.tif GenerateFileMail.pl
+ newins sample_AVMC4_config.faxCAPI config.faxCAPI_AVMC4
+ newins debian/faxsend sample_faxsend
+
+ # finally install init-script + config
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+}
+
+pkg_postinst() {
+ einfo "To use capi4hylafax:"
+ einfo "Make sure that your isdn/capi devices are owned by"
+ einfo "the \"uucp\" user (see udev or devfsd config)."
+ einfo "Modify ${FAX_SPOOL_DIR}/etc/config.faxCAPI"
+ einfo "to suit your system."
+
+ if [ -f "${FAX_SPOOL_DIR}/etc/config.faxCAPI" ]; then
+ einfo
+ einfo "If you're upgrading from a previous version"
+ einfo "please check for new or changed options."
+ einfo "A sample default config is installed as:"
+ einfo "${FAX_SPOOL_DIR}/etc/config.faxCAPI.default"
+ else
+ # install default config
+ cp -f "${FAX_SPOOL_DIR}/etc/config.faxCAPI.default" \
+ "${FAX_SPOOL_DIR}/etc/config.faxCAPI"
+ fi
+
+ einfo
+ einfo "You should also check special options in:"
+ einfo "/etc/conf.d/${PN}"
+ einfo
+ einfo "If you want to use capi4hylafax together with"
+ einfo "hylafax, then please emerge net-misc/hylafax"
+ einfo
+ einfo "Then append the following line to your hylafax"
+ einfo "config file (${FAX_SPOOL_DIR}/etc/config):"
+ einfo "SendFaxCmd: /usr/bin/c2faxsend"
+}
diff --git a/net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.9.ebuild b/net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.9.ebuild
new file mode 100644
index 000000000000..760f04b39ef4
--- /dev/null
+++ b/net-misc/capi4hylafax/capi4hylafax-01.03.00.99.300.9.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils versionator autotools
+
+FAX_SPOOL_DIR="/var/spool/fax"
+
+MY_PV1="$(get_version_component_range 1-4)"
+MY_PV2="$(get_version_component_range 5)"
+MY_PV3="$(get_version_component_range 6)"
+MY_P="${PN}_${MY_PV1}.svn.${MY_PV2}"
+
+DESCRIPTION="capi4hylafax adds a faxcapi modem to the hylafax enviroment"
+SRC_URI="mirror://debian/pool/main/c/capi4hylafax/${MY_P}.orig.tar.gz
+ mirror://debian/pool/main/c/capi4hylafax/${MY_P}-${MY_PV3}.diff.gz"
+HOMEPAGE="http://packages.qa.debian.org/c/capi4hylafax.html"
+
+S="${WORKDIR}/${PN}-svn"
+
+IUSE=""
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND="net-dialup/capi4k-utils
+ app-shells/bash
+ media-libs/tiff
+ virtual/jpeg
+ sys-libs/zlib"
+
+RDEPEND="${DEPEND}
+ dev-util/dialog"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # apply debian patches + update configs
+ epatch "${WORKDIR}/${MY_P}-${MY_PV3}.diff"
+
+ # update autotools
+ eautoreconf
+
+ # fix location of fax spool
+ for i in config.faxCAPI Readme_src src/defaults.h.in debian/*.1; do
+ [ -f "${i}" ] && sed -i -e "s:/var/spool/hylafax:${FAX_SPOOL_DIR}:g" "${i}"
+ done
+
+ # fix location of fax config
+ sed -i -e "s:/etc/hylafax:${FAX_SPOOL_DIR}/etc:g" setupconffile
+
+ # fix name and location of logfile
+ sed -i -e "s:/var/spool/fax/log/capi4hylafax:/var/log/${PN}.log:" config.faxCAPI
+ sed -i -e "s:/tmp/capifax.log:/var/log/${PN}.log:" src/defaults.h.in config.faxCAPI
+
+ # patch man pages
+ sed -i -e "s:/usr/share/doc/capi4hylafax/:/usr/share/doc/${PF}/html/:g" \
+ -e "s:c2send:c2faxsend:g" -e "s:c2recv:c2faxrecv:g" \
+ -e "s:CAPI4HYLAFAXCONFIG \"1\":C2FAXADDMODEM \"8\":g" \
+ -e "s:capi4hylafaxconfig:c2faxaddmodem:g" debian/*.1
+ cp -f debian/capi4hylafaxconfig.1 debian/c2faxaddmodem.8
+}
+
+src_compile() {
+ econf --with-hylafax-spooldir="${FAX_SPOOL_DIR}" || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ keepdir "${FAX_SPOOL_DIR}"/{etc,recvq,pollq,log,status}
+ fowners uucp:uucp "${FAX_SPOOL_DIR}" "${FAX_SPOOL_DIR}"/{etc,recvq,pollq,log,status}
+ fperms 0700 "${FAX_SPOOL_DIR}"
+
+ make DESTDIR="${D}" install || die "make install failed"
+
+ # install setup script
+ newsbin setupconffile c2faxaddmodem
+
+ # install sample config
+ insinto "${FAX_SPOOL_DIR}/etc"
+ newins config.faxCAPI config.faxCAPI.default
+
+ # install docs
+ dodoc AUTHORS ChangeLog Readme_src
+ newdoc debian/changelog ChangeLog.debian
+ dohtml README.html LIESMICH.html
+
+ # install man pages
+ doman debian/c2fax*.[18]
+
+ # install examples
+ insinto /usr/share/doc/${PF}/examples
+ doins sample_faxrcvd config.faxCAPI fritz_pic.tif GenerateFileMail.pl
+ newins sample_AVMC4_config.faxCAPI config.faxCAPI_AVMC4
+ newins debian/faxsend sample_faxsend
+
+ # finally install init-script + config
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+}
+
+pkg_postinst() {
+ elog "To use capi4hylafax:"
+ elog "Make sure that your isdn/capi devices are owned by"
+ elog "the \"uucp\" user (see udev or devfsd config)."
+ elog "Modify ${FAX_SPOOL_DIR}/etc/config.faxCAPI"
+ elog "to suit your system."
+
+ if [ -f "${FAX_SPOOL_DIR}/etc/config.faxCAPI" ]; then
+ elog
+ elog "If you're upgrading from a previous version"
+ elog "please check for new or changed options."
+ elog "A sample default config is installed as:"
+ elog "${FAX_SPOOL_DIR}/etc/config.faxCAPI.default"
+ else
+ # install default config
+ cp -f "${FAX_SPOOL_DIR}/etc/config.faxCAPI.default" \
+ "${FAX_SPOOL_DIR}/etc/config.faxCAPI"
+ fi
+
+ elog
+ elog "You should also check special options in:"
+ elog "/etc/conf.d/${PN}"
+ elog
+ elog "If you want to use capi4hylafax together with"
+ elog "hylafax, then please emerge net-misc/hylafax"
+ elog
+ elog "Then append the following line to your hylafax"
+ elog "config file (${FAX_SPOOL_DIR}/etc/config):"
+ elog "SendFaxCmd: /usr/bin/c2faxsend"
+}
diff --git a/net-misc/capi4hylafax/files/capi4hylafax-01.03.00.99.300.3-recvdev.diff b/net-misc/capi4hylafax/files/capi4hylafax-01.03.00.99.300.3-recvdev.diff
new file mode 100644
index 000000000000..ae56d740c929
--- /dev/null
+++ b/net-misc/capi4hylafax/files/capi4hylafax-01.03.00.99.300.3-recvdev.diff
@@ -0,0 +1,20 @@
+--- src/faxrecv/recvdev.cpp.orig 2006-08-15 11:13:33.000000000 +0200
++++ src/faxrecv/recvdev.cpp 2006-10-04 02:09:46.000000000 +0200
+@@ -114,7 +114,7 @@
+ CMultiString tmpDDIs;
+ CMultiString tmpMSNs;
+ CMultiString *pMSNs;
+- tSize FindPos;
++ tUInt FindPos;
+
+ ConfigAssignment_Item CntrlAssignments[] = {
+ { "Controller", ConfigAssignment_UInt, &tmpController },
+@@ -162,7 +162,7 @@
+ MSNlauf->RemoveChars ((tChar *)" \t_()[]{}\"'`TtPp,.:;");
+ if (MSNlauf->IsEmpty() == vFalse) {
+ FindPos = MSNlauf->FindChar ('-');
+- if (FindPos == MAXVAL_tSize) {
++ if (FindPos == MAXVAL_tUInt) {
+ dprint ("Add MSN-Value=(%s) ", MSNlauf->GetPointer());
+ switch (CIPMSNList.AddMSN (tmpController, MSNlauf)) {
+ case iErr_OutOfMemory:
diff --git a/net-misc/capi4hylafax/files/capi4hylafax.confd b/net-misc/capi4hylafax/files/capi4hylafax.confd
new file mode 100644
index 000000000000..40aa8cfe603d
--- /dev/null
+++ b/net-misc/capi4hylafax/files/capi4hylafax.confd
@@ -0,0 +1,19 @@
+# configuraton file for /etc/init.d/capi4hylafax
+
+# Activate Logging (Filename have to be specified in the config file).
+#ACTIVATE_LOGGING="yes"
+
+# Specify the output format. Allowed types are:
+# HYLAFAX (default), TIFF, SFF, G3
+#OUTPUT_FORMAT="HYLAFAX"
+
+# Virtual device name only needed for Hylafax.
+#VIRTUAL_DEVICE="faxCAPI"
+
+# Name and path of the config file
+#CONFIG_FILE="/var/spool/fax/etc/config.faxCAPI"
+
+# Directory where received faxes are to be stored.
+# Do not set it in Hylafax mode (see OUTPUT_FORMAT)!
+#RECEIVE_DIR="/var/spool/fax/recvq"
+
diff --git a/net-misc/capi4hylafax/files/capi4hylafax.initd b/net-misc/capi4hylafax/files/capi4hylafax.initd
new file mode 100644
index 000000000000..bfba068a0285
--- /dev/null
+++ b/net-misc/capi4hylafax/files/capi4hylafax.initd
@@ -0,0 +1,64 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need capi
+}
+
+checkconfig() {
+ local DEFAULT_OUTPUT_FORMAT="HYLAFAX"
+ local DEFAULT_VIRTUAL_DEVICE="faxCAPI"
+ local DEFAULT_RECEIVE_DIR="/var/spool/fax"
+ local DEFAULT_CONFIG_FILE="/var/spool/fax/etc/config.faxCAPI"
+
+ [ -n "${CONFIG_FILE}" ] || CONFIG_FILE="${DEFAULT_CONFIG_FILE}"
+ [ -n "${OUTPUT_FORMAT}" ] || OUTPUT_FORMAT="${DEFAULT_OUTPUT_FORMAT}"
+ [ -n "${VIRTUAL_DEVICE}" ] || VIRTUAL_DEVICE="${DEFAULT_VIRTUAL_DEVICE}"
+ [ "${OUTPUT_FORMAT}" = "HYLAFAX" ] || DEFAULT_RECEIVE_DIR="/var/spool/fax/recvq"
+ [ -n "${RECEIVE_DIR}" ] || RECEIVE_DIR="${DEFAULT_RECEIVE_DIR}"
+
+ if [ ! -f "${CONFIG_FILE}" ]; then
+ eerror "You're missing ${CONFIG_FILE}"
+ return 1
+ fi
+
+ OPTIONS=""
+ PIDFILE="/var/run/c2faxrecv.pid"
+
+ [ "${ACTIVATE_LOGGING}" = "yes" ] && OPTIONS="${OPTIONS} -L"
+
+ [ "${OUTPUT_FORMAT}" = "${DEFAULT_OUTPUT_FORMAT}" ] || \
+ OPTIONS="${OPTIONS} -f ${OUTPUT_FORMAT}"
+
+ [ "${CONFIG_FILE}" = "${DEFAULT_CONFIG_FILE}" ] || \
+ OPTIONS="${OPTIONS} -C ${CONFIG_FILE}"
+
+ [ "${OUTPUT_FORMAT}" = "HYLAFAX" -a "${RECEIVE_DIR}" = "${DEFAULT_RECEIVE_DIR}" ] || \
+ OPTIONS="${OPTIONS} -q ${RECEIVE_DIR}"
+
+ if [ "${VIRTUAL_DEVICE}" != "${DEFAULT_VIRTUAL_DEVICE}" ]; then
+ PIDFILE="/var/run/c2faxrecv.${VIRTUAL_DEVICE}.pid"
+ OPTIONS="${OPTIONS} ${VIRTUAL_DEVICE}"
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting CAPI4HylaFAX for ${VIRTUAL_DEVICE}"
+ start-stop-daemon -b -m --quiet --start --pidfile ${PIDFILE} \
+ --exec /usr/bin/c2faxrecv -- ${OPTIONS}
+ eend $?
+}
+
+stop() {
+ checkconfig || return 1
+
+ ebegin "Stopping CAPI4HylaFAX for ${VIRTUAL_DEVICE}"
+ start-stop-daemon >/dev/null --quiet --stop --pidfile ${PIDFILE} --retry 10 && \
+ /bin/rm -f ${PIDFILE}
+ eend $?
+}
+
diff --git a/net-misc/capi4hylafax/metadata.xml b/net-misc/capi4hylafax/metadata.xml
new file mode 100644
index 000000000000..ed4bdf3ce27c
--- /dev/null
+++ b/net-misc/capi4hylafax/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ capi4hylafax adds a faxcapi modem to the hylafax enviroment. So you can
+ send and receive FAX documents with CAPI 2.0 fax controllers via a
+ hylafax server.
+ </longdescription>
+ <longdescription lang="ja">
+ capi4hylafax は hylafax 環境に faxcopi
+ モデムを加えます。つまり hylafax
+ サーバに対して CAPI 2.0 fax コントローラ経由で FAX
+ ドキュメントを送信したり
+ 受信したりできるようになります。
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/capiisdnmon/Manifest b/net-misc/capiisdnmon/Manifest
new file mode 100644
index 000000000000..862da9a131c8
--- /dev/null
+++ b/net-misc/capiisdnmon/Manifest
@@ -0,0 +1 @@
+DIST capiisdnmon-0.42.tar.gz 79945 SHA256 c5e5de33fa5d4c2392e603c4c3d376c94e41f916ced360754844bce4a14d04ec SHA512 61a87aff01835969bb842c603609c1e3a95c4ad62de36bb96c992217d806ea8a48babd47c3371b5ab288d8f710b677c283daf1130adbbfba37c4b088b9bbd217 WHIRLPOOL 4ad59dd72f1abbd0bac1974520be30e6a8c0cc322857131b4770985cc963be57a27568d7abd5dca123eb16627ea011f08ba7925721044fa6e00bc168b69e0c6c
diff --git a/net-misc/capiisdnmon/capiisdnmon-0.42-r2.ebuild b/net-misc/capiisdnmon/capiisdnmon-0.42-r2.ebuild
new file mode 100644
index 000000000000..171ba6d2ee68
--- /dev/null
+++ b/net-misc/capiisdnmon/capiisdnmon-0.42-r2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="a CAPI 2.0 ISDN call monitor with LDAP name resolution"
+HOMEPAGE="http://capiisdnmon.sourceforge.net/"
+SRC_URI="mirror://sourceforge/capiisdnmon/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+RDEPEND="net-dialup/capi4k-utils
+ net-nds/openldap
+ x11-libs/gtk+:2
+ x11-libs/libX11
+ x11-libs/xosd
+"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-gcc44.patch" \
+ "${FILESDIR}/${P}-capiv3.patch"
+
+ append-cppflags -DLDAP_DEPRECATED
+
+ sed -i -e 's/capiIsdnMon:://' capiisdnmon.h || die
+
+ # Fix linking, bugs #370101 and #540672
+ append-libs -lX11 -llber
+ append-ldflags -pthread
+
+ epatch_user
+}
+
+src_install() {
+ default
+
+ newicon icon1.xpm capiisdnmon.xpm
+ make_desktop_entry capiIsdnMon "CAPI ISDN Monitor" capiisdnmon
+}
diff --git a/net-misc/capiisdnmon/files/capiisdnmon-0.42-capiv3.patch b/net-misc/capiisdnmon/files/capiisdnmon-0.42-capiv3.patch
new file mode 100644
index 000000000000..e7d22b254ff5
--- /dev/null
+++ b/net-misc/capiisdnmon/files/capiisdnmon-0.42-capiv3.patch
@@ -0,0 +1,11 @@
+--- capiinfo.cpp.orig 2005-08-06 14:13:17.763338743 +0200
++++ capiinfo.cpp 2005-08-06 14:16:33.362368161 +0200
+@@ -100,7 +100,7 @@
+ std::cout << "incomming call from :" << cmsg.CallingPartyNumber << std::endl;
+ #endif
+ std::string callingPartyNumber((char *) cmsg.CallingPartyNumber);
+- CONNECT_RESP(&cmsg, m_wApplId, m_wIntNr++, cmsg.adr.adrController, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0);
++ CONNECT_RESP(&cmsg, m_wApplId, m_wIntNr++, cmsg.adr.adrController, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0);
+ if (CAPI_PUT_CMSG(&cmsg) != CapiNoError)
+ throw capiError("CONNECT_RESP failed...");
+ //cut header from number (2 chars) if there is a number - leading 0 ist missing
diff --git a/net-misc/capiisdnmon/files/capiisdnmon-0.42-gcc44.patch b/net-misc/capiisdnmon/files/capiisdnmon-0.42-gcc44.patch
new file mode 100644
index 000000000000..e16dceec8905
--- /dev/null
+++ b/net-misc/capiisdnmon/files/capiisdnmon-0.42-gcc44.patch
@@ -0,0 +1,23 @@
+diff -ur capiisdnmon-0.42.orig/capiinfo.cpp capiisdnmon-0.42/capiinfo.cpp
+--- capiisdnmon-0.42.orig/capiinfo.cpp 2005-01-31 01:55:40.000000000 +0200
++++ capiisdnmon-0.42/capiinfo.cpp 2009-08-10 13:45:13.000000000 +0300
+@@ -10,6 +10,7 @@
+ static const char capiinfo_cpp[] = "$Id$";
+
+ #include "capiinfo.h"
++#include <stdio.h>
+ #include <iostream>
+ /**
+ * Class destructor.
+diff -ur capiisdnmon-0.42.orig/ldapaddressbook.cpp capiisdnmon-0.42/ldapaddressbook.cpp
+--- capiisdnmon-0.42.orig/ldapaddressbook.cpp 2005-01-30 18:28:59.000000000 +0200
++++ capiisdnmon-0.42/ldapaddressbook.cpp 2009-08-10 13:43:23.000000000 +0300
+@@ -1,6 +1,8 @@
+ #include "ldapaddressbook.h"
+ #include <iostream>
+
++#include <sys/time.h>
++
+ /**
+ * Class constructor.
+ * initialize ldap stuff:
diff --git a/net-misc/capiisdnmon/metadata.xml b/net-misc/capiisdnmon/metadata.xml
new file mode 100644
index 000000000000..5313bf560f2e
--- /dev/null
+++ b/net-misc/capiisdnmon/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-dialup</herd>
+ <longdescription>A CAPI 2.0 ISDN call monitor with LDAP name resolution</longdescription>
+ <longdescription lang="ja">CAPI 2.0 ISDN は LDAP の名前解決の様子を表示します。</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">capiisdnmon</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/cbqinit/Manifest b/net-misc/cbqinit/Manifest
new file mode 100644
index 000000000000..fb3c1f8b3202
--- /dev/null
+++ b/net-misc/cbqinit/Manifest
@@ -0,0 +1 @@
+DIST cbqinit-0.7.3 33438 SHA256 e7f9016be2efb340de7ce82d775ea3c863f1163b934d16438a6517689d1dc022 SHA512 ab1f66ebce4653f53d85314f47dc4d5e2f28c081f7c0385138c33cbc78e588d7190eedcf8354b744cfae8b34d536d610a944d492c9b49361109978016fa167a1 WHIRLPOOL 5a2b76d135b2ff67b9157bcd7af5da09385617308a9e6cdf22e729a0c3a38a0478f0b66f74e31e2f6da2af8cdfc36095ce2cb3ce7644d168ff69cc95512c652c
diff --git a/net-misc/cbqinit/cbqinit-0.7.3-r1.ebuild b/net-misc/cbqinit/cbqinit-0.7.3-r1.ebuild
new file mode 100644
index 000000000000..a76d03a67850
--- /dev/null
+++ b/net-misc/cbqinit/cbqinit-0.7.3-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Sets up class-based queue traffic control (QoS) with iproute2"
+HOMEPAGE="http://www.sourceforge.net/projects/cbqinit"
+SRC_URI="mirror://sourceforge/cbqinit/cbq.init-v${PV} -> ${P}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ~mips ppc sparc x86"
+IUSE=""
+
+RDEPEND="sys-apps/iproute2"
+DEPEND=""
+
+S=${WORKDIR}
+
+src_unpack() {
+ cp "${DISTDIR}"/${P} "${S}"/cbqinit || die
+ grep '^#' cbqinit > README
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_install() {
+ dosbin cbqinit
+ newinitd "${FILESDIR}"/rc_cbqinit-r1 cbqinit
+ dodoc "${FILESDIR}"/cbq-1280.My_first_shaper.sample README
+}
diff --git a/net-misc/cbqinit/files/cbq-1280.My_first_shaper.sample b/net-misc/cbqinit/files/cbq-1280.My_first_shaper.sample
new file mode 100644
index 000000000000..3b3c1a01804b
--- /dev/null
+++ b/net-misc/cbqinit/files/cbq-1280.My_first_shaper.sample
@@ -0,0 +1,5 @@
+DEVICE=eth0,10Mbit,1Mbit
+RATE=128Kbit
+WEIGHT=10Kbit
+PRIO=5
+RULE=192.128.1.0/24
diff --git a/net-misc/cbqinit/files/cbqinit-0.7.3-gentoo.patch b/net-misc/cbqinit/files/cbqinit-0.7.3-gentoo.patch
new file mode 100644
index 000000000000..edd78da2451e
--- /dev/null
+++ b/net-misc/cbqinit/files/cbqinit-0.7.3-gentoo.patch
@@ -0,0 +1,53 @@
+Use Gentoo friendly config paths and incorporate
+cbq-0.7.1-avpkt-enhancement.patch from Fedora
+
+--- cbqinit
++++ cbqinit
+@@ -484,8 +484,8 @@
+ PRIO_REALM_DEFAULT=${PRIO_REALM:-300}
+
+ ### Default CBQ_PATH & CBQ_CACHE settings
+-CBQ_PATH=${CBQ_PATH:-/etc/sysconfig/cbq}
+-CBQ_CACHE=${CBQ_CACHE:-/var/cache/cbq.init}
++CBQ_PATH=${CBQ_PATH:-/etc/cbqinit}
++CBQ_CACHE=${CBQ_CACHE:-/var/cache/cbqinit}
+
+ ### Uncomment to enable logfile for debugging
+ #CBQ_DEBUG="/var/run/cbq-$1"
+@@ -501,6 +501,9 @@
+ CBQ_WORDS="$CBQ_WORDS|PRIO_MARK|PRIO_RULE|PRIO_REALM|BUFFER"
+ CBQ_WORDS="$CBQ_WORDS|LIMIT|PEAK|MTU|QUANTUM|PERTURB"
+
++### Source AVPKT if it exists
++[ -r "${CBQ_PATH}/avpkt" ] && . "${CBQ_PATH}/avpkt"
++AVPKT=${AVPKT:-1000}
+
+ #############################################################################
+ ############################# SUPPORT FUNCTIONS #############################
+@@ -749,7 +752,7 @@
+
+ ### Setup root qdisc + class for device
+ tc qdisc add dev $dev root handle 1 cbq \
+- bandwidth $DEVBWDT avpkt 1000 cell 8
++ bandwidth $DEVBWDT avpkt $AVPKT cell 8
+
+ ### Set weight of the root class if set
+ [ -n "$DEVWGHT" ] &&
+@@ -766,7 +769,7 @@
+ ### Create the class
+ tc class add dev $DEVICE parent 1:$PARENT classid 1:$CLASS cbq \
+ bandwidth $BANDWIDTH rate $RATE weight $WEIGHT prio $PRIO \
+- allot 1514 cell 8 maxburst 20 avpkt 1000 $BOUNDED $ISOLATED ||
++ allot 1514 cell 8 maxburst 20 avpkt $AVPKT $BOUNDED $ISOLATED ||
+ cbq_fail_off "failed to add class $CLASS with parent $PARENT on $DEVICE!"
+
+ ### Create leaf qdisc if set
+@@ -940,7 +943,7 @@
+ ### Replace CBQ class
+ tc class replace dev $DEVICE classid 1:$CLASS cbq \
+ bandwidth $BANDWIDTH rate $NEW_RATE weight $NEW_WGHT prio $PRIO \
+- allot 1514 cell 8 maxburst 20 avpkt 1000 $BOUNDED $ISOLATED
++ allot 1514 cell 8 maxburst 20 avpkt $AVPKT $BOUNDED $ISOLATED
+
+ ### Replace leaf qdisc (if any)
+ if [ "$LEAF" = "tbf" ]; then
diff --git a/net-misc/cbqinit/files/rc_cbqinit b/net-misc/cbqinit/files/rc_cbqinit
new file mode 100644
index 000000000000..e4e7351d2fba
--- /dev/null
+++ b/net-misc/cbqinit/files/rc_cbqinit
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting cbqinit"
+ /usr/sbin/cbqinit start
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping cbqinit"
+ /usr/sbin/cbqinit stop
+ eend $?
+}
diff --git a/net-misc/cbqinit/files/rc_cbqinit-r1 b/net-misc/cbqinit/files/rc_cbqinit-r1
new file mode 100644
index 000000000000..b6ffad898e87
--- /dev/null
+++ b/net-misc/cbqinit/files/rc_cbqinit-r1
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -d /etc/cbqinit ] ; then
+ eerror "You need to create some config files in /etc/cbqinit first"
+ eerror "Please read the README file"
+ return 1
+ fi
+
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting cbqinit"
+ /usr/sbin/cbqinit start
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping cbqinit"
+ /usr/sbin/cbqinit stop
+ eend
+}
diff --git a/net-misc/cbqinit/metadata.xml b/net-misc/cbqinit/metadata.xml
new file mode 100644
index 000000000000..779353881a83
--- /dev/null
+++ b/net-misc/cbqinit/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">cbqinit</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/cbugzilla/Manifest b/net-misc/cbugzilla/Manifest
new file mode 100644
index 000000000000..44c22db585fd
--- /dev/null
+++ b/net-misc/cbugzilla/Manifest
@@ -0,0 +1 @@
+DIST cbugzilla-0.2.1.tar.xz 240824 SHA256 b0da07e40cabf38915a9ad61521c6dc73b3eae8707c199c58b67295d04c8e5ad SHA512 4a5671bfb222d17841082d123e68250526f6504aee3ba816b454b5d37174391eb464a7e3eaa9fdcfbbb5619b443b4af28ae520dc4bfd49faab1e523d59e2392f WHIRLPOOL beec75039c81e88cc6ceecbc4a185b35d1c4d1c37b37faa2a3f58884045a7f8969370ec1739c9e2678c1ea2fbe5e069f55f022f406999c4347cafebca8be8746
diff --git a/net-misc/cbugzilla/cbugzilla-0.2.1.ebuild b/net-misc/cbugzilla/cbugzilla-0.2.1.ebuild
new file mode 100644
index 000000000000..f6f8e9911684
--- /dev/null
+++ b/net-misc/cbugzilla/cbugzilla-0.2.1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="CLI and C api to get data from Bugzilla"
+HOMEPAGE="https://github.com/yaccz/cbugzilla"
+SRC_URI="http://dev.gentoo.org/~yac/distfiles/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="net-misc/curl
+ dev-libs/libxdg-basedir
+ app-text/htmltidy"
+RDEPEND="${DEPEND}"
+
+DOCS=( "README.rst" "ChangeLog.rst" )
+
+src_configure() {
+ econf --disable-werror
+}
diff --git a/net-misc/cbugzilla/metadata.xml b/net-misc/cbugzilla/metadata.xml
new file mode 100644
index 000000000000..79f0d33aa259
--- /dev/null
+++ b/net-misc/cbugzilla/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>yac@gentoo.org</email>
+ <name>Jan Matejka</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">yaccz/cbugzilla</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/cfengine/Manifest b/net-misc/cfengine/Manifest
new file mode 100644
index 000000000000..1f35884a626e
--- /dev/null
+++ b/net-misc/cfengine/Manifest
@@ -0,0 +1,5 @@
+DIST cfengine-2.2.10.tar.gz 2690333 SHA256 f34697cc52e1342c5ec4b45a4adf9fbffdfa05a68bdc7c53382f72d03e106783 SHA512 861af25f32248e115512790357cb4739b16bee9d19db33cc1b93ab2091d020991770970fc916796a5894c978ee6a5956100d2f714efb6e97e9e9a9ea88f64dea WHIRLPOOL 11ab19f4ce898a3409f88b27f429103d624ae4b0412c8129566462ec7182df33d82d6c65154b7cf8dbc60a60f1d5cea6eb8a1f6f9d709e6a0916491a40179b0c
+DIST cfengine-3.3.9.tar.gz 1256138 SHA256 54b44dd1c7a77a7ec4e4dea9542ac4d79cb689a7aaefda88ef227e571a462a61 SHA512 9d64667d001daa2db506abf97ecde43e6b6ac672d3ca6dba4c5e68b742b72f2c7cee65c2f5ab82a12cf0f9b385f48fb0d2bb9eae7fe2ff57b187c725238faf1f WHIRLPOOL d57204c63835c75a4bd4b23390a7013149920c856a19fd76f960d72bbc051c3ef2f220361afb225d41e51d5f0eb6cf817d6605d290c7452dcf112e7f54ee0528
+DIST cfengine-3.4.5.tar.gz 4671628 SHA256 542808b9f532e77d66dca19e83bdc1f995d7d0066b940a39bdd5db9a71680011 SHA512 3de95b511c03b4e4f83b13b605d4cc8185419fb7ee6b42e34faf300e5af2a755713b2f8f61305a1cd3dea02f89c09076b164469549cfc96fec09a813c7069f0f WHIRLPOOL 9e7516bfeffc1fae87eeb67f51207f056b0644a6d51e7b1da8d4f1eb27e581781af3f5f56bb98ed405909b2497eea3668df5bb78ece447dac528d7b18fdcd90f
+DIST cfengine-3.5.3.tar.gz 1542468 SHA256 0e2d13ba1d75f826bf15411912ce21075734796a35e8fb8ecf545d70d60f41e1 SHA512 20ead13d5290905dc51567887807a0c2c5d9d753cb48ffe2859041b75239698ad0f4bee1ad0eac4eee96122b3a5a475d516566c1571c4fcbc460be757583da18 WHIRLPOOL 2434abd1b6228e87fb848ea013dafca7d1e62dfeaa3ddafd534d663f69eb8b84221f452f8d288571352b641efbde0d1e65f6377d74f7cfa7678267f548036c7b
+DIST cfengine-3.6.2.tar.gz 1966966 SHA256 0e0195c1998fc261d4ef2e47e9cc50b273d204bc8b221d469bb83071933c4a09 SHA512 b1bf6010d4309980846524ca94bb39f624f4ed0df3af220df91f7210b4441456840dfeeee4d62d6d6260b417ea7cf959509ca96c1a26c6da67bda7b3c1e5dbbc WHIRLPOOL 989a7853b74848a69d4323f0e10ab05a7522132b6b52362b02d40e95a361ef85b74bef3e3263942376c3f6f4a29c3174967a3ca00fc5acef774537af14ce6352
diff --git a/net-misc/cfengine/cfengine-2.2.10-r4.ebuild b/net-misc/cfengine/cfengine-2.2.10-r4.ebuild
new file mode 100644
index 000000000000..25b79622f293
--- /dev/null
+++ b/net-misc/cfengine/cfengine-2.2.10-r4.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils multilib
+
+DESCRIPTION="An automated suite of programs for configuring and maintaining
+Unix-like computers"
+HOMEPAGE="http://www.cfengine.org/"
+SRC_URI="http://cfengine.com/source_code/download?file=${P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ppc ppc64 ~s390 sparc x86"
+IUSE="vim-syntax"
+
+RDEPEND=">=sys-libs/db-4
+ >=dev-libs/openssl-0.9.7
+ app-portage/portage-utils"
+DEPEND="${RDEPEND}
+ virtual/yacc
+ sys-devel/flex"
+PDEPEND="vim-syntax? ( app-vim/cfengine-syntax )"
+
+src_prepare() {
+ # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=520696
+ # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=511666
+ # http://bugs.gentoo.org/339808
+ epatch "${FILESDIR}/admit-noclass-520696.patch" \
+ "${FILESDIR}/511666-segfault.patch" \
+ "${FILESDIR}/${P}-snprintf_buffer_overflow.patch"
+
+ # 2048 causes crashes on some 32-bit hardened kernels, and the warning
+ # messages say to turn it back down.
+ use x86 && sed -ie "s:CF_IFREQ 2048:CF_IFREQ 1024:g" src/cf.defs.h
+}
+
+src_configure() {
+ # Enforce /var/cfengine for historical compatibility
+ econf \
+ --with-workdir=/var/cfengine \
+ --with-berkeleydb=/usr
+
+ # Fix Makefile to skip doc,inputs, & contrib install to wrong locations
+ sed -i -e 's/\(DIST_SUBDIRS.*\) contrib inputs doc/\1/' Makefile
+ sed -i -e 's/\(SUBDIRS.*\) contrib inputs/\1/' Makefile
+ sed -i -e 's/\(install-data-am.*\) install-docDATA/\1/' Makefile
+
+ # Fix man pages
+ sed -i -e 's/\/usr\/local/\/usr/' doc/*.8
+}
+
+src_install() {
+ newinitd "${FILESDIR}"/cfservd.rc6 cfservd || die
+ newinitd "${FILESDIR}"/cfenvd.rc6 cfenvd || die
+ newinitd "${FILESDIR}"/cfexecd.rc6 cfexecd || die
+
+ make DESTDIR="${D}" install || die
+
+ # Remove static library and libtool file as they are not needed
+ rm "${D}"/usr/$(get_libdir)/*.la
+ rm "${D}"/usr/$(get_libdir)/*.a
+
+ dodoc AUTHORS ChangeLog README TODO INSTALL
+
+ # Manually install doc and inputs
+ doman doc/*.8
+ docinto examples
+ doinfo doc/*.info*
+ dodoc inputs/*.example
+
+ # Create cfengine working directory
+ mkdir -p "${D}"/var/cfengine
+ fperms 700 /var/cfengine
+ keepdir /var/cfengine/bin
+ keepdir /var/cfengine/inputs
+ dodir /var/cfengine/modules
+}
+
+pkg_postinst() {
+ # Copy cfagent into the cfengine tree otherwise cfexecd won't
+ # find it. Most hosts cache their copy of the cfengine
+ # binaries here. This is the default search location for the
+ # binaries.
+
+ cp -f /usr/sbin/cf{agent,servd,execd} "${ROOT}"/var/cfengine/bin/
+
+ einfo
+ einfo "NOTE: The cfportage module has been deprecated in favor of the"
+ einfo " upstream 'packages' action."
+ einfo
+ einfo "Init scripts for cfservd, cfenvd, and cfexecd are now provided."
+ einfo
+ einfo "To run cfengine out of cron every half hour modify your crontab:"
+ einfo "0,30 * * * * /usr/sbin/cfexecd -F"
+ einfo
+
+ elog "You MUST generate the keys for cfengine by running:"
+ elog "emerge --config ${CATEGORY}/${PN}"
+}
+
+pkg_config() {
+ if [ "${ROOT}" == "/" ]; then
+ if [ ! -f "/var/cfengine/ppkeys/localhost.priv" ]; then
+ einfo "Generating keys for localhost."
+ /usr/sbin/cfkey
+ fi
+ else
+ die "cfengine cfkey does not support any value of ROOT other than /."
+ fi
+}
diff --git a/net-misc/cfengine/cfengine-3.3.9.ebuild b/net-misc/cfengine/cfengine-3.3.9.ebuild
new file mode 100644
index 000000000000..93aceccd2058
--- /dev/null
+++ b/net-misc/cfengine/cfengine-3.3.9.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+MY_PV="${PV//_beta/b}"
+MY_PV="${MY_PV/_p/p}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="An automated suite of programs for configuring and maintaining
+Unix-like computers"
+HOMEPAGE="http://www.cfengine.org/"
+SRC_URI="http://cfengine.com/source-code/download?file=${MY_P}.tar.gz -> ${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="3"
+KEYWORDS="amd64 ~arm ~ppc ~s390 ~sparc x86"
+
+IUSE="examples html libvirt mysql postgres +qdbm selinux tests tokyocabinet vim-syntax"
+
+DEPEND=">=sys-libs/db-4
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ selinux? ( sys-libs/libselinux )
+ tokyocabinet? ( dev-db/tokyocabinet )
+ qdbm? ( dev-db/qdbm )
+ libvirt? ( app-emulation/libvirt )
+ >=dev-libs/openssl-0.9.7
+ dev-libs/libpcre"
+RDEPEND="${DEPEND}"
+PDEPEND="vim-syntax? ( app-vim/cfengine-syntax )"
+
+REQUIRED_USE="qdbm? ( !tokyocabinet )
+ tokyocabinet? ( !qdbm )
+ !tokyocabinet? ( qdbm )
+ !qdbm? ( tokyocabinet )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_configure() {
+ # Enforce /var/cfengine for historical compatibility
+ econf \
+ --enable-fhs \
+ --docdir=/usr/share/doc/${PF} \
+ --with-workdir=/var/cfengine \
+ --with-pcre \
+ $(use_with qdbm) \
+ $(use_with tokyocabinet) \
+ $(use_with postgres postgresql) \
+ $(use_with mysql) \
+ $(use_with libvirt) \
+ $(use_enable selinux)
+
+ # Fix Makefile to skip inputs, see below "examples"
+ #sed -i -e 's/\(SUBDIRS.*\) inputs/\1/' Makefile || die
+
+ # We install the documentation through portage
+ sed -i -e 's/\(install-data-am.*\) install-docDATA/\1/' Makefile || die
+}
+
+src_install() {
+ newinitd "${FILESDIR}"/cf-serverd.rc6 cf-serverd || die
+ newinitd "${FILESDIR}"/cf-monitord.rc6 cf-monitord || die
+ newinitd "${FILESDIR}"/cf-execd.rc6 cf-execd || die
+
+ emake DESTDIR="${D}" install || die
+
+ # Evil workaround for now..
+ mv "${D}"/usr/share/doc/${PN}/ "${D}"/usr/share/doc/${PF}
+
+ dodoc AUTHORS
+
+ if ! use examples; then
+ rm -rf "${D}"/usr/share/doc/${PF}/example*
+ fi
+
+ # Create cfengine working directory
+ dodir /var/cfengine/bin
+ fperms 700 /var/cfengine
+
+ # Copy cfagent into the cfengine tree otherwise cfexecd won't
+ # find it. Most hosts cache their copy of the cfengine
+ # binaries here. This is the default search location for the
+ # binaries.
+ for bin in know promises agent monitord serverd execd runagent key report; do
+ dosym /usr/sbin/cf-$bin /var/cfengine/bin/cf-$bin || die
+ done
+
+ if use html; then
+ docinto html
+ dohtml -r docs/ || die
+ fi
+}
+
+pkg_postinst() {
+ echo
+ elog "NOTE: BDB (BerkelyDB) support has been removed as of ${PN}-3.3.0"
+ echo
+ einfo "Init scripts for cf-serverd, cf-monitord, and cf-execd are provided."
+ einfo
+ einfo "To run cfengine out of cron every half hour modify your crontab:"
+ einfo "0,30 * * * * /usr/sbin/cf-execd -F"
+ echo
+
+ elog "If you run cfengine the very first time, you MUST generate the keys for cfengine by running:"
+ elog "emerge --config ${CATEGORY}/${PN}"
+
+ # Fix old cf-servd, remove it after some releases.
+ local found=0
+ for fname in $(find /etc/runlevels/ -type f -or -type l -name 'cf-servd'); do
+ found=1
+ rm $fname
+ ln -s /etc/init.d/cf-serverd $(echo $fname | sed 's:cf-servd:cf-serverd:')
+ done
+
+ if [ "${found}" -eq 1 ]; then
+ echo
+ elog "/etc/init.d/cf-servd has been renamed to /etc/init.d/cf-serverd"
+ fi
+}
+
+pkg_config() {
+ if [ "${ROOT}" == "/" ]; then
+ if [ ! -f "/var/cfengine/ppkeys/localhost.priv" ]; then
+ einfo "Generating keys for localhost."
+ /usr/sbin/cf-key
+ fi
+ else
+ die "cfengine cfkey does not support any value of ROOT other than /."
+ fi
+}
diff --git a/net-misc/cfengine/cfengine-3.4.5.ebuild b/net-misc/cfengine/cfengine-3.4.5.ebuild
new file mode 100644
index 000000000000..bf6f1bd184e3
--- /dev/null
+++ b/net-misc/cfengine/cfengine-3.4.5.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils autotools
+
+MY_PV="${PV//_beta/b}"
+MY_PV="${MY_PV/_p/p}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="An automated suite of programs for configuring and maintaining
+Unix-like computers"
+HOMEPAGE="http://www.cfengine.org/"
+SRC_URI="http://cfengine.com/source-code/download?file=${MY_P}.tar.gz -> ${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="3"
+KEYWORDS="~amd64 ~arm ~ppc ~s390 ~sparc ~x86"
+
+IUSE="acl examples html libvirt mysql postgres +qdbm selinux tests tokyocabinet
+vim-syntax xml"
+
+DEPEND=">=sys-libs/db-4
+ acl? ( virtual/acl )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ selinux? ( sys-libs/libselinux )
+ tokyocabinet? ( dev-db/tokyocabinet )
+ qdbm? ( dev-db/qdbm )
+ libvirt? ( app-emulation/libvirt )
+ xml? ( dev-libs/libxml2:2 ) \
+ dev-libs/openssl
+ dev-libs/libpcre"
+RDEPEND="${DEPEND}"
+PDEPEND="vim-syntax? ( app-vim/cfengine-syntax )"
+
+REQUIRED_USE="qdbm? ( !tokyocabinet )
+ tokyocabinet? ( !qdbm )
+ !tokyocabinet? ( qdbm )
+ !qdbm? ( tokyocabinet )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ default
+
+ epatch "${FILESDIR}/${P}-acl.patch"
+ epatch "${FILESDIR}/${P}-ifconfig.patch"
+
+ eautoreconf
+}
+
+src_configure() {
+ # Enforce /var/cfengine for historical compatibility
+ econf \
+ --enable-fhs \
+ --docdir=/usr/share/doc/${PF} \
+ --with-workdir=/var/cfengine \
+ --with-pcre \
+ $(use_with acl libacl) \
+ $(use_with qdbm) \
+ $(use_with tokyocabinet) \
+ $(use_with postgres postgresql) \
+ $(use_with mysql) \
+ $(use_with libvirt) \
+ $(use_enable selinux)
+
+ # Fix Makefile to skip inputs, see below "examples"
+ #sed -i -e 's/\(SUBDIRS.*\) inputs/\1/' Makefile || die
+
+ # We install the documentation through portage
+ sed -i -e 's/\(install-data-am.*\) install-docDATA/\1/' Makefile || die
+}
+
+src_install() {
+ newinitd "${FILESDIR}"/cf-serverd.rc6 cf-serverd || die
+ newinitd "${FILESDIR}"/cf-monitord.rc6 cf-monitord || die
+ newinitd "${FILESDIR}"/cf-execd.rc6 cf-execd || die
+
+ emake DESTDIR="${D}" install || die
+
+ # Evil workaround for now..
+ mv "${D}"/usr/share/doc/${PN}/ "${D}"/usr/share/doc/${PF}
+
+ dodoc AUTHORS
+
+ if ! use examples; then
+ rm -rf "${D}"/usr/share/doc/${PF}/example*
+ fi
+
+ # Create cfengine working directory
+ dodir /var/cfengine/bin
+ fperms 700 /var/cfengine
+
+ # Copy cfagent into the cfengine tree otherwise cfexecd won't
+ # find it. Most hosts cache their copy of the cfengine
+ # binaries here. This is the default search location for the
+ # binaries.
+ for bin in promises agent monitord serverd execd runagent key report; do
+ dosym /usr/sbin/cf-$bin /var/cfengine/bin/cf-$bin || die
+ done
+
+ if use html; then
+ docinto html
+ dohtml -r docs/ || die
+ fi
+}
+
+pkg_postinst() {
+ echo
+ elog "NOTE: BDB (BerkelyDB) support has been removed as of ${PN}-3.3.0"
+ echo
+ einfo "Init scripts for cf-serverd, cf-monitord, and cf-execd are provided."
+ einfo
+ einfo "To run cfengine out of cron every half hour modify your crontab:"
+ einfo "0,30 * * * * /usr/sbin/cf-execd -F"
+ echo
+
+ elog "If you run cfengine the very first time, you MUST generate the keys for cfengine by running:"
+ elog "emerge --config ${CATEGORY}/${PN}"
+
+ # Fix old cf-servd, remove it after some releases.
+ local found=0
+ for fname in $(find /etc/runlevels/ -type f -or -type l -name 'cf-servd'); do
+ found=1
+ rm $fname
+ ln -s /etc/init.d/cf-serverd $(echo $fname | sed 's:cf-servd:cf-serverd:')
+ done
+
+ if [ "${found}" -eq 1 ]; then
+ echo
+ elog "/etc/init.d/cf-servd has been renamed to /etc/init.d/cf-serverd"
+ fi
+}
+
+pkg_config() {
+ if [ "${ROOT}" == "/" ]; then
+ if [ ! -f "/var/cfengine/ppkeys/localhost.priv" ]; then
+ einfo "Generating keys for localhost."
+ /usr/sbin/cf-key
+ fi
+ else
+ die "cfengine cfkey does not support any value of ROOT other than /."
+ fi
+}
diff --git a/net-misc/cfengine/cfengine-3.5.3.ebuild b/net-misc/cfengine/cfengine-3.5.3.ebuild
new file mode 100644
index 000000000000..022cb98fc804
--- /dev/null
+++ b/net-misc/cfengine/cfengine-3.5.3.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils autotools flag-o-matic
+
+MY_PV="${PV//_beta/b}"
+MY_PV="${MY_PV/_p/p}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="An automated suite of programs for configuring and maintaining
+Unix-like computers"
+HOMEPAGE="http://www.cfengine.org/"
+SRC_URI="http://cfengine.com/source-code/download?file=${MY_P}.tar.gz -> ${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="3"
+KEYWORDS="~amd64 ~arm ~ppc ~s390 ~sparc ~x86"
+
+IUSE="acl examples libvirt mysql postgres +qdbm selinux tokyocabinet vim-syntax xml"
+
+DEPEND="acl? ( virtual/acl )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ selinux? ( sys-libs/libselinux )
+ tokyocabinet? ( dev-db/tokyocabinet )
+ qdbm? ( dev-db/qdbm )
+ libvirt? ( app-emulation/libvirt )
+ xml? ( dev-libs/libxml2:2 ) \
+ dev-libs/openssl
+ dev-libs/libpcre"
+RDEPEND="${DEPEND}"
+PDEPEND="vim-syntax? ( app-vim/cfengine-syntax )"
+
+REQUIRED_USE="qdbm? ( !tokyocabinet )
+ tokyocabinet? ( !qdbm )
+ !tokyocabinet? ( qdbm )
+ !qdbm? ( tokyocabinet )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ default
+
+ epatch "${FILESDIR}/${PN}-3.4.5-acl.patch"
+ epatch "${FILESDIR}/${P}-ifconfig.patch"
+
+ eautoreconf
+}
+
+src_configure() {
+ # Enforce /var/cfengine for historical compatibility
+
+ econf \
+ --enable-fhs \
+ --docdir=/usr/share/doc/${PF} \
+ --with-workdir=/var/cfengine \
+ --with-pcre \
+ $(use_with acl libacl) \
+ $(use_with qdbm) \
+ $(use_with tokyocabinet) \
+ $(use_with postgres postgresql) \
+ $(use_with mysql mysql check) \
+ $(use_with libvirt) \
+ $(use_enable selinux)
+
+ # Fix Makefile to skip inputs, see below "examples"
+ #sed -i -e 's/\(SUBDIRS.*\) inputs/\1/' Makefile || die
+
+ # We install the documentation through portage
+ sed -i -e 's/\(install-data-am.*\) install-docDATA/\1/' Makefile || die
+}
+
+src_install() {
+ newinitd "${FILESDIR}"/cf-serverd.rc6 cf-serverd || die
+ newinitd "${FILESDIR}"/cf-monitord.rc6 cf-monitord || die
+ newinitd "${FILESDIR}"/cf-execd.rc6 cf-execd || die
+
+ emake DESTDIR="${D}" install || die
+
+ # fix ifconfig path in provided promises
+ find "${D}"/usr/share -name "*.cf" | xargs sed -i "s,/sbin/ifconfig,$(which ifconfig),g"
+
+ # Evil workaround for now..
+ mv "${D}"/usr/share/doc/${PN}/ "${D}"/usr/share/doc/${PF}
+
+ dodoc AUTHORS
+
+ if ! use examples; then
+ rm -rf "${D}"/usr/share/doc/${PF}/example*
+ fi
+
+ # Create cfengine working directory
+ dodir /var/cfengine/bin
+ fperms 700 /var/cfengine
+
+ # Copy cfagent into the cfengine tree otherwise cfexecd won't
+ # find it. Most hosts cache their copy of the cfengine
+ # binaries here. This is the default search location for the
+ # binaries.
+ for bin in promises agent monitord serverd execd runagent key; do
+ dosym /usr/sbin/cf-$bin /var/cfengine/bin/cf-$bin || die
+ done
+}
+
+pkg_postinst() {
+ echo
+ elog "NOTE: BDB (BerkelyDB) support has been removed as of ${PN}-3.3.0"
+ echo
+ einfo "Init scripts for cf-serverd, cf-monitord, and cf-execd are provided."
+ einfo
+ einfo "To run cfengine out of cron every half hour modify your crontab:"
+ einfo "0,30 * * * * /usr/sbin/cf-execd -F"
+ echo
+
+ elog "If you run cfengine the very first time, you MUST generate the keys for cfengine by running:"
+ elog "emerge --config ${CATEGORY}/${PN}"
+
+ # Fix old cf-servd, remove it after some releases.
+ local found=0
+ for fname in $(find /etc/runlevels/ -type f -or -type l -name 'cf-servd'); do
+ found=1
+ rm $fname
+ ln -s /etc/init.d/cf-serverd $(echo $fname | sed 's:cf-servd:cf-serverd:')
+ done
+
+ if [ "${found}" -eq 1 ]; then
+ echo
+ elog "/etc/init.d/cf-servd has been renamed to /etc/init.d/cf-serverd"
+ fi
+}
+
+pkg_config() {
+ if [ "${ROOT}" == "/" ]; then
+ if [ ! -f "/var/cfengine/ppkeys/localhost.priv" ]; then
+ einfo "Generating keys for localhost."
+ /usr/sbin/cf-key
+ fi
+ else
+ die "cfengine cfkey does not support any value of ROOT other than /."
+ fi
+}
diff --git a/net-misc/cfengine/cfengine-3.6.2.ebuild b/net-misc/cfengine/cfengine-3.6.2.ebuild
new file mode 100644
index 000000000000..2d94088ab452
--- /dev/null
+++ b/net-misc/cfengine/cfengine-3.6.2.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils autotools flag-o-matic
+
+MY_PV="${PV//_beta/b}"
+MY_PV="${MY_PV/_p/p}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="An automated suite of programs for configuring and maintaining
+Unix-like computers"
+HOMEPAGE="http://www.cfengine.org/"
+SRC_URI="http://cfengine.package-repos.s3.amazonaws.com/tarballs/${MY_P}.tar.gz -> ${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="3"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="acl examples libvirt mysql postgres +qdbm selinux tokyocabinet vim-syntax xml"
+
+DEPEND="acl? ( virtual/acl )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ selinux? ( sys-libs/libselinux )
+ tokyocabinet? ( dev-db/tokyocabinet )
+ qdbm? ( dev-db/qdbm )
+ libvirt? ( app-emulation/libvirt )
+ xml? ( dev-libs/libxml2:2 ) \
+ dev-libs/openssl
+ dev-libs/libpcre"
+RDEPEND="${DEPEND}"
+PDEPEND="vim-syntax? ( app-vim/cfengine-syntax )"
+
+REQUIRED_USE="qdbm? ( !tokyocabinet )
+ tokyocabinet? ( !qdbm )
+ !tokyocabinet? ( qdbm )
+ !qdbm? ( tokyocabinet )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ default
+ epatch "${FILESDIR}/${P}-ifconfig.patch"
+ eautoreconf
+}
+
+src_configure() {
+ # Enforce /var/cfengine for historical compatibility
+
+ econf \
+ --enable-fhs \
+ --docdir=/usr/share/doc/${PF} \
+ --with-workdir=/var/cfengine \
+ --with-pcre \
+ $(use_with acl libacl) \
+ $(use_with qdbm) \
+ $(use_with tokyocabinet) \
+ $(use_with postgres postgresql) \
+ $(use_with mysql mysql check) \
+ $(use_with libvirt) \
+ $(use_enable selinux)
+
+ # Fix Makefile to skip inputs, see below "examples"
+ #sed -i -e 's/\(SUBDIRS.*\) inputs/\1/' Makefile || die
+
+ # We install the documentation through portage
+ sed -i -e 's/\(install-data-am.*\) install-docDATA/\1/' Makefile || die
+}
+
+src_install() {
+ newinitd "${FILESDIR}"/cf-serverd.rc6 cf-serverd || die
+ newinitd "${FILESDIR}"/cf-monitord.rc6 cf-monitord || die
+ newinitd "${FILESDIR}"/cf-execd.rc6 cf-execd || die
+
+ emake DESTDIR="${D}" install || die
+
+ # fix ifconfig path in provided promises
+ find "${D}"/usr/share -name "*.cf" | xargs sed -i "s,/sbin/ifconfig,$(which ifconfig),g"
+
+ # Evil workaround for now..
+ mv "${D}"/usr/share/doc/${PN}/ "${D}"/usr/share/doc/${PF}
+
+ dodoc AUTHORS
+
+ if ! use examples; then
+ rm -rf "${D}"/usr/share/doc/${PF}/example*
+ fi
+
+ # Create cfengine working directory
+ dodir /var/cfengine/bin
+ fperms 700 /var/cfengine
+
+ # Copy cfagent into the cfengine tree otherwise cfexecd won't
+ # find it. Most hosts cache their copy of the cfengine
+ # binaries here. This is the default search location for the
+ # binaries.
+ for bin in promises agent monitord serverd execd runagent key; do
+ dosym /usr/sbin/cf-$bin /var/cfengine/bin/cf-$bin || die
+ done
+}
+
+pkg_postinst() {
+ echo
+ elog "NOTE: BDB (BerkelyDB) support has been removed as of ${PN}-3.3.0"
+ echo
+ einfo "Init scripts for cf-serverd, cf-monitord, and cf-execd are provided."
+ einfo
+ einfo "To run cfengine out of cron every half hour modify your crontab:"
+ einfo "0,30 * * * * /usr/sbin/cf-execd -F"
+ echo
+
+ elog "If you run cfengine the very first time, you MUST generate the keys for cfengine by running:"
+ elog "emerge --config ${CATEGORY}/${PN}"
+
+ # Fix old cf-servd, remove it after some releases.
+ local found=0
+ for fname in $(find /etc/runlevels/ -type f -or -type l -name 'cf-servd'); do
+ found=1
+ rm $fname
+ ln -s /etc/init.d/cf-serverd $(echo $fname | sed 's:cf-servd:cf-serverd:')
+ done
+
+ if [ "${found}" -eq 1 ]; then
+ echo
+ elog "/etc/init.d/cf-servd has been renamed to /etc/init.d/cf-serverd"
+ fi
+}
+
+pkg_config() {
+ if [ "${ROOT}" == "/" ]; then
+ if [ ! -f "/var/cfengine/ppkeys/localhost.priv" ]; then
+ einfo "Generating keys for localhost."
+ /usr/sbin/cf-key
+ fi
+ else
+ die "cfengine cfkey does not support any value of ROOT other than /."
+ fi
+}
diff --git a/net-misc/cfengine/files/511666-segfault.patch b/net-misc/cfengine/files/511666-segfault.patch
new file mode 100644
index 000000000000..ea3ae9686254
--- /dev/null
+++ b/net-misc/cfengine/files/511666-segfault.patch
@@ -0,0 +1,20 @@
+Fix a bug involving CheckFriendReliability (see bug #482439)
+
+Index: cfengine2-2.2.9/src/instrument.c
+===================================================================
+--- cfengine2-2.2.9.orig/src/instrument.c 2009-03-06 21:25:59.000000000 +0000
++++ cfengine2-2.2.9/src/instrument.c 2009-03-06 21:26:31.000000000 +0000
+@@ -716,11 +716,11 @@
+ key.data = timekey;
+ key.size = strlen(timekey)+1;
+
+- if ((errno = dbp->get(dbp,NULL,&key,&value,0)) != 0)
++ if ((errno = dbpent->get(dbpent,NULL,&key,&value,0)) != 0)
+ {
+ if (errno != DB_NOTFOUND)
+ {
+- dbp->err(dbp,errno,NULL);
++ dbpent->err(dbpent,errno,NULL);
+ exit(1);
+ }
+ }
diff --git a/net-misc/cfengine/files/admit-noclass-520696.patch b/net-misc/cfengine/files/admit-noclass-520696.patch
new file mode 100644
index 000000000000..1e5d8594aaed
--- /dev/null
+++ b/net-misc/cfengine/files/admit-noclass-520696.patch
@@ -0,0 +1,15 @@
+Fix a bug with admit/grant that let cfengine2 fails when the class
+of a cfengine fragment does not exist and more than a host or IP
+ranges are specified for a path (see #520696)
+
+--- a/src/install.c
++++ b/src/install.c
+@@ -6561,7 +6561,7 @@
+ if (!IsDefinedClass(classes))
+ {
+ Debug1("Not installing Auth path, no match\n");
+- InitializeAction();
++// InitializeAction();
+ return;
+ }
+
diff --git a/net-misc/cfengine/files/cf-execd.rc6 b/net-misc/cfengine/files/cf-execd.rc6
new file mode 100755
index 000000000000..38aa1811d019
--- /dev/null
+++ b/net-misc/cfengine/files/cf-execd.rc6
@@ -0,0 +1,18 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+ after cf-serverd
+}
+
+start() {
+ ebegin "Starting cf-execd"
+ start-stop-daemon --start --exec /usr/sbin/cf-execd -- ${EXTRA_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping cf-execd"
+ start-stop-daemon --stop --pidfile /var/cfengine/cf-execd.pid --exec /usr/sbin/cf-execd
+ eend $?
+}
diff --git a/net-misc/cfengine/files/cf-monitord.rc6 b/net-misc/cfengine/files/cf-monitord.rc6
new file mode 100755
index 000000000000..27ef2c26fc82
--- /dev/null
+++ b/net-misc/cfengine/files/cf-monitord.rc6
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting cf-monitord"
+ start-stop-daemon --start --exec /usr/sbin/cf-monitord -- ${EXTRA_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping cf-monitord"
+ start-stop-daemon --stop --pidfile /var/cfengine/cf-monitord.pid --exec /usr/sbin/cf-monitord
+ eend $?
+}
diff --git a/net-misc/cfengine/files/cf-serverd.rc6 b/net-misc/cfengine/files/cf-serverd.rc6
new file mode 100755
index 000000000000..ca805d69716c
--- /dev/null
+++ b/net-misc/cfengine/files/cf-serverd.rc6
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting cf-serverd"
+ start-stop-daemon --start --exec /usr/sbin/cf-serverd -- ${EXTRA_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping cf-serverd"
+ start-stop-daemon --stop --pidfile /var/cfengine/cf-serverd.pid --exec /usr/sbin/cf-serverd
+ eend $?
+}
diff --git a/net-misc/cfengine/files/cfengine-2.2.10-snprintf_buffer_overflow.patch b/net-misc/cfengine/files/cfengine-2.2.10-snprintf_buffer_overflow.patch
new file mode 100644
index 000000000000..dee9b797f6ac
--- /dev/null
+++ b/net-misc/cfengine/files/cfengine-2.2.10-snprintf_buffer_overflow.patch
@@ -0,0 +1,11 @@
+--- src/instrument.c.old 2010-10-15 22:20:58.014091858 +0200
++++ src/instrument.c 2010-10-15 22:21:34.132271440 +0200
+@@ -542,7 +542,7 @@ while (dbcp->c_get(dbcp, &key, &value, D
+
+ tthen = (time_t)then;
+
+- snprintf(datebuf,CF_BUFSIZE-1,"%s",ctime(&tthen));
++ snprintf(datebuf,CF_MAXVARSIZE-1,"%s",ctime(&tthen));
+ datebuf[strlen(datebuf)-9] = '\0'; /* Chop off second and year */
+
+ snprintf(addr,15,"%s",hostname+1);
diff --git a/net-misc/cfengine/files/cfengine-3.4.5-acl.patch b/net-misc/cfengine/files/cfengine-3.4.5-acl.patch
new file mode 100644
index 000000000000..815f257c36fa
--- /dev/null
+++ b/net-misc/cfengine/files/cfengine-3.4.5-acl.patch
@@ -0,0 +1,30 @@
+From a12b5b3b8cd4397545104923d1de3297fd971f9e Mon Sep 17 00:00:00 2001
+From: Christian Ruppert <idl0r@gentoo.org>
+Date: Fri, 29 Mar 2013 00:23:21 +0100
+Subject: [PATCH] Fix acl header detection
+
+
+Signed-off-by: Christian Ruppert <idl0r@gentoo.org>
+---
+ configure.ac | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 542d115..f3f0c04 100755
+--- a/configure.ac
++++ b/configure.ac
+@@ -335,7 +335,10 @@ AC_ARG_WITH([libacl],
+ if test "x$with_libacl" != xno; then
+ CF3_WITH_LIBRARY(libacl, [
+ AC_CHECK_LIB(acl, acl_init, [], [if test "x$with_libacl" != xcheck; then AC_MSG_ERROR(Cannot find libacl library); fi])
+- AC_CHECK_HEADERS([acl.h sys/acl.h acl/libacl.h], [], [if test "x$with_libacl" != xcheck; then AC_MSG_ERROR(Cannot find libacl library headers); fi])
++ AC_CHECK_HEADERS([acl.h sys/acl.h acl/libacl.h], [found_acl_h=yes], [])
++ if test "x$found_acl_h" != xyes; then
++ AC_MSG_ERROR(Cannot find libacl library headers)
++ fi
+ ])
+ fi
+
+--
+1.8.1.5
+
diff --git a/net-misc/cfengine/files/cfengine-3.4.5-ifconfig.patch b/net-misc/cfengine/files/cfengine-3.4.5-ifconfig.patch
new file mode 100644
index 000000000000..47107784ce0f
--- /dev/null
+++ b/net-misc/cfengine/files/cfengine-3.4.5-ifconfig.patch
@@ -0,0 +1,42 @@
+Patch by clabbe.montjoie@gmail.com
+https://bugs.gentoo.org/444532
+
+--- src/conf.h.in.old 2012-12-28 16:18:23.000000000 +0100
++++ src/conf.h.in 2012-12-28 16:19:08.000000000 +0100
+@@ -773,3 +773,6 @@
+
+ /* Define to rpl_vsnprintf if the replacement function should be used. */
+ #undef vsnprintf
++
++/* Define to the path for running ifconfig -a */
++#undef IFCONFIG_RUN
+--- src/unix.c.old 2012-12-28 16:05:28.000000000 +0100
++++ src/unix.c 2012-12-28 16:13:15.000000000 +0100
+@@ -900,7 +900,7 @@
+
+ default:
+
+- if ((pp = cf_popen("/sbin/ifconfig -a", "r")) == NULL)
++ if ((pp = cf_popen(IFCONFIG_RUN, "r")) == NULL)
+ {
+ CfOut(cf_verbose, "", "Could not find interface info\n");
+ return;
+--- configure.ac.old 2012-12-29 11:38:20.000000000 +0100
++++ configure.ac 2012-12-29 11:49:11.000000000 +0100
+@@ -882,6 +882,16 @@
+
+
+ dnl ######################################################################
++dnl Find the path to ifconfig
++dnl ######################################################################
++
++AC_PATH_PROG(IFCONFIG_PATH,ifconfig)
++if test x"$IFCONFIG_PATH" = x"" ; then
++ AC_MSG_ERROR([Cannot found the ifconfig binary.])
++fi
++AC_DEFINE_UNQUOTED(IFCONFIG_RUN, "$IFCONFIG_PATH -a", [the path to run ifconfig -a])
++
++dnl ######################################################################
+ dnl Summarize
+ dnl ######################################################################
+
diff --git a/net-misc/cfengine/files/cfengine-3.5.3-ifconfig.patch b/net-misc/cfengine/files/cfengine-3.5.3-ifconfig.patch
new file mode 100644
index 000000000000..dc982c6801f7
--- /dev/null
+++ b/net-misc/cfengine/files/cfengine-3.5.3-ifconfig.patch
@@ -0,0 +1,42 @@
+diff -ur cfengine-3.5.3.orig/configure.ac cfengine-3.5.3/configure.ac
+--- cfengine-3.5.3.orig/configure.ac 2013-12-09 13:13:14.000000000 +0100
++++ cfengine-3.5.3/configure.ac 2014-02-27 12:36:55.179893570 +0100
+@@ -1047,6 +1047,16 @@
+ AM_SUBST_NOTMAKE(post_macros)
+
+ dnl ######################################################################
++dnl Find the path to ifconfig
++dnl ######################################################################
++
++AC_PATH_PROG(IFCONFIG_PATH,ifconfig)
++if test x"$IFCONFIG_PATH" = x"" ; then
++ AC_MSG_ERROR([Cannot found the ifconfig binary.])
++fi
++AC_DEFINE_UNQUOTED(IFCONFIG_RUN, "$IFCONFIG_PATH -a", [the path to run ifconfig -a])
++
++dnl ######################################################################
+ dnl Summarize
+ dnl ######################################################################
+
+diff -ur cfengine-3.5.3.orig/libpromises/unix.c cfengine-3.5.3/libpromises/unix.c
+--- cfengine-3.5.3.orig/libpromises/unix.c 2013-12-09 13:13:14.000000000 +0100
++++ cfengine-3.5.3/libpromises/unix.c 2014-02-27 12:38:35.036608105 +0100
+@@ -767,7 +767,7 @@
+ return;
+ }
+ #else
+- if ((pp = cf_popen("/sbin/ifconfig -a", "r", true)) == NULL)
++ if ((pp = cf_popen(IFCONFIG_RUN, "r", true)) == NULL)
+ {
+ Log(LOG_LEVEL_VERBOSE, "Could not find interface info");
+ return;
+diff -ur cfengine-3.5.3.orig/libutils/config.h.in cfengine-3.5.3/libutils/config.h.in
+--- cfengine-3.5.3.orig/libutils/config.h.in 2013-12-09 13:55:25.000000000 +0100
++++ cfengine-3.5.3/libutils/config.h.in 2014-02-27 12:39:41.537416111 +0100
+@@ -914,3 +914,6 @@
+
+ /* Define to rpl_vsnprintf if the replacement function should be used. */
+ #undef vsnprintf
++
++/* Define to the path for running ifconfig -a */
++#undef IFCONFIG_RUN
diff --git a/net-misc/cfengine/files/cfengine-3.6.2-ifconfig.patch b/net-misc/cfengine/files/cfengine-3.6.2-ifconfig.patch
new file mode 100644
index 000000000000..ae0f491347f9
--- /dev/null
+++ b/net-misc/cfengine/files/cfengine-3.6.2-ifconfig.patch
@@ -0,0 +1,11 @@
+--- cfengine-3.6.2.orig/libenv/unix_iface.c 2014-09-25 07:53:31.000000000 -0400
++++ cfengine-3.6.2/libenv/unix_iface.c 2014-11-26 23:55:20.151351070 -0500
+@@ -625,7 +625,7 @@
+ return;
+ }
+ #else
+- if ((pp = cf_popen("/sbin/ifconfig -a", "r", true)) == NULL)
++ if ((pp = cf_popen("/sbin/ifconfig -a", "r", true)) == NULL || (pp = cf_popen("/bin/ifconfig -a", "r", true)) == NULL)
+ {
+ Log(LOG_LEVEL_VERBOSE, "Could not find interface info");
+ return;
diff --git a/net-misc/cfengine/files/cfenvd.rc6 b/net-misc/cfengine/files/cfenvd.rc6
new file mode 100755
index 000000000000..5c76bd88dbf2
--- /dev/null
+++ b/net-misc/cfengine/files/cfenvd.rc6
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting cfenvd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/cfenvd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping cfenvd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/cfenvd
+ eend $?
+}
diff --git a/net-misc/cfengine/files/cfexecd.rc6 b/net-misc/cfengine/files/cfexecd.rc6
new file mode 100755
index 000000000000..43cc144fff41
--- /dev/null
+++ b/net-misc/cfengine/files/cfexecd.rc6
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting cfexecd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/cfexecd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping cfexecd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/cfexecd
+ eend $?
+}
diff --git a/net-misc/cfengine/files/cfservd.rc6 b/net-misc/cfengine/files/cfservd.rc6
new file mode 100755
index 000000000000..a7ec9ad81a73
--- /dev/null
+++ b/net-misc/cfengine/files/cfservd.rc6
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting cfservd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/cfservd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping cfservd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/cfservd
+ eend $?
+}
diff --git a/net-misc/cfengine/metadata.xml b/net-misc/cfengine/metadata.xml
new file mode 100644
index 000000000000..b0f5eef831f1
--- /dev/null
+++ b/net-misc/cfengine/metadata.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sysadmin</herd>
+ <maintainer>
+ <email>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ <description>cfengine 2.x only</description>
+ </maintainer>
+ <maintainer>
+ <email>mschiff@gentoo.org</email>
+ <name>Marc Schiffbauer</name>
+ <description>cfengine >2.x only</description>
+ </maintainer>
+ <use>
+ <flag name="html">Install HTML documentation</flag>
+ <flag name="libvirt">Enable support for virtual machine management through <pkg>app-emulation/libvirt</pkg></flag>
+ <flag name="qdbm">Use <pkg>dev-db/qdbm</pkg> as database backend</flag>
+ <flag name="tests">Install test files</flag>
+ <flag name="tokyocabinet">Use <pkg>dev-db/tokyocabinet</pkg> as database backend</flag>
+ </use>
+ <longdescription>
+ Cfengine, or the configuration engine is an autonomous agent and a middle to
+ high level policy language for building expert systems which administrate
+ and configure large computer networks. Cfengine uses the idea of classes and
+ a primitive intelligence to define and automate the configuration and
+ maintenance of system state, for small to huge configurations. Cfengine is
+ designed to be a part of a computer immune system, and can be thought of as
+ a gaming agent. It is ideal for cluster management and has been adopted for
+ use all over the world in small and huge organizations alike.
+ </longdescription>
+ <longdescription lang="ja">
+ Cfengine 、つまり the configuration engine (設定エンジン)は大規模
+ コンピュータ・ネットワークの管理と設定を行うエキスパート・システム
+ を構築するためのハイレベルなポリシ言語の自律型エージェントとその
+ ミドルを指します。莫大な設定を軽減するため、Cfengineはクラス概念と
+ プリミティブ・インテリジェンスの導入及びシステム状態の設定と保守を
+ 自動化します。Cfengine は免疫型システムの一部としてデザインされ、
+ ゲーム・エージェントにもなります。クラスタ制御には最適で、世界中
+ の小さな組織および大きな組織で採用されています。
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/cgminer/Manifest b/net-misc/cgminer/Manifest
new file mode 100644
index 000000000000..917562cb4bba
--- /dev/null
+++ b/net-misc/cgminer/Manifest
@@ -0,0 +1,5 @@
+DIST cgminer-4.7.0.tar.bz2 1534316 SHA256 604c5e1998e8c7319b3d7b69297ce5d45d47eb0eba9be0c037138ef73cd3749b SHA512 3d2450cab3ad6c455814db4420ce464e06dc910fec0e0be38a626193fbf46e5211bc2f8f2f6bb14daea0aa82622031cc5f44db9aee414236f7ac74cd7d95e847 WHIRLPOOL dc2beab3cb2422371190ed505c615eab24a846301527f428b107ca54f3de69c27905c4c7d1f9ab20af0c9f531aab6059ec7bf8570b1eb2b9439ac77e74a31e48
+DIST cgminer-4.8.0.tar.bz2 1538552 SHA256 172409212dc3cb38260c9dfa4b142f989a32781dc3554a134516451a84bee137 SHA512 fdd43047a0e4c58778fa7ddd95e7521514e4572082cdb49eb802628a7d4390873576a4552d891fefc0b28043f0d15ed229d59287d75f05d5e0ac0e0a55f60d8a WHIRLPOOL 0eae3c8a8159f10f0a211ba24a9b8fa91f7f5aa2b4d6c56cdc4c10f22d69a464c86877afbe73fbed223a850e6dd9b0a45cd175c4ee24c9483ca4899032553078
+DIST cgminer-4.9.0.tar.bz2 1547040 SHA256 67d5016bba0deb6fe432765fd5e10a4679785dc8d352d361af99150fcc3408cf SHA512 29fb31c75beca5d5a4e5c69f8448cea0640c1764561c3dbc553beb97510fda3e6529a935becbd40696f9a529575f53991a8cb704b8ba283a63496430f1d794ca WHIRLPOOL 7bdd5f5697d10acad1f026c4a392913e2d791f694e5c37732f9cf4dc037ad71d2e062b900376bfea4acfc78cf954adda0428785ac6476ee787e866a67108cf98
+DIST cgminer-4.9.1.tar.bz2 1549471 SHA256 68d0d0ac623e5cff450febe4b7143a7def04c952008e2b1b040988a6270ab0e1 SHA512 c94b09f0adf0a73ac8f134cde0594627b0c017863fc652fb6dcb18aaedc0bb7c2c747152b916a690f2097dc0183ec3a2c94aaf7dbff9074ab04290443d9fdad7 WHIRLPOOL b73fc4bd45bfdc96e8bcea6474540eefbc0c9c30e2967d55f60b04b039407ce4f15e35d1794f59e717902d5b7bc9f97b8b3ecda4d5be0b66fe9b7e104d0a01ff
+DIST cgminer-4.9.2.tar.bz2 1476371 SHA256 7a94719c520c3ebd96fee65e2f737e87c9ae70c8e21865ee0ce16ac9b02e6e62 SHA512 48371657c84f09ad8c500a29ca85f35af70eb8720d9d97b565cd8c5356289d889ee60c06f37c0507a53c8f50ae827a77fa0c41609bac6b1e8849ad26b55d67d4 WHIRLPOOL bc1827049171683a7bae77b7693cf579cc18523dd1db1d54c3de41f3c81d6786f749dcee6e6e74c54ce7aceb5b946d357f8c04ded2d02dc40faddadcb015b828
diff --git a/net-misc/cgminer/cgminer-4.7.0.ebuild b/net-misc/cgminer/cgminer-4.7.0.ebuild
new file mode 100644
index 000000000000..e324094aa054
--- /dev/null
+++ b/net-misc/cgminer/cgminer-4.7.0.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="Bitcoin CPU/GPU/FPGA/ASIC miner in C"
+HOMEPAGE="http://bitcointalk.org/?topic=28402.msg357369 http://github.com/ckolivas/cgminer"
+SRC_URI="http://ck.kolivas.org/apps/cgminer/${P}.tar.bz2"
+#SRC_URI="http://ck.kolivas.org/apps/cgminer/4.5/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+HARDWARE="ants1 ants2 avalon avalon2 bab bitmine_A1 bflsc bitforce bitfury cointerra drillbit hashfast hashratio icarus klondike knc minion modminer spondoolies"
+IUSE="doc examples udev hardened ncurses ${HARDWARE}"
+
+REQUIRED_USE="|| ( ${HARDWARE} )"
+
+RDEPEND="net-misc/curl
+ >=dev-libs/jansson-2.6
+ ncurses? ( sys-libs/ncurses )
+ avalon? ( virtual/libusb:1 )
+ bflsc? ( virtual/libusb:1 )
+ bitforce? ( virtual/libusb:1 )
+ bitfury? ( virtual/libusb:1 )
+ cointerra? ( virtual/libusb:1 )
+ drillbit? ( virtual/libusb:1 )
+ hashfast? ( virtual/libusb:1 )
+ hashratio? ( virtual/libusb:1 )
+ icarus? ( virtual/libusb:1 )
+ klondike? ( virtual/libusb:1 )
+ modminer? ( virtual/libusb:1 )
+ spondoolies? ( virtual/libusb:1 )"
+DEPEND="virtual/pkgconfig
+ ${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.4.2-system-jansson.patch
+ eautoreconf
+}
+
+src_configure() {
+ use hardened && append-cflags "-nopie"
+
+ econf $(use_with ncurses curses) \
+ $(use_enable ants1) \
+ $(use_enable ants2) \
+ $(use_enable avalon) \
+ $(use_enable avalon2) \
+ $(use_enable bab) \
+ $(use_enable bitmine_A1) \
+ $(use_enable bflsc) \
+ $(use_enable bitforce) \
+ $(use_enable bitfury) \
+ $(use_enable cointerra) \
+ $(use_enable drillbit) \
+ $(use_enable hashfast) \
+ $(use_enable hashratio) \
+ $(use_enable icarus) \
+ $(use_enable klondike) \
+ $(use_enable knc) \
+ $(use_enable minion) \
+ $(use_enable modminer) \
+ $(use_enable spondoolies) \
+ --with-system-libusb
+ # sanitize directories (is this still needed?)
+ sed -i 's~^\(\#define CGMINER_PREFIX \).*$~\1"'"${EPREFIX}/usr/lib/cgminer"'"~' config.h
+}
+
+src_install() { # How about using some make install?
+ dobin cgminer
+
+ insinto /lib/udev/rules.d
+ use udev && doins 01-cgminer.rules
+
+ if use doc; then
+ dodoc AUTHORS NEWS README API-README
+ use icarus || use bitforce || use modminer && dodoc FPGA-README
+ use avalon || use bflsc && dodoc ASIC-README
+ fi
+
+ if use examples; then
+ docinto examples
+ dodoc api-example.php miner.php API.java api-example.c example.conf
+ fi
+}
diff --git a/net-misc/cgminer/cgminer-4.8.0.ebuild b/net-misc/cgminer/cgminer-4.8.0.ebuild
new file mode 100644
index 000000000000..e6e000c0fc8b
--- /dev/null
+++ b/net-misc/cgminer/cgminer-4.8.0.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="Bitcoin CPU/GPU/FPGA/ASIC miner in C"
+HOMEPAGE="http://bitcointalk.org/?topic=28402.msg357369 http://github.com/ckolivas/cgminer"
+SRC_URI="http://ck.kolivas.org/apps/cgminer/${P}.tar.bz2"
+#SRC_URI="http://ck.kolivas.org/apps/cgminer/4.5/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+HARDWARE="ants1 ants2 avalon avalon2 bab bitmine_A1 bflsc bitforce bitfury cointerra drillbit hashfast hashratio icarus klondike knc minion modminer spondoolies"
+IUSE="doc examples udev hardened ncurses ${HARDWARE}"
+
+REQUIRED_USE="|| ( ${HARDWARE} )"
+
+RDEPEND="net-misc/curl
+ >=dev-libs/jansson-2.6
+ ncurses? ( sys-libs/ncurses )
+ avalon? ( virtual/libusb:1[udev] )
+ bflsc? ( virtual/libusb:1[udev] )
+ bitforce? ( virtual/libusb:1[udev] )
+ bitfury? ( virtual/libusb:1[udev] )
+ cointerra? ( virtual/libusb:1[udev] )
+ drillbit? ( virtual/libusb:1[udev] )
+ hashfast? ( virtual/libusb:1[udev] )
+ hashratio? ( virtual/libusb:1[udev] )
+ icarus? ( virtual/libusb:1[udev] )
+ klondike? ( virtual/libusb:1[udev] )
+ modminer? ( virtual/libusb:1[udev] )
+ spondoolies? ( virtual/libusb:1[udev] )
+ udev? ( virtual/libudev )"
+DEPEND="virtual/pkgconfig
+ ${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.4.2-system-jansson.patch
+ eautoreconf
+}
+
+src_configure() {
+ use hardened && append-cflags "-nopie"
+
+ econf $(use_with ncurses curses) \
+ $(use_enable ants1) \
+ $(use_enable ants2) \
+ $(use_enable avalon) \
+ $(use_enable avalon2) \
+ $(use_enable bab) \
+ $(use_enable bitmine_A1) \
+ $(use_enable bflsc) \
+ $(use_enable bitforce) \
+ $(use_enable bitfury) \
+ $(use_enable cointerra) \
+ $(use_enable drillbit) \
+ $(use_enable hashfast) \
+ $(use_enable hashratio) \
+ $(use_enable icarus) \
+ $(use_enable klondike) \
+ $(use_enable knc) \
+ $(use_enable minion) \
+ $(use_enable modminer) \
+ $(use_enable spondoolies) \
+ $(use_enable udev) \
+ --disable-forcecombo \
+ --with-system-libusb
+ # sanitize directories (is this still needed?)
+ sed -i 's~^\(\#define CGMINER_PREFIX \).*$~\1"'"${EPREFIX}/usr/lib/cgminer"'"~' config.h
+}
+
+src_install() { # How about using some make install?
+ dobin cgminer
+
+ if use udev; then
+ insinto /lib/udev/rules.d
+ use udev && doins 01-cgminer.rules
+ fi
+
+ if use doc; then
+ dodoc AUTHORS NEWS README API-README
+ use icarus || use bitforce || use modminer && dodoc FPGA-README
+ use avalon || use bflsc && dodoc ASIC-README
+ fi
+
+ if use examples; then
+ docinto examples
+ dodoc api-example.php miner.php API.java api-example.c example.conf
+ fi
+}
diff --git a/net-misc/cgminer/cgminer-4.9.0.ebuild b/net-misc/cgminer/cgminer-4.9.0.ebuild
new file mode 100644
index 000000000000..dde97b34b112
--- /dev/null
+++ b/net-misc/cgminer/cgminer-4.9.0.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="Bitcoin CPU/GPU/FPGA/ASIC miner in C"
+HOMEPAGE="http://bitcointalk.org/?topic=28402.msg357369 http://github.com/ckolivas/cgminer"
+SRC_URI="http://ck.kolivas.org/apps/cgminer/${P}.tar.bz2"
+#SRC_URI="http://ck.kolivas.org/apps/cgminer/4.5/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+HARDWARE="ants1 ants2 avalon avalon2 avalon4 bab bitmine_A1 bflsc bitforce bitfury blockerupter cointerra drillbit hashfast hashratio icarus klondike knc minion modminer spondoolies"
+IUSE="doc examples udev hardened ncurses ${HARDWARE}"
+
+REQUIRED_USE="|| ( ${HARDWARE} )"
+
+RDEPEND="net-misc/curl
+ >=dev-libs/jansson-2.6
+ ncurses? ( sys-libs/ncurses )
+ ants1? ( virtual/libusb:1[udev] )
+ ants2? ( virtual/libusb:1[udev] )
+ avalon? ( virtual/libusb:1[udev] )
+ avalon2? ( virtual/libusb:1[udev] )
+ avalon4? ( virtual/libusb:1[udev] )
+ bflsc? ( virtual/libusb:1[udev] )
+ bitforce? ( virtual/libusb:1[udev] )
+ bitfury? ( virtual/libusb:1[udev] )
+ blockerupter? ( virtual/libusb:1[udev] )
+ cointerra? ( virtual/libusb:1[udev] )
+ drillbit? ( virtual/libusb:1[udev] )
+ hashfast? ( virtual/libusb:1[udev] )
+ hashratio? ( virtual/libusb:1[udev] )
+ icarus? ( virtual/libusb:1[udev] )
+ klondike? ( virtual/libusb:1[udev] )
+ modminer? ( virtual/libusb:1[udev] )
+ spondoolies? ( virtual/libusb:1[udev] )
+ udev? ( virtual/libudev )"
+DEPEND="virtual/pkgconfig
+ ${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.4.2-system-jansson.patch
+ eautoreconf
+}
+
+src_configure() {
+ use hardened && append-cflags "-nopie"
+
+ econf $(use_with ncurses curses) \
+ $(use_enable ants1) \
+ $(use_enable ants2) \
+ $(use_enable avalon) \
+ $(use_enable avalon2) \
+ $(use_enable avalon4) \
+ $(use_enable bab) \
+ $(use_enable bitmine_A1) \
+ $(use_enable bflsc) \
+ $(use_enable bitforce) \
+ $(use_enable bitfury) \
+ $(use_enable blockerupter) \
+ $(use_enable cointerra) \
+ $(use_enable drillbit) \
+ $(use_enable hashfast) \
+ $(use_enable hashratio) \
+ $(use_enable icarus) \
+ $(use_enable klondike) \
+ $(use_enable knc) \
+ $(use_enable minion) \
+ $(use_enable modminer) \
+ $(use_enable spondoolies) \
+ $(use_enable udev) \
+ --disable-forcecombo \
+ --with-system-libusb
+ # sanitize directories (is this still needed?)
+ sed -i 's~^\(\#define CGMINER_PREFIX \).*$~\1"'"${EPREFIX}/usr/lib/cgminer"'"~' config.h
+}
+
+src_install() { # How about using some make install?
+ dobin cgminer
+
+ if use udev; then
+ insinto /lib/udev/rules.d
+ use udev && doins 01-cgminer.rules
+ fi
+
+ if use doc; then
+ dodoc AUTHORS NEWS README API-README
+ use icarus || use bitforce || use modminer && dodoc FPGA-README
+ use avalon || use bflsc && dodoc ASIC-README
+ fi
+
+ if use examples; then
+ docinto examples
+ dodoc api-example.php miner.php API.java api-example.c example.conf
+ fi
+}
diff --git a/net-misc/cgminer/cgminer-4.9.1.ebuild b/net-misc/cgminer/cgminer-4.9.1.ebuild
new file mode 100644
index 000000000000..1ca2db5b4bfc
--- /dev/null
+++ b/net-misc/cgminer/cgminer-4.9.1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="Bitcoin CPU/GPU/FPGA/ASIC miner in C"
+HOMEPAGE="http://bitcointalk.org/?topic=28402.msg357369 http://github.com/ckolivas/cgminer"
+SRC_URI="http://ck.kolivas.org/apps/cgminer/${P}.tar.bz2"
+#SRC_URI="http://ck.kolivas.org/apps/cgminer/4.5/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+HARDWARE="ants1 ants2 avalon avalon2 avalon4 bab bitmine_A1 bflsc bitforce bitfury blockerupter cointerra drillbit hashfast hashratio icarus klondike knc minion modminer spondoolies"
+IUSE="doc examples udev hardened ncurses ${HARDWARE}"
+
+REQUIRED_USE="|| ( ${HARDWARE} )"
+
+RDEPEND="net-misc/curl
+ >=dev-libs/jansson-2.6
+ ncurses? ( sys-libs/ncurses )
+ ants1? ( virtual/libusb:1[udev] )
+ ants2? ( virtual/libusb:1[udev] )
+ avalon? ( virtual/libusb:1[udev] )
+ avalon2? ( virtual/libusb:1[udev] )
+ avalon4? ( virtual/libusb:1[udev] )
+ bflsc? ( virtual/libusb:1[udev] )
+ bitforce? ( virtual/libusb:1[udev] )
+ bitfury? ( virtual/libusb:1[udev] )
+ blockerupter? ( virtual/libusb:1[udev] )
+ cointerra? ( virtual/libusb:1[udev] )
+ drillbit? ( virtual/libusb:1[udev] )
+ hashfast? ( virtual/libusb:1[udev] )
+ hashratio? ( virtual/libusb:1[udev] )
+ icarus? ( virtual/libusb:1[udev] )
+ klondike? ( virtual/libusb:1[udev] )
+ modminer? ( virtual/libusb:1[udev] )
+ spondoolies? ( virtual/libusb:1[udev] )
+ udev? ( virtual/libudev )"
+DEPEND="virtual/pkgconfig
+ ${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.4.2-system-jansson.patch
+ eautoreconf
+}
+
+src_configure() {
+ use hardened && append-cflags "-nopie"
+
+ econf $(use_with ncurses curses) \
+ $(use_enable ants1) \
+ $(use_enable ants2) \
+ $(use_enable avalon) \
+ $(use_enable avalon2) \
+ $(use_enable avalon4) \
+ $(use_enable bab) \
+ $(use_enable bitmine_A1) \
+ $(use_enable bflsc) \
+ $(use_enable bitforce) \
+ $(use_enable bitfury) \
+ $(use_enable blockerupter) \
+ $(use_enable cointerra) \
+ $(use_enable drillbit) \
+ $(use_enable hashfast) \
+ $(use_enable hashratio) \
+ $(use_enable icarus) \
+ $(use_enable klondike) \
+ $(use_enable knc) \
+ $(use_enable minion) \
+ $(use_enable modminer) \
+ $(use_enable spondoolies) \
+ $(use_enable udev) \
+ --disable-forcecombo \
+ --with-system-libusb
+ # sanitize directories (is this still needed?)
+ sed -i 's~^\(\#define CGMINER_PREFIX \).*$~\1"'"${EPREFIX}/usr/lib/cgminer"'"~' config.h
+}
+
+src_install() { # How about using some make install?
+ dobin cgminer
+
+ if use udev; then
+ insinto /lib/udev/rules.d
+ use udev && doins 01-cgminer.rules
+ fi
+
+ if use doc; then
+ dodoc AUTHORS NEWS README API-README
+ use icarus || use bitforce || use modminer && dodoc FPGA-README
+ use avalon || use bflsc && dodoc ASIC-README
+ fi
+
+ if use examples; then
+ docinto examples
+ dodoc api-example.php miner.php API.java api-example.c example.conf
+ fi
+}
diff --git a/net-misc/cgminer/cgminer-4.9.2.ebuild b/net-misc/cgminer/cgminer-4.9.2.ebuild
new file mode 100644
index 000000000000..6a54a69a1e3e
--- /dev/null
+++ b/net-misc/cgminer/cgminer-4.9.2.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 autotools eutils flag-o-matic
+
+DESCRIPTION="Bitcoin CPU/GPU/FPGA/ASIC miner in C"
+HOMEPAGE="http://bitcointalk.org/?topic=28402.msg357369 http://github.com/ckolivas/cgminer"
+SRC_URI="http://ck.kolivas.org/apps/cgminer/${P}.tar.bz2"
+#SRC_URI="http://ck.kolivas.org/apps/cgminer/4.5/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+HARDWARE="ants1 ants2 ants3 avalon avalon2 avalon4 bab bflsc bitforce bitfury bitmine_A1 blockerupter cointerra drillbit hashfast hashratio icarus klondike knc minion modminer sp10 sp30"
+IUSE="doc examples udev hardened ncurses ${HARDWARE}"
+
+REQUIRED_USE="|| ( ${HARDWARE} )"
+
+RDEPEND="net-misc/curl
+ >=dev-libs/jansson-2.6
+ virtual/libusb:1[udev]
+ ncurses? ( sys-libs/ncurses )
+ udev? ( virtual/libudev )"
+DEPEND="virtual/pkgconfig
+ ${RDEPEND}"
+
+src_configure() {
+ use hardened && append-cflags "-nopie"
+
+ # PKG_CHECK_MODULES needs PKG_CONFIG for --with-system-jansson.
+ export PKG_CONFIG=/usr/bin/pkg-config
+ econf $(use_with ncurses curses) \
+ $(use_enable ants1) \
+ $(use_enable ants2) \
+ $(use_enable ants3) \
+ $(use_enable avalon) \
+ $(use_enable avalon2) \
+ $(use_enable avalon4) \
+ $(use_enable bab) \
+ $(use_enable bitmine_A1) \
+ $(use_enable bflsc) \
+ $(use_enable bitforce) \
+ $(use_enable bitfury) \
+ $(use_enable blockerupter) \
+ $(use_enable cointerra) \
+ $(use_enable drillbit) \
+ $(use_enable hashfast) \
+ $(use_enable hashratio) \
+ $(use_enable icarus) \
+ $(use_enable klondike) \
+ $(use_enable knc) \
+ $(use_enable minion) \
+ $(use_enable modminer) \
+ $(use_enable sp10) \
+ $(use_enable sp30) \
+ $(use_enable udev) \
+ --disable-forcecombo \
+ --with-system-libusb \
+ --with-system-jansson
+ # sanitize directories (is this still needed?)
+ sed -i 's~^\(\#define CGMINER_PREFIX \).*$~\1"'"${EPREFIX}/usr/lib/cgminer"'"~' config.h
+}
+
+src_install() { # How about using some make install?
+ dobin cgminer
+
+ if use udev; then
+ insinto /lib/udev/rules.d
+ use udev && doins 01-cgminer.rules
+ fi
+
+ if use doc; then
+ dodoc AUTHORS NEWS README API-README
+ use icarus || use bitforce || use modminer && dodoc FPGA-README
+ use avalon || use bflsc && dodoc ASIC-README
+ fi
+
+ if use examples; then
+ docinto examples
+ dodoc api-example.php miner.php API.java api-example.c example.conf
+ fi
+}
diff --git a/net-misc/cgminer/files/cgminer-4.3.5-system-jansson.patch b/net-misc/cgminer/files/cgminer-4.3.5-system-jansson.patch
new file mode 100644
index 000000000000..bfe14311740e
--- /dev/null
+++ b/net-misc/cgminer/files/cgminer-4.3.5-system-jansson.patch
@@ -0,0 +1,47 @@
+diff -Naur cgminer-4.3.5.orig/compat/Makefile.am cgminer-4.3.5/compat/Makefile.am
+--- cgminer-4.3.5.orig/compat/Makefile.am 2013-11-30 16:24:45.000000000 -0500
++++ cgminer-4.3.5/compat/Makefile.am 2014-06-10 09:50:07.363965296 -0400
+@@ -1,8 +1,5 @@
+-
+-SUBDIRS = jansson-2.5
+-
+ if WANT_USBUTILS
+ if WANT_STATIC_LIBUSB
+-SUBDIRS += libusb-1.0
++SUBDIRS = libusb-1.0
+ endif
+ endif
+diff -Naur cgminer-4.3.5.orig/configure.ac cgminer-4.3.5/configure.ac
+--- cgminer-4.3.5.orig/configure.ac 2014-06-09 21:40:35.000000000 -0400
++++ cgminer-4.3.5/configure.ac 2014-06-10 09:49:42.306964156 -0400
+@@ -405,8 +405,7 @@
+
+ AM_CONDITIONAL([WANT_STATIC_LIBUSB], [test x$dlibusb = xno])
+
+-AC_CONFIG_SUBDIRS([compat/jansson-2.5])
+-JANSSON_LIBS="compat/jansson-2.5/src/.libs/libjansson.a"
++JANSSON_LIBS="-ljansson"
+
+ PKG_PROG_PKG_CONFIG()
+
+diff -Naur cgminer-4.3.5.orig/Makefile.am cgminer-4.3.5/Makefile.am
+--- cgminer-4.3.5.orig/Makefile.am 2014-06-09 20:29:40.000000000 -0400
++++ cgminer-4.3.5/Makefile.am 2014-06-10 09:49:56.153964786 -0400
+@@ -1,8 +1,6 @@
+
+ ACLOCAL_AMFLAGS = -I m4
+
+-JANSSON_CPPFLAGS= -I$(top_builddir)/compat/jansson-2.5/src -I$(top_srcdir)/compat/jansson-2.5/src
+-
+ if WANT_USBUTILS
+ USBUTILS_CPPFLAGS = -I$(top_builddir)/compat/libusb-1.0/libusb -I$(top_srcdir)/compat/libusb-1.0/libusb
+ else
+@@ -18,7 +16,7 @@
+
+ SUBDIRS = lib compat ccan
+
+-cgminer_CPPFLAGS = $(PTHREAD_FLAGS) -fno-strict-aliasing $(JANSSON_CPPFLAGS) $(USBUTILS_CPPFLAGS)
++cgminer_CPPFLAGS = $(PTHREAD_FLAGS) -fno-strict-aliasing $(USBUTILS_CPPFLAGS)
+
+ bin_PROGRAMS = cgminer
+
diff --git a/net-misc/cgminer/files/cgminer-4.4.2-system-jansson.patch b/net-misc/cgminer/files/cgminer-4.4.2-system-jansson.patch
new file mode 100644
index 000000000000..a54054cb630f
--- /dev/null
+++ b/net-misc/cgminer/files/cgminer-4.4.2-system-jansson.patch
@@ -0,0 +1,47 @@
+diff -Naur cgminer-4.4.2.orig/compat/Makefile.am cgminer-4.4.2/compat/Makefile.am
+--- cgminer-4.4.2.orig/compat/Makefile.am 2014-07-16 23:01:05.000000000 -0400
++++ cgminer-4.4.2/compat/Makefile.am 2014-07-17 06:55:09.703029301 -0400
+@@ -1,8 +1,5 @@
+-
+-SUBDIRS = jansson-2.6
+-
+ if WANT_USBUTILS
+ if WANT_STATIC_LIBUSB
+-SUBDIRS += libusb-1.0
++SUBDIRS = libusb-1.0
+ endif
+ endif
+diff -Naur cgminer-4.4.2.orig/configure.ac cgminer-4.4.2/configure.ac
+--- cgminer-4.4.2.orig/configure.ac 2014-07-17 00:35:21.000000000 -0400
++++ cgminer-4.4.2/configure.ac 2014-07-17 06:55:44.964030906 -0400
+@@ -418,8 +418,7 @@
+
+ AM_CONDITIONAL([WANT_STATIC_LIBUSB], [test x$dlibusb = xno])
+
+-AC_CONFIG_SUBDIRS([compat/jansson-2.6])
+-JANSSON_LIBS="compat/jansson-2.6/src/.libs/libjansson.a"
++JANSSON_LIBS="-ljansson"
+
+ PKG_PROG_PKG_CONFIG()
+
+diff -Naur cgminer-4.4.2.orig/Makefile.am cgminer-4.4.2/Makefile.am
+--- cgminer-4.4.2.orig/Makefile.am 2014-07-16 23:01:30.000000000 -0400
++++ cgminer-4.4.2/Makefile.am 2014-07-17 06:56:01.140031642 -0400
+@@ -1,8 +1,6 @@
+
+ ACLOCAL_AMFLAGS = -I m4
+
+-JANSSON_CPPFLAGS= -I$(top_builddir)/compat/jansson-2.6/src -I$(top_srcdir)/compat/jansson-2.6/src
+-
+ if WANT_USBUTILS
+ USBUTILS_CPPFLAGS = -I$(top_builddir)/compat/libusb-1.0/libusb -I$(top_srcdir)/compat/libusb-1.0/libusb
+ else
+@@ -18,7 +16,7 @@
+
+ SUBDIRS = lib compat ccan
+
+-cgminer_CPPFLAGS = $(PTHREAD_FLAGS) -fno-strict-aliasing $(JANSSON_CPPFLAGS) $(USBUTILS_CPPFLAGS)
++cgminer_CPPFLAGS = $(PTHREAD_FLAGS) -fno-strict-aliasing $(USBUTILS_CPPFLAGS)
+
+ bin_PROGRAMS = cgminer
+
diff --git a/net-misc/cgminer/metadata.xml b/net-misc/cgminer/metadata.xml
new file mode 100644
index 000000000000..3ffd4b4c1866
--- /dev/null
+++ b/net-misc/cgminer/metadata.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>ki@baka.bakka.su</email>
+ <description>In baka-bakka overlay.</description>
+ </maintainer>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <use>
+ <flag name="ants1">Enable support for Antminer S1 Bitmain</flag>
+ <flag name="ants2">Enable support for Antminer S2 Bitmain</flag>
+ <flag name="ants3">Enable support for Antminer S3 Bitmain</flag>
+ <flag name="avalon">Enable support for Avalon ASICs</flag>
+ <flag name="avalon2">Enable support for Avalon2 ASICs</flag>
+ <flag name="avalon4">Enable support for Avalon4 ASICs</flag>
+ <flag name="bab">Enable support for BlackArrow Bitfury</flag>
+ <flag name="bflsc">Enable support for BFL ASICs</flag>
+ <flag name="bitforce">Enable support for mining with ButterFly Labs BitFORCE FPGAs</flag>
+ <flag name="bitfury">Enable support for mining with BitFury ASICs</flag>
+ <flag name="bitmine_A1">Enable support for mining with Bitmine.ch A1 ASICs</flag>
+ <flag name="blockerupter">Enable support for mining with BlockRupter ASICs</flag>
+ <flag name="cointerra">Enable support for mining with Cointerra ASICs</flag>
+ <flag name="drillbit">Enable support for mining with Drillbit BitFury ASICs</flag>
+ <flag name="hashfast">Enable support for mining with Hashfast</flag>
+ <flag name="hashratio">Enable support for mining with Hashratio</flag>
+ <flag name="icarus">Enable support for mining with Icarus FPGAs</flag>
+ <flag name="klondike">Enable support for mining with Klondik ASICs</flag>
+ <flag name="knc">Enable support for mining with KnC miners</flag>
+ <flag name="minion">Enable support for mining with BlackArrow Bitfury </flag>
+ <flag name="modminer">Enable support for mining with ModMiner FPGAs</flag>
+ <flag name="spondoolies">Enable support for Spondoolies</flag>
+ <flag name="sp10">Enable support for Spondoolies SP10</flag>
+ <flag name="sp30">Enable support for Spondoolies SP30</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">ckolivas/cgminer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/cgterm/Manifest b/net-misc/cgterm/Manifest
new file mode 100644
index 000000000000..f06f2c8a66af
--- /dev/null
+++ b/net-misc/cgterm/Manifest
@@ -0,0 +1 @@
+DIST cgterm-1.6.tar.gz 87887 RMD160 86d114ae75aa9819c588912bbab8d7f52fbf3df6 SHA1 174ed8ac6fc41b685ff467a291d339c4248f8716 SHA256 21b17a1f5178517c935b996d6f492dba9fca6a88bb7964f85cce8913f379a2a1
diff --git a/net-misc/cgterm/cgterm-1.6.ebuild b/net-misc/cgterm/cgterm-1.6.ebuild
new file mode 100644
index 000000000000..56fa338e3e03
--- /dev/null
+++ b/net-misc/cgterm/cgterm-1.6.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="Connect to C64 telnet BBS's with the correct colours and font"
+HOMEPAGE="http://www.paradroid.net/cgterm/"
+SRC_URI="http://www.paradroid.net/cgterm/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+KEYWORDS="~amd64 ~ppc x86"
+
+DEPEND=">=media-libs/libsdl-1.2.5"
+RDEPEND="${DEPEND}"
+
+src_unpack(){
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-QA.patch"
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS} `sdl-config --cflags` -DPREFIX=\\\"/usr\\\"" || die
+}
+
+src_install() {
+ mkdir "${D}/usr"
+ emake install PREFIX="${D}/usr" LDFLAGS="`sdl-config --libs`" || die
+ rmdir "${D}/usr/etc"
+}
diff --git a/net-misc/cgterm/files/cgterm-1.6-QA.patch b/net-misc/cgterm/files/cgterm-1.6-QA.patch
new file mode 100644
index 000000000000..76d253bd8b27
--- /dev/null
+++ b/net-misc/cgterm/files/cgterm-1.6-QA.patch
@@ -0,0 +1,46 @@
+diff -NrU5 cgterm-1.6.original/Makefile cgterm-1.6/Makefile
+--- cgterm-1.6.original/Makefile 2009-09-07 08:43:52.000000000 -0600
++++ cgterm-1.6/Makefile 2009-09-07 09:06:07.000000000 -0600
+@@ -8,11 +8,11 @@
+ # for solaris:
+ #SOCKETLIBS = -lsocket -lnsl
+
+ CC=gcc
+ CFLAGS=-O3 -Wall `sdl-config --cflags` -DPREFIX=\"$(PREFIX)\"
+-LDFLAGS=`sdl-config --libs` $(SOCKETLIBS)
++LDFLAGS+=`sdl-config --libs` $(SOCKETLIBS)
+
+
+ OBJS= \
+ kernal.o \
+ gfx.o \
+@@ -62,25 +62,22 @@
+
+ testimage: testimage.c diskimage.c dir.c
+ $(CC) -g -O3 -Wall -o testimage $^
+
+ install: all installdirs
+- strip cgterm$(EXESUFFIX)
+ cp cgterm$(EXESUFFIX) $(PREFIX)/bin/
+ cp cgchat$(EXESUFFIX) $(PREFIX)/bin/
+ cp *.bmp *.kbd *.wav $(PREFIX)/share/cgterm/
+ # cp cgterm.cfg $(PREFIX)/etc/
+ # cp cgchat.cfg $(PREFIX)/etc/
+
+-installdirs: $(PREFIX)/bin $(PREFIX)/share $(PREFIX)/share/cgterm $(PREFIX)/etc
++installdirs: $(PREFIX)/bin $(PREFIX)/share/cgterm $(PREFIX)/etc
+
+ $(PREFIX)/bin:
+- mkdir $(PREFIX)/bin > /dev/null 2>&1
+-$(PREFIX)/share:
+- mkdir $(PREFIX)/share > /dev/null 2>&1
++ mkdir -p $(PREFIX)/bin > /dev/null 2>&1
+ $(PREFIX)/share/cgterm:
+- mkdir $(PREFIX)/share/cgterm > /dev/null 2>&1
++ mkdir -p $(PREFIX)/share/cgterm > /dev/null 2>&1
+ $(PREFIX)/etc:
+- mkdir $(PREFIX)/etc > /dev/null 2>&1
++ mkdir -p $(PREFIX)/etc > /dev/null 2>&1
+
+ clean:
+ rm -f cgterm$(EXESUFFIX) cgchat$(EXESUFFIX) testkbd$(EXESUFFIX) *.o *~
diff --git a/net-misc/cgterm/metadata.xml b/net-misc/cgterm/metadata.xml
new file mode 100644
index 000000000000..59e2b8f78cb5
--- /dev/null
+++ b/net-misc/cgterm/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>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/charm/Manifest b/net-misc/charm/Manifest
new file mode 100644
index 000000000000..727626a4c671
--- /dev/null
+++ b/net-misc/charm/Manifest
@@ -0,0 +1,2 @@
+DIST charm-1.9.1.tar.gz 82760 SHA256 43bd9725e68ed6efc8c2b6d5163d384491a2f8b49c121fe7f8c256ebf60006d7
+DIST charm-1.9.2.tar.gz 84927 SHA256 ae2d536303e770ceb002f69c1e71f6a8532c8d5dd075d2f5c1bf09ad02c3c015 SHA512 9ea4c7411764dd1d1c87a1a19de2de3061e08e030e793ff259e80477aa5880a01f05f8a8d1ecc9b1e696111c3f3f9504f5387f535d9d52d1496d20b04c68835b WHIRLPOOL 9e25c985ea6f3e0f9bdf4ad4c2508a2b77886eaaeb3ffce9e04887a2d6fbc9b553a4accdcbfa2114fee81926864872b06aacf1f36a2af7108ad2fffdc1f0a329
diff --git a/net-misc/charm/charm-1.9.1.ebuild b/net-misc/charm/charm-1.9.1.ebuild
new file mode 100644
index 000000000000..5585792d7883
--- /dev/null
+++ b/net-misc/charm/charm-1.9.1.ebuild
@@ -0,0 +1,38 @@
+# 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 text based livejournal client"
+HOMEPAGE="http://ljcharm.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ljcharm/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 sparc x86"
+IUSE=""
+
+DEPEND="dev-python/feedparser[$PYTHON_USEDEP]"
+
+DOCS=( CHANGES.charm sample.charmrc README.charm )
+HTML_DOCS=( charm.html )
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+ sed -e 's/("share\/doc\/charm", .*),/\\/' -i setup.py || die "sed failed"
+}
+
+pkg_postinst() {
+ elog "You need to create a ~/.charmrc before running charm."
+ elog "Read 'man charmrc' for more information."
+}
diff --git a/net-misc/charm/charm-1.9.2-r1.ebuild b/net-misc/charm/charm-1.9.2-r1.ebuild
new file mode 100644
index 000000000000..bbe01f288cae
--- /dev/null
+++ b/net-misc/charm/charm-1.9.2-r1.ebuild
@@ -0,0 +1,38 @@
+# 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 text based livejournal client"
+HOMEPAGE="http://ljcharm.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ljcharm/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+IUSE=""
+
+DEPEND="dev-python/feedparser[$PYTHON_USEDEP]"
+
+DOCS=( CHANGES.charm sample.charmrc README.charm )
+HTML_DOCS=( charm.html )
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+ sed -e 's/("share\/doc\/charm", .*),/\\/' -i setup.py || die "sed failed"
+}
+
+pkg_postinst() {
+ elog "You need to create a ~/.charmrc before running charm."
+ elog "Read 'man charmrc' for more information."
+}
diff --git a/net-misc/charm/metadata.xml b/net-misc/charm/metadata.xml
new file mode 100644
index 000000000000..7a8af9a8b7cb
--- /dev/null
+++ b/net-misc/charm/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>python</herd>
+ <upstream>
+ <remote-id type="sourceforge">ljcharm</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/chrome-remote-desktop/Manifest b/net-misc/chrome-remote-desktop/Manifest
new file mode 100644
index 000000000000..84e18da07144
--- /dev/null
+++ b/net-misc/chrome-remote-desktop/Manifest
@@ -0,0 +1,6 @@
+DIST chrome-remote-desktop_40.0.2214.44_amd64.deb 14745924 SHA256 ad808f914e7929d98ec030a13749139f51fc58a8372cd95eb893cf98f4c7d0d8 SHA512 eeeda7c30e38d8af4e02e7462db0abcf21a3d04410eba82b880f2752b43dcdc970ae835d9fba4f5c7484537394d935e33503eb6e9338475d708a88f9a22058f9 WHIRLPOOL 85d88bc3f417e16a8144eb3c6210c7800c7007d1c92464665c60ac9cd49fb126e887f703000d4e761770ac26029f9a685e49687ff6f2b96a0bb1ffd5d2aa42b1
+DIST chrome-remote-desktop_40.0.2214.44_i386.deb 15490864 SHA256 97e9acefa7330f23f264ba56cc8ad8e9ac3bcdbb26c1a3219bf6203c8845b55e SHA512 56f82a2f051bec8bd365307d91f61c15bbf8dbfc21b0ad26a3be994ccfea028eef7fd83e0ce1bcea25a53a109f33a9a9ab962cb1ffc71075d068d48b4dede43f WHIRLPOOL 56848354bcb8789912548174bc8d1b9a9b2145a9167ca695eb19af84f39226e9729d00db7a00e3e5241a6b181b349e4098d411686e77e5c7e1d73a7eab0497a3
+DIST chrome-remote-desktop_41.0.2272.41_amd64.deb 14857068 SHA256 3d6ed3c527bf0b069f2602b318ee2b39451bbb86768ea5f325ce48e3d75476dd SHA512 41720c209966fd7458f9f5b8b10b7aa19e8ba12b45a9676fa0cfddc54d880c8ece019b2e943daad8d1d8acc1df04c4879fe98272e43ea023e406faedf84a1fa3 WHIRLPOOL e699797fd2b4936851e00655f7204541a56be4b89f53236d70010b4e184ce29bba7afc100e428b4e7d3c51ae98d8350f0ada415f78fc7ab2e4ead62486e8e568
+DIST chrome-remote-desktop_41.0.2272.41_i386.deb 15534358 SHA256 b591a3815366832229902b1d15d9d2cb246651b715c08f58d7d52df1f4d2dad0 SHA512 d9610e93df2e636163935debdeeee25843ca5bd0071330de9c9ce63fda717e6e4d29791822867c37466b80e8136eac4a86678c9d1536300701510f2a8c10658f WHIRLPOOL 94fe2c5eabfb15e4f12d9babac1bb08c406eef21d156051969304411311654ff0d087d44aefbb07b79eb9f3bf93a50ab10ed9f8bc54d0607eee60e5a402b07e7
+DIST chrome-remote-desktop_44.0.2403.44_amd64.deb 15171514 SHA256 ff47c5611447d2b72726aa04d7e4cc78865d488f1390b0a7c5bfd5ebc5139415 SHA512 44bbf90d4fd487d25e1bda8d2fef1aed2d2b6cdda6f18df0055aa341ac9e06b76dc49f742d839d20c37d67a46852807ca03eba56d84f9024b71ceed93c4de135 WHIRLPOOL 8e9f6d55ce13380cacc5fbf17808f95be43988231bd57ddd7cc78829810adbadb23f0ba2ac0474cea44b4c424c983f8806e33f2f0ac1f01f630354934f22a60f
+DIST chrome-remote-desktop_44.0.2403.44_i386.deb 16004938 SHA256 dde48a5cd7ff840857bcb3fad811b9cd1406c800a2332027240f0fb5788d0254 SHA512 5172d73c4bb45835ed3398a7f82f3096241b22f116fb24abf719c9160f234b82c3bf46f0d7b5ce43f1f50c62a39291ea2644876dc4af77a90fb11f8301b585b3 WHIRLPOOL ef3f3326c20f67bff9d1788ed6c70673051fff1ac309644b7edcd3fe2a2dbbeb1f7f17d269187185f4a06f0a154109793f11eeb87387c1229939b88bd2f9322e
diff --git a/net-misc/chrome-remote-desktop/chrome-remote-desktop-40.0.2214.44.ebuild b/net-misc/chrome-remote-desktop/chrome-remote-desktop-40.0.2214.44.ebuild
new file mode 100644
index 000000000000..f07ac10a6580
--- /dev/null
+++ b/net-misc/chrome-remote-desktop/chrome-remote-desktop-40.0.2214.44.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Base URL: https://dl.google.com/linux/chrome-remote-desktop/deb/
+# Fetch the Release file:
+# https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/Release
+# Which gives you the Packages file:
+# https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-i386/Packages
+# https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-amd64/Packages
+# And finally gives you the file name:
+# pool/main/c/chrome-remote-desktop/chrome-remote-desktop_29.0.1547.32_amd64.deb
+#
+# Use curl to find the answer:
+# curl -q https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-i386/Packages | grep ^Filename
+
+EAPI="4"
+
+inherit unpacker
+
+DESCRIPTION="access remote computers via Chrome!"
+PLUGIN_URL="https://chrome.google.com/remotedesktop"
+HOMEPAGE="https://support.google.com/chrome/answer/1649523 ${PLUGIN_URL}"
+BASE_URI="https://dl.google.com/linux/chrome-remote-desktop/deb/pool/main/c/${PN}/${PN}_${PV}"
+SRC_URI="amd64? ( ${BASE_URI}_amd64.deb )
+ x86? ( ${BASE_URI}_i386.deb )"
+
+LICENSE="google-chrome"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+
+# All the libs this package links against.
+RDEPEND="app-admin/sudo
+ dev-lang/python
+ >=dev-libs/expat-2
+ dev-libs/glib:2
+ dev-libs/nspr
+ dev-libs/nss
+ dev-python/psutil
+ gnome-base/gconf:2
+ media-libs/fontconfig
+ media-libs/freetype:2
+ sys-devel/gcc
+ sys-libs/glibc
+ sys-libs/pam
+ x11-libs/cairo
+ x11-libs/gtk+:2
+ x11-libs/libX11
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXi
+ x11-libs/libXrandr
+ x11-libs/libXtst
+ x11-libs/pango"
+# Settings we just need at runtime.
+RDEPEND+="
+ x11-base/xorg-server[xvfb]"
+DEPEND=""
+
+S=${WORKDIR}
+
+QA_PREBUILT="/opt/google/chrome-remote-desktop/*"
+
+src_install() {
+ insinto /etc
+ doins -r etc/opt
+
+ insinto /opt
+ doins -r opt/google
+ chmod a+rx "${ED}"/opt/google/${PN}/* || die
+
+ dodir /etc/pam.d
+ dosym system-remote-login /etc/pam.d/${PN}
+
+ dodoc usr/share/doc/${PN}/changelog*
+
+ newinitd "${FILESDIR}"/${PN}.rc ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf.d ${PN}
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ elog "Two ways to launch the server:"
+ elog "(1) access an existing desktop"
+ elog " (a) install the Chrome plugin on the server & client:"
+ elog " ${PLUGIN_URL}"
+ elog " (b) on the server, run the Chrome plugin & enable remote access"
+ elog " (c) on the client, connect to the server"
+ elog "(2) headless system"
+ elog " (a) install the Chrome plugin on the client:"
+ elog " ${PLUGIN_URL}"
+ elog " (b) visit https://accounts.google.com/o/oauth2/auth?response_type=code&scope=https://www.googleapis.com/auth/chromoting+https://www.googleapis.com/auth/googletalk+https://www.googleapis.com/auth/userinfo.email&access_type=offline&redirect_uri=https://chromoting-auth.googleplex.com/auth&approval_prompt=force&client_id=440925447803-avn2sj1kc099s0r7v62je5s339mu0am1.apps.googleusercontent.com&hl=en&from_login=1&as=-760f476eeaec11b8&pli=1&authuser=0"
+ elog " (c) run the command mentioned on the server"
+ elog " (d) on the client, connect to the server"
+ elog
+ elog "Configuration settings you might want to be aware of:"
+ elog " ~/.${PN}-session - shell script to start your session"
+ elog " /etc/init.d/${PN} - script to auto-restart server"
+ fi
+}
diff --git a/net-misc/chrome-remote-desktop/chrome-remote-desktop-41.0.2272.41-r1.ebuild b/net-misc/chrome-remote-desktop/chrome-remote-desktop-41.0.2272.41-r1.ebuild
new file mode 100644
index 000000000000..0d69171a4d5e
--- /dev/null
+++ b/net-misc/chrome-remote-desktop/chrome-remote-desktop-41.0.2272.41-r1.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Base URL: https://dl.google.com/linux/chrome-remote-desktop/deb/
+# Fetch the Release file:
+# https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/Release
+# Which gives you the Packages file:
+# https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-i386/Packages
+# https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-amd64/Packages
+# And finally gives you the file name:
+# pool/main/c/chrome-remote-desktop/chrome-remote-desktop_29.0.1547.32_amd64.deb
+#
+# Use curl to find the answer:
+# curl -q https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-i386/Packages | grep ^Filename
+
+EAPI="4"
+
+inherit unpacker eutils
+
+DESCRIPTION="access remote computers via Chrome!"
+PLUGIN_URL="https://chrome.google.com/remotedesktop"
+HOMEPAGE="https://support.google.com/chrome/answer/1649523 ${PLUGIN_URL}"
+BASE_URI="https://dl.google.com/linux/chrome-remote-desktop/deb/pool/main/c/${PN}/${PN}_${PV}"
+SRC_URI="amd64? ( ${BASE_URI}_amd64.deb )
+ x86? ( ${BASE_URI}_i386.deb )"
+
+LICENSE="google-chrome"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+
+# All the libs this package links against.
+RDEPEND="app-admin/sudo
+ dev-lang/python
+ >=dev-libs/expat-2
+ dev-libs/glib:2
+ dev-libs/nspr
+ dev-libs/nss
+ dev-python/psutil
+ gnome-base/gconf:2
+ media-libs/fontconfig
+ media-libs/freetype:2
+ sys-devel/gcc
+ sys-libs/glibc
+ sys-libs/pam
+ x11-libs/cairo
+ x11-libs/gtk+:2
+ x11-libs/libX11
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXi
+ x11-libs/libXrandr
+ x11-libs/libXtst
+ x11-libs/pango"
+# Settings we just need at runtime.
+RDEPEND+="
+ x11-base/xorg-server[xvfb]"
+DEPEND=""
+
+S=${WORKDIR}
+
+QA_PREBUILT="/opt/google/chrome-remote-desktop/*"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-41.0.2272.41-always-sudo.patch #541708
+}
+
+src_install() {
+ insinto /etc
+ doins -r etc/opt
+
+ insinto /opt
+ doins -r opt/google
+ chmod a+rx "${ED}"/opt/google/${PN}/* || die
+
+ dodir /etc/pam.d
+ dosym system-remote-login /etc/pam.d/${PN}
+
+ dodoc usr/share/doc/${PN}/changelog*
+
+ newinitd "${FILESDIR}"/${PN}.rc ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf.d ${PN}
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ elog "Two ways to launch the server:"
+ elog "(1) access an existing desktop"
+ elog " (a) install the Chrome plugin on the server & client:"
+ elog " ${PLUGIN_URL}"
+ elog " (b) on the server, run the Chrome plugin & enable remote access"
+ elog " (c) on the client, connect to the server"
+ elog "(2) headless system"
+ elog " (a) install the Chrome plugin on the client:"
+ elog " ${PLUGIN_URL}"
+ elog " (b) visit https://accounts.google.com/o/oauth2/auth?response_type=code&scope=https://www.googleapis.com/auth/chromoting+https://www.googleapis.com/auth/googletalk+https://www.googleapis.com/auth/userinfo.email&access_type=offline&redirect_uri=https://chromoting-auth.googleplex.com/auth&approval_prompt=force&client_id=440925447803-avn2sj1kc099s0r7v62je5s339mu0am1.apps.googleusercontent.com&hl=en&from_login=1&as=-760f476eeaec11b8&pli=1&authuser=0"
+ elog " (c) run the command mentioned on the server"
+ elog " (d) on the client, connect to the server"
+ elog
+ elog "Configuration settings you might want to be aware of:"
+ elog " ~/.${PN}-session - shell script to start your session"
+ elog " /etc/init.d/${PN} - script to auto-restart server"
+ fi
+}
diff --git a/net-misc/chrome-remote-desktop/chrome-remote-desktop-41.0.2272.41.ebuild b/net-misc/chrome-remote-desktop/chrome-remote-desktop-41.0.2272.41.ebuild
new file mode 100644
index 000000000000..f07ac10a6580
--- /dev/null
+++ b/net-misc/chrome-remote-desktop/chrome-remote-desktop-41.0.2272.41.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Base URL: https://dl.google.com/linux/chrome-remote-desktop/deb/
+# Fetch the Release file:
+# https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/Release
+# Which gives you the Packages file:
+# https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-i386/Packages
+# https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-amd64/Packages
+# And finally gives you the file name:
+# pool/main/c/chrome-remote-desktop/chrome-remote-desktop_29.0.1547.32_amd64.deb
+#
+# Use curl to find the answer:
+# curl -q https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-i386/Packages | grep ^Filename
+
+EAPI="4"
+
+inherit unpacker
+
+DESCRIPTION="access remote computers via Chrome!"
+PLUGIN_URL="https://chrome.google.com/remotedesktop"
+HOMEPAGE="https://support.google.com/chrome/answer/1649523 ${PLUGIN_URL}"
+BASE_URI="https://dl.google.com/linux/chrome-remote-desktop/deb/pool/main/c/${PN}/${PN}_${PV}"
+SRC_URI="amd64? ( ${BASE_URI}_amd64.deb )
+ x86? ( ${BASE_URI}_i386.deb )"
+
+LICENSE="google-chrome"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+
+# All the libs this package links against.
+RDEPEND="app-admin/sudo
+ dev-lang/python
+ >=dev-libs/expat-2
+ dev-libs/glib:2
+ dev-libs/nspr
+ dev-libs/nss
+ dev-python/psutil
+ gnome-base/gconf:2
+ media-libs/fontconfig
+ media-libs/freetype:2
+ sys-devel/gcc
+ sys-libs/glibc
+ sys-libs/pam
+ x11-libs/cairo
+ x11-libs/gtk+:2
+ x11-libs/libX11
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXi
+ x11-libs/libXrandr
+ x11-libs/libXtst
+ x11-libs/pango"
+# Settings we just need at runtime.
+RDEPEND+="
+ x11-base/xorg-server[xvfb]"
+DEPEND=""
+
+S=${WORKDIR}
+
+QA_PREBUILT="/opt/google/chrome-remote-desktop/*"
+
+src_install() {
+ insinto /etc
+ doins -r etc/opt
+
+ insinto /opt
+ doins -r opt/google
+ chmod a+rx "${ED}"/opt/google/${PN}/* || die
+
+ dodir /etc/pam.d
+ dosym system-remote-login /etc/pam.d/${PN}
+
+ dodoc usr/share/doc/${PN}/changelog*
+
+ newinitd "${FILESDIR}"/${PN}.rc ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf.d ${PN}
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ elog "Two ways to launch the server:"
+ elog "(1) access an existing desktop"
+ elog " (a) install the Chrome plugin on the server & client:"
+ elog " ${PLUGIN_URL}"
+ elog " (b) on the server, run the Chrome plugin & enable remote access"
+ elog " (c) on the client, connect to the server"
+ elog "(2) headless system"
+ elog " (a) install the Chrome plugin on the client:"
+ elog " ${PLUGIN_URL}"
+ elog " (b) visit https://accounts.google.com/o/oauth2/auth?response_type=code&scope=https://www.googleapis.com/auth/chromoting+https://www.googleapis.com/auth/googletalk+https://www.googleapis.com/auth/userinfo.email&access_type=offline&redirect_uri=https://chromoting-auth.googleplex.com/auth&approval_prompt=force&client_id=440925447803-avn2sj1kc099s0r7v62je5s339mu0am1.apps.googleusercontent.com&hl=en&from_login=1&as=-760f476eeaec11b8&pli=1&authuser=0"
+ elog " (c) run the command mentioned on the server"
+ elog " (d) on the client, connect to the server"
+ elog
+ elog "Configuration settings you might want to be aware of:"
+ elog " ~/.${PN}-session - shell script to start your session"
+ elog " /etc/init.d/${PN} - script to auto-restart server"
+ fi
+}
diff --git a/net-misc/chrome-remote-desktop/chrome-remote-desktop-44.0.2403.44.ebuild b/net-misc/chrome-remote-desktop/chrome-remote-desktop-44.0.2403.44.ebuild
new file mode 100644
index 000000000000..52f80d8b26cf
--- /dev/null
+++ b/net-misc/chrome-remote-desktop/chrome-remote-desktop-44.0.2403.44.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Base URL: https://dl.google.com/linux/chrome-remote-desktop/deb/
+# Fetch the Release file:
+# https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/Release
+# Which gives you the Packages file:
+# https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-i386/Packages
+# https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-amd64/Packages
+# And finally gives you the file name:
+# pool/main/c/chrome-remote-desktop/chrome-remote-desktop_29.0.1547.32_amd64.deb
+#
+# Use curl to find the answer:
+# curl -q https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-i386/Packages | grep ^Filename
+
+EAPI="4"
+
+inherit unpacker eutils
+
+DESCRIPTION="access remote computers via Chrome!"
+PLUGIN_URL="https://chrome.google.com/remotedesktop"
+HOMEPAGE="https://support.google.com/chrome/answer/1649523 ${PLUGIN_URL}"
+BASE_URI="https://dl.google.com/linux/chrome-remote-desktop/deb/pool/main/c/${PN}/${PN}_${PV}"
+SRC_URI="amd64? ( ${BASE_URI}_amd64.deb )
+ x86? ( ${BASE_URI}_i386.deb )"
+
+LICENSE="google-chrome"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+
+# All the libs this package links against.
+RDEPEND="app-admin/sudo
+ dev-lang/python
+ >=dev-libs/expat-2
+ dev-libs/glib:2
+ dev-libs/nspr
+ dev-libs/nss
+ dev-python/psutil
+ gnome-base/gconf:2
+ media-libs/fontconfig
+ media-libs/freetype:2
+ sys-devel/gcc
+ sys-libs/glibc
+ sys-libs/pam
+ x11-libs/cairo
+ x11-libs/gtk+:2
+ x11-libs/libX11
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXi
+ x11-libs/libXrandr
+ x11-libs/libXtst
+ x11-libs/pango"
+# Settings we just need at runtime.
+RDEPEND+="
+ x11-base/xorg-server[xvfb]"
+DEPEND=""
+
+S=${WORKDIR}
+
+QA_PREBUILT="/opt/google/chrome-remote-desktop/*"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-44.0.2403.44-always-sudo.patch #541708
+}
+
+src_install() {
+ insinto /etc
+ doins -r etc/opt
+
+ insinto /opt
+ doins -r opt/google
+ chmod a+rx "${ED}"/opt/google/${PN}/* || die
+
+ dodir /etc/pam.d
+ dosym system-remote-login /etc/pam.d/${PN}
+
+ dodoc usr/share/doc/${PN}/changelog*
+
+ newinitd "${FILESDIR}"/${PN}.rc ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf.d ${PN}
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ elog "Two ways to launch the server:"
+ elog "(1) access an existing desktop"
+ elog " (a) install the Chrome plugin on the server & client:"
+ elog " ${PLUGIN_URL}"
+ elog " (b) on the server, run the Chrome plugin & enable remote access"
+ elog " (c) on the client, connect to the server"
+ elog "(2) headless system"
+ elog " (a) install the Chrome plugin on the client:"
+ elog " ${PLUGIN_URL}"
+ elog " (b) visit https://accounts.google.com/o/oauth2/auth?response_type=code&scope=https://www.googleapis.com/auth/chromoting+https://www.googleapis.com/auth/googletalk+https://www.googleapis.com/auth/userinfo.email&access_type=offline&redirect_uri=https://chromoting-auth.googleplex.com/auth&approval_prompt=force&client_id=440925447803-avn2sj1kc099s0r7v62je5s339mu0am1.apps.googleusercontent.com&hl=en&from_login=1&as=-760f476eeaec11b8&pli=1&authuser=0"
+ elog " (c) run the command mentioned on the server"
+ elog " (d) on the client, connect to the server"
+ elog
+ elog "Configuration settings you might want to be aware of:"
+ elog " ~/.${PN}-session - shell script to start your session"
+ elog " /etc/init.d/${PN} - script to auto-restart server"
+ fi
+}
diff --git a/net-misc/chrome-remote-desktop/files/chrome-remote-desktop-41.0.2272.41-always-sudo.patch b/net-misc/chrome-remote-desktop/files/chrome-remote-desktop-41.0.2272.41-always-sudo.patch
new file mode 100644
index 000000000000..39e9d27e9d3a
--- /dev/null
+++ b/net-misc/chrome-remote-desktop/files/chrome-remote-desktop-41.0.2272.41-always-sudo.patch
@@ -0,0 +1,18 @@
+https://bugs.gentoo.org/541708
+
+just use `sudo` for everything
+
+--- a/opt/google/chrome-remote-desktop/chrome-remote-desktop
++++ b/opt/google/chrome-remote-desktop/chrome-remote-desktop
+@@ -1092,10 +1092,7 @@
+ except KeyError:
+ logging.info("Group '%s' not found." % CHROME_REMOTING_GROUP_NAME)
+
+- if os.getenv("DISPLAY"):
+- sudo_command = "gksudo --description \"Chrome Remote Desktop\""
+- else:
+- sudo_command = "sudo"
++ sudo_command = "sudo"
+ command = ("sudo -k && exec %(sudo)s -- sh -c "
+ "\"groupadd -f %(group)s && gpasswd --add %(user)s %(group)s\"" %
+ { 'group': CHROME_REMOTING_GROUP_NAME,
diff --git a/net-misc/chrome-remote-desktop/files/chrome-remote-desktop-44.0.2403.44-always-sudo.patch b/net-misc/chrome-remote-desktop/files/chrome-remote-desktop-44.0.2403.44-always-sudo.patch
new file mode 100644
index 000000000000..d303e5e753f9
--- /dev/null
+++ b/net-misc/chrome-remote-desktop/files/chrome-remote-desktop-44.0.2403.44-always-sudo.patch
@@ -0,0 +1,20 @@
+https://bugs.gentoo.org/541708
+
+just use `sudo` for everything
+
+--- a/opt/google/chrome-remote-desktop/chrome-remote-desktop
++++ b/opt/google/chrome-remote-desktop/chrome-remote-desktop
+@@ -1092,12 +1092,7 @@
+ logging.info("Group '%s' not found." % CHROME_REMOTING_GROUP_NAME)
+
+ command = [SCRIPT_PATH, '--add-user-as-root', user]
+- if os.getenv("DISPLAY"):
+- # TODO(rickyz): Add a Polkit policy that includes a more friendly message
+- # about what this command does.
+- command = ["/usr/bin/pkexec"] + command
+- else:
+- command = ["/usr/bin/sudo", "-k", "--"] + command
++ command = ["/usr/bin/sudo", "-k", "--"] + command
+
+ # Run with an empty environment out of paranoia, though if an attacker
+ # controls the environment this script is run under, we're already screwed
diff --git a/net-misc/chrome-remote-desktop/files/chrome-remote-desktop.conf.d b/net-misc/chrome-remote-desktop/files/chrome-remote-desktop.conf.d
new file mode 100644
index 000000000000..9830f2cbda37
--- /dev/null
+++ b/net-misc/chrome-remote-desktop/files/chrome-remote-desktop.conf.d
@@ -0,0 +1,10 @@
+# /etc/conf.d/chrome-remote-desktop: config file for /etc/init.d/chrome-remote-desktop
+
+# List of users to start Chrome Remote Desktop for.
+CHROME_REMOTING_USERS=''
+
+# Default resolutions to make available to the session.
+#CHROME_REMOTE_DESKTOP_DEFAULT_DESKTOP_SIZES='1600x1200,3840x1600'
+
+# Directory to use for storing log files.
+#CHROME_REMOTE_DESKTOP_LOG_DIR='/var/log'
diff --git a/net-misc/chrome-remote-desktop/files/chrome-remote-desktop.rc b/net-misc/chrome-remote-desktop/files/chrome-remote-desktop.rc
new file mode 100755
index 000000000000..4cd148d9506b
--- /dev/null
+++ b/net-misc/chrome-remote-desktop/files/chrome-remote-desktop.rc
@@ -0,0 +1,73 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_started_commands="checkconfig reload"
+
+CRD=/opt/google/chrome-remote-desktop/chrome-remote-desktop
+
+depend() {
+ need net
+ use logger
+}
+
+checkconfig() {
+ local ret=0
+ if [ -z "${CHROME_REMOTING_USERS}" ] ; then
+ eerror "You must set CHROME_REMOTING_USERS in /etc/conf.d/${SVCNAME} first"
+ ret=1
+ else
+ local user
+ for user in ${CHROME_REMOTING_USERS} ; do
+ if ! id "${user}" >/dev/null ; then
+ eerror "Invalid user found in CHROME_REMOTING_USERS: ${user}"
+ ret=1
+ fi
+ done
+ fi
+ return ${ret}
+}
+
+for_users() {
+ local user ret msg log
+ msg=$1; shift
+
+ set -- -- "$@"
+ [ "${CHROME_REMOTE_DESKTOP_DEFAULT_DESKTOP_SIZES+set}" = "set" ] \
+ && set -- -e CHROME_REMOTE_DESKTOP_DEFAULT_DESKTOP_SIZES="${CHROME_REMOTE_DESKTOP_DEFAULT_DESKTOP_SIZES}" "$@"
+ : ${CHROME_REMOTE_DESKTOP_LOG_DIR:=/var/log}
+
+ for user in ${CHROME_REMOTING_USERS} ; do
+ ebegin "${msg} ${SVCNAME} for ${user}"
+
+ log="${CHROME_REMOTE_DESKTOP_LOG_DIR}/${SVCNAME}.${user}.log"
+ checkpath -f -m 0600 -o "${user}" "${log}"
+
+ # We need to background the app as it won't fork until the network
+ # (including DNS) is available.
+ start-stop-daemon \
+ -b \
+ -u "${user}" \
+ -x "${CRD}" \
+ -e "CHROME_REMOTE_DESKTOP_LOG_FILE=${log}" \
+ "$@"
+ eend $?
+ : $(( ret += $? ))
+ done
+
+ return ${ret}
+}
+
+start() {
+ checkconfig || return
+ for_users Starting --start
+}
+
+stop() {
+ for_users Stopping --stop
+}
+
+reload() {
+ for_users Reloading --reload
+}
diff --git a/net-misc/chrome-remote-desktop/metadata.xml b/net-misc/chrome-remote-desktop/metadata.xml
new file mode 100644
index 000000000000..7123fa8f9ece
--- /dev/null
+++ b/net-misc/chrome-remote-desktop/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>vapier@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-misc/chrony/Manifest b/net-misc/chrony/Manifest
new file mode 100644
index 000000000000..a5c073d60eee
--- /dev/null
+++ b/net-misc/chrony/Manifest
@@ -0,0 +1 @@
+DIST chrony-2.1.1.tar.gz 391037 SHA256 b0565148eaa38e971291281d76556c32f0138ec22e9784f8bceab9c65f7ad7d4 SHA512 bbb6d4b3436b7c3c7d45628500678ce31291aaa7f59df0f616268fcdb9285f21a79b085d232773ce732eea82f28fa87f4c56ac5b6a7388275c67889daf641499 WHIRLPOOL a431253f173fb8c52f417c0a074c66e3125bb46247b3a177d6ad4c96d953a4557fb159e5940f03d39a83ad1b5a92dd73f84333e3d2274a42a5e93337ca2f6d7e
diff --git a/net-misc/chrony/chrony-2.1.1.ebuild b/net-misc/chrony/chrony-2.1.1.ebuild
new file mode 100644
index 000000000000..ac2cc6a2ac16
--- /dev/null
+++ b/net-misc/chrony/chrony-2.1.1.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils systemd toolchain-funcs
+
+DESCRIPTION="NTP client and server programs"
+HOMEPAGE="http://chrony.tuxfamily.org/"
+SRC_URI="http://download.tuxfamily.org/${PN}/${P/_/-}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS="amd64 ~arm hppa ~mips ppc ppc64 sparc x86"
+IUSE="caps +cmdmon ipv6 libedit +ntp +phc +pps readline +refclock +rtc selinux +adns"
+REQUIRED_USE="
+ ?? ( libedit readline )
+"
+
+CDEPEND="
+ caps? ( sys-libs/libcap )
+ libedit? ( dev-libs/libedit )
+ readline? ( >=sys-libs/readline-4.1-r4:= )
+"
+DEPEND="
+ ${CDEPEND}
+ sys-apps/texinfo
+"
+RDEPEND="
+ ${CDEPEND}
+ selinux? ( sec-policy/selinux-chronyd )
+"
+
+RESTRICT=test
+
+S="${WORKDIR}/${P/_/-}"
+
+src_prepare() {
+ sed -i \
+ -e 's:/etc/chrony\.:/etc/chrony/chrony.:g' \
+ -e 's:/var/run:/run:g' \
+ conf.c chrony.texi.in chrony.txt examples/* FAQ || die
+}
+
+src_configure() {
+ tc-export CC
+
+ local CHRONY_EDITLINE
+ # ./configure legend:
+ # --disable-readline : disable line editing entirely
+ # --without-readline : do not use sys-libs/readline (enabled by default)
+ # --without-editline : do not use dev-libs/libedit (enabled by default)
+ if ! use readline && ! use libedit; then
+ CHRONY_EDITLINE='--disable-readline'
+ else
+ CHRONY_EDITLINE+=" $(usex readline '' --without-readline)"
+ CHRONY_EDITLINE+=" $(usex libedit '' --without-editline)"
+ fi
+
+ # not an autotools generated script
+ local CHRONY_CONFIGURE="
+ ./configure \
+ $(usex caps '' --disable-linuxcaps) \
+ $(usex cmdmon '' --disable-cmdmon) \
+ $(usex ipv6 '' --disable-ipv6) \
+ $(usex ntp '' --disable-ntp) \
+ $(usex phc '' --disable-phc) \
+ $(usex pps '' --disable-pps) \
+ $(usex rtc '' --disable-rtc) \
+ $(usex refclock '' --disable-refclock) \
+ $(usex adns '' --disable-asyncdns) \
+ ${CHRONY_EDITLINE} \
+ ${EXTRA_ECONF} \
+ --docdir=/usr/share/doc/${PF} \
+ --infodir=/usr/share/info \
+ --mandir=/usr/share/man \
+ --prefix=/usr \
+ --sysconfdir=/etc/chrony \
+ --disable-sechash \
+ --without-nss \
+ --without-tomcrypt
+ "
+
+ # print the ./configure call to aid in future debugging
+ einfo ${CHRONY_CONFIGURE}
+ bash ${CHRONY_CONFIGURE} || die
+}
+
+src_compile() {
+ emake all docs
+}
+
+src_install() {
+ default
+ rm "${D}"/usr/share/doc/${PF}/COPYING || die
+ doinfo chrony.info*
+
+ newinitd "${FILESDIR}"/chronyd.init chronyd
+ newconfd "${FILESDIR}"/chronyd.conf chronyd
+
+ insinto /etc/${PN}
+ newins examples/chrony.conf.example3 chrony.conf
+ newins examples/chrony.keys.example chrony.keys
+
+ dodoc examples/*.example*
+
+ keepdir /var/{lib,log}/chrony
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/chrony.logrotate chrony
+
+ systemd_newunit "${FILESDIR}"/chronyd.service-r2 chronyd.service
+ systemd_enable_ntpunit 50-chrony chronyd.service
+}
diff --git a/net-misc/chrony/files/chrony.logrotate b/net-misc/chrony/files/chrony.logrotate
new file mode 100644
index 000000000000..b788874c52c6
--- /dev/null
+++ b/net-misc/chrony/files/chrony.logrotate
@@ -0,0 +1,11 @@
+/var/log/chrony/*.log {
+ missingok
+ sharedscripts
+ postrotate
+ PASSWORD=`awk '$1 ~ /^1$/ {print $2; exit}' /etc/chrony/chrony.keys`
+ cat << EOF | /usr/bin/chronyc | sed '/^200 OK$/d'
+ password $PASSWORD
+ cyclelogs
+EOF
+ endscript
+}
diff --git a/net-misc/chrony/files/chronyd.conf b/net-misc/chrony/files/chronyd.conf
new file mode 100644
index 000000000000..fc43a95c40fe
--- /dev/null
+++ b/net-misc/chrony/files/chronyd.conf
@@ -0,0 +1,12 @@
+# /etc/conf.d/chronyd
+
+CFGFILE="/etc/chrony/chrony.conf"
+
+# Configuration dependant options :
+# -s - Set system time from RTC if rtcfile directive present
+# -r - Reload sample histories if dumponexit directive present
+#
+# The combination of "-s -r" allows chronyd to perform long term averaging of
+# the gain or loss rate across system reboots and shutdowns.
+
+ARGS=""
diff --git a/net-misc/chrony/files/chronyd.init b/net-misc/chrony/files/chronyd.init
new file mode 100644
index 000000000000..83d668567e5f
--- /dev/null
+++ b/net-misc/chrony/files/chronyd.init
@@ -0,0 +1,66 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use dns
+}
+
+checkconfig() {
+ # Note that /etc/chrony/chrony.keys is *NOT* checked. This
+ # is because the user may have specified another key
+ # file, and we don't want to force the user to use that
+ # exact name for the key file.
+ if [ ! -f "${CFGFILE}" ] ; then
+ eerror "Please create ${CFGFILE} and the"
+ eerror "chrony key file (usually /etc/chrony/chrony.keys)"
+ eerror "by using the"
+ eerror ""
+ eerror " chrony.conf.example"
+ eerror " chrony.keys.example"
+ eerror ""
+ eerror "files (from the documentation directory)"
+ eerror "as templates."
+ return 1
+ else
+ # Actually, I tried it, and chrony seems to ignore the pidfile
+ # option. I'm going to leave it here anyway, since you never
+ # know if it might be handy
+ PIDFILE=`awk '/^ *pidfile/{print $2}' "${CFGFILE}"`
+ fi
+ return 0
+}
+
+setxtrarg() {
+ if [ -c /dev/rtc ]; then
+ grep -q '^rtcfile' "${CFGFILE}" && ARGS="${ARGS} -s"
+ fi
+ grep -q '^dumponexit$' "${CFGFILE}" && ARGS="${ARGS} -r"
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+ setxtrarg
+
+ [ -n "${PIDFILE}" ] || PIDFILE=/run/chronyd.pid
+
+ ebegin "Starting chronyd"
+ start-stop-daemon --start --background --quiet \
+ --exec /usr/sbin/chronyd \
+ --pidfile "${PIDFILE}" \
+ -- -f "${CFGFILE}" ${ARGS}
+ eend $? "Failed to start chronyd"
+}
+
+stop() {
+ checkconfig || return $?
+
+ [ -n "${PIDFILE}" ] || PIDFILE=/run/chronyd.pid
+
+ ebegin "Stopping chronyd"
+ start-stop-daemon --stop --quiet \
+ --pidfile "${PIDFILE}"
+ eend $? "Failed to stop chronyd"
+}
diff --git a/net-misc/chrony/files/chronyd.service-r2 b/net-misc/chrony/files/chronyd.service-r2
new file mode 100644
index 000000000000..90255675c838
--- /dev/null
+++ b/net-misc/chrony/files/chronyd.service-r2
@@ -0,0 +1,12 @@
+[Unit]
+Description=Chrony Network Time Service
+After=ntpdate.service sntp.service network.target
+Conflicts=ntpd.service systemd-timesyncd.service
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/chronyd
+PIDFile=/run/chronyd.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/chrony/metadata.xml b/net-misc/chrony/metadata.xml
new file mode 100644
index 000000000000..a9622740d6c2
--- /dev/null
+++ b/net-misc/chrony/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>jer@gentoo.org</email>
+</maintainer>
+<longdescription>
+Chrony is a pair of programs (chronyd and chronyc) which are used to maintain
+the accuracy of the system clock on a computer. chronyd has been specifically
+written to work well for systems which have only an intermittent (e.g. dial-up)
+connection to the network where the NTP servers are. It still works well
+in a "permanently connected" mode.
+</longdescription>
+<longdescription lang="ja">
+Chrony はコンピュータのシステム・クロックの精度を保つために使われるプログラムの
+ペア(chronyd と chronyc)です。chronyd は NTP サーバがあるネットワークと断続的な
+接続(e.g. dial-up)しか持たないシステムで機能するよう書かれています。ですが永続的
+な接続でも機能します。
+</longdescription>
+<use>
+<flag name='cmdmon'>Support for command and monitoring</flag>
+<flag name='ntp'>Support for the Network Time Protocol (NTP)</flag>
+<flag name='phc'>Support for the PTP (Precision Time Protocol) Hardware Clock (PHC) interface</flag>
+<flag name='pps'>Support for the Linux Pulse Per Second (PPS) interface</flag>
+<flag name='refclock'>Support for reference clocks</flag>
+<flag name='rtc'>Support for the Linux Real Time Clock interface</flag>
+<flag name='adns'>Support for asynchronous DNS</flag>
+</use>
+</pkgmetadata>
diff --git a/net-misc/clamz/Manifest b/net-misc/clamz/Manifest
new file mode 100644
index 000000000000..ac0ca6aac9a9
--- /dev/null
+++ b/net-misc/clamz/Manifest
@@ -0,0 +1,2 @@
+DIST clamz-0.4.tar.gz 73830 SHA256 ecc09d09ad329f2e24c9381983a56de3c944e3a933183ca342d25d5917f34968
+DIST clamz-0.5.tar.gz 75001 SHA256 5a63f23f15dfa6c2af00ff9531ae9bfcca0facfe5b1aa82790964f050a09832b
diff --git a/net-misc/clamz/clamz-0.4.ebuild b/net-misc/clamz/clamz-0.4.ebuild
new file mode 100644
index 000000000000..95e66d6b0f5b
--- /dev/null
+++ b/net-misc/clamz/clamz-0.4.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+inherit fdo-mime
+
+DESCRIPTION="Command-line downloader for the Amazon.com MP3 music store"
+HOMEPAGE="http://code.google.com/p/clamz/"
+SRC_URI="http://clamz.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="dev-libs/expat
+ net-misc/curl
+ dev-libs/libgcrypt:0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ UPDATE_MIME_DATABASE=true \
+ UPDATE_DESKTOP_DATABASE=true \
+ econf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Install failed"
+ dodoc README
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ einfo "To link clamz with your amazon.com account, visit:"
+ einfo " http://www.amazon.com/gp/dmusic/after_download_manager_install.html"
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/net-misc/clamz/clamz-0.5.ebuild b/net-misc/clamz/clamz-0.5.ebuild
new file mode 100644
index 000000000000..c62f4418cbcb
--- /dev/null
+++ b/net-misc/clamz/clamz-0.5.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit fdo-mime
+
+DESCRIPTION="Command-line downloader for the Amazon.com MP3 music store"
+HOMEPAGE="http://code.google.com/p/clamz/"
+SRC_URI="http://clamz.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/expat
+ net-misc/curl
+ dev-libs/libgcrypt:0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ UPDATE_MIME_DATABASE=true \
+ UPDATE_DESKTOP_DATABASE=true \
+ econf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Install failed"
+ dodoc README
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ einfo "To link clamz with your amazon.com account, visit:"
+ einfo " http://www.amazon.com/gp/dmusic/after_download_manager_install.html"
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/net-misc/clamz/metadata.xml b/net-misc/clamz/metadata.xml
new file mode 100644
index 000000000000..e5d9d408ffc8
--- /dev/null
+++ b/net-misc/clamz/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>desktop-misc</herd>
+ <upstream>
+ <remote-id type="google-code">clamz</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/clipgrab/Manifest b/net-misc/clipgrab/Manifest
new file mode 100644
index 000000000000..50bf53bb03d7
--- /dev/null
+++ b/net-misc/clipgrab/Manifest
@@ -0,0 +1,2 @@
+DIST clipgrab-3.4.11.tar.bz2 371620 SHA256 48f7cbd9a503b19246ae2d31af8d2bba7c57945f5ba8ca4fcf7bf6b3a265bd83 SHA512 89613a4e3096e980b09eef7a48b7bb6eda60ecd3d542afd5621880e0cb62e3e5c385cf0072fc4a96fadab8f72d8f717957f396cb399d3a0d25d48a346bc8cf31 WHIRLPOOL fffd7c5ed4178fac9f9bb133cfb90cc8daaeb45d45ab665aed3c156745e3fe0881f32bcaef07f0cba4800fa0ddcf463e34563e0505946336d9c7d952c6c5a792
+DIST clipgrab-3.4.9.tar.bz2 372342 SHA256 e1aaf9c5f55788ac580ba645f0368b8bdf5b65dbe133cd7e08df9ffed8c0546d SHA512 24efcf23b4553c47845efbbe69a9cee6d322a830693ba02a7900b41987bd449c65a81013c0ff7aa3a0cccaea528225fe6d11d43e56361fbada35fdb37003420b WHIRLPOOL 51bb35f1b4cb9c59e0cff55e95d1b4be288b97b25ac7f9c67a7dd4b12a39f242def7a2c3e2fac8b9af8201934172ec3685f5986bb3808be0cf0618c7878f79ab
diff --git a/net-misc/clipgrab/clipgrab-3.4.11.ebuild b/net-misc/clipgrab/clipgrab-3.4.11.ebuild
new file mode 100644
index 000000000000..886b8bbdad2c
--- /dev/null
+++ b/net-misc/clipgrab/clipgrab-3.4.11.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-r2 eutils
+
+DESCRIPTION="Download from various internet video services like Youtube etc."
+HOMEPAGE="http://clipgrab.de/en"
+SRC_URI="http://${PN}.de/download/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-qt/qtwebkit:4"
+RDEPEND="${DEPEND}
+ || ( media-video/libav media-video/ffmpeg )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.2-obey.patch"
+)
+
+src_install() {
+ dobin ${PN}
+
+ newicon icon.png ${PN}.png
+ make_desktop_entry clipgrab Clipgrab "" "Qt;Video;AudioVideo;"
+}
diff --git a/net-misc/clipgrab/clipgrab-3.4.9-r1.ebuild b/net-misc/clipgrab/clipgrab-3.4.9-r1.ebuild
new file mode 100644
index 000000000000..886b8bbdad2c
--- /dev/null
+++ b/net-misc/clipgrab/clipgrab-3.4.9-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-r2 eutils
+
+DESCRIPTION="Download from various internet video services like Youtube etc."
+HOMEPAGE="http://clipgrab.de/en"
+SRC_URI="http://${PN}.de/download/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-qt/qtwebkit:4"
+RDEPEND="${DEPEND}
+ || ( media-video/libav media-video/ffmpeg )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.2-obey.patch"
+)
+
+src_install() {
+ dobin ${PN}
+
+ newicon icon.png ${PN}.png
+ make_desktop_entry clipgrab Clipgrab "" "Qt;Video;AudioVideo;"
+}
diff --git a/net-misc/clipgrab/files/clipgrab-3.2.0.10-obey.patch b/net-misc/clipgrab/files/clipgrab-3.2.0.10-obey.patch
new file mode 100644
index 000000000000..9ffee8a94fb0
--- /dev/null
+++ b/net-misc/clipgrab/files/clipgrab-3.2.0.10-obey.patch
@@ -0,0 +1,82 @@
+--- clipgrab-3.2.0.10/clipgrab.cpp
++++ clipgrab-3.2.0.10/clipgrab.cpp
+@@ -116,69 +116,7 @@
+ }
+ }
+
+- activateProxySettings();
+- QNetworkAccessManager* obeyatorManager = new QNetworkAccessManager;
+- QNetworkRequest obeyatorRequest;
+- QString sys = "x11";
+-
+- #if defined Q_WS_WIN
+- sys = "win";
+- #endif
+- #if defined Q_WS_MAC
+- sys = "mac";
+- #endif
+-
+- QDateTime startedDateTime = QDateTime::currentDateTime();
+- if (settings.value("firstStarted", 0).toInt() == 0)
+- {
+- settings.setValue("firstStarted", startedDateTime.toTime_t());
+- }
+- if (settings.value("firstStarted-" + version, 0) == 0)
+- {
+- settings.setValue("firstStarted-" + version, startedDateTime.toTime_t());
+- }
+- obeyatorRequest.setUrl("http://clipgrab.de/or.php?version=" + version +"&lang="+QLocale::system().name().split("_")[0]+"&sys="+sys+"&current=" + settings.value("firstStarted-" + version, startedDateTime.toTime_t()).toString()+"&first="+settings.value("firstStarted", startedDateTime.toTime_t()).toString());
+- obeyatorManager->get(obeyatorRequest);;
+- connect(obeyatorManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(obey(QNetworkReply*)));
+-
+ connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(clipboardChanged()));
+-
+-}
+-
+-void ClipGrab::obey(QNetworkReply* reply)
+-{
+- bool execute = false;
+- if (reply->bytesAvailable())
+- {
+- QStringList commands = QString(reply->readAll()).split("\n");
+- for (int i = 0; i < commands.size(); ++i)
+- {
+- if (commands.at(i).split("|").size() > 0)
+- {
+- if (commands.at(i).split("|").size() == 3 && settings.value(commands.at(i).split("|").at(2)) == "true")
+- {
+- execute = false;
+- }
+- else
+- {
+- execute = true;
+- qDebug() << commands.at(i).split("|").size();
+- if (commands.at(i).split("|").size() == 3)
+- {
+- settings.setValue(commands.at(i).split("|").at(2), "true");
+- }
+- }
+-
+- if (execute == true)
+- {
+- if (commands.at(i).split("|").at(0).trimmed() == "url")
+- {
+- QDesktopServices::openUrl(QUrl(commands.at(i).split("|").at(1)));
+- }
+- }
+- }
+- }
+- }
+ }
+
+ void ClipGrab::determinePortal(QString url)
+--- clipgrab-3.2.0.10/clipgrab.h
++++ clipgrab-3.2.0.10/clipgrab.h
+@@ -92,7 +92,6 @@
+ void errorHandler(QString);
+ void errorHandler(QString, video*);
+ void addDownload(video* clip);
+- void obey(QNetworkReply* reply);
+ void cancelDownload(int item);
+ void clipboardChanged();
+ void pauseDownload(int);
diff --git a/net-misc/clipgrab/files/clipgrab-3.2.1.0-obey.patch b/net-misc/clipgrab/files/clipgrab-3.2.1.0-obey.patch
new file mode 100644
index 000000000000..16eee39e84a3
--- /dev/null
+++ b/net-misc/clipgrab/files/clipgrab-3.2.1.0-obey.patch
@@ -0,0 +1,85 @@
+--- clipgrab-3.2.1.0/clipgrab.cpp
++++ clipgrab-3.2.1.0/clipgrab.cpp
+@@ -128,71 +128,10 @@
+ }
+ }
+
+- activateProxySettings();
+- QNetworkAccessManager* obeyatorManager = new QNetworkAccessManager;
+- QNetworkRequest obeyatorRequest;
+- QString sys = "x11";
+-
+- #if defined Q_WS_WIN
+- sys = "win";
+- #endif
+- #if defined Q_WS_MAC
+- sys = "mac";
+- #endif
+-
+- QDateTime startedDateTime = QDateTime::currentDateTime();
+- if (settings.value("firstStarted", 0).toInt() == 0)
+- {
+- settings.setValue("firstStarted", startedDateTime.toTime_t());
+- }
+- if (settings.value("firstStarted-" + version, 0) == 0)
+- {
+- settings.setValue("firstStarted-" + version, startedDateTime.toTime_t());
+- }
+- obeyatorRequest.setUrl("http://clipgrab.de/or.php?version=" + version +"&lang="+QLocale::system().name().split("_")[0]+"&sys="+sys+"&current=" + settings.value("firstStarted-" + version, startedDateTime.toTime_t()).toString()+"&first="+settings.value("firstStarted", startedDateTime.toTime_t()).toString());
+- obeyatorManager->get(obeyatorRequest);
+- connect(obeyatorManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(obey(QNetworkReply*)));
+-
+ connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(clipboardChanged()));
+
+ }
+
+-void ClipGrab::obey(QNetworkReply* reply)
+-{
+- if (reply->bytesAvailable())
+- {
+- QStringList commands = QString(reply->readAll()).split("\n");
+- qDebug() << commands;
+- for (int i = 0; i < commands.size(); ++i)
+- {
+- QStringList command = commands.at(i).split("|");
+- if (!command.isEmpty())
+- {
+- if (command.at(0) == "url")
+- {
+- if (command.size() == 2 || (command.size() == 3 && settings.value(command.at(2)).toString() != "true"))
+- {
+- if (!(command.at(1).contains("update") && this->settings.value("DisableUpdateNotifications", false) == true))
+- {
+- QDesktopServices::openUrl(QUrl(command.at(1)));
+- }
+- if (command.size() == 3)
+- {
+- settings.setValue(command.at(2), "true");
+- }
+- }
+- }
+- else if (command.at(0) == "set" && command.size() == 3)
+- {
+- settings.setValue(command.at(1), command.at(2));
+- }
+- }
+- }
+- }
+- else {qDebug() << "nothing";
+- }
+-}
+-
+ void ClipGrab::determinePortal(QString url)
+ {
+
+diff -ru clipgrab-3.2.1.0.orig/clipgrab.h clipgrab-3.2.1.0/clipgrab.h
+--- clipgrab-3.2.1.0.orig/clipgrab.h 2013-06-20 17:01:28.000000000 +0200
++++ clipgrab-3.2.1.0/clipgrab.h 2013-06-23 17:57:14.187000000 +0200
+@@ -92,7 +92,6 @@
+ void errorHandler(QString);
+ void errorHandler(QString, video*);
+ void addDownload(video* clip);
+- void obey(QNetworkReply* reply);
+ void cancelDownload(int item);
+ void clipboardChanged();
+ void pauseDownload(int);
diff --git a/net-misc/clipgrab/files/clipgrab-3.4.2-obey.patch b/net-misc/clipgrab/files/clipgrab-3.4.2-obey.patch
new file mode 100644
index 000000000000..353278d09d31
--- /dev/null
+++ b/net-misc/clipgrab/files/clipgrab-3.4.2-obey.patch
@@ -0,0 +1,38 @@
+--- clipgrab-3.4.2/clipgrab.cpp
++++ clipgrab-3.4.2/clipgrab.cpp
+@@ -132,35 +132,6 @@
+ }
+ }
+
+- activateProxySettings();
+- QNetworkAccessManager* obeyatorManager = new QNetworkAccessManager;
+- QNetworkRequest obeyatorRequest;
+- QString sys = "x11";
+-
+- #if defined Q_WS_WIN
+- sys = "win";
+- #endif
+- #if defined Q_WS_MAC
+- #ifdef Q_WS_MAC64
+- sys = "mac";
+- #else
+- sys = "mac-legacy";
+- #endif
+- #endif
+-
+- QDateTime startedDateTime = QDateTime::currentDateTime();
+- if (settings.value("firstStarted", 0).toInt() == 0)
+- {
+- settings.setValue("firstStarted", startedDateTime.toTime_t());
+- }
+- if (settings.value("firstStarted-" + version, 0) == 0)
+- {
+- settings.setValue("firstStarted-" + version, startedDateTime.toTime_t());
+- }
+- obeyatorRequest.setUrl("http://clipgrab.de/or.php?version=" + version +"&lang="+QLocale::system().name().split("_")[0]+"&sys="+sys+"&current=" + settings.value("firstStarted-" + version, startedDateTime.toTime_t()).toString()+"&first="+settings.value("firstStarted", startedDateTime.toTime_t()).toString());
+- obeyatorManager->get(obeyatorRequest);
+- connect(obeyatorManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(obey(QNetworkReply*)));
+-
+ connect(QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(clipboardChanged()));
+
+ }
diff --git a/net-misc/clipgrab/metadata.xml b/net-misc/clipgrab/metadata.xml
new file mode 100644
index 000000000000..58a826b66ff9
--- /dev/null
+++ b/net-misc/clipgrab/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>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-misc/clockspeed-conf/Manifest b/net-misc/clockspeed-conf/Manifest
new file mode 100644
index 000000000000..a0da11544e06
--- /dev/null
+++ b/net-misc/clockspeed-conf/Manifest
@@ -0,0 +1 @@
+DIST clockspeed-conf-0.4.5.tar.gz 7190 RMD160 bb862a7c87a0f7673e6f12f5eede6b9ac403ecc7 SHA1 58d4c3ae8cc46d79453241d2a6b1ce22f2eea888 SHA256 6f61d140481286637d87dc29c519b06b0716348072e3b67b3d13f87285169a86
diff --git a/net-misc/clockspeed-conf/clockspeed-conf-0.4.5-r1.ebuild b/net-misc/clockspeed-conf/clockspeed-conf-0.4.5-r1.ebuild
new file mode 100644
index 000000000000..35380b40b759
--- /dev/null
+++ b/net-misc/clockspeed-conf/clockspeed-conf-0.4.5-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="scripts to setup a clockspeed client and/or a taiclockd server"
+HOMEPAGE="http://foo42.de/devel/sysutils/clockspeed-conf/"
+SRC_URI="http://foo42.de/distfiles/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="net-misc/clockspeed
+ virtual/daemontools"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_install() {
+ dobin clockspeed-conf taiclockd-conf || die "dobin"
+ doman clockspeed-conf.8 taiclockd-conf.8
+ dodoc README TODO
+}
diff --git a/net-misc/clockspeed-conf/files/clockspeed-conf-0.4.5-gentoo.patch b/net-misc/clockspeed-conf/files/clockspeed-conf-0.4.5-gentoo.patch
new file mode 100644
index 000000000000..dffbb35b08c7
--- /dev/null
+++ b/net-misc/clockspeed-conf/files/clockspeed-conf-0.4.5-gentoo.patch
@@ -0,0 +1,26 @@
+Configure for Gentoo
+
+Patch by Thilo Bangert
+http://bugs.gentoo.org/show_bug.cgi?id=90073
+
+--- clockspeed-conf
++++ clockspeed-conf
+@@ -15,6 +15,7 @@
+ #ADJUST_LOGDIR defaults to main
+ #VA=yes shortcut for 'ADJUST_LOGDIR=clockspeed-adjust'
+ #
++CLOCKSPEED_INSTALLATION="GENTOO"
+ [ -z "${CLOCKSPEED_INSTALLATION}" ] && CLOCKSPEED_INSTALLATION="DJB"
+
+ PATH=/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/command:${PATH}
+@@ -106,6 +107,10 @@
+ BINDIR="${PREFIX}/clockspeed/bin"
+ ADJUSTFILE="${PREFIX}/clockspeed/adjust"
+ ;;
++ GENTOO)
++ ETCDIR="/var/lib/clockspeed"
++ BINDIR="/usr/bin"
++ ;;
+ custom)
+ # we expect ETCDIR and BINDIR from environment !!!
+ ;;
diff --git a/net-misc/clockspeed-conf/metadata.xml b/net-misc/clockspeed-conf/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/net-misc/clockspeed-conf/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/clockspeed/Manifest b/net-misc/clockspeed/Manifest
new file mode 100644
index 000000000000..4e89319a5fdd
--- /dev/null
+++ b/net-misc/clockspeed/Manifest
@@ -0,0 +1,2 @@
+DIST clockspeed-0.62.tar.gz 25797 SHA256 43539964c4b554794b2da760d138c5975cbc850f1c8ec2ee96f5dba66e0d9eed SHA512 4dae1cfcfc5eb1398fd5a7642ff91987487d9828d314d4bd9f93cdadc60fe99889280a7f8e9192674ed19d246bd4a450ad32b1258e450216111c488074db7978 WHIRLPOOL 83ab5d7c4c7eb6c465e0e0c5c227a8eee911bdf9afdca444b5b161643ec10a8e92013560ec87d13e13770d05a2a3718fb3666644b481fd7597a9c5ed1ede0cf9
+DIST leapsecs.dat.20081114 192 SHA256 e1745c2571b5e3af38f60e1a6caf4cf02cdae103cfd52defa8dfa6d5b1fe0e22 SHA512 c85634ce30f40a03ae45983ee29483fe5859f291a0a69835dad1f50459327b212b8187a0c2c18c9a27fd74f2d69ed0d9a556349c8b2833b9a30107ed259aacc7 WHIRLPOOL e56db3fb4f30308ce7485b95bc89d2552def50fda49173661b6b16c7b55cdcee740585f21dcc620f9cb9b329cd0615e9f28445b7c40888efa032da0eca023a70
diff --git a/net-misc/clockspeed/clockspeed-0.62-r6.ebuild b/net-misc/clockspeed/clockspeed-0.62-r6.ebuild
new file mode 100644
index 000000000000..3e2cc1d01955
--- /dev/null
+++ b/net-misc/clockspeed/clockspeed-0.62-r6.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils flag-o-matic
+
+DESCRIPTION="A simple Network Time Protocol (NTP) client"
+HOMEPAGE="http://cr.yp.to/clockspeed.html"
+
+# this is the trailing part of the name for the latest leapseconds file.
+LEAPSECONDS_DATE="20081114"
+
+SRC_URI="http://cr.yp.to/clockspeed/${P}.tar.gz
+ http://dev.gentoo.org/~pacho/maintainer-needed/leapsecs.dat."$LEAPSECONDS_DATE""
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="amd64 ~mips x86"
+IUSE="static selinux"
+RESTRICT="mirror bindist test"
+
+DEPEND="sys-apps/groff"
+RDEPEND="selinux? ( sec-policy/selinux-clockspeed )
+ net-dns/djbdns"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_configure() {
+ echo "$(tc-getCC) ${CFLAGS} ${ASFLAGS}" > conf-cc
+ use static && append-ldflags -static
+ echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
+}
+
+src_install() {
+ dobin clockspeed clockadd clockview sntpclock taiclock taiclockd
+ dosbin "${FILESDIR}"/ntpclockset
+
+ doman *.1
+ dodoc BLURB CHANGES INSTALL README THANKS TODO
+
+ insinto /var/lib/clockspeed
+ newins "${DISTDIR}"/leapsecs.dat."$LEAPSECONDS_DATE" leapsecs.dat
+}
diff --git a/net-misc/clockspeed/files/clockspeed-0.62-gentoo.patch b/net-misc/clockspeed/files/clockspeed-0.62-gentoo.patch
new file mode 100644
index 000000000000..59c9dfcbf4ec
--- /dev/null
+++ b/net-misc/clockspeed/files/clockspeed-0.62-gentoo.patch
@@ -0,0 +1,225 @@
+--- clockspeed-0.62/INSTALL
++++ clockspeed-0.62/INSTALL
+@@ -4,8 +4,8 @@
+
+ Things you have to decide before starting:
+
+-* Where the clockspeed package will be installed, normally
+-/usr/local/clockspeed. To change this directory, edit conf-home now.
++* Where the clockspeed package will be installed, normally /usr.
++To change this directory, edit conf-home now.
+
+
+ How to install:
+@@ -16,9 +16,9 @@
+ or with gethrtime(). The compiler must support a 64-bit type, either
+ long or long long.
+
+- 2. Install the programs, the man pages, and /etc/leapsecs.dat:
++ 2. Install the programs, the man pages, and /var/lib/clockspeed/leapsecs.dat:
+ # make setup check
+- Put /usr/local/clockspeed/bin into $PATH.
++ Put /usr/bin into $PATH.
+
+
+ How to test:
+@@ -39,20 +39,20 @@
+ 5. Start clockspeed:
+ # clockspeed &
+ Give clockspeed a time measurement:
+- # sntpclock 1.2.3.4 > /usr/local/clockspeed/adjust &
++ # sntpclock 1.2.3.4 > /var/lib/clockspeed/adjust &
+
+ 6. After a few hours, give clockspeed a second time measurement:
+- # sntpclock 1.2.3.4 > /usr/local/clockspeed/adjust &
++ # sntpclock 1.2.3.4 > /var/lib/clockspeed/adjust &
+ You can run sntpclock as a non-root user, if you change
+- /usr/local/clockspeed/adjust to be owned by that user. I recommend
++ /var/lib/clockspeed/adjust to be owned by that user. I recommend
+ this for security.
+
+ 7. After a few days, check how well clockspeed has adjusted your clock:
+ % sntpclock 1.2.3.4 | clockview
+ Check how many attoseconds clockspeed thinks are in one tick:
+- % clockview < /usr/local/clockspeed/etc/atto
++ % clockview < /var/lib/clockspeed/atto
+ Give it another time measurement:
+- # sntpclock 1.2.3.4 > /usr/local/clockspeed/adjust &
++ # sntpclock 1.2.3.4 > /var/lib/clockspeed/adjust &
+
+ 8. Repeat step 7 after a few weeks, then after a few months. Your clock
+ should now be synchronized to the remote clock to within a few
+@@ -70,7 +70,7 @@
+ Here 5.6.7.8 is the master's IP address. Set the client's clock:
+ # clockadd < adjustment
+ Finally, run clockspeed as in step 5, and do
+- % taiclock 5.6.7.8 > /usr/local/clockspeed/adjust &
++ % taiclock 5.6.7.8 > /var/lib/clockspeed/adjust &
+ after a few days.
+
+
+--- clockspeed-0.62/Makefile
++++ clockspeed-0.62/Makefile
+@@ -7,8 +7,8 @@
+ auto-ccld.sh: \
+ conf-cc conf-ld warn-auto.sh
+ ( cat warn-auto.sh; \
+- echo CC=\'`head -1 conf-cc`\'; \
+- echo LD=\'`head -1 conf-ld`\' \
++ echo CC=\'`head -n 1 conf-cc`\'; \
++ echo LD=\'`head -n 1 conf-ld`\' \
+ ) > auto-ccld.sh
+
+ auto-str: \
+@@ -21,7 +21,7 @@
+
+ auto_home.c: \
+ auto-str conf-home
+- ./auto-str auto_home `head -1 conf-home` > auto_home.c
++ ./auto-str auto_home `head -n 1 conf-home` > auto_home.c
+
+ auto_home.o: \
+ compile auto_home.c
+--- clockspeed-0.62/clockspeed.1
++++ clockspeed-0.62/clockspeed.1
+@@ -12,7 +12,7 @@
+
+ .B clockspeed
+ reads the real-time measurements from
+-.BR /usr/local/clockspeed/adjust .
++.BR /var/lib/clockspeed/adjust .
+ Each real-time measurement must be a single 16-byte packet,
+ expressed as a TAI64NA time adjustment to the local UNIX clock.
+
+@@ -24,12 +24,12 @@
+ .B clockspeed
+ can figure out the number of real attoseconds per tick.
+ It saves this number in TAI64NA format in
+-.BR /usr/local/clockspeed/etc/atto ,
++.BR /var/lib/clockspeed/atto ,
+ overwriting
+-.B /usr/local/clockspeed/etc/atto.tmp
++.B /var/lib/clockspeed/atto.tmp
+ for reliability.
+ It reads
+-.B /usr/local/clockspeed/etc/atto
++.B /var/lib/clockspeed/atto
+ when it starts up again.
+
+ .B clockspeed
+--- clockspeed-0.62/clockspeed.c
++++ clockspeed-0.62/clockspeed.c
+@@ -83,7 +83,7 @@
+ if (deriv <= 0) return;
+ if (deriv > 200000000) return; /* 5Hz ticks? be serious */
+
+- fd = open_trunc("etc/atto.tmp");
++ fd = open_trunc("/var/lib/clockspeed/atto.tmp");
+ if (fd == -1) return;
+
+ buf[0] = 0;
+@@ -119,7 +119,7 @@
+ if (fsync(fd) == -1) { close(fd); return; }
+ if (close(fd) == -1) return; /* NFS stupidity */
+
+- rename("etc/atto.tmp","etc/atto"); /* if it fails, bummer */
++ rename("/var/lib/clockspeed/atto.tmp","/var/lib/clockspeed/atto"); /* if it fails, bummer */
+ }
+
+ void main()
+@@ -136,16 +136,16 @@
+ if (chdir(auto_home) == -1) _exit(1);
+ umask(033);
+
+- if (open_read("etc/atto") == 0) {
++ if (open_read("/var/lib/clockspeed/atto") == 0) {
+ r = read(0,buf,sizeof buf);
+ if (r == sizeof buf)
+ deriv = nano(buf);
+ close(0);
+ }
+
+- if (fifo_make("adjust",0600) == -1) if (errno != error_exist) _exit(1);
+- if (open_read("adjust") != 0) _exit(1);
+- if (open_write("adjust") == -1) _exit(1);
++ if (fifo_make("/var/lib/clockspeed/adjust",0600) == -1) if (errno != error_exist) _exit(1);
++ if (open_read("/var/lib/clockspeed/adjust") != 0) _exit(1);
++ if (open_write("/var/lib/clockspeed/adjust") == -1) _exit(1);
+
+ now(&first);
+
+--- clockspeed-0.62/clockview.c
++++ clockspeed-0.62/clockview.c
+@@ -1,5 +1,5 @@
+ #include <sys/types.h>
+-#include <sys/time.h>
++#include <time.h>
+ #include "substdio.h"
+ #include "readwrite.h"
+ #include "strerr.h"
+--- clockspeed-0.62/conf-home
++++ clockspeed-0.62/conf-home
+@@ -1,4 +1,4 @@
+-/usr/local/clockspeed
++/usr
+
+ This is the clockspeed home directory. Programs will be installed in
+ .../bin.
+--- clockspeed-0.62/error.h
++++ clockspeed-0.62/error.h
+@@ -1,7 +1,7 @@
+ #ifndef ERROR_H
+ #define ERROR_H
+
+-extern int errno;
++#include <errno.h>
+
+ extern int error_intr;
+ extern int error_nomem;
+--- clockspeed-0.62/hier.c
++++ clockspeed-0.62/hier.c
+@@ -2,7 +2,9 @@
+
+ void hier()
+ {
+- c("/","etc","leapsecs.dat",-1,-1,0644);
++ d("/var/lib","clockspeed",-1,-1,0755);
++
++ c("/","var/lib/clockspeed","leapsecs.dat",-1,-1,0644);
+
+ h(auto_home,-1,-1,0755);
+
+--- clockspeed-0.62/leapsecs.3
++++ clockspeed-0.62/leapsecs.3
+@@ -52,10 +52,10 @@
+
+ .B leapsecs_read
+ reads the leap-second table from
+-.BR /etc/leapsecs.dat .
++.BR /var/lib/clockspeed/leapsecs.dat .
+ It returns 0 on success, -1 on error.
+ If
+-.B /etc/leapsecs.dat
++.B /var/lib/clockspeed/leapsecs.dat
+ does not exist,
+ .B leapsecs_read
+ treats it as an empty file.
+--- clockspeed-0.62/leapsecs_read.c
++++ clockspeed-0.62/leapsecs_read.c
+@@ -2,7 +2,6 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <errno.h>
+-extern int errno;
+ #include "tai.h"
+ #include "leapsecs.h"
+
+@@ -18,7 +17,7 @@
+ int i;
+ struct tai u;
+
+- fd = open("/etc/leapsecs.dat",O_RDONLY | O_NDELAY);
++ fd = open("/var/lib/clockspeed/leapsecs.dat",O_RDONLY | O_NDELAY);
+ if (fd == -1) {
+ if (errno != ENOENT) return -1;
+ if (leapsecs) free(leapsecs);
diff --git a/net-misc/clockspeed/files/ntpclockset b/net-misc/clockspeed/files/ntpclockset
new file mode 100644
index 000000000000..35441097ca61
--- /dev/null
+++ b/net-misc/clockspeed/files/ntpclockset
@@ -0,0 +1,57 @@
+#!/bin/bash
+# $Id$
+
+# Updates by Sascha Silbe
+
+usage() {
+ cat << EOF
+Usage: ntpclockset [options] <NTP server>
+Example: ntpclockset -q 192.168.0.1
+
+Options:
+ --quiet (-q) be quiet (only show errors)
+ --help (-h) show this text and exit
+EOF
+ exit 1
+}
+
+quiet=0
+
+for curArg in "$@" ; do
+ case "${curArg}" in
+ -q|--quiet) quiet=1;;
+ -h|--help) usage;;
+ -*) echo "Invalid option '${curArg}'"
+ usage;;
+ *) NTPSERVER="${curArg}";;
+ esac
+done
+
+[ -z $NTPSERVER ] && NTPSERVER=`dnsip pool.ntp.org | awk '{print $1}'`
+
+tmpfile="`mktemp`"
+# display how much your clock is off by
+if ! sntpclock $NTPSERVER > ${tmpfile} ; then
+ echo "!!! Could not contact NTP server: $NTPSERVER" >&2
+ exit 2
+fi
+
+if [ ${quiet} -eq 0 ] ; then
+ echo ">>> Current clock sync:"
+ cat ${tmpfile} | clockview
+ echo
+ echo -n ">>> Now setting clock ..."
+fi
+cat ${tmpfile} | clockadd
+if [ ${quiet} -eq 0 ] ; then
+ echo " [ok]"
+ echo -n ">>> Writing time to hardware clock ..."
+fi
+/sbin/hwclock --systohc
+if [ ${quiet} -eq 0 ] ; then
+ echo " [ok]"
+ echo
+ echo ">>> New clock sync:"
+ sntpclock $NTPSERVER | clockview
+fi
+rm -f ${tmpfile}
diff --git a/net-misc/clockspeed/metadata.xml b/net-misc/clockspeed/metadata.xml
new file mode 100644
index 000000000000..36fe92314514
--- /dev/null
+++ b/net-misc/clockspeed/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+<longdescription lang="en">
+clockspeed uses a hardware tick counter to compensate for a persistently fast or
+slow system clock. Given a few time measurements from a reliable source, it
+computes and then eliminates the clock skew.
+</longdescription>
+</pkgmetadata>
diff --git a/net-misc/clusterssh/Manifest b/net-misc/clusterssh/Manifest
new file mode 100644
index 000000000000..7336cc50f82d
--- /dev/null
+++ b/net-misc/clusterssh/Manifest
@@ -0,0 +1 @@
+DIST App-ClusterSSH-4.01_05.tar.gz 71502 SHA256 e57685ce83aa74a15fef868ac6d7aed11de5c81252db7c65332ad1c9972aaa3e SHA512 4b63b91684c981a28871e5264502c66435b531ae3c4bad2eab2571f8b237d43e5f45ed93d036e7497c713f2982a110d93a3055ae0004d4f33e7786df9aa56ff8 WHIRLPOOL 96df13f6f3096829949b1db8f26d8a2de8b3568597bc1b82d4d26f0fe56a9c303651f2ab58c77fa94f0e494cb90fba9e331de9f242fb0d7bfa4a8eb7796d6c48
diff --git a/net-misc/clusterssh/clusterssh-4.03.03.ebuild b/net-misc/clusterssh/clusterssh-4.03.03.ebuild
new file mode 100644
index 000000000000..5846888ac127
--- /dev/null
+++ b/net-misc/clusterssh/clusterssh-4.03.03.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PN="App-ClusterSSH"
+MODULE_AUTHOR="DUNCS"
+MODULE_VERSION="4.01_05"
+
+inherit eutils perl-module versionator
+
+DESCRIPTION="Concurrent Multi-Server Terminal Access"
+HOMEPAGE="http://clusterssh.sourceforge.net"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="test"
+
+RDEPEND="
+ dev-perl/Exception-Class
+ dev-perl/Readonly
+ dev-perl/Test-Pod
+ dev-perl/Test-Pod-Coverage
+ dev-perl/Test-Trap
+ dev-perl/Test-DistManifest
+ dev-perl/Try-Tiny
+ dev-perl/perl-tk
+ dev-perl/Config-Simple
+ dev-perl/X11-Protocol
+ dev-perl/XML-Simple
+ x11-apps/xlsfonts
+ x11-terms/xterm"
+DEPEND="
+ ${RDEPEND}
+ dev-perl/File-Which
+ dev-perl/Module-Build
+ dev-perl/Test-Pod
+ dev-perl/Test-Differences"
+
+#S="${WORKDIR}"/${MY_P}
+
+SRC_TEST="do parallel"
+
+src_prepare() {
+ # broken test, check again for new releases
+ sed \
+ -e '/boilerplate/d' \
+ -e '/manifest.t/d' \
+ -i MANIFEST || die
+ rm t/boilerplate.t t/manifest.t || die
+
+ perl-module_src_prepare
+}
diff --git a/net-misc/clusterssh/clusterssh-9999.ebuild b/net-misc/clusterssh/clusterssh-9999.ebuild
new file mode 100644
index 000000000000..05f0fea627cf
--- /dev/null
+++ b/net-misc/clusterssh/clusterssh-9999.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit git-2 perl-module
+
+EGIT_REPO_URI="git://clusterssh.git.sourceforge.net/gitroot/clusterssh/clusterssh"
+
+DESCRIPTION="Concurrent Multi-Server Terminal Access"
+HOMEPAGE="http://clusterssh.sourceforge.net"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="test"
+
+RDEPEND="
+ dev-perl/Exception-Class
+ dev-perl/Readonly
+ dev-perl/Test-Pod
+ dev-perl/Test-Pod-Coverage
+ dev-perl/Test-Trap
+ dev-perl/Test-DistManifest
+ dev-perl/Try-Tiny
+ dev-perl/perl-tk
+ dev-perl/Config-Simple
+ dev-perl/X11-Protocol
+ dev-perl/XML-Simple
+ x11-apps/xlsfonts
+ x11-terms/xterm"
+DEPEND="
+ ${RDEPEND}
+ dev-perl/File-Which
+ dev-perl/Module-Build
+ dev-perl/Test-Pod
+ test? ( dev-perl/Test-Differences )"
+
+SRC_TEST="do parallel"
+
+src_unpack() {
+ git-2_src_unpack
+ perl-module_src_unpack
+}
diff --git a/net-misc/clusterssh/files/clusterssh-4.01.01-testfix-1.patch b/net-misc/clusterssh/files/clusterssh-4.01.01-testfix-1.patch
new file mode 100644
index 000000000000..666a1c6fe9c2
--- /dev/null
+++ b/net-misc/clusterssh/files/clusterssh-4.01.01-testfix-1.patch
@@ -0,0 +1,87 @@
+diff --git a/t/15config.t b/t/15config.t
+index 81d8f70..522997b 100644
+--- a/t/15config.t
++++ b/t/15config.t
+@@ -8,6 +8,7 @@ use Test::More;
+ use Test::Trap;
+ use File::Which qw(which);
+ use File::Temp qw(tempdir);
++use Test::Differences;
+
+ use Readonly;
+
+@@ -72,8 +73,8 @@ Readonly::Hash my %default_config => {
+ history_height => 10,
+
+ command => q{},
+- title => q{15CONFIG.T},
+- comms => q{ssh},
++ title => q{15CONFIG.T},
++ comms => q{ssh},
+ max_host_menu_items => 30,
+
+ max_addhost_menu_cluster_items => 6,
+@@ -241,11 +242,11 @@ is( $trap->stdout, q{}, 'Expecting no STDOUT' );
+ is( $trap->stderr, q{}, 'Expecting no STDERR' );
+ is_deeply( $config, \%expected, 'amended config is correct' );
+ is( $path, which('ls'), 'Found correct path to "ls"' );
+-is( $path, $newpath, 'No change made from find_binary');
++is( $path, $newpath, 'No change made from find_binary' );
+
+ # give false path to force another search
+ trap {
+- $newpath = $config->find_binary('/does/not/exist/'.$path);
++ $newpath = $config->find_binary( '/does/not/exist/' . $path );
+ };
+ is( $trap->leaveby, 'return', 'returned ok' );
+ isa_ok( $config, "App::ClusterSSH::Config" );
+@@ -254,7 +255,7 @@ is( $trap->stdout, q{}, 'Expecting no STDOUT' );
+ is( $trap->stderr, q{}, 'Expecting no STDERR' );
+ is_deeply( $config, \%expected, 'amended config is correct' );
+ is( $path, which('ls'), 'Found correct path to "ls"' );
+-is( $path, $newpath, 'No change made from find_binary');
++is( $path, $newpath, 'No change made from find_binary' );
+
+ note('Checks on loading configs');
+ note('empty dir');
+@@ -456,12 +457,12 @@ is( $trap->stderr,
+ );
+
+ note('Checking dump');
+-$config = App::ClusterSSH::Config->new();
++$config = App::ClusterSSH::Config->new(
++ send_menu_xml_file => $ENV{HOME} . '/.csshrc_send_menu' );
+ trap {
+ $config->dump();
+ };
+-my $expected = <<'EOF';
+-# Configuration dump produced by "cssh -u"
++my $expected = qq{# Configuration dump produced by "cssh -u"
+ auto_close=5
+ auto_quit=yes
+ console_position=
+@@ -486,7 +487,7 @@ screen_reserve_bottom=60
+ screen_reserve_left=0
+ screen_reserve_right=0
+ screen_reserve_top=0
+-send_menu_xml_file=/home/dferguson/.csshrc_send_menu
++send_menu_xml_file=} . $ENV{HOME} . qq{/.csshrc_send_menu
+ show_history=0
+ ssh_args=
+ telnet_args=
+@@ -509,10 +510,11 @@ use_all_a_records=0
+ use_hotkeys=yes
+ window_tiling=yes
+ window_tiling_direction=right
+-EOF
++};
++
+ isa_ok( $config, "App::ClusterSSH::Config" );
+-is( $trap->die, undef, 'die message correct' );
+-is( $trap->stdout, $expected, 'Expecting no STDOUT' );
+-is( $trap->stderr, q{}, 'Expecting no STDERR' );
++is( $trap->die, undef, 'die message correct' );
++eq_or_diff( $trap->stdout, $expected, 'Expecting no STDOUT' );
++is( $trap->stderr, q{}, 'Expecting no STDERR' );
+
+ done_testing();
diff --git a/net-misc/clusterssh/metadata.xml b/net-misc/clusterssh/metadata.xml
new file mode 100644
index 000000000000..8929edd8ee42
--- /dev/null
+++ b/net-misc/clusterssh/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>cluster</herd>
+ <longdescription lang="en">
+ ClusterSSH is a tool for making the same change on multiple servers
+ at the same time. The 'cssh' command opens an administration console
+ and an xterm to all specified hosts. Any text typed into
+ the administration console is replicated to all windows.
+ All windows may also be typed into directly.
+</longdescription>
+</pkgmetadata>
diff --git a/net-misc/cmst/Manifest b/net-misc/cmst/Manifest
new file mode 100644
index 000000000000..2fd607b84f60
--- /dev/null
+++ b/net-misc/cmst/Manifest
@@ -0,0 +1 @@
+DIST cmst-2015.03.01.tar.gz 340176 SHA256 c97d0fe4ab2cfe822121514b8ba6200d4e733bb63f05f04cd17d0b53794d465c SHA512 4178ff101df007e4aab43514250036947b150623f3a45e36dcee7a37be75d2180ba44ee0fb66ecf7240990084d43ccacd4f59259595db91d94a4ea0d08845b77 WHIRLPOOL e6d253bcebb007fcf70d51534b729b4bcdb6c292e4d7b89ef0d702a4308308a4bf1837e24b0051939ee0dfe01bc38b57de9a3e6d6761a958725cc959b24a1565
diff --git a/net-misc/cmst/cmst-2015.03.01.ebuild b/net-misc/cmst/cmst-2015.03.01.ebuild
new file mode 100644
index 000000000000..d6d4a4e4df8d
--- /dev/null
+++ b/net-misc/cmst/cmst-2015.03.01.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit multilib qmake-utils
+
+DESCRIPTION="Qt GUI for Connman with system tray icon"
+HOMEPAGE="https://github.com/andrew-bibb/cmst"
+SRC_URI="${HOMEPAGE}/archive/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+ net-misc/connman
+ x11-libs/libxkbcommon"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}-${P}"
+
+src_prepare() {
+ sed -i misc/desktop/cmst.desktop \
+ -e 's/Version=1.1/Version=1.0/' \
+ -e '/Categories/ s/$/;/'
+}
+
+src_configure() {
+ export USE_LIBPATH="${EPREFIX}/usr/$(get_libdir)/${PN}"
+ eqmake5
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install
+}
diff --git a/net-misc/cmst/metadata.xml b/net-misc/cmst/metadata.xml
new file mode 100644
index 000000000000..607b1687ee0a
--- /dev/null
+++ b/net-misc/cmst/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>qt</herd>
+ <upstream>
+ <bugs-to>https://github.com/andrew-bibb/cmst/issues</bugs-to>
+ <remote-id type="github">andrew-bibb/cmst</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/cocaine-core/Manifest b/net-misc/cocaine-core/Manifest
new file mode 100644
index 000000000000..9158d25bf220
--- /dev/null
+++ b/net-misc/cocaine-core/Manifest
@@ -0,0 +1,3 @@
+DIST 0.9.2.tar.gz 174494 SHA256 c44d99fb3771692aa2ed8b4573954d264397c18662e05c2d95e93a5027499c8d SHA512 42bf9f38311026966b11414fc9987b4fc1d30dba9360152662810ce4e49ab1c8e662b18299efe2831b1ed7ea3490a8afb36195d7e7fc609cc9527e2c71f71bd1 WHIRLPOOL 970510d9400ca86b89fac97b5504ec6de6169bdb05819926445c8a62bf0cdc4f0166de831999f41fcf39522978acf381255d3639365142e9c4f68c9748b8e6c1
+DIST cocaine-core_0.11.2.5.tar.gz 376997 SHA256 9c55c9ab4ececf00e1f71909a30e412663d72f2c8b213c01a2dceb9c1a705cf4 SHA512 f2962d41ba12ebae475cb10d501da8d7b3ca6a428b4b2e8779dd7d768cacc2e3bf9b7952354454e432e2623a00add3d7cf424b12968c0c4a905a65dbda544866 WHIRLPOOL d82de7d5ceef66f571631ba495e2bf2169265862b52811e5aaf2d60ff915d2b5cb39b744e7c1871b28f9d4a49154e7ca914e7b84808f3e1998a73ad759632ee8
+DIST cocaine-core_0.11.3.2.tar.gz 378575 SHA256 0a350f6c7b80957258be9dafc209cf54b561fc34eae781c2fbd533c17636d13f SHA512 f0a5eea827d0fbf65c484e6068a24dd1e81dfc868f38ef829003b410783a354a58886d2db972ea24adb6075b38ceb230432555b35af4aceb0193c4a12ab874cd WHIRLPOOL d302d25f552db618ceab5c17967eb16df802d2cf16e6ae0d33a5ff6835b149f98dfe1dd91ee876b5e9e8847044179242b08aeb6b420209574219fa0b432f5783
diff --git a/net-misc/cocaine-core/cocaine-core-0.11.2.5.ebuild b/net-misc/cocaine-core/cocaine-core-0.11.2.5.ebuild
new file mode 100644
index 000000000000..63b937516bd4
--- /dev/null
+++ b/net-misc/cocaine-core/cocaine-core-0.11.2.5.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils cmake-utils
+
+DESCRIPTION="Cloud platform, core parts"
+HOMEPAGE="http://reverbrain.com/cocaine/"
+SRC_URI="http://repo.reverbrain.com/precise/current/source/${PN}_${PV}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="dev-libs/boost:=
+ <net-libs/zeromq-3
+ dev-libs/libev
+ <dev-libs/msgpack-0.6
+ dev-libs/libcgroup
+ "
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}_binutils-2.23-compat.patch" )
diff --git a/net-misc/cocaine-core/cocaine-core-0.11.3.2.ebuild b/net-misc/cocaine-core/cocaine-core-0.11.3.2.ebuild
new file mode 100644
index 000000000000..39008105d180
--- /dev/null
+++ b/net-misc/cocaine-core/cocaine-core-0.11.3.2.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils cmake-utils
+
+DESCRIPTION="Cloud platform, core parts"
+HOMEPAGE="http://reverbrain.com/cocaine/"
+SRC_URI="http://repo.reverbrain.com/precise/current/source/${PN}_${PV}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="dev-libs/boost:=
+ <net-libs/zeromq-3
+ dev-libs/libev
+ <dev-libs/msgpack-0.6
+ dev-libs/libcgroup
+ "
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${PN}-0.11.2.5_binutils-2.23-compat.patch" )
diff --git a/net-misc/cocaine-core/cocaine-core-0.9.2-r1.ebuild b/net-misc/cocaine-core/cocaine-core-0.9.2-r1.ebuild
new file mode 100644
index 000000000000..f1e3295c75b1
--- /dev/null
+++ b/net-misc/cocaine-core/cocaine-core-0.9.2-r1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils cmake-utils
+
+DESCRIPTION="Cloud platform, core parts"
+HOMEPAGE="http://reverbrain.com/cocaine/"
+SRC_URI="https://github.com/cocaine/${PN}/archive/${PV}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="dev-libs/boost:=
+ <net-libs/zeromq-3
+ dev-libs/libev
+ dev-libs/msgpack
+ dev-libs/libcgroup
+ "
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-boost-1.53.patch" )
diff --git a/net-misc/cocaine-core/files/cocaine-core-0.11.2.5_binutils-2.23-compat.patch b/net-misc/cocaine-core/files/cocaine-core-0.11.2.5_binutils-2.23-compat.patch
new file mode 100644
index 000000000000..532700bec70b
--- /dev/null
+++ b/net-misc/cocaine-core/files/cocaine-core-0.11.2.5_binutils-2.23-compat.patch
@@ -0,0 +1,19 @@
+commit 771bc9f8055e7baf58011ff7514827b6212f9f51
+Author: Andrey Sibiryov <me@kobology.ru>
+Date: Fri Dec 6 12:51:59 2013 +0400
+
+ Added binutils 2.23 compatibility.
+
+diff --git a/config.hpp.in b/config.hpp.in
+index a73fa48..651aa3c 100644
+--- a/config.hpp.in
++++ b/config.hpp.in
+@@ -8,5 +8,8 @@
+ #define COCAINE_VERSION \
+ COCAINE_MAKE_VERSION(COCAINE_VERSION_MAJOR, COCAINE_VERSION_MINOR, COCAINE_VERSION_RELEASE)
+
++#define PACKAGE "cocaine-core"
++#define PACKAGE_VERSION COCAINE_VERSION
++
+ #cmakedefine COCAINE_DEBUG
+ #cmakedefine COCAINE_ALLOW_CGROUPS
diff --git a/net-misc/cocaine-core/files/cocaine-core-0.9.2-boost-1.53.patch b/net-misc/cocaine-core/files/cocaine-core-0.9.2-boost-1.53.patch
new file mode 100644
index 000000000000..2f03a328e0a9
--- /dev/null
+++ b/net-misc/cocaine-core/files/cocaine-core-0.9.2-boost-1.53.patch
@@ -0,0 +1,13 @@
+Nur in cocaine-core-0.9.2: build.
+Nur in cocaine-core-0.9.2/include/cocaine: config.hpp.
+diff -ru cocaine-core-0.9.2_org/include/cocaine/interfaces/storage.hpp cocaine-core-0.9.2/include/cocaine/interfaces/storage.hpp
+--- cocaine-core-0.9.2_org/include/cocaine/interfaces/storage.hpp 2012-08-29 15:54:35.000000000 +0200
++++ cocaine-core-0.9.2/include/cocaine/interfaces/storage.hpp 2014-07-29 13:49:40.130375695 +0200
+@@ -22,6 +22,7 @@
+ #define COCAINE_STORAGE_INTERFACE_HPP
+
+ #include <boost/thread/mutex.hpp>
++#include <boost/thread/lock_guard.hpp>
+ #include <boost/tuple/tuple.hpp>
+
+ #include "cocaine/common.hpp"
diff --git a/net-misc/cocaine-core/metadata.xml b/net-misc/cocaine-core/metadata.xml
new file mode 100644
index 000000000000..67ee8b27ff2a
--- /dev/null
+++ b/net-misc/cocaine-core/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>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">cocaine/cocaine-core</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/connect/Manifest b/net-misc/connect/Manifest
new file mode 100644
index 000000000000..a76bfd2c23b9
--- /dev/null
+++ b/net-misc/connect/Manifest
@@ -0,0 +1,2 @@
+DIST connect-1.100.tar.bz2 21588 SHA256 e34be67caefc38f9b48fba1b5cbce9b0978fc4d33e2640d5d287789a14cb9ccd SHA512 e0bb106ae7270ff0352c2c5167fd47d6d9ac787f08b3019fd9dabe0636606709bc1caf696f6c87699e146eee0cb81db229f9202654f006c12321208c22832108 WHIRLPOOL af15bf382f84742618df9d42de14410f9ca4f6a888835cf4a28f2f5f20d2ec962b52f188a787fb9244f95e5b41f9bcfe6b465a1a5a7dd456d0592bbcd69b1b23
+DIST connect-1.103.tar.bz2 37980 SHA256 d4ea2e1c2831f7578c264196bfeb6285618cc1d50660aa923b91145282ac3155 SHA512 6de32aa48171b1528abe12c1044e1d498cd10c3ef7b4652318402b7bc12bbb50ce0f9eab10408dc3cc26c1c0d56804bd088fbedae688f921c84c40d1aa0ae4d9 WHIRLPOOL 2007c2bcf9460d948554f1b53a389c7f70f2135647b629290c9cd21f11f5f3a647c5d28389b7c20f7e8f4d7c4b9e1c1eec82d7306db3831c31eb1728a9dc79cc
diff --git a/net-misc/connect/connect-1.100.ebuild b/net-misc/connect/connect-1.100.ebuild
new file mode 100644
index 000000000000..6c1d0093c828
--- /dev/null
+++ b/net-misc/connect/connect-1.100.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit toolchain-funcs
+
+IUSE=""
+DESCRIPTION="network connection relaying command (proxy)"
+HOMEPAGE="https://bitbucket.org/gotoh/connect"
+HG_COMMIT_ID="7c036cbffb61" # bitbucket commit id
+#SRC_URI="https://www.bitbucket.org/gotoh/connect/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
+SRC_URI="http://bitbucket.org/gotoh/connect/get/${HG_COMMIT_ID}.tar.bz2 -> ${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+DEPEND=""
+RDEPEND=""
+S="${WORKDIR}/gotoh-connect-${HG_COMMIT_ID}"
+
+src_compile() {
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o ${PN} ${PN}.c || die "compilation failed"
+}
+
+src_install() {
+ dobin ${PN}
+}
+
+pkg_postinst() {
+ einfo
+ einfo "There is no manpage."
+ einfo "Please see https://bitbucket.org/gotoh/connect/wiki/Home for details."
+ einfo
+}
diff --git a/net-misc/connect/connect-1.103.ebuild b/net-misc/connect/connect-1.103.ebuild
new file mode 100644
index 000000000000..e1ba3ae9ab7d
--- /dev/null
+++ b/net-misc/connect/connect-1.103.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit toolchain-funcs
+
+IUSE=""
+DESCRIPTION="network connection relaying command (proxy)"
+HOMEPAGE="https://bitbucket.org/gotoh/connect"
+HG_COMMIT_ID="ee1fbc21da4b" # bitbucket commit id
+#SRC_URI="https://www.bitbucket.org/gotoh/connect/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
+SRC_URI="http://bitbucket.org/gotoh/connect/get/${HG_COMMIT_ID}.tar.bz2 -> ${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+DEPEND=""
+RDEPEND=""
+S="${WORKDIR}/gotoh-connect-${HG_COMMIT_ID}"
+
+src_compile() {
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o ${PN} ${PN}.c || die "compilation failed"
+}
+
+src_install() {
+ dobin ${PN}
+}
+
+pkg_postinst() {
+ einfo
+ einfo "There is no manpage."
+ einfo "Please see https://bitbucket.org/gotoh/connect/wiki/Home for details."
+ einfo
+}
diff --git a/net-misc/connect/metadata.xml b/net-misc/connect/metadata.xml
new file mode 100644
index 000000000000..5938ebe814ca
--- /dev/null
+++ b/net-misc/connect/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>wschlich@gentoo.org</email>
+ <name>Wolfram Schlich</name>
+ <description>Primary maintainer</description>
+ </maintainer>
+ <longdescription>
+connect is the simple relaying command to make network connection via
+SOCKS and https proxy. It is mainly intended to be used as proxy
+command of OpenSSH.
+</longdescription>
+ <longdescription lang="ja">
+Connect は SOCKS 経由のネットワーク接続と HTTP プロクシを実現する単純な
+中継用コマンドです。主に OpenSSH のプロクシ・コマンドとして利用されるこ
+とを想定してます。
+</longdescription>
+ <upstream>
+ <remote-id type="bitbucket">gotoh/connect</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/connman/Manifest b/net-misc/connman/Manifest
new file mode 100644
index 000000000000..91af76f2a585
--- /dev/null
+++ b/net-misc/connman/Manifest
@@ -0,0 +1,7 @@
+DIST connman-1.21.tar.xz 623392 SHA256 e80f4e9c639ef016e9c497c122c349dbc9e6dc78a9976f986134739ee208c08a SHA512 dc26e5cd7dfcdf7e0540af6a092f592df6682ff16d2811cf0cbca73442239bc742d1f80a638a67b3358316ab0858e924b720b53629a412df2bf4487c51a7bc39 WHIRLPOOL e32d1b858725d1aa2c3b48fd12da9702723050404c8dbd71c6ea5a8b66d91c59fe9114bf8065eb56de31e8838cf924c1a953ed65d9e94f3a8de8b83f92e7404a
+DIST connman-1.24.tar.xz 629616 SHA256 551df7a5f0c6e4d69523dd2b3aa2c54525b323457d5135f64816215bad3dc24c SHA512 12ed0b476e8b590602eb5eea6175404cb6e377aba3a061fe42a16548325e2ad1ac3e285e92b4e66bd430ba3766c84da884383abaed0c89dca2ca511d83c8d7b4 WHIRLPOOL a1715e7122c835775ddeacb0b21a78b2904ae641fa8ae8b02b487dde7bf9751a893d9b6afc9d01b7adae648baaba4d489821fdd02d2f51df210a825b14087c8b
+DIST connman-1.25.tar.xz 638140 SHA256 c1d266d6be18d2f66231f3537a7ed17b57637ca43c27328bc13c508cbeacce6e SHA512 1994240e54b706de604ff278f372ca66e50103cb78f389ccc9c04989ee3abd2ecf7fedb20ebb9c24ff55259b586439db25a622f25e26b01020da3dab6f8a4a8d WHIRLPOOL b7a9777229310ee2636b908423dc55fe2d16daae4b835a645abf8af3a4450ab5f54fc357e1c59330a6bc1a4f97f5c735e8826d31d34a4d206dc0e921321aa8c7
+DIST connman-1.26.tar.xz 645540 SHA256 7184e4b6d954449ee00a30e188924b3e37a20ad2fd9a0b76a2bdd82c863dcf8a SHA512 17a1edf199976f7b32fcf2c5d5d5dcbc8fa8896575d241eeeb66e6183bc115bde3816a7ef0a43831746a603831ade0c5a12fa366e9fc1706068b41b5762c163b WHIRLPOOL e8af9740646cdf80b6c05326788e5e3710645ca775fbc9600fd47536fbf47a851bc9303716ba3490f5814d193febf0a8c47928726ec445d96931bad32e321289
+DIST connman-1.27.tar.xz 646520 SHA256 13997824c076af150c68d6d79e48277216e8192278a5c6615cfd4905d65600f5 SHA512 a904d280e16093574b955a23396395fd80640ff5ba767849f5ebae7cea3b10897fb13521376bcd8963cfed091bb0600134205e286d3935a292fcd81be1d2a886 WHIRLPOOL 257b7e38fc773353a905044d7f0540bd2d2b1f3a154daba90e22cd9f8339cf4624f8fa8f4eafbc92bc6e895afeb9b4129ca1a533387828e1746508573a6018e1
+DIST connman-1.28.tar.xz 643744 SHA256 b1d5e7dd2652725906e220a8b0206477e97080e835272971e3b2fd10943c5c94 SHA512 cd0e7da5bf20782c6a1798078ab4669d4bf0aeee2b7a66de5029082324745380bfdc835d52021c6eff30843d63911373d17273c5956b10c2586fe71c0bd37e06 WHIRLPOOL 927fd476e74ef410bf502dc1e7233192bc9c94958ca62200255eead825e2b74a4544ba173f0567d91f4cb0f10f82c8e71baa711f3d8fb4654b5ded309ec88d50
+DIST connman-1.29.tar.xz 653324 SHA256 2a5a69693566f7fd59b2e677fa89356ada6d709998aa665caef8707b1e7a8594 SHA512 19f623dd23c6312f29bbd570dcb22d31154ffcd16ee66ed2280df3d9d844301f18538418363222d99eabdc33da0021488ed66ba2e4f88df30646004b724538ee WHIRLPOOL 9439cadeb20b72c922b1426da213f8567fe7b0da45f9a4abf270c38687a9d9161a8ee14250623344864d612e130e6f28926918468aaf4346a9e5ff41e6ad22bb
diff --git a/net-misc/connman/connman-1.21.ebuild b/net-misc/connman/connman-1.21.ebuild
new file mode 100644
index 000000000000..d72ce4897d9f
--- /dev/null
+++ b/net-misc/connman/connman-1.21.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit base systemd
+
+DESCRIPTION="Provides a daemon for managing internet connections"
+HOMEPAGE="http://connman.net"
+SRC_URI="mirror://kernel/linux/network/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ppc ppc64 x86"
+IUSE="bluetooth debug doc examples +ethernet ofono openvpn openconnect policykit tools vpnc +wifi"
+
+RDEPEND=">=dev-libs/glib-2.16
+ >=sys-apps/dbus-1.2.24
+ >=net-firewall/iptables-1.4.8
+ net-libs/gnutls
+ bluetooth? ( net-wireless/bluez )
+ ofono? ( net-misc/ofono )
+ policykit? ( sys-auth/polkit )
+ openvpn? ( net-misc/openvpn )
+ vpnc? ( net-misc/vpnc )
+ wifi? ( >=net-wireless/wpa_supplicant-0.7[dbus] )"
+
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-2.6.39"
+
+PATCHES=( "${FILESDIR}/${PN}-1.16-execinfo-assumptions.patch" )
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --enable-client \
+ --enable-datafiles \
+ --enable-loopback=builtin \
+ $(use_enable examples test) \
+ $(use_enable ethernet ethernet builtin) \
+ $(use_enable wifi wifi builtin) \
+ $(use_enable bluetooth bluetooth builtin) \
+ $(use_enable ofono ofono builtin) \
+ $(use_enable openconnect openconnect builtin) \
+ $(use_enable openvpn openvpn builtin) \
+ $(use_enable policykit polkit builtin) \
+ $(use_enable vpnc vpnc builtin) \
+ $(use_enable debug) \
+ $(use_enable tools) \
+ --disable-iospm \
+ --disable-hh2serial-gps
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dobin client/connmanctl || die "client installation failed"
+
+ if use doc; then
+ dodoc doc/*.txt
+ fi
+ keepdir /var/lib/${PN}
+ newinitd "${FILESDIR}"/${PN}.initd2 ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ systemd_dounit "${FILESDIR}"/connman.service
+}
diff --git a/net-misc/connman/connman-1.24.ebuild b/net-misc/connman/connman-1.24.ebuild
new file mode 100644
index 000000000000..9b8f8de93b9e
--- /dev/null
+++ b/net-misc/connman/connman-1.24.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit base systemd
+
+DESCRIPTION="Provides a daemon for managing internet connections"
+HOMEPAGE="http://connman.net"
+SRC_URI="mirror://kernel/linux/network/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+IUSE="bluetooth debug doc examples +ethernet ofono openvpn openconnect policykit tools vpnc +wifi"
+
+RDEPEND=">=dev-libs/glib-2.16
+ >=sys-apps/dbus-1.2.24
+ >=net-firewall/iptables-1.4.8
+ net-libs/gnutls
+ bluetooth? ( net-wireless/bluez )
+ ofono? ( net-misc/ofono )
+ policykit? ( sys-auth/polkit )
+ openvpn? ( net-misc/openvpn )
+ vpnc? ( net-misc/vpnc )
+ wifi? ( >=net-wireless/wpa_supplicant-2.0[dbus] )"
+
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-2.6.39"
+
+PATCHES=( "${FILESDIR}/${PN}-1.16-execinfo-assumptions.patch" )
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --enable-client \
+ --enable-datafiles \
+ --enable-loopback=builtin \
+ $(use_enable examples test) \
+ $(use_enable ethernet ethernet builtin) \
+ $(use_enable wifi wifi builtin) \
+ $(use_enable bluetooth bluetooth builtin) \
+ $(use_enable ofono ofono builtin) \
+ $(use_enable openconnect openconnect builtin) \
+ $(use_enable openvpn openvpn builtin) \
+ $(use_enable policykit polkit builtin) \
+ $(use_enable vpnc vpnc builtin) \
+ $(use_enable debug) \
+ $(use_enable tools) \
+ --disable-iospm \
+ --disable-hh2serial-gps
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dobin client/connmanctl || die "client installation failed"
+
+ if use doc; then
+ dodoc doc/*.txt
+ fi
+ keepdir /var/lib/${PN}
+ newinitd "${FILESDIR}"/${PN}.initd2 ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ systemd_dounit "${FILESDIR}"/connman.service
+}
diff --git a/net-misc/connman/connman-1.25.ebuild b/net-misc/connman/connman-1.25.ebuild
new file mode 100644
index 000000000000..9b8f8de93b9e
--- /dev/null
+++ b/net-misc/connman/connman-1.25.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit base systemd
+
+DESCRIPTION="Provides a daemon for managing internet connections"
+HOMEPAGE="http://connman.net"
+SRC_URI="mirror://kernel/linux/network/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+IUSE="bluetooth debug doc examples +ethernet ofono openvpn openconnect policykit tools vpnc +wifi"
+
+RDEPEND=">=dev-libs/glib-2.16
+ >=sys-apps/dbus-1.2.24
+ >=net-firewall/iptables-1.4.8
+ net-libs/gnutls
+ bluetooth? ( net-wireless/bluez )
+ ofono? ( net-misc/ofono )
+ policykit? ( sys-auth/polkit )
+ openvpn? ( net-misc/openvpn )
+ vpnc? ( net-misc/vpnc )
+ wifi? ( >=net-wireless/wpa_supplicant-2.0[dbus] )"
+
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-2.6.39"
+
+PATCHES=( "${FILESDIR}/${PN}-1.16-execinfo-assumptions.patch" )
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --enable-client \
+ --enable-datafiles \
+ --enable-loopback=builtin \
+ $(use_enable examples test) \
+ $(use_enable ethernet ethernet builtin) \
+ $(use_enable wifi wifi builtin) \
+ $(use_enable bluetooth bluetooth builtin) \
+ $(use_enable ofono ofono builtin) \
+ $(use_enable openconnect openconnect builtin) \
+ $(use_enable openvpn openvpn builtin) \
+ $(use_enable policykit polkit builtin) \
+ $(use_enable vpnc vpnc builtin) \
+ $(use_enable debug) \
+ $(use_enable tools) \
+ --disable-iospm \
+ --disable-hh2serial-gps
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dobin client/connmanctl || die "client installation failed"
+
+ if use doc; then
+ dodoc doc/*.txt
+ fi
+ keepdir /var/lib/${PN}
+ newinitd "${FILESDIR}"/${PN}.initd2 ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ systemd_dounit "${FILESDIR}"/connman.service
+}
diff --git a/net-misc/connman/connman-1.26.ebuild b/net-misc/connman/connman-1.26.ebuild
new file mode 100644
index 000000000000..9b8f8de93b9e
--- /dev/null
+++ b/net-misc/connman/connman-1.26.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit base systemd
+
+DESCRIPTION="Provides a daemon for managing internet connections"
+HOMEPAGE="http://connman.net"
+SRC_URI="mirror://kernel/linux/network/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+IUSE="bluetooth debug doc examples +ethernet ofono openvpn openconnect policykit tools vpnc +wifi"
+
+RDEPEND=">=dev-libs/glib-2.16
+ >=sys-apps/dbus-1.2.24
+ >=net-firewall/iptables-1.4.8
+ net-libs/gnutls
+ bluetooth? ( net-wireless/bluez )
+ ofono? ( net-misc/ofono )
+ policykit? ( sys-auth/polkit )
+ openvpn? ( net-misc/openvpn )
+ vpnc? ( net-misc/vpnc )
+ wifi? ( >=net-wireless/wpa_supplicant-2.0[dbus] )"
+
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-2.6.39"
+
+PATCHES=( "${FILESDIR}/${PN}-1.16-execinfo-assumptions.patch" )
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --enable-client \
+ --enable-datafiles \
+ --enable-loopback=builtin \
+ $(use_enable examples test) \
+ $(use_enable ethernet ethernet builtin) \
+ $(use_enable wifi wifi builtin) \
+ $(use_enable bluetooth bluetooth builtin) \
+ $(use_enable ofono ofono builtin) \
+ $(use_enable openconnect openconnect builtin) \
+ $(use_enable openvpn openvpn builtin) \
+ $(use_enable policykit polkit builtin) \
+ $(use_enable vpnc vpnc builtin) \
+ $(use_enable debug) \
+ $(use_enable tools) \
+ --disable-iospm \
+ --disable-hh2serial-gps
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dobin client/connmanctl || die "client installation failed"
+
+ if use doc; then
+ dodoc doc/*.txt
+ fi
+ keepdir /var/lib/${PN}
+ newinitd "${FILESDIR}"/${PN}.initd2 ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ systemd_dounit "${FILESDIR}"/connman.service
+}
diff --git a/net-misc/connman/connman-1.27.ebuild b/net-misc/connman/connman-1.27.ebuild
new file mode 100644
index 000000000000..9deaf041c941
--- /dev/null
+++ b/net-misc/connman/connman-1.27.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit base systemd
+
+DESCRIPTION="Provides a daemon for managing internet connections"
+HOMEPAGE="http://connman.net"
+SRC_URI="mirror://kernel/linux/network/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ppc ppc64 x86"
+IUSE="bluetooth debug doc examples +ethernet ofono openvpn openconnect policykit tools vpnc +wifi"
+
+RDEPEND=">=dev-libs/glib-2.16
+ >=sys-apps/dbus-1.2.24
+ >=net-firewall/iptables-1.4.8
+ net-libs/gnutls
+ bluetooth? ( net-wireless/bluez )
+ ofono? ( net-misc/ofono )
+ policykit? ( sys-auth/polkit )
+ openconnect? ( net-misc/openconnect )
+ openvpn? ( net-misc/openvpn )
+ vpnc? ( net-misc/vpnc )
+ wifi? ( >=net-wireless/wpa_supplicant-2.0[dbus] )"
+
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-2.6.39"
+
+PATCHES=( "${FILESDIR}/${PN}-1.16-execinfo-assumptions.patch" )
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --enable-client \
+ --enable-datafiles \
+ --enable-loopback=builtin \
+ $(use_enable examples test) \
+ $(use_enable ethernet ethernet builtin) \
+ $(use_enable wifi wifi builtin) \
+ $(use_enable bluetooth bluetooth builtin) \
+ $(use_enable ofono ofono builtin) \
+ $(use_enable openconnect openconnect builtin) \
+ $(use_enable openvpn openvpn builtin) \
+ $(use_enable policykit polkit builtin) \
+ $(use_enable vpnc vpnc builtin) \
+ $(use_enable debug) \
+ $(use_enable tools) \
+ --disable-iospm \
+ --disable-hh2serial-gps
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dobin client/connmanctl || die "client installation failed"
+
+ if use doc; then
+ dodoc doc/*.txt
+ fi
+ keepdir /var/lib/${PN}
+ newinitd "${FILESDIR}"/${PN}.initd2 ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ systemd_dounit "${FILESDIR}"/connman.service
+}
diff --git a/net-misc/connman/connman-1.28.ebuild b/net-misc/connman/connman-1.28.ebuild
new file mode 100644
index 000000000000..b1797369ddab
--- /dev/null
+++ b/net-misc/connman/connman-1.28.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 base systemd
+
+DESCRIPTION="Provides a daemon for managing internet connections"
+HOMEPAGE="https://01.org/connman"
+SRC_URI="mirror://kernel/linux/network/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
+IUSE="bluetooth debug doc examples +ethernet l2tp ofono openvpn openconnect pptp policykit tools vpnc +wifi wispr"
+
+RDEPEND=">=dev-libs/glib-2.16
+ >=sys-apps/dbus-1.2.24
+ >=net-firewall/iptables-1.4.8
+ bluetooth? ( net-wireless/bluez )
+ l2tp? ( net-dialup/xl2tpd )
+ ofono? ( net-misc/ofono )
+ openconnect? ( net-misc/openconnect )
+ openvpn? ( net-misc/openvpn )
+ policykit? ( sys-auth/polkit )
+ pptp? ( net-dialup/pptpclient )
+ vpnc? ( net-misc/vpnc )
+ wifi? ( >=net-wireless/wpa_supplicant-2.0[dbus] )
+ wispr? ( net-libs/gnutls )"
+
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-2.6.39"
+
+PATCHES=( "${FILESDIR}/${PN}-1.16-execinfo-assumptions.patch" )
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --enable-client \
+ --enable-datafiles \
+ --enable-loopback=builtin \
+ $(use_enable examples test) \
+ $(use_enable ethernet ethernet builtin) \
+ $(use_enable wifi wifi builtin) \
+ $(use_enable bluetooth bluetooth builtin) \
+ $(use_enable l2tp l2tp builtin) \
+ $(use_enable ofono ofono builtin) \
+ $(use_enable openconnect openconnect builtin) \
+ $(use_enable openvpn openvpn builtin) \
+ $(use_enable policykit polkit builtin) \
+ $(use_enable pptp pptp builtin) \
+ $(use_enable vpnc vpnc builtin) \
+ $(use_enable wispr wispr builtin) \
+ $(use_enable debug) \
+ $(use_enable tools) \
+ --disable-iospm \
+ --disable-hh2serial-gps
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dobin client/connmanctl || die "client installation failed"
+
+ if use doc; then
+ dodoc doc/*.txt
+ fi
+ keepdir /var/lib/${PN}
+ newinitd "${FILESDIR}"/${PN}.initd2 ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ systemd_dounit "${FILESDIR}"/connman.service
+}
diff --git a/net-misc/connman/connman-1.29.ebuild b/net-misc/connman/connman-1.29.ebuild
new file mode 100644
index 000000000000..6f2182f7d6d8
--- /dev/null
+++ b/net-misc/connman/connman-1.29.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 base systemd
+
+DESCRIPTION="Provides a daemon for managing internet connections"
+HOMEPAGE="https://01.org/connman"
+SRC_URI="mirror://kernel/linux/network/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 arm ppc ppc64 ~x86"
+IUSE="bluetooth debug doc examples +ethernet l2tp ofono openvpn openconnect pptp policykit tools vpnc +wifi wispr"
+
+RDEPEND=">=dev-libs/glib-2.16
+ >=sys-apps/dbus-1.2.24
+ >=net-firewall/iptables-1.4.8
+ bluetooth? ( net-wireless/bluez )
+ l2tp? ( net-dialup/xl2tpd )
+ ofono? ( net-misc/ofono )
+ openconnect? ( net-misc/openconnect )
+ openvpn? ( net-misc/openvpn )
+ policykit? ( sys-auth/polkit )
+ pptp? ( net-dialup/pptpclient )
+ vpnc? ( net-misc/vpnc )
+ wifi? ( >=net-wireless/wpa_supplicant-2.0[dbus] )
+ wispr? ( net-libs/gnutls )"
+
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-2.6.39"
+
+PATCHES=( "${FILESDIR}/${PN}-1.16-execinfo-assumptions.patch" )
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --enable-client \
+ --enable-datafiles \
+ --enable-loopback=builtin \
+ $(use_enable examples test) \
+ $(use_enable ethernet ethernet builtin) \
+ $(use_enable wifi wifi builtin) \
+ $(use_enable bluetooth bluetooth builtin) \
+ $(use_enable l2tp l2tp builtin) \
+ $(use_enable ofono ofono builtin) \
+ $(use_enable openconnect openconnect builtin) \
+ $(use_enable openvpn openvpn builtin) \
+ $(use_enable policykit polkit builtin) \
+ $(use_enable pptp pptp builtin) \
+ $(use_enable vpnc vpnc builtin) \
+ $(use_enable wispr wispr builtin) \
+ $(use_enable debug) \
+ $(use_enable tools) \
+ --disable-iospm \
+ --disable-hh2serial-gps
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dobin client/connmanctl || die "client installation failed"
+
+ if use doc; then
+ dodoc doc/*.txt
+ fi
+ keepdir /var/lib/${PN}
+ newinitd "${FILESDIR}"/${PN}.initd2 ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ systemd_dounit "${FILESDIR}"/connman.service
+}
diff --git a/net-misc/connman/files/connman-1.16-execinfo-assumptions.patch b/net-misc/connman/files/connman-1.16-execinfo-assumptions.patch
new file mode 100644
index 000000000000..5404414fc0ea
--- /dev/null
+++ b/net-misc/connman/files/connman-1.16-execinfo-assumptions.patch
@@ -0,0 +1,54 @@
+diff -uNr a/config.h.in b/config.h.in
+--- a/config.h.in 2013-07-02 17:41:03.715261748 +0000
++++ b/config.h.in 2013-07-02 17:41:21.707260667 +0000
+@@ -3,6 +3,9 @@
+ /* Define to 1 if you have the <dlfcn.h> header file. */
+ #undef HAVE_DLFCN_H
+
++/* Define to 1 if you have the <execinfo.h> header file. */
++#undef HAVE_EXECINFO_H
++
+ /* Define to 1 if you have the <inttypes.h> header file. */
+ #undef HAVE_INTTYPES_H
+
+diff -uNr a/configure.ac b/configure.ac
+--- a/configure.ac 2013-07-02 17:41:03.715261748 +0000
++++ b/configure.ac 2013-07-02 17:41:21.719260666 +0000
+@@ -181,6 +181,8 @@
+ AC_CHECK_FUNC(signalfd, dummy=yes,
+ AC_MSG_ERROR(signalfd support is required))
+
++AC_CHECK_HEADERS([execinfo.h], [], [])
++
+ AC_CHECK_LIB(dl, dlopen, dummy=yes,
+ AC_MSG_ERROR(dynamic linking loader is required))
+
+diff -uNr a/src/log.c b/src/log.c
+--- a/src/log.c 2013-07-02 17:41:03.727261747 +0000
++++ b/src/log.c 2013-07-02 17:42:12.717257603 +0000
+@@ -30,7 +30,9 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <syslog.h>
++#ifdef HAVE_EXECINFO_H
+ #include <execinfo.h>
++#endif
+ #include <dlfcn.h>
+
+ #include "connman.h"
+@@ -112,6 +114,7 @@
+
+ static void print_backtrace(unsigned int offset)
+ {
++#ifdef HAVE_EXECINFO_H
+ void *frames[99];
+ size_t n_ptrs;
+ unsigned int i;
+@@ -210,6 +213,7 @@
+
+ close(outfd[1]);
+ close(infd[0]);
++#endif
+ }
+
+ static void signal_handler(int signo)
diff --git a/net-misc/connman/files/connman.confd b/net-misc/connman/files/connman.confd
new file mode 100644
index 000000000000..6d0c399e544c
--- /dev/null
+++ b/net-misc/connman/files/connman.confd
@@ -0,0 +1,15 @@
+# conf.d file for connman
+#
+# Please check connmand --help for more information.
+# Useful options are:
+# -c, --compat: enable NetworkManager compatibility mode.
+# -W, --wifi=NAME: select wpa_supplicant wifi driver to use.
+# This is useful if your wpa_supplicant is < 0.7
+# since connmand by default gives wpa_supplicant a
+# comma separated list of values and < 0.7 does not
+# understand or accept it.
+# -i, --device=DEV: force use of given interface name.
+# -I, --nodevice=DEV: force ignore of given interface name.
+# -p, --plugin=NAME: specify plugins to load.
+# -P, --noplugin=NAME: specify plugins not to load.
+CONNMAN_OPTS=""
diff --git a/net-misc/connman/files/connman.initd2 b/net-misc/connman/files/connman.initd2
new file mode 100644
index 000000000000..d65d25998dfa
--- /dev/null
+++ b/net-misc/connman/files/connman.initd2
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Purpose License v2
+# $Id$
+
+depend() {
+ need dbus
+ provide net
+}
+
+start() {
+ ebegin "Starting Connection Manager"
+ start-stop-daemon --start --quiet --exec /usr/sbin/connmand -- ${CONNMAN_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Connection Manager"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/connmand
+ eend $?
+}
+
+# vim: set ft=gentoo-init-d ts=3 sw=3 et:
diff --git a/net-misc/connman/files/connman.service b/net-misc/connman/files/connman.service
new file mode 100644
index 000000000000..ece38a716e96
--- /dev/null
+++ b/net-misc/connman/files/connman.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Network Connection Manager Daemon
+
+[Service]
+Type=dbus
+BusName=net.connman
+ExecStart=/usr/sbin/connmand --nodaemon
+
+[Install]
+WantedBy=multi-user.target
+Alias=net.connman.service
diff --git a/net-misc/connman/metadata.xml b/net-misc/connman/metadata.xml
new file mode 100644
index 000000000000..1e04da18cf52
--- /dev/null
+++ b/net-misc/connman/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>balint@szentedwg.ro</email>
+ <name>Bálint Szente</name>
+ <description>Primary Maintainer, Assign bugs</description>
+ </maintainer>
+ <maintainer>
+ <email>dlan@gentoo.org</email>
+ <name>Yixun Lan</name>
+ <description>Co Maintainer, CC bugs</description>
+ </maintainer>
+ <use>
+ <flag name="ethernet">Enable ethernet support.</flag>
+ <flag name="l2tp">Use <pkg>net-dialup/xl2tpd</pkg> for L2TP VPN support.</flag>
+ <flag name="ofono">Use <pkg>net-misc/ofono</pkg> for telephony support.</flag>
+ <flag name="openconnect">Use <pkg>net-misc/openconnect</pkg> for VPN support.</flag>
+ <flag name="openvpn">Use <pkg>net-misc/openvpn</pkg> for openvpn support.</flag>
+ <flag name="pptp">Use <pkg>net-dialup/pptpclient</pkg> for PPTP VPN support.</flag>
+ <flag name="tools">Enable testing tools.</flag>
+ <flag name="vpnc">Use <pkg>net-misc/vpnc</pkg> for cisco VPN support.</flag>
+ <flag name="wispr">Enable support for WISPr hotspot logins.</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/corkscrew/Manifest b/net-misc/corkscrew/Manifest
new file mode 100644
index 000000000000..94017c6425e0
--- /dev/null
+++ b/net-misc/corkscrew/Manifest
@@ -0,0 +1 @@
+DIST corkscrew-2.0.tar.gz 56749 RMD160 c7b4ae4cc4df4b33f8ae9be19305004fd0ae20a0 SHA1 8bdb4c0dc71048136c721c33229b9bf795230b32 SHA256 0d0fcbb41cba4a81c4ab494459472086f377f9edb78a2e2238ed19b58956b0be
diff --git a/net-misc/corkscrew/corkscrew-2.0.ebuild b/net-misc/corkscrew/corkscrew-2.0.ebuild
new file mode 100644
index 000000000000..221bfd425ea0
--- /dev/null
+++ b/net-misc/corkscrew/corkscrew-2.0.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools
+
+DESCRIPTION="a tool for tunneling SSH through HTTP proxies"
+HOMEPAGE="http://www.agroman.net/corkscrew/"
+SRC_URI="http://www.agroman.net/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc ~sparc x86"
+IUSE=""
+
+DOCS="AUTHORS ChangeLog README TODO"
+
+src_prepare() {
+ # Christoph Mende <angelos@gentoo.org (23 Jun 2010)
+ # Shipped configure doesn't work with some locales (bug #305771)
+ # Shipped missing doesn't work with new configure, so we'll force
+ # regeneration
+ rm -f install-sh missing mkinstalldirs || die
+
+ # Samuli Suominen <ssuominen@gentoo.org> (24 Jun 2012)
+ # AC_HEADER_STDC is called separately and #include <string.h> is
+ # without #ifdef in corkscrew.c. Instead of using AC_C_PROTOTYPES,
+ # remove the call entirely as unused wrt bug #423193
+ sed -i -e 's:AM_C_PROTOTYPES:dnl &:' configure.in || die
+
+ eautoreconf
+}
diff --git a/net-misc/corkscrew/metadata.xml b/net-misc/corkscrew/metadata.xml
new file mode 100644
index 000000000000..eb5fbf2a758e
--- /dev/null
+++ b/net-misc/corkscrew/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>sysadmin</herd>
+<longdescription>
+Corkscrew is a tool for tunneling SSH through HTTP proxies.
+</longdescription>
+<longdescription lang="ja">
+Corkscrew は HTTP プロクシ経由の SSH トンネルを構築するツールです。
+</longdescription>
+</pkgmetadata>
diff --git a/net-misc/csync/Manifest b/net-misc/csync/Manifest
new file mode 100644
index 000000000000..2fe8bf903efc
--- /dev/null
+++ b/net-misc/csync/Manifest
@@ -0,0 +1 @@
+DIST csync-0.50.0.tar.xz 2705992 SHA256 c07526942a93c1e213d354dc45fd61fbc0430c60e109e7a2f0fcaf6213a45c86 SHA512 babe44af3a4f0bf58e011f1c33c7a6df9bc7751e03714dd64d8269c7c51bcc7f2ab32c4d286e5a11465c9498c988d1812c426a4f415f1138a4fb9fa341e1e29a WHIRLPOOL 956442a098be232415d987583157f0b4c47b3293b4c4d4ca6248264f40a614adad922cb6c7e59f168de447b72cdd7c0151a498cd344fd6289b9d7faa39254d77
diff --git a/net-misc/csync/csync-0.50.0.ebuild b/net-misc/csync/csync-0.50.0.ebuild
new file mode 100644
index 000000000000..603189639805
--- /dev/null
+++ b/net-misc/csync/csync-0.50.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="lightweight file synchronizer utility"
+HOMEPAGE="http://csync.org/"
+SRC_URI="https://open.cryptomilk.org/attachments/download/27/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc iconv samba +sftp test"
+
+RDEPEND=">=dev-db/sqlite-3.4:3
+ net-libs/neon[ssl]
+ iconv? ( virtual/libiconv )
+ samba? ( >=net-fs/samba-3.5 )
+ sftp? ( >=net-libs/libssh-0.5 )
+ !net-misc/ocsync"
+DEPEND="${RDEPEND}
+ app-text/asciidoc
+ doc? ( app-doc/doxygen )
+ test? ( dev-util/cmocka )"
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # proper docdir
+ sed -e "s:/doc/${PN}:/doc/${PF}:" \
+ -i doc/CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DSYSCONF_INSTALL_DIR="${EPREFIX}"/etc
+ $(cmake-utils_use_with iconv ICONV)
+ $(cmake-utils_use test UNIT_TESTING)
+ $(cmake-utils_use_find_package doc Doxygen)
+ $(cmake-utils_use_find_package samba Libsmbclient)
+ $(cmake-utils_use_find_package sftp LibSSH)
+ )
+ cmake-utils_src_configure
+}
diff --git a/net-misc/csync/metadata.xml b/net-misc/csync/metadata.xml
new file mode 100644
index 000000000000..f713f2a74b47
--- /dev/null
+++ b/net-misc/csync/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>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+ <use>
+ <flag name="sftp">Enable sftp transfer support via <pkg>net-libs/libssh</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/curl/Manifest b/net-misc/curl/Manifest
new file mode 100644
index 000000000000..eb700fb3e16c
--- /dev/null
+++ b/net-misc/curl/Manifest
@@ -0,0 +1,2 @@
+DIST curl-7.42.1.tar.bz2 3327304 SHA256 e2905973391ec2dfd7743a8034ad10eeb58dab8b3a297e7892a41a7999cac887 SHA512 846c2d2bc73d39240686bf54e4c02553a1ca1640123fef30538cfc8a6317650f4cb9f1cc882016b7826ef9c84cb92adbfa24e55d59d2e7203bdcb12835fb474f WHIRLPOOL ff826e11812334ebca650c54788bf1b81b2927f7b9607b10e79cc70f6d1f9b893aebc816914158243510ffaead3b15a21ce10e7180eeb175b0b503e9ac8b0c6e
+DIST curl-7.43.0.tar.bz2 3363770 SHA256 baa654a1122530483ccc1c58cc112fec3724a82c11c6a389f1e6a37dc8858df9 SHA512 0b06ec078680619f56a458ac115142546134917331b71b73ed2c0371c480034dac7ed848814be0dd1e752154c53e48b9e0276b83f75a690df6cfb480ab331272 WHIRLPOOL e5c97b3cbf0f9915f62a100ce2972e6cffcabae753770c2f0a1fc3bcef3a66c0a2d4d7e361b00f442d62eca3b0d9526eb34f6b043fb655648180e81ef630a527
diff --git a/net-misc/curl/curl-7.42.1-r1.ebuild b/net-misc/curl/curl-7.42.1-r1.ebuild
new file mode 100644
index 000000000000..85e5f86dc206
--- /dev/null
+++ b/net-misc/curl/curl-7.42.1-r1.ebuild
@@ -0,0 +1,244 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils prefix multilib-minimal
+
+DESCRIPTION="A Client that groks URLs"
+HOMEPAGE="http://curl.haxx.se/"
+SRC_URI="http://curl.haxx.se/download/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="adns http2 idn ipv6 kerberos ldap metalink rtmp samba ssh ssl static-libs test threads"
+IUSE+=" curl_ssl_axtls curl_ssl_gnutls curl_ssl_nss +curl_ssl_openssl curl_ssl_polarssl curl_ssl_winssl"
+IUSE+=" elibc_Winnt"
+
+#lead to lots of false negatives, bug #285669
+RESTRICT="test"
+
+RDEPEND="ldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] )
+ ssl? (
+ curl_ssl_axtls? (
+ >=net-libs/axtls-1.4.9-r1[${MULTILIB_USEDEP}]
+ app-misc/ca-certificates
+ )
+ curl_ssl_gnutls? (
+ || (
+ (
+ >=net-libs/gnutls-3.2.15[static-libs?,${MULTILIB_USEDEP}]
+ >=dev-libs/nettle-2.6[${MULTILIB_USEDEP}]
+ )
+ (
+ =net-libs/gnutls-2.12*[nettle,static-libs?,${MULTILIB_USEDEP}]
+ >=dev-libs/nettle-2.6[${MULTILIB_USEDEP}]
+ )
+ (
+ =net-libs/gnutls-2.12*[-nettle,static-libs?,${MULTILIB_USEDEP}]
+ >=dev-libs/libgcrypt-1.5.3[static-libs?,${MULTILIB_USEDEP}]
+ )
+ )
+ app-misc/ca-certificates
+ )
+ curl_ssl_openssl? (
+ >=dev-libs/openssl-1.0.1h-r2[static-libs?,${MULTILIB_USEDEP}]
+ )
+ curl_ssl_nss? (
+ >=dev-libs/nss-3.15.4[${MULTILIB_USEDEP}]
+ app-misc/ca-certificates
+ )
+ curl_ssl_polarssl? (
+ >=net-libs/polarssl-1.3.4:=[${MULTILIB_USEDEP}]
+ app-misc/ca-certificates
+ )
+ )
+ http2? ( =net-libs/nghttp2-0.7*[${MULTILIB_USEDEP}] )
+ idn? ( >=net-dns/libidn-1.28[static-libs?,${MULTILIB_USEDEP}] )
+ adns? ( >=net-dns/c-ares-1.10.0-r1[${MULTILIB_USEDEP}] )
+ kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
+ metalink? ( >=media-libs/libmetalink-0.1.1[${MULTILIB_USEDEP}] )
+ rtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
+ ssh? ( >=net-libs/libssh2-1.4.3[static-libs?,${MULTILIB_USEDEP}] )
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140508-r13
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+
+# Do we need to enforce the same ssl backend for curl and rtmpdump? Bug #423303
+# rtmp? (
+# media-video/rtmpdump
+# curl_ssl_gnutls? ( media-video/rtmpdump[gnutls] )
+# curl_ssl_openssl? ( media-video/rtmpdump[-gnutls,ssl] )
+# )
+
+# ssl providers to be added:
+# fbopenssl $(use_with spnego)
+
+# krb4 http://web.mit.edu/kerberos/www/krb4-end-of-life.html
+
+DEPEND="${RDEPEND}
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ test? (
+ sys-apps/diffutils
+ dev-lang/perl
+ )"
+
+# c-ares must be disabled for threads
+# only one ssl provider can be enabled
+REQUIRED_USE="
+ curl_ssl_winssl? ( elibc_Winnt )
+ threads? ( !adns )
+ ssl? (
+ ^^ (
+ curl_ssl_axtls
+ curl_ssl_gnutls
+ curl_ssl_openssl
+ curl_ssl_nss
+ curl_ssl_polarssl
+ curl_ssl_winssl
+ )
+ )"
+
+DOCS=( CHANGES README docs/FEATURES docs/INTERNALS \
+ docs/MANUAL docs/FAQ docs/BUGS docs/CONTRIBUTE)
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/curl/curlbuild.h
+)
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/curl-config
+)
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-7.30.0-prefix.patch \
+ "${FILESDIR}"/${PN}-respect-cflags-3.patch \
+ "${FILESDIR}"/${PN}-fix-gnutls-nettle.patch
+
+ sed -i '/LD_LIBRARY_PATH=/d' configure.ac || die #382241
+
+ epatch_user
+ eprefixify curl-config.in
+ eautoreconf
+}
+
+multilib_src_configure() {
+ einfo "\033[1;32m**************************************************\033[00m"
+
+ # We make use of the fact that later flags override earlier ones
+ # So start with all ssl providers off until proven otherwise
+ local myconf=()
+ myconf+=( --without-axtls --without-gnutls --without-nss --without-polarssl --without-ssl --without-winssl )
+ myconf+=( --with-ca-bundle="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt )
+ if use ssl ; then
+ if use curl_ssl_axtls; then
+ einfo "SSL provided by axtls"
+ einfo "NOTE: axtls is meant for embedded systems and"
+ einfo "may not be the best choice as an ssl provider"
+ myconf+=( --with-axtls )
+ fi
+ if use curl_ssl_gnutls; then
+ einfo "SSL provided by gnutls"
+ if has_version ">=net-libs/gnutls-3.2.15[${MULTILIB_USEDEP}]" || has_version "=net-libs/gnutls-2.12*[nettle,${MULTILIB_USEDEP}]"; then
+ einfo "gnutls compiled with dev-libs/nettle"
+ myconf+=( --with-gnutls --with-nettle )
+ else
+ einfo "gnutls compiled with dev-libs/libgcrypt"
+ myconf+=( --with-gnutls --without-nettle )
+ fi
+ fi
+ if use curl_ssl_nss; then
+ einfo "SSL provided by nss"
+ myconf+=( --with-nss )
+ fi
+ if use curl_ssl_polarssl; then
+ einfo "SSL provided by polarssl"
+ einfo "NOTE: polarssl is meant for embedded systems and"
+ einfo "may not be the best choice as an ssl provider"
+ myconf+=( --with-polarssl )
+ fi
+ if use curl_ssl_openssl; then
+ einfo "SSL provided by openssl"
+ myconf+=( --with-ssl --with-ca-path="${EPREFIX}"/etc/ssl/certs )
+ fi
+ if use curl_ssl_winssl; then
+ einfo "SSL provided by Windows"
+ myconf+=( --with-winssl )
+ fi
+ else
+ einfo "SSL disabled"
+ fi
+ einfo "\033[1;32m**************************************************\033[00m"
+
+ # These configuration options are organized alphabetically
+ # within each category. This should make it easier if we
+ # ever decide to make any of them contingent on USE flags:
+ # 1) protocols first. To see them all do
+ # 'grep SUPPORT_PROTOCOLS configure.ac'
+ # 2) --enable/disable options second.
+ # 'grep -- --enable configure | grep Check | awk '{ print $4 }' | sort
+ # 3) --with/without options third.
+ # grep -- --with configure | grep Check | awk '{ print $4 }' | sort
+ ECONF_SOURCE="${S}" \
+ econf \
+ --enable-dict \
+ --enable-file \
+ --enable-ftp \
+ --enable-gopher \
+ --enable-http \
+ --enable-imap \
+ $(use_enable ldap) \
+ $(use_enable ldap ldaps) \
+ --enable-pop3 \
+ --enable-rtsp \
+ $(use_enable samba smb) \
+ $(use_with ssh libssh2) \
+ --enable-smtp \
+ --enable-telnet \
+ --enable-tftp \
+ $(use_enable adns ares) \
+ --enable-cookies \
+ --enable-hidden-symbols \
+ $(use_enable ipv6) \
+ --enable-largefile \
+ --enable-manual \
+ --enable-proxy \
+ --disable-soname-bump \
+ --disable-sspi \
+ $(use_enable static-libs static) \
+ $(use_enable threads threaded-resolver) \
+ --disable-versioned-symbols \
+ --without-cyassl \
+ --without-darwinssl \
+ $(use_with idn libidn) \
+ $(use_with kerberos gssapi "${EPREFIX}"/usr) \
+ --without-krb4 \
+ $(use_with metalink libmetalink) \
+ $(use_with http2 nghttp2) \
+ $(use_with rtmp librtmp) \
+ --without-spnego \
+ --without-winidn \
+ --with-zlib \
+ "${myconf[@]}"
+
+ if ! multilib_is_native_abi; then
+ # avoid building the client
+ sed -i -e '/SUBDIRS/s:src::' Makefile || die
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files --all
+
+ rm -rf "${ED}"/etc/
+
+ # https://sourceforge.net/tracker/index.php?func=detail&aid=1705197&group_id=976&atid=350976
+ insinto /usr/share/aclocal
+ doins docs/libcurl/libcurl.m4
+}
diff --git a/net-misc/curl/curl-7.42.1.ebuild b/net-misc/curl/curl-7.42.1.ebuild
new file mode 100644
index 000000000000..93e5bc53d5b9
--- /dev/null
+++ b/net-misc/curl/curl-7.42.1.ebuild
@@ -0,0 +1,243 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils prefix multilib-minimal
+
+DESCRIPTION="A Client that groks URLs"
+HOMEPAGE="http://curl.haxx.se/"
+SRC_URI="http://curl.haxx.se/download/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="adns idn ipv6 kerberos ldap metalink rtmp samba ssh ssl static-libs test threads"
+IUSE="${IUSE} curl_ssl_axtls curl_ssl_gnutls curl_ssl_nss +curl_ssl_openssl curl_ssl_polarssl curl_ssl_winssl"
+IUSE="${IUSE} elibc_Winnt"
+
+#lead to lots of false negatives, bug #285669
+RESTRICT="test"
+
+RDEPEND="ldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] )
+ ssl? (
+ curl_ssl_axtls? (
+ >=net-libs/axtls-1.4.9-r1[${MULTILIB_USEDEP}]
+ app-misc/ca-certificates
+ )
+ curl_ssl_gnutls? (
+ || (
+ (
+ >=net-libs/gnutls-3.2.15[static-libs?,${MULTILIB_USEDEP}]
+ >=dev-libs/nettle-2.6[${MULTILIB_USEDEP}]
+ )
+ (
+ =net-libs/gnutls-2.12*[nettle,static-libs?,${MULTILIB_USEDEP}]
+ >=dev-libs/nettle-2.6[${MULTILIB_USEDEP}]
+ )
+ (
+ =net-libs/gnutls-2.12*[-nettle,static-libs?,${MULTILIB_USEDEP}]
+ >=dev-libs/libgcrypt-1.5.3[static-libs?,${MULTILIB_USEDEP}]
+ )
+ )
+ app-misc/ca-certificates
+ )
+ curl_ssl_openssl? (
+ >=dev-libs/openssl-1.0.1h-r2[static-libs?,${MULTILIB_USEDEP}]
+ )
+ curl_ssl_nss? (
+ >=dev-libs/nss-3.15.4[${MULTILIB_USEDEP}]
+ app-misc/ca-certificates
+ )
+ curl_ssl_polarssl? (
+ >=net-libs/polarssl-1.3.4:=[${MULTILIB_USEDEP}]
+ app-misc/ca-certificates
+ )
+ )
+ idn? ( >=net-dns/libidn-1.28[static-libs?,${MULTILIB_USEDEP}] )
+ adns? ( >=net-dns/c-ares-1.10.0-r1[${MULTILIB_USEDEP}] )
+ kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
+ metalink? ( >=media-libs/libmetalink-0.1.1[${MULTILIB_USEDEP}] )
+ rtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
+ ssh? ( >=net-libs/libssh2-1.4.3[static-libs?,${MULTILIB_USEDEP}] )
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140508-r13
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+
+# Do we need to enforce the same ssl backend for curl and rtmpdump? Bug #423303
+# rtmp? (
+# media-video/rtmpdump
+# curl_ssl_gnutls? ( media-video/rtmpdump[gnutls] )
+# curl_ssl_openssl? ( media-video/rtmpdump[-gnutls,ssl] )
+# )
+
+# ssl providers to be added:
+# fbopenssl $(use_with spnego)
+
+# krb4 http://web.mit.edu/kerberos/www/krb4-end-of-life.html
+
+DEPEND="${RDEPEND}
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ test? (
+ sys-apps/diffutils
+ dev-lang/perl
+ )"
+
+# c-ares must be disabled for threads
+# only one ssl provider can be enabled
+REQUIRED_USE="
+ curl_ssl_winssl? ( elibc_Winnt )
+ threads? ( !adns )
+ ssl? (
+ ^^ (
+ curl_ssl_axtls
+ curl_ssl_gnutls
+ curl_ssl_openssl
+ curl_ssl_nss
+ curl_ssl_polarssl
+ curl_ssl_winssl
+ )
+ )"
+
+DOCS=( CHANGES README docs/FEATURES docs/INTERNALS \
+ docs/MANUAL docs/FAQ docs/BUGS docs/CONTRIBUTE)
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/curl/curlbuild.h
+)
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/curl-config
+)
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-7.30.0-prefix.patch \
+ "${FILESDIR}"/${PN}-respect-cflags-3.patch \
+ "${FILESDIR}"/${PN}-fix-gnutls-nettle.patch
+
+ sed -i '/LD_LIBRARY_PATH=/d' configure.ac || die #382241
+
+ epatch_user
+ eprefixify curl-config.in
+ eautoreconf
+}
+
+multilib_src_configure() {
+ einfo "\033[1;32m**************************************************\033[00m"
+
+ # We make use of the fact that later flags override earlier ones
+ # So start with all ssl providers off until proven otherwise
+ local myconf=()
+ myconf+=( --without-axtls --without-gnutls --without-nss --without-polarssl --without-ssl --without-winssl )
+ myconf+=( --with-ca-bundle="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt )
+ if use ssl ; then
+ if use curl_ssl_axtls; then
+ einfo "SSL provided by axtls"
+ einfo "NOTE: axtls is meant for embedded systems and"
+ einfo "may not be the best choice as an ssl provider"
+ myconf+=( --with-axtls )
+ fi
+ if use curl_ssl_gnutls; then
+ einfo "SSL provided by gnutls"
+ if has_version ">=net-libs/gnutls-3.2.15[${MULTILIB_USEDEP}]" || has_version "=net-libs/gnutls-2.12*[nettle,${MULTILIB_USEDEP}]"; then
+ einfo "gnutls compiled with dev-libs/nettle"
+ myconf+=( --with-gnutls --with-nettle )
+ else
+ einfo "gnutls compiled with dev-libs/libgcrypt"
+ myconf+=( --with-gnutls --without-nettle )
+ fi
+ fi
+ if use curl_ssl_nss; then
+ einfo "SSL provided by nss"
+ myconf+=( --with-nss )
+ fi
+ if use curl_ssl_polarssl; then
+ einfo "SSL provided by polarssl"
+ einfo "NOTE: polarssl is meant for embedded systems and"
+ einfo "may not be the best choice as an ssl provider"
+ myconf+=( --with-polarssl )
+ fi
+ if use curl_ssl_openssl; then
+ einfo "SSL provided by openssl"
+ myconf+=( --with-ssl --with-ca-path="${EPREFIX}"/etc/ssl/certs )
+ fi
+ if use curl_ssl_winssl; then
+ einfo "SSL provided by Windows"
+ myconf+=( --with-winssl )
+ fi
+ else
+ einfo "SSL disabled"
+ fi
+ einfo "\033[1;32m**************************************************\033[00m"
+
+ # These configuration options are organized alphabetically
+ # within each category. This should make it easier if we
+ # ever decide to make any of them contingent on USE flags:
+ # 1) protocols first. To see them all do
+ # 'grep SUPPORT_PROTOCOLS configure.ac'
+ # 2) --enable/disable options second.
+ # 'grep -- --enable configure | grep Check | awk '{ print $4 }' | sort
+ # 3) --with/without options third.
+ # grep -- --with configure | grep Check | awk '{ print $4 }' | sort
+ ECONF_SOURCE="${S}" \
+ econf \
+ --enable-dict \
+ --enable-file \
+ --enable-ftp \
+ --enable-gopher \
+ --enable-http \
+ --enable-imap \
+ $(use_enable ldap) \
+ $(use_enable ldap ldaps) \
+ --enable-pop3 \
+ --enable-rtsp \
+ $(use_enable samba smb) \
+ $(use_with ssh libssh2) \
+ --enable-smtp \
+ --enable-telnet \
+ --enable-tftp \
+ $(use_enable adns ares) \
+ --enable-cookies \
+ --enable-hidden-symbols \
+ $(use_enable ipv6) \
+ --enable-largefile \
+ --enable-manual \
+ --enable-proxy \
+ --disable-soname-bump \
+ --disable-sspi \
+ $(use_enable static-libs static) \
+ $(use_enable threads threaded-resolver) \
+ --disable-versioned-symbols \
+ --without-cyassl \
+ --without-darwinssl \
+ $(use_with idn libidn) \
+ $(use_with kerberos gssapi "${EPREFIX}"/usr) \
+ --without-krb4 \
+ $(use_with metalink libmetalink) \
+ --without-nghttp2 \
+ $(use_with rtmp librtmp) \
+ --without-spnego \
+ --without-winidn \
+ --with-zlib \
+ "${myconf[@]}"
+
+ if ! multilib_is_native_abi; then
+ # avoid building the client
+ sed -i -e '/SUBDIRS/s:src::' Makefile || die
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files --all
+
+ rm -rf "${ED}"/etc/
+
+ # https://sourceforge.net/tracker/index.php?func=detail&aid=1705197&group_id=976&atid=350976
+ insinto /usr/share/aclocal
+ doins docs/libcurl/libcurl.m4
+}
diff --git a/net-misc/curl/curl-7.43.0.ebuild b/net-misc/curl/curl-7.43.0.ebuild
new file mode 100644
index 000000000000..434cff2396b1
--- /dev/null
+++ b/net-misc/curl/curl-7.43.0.ebuild
@@ -0,0 +1,244 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils prefix multilib-minimal
+
+DESCRIPTION="A Client that groks URLs"
+HOMEPAGE="http://curl.haxx.se/"
+SRC_URI="http://curl.haxx.se/download/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="adns http2 idn ipv6 kerberos ldap metalink rtmp samba ssh ssl static-libs test threads"
+IUSE+=" curl_ssl_axtls curl_ssl_gnutls curl_ssl_nss +curl_ssl_openssl curl_ssl_polarssl curl_ssl_winssl"
+IUSE+=" elibc_Winnt"
+
+#lead to lots of false negatives, bug #285669
+RESTRICT="test"
+
+RDEPEND="ldap? ( >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] )
+ ssl? (
+ curl_ssl_axtls? (
+ >=net-libs/axtls-1.4.9-r1[${MULTILIB_USEDEP}]
+ app-misc/ca-certificates
+ )
+ curl_ssl_gnutls? (
+ || (
+ (
+ >=net-libs/gnutls-3.2.15[static-libs?,${MULTILIB_USEDEP}]
+ >=dev-libs/nettle-2.6[${MULTILIB_USEDEP}]
+ )
+ (
+ =net-libs/gnutls-2.12*[nettle,static-libs?,${MULTILIB_USEDEP}]
+ >=dev-libs/nettle-2.6[${MULTILIB_USEDEP}]
+ )
+ (
+ =net-libs/gnutls-2.12*[-nettle,static-libs?,${MULTILIB_USEDEP}]
+ >=dev-libs/libgcrypt-1.5.3[static-libs?,${MULTILIB_USEDEP}]
+ )
+ )
+ app-misc/ca-certificates
+ )
+ curl_ssl_openssl? (
+ >=dev-libs/openssl-1.0.1h-r2[static-libs?,${MULTILIB_USEDEP}]
+ )
+ curl_ssl_nss? (
+ >=dev-libs/nss-3.15.4[${MULTILIB_USEDEP}]
+ app-misc/ca-certificates
+ )
+ curl_ssl_polarssl? (
+ >=net-libs/polarssl-1.3.4:=[${MULTILIB_USEDEP}]
+ app-misc/ca-certificates
+ )
+ )
+ http2? ( net-libs/nghttp2[${MULTILIB_USEDEP}] )
+ idn? ( >=net-dns/libidn-1.28[static-libs?,${MULTILIB_USEDEP}] )
+ adns? ( >=net-dns/c-ares-1.10.0-r1[${MULTILIB_USEDEP}] )
+ kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
+ metalink? ( >=media-libs/libmetalink-0.1.1[${MULTILIB_USEDEP}] )
+ rtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
+ ssh? ( >=net-libs/libssh2-1.4.3[static-libs?,${MULTILIB_USEDEP}] )
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140508-r13
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+
+# Do we need to enforce the same ssl backend for curl and rtmpdump? Bug #423303
+# rtmp? (
+# media-video/rtmpdump
+# curl_ssl_gnutls? ( media-video/rtmpdump[gnutls] )
+# curl_ssl_openssl? ( media-video/rtmpdump[-gnutls,ssl] )
+# )
+
+# ssl providers to be added:
+# fbopenssl $(use_with spnego)
+
+# krb4 http://web.mit.edu/kerberos/www/krb4-end-of-life.html
+
+DEPEND="${RDEPEND}
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+ test? (
+ sys-apps/diffutils
+ dev-lang/perl
+ )"
+
+# c-ares must be disabled for threads
+# only one ssl provider can be enabled
+REQUIRED_USE="
+ curl_ssl_winssl? ( elibc_Winnt )
+ threads? ( !adns )
+ ssl? (
+ ^^ (
+ curl_ssl_axtls
+ curl_ssl_gnutls
+ curl_ssl_openssl
+ curl_ssl_nss
+ curl_ssl_polarssl
+ curl_ssl_winssl
+ )
+ )"
+
+DOCS=( CHANGES README docs/FEATURES docs/INTERNALS \
+ docs/MANUAL docs/FAQ docs/BUGS docs/CONTRIBUTE)
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/curl/curlbuild.h
+)
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/curl-config
+)
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-7.30.0-prefix.patch \
+ "${FILESDIR}"/${PN}-respect-cflags-3.patch \
+ "${FILESDIR}"/${PN}-fix-gnutls-nettle.patch
+
+ sed -i '/LD_LIBRARY_PATH=/d' configure.ac || die #382241
+
+ epatch_user
+ eprefixify curl-config.in
+ eautoreconf
+}
+
+multilib_src_configure() {
+ einfo "\033[1;32m**************************************************\033[00m"
+
+ # We make use of the fact that later flags override earlier ones
+ # So start with all ssl providers off until proven otherwise
+ local myconf=()
+ myconf+=( --without-axtls --without-gnutls --without-nss --without-polarssl --without-ssl --without-winssl )
+ myconf+=( --with-ca-bundle="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt )
+ if use ssl ; then
+ if use curl_ssl_axtls; then
+ einfo "SSL provided by axtls"
+ einfo "NOTE: axtls is meant for embedded systems and"
+ einfo "may not be the best choice as an ssl provider"
+ myconf+=( --with-axtls )
+ fi
+ if use curl_ssl_gnutls; then
+ einfo "SSL provided by gnutls"
+ if has_version ">=net-libs/gnutls-3.2.15[${MULTILIB_USEDEP}]" || has_version "=net-libs/gnutls-2.12*[nettle,${MULTILIB_USEDEP}]"; then
+ einfo "gnutls compiled with dev-libs/nettle"
+ myconf+=( --with-gnutls --with-nettle )
+ else
+ einfo "gnutls compiled with dev-libs/libgcrypt"
+ myconf+=( --with-gnutls --without-nettle )
+ fi
+ fi
+ if use curl_ssl_nss; then
+ einfo "SSL provided by nss"
+ myconf+=( --with-nss )
+ fi
+ if use curl_ssl_polarssl; then
+ einfo "SSL provided by polarssl"
+ einfo "NOTE: polarssl is meant for embedded systems and"
+ einfo "may not be the best choice as an ssl provider"
+ myconf+=( --with-polarssl )
+ fi
+ if use curl_ssl_openssl; then
+ einfo "SSL provided by openssl"
+ myconf+=( --with-ssl --with-ca-path="${EPREFIX}"/etc/ssl/certs )
+ fi
+ if use curl_ssl_winssl; then
+ einfo "SSL provided by Windows"
+ myconf+=( --with-winssl )
+ fi
+ else
+ einfo "SSL disabled"
+ fi
+ einfo "\033[1;32m**************************************************\033[00m"
+
+ # These configuration options are organized alphabetically
+ # within each category. This should make it easier if we
+ # ever decide to make any of them contingent on USE flags:
+ # 1) protocols first. To see them all do
+ # 'grep SUPPORT_PROTOCOLS configure.ac'
+ # 2) --enable/disable options second.
+ # 'grep -- --enable configure | grep Check | awk '{ print $4 }' | sort
+ # 3) --with/without options third.
+ # grep -- --with configure | grep Check | awk '{ print $4 }' | sort
+ ECONF_SOURCE="${S}" \
+ econf \
+ --enable-dict \
+ --enable-file \
+ --enable-ftp \
+ --enable-gopher \
+ --enable-http \
+ --enable-imap \
+ $(use_enable ldap) \
+ $(use_enable ldap ldaps) \
+ --enable-pop3 \
+ --enable-rtsp \
+ $(use_enable samba smb) \
+ $(use_with ssh libssh2) \
+ --enable-smtp \
+ --enable-telnet \
+ --enable-tftp \
+ $(use_enable adns ares) \
+ --enable-cookies \
+ --enable-hidden-symbols \
+ $(use_enable ipv6) \
+ --enable-largefile \
+ --enable-manual \
+ --enable-proxy \
+ --disable-soname-bump \
+ --disable-sspi \
+ $(use_enable static-libs static) \
+ $(use_enable threads threaded-resolver) \
+ --disable-versioned-symbols \
+ --without-cyassl \
+ --without-darwinssl \
+ $(use_with idn libidn) \
+ $(use_with kerberos gssapi "${EPREFIX}"/usr) \
+ --without-krb4 \
+ $(use_with metalink libmetalink) \
+ $(use_with http2 nghttp2) \
+ $(use_with rtmp librtmp) \
+ --without-spnego \
+ --without-winidn \
+ --with-zlib \
+ "${myconf[@]}"
+
+ if ! multilib_is_native_abi; then
+ # avoid building the client
+ sed -i -e '/SUBDIRS/s:src::' Makefile || die
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files --all
+
+ rm -rf "${ED}"/etc/
+
+ # https://sourceforge.net/tracker/index.php?func=detail&aid=1705197&group_id=976&atid=350976
+ insinto /usr/share/aclocal
+ doins docs/libcurl/libcurl.m4
+}
diff --git a/net-misc/curl/files/curl-7.30.0-prefix.patch b/net-misc/curl/files/curl-7.30.0-prefix.patch
new file mode 100644
index 000000000000..fd495c49b132
--- /dev/null
+++ b/net-misc/curl/files/curl-7.30.0-prefix.patch
@@ -0,0 +1,21 @@
+diff -Naur curl-7.30.0.orig/curl-config.in curl-7.30.0/curl-config.in
+--- curl-7.30.0.orig/curl-config.in 2013-02-06 09:44:37.000000000 -0500
++++ curl-7.30.0/curl-config.in 2013-04-17 18:43:56.000000000 -0400
+@@ -134,7 +134,7 @@
+ else
+ CPPFLAG_CURL_STATICLIB=""
+ fi
+- if test "X@includedir@" = "X/usr/include"; then
++ if test "X@includedir@" = "X@GENTOO_PORTAGE_EPREFIX@/usr/include"; then
+ echo "$CPPFLAG_CURL_STATICLIB"
+ else
+ echo "${CPPFLAG_CURL_STATICLIB}-I@includedir@"
+@@ -142,7 +142,7 @@
+ ;;
+
+ --libs)
+- if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
++ if test "X@libdir@" != "X@GENTOO_PORTAGE_EPREFIX@/usr/lib" -a "X@libdir@" != "X@GENTOO_PORTAGE_EPREFIX@/usr/lib64"; then
+ CURLLIBDIR="-L@libdir@ "
+ else
+ CURLLIBDIR=""
diff --git a/net-misc/curl/files/curl-fix-gnutls-nettle.patch b/net-misc/curl/files/curl-fix-gnutls-nettle.patch
new file mode 100644
index 000000000000..fbacb7748bdc
--- /dev/null
+++ b/net-misc/curl/files/curl-fix-gnutls-nettle.patch
@@ -0,0 +1,27 @@
+diff -Naur curl-7.25.0.orig//configure.ac curl-7.25.0/configure.ac
+--- curl-7.25.0.orig//configure.ac 2012-04-04 17:24:48.000000000 -0400
++++ curl-7.25.0/configure.ac 2012-04-04 17:23:07.000000000 -0400
+@@ -1823,20 +1823,9 @@
+
+ if test "$GNUTLS_ENABLED" = "1"; then
+ USE_GNUTLS_NETTLE=
+- # First check if we can detect either crypto library via transitive linking
+- AC_CHECK_LIB(gnutls, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
+- if test "$USE_GNUTLS_NETTLE" = ""; then
+- AC_CHECK_LIB(gnutls, gcry_control, [ USE_GNUTLS_NETTLE=0 ])
+- fi
+- # If not, try linking directly to both of them to see if they are available
+- if test "$USE_GNUTLS_NETTLE" = ""; then
+- AC_CHECK_LIB(nettle, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
+- fi
+- if test "$USE_GNUTLS_NETTLE" = ""; then
+- AC_CHECK_LIB(gcrypt, gcry_control, [ USE_GNUTLS_NETTLE=0 ])
+- fi
+- if test "$USE_GNUTLS_NETTLE" = ""; then
+- AC_MSG_ERROR([GnuTLS found, but neither gcrypt nor nettle found])
++ AC_ARG_WITH(nettle)
++ if test "x$withval" = "xyes"; then
++ USE_GNUTLS_NETTLE=1
+ fi
+ if test "$USE_GNUTLS_NETTLE" = "1"; then
+ AC_DEFINE(USE_GNUTLS_NETTLE, 1, [if GnuTLS uses nettle as crypto backend])
diff --git a/net-misc/curl/files/curl-respect-cflags-3.patch b/net-misc/curl/files/curl-respect-cflags-3.patch
new file mode 100644
index 000000000000..4a4a614ee49a
--- /dev/null
+++ b/net-misc/curl/files/curl-respect-cflags-3.patch
@@ -0,0 +1,14 @@
+diff --git a/configure.ac b/configure.ac
+index e9b49c7..e374ab6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -280,9 +280,6 @@ dnl **********************************************************************
+
+ CURL_CHECK_COMPILER
+ CURL_SET_COMPILER_BASIC_OPTS
+-CURL_SET_COMPILER_DEBUG_OPTS
+-CURL_SET_COMPILER_OPTIMIZE_OPTS
+-CURL_SET_COMPILER_WARNING_OPTS
+
+ if test "$compiler_id" = "INTEL_UNIX_C"; then
+ #
diff --git a/net-misc/curl/metadata.xml b/net-misc/curl/metadata.xml
new file mode 100644
index 000000000000..e0695ccfdf9a
--- /dev/null
+++ b/net-misc/curl/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <maintainer>
+ <email>gregkh@gentoo.org</email>
+ <name>Greg Kroah-Hartman</name>
+ </maintainer>
+ <use>
+ <flag name="http2">Enabled HTTP/2.0 support</flag>
+ <flag name="ssh">Enabled SSH urls in curl using libssh2</flag>
+ <flag name="metalink">Enable metalink support</flag>
+ <flag name="ssl">Enable crypto engine support (via openssl if USE='-gnutls -nss')</flag>
+ <flag name="rtmp">Enable RTMP Streaming Media support</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:curl:curl</remote-id>
+ <remote-id type="cpe">cpe:/a:curl:libcurl</remote-id>
+ <remote-id type="cpe">cpe:/a:haxx:curl</remote-id>
+ <remote-id type="cpe">cpe:/a:haxx:libcurl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/dahdi-tools/Manifest b/net-misc/dahdi-tools/Manifest
new file mode 100644
index 000000000000..ad233aa9355e
--- /dev/null
+++ b/net-misc/dahdi-tools/Manifest
@@ -0,0 +1,8 @@
+DIST dahdi-tools-2.10.0.tar.gz 655475 SHA256 fc70c4677cf251abaa16c74adb0f5ee13361be6b463b048f95cf061739f15bcd SHA512 cf84d1117ac6b4dbd87db4a6ec072e945e64677fbd5dca169e06d954c599ce4ff9a80254aa3027bcc02f7770a5e0a3bcaca075aacfd28c62870d011801d0d225 WHIRLPOOL 19ebf4ddf12e7267d5fe2f35bf43d4ae60fe7c9e69edd4991ad5bbce7a2af5b2dbf0f4e1dc4f8e078749f7b8c98b0c0b70a1cd61c844955cceacc24fd971ebe2
+DIST dahdi-tools-2.10.1.tar.gz 656275 SHA256 eac80535a0fa4f61fc7ba767bbbd726e0ad769e3d22c207e75d381fe578a6c21 SHA512 856116119336b1d51da1c263c95e361c379d61b672db69703f48fb260d570f9335169b8c53daf7d6b18725eb3112539fd9e229b257ff6e9d76a00e74a859da66 WHIRLPOOL 661e821bb6c7ee1b7243ec1893850d9a67085da2c9f74651be9b87871d97b6c7893ab1524df188c8e1dbcd8bacf9be9350a61da3ebff0fc9143f2006211224f6
+DIST dahdi-tools-2.10.2.tar.gz 656284 SHA256 9e904815dedab231084c542d2d7d5dcc832ebec4b5d5d999a5d757df8b2d571a SHA512 5030e5b5fee3ca7853da07a907a4a9e4e72b06d62cb315cf80c0978eac27d70d86024c32f0fc08e8f667f5d7c039968c862631cc310ce30008d52cd121c61004 WHIRLPOOL f07bcac099eeafe1512370f9e06940d546eb1e98b98caef1df7a4bdb865500c864207912c2151116a037eabaa060b72f7751c2b06dc1351004303bdfb7773ff0
+DIST dahdi-tools-2.6.2.tar.gz 843572 SHA256 1c000b31acee6e26187b72800b38325bf419e8eb95063e24b327030f2e8d63c5 SHA512 3e0abb7cdfff072720bf48ccdb5cc43d183e0c3217b1eadfee7920f5b29cfe31f3b79d981516ae95232065c7686a87f169835802788cb1185c3c947feff275c3 WHIRLPOOL 47c381abdbe63224308cf315cee0dc4ee48f65538bbe4f42f5edd409683fc18b9e0c66ec1548b9d853681c45bd3559c1eb47ff6a0874d8699aabf0ae061a71ca
+DIST dahdi-tools-2.8.0.tar.gz 642755 SHA256 bcc8b1fd90a0230489a818a185fcbc3d22b8acbf5d94981501ffa5290981732b SHA512 983e1dfe9bda130c3d0e60f44a79ebb75ae8ab9f27bd77d0355c58e901012465a37411fb1cdc97a131ac01ac892f37729f5853439aaba4ba5a4927c7a7997f81 WHIRLPOOL 14fbf62685cc3a135c2455905a5167e340b6d56202a403510736f00686c3093acbca341f22f9f897004670d4c68132a3fc064cd64922a9bff30bb908f9c40f8e
+DIST dahdi-tools-2.9.0.1.tar.gz 649990 SHA256 023bb55905dc7bddb682773369e1abe21e8bc4f86f96d54e43462a12c9b6530c SHA512 2e16312d4f44aa50cbd7d843514aca06b8f1019b114a00ca5a76cf40ea9b8e937766e70c7628a76a991fa3ad8a12d36782c378a2ad783f9882f0225429794494 WHIRLPOOL 120cd5aff2347848f70c3f364e44f4e26a48d40632214c12861ce563c91b9254cca80d56b833900def2efbcf18f8cf9c4911e58a80b8771c61233cfebf6eb221
+DIST gentoo-dahdi-tools-patchset-0.3.tar.bz2 2250 SHA256 2fce2849d6746db1256ee824d974c74f571a2d70a11246c3301c0ade6de43974 SHA512 15bba73140ede20f49f69419d9ef9a4f242d18ad2da6edee6e91c44fad7ddaf5aa7d6d9e5127c0af0f384d81b4bc8c3fae9e5504d13279abb7ac3db2d01b6a43 WHIRLPOOL a4642ab37673f0470631c3c330b89449f823f270d7266adf0f4bc77366d3bed085969fbc30534c6742b48f8a7f901a7e749021a4a406d2073c83db7e469f06e2
+DIST gentoo-dahdi-tools-patchset-0.4.tar.bz2 2665 SHA256 71642a87e566220c7e7f908adb25dadcf87ff62a23150a6e6074708fd91297b1 SHA512 e48797bd5e741ba94bfd2b19c088ae51812272dc67e7fac04a0c52df9a8371443112d0385e31fe0b812acfc4c912c8cc38e9c632131d5ede55afc43301e2c2be WHIRLPOOL c4704d6ba82a6c020632380507d4435d0c2af4d9c61ed753957bb0ca8ce50ee955526d13497e34db2b4f61a4160db2bc51e5df82fc2f49bc88d857041669f82b
diff --git a/net-misc/dahdi-tools/dahdi-tools-2.10.0.ebuild b/net-misc/dahdi-tools/dahdi-tools-2.10.0.ebuild
new file mode 100644
index 000000000000..df7c0827a009
--- /dev/null
+++ b/net-misc/dahdi-tools/dahdi-tools-2.10.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base
+
+DESCRIPTION="Userspace tools to configure the kernel modules from net-misc/dahdi"
+HOMEPAGE="http://www.asterisk.org"
+SRC_URI="http://downloads.asterisk.org/pub/telephony/${PN}/releases/${P}.tar.gz
+ mirror://gentoo/gentoo-${PN}-patchset-0.4.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE="ppp"
+
+DEPEND="dev-libs/newt
+ ppp? ( net-dialup/ppp )
+ >=net-misc/dahdi-2.5.0
+ !net-misc/zaptel
+ >=sys-kernel/linux-headers-2.6.35
+ virtual/libusb:0"
+RDEPEND="${DEPEND}"
+
+EPATCH_SUFFIX="diff"
+PATCHES=( "${WORKDIR}/${PN}-patchset" )
+
+src_compile() {
+ default_src_compile
+ emake tests
+ use ppp && emake -C ppp
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ use ppp && emake DESTDIR="${D}" -C ppp install
+ emake DESTDIR="${D}" config
+
+ dosbin patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest
+
+ # install init scripts
+ newinitd "${FILESDIR}"/dahdi.init2 dahdi
+ newinitd "${FILESDIR}"/dahdi-autoconf.init2 dahdi-autoconf
+ newconfd "${FILESDIR}"/dahdi-autoconf.conf2 dahdi-autoconf
+}
diff --git a/net-misc/dahdi-tools/dahdi-tools-2.10.1.ebuild b/net-misc/dahdi-tools/dahdi-tools-2.10.1.ebuild
new file mode 100644
index 000000000000..acdc58467bb5
--- /dev/null
+++ b/net-misc/dahdi-tools/dahdi-tools-2.10.1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base
+
+DESCRIPTION="Userspace tools to configure the kernel modules from net-misc/dahdi"
+HOMEPAGE="http://www.asterisk.org"
+SRC_URI="http://downloads.asterisk.org/pub/telephony/${PN}/releases/${P}.tar.gz
+ mirror://gentoo/gentoo-${PN}-patchset-0.4.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="ppp"
+
+DEPEND="dev-libs/newt
+ ppp? ( net-dialup/ppp )
+ >=net-misc/dahdi-2.5.0
+ !net-misc/zaptel
+ >=sys-kernel/linux-headers-2.6.35
+ virtual/libusb:0"
+RDEPEND="${DEPEND}"
+
+EPATCH_SUFFIX="diff"
+PATCHES=( "${WORKDIR}/${PN}-patchset" )
+
+src_prepare() {
+ base_src_prepare
+ sed -i \
+ -e 's:-Werror::' \
+ Makefile xpp/Makefile || die
+}
+
+src_compile() {
+ default_src_compile
+ emake tests
+ use ppp && emake -C ppp
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ use ppp && emake DESTDIR="${D}" -C ppp install
+ emake DESTDIR="${D}" config
+
+ dosbin patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest
+
+ # install init scripts
+ newinitd "${FILESDIR}"/dahdi.init2 dahdi
+ newinitd "${FILESDIR}"/dahdi-autoconf.init2 dahdi-autoconf
+ newconfd "${FILESDIR}"/dahdi-autoconf.conf2 dahdi-autoconf
+}
diff --git a/net-misc/dahdi-tools/dahdi-tools-2.10.2.ebuild b/net-misc/dahdi-tools/dahdi-tools-2.10.2.ebuild
new file mode 100644
index 000000000000..4a04cf36e8bd
--- /dev/null
+++ b/net-misc/dahdi-tools/dahdi-tools-2.10.2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base
+
+DESCRIPTION="Userspace tools to configure the kernel modules from net-misc/dahdi"
+HOMEPAGE="http://www.asterisk.org"
+SRC_URI="http://downloads.asterisk.org/pub/telephony/${PN}/releases/${P}.tar.gz
+ mirror://gentoo/gentoo-${PN}-patchset-0.4.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ppp"
+
+DEPEND="dev-libs/newt
+ ppp? ( net-dialup/ppp )
+ >=net-misc/dahdi-2.5.0
+ !net-misc/zaptel
+ >=sys-kernel/linux-headers-2.6.35
+ virtual/libusb:0"
+RDEPEND="${DEPEND}"
+
+EPATCH_SUFFIX="diff"
+PATCHES=( "${WORKDIR}/${PN}-patchset" )
+
+src_prepare() {
+ base_src_prepare
+ sed -i \
+ -e 's:-Werror::' \
+ Makefile xpp/Makefile || die
+}
+
+src_compile() {
+ default_src_compile
+ emake tests
+ use ppp && emake -C ppp
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ use ppp && emake DESTDIR="${D}" -C ppp install
+ emake DESTDIR="${D}" config
+
+ dosbin patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest
+
+ # install init scripts
+ newinitd "${FILESDIR}"/dahdi.init2 dahdi
+ newinitd "${FILESDIR}"/dahdi-autoconf.init2 dahdi-autoconf
+ newconfd "${FILESDIR}"/dahdi-autoconf.conf2 dahdi-autoconf
+}
diff --git a/net-misc/dahdi-tools/dahdi-tools-2.6.2.ebuild b/net-misc/dahdi-tools/dahdi-tools-2.6.2.ebuild
new file mode 100644
index 000000000000..45224b578f8a
--- /dev/null
+++ b/net-misc/dahdi-tools/dahdi-tools-2.6.2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base
+
+DESCRIPTION="Userspace tools to configure the kernel modules from net-misc/dahdi"
+HOMEPAGE="http://www.asterisk.org"
+SRC_URI="http://downloads.asterisk.org/pub/telephony/${PN}/releases/${P}.tar.gz
+ mirror://gentoo/gentoo-${PN}-patchset-0.3.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="ppp"
+
+DEPEND="dev-libs/newt
+ ppp? ( net-dialup/ppp )
+ >=net-misc/dahdi-2.5.0
+ !net-misc/zaptel
+ >=sys-kernel/linux-headers-2.6.35
+ virtual/libusb:0"
+RDEPEND="${DEPEND}"
+
+EPATCH_SUFFIX="diff"
+PATCHES=( "${WORKDIR}/${PN}-patchset" )
+
+src_compile() {
+ default_src_compile
+ emake tests
+ use ppp && emake -C ppp
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ use ppp && emake DESTDIR="${D}" -C ppp install
+ emake DESTDIR="${D}" config
+
+ dosbin patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest
+
+ # install init scripts
+ newinitd "${FILESDIR}"/dahdi.init2 dahdi
+ newinitd "${FILESDIR}"/dahdi-autoconf.init2 dahdi-autoconf
+ newconfd "${FILESDIR}"/dahdi-autoconf.conf2 dahdi-autoconf
+}
diff --git a/net-misc/dahdi-tools/dahdi-tools-2.8.0.ebuild b/net-misc/dahdi-tools/dahdi-tools-2.8.0.ebuild
new file mode 100644
index 000000000000..59ec917e4dc3
--- /dev/null
+++ b/net-misc/dahdi-tools/dahdi-tools-2.8.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base
+
+DESCRIPTION="Userspace tools to configure the kernel modules from net-misc/dahdi"
+HOMEPAGE="http://www.asterisk.org"
+SRC_URI="http://downloads.asterisk.org/pub/telephony/${PN}/releases/${P}.tar.gz
+ mirror://gentoo/gentoo-${PN}-patchset-0.4.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="ppp"
+
+DEPEND="dev-libs/newt
+ ppp? ( net-dialup/ppp )
+ >=net-misc/dahdi-2.5.0
+ !net-misc/zaptel
+ >=sys-kernel/linux-headers-2.6.35
+ virtual/libusb:0"
+RDEPEND="${DEPEND}"
+
+EPATCH_SUFFIX="diff"
+PATCHES=( "${WORKDIR}/${PN}-patchset" )
+
+src_compile() {
+ default_src_compile
+ emake tests
+ use ppp && emake -C ppp
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ use ppp && emake DESTDIR="${D}" -C ppp install
+ emake DESTDIR="${D}" config
+
+ dosbin patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest
+
+ # install init scripts
+ newinitd "${FILESDIR}"/dahdi.init2 dahdi
+ newinitd "${FILESDIR}"/dahdi-autoconf.init2 dahdi-autoconf
+ newconfd "${FILESDIR}"/dahdi-autoconf.conf2 dahdi-autoconf
+}
diff --git a/net-misc/dahdi-tools/dahdi-tools-2.9.0.1.ebuild b/net-misc/dahdi-tools/dahdi-tools-2.9.0.1.ebuild
new file mode 100644
index 000000000000..59ec917e4dc3
--- /dev/null
+++ b/net-misc/dahdi-tools/dahdi-tools-2.9.0.1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base
+
+DESCRIPTION="Userspace tools to configure the kernel modules from net-misc/dahdi"
+HOMEPAGE="http://www.asterisk.org"
+SRC_URI="http://downloads.asterisk.org/pub/telephony/${PN}/releases/${P}.tar.gz
+ mirror://gentoo/gentoo-${PN}-patchset-0.4.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="ppp"
+
+DEPEND="dev-libs/newt
+ ppp? ( net-dialup/ppp )
+ >=net-misc/dahdi-2.5.0
+ !net-misc/zaptel
+ >=sys-kernel/linux-headers-2.6.35
+ virtual/libusb:0"
+RDEPEND="${DEPEND}"
+
+EPATCH_SUFFIX="diff"
+PATCHES=( "${WORKDIR}/${PN}-patchset" )
+
+src_compile() {
+ default_src_compile
+ emake tests
+ use ppp && emake -C ppp
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ use ppp && emake DESTDIR="${D}" -C ppp install
+ emake DESTDIR="${D}" config
+
+ dosbin patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest
+
+ # install init scripts
+ newinitd "${FILESDIR}"/dahdi.init2 dahdi
+ newinitd "${FILESDIR}"/dahdi-autoconf.init2 dahdi-autoconf
+ newconfd "${FILESDIR}"/dahdi-autoconf.conf2 dahdi-autoconf
+}
diff --git a/net-misc/dahdi-tools/files/dahdi-autoconf.conf2 b/net-misc/dahdi-tools/files/dahdi-autoconf.conf2
new file mode 100644
index 000000000000..a46545231911
--- /dev/null
+++ b/net-misc/dahdi-tools/files/dahdi-autoconf.conf2
@@ -0,0 +1,40 @@
+# Global settings
+# Set this to your country code.
+DAHDI_ZONE=za
+DAHDI_ECHOCAN=oslec # mg2,jpah,kb1,sec,sec2 (there may be more, we recommend oslec)
+
+# Settings for analog
+#Analog signal types, one of:
+# ks - KewlStart (recommended, default)
+# ls - LoopStart
+# gs - GroundStart
+
+# Signalling to be used on FXO ports
+DAHDI_FXO_SIGNALLING=ks
+
+# Signalling to be used on FXS ports
+DAHDI_FXS_SIGNALLING=ks
+
+# Whether or not to echocan:
+DAHDI_FXO_ECHOCAN=yes
+DAHDI_FXS_ECHOCAN=yes
+
+# These settings will be used for BRI cards.
+# Known options: B8ZS,AMI,HDB3
+DAHDI_BRI_CODING=AMI
+
+# Known options: ESF,D4,CCS,CRC4
+DAHDI_BRI_FRAMING=CCS
+
+# Our experience is that it's not required (still defaults to yes)
+DAHDI_BRI_NT_ECHOCAN=yes
+DAHDI_BRI_TE_ECHOCAN=yes
+
+# These settings are for PRI cards. Note that only E1 currently supported.
+DAHDI_E1_CPE_ECHOCAN=yes
+DAHDI_E1_NET_ECHOCAN=yes
+
+# PRI will default to CPE mode (remote end provides signalling).
+# If you really want to provide signalling set the appropriate spans
+# here (eg, set span 1 to NET mode).
+#PRI_SPAN_1_NET=yes
diff --git a/net-misc/dahdi-tools/files/dahdi-autoconf.init2 b/net-misc/dahdi-tools/files/dahdi-autoconf.init2
new file mode 100644
index 000000000000..1ebe8ec28ea8
--- /dev/null
+++ b/net-misc/dahdi-tools/files/dahdi-autoconf.init2
@@ -0,0 +1,225 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Ultimate Linux Solutions CC
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ before dahdi
+}
+
+dahdi_load_modules() {
+ local hwlist loc status mod mod_vname pciid desc
+
+ hwlist=$(/usr/sbin/dahdi_hardware)
+
+ if [ -z "${hwlist}" ]; then
+ einfo "No digium hardware found."
+ ebegin "Loading module dahdi_dummy"
+ /sbin/modprobe dahdi_dummy
+ eend $?
+ return
+ fi
+
+ echo "${hwlist}" | while read loc mod pciid desc; do
+ status="${mod:${#mod}-1:1}"
+ mod="${mod%[+-]}"
+ mod_vname="mod_${mod}"
+
+ einfo "Found $desc at $loc (module: $mod)"
+
+ if [ "${status}" = "-" -a "${!mod_vname-notloaded}" = "notloaded" ]; then
+ ebegin "Loading module $mod"
+ /sbin/modprobe $mod
+ eend
+
+ [ $? -eq 0 ] && eval "$mod_vname=loaded"
+ fi
+ done
+}
+
+dahdi_module_unload() {
+ local mod=$1 s
+ [ -d /sys/module/${mod} ] || return 0
+
+ for s in $(find /sys/module/${mod}/holders -type l); do
+ dahdi_module_unload $(basename $s)
+ done
+
+ ebegin "Removing dahdi module: $mod"
+ /sbin/rmmod $mod
+ eend $?
+}
+
+dahdi_gen_fxo_config() {
+ local port=$1
+
+ echo "fxs${DAHDI_FXO_SIGNALLING-ks}=${port}"
+ [ "${DAHDI_FXO_ECHOCAN-yes}" = yes ] && echo "echocanceller=${DAHDI_ECHOCAN-mg2},${port}"
+}
+
+dahdi_gen_fxs_config() {
+ local port=$1
+
+ echo "fxo${DAHDI_FXO_SIGNALLING-ks}=${port}"
+ [ "${DAHDI_FXS_ECHOCAN-yes}" = yes ] && echo "echocanceller=${DAHDI_ECHOCAN-mg2},${port}"
+}
+
+dahdi_gen_bri_te_config() {
+ span=$1
+ port=$2
+ basechan=$3
+
+ echo "span=${span},${port},0,${DAHDI_BRI_FRAMING-CSS},${DAHDI_BRI_CODING-AMI}"
+ echo "bchan=${basechan}-$(( basechan + 1 ))"
+ echo "hardhdlc=$(( basechan + 2 ))"
+ [ "${DAHDI_BRI_TE_ECHOCAN-yes}" = yes ] && echo "echocanceller=${DAHDI_ECHOCAN-mg2},${basechan}-$(( basechan + 1 ))"
+}
+
+dahdi_gen_bri_nt_config() {
+ span=$1
+ port=$2
+ basechan=$3
+
+ echo "span=${span},0,0,${DAHDI_BRI_FRAMING-CSS},${DAHDI_BRI_CODING-AMI}"
+ echo "bchan=${basechan}-$(( basechan + 1 ))"
+ echo "hardhdlc=$(( basechan + 2 ))"
+ [ "${DAHDI_BRI_NT_ECHOCAN-yes}" = yes ] && echo "echocanceller=${DAHDI_ECHOCAN-mg2},${basechan}-$(( basechan + 1 ))"
+}
+
+dahdi_gen_e1_cpe_config() {
+ span=$1
+ port=$2
+ basechan=$3
+
+ echo "span=${span},${port},0,${DAHDI_E1_FRAMING-CCS},${DAHDI_E1_CODING-HDB3,CRC4}"
+ bchans="${basechan}-$(( basechan + 14 )),$(( basechan + 16 ))-$(( basechan + 30 ))"
+ echo "bchan=${bchans}"
+ echo "dchan=$(( basechan + 15 ))"
+ [ "${DAHDI_E1_CPE_ECHOCAN-yes}" = yes ] && echo "echocanceller=${DAHDI_ECHOCAN-mg2},${bchans}"
+}
+
+dahdi_gen_e1_net_config() {
+ span=$1
+ port=$2
+ basechan=$3
+
+ echo "span=${span},0,0,${DAHDI_E1_FRAMING-CCS},${DAHDI_E1_CODING-HDB3,CRC4}"
+ bchans="${basechan}-$(( basechan + 14 )),$(( basechan + 16 ))-$(( basechan + 30 ))"
+ echo "bchan=${bchans}"
+ echo "dchan=$(( basechan + 15 ))"
+ [ "${DAHDI_E1_NET_ECHOCAN-yes}" = yes ] && echo "echocanceller=${DAHDI_ECHOCAN-mg2},${bchans}"
+}
+
+dahdi_conf_span() {
+ local span=$1
+ local type=$2
+ local desc=$3
+ local port=$4
+ local basechan=$5
+ local vname=""
+
+ # Analog we need to deal with on a port-by-port basis.
+ [ "${type}" = "analog" ] && return 0
+
+ echo -e "\n# ${desc}"
+ case "${type}" in
+ digital-TE)
+ dahdi_gen_bri_te_config "${span}" "${port}" "${basechan}"
+ ;;
+ digital-NT)
+ dahdi_gen_bri_nt_config "${span}" "${port}" "${basechan}"
+ ;;
+ digital-E1)
+ # Use CPE by default. Unfortunately there is no easy
+ # way to detect CPE vs NET as far as I know and specifying
+ # in a config that you want NET mode seems the sanest way.
+ vname="PRI_SPAN_${span}_NET"
+ if [[ "${!vname}" = [Yy][Ee][Ss] ]]; then
+ dahdi_gen_e1_net_config "${span}" "${port}" "${basechan}"
+ else
+ dahdi_gen_e1_cpe_config "${span}" "${port}" "${basechan}"
+ fi
+ ;;
+ *)
+ echo "# Don't know how to configure this (type=${type})."
+ echo "# Please file a bug on bugs.gentoo.org and add jaco@uls.co.za as CC."
+ ;;
+ esac
+}
+
+dahdi_gen_config() {
+ local type manufacturer devicetype basechan aport atype
+ local span=
+ local tfile="$(mktemp)"
+ local sfile="$(mktemp)"
+ local plocation=""
+ local isdnport=0
+
+ /usr/sbin/dahdi_scan > "${sfile}"
+ exec 3<"${sfile}"
+
+ echo "# Automatically dahdi-autoconf generated file ($(date))." >> "${tfile}"
+ echo "# This file WILL get regenerated whenever you restart dahdi-autoconf." >> "${tfile}"
+
+ while read LINE <&3; do
+ case "$LINE" in
+ [[]*[]])
+ [ -n "${span}" ] && dahdi_conf_span "${span}" "${type}" "${manufacturer} ${devicetype} (${name})" "${isdnport}" "${basechan}" >> "${tfile}"
+ span="${LINE%?}"
+ span="${span#?}"
+ ;;
+ type=*|manufacturer=*|devicetype=*|basechan=*|name=*)
+ eval "${LINE%%=*}='${LINE#*=}'"
+ ;;
+ location=*)
+ eval "${LINE%%=*}='${LINE#*=}'"
+ if [ "${location}" == "${plocation}" ]; then
+ (( ++isdnport ))
+ else
+ plocation="${location}"
+ isdnport=1
+ fi
+ ;;
+ port=*)
+ # For analog cards only.
+ aport="${LINE#*=}"; aport="${aport%,*}"
+ atype="${LINE#*,}"
+ [ "${aport}" -eq "${basechan}" ] && echo -e "\n# ${manufacturer} ${devicetype} (${name})" >> "${tfile}"
+ case "${atype}" in
+ FXO)
+ dahdi_gen_fxo_config $aport >> "${tfile}"
+ ;;
+ FXS)
+ dahdi_gen_fxs_config $aport >> "${tfile}"
+ ;;
+ esac
+ ;;
+ esac
+ done
+
+ [ -n "${span}" ] && dahdi_conf_span "${span}" "${type}" "${manufacturer} ${devicetype} (${name})" "${isdnport}" "${basechan}" >> "${tfile}"
+
+ echo -e "\nloadzone = ${DAHDI_ZONE}\ndefaultzone = ${DAHDI_ZONE}\n## END OF AUTOCONFIGURED FILE ##" >> "${tfile}"
+
+ exec 3<&-
+
+ rm -f "${sfile}"
+ mv /etc/dahdi/system.conf /etc/dahdi/system.conf.bck
+ mv "${tfile}" /etc/dahdi/system.conf
+}
+
+start() {
+ dahdi_load_modules
+
+ if [ ! -r /dev/dahdi/ctl ]; then
+ eerror "No DAHDI compatible cards detected."
+ return 1
+ fi
+
+ ebegin "Generating DAHDI Configuration"
+ dahdi_gen_config
+ eend $?
+}
+
+stop() {
+ dahdi_module_unload dahdi
+}
diff --git a/net-misc/dahdi-tools/files/dahdi-autoconf.init3 b/net-misc/dahdi-tools/files/dahdi-autoconf.init3
new file mode 100644
index 000000000000..550a90e780d7
--- /dev/null
+++ b/net-misc/dahdi-tools/files/dahdi-autoconf.init3
@@ -0,0 +1,226 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Ultimate Linux Solutions CC
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ before dahdi
+ after wanrouter
+}
+
+dahdi_load_modules() {
+ local hwlist loc status mod mod_vname pciid desc
+
+ hwlist=$(/usr/sbin/dahdi_hardware)
+
+ if [ -z "${hwlist}" ]; then
+ einfo "No digium hardware found."
+ ebegin "Loading module dahdi_dummy"
+ /sbin/modprobe dahdi_dummy
+ eend $?
+ return
+ fi
+
+ echo "${hwlist}" | while read loc mod pciid desc; do
+ status="${mod:${#mod}-1:1}"
+ mod="${mod%[+-]}"
+ mod_vname="mod_${mod}"
+
+ einfo "Found $desc at $loc (module: $mod)"
+
+ if [ "${status}" = "-" -a "${!mod_vname-notloaded}" = "notloaded" ]; then
+ ebegin "Loading module $mod"
+ /sbin/modprobe $mod
+ eend
+
+ [ $? -eq 0 ] && eval "$mod_vname=loaded"
+ fi
+ done
+}
+
+dahdi_module_unload() {
+ local mod=$1 s
+ [ -d /sys/module/${mod} ] || return 0
+
+ for s in $(find /sys/module/${mod}/holders -type l); do
+ dahdi_module_unload $(basename $s)
+ done
+
+ ebegin "Removing dahdi module: $mod"
+ /sbin/rmmod $mod
+ eend $?
+}
+
+dahdi_gen_fxo_config() {
+ local port=$1
+
+ echo "fxs${DAHDI_FXO_SIGNALLING-ks}=${port}"
+ [ "${DAHDI_FXO_ECHOCAN-yes}" = yes ] && echo "echocanceller=${DAHDI_ECHOCAN-mg2},${port}"
+}
+
+dahdi_gen_fxs_config() {
+ local port=$1
+
+ echo "fxo${DAHDI_FXO_SIGNALLING-ks}=${port}"
+ [ "${DAHDI_FXS_ECHOCAN-yes}" = yes ] && echo "echocanceller=${DAHDI_ECHOCAN-mg2},${port}"
+}
+
+dahdi_gen_bri_te_config() {
+ span=$1
+ port=$2
+ basechan=$3
+
+ echo "span=${span},${port},0,${DAHDI_BRI_FRAMING-CSS},${DAHDI_BRI_CODING-AMI}"
+ echo "bchan=${basechan}-$(( basechan + 1 ))"
+ echo "hardhdlc=$(( basechan + 2 ))"
+ [ "${DAHDI_BRI_TE_ECHOCAN-yes}" = yes ] && echo "echocanceller=${DAHDI_ECHOCAN-mg2},${basechan}-$(( basechan + 1 ))"
+}
+
+dahdi_gen_bri_nt_config() {
+ span=$1
+ port=$2
+ basechan=$3
+
+ echo "span=${span},0,0,${DAHDI_BRI_FRAMING-CSS},${DAHDI_BRI_CODING-AMI}"
+ echo "bchan=${basechan}-$(( basechan + 1 ))"
+ echo "hardhdlc=$(( basechan + 2 ))"
+ [ "${DAHDI_BRI_NT_ECHOCAN-yes}" = yes ] && echo "echocanceller=${DAHDI_ECHOCAN-mg2},${basechan}-$(( basechan + 1 ))"
+}
+
+dahdi_gen_e1_cpe_config() {
+ span=$1
+ port=$2
+ basechan=$3
+
+ echo "span=${span},${port},0,${DAHDI_E1_FRAMING-CCS},${DAHDI_E1_CODING-HDB3,CRC4}"
+ bchans="${basechan}-$(( basechan + 14 )),$(( basechan + 16 ))-$(( basechan + 30 ))"
+ echo "bchan=${bchans}"
+ echo "dchan=$(( basechan + 15 ))"
+ [ "${DAHDI_E1_CPE_ECHOCAN-yes}" = yes ] && echo "echocanceller=${DAHDI_ECHOCAN-mg2},${bchans}"
+}
+
+dahdi_gen_e1_net_config() {
+ span=$1
+ port=$2
+ basechan=$3
+
+ echo "span=${span},0,0,${DAHDI_E1_FRAMING-CCS},${DAHDI_E1_CODING-HDB3,CRC4}"
+ bchans="${basechan}-$(( basechan + 14 )),$(( basechan + 16 ))-$(( basechan + 30 ))"
+ echo "bchan=${bchans}"
+ echo "dchan=$(( basechan + 15 ))"
+ [ "${DAHDI_E1_NET_ECHOCAN-yes}" = yes ] && echo "echocanceller=${DAHDI_ECHOCAN-mg2},${bchans}"
+}
+
+dahdi_conf_span() {
+ local span=$1
+ local type=$2
+ local desc=$3
+ local port=$4
+ local basechan=$5
+ local vname=""
+
+ # Analog we need to deal with on a port-by-port basis.
+ [ "${type}" = "analog" ] && return 0
+
+ echo -e "\n# ${desc}"
+ case "${type}" in
+ digital-TE)
+ dahdi_gen_bri_te_config "${span}" "${port}" "${basechan}"
+ ;;
+ digital-NT)
+ dahdi_gen_bri_nt_config "${span}" "${port}" "${basechan}"
+ ;;
+ digital-E1)
+ # Use CPE by default. Unfortunately there is no easy
+ # way to detect CPE vs NET as far as I know and specifying
+ # in a config that you want NET mode seems the sanest way.
+ vname="PRI_SPAN_${span}_NET"
+ if [[ "${!vname}" = [Yy][Ee][Ss] ]]; then
+ dahdi_gen_e1_net_config "${span}" "${port}" "${basechan}"
+ else
+ dahdi_gen_e1_cpe_config "${span}" "${port}" "${basechan}"
+ fi
+ ;;
+ *)
+ echo "# Don't know how to configure this (type=${type})."
+ echo "# Please file a bug on bugs.gentoo.org and add jaco@uls.co.za as CC."
+ ;;
+ esac
+}
+
+dahdi_gen_config() {
+ local type manufacturer devicetype basechan aport atype
+ local span=
+ local tfile="$(mktemp)"
+ local sfile="$(mktemp)"
+ local plocation=""
+ local isdnport=0
+
+ /usr/sbin/dahdi_scan > "${sfile}"
+ exec 3<"${sfile}"
+
+ echo "# Automatically dahdi-autoconf generated file ($(date))." >> "${tfile}"
+ echo "# This file WILL get regenerated whenever you restart dahdi-autoconf." >> "${tfile}"
+
+ while read LINE <&3; do
+ case "$LINE" in
+ [[]*[]])
+ [ -n "${span}" ] && dahdi_conf_span "${span}" "${type}" "${manufacturer} ${devicetype} (${name})" "${isdnport}" "${basechan}" >> "${tfile}"
+ span="${LINE%?}"
+ span="${span#?}"
+ ;;
+ type=*|manufacturer=*|devicetype=*|basechan=*|name=*)
+ eval "${LINE%%=*}='${LINE#*=}'"
+ ;;
+ location=*)
+ eval "${LINE%%=*}='${LINE#*=}'"
+ if [ "${location}" == "${plocation}" ]; then
+ (( ++isdnport ))
+ else
+ plocation="${location}"
+ isdnport=1
+ fi
+ ;;
+ port=*)
+ # For analog cards only.
+ aport="${LINE#*=}"; aport="${aport%,*}"
+ atype="${LINE#*,}"
+ [ "${aport}" -eq "${basechan}" ] && echo -e "\n# ${manufacturer} ${devicetype} (${name})" >> "${tfile}"
+ case "${atype}" in
+ FXO)
+ dahdi_gen_fxo_config $aport >> "${tfile}"
+ ;;
+ FXS)
+ dahdi_gen_fxs_config $aport >> "${tfile}"
+ ;;
+ esac
+ ;;
+ esac
+ done
+
+ [ -n "${span}" ] && dahdi_conf_span "${span}" "${type}" "${manufacturer} ${devicetype} (${name})" "${isdnport}" "${basechan}" >> "${tfile}"
+
+ echo -e "\nloadzone = ${DAHDI_ZONE}\ndefaultzone = ${DAHDI_ZONE}\n## END OF AUTOCONFIGURED FILE ##" >> "${tfile}"
+
+ exec 3<&-
+
+ rm -f "${sfile}"
+ mv /etc/dahdi/system.conf /etc/dahdi/system.conf.bck
+ mv "${tfile}" /etc/dahdi/system.conf
+}
+
+start() {
+ dahdi_load_modules
+
+ if [ ! -r /dev/dahdi/ctl ]; then
+ eerror "No DAHDI compatible cards detected."
+ return 1
+ fi
+
+ ebegin "Generating DAHDI Configuration"
+ dahdi_gen_config
+ eend $?
+}
+
+stop() {
+ dahdi_module_unload dahdi
+}
diff --git a/net-misc/dahdi-tools/files/dahdi.init2 b/net-misc/dahdi-tools/files/dahdi.init2
new file mode 100644
index 000000000000..9f550c17a15e
--- /dev/null
+++ b/net-misc/dahdi-tools/files/dahdi.init2
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -f /etc/dahdi/system.conf ]; then
+ eerror "/etc/dahdi/system.conf not found. Nothing to do."
+ return 1
+ fi
+
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting DAHDI"
+ /usr/sbin/dahdi_cfg
+ eend $?
+
+ if [ $? -eq 0 -a -r /etc/fxotune.conf ]; then
+ ebegin "Loading DAHDI fxotune.conf"
+ /usr/sbin/fxotune -s
+ eend $?
+ fi
+}
+
+stop() {
+ ebegin "Stopping DAHDI"
+ /usr/sbin/dahdi_cfg -s
+ eend
+}
diff --git a/net-misc/dahdi-tools/metadata.xml b/net-misc/dahdi-tools/metadata.xml
new file mode 100644
index 000000000000..2cfe9ff5a1e3
--- /dev/null
+++ b/net-misc/dahdi-tools/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>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+ <use>
+ <flag name="ppp">Enables PPP/DAHDIRAS support</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/dahdi/Manifest b/net-misc/dahdi/Manifest
new file mode 100644
index 000000000000..e9d441d34240
--- /dev/null
+++ b/net-misc/dahdi/Manifest
@@ -0,0 +1,28 @@
+DIST dahdi-fw-a4a-a0017.tar.gz 181429 SHA256 d5b6ab6851e431afcfec2ecc39d95fa88fe3939ffdb2e3d4f28a43cabf30e95b SHA512 e42cb83e05edb359949acd888a743c665d228cd3b9424fc8f3b60676d6799f4455e65cc269d1e2ac0e3bb5613607dad4fb37c433067832fb68b15bfddf6f4a2a WHIRLPOOL a827109db967c716734f5100173a50343c1384da775d188ba103d6f673fde2c61e0404eb0dfb6a06884648f1ffb3045bb9c1ef0871a91fb0f6b8cadd2791cceb
+DIST dahdi-fw-a4b-b0019.tar.gz 228785 SHA256 84bf8a1a9f61598b3261a6d737529837ca0f56ace77b56467d701e6aa22c04bd SHA512 1c3be1f01f005bb7c315ffec42656a72d6a5f762806d39551ff0282b0f55e99744e9ad8a9b6da7cf0a384ad5ecbbf6430561466ad3a8a6e4a412ed870c69b218 WHIRLPOOL 06921af5e321037f5d13e3e2ee4be48bb4231a13365ea4c25ce4691c9faf281a79bf8ee18bb47c5ffe12ad253d61e5daf127174194cb83cd4c41b083a7d0e395
+DIST dahdi-fw-a4b-d001e.tar.gz 239591 SHA256 e039af8bec36407b74e1dd9ebdd49ba077469eda79d4e6093721ed2836d4536f SHA512 ab72cf6d469e44f3a8b9dda5e7acae9ae435b6f12b1491079155b8df4c9cf83aed48ccbda4acb4a9943dd6228846f5b82998a0bf575d454ac3b81b72c585d58c WHIRLPOOL b1b7013631ca14ce74790299e8d1ab45ebf13d3db6578bc66ece784803891ba31413f0db3fda5fbc103d68217ae6304614cd5b78facc282aafd7fc806f2ffa43
+DIST dahdi-fw-a8a-1d0017.tar.gz 181958 SHA256 5064f9877b8aec99b19fd57988216fe1a9c0b7c07853dd3b32b5a55ab7b418e6 SHA512 2f80d24170f0efdebc318f238abb04664dfa97e3ca47a330b5a5e1d695c8ba5c535ad1302bf338667912b46cd5b4bbb76ab5bdbe6e736edd4f0e9239d818d05d WHIRLPOOL b80bda38f5c3c7b464e38aab6f2b74e1ea0159ac07b321ca165659b21f1ef4791360224c3790839f961e889923ce69b64114fb5e3356da387d6e97eb3e0fb462
+DIST dahdi-fw-a8b-1d0019.tar.gz 228054 SHA256 65817314ea97ec17520296ec78691bbe6da35b1a43051caae2d8b544f9efd011 SHA512 d802b5e61e8ba2ddec1d86a26f11753d3cb627d9248df414d93595afac28e0257dad7313af5e721762ae309f34791a2e705d4fc357ef64eedb0c9369e133f79a WHIRLPOOL 1157efb1f0635a0e215e5177b5e3ceb1ef80c30c3055b7f54b641ead720eff4d0accf4b0948123ce2b845543a57ac2d2a30799e9b2399a38c837474e4e2cc2db
+DIST dahdi-fw-a8b-1f001e.tar.gz 236508 SHA256 09a8992786309e025aa60b400a2c7d21226ac9bb6f1b66f562a5e7e9dc892b03 SHA512 68041e5cb53d8ff6beb9f667abca5a5a1c752357c224f5c7cfcb81732bd417671cf6dc03b5c5bafd6a0864f6c5451165c0f26908b0f40ed3408961f448f2a9a4 WHIRLPOOL da39b08698a84fc152b7f0e8b7b3f2ddb853812197425d7d86f9bad0864157a2e9ed8cfb1502d8fd235b6a1dc5b6ccc0c64818716d1b4954709fee4ef80bcd5e
+DIST dahdi-fw-hx8-2.06.tar.gz 29252 SHA256 449ab3fd03d55d808e999efb7677cd04de202b92c9fcb039539a7e48a39a80f5 SHA512 d113d2bd10d5a851087e04fadb3427ec07634960d47e2292320f0d195c65075fb24ab173e0985c257eaf8e46f595f29af034fb380382cdbff7bfbc7381dff4ae WHIRLPOOL aafcc1469e07e77883ab5aa54cdc563dae2e954c8695ce5742c34e1317f43f6d15c4c1c4458effdc8451d37d2f1d26071fd28b524ac9ca0b88ac6bb1b9e33899
+DIST dahdi-fw-oct6114-032-1.05.01.tar.gz 165866 SHA256 7a006073202d67e45f1d5ff1e9c6e8663e6056cef9dc4c5abae86a1018db349c SHA512 ec47a7aac6a6abc73fe0c7ec3b31eebc868c516aeb1bb584f145f36c28abec21afa12dcec554bceb914c058c83255e32fb8d967ef4d8a5d0161b6053af464a24 WHIRLPOOL a162d82265a4e965de156f3367c14e94b906f71f33a0c6f7836ceb1223b65abda168c0c4f66eb6b6eddd794b2c89c36d931aba8033e713cad3072400537b186c
+DIST dahdi-fw-oct6114-064-1.05.01.tar.gz 165869 SHA256 56bac1f2024c76ecf9b6f40992eeea29a1fbee676bb2a37a058179bacfbb1c91 SHA512 6dcc6a3413c6c0561b08c4949a746cbebc58b8a068481f568007fdc663cfc6ef90417fbd81398055a781367e7db57f0a694745cddcd3c697a4f857be15981549 WHIRLPOOL 0b8b3f853b07e90c6f42e78fb328d57c2f8126db9930f8998547e8acfc39fdbcb5f91565604a58133ff6db2ea3beea19864554d9768c86358d4f868446fdfc77
+DIST dahdi-fw-oct6114-128-1.05.01.tar.gz 165849 SHA256 e1146749d205c41603b9b76852c3f8104dac233d0025d700db24504d10c99775 SHA512 17e83aa57ea8e9d3353027184adb48f664b177a528006d67112a53127fcb19c1011d4f44c2980ab77d27b3bf7f7a74d44f15aaf115e05fa3df8e16d3c30fc267 WHIRLPOOL 3464b86fb656f4a3c470a2752f63b5848ee8e08f12862ca2d8b3460231b9c15c15e270e4e8b85db16fe99cf92ecac1077d85383cd04157177749d5b6e310f8ad
+DIST dahdi-fw-oct6114-256-1.05.01.tar.gz 171685 SHA256 5fe5036a2766cf0e8a968b0c58b700507d86e1cde9296ca437170cc626a9c79c SHA512 e447fe8d24963892339d895450cf7a04da3bdcf1de22630dea68119dbd9da84878478adf8ce0e5ef859e6d677c2a051aa6272de4e0692f5ce0e8b5d0fba4096b WHIRLPOOL 9f1ad0284668833e61f387070062b66369c61e3afc7b867a06db6697c9841bd1f5efd541c6eb3616625b9c82d0dd95f6e2e7e02b787b90e91fe4ad6de08777a3
+DIST dahdi-fw-tc400m-MR6.12.tar.gz 1750035 SHA256 11dd8d009809e41fc9a3a36766f59ff73d29075eede5b8724331d9a6e5259774 SHA512 88a986d22ead41a3dabc320e13f7a3e6e6ab9e2752aca2cc940ad9c1ec570d4f01e82c46d0ec1b6dc1a87a1df7e94cfb8aa638b44b4fe2254af8962f1fdbac86 WHIRLPOOL a6334940cd3927003fef425685c9389c64530dd4bab1337863283a3d02144d44bf601292179d8354b3d283af19c53d142f1c3b31d1468012297b876954b6dc8b
+DIST dahdi-fw-te133-780019.tar.gz 229578 SHA256 6a255642301ab46f0bcccf4671ce41096c4733b7308719474e9c6fbcff77cc0e SHA512 0883ec2607754d06b365a245234c6d6f4e1877ed54040c22534e144a153315e90c5657e2aa0e715f3f6899f9a54b653065fa0641c5c6b8c4efebc3b9d112305e WHIRLPOOL 4582c2fd8e4ae9d32f04108d482ff9cf771c3d956492dfff82ba2ca30f4abeb1066fa3701c4f8a358362172c605cb5b3ed7f49aac3843353f3940499615e5a1f
+DIST dahdi-fw-te133-7a001e.tar.gz 242987 SHA256 511c1966295a20df673bb87af30245f0ad165efd6ccb92b4d8ed535ca7f5ac65 SHA512 acd273bcf9b8e009b986e2c9f068121fad8b9cf8f500b79fd5456225ec4ef81d22f32960246a1e9b49ca7f47efb2f7d346c8727fe3b7b80c700d2dc609784acc WHIRLPOOL f8ae0b98d217d4dbb0ff5c291cf71c226604b9ee6a724fef25b43316d381a5ce1d3052864d4bc814ac3c6dd9bcc629dfc594825dd6e3a4ce4bc3dade1d23fcbf
+DIST dahdi-fw-te134-780017.tar.gz 185478 SHA256 99f7c410bf47d2a5ae687d717e51448ce5b52aca902830bf39bffe683150fa2d SHA512 b6f93ff060512b15bb8462805d8f8a435e56a83be362770d2c3b39b876d2171c5e1e6c1bc42c893eaa382ccd2f19534536612618c4ef4ff8c25976cf3719d4fb WHIRLPOOL a93efb2405019418e542f817b64fc0aa76bda55f74f4ceec9815c3c4350d9ec31ac3bd47c900659e11a0d0131cadfedf99dde508eb7da71a7b276f98ae5e921a
+DIST dahdi-fw-te435-13001e.tar.gz 238504 SHA256 c8f55d57cc0bf332e8d96cdf9ff6dd0e322f33581e1efc24c2b9a0e0c5eb7ee4 SHA512 1cd5c191db62f87f87c9f6913bcbc3ed9f3d77a51578cd0bc5fdb9d17e128bcaf66d04c5a9e6417e9d7543fc8f18b6f635f0e8c1cb1bc19b11bc8ddffaa6be08 WHIRLPOOL 518f74ddc3ce99b6809128c9e619c2f2bc56b03347e594a347c8f5d1c97537c481cc774a5f6f9d262e80518389e129f65be42a9972b230d8eef12e9c7dd10463
+DIST dahdi-fw-te435-e0019.tar.gz 231242 SHA256 0084354638b86666b685a48201791c85639280901519f54a79d586aedb848a3b SHA512 ccbc4fbc184704ca3ea12311b1d4f719330321773a9480d731c5fb669a37166d10aa6e704d363bb0a41d9bde6bf119b3e7bd4072ab49b864fea6391b429f99bb WHIRLPOOL 249650d59f4bbdadc8ebf055aeda35f050081dc01bfc458bf68380686edef42d30ef7082cc1cd6fb250b1965bb2ec52544c7f43a3ab0b6948f5262f8e2ebb0b1
+DIST dahdi-fw-te436-10017.tar.gz 210601 SHA256 0980f4a8d191c6872aa27d971758046f0e7827ac161549f2cc1b0eeab0ae9333 SHA512 56e8a26a737ac45e137324b635e5f489fe05a5939324af038f881b64ddabf486eb3830ff0ada1561ffedb3d6bc8338b11f4dccbc9b2ca9e00cd2bcc85abf83c0 WHIRLPOOL 12bea61e15f1f54031e5e9345658a1a58053039c36660342d515ff6584a078150fe447ffb5e33b393278e6ef212fa566c0e289f155e6d05572a038eeb4d39e8d
+DIST dahdi-fw-te820-1.76.tar.gz 54303 SHA256 5b823e25828e2c1c6548886ad408b2e31dbc8cd17170c52592792d9c754a199c SHA512 3189df3dd680353d5520773ac8ea7fe638ea05e3c656379c1a245bd3ab8a6ae0c8a1c22c2068be9c758996e5993b0d19376b159b4e868ebc3d817dcce3b9aec7 WHIRLPOOL 4eb4a3a4d5b8a2cdd4422d41b17427624ca668ba400fe908e03d1cdd317c5e5bb9993bafe8c4a36ee44554ff6acadd45c4baba4d23c3f06f4765da31c545dafa
+DIST dahdi-fw-vpmoct032-1.12.0.tar.gz 443985 SHA256 6b199cf836f150f9cb35f763f0f502fb52cfa2724a449b500429c746973904ad SHA512 3ee8c56a7075d13a6457a5249fcffc04b2da59da94a622cb66810babf46260235492810c867479fccf343e84424c9bcc12c2d05389a52c0a56c62b138f23aeb3 WHIRLPOOL 9dc3e1bdfdb458eca3e943b89c64460af13c7aa8ca0e6fb56228df54520979c47659828f199c10c2359804156955b9fb956ade47b50f46adb60e10a8bddc125f
+DIST dahdi-fwload-vpmadt032-1.25.0.tar.gz 149360 SHA256 3ff26cf80555fd7470b43a87c51d03c1db2a75abcd4561d79f69b6c48298e4a1 SHA512 3534f0bab0e142ae94b9b5c401a5c314bab43bc1ca9283600ca82b1746afa514eff6a965ccc6b48774d577beaddb12d165f66221b3b6457df68ccbcede812047 WHIRLPOOL 0151914828f6cee593905ef6ce81e66da32f1c7752900332f10907638c2a37e331606215152e846a58ee3f1031a7c162eeb1bf0c17691e8dd66add79dcd8e015
+DIST dahdi-linux-2.10.0.1.tar.gz 2042867 SHA256 7b129903c517fbcb74e9600cd2baaf1721d8684c53525314620db7c0410055fe SHA512 7d03717947063a037e83fc13ab42e4ecc4aeb12a2d8e1f0cae5b491d2dcd948aa51381f0111e5013f355faf4d6ff00df8238e19be91852e99040a836fbf51318 WHIRLPOOL 6fcb613fbaf20a4a664a0f20c15c31b2ac8c4c54bf6c40ee951e61b0600f9700f61d73005b8ba6e34b75c62ffbc1cfc97af9d926ce3caa04e420e84212df1edb
+DIST dahdi-linux-2.10.1.tar.gz 2044847 SHA256 94c532e190fc6372f9731df71f8c590fc6f6f184d5394339ce892ac6788843aa SHA512 3ef877ba104e720f3292fc95450968ec1d46cc54f807492a2d41fe768e9dde554a420928f45b7244647b5bf2300863e150ee23c9920fbfb7afa6cb46a77a2087 WHIRLPOOL e114b8e200aaa94283bcf57f54e6e0be33fe7bbb5680acba43b5704733cd7e6c27eae5a6fbb9cc0314ac022c1b2892839da5b710b21991247944847e3819b0c8
+DIST dahdi-linux-2.10.2.tar.gz 2044873 SHA256 6270444cb9b345941267b162038cc45f5ef4485139176e88e2c4d22fa35a2c59 SHA512 b585a408ffb7b95a5e1a47dff14be93e2ce7420e5b3b3160ccfc0ca8df153ec1f36c56c96bc4f7b20bebda0559ec03481e1307feb8e10eace68737e8f8783537 WHIRLPOOL 2c640728a31cdd45a34cf78b1f07587242fc3e68eeb37de006bba237cbc89ea7ea4fa9ad568775761225dbdefdaff1de152bbfd05dfbbbc693efdf723835d162
+DIST gentoo-dahdi-patchset-1.1.9.tar.bz2 102384 SHA256 31efbb79403c57e095bd032939d65b3c15eb5964e837476b1ade42cea9c2b9f7 SHA512 63378c916af787549d3d092ed9532ebdb6106675d96cb124eaeff8e70bdf28751f30745a6e6f78176bf8411031fcfac6bec4f38e18e48ca0b363ef815bae4770 WHIRLPOOL f6aba2558bd8a0bb3998977187d50ea95b0e169aadb18372ee8d7d5df8624e5d2c40e3ae98bcf2c5ed9680920f5d813563d15bdab6c3d167bb1539ba4efe6500
+DIST gentoo-dahdi-patchset-1.2.0.tar.bz2 103096 SHA256 00dcc6ac490f6d56c806bde06b9fb76ed09555cb879880d48f8087f50adfbb31 SHA512 b700a31bb670146d5e8a5745deb8a62a6d3b0a65e1532d1ac8c5effa32c4f5ce0986f441eec5c41d94554e04723e71f0063a1f2700e6d2280b7bc7ba1f7f7b04 WHIRLPOOL 4ce8e9930c59da65fe66250009dea21a7bbed4b654d9f6aed832525a56c5265c20acfbcbf38a58a0ce190df3bac66080d4513dcdf796c4823fa6ceefafa51c96
+DIST gentoo-dahdi-patchset-1.2.3.tar.bz2 103028 SHA256 4bd57ffa61d718b847080af274fdf2414bf83a6567dffa05786e3e9b900cdf5f SHA512 f98170a3a98445f84586805b330ce6ed7e3a89d36162e9aef6c7cfb2c1bffbac5bde82764352b519b0684b4b19a7157696d633fccd66d0949e0cc74ab17a0517 WHIRLPOOL fbf86b33f7961cdd8053fe7898908088fb1579705915e5cddee01d5bae3cc996a061af622d4868e5b82270b22043529f69a50580d45451a3400b664835965760
+DIST jnet-dahdi-drivers-1.0.14.tar.gz 64860 SHA256 c71d1ac29c78511b59914cc9aa1798529ae7b344cdc8403a797dbcddbe486974 SHA512 419352897d39bae6b51ee302723de6ca3c8041546a1273fa0691cf169e16f37fc730f3033fed4e5f564dce6dcc097e93f609208af8c38d03b9aee96b95037d66 WHIRLPOOL 15c34f728806f5f94d64c791491b4928342a0df94a336c8c09a26ec020245dd8e13722d73779cce3cd73029c07be68c2d440be51407b83d56ce5a8645b6bfb24
diff --git a/net-misc/dahdi/dahdi-2.10.0.1-r1.ebuild b/net-misc/dahdi/dahdi-2.10.0.1-r1.ebuild
new file mode 100644
index 000000000000..e9b8da3795b3
--- /dev/null
+++ b/net-misc/dahdi/dahdi-2.10.0.1-r1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base linux-mod eutils flag-o-matic toolchain-funcs
+
+MY_P="${P/dahdi/dahdi-linux}"
+JNET=1.0.14
+GENTOO=1.2.0
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Kernel modules for Digium compatible hardware (formerly known as Zaptel)"
+HOMEPAGE="http://www.asterisk.org"
+SRC_URI="http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/${MY_P}.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a4a-a0017.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a4b-b0019.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a8a-1d0017.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a8b-1d0019.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-hx8-2.06.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-032-1.05.01.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-064-1.05.01.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-128-1.05.01.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-256-1.05.01.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-tc400m-MR6.12.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te133-780019.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te134-780017.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te435-e0019.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te436-10017.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te820-1.76.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-vpmoct032-1.12.0.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.25.0.tar.gz
+mirror://gentoo/gentoo-dahdi-patchset-${GENTOO}.tar.bz2
+http://www.junghanns.net/downloads/jnet-dahdi-drivers-${JNET}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="flash"
+RESTRICT="test"
+
+DEPEND=""
+RDEPEND=""
+
+EPATCH_SUFFIX="diff"
+PATCHES=( "${WORKDIR}/dahdi-patchset" )
+
+CONFIG_CHECK="MODULES ~CRC_CCITT"
+
+src_unpack() {
+ unpack ${A}
+ # Copy the firmware tarballs over, the makefile will try and download them otherwise
+ for file in ${A} ; do
+ cp "${DISTDIR}"/${file} "${MY_P}"/drivers/dahdi/firmware/
+ done
+ # But without the .bin's it'll still fall over and die, so copy those too.
+ cp *.bin "${MY_P}"/drivers/dahdi/firmware/
+ cp -p "${WORKDIR}"/jnet-dahdi-drivers-${JNET}/cwain/*.[ch] "${MY_P}"/drivers/dahdi/
+ cp -p "${WORKDIR}"/jnet-dahdi-drivers-${JNET}/qozap/*.[ch] "${MY_P}"/drivers/dahdi/
+ cp -p "${WORKDIR}"/jnet-dahdi-drivers-${JNET}/ztgsm/*.[ch] "${MY_P}"/drivers/dahdi/
+}
+
+src_prepare() {
+ if use flash; then
+ sed -i -e "s:/\* #define FXSFLASH \*/:#define FXSFLASH:" include/dahdi/dahdi_config.h || die "Failed to define FXSFLASH"
+ sed -i -e "s:/\* #define SHORT_FLASH_TIME \*/:#define SHORT_FLASH_TIME:" include/dahdi/dahdi_config.h || die "Failed to define SHORT_FLASH_TIME"
+ fi
+ base_src_prepare
+}
+
+src_compile() {
+ unset ARCH
+ emake V=1 CC=$(tc-getCC) LD=$(tc-getLD) KSRC="${KV_OUT_DIR}" DESTDIR="${D}" DAHDI_MODULES_EXTRA="cwain.o qozap.o ztgsm.o" all
+}
+
+src_install() {
+ einfo "Installing kernel module"
+ emake V=1 CC=$(tc-getCC) LD=$(tc-getLD) KSRC="${KV_OUT_DIR}" DESTDIR="${D}" DAHDI_MODULES_EXTRA="cwain.o qozap.o ztgsm.o" install
+ rm -rf "$D"/lib/modules/*/modules.*
+}
diff --git a/net-misc/dahdi/dahdi-2.10.0.1.ebuild b/net-misc/dahdi/dahdi-2.10.0.1.ebuild
new file mode 100644
index 000000000000..6fc1d6efc135
--- /dev/null
+++ b/net-misc/dahdi/dahdi-2.10.0.1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base linux-mod eutils flag-o-matic toolchain-funcs
+
+MY_P="${P/dahdi/dahdi-linux}"
+JNET=1.0.14
+GENTOO=1.1.9
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Kernel modules for Digium compatible hardware (formerly known as Zaptel)"
+HOMEPAGE="http://www.asterisk.org"
+SRC_URI="http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/${MY_P}.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a4a-a0017.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a4b-b0019.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a8a-1d0017.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a8b-1d0019.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-hx8-2.06.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-032-1.05.01.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-064-1.05.01.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-128-1.05.01.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-256-1.05.01.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-tc400m-MR6.12.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te133-780019.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te134-780017.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te435-e0019.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te436-10017.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te820-1.76.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-vpmoct032-1.12.0.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.25.0.tar.gz
+mirror://gentoo/gentoo-dahdi-patchset-${GENTOO}.tar.bz2
+http://www.junghanns.net/downloads/jnet-dahdi-drivers-${JNET}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="flash"
+RESTRICT="test"
+
+DEPEND=""
+RDEPEND=""
+
+EPATCH_SUFFIX="diff"
+PATCHES=( "${WORKDIR}/dahdi-patchset" )
+
+CONFIG_CHECK="MODULES ~CRC_CCITT"
+
+src_unpack() {
+ unpack ${A}
+ # Copy the firmware tarballs over, the makefile will try and download them otherwise
+ for file in ${A} ; do
+ cp "${DISTDIR}"/${file} "${MY_P}"/drivers/dahdi/firmware/
+ done
+ # But without the .bin's it'll still fall over and die, so copy those too.
+ cp *.bin "${MY_P}"/drivers/dahdi/firmware/
+ cp -p "${WORKDIR}"/jnet-dahdi-drivers-${JNET}/cwain/*.[ch] "${MY_P}"/drivers/dahdi/
+ cp -p "${WORKDIR}"/jnet-dahdi-drivers-${JNET}/qozap/*.[ch] "${MY_P}"/drivers/dahdi/
+ cp -p "${WORKDIR}"/jnet-dahdi-drivers-${JNET}/ztgsm/*.[ch] "${MY_P}"/drivers/dahdi/
+}
+
+src_prepare() {
+ if use flash; then
+ sed -i -e "s:/\* #define FXSFLASH \*/:#define FXSFLASH:" include/dahdi/dahdi_config.h || die "Failed to define FXSFLASH"
+ sed -i -e "s:/\* #define SHORT_FLASH_TIME \*/:#define SHORT_FLASH_TIME:" include/dahdi/dahdi_config.h || die "Failed to define SHORT_FLASH_TIME"
+ fi
+ base_src_prepare
+}
+
+src_compile() {
+ unset ARCH
+ emake V=1 CC=$(tc-getCC) LD=$(tc-getLD) KSRC="${KV_OUT_DIR}" DESTDIR="${D}" DAHDI_MODULES_EXTRA="cwain.o qozap.o ztgsm.o" all
+}
+
+src_install() {
+ einfo "Installing kernel module"
+ emake V=1 CC=$(tc-getCC) LD=$(tc-getLD) KSRC="${KV_OUT_DIR}" DESTDIR="${D}" DAHDI_MODULES_EXTRA="cwain.o qozap.o ztgsm.o" install
+ rm -rf "$D"/lib/modules/*/modules.*
+}
diff --git a/net-misc/dahdi/dahdi-2.10.1.ebuild b/net-misc/dahdi/dahdi-2.10.1.ebuild
new file mode 100644
index 000000000000..6fc1d6efc135
--- /dev/null
+++ b/net-misc/dahdi/dahdi-2.10.1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base linux-mod eutils flag-o-matic toolchain-funcs
+
+MY_P="${P/dahdi/dahdi-linux}"
+JNET=1.0.14
+GENTOO=1.1.9
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Kernel modules for Digium compatible hardware (formerly known as Zaptel)"
+HOMEPAGE="http://www.asterisk.org"
+SRC_URI="http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/${MY_P}.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a4a-a0017.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a4b-b0019.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a8a-1d0017.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a8b-1d0019.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-hx8-2.06.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-032-1.05.01.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-064-1.05.01.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-128-1.05.01.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-256-1.05.01.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-tc400m-MR6.12.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te133-780019.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te134-780017.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te435-e0019.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te436-10017.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te820-1.76.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-vpmoct032-1.12.0.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.25.0.tar.gz
+mirror://gentoo/gentoo-dahdi-patchset-${GENTOO}.tar.bz2
+http://www.junghanns.net/downloads/jnet-dahdi-drivers-${JNET}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="flash"
+RESTRICT="test"
+
+DEPEND=""
+RDEPEND=""
+
+EPATCH_SUFFIX="diff"
+PATCHES=( "${WORKDIR}/dahdi-patchset" )
+
+CONFIG_CHECK="MODULES ~CRC_CCITT"
+
+src_unpack() {
+ unpack ${A}
+ # Copy the firmware tarballs over, the makefile will try and download them otherwise
+ for file in ${A} ; do
+ cp "${DISTDIR}"/${file} "${MY_P}"/drivers/dahdi/firmware/
+ done
+ # But without the .bin's it'll still fall over and die, so copy those too.
+ cp *.bin "${MY_P}"/drivers/dahdi/firmware/
+ cp -p "${WORKDIR}"/jnet-dahdi-drivers-${JNET}/cwain/*.[ch] "${MY_P}"/drivers/dahdi/
+ cp -p "${WORKDIR}"/jnet-dahdi-drivers-${JNET}/qozap/*.[ch] "${MY_P}"/drivers/dahdi/
+ cp -p "${WORKDIR}"/jnet-dahdi-drivers-${JNET}/ztgsm/*.[ch] "${MY_P}"/drivers/dahdi/
+}
+
+src_prepare() {
+ if use flash; then
+ sed -i -e "s:/\* #define FXSFLASH \*/:#define FXSFLASH:" include/dahdi/dahdi_config.h || die "Failed to define FXSFLASH"
+ sed -i -e "s:/\* #define SHORT_FLASH_TIME \*/:#define SHORT_FLASH_TIME:" include/dahdi/dahdi_config.h || die "Failed to define SHORT_FLASH_TIME"
+ fi
+ base_src_prepare
+}
+
+src_compile() {
+ unset ARCH
+ emake V=1 CC=$(tc-getCC) LD=$(tc-getLD) KSRC="${KV_OUT_DIR}" DESTDIR="${D}" DAHDI_MODULES_EXTRA="cwain.o qozap.o ztgsm.o" all
+}
+
+src_install() {
+ einfo "Installing kernel module"
+ emake V=1 CC=$(tc-getCC) LD=$(tc-getLD) KSRC="${KV_OUT_DIR}" DESTDIR="${D}" DAHDI_MODULES_EXTRA="cwain.o qozap.o ztgsm.o" install
+ rm -rf "$D"/lib/modules/*/modules.*
+}
diff --git a/net-misc/dahdi/dahdi-2.10.2-r2.ebuild b/net-misc/dahdi/dahdi-2.10.2-r2.ebuild
new file mode 100644
index 000000000000..8f967ce86565
--- /dev/null
+++ b/net-misc/dahdi/dahdi-2.10.2-r2.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base linux-mod eutils flag-o-matic toolchain-funcs
+
+MY_P="${P/dahdi/dahdi-linux}"
+JNET=1.0.14
+GENTOO=1.2.3
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Kernel modules for Digium compatible hardware (formerly known as Zaptel)"
+HOMEPAGE="http://www.asterisk.org"
+SRC_URI="http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/${MY_P}.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a4a-a0017.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a4b-d001e.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a8a-1d0017.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a8b-1f001e.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-hx8-2.06.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-032-1.05.01.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-064-1.05.01.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-128-1.05.01.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-256-1.05.01.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-tc400m-MR6.12.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te133-7a001e.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te134-780017.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te435-13001e.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te436-10017.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te820-1.76.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-vpmoct032-1.12.0.tar.gz
+http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.25.0.tar.gz
+mirror://gentoo/gentoo-dahdi-patchset-${GENTOO}.tar.bz2
+http://www.junghanns.net/downloads/jnet-dahdi-drivers-${JNET}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="flash"
+RESTRICT="test"
+
+DEPEND=""
+RDEPEND=""
+
+EPATCH_SUFFIX="diff"
+PATCHES=( "${WORKDIR}/dahdi-patchset" )
+
+CONFIG_CHECK="MODULES ~CRC_CCITT"
+
+src_unpack() {
+ unpack ${A}
+ # Copy the firmware tarballs over, the makefile will try and download them otherwise
+ for file in ${A} ; do
+ cp "${DISTDIR}"/${file} "${MY_P}"/drivers/dahdi/firmware/
+ done
+ # But without the .bin's it'll still fall over and die, so copy those too.
+ cp *.bin "${MY_P}"/drivers/dahdi/firmware/
+ cp -p "${WORKDIR}"/jnet-dahdi-drivers-${JNET}/cwain/*.[ch] "${MY_P}"/drivers/dahdi/
+ cp -p "${WORKDIR}"/jnet-dahdi-drivers-${JNET}/qozap/*.[ch] "${MY_P}"/drivers/dahdi/
+ cp -p "${WORKDIR}"/jnet-dahdi-drivers-${JNET}/ztgsm/*.[ch] "${MY_P}"/drivers/dahdi/
+}
+
+src_prepare() {
+ if use flash; then
+ sed -i -e "s:/\* #define FXSFLASH \*/:#define FXSFLASH:" include/dahdi/dahdi_config.h || die "Failed to define FXSFLASH"
+ sed -i -e "s:/\* #define SHORT_FLASH_TIME \*/:#define SHORT_FLASH_TIME:" include/dahdi/dahdi_config.h || die "Failed to define SHORT_FLASH_TIME"
+ fi
+ base_src_prepare
+}
+
+src_compile() {
+ unset ARCH
+ emake V=1 CC=$(tc-getCC) LD=$(tc-getLD) KSRC="${KV_OUT_DIR}" DESTDIR="${D}" DAHDI_MODULES_EXTRA="cwain.o qozap.o ztgsm.o" all
+}
+
+src_install() {
+ einfo "Installing kernel module"
+ emake V=1 CC=$(tc-getCC) LD=$(tc-getLD) KSRC="${KV_OUT_DIR}" DESTDIR="${D}" DAHDI_MODULES_EXTRA="cwain.o qozap.o ztgsm.o" install
+ rm -rf "$D"/lib/modules/*/modules.*
+}
diff --git a/net-misc/dahdi/metadata.xml b/net-misc/dahdi/metadata.xml
new file mode 100644
index 000000000000..09b2235129ec
--- /dev/null
+++ b/net-misc/dahdi/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>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+ <use>
+ <flag name="flash">Support (short) flash on FXS</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/datapipe/Manifest b/net-misc/datapipe/Manifest
new file mode 100644
index 000000000000..0bf273e2846f
--- /dev/null
+++ b/net-misc/datapipe/Manifest
@@ -0,0 +1 @@
+DIST datapipe-1.0.tar.gz 3129 RMD160 584c2de1bdfd88edccf4347d697a421929eb999c SHA1 d07c34ef1f7f52f582718d35af971e3400e4ebab SHA256 8bb5e5669228ce546914ce419c0d24a795ed56924639f2a7dd9d09b0f142fc19
diff --git a/net-misc/datapipe/datapipe-1.0-r1.ebuild b/net-misc/datapipe/datapipe-1.0-r1.ebuild
new file mode 100644
index 000000000000..1bf5bdfb7769
--- /dev/null
+++ b/net-misc/datapipe/datapipe-1.0-r1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+IUSE=""
+DESCRIPTION="bind a local port and connect it to a remote socket"
+HOMEPAGE="http://http.distributed.net/pub/dcti/unsupported/"
+SRC_URI="ftp://ftp.distributed.net/pub/dcti/unsupported/${P}.tar.gz http://http.distributed.net/pub/dcti/unsupported/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~arm ~amd64"
+
+src_compile() {
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o datapipe datapipe.c
+}
+
+src_install() {
+ dobin datapipe
+ dodoc datapipe.txt
+}
diff --git a/net-misc/datapipe/metadata.xml b/net-misc/datapipe/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/net-misc/datapipe/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/dcetest/Manifest b/net-misc/dcetest/Manifest
new file mode 100644
index 000000000000..e880c0b7750e
--- /dev/null
+++ b/net-misc/dcetest/Manifest
@@ -0,0 +1 @@
+DIST dcetest.tar 133120 RMD160 d3d0d3a1e55072f42094e95e3410c305701c66ae SHA1 1f330411fc729dbc1980ec0720e174a452c12f0e SHA256 4333d421c941d6b48df6307e2796b222ddd745db69e345f2a299af1babe04408
diff --git a/net-misc/dcetest/dcetest-2.0.ebuild b/net-misc/dcetest/dcetest-2.0.ebuild
new file mode 100644
index 000000000000..ea56dd5b7438
--- /dev/null
+++ b/net-misc/dcetest/dcetest-2.0.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="dcetest is a clone of the Windows rpcinfo"
+HOMEPAGE="http://www.atstake.com/research/tools/info_gathering/"
+SRC_URI="http://www.atstake.com/research/tools/info_gathering/dcetest.tar"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="ppc x86"
+IUSE=""
+DEPEND="sys-apps/sed"
+RDEPEND=""
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ # cleanup the makefile a little
+ sed -e '/^CC/d' -i Makefile
+ sed -e 's/CFLAGS.*/CFLAGS += -Wall -funsigned-char -fPIC/g' -i Makefile
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install() {
+ dobin dcetest || die
+ dodoc CHANGELOG README VERSION nt4sp6adefault.txt out out.txt out2.txt w2ksp0.txt
+}
diff --git a/net-misc/dcetest/metadata.xml b/net-misc/dcetest/metadata.xml
new file mode 100644
index 000000000000..dc267bfe85d6
--- /dev/null
+++ b/net-misc/dcetest/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+<longdescription>This little utility dumps MSRPC endpoint information from
+ Windows systems. Similar to the rpcdump program from Microsoft, but does
+ not need a DCE stack and so runs on Unixes. dcetest can be very useful once
+ inside a DMZ to fingerprint Windows machines on the network. dcetest
+ operates over TCP port 135. (Think of it as rpcinfo -p against
+ Windows.)
+</longdescription>
+<longdescription lang="ja">
+これは Windows システムからの MSRPC エンドポイント情報をダンプする小さな
+ユーティリティです。Microsoft 社の rpcdump プログラムに似ていますが、DCE
+スタックを必要とせず、何より Unix 系で動きます。Dcetest は DMZ 内の
+Windows マシンの指紋を一度に取るのに便利です。Dcetest はポート番号135で
+作動します。(Windows マシンへ向けて rpcinfo -p を実行したと考えます)
+</longdescription>
+</pkgmetadata>
diff --git a/net-misc/dhcdrop/Manifest b/net-misc/dhcdrop/Manifest
new file mode 100644
index 000000000000..1aa0b0f2502e
--- /dev/null
+++ b/net-misc/dhcdrop/Manifest
@@ -0,0 +1 @@
+DIST dhcdrop-0.5.tar.bz2 279218 SHA256 719f83b40a41075b9ef64269ecf03dbfc5d1ba014c0248486e668b087047ae97 SHA512 11ac0ca6dcb65f696936e47e43cfbdd59083b607b26b5d12274cc04577be257dda94e9c27eb0c4aebb40f5f572693478cceb04cc4b5b06bf8882c3001fc46142 WHIRLPOOL e08587e3beba8baf0a9c6383a8e722805dd0d8169640e66f739572d9470db8b8c15aa3bc01dd660a55bef0d8abed72c6be6c41dad2d8ff30d7e20aa974989558
diff --git a/net-misc/dhcdrop/dhcdrop-0.5.ebuild b/net-misc/dhcdrop/dhcdrop-0.5.ebuild
new file mode 100644
index 000000000000..a8a115cf33ad
--- /dev/null
+++ b/net-misc/dhcdrop/dhcdrop-0.5.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils
+
+DESCRIPTION="Effectively suppresses illegal DHCP servers on the LAN"
+HOMEPAGE="http://www.netpatch.ru/dhcdrop.html"
+SRC_URI="http://www.netpatch.ru/projects/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~x86"
+
+IUSE="static"
+
+RDEPEND="!static? ( net-libs/libpcap )"
+DEPEND="static? ( net-libs/libpcap[static-libs] )
+ ${RDEPEND}"
+
+DOCS=( AUTHORS ChangeLog INSTALL NEWS README )
+
+src_prepare() {
+ epatch_user
+}
+
+src_configure() {
+ econf $(use static && echo "--enable-static-build")
+}
diff --git a/net-misc/dhcdrop/metadata.xml b/net-misc/dhcdrop/metadata.xml
new file mode 100644
index 000000000000..42486af8aabc
--- /dev/null
+++ b/net-misc/dhcdrop/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>spiderx@spiderx.dp.ua</email>
+ <name>Vladimir Pavljuchenkov</name>
+ <description>Maintainer. Assign bugs to him</description>
+ </maintainer>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ <description>Proxy maintainer. CC him on bugs</description>
+ </maintainer>
+ <longdescription>
+ Uility for tracing and neutralizing(blocking) fake DHCP
+ servers in Ethernet. Supports various modes. Theres possibility
+ to set outgoing MAC addresses and optional settings in generated
+ DHCP requests. Supports legal DHCP servers list. One can run it
+ in interactive mode under users control or fully automatic mode for
+ start up from script.
+ </longdescription>
+ <upstream>
+ <doc>http://www.netpatch.ru/en/dhcdrop.html</doc>
+ <bugs-to>mailto:roma@ultranet.ru</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest
new file mode 100644
index 000000000000..ef99fa7cf3f7
--- /dev/null
+++ b/net-misc/dhcp/Manifest
@@ -0,0 +1,3 @@
+DIST dhcp-4.2.5-P1.tar.gz 8255960 SHA256 59b06c9f5d775e46999b422c45b9229402c462b114ce1685617bfb2b8b028250 SHA512 02a811b6e88ce013f7ecff6abf81d4b2aff82fff584521ae03fc3242b6036d0d0ad3afc6283fe8b97d18b8fffd4b6d2253386897ae2297c165240017f5f219ec WHIRLPOOL b8cf91c69ae0e1b234089ce3fae4b9daf5bde7f415d8cbc274ab4d006c8aa25f55807c70ba4c6771e0c9803ec5a99f8cc2088e561cac7d16479f5f022ee5459f
+DIST dhcp-4.3.1.tar.gz 8980806 SHA256 266cbca8a7a6bb8f9ccc5765da0d2b04099329314a54a4fc1022d510ad3e9af0 SHA512 84ca525fda825bf367a98754f1fb1b8eba5b095c92c25ddaec6e30b31008c7d5c43062ae43cecaa43731a8e78ae406a3123906fd402d2ba4b46b7adbae65aa6a WHIRLPOOL 3fd3720f6883b43856d2169264ee2adfb541b793604728c4e5cc3b647d4a88d6245fb6e53062de4118301cc15f0b4388363eba304bf3623dfb88c91bde94b2b6
+DIST dhcp-4.3.2.tar.gz 9230340 SHA256 6246c9b358759f6cdcc45104caaf76e732a211dbbbbf64a21f499c8db1298165 SHA512 b91a0a90736c6e8bd66a74af8c67949c81db3148eba23ee647f0987bbd98543f0dfd1605c94e152b28a606bbbecd94cd8a8112db5f5fe4c3d041101bda1b95da WHIRLPOOL a201cea52e96517ff1dae2b6c05b05da11feb4c2eed6dca539ea5ab3185711377cd7f7ed9ecc5e5f2bc30bc84d73a85d4140154c43b4f0f27a7e0a4a51f56787
diff --git a/net-misc/dhcp/dhcp-4.2.5_p1-r1.ebuild b/net-misc/dhcp/dhcp-4.2.5_p1-r1.ebuild
new file mode 100644
index 000000000000..8561aa995a05
--- /dev/null
+++ b/net-misc/dhcp/dhcp-4.2.5_p1-r1.ebuild
@@ -0,0 +1,247 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils toolchain-funcs user
+
+MY_PV="${PV//_alpha/a}"
+MY_PV="${MY_PV//_beta/b}"
+MY_PV="${MY_PV//_rc/rc}"
+MY_PV="${MY_PV//_p/-P}"
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server"
+HOMEPAGE="http://www.isc.org/products/DHCP"
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
+ ftp://ftp.isc.org/isc/dhcp/${MY_PV}/${MY_P}.tar.gz"
+
+LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="+client ipv6 kernel_linux ldap selinux +server ssl vim-syntax"
+
+DEPEND="selinux? ( sec-policy/selinux-dhcp )
+ client? (
+ kernel_linux? (
+ ipv6? ( sys-apps/iproute2 )
+ sys-apps/net-tools
+ )
+ )
+ ldap? (
+ net-nds/openldap
+ ssl? ( dev-libs/openssl )
+ )"
+RDEPEND="${DEPEND}
+ vim-syntax? ( app-vim/dhcpd-syntax )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ # handle local bind hell
+ cd "${S}"/bind
+ unpack ./bind.tar.gz
+}
+
+src_prepare() {
+ # Gentoo patches - these will probably never be accepted upstream
+ # Fix some permission issues
+ epatch "${FILESDIR}"/${PN}-3.0-fix-perms.patch
+ # Enable dhclient to equery NTP servers
+ epatch "${FILESDIR}"/${PN}-4.0-dhclient-ntp.patch
+ # resolvconf support in dhclient-script
+ epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-resolvconf.patch
+ # Stop downing the interface on Linux as that breaks link daemons
+ # such as wpa_supplicant and netplug
+ epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-no-down.patch
+ epatch "${FILESDIR}"/${PN}-4.2.0-errwarn-message.patch
+ # Enable dhclient to get extra configuration from stdin
+ epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-stdin-conf.patch
+ epatch "${FILESDIR}"/${PN}-4.2.2-nogateway.patch #265531
+ epatch "${FILESDIR}"/${PN}-4.2.4-quieter-ping.patch #296921
+ epatch "${FILESDIR}"/${PN}-4.2.4-always-accept-4.patch #437108
+ epatch "${FILESDIR}"/${PN}-4.2.5-iproute2-path.patch #480636
+ epatch "${FILESDIR}"/${PN}-4.2.5-bindtodevice-inet6.patch #471142
+
+ # Brand the version with Gentoo
+ sed -i \
+ -e "/VERSION=/s:'$: Gentoo-${PR}':" \
+ configure || die
+
+ # Change the hook script locations of the scripts
+ sed -i \
+ -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
+ -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \
+ client/scripts/* || die
+
+ # No need for the linux script to force bash #158540
+ sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die
+
+ # Quiet the freebsd logger a little
+ sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die
+
+ # Remove these options from the sample config
+ sed -i -r \
+ -e "/(script|host-name|domain-name) /d" \
+ client/dhclient.conf.example || die
+
+ if use client && ! use server ; then
+ sed -i -r \
+ -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \
+ Makefile.in || die
+ elif ! use client && use server ; then
+ sed -i -r \
+ -e '/^SUBDIRS/s:\<client\>::' \
+ Makefile.in || die
+ fi
+
+ # Only install different man pages if we don't have en
+ if [[ " ${LINGUAS} " != *" en "* ]]; then
+ # Install Japanese man pages
+ if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
+ einfo "Installing Japanese documention"
+ cp doc/ja_JP.eucJP/dhclient* client
+ cp doc/ja_JP.eucJP/dhcp* common
+ fi
+ fi
+ # Now remove the non-english docs so there are no errors later
+ rm -rf doc/ja_JP.eucJP
+
+ # make the bind build work
+ binddir=${S}/bind
+ cd "${binddir}" || die
+ cat <<-EOF > bindvar.tmp
+ binddir=${binddir}
+ GMAKE=${MAKE:-gmake}
+ EOF
+ epatch "${FILESDIR}"/${PN}-4.2.2-bind-disable.patch
+ cd bind-*/
+ epatch "${FILESDIR}"/${PN}-4.2.2-bind-parallel-build.patch #380717
+ epatch "${FILESDIR}"/${PN}-4.2.2-bind-build-flags.patch
+}
+
+src_configure() {
+ # bind defaults to stupid `/usr/bin/ar`
+ tc-export AR BUILD_CC
+ export ac_cv_path_AR=${AR}
+
+ # this is tested for by the bind build system, and can cause trouble
+ # when cross-building; since dhcp itself doesn't make use of libcap,
+ # simply disable it.
+ export ac_cv_lib_cap_cap_set_proc=no
+
+ # Use FHS sane paths ... some of these have configure options,
+ # but not all, so just do it all here.
+ local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp"
+ cat <<-EOF >> includes/site.h
+ #define _PATH_DHCPD_CONF "${e}/dhcpd.conf"
+ #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf"
+ #define _PATH_DHCPD_DB "${l}/dhcpd.leases"
+ #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases"
+ #define _PATH_DHCLIENT_DB "${l}/dhclient.leases"
+ #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases"
+ #define _PATH_DHCPD_PID "${r}/dhcpd.pid"
+ #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid"
+ #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid"
+ #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid"
+ #define _PATH_DHCRELAY_PID "${r}/dhcrelay.pid"
+ #define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid"
+ EOF
+
+ econf \
+ --enable-paranoia \
+ --enable-early-chroot \
+ --sysconfdir=${e} \
+ $(use_enable ipv6 dhcpv6) \
+ $(use_with ldap) \
+ $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto)
+
+ # configure local bind cruft. symtable option requires
+ # perl and we don't want to require that #383837.
+ cd bind/bind-*/ || die
+ eval econf \
+ $(sed -n '/ [.].configure /{s:^[^-]*::;s:>.*::;p}' ../Makefile) \
+ --disable-symtable \
+ --without-make-clean
+}
+
+src_compile() {
+ # build local bind cruft first
+ emake -C bind/bind-*/lib/export install
+ # then build standard dhcp code
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ default
+
+ dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters}
+ dohtml doc/References.html
+
+ if [[ -e client/dhclient ]] ; then
+ # move the client to /
+ dodir /sbin
+ mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die
+
+ exeinto /sbin
+ if use kernel_linux ; then
+ newexe "${S}"/client/scripts/linux dhclient-script
+ else
+ newexe "${S}"/client/scripts/freebsd dhclient-script
+ fi
+ fi
+
+ if [[ -e server/dhcpd ]] ; then
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins contrib/ldap/dhcp.*
+ dosbin contrib/ldap/dhcpd-conf-to-ldap
+ fi
+
+ newinitd "${FILESDIR}"/dhcpd.init5 dhcpd
+ newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd
+ newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay
+ newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
+ newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay6
+ newconfd "${FILESDIR}"/dhcrelay6.conf dhcrelay6
+
+ sed -i "s:#@slapd@:$(usex ldap slapd ''):" "${ED}"/etc/init.d/* || die #442560
+ fi
+
+ # the default config files aren't terribly useful #384087
+ local f
+ for f in "${ED}"/etc/dhcp/*.conf.example ; do
+ mv "${f}" "${f%.example}" || die
+ done
+ sed -i '/^[^#]/s:^:#:' "${ED}"/etc/dhcp/*.conf || die
+}
+
+pkg_preinst() {
+ enewgroup dhcp
+ enewuser dhcp -1 -1 /var/lib/dhcp dhcp
+
+ # Keep the user files over the sample ones. The
+ # hashing is to ignore the crappy defaults #384087.
+ local f h
+ for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do
+ h=${f#*:}
+ f="/etc/dhcp/${f%:*}.conf"
+ if [ -e "${EROOT}"${f} ] ; then
+ case $(md5sum "${EROOT}"${f}) in
+ ${h}*) ;;
+ *) cp -p "${EROOT}"${f} "${ED}"${f};;
+ esac
+ fi
+ done
+}
+
+pkg_postinst() {
+ if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then
+ ewarn
+ ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
+ ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
+ ewarn "and dhcp should be removed from the default runlevel"
+ ewarn
+ fi
+}
diff --git a/net-misc/dhcp/dhcp-4.2.5_p1-r2.ebuild b/net-misc/dhcp/dhcp-4.2.5_p1-r2.ebuild
new file mode 100644
index 000000000000..268df671a9ca
--- /dev/null
+++ b/net-misc/dhcp/dhcp-4.2.5_p1-r2.ebuild
@@ -0,0 +1,256 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils systemd toolchain-funcs user
+
+MY_PV="${PV//_alpha/a}"
+MY_PV="${MY_PV//_beta/b}"
+MY_PV="${MY_PV//_rc/rc}"
+MY_PV="${MY_PV//_p/-P}"
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server"
+HOMEPAGE="http://www.isc.org/products/DHCP"
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
+ ftp://ftp.isc.org/isc/dhcp/${MY_PV}/${MY_P}.tar.gz"
+
+LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="+client ipv6 kernel_linux ldap selinux +server ssl vim-syntax"
+
+DEPEND="
+ client? (
+ kernel_linux? (
+ ipv6? ( sys-apps/iproute2 )
+ sys-apps/net-tools
+ )
+ )
+ ldap? (
+ net-nds/openldap
+ ssl? ( dev-libs/openssl )
+ )"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-dhcp )
+ vim-syntax? ( app-vim/dhcpd-syntax )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ # handle local bind hell
+ cd "${S}"/bind
+ unpack ./bind.tar.gz
+}
+
+src_prepare() {
+ # Gentoo patches - these will probably never be accepted upstream
+ # Fix some permission issues
+ epatch "${FILESDIR}"/${PN}-3.0-fix-perms.patch
+ # Enable dhclient to equery NTP servers
+ epatch "${FILESDIR}"/${PN}-4.0-dhclient-ntp.patch
+ # resolvconf support in dhclient-script
+ epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-resolvconf.patch
+ # Stop downing the interface on Linux as that breaks link daemons
+ # such as wpa_supplicant and netplug
+ epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-no-down.patch
+ epatch "${FILESDIR}"/${PN}-4.2.0-errwarn-message.patch
+ # Enable dhclient to get extra configuration from stdin
+ epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-stdin-conf.patch
+ epatch "${FILESDIR}"/${PN}-4.2.2-nogateway.patch #265531
+ epatch "${FILESDIR}"/${PN}-4.2.4-quieter-ping.patch #296921
+ epatch "${FILESDIR}"/${PN}-4.2.4-always-accept-4.patch #437108
+ epatch "${FILESDIR}"/${PN}-4.2.5-iproute2-path.patch #480636
+ epatch "${FILESDIR}"/${PN}-4.2.5-bindtodevice-inet6.patch #471142
+
+ # Brand the version with Gentoo
+ sed -i \
+ -e "/VERSION=/s:'$: Gentoo-${PR}':" \
+ configure || die
+
+ # Change the hook script locations of the scripts
+ sed -i \
+ -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
+ -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \
+ client/scripts/* || die
+
+ # No need for the linux script to force bash #158540
+ sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die
+
+ # Quiet the freebsd logger a little
+ sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die
+
+ # Remove these options from the sample config
+ sed -i -r \
+ -e "/(script|host-name|domain-name) /d" \
+ client/dhclient.conf.example || die
+
+ if use client && ! use server ; then
+ sed -i -r \
+ -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \
+ Makefile.in || die
+ elif ! use client && use server ; then
+ sed -i -r \
+ -e '/^SUBDIRS/s:\<client\>::' \
+ Makefile.in || die
+ fi
+
+ # Only install different man pages if we don't have en
+ if [[ " ${LINGUAS} " != *" en "* ]]; then
+ # Install Japanese man pages
+ if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
+ einfo "Installing Japanese documention"
+ cp doc/ja_JP.eucJP/dhclient* client
+ cp doc/ja_JP.eucJP/dhcp* common
+ fi
+ fi
+ # Now remove the non-english docs so there are no errors later
+ rm -rf doc/ja_JP.eucJP
+
+ # make the bind build work
+ binddir=${S}/bind
+ cd "${binddir}" || die
+ cat <<-EOF > bindvar.tmp
+ binddir=${binddir}
+ GMAKE=${MAKE:-gmake}
+ EOF
+ epatch "${FILESDIR}"/${PN}-4.2.2-bind-disable.patch
+ cd bind-*/
+ epatch "${FILESDIR}"/${PN}-4.2.2-bind-parallel-build.patch #380717
+ epatch "${FILESDIR}"/${PN}-4.2.2-bind-build-flags.patch
+}
+
+src_configure() {
+ # bind defaults to stupid `/usr/bin/ar`
+ tc-export AR BUILD_CC
+ export ac_cv_path_AR=${AR}
+
+ # this is tested for by the bind build system, and can cause trouble
+ # when cross-building; since dhcp itself doesn't make use of libcap,
+ # simply disable it.
+ export ac_cv_lib_cap_cap_set_proc=no
+
+ # Use FHS sane paths ... some of these have configure options,
+ # but not all, so just do it all here.
+ local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp"
+ cat <<-EOF >> includes/site.h
+ #define _PATH_DHCPD_CONF "${e}/dhcpd.conf"
+ #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf"
+ #define _PATH_DHCPD_DB "${l}/dhcpd.leases"
+ #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases"
+ #define _PATH_DHCLIENT_DB "${l}/dhclient.leases"
+ #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases"
+ #define _PATH_DHCPD_PID "${r}/dhcpd.pid"
+ #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid"
+ #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid"
+ #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid"
+ #define _PATH_DHCRELAY_PID "${r}/dhcrelay.pid"
+ #define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid"
+ EOF
+
+ econf \
+ --enable-paranoia \
+ --enable-early-chroot \
+ --sysconfdir=${e} \
+ $(use_enable ipv6 dhcpv6) \
+ $(use_with ldap) \
+ $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto)
+
+ # configure local bind cruft. symtable option requires
+ # perl and we don't want to require that #383837.
+ cd bind/bind-*/ || die
+ eval econf \
+ $(sed -n '/ [.].configure /{s:^[^-]*::;s:>.*::;p}' ../Makefile) \
+ --disable-symtable \
+ --without-make-clean
+}
+
+src_compile() {
+ # build local bind cruft first
+ emake -C bind/bind-*/lib/export install
+ # then build standard dhcp code
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ default
+
+ dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters}
+ dohtml doc/References.html
+
+ if [[ -e client/dhclient ]] ; then
+ # move the client to /
+ dodir /sbin
+ mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die
+
+ exeinto /sbin
+ if use kernel_linux ; then
+ newexe "${S}"/client/scripts/linux dhclient-script
+ else
+ newexe "${S}"/client/scripts/freebsd dhclient-script
+ fi
+ fi
+
+ if [[ -e server/dhcpd ]] ; then
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins contrib/ldap/dhcp.*
+ dosbin contrib/ldap/dhcpd-conf-to-ldap
+ fi
+
+ newinitd "${FILESDIR}"/dhcpd.init5 dhcpd
+ newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd
+ newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay
+ newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
+ newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay6
+ newconfd "${FILESDIR}"/dhcrelay6.conf dhcrelay6
+
+ systemd_newtmpfilesd "${FILESDIR}"/dhcpd.tmpfiles dhcpd.conf
+ systemd_dounit "${FILESDIR}"/dhcpd4.service
+ systemd_dounit "${FILESDIR}"/dhcpd6.service
+ systemd_dounit "${FILESDIR}"/dhcrelay4.service
+ systemd_dounit "${FILESDIR}"/dhcrelay6.service
+ systemd_install_serviced "${FILESDIR}"/dhcrelay4.service.conf
+ systemd_install_serviced "${FILESDIR}"/dhcrelay6.service.conf
+
+ sed -i "s:#@slapd@:$(usex ldap slapd ''):" "${ED}"/etc/init.d/* || die #442560
+ fi
+
+ # the default config files aren't terribly useful #384087
+ local f
+ for f in "${ED}"/etc/dhcp/*.conf.example ; do
+ mv "${f}" "${f%.example}" || die
+ done
+ sed -i '/^[^#]/s:^:#:' "${ED}"/etc/dhcp/*.conf || die
+}
+
+pkg_preinst() {
+ enewgroup dhcp
+ enewuser dhcp -1 -1 /var/lib/dhcp dhcp
+
+ # Keep the user files over the sample ones. The
+ # hashing is to ignore the crappy defaults #384087.
+ local f h
+ for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do
+ h=${f#*:}
+ f="/etc/dhcp/${f%:*}.conf"
+ if [ -e "${EROOT}"${f} ] ; then
+ case $(md5sum "${EROOT}"${f}) in
+ ${h}*) ;;
+ *) cp -p "${EROOT}"${f} "${ED}"${f};;
+ esac
+ fi
+ done
+}
+
+pkg_postinst() {
+ if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then
+ ewarn
+ ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
+ ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
+ ewarn "and dhcp should be removed from the default runlevel"
+ ewarn
+ fi
+}
diff --git a/net-misc/dhcp/dhcp-4.2.5_p1.ebuild b/net-misc/dhcp/dhcp-4.2.5_p1.ebuild
new file mode 100644
index 000000000000..4ef10a979298
--- /dev/null
+++ b/net-misc/dhcp/dhcp-4.2.5_p1.ebuild
@@ -0,0 +1,240 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils toolchain-funcs user
+
+MY_PV="${PV//_alpha/a}"
+MY_PV="${MY_PV//_beta/b}"
+MY_PV="${MY_PV//_rc/rc}"
+MY_PV="${MY_PV//_p/-P}"
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server"
+HOMEPAGE="http://www.isc.org/products/DHCP"
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
+ ftp://ftp.isc.org/isc/dhcp/${MY_PV}/${MY_P}.tar.gz"
+
+LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="+client ipv6 kernel_linux ldap selinux +server ssl vim-syntax"
+
+DEPEND="selinux? ( sec-policy/selinux-dhcp )
+ client? ( kernel_linux? ( sys-apps/net-tools ) )
+ ldap? (
+ net-nds/openldap
+ ssl? ( dev-libs/openssl )
+ )"
+RDEPEND="${DEPEND}
+ vim-syntax? ( app-vim/dhcpd-syntax )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ # handle local bind hell
+ cd "${S}"/bind
+ unpack ./bind.tar.gz
+}
+
+src_prepare() {
+ # Gentoo patches - these will probably never be accepted upstream
+ # Fix some permission issues
+ epatch "${FILESDIR}"/${PN}-3.0-fix-perms.patch
+ # Enable dhclient to equery NTP servers
+ epatch "${FILESDIR}"/${PN}-4.0-dhclient-ntp.patch
+ # resolvconf support in dhclient-script
+ epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-resolvconf.patch
+ # Stop downing the interface on Linux as that breaks link daemons
+ # such as wpa_supplicant and netplug
+ epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-no-down.patch
+ epatch "${FILESDIR}"/${PN}-4.2.0-errwarn-message.patch
+ # Enable dhclient to get extra configuration from stdin
+ epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-stdin-conf.patch
+ epatch "${FILESDIR}"/${PN}-4.2.2-nogateway.patch #265531
+ epatch "${FILESDIR}"/${PN}-4.2.4-quieter-ping.patch #296921
+ epatch "${FILESDIR}"/${PN}-4.2.4-always-accept-4.patch #437108
+
+ # Brand the version with Gentoo
+ sed -i \
+ -e "/VERSION=/s:'$: Gentoo-${PR}':" \
+ configure || die
+
+ # Change the hook script locations of the scripts
+ sed -i \
+ -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
+ -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \
+ client/scripts/* || die
+
+ # No need for the linux script to force bash #158540
+ sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die
+
+ # Quiet the freebsd logger a little
+ sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die
+
+ # Remove these options from the sample config
+ sed -i -r \
+ -e "/(script|host-name|domain-name) /d" \
+ client/dhclient.conf.example || die
+
+ if use client && ! use server ; then
+ sed -i -r \
+ -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \
+ Makefile.in || die
+ elif ! use client && use server ; then
+ sed -i -r \
+ -e '/^SUBDIRS/s:\<client\>::' \
+ Makefile.in || die
+ fi
+
+ # Only install different man pages if we don't have en
+ if [[ " ${LINGUAS} " != *" en "* ]]; then
+ # Install Japanese man pages
+ if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
+ einfo "Installing Japanese documention"
+ cp doc/ja_JP.eucJP/dhclient* client
+ cp doc/ja_JP.eucJP/dhcp* common
+ fi
+ fi
+ # Now remove the non-english docs so there are no errors later
+ rm -rf doc/ja_JP.eucJP
+
+ # make the bind build work
+ binddir=${S}/bind
+ cd "${binddir}" || die
+ cat <<-EOF > bindvar.tmp
+ binddir=${binddir}
+ GMAKE=${MAKE:-gmake}
+ EOF
+ epatch "${FILESDIR}"/${PN}-4.2.2-bind-disable.patch
+ cd bind-*/
+ epatch "${FILESDIR}"/${PN}-4.2.2-bind-parallel-build.patch #380717
+ epatch "${FILESDIR}"/${PN}-4.2.2-bind-build-flags.patch
+}
+
+src_configure() {
+ # bind defaults to stupid `/usr/bin/ar`
+ tc-export AR BUILD_CC
+ export ac_cv_path_AR=${AR}
+
+ # this is tested for by the bind build system, and can cause trouble
+ # when cross-building; since dhcp itself doesn't make use of libcap,
+ # simply disable it.
+ export ac_cv_lib_cap_cap_set_proc=no
+
+ # Use FHS sane paths ... some of these have configure options,
+ # but not all, so just do it all here.
+ local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp"
+ cat <<-EOF >> includes/site.h
+ #define _PATH_DHCPD_CONF "${e}/dhcpd.conf"
+ #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf"
+ #define _PATH_DHCPD_DB "${l}/dhcpd.leases"
+ #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases"
+ #define _PATH_DHCLIENT_DB "${l}/dhclient.leases"
+ #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases"
+ #define _PATH_DHCPD_PID "${r}/dhcpd.pid"
+ #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid"
+ #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid"
+ #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid"
+ #define _PATH_DHCRELAY_PID "${r}/dhcrelay.pid"
+ #define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid"
+ EOF
+
+ econf \
+ --enable-paranoia \
+ --enable-early-chroot \
+ --sysconfdir=${e} \
+ $(use_enable ipv6 dhcpv6) \
+ $(use_with ldap) \
+ $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto)
+
+ # configure local bind cruft. symtable option requires
+ # perl and we don't want to require that #383837.
+ cd bind/bind-*/ || die
+ eval econf \
+ $(sed -n '/ [.].configure /{s:^[^-]*::;s:>.*::;p}' ../Makefile) \
+ --disable-symtable \
+ --without-make-clean
+}
+
+src_compile() {
+ # build local bind cruft first
+ emake -C bind/bind-*/lib/export install
+ # then build standard dhcp code
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ default
+
+ dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters}
+ dohtml doc/References.html
+
+ if [[ -e client/dhclient ]] ; then
+ # move the client to /
+ dodir /sbin
+ mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die
+
+ exeinto /sbin
+ if use kernel_linux ; then
+ newexe "${S}"/client/scripts/linux dhclient-script
+ else
+ newexe "${S}"/client/scripts/freebsd dhclient-script
+ fi
+ fi
+
+ if [[ -e server/dhcpd ]] ; then
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins contrib/ldap/dhcp.*
+ dosbin contrib/ldap/dhcpd-conf-to-ldap
+ fi
+
+ newinitd "${FILESDIR}"/dhcpd.init5 dhcpd
+ newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd
+ newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay
+ newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
+ newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay6
+ newconfd "${FILESDIR}"/dhcrelay6.conf dhcrelay6
+
+ sed -i "s:#@slapd@:$(usex ldap slapd ''):" "${ED}"/etc/init.d/* || die #442560
+ fi
+
+ # the default config files aren't terribly useful #384087
+ local f
+ for f in "${ED}"/etc/dhcp/*.conf.example ; do
+ mv "${f}" "${f%.example}" || die
+ done
+ sed -i '/^[^#]/s:^:#:' "${ED}"/etc/dhcp/*.conf || die
+}
+
+pkg_preinst() {
+ enewgroup dhcp
+ enewuser dhcp -1 -1 /var/lib/dhcp dhcp
+
+ # Keep the user files over the sample ones. The
+ # hashing is to ignore the crappy defaults #384087.
+ local f h
+ for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do
+ h=${f#*:}
+ f="/etc/dhcp/${f%:*}.conf"
+ if [ -e "${EROOT}"${f} ] ; then
+ case $(md5sum "${EROOT}"${f}) in
+ ${h}*) ;;
+ *) cp -p "${EROOT}"${f} "${ED}"${f};;
+ esac
+ fi
+ done
+}
+
+pkg_postinst() {
+ if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then
+ ewarn
+ ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
+ ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
+ ewarn "and dhcp should be removed from the default runlevel"
+ ewarn
+ fi
+}
diff --git a/net-misc/dhcp/dhcp-4.3.1-r2.ebuild b/net-misc/dhcp/dhcp-4.3.1-r2.ebuild
new file mode 100644
index 000000000000..f1ddaec5b52a
--- /dev/null
+++ b/net-misc/dhcp/dhcp-4.3.1-r2.ebuild
@@ -0,0 +1,254 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils systemd toolchain-funcs user
+
+MY_PV="${PV//_alpha/a}"
+MY_PV="${MY_PV//_beta/b}"
+MY_PV="${MY_PV//_rc/rc}"
+MY_PV="${MY_PV//_p/-P}"
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server"
+HOMEPAGE="http://www.isc.org/products/DHCP"
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
+ ftp://ftp.isc.org/isc/dhcp/${MY_PV}/${MY_P}.tar.gz"
+
+LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="+client ipv6 kernel_linux ldap selinux +server ssl vim-syntax"
+
+DEPEND="
+ client? (
+ kernel_linux? (
+ ipv6? ( sys-apps/iproute2 )
+ sys-apps/net-tools
+ )
+ )
+ ldap? (
+ net-nds/openldap
+ ssl? ( dev-libs/openssl )
+ )"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-dhcp )
+ vim-syntax? ( app-vim/dhcpd-syntax )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ # handle local bind hell
+ cd "${S}"/bind
+ unpack ./bind.tar.gz
+}
+
+src_prepare() {
+ # Gentoo patches - these will probably never be accepted upstream
+ # Fix some permission issues
+ epatch "${FILESDIR}"/${PN}-3.0-fix-perms.patch
+ # Enable dhclient to equery NTP servers
+ epatch "${FILESDIR}"/${PN}-4.0-dhclient-ntp.patch
+ epatch "${FILESDIR}"/${PN}-4.3.1-dhclient-resolvconf.patch
+ # Stop downing the interface on Linux as that breaks link daemons
+ # such as wpa_supplicant and netplug
+ epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-no-down.patch
+ # Enable dhclient to get extra configuration from stdin
+ epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-stdin-conf.patch
+ epatch "${FILESDIR}"/${PN}-4.2.2-nogateway.patch #265531
+ epatch "${FILESDIR}"/${PN}-4.2.4-quieter-ping.patch #296921
+ epatch "${FILESDIR}"/${PN}-4.2.4-always-accept-4.patch #437108
+ epatch "${FILESDIR}"/${PN}-4.2.5-iproute2-path.patch #480636
+ epatch "${FILESDIR}"/${PN}-4.2.5-bindtodevice-inet6.patch #471142
+
+ # Brand the version with Gentoo
+ sed -i \
+ -e "/VERSION=/s:'$: Gentoo-${PR}':" \
+ configure || die
+
+ # Change the hook script locations of the scripts
+ sed -i \
+ -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
+ -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \
+ client/scripts/* || die
+
+ # No need for the linux script to force bash #158540
+ sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die
+
+ # Quiet the freebsd logger a little
+ sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die
+
+ # Remove these options from the sample config
+ sed -i -r \
+ -e "/(script|host-name|domain-name) /d" \
+ client/dhclient.conf.example || die
+
+ if use client && ! use server ; then
+ sed -i -r \
+ -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \
+ Makefile.in || die
+ elif ! use client && use server ; then
+ sed -i -r \
+ -e '/^SUBDIRS/s:\<client\>::' \
+ Makefile.in || die
+ fi
+
+ # Only install different man pages if we don't have en
+ if [[ " ${LINGUAS} " != *" en "* ]]; then
+ # Install Japanese man pages
+ if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
+ einfo "Installing Japanese documention"
+ cp doc/ja_JP.eucJP/dhclient* client
+ cp doc/ja_JP.eucJP/dhcp* common
+ fi
+ fi
+ # Now remove the non-english docs so there are no errors later
+ rm -rf doc/ja_JP.eucJP
+
+ # make the bind build work
+ binddir=${S}/bind
+ cd "${binddir}" || die
+ cat <<-EOF > bindvar.tmp
+ binddir=${binddir}
+ GMAKE=${MAKE:-gmake}
+ EOF
+ epatch "${FILESDIR}"/${PN}-4.2.2-bind-disable.patch
+ cd bind-*/
+ epatch "${FILESDIR}"/${PN}-4.2.2-bind-parallel-build.patch #380717
+ epatch "${FILESDIR}"/${PN}-4.2.2-bind-build-flags.patch
+}
+
+src_configure() {
+ # bind defaults to stupid `/usr/bin/ar`
+ tc-export AR BUILD_CC
+ export ac_cv_path_AR=${AR}
+
+ # this is tested for by the bind build system, and can cause trouble
+ # when cross-building; since dhcp itself doesn't make use of libcap,
+ # simply disable it.
+ export ac_cv_lib_cap_cap_set_proc=no
+
+ # Use FHS sane paths ... some of these have configure options,
+ # but not all, so just do it all here.
+ local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp"
+ cat <<-EOF >> includes/site.h
+ #define _PATH_DHCPD_CONF "${e}/dhcpd.conf"
+ #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf"
+ #define _PATH_DHCPD_DB "${l}/dhcpd.leases"
+ #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases"
+ #define _PATH_DHCLIENT_DB "${l}/dhclient.leases"
+ #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases"
+ #define _PATH_DHCPD_PID "${r}/dhcpd.pid"
+ #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid"
+ #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid"
+ #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid"
+ #define _PATH_DHCRELAY_PID "${r}/dhcrelay.pid"
+ #define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid"
+ EOF
+
+ econf \
+ --enable-paranoia \
+ --enable-early-chroot \
+ --sysconfdir=${e} \
+ $(use_enable ipv6 dhcpv6) \
+ $(use_with ldap) \
+ $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto)
+
+ # configure local bind cruft. symtable option requires
+ # perl and we don't want to require that #383837.
+ cd bind/bind-*/ || die
+ eval econf \
+ $(sed -n '/ [.].configure /{s:^[^-]*::;s:>.*::;p}' ../Makefile) \
+ --disable-symtable \
+ --without-make-clean
+}
+
+src_compile() {
+ # build local bind cruft first
+ emake -C bind/bind-*/lib/export install
+ # then build standard dhcp code
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ default
+
+ dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters}
+ dohtml doc/References.html
+
+ if [[ -e client/dhclient ]] ; then
+ # move the client to /
+ dodir /sbin
+ mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die
+
+ exeinto /sbin
+ if use kernel_linux ; then
+ newexe "${S}"/client/scripts/linux dhclient-script
+ else
+ newexe "${S}"/client/scripts/freebsd dhclient-script
+ fi
+ fi
+
+ if [[ -e server/dhcpd ]] ; then
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins contrib/ldap/dhcp.*
+ dosbin contrib/ldap/dhcpd-conf-to-ldap
+ fi
+
+ newinitd "${FILESDIR}"/dhcpd.init5 dhcpd
+ newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd
+ newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay
+ newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
+ newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay6
+ newconfd "${FILESDIR}"/dhcrelay6.conf dhcrelay6
+
+ systemd_newtmpfilesd "${FILESDIR}"/dhcpd.tmpfiles dhcpd.conf
+ systemd_dounit "${FILESDIR}"/dhcpd4.service
+ systemd_dounit "${FILESDIR}"/dhcpd6.service
+ systemd_dounit "${FILESDIR}"/dhcrelay4.service
+ systemd_dounit "${FILESDIR}"/dhcrelay6.service
+ systemd_install_serviced "${FILESDIR}"/dhcrelay4.service.conf
+ systemd_install_serviced "${FILESDIR}"/dhcrelay6.service.conf
+
+ sed -i "s:#@slapd@:$(usex ldap slapd ''):" "${ED}"/etc/init.d/* || die #442560
+ fi
+
+ # the default config files aren't terribly useful #384087
+ local f
+ for f in "${ED}"/etc/dhcp/*.conf.example ; do
+ mv "${f}" "${f%.example}" || die
+ done
+ sed -i '/^[^#]/s:^:#:' "${ED}"/etc/dhcp/*.conf || die
+}
+
+pkg_preinst() {
+ enewgroup dhcp
+ enewuser dhcp -1 -1 /var/lib/dhcp dhcp
+
+ # Keep the user files over the sample ones. The
+ # hashing is to ignore the crappy defaults #384087.
+ local f h
+ for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do
+ h=${f#*:}
+ f="/etc/dhcp/${f%:*}.conf"
+ if [ -e "${EROOT}"${f} ] ; then
+ case $(md5sum "${EROOT}"${f}) in
+ ${h}*) ;;
+ *) cp -p "${EROOT}"${f} "${ED}"${f};;
+ esac
+ fi
+ done
+}
+
+pkg_postinst() {
+ if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then
+ ewarn
+ ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
+ ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
+ ewarn "and dhcp should be removed from the default runlevel"
+ ewarn
+ fi
+}
diff --git a/net-misc/dhcp/dhcp-4.3.2.ebuild b/net-misc/dhcp/dhcp-4.3.2.ebuild
new file mode 100644
index 000000000000..447f44c55e10
--- /dev/null
+++ b/net-misc/dhcp/dhcp-4.3.2.ebuild
@@ -0,0 +1,254 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils systemd toolchain-funcs user
+
+MY_PV="${PV//_alpha/a}"
+MY_PV="${MY_PV//_beta/b}"
+MY_PV="${MY_PV//_rc/rc}"
+MY_PV="${MY_PV//_p/-P}"
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server"
+HOMEPAGE="http://www.isc.org/products/DHCP"
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
+ ftp://ftp.isc.org/isc/dhcp/${MY_PV}/${MY_P}.tar.gz"
+
+LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="+client ipv6 kernel_linux ldap selinux +server ssl vim-syntax"
+
+DEPEND="
+ client? (
+ kernel_linux? (
+ ipv6? ( sys-apps/iproute2 )
+ sys-apps/net-tools
+ )
+ )
+ ldap? (
+ net-nds/openldap
+ ssl? ( dev-libs/openssl )
+ )"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-dhcp )
+ vim-syntax? ( app-vim/dhcpd-syntax )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ # handle local bind hell
+ cd "${S}"/bind
+ unpack ./bind.tar.gz
+}
+
+src_prepare() {
+ # Gentoo patches - these will probably never be accepted upstream
+ # Fix some permission issues
+ epatch "${FILESDIR}"/${PN}-3.0-fix-perms.patch
+ # Enable dhclient to equery NTP servers
+ epatch "${FILESDIR}"/${PN}-4.0-dhclient-ntp.patch
+ epatch "${FILESDIR}"/${PN}-4.3.1-dhclient-resolvconf.patch
+ # Stop downing the interface on Linux as that breaks link daemons
+ # such as wpa_supplicant and netplug
+ epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-no-down.patch
+ # Enable dhclient to get extra configuration from stdin
+ epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-stdin-conf.patch
+ epatch "${FILESDIR}"/${PN}-4.2.2-nogateway.patch #265531
+ epatch "${FILESDIR}"/${PN}-4.2.4-quieter-ping.patch #296921
+ epatch "${FILESDIR}"/${PN}-4.2.4-always-accept-4.patch #437108
+ epatch "${FILESDIR}"/${PN}-4.2.5-iproute2-path.patch #480636
+ epatch "${FILESDIR}"/${PN}-4.2.5-bindtodevice-inet6.patch #471142
+
+ # Brand the version with Gentoo
+ sed -i \
+ -e "/VERSION=/s:'$: Gentoo-${PR}':" \
+ configure || die
+
+ # Change the hook script locations of the scripts
+ sed -i \
+ -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
+ -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \
+ client/scripts/* || die
+
+ # No need for the linux script to force bash #158540
+ sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die
+
+ # Quiet the freebsd logger a little
+ sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die
+
+ # Remove these options from the sample config
+ sed -i -r \
+ -e "/(script|host-name|domain-name) /d" \
+ client/dhclient.conf.example || die
+
+ if use client && ! use server ; then
+ sed -i -r \
+ -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \
+ Makefile.in || die
+ elif ! use client && use server ; then
+ sed -i -r \
+ -e '/^SUBDIRS/s:\<client\>::' \
+ Makefile.in || die
+ fi
+
+ # Only install different man pages if we don't have en
+ if [[ " ${LINGUAS} " != *" en "* ]]; then
+ # Install Japanese man pages
+ if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
+ einfo "Installing Japanese documention"
+ cp doc/ja_JP.eucJP/dhclient* client
+ cp doc/ja_JP.eucJP/dhcp* common
+ fi
+ fi
+ # Now remove the non-english docs so there are no errors later
+ rm -rf doc/ja_JP.eucJP
+
+ # make the bind build work
+ binddir=${S}/bind
+ cd "${binddir}" || die
+ cat <<-EOF > bindvar.tmp
+ binddir=${binddir}
+ GMAKE=${MAKE:-gmake}
+ EOF
+ epatch "${FILESDIR}"/${PN}-4.2.2-bind-disable.patch
+ cd bind-*/
+ epatch "${FILESDIR}"/${PN}-4.2.2-bind-parallel-build.patch #380717
+ epatch "${FILESDIR}"/${PN}-4.2.2-bind-build-flags.patch
+}
+
+src_configure() {
+ # bind defaults to stupid `/usr/bin/ar`
+ tc-export AR BUILD_CC
+ export ac_cv_path_AR=${AR}
+
+ # this is tested for by the bind build system, and can cause trouble
+ # when cross-building; since dhcp itself doesn't make use of libcap,
+ # simply disable it.
+ export ac_cv_lib_cap_cap_set_proc=no
+
+ # Use FHS sane paths ... some of these have configure options,
+ # but not all, so just do it all here.
+ local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp"
+ cat <<-EOF >> includes/site.h
+ #define _PATH_DHCPD_CONF "${e}/dhcpd.conf"
+ #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf"
+ #define _PATH_DHCPD_DB "${l}/dhcpd.leases"
+ #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases"
+ #define _PATH_DHCLIENT_DB "${l}/dhclient.leases"
+ #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases"
+ #define _PATH_DHCPD_PID "${r}/dhcpd.pid"
+ #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid"
+ #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid"
+ #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid"
+ #define _PATH_DHCRELAY_PID "${r}/dhcrelay.pid"
+ #define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid"
+ EOF
+
+ econf \
+ --enable-paranoia \
+ --enable-early-chroot \
+ --sysconfdir=${e} \
+ $(use_enable ipv6 dhcpv6) \
+ $(use_with ldap) \
+ $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto)
+
+ # configure local bind cruft. symtable option requires
+ # perl and we don't want to require that #383837.
+ cd bind/bind-*/ || die
+ eval econf \
+ $(sed -n '/ [.].configure /{s:^[^-]*::;s:>.*::;p}' ../Makefile) \
+ --disable-symtable \
+ --without-make-clean
+}
+
+src_compile() {
+ # build local bind cruft first
+ emake -C bind/bind-*/lib/export install
+ # then build standard dhcp code
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ default
+
+ dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters}
+ dohtml doc/References.html
+
+ if [[ -e client/dhclient ]] ; then
+ # move the client to /
+ dodir /sbin
+ mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die
+
+ exeinto /sbin
+ if use kernel_linux ; then
+ newexe "${S}"/client/scripts/linux dhclient-script
+ else
+ newexe "${S}"/client/scripts/freebsd dhclient-script
+ fi
+ fi
+
+ if [[ -e server/dhcpd ]] ; then
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins contrib/ldap/dhcp.*
+ dosbin contrib/ldap/dhcpd-conf-to-ldap
+ fi
+
+ newinitd "${FILESDIR}"/dhcpd.init5 dhcpd
+ newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd
+ newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay
+ newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
+ newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay6
+ newconfd "${FILESDIR}"/dhcrelay6.conf dhcrelay6
+
+ systemd_newtmpfilesd "${FILESDIR}"/dhcpd.tmpfiles dhcpd.conf
+ systemd_dounit "${FILESDIR}"/dhcpd4.service
+ systemd_dounit "${FILESDIR}"/dhcpd6.service
+ systemd_dounit "${FILESDIR}"/dhcrelay4.service
+ systemd_dounit "${FILESDIR}"/dhcrelay6.service
+ systemd_install_serviced "${FILESDIR}"/dhcrelay4.service.conf
+ systemd_install_serviced "${FILESDIR}"/dhcrelay6.service.conf
+
+ sed -i "s:#@slapd@:$(usex ldap slapd ''):" "${ED}"/etc/init.d/* || die #442560
+ fi
+
+ # the default config files aren't terribly useful #384087
+ local f
+ for f in "${ED}"/etc/dhcp/*.conf.example ; do
+ mv "${f}" "${f%.example}" || die
+ done
+ sed -i '/^[^#]/s:^:#:' "${ED}"/etc/dhcp/*.conf || die
+}
+
+pkg_preinst() {
+ enewgroup dhcp
+ enewuser dhcp -1 -1 /var/lib/dhcp dhcp
+
+ # Keep the user files over the sample ones. The
+ # hashing is to ignore the crappy defaults #384087.
+ local f h
+ for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do
+ h=${f#*:}
+ f="/etc/dhcp/${f%:*}.conf"
+ if [ -e "${EROOT}"${f} ] ; then
+ case $(md5sum "${EROOT}"${f}) in
+ ${h}*) ;;
+ *) cp -p "${EROOT}"${f} "${ED}"${f};;
+ esac
+ fi
+ done
+}
+
+pkg_postinst() {
+ if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then
+ ewarn
+ ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
+ ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
+ ewarn "and dhcp should be removed from the default runlevel"
+ ewarn
+ fi
+}
diff --git a/net-misc/dhcp/files/dhcp-3.0-fix-perms.patch b/net-misc/dhcp/files/dhcp-3.0-fix-perms.patch
new file mode 100644
index 000000000000..13debb20ed0e
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-3.0-fix-perms.patch
@@ -0,0 +1,15 @@
+--- server/dhcpd.c 2003-11-05 14:08:09.000000000 -0800
++++ server/dhcpd.c 2003-11-05 14:15:32.000000000 -0800
+@@ -602,6 +602,12 @@
+ if (lftest)
+ exit (0);
+
++#if defined (PARANOIA)
++ /* Set proper permissions... */
++ if (lchown (path_dhcpd_db, set_uid, set_gid))
++ log_fatal ("lchown(%s, %d, %d): %m", path_dhcpd_db, (int) set_uid, (int) set_gid);
++#endif /* PARANOIA */
++
+ /* Discover all the network interfaces and initialize them. */
+ discover_interfaces (DISCOVER_SERVER);
+
diff --git a/net-misc/dhcp/files/dhcp-3.0-paranoia.patch b/net-misc/dhcp/files/dhcp-3.0-paranoia.patch
new file mode 100644
index 000000000000..886f5cb5ffe3
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-3.0-paranoia.patch
@@ -0,0 +1,207 @@
+
+paranoia (non-root/chroot) patch for ISC dhcp 3.0
+file to patch: dhcp-3.0/server/dhcpd.c
+
+update from paranoia patch for ISC dhcp 2.0
+
+Adds 3 options:
+
+ -user <user>
+ -group <group>
+ -chroot <chroot_dir>
+
+Notes:
+ -DPARANOIA must be passed as an argument to the --copts option
+ of configure. Otherwise, the paranoia code will not be compiled
+ in. Example: ./configure --copts -DPARANOIA
+
+ The chroot() call has been delayed in order to allow /dev/log to
+ be reopened after the configuration file has been read. This is
+ beneficial for systems on which /dev/log is a unix domain socket.
+ The main side effect is that dhcpd.conf should be placed in /etc,
+ instead of <chroot_dir>/etc.
+
+ If dhcpd is to be run on a sysV-style architecture (or, more
+ generally, if /dev/log is a character device), one may opt to
+ create the <chroot_dir>/dev/log character device and add
+ -DEARLY_CHROOT to the --copts option of configure (in addition to
+ -DPARANOIA). This will perform the chroot() call at the earliest
+ convenience (before reading the configuration file).
+
+ If the -user option is used, the lease and pid file directories
+ should be writable to the server process after it drops
+ privileges.
+
+
+ari edelkind (12/10/2001)
+last modified 12/10/2001
+
+
+--- dhcp-3.0/server/dhcpd.c Thu Jun 21 22:12:58 2001
++++ dhcp-3.0+paranoia/server/dhcpd.c Wed Oct 17 08:23:00 2001
+@@ -56,6 +56,16 @@
+ #include "version.h"
+ #include <omapip/omapip_p.h>
+
++#if defined (PARANOIA)
++# include <sys/types.h>
++# include <unistd.h>
++# include <pwd.h>
++/* get around the ISC declaration of group */
++# define group real_group
++# include <grp.h>
++# undef group
++#endif /* PARANOIA */
++
+ static void usage PROTO ((void));
+
+ TIME cur_time;
+@@ -204,6 +214,22 @@
+ omapi_object_dereference (&listener, MDL);
+ }
+
++#if defined (PARANOIA)
++/* to be used in one of two possible scenarios */
++static void setup_chroot (char *chroot_dir) {
++ if (geteuid())
++ log_fatal ("you must be root to use chroot");
++
++ if (chroot(chroot_dir)) {
++ log_fatal ("chroot(\"%s\"): %m", chroot_dir);
++ }
++ if (chdir ("/")) {
++ /* probably permission denied */
++ log_fatal ("chdir(\"/\"): %m");
++ }
++}
++#endif /* PARANOIA */
++
+ int main (argc, argv, envp)
+ int argc;
+ char **argv, **envp;
+@@ -236,6 +262,14 @@
+ char *traceinfile = (char *)0;
+ char *traceoutfile = (char *)0;
+ #endif
++#if defined (PARANOIA)
++ char *set_user = 0;
++ char *set_group = 0;
++ char *set_chroot = 0;
++
++ uid_t set_uid = 0;
++ gid_t set_gid = 0;
++#endif /* PARANOIA */
+
+ /* Make sure we have stdin, stdout and stderr. */
+ status = open ("/dev/null", O_RDWR);
+@@ -298,6 +332,20 @@
+ if (++i == argc)
+ usage ();
+ server = argv [i];
++#if defined (PARANOIA)
++ } else if (!strcmp (argv [i], "-user")) {
++ if (++i == argc)
++ usage ();
++ set_user = argv [i];
++ } else if (!strcmp (argv [i], "-group")) {
++ if (++i == argc)
++ usage ();
++ set_group = argv [i];
++ } else if (!strcmp (argv [i], "-chroot")) {
++ if (++i == argc)
++ usage ();
++ set_chroot = argv [i];
++#endif /* PARANOIA */
+ } else if (!strcmp (argv [i], "-cf")) {
+ if (++i == argc)
+ usage ();
+@@ -397,6 +445,44 @@
+ trace_seed_stop, MDL);
+ #endif
+
++#if defined (PARANOIA)
++ /* get user and group info if those options were given */
++ if (set_user) {
++ struct passwd *tmp_pwd;
++
++ if (geteuid())
++ log_fatal ("you must be root to set user");
++
++ if (!(tmp_pwd = getpwnam(set_user)))
++ log_fatal ("no such user: %s", set_user);
++
++ set_uid = tmp_pwd->pw_uid;
++
++ /* use the user's group as the default gid */
++ if (!set_group)
++ set_gid = tmp_pwd->pw_gid;
++ }
++
++ if (set_group) {
++/* get around the ISC declaration of group */
++#define group real_group
++ struct group *tmp_grp;
++
++ if (geteuid())
++ log_fatal ("you must be root to set group");
++
++ if (!(tmp_grp = getgrnam(set_group)))
++ log_fatal ("no such group: %s", set_group);
++
++ set_gid = tmp_grp->gr_gid;
++#undef group
++ }
++
++# if defined (EARLY_CHROOT)
++ if (set_chroot) setup_chroot (set_chroot);
++# endif /* EARLY_CHROOT */
++#endif /* PARANOIA */
++
+ /* Default to the DHCP/BOOTP port. */
+ if (!local_port)
+ {
+@@ -500,6 +586,10 @@
+
+ postconf_initialization (quiet);
+
++#if defined (PARANOIA) && !defined (EARLY_CHROOT)
++ if (set_chroot) setup_chroot (set_chroot);
++#endif /* PARANOIA && !EARLY_CHROOT */
++
+ /* test option should cause an early exit */
+ if (cftest && !lftest)
+ exit(0);
+@@ -543,6 +633,22 @@
+ exit (0);
+ }
+
++#if defined (PARANOIA)
++ /* change uid to the specified one */
++
++ if (set_gid) {
++ if (setgroups (0, (void *)0))
++ log_fatal ("setgroups: %m");
++ if (setgid (set_gid))
++ log_fatal ("setgid(%d): %m", (int) set_gid);
++ }
++
++ if (set_uid) {
++ if (setuid (set_uid))
++ log_fatal ("setuid(%d): %m", (int) set_uid);
++ }
++#endif /* PARANOIA */
++
+ /* Read previous pid file. */
+ if ((i = open (path_dhcpd_pid, O_RDONLY)) >= 0) {
+ status = read (i, pbuf, (sizeof pbuf) - 1);
+@@ -888,6 +994,10 @@
+
+ log_fatal ("Usage: dhcpd [-p <UDP port #>] [-d] [-f]%s%s%s%s",
+ "\n [-cf config-file] [-lf lease-file]",
++#if defined (PARANOIA)
++ /* meld into the following string */
++ "\n [-user user] [-group group] [-chroot dir]"
++#endif /* PARANOIA */
+ #if defined (TRACING)
+ "\n [-tf trace-output-file]",
+ "\n [-play trace-input-file]",
diff --git a/net-misc/dhcp/files/dhcp-3.0.3-dhclient-no-down.patch b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-no-down.patch
new file mode 100644
index 000000000000..518efec11c53
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-3.0.3-dhclient-no-down.patch
@@ -0,0 +1,70 @@
+--- client/scripts/linux
++++ client/scripts/linux
+@@ -118,9 +118,9 @@
+ if [ x$reason = xPREINIT ]; then
+ if [ x$alias_ip_address != x ]; then
+ # Bring down alias interface. Its routes will disappear too.
+- ifconfig $interface:0- inet 0
++ ifconfig $interface:0- inet 0.0.0.0
+ fi
+- ifconfig $interface 0 up
++ ifconfig $interface 0.0.0.0 up
+
+ # We need to give the kernel some time to get the interface up.
+ sleep 1
+@@ -145,12 +145,12 @@
+ if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
+ [ x$alias_ip_address != x$old_ip_address ]; then
+ # Possible new alias. Remove old alias.
+- ifconfig $interface:0- inet 0
++ ifconfig $interface:0- inet 0.0.0.0
+ fi
+ if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then
+ # IP address changed. Bringing down the interface will delete all routes,
+ # and clear the ARP cache.
+- ifconfig $interface inet 0 down
++ ifconfig $interface inet 0.0.0.0
+
+ fi
+ if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
+@@ -171,7 +171,7 @@
+ fi
+ if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
+ then
+- ifconfig $interface:0- inet 0
++ ifconfig $interface:0- inet 0.0.0.0
+ ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
+ route add -host $alias_ip_address $interface:0
+ fi
+@@ -183,11 +183,11 @@
+ || [ x$reason = xSTOP ]; then
+ if [ x$alias_ip_address != x ]; then
+ # Turn off alias interface.
+- ifconfig $interface:0- inet 0
++ ifconfig $interface:0- inet 0.0.0.0
+ fi
+ if [ x$old_ip_address != x ]; then
+ # Shut down interface, which will delete routes and clear arp cache.
+- ifconfig $interface inet 0 down
++ ifconfig $interface inet 0.0.0.0
+ fi
+ if [ x$alias_ip_address != x ]; then
+ ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
+@@ -198,7 +198,7 @@
+
+ if [ x$reason = xTIMEOUT ]; then
+ if [ x$alias_ip_address != x ]; then
+- ifconfig $interface:0- inet 0
++ ifconfig $interface:0- inet 0.0.0.0
+ fi
+ ifconfig $interface inet $new_ip_address $new_subnet_arg \
+ $new_broadcast_arg $mtu_arg
+@@ -223,7 +223,7 @@
+ make_resolv_conf
+ exit_with_hooks 0
+ fi
+- ifconfig $interface inet 0 down
++ ifconfig $interface inet 0.0.0.0
+ exit_with_hooks 1
+ fi
+
diff --git a/net-misc/dhcp/files/dhcp-3.1.3-dhclient-no-down.patch b/net-misc/dhcp/files/dhcp-3.1.3-dhclient-no-down.patch
new file mode 100644
index 000000000000..89935df820f9
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-3.1.3-dhclient-no-down.patch
@@ -0,0 +1,77 @@
+diff -Nuar --exclude '*.orig' dhcp-3.1.3.orig//client/scripts/linux dhcp-3.1.3//client/scripts/linux
+--- dhcp-3.1.3.orig//client/scripts/linux 2010-10-15 04:59:15.890664245 +0000
++++ dhcp-3.1.3//client/scripts/linux 2010-10-15 05:04:57.940396350 +0000
+@@ -118,7 +118,7 @@
+ if [ x$reason = xPREINIT ]; then
+ if [ x$alias_ip_address != x ]; then
+ # Bring down alias interface. Its routes will disappear too.
+- ifconfig $interface:0- inet 0
++ ifconfig $interface:0- inet 0.0.0.0
+ fi
+ if [ $relmajor -lt 2 ] || ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] )
+ then
+@@ -127,7 +127,7 @@
+ # Add route to make broadcast work. Do not omit netmask.
+ route add default dev $interface netmask 0.0.0.0
+ else
+- ifconfig $interface 0 up
++ ifconfig $interface 0.0.0.0 up
+ fi
+
+ # We need to give the kernel some time to get the interface up.
+@@ -155,12 +155,12 @@
+ if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
+ [ x$alias_ip_address != x$old_ip_address ]; then
+ # Possible new alias. Remove old alias.
+- ifconfig $interface:0- inet 0
++ ifconfig $interface:0- inet 0.0.0.0
+ fi
+ if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then
+ # IP address changed. Bringing down the interface will delete all routes,
+ # and clear the ARP cache.
+- ifconfig $interface inet 0 down
++ ifconfig $interface inet 0.0.0.0
+
+ fi
+ if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
+@@ -179,7 +179,7 @@
+ fi
+ if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
+ then
+- ifconfig $interface:0- inet 0
++ ifconfig $interface:0- inet 0.0.0.0
+ ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
+ route add -host $alias_ip_address $interface:0
+ fi
+@@ -191,11 +191,11 @@
+ || [ x$reason = xSTOP ]; then
+ if [ x$alias_ip_address != x ]; then
+ # Turn off alias interface.
+- ifconfig $interface:0- inet 0
++ ifconfig $interface:0- inet 0.0.0.0
+ fi
+ if [ x$old_ip_address != x ]; then
+ # Shut down interface, which will delete routes and clear arp cache.
+- ifconfig $interface inet 0 down
++ ifconfig $interface inet 0.0.0.0
+ fi
+ if [ x$alias_ip_address != x ]; then
+ ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
+@@ -206,7 +206,7 @@
+
+ if [ x$reason = xTIMEOUT ]; then
+ if [ x$alias_ip_address != x ]; then
+- ifconfig $interface:0- inet 0
++ ifconfig $interface:0- inet 0.0.0.0
+ fi
+ ifconfig $interface inet $new_ip_address $new_subnet_arg \
+ $new_broadcast_arg $mtu_arg
+@@ -227,7 +227,7 @@
+ make_resolv_conf
+ exit_with_hooks 0
+ fi
+- ifconfig $interface inet 0 down
++ ifconfig $interface inet 0.0.0.0
+ exit_with_hooks 1
+ fi
+
diff --git a/net-misc/dhcp/files/dhcp-4.0-dhclient-ntp.patch b/net-misc/dhcp/files/dhcp-4.0-dhclient-ntp.patch
new file mode 100644
index 000000000000..d3f29714b021
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-4.0-dhclient-ntp.patch
@@ -0,0 +1,216 @@
+diff -uNr dhcp-4.0.0.ORIG/client/clparse.c dhcp-4.0.0/client/clparse.c
+--- dhcp-4.0.0.ORIG/client/clparse.c 2008-09-01 11:38:51.000000000 +0100
++++ dhcp-4.0.0/client/clparse.c 2008-09-01 11:48:17.000000000 +0100
+@@ -37,7 +37,7 @@
+
+ struct client_config top_level_config;
+
+-#define NUM_DEFAULT_REQUESTED_OPTS 9
++#define NUM_DEFAULT_REQUESTED_OPTS 10
+ struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 1];
+
+ static void parse_client_default_duid(struct parse *cfile);
+@@ -98,15 +98,20 @@
+ dhcp_universe.code_hash, &code, 0, MDL);
+
+ /* 8 */
+- code = D6O_NAME_SERVERS;
++ code = DHO_NTP_SERVERS;
+ option_code_hash_lookup(&default_requested_options[7],
+- dhcpv6_universe.code_hash, &code, 0, MDL);
++ dhcp_universe.code_hash, &code, 0, MDL);
+
+ /* 9 */
+- code = D6O_DOMAIN_SEARCH;
++ code = D6O_NAME_SERVERS;
+ option_code_hash_lookup(&default_requested_options[8],
+ dhcpv6_universe.code_hash, &code, 0, MDL);
+
++ /* 10 */
++ code = D6O_DOMAIN_SEARCH;
++ option_code_hash_lookup(&default_requested_options[9],
++ dhcpv6_universe.code_hash, &code, 0, MDL);
++
+ for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) {
+ if (default_requested_options[code] == NULL)
+ log_fatal("Unable to find option definition for "
+diff -uNr dhcp-4.0.0.ORIG/client/scripts/bsdos dhcp-4.0.0/client/scripts/bsdos
+--- dhcp-4.0.0.ORIG/client/scripts/bsdos 2008-09-01 11:38:51.000000000 +0100
++++ dhcp-4.0.0/client/scripts/bsdos 2008-09-01 11:39:30.000000000 +0100
+@@ -29,6 +29,26 @@
+
+ mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
+ fi
++ # If we're making confs, may as well make an ntp.conf too
++ make_ntp_conf
++}
++
++make_ntp_conf() {
++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
++ if [ x$new_ntp_servers != x ]; then
++ conf="# Generated by dhclient for interface $interface\n"
++ conf="${conf}restrict default noquery notrust nomodify\n"
++ conf="${conf}restrict 127.0.0.1\n"
++ for ntpserver in $new_ntp_servers; do
++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
++ conf="${conf}server $ntpserver\n"
++ done
++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
++ conf="${conf}logfile /var/log/ntp.log\n"
++ printf "${conf}" > /etc/ntp.conf
++ chmod 644 /etc/ntp.conf
++ fi
++ fi
+ }
+
+ # Must be used on exit. Invokes the local dhcp client exit hooks, if any.
+diff -uNr dhcp-4.0.0.ORIG/client/scripts/freebsd dhcp-4.0.0/client/scripts/freebsd
+--- dhcp-4.0.0.ORIG/client/scripts/freebsd 2008-09-01 11:38:51.000000000 +0100
++++ dhcp-4.0.0/client/scripts/freebsd 2008-09-01 11:39:30.000000000 +0100
+@@ -73,6 +73,26 @@
+ fi
+ fi
+ fi
++ # If we're making confs, may as well make an ntp.conf too
++ make_ntp_conf
++}
++
++make_ntp_conf() {
++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
++ if [ "x$new_ntp_servers" != x ]; then
++ conf="# Generated by dhclient for interface $interface\n"
++ conf="${conf}restrict default noquery notrust nomodify\n"
++ conf="${conf}restrict 127.0.0.1\n"
++ for ntpserver in $new_ntp_servers; do
++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
++ conf="${conf}server $ntpserver\n"
++ done
++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
++ conf="${conf}logfile /var/log/ntp.log\n"
++ printf "${conf}" > /etc/ntp.conf
++ chmod 644 /etc/ntp.conf
++ fi
++ fi
+ }
+
+ # Must be used on exit. Invokes the local dhcp client exit hooks, if any.
+diff -uNr dhcp-4.0.0.ORIG/client/scripts/linux dhcp-4.0.0/client/scripts/linux
+--- dhcp-4.0.0.ORIG/client/scripts/linux 2008-09-01 11:38:51.000000000 +0100
++++ dhcp-4.0.0/client/scripts/linux 2008-09-01 11:39:30.000000000 +0100
+@@ -55,6 +55,26 @@
+
+ mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
+ fi
++ # If we're making confs, may as well make an ntp.conf too
++ make_ntp_conf
++}
++
++make_ntp_conf() {
++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
++ if [ "x$new_ntp_servers" != x ]; then
++ conf="# Generated by dhclient for interface $interface\n"
++ conf="${conf}restrict default noquery notrust nomodify\n"
++ conf="${conf}restrict 127.0.0.1\n"
++ for ntpserver in $new_ntp_servers; do
++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
++ conf="${conf}server $ntpserver\n"
++ done
++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
++ conf="${conf}logfile /var/log/ntp.log\n"
++ printf "${conf}" > /etc/ntp.conf
++ chmod 644 /etc/ntp.conf
++ fi
++ fi
+ }
+
+ # Must be used on exit. Invokes the local dhcp client exit hooks, if any.
+diff -uNr dhcp-4.0.0.ORIG/client/scripts/netbsd dhcp-4.0.0/client/scripts/netbsd
+--- dhcp-4.0.0.ORIG/client/scripts/netbsd 2008-09-01 11:38:51.000000000 +0100
++++ dhcp-4.0.0/client/scripts/netbsd 2008-09-01 11:39:30.000000000 +0100
+@@ -29,6 +29,26 @@
+
+ mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
+ fi
++ # If we're making confs, may as well make an ntp.conf too
++ make_ntp_conf
++}
++
++make_ntp_conf() {
++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
++ if [ "x$new_ntp_servers" != x ]; then
++ conf="# Generated by dhclient for interface $interface\n"
++ conf="${conf}restrict default noquery notrust nomodify\n"
++ conf="${conf}restrict 127.0.0.1\n"
++ for ntpserver in $new_ntp_servers; do
++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
++ conf="${conf}server $ntpserver\n"
++ done
++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
++ conf="${conf}logfile /var/log/ntp.log\n"
++ printf "${conf}" > /etc/ntp.conf
++ chmod 644 /etc/ntp.conf
++ fi
++ fi
+ }
+
+ # Must be used on exit. Invokes the local dhcp client exit hooks, if any.
+diff -uNr dhcp-4.0.0.ORIG/client/scripts/openbsd dhcp-4.0.0/client/scripts/openbsd
+--- dhcp-4.0.0.ORIG/client/scripts/openbsd 2008-09-01 11:38:51.000000000 +0100
++++ dhcp-4.0.0/client/scripts/openbsd 2008-09-01 11:39:30.000000000 +0100
+@@ -29,6 +29,26 @@
+
+ mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
+ fi
++ # If we're making confs, may as well make an ntp.conf too
++ make_ntp_conf
++}
++
++make_ntp_conf() {
++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
++ if [ "x$new_ntp_servers" != x ]; then
++ conf="# Generated by dhclient for interface $interface\n"
++ conf="${conf}restrict default noquery notrust nomodify\n"
++ conf="${conf}restrict 127.0.0.1\n"
++ for ntpserver in $new_ntp_servers; do
++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
++ conf="${conf}server $ntpserver\n"
++ done
++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
++ conf="${conf}logfile /var/log/ntp.log\n"
++ printf "${conf}" > /etc/ntp.conf
++ chmod 644 /etc/ntp.conf
++ fi
++ fi
+ }
+
+ # Must be used on exit. Invokes the local dhcp client exit hooks, if any.
+diff -uNr dhcp-4.0.0.ORIG/client/scripts/solaris dhcp-4.0.0/client/scripts/solaris
+--- dhcp-4.0.0.ORIG/client/scripts/solaris 2008-09-01 11:38:51.000000000 +0100
++++ dhcp-4.0.0/client/scripts/solaris 2008-09-01 11:39:30.000000000 +0100
+@@ -17,6 +17,26 @@
+
+ mv /etc/resolv.conf.dhclient /etc/resolv.conf
+ fi
++ # If we're making confs, may as well make an ntp.conf too
++ make_ntp_conf
++}
++
++make_ntp_conf() {
++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
++ if [ "x$new_ntp_servers" != x ]; then
++ conf="# Generated by dhclient for interface $interface\n"
++ conf="${conf}restrict default noquery notrust nomodify\n"
++ conf="${conf}restrict 127.0.0.1\n"
++ for ntpserver in $new_ntp_servers; do
++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
++ conf="${conf}server $ntpserver\n"
++ done
++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
++ conf="${conf}logfile /var/log/ntp.log\n"
++ printf "${conf}" > /etc/ntp.conf
++ chmod 644 /etc/ntp.conf
++ fi
++ fi
+ }
+
+ # Must be used on exit. Invokes the local dhcp client exit hooks, if any.
diff --git a/net-misc/dhcp/files/dhcp-4.2.0-errwarn-message.patch b/net-misc/dhcp/files/dhcp-4.2.0-errwarn-message.patch
new file mode 100644
index 000000000000..f882a1345f35
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-4.2.0-errwarn-message.patch
@@ -0,0 +1,31 @@
+ripped from Fedora & tweaked
+
+--- dhcp-4.2.0/omapip/errwarn.c
++++ dhcp-4.2.0/omapip/errwarn.c
+@@ -76,20 +76,13 @@
+
+ #if !defined (NOMINUM)
+ log_error ("%s", "");
+- log_error ("If you did not get this software from ftp.isc.org, please");
+- log_error ("get the latest from ftp.isc.org and install that before");
+- log_error ("requesting help.");
++ log_error ("This version of ISC DHCP is based on the release available");
++ log_error ("on ftp.isc.org. Features have been added and other changes");
++ log_error ("have been made to the base software release in order to make");
++ log_error ("it work better with this distribution.");
+ log_error ("%s", "");
+- log_error ("If you did get this software from ftp.isc.org and have not");
+- log_error ("yet read the README, please read it before requesting help.");
+- log_error ("If you intend to request help from the dhcp-server@isc.org");
+- log_error ("mailing list, please read the section on the README about");
+- log_error ("submitting bug reports and requests for help.");
+- log_error ("%s", "");
+- log_error ("Please do not under any circumstances send requests for");
+- log_error ("help directly to the authors of this software - please");
+- log_error ("send them to the appropriate mailing list as described in");
+- log_error ("the README file.");
++ log_error ("Please report for this software via the Gentoo Bugzilla site:");
++ log_error (" http://bugs.gentoo.org/");
+ log_error ("%s", "");
+ log_error ("exiting.");
+ #endif
diff --git a/net-misc/dhcp/files/dhcp-4.2.2-bind-build-flags.patch b/net-misc/dhcp/files/dhcp-4.2.2-bind-build-flags.patch
new file mode 100644
index 000000000000..ae33638284b8
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-4.2.2-bind-build-flags.patch
@@ -0,0 +1,14 @@
+bind sets up BUILD_XXX vars for building native tools, but then
+doesn't use them for the "gen" tool
+
+--- a/bind/lib/export/dns/Makefile.in
++++ b/bind/lib/export/dns/Makefile.in
+@@ -166,7 +166,7 @@
+ ./gen -s ${srcdir} > code.h
+
+ gen: ${srcdir}/gen.c
+- ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o $@ ${srcdir}/gen.c ${LIBS}
++ ${BUILD_CC} ${BUILD_CFLAGS} ${CINCLUDES} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c ${BUILD_LIBS}
+
+ #We don't need rbtdb64 for this library
+ #rbtdb64.@O@: rbtdb.c
diff --git a/net-misc/dhcp/files/dhcp-4.2.2-bind-disable.patch b/net-misc/dhcp/files/dhcp-4.2.2-bind-disable.patch
new file mode 100644
index 000000000000..4c7810e89b8e
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-4.2.2-bind-disable.patch
@@ -0,0 +1,13 @@
+we take care of building this ourselves in the ebuild so
+build settings are properly respected
+
+--- dhcp-4.2.2/bind/Makefile
++++ dhcp-4.2.2/bind/Makefile
+@@ -29,6 +29,7 @@
+ bindsrcdir=bind-${version}
+
+ all:
++disable:
+ # Extract the source from the tarball, if it hasn't been already.
+ @if test -d ${bindsrcdir} ; then \
+ echo ${bindsrcdir} already unpacked... ; \
diff --git a/net-misc/dhcp/files/dhcp-4.2.2-bind-parallel-build.patch b/net-misc/dhcp/files/dhcp-4.2.2-bind-parallel-build.patch
new file mode 100644
index 000000000000..6136154f65a0
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-4.2.2-bind-parallel-build.patch
@@ -0,0 +1,14 @@
+fix the bind subdir parallel builds
+
+https://bugs.gentoo.org/380717
+
+--- a/bind/lib/export/isc/Makefile.in
++++ b/bind/lib/export/isc/Makefile.in
+@@ -114,6 +114,7 @@
+ -DLIBAGE=${LIBAGE} \
+ -c ${srcdir}/version.c
+
++${OBJS}: | subdirs
+ libisc.@SA@: ${OBJS}
+ ${AR} ${ARFLAGS} $@ ${OBJS}
+ ${RANLIB} $@
diff --git a/net-misc/dhcp/files/dhcp-4.2.2-dhclient-resolvconf.patch b/net-misc/dhcp/files/dhcp-4.2.2-dhclient-resolvconf.patch
new file mode 100644
index 000000000000..28080a848d71
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-4.2.2-dhclient-resolvconf.patch
@@ -0,0 +1,409 @@
+--- a/client/scripts/bsdos
++++ b/client/scripts/bsdos
+@@ -1,40 +1,46 @@
+ #!/bin/sh
+
+ make_resolv_conf() {
++ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then
++ return 0
++ fi
++ local conf=
+ if [ x"$new_domain_name_servers" != x ]; then
+- cat /dev/null > /etc/resolv.conf.dhclient
+ if [ "x$new_domain_search" != x ]; then
+- echo search $new_domain_search >> /etc/resolv.conf.dhclient
++ conf="${conf}search ${new_domain_search}\n"
+ elif [ "x$new_domain_name" != x ]; then
+ # Note that the DHCP 'Domain Name Option' is really just a domain
+ # name, and that this practice of using the domain name option as
+ # a search path is both nonstandard and deprecated.
+- echo search $new_domain_name >> /etc/resolv.conf.dhclient
++ conf="${conf}search ${new_domain_name}\n"
+ fi
+ for nameserver in $new_domain_name_servers; do
+- echo nameserver $nameserver >> /etc/resolv.conf.dhclient
++ conf="${conf}nameserver ${nameserver}\n"
+ done
+-
+- mv /etc/resolv.conf.dhclient /etc/resolv.conf
+ elif [ "x${new_dhcp6_name_servers}" != x ] ; then
+- cat /dev/null > /etc/resolv.conf.dhclient6
+- chmod 644 /etc/resolv.conf.dhclient6
+-
+ if [ "x${new_dhcp6_domain_search}" != x ] ; then
+- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
++ conf="${conf}search ${new_dhcp6_domain_search}\n"
+ fi
+ for nameserver in ${new_dhcp6_name_servers} ; do
+ # If the nameserver has a link-local address
+ # add a <zone_id> (interface name) to it.
+ case $nameserver in
+ fe80:*) zone_id="%$interface";;
+ FE80:*) zone_id="%$interface";;
+ *) zone_id='';;
+ esac
+- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6
++ conf="${conf}nameserver ${nameserver}$zone_id\n"
+ done
++ fi
+
+- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
++ if [ x"$conf" != x ]; then
++ conf="# Generated by dhclient or interface $interface\n${conf}"
++ if type resolvconf >/dev/null 2>&1; then
++ printf "${conf}" | resolvconf -a $interface
++ else
++ printf "${conf}" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
+ fi
+ }
+
+--- a/client/scripts/freebsd
++++ b/client/scripts/freebsd
+@@ -11,73 +11,45 @@
+ fi
+
+ make_resolv_conf() {
++ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then
++ return 0
++ fi
++ local conf=
+ if [ x"$new_domain_name_servers" != x ]; then
+- ( cat /dev/null > /etc/resolv.conf.dhclient )
+- exit_status=$?
+- if [ $exit_status -ne 0 ]; then
+- $LOGGER "Unable to create /etc/resolv.conf.dhclient: Error $exit_status"
+- else
+- if [ "x$new_domain_search" != x ]; then
+- ( echo search $new_domain_search >> /etc/resolv.conf.dhclient )
+- exit_status=$?
+- elif [ "x$new_domain_name" != x ]; then
+- # Note that the DHCP 'Domain Name Option' is really just a domain
+- # name, and that this practice of using the domain name option as
+- # a search path is both nonstandard and deprecated.
+- ( echo search $new_domain_name >> /etc/resolv.conf.dhclient )
+- exit_status=$?
+- fi
+- for nameserver in $new_domain_name_servers; do
+- if [ $exit_status -ne 0 ]; then
+- break
+- fi
+- ( echo nameserver $nameserver >>/etc/resolv.conf.dhclient )
+- exit_status=$?
+- done
+-
+- # If there were no errors, attempt to mv the new file into place.
+- if [ $exit_status -eq 0 ]; then
+- ( mv /etc/resolv.conf.dhclient /etc/resolv.conf )
+- exit_status=$?
+- fi
+-
+- if [ $exit_status -ne 0 ]; then
+- $LOGGER "Error while writing new /etc/resolv.conf."
+- fi
++ if [ "x$new_domain_search" != x ]; then
++ conf="${conf}search ${new_domain_search}\n"
++ elif [ "x$new_domain_name" != x ]; then
++ # Note that the DHCP 'Domain Name Option' is really just a domain
++ # name, and that this practice of using the domain name option as
++ # a search path is both nonstandard and deprecated.
++ conf="${conf}search ${new_domain_name}\n"
+ fi
++ for nameserver in $new_domain_name_servers; do
++ conf="${conf}nameserver ${nameserver}\n"
++ done
+ elif [ "x${new_dhcp6_name_servers}" != x ] ; then
+- ( cat /dev/null > /etc/resolv.conf.dhclient6 )
+- exit_status=$?
+- if [ $exit_status -ne 0 ] ; then
+- $LOGGER "Unable to create /etc/resolv.conf.dhclient6: Error $exit_status"
+- else
+- if [ "x${new_dhcp6_domain_search}" != x ] ; then
+- ( echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 )
+- exit_status=$?
+- fi
+- for nameserver in ${new_dhcp6_name_servers} ; do
+- if [ $exit_status -ne 0 ] ; then
+- break
+- fi
+ # If the nameserver has a link-local address
+ # add a <zone_id> (interface name) to it.
+ case $nameserver in
+ fe80:*) zone_id="%$interface";;
+ FE80:*) zone_id="%$interface";;
+ *) zone_id='';;
+ esac
+- ( echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6 )
+- exit_status=$?
+- done
+-
+- if [ $exit_status -eq 0 ] ; then
+- ( mv /etc/resolv.conf.dhclient6 /etc/resolv.conf )
+- exit_status=$?
+- fi
++ if [ "x${new_dhcp6_domain_search}" != x ] ; then
++ conf="${conf}search ${new_dhcp6_domain_search}\n"
++ fi
++ for nameserver in ${new_dhcp6_name_servers} ; do
++ conf="${conf}nameserver ${nameserver}$zone_id\n"
++ done
++ fi
+
+- if [ $exit_status -ne 0 ] ; then
+- $LOGGER "Error while writing new /etc/resolv.conf."
+- fi
++ if [ x"$conf" != x ]; then
++ conf="# Generated by dhclient or interface $interface\n${conf}"
++ if type resolvconf >/dev/null 2>&1; then
++ printf "${conf}" | resolvconf -a $interface
++ else
++ printf "${conf}" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
+ fi
+ fi
+ }
+--- a/client/scripts/linux
++++ b/client/scripts/linux
+@@ -26,44 +26,49 @@
+ ip=/sbin/ip
+
+ make_resolv_conf() {
++ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then
++ return 0
++ fi
++ local conf=
+ if [ x"$new_domain_name_servers" != x ]; then
+- cat /dev/null > /etc/resolv.conf.dhclient
+- chmod 644 /etc/resolv.conf.dhclient
+- if [ x"$new_domain_search" != x ]; then
+- echo search $new_domain_search >> /etc/resolv.conf.dhclient
+- elif [ x"$new_domain_name" != x ]; then
++ if [ "x$new_domain_search" != x ]; then
++ conf="${conf}search ${new_domain_search}\n"
++ elif [ "x$new_domain_name" != x ]; then
+ # Note that the DHCP 'Domain Name Option' is really just a domain
+ # name, and that this practice of using the domain name option as
+ # a search path is both nonstandard and deprecated.
+- echo search $new_domain_name >> /etc/resolv.conf.dhclient
++ conf="${conf}search ${new_domain_name}\n"
+ fi
+ for nameserver in $new_domain_name_servers; do
+- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
++ conf="${conf}nameserver ${nameserver}\n"
+ done
+-
+- mv /etc/resolv.conf.dhclient /etc/resolv.conf
+ elif [ "x${new_dhcp6_name_servers}" != x ] ; then
+- cat /dev/null > /etc/resolv.conf.dhclient6
+- chmod 644 /etc/resolv.conf.dhclient6
+-
+ if [ "x${new_dhcp6_domain_search}" != x ] ; then
+- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
++ conf="${conf}search ${new_dhcp6_domain_search}\n"
+ fi
+ shopt -s nocasematch
+ for nameserver in ${new_dhcp6_name_servers} ; do
+ # If the nameserver has a link-local address
+ # add a <zone_id> (interface name) to it.
+ if [[ "$nameserver" =~ ^fe80:: ]]
+ then
+ zone_id="%$interface"
+ else
+ zone_id=
+ fi
+- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6
++ conf="${conf}nameserver ${nameserver}$zone_id\n"
+ done
+ shopt -u nocasematch
++ fi
+
+- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
++ if [ x"$conf" != x ]; then
++ conf="# Generated by dhclient or interface $interface\n${conf}"
++ if type resolvconf >/dev/null 2>&1; then
++ printf "${conf}" | resolvconf -a $interface
++ else
++ printf "${conf}" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
+ fi
+ }
+
+--- a/client/scripts/netbsd
++++ b/client/scripts/netbsd
+@@ -1,40 +1,46 @@
+ #!/bin/sh
+
+ make_resolv_conf() {
+- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
+- cat /dev/null > /etc/resolv.conf.dhclient
+- if [ "x$new_domain_search" != x ]; then
+- echo search $new_domain_search >> /etc/resolv.conf.dhclient
+- elif [ "x$new_domain_name" != x ]; then
++ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then
++ return 0
++ fi
++ local conf=
++ if [ x"$new_domain_name_servers" != x ]; then
++ if [ "x$new_domain_search" != x ]; then
++ conf="${conf}search ${new_domain_search}\n"
++ elif [ "x$new_domain_name" != x ]; then
+ # Note that the DHCP 'Domain Name Option' is really just a domain
+ # name, and that this practice of using the domain name option as
+ # a search path is both nonstandard and deprecated.
+- echo search $new_domain_name >> /etc/resolv.conf.dhclient
++ conf="${conf}search ${new_domain_name}\n"
+ fi
+ for nameserver in $new_domain_name_servers; do
+- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
++ conf="${conf}nameserver ${nameserver}\n"
+ done
+-
+- mv /etc/resolv.conf.dhclient /etc/resolv.conf
+ elif [ "x${new_dhcp6_name_servers}" != x ] ; then
+- cat /dev/null > /etc/resolv.conf.dhclient6
+- chmod 644 /etc/resolv.conf.dhclient6
+-
+ if [ "x${new_dhcp6_domain_search}" != x ] ; then
+- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
++ conf="${conf}search ${new_dhcp6_domain_search}\n"
+ fi
+ for nameserver in ${new_dhcp6_name_servers} ; do
+ # If the nameserver has a link-local address
+ # add a <zone_id> (interface name) to it.
+ case $nameserver in
+ fe80:*) zone_id="%$interface";;
+ FE80:*) zone_id="%$interface";;
+ *) zone_id='';;
+ esac
+- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6
++ conf="${conf}nameserver ${nameserver}$zone_id\n"
+ done
++ fi
+
+- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
++ if [ x"$conf" != x ]; then
++ conf="# Generated by dhclient or interface $interface\n${conf}"
++ if type resolvconf >/dev/null 2>&1; then
++ printf "${conf}" | resolvconf -a $interface
++ else
++ printf "${conf}" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
+ fi
+ }
+
+--- a/client/scripts/openbsd
++++ b/client/scripts/openbsd
+@@ -1,40 +1,46 @@
+ #!/bin/sh
+
+ make_resolv_conf() {
+- if [ x"$new_domain_name_servers" != x ]; then
+- cat /dev/null > /etc/resolv.conf.dhclient
+- if [ x"$new_domain_search" != x ]; then
+- echo search $new_domain_search >> /etc/resolv.conf.dhclient
+- elif [ x"$new_domain_name" != x ]; then
++ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then
++ return 0
++ fi
++ local conf=
++ if [ x"$new_domain_name_servers" != x ]; then
++ if [ "x$new_domain_search" != x ]; then
++ conf="${conf}search ${new_domain_search}\n"
++ elif [ "x$new_domain_name" != x ]; then
+ # Note that the DHCP 'Domain Name Option' is really just a domain
+ # name, and that this practice of using the domain name option as
+ # a search path is both nonstandard and deprecated.
+- echo search $new_domain_name >> /etc/resolv.conf.dhclient
++ conf="${conf}search ${new_domain_name}\n"
+ fi
+ for nameserver in $new_domain_name_servers; do
+- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
++ conf="${conf}nameserver ${nameserver}\n"
+ done
+-
+- mv /etc/resolv.conf.dhclient /etc/resolv.conf
+ elif [ "x${new_dhcp6_name_servers}" != x ] ; then
+- cat /dev/null > /etc/resolv.conf.dhclient6
+- chmod 644 /etc/resolv.conf.dhclient6
+-
+ if [ "x${new_dhcp6_domain_search}" != x ] ; then
+- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
++ conf="${conf}search ${new_dhcp6_domain_search}\n"
+ fi
+ for nameserver in ${new_dhcp6_name_servers} ; do
+ # If the nameserver has a link-local address
+ # add a <zone_id> (interface name) to it.
+ case $nameserver in
+ fe80:*) zone_id="%$interface";;
+ FE80:*) zone_id="%$interface";;
+ *) zone_id='';;
+ esac
+- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6
++ conf="${conf}nameserver ${nameserver}$zone_id\n"
+ done
++ fi
+
+- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
++ if [ x"$conf" != x ]; then
++ conf="# Generated by dhclient or interface $interface\n${conf}"
++ if type resolvconf >/dev/null 2>&1; then
++ printf "${conf}" | resolvconf -a $interface
++ else
++ printf "${conf}" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
+ fi
+ }
+
+--- a/client/scripts/solaris
++++ b/client/scripts/solaris
+@@ -1,21 +1,39 @@
+ #!/bin/sh
+
+ make_resolv_conf() {
++ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then
++ return 0
++ fi
++ local conf=
+ if [ x"$new_domain_name_servers" != x ]; then
+- cat /dev/null > /etc/resolv.conf.dhclient
+- if [ x"$new_domain_search" != x ]; then
+- echo search $new_domain_search >> /etc/resolv.conf.dhclient
+- elif [ x"$new_domain_name" != x ]; then
++ if [ "x$new_domain_search" != x ]; then
++ conf="${conf}search ${new_domain_search}\n"
++ elif [ "x$new_domain_name" != x ]; then
+ # Note that the DHCP 'Domain Name Option' is really just a domain
+ # name, and that this practice of using the domain name option as
+ # a search path is both nonstandard and deprecated.
+- echo search $new_domain_name >> /etc/resolv.conf.dhclient
++ conf="${conf}search ${new_domain_name}\n"
+ fi
+ for nameserver in $new_domain_name_servers; do
+- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
++ conf="${conf}nameserver ${nameserver}\n"
++ done
++ elif [ "x${new_dhcp6_name_servers}" != x ] ; then
++ if [ "x${new_dhcp6_domain_search}" != x ] ; then
++ conf="${conf}search ${new_dhcp6_domain_search}\n"
++ fi
++ for nameserver in ${new_dhcp6_name_servers} ; do
++ conf="${conf}nameserver ${nameserver}\n"
+ done
++ fi
+
+- mv /etc/resolv.conf.dhclient /etc/resolv.conf
++ if [ x"$conf" != x ]; then
++ conf="# Generated by dhclient or interface $interface\n${conf}"
++ if type resolvconf >/dev/null 2>&1; then
++ printf "${conf}" | resolvconf -a $interface
++ else
++ printf "${conf}" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
+ fi
+ }
+
diff --git a/net-misc/dhcp/files/dhcp-4.2.2-dhclient-stdin-conf.patch b/net-misc/dhcp/files/dhcp-4.2.2-dhclient-stdin-conf.patch
new file mode 100644
index 000000000000..bf5a54c32153
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-4.2.2-dhclient-stdin-conf.patch
@@ -0,0 +1,113 @@
+--- dhcp-4.2.2/client/clparse.c
++++ dhcp-4.2.2/client/clparse.c
+@@ -182,6 +182,10 @@ isc_result_t read_client_conf ()
+ #endif
+ }
+
++ /* Read any extra configuration from stdin */
++ extern int read_client_conf_stdin (struct interface_info *ip, struct client_config *client);
++ read_client_conf_stdin (NULL, &top_level_config);
++
+ /* Set up state and config structures for clients that don't
+ have per-interface configuration statements. */
+ config = (struct client_config *)0;
+@@ -211,23 +215,13 @@ isc_result_t read_client_conf ()
+ return status;
+ }
+
+-int read_client_conf_file (const char *name, struct interface_info *ip,
++int read_client_conf_actual (struct parse *cfile, struct interface_info *ip,
+ struct client_config *client)
+ {
+- int file;
+- struct parse *cfile;
+ const char *val;
+ int token;
+ isc_result_t status;
+
+- if ((file = open (name, O_RDONLY)) < 0)
+- return uerr2isc (errno);
+-
+- cfile = NULL;
+- status = new_parse(&cfile, file, NULL, 0, path_dhclient_conf, 0);
+- if (status != ISC_R_SUCCESS || cfile == NULL)
+- return status;
+-
+ do {
+ token = peek_token (&val, (unsigned *)0, cfile);
+ if (token == END_OF_FILE)
+@@ -238,10 +232,74 @@ int read_client_conf_file (const char *name, struct interface_info *ip,
+ status = (cfile -> warnings_occurred
+ ? DHCP_R_BADPARSE
+ : ISC_R_SUCCESS);
++ return status;
++}
++
++int read_client_conf_file (const char *name, struct interface_info *ip,
++ struct client_config *client)
++{
++ int file;
++ struct parse *cfile;
++ isc_result_t status;
++
++ if ((file = open (name, O_RDONLY)) < 0)
++ return uerr2isc (errno);
++
++ cfile = (struct parse *)0;
++ new_parse (&cfile, file, (char *)0, 0, path_dhclient_conf, 0);
++ status = read_client_conf_actual(cfile, ip, client);
+ end_parse (&cfile);
+ return status;
+ }
+
++int read_client_conf_stdin (struct interface_info *ip,
++ struct client_config *client)
++{
++ int file;
++ char *buffer = NULL, *p;
++ unsigned buflen, len = 0;
++ struct parse *cfile;
++ size_t bytes;
++ isc_result_t status;
++
++ file = fileno(stdin);
++ if (isatty (file))
++ return ISC_R_NOTFOUND;
++ if (fcntl (file, F_SETFL, O_NONBLOCK) < 0)
++ log_fatal ("could not set stdin to non blocking!");
++
++ buflen = BUFSIZ;
++ buffer = malloc (BUFSIZ + 1);
++ p = buffer;
++ do {
++ bytes = read (file, p, BUFSIZ);
++ if (bytes == 0)
++ break;
++ if (bytes == -1)
++ log_fatal ("failed to read stdin!");
++ if (bytes >= BUFSIZ) {
++ buflen += BUFSIZ;
++ len += BUFSIZ;
++ buffer = realloc (buffer, buflen + 1);
++ if (!buffer)
++ log_fatal ("not enough buffer to read stdin!");
++ p = buffer + len;
++ } else {
++ len += bytes;
++ break;
++ }
++ } while(1);
++ buffer[len] = '\0';
++
++ cfile = (struct parse *)0;
++ status = new_parse (&cfile, -1, buffer, len, "stdin", 0);
++ if (status == ISC_R_SUCCESS) {
++ status = read_client_conf_actual (cfile, ip, client);
++ end_parse (&cfile);
++ }
++ free(buffer);
++ return status;
++}
+
+ /* lease-file :== client-lease-statements END_OF_FILE
+ client-lease-statements :== <nil>
diff --git a/net-misc/dhcp/files/dhcp-4.2.2-nogateway.patch b/net-misc/dhcp/files/dhcp-4.2.2-nogateway.patch
new file mode 100644
index 000000000000..27fb2b0e6025
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-4.2.2-nogateway.patch
@@ -0,0 +1,46 @@
+http://bugs.gentoo.org/265531
+
+--- dhcp-4.2.2/client/scripts/linux
++++ dhcp-4.2.2/client/scripts/linux
+@@ -193,12 +193,14 @@
+ ifconfig $interface inet $new_ip_address $new_subnet_arg \
+ $new_broadcast_arg $mtu_arg
+ # Add a network route to the computed network address.
+- for router in $new_routers; do
+- if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
+- route add -host $router dev $interface
+- fi
+- route add default gw $router $metric_arg dev $interface
+- done
++ if [ x$PEER_ROUTERS = x ] || [ x$PEER_ROUTERS = xyes ]; then
++ for router in $new_routers; do
++ if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
++ route add -host $router dev $interface
++ fi
++ route add default gw $router $metric_arg dev $interface
++ done
++ fi
+ else
+ # we haven't changed the address, have we changed other options
+ # that we wish to update?
+@@ -244,12 +246,14 @@
+ ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
+ route add -host $alias_ip_address dev $interface:0
+ fi
+- for router in $new_routers; do
+- if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
+- route add -host $router dev $interface
+- fi
+- route add default gw $router $metric_arg dev $interface
+- done
++ if [ x$PEER_ROUTERS = x ] || [ x$PEER_ROUTERS = xyes ]; then
++ for router in $new_routers; do
++ if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
++ route add -host $router dev $interface
++ fi
++ route add default gw $router $metric_arg dev $interface
++ done
++ fi
+ make_resolv_conf
+ exit_with_hooks 0
+ fi
diff --git a/net-misc/dhcp/files/dhcp-4.2.4-always-accept-4.patch b/net-misc/dhcp/files/dhcp-4.2.4-always-accept-4.patch
new file mode 100644
index 000000000000..6cec86c9d9c4
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-4.2.4-always-accept-4.patch
@@ -0,0 +1,29 @@
+https://bugs.gentoo.org/437108
+
+always accept the -4 option even if we don't have IPv6 support enabled.
+the relay code does this already.
+
+--- a/client/dhclient.c
++++ b/client/dhclient.c
+@@ -170,8 +170,8 @@ main(int argc, char **argv) {
+ if (!strcmp(argv[i], "-r")) {
+ release_mode = 1;
+ no_daemon = 1;
+-#ifdef DHCPv6
+ } else if (!strcmp(argv[i], "-4")) {
++#ifdef DHCPv6
+ if (local_family_set && local_family != AF_INET)
+ log_fatal("Client can only do v4 or v6, not "
+ "both.");
+--- a/server/dhcpd.c
++++ b/server/dhcpd.c
+@@ -373,8 +373,8 @@ main(int argc, char **argv) {
+ } else if (!strcmp (argv [i], "-q")) {
+ quiet = 1;
+ quiet_interface_discovery = 1;
+-#ifdef DHCPv6
+ } else if (!strcmp(argv[i], "-4")) {
++#ifdef DHCPv6
+ if (local_family_set && (local_family != AF_INET)) {
+ log_fatal("Server cannot run in both IPv4 and "
+ "IPv6 mode at the same time.");
diff --git a/net-misc/dhcp/files/dhcp-4.2.4-quieter-ping.patch b/net-misc/dhcp/files/dhcp-4.2.4-quieter-ping.patch
new file mode 100644
index 000000000000..66a1fcd79461
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-4.2.4-quieter-ping.patch
@@ -0,0 +1,72 @@
+https://bugs.gentoo.org/296921
+
+`ping -q` will still print out summary information. send that to /dev/null.
+
+patch by Martin Mokrejš
+
+--- a/client/scripts/bsdos
++++ b/client/scripts/bsdos
+@@ -251,7 +251,7 @@ if [ x$reason = xTIMEOUT ]; then
+ sleep 1
+ if [ "$new_routers" != "" ]; then
+ set $new_routers
+- if ping -q -c 1 -w 1 $1; then
++ if ping -q -c 1 -w 1 $1 >/dev/null; then
+ if [ x$new_ip_address != x$alias_ip_address ] && \
+ [ x$alias_ip_address != x ]; then
+ ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
+--- a/client/scripts/freebsd
++++ b/client/scripts/freebsd
+@@ -284,7 +284,7 @@ if [ x$reason = xTIMEOUT ]; then
+ if [ -n "$new_routers" ]; then
+ $LOGGER "New Routers: $new_routers"
+ set -- $new_routers
+- if ping -q -c 1 $1; then
++ if ping -q -c 1 $1 >/dev/null; then
+ if [ x$new_ip_address != x$alias_ip_address ] && \
+ [ x$alias_ip_address != x ]; then
+ ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
+--- a/client/scripts/linux
++++ b/client/scripts/linux
+@@ -253,7 +253,7 @@ if [ x$reason = xTIMEOUT ]; then
+ ifconfig $interface inet $new_ip_address $new_subnet_arg \
+ $new_broadcast_arg $mtu_arg
+ set $new_routers
+- if ping -q -c 1 $1; then
++ if ping -q -c 1 $1 >/dev/null; then
+ if [ x$new_ip_address != x$alias_ip_address ] && \
+ [ x$alias_ip_address != x ]; then
+ ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
+--- a/client/scripts/netbsd
++++ b/client/scripts/netbsd
+@@ -251,7 +251,7 @@ if [ x$reason = xTIMEOUT ]; then
+ sleep 1
+ if [ "$new_routers" != "" ]; then
+ set $new_routers
+- if ping -q -c 1 -w 1 $1; then
++ if ping -q -c 1 -w 1 $1 >/dev/null; then
+ if [ x$new_ip_address != x$alias_ip_address ] && \
+ [ x$alias_ip_address != x ]; then
+ ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
+--- a/client/scripts/openbsd
++++ b/client/scripts/openbsd
+@@ -245,7 +245,7 @@ if [ x$reason = xTIMEOUT ]; then
+ sleep 1
+ if [ "$new_routers" != "" ]; then
+ set $new_routers
+- if ping -q -c 1 -w 1 $1; then
++ if ping -q -c 1 -w 1 $1 >/dev/null; then
+ if [ x$new_ip_address != x$alias_ip_address ] && \
+ [ x$alias_ip_address != x ]; then
+ ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
+--- a/client/scripts/openwrt
++++ b/client/scripts/openwrt
+@@ -186,7 +186,7 @@ if [ x$reason = xTIMEOUT ]; then
+ ifconfig $interface $new_ip_address $new_subnet_arg \
+ $new_broadcast_arg $mtu_arg $metric_arg
+ set $new_routers
+- if ping -q -c 1 $1; then
++ if ping -q -c 1 $1 >/dev/null; then
+ if [ x$new_ip_address != x$alias_ip_address ] && \
+ [ x$alias_ip_address != x ]; then
+ ifconfig $interface:0 $alias_ip_address $alias_subnet_arg
diff --git a/net-misc/dhcp/files/dhcp-4.2.5-bindtodevice-inet6.patch b/net-misc/dhcp/files/dhcp-4.2.5-bindtodevice-inet6.patch
new file mode 100644
index 000000000000..77254c32e2b0
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-4.2.5-bindtodevice-inet6.patch
@@ -0,0 +1,19 @@
+https://bugs.gentoo.org/471142
+
+snipped from fedora
+
+# dhclient -6: bind socket to interface (#1001742)
+# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #34784])
+
+diff -up dhcp-4.2.5/common/socket.c.bindtodevice_inet6 dhcp-4.2.5/common/socket.c
+--- dhcp-4.2.5/common/socket.c.bindtodevice_inet6 2013-09-17 16:47:05.000000000 +0200
++++ dhcp-4.2.5/common/socket.c 2013-09-17 16:48:18.975997842 +0200
+@@ -245,7 +245,7 @@ if_register_socket(struct interface_info
+
+ #if defined(SO_BINDTODEVICE)
+ /* Bind this socket to this interface. */
+- if ((local_family != AF_INET6) && (info->ifp != NULL) &&
++ if (((do_multicast == 0)||(*do_multicast == 0)) && (info->ifp != NULL) &&
+ setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE,
+ (char *)(info -> ifp), sizeof(*(info -> ifp))) < 0) {
+ log_fatal("setsockopt: SO_BINDTODEVICE: %m");
diff --git a/net-misc/dhcp/files/dhcp-4.2.5-iproute2-path.patch b/net-misc/dhcp/files/dhcp-4.2.5-iproute2-path.patch
new file mode 100644
index 000000000000..ea223ed38b6e
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-4.2.5-iproute2-path.patch
@@ -0,0 +1,15 @@
+find `ip` via $PATH and not hardcoded path
+
+https://bugs.gentoo.org/480636
+
+--- a/client/scripts/linux
++++ b/client/scripts/linux
+@@ -23,7 +23,7 @@
+ # of the $1 in its args.
+
+ # 'ip' just looks too weird. /sbin/ip looks less weird.
+-ip=/sbin/ip
++ip=ip
+
+ make_resolv_conf() {
+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then
diff --git a/net-misc/dhcp/files/dhcp-4.3.1-dhclient-resolvconf.patch b/net-misc/dhcp/files/dhcp-4.3.1-dhclient-resolvconf.patch
new file mode 100644
index 000000000000..71d3f2c69dc5
--- /dev/null
+++ b/net-misc/dhcp/files/dhcp-4.3.1-dhclient-resolvconf.patch
@@ -0,0 +1,411 @@
+resolvconf support in dhclient-script
+
+--- a/client/scripts/bsdos
++++ b/client/scripts/bsdos
+@@ -1,40 +1,46 @@
+ #!/bin/sh
+
+ make_resolv_conf() {
++ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then
++ return 0
++ fi
++ local conf=
+ if [ x"$new_domain_name_servers" != x ]; then
+- cat /dev/null > /etc/resolv.conf.dhclient
+ if [ "x$new_domain_search" != x ]; then
+- echo search $new_domain_search >> /etc/resolv.conf.dhclient
++ conf="${conf}search ${new_domain_search}\n"
+ elif [ "x$new_domain_name" != x ]; then
+ # Note that the DHCP 'Domain Name Option' is really just a domain
+ # name, and that this practice of using the domain name option as
+ # a search path is both nonstandard and deprecated.
+- echo search $new_domain_name >> /etc/resolv.conf.dhclient
++ conf="${conf}search ${new_domain_name}\n"
+ fi
+ for nameserver in $new_domain_name_servers; do
+- echo nameserver $nameserver >> /etc/resolv.conf.dhclient
++ conf="${conf}nameserver ${nameserver}\n"
+ done
+-
+- mv /etc/resolv.conf.dhclient /etc/resolv.conf
+ elif [ "x${new_dhcp6_name_servers}" != x ] ; then
+- cat /dev/null > /etc/resolv.conf.dhclient6
+- chmod 644 /etc/resolv.conf.dhclient6
+-
+ if [ "x${new_dhcp6_domain_search}" != x ] ; then
+- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
++ conf="${conf}search ${new_dhcp6_domain_search}\n"
+ fi
+ for nameserver in ${new_dhcp6_name_servers} ; do
+ # If the nameserver has a link-local address
+ # add a <zone_id> (interface name) to it.
+ case $nameserver in
+ fe80:*) zone_id="%$interface";;
+ FE80:*) zone_id="%$interface";;
+ *) zone_id="";;
+ esac
+- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6
++ conf="${conf}nameserver ${nameserver}$zone_id\n"
+ done
++ fi
+
+- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
++ if [ x"$conf" != x ]; then
++ conf="# Generated by dhclient or interface $interface\n${conf}"
++ if type resolvconf >/dev/null 2>&1; then
++ printf "${conf}" | resolvconf -a $interface
++ else
++ printf "${conf}" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
+ fi
+ }
+
+--- a/client/scripts/freebsd
++++ b/client/scripts/freebsd
+@@ -11,73 +11,45 @@
+ fi
+
+ make_resolv_conf() {
++ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then
++ return 0
++ fi
++ local conf=
+ if [ x"$new_domain_name_servers" != x ]; then
+- ( cat /dev/null > /etc/resolv.conf.dhclient )
+- exit_status=$?
+- if [ $exit_status -ne 0 ]; then
+- $LOGGER "Unable to create /etc/resolv.conf.dhclient: Error $exit_status"
+- else
+- if [ "x$new_domain_search" != x ]; then
+- ( echo search $new_domain_search >> /etc/resolv.conf.dhclient )
+- exit_status=$?
+- elif [ "x$new_domain_name" != x ]; then
+- # Note that the DHCP 'Domain Name Option' is really just a domain
+- # name, and that this practice of using the domain name option as
+- # a search path is both nonstandard and deprecated.
+- ( echo search $new_domain_name >> /etc/resolv.conf.dhclient )
+- exit_status=$?
+- fi
+- for nameserver in $new_domain_name_servers; do
+- if [ $exit_status -ne 0 ]; then
+- break
+- fi
+- ( echo nameserver $nameserver >>/etc/resolv.conf.dhclient )
+- exit_status=$?
+- done
+-
+- # If there were no errors, attempt to mv the new file into place.
+- if [ $exit_status -eq 0 ]; then
+- ( mv /etc/resolv.conf.dhclient /etc/resolv.conf )
+- exit_status=$?
+- fi
+-
+- if [ $exit_status -ne 0 ]; then
+- $LOGGER "Error while writing new /etc/resolv.conf."
+- fi
++ if [ "x$new_domain_search" != x ]; then
++ conf="${conf}search ${new_domain_search}\n"
++ elif [ "x$new_domain_name" != x ]; then
++ # Note that the DHCP 'Domain Name Option' is really just a domain
++ # name, and that this practice of using the domain name option as
++ # a search path is both nonstandard and deprecated.
++ conf="${conf}search ${new_domain_name}\n"
+ fi
++ for nameserver in $new_domain_name_servers; do
++ conf="${conf}nameserver ${nameserver}\n"
++ done
+ elif [ "x${new_dhcp6_name_servers}" != x ] ; then
+- ( cat /dev/null > /etc/resolv.conf.dhclient6 )
+- exit_status=$?
+- if [ $exit_status -ne 0 ] ; then
+- $LOGGER "Unable to create /etc/resolv.conf.dhclient6: Error $exit_status"
+- else
+- if [ "x${new_dhcp6_domain_search}" != x ] ; then
+- ( echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 )
+- exit_status=$?
+- fi
+- for nameserver in ${new_dhcp6_name_servers} ; do
+- if [ $exit_status -ne 0 ] ; then
+- break
+- fi
+ # If the nameserver has a link-local address
+ # add a <zone_id> (interface name) to it.
+ case $nameserver in
+ fe80:*) zone_id="%$interface";;
+ FE80:*) zone_id="%$interface";;
+ *) zone_id="";;
+ esac
+- ( echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6 )
+- exit_status=$?
+- done
+-
+- if [ $exit_status -eq 0 ] ; then
+- ( mv /etc/resolv.conf.dhclient6 /etc/resolv.conf )
+- exit_status=$?
+- fi
++ if [ "x${new_dhcp6_domain_search}" != x ] ; then
++ conf="${conf}search ${new_dhcp6_domain_search}\n"
++ fi
++ for nameserver in ${new_dhcp6_name_servers} ; do
++ conf="${conf}nameserver ${nameserver}$zone_id\n"
++ done
++ fi
+
+- if [ $exit_status -ne 0 ] ; then
+- $LOGGER "Error while writing new /etc/resolv.conf."
+- fi
++ if [ x"$conf" != x ]; then
++ conf="# Generated by dhclient or interface $interface\n${conf}"
++ if type resolvconf >/dev/null 2>&1; then
++ printf "${conf}" | resolvconf -a $interface
++ else
++ printf "${conf}" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
+ fi
+ fi
+ }
+--- a/client/scripts/linux
++++ b/client/scripts/linux
+@@ -26,44 +26,49 @@
+ ip=/sbin/ip
+
+ make_resolv_conf() {
++ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then
++ return 0
++ fi
++ local conf=
+ if [ x"$new_domain_name_servers" != x ]; then
+- cat /dev/null > /etc/resolv.conf.dhclient
+- chmod 644 /etc/resolv.conf.dhclient
+- if [ x"$new_domain_search" != x ]; then
+- echo search $new_domain_search >> /etc/resolv.conf.dhclient
+- elif [ x"$new_domain_name" != x ]; then
++ if [ "x$new_domain_search" != x ]; then
++ conf="${conf}search ${new_domain_search}\n"
++ elif [ "x$new_domain_name" != x ]; then
+ # Note that the DHCP 'Domain Name Option' is really just a domain
+ # name, and that this practice of using the domain name option as
+ # a search path is both nonstandard and deprecated.
+- echo search $new_domain_name >> /etc/resolv.conf.dhclient
++ conf="${conf}search ${new_domain_name}\n"
+ fi
+ for nameserver in $new_domain_name_servers; do
+- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
++ conf="${conf}nameserver ${nameserver}\n"
+ done
+-
+- mv /etc/resolv.conf.dhclient /etc/resolv.conf
+ elif [ "x${new_dhcp6_name_servers}" != x ] ; then
+- cat /dev/null > /etc/resolv.conf.dhclient6
+- chmod 644 /etc/resolv.conf.dhclient6
+-
+ if [ "x${new_dhcp6_domain_search}" != x ] ; then
+- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
++ conf="${conf}search ${new_dhcp6_domain_search}\n"
+ fi
+ shopt -s nocasematch
+ for nameserver in ${new_dhcp6_name_servers} ; do
+ # If the nameserver has a link-local address
+ # add a <zone_id> (interface name) to it.
+ if [[ "$nameserver" =~ ^fe80:: ]]
+ then
+ zone_id="%$interface"
+ else
+ zone_id=
+ fi
+- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6
++ conf="${conf}nameserver ${nameserver}$zone_id\n"
+ done
+ shopt -u nocasematch
++ fi
+
+- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
++ if [ x"$conf" != x ]; then
++ conf="# Generated by dhclient or interface $interface\n${conf}"
++ if type resolvconf >/dev/null 2>&1; then
++ printf "${conf}" | resolvconf -a $interface
++ else
++ printf "${conf}" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
+ fi
+ }
+
+--- a/client/scripts/netbsd
++++ b/client/scripts/netbsd
+@@ -1,40 +1,46 @@
+ #!/bin/sh
+
+ make_resolv_conf() {
+- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
+- cat /dev/null > /etc/resolv.conf.dhclient
+- if [ "x$new_domain_search" != x ]; then
+- echo search $new_domain_search >> /etc/resolv.conf.dhclient
+- elif [ "x$new_domain_name" != x ]; then
++ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then
++ return 0
++ fi
++ local conf=
++ if [ x"$new_domain_name_servers" != x ]; then
++ if [ "x$new_domain_search" != x ]; then
++ conf="${conf}search ${new_domain_search}\n"
++ elif [ "x$new_domain_name" != x ]; then
+ # Note that the DHCP 'Domain Name Option' is really just a domain
+ # name, and that this practice of using the domain name option as
+ # a search path is both nonstandard and deprecated.
+- echo search $new_domain_name >> /etc/resolv.conf.dhclient
++ conf="${conf}search ${new_domain_name}\n"
+ fi
+ for nameserver in $new_domain_name_servers; do
+- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
++ conf="${conf}nameserver ${nameserver}\n"
+ done
+-
+- mv /etc/resolv.conf.dhclient /etc/resolv.conf
+ elif [ "x${new_dhcp6_name_servers}" != x ] ; then
+- cat /dev/null > /etc/resolv.conf.dhclient6
+- chmod 644 /etc/resolv.conf.dhclient6
+-
+ if [ "x${new_dhcp6_domain_search}" != x ] ; then
+- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
++ conf="${conf}search ${new_dhcp6_domain_search}\n"
+ fi
+ for nameserver in ${new_dhcp6_name_servers} ; do
+ # If the nameserver has a link-local address
+ # add a <zone_id> (interface name) to it.
+ case $nameserver in
+ fe80:*) zone_id="%$interface";;
+ FE80:*) zone_id="%$interface";;
+ *) zone_id="";;
+ esac
+- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6
++ conf="${conf}nameserver ${nameserver}$zone_id\n"
+ done
++ fi
+
+- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
++ if [ x"$conf" != x ]; then
++ conf="# Generated by dhclient or interface $interface\n${conf}"
++ if type resolvconf >/dev/null 2>&1; then
++ printf "${conf}" | resolvconf -a $interface
++ else
++ printf "${conf}" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
+ fi
+ }
+
+--- a/client/scripts/openbsd
++++ b/client/scripts/openbsd
+@@ -1,40 +1,46 @@
+ #!/bin/sh
+
+ make_resolv_conf() {
+- if [ x"$new_domain_name_servers" != x ]; then
+- cat /dev/null > /etc/resolv.conf.dhclient
+- if [ x"$new_domain_search" != x ]; then
+- echo search $new_domain_search >> /etc/resolv.conf.dhclient
+- elif [ x"$new_domain_name" != x ]; then
++ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then
++ return 0
++ fi
++ local conf=
++ if [ x"$new_domain_name_servers" != x ]; then
++ if [ "x$new_domain_search" != x ]; then
++ conf="${conf}search ${new_domain_search}\n"
++ elif [ "x$new_domain_name" != x ]; then
+ # Note that the DHCP 'Domain Name Option' is really just a domain
+ # name, and that this practice of using the domain name option as
+ # a search path is both nonstandard and deprecated.
+- echo search $new_domain_name >> /etc/resolv.conf.dhclient
++ conf="${conf}search ${new_domain_name}\n"
+ fi
+ for nameserver in $new_domain_name_servers; do
+- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
++ conf="${conf}nameserver ${nameserver}\n"
+ done
+-
+- mv /etc/resolv.conf.dhclient /etc/resolv.conf
+ elif [ "x${new_dhcp6_name_servers}" != x ] ; then
+- cat /dev/null > /etc/resolv.conf.dhclient6
+- chmod 644 /etc/resolv.conf.dhclient6
+-
+ if [ "x${new_dhcp6_domain_search}" != x ] ; then
+- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
++ conf="${conf}search ${new_dhcp6_domain_search}\n"
+ fi
+ for nameserver in ${new_dhcp6_name_servers} ; do
+ # If the nameserver has a link-local address
+ # add a <zone_id> (interface name) to it.
+ case $nameserver in
+ fe80:*) zone_id="%$interface";;
+ FE80:*) zone_id="%$interface";;
+ *) zone_id="";;
+ esac
+- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6
++ conf="${conf}nameserver ${nameserver}$zone_id\n"
+ done
++ fi
+
+- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
++ if [ x"$conf" != x ]; then
++ conf="# Generated by dhclient or interface $interface\n${conf}"
++ if type resolvconf >/dev/null 2>&1; then
++ printf "${conf}" | resolvconf -a $interface
++ else
++ printf "${conf}" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
+ fi
+ }
+
+--- a/client/scripts/solaris
++++ b/client/scripts/solaris
+@@ -1,21 +1,39 @@
+ #!/bin/sh
+
+ make_resolv_conf() {
++ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then
++ return 0
++ fi
++ local conf=
+ if [ x"$new_domain_name_servers" != x ]; then
+- cat /dev/null > /etc/resolv.conf.dhclient
+- if [ x"$new_domain_search" != x ]; then
+- echo search $new_domain_search >> /etc/resolv.conf.dhclient
+- elif [ x"$new_domain_name" != x ]; then
++ if [ "x$new_domain_search" != x ]; then
++ conf="${conf}search ${new_domain_search}\n"
++ elif [ "x$new_domain_name" != x ]; then
+ # Note that the DHCP 'Domain Name Option' is really just a domain
+ # name, and that this practice of using the domain name option as
+ # a search path is both nonstandard and deprecated.
+- echo search $new_domain_name >> /etc/resolv.conf.dhclient
++ conf="${conf}search ${new_domain_name}\n"
+ fi
+ for nameserver in $new_domain_name_servers; do
+- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
++ conf="${conf}nameserver ${nameserver}\n"
++ done
++ elif [ "x${new_dhcp6_name_servers}" != x ] ; then
++ if [ "x${new_dhcp6_domain_search}" != x ] ; then
++ conf="${conf}search ${new_dhcp6_domain_search}\n"
++ fi
++ for nameserver in ${new_dhcp6_name_servers} ; do
++ conf="${conf}nameserver ${nameserver}\n"
+ done
++ fi
+
+- mv /etc/resolv.conf.dhclient /etc/resolv.conf
++ if [ x"$conf" != x ]; then
++ conf="# Generated by dhclient or interface $interface\n${conf}"
++ if type resolvconf >/dev/null 2>&1; then
++ printf "${conf}" | resolvconf -a $interface
++ else
++ printf "${conf}" > /etc/resolv.conf
++ chmod 644 /etc/resolv.conf
++ fi
+ fi
+ }
+
diff --git a/net-misc/dhcp/files/dhcpd.conf2 b/net-misc/dhcp/files/dhcpd.conf2
new file mode 100644
index 000000000000..5cd2eeca3f71
--- /dev/null
+++ b/net-misc/dhcp/files/dhcpd.conf2
@@ -0,0 +1,28 @@
+# /etc/conf.d/dhcpd: config file for /etc/init.d/dhcpd
+
+# If you require more than one instance of dhcpd you can create symbolic
+# links to dhcpd service like so
+# cd /etc/init.d
+# ln -s dhcpd dhcpd.foo
+# cd ../conf.d
+# cp dhcpd dhcpd.foo
+# Now you can edit dhcpd.foo and specify a different configuration file.
+# You'll also need to specify a pidfile in that dhcpd.conf file.
+# See the pid-file-name option in the dhcpd.conf man page for details.
+
+# If you wish to run dhcpd in a chroot, uncomment the following line
+# DHCPD_CHROOT="/var/lib/dhcp/chroot"
+
+# All file paths below are relative to the chroot.
+# You can specify a different chroot directory but MAKE SURE it's empty.
+
+# Specify a configuration file - the default is /etc/dhcp/dhcpd.conf
+# DHCPD_CONF="/etc/dhcp/dhcpd.conf"
+
+# Configure which interface or interfaces to for dhcpd to listen on.
+# List all interfaces space separated. If this is not specified then
+# we listen on all interfaces.
+# DHCPD_IFACE=""
+
+# Insert any other dhcpd options - see the man page for a full list.
+# DHCPD_OPTS=""
diff --git a/net-misc/dhcp/files/dhcpd.init5 b/net-misc/dhcp/files/dhcpd.init5
new file mode 100755
index 000000000000..e4317aaa398e
--- /dev/null
+++ b/net-misc/dhcp/files/dhcpd.init5
@@ -0,0 +1,120 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_commands="configtest"
+
+: ${DHCPD_CONF:=/etc/dhcp/${SVCNAME}.conf}
+
+depend() {
+ need net
+ use logger dns #@slapd@
+}
+
+get_var() {
+ local var="$(sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' "${chroot}${DHCPD_CONF}")"
+ echo ${var:-$2}
+}
+
+setup_opts() {
+ DHCPD_CHROOT=${DHCPD_CHROOT%/}
+
+ # Work out our cffile if it's in our DHCPD_OPTS
+ case " ${DHCPD_OPTS} " in
+ *" -cf "*)
+ DHCPD_CONF=" ${DHCPD_OPTS} "
+ DHCPD_CONF="${DHCPD_CONF##* -cf }"
+ DHCPD_CONF="${DHCPD_CONF%% *}"
+ ;;
+ *) DHCPD_OPTS="${DHCPD_OPTS} -cf ${DHCPD_CONF}"
+ ;;
+ esac
+}
+
+checkconfig() {
+ set -- ${DHCPD_OPTS} -chroot "${DHCPD_CHROOT:-/}" -t
+
+ dhcpd "$@" 1>/dev/null 2>&1
+ local ret=$?
+ if [ ${ret} -ne 0 ] ; then
+ eerror "${SVCNAME} has detected a syntax error in your configuration files:"
+ dhcpd "$@"
+ fi
+
+ return ${ret}
+}
+
+configtest() {
+ setup_opts
+
+ ebegin "Checking ${SVCNAME} configuration"
+ checkconfig
+ eend $?
+}
+
+start() {
+ setup_opts
+ local chroot="${DHCPD_CHROOT}"
+
+ if [ -n "${chroot}" ] ; then
+ # the config test want's these to exist
+ mkdir -p \
+ "${chroot}"/var/run/dhcp \
+ "${chroot}"/var/lib/dhcp \
+ "${chroot}"/etc/dhcp
+ fi
+
+ # see comment in get_var() above
+ if [ ! -f "${chroot}${DHCPD_CONF}" ] ; then
+ eerror "${chroot}${DHCPD_CONF} does not exist"
+ return 1
+ fi
+
+ checkconfig || return 1
+
+ checkpath -d -o dhcp:dhcp "${chroot}"/var/run/dhcp "${chroot}"/var/lib/dhcp
+
+ local leasefile="$(get_var lease-file-name /var/lib/dhcp/${SVCNAME}.leases)"
+ checkpath -f -o dhcp:dhcp "${chroot}${leasefile}"
+
+ # Setup LD_PRELOAD so name resolution works in our chroot.
+ if [ -n "${chroot}" ] ; then
+ checkpath -d -o root:root -m 755 "${chroot}"/dev "${chroot}"/etc "${chroot}"/proc
+ cp -pP /etc/localtime /etc/resolv.conf "${chroot}"/etc/
+ export LD_PRELOAD="${LD_PRELOAD} libresolv.so libnss_dns.so"
+ if ! mountinfo -q "${chroot}/proc" ; then
+ mount --bind /proc "${chroot}/proc"
+ fi
+ fi
+
+ local pidfile="$(get_var pid-file-name /var/run/dhcp/${SVCNAME}.pid)"
+
+ ebegin "Starting ${chroot:+chrooted }${SVCNAME}"
+ start-stop-daemon --start --exec /usr/sbin/dhcpd \
+ --pidfile "${chroot}/${pidfile}" \
+ -- ${DHCPD_OPTS} -q -pf "${pidfile}" -lf "${leasefile}" \
+ -user dhcp -group dhcp \
+ -chroot "${chroot:-/}" ${DHCPD_IFACE}
+ eend $? \
+ && save_options dhcpd_chroot "${chroot}" \
+ && save_options pidfile "${pidfile}"
+}
+
+stop() {
+ local chroot="$(get_options dhcpd_chroot)"
+ [ -z "${chroot}" ] && chroot="$(get_options chroot)"
+
+ ebegin "Stopping ${chroot:+chrooted }${SVCNAME}"
+ start-stop-daemon --stop --exec /usr/sbin/dhcpd \
+ --pidfile "${chroot}/$(get_options pidfile)"
+ res=$?
+
+ if [ ${res} -eq 0 ] && [ -n "${chroot}" ] ; then
+ if mountinfo -q "${chroot}/proc" ; then
+ umount "${chroot}/proc"
+ fi
+ fi
+
+ eend ${res}
+}
diff --git a/net-misc/dhcp/files/dhcpd.tmpfiles b/net-misc/dhcp/files/dhcpd.tmpfiles
new file mode 100644
index 000000000000..ee2f4deeaadf
--- /dev/null
+++ b/net-misc/dhcp/files/dhcpd.tmpfiles
@@ -0,0 +1,2 @@
+d /var/lib/dhcp/ 0755 dhcp dhcp
+f /var/lib/dhcp/dhcpd.leases 0644 dhcp dhcp \ No newline at end of file
diff --git a/net-misc/dhcp/files/dhcpd4.service b/net-misc/dhcp/files/dhcpd4.service
new file mode 100644
index 000000000000..b064bd9b57df
--- /dev/null
+++ b/net-misc/dhcp/files/dhcpd4.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=DHCPv4 Server Daemon
+Documentation=man:dhcpd(8) man:dhcpd.conf(5)
+After=network.target
+After=time-sync.target
+
+[Service]
+ExecStart=/usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcp -group dhcp --no-pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/dhcp/files/dhcpd6.service b/net-misc/dhcp/files/dhcpd6.service
new file mode 100644
index 000000000000..603cacd8eb89
--- /dev/null
+++ b/net-misc/dhcp/files/dhcpd6.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=DHCPv6 Server Daemon
+Documentation=man:dhcpd(8) man:dhcpd.conf(5)
+After=network.target
+After=time-sync.target
+
+[Service]
+ExecStart=/usr/sbin/dhcpd -f -s -6 -cf /etc/dhcp/dhcpd.conf -user dhcp -group dhcp --no-pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/dhcp/files/dhcrelay.conf b/net-misc/dhcp/files/dhcrelay.conf
new file mode 100644
index 000000000000..44699682d42d
--- /dev/null
+++ b/net-misc/dhcp/files/dhcrelay.conf
@@ -0,0 +1,16 @@
+# /etc/conf.d/dhcrelay: config file for /etc/init.d/dhcrelay
+
+# Configure which interface or interfaces to for dhcrelay to listen on
+# and send to.
+# List all interfaces space separated. If this is not specified then
+# we use all interfaces.
+#IFACE=""
+# If you have split net interfaces, you might want to depend on them
+# explicitly here.
+#rc_need=$(printf 'net.%s ' ${IFACE})
+
+# Insert any other options needed. See dhcrelay(8) for details.
+#DHCRELAY_OPTS=""
+
+# Space separated list of IPs to forward BOOTP/DHCP packets to.
+DHCRELAY_SERVERS=""
diff --git a/net-misc/dhcp/files/dhcrelay.init3 b/net-misc/dhcp/files/dhcrelay.init3
new file mode 100755
index 000000000000..54dcd4fd948f
--- /dev/null
+++ b/net-misc/dhcp/files/dhcrelay.init3
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+ use logger #@slapd@
+}
+
+start() {
+ if [ -z "${DHCRELAY_SERVERS}" ] ; then
+ eerror "No DHCRELAY_SERVERS specified in /etc/conf.d/${SVCNAME}"
+ return 1
+ fi
+
+ checkpath -d /var/run/dhcp
+
+ local iface_opts
+ if [ -n "${IFACE}" ] ; then
+ iface_opts=$(printf -- '-i %s ' ${IFACE})
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec /usr/sbin/dhcrelay \
+ -- -q ${iface_opts} ${DHCRELAY_OPTS} ${DHCRELAY_SERVERS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --pidfile /var/run/dhcp/${SVCNAME}.pid
+ eend $?
+}
diff --git a/net-misc/dhcp/files/dhcrelay4.service b/net-misc/dhcp/files/dhcrelay4.service
new file mode 100644
index 000000000000..09e835d43357
--- /dev/null
+++ b/net-misc/dhcp/files/dhcrelay4.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=DHCP Relay Agent Daemon
+Documentation=man:dhcrelay(8)
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/dhcrelay -d --no-pid $DHCRELAY_SERVERS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/dhcp/files/dhcrelay4.service.conf b/net-misc/dhcp/files/dhcrelay4.service.conf
new file mode 100644
index 000000000000..1a0465b767d6
--- /dev/null
+++ b/net-misc/dhcp/files/dhcrelay4.service.conf
@@ -0,0 +1,3 @@
+# Space separated list of IPs to forward BOOTP/DHCP packets to.
+[Service]
+Environment="DHCRELAY_SERVERS=" \ No newline at end of file
diff --git a/net-misc/dhcp/files/dhcrelay6.conf b/net-misc/dhcp/files/dhcrelay6.conf
new file mode 100644
index 000000000000..4e8b8c6fea39
--- /dev/null
+++ b/net-misc/dhcp/files/dhcrelay6.conf
@@ -0,0 +1,8 @@
+# /etc/conf.d/dhcrelay6: config file for /etc/init.d/dhcrelay6
+
+# Insert any other options needed. See dhcrelay(8) for details.
+# Make sure you specify the lower (-l)/upper (-u) interfaces.
+DHCRELAY_OPTS="-6 -l lower-iface -u upper-iface"
+
+# Space separated list of IPs to forward BOOTP/DHCP packets to.
+DHCRELAY_SERVERS=""
diff --git a/net-misc/dhcp/files/dhcrelay6.service b/net-misc/dhcp/files/dhcrelay6.service
new file mode 100644
index 000000000000..1e5e49888d61
--- /dev/null
+++ b/net-misc/dhcp/files/dhcrelay6.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=DHCP Relay Agent Daemon
+Documentation=man:dhcrelay(8)
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/dhcrelay -d --no-pid -6 -l $lower-iface -u $upper-iface $DHCRELAY_SERVERS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/dhcp/files/dhcrelay6.service.conf b/net-misc/dhcp/files/dhcrelay6.service.conf
new file mode 100644
index 000000000000..ae293ab4ff28
--- /dev/null
+++ b/net-misc/dhcp/files/dhcrelay6.service.conf
@@ -0,0 +1,6 @@
+[Service]
+# Space separated list of IPs to forward BOOTP/DHCP packets to
+Environment="DHCRELAY_SERVERS="
+# Make sure you specify the lower (-l)/upper (-u) interfaces
+Environment="lower-iface="
+Environment="upper-iface="
diff --git a/net-misc/dhcp/metadata.xml b/net-misc/dhcp/metadata.xml
new file mode 100644
index 000000000000..9ee6944508b0
--- /dev/null
+++ b/net-misc/dhcp/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>base-system</herd>
+ <longdescription lang="en">The ISC DHCP client/server package.</longdescription>
+ <longdescription lang="ja">ISC DHCP クライアント/サーバ・パッケージです。</longdescription>
+ <use>
+ <flag name='client'>Install the dhclient program</flag>
+ <flag name='server'>Install the dhcpd and dhcrelay programs</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:isc:dhcp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/dhcpcd-ui/Manifest b/net-misc/dhcpcd-ui/Manifest
new file mode 100644
index 000000000000..9ceebb74f0b7
--- /dev/null
+++ b/net-misc/dhcpcd-ui/Manifest
@@ -0,0 +1,2 @@
+DIST dhcpcd-ui-0.7.4.tar.bz2 170928 SHA256 19f02d4428773d37fc6dcd28ddc685c83fa0b15ed693c26276f2e1d8d4fda883 SHA512 d271fb4f2df8afc790c5917e46629714ef9f1c5c3e40edb64e70629d773dc4660662ab960b933a8e50bcc653a6187a6aac9001ce24f0b76d3d23d5af8f492f15 WHIRLPOOL 2bee2a474313beda1d716d3c498e4b6041e688a94397a9a8adae1fb52b748e2ea4639cb59df009cfd363aad1f6fc3f23ed8d0c8d763eafca11b892e85474df30
+DIST dhcpcd-ui-0.7.5.tar.bz2 209112 SHA256 2dae2108605867aba78d98cc9e56e22d7b751eedc3f7e6d689d42d08e706aaf3 SHA512 78dba758f7cee825a1618c33b1fff9549c4e51e19fd5eebd1ae5d6a4686726ec8ad86dc1ec5384238b43589dd700979c694f48bc94e2844f1ef898292660a5d2 WHIRLPOOL bf76d3973f7e5ff03207c1a9fa7f4ec0992c54abc3696bd4fb69630cb992aba46c86aec8f9c973772eba10af6346dfd35a71c3f1043305e033302c60fbbdb840
diff --git a/net-misc/dhcpcd-ui/dhcpcd-ui-0.7.4.ebuild b/net-misc/dhcpcd-ui/dhcpcd-ui-0.7.4.ebuild
new file mode 100644
index 000000000000..d5d96a44ddaf
--- /dev/null
+++ b/net-misc/dhcpcd-ui/dhcpcd-ui-0.7.4.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd
+
+DESCRIPTION="Desktop notification and configuration for dhcpcd"
+HOMEPAGE="http://roy.marples.name/projects/dhcpcd-ui/"
+SRC_URI="http://roy.marples.name/downloads/${PN%-ui}/${P}.tar.bz2"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug gtk gtk3 qt4 libnotify"
+REQUIRED_USE="?? ( gtk gtk3 qt4 )
+ gtk3? ( !gtk ) gtk? ( !gtk3 )"
+
+DEPEND="${DEPEND}
+ virtual/libintl
+ libnotify? (
+ gtk? ( x11-libs/libnotify )
+ gtk3? ( x11-libs/libnotify )
+ qt4? ( kde-base/kdelibs )
+ )
+ gtk? ( x11-libs/gtk+:2 )
+ gtk3? ( x11-libs/gtk+:3 )
+ qt4? ( dev-qt/qtgui:4 )"
+
+RDEPEND=">=net-misc/dhcpcd-6.4.4"
+
+src_prepare()
+{
+ epatch_user
+}
+
+src_configure()
+{
+ local myeconfargs=(
+ $(use_enable debug)
+ $(usex gtk '--with-gtk=gtk+-2.0 --with-icons' '')
+ $(usex gtk3 '--with-gtk=gtk+-3.0 --with-icons' '')
+ $(usex qt4 '--with-qt --with-icons' '--without-qt')
+ $(use_enable libnotify notification)
+ $(use gtk || use gtk3 || echo '--without-gtk')
+ $(use gtk || use gtk3 || use qt4 || echo '--without-icons')
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install()
+{
+ emake DESTDIR="${D}" INSTALL_ROOT="${D}" install
+
+ systemd_dounit src/dhcpcd-online/dhcpcd-wait-online.service
+}
diff --git a/net-misc/dhcpcd-ui/dhcpcd-ui-0.7.5.ebuild b/net-misc/dhcpcd-ui/dhcpcd-ui-0.7.5.ebuild
new file mode 100644
index 000000000000..090d530c41bb
--- /dev/null
+++ b/net-misc/dhcpcd-ui/dhcpcd-ui-0.7.5.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd
+
+DESCRIPTION="Desktop notification and configuration for dhcpcd"
+HOMEPAGE="http://roy.marples.name/projects/dhcpcd-ui/"
+SRC_URI="http://roy.marples.name/downloads/${PN%-ui}/${P}.tar.bz2"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug gtk gtk3 qt4 libnotify"
+
+REQUIRED_USE="
+ ?? ( gtk gtk3 qt4 )
+ gtk3? ( !gtk )
+ gtk? ( !gtk3 )"
+
+DEPEND="${DEPEND}
+ virtual/libintl
+ libnotify? (
+ gtk? ( x11-libs/libnotify )
+ gtk3? ( x11-libs/libnotify )
+ qt4? ( kde-base/kdelibs )
+ )
+ gtk? ( x11-libs/gtk+:2 )
+ gtk3? ( x11-libs/gtk+:3 )
+ qt4? ( dev-qt/qtgui:4 )"
+
+RDEPEND=">=net-misc/dhcpcd-6.4.4"
+
+src_prepare() {
+ epatch_user
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable debug)
+ $(usex gtk '--with-gtk=gtk+-2.0 --with-icons' '')
+ $(usex gtk3 '--with-gtk=gtk+-3.0 --with-icons' '')
+ $(usex qt4 '--with-qt --with-icons' '--without-qt')
+ $(use_enable libnotify notification)
+ $(use gtk || use gtk3 || echo '--without-gtk')
+ $(use gtk || use gtk3 || use qt4 || echo '--without-icons')
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" INSTALL_ROOT="${D}" install
+
+ systemd_dounit src/dhcpcd-online/dhcpcd-wait-online.service
+}
diff --git a/net-misc/dhcpcd-ui/metadata.xml b/net-misc/dhcpcd-ui/metadata.xml
new file mode 100644
index 000000000000..8605a1493a92
--- /dev/null
+++ b/net-misc/dhcpcd-ui/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>proxy-maintainers</herd>
+ <maintainer>
+ <email>tokiclover@gmail.com</email>
+ <description>Maintainer. Assign bugs to him</description>
+ </maintainer>
+<use>
+ <flag name="gtk3">
+ Add support for <pkg>x11-libs/gtk+</pkg> (The GIMP Toolkit)
+ </flag>
+</use>
+</pkgmetadata>
diff --git a/net-misc/dhcpcd/Manifest b/net-misc/dhcpcd/Manifest
new file mode 100644
index 000000000000..3c64bbdfff5d
--- /dev/null
+++ b/net-misc/dhcpcd/Manifest
@@ -0,0 +1,2 @@
+DIST dhcpcd-6.9.0.tar.bz2 176736 SHA256 1566a58ef785880c07762ff6c520e974cf42872be5fbb23b4520f4446b120a68 SHA512 bb02005ff54ad722961208be69f48c61fb72cf56c9ca89348f3e0973e96317b06b4eaf48412ec5e763c9e20bad6f38e06d520048f3412d3bf46716f5dfb671a6 WHIRLPOOL 450b89ff260cfef8e865d1f02b7aa7119d0e37a231d08577545d0091496cee370f5f9c2614e6d5ef2b9a99b412d909d3ed4711c7433b6de085b7dc62df84a4fb
+DIST dhcpcd-6.9.1.tar.xz 175656 SHA256 c03b750e1fe2890b62ac0e7d7092a1698b598adb6f88b67916586a619f7c066f SHA512 87ecd54fc94eb3fbebbf87c4037da4767f31ca60718c5fd8cc3dcff4c3294edf7808627ef909120b668f1b767f0d588dddb7c1920a971c86bdc83f72b64e33a3 WHIRLPOOL d8ef71fef224101a785c838ae48fbe440e7b3ca0f07d435d0a9f7a3fef458e28c094b08966ac88a25ec92fbadcfc06a52d55c39f5772427958f715d665cfe0e9
diff --git a/net-misc/dhcpcd/dhcpcd-6.9.0.ebuild b/net-misc/dhcpcd/dhcpcd-6.9.0.ebuild
new file mode 100644
index 000000000000..78eb6dc0cff6
--- /dev/null
+++ b/net-misc/dhcpcd/dhcpcd-6.9.0.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+if [[ ${PV} == "9999" ]]; then
+ FOSSIL_URI="http://roy.marples.name/projects/dhcpcd"
+else
+ MY_P="${P/_alpha/-alpha}"
+ MY_P="${MY_P/_beta/-beta}"
+ MY_P="${MY_P/_rc/-rc}"
+ SRC_URI="http://roy.marples.name/downloads/${PN}/${MY_P}.tar.bz2"
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+inherit eutils systemd toolchain-funcs
+
+DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
+HOMEPAGE="http://roy.marples.name/projects/dhcpcd/"
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="elibc_glibc +embedded ipv6 kernel_linux +udev"
+
+COMMON_DEPEND="udev? ( virtual/udev )"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}"
+
+if [[ ${PV} == "9999" ]]; then
+ DEPEND+=" dev-vcs/fossil"
+
+ src_unpack()
+ {
+ local distdir=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}
+ local repo=${distdir}/fossil/${PN}.fossil
+
+ addwrite "${distdir}"
+
+ if [[ -e "${repo}" ]]; then
+ fossil pull "${FOSSIL_URI}" -R "${repo}" || die
+ else
+ mkdir -p "${distdir}/fossil" || die
+ fossil clone "${FOSSIL_URI}" "${repo}" || die
+ fi
+
+ mkdir -p "${S}" || die
+ cd "${S}" || die
+ fossil open "${repo}" || die
+ }
+fi
+
+src_prepare()
+{
+ epatch_user
+}
+
+src_configure()
+{
+ local dev hooks rundir
+ use udev || dev="--without-dev --without-udev"
+ hooks="--with-hook=ntp.conf"
+ use elibc_glibc && hooks="${hooks} --with-hook=yp.conf"
+ use kernel_linux && rundir="--rundir=${EPREFIX}/run"
+ econf \
+ --prefix="${EPREFIX}" \
+ --libexecdir="${EPREFIX}/lib/dhcpcd" \
+ --dbdir="${EPREFIX}/var/lib/dhcpcd" \
+ --localstatedir="${EPREFIX}/var" \
+ ${rundir} \
+ $(use_enable embedded) \
+ $(use_enable ipv6) \
+ ${dev} \
+ CC="$(tc-getCC)" \
+ ${hooks}
+}
+
+src_install()
+{
+ default
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
+
+pkg_postinst()
+{
+ # Upgrade the duid file to the new format if needed
+ local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid
+ local new_duid="${ROOT}"/etc/dhcpcd.duid
+ if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then
+ sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}"
+ fi
+
+ # Move the duid to /etc, a more sensible location
+ if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then
+ cp -p "${old_duid}" "${new_duid}"
+ fi
+
+ if [ -z "$REPLACING_VERSIONS" ]; then
+ elog
+ elog "dhcpcd has zeroconf support active by default."
+ elog "This means it will always obtain an IP address even if no"
+ elog "DHCP server can be contacted, which will break any existing"
+ elog "failover support you may have configured in your net configuration."
+ elog "This behaviour can be controlled with the noipv4ll configuration"
+ elog "file option or the -L command line switch."
+ elog "See the dhcpcd and dhcpcd.conf man pages for more details."
+
+ elog
+ elog "Dhcpcd has duid enabled by default, and this may cause issues"
+ elog "with some dhcp servers. For more information, see"
+ elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
+ fi
+
+ if ! has_version net-dns/bind-tools; then
+ elog
+ elog "If you activate the lookup-hostname hook to look up your hostname"
+ elog "using the dns, you need to install net-dns/bind-tools."
+ fi
+}
diff --git a/net-misc/dhcpcd/dhcpcd-6.9.1.ebuild b/net-misc/dhcpcd/dhcpcd-6.9.1.ebuild
new file mode 100644
index 000000000000..3db5ed559d33
--- /dev/null
+++ b/net-misc/dhcpcd/dhcpcd-6.9.1.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+if [[ ${PV} == "9999" ]]; then
+ FOSSIL_URI="http://roy.marples.name/projects/dhcpcd"
+else
+ MY_P="${P/_alpha/-alpha}"
+ MY_P="${MY_P/_beta/-beta}"
+ MY_P="${MY_P/_rc/-rc}"
+ SRC_URI="http://roy.marples.name/downloads/${PN}/${MY_P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+inherit eutils systemd toolchain-funcs
+
+DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
+HOMEPAGE="http://roy.marples.name/projects/dhcpcd/"
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="elibc_glibc +embedded ipv6 kernel_linux +udev"
+
+COMMON_DEPEND="udev? ( virtual/udev )"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}"
+
+if [[ ${PV} == "9999" ]]; then
+ DEPEND+=" dev-vcs/fossil"
+
+ src_unpack()
+ {
+ local distdir=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}
+ local repo=${distdir}/fossil/${PN}.fossil
+
+ addwrite "${distdir}"
+
+ if [[ -e "${repo}" ]]; then
+ fossil pull "${FOSSIL_URI}" -R "${repo}" || die
+ else
+ mkdir -p "${distdir}/fossil" || die
+ fossil clone "${FOSSIL_URI}" "${repo}" || die
+ fi
+
+ mkdir -p "${S}" || die
+ cd "${S}" || die
+ fossil open "${repo}" || die
+ }
+fi
+
+src_prepare()
+{
+ epatch_user
+}
+
+src_configure()
+{
+ local dev hooks rundir
+ use udev || dev="--without-dev --without-udev"
+ hooks="--with-hook=ntp.conf"
+ use elibc_glibc && hooks="${hooks} --with-hook=yp.conf"
+ use kernel_linux && rundir="--rundir=${EPREFIX}/run"
+ econf \
+ --prefix="${EPREFIX}" \
+ --libexecdir="${EPREFIX}/lib/dhcpcd" \
+ --dbdir="${EPREFIX}/var/lib/dhcpcd" \
+ --localstatedir="${EPREFIX}/var" \
+ ${rundir} \
+ $(use_enable embedded) \
+ $(use_enable ipv6) \
+ ${dev} \
+ CC="$(tc-getCC)" \
+ ${hooks}
+}
+
+src_install()
+{
+ default
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
+
+pkg_postinst()
+{
+ # Upgrade the duid file to the new format if needed
+ local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid
+ local new_duid="${ROOT}"/etc/dhcpcd.duid
+ if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then
+ sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}"
+ fi
+
+ # Move the duid to /etc, a more sensible location
+ if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then
+ cp -p "${old_duid}" "${new_duid}"
+ fi
+
+ if [ -z "$REPLACING_VERSIONS" ]; then
+ elog
+ elog "dhcpcd has zeroconf support active by default."
+ elog "This means it will always obtain an IP address even if no"
+ elog "DHCP server can be contacted, which will break any existing"
+ elog "failover support you may have configured in your net configuration."
+ elog "This behaviour can be controlled with the noipv4ll configuration"
+ elog "file option or the -L command line switch."
+ elog "See the dhcpcd and dhcpcd.conf man pages for more details."
+
+ elog
+ elog "Dhcpcd has duid enabled by default, and this may cause issues"
+ elog "with some dhcp servers. For more information, see"
+ elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
+ fi
+
+ if ! has_version net-dns/bind-tools; then
+ elog
+ elog "If you activate the lookup-hostname hook to look up your hostname"
+ elog "using the dns, you need to install net-dns/bind-tools."
+ fi
+}
diff --git a/net-misc/dhcpcd/dhcpcd-9999.ebuild b/net-misc/dhcpcd/dhcpcd-9999.ebuild
new file mode 100644
index 000000000000..3db5ed559d33
--- /dev/null
+++ b/net-misc/dhcpcd/dhcpcd-9999.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+if [[ ${PV} == "9999" ]]; then
+ FOSSIL_URI="http://roy.marples.name/projects/dhcpcd"
+else
+ MY_P="${P/_alpha/-alpha}"
+ MY_P="${MY_P/_beta/-beta}"
+ MY_P="${MY_P/_rc/-rc}"
+ SRC_URI="http://roy.marples.name/downloads/${PN}/${MY_P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+inherit eutils systemd toolchain-funcs
+
+DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
+HOMEPAGE="http://roy.marples.name/projects/dhcpcd/"
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="elibc_glibc +embedded ipv6 kernel_linux +udev"
+
+COMMON_DEPEND="udev? ( virtual/udev )"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}"
+
+if [[ ${PV} == "9999" ]]; then
+ DEPEND+=" dev-vcs/fossil"
+
+ src_unpack()
+ {
+ local distdir=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}
+ local repo=${distdir}/fossil/${PN}.fossil
+
+ addwrite "${distdir}"
+
+ if [[ -e "${repo}" ]]; then
+ fossil pull "${FOSSIL_URI}" -R "${repo}" || die
+ else
+ mkdir -p "${distdir}/fossil" || die
+ fossil clone "${FOSSIL_URI}" "${repo}" || die
+ fi
+
+ mkdir -p "${S}" || die
+ cd "${S}" || die
+ fossil open "${repo}" || die
+ }
+fi
+
+src_prepare()
+{
+ epatch_user
+}
+
+src_configure()
+{
+ local dev hooks rundir
+ use udev || dev="--without-dev --without-udev"
+ hooks="--with-hook=ntp.conf"
+ use elibc_glibc && hooks="${hooks} --with-hook=yp.conf"
+ use kernel_linux && rundir="--rundir=${EPREFIX}/run"
+ econf \
+ --prefix="${EPREFIX}" \
+ --libexecdir="${EPREFIX}/lib/dhcpcd" \
+ --dbdir="${EPREFIX}/var/lib/dhcpcd" \
+ --localstatedir="${EPREFIX}/var" \
+ ${rundir} \
+ $(use_enable embedded) \
+ $(use_enable ipv6) \
+ ${dev} \
+ CC="$(tc-getCC)" \
+ ${hooks}
+}
+
+src_install()
+{
+ default
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
+
+pkg_postinst()
+{
+ # Upgrade the duid file to the new format if needed
+ local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid
+ local new_duid="${ROOT}"/etc/dhcpcd.duid
+ if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then
+ sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}"
+ fi
+
+ # Move the duid to /etc, a more sensible location
+ if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then
+ cp -p "${old_duid}" "${new_duid}"
+ fi
+
+ if [ -z "$REPLACING_VERSIONS" ]; then
+ elog
+ elog "dhcpcd has zeroconf support active by default."
+ elog "This means it will always obtain an IP address even if no"
+ elog "DHCP server can be contacted, which will break any existing"
+ elog "failover support you may have configured in your net configuration."
+ elog "This behaviour can be controlled with the noipv4ll configuration"
+ elog "file option or the -L command line switch."
+ elog "See the dhcpcd and dhcpcd.conf man pages for more details."
+
+ elog
+ elog "Dhcpcd has duid enabled by default, and this may cause issues"
+ elog "with some dhcp servers. For more information, see"
+ elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
+ fi
+
+ if ! has_version net-dns/bind-tools; then
+ elog
+ elog "If you activate the lookup-hostname hook to look up your hostname"
+ elog "using the dns, you need to install net-dns/bind-tools."
+ fi
+}
diff --git a/net-misc/dhcpcd/files/dhcpcd.initd b/net-misc/dhcpcd/files/dhcpcd.initd
new file mode 100644
index 000000000000..d88b0610ddfc
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd.initd
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+# Copyright 2007-2008 Roy Marples <roy@marples.name>
+# All rights reserved. Released under the 2-clause BSD license.
+
+command=/sbin/dhcpcd
+pidfile=/var/run/dhcpcd.pid
+command_args=-q
+name="DHCP Client Daemon"
+
+depend()
+{
+ provide net
+ need localmount
+ use logger network
+ after bootmisc modules
+ before dns
+}
diff --git a/net-misc/dhcpcd/files/dhcpcd.service b/net-misc/dhcpcd/files/dhcpcd.service
new file mode 100644
index 000000000000..2ac9adca0692
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Lightweight DHCP client daemon
+Wants=network.target
+Before=network.target
+
+[Service]
+ExecStart=/sbin/dhcpcd -q --nobackground
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/dhcpcd/metadata.xml b/net-misc/dhcpcd/metadata.xml
new file mode 100644
index 000000000000..202e48827a19
--- /dev/null
+++ b/net-misc/dhcpcd/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>base-system</herd>
+ <maintainer>
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:roy_marples:dhcpcd</remote-id>
+</upstream>
+<use>
+ <flag name="embedded">
+ Embed the definitions of dhcp options in the dhcpcd executable
+ </flag>
+</use>
+</pkgmetadata>
diff --git a/net-misc/dhcpd-pools/Manifest b/net-misc/dhcpd-pools/Manifest
new file mode 100644
index 000000000000..c9189ba67543
--- /dev/null
+++ b/net-misc/dhcpd-pools/Manifest
@@ -0,0 +1 @@
+DIST dhcpd-pools-2.21.tar.xz 544940 SHA256 c444dffee4626216190f85e28ef43e97611058ba9b3e6ce9c563f91bc2de011c SHA512 33c89dd7eb23b3df6e454cd75051f3d842cc265e8596f5657a9e72ae485befbe78655eb682cab10c14973286b85f2b174c2f23b88c5142b63589ca9ec0a9d975 WHIRLPOOL d681d8d461dd515944c5e4f8f326e2f7e93901e6ac049c85a3e2857f51e25d8c8599c7afe04daa48d1ae7350ee5baef85fea0c2e69f27237d747478d74d0e443
diff --git a/net-misc/dhcpd-pools/dhcpd-pools-2.21.ebuild b/net-misc/dhcpd-pools/dhcpd-pools-2.21.ebuild
new file mode 100644
index 000000000000..af659dac7233
--- /dev/null
+++ b/net-misc/dhcpd-pools/dhcpd-pools-2.21.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="ISC dhcpd lease analysis and reporting"
+HOMEPAGE="http://dhcpd-pools.sf.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc"
+
+DEPEND="dev-libs/uthash
+ doc? ( app-doc/doxygen )"
+RDEPEND=""
+
+src_configure() {
+ econf $(use_enable doc doxygen) --with-dhcpd-conf=/etc/dhcp/dhcpd.conf
+}
diff --git a/net-misc/dhcpd-pools/metadata.xml b/net-misc/dhcpd-pools/metadata.xml
new file mode 100644
index 000000000000..fc319ce95c0c
--- /dev/null
+++ b/net-misc/dhcpd-pools/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>cardoe@gentoo.org</email>
+ <name>Doug Goldstein</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">dhcpd-pools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/dhcping/Manifest b/net-misc/dhcping/Manifest
new file mode 100644
index 000000000000..9cdcb01ca268
--- /dev/null
+++ b/net-misc/dhcping/Manifest
@@ -0,0 +1 @@
+DIST dhcping-1.2.tar.gz 75485 SHA256 32ef86959b0bdce4b33d4b2b216eee7148f7de7037ced81b2116210bc7d3646a SHA512 84ead27ba07f7ecc1e8cf6d95b40c98ee20a39ce54386249f403120beac70c45d765d5268b4968dbfbbb92790adcc1eb648c3a87071d215ad64bcd23aec818d3 WHIRLPOOL dc10802b54e9b2f75751d0bfaff81a25694c0d6a98e093e0b048465459a0f7040a7917e92b06eef35162932c11037edf5b1a15354dd9aaa97f40b9f2176db11c
diff --git a/net-misc/dhcping/dhcping-1.2.ebuild b/net-misc/dhcping/dhcping-1.2.ebuild
new file mode 100644
index 000000000000..1a00dcbd427b
--- /dev/null
+++ b/net-misc/dhcping/dhcping-1.2.ebuild
@@ -0,0 +1,13 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Utility for sending a dhcp request to a dhcp server to see if it is responding"
+HOMEPAGE="http://www.mavetju.org/unix/general.php"
+SRC_URI="http://www.mavetju.org/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86 ~x86-fbsd"
diff --git a/net-misc/dhcping/metadata.xml b/net-misc/dhcping/metadata.xml
new file mode 100644
index 000000000000..c331b7a5bba4
--- /dev/null
+++ b/net-misc/dhcping/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>netmon@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/dibbler/Manifest b/net-misc/dibbler/Manifest
new file mode 100644
index 000000000000..e8f71fb453db
--- /dev/null
+++ b/net-misc/dibbler/Manifest
@@ -0,0 +1,3 @@
+DIST dibbler-0.8.4.tar.gz 4292008 SHA256 90382709200b6f1c4d403aceeedb52fd5633cfb71c7df3742062ddfe8b71c013 SHA512 7d0323abd42d0ab57fcaecb30c1354a831f2b8b8b300a9a20678062ef52743b5724569d1885f3866d517abbfae48651966734d47a6c5f43d19fd65332ebeca6c WHIRLPOOL f1d9c2219daebe3f69fbcde956a164902fa2b6ba1448d95a00aaada0423a995d013256fc35fbc8c860efd11f28b0dd42f97de4761a31f0b7662dec23bb36b25a
+DIST dibbler-1.0.0.tar.gz 4372693 SHA256 51283702a1e56c1bfe56fb95469ec7b1fc56ecb8e9a2c6d296b81d43bec14048 SHA512 38eae78e5d5dab2484c6467eb91e7e8eed62067a1f375a9a0e0ed3639c1bd9db7230bc7a33ee41ffd785d031994c6bec4a6b2eb75bb5c0d4645c7e669f568434 WHIRLPOOL 80a9deb26802b0d26a108abffb09a9b3e81faf1e2fda1f25f5a71b855741ee967b82486e0f7e79f9d1560abd43dfe6934e2d69c486c6302f0154972041e98d46
+DIST dibbler-1.0.0RC2.tar.gz 4331108 SHA256 206a27421db7ae5298805d00f9adcafcf6aef7496a5fb23640f6fa99a6ee2d68 SHA512 b0384629a4139bc95609eaf19df6d0c57daebfd0ecd063981271153e3c3cd1658376fd8a473a6568f8b782e58c08c44a101209b49ea3ac39436a3aac4cb27259 WHIRLPOOL 6377ad56bbe61eb7e88f0e92814fd4cbceb4518419b0ec74bceaa7fd09d8de8b00061d73d8d2dead2c3b4389b058ab968586d8373e9b47f1eede0e18b91784f4
diff --git a/net-misc/dibbler/dibbler-0.8.4.ebuild b/net-misc/dibbler/dibbler-0.8.4.ebuild
new file mode 100644
index 000000000000..3cd19941568a
--- /dev/null
+++ b/net-misc/dibbler/dibbler-0.8.4.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit eutils readme.gentoo systemd
+
+DESCRIPTION="Portable DHCPv6 implementation (server, client and relay)"
+HOMEPAGE="http://klub.com.pl/dhcpv6/"
+SRC_URI="http://klub.com.pl/dhcpv6/dibbler/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa ~mips x86"
+IUSE="doc"
+
+DEPEND="doc? ( || (
+ dev-texlive/texlive-latexextra
+ dev-tex/floatflt )
+ )"
+RDEPEND=""
+
+DOC_CONTENTS="Make sure that you modify client.conf, server.conf and/or relay.conf
+to suit your needs. They are stored in /etc/dibbler"
+
+src_prepare() {
+ epatch_user
+}
+
+src_compile() {
+ emake
+ # devel documentation is broken and users should consult the online version
+ # http://klub.com.pl/dhcpv6/doxygen/
+ use doc && emake -C doc/ user
+}
+
+src_install() {
+ readme.gentoo_create_doc
+
+ dosbin dibbler-{client,relay,server}
+ doman doc/man/*.8
+
+ insinto /etc/dibbler
+ doins doc/examples/*.conf
+ dodir /var/lib/dibbler
+
+ dodoc AUTHORS CHANGELOG RELNOTES TODO
+ use doc && dodoc doc/dibbler-user.pdf
+
+ doinitd "${FILESDIR}"/dibbler-{client,relay,server}
+ systemd_dounit "${FILESDIR}"/dibbler-client.service
+}
diff --git a/net-misc/dibbler/dibbler-1.0.0.ebuild b/net-misc/dibbler/dibbler-1.0.0.ebuild
new file mode 100644
index 000000000000..832502009f41
--- /dev/null
+++ b/net-misc/dibbler/dibbler-1.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"
+inherit eutils readme.gentoo systemd
+
+DESCRIPTION="Portable DHCPv6 implementation (server, client and relay)"
+HOMEPAGE="http://klub.com.pl/dhcpv6/"
+SRC_URI="http://klub.com.pl/dhcpv6/dibbler/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa ~mips x86"
+IUSE="doc"
+
+DEPEND="doc? ( || (
+ dev-texlive/texlive-latexextra
+ dev-tex/floatflt )
+ )"
+RDEPEND=""
+
+DOC_CONTENTS="Make sure that you modify client.conf, server.conf and/or relay.conf
+to suit your needs. They are stored in /etc/dibbler"
+
+src_prepare() {
+ epatch_user
+}
+
+src_compile() {
+ emake
+ # devel documentation is broken and users should consult the online version
+ # http://klub.com.pl/dhcpv6/doxygen/
+ use doc && emake -C doc/ user
+}
+
+src_install() {
+ readme.gentoo_create_doc
+
+ dosbin dibbler-{client,relay,server}
+ doman doc/man/*.8
+
+ insinto /etc/dibbler
+ doins doc/examples/*.conf
+ dodir /var/lib/dibbler
+
+ dodoc AUTHORS CHANGELOG RELNOTES TODO
+ use doc && dodoc doc/dibbler-user.pdf
+
+ doinitd "${FILESDIR}"/dibbler-{client,relay,server}
+ systemd_dounit "${FILESDIR}"/dibbler-client.service
+}
diff --git a/net-misc/dibbler/dibbler-1.0.0_rc2.ebuild b/net-misc/dibbler/dibbler-1.0.0_rc2.ebuild
new file mode 100644
index 000000000000..aec55a117ae5
--- /dev/null
+++ b/net-misc/dibbler/dibbler-1.0.0_rc2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit eutils readme.gentoo systemd
+
+DESCRIPTION="Portable DHCPv6 implementation (server, client and relay)"
+HOMEPAGE="http://klub.com.pl/dhcpv6/"
+SRC_URI="http://klub.com.pl/dhcpv6/dibbler/${P/_rc/RC}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~mips ~x86"
+IUSE="doc"
+
+DEPEND="doc? ( || (
+ dev-texlive/texlive-latexextra
+ dev-tex/floatflt )
+ )"
+RDEPEND=""
+
+S=${WORKDIR}/${P/_rc/RC}
+
+DOC_CONTENTS="Make sure that you modify client.conf, server.conf and/or relay.conf
+to suit your needs. They are stored in /etc/dibbler"
+
+src_prepare() {
+ epatch_user
+}
+
+src_compile() {
+ emake
+ # devel documentation is broken and users should consult the online version
+ # http://klub.com.pl/dhcpv6/doxygen/
+ use doc && emake -C doc/ user
+}
+
+src_install() {
+ readme.gentoo_create_doc
+
+ dosbin dibbler-{client,relay,server}
+ doman doc/man/*.8
+
+ insinto /etc/dibbler
+ doins doc/examples/*.conf
+ dodir /var/lib/dibbler
+
+ dodoc AUTHORS CHANGELOG RELNOTES TODO
+ use doc && dodoc doc/dibbler-user.pdf
+
+ doinitd "${FILESDIR}"/dibbler-{client,relay,server}
+ systemd_dounit "${FILESDIR}"/dibbler-client.service
+}
diff --git a/net-misc/dibbler/files/dibbler-client b/net-misc/dibbler/files/dibbler-client
new file mode 100644
index 000000000000..f88f86e969d8
--- /dev/null
+++ b/net-misc/dibbler/files/dibbler-client
@@ -0,0 +1,20 @@
+#!/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 DHCPv6 client: dibbler-client"
+ /usr/sbin/dibbler-client start
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping DHCPv6 client: dibbler-client"
+ /usr/sbin/dibbler-client stop
+ eend $?
+}
diff --git a/net-misc/dibbler/files/dibbler-client.service b/net-misc/dibbler/files/dibbler-client.service
new file mode 100644
index 000000000000..bdac26318fc0
--- /dev/null
+++ b/net-misc/dibbler/files/dibbler-client.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Dibbler IPv6 DHCPv6 Client
+
+[Service]
+ExecStart=/usr/sbin/dibbler-client run
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/dibbler/files/dibbler-relay b/net-misc/dibbler/files/dibbler-relay
new file mode 100644
index 000000000000..2bb27348f1cc
--- /dev/null
+++ b/net-misc/dibbler/files/dibbler-relay
@@ -0,0 +1,20 @@
+#!/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 DHCPv6 relay: dibbler-relay"
+ /usr/sbin/dibbler-relay start
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping DHCPv6 relay: dibbler-relay"
+ /usr/sbin/dibbler-relay stop
+ eend $?
+}
diff --git a/net-misc/dibbler/files/dibbler-server b/net-misc/dibbler/files/dibbler-server
new file mode 100644
index 000000000000..f70521e909e9
--- /dev/null
+++ b/net-misc/dibbler/files/dibbler-server
@@ -0,0 +1,20 @@
+#!/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 DHCPv6 server: dibbler-server"
+ /usr/sbin/dibbler-server start
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping DHCPv6 server: dibbler-server"
+ /usr/sbin/dibbler-server stop
+ eend $?
+}
diff --git a/net-misc/dibbler/metadata.xml b/net-misc/dibbler/metadata.xml
new file mode 100644
index 000000000000..ea02039c8d10
--- /dev/null
+++ b/net-misc/dibbler/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>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/directvnc/Manifest b/net-misc/directvnc/Manifest
new file mode 100644
index 000000000000..3f7fe1c90305
--- /dev/null
+++ b/net-misc/directvnc/Manifest
@@ -0,0 +1,2 @@
+DIST directvnc-0.7.6.tar.gz 380677 SHA256 9e170e7e25a5cacd4f8ca9b808a62940ef24ccc33c7cef521b6e64a0be5e7134 SHA512 dd64fdc6bee5fc1aeb7ed7ccf18f0962db0f6b2733e20f7647065fb58907dbb499a048a12ef7d3ec84f5a45b1acccd6f4c2db39078fb2c2a224605f91d648a51 WHIRLPOOL 569dec31c543f98223d635402d35ca92fe2790f5d9a2dd3f52ef809c002df1ac6d33856553113e039875b69e6dc0a81f2f9c3c91be7b1ac13635754db18551cc
+DIST directvnc-0.7.8.tar.gz 374455 SHA256 07d6109aef5bba2df86f0dd658be7ed9d828801be0878eba3d32f041189d3330 SHA512 15c2cbca3c5ada18bf68f8cf8e4123504fc887a97b0aceb0e2c8d9db769414653b0e62c5896d041cba5daf2e911a83db9c70a2d2a509f309ae62e49d75c91271 WHIRLPOOL fdcc16e4209283ddce2975b2068fe77d19b7d136cb1316d6fcc95dad7875a26806c0858f1814f67214420004f00e300c7543a6672b372391f543a14b25886f54
diff --git a/net-misc/directvnc/directvnc-0.7.6-r1.ebuild b/net-misc/directvnc/directvnc-0.7.6-r1.ebuild
new file mode 100644
index 000000000000..e2c43f256a5e
--- /dev/null
+++ b/net-misc/directvnc/directvnc-0.7.6-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+AUTOTOOLS_AUTORECONF=1
+
+inherit eutils autotools-utils
+
+DESCRIPTION="Very thin VNC client for unix framebuffer systems"
+HOMEPAGE="http://drinkmilk.github.com/directvnc/"
+SRC_URI="http://github.com/downloads/drinkmilk/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~amd64"
+IUSE="+mouse dmalloc"
+
+RDEPEND="dev-libs/DirectFB[fbcon,dynload]
+ virtual/jpeg"
+
+DEPEND="${RDEPEND}
+ dmalloc? ( dev-libs/dmalloc )
+ x11-proto/xproto"
+
+DOCS=( NEWS THANKS )
+
+src_prepare() {
+ # Make mouse support optional
+ use mouse || epatch "${FILESDIR}/${P}-mouse.patch"
+ sed -i -e 's|$(prefix)/share/doc/@PACKAGE@|@docdir@|g' Makefile.am || die
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ myeconfargs=(
+ $(use_with dmalloc)
+ )
+
+ autotools-utils_src_configure
+}
diff --git a/net-misc/directvnc/directvnc-0.7.8.ebuild b/net-misc/directvnc/directvnc-0.7.8.ebuild
new file mode 100644
index 000000000000..287936a760ef
--- /dev/null
+++ b/net-misc/directvnc/directvnc-0.7.8.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+AUTOTOOLS_AUTORECONF=1
+
+inherit eutils autotools-utils
+
+DESCRIPTION="Very thin VNC client for unix framebuffer systems"
+HOMEPAGE="http://drinkmilk.github.com/directvnc/"
+SRC_URI="http://github.com/downloads/drinkmilk/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="+mouse dmalloc"
+
+RDEPEND="dev-libs/DirectFB[fbcon,dynload]
+ virtual/jpeg"
+
+DEPEND="${RDEPEND}
+ dmalloc? ( dev-libs/dmalloc )
+ x11-proto/xproto"
+
+DOCS=( NEWS THANKS )
+
+src_prepare() {
+ use mouse || epatch "${FILESDIR}"/${P}-mouse.patch
+
+ # fix package version
+ sed -i -e '/^AM_INIT_AUTOMAKE/s/0.7.7/0.7.8/g' configure.in || die
+ # fix build system don't respect --docdir option
+ sed -i -e 's|$(prefix)/share/doc/@PACKAGE@|@docdir@|g' Makefile.am || die
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ myeconfargs=(
+ $(use_with dmalloc)
+ )
+
+ autotools-utils_src_configure
+}
+
+pkg_postinst() {
+ einfo "To customize your keyboard mapping, please consult the manual"
+ einfo " commmand: man 7 directvnc-kbmapping"
+}
diff --git a/net-misc/directvnc/files/directvnc-0.7.6-mouse.patch b/net-misc/directvnc/files/directvnc-0.7.6-mouse.patch
new file mode 100644
index 000000000000..71d901661770
--- /dev/null
+++ b/net-misc/directvnc/files/directvnc-0.7.6-mouse.patch
@@ -0,0 +1,30 @@
+diff --git a/src/dfb.c b/src/dfb.c
+old mode 100755
+new mode 100644
+index 8de0f0a..0241c82
+--- a/src/dfb.c
++++ b/src/dfb.c
+@@ -28,7 +28,6 @@ IDirectFB *dfb = NULL;
+ IDirectFBSurface *primary;
+ IDirectFBDisplayLayer *layer;
+ IDirectFBInputDevice *keyboard;
+-IDirectFBInputDevice *mouse;
+ IDirectFBEventBuffer *input_buffer;
+ DFBResult err;
+ DFBSurfaceDescription dsc;
+@@ -70,7 +69,6 @@ dfb_init(int argc, char *argv[])
+ primary->GetSize (primary, &opt.client.width, &opt.client.height);
+
+ DFBCHECK(dfb->GetInputDevice( dfb, DIDID_KEYBOARD, &keyboard ));
+- DFBCHECK(dfb->GetInputDevice( dfb, DIDID_MOUSE, &mouse ));
+ DFBCHECK (dfb->CreateInputEventBuffer (dfb, DICAPS_ALL, DFB_TRUE, &input_buffer));
+ }
+
+@@ -84,7 +82,6 @@ dfb_deinit()
+ primary->Release( primary );
+ input_buffer->Release(input_buffer);
+ keyboard->Release( keyboard );
+- mouse->Release( mouse );
+ layer->Release( layer );
+ dfb->Release( dfb );
+ }
diff --git a/net-misc/directvnc/files/directvnc-0.7.8-mouse.patch b/net-misc/directvnc/files/directvnc-0.7.8-mouse.patch
new file mode 100644
index 000000000000..b37b381ae234
--- /dev/null
+++ b/net-misc/directvnc/files/directvnc-0.7.8-mouse.patch
@@ -0,0 +1,29 @@
+diff --git a/src/dfb.c b/src/dfb.c
+index 5335ea2..8f3adbc 100644
+--- a/src/dfb.c
++++ b/src/dfb.c
+@@ -28,7 +28,6 @@ IDirectFB *dfb = NULL;
+ IDirectFBSurface *primary = NULL;
+ IDirectFBDisplayLayer *layer = NULL;
+ IDirectFBInputDevice *keyboard = NULL;
+-IDirectFBInputDevice *mouse = NULL;
+ IDirectFBEventBuffer *input_buffer = NULL;
+ DFBResult err;
+ DFBSurfaceDescription dsc;
+@@ -70,7 +69,6 @@ dfb_init(int argc, char *argv[])
+ primary->GetSize (primary, &opt.client.width, &opt.client.height);
+
+ DFBCHECK(dfb->GetInputDevice( dfb, DIDID_KEYBOARD, &keyboard ));
+- DFBCHECK(dfb->GetInputDevice( dfb, DIDID_MOUSE, &mouse ));
+ DFBCHECK (dfb->CreateInputEventBuffer (dfb, DICAPS_ALL, DFB_TRUE, &input_buffer));
+ }
+
+@@ -87,8 +85,6 @@ dfb_deinit()
+ input_buffer->Release( input_buffer );
+ if ( keyboard )
+ keyboard->Release( keyboard );
+- if ( mouse )
+- mouse->Release( mouse );
+ if ( layer )
+ layer->Release( layer );
+ if ( dfb )
diff --git a/net-misc/directvnc/files/directvnc-mouse.patch b/net-misc/directvnc/files/directvnc-mouse.patch
new file mode 100644
index 000000000000..4396aef6a9a1
--- /dev/null
+++ b/net-misc/directvnc/files/directvnc-mouse.patch
@@ -0,0 +1,77 @@
+*** dfb.c 2003-01-31 03:51:59.000000000 -0500
+--- dfb-new.c 2005-07-10 15:12:37.000000000 -0400
+***************
+*** 24,34 ****
+ /* DirectFB interfaces needed */
+ IDirectFB *dfb = NULL;
+ IDirectFBSurface *primary;
+ IDirectFBDisplayLayer *layer;
+ IDirectFBInputDevice *keyboard;
+! IDirectFBInputDevice *mouse;
+ IDirectFBEventBuffer *input_buffer;
+ DFBResult err;
+ DFBSurfaceDescription dsc;
+ DFBCardCapabilities caps;
+ DFBDisplayLayerConfig layer_config;
+--- 24,34 ----
+ /* DirectFB interfaces needed */
+ IDirectFB *dfb = NULL;
+ IDirectFBSurface *primary;
+ IDirectFBDisplayLayer *layer;
+ IDirectFBInputDevice *keyboard;
+! /* IDirectFBInputDevice *mouse; */
+ IDirectFBEventBuffer *input_buffer;
+ DFBResult err;
+ DFBSurfaceDescription dsc;
+ DFBCardCapabilities caps;
+ DFBDisplayLayerConfig layer_config;
+***************
+*** 64,74 ****
+ dsc.pixelformat = DSPF_RGB16;
+ DFBCHECK(dfb->CreateSurface(dfb, &dsc, &primary ));
+ primary->GetSize (primary, &opt.client.width, &opt.client.height);
+
+ DFBCHECK(dfb->GetInputDevice( dfb, DIDID_KEYBOARD, &keyboard ));
+! DFBCHECK(dfb->GetInputDevice( dfb, DIDID_MOUSE, &mouse ));
+ DFBCHECK (dfb->CreateInputEventBuffer (dfb, DICAPS_ALL, DFB_TRUE, &input_buffer));
+ }
+
+
+ /*
+--- 64,74 ----
+ dsc.pixelformat = DSPF_RGB16;
+ DFBCHECK(dfb->CreateSurface(dfb, &dsc, &primary ));
+ primary->GetSize (primary, &opt.client.width, &opt.client.height);
+
+ DFBCHECK(dfb->GetInputDevice( dfb, DIDID_KEYBOARD, &keyboard ));
+! /* DFBCHECK(dfb->GetInputDevice( dfb, DIDID_MOUSE, &mouse )); */
+ DFBCHECK (dfb->CreateInputEventBuffer (dfb, DICAPS_ALL, DFB_TRUE, &input_buffer));
+ }
+
+
+ /*
+***************
+*** 78,88 ****
+ dfb_deinit()
+ {
+ primary->Release( primary );
+ input_buffer->Release(input_buffer);
+ keyboard->Release( keyboard );
+! mouse->Release( mouse );
+ layer->Release( layer );
+ dfb->Release( dfb );
+ }
+
+ void
+--- 78,88 ----
+ dfb_deinit()
+ {
+ primary->Release( primary );
+ input_buffer->Release(input_buffer);
+ keyboard->Release( keyboard );
+! /* mouse->Release( mouse ); */
+ layer->Release( layer );
+ dfb->Release( dfb );
+ }
+
+ void
diff --git a/net-misc/directvnc/metadata.xml b/net-misc/directvnc/metadata.xml
new file mode 100644
index 000000000000..071297add332
--- /dev/null
+++ b/net-misc/directvnc/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>dlan@gentoo.org</email>
+ <name>Yixun Lan</name>
+ </maintainer>
+ <use>
+ <flag name="mouse">Adds mouse support</flag>
+ <flag name="dmalloc">Enable debugging with the dmalloc library</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">downloads/drinkmilk</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/dleyna-server/Manifest b/net-misc/dleyna-server/Manifest
new file mode 100644
index 000000000000..32d7c894cfb2
--- /dev/null
+++ b/net-misc/dleyna-server/Manifest
@@ -0,0 +1 @@
+DIST dleyna-server-0.5.0.tar.gz 412938 SHA256 65aea97df031ac2ceeae04bf8473d2a260db58ced737992f882fe331ec3f19ae SHA512 30bafd14c9b85406efc21dd078bce80ed10927ef2728c4535990654b6c279549c5a89099d9266cd1e22a2f574006d2c9cfec8e3e79109c2e760d8ab4609cf398 WHIRLPOOL 5e8a02a816824fe23743b44e15e51cb57a4369f17bee152e170d56ff624b1216aab2962563fb6cd33092ac814da6ef5677f0f63dcb6d2e6a488ba674681a7cb7
diff --git a/net-misc/dleyna-server/dleyna-server-0.5.0.ebuild b/net-misc/dleyna-server/dleyna-server-0.5.0.ebuild
new file mode 100644
index 000000000000..97a23ba91f1e
--- /dev/null
+++ b/net-misc/dleyna-server/dleyna-server-0.5.0.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="library for implementing services that allow clients to discover, browse and manipulate DLNA Servers"
+HOMEPAGE="https://01.org/dleyna/"
+SRC_URI="https://01.org/sites/default/files/downloads/dleyna/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="
+ >=dev-libs/glib-2.28:2
+ dev-libs/libxml2
+ >=media-libs/gupnp-dlna-0.9.4:2.0
+ >=net-libs/dleyna-core-0.5
+ >=net-libs/gssdp-0.13.2
+ >=net-libs/gupnp-0.20.3
+ >=net-libs/gupnp-av-0.11.5
+ >=net-libs/libsoup-2.28.2:2.4
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/net-misc/dleyna-server/metadata.xml b/net-misc/dleyna-server/metadata.xml
new file mode 100644
index 000000000000..dad9001338dc
--- /dev/null
+++ b/net-misc/dleyna-server/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>gnome</herd>
+</pkgmetadata>
diff --git a/net-misc/dnetstats/Manifest b/net-misc/dnetstats/Manifest
new file mode 100644
index 000000000000..a28ea6dff1a5
--- /dev/null
+++ b/net-misc/dnetstats/Manifest
@@ -0,0 +1 @@
+DIST 107467-DNetStats-v1.2.6-release.tar.bz2 213492 SHA256 590521d60731e7066855151c4a9545322c8f6031aaec766fae4ad19a6a95cb57 SHA512 80fd7c296fba6921d23b22524de3a05e19f44113c57a43b615f963c84d7587ef7c187c3d7d410b3919f536e2bf9708aec6022e63c298bbc8790d5577bb783b68 WHIRLPOOL 1c82da70668f47af2db0f5901805966bf3e7972dd8a2a7a45daa1e37f757bb64521482132eef7d3fbd3d194fc05cd59d44e6b04446b09b05d3c54d5533c5af37
diff --git a/net-misc/dnetstats/dnetstats-1.2.6-r3.ebuild b/net-misc/dnetstats/dnetstats-1.2.6-r3.ebuild
new file mode 100644
index 000000000000..0f83b478e96e
--- /dev/null
+++ b/net-misc/dnetstats/dnetstats-1.2.6-r3.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils qt4-r2
+
+MY_PN="DNetStats"
+MY_P="${MY_PN}-v${PV}-release"
+
+DESCRIPTION="Qt4 network monitor utility"
+HOMEPAGE="http://qt-apps.org/content/show.php/DNetStats?content=107467"
+SRC_URI="http://qt-apps.org/CONTENT/content-files/107467-${MY_P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="policykit"
+
+DEPEND="
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+"
+RDEPEND="${DEPEND}
+ policykit? ( sys-auth/polkit )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ qt4-r2_src_prepare
+
+ # clueless upstream ships generated files...
+ rm -rf moc_* qrc_* || die
+}
+
+src_install() {
+ newbin mythread ${PN}
+ dodoc ReadMe
+
+ newicon resource/energy.png ${PN}.png
+ make_desktop_entry ${PN} DNetStats ${PN} 'Qt;Network;Dialup'
+
+ if use policykit; then
+ insinto /usr/share/polkit-1/actions
+ doins "${FILESDIR}/org.gentoo.pkexec.${PN}.policy"
+ sed -i -e 's/^Exec=/&pkexec /' \
+ "${ED}"usr/share/applications/${PN}*.desktop \
+ || die
+ fi
+}
diff --git a/net-misc/dnetstats/files/org.gentoo.pkexec.dnetstats.policy b/net-misc/dnetstats/files/org.gentoo.pkexec.dnetstats.policy
new file mode 100644
index 000000000000..c910a6c3610b
--- /dev/null
+++ b/net-misc/dnetstats/files/org.gentoo.pkexec.dnetstats.policy
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD polkit Policy Configuration 1.0//EN"
+ "http://www.freedesktop.org/software/polkit/policyconfig-1.dtd">
+<policyconfig>
+ <vendor>Gentoo</vendor>
+ <vendor_url>http://www.gentoo.org/</vendor_url>
+ <action id="org.gentoo.pkexec.dnetstats">
+ <message>Authentication is required to run the DNetStats</message>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>auth_admin</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/dnetstats</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+</policyconfig>
diff --git a/net-misc/dnetstats/metadata.xml b/net-misc/dnetstats/metadata.xml
new file mode 100644
index 000000000000..46f151f3da59
--- /dev/null
+++ b/net-misc/dnetstats/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>qt</herd>
+</pkgmetadata>
+
diff --git a/net-misc/dropbear/Manifest b/net-misc/dropbear/Manifest
new file mode 100644
index 000000000000..17c973306e6b
--- /dev/null
+++ b/net-misc/dropbear/Manifest
@@ -0,0 +1,6 @@
+DIST dropbear-2013.60.tar.bz2 1584837 SHA256 4c0c52453b4dd96ef79e5968ed3676de008ee0cf133632acae12bbad588681bb SHA512 2d9c374f17eef22a783d5fef9f30ee2fcbb8778ff7319bb028d8f6181f49827867e3b7f02eec580cbd48f2d97cad789a541c1fbe43fe3d23f6cb396d4138d712 WHIRLPOOL 901beb6fb1e09295aaeb32f9032a653cdeb87e69758f3b598af15f358605e77e24ceea99a418245e86ce665fef1d3a8da38d99105310fa4376586e60f41cb5d8
+DIST dropbear-2013.62.tar.bz2 1598084 SHA256 c6656302bbcc54b0a9c361f505822f6994039117ec32d2897ead3364da079ffa SHA512 8811eae921333bbb242227c52d057a01d0536bf47d37b553834a2cd4730ab1693460a7b4eacfafc8a2c20cc1ac6a4b8c5cdb735e9dd069f9499e4144767fe37b WHIRLPOOL d0b8a95bea6435cbdba86b985229e84a30b36aa7f9b871dac6e2a2eed878ce00799cc59d8ba9c6476a3173bd3ac851dc0314fe4315a464367a56c61f43b3eea1
+DIST dropbear-2014.63.tar.bz2 1598479 SHA256 595992de432ba586a0e7e191bbb1ad587727678bb3e345b018c395b8c55b57ae SHA512 19eccfc59b239b08c6e7d81707a9194ff43aaa6dcc7b572d149175deae74ce9a08bbd73ce5faab8124b3e6e28c33e4fa0d8eca11414b5ac97850c857c17e9323 WHIRLPOOL 0918dbfd61317021c2a9eb7d4cf1deafbae108da3775cac7606ecf7ba2e89db9bbea5888d6fa8496fbffa0ad1ee9a0763ace5ad75d32cf15aeffa555e1393ac2
+DIST dropbear-2014.65.tar.bz2 1604532 SHA256 e20057aa7db0f9ea4efdcbfc6fc6b73a648b47b6ab6a01659472142b06f5f56c SHA512 21ad2568d3ad369b55d8e04b86467fb204c775fe1fd8bfd5a310557e83bbb562db9041bd79a20edbaa1c6b8658a5d41fd54d87476f5e2d7bcf54ebc28615b878 WHIRLPOOL 4c0c3107a64fab185da2139d65ca5a85e687a05527e3ee3d64de63bbac947f3655fae222d895177a73467ce8bebc6dd2aa2d651267e1a6c80c7db8f839378692
+DIST dropbear-2014.66.tar.bz2 1604981 SHA256 ab3fe2670a517cc0bbe398ff5d15e9ca12cd14f2fc18930a8111ae2baa64ab76 SHA512 3005f754ad97e5eb84221740577f4dd962e38f38b3f6ba84dbb0811a7a35d487069c35b30055e129541c224769fe0a7e594084a9b0f1cc667029ad43d4988149 WHIRLPOOL c077328bf5c21faa655f3a2e6fe1aa775b046eec7cf0f527a86c0ec01b62ab9c6ae3530fcdf49db19be8208ea22f8cd198cd3ab6a5eb605a55daf0bf0c40e4ff
+DIST dropbear-2015.67.tar.bz2 1606312 SHA256 7e690594645dfde5787065c78a5d2e4d15e288babfa06e140197ce05f698c8e5 SHA512 6a23f7dbe8ccd39683488a16ce4db39cdba529e9d302165742eb818d3cf520a3793660ff6c8ce0520ddb87dcac726ff34ed3dbcb7efa83115deafad2c6c0a5f3 WHIRLPOOL c1103be19c86a0b40ca262715646244911032e97aba52279be1f7a0382367554c34455497b604dacacb69da0873fd26d3d457abeb7d265e6ca6bdff8938dc065
diff --git a/net-misc/dropbear/dropbear-2013.60.ebuild b/net-misc/dropbear/dropbear-2013.60.ebuild
new file mode 100644
index 000000000000..a45873d06481
--- /dev/null
+++ b/net-misc/dropbear/dropbear-2013.60.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils savedconfig pam user
+
+DESCRIPTION="small SSH 2 client/server designed for small memory environments"
+HOMEPAGE="http://matt.ucc.asn.au/dropbear/dropbear.html"
+SRC_URI="http://matt.ucc.asn.au/dropbear/releases/${P}.tar.bz2
+ http://matt.ucc.asn.au/dropbear/testing/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
+IUSE="bsdpty minimal multicall pam +shadow static syslog zlib"
+
+LIB_DEPEND="zlib? ( sys-libs/zlib[static-libs(+)] )
+ dev-libs/libtommath[static-libs(+)]"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ pam? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+RDEPEND+=" pam? ( >=sys-auth/pambase-20080219.1 )"
+
+REQUIRED_USE="pam? ( !static )"
+
+set_options() {
+ progs=(
+ dropbear dbclient dropbearkey
+ $(usex minimal "" "dropbearconvert scp")
+ )
+ makeopts=(
+ MULTI=$(usex multicall 1 0)
+ STATIC=$(usex static 1 0)
+ )
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.46-dbscp.patch
+ epatch "${FILESDIR}"/${PN}-2013.62-multi-install-man.patch
+ epatch "${FILESDIR}"/${PN}-2013.62-multi-no-relink.patch
+ sed -i '1i#define _GNU_SOURCE' scpmisc.c || die
+ sed -i \
+ -e '/SFTPSERVER_PATH/s:".*":"/usr/lib/misc/sftp-server":' \
+ -e '/XAUTH_COMMAND/s:/X11R6/:/:' \
+ options.h || die
+ sed -i \
+ -e '/pam_start/s:sshd:dropbear:' \
+ svr-authpam.c || die
+ restore_config options.h
+}
+
+src_configure() {
+ # XXX: Need to add libtomcrypt to the tree and re-enable this.
+ # --disable-bundled-libtom
+ econf \
+ $(use_enable zlib) \
+ $(use_enable pam) \
+ $(use_enable !bsdpty openpty) \
+ $(use_enable shadow) \
+ $(use_enable syslog)
+}
+
+src_compile() {
+ set_options
+ emake "${makeopts[@]}" PROGRAMS="${progs[*]}"
+}
+
+src_install() {
+ set_options
+ emake "${makeopts[@]}" PROGRAMS="${progs[*]}" DESTDIR="${D}" install
+ doman *.8
+ newinitd "${FILESDIR}"/dropbear.init.d dropbear
+ newconfd "${FILESDIR}"/dropbear.conf.d dropbear
+ dodoc CHANGES README TODO SMALL MULTI
+
+ # The multi install target does not install the links right.
+ if use multicall ; then
+ cd "${ED}"/usr/bin
+ local x
+ for x in "${progs[@]}" ; do
+ ln -sf dropbearmulti ${x} || die "ln -s dropbearmulti to ${x} failed"
+ done
+ rm -f dropbear
+ dodir /usr/sbin
+ dosym ../bin/dropbearmulti /usr/sbin/dropbear
+ cd "${S}"
+ fi
+ save_config options.h
+
+ if ! use minimal ; then
+ mv "${ED}"/usr/bin/{,db}scp || die
+ fi
+
+ pamd_mimic system-remote-login dropbear auth account password session
+}
+
+pkg_preinst() {
+ enewgroup sshd 22
+ enewuser sshd 22 -1 /var/empty sshd
+}
diff --git a/net-misc/dropbear/dropbear-2013.62.ebuild b/net-misc/dropbear/dropbear-2013.62.ebuild
new file mode 100644
index 000000000000..bcb7ea80da95
--- /dev/null
+++ b/net-misc/dropbear/dropbear-2013.62.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils savedconfig pam user
+
+DESCRIPTION="small SSH 2 client/server designed for small memory environments"
+HOMEPAGE="http://matt.ucc.asn.au/dropbear/dropbear.html"
+SRC_URI="http://matt.ucc.asn.au/dropbear/releases/${P}.tar.bz2
+ http://matt.ucc.asn.au/dropbear/testing/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="bsdpty minimal multicall pam +shadow static syslog zlib"
+
+LIB_DEPEND="zlib? ( sys-libs/zlib[static-libs(+)] )
+ dev-libs/libtommath[static-libs(+)]"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ pam? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+RDEPEND+=" pam? ( >=sys-auth/pambase-20080219.1 )"
+
+REQUIRED_USE="pam? ( !static )"
+
+set_options() {
+ progs=(
+ dropbear dbclient dropbearkey
+ $(usex minimal "" "dropbearconvert scp")
+ )
+ makeopts=(
+ MULTI=$(usex multicall 1 0)
+ STATIC=$(usex static 1 0)
+ )
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.46-dbscp.patch
+ epatch "${FILESDIR}"/${PN}-2013.62-multi-install-man.patch
+ epatch "${FILESDIR}"/${PN}-2013.62-multi-no-relink.patch
+ sed -i '1i#define _GNU_SOURCE' scpmisc.c || die
+ sed -i \
+ -e '/SFTPSERVER_PATH/s:".*":"/usr/lib/misc/sftp-server":' \
+ -e '/XAUTH_COMMAND/s:/X11R6/:/:' \
+ options.h || die
+ sed -i \
+ -e '/pam_start/s:sshd:dropbear:' \
+ svr-authpam.c || die
+ restore_config options.h
+}
+
+src_configure() {
+ # XXX: Need to add libtomcrypt to the tree and re-enable this.
+ # --disable-bundled-libtom
+ econf \
+ $(use_enable zlib) \
+ $(use_enable pam) \
+ $(use_enable !bsdpty openpty) \
+ $(use_enable shadow) \
+ $(use_enable syslog)
+}
+
+src_compile() {
+ set_options
+ emake "${makeopts[@]}" PROGRAMS="${progs[*]}"
+}
+
+src_install() {
+ set_options
+ emake "${makeopts[@]}" PROGRAMS="${progs[*]}" DESTDIR="${D}" install
+ doman *.8
+ newinitd "${FILESDIR}"/dropbear.init.d dropbear
+ newconfd "${FILESDIR}"/dropbear.conf.d dropbear
+ dodoc CHANGES README TODO SMALL MULTI
+
+ # The multi install target does not install the links right.
+ if use multicall ; then
+ cd "${ED}"/usr/bin
+ local x
+ for x in "${progs[@]}" ; do
+ ln -sf dropbearmulti ${x} || die "ln -s dropbearmulti to ${x} failed"
+ done
+ rm -f dropbear
+ dodir /usr/sbin
+ dosym ../bin/dropbearmulti /usr/sbin/dropbear
+ cd "${S}"
+ fi
+ save_config options.h
+
+ if ! use minimal ; then
+ mv "${ED}"/usr/bin/{,db}scp || die
+ fi
+
+ pamd_mimic system-remote-login dropbear auth account password session
+}
+
+pkg_preinst() {
+ enewgroup sshd 22
+ enewuser sshd 22 -1 /var/empty sshd
+}
diff --git a/net-misc/dropbear/dropbear-2014.63.ebuild b/net-misc/dropbear/dropbear-2014.63.ebuild
new file mode 100644
index 000000000000..73771a162be5
--- /dev/null
+++ b/net-misc/dropbear/dropbear-2014.63.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils savedconfig pam user
+
+DESCRIPTION="small SSH 2 client/server designed for small memory environments"
+HOMEPAGE="http://matt.ucc.asn.au/dropbear/dropbear.html"
+SRC_URI="http://matt.ucc.asn.au/dropbear/releases/${P}.tar.bz2
+ http://matt.ucc.asn.au/dropbear/testing/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="bsdpty minimal multicall pam +shadow static syslog zlib"
+
+LIB_DEPEND="zlib? ( sys-libs/zlib[static-libs(+)] )
+ dev-libs/libtommath[static-libs(+)]"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ pam? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+RDEPEND+=" pam? ( >=sys-auth/pambase-20080219.1 )"
+
+REQUIRED_USE="pam? ( !static )"
+
+set_options() {
+ progs=(
+ dropbear dbclient dropbearkey
+ $(usex minimal "" "dropbearconvert scp")
+ )
+ makeopts=(
+ MULTI=$(usex multicall 1 0)
+ STATIC=$(usex static 1 0)
+ )
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.46-dbscp.patch
+# sed -i '1i#define _GNU_SOURCE' scpmisc.c || die
+ sed -i \
+ -e '/SFTPSERVER_PATH/s:".*":"/usr/lib/misc/sftp-server":' \
+ -e '/XAUTH_COMMAND/s:/X11R6/:/:' \
+ options.h || die
+ sed -i \
+ -e '/pam_start/s:sshd:dropbear:' \
+ svr-authpam.c || die
+ restore_config options.h
+}
+
+src_configure() {
+ # XXX: Need to add libtomcrypt to the tree and re-enable this.
+ # --disable-bundled-libtom
+ econf \
+ $(use_enable zlib) \
+ $(use_enable pam) \
+ $(use_enable !bsdpty openpty) \
+ $(use_enable shadow) \
+ $(use_enable syslog)
+}
+
+src_compile() {
+ set_options
+ emake "${makeopts[@]}" PROGRAMS="${progs[*]}"
+}
+
+src_install() {
+ set_options
+ emake "${makeopts[@]}" PROGRAMS="${progs[*]}" DESTDIR="${D}" install
+ doman *.8
+ newinitd "${FILESDIR}"/dropbear.init.d dropbear
+ newconfd "${FILESDIR}"/dropbear.conf.d dropbear
+ dodoc CHANGES README TODO SMALL MULTI
+
+ # The multi install target does not install the links right.
+ if use multicall ; then
+ cd "${ED}"/usr/bin
+ local x
+ for x in "${progs[@]}" ; do
+ ln -sf dropbearmulti ${x} || die "ln -s dropbearmulti to ${x} failed"
+ done
+ rm -f dropbear
+ dodir /usr/sbin
+ dosym ../bin/dropbearmulti /usr/sbin/dropbear
+ cd "${S}"
+ fi
+ save_config options.h
+
+ if ! use minimal ; then
+ mv "${ED}"/usr/bin/{,db}scp || die
+ fi
+
+ pamd_mimic system-remote-login dropbear auth account password session
+}
+
+pkg_preinst() {
+ enewgroup sshd 22
+ enewuser sshd 22 -1 /var/empty sshd
+}
diff --git a/net-misc/dropbear/dropbear-2014.65.ebuild b/net-misc/dropbear/dropbear-2014.65.ebuild
new file mode 100644
index 000000000000..15508f3c1d9c
--- /dev/null
+++ b/net-misc/dropbear/dropbear-2014.65.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils savedconfig pam user
+
+DESCRIPTION="small SSH 2 client/server designed for small memory environments"
+HOMEPAGE="http://matt.ucc.asn.au/dropbear/dropbear.html"
+SRC_URI="http://matt.ucc.asn.au/dropbear/releases/${P}.tar.bz2
+ http://matt.ucc.asn.au/dropbear/testing/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="bsdpty minimal multicall pam +shadow static syslog zlib"
+
+LIB_DEPEND="zlib? ( sys-libs/zlib[static-libs(+)] )
+ dev-libs/libtommath[static-libs(+)]"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ pam? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+RDEPEND+=" pam? ( >=sys-auth/pambase-20080219.1 )"
+
+REQUIRED_USE="pam? ( !static )"
+
+set_options() {
+ progs=(
+ dropbear dbclient dropbearkey
+ $(usex minimal "" "dropbearconvert scp")
+ )
+ makeopts=(
+ MULTI=$(usex multicall 1 0)
+ STATIC=$(usex static 1 0)
+ )
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.46-dbscp.patch
+ sed -i \
+ -e '/SFTPSERVER_PATH/s:".*":"/usr/lib/misc/sftp-server":' \
+ options.h || die
+ sed -i \
+ -e '/pam_start/s:sshd:dropbear:' \
+ svr-authpam.c || die
+ restore_config options.h
+}
+
+src_configure() {
+ # XXX: Need to add libtomcrypt to the tree and re-enable this.
+ # --disable-bundled-libtom
+ econf \
+ $(use_enable zlib) \
+ $(use_enable pam) \
+ $(use_enable !bsdpty openpty) \
+ $(use_enable shadow) \
+ $(use_enable syslog)
+}
+
+src_compile() {
+ set_options
+ emake "${makeopts[@]}" PROGRAMS="${progs[*]}"
+}
+
+src_install() {
+ set_options
+ emake "${makeopts[@]}" PROGRAMS="${progs[*]}" DESTDIR="${D}" install
+ doman *.8
+ newinitd "${FILESDIR}"/dropbear.init.d dropbear
+ newconfd "${FILESDIR}"/dropbear.conf.d dropbear
+ dodoc CHANGES README TODO SMALL MULTI
+
+ # The multi install target does not install the links right.
+ if use multicall ; then
+ cd "${ED}"/usr/bin
+ local x
+ for x in "${progs[@]}" ; do
+ ln -sf dropbearmulti ${x} || die "ln -s dropbearmulti to ${x} failed"
+ done
+ rm -f dropbear
+ dodir /usr/sbin
+ dosym ../bin/dropbearmulti /usr/sbin/dropbear
+ cd "${S}"
+ fi
+ save_config options.h
+
+ if ! use minimal ; then
+ mv "${ED}"/usr/bin/{,db}scp || die
+ fi
+
+ pamd_mimic system-remote-login dropbear auth account password session
+}
+
+pkg_preinst() {
+ enewgroup sshd 22
+ enewuser sshd 22 -1 /var/empty sshd
+}
diff --git a/net-misc/dropbear/dropbear-2014.66.ebuild b/net-misc/dropbear/dropbear-2014.66.ebuild
new file mode 100644
index 000000000000..7aff607ff5c1
--- /dev/null
+++ b/net-misc/dropbear/dropbear-2014.66.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils savedconfig pam user
+
+DESCRIPTION="small SSH 2 client/server designed for small memory environments"
+HOMEPAGE="http://matt.ucc.asn.au/dropbear/dropbear.html"
+SRC_URI="http://matt.ucc.asn.au/dropbear/releases/${P}.tar.bz2
+ http://matt.ucc.asn.au/dropbear/testing/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
+IUSE="bsdpty minimal multicall pam +shadow static syslog zlib"
+
+LIB_DEPEND="zlib? ( sys-libs/zlib[static-libs(+)] )
+ dev-libs/libtommath[static-libs(+)]"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ pam? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+RDEPEND+=" pam? ( >=sys-auth/pambase-20080219.1 )"
+
+REQUIRED_USE="pam? ( !static )"
+
+set_options() {
+ progs=(
+ dropbear dbclient dropbearkey
+ $(usex minimal "" "dropbearconvert scp")
+ )
+ makeopts=(
+ MULTI=$(usex multicall 1 0)
+ STATIC=$(usex static 1 0)
+ )
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.46-dbscp.patch
+ sed -i \
+ -e '/SFTPSERVER_PATH/s:".*":"/usr/lib/misc/sftp-server":' \
+ options.h || die
+ sed -i \
+ -e '/pam_start/s:sshd:dropbear:' \
+ svr-authpam.c || die
+ restore_config options.h
+}
+
+src_configure() {
+ # XXX: Need to add libtomcrypt to the tree and re-enable this.
+ # --disable-bundled-libtom
+ econf \
+ $(use_enable zlib) \
+ $(use_enable pam) \
+ $(use_enable !bsdpty openpty) \
+ $(use_enable shadow) \
+ $(use_enable syslog)
+}
+
+src_compile() {
+ set_options
+ emake "${makeopts[@]}" PROGRAMS="${progs[*]}"
+}
+
+src_install() {
+ set_options
+ emake "${makeopts[@]}" PROGRAMS="${progs[*]}" DESTDIR="${D}" install
+ doman *.8
+ newinitd "${FILESDIR}"/dropbear.init.d dropbear
+ newconfd "${FILESDIR}"/dropbear.conf.d dropbear
+ dodoc CHANGES README TODO SMALL MULTI
+
+ # The multi install target does not install the links right.
+ if use multicall ; then
+ cd "${ED}"/usr/bin
+ local x
+ for x in "${progs[@]}" ; do
+ ln -sf dropbearmulti ${x} || die "ln -s dropbearmulti to ${x} failed"
+ done
+ rm -f dropbear
+ dodir /usr/sbin
+ dosym ../bin/dropbearmulti /usr/sbin/dropbear
+ cd "${S}"
+ fi
+ save_config options.h
+
+ if ! use minimal ; then
+ mv "${ED}"/usr/bin/{,db}scp || die
+ fi
+
+ pamd_mimic system-remote-login dropbear auth account password session
+}
+
+pkg_preinst() {
+ enewgroup sshd 22
+ enewuser sshd 22 -1 /var/empty sshd
+}
diff --git a/net-misc/dropbear/dropbear-2015.67.ebuild b/net-misc/dropbear/dropbear-2015.67.ebuild
new file mode 100644
index 000000000000..d9b4bc9ba381
--- /dev/null
+++ b/net-misc/dropbear/dropbear-2015.67.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils savedconfig pam user
+
+DESCRIPTION="small SSH 2 client/server designed for small memory environments"
+HOMEPAGE="http://matt.ucc.asn.au/dropbear/dropbear.html"
+SRC_URI="http://matt.ucc.asn.au/dropbear/releases/${P}.tar.bz2
+ http://matt.ucc.asn.au/dropbear/testing/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="bsdpty minimal multicall pam +shadow static +syslog zlib"
+
+LIB_DEPEND="zlib? ( sys-libs/zlib[static-libs(+)] )
+ dev-libs/libtommath[static-libs(+)]"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ pam? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+RDEPEND+=" pam? ( >=sys-auth/pambase-20080219.1 )"
+
+REQUIRED_USE="pam? ( !static )"
+
+set_options() {
+ progs=(
+ dropbear dbclient dropbearkey
+ $(usex minimal "" "dropbearconvert scp")
+ )
+ makeopts=(
+ MULTI=$(usex multicall 1 0)
+ STATIC=$(usex static 1 0)
+ )
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.46-dbscp.patch
+ sed -i \
+ -e '/SFTPSERVER_PATH/s:".*":"/usr/lib/misc/sftp-server":' \
+ options.h || die
+ sed -i \
+ -e '/pam_start/s:sshd:dropbear:' \
+ svr-authpam.c || die
+ restore_config options.h
+}
+
+src_configure() {
+ # XXX: Need to add libtomcrypt to the tree and re-enable this.
+ # --disable-bundled-libtom
+ econf \
+ $(use_enable zlib) \
+ $(use_enable pam) \
+ $(use_enable !bsdpty openpty) \
+ $(use_enable shadow) \
+ $(use_enable syslog)
+}
+
+src_compile() {
+ set_options
+ emake "${makeopts[@]}" PROGRAMS="${progs[*]}"
+}
+
+src_install() {
+ set_options
+ emake "${makeopts[@]}" PROGRAMS="${progs[*]}" DESTDIR="${D}" install
+ doman *.8
+ newinitd "${FILESDIR}"/dropbear.init.d dropbear
+ newconfd "${FILESDIR}"/dropbear.conf.d dropbear
+ dodoc CHANGES README TODO SMALL MULTI
+
+ # The multi install target does not install the links right.
+ if use multicall ; then
+ cd "${ED}"/usr/bin
+ local x
+ for x in "${progs[@]}" ; do
+ ln -sf dropbearmulti ${x} || die "ln -s dropbearmulti to ${x} failed"
+ done
+ rm -f dropbear
+ dodir /usr/sbin
+ dosym ../bin/dropbearmulti /usr/sbin/dropbear
+ cd "${S}"
+ fi
+ save_config options.h
+
+ if ! use minimal ; then
+ mv "${ED}"/usr/bin/{,db}scp || die
+ fi
+
+ pamd_mimic system-remote-login dropbear auth account password session
+}
+
+pkg_preinst() {
+ enewgroup sshd 22
+ enewuser sshd 22 -1 /var/empty sshd
+}
diff --git a/net-misc/dropbear/files/dropbear-0.46-dbscp.patch b/net-misc/dropbear/files/dropbear-0.46-dbscp.patch
new file mode 100644
index 000000000000..18873f24c5a6
--- /dev/null
+++ b/net-misc/dropbear/files/dropbear-0.46-dbscp.patch
@@ -0,0 +1,20 @@
+--- dbmulti.c 2005-07-17 07:00:07.000000000 -0400
++++ dbmulti.c 2005-07-17 06:59:35.000000000 -0400
+@@ -60,7 +60,7 @@
+ }
+ #endif
+ #ifdef DBMULTI_scp
+- if (strcmp(progname, "scp") == 0) {
++ if ((strcmp(progname, "scp") == 0) || (strcmp(progname, "dbscp") == 0)) {
+ return scp_main(argc, argv);
+ }
+ #endif
+@@ -81,7 +81,7 @@
+ "'dropbearconvert' - the key converter\n"
+ #endif
+ #ifdef DBMULTI_scp
+- "'scp' - secure copy\n"
++ "'dbscp' - secure copy\n"
+ #endif
+ ,
+ DROPBEAR_VERSION);
diff --git a/net-misc/dropbear/files/dropbear-2013.62-multi-install-man.patch b/net-misc/dropbear/files/dropbear-2013.62-multi-install-man.patch
new file mode 100644
index 000000000000..efaeb8753b00
--- /dev/null
+++ b/net-misc/dropbear/files/dropbear-2013.62-multi-install-man.patch
@@ -0,0 +1,13 @@
+only install man pages that exist as things like scp.1 do not
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -136,7 +136,7 @@ insmulti%: dropbearmulti
+ -rm -f $(DESTDIR)$(bindir)/$*$(EXEEXT)
+ -ln -s $(bindir)/dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir)/$*$(EXEEXT)
+ $(INSTALL) -d $(DESTDIR)$(mandir)/man1
+- $(INSTALL) -m 644 $*.1 $(DESTDIR)$(mandir)/man1/$*.1
++ if test -e $*.1; then $(INSTALL) -m 644 $*.1 $(DESTDIR)$(mandir)/man1/$*.1; fi
+
+ # dropbear should go in sbin, so it needs a seperate rule
+ inst_dropbear: dropbear
diff --git a/net-misc/dropbear/files/dropbear-2013.62-multi-no-relink.patch b/net-misc/dropbear/files/dropbear-2013.62-multi-no-relink.patch
new file mode 100644
index 000000000000..cd12a9634138
--- /dev/null
+++ b/net-misc/dropbear/files/dropbear-2013.62-multi-no-relink.patch
@@ -0,0 +1,20 @@
+turn dropbearmulti into a real target so we don't constantly re-link it
+
+otherwise make has no idea what "multibinary" is and so always re-links it
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -175,10 +175,10 @@ ifeq ($(MULTI),1)
+ CFLAGS+=$(addprefix -DDBMULTI_, $(PROGRAMS)) -DDROPBEAR_MULTI
+ endif
+
+-dropbearmulti: multilink
++dropbearmulti$(EXEEXT): $(HEADERS) $(MULTIOBJS) $(LIBTOM_DEPS) Makefile
++ $(CC) $(LDFLAGS) -o $@ $(MULTIOBJS) $(LIBS)
+
+-multibinary: $(HEADERS) $(MULTIOBJS) $(LIBTOM_DEPS) Makefile
+- $(CC) $(LDFLAGS) -o dropbearmulti$(EXEEXT) $(MULTIOBJS) $(LIBS)
++multibinary: dropbearmulti$(EXEEXT)
+
+ multilink: multibinary $(addprefix link, $(PROGRAMS))
+
diff --git a/net-misc/dropbear/files/dropbear.conf.d b/net-misc/dropbear/files/dropbear.conf.d
new file mode 100644
index 000000000000..555f275d993c
--- /dev/null
+++ b/net-misc/dropbear/files/dropbear.conf.d
@@ -0,0 +1,6 @@
+# /etc/conf.d/dropbear: config file for /etc/init.d/dropbear
+
+# see `dropbear -h` for more information
+# -w disables root logins
+# -p # changes the port number to listen on
+DROPBEAR_OPTS=""
diff --git a/net-misc/dropbear/files/dropbear.init.d b/net-misc/dropbear/files/dropbear.init.d
new file mode 100644
index 000000000000..bbc314852bc3
--- /dev/null
+++ b/net-misc/dropbear/files/dropbear.init.d
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use logger dns
+ need net
+}
+
+check_config() {
+ mkdir -p /etc/dropbear
+
+ local t k
+ for t in dss rsa ecdsa; do
+ k="/etc/dropbear/dropbear_${t}_host_key"
+ if [ ! -e ${k} ] ; then
+ # See if support is enabled for this key type.
+ if dropbearkey -h 2>&1 | grep -q " ${t}$" ; then
+ einfo "Generating ${k} ..."
+ dropbearkey -t ${t} -f ${k} >/dev/null
+ fi
+ fi &
+ done
+ wait
+}
+
+start() {
+ check_config || return 1
+ ebegin "Starting dropbear"
+ dropbear ${DROPBEAR_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping dropbear"
+ start-stop-daemon --stop --pidfile /var/run/dropbear.pid
+ eend $?
+}
diff --git a/net-misc/dropbear/metadata.xml b/net-misc/dropbear/metadata.xml
new file mode 100644
index 000000000000..5ac579bf073a
--- /dev/null
+++ b/net-misc/dropbear/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>embedded</herd>
+ <longdescription>
+I was looking for a small and secure SSH server to fit on a laptop with 4 megs ram and no hard
+disk, and couldn't find one which was satisfactory. I decided to write my own, and Dropbear is
+the result. It implements most required features of the SSH 2 protocol, and other features such
+as X11, TCP and Authentication Agent forwarding. Dropbear is Open Source software, distributed
+under a MIT-style license.
+</longdescription>
+ <longdescription lang="ja">
+私は 4MB の RAM とハードディスクを搭載しないラップトップ型にぴったりな小さ
+くて安全な SSH サーバを探していました。しかし満足するものは見つけられません
+でした。私は自身で作ろうと決意しました。その結果が Dropbear です。SSH 2 プ
+ロトコルに必要な機能の大半、他にも X11 や TCP、認証エージェント・フォワーデ
+ィングといった機能が実装してあります。Dropbear はオープンソースで、MIT スタ
+イルのライセンス下で配布されます。
+</longdescription>
+ <use>
+ <flag name="bsdpty">Add support for legacy BSD pty's rather than dynamic UNIX pty's -- do not use this flag unless you are absolutely sure you actually want it</flag>
+ <flag name="multicall">Build all the programs as one little binary (to save space)</flag>
+ <flag name="shadow">Enable shadow password support</flag>
+ </use>
+<upstream>
+ <remote-id type="cpe">cpe:/a:matt_johnston:dropbear_ssh_server</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/net-misc/dropbox-cli/Manifest b/net-misc/dropbox-cli/Manifest
new file mode 100644
index 000000000000..c322b75e5729
--- /dev/null
+++ b/net-misc/dropbox-cli/Manifest
@@ -0,0 +1,2 @@
+DIST dropbox-cli-1.6.0.py.xz 17632 SHA256 0030e948dbc6795fecde32c41a7c0779f3ec5131473fa4039ae9356e7238b3d6 SHA512 06fcbba67031c18fe1840f592d04039a7c78848d6e77ae8cca04881f5f72ada7fb368921e2ae3b92d161e49bf91eae0f41b559a210eacd0dc203c51134597857 WHIRLPOOL a0af611c354474e5bec27796bf07933de64d6bd8f3c04641238c8f5149111daf5b1f93a2b33bdc3c89f5386f7a864e7edfa0d9d784f72a2c2b1db9250bdfa6c7
+DIST dropbox-cli-1.py.xz 17580 SHA256 4773944647444b2fafef0b2db36cab6605de8ca6557d824d527e3725d65eecfe SHA512 d5510a66a5605e474059bb761cc2f33cd4d23481e85f040b049c36759a030f1e7072a9ad2cc7f72e59507767aa375ff3ea1c06d7bf702eb7ba7d698db2bfefe5 WHIRLPOOL 50740fa16f669321bf16a69358e8cada1f11c77f984b138b6ec0ff7a0c99f84d1515ddeab6483ffb578b5ccabe189def35b10d83a7c3b7a0d6e67e70c0675770
diff --git a/net-misc/dropbox-cli/dropbox-cli-1-r1.ebuild b/net-misc/dropbox-cli/dropbox-cli-1-r1.ebuild
new file mode 100644
index 000000000000..28283d740c02
--- /dev/null
+++ b/net-misc/dropbox-cli/dropbox-cli-1-r1.ebuild
@@ -0,0 +1,29 @@
+# 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
+
+DESCRIPTION="Cli interface for dropbox daemon (python)"
+HOMEPAGE="http://www.dropbox.com/"
+SRC_URI="https://dev.gentoo.org/~hasufell/distfiles/${P}.py.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="net-misc/dropbox
+ ${PYTHON_DEPS}"
+
+S=${WORKDIR}
+
+src_install() {
+ newbin ${P}.py ${PN}
+ python_replicate_script "${D}"/usr/bin/${PN}
+}
diff --git a/net-misc/dropbox-cli/dropbox-cli-1.6.0.ebuild b/net-misc/dropbox-cli/dropbox-cli-1.6.0.ebuild
new file mode 100644
index 000000000000..3a2c266fea96
--- /dev/null
+++ b/net-misc/dropbox-cli/dropbox-cli-1.6.0.ebuild
@@ -0,0 +1,29 @@
+# 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
+
+DESCRIPTION="Cli interface for dropbox (python), part of nautilus-dropbox"
+HOMEPAGE="http://www.dropbox.com/"
+SRC_URI="https://dev.gentoo.org/~hasufell/distfiles/${P}.py.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="net-misc/dropbox
+ ${PYTHON_DEPS}"
+
+S=${WORKDIR}
+
+src_install() {
+ newbin ${P}.py ${PN}
+ python_replicate_script "${D}"/usr/bin/${PN}
+}
diff --git a/net-misc/dropbox-cli/metadata.xml b/net-misc/dropbox-cli/metadata.xml
new file mode 100644
index 000000000000..11d49ae49fab
--- /dev/null
+++ b/net-misc/dropbox-cli/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>grozin@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
+
diff --git a/net-misc/dropbox/Manifest b/net-misc/dropbox/Manifest
new file mode 100644
index 000000000000..414ebb4c26a8
--- /dev/null
+++ b/net-misc/dropbox/Manifest
@@ -0,0 +1,12 @@
+DIST dropbox-lnx.x86-2.10.2.tar.gz 26078108 SHA256 a43e24342e5f337034cf0d378f5a532ad69ad59bf00eb8a2065c465c969e3455 SHA512 0fb408d7a221c470fbc59c4ddb1f65d4fcb2d33c855b37474b6202a58f7be04b9cf0ed1ea18080efdd02998fe370bdef99ce1e27b8f627515ba3db859251e5ef WHIRLPOOL a33260d2a8907d676230464c9b4200b12debe2ac8aae5a7322250218481f348a2cc4217a84155900cbe9284e4070d424fbc7589e7733fab79d98e2ee324c5e02
+DIST dropbox-lnx.x86-2.10.41.tar.gz 27099644 SHA256 f335301cbbb41cec84353a8f670d01d761de61c08f48b408f5bb79889fad6a38 SHA512 e0eca266c2571f9cf8b6172edf0971d2c7041d2aec0872c45e5f38101eac135d40aca3631268fc567313b8ec3846543a20f053d4c239393227fec0b2e767e9d7 WHIRLPOOL 6b3c528dea8f16f244a7034b9fde7ebcac1e1b4f555072641e0ebe307ceef05ae75d2ac1b7146b93ca9ba7c3eae6b895c8743c7d54c28c3e40602f083338dfaa
+DIST dropbox-lnx.x86-2.4.10.tar.gz 22095816 SHA256 c1f19bace5eb63ef1263721a0866ddaf061c6e126a1f9fa5faa3a70e2aa267cf SHA512 5d3c6ea6cb193cb6cd885d92915ca7ff59ce895b9f517e683c7e32c0979f972bf56b0a569dc7b35f1f15095c7f643562c81b23fc85d9dcca52c07052e5c17832 WHIRLPOOL 1bbe12e8ee4ed42992c984582e8e60c5cdd388bd1d1ba52d97c61bc86954d78ce73f04ac1be2cb465fee82eca9972b0a45060296f9c958897fd82fabed7b609f
+DIST dropbox-lnx.x86-2.6.33.tar.gz 23602308 SHA256 90c6bebb1dda19b56f68d22a2422436903559f646adcbc290672630df9465b76 SHA512 e26f9f4e393e17e63b387e303189fdd716abbfb96d44648fff3c98beac3f373a71e8446bf90b95ee067556264fe9b12264ca66dcf5b2ba509763276f8fa0b224 WHIRLPOOL 2a2cd43c6a4889f262515413a219b6d3df81e5faf377713b9b5a5b34f6d2fde211ae8d2b55d17c03b04b5079ea8d59957a909a34af1a36bc6d145866d91f03c3
+DIST dropbox-lnx.x86-2.8.4.tar.gz 24066498 SHA256 9014842c40953f3d7057a11cb537bb5fcb807a0f1794a5efb908bcd343a2d2c5 SHA512 3c4af0c500fc7f41a4e2040fd1ba56198315ada7ffedd1d722b917466831716802871dffe32d4671693b54a9fee3de3553f2f466a4dc02b34c57e39422c3a8b6 WHIRLPOOL 426c97ca84753d306f55f71ef6341648de28bb65b936483dca41bb8e4a96cab515da9b8926c6f5a926f186154c30a03611bb8a2aaf803c0addec2e791729bc4f
+DIST dropbox-lnx.x86-3.6.8.tar.gz 61283985 SHA256 bca1e028a5acab38864320580965947559bc5e74a073e8e3c68cd56fab115d54 SHA512 4d3c37e5d6ccf4de3f317920439a32eaffb5132fcce2f6491b1f9dec7c0a5e06266c9509711a5564e9d6613f6cd8c9f594a691de1e2ad2bcdb7c0df1b7964341 WHIRLPOOL e0a81a0f4b86b8efc9535ab13ad81887331959ac943145c4d4135298c04d966065ef2bbcb7d3f5f43df9650924232768f84941d190b91866e93bf38957d5c09e
+DIST dropbox-lnx.x86_64-2.10.2.tar.gz 26852053 SHA256 0780001da7af0ee8b07115f59d1998708e5aa36c50ce13f73f32d7c7c0a08d11 SHA512 0746643546bdcd2de71812a87ccf665df4a656750d899e2b67a3dfa958bf7f59fcb1c99109b6bb1424f5dfbb625d0756a7cc0c01ba09b4375ed177d05846256e WHIRLPOOL 787e5882f546377173e73fcb8a4bfe205c1659e562e0ef4aea9d62123fb684cd254c3962861ea2eb54c6fab895561c29a1c507760eb906625db55fac5aa083dd
+DIST dropbox-lnx.x86_64-2.10.41.tar.gz 27879035 SHA256 7db18d297a12cdfbb1e03cb21876d748a68846907c21a929058051e8d49d49e2 SHA512 801a8f55991331d5e79682385046bbdd880e4a2e93fbd8369be51070bb0c2bb1af66fcbca00c9aa87c70d4fba8c73575ac077f0e1bb5d880dff834767fd0d2cc WHIRLPOOL 5970bb783d5887502eca00a958c99ab641d3534a806496acd1f94b06ef10a7da20e1e1141f69e54d435277c4e47514955a7a6ddad8fef7593b17eaec41ce84ca
+DIST dropbox-lnx.x86_64-2.4.10.tar.gz 22867842 SHA256 1bd9cff2a4c3a03cd900cf8f7426ccf8d61e9e292666eba61493be26fe8945d4 SHA512 02e7798f515ac492cb40c8ea6b83a9b3d5849a07ea8c34414d5329a1d8c35c6faf7edaca511638b79594cf963a8363d720e70171e6e8f1a3d45b3e3b8018bb75 WHIRLPOOL f87f8309e92095032da209f15ae4905cbc68ee06d41548e2ddfb477e33a90a49b0147128e8e84cb3e0e3ea5d346dbba7aa95b295a238f1829e021c7cb68641e2
+DIST dropbox-lnx.x86_64-2.6.33.tar.gz 24379142 SHA256 b4a7888fe87f23469215103da4b25bbab34a97060abdcd431b32e00b6229c3c2 SHA512 65abf5d15402d0b2393e66321a56461c06953aa6db9a08a3dddfea3582b85f8b48b0538a254c83fb3351384c08c70e97c05d35bffc112b660ad52889646f5aac WHIRLPOOL 706f79dc84303c2e71d279bc8e823a8b51afbdd27780a9b0292bfd81121e1e4084265fd8cd2fb4b066529883aa968f0abf38b1a3155c11e5d87ac48ddcac6d79
+DIST dropbox-lnx.x86_64-2.8.4.tar.gz 24840576 SHA256 0a6e8558ed3c8dc84f8d8ded531fa12a4237169c40f54d8ea4d93967f28e0abe SHA512 253d97653c72c383cc551a97f66cae2bbbdb9ced87de8fab13d66730b86e6a58402963256a0ed55bf41e52d3427005bce0452ae8bb8f1a3fb53fed2d62143fba WHIRLPOOL e8f99d58c5ac9c544e333173661ec9b7b30472dacb3d06b2f798d658099cad8f41b368d87b939cefa6a36d72c1b289a59612961a00009bd55d20e8e75c2893a3
+DIST dropbox-lnx.x86_64-3.6.8.tar.gz 64000290 SHA256 91f0b6b2842e3dcd4606b16a4bac18d3caa95def31e46a480610d7a0b071c68d SHA512 693103e2ce2ba22854cdc2a69c725f5b4dccd59d273e5c5465db34884c3f8530f58faa68e03a4ad3f11e33d925af2880c2fbd10f949dd82eea0fe187d6839140 WHIRLPOOL 079b96ff891a6d9b3df01c1eb00b2a098b16dc1fad70295b31f82de43c185038e27257ddb4721aef18a0e65d40c3a1944937451df3f01d8d092feb9b00bde77c
diff --git a/net-misc/dropbox/dropbox-2.10.2.ebuild b/net-misc/dropbox/dropbox-2.10.2.ebuild
new file mode 100644
index 000000000000..c73da1d79764
--- /dev/null
+++ b/net-misc/dropbox/dropbox-2.10.2.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils gnome2-utils pax-utils systemd
+
+DESCRIPTION="Dropbox daemon (pretends to be GUI-less)"
+HOMEPAGE="http://dropbox.com/"
+SRC_URI="
+ x86? ( http://dl-web.dropbox.com/u/17/dropbox-lnx.x86-${PV}.tar.gz )
+ amd64? ( http://dl-web.dropbox.com/u/17/dropbox-lnx.x86_64-${PV}.tar.gz )"
+
+LICENSE="CC-BY-ND-3.0 FTL MIT LGPL-2 openssl dropbox"
+SLOT="0"
+KEYWORDS="amd64 x86 ~x86-linux"
+IUSE="+librsync-bundled X"
+RESTRICT="mirror strip"
+
+QA_PREBUILT="opt/.*"
+QA_EXECSTACK="opt/dropbox/dropbox"
+
+DEPEND="librsync-bundled? ( dev-util/patchelf )"
+
+# Be sure to have GLIBCXX_3.4.9, #393125
+# USE=X require wxGTK's dependencies. system-library cannot be used due to
+# missing symbol (CtlColorEvent). #443686
+RDEPEND="
+ X? (
+ dev-libs/glib:2
+ media-libs/libpng:1.2
+ sys-libs/zlib
+ virtual/jpeg
+ x11-libs/gtk+:2
+ x11-libs/libSM
+ x11-libs/libXinerama
+ x11-libs/libXxf86vm
+ x11-libs/pango[X]
+ x11-themes/hicolor-icon-theme
+ )
+ app-arch/bzip2
+ dev-libs/popt
+ !librsync-bundled? ( net-libs/librsync )
+ net-misc/wget
+ >=sys-devel/gcc-4.2.0
+ sys-libs/zlib
+"
+
+src_unpack() {
+ unpack ${A}
+ mkdir -p "${S}"
+ mv "${WORKDIR}"/.dropbox-dist/* "${S}" || die
+ mv "${S}"/dropbox-lnx.*-${PV}/* "${S}" || die
+ rmdir .dropbox-dist
+}
+
+src_prepare() {
+ rm -vf libbz2* libpopt.so.0 libpng12.so.0 || die
+ if use X ; then
+ mv images/hicolor/16x16/status "${T}" || die
+ else
+ rm -vrf *wx* images || die
+ fi
+ if use librsync-bundled ; then
+ patchelf --set-rpath '$ORIGIN' _librsync.so || die
+ else
+ rm -vf librsync.so.1 || die
+ fi
+ mv cffi-0.7.2-py2.7-*.egg dropbox_sqlite_ext-0.0-py2.7.egg distribute-0.6.26-py2.7.egg "${T}" || die
+ rm -rf *.egg library.zip || die
+ mv "${T}"/cffi-0.7.2-py2.7-*.egg "${T}"/dropbox_sqlite_ext-0.0-py2.7.egg "${T}"/distribute-0.6.26-py2.7.egg "${S}" || die
+ ln -s dropbox library.zip || die
+ pax-mark cm dropbox
+ mv README ACKNOWLEDGEMENTS "${T}" || die
+}
+
+src_install() {
+ local targetdir="/opt/dropbox"
+
+ insinto "${targetdir}"
+ doins -r *
+ fperms a+x "${targetdir}"/{dropbox,dropboxd}
+ dosym "${targetdir}/dropboxd" "/opt/bin/dropbox"
+
+ use X && doicon -s 16 -c status "${T}"/status
+
+ newinitd "${FILESDIR}"/dropbox.initd dropbox
+ newconfd "${FILESDIR}"/dropbox.conf dropbox
+ systemd_newunit "${FILESDIR}"/dropbox_at.service "dropbox@.service"
+
+ dodoc "${T}"/{README,ACKNOWLEDGEMENTS}
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-misc/dropbox/dropbox-2.10.41-r1.ebuild b/net-misc/dropbox/dropbox-2.10.41-r1.ebuild
new file mode 100644
index 000000000000..ddd5d25d1e96
--- /dev/null
+++ b/net-misc/dropbox/dropbox-2.10.41-r1.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils gnome2-utils pax-utils systemd
+
+DESCRIPTION="Dropbox daemon (pretends to be GUI-less)"
+HOMEPAGE="http://dropbox.com/"
+SRC_URI="
+ x86? ( http://dl-web.dropbox.com/u/17/dropbox-lnx.x86-${PV}.tar.gz )
+ amd64? ( http://dl-web.dropbox.com/u/17/dropbox-lnx.x86_64-${PV}.tar.gz )"
+
+LICENSE="CC-BY-ND-3.0 FTL MIT LGPL-2 openssl dropbox"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x86-linux"
+IUSE="+librsync-bundled selinux X"
+RESTRICT="mirror strip"
+
+QA_PREBUILT="opt/.*"
+QA_EXECSTACK="opt/dropbox/dropbox"
+
+DEPEND="librsync-bundled? ( dev-util/patchelf )"
+
+# Be sure to have GLIBCXX_3.4.9, #393125
+# USE=X require wxGTK's dependencies. system-library cannot be used due to
+# missing symbol (CtlColorEvent). #443686
+RDEPEND="
+ X? (
+ dev-libs/glib:2
+ media-libs/libpng:1.2
+ sys-libs/zlib
+ virtual/jpeg
+ x11-libs/gtk+:2
+ x11-libs/libSM
+ x11-libs/libXinerama
+ x11-libs/libXxf86vm
+ x11-libs/pango[X]
+ x11-themes/hicolor-icon-theme
+ )
+ app-arch/bzip2
+ dev-libs/popt
+ !librsync-bundled? ( net-libs/librsync )
+ net-misc/wget
+ >=sys-devel/gcc-4.2.0
+ sys-libs/zlib
+ selinux? ( sec-policy/selinux-dropbox )
+"
+
+src_unpack() {
+ unpack ${A}
+ mkdir -p "${S}"
+ mv "${WORKDIR}"/.dropbox-dist/* "${S}" || die
+ mv "${S}"/dropbox-lnx.*-${PV}/* "${S}" || die
+ rmdir .dropbox-dist
+}
+
+src_prepare() {
+ rm -vf libbz2* libpopt.so.0 libpng12.so.0 || die
+ if use X ; then
+ mv images/hicolor/16x16/status "${T}" || die
+ else
+ rm -vrf *wx* images || die
+ fi
+ if use librsync-bundled ; then
+ patchelf --set-rpath '$ORIGIN' _librsync.so || die
+ else
+ rm -vf librsync.so.1 || die
+ fi
+ mv cffi-0.7.2-py2.7-*.egg dropbox_sqlite_ext-0.0-py2.7.egg distribute-0.6.26-py2.7.egg "${T}" || die
+ rm -rf *.egg library.zip || die
+ mv "${T}"/cffi-0.7.2-py2.7-*.egg "${T}"/dropbox_sqlite_ext-0.0-py2.7.egg "${T}"/distribute-0.6.26-py2.7.egg "${S}" || die
+ ln -s dropbox library.zip || die
+ pax-mark cm dropbox
+ mv README ACKNOWLEDGEMENTS "${T}" || die
+}
+
+src_install() {
+ local targetdir="/opt/dropbox"
+
+ insinto "${targetdir}"
+ doins -r *
+ fperms a+x "${targetdir}"/{dropbox,dropboxd}
+ dosym "${targetdir}/dropboxd" "/opt/bin/dropbox"
+
+ use X && doicon -s 16 -c status "${T}"/status
+
+ newinitd "${FILESDIR}"/dropbox.initd dropbox
+ newconfd "${FILESDIR}"/dropbox.conf dropbox
+ systemd_newunit "${FILESDIR}"/dropbox_at.service "dropbox@.service"
+
+ dodoc "${T}"/{README,ACKNOWLEDGEMENTS}
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-misc/dropbox/dropbox-2.10.41.ebuild b/net-misc/dropbox/dropbox-2.10.41.ebuild
new file mode 100644
index 000000000000..523b718d98e2
--- /dev/null
+++ b/net-misc/dropbox/dropbox-2.10.41.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils gnome2-utils pax-utils systemd
+
+DESCRIPTION="Dropbox daemon (pretends to be GUI-less)"
+HOMEPAGE="http://dropbox.com/"
+SRC_URI="
+ x86? ( http://dl-web.dropbox.com/u/17/dropbox-lnx.x86-${PV}.tar.gz )
+ amd64? ( http://dl-web.dropbox.com/u/17/dropbox-lnx.x86_64-${PV}.tar.gz )"
+
+LICENSE="CC-BY-ND-3.0 FTL MIT LGPL-2 openssl dropbox"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x86-linux"
+IUSE="+librsync-bundled X"
+RESTRICT="mirror strip"
+
+QA_PREBUILT="opt/.*"
+QA_EXECSTACK="opt/dropbox/dropbox"
+
+DEPEND="librsync-bundled? ( dev-util/patchelf )"
+
+# Be sure to have GLIBCXX_3.4.9, #393125
+# USE=X require wxGTK's dependencies. system-library cannot be used due to
+# missing symbol (CtlColorEvent). #443686
+RDEPEND="
+ X? (
+ dev-libs/glib:2
+ media-libs/libpng:1.2
+ sys-libs/zlib
+ virtual/jpeg
+ x11-libs/gtk+:2
+ x11-libs/libSM
+ x11-libs/libXinerama
+ x11-libs/libXxf86vm
+ x11-libs/pango[X]
+ x11-themes/hicolor-icon-theme
+ )
+ app-arch/bzip2
+ dev-libs/popt
+ !librsync-bundled? ( net-libs/librsync )
+ net-misc/wget
+ >=sys-devel/gcc-4.2.0
+ sys-libs/zlib
+"
+
+src_unpack() {
+ unpack ${A}
+ mkdir -p "${S}"
+ mv "${WORKDIR}"/.dropbox-dist/* "${S}" || die
+ mv "${S}"/dropbox-lnx.*-${PV}/* "${S}" || die
+ rmdir .dropbox-dist
+}
+
+src_prepare() {
+ rm -vf libbz2* libpopt.so.0 libpng12.so.0 || die
+ if use X ; then
+ mv images/hicolor/16x16/status "${T}" || die
+ else
+ rm -vrf *wx* images || die
+ fi
+ if use librsync-bundled ; then
+ patchelf --set-rpath '$ORIGIN' _librsync.so || die
+ else
+ rm -vf librsync.so.1 || die
+ fi
+ mv cffi-0.7.2-py2.7-*.egg dropbox_sqlite_ext-0.0-py2.7.egg distribute-0.6.26-py2.7.egg "${T}" || die
+ rm -rf *.egg library.zip || die
+ mv "${T}"/cffi-0.7.2-py2.7-*.egg "${T}"/dropbox_sqlite_ext-0.0-py2.7.egg "${T}"/distribute-0.6.26-py2.7.egg "${S}" || die
+ ln -s dropbox library.zip || die
+ pax-mark cm dropbox
+ mv README ACKNOWLEDGEMENTS "${T}" || die
+}
+
+src_install() {
+ local targetdir="/opt/dropbox"
+
+ insinto "${targetdir}"
+ doins -r *
+ fperms a+x "${targetdir}"/{dropbox,dropboxd}
+ dosym "${targetdir}/dropboxd" "/opt/bin/dropbox"
+
+ use X && doicon -s 16 -c status "${T}"/status
+
+ newinitd "${FILESDIR}"/dropbox.initd dropbox
+ newconfd "${FILESDIR}"/dropbox.conf dropbox
+ systemd_newunit "${FILESDIR}"/dropbox_at.service "dropbox@.service"
+
+ dodoc "${T}"/{README,ACKNOWLEDGEMENTS}
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-misc/dropbox/dropbox-2.4.10.ebuild b/net-misc/dropbox/dropbox-2.4.10.ebuild
new file mode 100644
index 000000000000..e874eeda3209
--- /dev/null
+++ b/net-misc/dropbox/dropbox-2.4.10.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils gnome2-utils pax-utils systemd
+
+DESCRIPTION="Dropbox daemon (pretends to be GUI-less)"
+HOMEPAGE="http://dropbox.com/"
+SRC_URI="
+ x86? ( http://dl-web.dropbox.com/u/17/dropbox-lnx.x86-${PV}.tar.gz )
+ amd64? ( http://dl-web.dropbox.com/u/17/dropbox-lnx.x86_64-${PV}.tar.gz )"
+
+LICENSE="CC-BY-ND-3.0 FTL MIT LGPL-2 openssl dropbox"
+SLOT="0"
+KEYWORDS="amd64 x86 ~x86-linux"
+IUSE="+librsync-bundled X"
+RESTRICT="mirror strip"
+
+QA_PREBUILT="opt/.*"
+QA_EXECSTACK="opt/dropbox/dropbox"
+
+DEPEND="librsync-bundled? ( dev-util/patchelf )"
+
+# Be sure to have GLIBCXX_3.4.9, #393125
+# USE=X require wxGTK's dependencies. system-library cannot be used due to
+# missing symbol (CtlColorEvent). #443686
+RDEPEND="
+ X? (
+ dev-libs/glib:2
+ media-libs/libpng:1.2
+ sys-libs/zlib
+ virtual/jpeg
+ x11-libs/gtk+:2
+ x11-libs/libSM
+ x11-libs/libXinerama
+ x11-libs/libXxf86vm
+ x11-libs/pango[X]
+ x11-themes/hicolor-icon-theme
+ )
+ app-arch/bzip2
+ dev-libs/popt
+ !librsync-bundled? ( net-libs/librsync )
+ net-misc/wget
+ >=sys-devel/gcc-4.2.0
+ sys-libs/zlib
+"
+
+src_unpack() {
+ unpack ${A}
+ mkdir -p "${S}"
+ mv "${WORKDIR}"/.dropbox-dist/* "${S}" || die
+ rmdir .dropbox-dist
+}
+
+src_prepare() {
+ rm -vf libbz2* libpopt.so.0 libpng12.so.0 || die
+ if use X ; then
+ mv images/hicolor/16x16/status "${T}" || die
+ else
+ rm -vrf *wx* images || die
+ fi
+ if use librsync-bundled ; then
+ patchelf --set-rpath '$ORIGIN' _librsync.so || die
+ else
+ rm -vf librsync.so.1 || die
+ fi
+ mv cffi-0.6-py2.7-*.egg "${T}" || die
+ rm -rf *.egg library.zip || die
+ mv "${T}"/cffi-0.6-py2.7-*.egg "${S}" || die
+ ln -s dropbox library.zip || die
+ pax-mark cm dropbox
+ mv README ACKNOWLEDGEMENTS "${T}" || die
+}
+
+src_install() {
+ local targetdir="/opt/dropbox"
+
+ insinto "${targetdir}"
+ doins -r *
+ fperms a+x "${targetdir}"/{dropbox,dropboxd}
+ dosym "${targetdir}/dropboxd" "/opt/bin/dropbox"
+
+ use X && doicon -s 16 -c status "${T}"/status
+
+ newinitd "${FILESDIR}"/dropbox.initd dropbox
+ newconfd "${FILESDIR}"/dropbox.conf dropbox
+ systemd_newunit "${FILESDIR}"/dropbox_at.service "dropbox@.service"
+
+ dodoc "${T}"/{README,ACKNOWLEDGEMENTS}
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-misc/dropbox/dropbox-2.6.33.ebuild b/net-misc/dropbox/dropbox-2.6.33.ebuild
new file mode 100644
index 000000000000..5436774dabd5
--- /dev/null
+++ b/net-misc/dropbox/dropbox-2.6.33.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils gnome2-utils pax-utils systemd
+
+DESCRIPTION="Dropbox daemon (pretends to be GUI-less)"
+HOMEPAGE="http://dropbox.com/"
+SRC_URI="
+ x86? ( http://dl-web.dropbox.com/u/17/dropbox-lnx.x86-${PV}.tar.gz )
+ amd64? ( http://dl-web.dropbox.com/u/17/dropbox-lnx.x86_64-${PV}.tar.gz )"
+
+LICENSE="CC-BY-ND-3.0 FTL MIT LGPL-2 openssl dropbox"
+SLOT="0"
+KEYWORDS="amd64 x86 ~x86-linux"
+IUSE="+librsync-bundled X"
+RESTRICT="mirror strip"
+
+QA_PREBUILT="opt/.*"
+QA_EXECSTACK="opt/dropbox/dropbox"
+
+DEPEND="librsync-bundled? ( dev-util/patchelf )"
+
+# Be sure to have GLIBCXX_3.4.9, #393125
+# USE=X require wxGTK's dependencies. system-library cannot be used due to
+# missing symbol (CtlColorEvent). #443686
+RDEPEND="
+ X? (
+ dev-libs/glib:2
+ media-libs/libpng:1.2
+ sys-libs/zlib
+ virtual/jpeg
+ x11-libs/gtk+:2
+ x11-libs/libSM
+ x11-libs/libXinerama
+ x11-libs/libXxf86vm
+ x11-libs/pango[X]
+ x11-themes/hicolor-icon-theme
+ )
+ app-arch/bzip2
+ dev-libs/popt
+ !librsync-bundled? ( net-libs/librsync )
+ net-misc/wget
+ >=sys-devel/gcc-4.2.0
+ sys-libs/zlib
+"
+
+src_unpack() {
+ unpack ${A}
+ mkdir -p "${S}"
+ mv "${WORKDIR}"/.dropbox-dist/* "${S}" || die
+ rmdir .dropbox-dist
+}
+
+src_prepare() {
+ rm -vf libbz2* libpopt.so.0 libpng12.so.0 || die
+ if use X ; then
+ mv images/hicolor/16x16/status "${T}" || die
+ else
+ rm -vrf *wx* images || die
+ fi
+ if use librsync-bundled ; then
+ patchelf --set-rpath '$ORIGIN' _librsync.so || die
+ else
+ rm -vf librsync.so.1 || die
+ fi
+ mv cffi-0.7.2-py2.7-*.egg dropbox_sqlite_ext-0.0-py2.7.egg distribute-0.6.26-py2.7.egg "${T}" || die
+ rm -rf *.egg library.zip || die
+ mv "${T}"/cffi-0.7.2-py2.7-*.egg "${T}"/dropbox_sqlite_ext-0.0-py2.7.egg "${T}"/distribute-0.6.26-py2.7.egg "${S}" || die
+ ln -s dropbox library.zip || die
+ pax-mark cm dropbox
+ mv README ACKNOWLEDGEMENTS "${T}" || die
+}
+
+src_install() {
+ local targetdir="/opt/dropbox"
+
+ insinto "${targetdir}"
+ doins -r *
+ fperms a+x "${targetdir}"/{dropbox,dropboxd}
+ dosym "${targetdir}/dropboxd" "/opt/bin/dropbox"
+
+ use X && doicon -s 16 -c status "${T}"/status
+
+ newinitd "${FILESDIR}"/dropbox.initd dropbox
+ newconfd "${FILESDIR}"/dropbox.conf dropbox
+ systemd_newunit "${FILESDIR}"/dropbox_at.service "dropbox@.service"
+
+ dodoc "${T}"/{README,ACKNOWLEDGEMENTS}
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-misc/dropbox/dropbox-2.8.4.ebuild b/net-misc/dropbox/dropbox-2.8.4.ebuild
new file mode 100644
index 000000000000..f4d7197372bd
--- /dev/null
+++ b/net-misc/dropbox/dropbox-2.8.4.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils gnome2-utils pax-utils systemd
+
+DESCRIPTION="Dropbox daemon (pretends to be GUI-less)"
+HOMEPAGE="http://dropbox.com/"
+SRC_URI="
+ x86? ( http://dl-web.dropbox.com/u/17/dropbox-lnx.x86-${PV}.tar.gz )
+ amd64? ( http://dl-web.dropbox.com/u/17/dropbox-lnx.x86_64-${PV}.tar.gz )"
+
+LICENSE="CC-BY-ND-3.0 FTL MIT LGPL-2 openssl dropbox"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x86-linux"
+IUSE="+librsync-bundled X"
+RESTRICT="mirror strip"
+
+QA_PREBUILT="opt/.*"
+QA_EXECSTACK="opt/dropbox/dropbox"
+
+DEPEND="librsync-bundled? ( dev-util/patchelf )"
+
+# Be sure to have GLIBCXX_3.4.9, #393125
+# USE=X require wxGTK's dependencies. system-library cannot be used due to
+# missing symbol (CtlColorEvent). #443686
+RDEPEND="
+ X? (
+ dev-libs/glib:2
+ media-libs/libpng:1.2
+ sys-libs/zlib
+ virtual/jpeg
+ x11-libs/gtk+:2
+ x11-libs/libSM
+ x11-libs/libXinerama
+ x11-libs/libXxf86vm
+ x11-libs/pango[X]
+ x11-themes/hicolor-icon-theme
+ )
+ app-arch/bzip2
+ dev-libs/popt
+ !librsync-bundled? ( net-libs/librsync )
+ net-misc/wget
+ >=sys-devel/gcc-4.2.0
+ sys-libs/zlib
+"
+
+src_unpack() {
+ unpack ${A}
+ mkdir -p "${S}"
+ mv "${WORKDIR}"/.dropbox-dist/* "${S}" || die
+ rmdir .dropbox-dist
+}
+
+src_prepare() {
+ rm -vf libbz2* libpopt.so.0 libpng12.so.0 || die
+ if use X ; then
+ mv images/hicolor/16x16/status "${T}" || die
+ else
+ rm -vrf *wx* images || die
+ fi
+ if use librsync-bundled ; then
+ patchelf --set-rpath '$ORIGIN' _librsync.so || die
+ else
+ rm -vf librsync.so.1 || die
+ fi
+ mv cffi-0.7.2-py2.7-*.egg dropbox_sqlite_ext-0.0-py2.7.egg distribute-0.6.26-py2.7.egg "${T}" || die
+ rm -rf *.egg library.zip || die
+ mv "${T}"/cffi-0.7.2-py2.7-*.egg "${T}"/dropbox_sqlite_ext-0.0-py2.7.egg "${T}"/distribute-0.6.26-py2.7.egg "${S}" || die
+ ln -s dropbox library.zip || die
+ pax-mark cm dropbox
+ mv README ACKNOWLEDGEMENTS "${T}" || die
+}
+
+src_install() {
+ local targetdir="/opt/dropbox"
+
+ insinto "${targetdir}"
+ doins -r *
+ fperms a+x "${targetdir}"/{dropbox,dropboxd}
+ dosym "${targetdir}/dropboxd" "/opt/bin/dropbox"
+
+ use X && doicon -s 16 -c status "${T}"/status
+
+ newinitd "${FILESDIR}"/dropbox.initd dropbox
+ newconfd "${FILESDIR}"/dropbox.conf dropbox
+ systemd_newunit "${FILESDIR}"/dropbox_at.service "dropbox@.service"
+
+ dodoc "${T}"/{README,ACKNOWLEDGEMENTS}
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-misc/dropbox/dropbox-3.6.8.ebuild b/net-misc/dropbox/dropbox-3.6.8.ebuild
new file mode 100644
index 000000000000..d9cd2a8ea711
--- /dev/null
+++ b/net-misc/dropbox/dropbox-3.6.8.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils gnome2-utils pax-utils systemd
+
+DESCRIPTION="Dropbox daemon (pretends to be GUI-less)"
+HOMEPAGE="http://dropbox.com/"
+SRC_URI="
+ x86? ( http://dl-web.dropbox.com/u/17/dropbox-lnx.x86-${PV}.tar.gz )
+ amd64? ( http://dl-web.dropbox.com/u/17/dropbox-lnx.x86_64-${PV}.tar.gz )"
+
+LICENSE="CC-BY-ND-3.0 FTL MIT LGPL-2 openssl dropbox"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x86-linux"
+IUSE="+librsync-bundled selinux X"
+RESTRICT="mirror strip"
+
+QA_PREBUILT="opt/.*"
+QA_EXECSTACK="opt/dropbox/dropbox"
+
+DEPEND="librsync-bundled? ( dev-util/patchelf )"
+
+# Be sure to have GLIBCXX_3.4.9, #393125
+# USE=X require wxGTK's dependencies. system-library cannot be used due to
+# missing symbol (CtlColorEvent). #443686
+RDEPEND="
+ X? (
+ dev-libs/glib:2
+ dev-qt/qtdbus:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtquick1:5
+ dev-qt/qtwebkit:5
+ dev-qt/qtwidgets:5
+ media-libs/libpng:1.2
+ sys-libs/zlib
+ virtual/jpeg
+ x11-libs/gtk+:2
+ x11-libs/libSM
+ x11-libs/libXinerama
+ x11-libs/libXxf86vm
+ x11-libs/pango[X]
+ x11-misc/wmctrl
+ x11-themes/hicolor-icon-theme
+ )
+ !librsync-bundled? ( net-libs/librsync )
+ selinux? ( sec-policy/selinux-dropbox )
+ app-arch/bzip2
+ dev-lang/python:2.7
+ dev-libs/popt
+ net-misc/wget
+ >=sys-devel/gcc-4.2.0
+ sys-libs/zlib
+"
+
+src_unpack() {
+ unpack ${A}
+ mkdir -p "${S}"
+ mv "${WORKDIR}"/.dropbox-dist/* "${S}" || die
+ mv "${S}"/dropbox-lnx.*-${PV}/* "${S}" || die
+ rmdir .dropbox-dist
+}
+
+src_prepare() {
+ local target=(
+ cffi-0.8.6-py2.7-*.egg
+ dropbox_sqlite_ext-0.0-py2.7.egg
+ futures-2.1.3-py2.7.egg
+ requests-1.2.3-py2.7.egg
+ setuptools-12.3-py2.7.egg
+ )
+
+ rm -vf libbz2* libpopt.so.0 libpng12.so.0 || die
+ rm -vf libdrm.so.2 libffi.so.6 libGL.so.1 libX11* || die
+ rm -vf libQt5* libicu* qt.conf || die
+ rm -vf wmctrl || die
+ if use X ; then
+ mv images/hicolor/16x16/status "${T}" || die
+ else
+ rm -vrf PyQt5* *pyqt5* images || die
+ fi
+ if use librsync-bundled ; then
+ patchelf --set-rpath '$ORIGIN' _librsync.so || die
+ else
+ rm -vf librsync.so.1 || die
+ fi
+ mv ${target[@]} "${T}" || die
+ rm -rf *.egg library.zip || die
+ (cd "${T}"; mv ${target[@]} "${S}") || die
+ ln -s dropbox library.zip || die
+ pax-mark cm dropbox
+ mv README ACKNOWLEDGEMENTS "${T}" || die
+}
+
+src_install() {
+ local targetdir="/opt/dropbox"
+
+ insinto "${targetdir}"
+ doins -r *
+ fperms a+x "${targetdir}"/{dropbox,dropboxd}
+ dosym "${targetdir}/dropboxd" "/opt/bin/dropbox"
+
+ use X && doicon -s 16 -c status "${T}"/status
+
+ make_desktop_entry "${PN}" "Dropbox"
+
+ newinitd "${FILESDIR}"/dropbox.initd dropbox
+ newconfd "${FILESDIR}"/dropbox.conf dropbox
+ systemd_newunit "${FILESDIR}"/dropbox_at.service "dropbox@.service"
+
+ dodoc "${T}"/{README,ACKNOWLEDGEMENTS}
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-misc/dropbox/files/dropbox.conf b/net-misc/dropbox/files/dropbox.conf
new file mode 100644
index 000000000000..c20c3c4694ef
--- /dev/null
+++ b/net-misc/dropbox/files/dropbox.conf
@@ -0,0 +1,14 @@
+# /etc/conf.d/dropbox.conf: config file for /etc/init.d/dropbox
+
+# Users to run dropbox
+DROPBOX_USERS=""
+
+# integer [-20 .. 19 ] default 0
+# change the priority of the server -20 (high) to 19 (low)
+# see nice(1) for description
+#NICE=0
+
+# See start-stop-daemon(8) for possible settings
+#IONICE=2
+
+PID_DIR=/var/run/dropbox
diff --git a/net-misc/dropbox/files/dropbox.initd b/net-misc/dropbox/files/dropbox.initd
new file mode 100644
index 000000000000..07dce38e9186
--- /dev/null
+++ b/net-misc/dropbox/files/dropbox.initd
@@ -0,0 +1,66 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+depend() {
+ need localmount net
+ after bootmisc
+}
+
+start() {
+ local tmpnice="${NICE:+"--nicelevel "}${NICE}"
+ local tmpionice="${IONICE:+"--ionice "}${IONICE}"
+ local started=""
+
+ ebegin "Starting dropbox"
+ for dbuser in ${DROPBOX_USERS}; do
+ local homedir=$(eval echo ~${dbuser})
+ if test -d "${homedir}" && \
+ echo 0 > ${homedir}/.dropbox/dropbox.pid && \
+ start-stop-daemon -S -b \
+ ${tmpnice} ${tmpionice} \
+ -u ${dbuser} -v \
+ -p ${homedir}/.dropbox/dropbox.pid \
+ -e HOME=${homedir} \
+ -x /opt/bin/dropbox; then
+ started="${started} ${dbuser}"
+ else
+ eend $?
+ eerror "Failed to start dropbox for ${dbuser}"
+ if [ -n "${started}" ]; then
+ eerror "Stopping already started dropbox"
+ DROPBOX_USERS=${started} stop
+ fi
+ return 1
+ fi
+ done
+ if [ -z "${started}" ];then
+ eerror "No dropbox started"
+ eend 1
+ else
+ eend 0
+ fi
+}
+
+stop() {
+ local retval=0
+ ebegin "Stopping dropbox"
+ for dbuser in ${DROPBOX_USERS}; do
+ local homedir=$(eval echo ~${dbuser})
+ start-stop-daemon --stop \
+ --pidfile ${homedir}/.dropbox/dropbox.pid || retval=$?
+ done
+ eend ${retval}
+}
+
+status() {
+ for dbuser in ${DROPBOX_USERS}; do
+ local homedir=$(eval echo ~${dbuser})
+ if [ -e ${homedir}/.dropbox/dropbox.pid ] ; then
+ echo "dropboxd for USER $dbuser: running."
+ else
+ echo "dropboxd for USER $dbuser: not running."
+ fi
+ done
+}
diff --git a/net-misc/dropbox/files/dropbox_at.service b/net-misc/dropbox/files/dropbox_at.service
new file mode 100644
index 000000000000..1cea6177ce7b
--- /dev/null
+++ b/net-misc/dropbox/files/dropbox_at.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Dropbox
+After=local-fs.target network.target
+
+[Service]
+ExecStart=/opt/dropbox/dropboxd
+ExecReload=/bin/kill -HUP $MAINPID
+KillMode=process
+Restart=always
+User=%I
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/dropbox/metadata.xml b/net-misc/dropbox/metadata.xml
new file mode 100644
index 000000000000..42714a4dadd3
--- /dev/null
+++ b/net-misc/dropbox/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>
+ <use>
+ <flag name="librsync-bundled">Use bundled librsync library</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/efax/Manifest b/net-misc/efax/Manifest
new file mode 100644
index 000000000000..a49112b4e276
--- /dev/null
+++ b/net-misc/efax/Manifest
@@ -0,0 +1,2 @@
+DIST efax-0.9a-001114.tar.gz 97402 SHA256 46abddf13f7565ea0c9d85b92845cdb32fb265c47cfc84c972e11a0219cda8ea SHA512 b6361f84a8239e515cf29dbcbfde3d38648b73e7acfc72a0e2ced4ff2dd801c73bbccf5d34fb8aa065ec8b8bfc694a58f6d8dc00bb9e9a63e580be618a45228b WHIRLPOOL 790aa776668f58aaea3b1be16daec47e223fea08e8104647427bc80d63b52037ac526f2d8696dc3d93b2ff6efd7bb7b0b6c7bbc251d5db911788b805d13b6f01
+DIST efax_0.9a-19.diff.gz 18178 SHA256 eb039ae8e4be159e262bbb11e1de5596b249ba22f67a9bd3bfdbab0da3964197 SHA512 8b1a2d007ebba73b772400eb1e0ccc61d832775590ac4fd6e171008c9741409118db099b444dc8da04dd87f1cb7025a9af62f60b2c3ccba21cc89863a2909735 WHIRLPOOL 521e647c564216d016efa1cf763fb9ca5977effe310be3db05c9d0401eea25c9bc41e58ddadcd711a4e7f96b034efce189ea346866c86cff30cd3212f1e0c4d8
diff --git a/net-misc/efax/efax-0.9a-r4.ebuild b/net-misc/efax/efax-0.9a-r4.ebuild
new file mode 100644
index 000000000000..b4627f25d454
--- /dev/null
+++ b/net-misc/efax/efax-0.9a-r4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils
+
+S="${WORKDIR}/${P}-001114"
+
+DESCRIPTION="A simple fax program for single-user systems"
+HOMEPAGE="http://www.cce.com/efax"
+SRC_URI="http://www.cce.com/efax/download/${P}-001114.tar.gz
+ mirror://debian/pool/main/e/efax/efax_0.9a-19.diff.gz"
+
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+SLOT="0"
+LICENSE="GPL-2"
+
+src_prepare () {
+ epatch "${WORKDIR}/${PN}_${PV}-19.diff"
+ rm -f "${S}"/${P}/debian/patches/series "${S}"/${P}/debian/patches/00list
+ EPATCH_FORCE="yes" epatch "${S}"/${P}/debian/patches/*
+
+ epatch "${FILESDIR}/${P}-fax-command.patch" #327737
+
+ # remove strip command as per bug #240932
+ sed -i -e '/strip/d' Makefile
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+}
+
+src_install () {
+ dobin efax efix fax
+ doman efax.1 efix.1
+ newman fax.1 efax-fax.1 # Don't collide with net-dialup/mgetty, bug #429808
+ dodoc README
+}
diff --git a/net-misc/efax/files/efax-0.9a-fax-command.patch b/net-misc/efax/files/efax-0.9a-fax-command.patch
new file mode 100644
index 000000000000..92bec22aa879
--- /dev/null
+++ b/net-misc/efax/files/efax-0.9a-fax-command.patch
@@ -0,0 +1,10 @@
+--- fax 2010/07/11 02:05:19 1.1
++++ fax 2010/07/11 02:05:37
+@@ -773,6 +773,7 @@
+ $GS -q -sDEVICE=tiffg3 -r$RES -dNOPAUSE -dSAFER \
+ -sOutputFile=$BASENAME.%03d \
+ -sPAPERSIZE=$PAGE \
++ -dMaxStripSize=0 \
+ $BASENAME </dev/null >/dev/null )
+ ;;
+ II*|MM*|P4*)
diff --git a/net-misc/efax/metadata.xml b/net-misc/efax/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/net-misc/efax/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/electrum/Manifest b/net-misc/electrum/Manifest
new file mode 100644
index 000000000000..bad03d534301
--- /dev/null
+++ b/net-misc/electrum/Manifest
@@ -0,0 +1,2 @@
+DIST Electrum-2.1.1.tar.gz 1778994 SHA256 958c7113072aa4a00a7e58a6e325d952fc35896a8678952cf6487636f74164e0 SHA512 06277a810a6533cc800c6813f874a0a6e3a7e598bdd47b73a6edb440bc5efefc56edacc44c15349e3d0c72d350700c67025f43e5478b4ae838af57acc1c91f52 WHIRLPOOL 2bf9392ebbd6e7b63e4e1e12cf72356dae1e1605a3c543c3a174229247fbb280412df5fac37a195b815018b8425d88618be54d4f3b58e37273ba40776f6b3765
+DIST Electrum-2.3.3.tar.gz 1971994 SHA256 72bac30a4d82c8fbc453fab2d1fa391af690884e1727088aa969d25891a9fc0d SHA512 26c2d3eaece738a67546168d82a89c7bd5c71a146c678d186514626027d6edac4e985f08e5d6ce34217b91cefa88be0174f5f45e8caba5da4c50911780e37f1b WHIRLPOOL e10bf9d10c64e1950dd2bb48ce1fca2950acdeefd99483825751acbbf29806494cbb629ac1d51f24978a8a6a2df2ce73de2910380f8e26e4a0884bcc1f116406
diff --git a/net-misc/electrum/electrum-2.1.1.ebuild b/net-misc/electrum/electrum-2.1.1.ebuild
new file mode 100644
index 000000000000..6307463abbea
--- /dev/null
+++ b/net-misc/electrum/electrum-2.1.1.ebuild
@@ -0,0 +1,144 @@
+# 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 eutils distutils-r1 gnome2-utils
+
+MY_P="Electrum-${PV}"
+DESCRIPTION="User friendly Bitcoin client"
+HOMEPAGE="https://electrum.org/"
+SRC_URI="https://download.electrum.org/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+LINGUAS="ar_SA cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM id_ID it_IT ja_JP ky_KG lv_LV nl_NL pl_PL pt_BR pt_PT ro_RO ru_RU sk_SK sl_SI ta_IN th_TH vi_VN zh_CN"
+
+IUSE="cli cosign +fiat greenaddress_it gtk3 ncurses qrcode +qt4 sync trustedcoin_com vkb"
+
+for lingua in ${LINGUAS}; do
+ IUSE+=" linguas_${lingua}"
+done
+
+REQUIRED_USE="
+ || ( cli gtk3 ncurses qt4 )
+ cosign? ( qt4 )
+ fiat? ( qt4 )
+ greenaddress_it? ( qt4 )
+ qrcode? ( qt4 )
+ sync? ( qt4 )
+ trustedcoin_com? ( qt4 )
+ vkb? ( qt4 )
+"
+
+RDEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/ecdsa-0.9[${PYTHON_USEDEP}]
+ dev-python/slowaes[${PYTHON_USEDEP}]
+ dev-python/pbkdf2[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/pyasn1[${PYTHON_USEDEP}]
+ dev-python/pyasn1-modules[${PYTHON_USEDEP}]
+ dev-python/tlslite[${PYTHON_USEDEP}]
+ dev-python/qrcode[${PYTHON_USEDEP}]
+ dev-python/socksipy[${PYTHON_USEDEP}]
+ dev-libs/protobuf[python,${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ gtk3? (
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ x11-libs/gtk+:3[introspection]
+ )
+ qrcode? ( media-gfx/zbar[python,v4l,${PYTHON_USEDEP}] )
+ qt4? (
+ dev-python/PyQt4[${PYTHON_USEDEP}]
+ )
+ ncurses? ( dev-lang/python )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS="RELEASE-NOTES"
+
+src_prepare() {
+ # Don't advise using PIP
+ sed -i "s/On Linux, try 'sudo pip install zbar'/Re-emerge Electrum with the qrcode USE flag/" lib/qrscanner.py || die
+
+ # Prevent icon from being installed in the wrong location
+ sed -i '/icons/d' setup.py || die
+
+ validate_desktop_entries
+
+ # Remove unrequested localization files:
+ for lang in ${LINGUAS}; do
+ use "linguas_${lang}" && continue
+ rm -r "lib/locale/${lang}" || die
+ done
+
+ local wordlist=
+ # french is unfinished
+ for wordlist in \
+ $(usex linguas_es_ES '' spanish) \
+ $(usex linguas_pt_BR '' $(usex linguas_pt_PT '' portuguese)) \
+ french \
+ $(usex linguas_ja_JP '' japanese) \
+ ; do
+ rm "lib/wordlist/${wordlist}.txt" || die
+ sed -i "/${wordlist}\\.txt/d" lib/mnemonic.py || die
+ done
+
+ # Remove unrequested GUI implementations:
+ local gui
+ for gui in \
+ $(usex cli '' stdio) \
+ $(usex gtk3 '' gtk ) \
+ $(usex qt4 '' qt ) \
+ $(usex ncurses '' text ) \
+ ; do
+ rm gui/"${gui}"* -r || die
+ done
+
+ if ! use qt4; then
+ sed -i "s/'electrum_gui\\.qt',//;/\"qt\\/themes/d" setup.py || die
+ local bestgui=$(usex gtk3 gtk $(usex ncurses text stdio))
+ sed -i "s/\(config.get('gui', \?\)'classic'/\1'${bestgui}'/" electrum || die
+ fi
+
+ local plugin
+ # btchipwallet requires python btchip module (and dev-python/pyusb)
+ # trezor requires python trezorlib module
+ for plugin in \
+ $(usex cosign '' cosigner_pool ) \
+ $(usex fiat '' exchange_rate ) \
+ $(usex greenaddress_it '' greenaddress_instant) \
+ $(usex sync '' labels ) \
+ trezor \
+ $(usex trustedcoin_com '' trustedcoin ) \
+ $(usex vkb '' virtualkeyboard ) \
+ ; do
+ rm plugins/"${plugin}"* || die
+ done
+
+ distutils-r1_src_prepare
+}
+
+src_install() {
+ doicon -s 128 icons/${PN}.png
+ distutils-r1_src_install
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-misc/electrum/electrum-2.3.3.ebuild b/net-misc/electrum/electrum-2.3.3.ebuild
new file mode 100644
index 000000000000..64d73284704d
--- /dev/null
+++ b/net-misc/electrum/electrum-2.3.3.ebuild
@@ -0,0 +1,144 @@
+# 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 eutils distutils-r1 gnome2-utils
+
+MY_P="Electrum-${PV}"
+DESCRIPTION="User friendly Bitcoin client"
+HOMEPAGE="https://electrum.org/"
+SRC_URI="https://download.electrum.org/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+LINGUAS="ar_SA cs_CZ da_DK de_DE el_GR eo_UY es_ES fr_FR hu_HU hy_AM id_ID it_IT ja_JP ky_KG lv_LV nl_NL pl_PL pt_BR pt_PT ro_RO ru_RU sk_SK sl_SI ta_IN th_TH vi_VN zh_CN"
+
+IUSE="cli cosign +fiat greenaddress_it gtk3 ncurses qrcode +qt4 sync trustedcoin_com vkb"
+
+for lingua in ${LINGUAS}; do
+ IUSE+=" linguas_${lingua}"
+done
+
+REQUIRED_USE="
+ || ( cli gtk3 ncurses qt4 )
+ cosign? ( qt4 )
+ fiat? ( qt4 )
+ greenaddress_it? ( qt4 )
+ qrcode? ( qt4 )
+ sync? ( qt4 )
+ trustedcoin_com? ( qt4 )
+ vkb? ( qt4 )
+"
+
+RDEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/ecdsa-0.9[${PYTHON_USEDEP}]
+ dev-python/slowaes[${PYTHON_USEDEP}]
+ dev-python/pbkdf2[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/pyasn1[${PYTHON_USEDEP}]
+ dev-python/pyasn1-modules[${PYTHON_USEDEP}]
+ dev-python/tlslite[${PYTHON_USEDEP}]
+ dev-python/qrcode[${PYTHON_USEDEP}]
+ dev-python/socksipy[${PYTHON_USEDEP}]
+ dev-libs/protobuf[python,${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ gtk3? (
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ x11-libs/gtk+:3[introspection]
+ )
+ qrcode? ( media-gfx/zbar[python,v4l,${PYTHON_USEDEP}] )
+ qt4? (
+ dev-python/PyQt4[${PYTHON_USEDEP}]
+ )
+ ncurses? ( dev-lang/python )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS="RELEASE-NOTES"
+
+src_prepare() {
+ # Don't advise using PIP
+ sed -i "s/On Linux, try 'sudo pip install zbar'/Re-emerge Electrum with the qrcode USE flag/" lib/qrscanner.py || die
+
+ # Prevent icon from being installed in the wrong location
+ sed -i '/icons/d' setup.py || die
+
+ validate_desktop_entries
+
+ # Remove unrequested localization files:
+ for lang in ${LINGUAS}; do
+ use "linguas_${lang}" && continue
+ rm -r "lib/locale/${lang}" || die
+ done
+
+ local wordlist=
+ # french is unfinished
+ for wordlist in \
+ $(usex linguas_es_ES '' spanish) \
+ $(usex linguas_pt_BR '' $(usex linguas_pt_PT '' portuguese)) \
+ french \
+ $(usex linguas_ja_JP '' japanese) \
+ ; do
+ rm "lib/wordlist/${wordlist}.txt" || die
+ sed -i "/${wordlist}\\.txt/d" lib/mnemonic.py || die
+ done
+
+ # Remove unrequested GUI implementations:
+ local gui
+ for gui in \
+ $(usex cli '' stdio) \
+ $(usex gtk3 '' gtk ) \
+ $(usex qt4 '' qt ) \
+ $(usex ncurses '' text ) \
+ ; do
+ rm gui/"${gui}"* -r || die
+ done
+
+ if ! use qt4; then
+ sed -i "s/'electrum_gui\\.qt',//;/\"qt\\/themes/d" setup.py || die
+ local bestgui=$(usex gtk3 gtk $(usex ncurses text stdio))
+ sed -i "s/\(config.get('gui', \?\)'classic'/\1'${bestgui}'/" electrum || die
+ fi
+
+ local plugin
+ # btchipwallet requires python btchip module (and dev-python/pyusb)
+ # trezor requires python trezorlib module
+ for plugin in \
+ $(usex cosign '' cosigner_pool ) \
+ $(usex fiat '' exchange_rate ) \
+ $(usex greenaddress_it '' greenaddress_instant) \
+ $(usex sync '' labels ) \
+ trezor \
+ $(usex trustedcoin_com '' trustedcoin ) \
+ $(usex vkb '' virtualkeyboard ) \
+ ; do
+ rm plugins/"${plugin}"* || die
+ done
+
+ distutils-r1_src_prepare
+}
+
+src_install() {
+ doicon -s 128 icons/${PN}.png
+ distutils-r1_src_install
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-misc/electrum/metadata.xml b/net-misc/electrum/metadata.xml
new file mode 100644
index 000000000000..b87011874fc5
--- /dev/null
+++ b/net-misc/electrum/metadata.xml
@@ -0,0 +1,32 @@
+<?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>
+ <maintainer>
+ <email>maksverver@geocities.com</email>
+ <name>Maks Verver</name>
+ </maintainer>
+ <maintainer>
+ <email>emery@vfemail.net</email>
+ <name>Emery Hemingway</name>
+ </maintainer>
+ <use>
+ <flag name='cli'>Enables the CLI interface</flag>
+ <flag name='cosign'>Enable plugin to support multisig wallets between multiple Electrum clients</flag>
+ <flag name='fiat'>Enable plugin for looking up fiat values of bitcoin</flag>
+ <flag name='greenaddress_it'>Enable plugin to verify GreenAddress.it instant transactions</flag>
+ <flag name='gtk3'>Enable support for gtk+3</flag>
+ <flag name='qrcode'>Enable QR code scanning with <pkg>media-gfx/zbar</pkg></flag>
+ <flag name='sync'>Enable plugin to sync wallet metadata across multiple Electrum clients</flag>
+ <flag name='trustedcoin_com'>Enable plugin to use two-factor service by TrustedCoin.com</flag>
+ <flag name='vkb'>Enable plugin for virtual keyboard</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/elliptics-eblob/Manifest b/net-misc/elliptics-eblob/Manifest
new file mode 100644
index 000000000000..e965ca51173c
--- /dev/null
+++ b/net-misc/elliptics-eblob/Manifest
@@ -0,0 +1,2 @@
+DIST eblob-0.0.1.tar.gz 353118 SHA256 eb19e68f42d0fd1140f874aa115186e542e395dbad1a22e550b5dc3b50760c8b SHA512 fa5f9a0773ac7ef6288a5ed77b6d1c6c65fcdc1bff1890b6e99c3748ea0f07124ef88b91f4e0d61aa896bb00b85ff95417362cbc41d0f4216f2f78e299aa1a10 WHIRLPOOL 11a31a9dcab869a1592db5380d0675f7c046ebb2de864c735ade3c9d859d1d9225f2f47307d3fa3a77f9f5fb267d5156fd964a07c2c34ae3638219f87088fbfd
+DIST elliptics-eblob-0.22.16.zip 191321 SHA256 a9b9c2160473e2faa73d0c0493522d1ca6e1f1e199b46aaf111a4bd0b5880dc2 SHA512 bb8e00ecd8b111032a476cf4cdcbc4151f02c7166aebe0de3890c4d79d456249765e82ec70df38ffe1dcff3d6dd5ed7a2774aa5c21075e381ed39e2de00179a3 WHIRLPOOL 346ad194408ceac074e777e756cc3938f4117c790694e75ec7788b62668818d58231ef9ef35c533a33639b845a79090f531e7bed8699fb20c567df333efaa470
diff --git a/net-misc/elliptics-eblob/elliptics-eblob-0.0.1.ebuild b/net-misc/elliptics-eblob/elliptics-eblob-0.0.1.ebuild
new file mode 100644
index 000000000000..37c48292db04
--- /dev/null
+++ b/net-misc/elliptics-eblob/elliptics-eblob-0.0.1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+PYTHON_DEPEND="python? 2"
+
+inherit eutils autotools python flag-o-matic
+
+DESCRIPTION="The elliptics network - eblob backend"
+HOMEPAGE="http://www.ioremap.net/projects/elliptics"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="python"
+RDEPEND="dev-libs/openssl
+ python? ( dev-libs/boost[python] )"
+DEPEND="${RDEPEND}"
+
+MY_PN="eblob"
+SRC_URI="http://www.ioremap.net/archive/${MY_PN}/${MY_PN}-${PV}.tar.gz"
+
+S=${WORKDIR}/${MY_PN}-${PV}
+
+src_prepare(){
+ use python || sed -i 's/SUBDIRS = .*/SUBDIRS = include library/' "${S}/Makefile.am"
+ eautoreconf
+}
+
+src_configure(){
+ # 'checking trying to link with boost::python... no' due '-Wl,--as-needed'
+ use python && filter-ldflags -Wl,--as-needed
+ econf \
+ --with-libatomic-path=/dev/null \
+ $(use_with python boost)
+}
+
+src_install(){
+ emake install DESTDIR="${D}" || die
+ find "${D}" -name '*.la' -exec rm -f {} +
+}
diff --git a/net-misc/elliptics-eblob/elliptics-eblob-0.22.16.ebuild b/net-misc/elliptics-eblob/elliptics-eblob-0.22.16.ebuild
new file mode 100644
index 000000000000..cc4ae62311f3
--- /dev/null
+++ b/net-misc/elliptics-eblob/elliptics-eblob-0.22.16.ebuild
@@ -0,0 +1,41 @@
+# 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-single-r1 flag-o-matic cmake-utils
+
+DESCRIPTION="The elliptics network - eblob backend"
+HOMEPAGE="http://www.ioremap.net/projects/elliptics"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="python"
+RDEPEND="
+ app-arch/snappy
+ dev-libs/openssl
+ dev-libs/boost[python]
+ dev-libs/handystats"
+DEPEND="${RDEPEND}"
+
+MY_PN="eblob"
+SRC_URI="https://github.com/reverbrain/eblob/archive/v${PV}.zip -> ${P}.zip"
+
+S=${WORKDIR}/${MY_PN}-${PV}
+
+src_configure(){
+ # 'checking trying to link with boost::python... no' due '-Wl,--as-needed'
+ use python && filter-ldflags -Wl,--as-needed
+ cmake-utils_src_configure
+}
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_install() {
+ cd "${BUILD_DIR}" && emake DESTDIR="${D}" install
+ cd "${S}"
+}
diff --git a/net-misc/elliptics-eblob/metadata.xml b/net-misc/elliptics-eblob/metadata.xml
new file mode 100644
index 000000000000..43acb2cc82ef
--- /dev/null
+++ b/net-misc/elliptics-eblob/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>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">reverbrain/eblob</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/elliptics/Manifest b/net-misc/elliptics/Manifest
new file mode 100644
index 000000000000..556592aa2754
--- /dev/null
+++ b/net-misc/elliptics/Manifest
@@ -0,0 +1 @@
+DIST elliptics-2.19.2.6.tar.gz 217118 SHA256 33803bea4f1bce448abf0c3203b9b2828ccde8dbb4b2b1a234d187b1a73a5436 SHA512 63670812fe422b2b02335e8ff248bdac19a0825a69118d3afa473c7775b177b469078c2dab47ace08643859e92576e1cdcdf44388489994b9560e96e7fbb400e WHIRLPOOL 44c334b238d0fa6a5767815cb9ccaa9bef68279b4314f405e8c78ea53e40a6210d4dc4e31fc62e665886f25272c079eef4b94a8b75fd0a0c2d5a9d0815227088
diff --git a/net-misc/elliptics/elliptics-2.19.2.6.ebuild b/net-misc/elliptics/elliptics-2.19.2.6.ebuild
new file mode 100644
index 000000000000..052d07f263db
--- /dev/null
+++ b/net-misc/elliptics/elliptics-2.19.2.6.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+PYTHON_DEPEND="2"
+
+DESCRIPTION="Elliptics network is a fault tolerant key/value storage without dedicated metadata servers"
+HOMEPAGE="http://www.ioremap.net/projects/elliptics"
+LICENSE="GPL-2"
+SLOT="0"
+
+inherit user eutils python flag-o-matic cmake-utils
+
+KEYWORDS="~x86 ~amd64"
+IUSE="fastcgi python"
+RDEPEND="app-arch/snappy
+ dev-libs/openssl
+ fastcgi? ( dev-libs/fcgi )
+ net-misc/elliptics-eblob
+ dev-libs/boost[python]
+ dev-libs/libevent
+ dev-libs/leveldb
+ dev-libs/smack
+ dev-db/kyotocabinet
+ net-misc/cocaine-core
+ net-libs/zeromq"
+DEPEND="${RDEPEND}"
+
+SRC_URI="https://github.com/reverbrain/elliptics/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+pkg_setup() {
+ enewgroup elliptics
+ enewuser elliptics -1 -1 /dev/null elliptics
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_configure(){
+ use python && filter-ldflags -Wl,--as-needed
+ cmake-utils_src_configure
+}
+
+src_install(){
+ cmake-utils_src_install
+
+ use fastcgi && example/fcgi/lighttpd-fastcgi-elliptics.conf
+ dodoc doc/design_notes.txt \
+ doc/io_storage_backend.txt \
+ example/EXAMPLE \
+ example/ioserv.conf
+
+ # init script stuff
+ # too many changes since the old version, needs to be re-added
+ #newinitd "${FILESDIR}"/elliptics.initd elliptics || die
+ #newconfd "${FILESDIR}"/elliptics.confd elliptics || die
+
+ # tune default config
+ sed -i 's#log = /dev/stderr#log = syslog#' "${S}/example/ioserv.conf"
+ sed -i 's#root = /tmp/root#root = /var/spool/elliptics#' "${S}/example/ioserv.conf"
+ sed -i 's#daemon = 0#daemon = 1#' "${S}/example/ioserv.conf"
+ sed -i 's#history = /tmp/history#history = /var/run/elliptics#' "${S}/example/ioserv.conf"
+
+ # configs
+ insinto /etc/elliptics
+ doins "${S}/example/ioserv.conf"
+
+ keepdir /var/{spool,run}/elliptics
+ fowners elliptics:elliptics /var/{spool,run}/elliptics
+ fperms 0750 /var/{spool,run}/elliptics
+}
diff --git a/net-misc/elliptics/files/elliptics.confd b/net-misc/elliptics/files/elliptics.confd
new file mode 100644
index 000000000000..70743c00411b
--- /dev/null
+++ b/net-misc/elliptics/files/elliptics.confd
@@ -0,0 +1,3 @@
+ELLIPTICS_BIN=/usr/bin/dnet_ioserv
+ELLIPTICS_CONF=/etc/elliptics/ioserv.conf
+ELLIPTICS_USER=elliptics \ No newline at end of file
diff --git a/net-misc/elliptics/files/elliptics.initd b/net-misc/elliptics/files/elliptics.initd
new file mode 100644
index 000000000000..b18d3d27a7e7
--- /dev/null
+++ b/net-misc/elliptics/files/elliptics.initd
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+
+opts="reload graceful"
+ELLIPTICS_PNAME=dnet-main
+
+depend() {
+ need net
+ use logger
+ after sshd
+}
+
+
+start() {
+ ebegin "Starting dnet_ioserv"
+ start-stop-daemon --start --user=${ELLIPTICS_USER} --exec ${ELLIPTICS_BIN} -- -c "${ELLIPTICS_CONF}"
+ eend $?
+}
+
+stop() {
+ local rv=0
+ ebegin "Stopping dnet_ioserv"
+ killall -0 ${ELLIPTICS_PNAME} && /usr/bin/killall -w ${ELLIPTICS_PNAME} || true
+ eend $?
+}
+
+reload() {
+ if ! service_started "${SVCNAME}" ; then
+ eerror "${SVCNAME} isn't running"
+ return 1
+ fi
+
+ ebegin "Re-opening dnet_ioserv log files"
+ /usr/bin/killall --signal HUP ${ELLIPTICS_PNAME}
+ eend $?
+} \ No newline at end of file
diff --git a/net-misc/elliptics/metadata.xml b/net-misc/elliptics/metadata.xml
new file mode 100644
index 000000000000..783c4d3a16c5
--- /dev/null
+++ b/net-misc/elliptics/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>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">reverbrain/elliptics</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/ethercard-diag/Manifest b/net-misc/ethercard-diag/Manifest
new file mode 100644
index 000000000000..aefc981649b7
--- /dev/null
+++ b/net-misc/ethercard-diag/Manifest
@@ -0,0 +1 @@
+DIST ethercard-diag-20050321.1g.tar.lzma 113181 SHA256 99953e09d3cba3234f43240ec131ddb0caf226650ecb6eca71f26240235eb4fb SHA512 19f9030f97a6a675b2f372acaa320314452b1c5edf543973ac72ac5cce45c05c03c1b1cc0a0375a2b15fc26c89b7a9d18b0702f82c8d4f4362e2f82362feda35 WHIRLPOOL 063744e05ca0f5a821e68757a09fcedc3a39368c162704d119a72830fad6998eb5770274ac42bce2a754b5d43839ae1d2ee6524ad01d51fc9934f28f5732cfca
diff --git a/net-misc/ethercard-diag/ethercard-diag-20050321.1g-r1.ebuild b/net-misc/ethercard-diag/ethercard-diag-20050321.1g-r1.ebuild
new file mode 100644
index 000000000000..4456fc374fe2
--- /dev/null
+++ b/net-misc/ethercard-diag/ethercard-diag-20050321.1g-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit toolchain-funcs
+
+DESCRIPTION="low level mii diagnostic tools including mii-diag and etherwake (merge of netdiag/isa-diag)"
+HOMEPAGE="ftp://ftp.scyld.com/pub/diag/ ftp://ftp.scyld.com/pub/isa-diag/"
+SRC_URI="mirror://gentoo/${P}.tar.lzma"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="!sys-apps/nictools"
+
+src_prepare() {
+ # Since the binary is `ether-wake`, make sure the man page is
+ # `man ether-wake` and not `man etherwake`. #439504
+ sed -i \
+ -e 's/ETHERWAKE/ETHER-WAKE/' \
+ -e 's/etherwake/ether-wake/' \
+ pub/diag/{etherwake.8,Makefile} patches/* || die
+ mv pub/diag/ether{,-}wake.8 || die
+}
+
+src_compile() {
+ tc-export CC AR
+ emake
+}
diff --git a/net-misc/ethercard-diag/ethercard-diag-20050321.1g.ebuild b/net-misc/ethercard-diag/ethercard-diag-20050321.1g.ebuild
new file mode 100644
index 000000000000..3dac836819e9
--- /dev/null
+++ b/net-misc/ethercard-diag/ethercard-diag-20050321.1g.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="low level mii diagnostic tools including mii-diag and etherwake (merge of netdiag/isa-diag)"
+HOMEPAGE="ftp://ftp.scyld.com/pub/diag/ ftp://ftp.scyld.com/pub/isa-diag/"
+SRC_URI="mirror://gentoo/${P}.tar.lzma"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="!sys-apps/nictools"
+
+src_compile() {
+ tc-export CC AR
+ emake || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodir /sbin
+ mv "${D}"/usr/sbin/{mii-diag,ether-wake} "${D}"/sbin/ || die
+}
diff --git a/net-misc/ethercard-diag/metadata.xml b/net-misc/ethercard-diag/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/net-misc/ethercard-diag/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>base-system</herd>
+</pkgmetadata>
diff --git a/net-misc/exabgp/Manifest b/net-misc/exabgp/Manifest
new file mode 100644
index 000000000000..662ba4c76ec8
--- /dev/null
+++ b/net-misc/exabgp/Manifest
@@ -0,0 +1 @@
+DIST exabgp-3.2.17.tar.gz 596373 SHA256 c8bf85a4b3c3697c63af848d3fe4d88f64fe79ae12d2b8bae4abfd9d7a9fe1f9 SHA512 69dbff75caf287e9e0f6ab3707a2bbd576b0b4c8a8c318217cf88c8a1c417d47915b038bc7d64be3bbce9771caa550275703e5543fb5799afc7149dc9f054416 WHIRLPOOL 11c9a08f0289032257847448ea828e61fbcb19ba7b2e3bb4b6202ef00f22f60f636038b9f80c7d81d98ff43ee5ebc11e0b773d7ea0d70b811a863d0cb09c01da
diff --git a/net-misc/exabgp/exabgp-3.2.17.ebuild b/net-misc/exabgp/exabgp-3.2.17.ebuild
new file mode 100644
index 000000000000..40422777588e
--- /dev/null
+++ b/net-misc/exabgp/exabgp-3.2.17.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="The BGP swiss army knife of networking"
+HOMEPAGE="https://github.com/Exa-Networks/exabgp"
+SRC_URI="https://github.com/Exa-Networks/${PN}/archive/${P}.tar.gz"
+MY_P="${PN}-${PN}-${PV}"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
diff --git a/net-misc/exabgp/metadata.xml b/net-misc/exabgp/metadata.xml
new file mode 100644
index 000000000000..9d6cb653b38a
--- /dev/null
+++ b/net-misc/exabgp/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>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">Exa-Networks/exabgp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/fakeidentd/Manifest b/net-misc/fakeidentd/Manifest
new file mode 100644
index 000000000000..7fa77c31ff64
--- /dev/null
+++ b/net-misc/fakeidentd/Manifest
@@ -0,0 +1,2 @@
+DIST fakeidentd-2.6.c 23042 SHA256 75b321e5d9dddcea2b38035b62ac30f2175ed43f3f187be6da19aaa67c4fe165 SHA512 97f6cc70c5cbd757d250db58dfe01f0b82bfecd8296f26f258ef16cc612d7427350ad93740150bf2e8a3c09b92de3340b2e9612ed5c9b4a4be5550f0b18da76b WHIRLPOOL 3da376b7c1f36f093be2b40faa63c87c8d32590a16c1e8ff99294d4204346f9bacabdb1b8d9950f3708e136fcd7b1a9ea10b1b6f43e1b888b72640aa0158cf88
+DIST fakeidentd-2.6.readme 5589 SHA256 887acf81df0ef991f5990fd434b0c38b32f92d4e86d19f258960c83d847f36c4 SHA512 057f0ce278b5520d5db1edf3139a68ac15f36fde1aefcb2c94db59d1557905f4f437a0bfaa30f0714e3b8b4c1cf4698a245d2c94fc6023fd2e677cc76e796d75 WHIRLPOOL 1aab212b8a45dbb194ee7c178d75cf09d259a472c38f43ab4eebf0555b32b6b3f1e1afa7c98d358e0fe76eba3531f7c22586c4db840d7499a28b068549a4ca12
diff --git a/net-misc/fakeidentd/fakeidentd-2.6.ebuild b/net-misc/fakeidentd/fakeidentd-2.6.ebuild
new file mode 100644
index 000000000000..1d7695a1f9ed
--- /dev/null
+++ b/net-misc/fakeidentd/fakeidentd-2.6.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="A static, secure identd. One source file only!"
+HOMEPAGE="http://www.guru-group.fi/~too/sw/"
+SRC_URI="http://www.guru-group.fi/~too/sw/identd.readme -> ${P}.readme
+ http://www.guru-group.fi/~too/sw/releases/identd.c -> ${P}.c"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ppc ppc64 ~sh sparc x86"
+IUSE=""
+
+echoit() {
+ echo "$@"
+ "$@"
+}
+
+src_unpack() {
+ mkdir -p "${S}"
+ echoit cp "${DISTDIR}"/${P}.{c,readme} "${S}" || die
+}
+
+src_compile() {
+ echoit $(tc-getCC) ${CFLAGS} ${LDFLAGS} \
+ -DTRG=\"${PN}\" -DUSE_UNIX_OS -DVERSION=\"${PV}\" \
+ -o ${PN} ${P}.c || die
+}
+
+src_install() {
+ dosbin ${PN} || die
+ newdoc ${P}.readme identd.readme
+
+ newinitd "${FILESDIR}"/fakeidentd.rc fakeidentd
+ newconfd "${FILESDIR}"/fakeidentd.confd fakeidentd
+}
diff --git a/net-misc/fakeidentd/files/fakeidentd.confd b/net-misc/fakeidentd/files/fakeidentd.confd
new file mode 100644
index 000000000000..d842995ead38
--- /dev/null
+++ b/net-misc/fakeidentd/files/fakeidentd.confd
@@ -0,0 +1,6 @@
+# /etc/conf.d/fakeidentd: config file for /etc/init.d/fakeidentd
+
+# Change this to whatever you want the daemon to reply with.
+# The daemon will default to 'nobody' ...
+
+#FAKEIDENTD_OPTS="nobody"
diff --git a/net-misc/fakeidentd/files/fakeidentd.rc b/net-misc/fakeidentd/files/fakeidentd.rc
new file mode 100644
index 000000000000..79082f069b8f
--- /dev/null
+++ b/net-misc/fakeidentd/files/fakeidentd.rc
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting fakeidentd"
+ fakeidentd ${FAKEIDENTD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping fakeidentd"
+ start-stop-daemon --stop --pidfile /var/run/fakeidentd.pid
+ local ret=$?
+ rm -f /var/run/fakeidentd.pid
+ eend ${ret}
+}
diff --git a/net-misc/fakeidentd/metadata.xml b/net-misc/fakeidentd/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/net-misc/fakeidentd/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/fatrat/Manifest b/net-misc/fatrat/Manifest
new file mode 100644
index 000000000000..89d225686980
--- /dev/null
+++ b/net-misc/fatrat/Manifest
@@ -0,0 +1 @@
+DIST fatrat-1.2.0_beta2.tar.xz 3677188 SHA256 b9e1116e5754a2cfff952908145eea6f27454cd8a2260422a54be59e43d2d5e5 SHA512 f8ca441eb7f2264d6c3b6968bcbfc01dcc495340d7b34432a9430065ec7fb4e8f5ce68cde77de42d61577fe3f46014d9ce041ca513e17da8afab2c0888352751 WHIRLPOOL f5c774872c7d9b4f09dd13a04cd0d21a706195eecec103ab883029013228d473f8b82975cc61afcd93001be19ab3350e22288523bc7cac3c043dd2e3e13e0d4f
diff --git a/net-misc/fatrat/fatrat-1.2.0_beta2.ebuild b/net-misc/fatrat/fatrat-1.2.0_beta2.ebuild
new file mode 100644
index 000000000000..4fabdb966616
--- /dev/null
+++ b/net-misc/fatrat/fatrat-1.2.0_beta2.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="Qt4-based download/upload manager"
+HOMEPAGE="http://fatrat.dolezel.info/"
+SRC_URI="http://www.dolezel.info/download/data/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bittorrent +curl doc xmpp nls webinterface"
+
+RDEPEND="dev-qt/qtdbus:4
+ dev-qt/qtgui:4
+ dev-qt/qtsvg:4
+ bittorrent? ( >=net-libs/rb_libtorrent-0.14.5
+ >=dev-cpp/asio-1.1.0
+ dev-qt/qtwebkit:4 )
+ curl? ( >=net-misc/curl-7.18.2 )
+ doc? ( dev-qt/qthelp:4 )
+ xmpp? ( net-libs/gloox )
+ webinterface? ( dev-qt/qtscript:4 )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-build.patch"
+ "${FILESDIR}/${P}-libcrypto_linking.patch"
+)
+
+src_configure() {
+ local mycmakeargs="
+ $(cmake-utils_use_with bittorrent) \
+ $(cmake-utils_use_with curl) \
+ $(cmake-utils_use_with doc DOCUMENTATION) \
+ $(cmake-utils_use_with xmpp JABBER) \
+ $(cmake-utils_use_with nls) \
+ $(cmake-utils_use_with webinterface)"
+ cmake-utils_src_configure
+}
+
+src_install() {
+ use bittorrent && echo "MimeType=application/x-bittorrent;" >> "${S}"/data/${PN}.desktop
+ cmake-utils_src_install
+}
+
+pkg_postinst() {
+ # this is a completely optional and NOT automagic dep
+ if ! has_version dev-libs/geoip; then
+ elog "If you want the GeoIP support, then emerge dev-libs/geoip."
+ fi
+}
diff --git a/net-misc/fatrat/files/fatrat-1.2.0_beta2-build.patch b/net-misc/fatrat/files/fatrat-1.2.0_beta2-build.patch
new file mode 100644
index 000000000000..f1725bfb7205
--- /dev/null
+++ b/net-misc/fatrat/files/fatrat-1.2.0_beta2-build.patch
@@ -0,0 +1,29 @@
+--- fatrat-1.2.0_beta2/CMakeLists.txt
++++ fatrat-1.2.0_beta2/CMakeLists.txt
+@@ -121,16 +121,12 @@
+ endif(curl_FOUND)
+ endif(WITH_CURL)
+
+-ADD_DEFINITIONS(-Wl,--stack,524 288)
+ if(CMAKE_BUILD_TYPE MATCHES Debug)
++ ADD_DEFINITIONS(-Wl,--stack,524 288)
+ ADD_DEFINITIONS(-ggdb)
+ ADD_DEFINITIONS(-DDEBUG_BUILD)
+ ADD_DEFINITIONS(-DNDEBUG)
+ ADD_DEFINITIONS(-Wall)
+-else(CMAKE_BUILD_TYPE MATCHES Debug)
+- ADD_DEFINITIONS(-ggdb)
+- ADD_DEFINITIONS(-DNDEBUG)
+- ADD_DEFINITIONS(-Wall)
+ endif(CMAKE_BUILD_TYPE MATCHES Debug)
+
+ CHECK_INCLUDE_FILES(sys/epoll.h HAVE_SYS_EPOLL_H)
+@@ -577,7 +573,7 @@
+
+ set(fatrat_DEV_HEADERS
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/fatrat.h
+- ${CMAKE_CURRENT_SOURCE_DIR}/config.h
++ ${CMAKE_CURRENT_BINARY_DIR}/config.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/DelayedIcon.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/AppTools.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/Transfer.h
diff --git a/net-misc/fatrat/files/fatrat-1.2.0_beta2-libcrypto_linking.patch b/net-misc/fatrat/files/fatrat-1.2.0_beta2-libcrypto_linking.patch
new file mode 100644
index 000000000000..07e1193d4551
--- /dev/null
+++ b/net-misc/fatrat/files/fatrat-1.2.0_beta2-libcrypto_linking.patch
@@ -0,0 +1,13 @@
+http://git.dolezel.info/?p=fatrat.git;a=commitdiff_plain;h=c799fb1ee91c1affb05aabd580e3c0d59b2223d2
+
+--- fatrat-1.2.0_beta2/CMakeLists.txt
++++ fatrat-1.2.0_beta2/CMakeLists.txt
+@@ -572,7 +572,7 @@
+ # This used to be a workaround until it started causing the exact opposite... oh dear!
+ #STRING(REPLACE "-mt" "" pion-net_LIBRARIES "${pion-net_LIBRARIES}")
+ #message(STATUS ${pion-net_LIBRARIES})
+-target_link_libraries(fatrat -ldl -lpthread ${QT_LIBRARIES} ${libtorrent_LDFLAGS} ${gloox_LDFLAGS} ${curl_LDFLAGS} ${Boost_LIBRARIES} ${pion-net_LIBRARIES} ${QT_ADDITIONAL_LIBS} ${XATTR_LIBRARIES} -export-dynamic)
++target_link_libraries(fatrat -ldl -lpthread ${QT_LIBRARIES} ${libtorrent_LDFLAGS} ${gloox_LDFLAGS} ${curl_LDFLAGS} ${Boost_LIBRARIES} ${pion-net_LIBRARIES} ${QT_ADDITIONAL_LIBS} ${XATTR_LIBRARIES} crypto -export-dynamic)
+ target_link_libraries(fatrat-conf ${QT_LIBRARIES})
+
+ set(fatrat_DEV_HEADERS
diff --git a/net-misc/fatrat/metadata.xml b/net-misc/fatrat/metadata.xml
new file mode 100644
index 000000000000..6bf0b584a754
--- /dev/null
+++ b/net-misc/fatrat/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>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <longdescription lang="en">
+ FatRat is an open source download manager for Linux.
+ </longdescription>
+ <use>
+ <flag name='bittorrent'>Use the bittorrent protocol via net-libs/rb_libtorrent.</flag>
+ <flag name='webinterface'>Enable builtin webinterface.</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/flexget/Manifest b/net-misc/flexget/Manifest
new file mode 100644
index 000000000000..b78d00a67f85
--- /dev/null
+++ b/net-misc/flexget/Manifest
@@ -0,0 +1,4 @@
+DIST FlexGet-1.2.141.tar.gz 953248 SHA256 e2d012cbe6bd49def515c7066b8ef42aa4067b984270386ff1327fde26fe32ef SHA512 3e2364a76645b7b872a77199d7e007707573ad28bbb7ff3d770b279e3c534d93ddf2879ed75191927dc75ef52ff885df7e5a105b9253e893d2a9525d34a4c9f0 WHIRLPOOL fab27c62c48396f767fc279b8b0f578bd90fa50fde6e2392951f21673300812c372b70dd8b80fbdde461e4c33ce6ceda145d9156710a578670ab5cad490129b0
+DIST FlexGet-1.2.192.tar.gz 971176 SHA256 17fcf943f9a5ee8e03de49c716874260883393cc5a827a2f52ab1d437f84993a SHA512 7b16bc2f6db7fd314c8af0cfacdabbb85839e134c8add4554db104e27f0e26da7670b7f0b900753084553e9b32a83117c6493867445747c009c539532e28dddf WHIRLPOOL 3a0cf02f0a763057f634ece54f17aaf9d11fd96aa37da65de05f217cbaf3c8c5642fc3f5c32557ffbfefb761fe734bced98aeb76aaf2040aca5813b6aa1cceec
+DIST FlexGet-1.2.247.tar.gz 855985 SHA256 7bd487bb113fc43afc0f7330102431475697be307b9a61a84273c8dc4a1b32de SHA512 9fccb9708fac89844c396a30c1a1730fb5fd8401aabf7cdae1fe4bce76dc505a7671c1113c714bc581844020e0180fca59b76371258ebcf853ba80db7d9062ae WHIRLPOOL 54e3f96d1c52bd96fd545ab126d9582dfa11fdaeccf17d22f17be5e6f6ad74008f320e8919308113028ef05ebc4d6f1194acb1f3e330362c6d196bfc4710fdcd
+DIST FlexGet-1.2.315.tar.gz 885048 SHA256 eae388a8f30096c6eb54ee96509e418d3e2633d05cbef9517a4c94607cdddafa SHA512 65d11bf568eaaa043dea2911dda63e21b2fcb648efef6e7c7a1d9976ad1901f2d3771d4ced21212c14c2b52674b64bfd9654412619e75d7f66fe797264cd51c2 WHIRLPOOL b88491c329130f75c1cffad9ada73c582f4795ec4fdd28aff9a50a25b8a8ef5a6e7f576855c0b2d52759a40861342c745a44ab12e56248fc1b55ef83ebb8a32b
diff --git a/net-misc/flexget/flexget-1.2.141.ebuild b/net-misc/flexget/flexget-1.2.141.ebuild
new file mode 100644
index 000000000000..d76a59114f30
--- /dev/null
+++ b/net-misc/flexget/flexget-1.2.141.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 eutils
+
+if [[ ${PV} != 9999 ]]; then
+ MY_P="FlexGet-${PV}"
+ SRC_URI="http://download.flexget.com/${MY_P}.tar.gz
+ http://download.flexget.com/archive/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="git://github.com/Flexget/Flexget.git
+ https://github.com/Flexget/Flexget.git"
+fi
+
+DESCRIPTION="Multipurpose automation tool for content like torrents, nzbs, podcasts, comics"
+HOMEPAGE="http://flexget.com/"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="test transmission"
+
+DEPEND="
+ >=dev-python/feedparser-5.1.3[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-0.7.5[${PYTHON_USEDEP}]
+ <dev-python/sqlalchemy-0.9.99
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ >=dev-python/beautifulsoup-4.1:4[${PYTHON_USEDEP}]
+ <dev-python/beautifulsoup-4.4:4[${PYTHON_USEDEP}]
+ !=dev-python/beautifulsoup-4.2.0
+ >=dev-python/html5lib-0.11[${PYTHON_USEDEP}]
+ dev-python/PyRSS2Gen[${PYTHON_USEDEP}]
+ dev-python/pynzb[${PYTHON_USEDEP}]
+ dev-python/progressbar[${PYTHON_USEDEP}]
+ dev-python/rpyc[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ >=dev-python/requests-1.0[${PYTHON_USEDEP}]
+ <dev-python/requests-2.99[${PYTHON_USEDEP}]
+ =dev-python/python-dateutil-2.1*[${PYTHON_USEDEP}]
+ >=dev-python/jsonschema-2.0[${PYTHON_USEDEP}]
+ dev-python/python-tvrage[${PYTHON_USEDEP}]
+ dev-python/tmdb3[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+"
+RDEPEND="${DEPEND}
+ transmission? ( dev-python/transmissionrpc[${PYTHON_USEDEP}] )
+"
+DEPEND+=" test? ( dev-python/nose[${PYTHON_USEDEP}] )"
+
+if [[ ${PV} == 9999 ]]; then
+ DEPEND+=" dev-python/paver[${PYTHON_USEDEP}]"
+else
+ S="${WORKDIR}/${MY_P}"
+fi
+
+python_prepare_all() {
+ # Prevent setup from grabbing nose from pypi
+ sed -e /setup_requires/d -i pavement.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ cp -lr tests setup.cfg "${BUILD_DIR}" || die
+ run_in_build_dir nosetests -v --attr=!online > "${T}/tests-${EPYTHON}.log" \
+ || die "Tests fail with ${EPYTHON}"
+}
diff --git a/net-misc/flexget/flexget-1.2.192.ebuild b/net-misc/flexget/flexget-1.2.192.ebuild
new file mode 100644
index 000000000000..a1b0f97a1d4a
--- /dev/null
+++ b/net-misc/flexget/flexget-1.2.192.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 eutils
+
+if [[ ${PV} != 9999 ]]; then
+ MY_P="FlexGet-${PV}"
+ SRC_URI="http://download.flexget.com/${MY_P}.tar.gz
+ http://download.flexget.com/archive/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="git://github.com/Flexget/Flexget.git
+ https://github.com/Flexget/Flexget.git"
+fi
+
+DESCRIPTION="Multipurpose automation tool for content like torrents, nzbs, podcasts, comics"
+HOMEPAGE="http://flexget.com/"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="test transmission"
+
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/feedparser-5.1.3[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-0.7.5[${PYTHON_USEDEP}]
+ <dev-python/sqlalchemy-0.9.99
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ >=dev-python/beautifulsoup-4.1:4[${PYTHON_USEDEP}]
+ <dev-python/beautifulsoup-4.4:4[${PYTHON_USEDEP}]
+ !=dev-python/beautifulsoup-4.2.0
+ >=dev-python/html5lib-0.11[${PYTHON_USEDEP}]
+ dev-python/PyRSS2Gen[${PYTHON_USEDEP}]
+ dev-python/pynzb[${PYTHON_USEDEP}]
+ dev-python/progressbar[${PYTHON_USEDEP}]
+ dev-python/rpyc[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ >=dev-python/requests-1.0[${PYTHON_USEDEP}]
+ <dev-python/requests-2.99[${PYTHON_USEDEP}]
+ =dev-python/python-dateutil-2.1*[${PYTHON_USEDEP}]
+ >=dev-python/jsonschema-2.0[${PYTHON_USEDEP}]
+ dev-python/python-tvrage[${PYTHON_USEDEP}]
+ dev-python/tmdb3[${PYTHON_USEDEP}]
+ dev-python/path-py[${PYTHON_USEDEP}]
+ >=dev-python/guessit-0.9.3[${PYTHON_USEDEP}]
+"
+RDEPEND="${DEPEND}
+ transmission? ( dev-python/transmissionrpc[${PYTHON_USEDEP}] )
+"
+DEPEND+=" test? ( dev-python/nose[${PYTHON_USEDEP}] )"
+
+if [[ ${PV} == 9999 ]]; then
+ DEPEND+=" dev-python/paver[${PYTHON_USEDEP}]"
+else
+ S="${WORKDIR}/${MY_P}"
+fi
+
+python_prepare_all() {
+ # Prevent setup from grabbing nose from pypi
+ sed -e /setup_requires/d -i pavement.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ cp -lr tests setup.cfg "${BUILD_DIR}" || die
+ run_in_build_dir nosetests -v --attr=!online > "${T}/tests-${EPYTHON}.log" \
+ || die "Tests fail with ${EPYTHON}"
+}
diff --git a/net-misc/flexget/flexget-1.2.247.ebuild b/net-misc/flexget/flexget-1.2.247.ebuild
new file mode 100644
index 000000000000..6e44c092d62a
--- /dev/null
+++ b/net-misc/flexget/flexget-1.2.247.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 eutils
+
+if [[ ${PV} != 9999 ]]; then
+ MY_P="FlexGet-${PV}"
+ SRC_URI="mirror://pypi/F/FlexGet/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="git://github.com/Flexget/Flexget.git
+ https://github.com/Flexget/Flexget.git"
+fi
+
+DESCRIPTION="Multipurpose automation tool for content like torrents, nzbs, podcasts, comics"
+HOMEPAGE="http://flexget.com/"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="test transmission"
+
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/feedparser-5.1.3[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-0.7.5[${PYTHON_USEDEP}]
+ <dev-python/sqlalchemy-0.9.99
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ >=dev-python/beautifulsoup-4.1:4[${PYTHON_USEDEP}]
+ <dev-python/beautifulsoup-4.4:4[${PYTHON_USEDEP}]
+ !~dev-python/beautifulsoup-4.2.0
+ >=dev-python/html5lib-0.11[${PYTHON_USEDEP}]
+ dev-python/PyRSS2Gen[${PYTHON_USEDEP}]
+ dev-python/pynzb[${PYTHON_USEDEP}]
+ dev-python/progressbar[${PYTHON_USEDEP}]
+ dev-python/rpyc[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ >=dev-python/requests-1.0[${PYTHON_USEDEP}]
+ <dev-python/requests-2.99[${PYTHON_USEDEP}]
+ >=dev-python/python-dateutil-2.1[${PYTHON_USEDEP}]
+ !~dev-python/python-dateutil-2.2
+ >=dev-python/jsonschema-2.0[${PYTHON_USEDEP}]
+ dev-python/python-tvrage[${PYTHON_USEDEP}]
+ dev-python/tmdb3[${PYTHON_USEDEP}]
+ dev-python/path-py[${PYTHON_USEDEP}]
+ >=dev-python/guessit-0.9.3[${PYTHON_USEDEP}]
+ dev-python/APScheduler[${PYTHON_USEDEP}]
+"
+RDEPEND="${DEPEND}
+ transmission? ( dev-python/transmissionrpc[${PYTHON_USEDEP}] )
+"
+DEPEND+=" test? ( dev-python/nose[${PYTHON_USEDEP}] )"
+
+if [[ ${PV} == 9999 ]]; then
+ DEPEND+=" dev-python/paver[${PYTHON_USEDEP}]"
+else
+ S="${WORKDIR}/${MY_P}"
+fi
+
+python_prepare_all() {
+ # Prevent setup from grabbing nose from pypi
+ sed -e /setup_requires/d -i pavement.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ cp -lr tests setup.cfg "${BUILD_DIR}" || die
+ run_in_build_dir nosetests -v --attr=!online > "${T}/tests-${EPYTHON}.log" \
+ || die "Tests fail with ${EPYTHON}"
+}
diff --git a/net-misc/flexget/flexget-1.2.315.ebuild b/net-misc/flexget/flexget-1.2.315.ebuild
new file mode 100644
index 000000000000..6e44c092d62a
--- /dev/null
+++ b/net-misc/flexget/flexget-1.2.315.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 eutils
+
+if [[ ${PV} != 9999 ]]; then
+ MY_P="FlexGet-${PV}"
+ SRC_URI="mirror://pypi/F/FlexGet/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="git://github.com/Flexget/Flexget.git
+ https://github.com/Flexget/Flexget.git"
+fi
+
+DESCRIPTION="Multipurpose automation tool for content like torrents, nzbs, podcasts, comics"
+HOMEPAGE="http://flexget.com/"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="test transmission"
+
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/feedparser-5.1.3[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-0.7.5[${PYTHON_USEDEP}]
+ <dev-python/sqlalchemy-0.9.99
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ >=dev-python/beautifulsoup-4.1:4[${PYTHON_USEDEP}]
+ <dev-python/beautifulsoup-4.4:4[${PYTHON_USEDEP}]
+ !~dev-python/beautifulsoup-4.2.0
+ >=dev-python/html5lib-0.11[${PYTHON_USEDEP}]
+ dev-python/PyRSS2Gen[${PYTHON_USEDEP}]
+ dev-python/pynzb[${PYTHON_USEDEP}]
+ dev-python/progressbar[${PYTHON_USEDEP}]
+ dev-python/rpyc[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ >=dev-python/requests-1.0[${PYTHON_USEDEP}]
+ <dev-python/requests-2.99[${PYTHON_USEDEP}]
+ >=dev-python/python-dateutil-2.1[${PYTHON_USEDEP}]
+ !~dev-python/python-dateutil-2.2
+ >=dev-python/jsonschema-2.0[${PYTHON_USEDEP}]
+ dev-python/python-tvrage[${PYTHON_USEDEP}]
+ dev-python/tmdb3[${PYTHON_USEDEP}]
+ dev-python/path-py[${PYTHON_USEDEP}]
+ >=dev-python/guessit-0.9.3[${PYTHON_USEDEP}]
+ dev-python/APScheduler[${PYTHON_USEDEP}]
+"
+RDEPEND="${DEPEND}
+ transmission? ( dev-python/transmissionrpc[${PYTHON_USEDEP}] )
+"
+DEPEND+=" test? ( dev-python/nose[${PYTHON_USEDEP}] )"
+
+if [[ ${PV} == 9999 ]]; then
+ DEPEND+=" dev-python/paver[${PYTHON_USEDEP}]"
+else
+ S="${WORKDIR}/${MY_P}"
+fi
+
+python_prepare_all() {
+ # Prevent setup from grabbing nose from pypi
+ sed -e /setup_requires/d -i pavement.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ cp -lr tests setup.cfg "${BUILD_DIR}" || die
+ run_in_build_dir nosetests -v --attr=!online > "${T}/tests-${EPYTHON}.log" \
+ || die "Tests fail with ${EPYTHON}"
+}
diff --git a/net-misc/flexget/flexget-9999.ebuild b/net-misc/flexget/flexget-9999.ebuild
new file mode 100644
index 000000000000..6e44c092d62a
--- /dev/null
+++ b/net-misc/flexget/flexget-9999.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 eutils
+
+if [[ ${PV} != 9999 ]]; then
+ MY_P="FlexGet-${PV}"
+ SRC_URI="mirror://pypi/F/FlexGet/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="git://github.com/Flexget/Flexget.git
+ https://github.com/Flexget/Flexget.git"
+fi
+
+DESCRIPTION="Multipurpose automation tool for content like torrents, nzbs, podcasts, comics"
+HOMEPAGE="http://flexget.com/"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="test transmission"
+
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/feedparser-5.1.3[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-0.7.5[${PYTHON_USEDEP}]
+ <dev-python/sqlalchemy-0.9.99
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ >=dev-python/beautifulsoup-4.1:4[${PYTHON_USEDEP}]
+ <dev-python/beautifulsoup-4.4:4[${PYTHON_USEDEP}]
+ !~dev-python/beautifulsoup-4.2.0
+ >=dev-python/html5lib-0.11[${PYTHON_USEDEP}]
+ dev-python/PyRSS2Gen[${PYTHON_USEDEP}]
+ dev-python/pynzb[${PYTHON_USEDEP}]
+ dev-python/progressbar[${PYTHON_USEDEP}]
+ dev-python/rpyc[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ >=dev-python/requests-1.0[${PYTHON_USEDEP}]
+ <dev-python/requests-2.99[${PYTHON_USEDEP}]
+ >=dev-python/python-dateutil-2.1[${PYTHON_USEDEP}]
+ !~dev-python/python-dateutil-2.2
+ >=dev-python/jsonschema-2.0[${PYTHON_USEDEP}]
+ dev-python/python-tvrage[${PYTHON_USEDEP}]
+ dev-python/tmdb3[${PYTHON_USEDEP}]
+ dev-python/path-py[${PYTHON_USEDEP}]
+ >=dev-python/guessit-0.9.3[${PYTHON_USEDEP}]
+ dev-python/APScheduler[${PYTHON_USEDEP}]
+"
+RDEPEND="${DEPEND}
+ transmission? ( dev-python/transmissionrpc[${PYTHON_USEDEP}] )
+"
+DEPEND+=" test? ( dev-python/nose[${PYTHON_USEDEP}] )"
+
+if [[ ${PV} == 9999 ]]; then
+ DEPEND+=" dev-python/paver[${PYTHON_USEDEP}]"
+else
+ S="${WORKDIR}/${MY_P}"
+fi
+
+python_prepare_all() {
+ # Prevent setup from grabbing nose from pypi
+ sed -e /setup_requires/d -i pavement.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ cp -lr tests setup.cfg "${BUILD_DIR}" || die
+ run_in_build_dir nosetests -v --attr=!online > "${T}/tests-${EPYTHON}.log" \
+ || die "Tests fail with ${EPYTHON}"
+}
diff --git a/net-misc/flexget/metadata.xml b/net-misc/flexget/metadata.xml
new file mode 100644
index 000000000000..a2ce09f19ce9
--- /dev/null
+++ b/net-misc/flexget/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>floppym@gentoo.org</email>
+ <name>Mike Gilbert</name>
+ </maintainer>
+ <use>
+ <flag name="transmission">Support comminucation with <pkg>net-p2p/transmission</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="pypi">FlexGet</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/fmirror/Manifest b/net-misc/fmirror/Manifest
new file mode 100644
index 000000000000..e9bc320fdabb
--- /dev/null
+++ b/net-misc/fmirror/Manifest
@@ -0,0 +1 @@
+DIST fmirror-0.8.4.tar.gz 59831 RMD160 f053b0d7f88d516890263e7b65e63a781dd2f044 SHA1 8c124c7655da71c7fc28e5f052fe2091e0bff3fb SHA256 d280e496a2b6dedbd6fda635a80486dbc1462e7c09dbd950962b6742f927dae4
diff --git a/net-misc/fmirror/files/fmirror-crlf.patch b/net-misc/fmirror/files/fmirror-crlf.patch
new file mode 100644
index 000000000000..e97a846e6e6e
--- /dev/null
+++ b/net-misc/fmirror/files/fmirror-crlf.patch
@@ -0,0 +1,11 @@
+--- fmirror.c 2000-03-09 08:52:52.000000000 +0200
++++ fmirror.c.new 2005-03-16 20:07:14.767419627 +0200
+@@ -642,7 +642,7 @@
+ va_list args;
+ va_start(args, format);
+ vsprintf(buffer, format, args);
+- l = fprintf(out_file, "%s\n", buffer);
++ l = fprintf(out_file, "%s\r\n", buffer);
+ fflush(out_file);
+ buffer[l - 1] = 0;
+ LOG(6, cmd, ("---> %s", buffer));
diff --git a/net-misc/fmirror/fmirror-0.8.4-r2.ebuild b/net-misc/fmirror/fmirror-0.8.4-r2.ebuild
new file mode 100644
index 000000000000..dd94a002b8b6
--- /dev/null
+++ b/net-misc/fmirror/fmirror-0.8.4-r2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="FTP mirror utility"
+HOMEPAGE="http://linux.maruhn.com/sec/fmirror.html"
+SRC_URI="http://www.ibiblio.org/pub/solaris/freeware/SOURCES/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${PN}-crlf.patch
+}
+
+src_compile() {
+ append-flags "-D_FILE_OFFSET_BITS=64" # large file support bug # 123964
+
+ econf \
+ --datadir=/etc/fmirror || die "econf failed"
+
+ emake CC="$(tc-getCC)" || die "emake failed"
+}
+
+src_install() {
+ dobin fmirror
+ dodoc ChangeLog README
+ newdoc configs/README README.sample
+ doman fmirror.1
+
+ cd configs
+ insinto /etc/fmirror/sample
+ doins {sample,generic,redhat}.conf
+}
diff --git a/net-misc/fmirror/metadata.xml b/net-misc/fmirror/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/net-misc/fmirror/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/freerdp/Manifest b/net-misc/freerdp/Manifest
new file mode 100644
index 000000000000..3faf65cf1b83
--- /dev/null
+++ b/net-misc/freerdp/Manifest
@@ -0,0 +1,4 @@
+DIST freerdp-1.1.0_beta1_p20130710.tar.gz 6682149 SHA256 0d0d2eec7e78b61458415ee98ad54379b31e9fc269b8bacf3e939bd048ac5e61 SHA512 89ec08acff5c9bbafe107cd079005146b6c4447fbe3172d8f774a20ab6b5e1f24abdeab2d7cb0d7694251aaea2924b0a10f1c0b4b660994cdfa51e8428b90440 WHIRLPOOL 2f7c04bde54293fc8fc85ba03baf7dc64e5da4cecdc87aaaa2ff316127abc43f0b56d70e14652f97f2e97a8f43bee8880837a94230448397dfad5f4ddbd055b1
+DIST freerdp-1.1.0_beta1_p20150312.tar.gz 6703421 SHA256 b8d439c00d39c7cd673781962c3b04d7bd501dcdb76af8be7051e4afb6d16f01 SHA512 293c6ad5827f0bd4c71e70571c1ca37916a6ef0193a55afe1a624a94ba1419501304d77584c739e7b9c624aee64475cd13e8f5e035d89404f7dded87c004261c WHIRLPOOL f560e98c54f526d6042b22b61ee45eb323796c4230cd22ec03aa8f55b5c76647318ba618198a25654e33912eb3394714704a5be9f2d48dd09a4f219701973899
+DIST freerdp-1.2.0_beta1_pre20141115.tar.gz 6096004 SHA256 a9dcd76946878cecddafc79a14794e7f57cb32397b5bc45af9d866d8d76bb421 SHA512 8fdbfba86df2cbb6c980e940df66bf30cd8d06e66df18656e18a120eabdd2b17e78c7612f1349589fcd8d3b37066b3956e0ef977d069f2abde653b4824fee61b WHIRLPOOL 0c0bb6c2a9e0b0efd072d0c46ded4790b69df649fe1e18bd907458e238a8149314ca47e5166523044c14a520e8f1d0d5b910e294c4ee670c1562c7980036cbb0
+DIST freerdp-1.2.1_pre20150326.tar.gz 6146857 SHA256 c0646f224ea30a485e165fb31eb8a039af2ca3f257cdf784b319e1b5c13e0425 SHA512 ca1499d56ecb9c9bc624de2ecc976eb9633b795050ac01e16fcc9e0a8951d274cc63644a0e2b830e75f66de894f6a22274864fd20a9351834f6d664874e65ec8 WHIRLPOOL 1ff6ce70d454a7e0cbb3cd4fbafe1fb4191dadc3b2f8a6dbff10d8c725b8fc2838a863837d9b01f6daa670483fe40266fb57569904ad8ac8503549d6605c9e64
diff --git a/net-misc/freerdp/files/freerdp-1.1-CVE-2014-0250.patch b/net-misc/freerdp/files/freerdp-1.1-CVE-2014-0250.patch
new file mode 100644
index 000000000000..ce4d3d989098
--- /dev/null
+++ b/net-misc/freerdp/files/freerdp-1.1-CVE-2014-0250.patch
@@ -0,0 +1,308 @@
+From 5ad707ddf33d1d785a8ca1fbeec91d2eee985820 Mon Sep 17 00:00:00 2001
+From: Hardening <rdp.effort@gmail.com>
+Date: Fri, 6 Jun 2014 23:24:16 +0200
+Subject: [PATCH] Fix CVE-2014-0250
+
+This patch fixes CVE-2014-0250 by checking width, height and bpp when
+receiving a new pointer.
+---
+ client/X11/xf_cliprdr.c | 11 +++++--
+ libfreerdp/core/fastpath.c | 2 +-
+ libfreerdp/core/orders.c | 21 ++++++++++++
+ libfreerdp/core/surface.c | 6 ++++
+ libfreerdp/core/update.c | 82 +++++++++++++++++++++++++++++++++++++++-------
+ libfreerdp/core/update.h | 2 +-
+ libfreerdp/core/window.c | 5 +++
+ 7 files changed, 114 insertions(+), 15 deletions(-)
+
+diff --git a/client/X11/xf_cliprdr.c b/client/X11/xf_cliprdr.c
+index 19c4332..8fb49f9 100644
+--- a/client/X11/xf_cliprdr.c
++++ b/client/X11/xf_cliprdr.c
+@@ -914,7 +914,7 @@ static void xf_cliprdr_process_unicodetext(clipboardContext* cb, BYTE* data, int
+ crlf2lf(cb->data, &cb->data_length);
+ }
+
+-static void xf_cliprdr_process_dib(clipboardContext* cb, BYTE* data, int size)
++static BOOL xf_cliprdr_process_dib(clipboardContext* cb, BYTE* data, int size)
+ {
+ wStream* s;
+ UINT16 bpp;
+@@ -926,12 +926,18 @@ static void xf_cliprdr_process_dib(clipboardContext* cb, BYTE* data, int size)
+ if (size < 40)
+ {
+ DEBUG_X11_CLIPRDR("dib size %d too short", size);
+- return;
++ return FALSE;
+ }
+
+ s = Stream_New(data, size);
+ Stream_Seek(s, 14);
+ Stream_Read_UINT16(s, bpp);
++ if ((bpp < 1) || (bpp > 32))
++ {
++ fprintf(stderr, "%s: invalid bpp value %d", __FUNCTION__, bpp);
++ return FALSE;
++ }
++
+ Stream_Read_UINT32(s, ncolors);
+ offset = 14 + 40 + (bpp <= 8 ? (ncolors == 0 ? (1 << bpp) : ncolors) * 4 : 0);
+ Stream_Free(s, FALSE);
+@@ -949,6 +955,7 @@ static void xf_cliprdr_process_dib(clipboardContext* cb, BYTE* data, int size)
+ cb->data = Stream_Buffer(s);
+ cb->data_length = Stream_GetPosition(s);
+ Stream_Free(s, FALSE);
++ return TRUE;
+ }
+
+ static void xf_cliprdr_process_html(clipboardContext* cb, BYTE* data, int size)
+diff --git a/libfreerdp/core/fastpath.c b/libfreerdp/core/fastpath.c
+index 8448160..dcc7117 100644
+--- a/libfreerdp/core/fastpath.c
++++ b/libfreerdp/core/fastpath.c
+@@ -254,7 +254,7 @@ static int fastpath_recv_update(rdpFastPath* fastpath, BYTE updateCode, UINT32 s
+ break;
+
+ case FASTPATH_UPDATETYPE_COLOR:
+- if (!update_read_pointer_color(s, &pointer->pointer_color))
++ if (!update_read_pointer_color(s, &pointer->pointer_color, 24))
+ return -1;
+ IFCALL(pointer->PointerColor, context, &pointer->pointer_color);
+ break;
+diff --git a/libfreerdp/core/orders.c b/libfreerdp/core/orders.c
+index e5cc520..f22407f 100644
+--- a/libfreerdp/core/orders.c
++++ b/libfreerdp/core/orders.c
+@@ -1830,6 +1830,11 @@ BOOL update_read_cache_bitmap_order(wStream* s, CACHE_BITMAP_ORDER* cache_bitmap
+ Stream_Read_UINT8(s, cache_bitmap->bitmapWidth); /* bitmapWidth (1 byte) */
+ Stream_Read_UINT8(s, cache_bitmap->bitmapHeight); /* bitmapHeight (1 byte) */
+ Stream_Read_UINT8(s, cache_bitmap->bitmapBpp); /* bitmapBpp (1 byte) */
++ if ((cache_bitmap->bitmapBpp < 1) || (cache_bitmap->bitmapBpp > 32))
++ {
++ fprintf(stderr, "%s: invalid bitmap bpp %d\n", __FUNCTION__, cache_bitmap->bitmapBpp);
++ return FALSE;
++ }
+ Stream_Read_UINT16(s, cache_bitmap->bitmapLength); /* bitmapLength (2 bytes) */
+ Stream_Read_UINT16(s, cache_bitmap->cacheIndex); /* cacheIndex (2 bytes) */
+
+@@ -2068,6 +2073,11 @@ BOOL update_read_cache_bitmap_v3_order(wStream* s, CACHE_BITMAP_V3_ORDER* cache_
+ bitmapData = &cache_bitmap_v3->bitmapData;
+
+ Stream_Read_UINT8(s, bitmapData->bpp);
++ if ((bitmapData->bpp < 1) || (bitmapData->bpp > 32))
++ {
++ fprintf(stderr, "%s: invalid bpp value %d", __FUNCTION__, bitmapData->bpp);
++ return FALSE;
++ }
+ Stream_Seek_UINT8(s); /* reserved1 (1 byte) */
+ Stream_Seek_UINT8(s); /* reserved2 (1 byte) */
+ Stream_Read_UINT8(s, bitmapData->codecID); /* codecID (1 byte) */
+@@ -2672,6 +2682,11 @@ BOOL update_read_create_nine_grid_bitmap_order(wStream* s, CREATE_NINE_GRID_BITM
+ return FALSE;
+
+ Stream_Read_UINT8(s, create_nine_grid_bitmap->bitmapBpp); /* bitmapBpp (1 byte) */
++ if ((create_nine_grid_bitmap->bitmapBpp < 1) || (create_nine_grid_bitmap->bitmapBpp > 32))
++ {
++ fprintf(stderr, "%s: invalid bpp value %d", __FUNCTION__, create_nine_grid_bitmap->bitmapBpp);
++ return FALSE;
++ }
+ Stream_Read_UINT16(s, create_nine_grid_bitmap->bitmapId); /* bitmapId (2 bytes) */
+
+ nineGridInfo = &(create_nine_grid_bitmap->nineGridInfo);
+@@ -2707,6 +2722,12 @@ BOOL update_read_stream_bitmap_first_order(wStream* s, STREAM_BITMAP_FIRST_ORDER
+
+ Stream_Read_UINT8(s, stream_bitmap_first->bitmapFlags); /* bitmapFlags (1 byte) */
+ Stream_Read_UINT8(s, stream_bitmap_first->bitmapBpp); /* bitmapBpp (1 byte) */
++ if ((stream_bitmap_first->bitmapBpp < 1) || (stream_bitmap_first->bitmapBpp > 32))
++ {
++ fprintf(stderr, "%s: invalid bpp value %d", __FUNCTION__, stream_bitmap_first->bitmapBpp);
++ return FALSE;
++ }
++
+ Stream_Read_UINT16(s, stream_bitmap_first->bitmapType); /* bitmapType (2 bytes) */
+ Stream_Read_UINT16(s, stream_bitmap_first->bitmapWidth); /* bitmapWidth (2 bytes) */
+ Stream_Read_UINT16(s, stream_bitmap_first->bitmapHeight); /* bitmapHeigth (2 bytes) */
+diff --git a/libfreerdp/core/surface.c b/libfreerdp/core/surface.c
+index 7d0fb22..992a3dd 100644
+--- a/libfreerdp/core/surface.c
++++ b/libfreerdp/core/surface.c
+@@ -38,6 +38,12 @@ static int update_recv_surfcmd_surface_bits(rdpUpdate* update, wStream* s, UINT3
+ Stream_Read_UINT16(s, cmd->destRight);
+ Stream_Read_UINT16(s, cmd->destBottom);
+ Stream_Read_UINT8(s, cmd->bpp);
++ if ((cmd->bpp < 1) || (cmd->bpp > 32))
++ {
++ fprintf(stderr, "%s: invalid bpp value %d", __FUNCTION__, cmd->bpp);
++ return FALSE;
++ }
++
+ Stream_Seek(s, 2); /* reserved1, reserved2 */
+ Stream_Read_UINT8(s, cmd->codecID);
+ Stream_Read_UINT16(s, cmd->width);
+diff --git a/libfreerdp/core/update.c b/libfreerdp/core/update.c
+index c4eaede..27c36e3 100644
+--- a/libfreerdp/core/update.c
++++ b/libfreerdp/core/update.c
+@@ -219,16 +219,32 @@ BOOL update_read_pointer_system(wStream* s, POINTER_SYSTEM_UPDATE* pointer_syste
+ return TRUE;
+ }
+
+-BOOL update_read_pointer_color(wStream* s, POINTER_COLOR_UPDATE* pointer_color)
++BOOL update_read_pointer_color(wStream* s, POINTER_COLOR_UPDATE* pointer_color, int xorBpp)
+ {
++ BYTE *newMask;
++ int scanlineSize;
++
+ if (Stream_GetRemainingLength(s) < 14)
+ return FALSE;
+
+ Stream_Read_UINT16(s, pointer_color->cacheIndex); /* cacheIndex (2 bytes) */
+ Stream_Read_UINT16(s, pointer_color->xPos); /* xPos (2 bytes) */
+ Stream_Read_UINT16(s, pointer_color->yPos); /* yPos (2 bytes) */
++
++ /**
++ * As stated in 2.2.9.1.1.4.4 Color Pointer Update:
++ * The maximum allowed pointer width/height is 96 pixels if the client indicated support
++ * for large pointers by setting the LARGE_POINTER_FLAG (0x00000001) in the Large
++ * Pointer Capability Set (section 2.2.7.2.7). If the LARGE_POINTER_FLAG was not
++ * set, the maximum allowed pointer width/height is 32 pixels.
++ *
++ * So we check for a maximum of 96 for CVE-2014-0250.
++ */
+ Stream_Read_UINT16(s, pointer_color->width); /* width (2 bytes) */
+ Stream_Read_UINT16(s, pointer_color->height); /* height (2 bytes) */
++ if ((pointer_color->width > 96) || (pointer_color->height > 96))
++ return FALSE;
++
+ Stream_Read_UINT16(s, pointer_color->lengthAndMask); /* lengthAndMask (2 bytes) */
+ Stream_Read_UINT16(s, pointer_color->lengthXorMask); /* lengthXorMask (2 bytes) */
+
+@@ -245,26 +261,65 @@ BOOL update_read_pointer_color(wStream* s, POINTER_COLOR_UPDATE* pointer_color)
+
+ if (pointer_color->lengthXorMask > 0)
+ {
++ /**
++ * Spec states that:
++ *
++ * xorMaskData (variable): A variable-length array of bytes. Contains the 24-bpp, bottom-up
++ * XOR mask scan-line data. The XOR mask is padded to a 2-byte boundary for each encoded
++ * scan-line. For example, if a 3x3 pixel cursor is being sent, then each scan-line will consume 10
++ * bytes (3 pixels per scan-line multiplied by 3 bytes per pixel, rounded up to the next even
++ * number of bytes).
++ *
++ * In fact instead of 24-bpp, the bpp parameter is given by the containing packet.
++ */
+ if (Stream_GetRemainingLength(s) < pointer_color->lengthXorMask)
+ return FALSE;
+
+- if (!pointer_color->xorMaskData)
+- pointer_color->xorMaskData = malloc(pointer_color->lengthXorMask);
+- else
+- pointer_color->xorMaskData = realloc(pointer_color->xorMaskData, pointer_color->lengthXorMask);
++ scanlineSize = (7 + xorBpp * pointer_color->width) / 8;
++ scanlineSize = ((scanlineSize + 1) / 2) * 2;
++ if (scanlineSize * pointer_color->height != pointer_color->lengthXorMask)
++ {
++ fprintf(stderr, "%s: invalid lengthXorMask: width=%d height=%d, %d instead of %d\n", __FUNCTION__,
++ pointer_color->width, pointer_color->height,
++ pointer_color->lengthXorMask, scanlineSize * pointer_color->height);
++ return FALSE;
++ }
++
++ newMask = realloc(pointer_color->xorMaskData, pointer_color->lengthXorMask);
++ if (!newMask)
++ return FALSE;
++
++ pointer_color->xorMaskData = newMask;
+
+ Stream_Read(s, pointer_color->xorMaskData, pointer_color->lengthXorMask);
+ }
+
+ if (pointer_color->lengthAndMask > 0)
+ {
++ /**
++ * andMaskData (variable): A variable-length array of bytes. Contains the 1-bpp, bottom-up
++ * AND mask scan-line data. The AND mask is padded to a 2-byte boundary for each encoded
++ * scan-line. For example, if a 7x7 pixel cursor is being sent, then each scan-line will consume 2
++ * bytes (7 pixels per scan-line multiplied by 1 bpp, rounded up to the next even number of
++ * bytes).
++ */
+ if (Stream_GetRemainingLength(s) < pointer_color->lengthAndMask)
+ return FALSE;
+
+- if (!pointer_color->andMaskData)
+- pointer_color->andMaskData = malloc(pointer_color->lengthAndMask);
+- else
+- pointer_color->andMaskData = realloc(pointer_color->andMaskData, pointer_color->lengthAndMask);
++ scanlineSize = ((7 + pointer_color->width) / 8);
++ scanlineSize = ((1 + scanlineSize) / 2) * 2;
++ if (scanlineSize * pointer_color->height != pointer_color->lengthAndMask)
++ {
++ fprintf(stderr, "%s: invalid lengthAndMask: %d instead of %d\n", __FUNCTION__,
++ pointer_color->lengthAndMask, scanlineSize * pointer_color->height);
++ return FALSE;
++ }
++
++ newMask = realloc(pointer_color->andMaskData, pointer_color->lengthAndMask);
++ if (!newMask)
++ return FALSE;
++
++ pointer_color->andMaskData = newMask;
+
+ Stream_Read(s, pointer_color->andMaskData, pointer_color->lengthAndMask);
+ }
+@@ -281,7 +336,12 @@ BOOL update_read_pointer_new(wStream* s, POINTER_NEW_UPDATE* pointer_new)
+ return FALSE;
+
+ Stream_Read_UINT16(s, pointer_new->xorBpp); /* xorBpp (2 bytes) */
+- return update_read_pointer_color(s, &pointer_new->colorPtrAttr); /* colorPtrAttr */
++ if ((pointer_new->xorBpp < 1) || (pointer_new->xorBpp > 32))
++ {
++ fprintf(stderr, "%s: invalid xorBpp %d\n", __FUNCTION__, pointer_new->xorBpp);
++ return FALSE;
++ }
++ return update_read_pointer_color(s, &pointer_new->colorPtrAttr, pointer_new->xorBpp); /* colorPtrAttr */
+ }
+
+ BOOL update_read_pointer_cached(wStream* s, POINTER_CACHED_UPDATE* pointer_cached)
+@@ -320,7 +380,7 @@ BOOL update_recv_pointer(rdpUpdate* update, wStream* s)
+ break;
+
+ case PTR_MSG_TYPE_COLOR:
+- if (!update_read_pointer_color(s, &pointer->pointer_color))
++ if (!update_read_pointer_color(s, &pointer->pointer_color, 24))
+ return FALSE;
+ IFCALL(pointer->PointerColor, context, &pointer->pointer_color);
+ break;
+diff --git a/libfreerdp/core/update.h b/libfreerdp/core/update.h
+index c3088f2..d6c2d59 100644
+--- a/libfreerdp/core/update.h
++++ b/libfreerdp/core/update.h
+@@ -53,7 +53,7 @@ BOOL update_recv(rdpUpdate* update, wStream* s);
+
+ BOOL update_read_pointer_position(wStream* s, POINTER_POSITION_UPDATE* pointer_position);
+ BOOL update_read_pointer_system(wStream* s, POINTER_SYSTEM_UPDATE* pointer_system);
+-BOOL update_read_pointer_color(wStream* s, POINTER_COLOR_UPDATE* pointer_color);
++BOOL update_read_pointer_color(wStream* s, POINTER_COLOR_UPDATE* pointer_color, int xorBpp);
+ BOOL update_read_pointer_new(wStream* s, POINTER_NEW_UPDATE* pointer_new);
+ BOOL update_read_pointer_cached(wStream* s, POINTER_CACHED_UPDATE* pointer_cached);
+
+diff --git a/libfreerdp/core/window.c b/libfreerdp/core/window.c
+index 7422f5b..c10fa33 100644
+--- a/libfreerdp/core/window.c
++++ b/libfreerdp/core/window.c
+@@ -35,6 +35,11 @@ BOOL update_read_icon_info(wStream* s, ICON_INFO* icon_info)
+ Stream_Read_UINT16(s, icon_info->cacheEntry); /* cacheEntry (2 bytes) */
+ Stream_Read_UINT8(s, icon_info->cacheId); /* cacheId (1 byte) */
+ Stream_Read_UINT8(s, icon_info->bpp); /* bpp (1 byte) */
++ if ((icon_info->bpp < 1) || (icon_info->bpp > 32))
++ {
++ fprintf(stderr, "%s: invalid bpp %d\n", __FUNCTION__, icon_info->bpp);
++ return FALSE;
++ }
+ Stream_Read_UINT16(s, icon_info->width); /* width (2 bytes) */
+ Stream_Read_UINT16(s, icon_info->height); /* height (2 bytes) */
+
+--
+1.9.3
+
diff --git a/net-misc/freerdp/files/freerdp-1.1-cmake-3.1.patch b/net-misc/freerdp/files/freerdp-1.1-cmake-3.1.patch
new file mode 100644
index 000000000000..aedfeb07a263
--- /dev/null
+++ b/net-misc/freerdp/files/freerdp-1.1-cmake-3.1.patch
@@ -0,0 +1,68 @@
+From 1b663ceffe51008af7ae9749e5b7999b2f7d6698 Mon Sep 17 00:00:00 2001
+From: Bernhard Miklautz <bernhard.miklautz@shacknet.at>
+Date: Fri, 12 Dec 2014 18:26:45 +0100
+Subject: [PATCH] build: cmake 3.1 compatibility
+
+* fix problem with REMOVE_DUPLICATES on undefined lists
+* since 3.1 file(GLOB FILEPATHS RELATIVE .. returns single / instead of // as
+ previously - necessary adoptions for regex and matches done. Should
+ work with all cmake versions.
+
+Tested with 3.1.0-rc3
+---
+ channels/CMakeLists.txt | 4 ++--
+ channels/client/CMakeLists.txt | 2 ++
+ client/CMakeLists.txt | 4 ++--
+ server/CMakeLists.txt | 4 ++--
+ third-party/CMakeLists.txt | 6 +++---
+ 5 files changed, 11 insertions(+), 9 deletions(-)
+
+diff --git a/channels/CMakeLists.txt b/channels/CMakeLists.txt
+index c4e6048..540b1ac 100644
+--- a/channels/CMakeLists.txt
++++ b/channels/CMakeLists.txt
+@@ -253,8 +253,8 @@ set(FILENAME "ChannelOptions.cmake")
+ file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}")
+
+ foreach(FILEPATH ${FILEPATHS})
+- if(${FILEPATH} MATCHES "^([^/]*)//${FILENAME}")
+- string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" DIR ${FILEPATH})
++ if(${FILEPATH} MATCHES "^([^/]*)/+${FILENAME}")
++ string(REGEX REPLACE "^([^/]*)/+${FILENAME}" "\\1" DIR ${FILEPATH})
+ set(CHANNEL_OPTION)
+ include(${FILEPATH})
+ if(${CHANNEL_OPTION})
+diff --git a/channels/client/CMakeLists.txt b/channels/client/CMakeLists.txt
+index 049bc7b..2db18e8 100644
+--- a/channels/client/CMakeLists.txt
++++ b/channels/client/CMakeLists.txt
+@@ -24,7 +24,9 @@ set(${MODULE_PREFIX}_SRCS
+ ${CMAKE_CURRENT_SOURCE_DIR}/addin.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/addin.h)
+
++if(CHANNEL_STATIC_CLIENT_ENTRIES)
+ list(REMOVE_DUPLICATES CHANNEL_STATIC_CLIENT_ENTRIES)
++endif()
+
+ foreach(STATIC_ENTRY ${CHANNEL_STATIC_CLIENT_ENTRIES})
+ foreach(STATIC_MODULE ${CHANNEL_STATIC_CLIENT_MODULES})
+diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt
+index 09b1fd4..610f35e 100644
+--- a/third-party/CMakeLists.txt
++++ b/third-party/CMakeLists.txt
+@@ -22,11 +22,11 @@
+ file(GLOB all_valid_subdirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/CMakeLists.txt")
+
+ foreach(dir ${all_valid_subdirs})
+- if(${dir} MATCHES "^([^/]*)//CMakeLists.txt")
+- string(REGEX REPLACE "^([^/]*)//CMakeLists.txt" "\\1" dir_trimmed ${dir})
++ if(${dir} MATCHES "^([^/]*)/+CMakeLists.txt")
++ string(REGEX REPLACE "^([^/]*)/+CMakeLists.txt" "\\1" dir_trimmed ${dir})
+ message(STATUS "Adding third-party component ${dir_trimmed}")
+ add_subdirectory(${dir_trimmed})
+ endif()
+ endforeach(dir)
+
+-set(THIRD_PARTY_INCLUDES ${THIRD_PARTY_INCLUDES} PARENT_SCOPE)
+\ No newline at end of file
++set(THIRD_PARTY_INCLUDES ${THIRD_PARTY_INCLUDES} PARENT_SCOPE)
diff --git a/net-misc/freerdp/files/freerdp-1.1.0_beta1-avx.patch b/net-misc/freerdp/files/freerdp-1.1.0_beta1-avx.patch
new file mode 100644
index 000000000000..8a07e8a6d30d
--- /dev/null
+++ b/net-misc/freerdp/files/freerdp-1.1.0_beta1-avx.patch
@@ -0,0 +1,61 @@
+commit 81580f10d910a8e88bc09c1fc692a2e14161ffa1
+Author: Bernhard Miklautz <bernhard.miklautz@shacknet.at>
+Date: Thu Mar 14 23:18:21 2013 +0100
+
+ winpr/sysinfo: fixed build and detection when build with AVX
+
+diff --git a/winpr/libwinpr/sysinfo/sysinfo.c b/winpr/libwinpr/sysinfo/sysinfo.c
+index 947dc24..59200cc 100644
+--- a/winpr/libwinpr/sysinfo/sysinfo.c
++++ b/winpr/libwinpr/sysinfo/sysinfo.c
+@@ -662,32 +662,29 @@ BOOL IsProcessorFeaturePresentEx(DWORD ProcessorFeature)
+ case PF_EX_AVX_AES:
+ {
+ if ((c & C_BITS_AVX) != C_BITS_AVX)
+- ret = FALSE;
++ break;
+
+- int e, f;
+- xgetbv(0, e, f);
++ int e, f;
++ xgetbv(0, e, f);
+
+- if ((e & E_BITS_AVX) == E_BITS_AVX)
++ if ((e & E_BITS_AVX) == E_BITS_AVX)
++ {
++ switch (ProcessorFeature)
+ {
+- switch (ProcessorFeature)
+- {
+- case: PF_EX_AVX:
+- ret = TRUE;
+- break;
+- case: PF_EX_FMA:
+- if (c & C_BIT_FMA)
+- ret = TRUE;
+- break;
+- case: PF_EX_AVX_AES:
+- if (c & C_BIT_AVX_AES)
+- ret = TRUE;
+- break;
+- {
++ case PF_EX_AVX:
+ ret = TRUE;
+ break;
+- }
+- }
+- }
++ case PF_EX_FMA:
++ if (c & C_BIT_FMA)
++ ret = TRUE;
++ break;
++ case PF_EX_AVX_AES:
++ if (c & C_BIT_AVX_AES)
++ ret = TRUE;
++ break;
++ }
++ }
++ }
+ break;
+ #endif //__AVX__
+ default:
diff --git a/net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-cmake.patch b/net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-cmake.patch
new file mode 100644
index 000000000000..4ab536a50572
--- /dev/null
+++ b/net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-cmake.patch
@@ -0,0 +1,25 @@
+From a668a644889bd58405b92c72a91c308c2bad8022 Mon Sep 17 00:00:00 2001
+From: Bernhard Miklautz <bernhard.miklautz@thincast.com>
+Date: Tue, 11 Nov 2014 14:40:31 +0100
+Subject: [PATCH] Don't include CMakeDetermineSystem
+
+According to [1] this is an cmake "internal" module and shouldn't be
+included directly.
+
+[1] http://public.kitware.com/Bug/view.php?id=13796#c31892
+---
+ CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 79f17bd..5f6859c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -44,7 +44,6 @@ include(CheckCmakeCompat)
+ include(CheckIncludeFiles)
+ include(CheckLibraryExists)
+ include(CheckStructHasMember)
+-include(CMakeDetermineSystem)
+ include(FindPkgConfig)
+ include(TestBigEndian)
+
diff --git a/net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-ffmpeg.patch b/net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-ffmpeg.patch
new file mode 100644
index 000000000000..0e08c6043080
--- /dev/null
+++ b/net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-ffmpeg.patch
@@ -0,0 +1,127 @@
+From bf065f3e892e0a94e442de9a7155a7ac170f2add Mon Sep 17 00:00:00 2001
+From: eroen <eroen@falcon.eroen.eu>
+Date: Thu, 21 Nov 2013 11:35:53 +0100
+Subject: [PATCH 1/3] ffmpeg-2 -- AVCODEC_MAX_AUDIO_FRAME_SIZE
+
+deprecated:
+http://git.videolan.org/?p=ffmpeg.git;a=commit;h=0eea212943544d40f99b05571aa7159d78667154
+
+broken with libavcodec 54
+---
+ channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
+index adf8e04..0d5b956 100644
+--- a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
++++ b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
+@@ -43,6 +43,12 @@
+ #define AVMEDIA_TYPE_AUDIO 1
+ #endif
+
++#if LIBAVCODEC_VERSION_MAJOR < 54
++#define MAX_AUDIO_FRAME_SIZE AVCODEC_MAX_AUDIO_FRAME_SIZE
++#else
++#define MAX_AUDIO_FRAME_SIZE 192000
++#endif
++
+ typedef struct _TSMFFFmpegDecoder
+ {
+ ITSMFDecoder iface;
+@@ -351,7 +357,7 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const BYTE* data, UI
+ #endif
+
+ if (mdecoder->decoded_size_max == 0)
+- mdecoder->decoded_size_max = AVCODEC_MAX_AUDIO_FRAME_SIZE + 16;
++ mdecoder->decoded_size_max = MAX_AUDIO_FRAME_SIZE + 16;
+ mdecoder->decoded_data = malloc(mdecoder->decoded_size_max);
+ ZeroMemory(mdecoder->decoded_data, mdecoder->decoded_size_max);
+ /* align the memory for SSE2 needs */
+@@ -363,7 +369,7 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const BYTE* data, UI
+ while (src_size > 0)
+ {
+ /* Ensure enough space for decoding */
+- if (mdecoder->decoded_size_max - mdecoder->decoded_size < AVCODEC_MAX_AUDIO_FRAME_SIZE)
++ if (mdecoder->decoded_size_max - mdecoder->decoded_size < MAX_AUDIO_FRAME_SIZE)
+ {
+ mdecoder->decoded_size_max = mdecoder->decoded_size_max * 2 + 16;
+ mdecoder->decoded_data = realloc(mdecoder->decoded_data, mdecoder->decoded_size_max);
+--
+1.8.4
+
+
+From cbcf0de3fac985afaeeef7daf104c94ad8cdca26 Mon Sep 17 00:00:00 2001
+From: eroen <eroen@falcon.eroen.eu>
+Date: Thu, 21 Nov 2013 13:14:04 +0100
+Subject: [PATCH 2/3] ffmpeg-2 -- dsp_mask
+
+deprecated:
+http://git.videolan.org/?p=ffmpeg.git;a=commit;h=95510be8c35753da8f48062b28b65e7acdab965f
+
+broken with libavcodec 55
+---
+ channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
+index 0d5b956..1f99ec3 100644
+--- a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
++++ b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
+@@ -104,6 +104,7 @@ static BOOL tsmf_ffmpeg_init_audio_stream(ITSMFDecoder* decoder, const TS_AM_MED
+ mdecoder->codec_context->channels = media_type->Channels;
+ mdecoder->codec_context->block_align = media_type->BlockAlign;
+
++#if LIBAVCODEC_VERSION_MAJOR < 55
+ #ifdef AV_CPU_FLAG_SSE2
+ mdecoder->codec_context->dsp_mask = AV_CPU_FLAG_SSE2 | AV_CPU_FLAG_MMX2;
+ #else
+@@ -113,6 +114,13 @@ static BOOL tsmf_ffmpeg_init_audio_stream(ITSMFDecoder* decoder, const TS_AM_MED
+ mdecoder->codec_context->dsp_mask = FF_MM_SSE2 | FF_MM_MMX2;
+ #endif
+ #endif
++#else /* LIBAVCODEC_VERSION_MAJOR < 55 */
++#ifdef AV_CPU_FLAG_SSE2
++ av_set_cpu_flags_mask(AV_CPU_FLAG_SSE2 | AV_CPU_FLAG_MMX2);
++#else
++ av_set_cpu_flags_mask(FF_MM_SSE2 | FF_MM_MMX2);
++#endif
++#endif /* LIBAVCODEC_VERSION_MAJOR < 55 */
+
+ return TRUE;
+ }
+--
+1.8.4
+
+
+From 6fe23e1a3860528a8ecdfc8e9ccfdbd0e3945869 Mon Sep 17 00:00:00 2001
+From: eroen <eroen@falcon.eroen.eu>
+Date: Thu, 21 Nov 2013 13:26:03 +0100
+Subject: [PATCH 3/3] ffmpeg-2 -- CodecID
+
+deprecated:
+http://git.videolan.org/?p=ffmpeg.git;a=commit;h=104e10fb426f903ba9157fdbfe30292d0e4c3d72
+
+broken with libavcodec 55
+---
+ channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
+index 1f99ec3..09b4f68 100644
+--- a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
++++ b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
+@@ -54,7 +54,11 @@
+ ITSMFDecoder iface;
+
+ int media_type;
++#if LIBAVCODEC_VERSION_MAJOR < 55
+ enum CodecID codec_id;
++#else
++ enum AVCodecID codec_id;
++#endif
+ AVCodecContext* codec_context;
+ AVCodec* codec;
+ AVFrame* frame;
+--
+1.8.4
+
diff --git a/net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-uclibc.patch b/net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-uclibc.patch
new file mode 100644
index 000000000000..f4f28b287028
--- /dev/null
+++ b/net-misc/freerdp/files/freerdp-1.1.0_beta1_p20130710-uclibc.patch
@@ -0,0 +1,66 @@
+https://bugs.gentoo.org/show_bug.cgi?id=497808
+https://github.com/FreeRDP/FreeRDP/pull/2024
+
+--- FreeRDP-780d451afad21a22d2af6bd030ee71311856f038/channels/drive/client/drive_file.c
++++ FreeRDP-780d451afad21a22d2af6bd030ee71311856f038-uclibc/channels/drive/client/drive_file.c
+@@ -436,7 +436,11 @@ BOOL drive_file_set_information(DRIVE_FI
+ int status;
+ char* fullpath;
+ struct STAT st;
++#if defined(__linux__) && !defined(ANDROID)
++ struct timespec tv[2];
++#else
+ struct timeval tv[2];
++#endif
+ UINT64 LastWriteTime;
+ UINT32 FileAttributes;
+ UINT32 FileNameLength;
+@@ -457,14 +461,21 @@ BOOL drive_file_set_information(DRIVE_FI
+ return FALSE;
+
+ tv[0].tv_sec = st.st_atime;
+- tv[0].tv_usec = 0;
+- tv[1].tv_sec = (LastWriteTime > 0 ? FILE_TIME_RDP_TO_SYSTEM(LastWriteTime) : st.st_mtime);
+- tv[1].tv_usec = 0;
++ tv[1].tv_sec = (LastWriteTime > 0 ? FILE_TIME_RDP_TO_SYSTEM(LastWriteTime) : st.st_mtime);
++
+ #ifndef WIN32
+-/* TODO on win32 */
++/* TODO on win32 */
+ #ifdef ANDROID
++ tv[0].tv_usec = 0;
++ tv[1].tv_usec = 0;
+ utimes(file->fullpath, tv);
++#elif defined (__linux__)
++ tv[0].tv_nsec = 0;
++ tv[1].tv_nsec = 0;
++ futimens(file->fd, tv);
+ #else
++ tv[0].tv_usec = 0;
++ tv[1].tv_usec = 0;
+ futimes(file->fd, tv);
+ #endif
+
+--- FreeRDP-780d451afad21a22d2af6bd030ee71311856f038/winpr/libwinpr/synch/event.c
++++ FreeRDP-780d451afad21a22d2af6bd030ee71311856f038-uclibc/winpr/libwinpr/synch/event.c
+@@ -115,6 +115,20 @@ HANDLE OpenEventA(DWORD dwDesiredAccess,
+ return NULL;
+ }
+
++#ifdef HAVE_EVENTFD_H
++#if defined(__UCLIBC__)
++static int eventfd_read(int fd, eventfd_t* value)
++{
++ return (read(fd, value, sizeof(*value)) == sizeof(*value)) ? 0 : -1;
++}
++
++static int eventfd_write(int fd, eventfd_t value)
++{
++ return (write(fd, &value, sizeof(value)) == sizeof(value)) ? 0 : -1;
++}
++#endif
++#endif
++
+ BOOL SetEvent(HANDLE hEvent)
+ {
+ ULONG Type;
diff --git a/net-misc/freerdp/files/freerdp-armfp.patch b/net-misc/freerdp/files/freerdp-armfp.patch
new file mode 100644
index 000000000000..1a367d5600c3
--- /dev/null
+++ b/net-misc/freerdp/files/freerdp-armfp.patch
@@ -0,0 +1,84 @@
+From 2355b54f8516a6e1c600df8f26ac7d56916bfd99 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Fri, 1 May 2015 17:35:21 -0400
+Subject: [PATCH] Remove the ARM_FP_ABI option
+
+It's unclear why this option would be necessary, and it causes problems
+when people do not match it to their toolchain and CFLAGS.
+
+To set the float abi, either use a toolchain with an appropriate default
+or set the float-abi option in the CFLAGS environment variable.
+
+This should resolve #2586.
+---
+ cmake/ConfigOptions.cmake | 6 ------
+ libfreerdp/CMakeLists.txt | 4 ++--
+ packaging/deb/freerdp-nightly/rules | 7 -------
+ 3 files changed, 2 insertions(+), 15 deletions(-)
+
+diff --git a/cmake/ConfigOptions.cmake b/cmake/ConfigOptions.cmake
+index b51a46b..cef6ba6 100644
+--- a/cmake/ConfigOptions.cmake
++++ b/cmake/ConfigOptions.cmake
+@@ -29,12 +29,6 @@ if(TARGET_ARCH MATCHES "ARM")
+ else()
+ option(WITH_NEON "Enable NEON optimization." OFF)
+ endif()
+- if (NOT DEFINED ARM_FP_ABI)
+- set(ARM_FP_ABI "softfp" CACHE STRING "Floating point ABI to use on arm")
+- else()
+- set(ARM_FP_ABI ${ARM_FP_API} CACHE STRING "Floating point ABI to use on arm")
+- endif()
+- mark_as_advanced(ARM_FP_ABI)
+ else()
+ if(NOT APPLE)
+ option(WITH_IPP "Use Intel Performance Primitives." OFF)
+diff --git a/libfreerdp/CMakeLists.txt b/libfreerdp/CMakeLists.txt
+index a1cbd9d..112b75a 100644
+--- a/libfreerdp/CMakeLists.txt
++++ b/libfreerdp/CMakeLists.txt
+@@ -156,7 +156,7 @@ if(WITH_SSE2)
+ endif()
+
+ if(WITH_NEON)
+- set_source_files_properties(${CODEC_NEON_SRCS} PROPERTIES COMPILE_FLAGS "-mfpu=neon -mfloat-abi=${ARM_FP_ABI} -Wno-unused-variable" )
++ set_source_files_properties(${CODEC_NEON_SRCS} PROPERTIES COMPILE_FLAGS "-mfpu=neon -Wno-unused-variable" )
+ set(CODEC_SRCS ${CODEC_SRCS} ${CODEC_NEON_SRCS})
+ endif()
+
+@@ -236,7 +236,7 @@ if(WITH_SSE2)
+ endif()
+ elseif(WITH_NEON)
+ if(CMAKE_COMPILER_IS_GNUCC)
+- set(OPTIMIZATION "${OPTIMIZATION} -mfpu=neon -mfloat-abi=${ARM_FP_ABI}")
++ set(OPTIMIZATION "${OPTIMIZATION} -mfpu=neon")
+ endif()
+ # TODO: Add MSVC equivalent
+ endif()
+diff --git a/packaging/deb/freerdp-nightly/rules b/packaging/deb/freerdp-nightly/rules
+index 4366f63..44ceb56 100755
+--- a/packaging/deb/freerdp-nightly/rules
++++ b/packaging/deb/freerdp-nightly/rules
+@@ -1,11 +1,5 @@
+ #!/usr/bin/make -f
+
+-DEB_HOST_ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)
+-ifneq (,$(filter armhf,$(DEB_HOST_ARCH)))
+-ARM_FLOAT_ABI = -DARM_FP_ABI=hard
+-else
+-ARM_FLOAT_ABI =
+-endif
+ NULL =
+
+ DEB_CMAKE_EXTRA_FLAGS := -DCMAKE_SKIP_RPATH=FALSE \
+@@ -26,7 +20,6 @@ DEB_CMAKE_EXTRA_FLAGS := -DCMAKE_SKIP_RPATH=FALSE \
+ -DCMAKE_INSTALL_PREFIX=/opt/freerdp-nightly/ \
+ -DCMAKE_INSTALL_INCLUDEDIR=include \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+- $(ARM_FLOAT_ABI) \
+ $(NULL)
+
+ %:
+--
+2.5.0
+
diff --git a/net-misc/freerdp/files/freerdp-cmake-3.1.patch b/net-misc/freerdp/files/freerdp-cmake-3.1.patch
new file mode 100644
index 000000000000..462fb56396f8
--- /dev/null
+++ b/net-misc/freerdp/files/freerdp-cmake-3.1.patch
@@ -0,0 +1,98 @@
+From 1b663ceffe51008af7ae9749e5b7999b2f7d6698 Mon Sep 17 00:00:00 2001
+From: Bernhard Miklautz <bernhard.miklautz@shacknet.at>
+Date: Fri, 12 Dec 2014 18:26:45 +0100
+Subject: [PATCH] build: cmake 3.1 compatibility
+
+* fix problem with REMOVE_DUPLICATES on undefined lists
+* since 3.1 file(GLOB FILEPATHS RELATIVE .. returns single / instead of // as
+ previously - necessary adoptions for regex and matches done. Should
+ work with all cmake versions.
+
+Tested with 3.1.0-rc3
+---
+ channels/CMakeLists.txt | 4 ++--
+ channels/client/CMakeLists.txt | 2 ++
+ client/CMakeLists.txt | 4 ++--
+ server/CMakeLists.txt | 4 ++--
+ third-party/CMakeLists.txt | 6 +++---
+ 5 files changed, 11 insertions(+), 9 deletions(-)
+
+diff --git a/channels/CMakeLists.txt b/channels/CMakeLists.txt
+index c4e6048..540b1ac 100644
+--- a/channels/CMakeLists.txt
++++ b/channels/CMakeLists.txt
+@@ -253,8 +253,8 @@ set(FILENAME "ChannelOptions.cmake")
+ file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}")
+
+ foreach(FILEPATH ${FILEPATHS})
+- if(${FILEPATH} MATCHES "^([^/]*)//${FILENAME}")
+- string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" DIR ${FILEPATH})
++ if(${FILEPATH} MATCHES "^([^/]*)/+${FILENAME}")
++ string(REGEX REPLACE "^([^/]*)/+${FILENAME}" "\\1" DIR ${FILEPATH})
+ set(CHANNEL_OPTION)
+ include(${FILEPATH})
+ if(${CHANNEL_OPTION})
+diff --git a/channels/client/CMakeLists.txt b/channels/client/CMakeLists.txt
+index 049bc7b..2db18e8 100644
+--- a/channels/client/CMakeLists.txt
++++ b/channels/client/CMakeLists.txt
+@@ -24,7 +24,9 @@ set(${MODULE_PREFIX}_SRCS
+ ${CMAKE_CURRENT_SOURCE_DIR}/addin.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/addin.h)
+
++if(CHANNEL_STATIC_CLIENT_ENTRIES)
+ list(REMOVE_DUPLICATES CHANNEL_STATIC_CLIENT_ENTRIES)
++endif()
+
+ foreach(STATIC_ENTRY ${CHANNEL_STATIC_CLIENT_ENTRIES})
+ foreach(STATIC_MODULE ${CHANNEL_STATIC_CLIENT_MODULES})
+diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
+index 14ed363..b8b7699 100644
+--- a/client/CMakeLists.txt
++++ b/client/CMakeLists.txt
+@@ -63,8 +63,8 @@ set(FILENAME "ModuleOptions.cmake")
+ file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}")
+
+ foreach(FILEPATH ${FILEPATHS})
+- if(${FILEPATH} MATCHES "^([^/]*)//${FILENAME}")
+- string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" FREERDP_CLIENT ${FILEPATH})
++ if(${FILEPATH} MATCHES "^([^/]*)/+${FILENAME}")
++ string(REGEX REPLACE "^([^/]*)/+${FILENAME}" "\\1" FREERDP_CLIENT ${FILEPATH})
+ set(FREERDP_CLIENT_ENABLED 0)
+ include(${FILEPATH})
+ if(FREERDP_CLIENT_ENABLED)
+diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt
+index cda14ba..ee9458e 100644
+--- a/server/CMakeLists.txt
++++ b/server/CMakeLists.txt
+@@ -48,8 +48,8 @@ set(FILENAME "ModuleOptions.cmake")
+ file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}")
+
+ foreach(FILEPATH ${FILEPATHS})
+- if(${FILEPATH} MATCHES "^([^/]*)//${FILENAME}")
+- string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" FREERDP_SERVER ${FILEPATH})
++ if(${FILEPATH} MATCHES "^([^/]*)/+${FILENAME}")
++ string(REGEX REPLACE "^([^/]*)/+${FILENAME}" "\\1" FREERDP_SERVER ${FILEPATH})
+ set(FREERDP_SERVER_ENABLED 0)
+ include(${FILEPATH})
+ if(FREERDP_SERVER_ENABLED)
+diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt
+index 09b1fd4..610f35e 100644
+--- a/third-party/CMakeLists.txt
++++ b/third-party/CMakeLists.txt
+@@ -22,11 +22,11 @@
+ file(GLOB all_valid_subdirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/CMakeLists.txt")
+
+ foreach(dir ${all_valid_subdirs})
+- if(${dir} MATCHES "^([^/]*)//CMakeLists.txt")
+- string(REGEX REPLACE "^([^/]*)//CMakeLists.txt" "\\1" dir_trimmed ${dir})
++ if(${dir} MATCHES "^([^/]*)/+CMakeLists.txt")
++ string(REGEX REPLACE "^([^/]*)/+CMakeLists.txt" "\\1" dir_trimmed ${dir})
+ message(STATUS "Adding third-party component ${dir_trimmed}")
+ add_subdirectory(${dir_trimmed})
+ endif()
+ endforeach(dir)
+
+-set(THIRD_PARTY_INCLUDES ${THIRD_PARTY_INCLUDES} PARENT_SCOPE)
+\ No newline at end of file
++set(THIRD_PARTY_INCLUDES ${THIRD_PARTY_INCLUDES} PARENT_SCOPE)
diff --git a/net-misc/freerdp/freerdp-1.1.0_beta1_p20130710-r1.ebuild b/net-misc/freerdp/freerdp-1.1.0_beta1_p20130710-r1.ebuild
new file mode 100644
index 000000000000..a9b21ea503e5
--- /dev/null
+++ b/net-misc/freerdp/freerdp-1.1.0_beta1_p20130710-r1.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit cmake-utils vcs-snapshot
+
+if [[ ${PV} != 9999* ]]; then
+ COMMIT="780d451afad21a22d2af6bd030ee71311856f038"
+ SRC_URI="https://github.com/FreeRDP/FreeRDP/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="alpha amd64 arm ppc ppc64 x86"
+else
+ inherit git-2
+ SRC_URI=""
+ EGIT_REPO_URI="git://github.com/FreeRDP/FreeRDP.git
+ https://github.com/FreeRDP/FreeRDP.git"
+ KEYWORDS=""
+fi
+
+DESCRIPTION="Free implementation of the Remote Desktop Protocol"
+HOMEPAGE="http://www.freerdp.com/"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="alsa +channels +client cups debug directfb doc ffmpeg gstreamer jpeg
+ pulseaudio server smartcard cpu_flags_x86_sse2 test X xinerama xv"
+
+RDEPEND="
+ dev-libs/openssl
+ sys-libs/zlib
+ alsa? ( media-libs/alsa-lib )
+ cups? ( net-print/cups )
+ client? (
+ X? (
+ x11-libs/libXcursor
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXrender
+ xinerama? ( x11-libs/libXinerama )
+ xv? ( x11-libs/libXv )
+ )
+ )
+ directfb? ( dev-libs/DirectFB )
+ ffmpeg? ( virtual/ffmpeg )
+ gstreamer? (
+ media-libs/gstreamer:0.10
+ media-libs/gst-plugins-base:0.10
+ x11-libs/libXrandr
+ )
+ jpeg? ( virtual/jpeg )
+ pulseaudio? ( media-sound/pulseaudio )
+ server? (
+ X? (
+ x11-libs/libXcursor
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ xinerama? ( x11-libs/libXinerama )
+ )
+ )
+ smartcard? ( sys-apps/pcsc-lite )
+ X? (
+ x11-libs/libX11
+ x11-libs/libxkbfile
+ )
+"
+DEPEND="${RDEPEND}
+ <dev-util/cmake-3.1
+ client? ( X? ( doc? (
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ ) ) )
+"
+
+DOCS=( README )
+
+PATCHES=(
+ "${FILESDIR}/${P}-ffmpeg.patch"
+ "${FILESDIR}/${PN}-1.1-CVE-2014-0250.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_with alsa ALSA)
+ $(cmake-utils_use_with channels CHANNELS)
+ $(cmake-utils_use_with client CLIENT)
+ $(cmake-utils_use_with cups CUPS)
+ $(cmake-utils_use_with debug DEBUG_ALL)
+ $(cmake-utils_use_with doc MANPAGES)
+ $(cmake-utils_use_with directfb DIRECTFB)
+ $(cmake-utils_use_with ffmpeg FFMPEG)
+ $(cmake-utils_use_with gstreamer GSTREAMER)
+ $(cmake-utils_use_with jpeg JPEG)
+ $(cmake-utils_use_with pulseaudio PULSE)
+ $(cmake-utils_use_with server SERVER)
+ $(cmake-utils_use_with smartcard PCSC)
+ $(cmake-utils_use_with cpu_flags_x86_sse2 SSE2)
+ $(cmake-utils_use_with X X11)
+ $(cmake-utils_use_with xinerama XINERAMA)
+ $(cmake-utils_use_with xv XV)
+ $(cmake-utils_use_build test TESTING)
+ )
+ cmake-utils_src_configure
+}
diff --git a/net-misc/freerdp/freerdp-1.1.0_beta1_p20130710-r2.ebuild b/net-misc/freerdp/freerdp-1.1.0_beta1_p20130710-r2.ebuild
new file mode 100644
index 000000000000..b97b3dbf0f5a
--- /dev/null
+++ b/net-misc/freerdp/freerdp-1.1.0_beta1_p20130710-r2.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit cmake-utils vcs-snapshot
+
+if [[ ${PV} != 9999* ]]; then
+ COMMIT="780d451afad21a22d2af6bd030ee71311856f038"
+ SRC_URI="https://github.com/FreeRDP/FreeRDP/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86"
+else
+ inherit git-2
+ SRC_URI=""
+ EGIT_REPO_URI="git://github.com/FreeRDP/FreeRDP.git
+ https://github.com/FreeRDP/FreeRDP.git"
+ KEYWORDS=""
+fi
+
+DESCRIPTION="Free implementation of the Remote Desktop Protocol"
+HOMEPAGE="http://www.freerdp.com/"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="alsa +client cups debug directfb doc ffmpeg gstreamer jpeg
+ pulseaudio server smartcard cpu_flags_x86_sse2 test usb X xinerama xv"
+
+RDEPEND="
+ dev-libs/openssl
+ sys-libs/zlib
+ alsa? ( media-libs/alsa-lib )
+ cups? ( net-print/cups )
+ client? (
+ usb? (
+ virtual/libudev:0=
+ sys-apps/util-linux:0=
+ dev-libs/dbus-glib:0=
+ virtual/libusb:1=
+ )
+ X? (
+ x11-libs/libXcursor
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXrender
+ xinerama? ( x11-libs/libXinerama )
+ xv? ( x11-libs/libXv )
+ )
+ )
+ directfb? ( dev-libs/DirectFB )
+ ffmpeg? ( virtual/ffmpeg )
+ gstreamer? (
+ media-libs/gstreamer:0.10
+ media-libs/gst-plugins-base:0.10
+ x11-libs/libXrandr
+ )
+ jpeg? ( virtual/jpeg )
+ pulseaudio? ( media-sound/pulseaudio )
+ server? (
+ X? (
+ x11-libs/libXcursor
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ xinerama? ( x11-libs/libXinerama )
+ )
+ )
+ smartcard? ( sys-apps/pcsc-lite )
+ X? (
+ x11-libs/libX11
+ x11-libs/libxkbfile
+ )
+"
+DEPEND="${RDEPEND}
+ <dev-util/cmake-3.1
+ virtual/pkgconfig
+ client? ( X? ( doc? (
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ ) ) )
+"
+
+DOCS=( README )
+
+PATCHES=(
+ "${FILESDIR}/${P}-ffmpeg.patch"
+ "${FILESDIR}/${PN}-1.1-CVE-2014-0250.patch"
+ "${FILESDIR}/${P}-uclibc.patch"
+ "${FILESDIR}/${P}-cmake.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_with alsa ALSA)
+ $(cmake-utils_use_with client CLIENT)
+ $(cmake-utils_use_with cups CUPS)
+ $(cmake-utils_use_with debug DEBUG_ALL)
+ $(cmake-utils_use_with doc MANPAGES)
+ $(cmake-utils_use_with directfb DIRECTFB)
+ $(cmake-utils_use_with ffmpeg FFMPEG)
+ $(cmake-utils_use_with gstreamer GSTREAMER)
+ $(cmake-utils_use_with jpeg JPEG)
+ $(cmake-utils_use_with pulseaudio PULSE)
+ $(cmake-utils_use_with server SERVER)
+ $(cmake-utils_use_with smartcard PCSC)
+ $(cmake-utils_use_with cpu_flags_x86_sse2 SSE2)
+ $(cmake-utils_use usb CHANNEL_URBDRC)
+ $(cmake-utils_use_with X X11)
+ $(cmake-utils_use_with xinerama XINERAMA)
+ $(cmake-utils_use_with xv XV)
+ $(cmake-utils_use_build test TESTING)
+ )
+ cmake-utils_src_configure
+}
diff --git a/net-misc/freerdp/freerdp-1.1.0_beta1_p20150312.ebuild b/net-misc/freerdp/freerdp-1.1.0_beta1_p20150312.ebuild
new file mode 100644
index 000000000000..baa511f43651
--- /dev/null
+++ b/net-misc/freerdp/freerdp-1.1.0_beta1_p20150312.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit cmake-utils vcs-snapshot
+
+if [[ ${PV} != 9999* ]]; then
+ COMMIT="770c67d340d5f0a7b48d53a1ae0fc23aff748fc4"
+ SRC_URI="https://github.com/FreeRDP/FreeRDP/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86"
+else
+ inherit git-2
+ SRC_URI=""
+ EGIT_REPO_URI="git://github.com/FreeRDP/FreeRDP.git
+ https://github.com/FreeRDP/FreeRDP.git"
+ KEYWORDS=""
+fi
+
+DESCRIPTION="Free implementation of the Remote Desktop Protocol"
+HOMEPAGE="http://www.freerdp.com/"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="alsa +client cups debug directfb doc ffmpeg gstreamer jpeg
+ pulseaudio server smartcard cpu_flags_x86_sse2 test usb X xinerama xv"
+
+RDEPEND="
+ dev-libs/openssl
+ sys-libs/zlib
+ alsa? ( media-libs/alsa-lib )
+ cups? ( net-print/cups )
+ client? (
+ usb? (
+ virtual/libudev:0=
+ sys-apps/util-linux:0=
+ dev-libs/dbus-glib:0=
+ virtual/libusb:1=
+ )
+ X? (
+ x11-libs/libXcursor
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXrender
+ xinerama? ( x11-libs/libXinerama )
+ xv? ( x11-libs/libXv )
+ )
+ )
+ directfb? ( dev-libs/DirectFB )
+ ffmpeg? ( virtual/ffmpeg )
+ gstreamer? (
+ media-libs/gstreamer:0.10
+ media-libs/gst-plugins-base:0.10
+ x11-libs/libXrandr
+ )
+ jpeg? ( virtual/jpeg )
+ pulseaudio? ( media-sound/pulseaudio )
+ server? (
+ X? (
+ x11-libs/libXcursor
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ xinerama? ( x11-libs/libXinerama )
+ )
+ )
+ smartcard? ( sys-apps/pcsc-lite )
+ X? (
+ x11-libs/libX11
+ x11-libs/libxkbfile
+ )
+"
+DEPEND="${RDEPEND}
+ <dev-util/cmake-3.1
+ virtual/pkgconfig
+ client? ( X? ( doc? (
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ ) ) )
+"
+
+DOCS=( README )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.1.0_beta1_p20130710-uclibc.patch"
+ "${FILESDIR}/${PN}-1.1.0_beta1_p20130710-cmake.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_with alsa ALSA)
+ $(cmake-utils_use_with client CLIENT)
+ $(cmake-utils_use_with cups CUPS)
+ $(cmake-utils_use_with debug DEBUG_ALL)
+ $(cmake-utils_use_with doc MANPAGES)
+ $(cmake-utils_use_with directfb DIRECTFB)
+ $(cmake-utils_use_with ffmpeg FFMPEG)
+ $(cmake-utils_use_with gstreamer GSTREAMER)
+ $(cmake-utils_use_with jpeg JPEG)
+ $(cmake-utils_use_with pulseaudio PULSE)
+ $(cmake-utils_use_with server SERVER)
+ $(cmake-utils_use_with smartcard PCSC)
+ $(cmake-utils_use_with cpu_flags_x86_sse2 SSE2)
+ $(cmake-utils_use usb CHANNEL_URBDRC)
+ $(cmake-utils_use_with X X11)
+ $(cmake-utils_use_with xinerama XINERAMA)
+ $(cmake-utils_use_with xv XV)
+ $(cmake-utils_use_build test TESTING)
+ )
+ cmake-utils_src_configure
+}
diff --git a/net-misc/freerdp/freerdp-1.2.0_beta1_pre20141115.ebuild b/net-misc/freerdp/freerdp-1.2.0_beta1_pre20141115.ebuild
new file mode 100644
index 000000000000..52eb9bd69595
--- /dev/null
+++ b/net-misc/freerdp/freerdp-1.2.0_beta1_pre20141115.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit cmake-utils vcs-snapshot
+
+if [[ ${PV} != 9999* ]]; then
+ COMMIT="7a6c6b7436c2fcb02a38bf89e0b3efcdb43f2ef5"
+ SRC_URI="https://github.com/FreeRDP/FreeRDP/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+else
+ inherit git-r3
+ SRC_URI=""
+ EGIT_REPO_URI="git://github.com/FreeRDP/FreeRDP.git
+ https://github.com/FreeRDP/FreeRDP.git"
+fi
+
+DESCRIPTION="Free implementation of the Remote Desktop Protocol"
+HOMEPAGE="http://www.freerdp.com/"
+
+LICENSE="Apache-2.0"
+SLOT="0/1.2"
+IUSE="alsa +client cups debug doc ffmpeg gstreamer jpeg
+ pulseaudio server smartcard cpu_flags_x86_sse2 test usb wayland X xinerama xv"
+
+RDEPEND="
+ dev-libs/openssl
+ sys-libs/zlib
+ alsa? ( media-libs/alsa-lib )
+ cups? ( net-print/cups )
+ client? (
+ usb? (
+ virtual/libudev:0=
+ sys-apps/util-linux:0=
+ dev-libs/dbus-glib:0=
+ virtual/libusb:1=
+ )
+ X? (
+ x11-libs/libXcursor
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXrender
+ xinerama? ( x11-libs/libXinerama )
+ xv? ( x11-libs/libXv )
+ )
+ )
+ ffmpeg? ( virtual/ffmpeg )
+ gstreamer? (
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ x11-libs/libXrandr
+ )
+ jpeg? ( virtual/jpeg )
+ pulseaudio? ( media-sound/pulseaudio )
+ server? (
+ X? (
+ x11-libs/libXcursor
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ xinerama? ( x11-libs/libXinerama )
+ )
+ )
+ smartcard? ( sys-apps/pcsc-lite )
+ wayland? ( dev-libs/wayland )
+ X? (
+ x11-libs/libX11
+ x11-libs/libxkbfile
+ )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ client? ( X? ( doc? (
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ ) ) )
+"
+
+DOCS=( README )
+PATCHES=( "${FILESDIR}/freerdp-cmake-3.1.patch" )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_with alsa ALSA)
+ $(cmake-utils_use_with client CLIENT)
+ $(cmake-utils_use_with cups CUPS)
+ $(cmake-utils_use_with debug DEBUG_ALL)
+ $(cmake-utils_use_with doc MANPAGES)
+ $(cmake-utils_use_with ffmpeg FFMPEG)
+ $(cmake-utils_use_with gstreamer GSTREAMER_1_0)
+ $(cmake-utils_use_with jpeg JPEG)
+ $(cmake-utils_use_with pulseaudio PULSE)
+ $(cmake-utils_use_with server SERVER)
+ $(cmake-utils_use_with smartcard PCSC)
+ $(cmake-utils_use_with cpu_flags_x86_sse2 SSE2)
+ $(cmake-utils_use usb CHANNEL_URBDRC)
+ $(cmake-utils_use_with X X11)
+ $(cmake-utils_use_with xinerama XINERAMA)
+ $(cmake-utils_use_with xv XV)
+ $(cmake-utils_use_build test TESTING)
+ $(cmake-utils_use_with wayland WAYLAND)
+ )
+ cmake-utils_src_configure
+}
diff --git a/net-misc/freerdp/freerdp-1.2.1_pre20150326.ebuild b/net-misc/freerdp/freerdp-1.2.1_pre20150326.ebuild
new file mode 100644
index 000000000000..4c23a3255b68
--- /dev/null
+++ b/net-misc/freerdp/freerdp-1.2.1_pre20150326.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit cmake-utils vcs-snapshot
+
+if [[ ${PV} != 9999* ]]; then
+ COMMIT="aa2181dcf2dd98693767ba738c5b2ad8c3d742d4"
+ SRC_URI="https://github.com/FreeRDP/FreeRDP/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="alpha amd64 arm ppc ppc64 x86"
+else
+ inherit git-r3
+ SRC_URI=""
+ EGIT_REPO_URI="git://github.com/FreeRDP/FreeRDP.git
+ https://github.com/FreeRDP/FreeRDP.git"
+fi
+
+DESCRIPTION="Free implementation of the Remote Desktop Protocol"
+HOMEPAGE="http://www.freerdp.com/"
+
+LICENSE="Apache-2.0"
+SLOT="0/1.2"
+IUSE="alsa +client cpu_flags_x86_sse2 cups debug doc ffmpeg gstreamer jpeg
+ neon pulseaudio server smartcard test usb wayland X xinerama xv"
+
+RDEPEND="
+ dev-libs/openssl:0
+ sys-libs/zlib:0
+ alsa? ( media-libs/alsa-lib )
+ cups? ( net-print/cups )
+ client? (
+ usb? (
+ virtual/libudev:0=
+ sys-apps/util-linux:0=
+ dev-libs/dbus-glib:0=
+ virtual/libusb:1=
+ )
+ X? (
+ x11-libs/libXcursor
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXrender
+ xinerama? ( x11-libs/libXinerama )
+ xv? ( x11-libs/libXv )
+ )
+ )
+ ffmpeg? ( virtual/ffmpeg )
+ gstreamer? (
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ x11-libs/libXrandr
+ )
+ jpeg? ( virtual/jpeg:0 )
+ pulseaudio? ( media-sound/pulseaudio )
+ server? (
+ X? (
+ x11-libs/libXcursor
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ xinerama? ( x11-libs/libXinerama )
+ )
+ )
+ smartcard? ( sys-apps/pcsc-lite )
+ wayland? ( dev-libs/wayland )
+ X? (
+ x11-libs/libX11
+ x11-libs/libxkbfile
+ )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ client? ( X? ( doc? (
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ ) ) )
+"
+
+DOCS=( README )
+
+PATCHES=( "${FILESDIR}/freerdp-armfp.patch" )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_with alsa ALSA)
+ $(cmake-utils_use_with client CLIENT)
+ $(cmake-utils_use_with cups CUPS)
+ $(cmake-utils_use_with debug DEBUG_ALL)
+ $(cmake-utils_use_with doc MANPAGES)
+ $(cmake-utils_use_with ffmpeg FFMPEG)
+ $(cmake-utils_use_with gstreamer GSTREAMER_1_0)
+ $(cmake-utils_use_with jpeg JPEG)
+ $(cmake-utils_use_with neon NEON)
+ $(cmake-utils_use_with pulseaudio PULSE)
+ $(cmake-utils_use_with server SERVER)
+ $(cmake-utils_use_with smartcard PCSC)
+ $(cmake-utils_use_with cpu_flags_x86_sse2 SSE2)
+ $(cmake-utils_use usb CHANNEL_URBDRC)
+ $(cmake-utils_use_with X X11)
+ $(cmake-utils_use_with xinerama XINERAMA)
+ $(cmake-utils_use_with xv XV)
+ $(cmake-utils_use_build test TESTING)
+ $(cmake-utils_use_with wayland WAYLAND)
+ )
+ cmake-utils_src_configure
+}
diff --git a/net-misc/freerdp/freerdp-9999.1.ebuild b/net-misc/freerdp/freerdp-9999.1.ebuild
new file mode 100644
index 000000000000..131105eda55e
--- /dev/null
+++ b/net-misc/freerdp/freerdp-9999.1.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit cmake-utils vcs-snapshot
+
+if [[ ${PV} != 9999* ]]; then
+ COMMIT="aa2181dcf2dd98693767ba738c5b2ad8c3d742d4"
+ SRC_URI="https://github.com/FreeRDP/FreeRDP/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86"
+else
+ inherit git-r3
+ SRC_URI=""
+ EGIT_REPO_URI="git://github.com/FreeRDP/FreeRDP.git
+ https://github.com/FreeRDP/FreeRDP.git"
+fi
+
+DESCRIPTION="Free implementation of the Remote Desktop Protocol"
+HOMEPAGE="http://www.freerdp.com/"
+
+LICENSE="Apache-2.0"
+SLOT="0/1.2"
+IUSE="alsa +client cpu_flags_x86_sse2 cups debug doc ffmpeg gstreamer jpeg
+ neon pulseaudio server smartcard test usb wayland X xinerama xv"
+
+RDEPEND="
+ dev-libs/openssl:0
+ sys-libs/zlib:0
+ alsa? ( media-libs/alsa-lib )
+ cups? ( net-print/cups )
+ client? (
+ usb? (
+ virtual/libudev:0=
+ sys-apps/util-linux:0=
+ dev-libs/dbus-glib:0=
+ virtual/libusb:1=
+ )
+ X? (
+ x11-libs/libXcursor
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXrender
+ xinerama? ( x11-libs/libXinerama )
+ xv? ( x11-libs/libXv )
+ )
+ )
+ ffmpeg? ( virtual/ffmpeg )
+ gstreamer? (
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ x11-libs/libXrandr
+ )
+ jpeg? ( virtual/jpeg:0 )
+ pulseaudio? ( media-sound/pulseaudio )
+ server? (
+ X? (
+ x11-libs/libXcursor
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ xinerama? ( x11-libs/libXinerama )
+ )
+ )
+ smartcard? ( sys-apps/pcsc-lite )
+ wayland? ( dev-libs/wayland )
+ X? (
+ x11-libs/libX11
+ x11-libs/libxkbfile
+ )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ client? ( X? ( doc? (
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ ) ) )
+"
+
+DOCS=( README )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_with alsa ALSA)
+ $(cmake-utils_use_with client CLIENT)
+ $(cmake-utils_use_with cups CUPS)
+ $(cmake-utils_use_with debug DEBUG_ALL)
+ $(cmake-utils_use_with doc MANPAGES)
+ $(cmake-utils_use_with ffmpeg FFMPEG)
+ $(cmake-utils_use_with gstreamer GSTREAMER_1_0)
+ $(cmake-utils_use_with jpeg JPEG)
+ $(cmake-utils_use_with neon NEON)
+ $(cmake-utils_use_with pulseaudio PULSE)
+ $(cmake-utils_use_with server SERVER)
+ $(cmake-utils_use_with smartcard PCSC)
+ $(cmake-utils_use_with cpu_flags_x86_sse2 SSE2)
+ $(cmake-utils_use usb CHANNEL_URBDRC)
+ $(cmake-utils_use_with X X11)
+ $(cmake-utils_use_with xinerama XINERAMA)
+ $(cmake-utils_use_with xv XV)
+ $(cmake-utils_use_build test TESTING)
+ $(cmake-utils_use_with wayland WAYLAND)
+ )
+ cmake-utils_src_configure
+}
diff --git a/net-misc/freerdp/metadata.xml b/net-misc/freerdp/metadata.xml
new file mode 100644
index 000000000000..cf9652841d21
--- /dev/null
+++ b/net-misc/freerdp/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>floppym@gentoo.org</email>
+ <name>Mike Gilbert</name>
+ </maintainer>
+ <use>
+ <flag name="channels">Build virtual channel plugins</flag>
+ <flag name="client">Build client binaries</flag>
+ <flag name="server">Build server binaries</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">FreeRDP/FreeRDP</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/gcap/Manifest b/net-misc/gcap/Manifest
new file mode 100644
index 000000000000..9e27b239a1dc
--- /dev/null
+++ b/net-misc/gcap/Manifest
@@ -0,0 +1 @@
+DIST gcap-0.1.1.tar.gz 20612 SHA256 2941788de17f74fcd245290b233e4039ae71ca7ba5e90a400a19d551cfb545c3 SHA512 5206bdbc7cd5265456dd0b1a2c028c9ffb5e1324a0527c16ae2d74ff93e82e56bfc9e498f94d9895108265ce5e87c5510aece5ef61011f3128bf260eeaaee52d WHIRLPOOL 89c40c45b4026a601ffddc09254300ec990371c11095ac441392a06fcb11d63dc802749c7e7a7267dddb79129b37a07ead81d37b50d6ec39d8cb53e1457f7982
diff --git a/net-misc/gcap/gcap-0.1.1-r1.ebuild b/net-misc/gcap/gcap-0.1.1-r1.ebuild
new file mode 100644
index 000000000000..7f39c3d9d646
--- /dev/null
+++ b/net-misc/gcap/gcap-0.1.1-r1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit perl-module
+
+DESCRIPTION="Command line tool for downloading Youtube closed captions"
+HOMEPAGE="http://code.google.com/p/gcap/"
+SRC_URI="http://gcap.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="dev-perl/Getopt-ArgvFile
+ dev-perl/XML-DOM
+ virtual/perl-Getopt-Long"
+DEPEND="virtual/perl-ExtUtils-MakeMaker"
+
+SRC_TEST="do"
diff --git a/net-misc/gcap/metadata.xml b/net-misc/gcap/metadata.xml
new file mode 100644
index 000000000000..e96e35b1a37c
--- /dev/null
+++ b/net-misc/gcap/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
+
diff --git a/net-misc/geoipupdate/Manifest b/net-misc/geoipupdate/Manifest
new file mode 100644
index 000000000000..f0e809e39b73
--- /dev/null
+++ b/net-misc/geoipupdate/Manifest
@@ -0,0 +1 @@
+DIST geoipupdate-2.2.1.tar.gz 340884 SHA256 9547c42cc8620b2c3040fd8df95e8ee45c8b6ebcca7737d641f9526104d5f446 SHA512 5d28803353badd4d00a9174202912524f31e057ef4f5381360c16909fbccce3033f5ad7ec9c55963b70c0bbdb74589932bde36ea9b34f2a0632c504c1718dd85 WHIRLPOOL d5255654481a237175948817f88a80eb71aad4e65050e84db9c4056bd0883c4fc8b0bd2ebc8343b3ab37a7b4358dd6d4f5fae57c742711eba1156e78c5c8be38
diff --git a/net-misc/geoipupdate/geoipupdate-2.2.1.ebuild b/net-misc/geoipupdate/geoipupdate-2.2.1.ebuild
new file mode 100644
index 000000000000..255652d2792f
--- /dev/null
+++ b/net-misc/geoipupdate/geoipupdate-2.2.1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="performs automatic updates of GeoIP2 and GeoIP Legacy binary databases"
+HOMEPAGE="https://github.com/maxmind/geoipupdate"
+SRC_URI="https://github.com/maxmind/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~s390 sparc x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND="
+ net-misc/curl
+ sys-libs/zlib
+"
+RDEPEND="
+ ${DEPEND}
+ !<dev-libs/geoip-1.6.0
+"
+
+src_install() {
+ default
+ keepdir /usr/share/GeoIP
+}
diff --git a/net-misc/geoipupdate/metadata.xml b/net-misc/geoipupdate/metadata.xml
new file mode 100644
index 000000000000..e0abfd5b2dbb
--- /dev/null
+++ b/net-misc/geoipupdate/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>netmon</herd>
+ <upstream>
+ <remote-id type="github">maxmind/geoipupdate</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/geomyidae/Manifest b/net-misc/geomyidae/Manifest
new file mode 100644
index 000000000000..f9c6fcddbffa
--- /dev/null
+++ b/net-misc/geomyidae/Manifest
@@ -0,0 +1,2 @@
+DIST geomyidae-0.26.2.tar.gz 15399 SHA256 49b4fbc437321e31a3b073cf8b88ddd4482b35a144a4289b4849e2242b991465 SHA512 337665350ee9fc09a88c83ebc8dd8d53ead9c5542c90c23f519bc99c1a1055e4751e78dbb70578325ba42d9aa59adcbbf4e32629fc75744b70e7ddc4c8266dce WHIRLPOOL 9e2409c7f5d5be2b46e43908db065a56db2e488b0769415cce9fb4b828d0f213a836e48068812d2e7aa9ee7cfd00d1970e04c504e18e9186b573e275a0c0ae2e
+DIST geomyidae-0.26.3.tar.gz 15556 SHA256 162f55ab059ab0a9be8e840497795293bbd51c34b1f4564dcdf3f0ddd5c0db31 SHA512 fcee0133547881f6df173a24eac0fd3007436365375f11c572c50cf2e77c2033d441209f7f20dab1d291b0e9305de245da409351a02df4ca92d7b158768424b3 WHIRLPOOL 79385698ddd1c9c99fbb03c77ac6e817e157e3d8779f9929fe5ae281472bbc00eec81a18b2fe02c27fd96377e6b20e5e2d0b18d9bb747a3004aa96db076bcaf3
diff --git a/net-misc/geomyidae/geomyidae-0.26.2.ebuild b/net-misc/geomyidae/geomyidae-0.26.2.ebuild
new file mode 100644
index 000000000000..28bae725699b
--- /dev/null
+++ b/net-misc/geomyidae/geomyidae-0.26.2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs user
+
+DESCRIPTION="A daemon to serve the gopher protocol"
+HOMEPAGE="http://r-36.net/src/geomyidae/"
+SRC_URI="http://r-36.net/src/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+pkg_setup(){
+ enewgroup gopherd
+ enewuser gopherd -1 -1 /var/gopher gopherd
+}
+
+src_prepare() {
+ # enable verbose build
+ # drop -O. from CFLAGS
+ sed -i \
+ -e 's/@${CC}/${CC}/g' \
+ -e '/CFLAGS/s/-O. //' \
+ Makefile || die 'sed on Makefile failed'
+
+ epatch_user
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dosbin ${PN}
+
+ newinitd rc.d/Gentoo.init.d ${PN}
+ newconfd rc.d/Gentoo.conf.d ${PN}
+
+ insinto /var/gopher
+ doins index.gph
+ fowners -R root.gopherd /var/gopher
+ fperms -R g=rX,o=rX /var/gopher
+
+ doman ${PN}.8
+ dodoc CGI README
+}
diff --git a/net-misc/geomyidae/geomyidae-0.26.3.ebuild b/net-misc/geomyidae/geomyidae-0.26.3.ebuild
new file mode 100644
index 000000000000..28bae725699b
--- /dev/null
+++ b/net-misc/geomyidae/geomyidae-0.26.3.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs user
+
+DESCRIPTION="A daemon to serve the gopher protocol"
+HOMEPAGE="http://r-36.net/src/geomyidae/"
+SRC_URI="http://r-36.net/src/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+pkg_setup(){
+ enewgroup gopherd
+ enewuser gopherd -1 -1 /var/gopher gopherd
+}
+
+src_prepare() {
+ # enable verbose build
+ # drop -O. from CFLAGS
+ sed -i \
+ -e 's/@${CC}/${CC}/g' \
+ -e '/CFLAGS/s/-O. //' \
+ Makefile || die 'sed on Makefile failed'
+
+ epatch_user
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dosbin ${PN}
+
+ newinitd rc.d/Gentoo.init.d ${PN}
+ newconfd rc.d/Gentoo.conf.d ${PN}
+
+ insinto /var/gopher
+ doins index.gph
+ fowners -R root.gopherd /var/gopher
+ fperms -R g=rX,o=rX /var/gopher
+
+ doman ${PN}.8
+ dodoc CGI README
+}
diff --git a/net-misc/geomyidae/metadata.xml b/net-misc/geomyidae/metadata.xml
new file mode 100644
index 000000000000..b6b8956cde34
--- /dev/null
+++ b/net-misc/geomyidae/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>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/getdate/Manifest b/net-misc/getdate/Manifest
new file mode 100644
index 000000000000..5b8de26875da
--- /dev/null
+++ b/net-misc/getdate/Manifest
@@ -0,0 +1 @@
+DIST getdate_rfc868-1.2.tar.gz 8323 SHA256 45a9a6bdfe0fcde29a03704ffac2fbcd39014f412eb5f4ad3da943827341fd8d SHA512 f4ce167e42f2ef54cb961923f15d8101c5d047659991b0f3859a0282d024b0e0273517b94b663a90f8d6af1d3e4acf46b96b17d39cd6b2f3ee25bc89995b1404 WHIRLPOOL 3123b35bee8a07caa000742126619cc2361dabcdeb026cc0d4d7ed1466b8febb264f1a9f05fd1bac329cd817364634e392482fcfa0a2c7ba0b6e8f5d451ef509
diff --git a/net-misc/getdate/getdate-1.2-r1.ebuild b/net-misc/getdate/getdate-1.2-r1.ebuild
new file mode 100644
index 000000000000..326ea1bf74ab
--- /dev/null
+++ b/net-misc/getdate/getdate-1.2-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+MY_PN="${PN}_rfc868"
+MY_P="${MY_PN}-${PV}"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Network Date/Time Query and Set Local Date/Time Utility"
+HOMEPAGE="http://www.ibiblio.org/pub/Linux/system/network/misc/"
+SRC_URI="http://www.ibiblio.org/pub/Linux/system/network/misc/${MY_P}.tar.gz"
+
+LICENSE="GPL-1+"
+SLOT="0"
+KEYWORDS="amd64 ~mips ppc x86"
+IUSE=""
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ sed -i -e "/errno.h/ a\#include <string.h>" getdate.c || die
+ # Respect CFLAGS
+ sed -i -e "/CFLAGS/d" Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dobin getdate
+ doman getdate.8
+ dodoc README getdate-cron
+}
diff --git a/net-misc/getdate/metadata.xml b/net-misc/getdate/metadata.xml
new file mode 100644
index 000000000000..59e2b8f78cb5
--- /dev/null
+++ b/net-misc/getdate/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>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/gip/Manifest b/net-misc/gip/Manifest
new file mode 100644
index 000000000000..564531eb2ae0
--- /dev/null
+++ b/net-misc/gip/Manifest
@@ -0,0 +1,2 @@
+DIST gip-1.7.0-1.tar.gz 69533 SHA256 c525886d90d496839b6a51e3ab771f2511abfea2fcb78cfcfe82059a4e53c6b9 SHA512 ab918fcc57d09226690ef2936bbfa5c0a9332ffe7f0bef33a7bd820bbc5af0e8220429cb5e9d10014ea66cdf49cfa96fc02afc246edea4f25647eeb2a073f984 WHIRLPOOL b4aea30722898167b8665a15a31f13e90959a2755e2950a3e0f73791af580345f76706abfa17a274ac579a07739f0bbf01adc976b8b178dca75354c7e2eae073
+DIST gip_1.7.0-1-3.debian.tar.gz 6689 SHA256 7f9e7818ffb726347f69cdc6d86a45d7c07186f4f21bf81bb08c04ff2511e494 SHA512 d17a02900f7dd9fbe3113977c86d52ff94fabc988406bad0ca7f148d87e1185f5f679a1539726227569534b4b810290954e42fa6df0586c84ddb074053196580 WHIRLPOOL acc967221c9a388f7539216a32ba82f1702c36b890637a46a6c360e15201732f946f4afeb0ec8e38e457657d944f315c26925c86e196da39802c13624ad2d6a0
diff --git a/net-misc/gip/files/gip-1.7.0.1-asneeded.patch b/net-misc/gip/files/gip-1.7.0.1-asneeded.patch
new file mode 100644
index 000000000000..2c0bbe3df488
--- /dev/null
+++ b/net-misc/gip/files/gip-1.7.0.1-asneeded.patch
@@ -0,0 +1,33 @@
+ installer/build_files.sh | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/installer/build_files.sh b/installer/build_files.sh
+index 8d469b0..bc653cf 100755
+--- a/installer/build_files.sh
++++ b/installer/build_files.sh
+@@ -27,7 +27,7 @@ compile_file() {
+ # Compile.
+ echo Compiling: $FILE...
+ set -x
+- g++ -fPIC $CFLAGS -c $FILE -o $OBJECTFILE
++ g++ -fPIC $CFLAGS $CXXFLAGS -c $FILE -o $OBJECTFILE
+ ERR="$?"
+ set +x
+ if [ "$ERR" -ne "0" ]; then
+@@ -122,14 +122,14 @@ fi
+ if [ "$SHARED" = "" ]; then
+ # Link as an executable.
+ set -x
+- g++ $CFLAGS -o $OUTFILE $OBJECTFILES $LFLAGS
++ g++ $CFLAGS $CXXFLAGS $LDFLAGS -o $OUTFILE $OBJECTFILES $LFLAGS
+ ERR="$?"
+ set +x
+ else
+ # Link as a shared library.
+ SHAREDNAME=`echo $OUTFILE | sed 's/\..*//'`
+ set -x
+- g++ -shared -Wl,-soname,$SHAREDNAME $CFLAGS -o $OUTFILE $OBJECTFILES $LFLAGS
++ g++ -shared -Wl,-soname,$SHAREDNAME $CFLAGS $CXXFLAGS $LDFLAGS -o $OUTFILE $OBJECTFILES $LFLAGS
+ ERR="$?"
+ set +x
+ fi
diff --git a/net-misc/gip/gip-1.7.0.1.ebuild b/net-misc/gip/gip-1.7.0.1.ebuild
new file mode 100644
index 000000000000..84aa7c00ccab
--- /dev/null
+++ b/net-misc/gip/gip-1.7.0.1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils versionator
+
+MY_PV="$(replace_version_separator 3 '-')"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="A nice GNOME GUI for making IP address based calculations"
+HOMEPAGE="http://code.google.com/p/gip/"
+SRC_URI="
+ http://gip.googlecode.com/files/${MY_P}.tar.gz
+ mirror://debian/pool/main/g/${PN}/${PN}_${MY_PV}-3.debian.tar.gz"
+#http://ftp.de.debian.org/debian/pool/main/g/gip/gip_1.7.0-1-3.debian.tar.gz
+#http://dl.debain.org/gip/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="dev-cpp/gtkmm:2.4
+ dev-libs/glib:2
+ dev-libs/libsigc++:2"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch \
+ "${WORKDIR}"/debian/patches/*.diff \
+ "${FILESDIR}"/${P}-asneeded.patch
+
+ sed \
+ -e "s:g++:$(tc-getCXX):g" \
+ -i installer/build_files.sh
+
+# sed \
+# -e 's:CFLAGS=":CFLAGS+=" :g' \
+# -i build.sh || die
+
+# "${FILESDIR}"/${PN}-1.6.1.1-asneeded.patch
+
+# "${FILESDIR}/${P}-libsigcpp.patch" \
+# sed -i -e 's@INST_PIXMAPDIR=\"$INST_PREFIX/lib/$EXECUTABLE\"@INST_PIXMAPDIR=\"/usr/lib/$EXECUTABLE\"@g' build.sh
+# sed -i -e 's@INST_PIXMAPDIR=\"/usr/lib/$EXECUTABLE\"@INST_PIXMAPDIR=\"$INST_PREFIX/lib/$EXECUTABLE\"@g' build.sh
+# sed -i -e 's@INST_DOCDIR=\"$INST_PREFIX/doc/$EXECUTABLE\"@INST_DOCDIR=\"$INST_PREFIX/share/doc/'${PF}'\"@g' build.sh
+}
+
+src_compile() {
+ # Crazy build system...
+ export CXXFLAGS="${CXXFLAGS}"
+ ./build.sh --prefix "${D}/usr" || die "./build failed"
+}
+
+src_install() {
+ dodoc AUTHORS ChangeLog README
+ # Crazy build system...
+ ./build.sh --install --prefix "${D}/usr" || die "./build --install failed"
+ make_desktop_entry gip "GIP IP Address Calculator" gnome-calc3 Network
+}
diff --git a/net-misc/gip/metadata.xml b/net-misc/gip/metadata.xml
new file mode 100644
index 000000000000..6037f68d7067
--- /dev/null
+++ b/net-misc/gip/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ Gip is a nice GNOME GUI for making IP address based calculations. For
+ example, it can display IP addresses in binary format. Also, it is
+ possible to calculate subnets.
+ </longdescription>
+ <longdescription lang="ja">
+ Gip は IP アドレス関係の計算をするのに便利な GNOME GUI のプログラムです。例えば、2進法で表現された IP アドレスを10進法にします。サブネットを計算することもできます。
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/gnome-online-miners/Manifest b/net-misc/gnome-online-miners/Manifest
new file mode 100644
index 000000000000..7e0559ea504a
--- /dev/null
+++ b/net-misc/gnome-online-miners/Manifest
@@ -0,0 +1 @@
+DIST gnome-online-miners-3.14.3.tar.xz 258488 SHA256 907f0c1d2f4fcb762be9e3992d05bcc39d292d9c1246c2aca2b293b04c59ba7d SHA512 0ee3335a3a61b9976448d1cd01e4272d74a6690fc85360e4c16a743862fbfb9e1480e9d71beb0b0544c24ca92b0a968439a11447e13df4da54e8ec7430451774 WHIRLPOOL 30bcdbce850752989248497700c8b1bed60646c21e64e8991a8afb71e7ede9a58adb9066cb0c5bf5b50775a53081b2c334e70b31d10d1c9cf93a179d28791aef
diff --git a/net-misc/gnome-online-miners/gnome-online-miners-3.14.3-r1.ebuild b/net-misc/gnome-online-miners/gnome-online-miners-3.14.3-r1.ebuild
new file mode 100644
index 000000000000..836944a1bb07
--- /dev/null
+++ b/net-misc/gnome-online-miners/gnome-online-miners-3.14.3-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2
+
+DESCRIPTION="Crawls through your online content"
+HOMEPAGE="https://wiki.gnome.org/Projects/GnomeOnlineMiners"
+
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE="flickr"
+KEYWORDS="~amd64 ~x86"
+
+# libgdata[gnome] needed for goa support
+RDEPEND="
+ >=app-misc/tracker-1:0=
+ >=dev-libs/glib-2.35.1:2
+ >=dev-libs/libgdata-0.15.2:0=[gnome]
+ >=media-libs/grilo-0.2.6:0.2
+ >=net-libs/gnome-online-accounts-3.13.3
+ >=net-libs/libgfbgraph-0.2.2:0.2
+ >=net-libs/libzapojit-0.0.2
+ flickr? ( media-plugins/grilo-plugins[flickr] )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_configure() {
+ gnome2_src_configure \
+ $(use_enable flickr) \
+ --disable-static \
+ --enable-facebook \
+ --enable-google \
+ --enable-media-server \
+ --enable-owncloud \
+ --enable-windows-live
+}
diff --git a/net-misc/gnome-online-miners/gnome-online-miners-3.14.3.ebuild b/net-misc/gnome-online-miners/gnome-online-miners-3.14.3.ebuild
new file mode 100644
index 000000000000..1ff65db0aaf8
--- /dev/null
+++ b/net-misc/gnome-online-miners/gnome-online-miners-3.14.3.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2
+
+DESCRIPTION="Crawls through your online content"
+HOMEPAGE="https://wiki.gnome.org/Projects/GnomeOnlineMiners"
+
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE=""
+KEYWORDS="amd64 x86"
+
+# libgdata[gnome] needed for goa support
+RDEPEND="
+ >=app-misc/tracker-1:0=
+ >=dev-libs/glib-2.35.1:2
+ >=dev-libs/libgdata-0.15.2:0=[gnome]
+ >=media-libs/grilo-0.2.6:0.2
+ >=net-libs/gnome-online-accounts-3.13.3
+ >=net-libs/libgfbgraph-0.2.2:0.2
+ >=net-libs/libzapojit-0.0.2
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-static \
+ --enable-facebook \
+ --enable-flickr \
+ --enable-google \
+ --enable-media-server \
+ --enable-owncloud \
+ --enable-windows-live
+}
diff --git a/net-misc/gnome-online-miners/metadata.xml b/net-misc/gnome-online-miners/metadata.xml
new file mode 100644
index 000000000000..fb25ea5891bf
--- /dev/null
+++ b/net-misc/gnome-online-miners/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>gnome</herd>
+<use>
+ <flag name="flickr">Enable Flickr support</flag>
+</use>
+</pkgmetadata>
diff --git a/net-misc/gnome-rdp/Manifest b/net-misc/gnome-rdp/Manifest
new file mode 100644
index 000000000000..022b7d80faca
--- /dev/null
+++ b/net-misc/gnome-rdp/Manifest
@@ -0,0 +1 @@
+DIST gnome-rdp-0.3.0.9.tar.gz 138141 SHA256 d5b70e42f9a7d407daf1fc76232c11e5190cfa6b1ec7f7a82a44753c13e9168d
diff --git a/net-misc/gnome-rdp/gnome-rdp-0.3.0.9.ebuild b/net-misc/gnome-rdp/gnome-rdp-0.3.0.9.ebuild
new file mode 100644
index 000000000000..c8010d9c9fc0
--- /dev/null
+++ b/net-misc/gnome-rdp/gnome-rdp-0.3.0.9.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils mono
+
+DESCRIPTION="Remote Desktop Client for the GNOME desktop"
+HOMEPAGE="http://sourceforge.net/projects/gnome-rdp"
+SRC_URI="mirror://sourceforge/gnome-rdp/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+rdesktop +vnc"
+
+RDEPEND="dev-db/sqlite:3
+ dev-dotnet/ndesk-dbus-glib
+ dev-dotnet/gconf-sharp:2
+ dev-dotnet/glade-sharp:2
+ dev-dotnet/glib-sharp:2
+ dev-dotnet/gtk-sharp:2
+ >=dev-dotnet/gnome-keyring-sharp-1.0
+ >=net-misc/openssh-3
+ >=x11-terms/gnome-terminal-2
+ rdesktop? ( >=net-misc/rdesktop-1.3 )
+ vnc? ( >=net-misc/tightvnc-1.2 )"
+DEPEND="${RDEPEND}"
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc ChangeLog
+ doicon Menu/${PN}.png
+ domenu Menu/${PN}.desktop
+}
diff --git a/net-misc/gnome-rdp/metadata.xml b/net-misc/gnome-rdp/metadata.xml
new file mode 100644
index 000000000000..4ae5dc419018
--- /dev/null
+++ b/net-misc/gnome-rdp/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+ <longdescription>Mono Remote Desktop Client for the GNOME Desktop. Supported protocols: RDP, VNC, SSH. Configured sessions can be saved to the built in list</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">gnome-rdp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/gns3-converter/Manifest b/net-misc/gns3-converter/Manifest
new file mode 100644
index 000000000000..399154f06330
--- /dev/null
+++ b/net-misc/gns3-converter/Manifest
@@ -0,0 +1 @@
+DIST gns3-converter-1.2.3.tar.gz 32962 SHA256 9257464a112aaca345b2eaec7001ea723f319f9792a8a313cacb94fe7e10a7e9 SHA512 830ddc041d3e159688325b00524feb085c5a7de6af55fb9c6f507013dc0e64e79938cc3f003fc22435c458ced1f682d2b3c58221afa9ede9f5ac24b097e37da2 WHIRLPOOL f781c513e4cd8591c313ae7d36c267360d188525a26fd33e8ef7d5a51e81f7fadd70657e5abbb288a6c32789fce97e55ccf5b7d559eed474d1c45b9b325a207e
diff --git a/net-misc/gns3-converter/gns3-converter-1.2.3.ebuild b/net-misc/gns3-converter/gns3-converter-1.2.3.ebuild
new file mode 100644
index 000000000000..5ebb0fae3cd3
--- /dev/null
+++ b/net-misc/gns3-converter/gns3-converter-1.2.3.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{3_3,3_4} )
+
+inherit distutils-r1
+
+DESCRIPTION="Designed to convert old ini-style GNS3 topologies"
+HOMEPAGE="https://github.com/dlintott/gns3-converter"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="dev-python/configobj[${PYTHON_USEDEP}]"
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
diff --git a/net-misc/gns3-converter/metadata.xml b/net-misc/gns3-converter/metadata.xml
new file mode 100644
index 000000000000..1ea66e6f8ebb
--- /dev/null
+++ b/net-misc/gns3-converter/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>bman@gentoo.org</email>
+ <name>Aaron Bauman</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">gns3-converter</remote-id>
+ <remote-id type="github">dlintott/gns3-converter</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/gns3-gui/Manifest b/net-misc/gns3-gui/Manifest
new file mode 100644
index 000000000000..2a433cc968d6
--- /dev/null
+++ b/net-misc/gns3-gui/Manifest
@@ -0,0 +1,2 @@
+DIST gns3-gui-1.3.2.tar.gz 6556874 SHA256 5aafebe28ba57820288a24c3b62d52af2919b9d1ec8c8843cff3d4e0f672cce7 SHA512 ddb32e9cb77513cec027f1642755d31ec1d7ae99424f441dc6470120213b42c694993dac44a4580c537ad296d7d0d7f7013ea4c2a3b780c7f1a0404796eb6ce0 WHIRLPOOL e0ce6c12be54a52a7aa1dd3ea5c94ebbc7e77639c0bfc20667ded0b5f8127806bafe3836e287dbc4375c3139814c755fa92ae9d367f5fda06d744dc105094aab
+DIST gns3-gui-1.3.3.tar.gz 6559207 SHA256 58d148a7a1c01ea8b9722524d0f9c2997b3f84a0baae64074e5ab65823ad717d SHA512 421470f77271a861d665429c1ffd16a9bcea595edd2e1596b5b0f40645f96cd5213c59219fbb2c74f627ba34f16535bf37d02d23dac115b994903c92452c3e98 WHIRLPOOL ccc98ebc763934283bdee45d51758661a9fea0bed62eb33750e2303b2871715890b23379169a805a4d03d4374841ecfa5c15a57197fc4fe80140391e6da395cc
diff --git a/net-misc/gns3-gui/gns3-gui-1.3.2.ebuild b/net-misc/gns3-gui/gns3-gui-1.3.2.ebuild
new file mode 100644
index 000000000000..87440e2459b5
--- /dev/null
+++ b/net-misc/gns3-gui/gns3-gui-1.3.2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{3_3,3_4} )
+
+inherit distutils-r1
+
+DESCRIPTION="Graphical Network Simulator"
+HOMEPAGE="http://www.gns3.net/"
+SRC_URI="https://github.com/GNS3/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+#net-misc/gns3-server version should always match gns3-gui version
+
+RDEPEND=">=dev-python/libcloud-0.15.1[${PYTHON_USEDEP}]
+ >=dev-python/ws4py-0.3.4[${PYTHON_USEDEP}]
+ >=dev-python/requests-2.6.0[${PYTHON_USEDEP}]
+ >=dev-python/paramiko-1.15.1[${PYTHON_USEDEP}]
+ >=dev-python/PyQt4-4.11.2[X,svg,${PYTHON_USEDEP}]
+ dev-qt/qtgui:4
+ dev-qt/qtsvg:4
+ >=net-misc/gns3-converter-1.2.3[${PYTHON_USEDEP}]
+ =net-misc/gns3-server-$PV[${PYTHON_USEDEP}]"
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+
+python_prepare_all() {
+ # avoid file collisions caused by required tests
+ sed -e "s:find_packages():find_packages(exclude=['tests','tests.*']):" -i setup.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ doicon "${WORKDIR}/${P}/resources/images/gns3.ico"
+ make_desktop_entry "gns3" "GNS3" "/usr/share/pixmaps/gns3.ico" "Utility"
+}
diff --git a/net-misc/gns3-gui/gns3-gui-1.3.3.ebuild b/net-misc/gns3-gui/gns3-gui-1.3.3.ebuild
new file mode 100644
index 000000000000..d47244a7c6f8
--- /dev/null
+++ b/net-misc/gns3-gui/gns3-gui-1.3.3.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{3_3,3_4} )
+
+inherit distutils-r1
+
+DESCRIPTION="Graphical Network Simulator"
+HOMEPAGE="http://www.gns3.net/"
+SRC_URI="https://github.com/GNS3/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+#net-misc/gns3-server version should always match gns3-gui version
+
+RDEPEND=">=dev-python/libcloud-0.15.1[${PYTHON_USEDEP}]
+ >=dev-python/ws4py-0.3.4[${PYTHON_USEDEP}]
+ >=dev-python/requests-2.6.0[${PYTHON_USEDEP}]
+ >=dev-python/paramiko-1.15.1[${PYTHON_USEDEP}]
+ >=dev-python/PyQt4-4.11.2[X,svg,${PYTHON_USEDEP}]
+ >=dev-python/raven-5.2.0[${PYTHON_USEDEP}]
+ dev-qt/qtgui:4
+ dev-qt/qtsvg:4
+ >=net-misc/gns3-converter-1.2.3[${PYTHON_USEDEP}]
+ =net-misc/gns3-server-$PV[${PYTHON_USEDEP}]"
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ doicon "${WORKDIR}/${P}/resources/images/gns3.ico"
+ make_desktop_entry "gns3" "GNS3" "/usr/share/pixmaps/gns3.ico" "Utility"
+}
diff --git a/net-misc/gns3-gui/metadata.xml b/net-misc/gns3-gui/metadata.xml
new file mode 100644
index 000000000000..5d17ca27e775
--- /dev/null
+++ b/net-misc/gns3-gui/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>bman@gentoo.org</email>
+ <name>Aaron Bauman</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">GNS3/gns3-gui</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/gns3-server/Manifest b/net-misc/gns3-server/Manifest
new file mode 100644
index 000000000000..e7199bd11c24
--- /dev/null
+++ b/net-misc/gns3-server/Manifest
@@ -0,0 +1,2 @@
+DIST gns3-server-1.3.2.tar.gz 173570 SHA256 771dafcc9f437dd20c09cde9fbde63e301b6f263925de9abf186727a721123f8 SHA512 6913e50fadaa0b8cc814e1907c5c5d6d7c90aa1e75cdbcb74c7b6f69fdabf61c5baab856fe741241749840df17e8b7d9d502da1406b0806777fb922c4ac82928 WHIRLPOOL e35e7bff085018a391c97fe35180ed1419472f914c169deaa288cd98146bdcd82d9b8acd97db5fc7ea4f5b60e24dab9ae1a67314bfbaa5120ebacbaa978cabde
+DIST gns3-server-1.3.3.tar.gz 175790 SHA256 b2f493a4db42d6170dddd8f5baee1c075e3c5cae803b405bfbf2d2e1b0e56f65 SHA512 11af84864bc40a83af9b7a63abd3e2eaf5f6197755e49b3b1284cf7cf71bf0e3963d5e96a7f2410bc3b89087812069cabbc5c7653c5534463518d26250512d6c WHIRLPOOL 71a3cfea286cc5e657a464617609eca63dab119cceb56aaf99c45dca33300fa7570cd025e4f9717e36aec310b66bec4d41b2da5327a7e17807eab02c942efd76
diff --git a/net-misc/gns3-server/gns3-server-1.3.2.ebuild b/net-misc/gns3-server/gns3-server-1.3.2.ebuild
new file mode 100644
index 000000000000..44a863b107ce
--- /dev/null
+++ b/net-misc/gns3-server/gns3-server-1.3.2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{3_3,3_4} )
+
+inherit distutils-r1 eutils
+
+DESCRIPTION="GNS3 server to asynchronously manage emulators"
+HOMEPAGE="http://www.gns3.net/"
+SRC_URI="https://github.com/GNS3/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND=">=app-emulation/dynamips-0.2.12
+ >=dev-python/aiohttp-0.14.4[${PYTHON_USEDEP}]
+ >=dev-python/netifaces-0.8-r2[${PYTHON_USEDEP}]
+ >=dev-python/jinja-2.7.3[${PYTHON_USEDEP}]
+ >=dev-python/jsonschema-2.4.0[${PYTHON_USEDEP}]
+ >=dev-python/libcloud-0.14.1[${PYTHON_USEDEP}]
+ >=dev-python/raven-5.2.0[${PYTHON_USEDEP}]
+ >=dev-python/pyzmq-14.3.1[${PYTHON_USEDEP}]
+ >=www-servers/tornado-3.1.1[${PYTHON_USEDEP}]"
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+
+python_prepare_all() {
+ # avoid file collisions caused by required tests
+ sed -e "s:find_packages():find_packages(exclude=['tests','tests.*']):" -i setup.py || die
+ distutils-r1_python_prepare_all
+}
+
+pkg_postinst() {
+ ewarn "net-misc/gns3-server has several optional packages that must be merged manually for additional functionality."
+ ewarn ""
+ ewarn "The following is a list of packages that can be added:"
+ ewarn "app-emulation/qemu, app-emulation/virtualbox, and net-analyzer/wireshark"
+ ewarn ""
+ ewarn "The following packages are currently unsupported:"
+ ewarn "iouyap and vpcs"
+}
diff --git a/net-misc/gns3-server/gns3-server-1.3.3.ebuild b/net-misc/gns3-server/gns3-server-1.3.3.ebuild
new file mode 100644
index 000000000000..3e96af493bb9
--- /dev/null
+++ b/net-misc/gns3-server/gns3-server-1.3.3.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{3_3,3_4} )
+
+inherit distutils-r1 eutils
+
+DESCRIPTION="GNS3 server to asynchronously manage emulators"
+HOMEPAGE="http://www.gns3.net/"
+SRC_URI="https://github.com/GNS3/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND=">=app-emulation/dynamips-0.2.12
+ >=dev-python/aiohttp-0.14.4[${PYTHON_USEDEP}]
+ >=dev-python/netifaces-0.8-r2[${PYTHON_USEDEP}]
+ >=dev-python/jinja-2.7.3[${PYTHON_USEDEP}]
+ >=dev-python/jsonschema-2.4.0[${PYTHON_USEDEP}]
+ >=dev-python/libcloud-0.14.1[${PYTHON_USEDEP}]
+ >=dev-python/raven-5.2.0[${PYTHON_USEDEP}]
+ >=dev-python/pyzmq-14.3.1[${PYTHON_USEDEP}]
+ >=www-servers/tornado-3.1.1[${PYTHON_USEDEP}]"
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+
+pkg_postinst() {
+ ewarn "net-misc/gns3-server has several optional packages that must be merged manually for additional functionality."
+ ewarn ""
+ ewarn "The following is a list of packages that can be added:"
+ ewarn "app-emulation/qemu, app-emulation/virtualbox, and net-analyzer/wireshark"
+ ewarn ""
+ ewarn "The following packages are currently unsupported:"
+ ewarn "iouyap and vpcs"
+}
diff --git a/net-misc/gns3-server/metadata.xml b/net-misc/gns3-server/metadata.xml
new file mode 100644
index 000000000000..6553eda3e508
--- /dev/null
+++ b/net-misc/gns3-server/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>bman@gentoo.org</email>
+ <name>Aaron Bauman</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">GNS3/gns3-server</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/gofish/Manifest b/net-misc/gofish/Manifest
new file mode 100644
index 000000000000..9580ef313743
--- /dev/null
+++ b/net-misc/gofish/Manifest
@@ -0,0 +1 @@
+DIST gofish-1.2.tar.gz 212596 SHA256 1ab8390ec9b3373a298eee564c8b10b3527b22f86f044c9427d32065e9b6252f
diff --git a/net-misc/gofish/files/gofish.confd b/net-misc/gofish/files/gofish.confd
new file mode 100644
index 000000000000..af244521a7e7
--- /dev/null
+++ b/net-misc/gofish/files/gofish.confd
@@ -0,0 +1,27 @@
+#
+# Config file for gofish Gentoo start-script.
+# Should be stored as: /etc/conf.d/gofish
+#
+
+# Application name
+GOFISH_APP=gofish
+
+# Path to gofish executable
+GOFISH_EXEC=/usr/sbin/gofish
+
+# The gofish config file
+GOFISH_CONF_FILE=/etc/gofish.conf
+
+# The start options
+GOFISH_START_OPTS="-d"
+
+# The stop options
+GOFISH_STOP_OPTS=""
+
+# The reload options
+GOFISH_RELOAD_OPTS=""
+
+# The pid file
+GOFISH_PIDFILE=/var/run/gofish.pid
+
+
diff --git a/net-misc/gofish/files/gofish.rc b/net-misc/gofish/files/gofish.rc
new file mode 100644
index 000000000000..aa49772f1379
--- /dev/null
+++ b/net-misc/gofish/files/gofish.rc
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+#
+# Startup script for the Gofish Gopher Server (for Gentoo Linux)
+#
+# config: /etc/conf.d/gofish
+##
+# use: rc-update add gofish default
+#
+
+opts="start stop"
+
+depend() {
+ need net
+}
+
+
+start() {
+ ebegin "Starting ${GOFISH_APP} "
+ start-stop-daemon --start --verbose --pidfile ${GOFISH_PIDFILE} \
+ --exec ${GOFISH_EXEC} -- ${GOFISH_START_OPTS}
+ eend $?
+}
+
+
+stop() {
+ ebegin "Stopping ${GOFISH_APP} "
+ start-stop-daemon --stop --quiet --pidfile ${GOFISH_PIDFILE} \
+ --exec ${GOFISH_EXEC} -- ${GOFISH_STOP_OPTS}
+ eend $?
+}
+
+
+
diff --git a/net-misc/gofish/gofish-1.2.ebuild b/net-misc/gofish/gofish-1.2.ebuild
new file mode 100644
index 000000000000..e01e9c712df5
--- /dev/null
+++ b/net-misc/gofish/gofish-1.2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils user
+
+DESCRIPTION="Gofish gopher server"
+HOMEPAGE="http://gofish.sourceforge.net"
+SRC_URI="mirror://sourceforge/gofish/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+S=${WORKDIR}/${PN}
+
+pkg_setup() {
+ enewgroup gopher
+ enewuser gopher -1 -1 -1 gopher
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --disable-mmap-cache || die
+}
+
+src_install () {
+ make DESTDIR="${D}" install || die
+
+ newinitd "${FILESDIR}"/gofish.rc gofish || die
+ newconfd "${FILESDIR}"/gofish.confd gofish || die
+
+ dodoc AUTHORS ChangeLog Configure_GoFish README TODO || die
+}
diff --git a/net-misc/gofish/metadata.xml b/net-misc/gofish/metadata.xml
new file mode 100644
index 000000000000..bcf19edfcbef
--- /dev/null
+++ b/net-misc/gofish/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>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">gofish</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/gogoc/Manifest b/net-misc/gogoc/Manifest
new file mode 100644
index 000000000000..867480b894d9
--- /dev/null
+++ b/net-misc/gogoc/Manifest
@@ -0,0 +1 @@
+DIST gogoc-1_2-RELEASE.tar.gz 249286 SHA256 a0ef45c0bd1fc9964dc8ac059b7d78c12674bf67ef641740554e166fa99a2f49 SHA512 4ca4de23f81d3c08b514514c6f29bba0eb7dc34dda0fb82de1721b87ab337db018a90808f412de0f38a85baa0808d6f27e6e08b42e120634ff7d483e16793829 WHIRLPOOL b6228e23e5b7aa4f33c84cafcf92218986379b275c7a1945eba0b667fcc810dda06bc5f73ea3e095f66cceb6211bb2f023b4e065f1b68633e557972381c57346
diff --git a/net-misc/gogoc/files/gogoc-1.2+gcc-4.6.patch b/net-misc/gogoc/files/gogoc-1.2+gcc-4.6.patch
new file mode 100644
index 000000000000..94582d9dd018
--- /dev/null
+++ b/net-misc/gogoc/files/gogoc-1.2+gcc-4.6.patch
@@ -0,0 +1,26 @@
+Index: gogoc-1_2-RELEASE/gogoc-messaging/src/clientmsgsender.cc
+===================================================================
+--- gogoc-1_2-RELEASE.orig/gogoc-messaging/src/clientmsgsender.cc
++++ gogoc-1_2-RELEASE/gogoc-messaging/src/clientmsgsender.cc
+@@ -15,7 +15,7 @@
+ // **************************************************************************
+ #include <gogocmessaging/clientmsgsender.h>
+ #include <assert.h>
+-
++#include <cstddef>
+
+ namespace gogocmessaging
+ {
+Index: gogoc-1_2-RELEASE/gogoc-messaging/src/servermsgsender.cc
+===================================================================
+--- gogoc-1_2-RELEASE.orig/gogoc-messaging/src/servermsgsender.cc
++++ gogoc-1_2-RELEASE/gogoc-messaging/src/servermsgsender.cc
+@@ -15,7 +15,7 @@
+ // **************************************************************************
+ #include <gogocmessaging/servermsgsender.h>
+ #include <assert.h>
+-
++#include <cstddef>
+
+ namespace gogocmessaging
+ {
diff --git a/net-misc/gogoc/files/gogoc-1.2-overflow.patch b/net-misc/gogoc/files/gogoc-1.2-overflow.patch
new file mode 100644
index 000000000000..ddc414ce0e70
--- /dev/null
+++ b/net-misc/gogoc/files/gogoc-1.2-overflow.patch
@@ -0,0 +1,35 @@
+Index: gogoc-1_2-RELEASE/gogoc-config/src/gogocvalidation.cc
+===================================================================
+--- gogoc-1_2-RELEASE.orig/gogoc-config/src/gogocvalidation.cc
++++ gogoc-1_2-RELEASE/gogoc-config/src/gogocvalidation.cc
+@@ -512,7 +512,7 @@ bool Validate_ClientV4( const string& sC
+ if( sClientV4 != STR_AUTO )
+ {
+ struct in_addr address;
+- unsigned long net;
++ in_addr_t net;
+
+ net = inet_addr( sClientV4.c_str() );
+ memcpy(&address, &net, sizeof(net));
+@@ -535,7 +535,7 @@ bool Validate_DSLite( const string& sDSL
+
+ {
+ struct in_addr address;
+- unsigned long net;
++ in_addr_t net;
+
+ net = inet_addr( sDSLite.c_str() );
+ memcpy(&address, &net, sizeof(net));
+Index: gogoc-1_2-RELEASE/gogoc-config/src/haccessdevicemappingconfig.cc
+===================================================================
+--- gogoc-1_2-RELEASE.orig/gogoc-config/src/haccessdevicemappingconfig.cc
++++ gogoc-1_2-RELEASE/gogoc-config/src/haccessdevicemappingconfig.cc
+@@ -265,7 +265,7 @@ bool HACCESSDeviceMappingConfig::Validat
+ // Check if IPv4 or IPv6 address
+ struct in6_addr addressv6;
+ struct in_addr addressv4;
+- unsigned long net;
++ in_addr_t net;
+
+ net = inet_addr( aIPAddress.c_str() );
+ memcpy(&addressv4, &net, sizeof(net));
diff --git a/net-misc/gogoc/files/gogoc.rc b/net-misc/gogoc/files/gogoc.rc
new file mode 100644
index 000000000000..f7c723d9b33e
--- /dev/null
+++ b/net-misc/gogoc/files/gogoc.rc
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net localmount
+ after bootmisc
+ use dns logger
+}
+
+checktun() {
+ [ $(uname -s) = "Linux" ] || return 0
+ [ -e /dev/net/tun ] && return 0
+ modprobe tun && return 0
+
+ eerror "TUN/TAP support is not available in the running kernel"
+ return 1
+}
+
+checkconfig() {
+ if ! [ -f /etc/gogoc/gogoc.conf ]; then
+ eerror "Unable to find configuration file /etc/gogoc/gogoc.conf"
+ return 1
+ fi
+}
+
+start() {
+ checktun || return 1
+ checkconfig || return 1
+
+ ebegin "Starting gogoCLIENT"
+ start-stop-daemon --start --exec /usr/sbin/gogoc \
+ --chdir /var/lib/gogoc -- -f /etc/gogoc/gogoc.conf -y
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping gogoCLIENT"
+ start-stop-daemon --stop --exec /usr/sbin/gogoc
+ eend $?
+}
diff --git a/net-misc/gogoc/files/gogoc.service b/net-misc/gogoc/files/gogoc.service
new file mode 100644
index 000000000000..fe7b31e9be97
--- /dev/null
+++ b/net-misc/gogoc/files/gogoc.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Client to connect to a tunnel broker using the TSP protocol (freenet6 for example)
+
+[Service]
+ExecStart=/usr/sbin/gogoc -y -f /etc/gogoc/gogoc.conf
+ExecReload=/bin/kill -HUP $MAINPID
+KillMode=process
+Restart=always
+RestartSec=4
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/gogoc/gogoc-1.2-r2.ebuild b/net-misc/gogoc/gogoc-1.2-r2.ebuild
new file mode 100644
index 000000000000..650825d0fc41
--- /dev/null
+++ b/net-misc/gogoc/gogoc-1.2-r2.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils versionator toolchain-funcs
+
+MY_P=${PN}-$(replace_all_version_separators "_")
+if [[ ${MY_P/_beta/} != ${MY_P} ]]; then
+ MY_P=${MY_P/_beta/-BETA}
+else
+ MY_P=${MY_P}-RELEASE
+fi
+
+DESCRIPTION="Client to connect to a tunnel broker using the TSP protocol (freenet6 for example)"
+HOMEPAGE="http://gogonet.gogo6.com/page/download-1"
+SRC_URI="http://gogo6.com/downloads/${MY_P}.tar.gz"
+
+# GPL-2 for Gentoo init script
+LICENSE="MIT GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa sparc x86"
+IUSE="debug"
+
+DEPEND="dev-libs/openssl"
+RDEPEND="${DEPEND}
+ sys-apps/iproute2
+ >=sys-apps/net-tools-1.60_p20120127084908"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-overflow.patch
+ epatch "${FILESDIR}"/${P}+gcc-4.6.patch
+
+ # Make the makefile handle linking correctly
+ find . -name Makefile -exec sed -i \
+ -e 's:LDFLAGS:LDLIBS:g' \
+ -e '/\$(LDLIBS)/s:-o:$(LDFLAGS) -o:' \
+ {} + || die "multised failed"
+
+ sed -i -e 's:/usr/local/etc/gogoc:/etc/gogoc:' \
+ gogoc-tsp/platform/*/tsp_local.c \
+ || die "path sed failed"
+
+ # Newer net-tools use /bin
+ sed -i -e "/^\(route\|ifconfig\)=/s/sbin/bin/" \
+ gogoc-tsp/template/linux.sh \
+ || die "net-tools sed failed"
+}
+
+src_configure() { :; }
+
+src_compile() {
+ # parallel make fails as inter-directory dependecies are missing.
+ emake -j1 \
+ AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" \
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getCXX)" \
+ EXTRA_CFLAGS="${CFLAGS}" EXTRA_CXXFLAGS="${CXXFLAGS}" \
+ $(use debug && echo DEBUG=1) \
+ all target=linux
+
+ emake -C gogoc-tsp/conf \
+ PLATFORM=linux PLATFORM_DIR=../platform BIN_DIR=../bin \
+ gogoc.conf.sample
+}
+
+src_install() {
+ dodoc README
+
+ cd "${S}"/gogoc-tsp
+ dosbin bin/gogoc
+
+ dodoc bin/gogoc.conf.sample
+
+ exeinto /etc/gogoc/template
+ doexe template/linux.sh
+
+ newinitd "${FILESDIR}"/gogoc.rc gogoc
+
+ doman man/{man5/gogoc.conf.5,man8/gogoc.8}
+ keepdir /var/lib/gogoc
+
+ diropts -m0700
+ keepdir /etc/gogoc
+}
+
+pkg_postinst() {
+ elog "You should create an /etc/gogoc/gogoc.conf file starting from"
+ elog "the sample configuration in /usr/share/doc/${PF}/gogoc.conf.sample.*"
+ elog ""
+ elog "To add support for a TSP IPv6 connection at startup,"
+ elog "remember to run:"
+ elog "# rc-update add gogoc default"
+}
diff --git a/net-misc/gogoc/gogoc-1.2-r3.ebuild b/net-misc/gogoc/gogoc-1.2-r3.ebuild
new file mode 100644
index 000000000000..b0c3eb9dfd47
--- /dev/null
+++ b/net-misc/gogoc/gogoc-1.2-r3.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils systemd versionator toolchain-funcs
+
+MY_P=${PN}-$(replace_all_version_separators "_")
+if [[ ${MY_P/_beta/} != ${MY_P} ]]; then
+ MY_P=${MY_P/_beta/-BETA}
+else
+ MY_P=${MY_P}-RELEASE
+fi
+
+DESCRIPTION="Client to connect to a tunnel broker using the TSP protocol (freenet6 for example)"
+HOMEPAGE="http://gogonet.gogo6.com/page/download-1"
+SRC_URI="http://gogo6.com/downloads/${MY_P}.tar.gz"
+
+# GPL-2 for Gentoo init script
+LICENSE="MIT GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa sparc x86"
+IUSE="debug"
+
+DEPEND="dev-libs/openssl"
+RDEPEND="${DEPEND}
+ sys-apps/iproute2
+ >=sys-apps/net-tools-1.60_p20120127084908"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-overflow.patch
+ epatch "${FILESDIR}"/${P}+gcc-4.6.patch
+
+ # Make the makefile handle linking correctly
+ find . -name Makefile -exec sed -i \
+ -e 's:LDFLAGS:LDLIBS:g' \
+ -e '/\$(LDLIBS)/s:-o:$(LDFLAGS) -o:' \
+ {} + || die "multised failed"
+
+ sed -i -e 's:/usr/local/etc/gogoc:/etc/gogoc:' \
+ gogoc-tsp/platform/*/tsp_local.c \
+ || die "path sed failed"
+
+ # Newer net-tools use /bin
+ sed -i -e "/^\(route\|ifconfig\)=/s/sbin/bin/" \
+ gogoc-tsp/template/linux.sh \
+ || die "net-tools sed failed"
+}
+
+src_configure() { :; }
+
+src_compile() {
+ # parallel make fails as inter-directory dependecies are missing.
+ emake -j1 \
+ AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" \
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getCXX)" \
+ EXTRA_CFLAGS="${CFLAGS}" EXTRA_CXXFLAGS="${CXXFLAGS}" \
+ $(use debug && echo DEBUG=1) \
+ all target=linux
+
+ emake -C gogoc-tsp/conf \
+ PLATFORM=linux PLATFORM_DIR=../platform BIN_DIR=../bin \
+ gogoc.conf.sample
+}
+
+src_install() {
+ dodoc README
+
+ cd "${S}"/gogoc-tsp
+ dosbin bin/gogoc
+
+ dodoc bin/gogoc.conf.sample
+
+ exeinto /etc/gogoc/template
+ doexe template/linux.sh
+
+ newinitd "${FILESDIR}"/gogoc.rc gogoc
+ systemd_dounit "${FILESDIR}"/${PN}.service
+
+ doman man/{man5/gogoc.conf.5,man8/gogoc.8}
+ keepdir /var/lib/gogoc
+
+ diropts -m0700
+ keepdir /etc/gogoc
+}
+
+pkg_postinst() {
+ elog "You should create an /etc/gogoc/gogoc.conf file starting from"
+ elog "the sample configuration in /usr/share/doc/${PF}/gogoc.conf.sample.*"
+ elog ""
+ elog "To add support for a TSP IPv6 connection at startup,"
+ elog "remember to run:"
+ elog "# rc-update add gogoc default"
+}
diff --git a/net-misc/gogoc/metadata.xml b/net-misc/gogoc/metadata.xml
new file mode 100644
index 000000000000..97e409c9d05a
--- /dev/null
+++ b/net-misc/gogoc/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>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+ <longdescription>
+ TSP is a control protocol used to establish and maintain static tunnels. gogoCLIENT is
+ used on the host computer to connect to a tunnel broker using the TSP protocol and to get the
+ information for its tunnel. When it receives the information for the tunnel, gogoCLIENT
+ creates the static tunnel on its operating system
+</longdescription>
+</pkgmetadata>
diff --git a/net-misc/goog-sitemapgen/Manifest b/net-misc/goog-sitemapgen/Manifest
new file mode 100644
index 000000000000..185b210f0c26
--- /dev/null
+++ b/net-misc/goog-sitemapgen/Manifest
@@ -0,0 +1 @@
+DIST sitemap_gen_1.5.tar.gz 22742 SHA256 d66a5df1450ae70a2ee29a52325c663019d8022cf2813d2592860ec635b0cf73 SHA512 47d0fab242611e5a94ff097d99dce4392831837d1c5f4c0afde51b256df80060799263cad7f30695579b18e0917087b2b6a4a19136c184521c338353cea96596 WHIRLPOOL 381af46dcdf9f24b1ec1567d1105693d2a7671bb96a6f55fcd01046caea272f258cf26f14c4501c9a5c55ae0f07a881b58256c998578a3477f4ccfca6d2d7bde
diff --git a/net-misc/goog-sitemapgen/files/goog-sitemapgen-1.5.patch b/net-misc/goog-sitemapgen/files/goog-sitemapgen-1.5.patch
new file mode 100644
index 000000000000..4f4d8d1074f5
--- /dev/null
+++ b/net-misc/goog-sitemapgen/files/goog-sitemapgen-1.5.patch
@@ -0,0 +1,8 @@
+--- setup.py~ 2007-07-19 05:51:20.000000000 +0200
++++ setup.py 2012-03-20 11:47:32.218963792 +0100
+@@ -9,4 +9,5 @@
+ author='Google Inc.',
+ author_email='opensource@google.com',
+ url='http://code.google.com/p/sitemap-generators/',
++ scripts=['sitemap_gen'],
+ )
diff --git a/net-misc/goog-sitemapgen/goog-sitemapgen-1.5.ebuild b/net-misc/goog-sitemapgen/goog-sitemapgen-1.5.ebuild
new file mode 100644
index 000000000000..6f6029919eb1
--- /dev/null
+++ b/net-misc/goog-sitemapgen/goog-sitemapgen-1.5.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+PYTHON_DEPEND="2"
+
+inherit eutils python distutils
+
+MY_P="sitemap_gen_${PV}"
+
+DESCRIPTION="A python script which will generate an XML sitemap for your web site"
+HOMEPAGE="http://sitemap-generators.googlecode.com/"
+SRC_URI="http://sitemap-generators.googlecode.com/files/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DOCS="AUTHORS ChangeLog example_* README"
+
+S=${WORKDIR}
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ distutils_src_prepare
+ epatch "${FILESDIR}"/${P}.patch
+ mv sitemap_gen.py sitemap_gen || die
+}
diff --git a/net-misc/goog-sitemapgen/metadata.xml b/net-misc/goog-sitemapgen/metadata.xml
new file mode 100644
index 000000000000..0e811a41ed1c
--- /dev/null
+++ b/net-misc/goog-sitemapgen/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription>Sitemap Gen is a python script which will generate an xml Sitemap for
+ your web site.
+ The sitemap_gen.py script analyzes your web server and generates one or
+ more Sitemap files. These files are XML listings of content you make
+ available on your web server. The files can be directly submitted to
+ search engines as hints for the search engine web crawlers as they
+ index your web site. This can result in better coverage of your web
+ content in search engine indices, and less of your bandwidth spent
+ doing it.
+ The sitemap_gen.py script is written in Python 2.2 and released to the
+ open source community for continuous improvements.</longdescription>
+ <upstream>
+ <remote-id type="google-code">sitemap-generators</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/googlecl/Manifest b/net-misc/googlecl/Manifest
new file mode 100644
index 000000000000..43941220548b
--- /dev/null
+++ b/net-misc/googlecl/Manifest
@@ -0,0 +1 @@
+DIST googlecl-0.9.14.tar.gz 99834 SHA256 0a4640b1240104b8020f9af526e24afe53a8327390d95ef28e1ca093673fce5a SHA512 199a959b6d975fff0295833bf9f59b59a8a5c8a74f0e353fca37da579e9964e305452f0aefb263a2f10d267fc433d37cc4cf60b9ad024c2caa8d6e43f3766440 WHIRLPOOL 140dd5deca7ea03f3003ecbdd30196851a306c67f79b9155896b02296cef0ee9e50eeed9eb1aef8c1c9f1c6084ef243e146940991295cf8e37385c832223d445
diff --git a/net-misc/googlecl/files/googlecl-0.9.12-calendar_dates.patch b/net-misc/googlecl/files/googlecl-0.9.12-calendar_dates.patch
new file mode 100644
index 000000000000..83897bb69550
--- /dev/null
+++ b/net-misc/googlecl/files/googlecl-0.9.12-calendar_dates.patch
@@ -0,0 +1,64 @@
+fix "when" field in calendar not showing dates
+
+http://bugs.gentoo.org/show_bug.cgi?id=355913
+http://code.google.com/p/googlecl/issues/detail?id=358
+
+Index: googlecl/base.py
+===================================================================
+--- src/googlecl/base.py (revision 527)
++++ src/googlecl/base.py (working copy)
+@@ -673,10 +673,12 @@
+ except ValueError, err:
+ LOG.debug(err.args[0] + ' (Did not add value for field ' + attr + ')')
+ except AttributeError, err:
++ LOG.debug(err.args[0] + ' (value for field ' + attr + ')')
+ try:
+ # Last ditch effort to blindly grab the attribute
+ val = getattr(wrapped_entry.entry, attr).text or missing_field_value
+ except AttributeError:
++ LOG.debug(err.args[0] + ' (value for field ' + attr + ')')
+ val = missing_field_value
+ # Apparently, atom(?) doesn't always return a Unicode type when there are
+ # non-latin characters, so force everything to Unicode.
+Index: googlecl/calendar/__init__.py
+===================================================================
+--- src/googlecl/calendar/__init__.py (revision 527)
++++ src/googlecl/calendar/__init__.py (working copy)
+@@ -235,12 +235,22 @@
+
+
+ class CalendarEntryToStringWrapper(googlecl.base.BaseEntryToStringWrapper):
++ def __init__(self, entry, config):
++ """Initialize a CalendarEntry wrapper.
++
++ Args:
++ entry: CalendarEntry to interpret to strings.
++ config: Configuration parser. Needed for some values.
++ """
++ googlecl.base.BaseEntryToStringWrapper.__init__(self, entry)
++ self.config_parser = config
++
+ @property
+ def when(self):
+ """When event takes place."""
+ start_date, end_date, freq = get_datetimes(self.entry)
+- print_format = googlecl.CONFIG.lazy_get(SECTION_HEADER,
+- 'date_print_format')
++ print_format = self.config_parser.lazy_get(SECTION_HEADER,
++ 'date_print_format')
+ start_text = time.strftime(print_format, start_date)
+ end_text = time.strftime(print_format, end_date)
+ value = start_text + ' - ' + end_text
+@@ -277,9 +287,9 @@
+
+ for entry in single_events:
+ print googlecl.base.compile_entry_string(
+- CalendarEntryToStringWrapper(entry),
+- options.fields.split(','),
+- delimiter=options.delimiter)
++ CalendarEntryToStringWrapper(entry, client.config),
++ options.fields.split(','),
++ delimiter=options.delimiter)
+
+
+ #===============================================================================
diff --git a/net-misc/googlecl/googlecl-0.9.14.ebuild b/net-misc/googlecl/googlecl-0.9.14.ebuild
new file mode 100644
index 000000000000..1d7342264af9
--- /dev/null
+++ b/net-misc/googlecl/googlecl-0.9.14.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+PYTHON_DEPEND="2:2.5:2.7"
+
+inherit distutils
+
+DESCRIPTION="Command line tools for the Google Data APIs"
+HOMEPAGE="http://code.google.com/p/googlecl/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86 ~arm-linux ~x86-linux"
+IUSE=""
+
+DEPEND=""
+RDEPEND="
+ dev-python/gdata
+"
+
+pkg_setup() {
+ python_set_active_version 2
+}
+
+src_install() {
+ distutils_src_install
+
+ dodoc changelog || die "dodoc failed"
+ doman man/*.1 || die "doman failed"
+}
diff --git a/net-misc/googlecl/metadata.xml b/net-misc/googlecl/metadata.xml
new file mode 100644
index 000000000000..d08f52481e05
--- /dev/null
+++ b/net-misc/googlecl/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>wired@gentoo.org</email>
+ <name>Alex Alexander</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">googlecl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/grdesktop/Manifest b/net-misc/grdesktop/Manifest
new file mode 100644
index 000000000000..488ef452276e
--- /dev/null
+++ b/net-misc/grdesktop/Manifest
@@ -0,0 +1 @@
+DIST grdesktop-0.23.tar.gz 299914 SHA256 a94632ed42273d280ad4f8eec6a803024666ed5c8737ae34585c2d9d2eed5193 SHA512 a0993d7589d0b22b26535de0cf562604c89ce580fede076c15d8d7f2e7a3bd2fd5ec0a35c6a8ec07fcc8f53a0635381fefe9c2e67d9ff75cec7af47cdd25732f WHIRLPOOL 25b29dfd7e0f1b9b09f2cd8f6c92c2c2d09cfee966ca0df480e92e51fdea21c91dd45a68976f139f3f2013c0994aea11fd27664daa81f2cdfb4bf57a1927b0f8
diff --git a/net-misc/grdesktop/files/grdesktop-0.23-desktop.patch b/net-misc/grdesktop/files/grdesktop-0.23-desktop.patch
new file mode 100644
index 000000000000..6fcbd046050f
--- /dev/null
+++ b/net-misc/grdesktop/files/grdesktop-0.23-desktop.patch
@@ -0,0 +1,19 @@
+--- grdesktop.desktop.old 2014-07-08 14:05:45.500537718 +0200
++++ grdesktop.desktop 2014-07-08 14:06:27.237420849 +0200
+@@ -4,13 +4,13 @@
+ Comment[de]=Verbindet zu einem entfernten Windows Terminal-Server
+ TryExec=grdesktop
+ Exec=grdesktop
+-Icon=grdesktop.png
++Icon=/usr/share/pixmaps/grdesktop/icon.png
+ Terminal=false
+ Type=Application
+ Version=1.0
+ Actions=Full;
+-Categories=Application;Network;X-Red-Hat-Base;
+-Encoding=UTF-8
++Categories=Network;X-Red-Hat-Base;
+
+ [Desktop Action Full]
++Name=Remotedesktop Client
+ Exec=grdesktop
diff --git a/net-misc/grdesktop/grdesktop-0.23-r1.ebuild b/net-misc/grdesktop/grdesktop-0.23-r1.ebuild
new file mode 100644
index 000000000000..b11c1f0c8350
--- /dev/null
+++ b/net-misc/grdesktop/grdesktop-0.23-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit eutils gnome2
+
+DESCRIPTION="Gtk2 frontend for rdesktop"
+HOMEPAGE="http://www.nongnu.org/grdesktop/"
+SRC_URI="http://savannah.nongnu.org/download/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86 ~x86-fbsd"
+
+IUSE=""
+
+RDEPEND="
+ x11-libs/gtk+:2
+ >=gnome-base/libgnomeui-2
+ net-misc/rdesktop
+ gnome-base/gconf:2
+"
+DEPEND="${RDEPEND}
+ app-text/scrollkeeper
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ # Correct icon path. See bug #50295.
+ epatch "${FILESDIR}/${P}-desktop.patch"
+
+ sed -e 's/\(GETTEXT_PACKAGE = \)@GETTEXT_PACKAGE@/\1grdesktop/g' \
+ -i po/Makefile.in.in || die "sed 2 failed"
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-debug \
+ --with-keymap-path=/usr/share/rdesktop/keymaps/
+}
diff --git a/net-misc/grdesktop/metadata.xml b/net-misc/grdesktop/metadata.xml
new file mode 100644
index 000000000000..a37eac5342bd
--- /dev/null
+++ b/net-misc/grdesktop/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>gnome</herd>
+<longdescription>Gtk2 frontend for rdesktop</longdescription>
+<longdescription lang="ja">リモート・デスクトップの GTK2 フロントエンドです。</longdescription>
+</pkgmetadata>
diff --git a/net-misc/grive/Manifest b/net-misc/grive/Manifest
new file mode 100644
index 000000000000..ceeb9137ad14
--- /dev/null
+++ b/net-misc/grive/Manifest
@@ -0,0 +1,3 @@
+DIST grive-0.2.0.tar.gz 145760 SHA256 bb0de191cbe98e8efda6ce8fd5bcef3ae4903984aaaa9592909ddb4a24175f45 SHA512 5bae5d1de4655775347ca3148a0ae8b3294c56dff659cbd32f8c53d6cfa40f645d6f710a2e26e2189e51632bccaba494f45bec55a7721d6f7a40b467b1f3c7fd WHIRLPOOL 167093c15348bfdd6bd9b9db31919708ccd1f79b349ea43bd478227c500d8773d64cbf845e3c2f9747c3097945c4fea68462b3babfd81c0211cc52f03767c92e
+DIST grive-0.3.0_pre20130503.tar.gz 162471 SHA256 0b038cc627f898831872fdf3c20ac563f78a72094f594adda7ff737a1c1f207e SHA512 bd96a02366af47c5fde8e044066616c72a33607818d5e9cf4bea5fe70c0d63f83a2b726ce9a763cb907c78b2a563d7b2296b25e55743288dacef98adea3de729 WHIRLPOOL 38577f235fd9abc3f8f5da56c459c3569ac09cd1e3b16cfbea463a60103c25c0a4a4a163599974d35d8d146a5ec2c9c06e02c1cb518040a5462dd3200c7ebba9
+DIST grive-0.3.0_pre20141119.tar.gz 72990 SHA256 33b27eb534db51c525947810a21327195c24cb7c4ba3b448a33b2a7f98d4c014 SHA512 0ac69985fa597039ef5aaf91c7f1b4de8a1472406365cc1624c9410cdb02a186a4bf81a7d5e8d0272abfb68219de779815b38d030dfc550cd29caf313341cb4b WHIRLPOOL 9b184cdef9b0a74e53bb7235679ba358c7241df824a411c0473ac7a69e7cd1287d7edc6b65b636a59c81665af4b58def499a513921bc2056d210b9d14b811358
diff --git a/net-misc/grive/files/grive-0.2.0-check-bfd.h.patch b/net-misc/grive/files/grive-0.2.0-check-bfd.h.patch
new file mode 100644
index 000000000000..4acf29a62ba3
--- /dev/null
+++ b/net-misc/grive/files/grive-0.2.0-check-bfd.h.patch
@@ -0,0 +1,36 @@
+https://github.com/Grive/grive/pull/144
+
+From e2950364da813a5b27eab90c51cbea69fb3fd1f9 Mon Sep 17 00:00:00 2001
+From: Christoph Junghans <junghans@votca.org>
+Date: Fri, 2 Nov 2012 21:56:41 -0600
+Subject: [PATCH] Check if bfd.h can be included (fixes #72)
+
+---
+ cmake/Modules/FindBFD.cmake | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/cmake/Modules/FindBFD.cmake b/cmake/Modules/FindBFD.cmake
+index 785e29b..5fe43c1 100644
+--- a/cmake/Modules/FindBFD.cmake
++++ b/cmake/Modules/FindBFD.cmake
+@@ -1,9 +1,15 @@
+ find_library( DL_LIBRARY NAMES dl PATH /usr/lib /usr/lib64 )
+ find_library( BFD_LIBRARY NAMES bfd PATH /usr/lib /usr/lib64 )
+
+-if ( DL_LIBRARY AND BFD_LIBRARY )
++include(CheckCSourceCompiles)
++check_c_source_compiles(
++ "#include <bfd.h>
++ int main(void) {
++ return 0;
++ }" BFD_WORKS)
++if ( DL_LIBRARY AND BFD_LIBRARY AND BFD_WORKS)
+ set( BFD_FOUND TRUE )
+-endif (DL_LIBRARY AND BFD_LIBRARY)
++endif (DL_LIBRARY AND BFD_LIBRARY AND BFD_WORKS)
+
+ if ( BFD_FOUND )
+
+--
+1.7.12
+
diff --git a/net-misc/grive/grive-0.2.0-r1.ebuild b/net-misc/grive/grive-0.2.0-r1.ebuild
new file mode 100644
index 000000000000..4d55755b0208
--- /dev/null
+++ b/net-misc/grive/grive-0.2.0-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils eutils multilib
+
+if [[ ${PV} = *9999 ]]; then
+ inherit git-2
+ EGIT_REPO_URI="git://github.com/Grive/${PN}.git"
+else
+ inherit eutils vcs-snapshot
+ SRC_URI="mirror://github/Grive/${PN}/tarball/v${PV} -> ${P}.tar.gz"
+fi
+
+DESCRIPTION="an open source Linux client for Google Drive"
+HOMEPAGE="http://www.lbreda.com/grive/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-libs/boost:=
+ dev-libs/expat
+ dev-libs/json-c:=
+ dev-libs/libgcrypt:0=
+ net-misc/curl
+ sys-devel/binutils
+ sys-libs/glibc
+ sys-libs/zlib
+ "
+
+DEPEND="${RDEPEND}"
+
+DOCS=( "README" )
+
+src_prepare() {
+ epatch "${FILESDIR}"/"${P}"-check-bfd.h.patch
+
+ #include dir change in json-c-0.10 #462632 and #452234
+ if has_version ">=dev-libs/json-c-0.10" ; then
+ sed -i -e '/\(include\|INCLUDE\)/s@json/@json-c/@' \
+ libgrive/src/protocol/Json.cc \
+ cmake/Modules/FindJSONC.cmake || die
+ fi
+ #json-c library changed in 0.11, bug #467432
+ if has_version ">=dev-libs/json-c-0.11" ; then
+ sed -i -e '/LIBRARY/s@json)@json-c)@' \
+ cmake/Modules/FindJSONC.cmake || die
+ fi
+}
diff --git a/net-misc/grive/grive-0.3.0_pre20130503.ebuild b/net-misc/grive/grive-0.3.0_pre20130503.ebuild
new file mode 100644
index 000000000000..00548e2f13cc
--- /dev/null
+++ b/net-misc/grive/grive-0.3.0_pre20130503.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils eutils multilib
+
+if [[ ${PV} = *9999 ]]; then
+ inherit git-2
+ EGIT_REPO_URI="git://github.com/Grive/${PN}.git"
+else
+ inherit eutils vcs-snapshot
+ COMMIT="27817e835fe115ebbda5410ec904aa49a2ad01f1"
+ SRC_URI="https://github.com/${PN}/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+fi
+
+DESCRIPTION="an open source Linux client for Google Drive"
+HOMEPAGE="http://www.lbreda.com/grive/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-libs/boost:=
+ dev-libs/expat
+ dev-libs/json-c:=
+ dev-libs/libgcrypt:0=
+ dev-libs/yajl
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ net-misc/curl
+ sys-devel/binutils
+ sys-libs/glibc
+ sys-libs/zlib
+ "
+
+DEPEND="${RDEPEND}"
+
+DOCS=( "README" )
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}"-0.2.0-check-bfd.h.patch
+
+ #include dir change in json-c-0.10 #462632 and #452234
+ if has_version ">=dev-libs/json-c-0.10" ; then
+ sed -i -e '/\(include\|INCLUDE\)/s@json/@json-c/@' \
+ libgrive/src/protocol/Json.cc \
+ cmake/Modules/FindJSONC.cmake || die
+ fi
+ #json-c library changed in 0.11, bug #467432
+ if has_version ">=dev-libs/json-c-0.11" ; then
+ sed -i -e '/LIBRARY/s@json)@json-c)@' \
+ cmake/Modules/FindJSONC.cmake || die
+ fi
+
+ sed -i '/grive.1/s/^/#/' bgrive/CMakeLists.txt || die
+}
+
+src_install(){
+ cmake-utils_src_install
+
+ local icon size
+ for icon in icon/*/*.png; do
+ size=${icon##*/}
+ size=${size%.png}
+ newicon -s "${size}" "${icon}" ${PN}.png
+ done
+ make_desktop_entry bgrive
+}
diff --git a/net-misc/grive/grive-0.3.0_pre20141119.ebuild b/net-misc/grive/grive-0.3.0_pre20141119.ebuild
new file mode 100644
index 000000000000..221f78fce166
--- /dev/null
+++ b/net-misc/grive/grive-0.3.0_pre20141119.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+if [[ ${PV} = *9999 ]]; then
+ inherit git-2
+ EGIT_REPO_URI="git://github.com/linwiz/${PN}.git"
+else
+ inherit vcs-snapshot
+ COMMIT="afd106ff47758d74daac4db35002e5e0d8d4d389"
+ SRC_URI="https://github.com/linwiz/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+fi
+
+DESCRIPTION="an open source Linux client for Google Drive"
+HOMEPAGE="http://www.lbreda.com/grive/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-libs/boost:=
+ dev-libs/expat
+ >=dev-libs/json-c-0.11-r1:=
+ dev-libs/libgcrypt:0=
+ net-misc/curl
+ sys-libs/glibc
+ dev-libs/yajl
+ "
+
+DEPEND="${RDEPEND}"
+
+DOCS=( "README" )
diff --git a/net-misc/grive/metadata.xml b/net-misc/grive/metadata.xml
new file mode 100644
index 000000000000..c534f67229c3
--- /dev/null
+++ b/net-misc/grive/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>ottxor@gentoo.org</email>
+ <name>Christoph Junghans</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">Grive/grive</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/gsasl/Manifest b/net-misc/gsasl/Manifest
new file mode 100644
index 000000000000..0840079f3567
--- /dev/null
+++ b/net-misc/gsasl/Manifest
@@ -0,0 +1 @@
+DIST gsasl-1.8.0.tar.gz 4914837 SHA256 310262d1ded082d1ceefc52d6dad265c1decae8d84e12b5947d9b1dd193191e5 SHA512 711bd87d27656834ae7e19b22a76db2b1db37dd25999cd303fe8439e23e74e87fd1474c5db1b5f97e9ab75437eeeb6167a752e9191f364f530eeabb6cddda36f WHIRLPOOL cf5a0a855218af211dc6afc61e2ed18b7bc89e4c80c3e207df125a80ba8910c1c02dfa3d6260224aab59d29dcbf8f3f40168a145863db65a01b7b0e0446f6ead
diff --git a/net-misc/gsasl/files/gsasl-gss-extra.patch b/net-misc/gsasl/files/gsasl-gss-extra.patch
new file mode 100644
index 000000000000..e08a36ae5779
--- /dev/null
+++ b/net-misc/gsasl/files/gsasl-gss-extra.patch
@@ -0,0 +1,21 @@
+Based on gentoo bug #359005
+--- lib/gl/m4/gss-extra.m4.orig 2010-12-14 12:57:08.000000000 +0000
++++ lib/gl/m4/gss-extra.m4 2011-11-05 21:11:54.000000000 +0000
+@@ -19,7 +19,16 @@
+ AC_CHECK_FUNCS([gss_decapsulate_token])
+ AC_CHECK_FUNCS([gss_oid_equal])
+ AC_CHECK_FUNCS([gss_inquire_mech_for_saslname])
+- AC_CHECK_FUNCS([GSS_C_NT_HOSTBASED_SERVICE])
++ AC_MSG_CHECKING([for GSS_C_NT_HOSTBASED_SERVICE])
++ AC_EGREP_CPP(hostbased_service_gss_nt_yes, gssapi.h,
++ [#include <gssapi.h>
++ #ifdef GSS_C_NT_HOSTBASED_SERVICE
++ hostbased_service_gss_nt_yes
++ #endif],
++ [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,,
++ [Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE])
++ AC_MSG_RESULT([yes])],
++ AC_MSG_RESULT([no]))
+ if test "$gssapi_impl" != "gss"; then
+ AC_CHECK_HEADERS([gssapi.h gssapi/gssapi.h])
+ if test "$ac_cv_header_gssapi_h$ac_cv_header_gssapi_gssapi_h" = "nono"; then
diff --git a/net-misc/gsasl/gsasl-1.8.0-r1.ebuild b/net-misc/gsasl/gsasl-1.8.0-r1.ebuild
new file mode 100644
index 000000000000..e967217c06c0
--- /dev/null
+++ b/net-misc/gsasl/gsasl-1.8.0-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils
+
+DESCRIPTION="The GNU SASL client, server, and library"
+HOMEPAGE="http://www.gnu.org/software/gsasl/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="doc gcrypt idn kerberos nls ntlm static-libs +threads"
+
+DEPEND="
+ gcrypt? ( dev-libs/libgcrypt:0 )
+ idn? ( net-dns/libidn )
+ kerberos? ( virtual/krb5 )
+ nls? ( >=sys-devel/gettext-0.18.1 )
+ ntlm? ( net-libs/libntlm )
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-gss-extra.patch"
+ sed -i -e '/gl_WARN_ADD(\[-Werror/d' \
+ -e 's/ -Werror//' configure.ac || die
+ sed -i -e 's/ -Werror//' lib/configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ local krb5_impl
+ if use kerberos; then
+ krb5_impl="--with-gssapi-impl="
+ krb5_impl+=$(has_version app-crypt/mit-krb5 && echo "mit" || echo "heimdal")
+ fi
+ econf \
+ --enable-client \
+ --enable-server \
+ --disable-valgrind-tests \
+ --disable-rpath \
+ --without-libshishi \
+ --without-libgss \
+ --disable-kerberos_v5 \
+ $(use_enable kerberos gssapi) \
+ ${krb5_impl} \
+ $(use_enable kerberos gs2) \
+ $(use_with gcrypt libgcrypt) \
+ $(use_enable nls) \
+ $(use_with idn stringprep) \
+ $(use_enable ntlm) \
+ $(use_with ntlm libntlm) \
+ $(use_enable static-libs static) \
+ $(use_enable threads)
+}
+
+src_install() {
+ default
+ if ! use static-libs; then
+ rm -f "${D}"/usr/lib*/lib*.la
+ fi
+ doman doc/gsasl.1 doc/man/*.3
+
+ if use doc; then
+ dodoc doc/*.{eps,ps,pdf}
+ dohtml doc/*.html
+ docinto examples
+ dodoc examples/*.c
+ fi
+}
diff --git a/net-misc/gsasl/metadata.xml b/net-misc/gsasl/metadata.xml
new file mode 100644
index 000000000000..e80fb1b890f2
--- /dev/null
+++ b/net-misc/gsasl/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-mail</herd>
+<use>
+<flag name='gcrypt'>
+ Use <pkg>dev-libs/libgcrypt</pkg> for low-level crypto
+</flag>
+<flag name='ntlm'>
+ Add support for Microsoft's NTLM mechanism using <pkg>net-libs/libntlm</pkg>
+</flag>
+</use>
+</pkgmetadata>
diff --git a/net-misc/gsutil/Manifest b/net-misc/gsutil/Manifest
new file mode 100644
index 000000000000..a44edba305c2
--- /dev/null
+++ b/net-misc/gsutil/Manifest
@@ -0,0 +1,15 @@
+DIST gsutil_3.14.tar.gz 755999 SHA256 39a0e85cf569c60ab0cabdcb574ee4a3bb31d11beb819fbe33594260d8804773 SHA512 01d6f83e21f148f7dd581f0a4132be7ceb70e069ccc3bf5fabd85e1e6ed68b422288878a57ff4477d279c5984c7b203107997a7af3f90d0924b09604b6a6aa93 WHIRLPOOL cd0c3655149f6e2ab35b298ac8fe5367a665a7bde5d56a0f91db3a24cd2b6de519271e849bd6f4480d857f0d0a4a294f9394a9eadbb96725bb8f6db56e2fcbd7
+DIST gsutil_3.18.tar.gz 795447 SHA256 640defd2c3a1825295ae8c18e8cdb1c961df1f9f93fca83b921cfbd967d1171c SHA512 11d246412a53eecbc63af49f945f438d2866bfd8ebbc7368776da6066139bdbcdf72c6e45169a16014002accf940cd369064c25070fea3d9622dd50e614164c9 WHIRLPOOL 6ab0ebb61044e5dc67a8c2be9085e726bb3364d7020e915923410b5cbd3b927c59d981ae1772957a5cc1b0601f685064ed9e5456d3782542852c87529ead1c45
+DIST gsutil_3.21.tar.gz 1092318 SHA256 a92863eb1be812bc2ebfeaef8ade68dab81b7a3a3c73dafa637c95b7bde6abce SHA512 74f092558951a22fd94cd5e861cb147e9d12b7ff5a6514ec01f8cb618469f30c4dc0054a96231792b2fb77b83c270c26368e64038d0f6974c53ee74fe580d703 WHIRLPOOL 9fb6bf3fb6667d9be741cb310770d291afb66b6e1f890be50f2df0de5d71fd78516039969194510b26c5ba925a7ba67ceb748e5fad16ddf33086377c0dab1b22
+DIST gsutil_3.37.tar.gz 1768013 SHA256 8f094f13202b0232534e218aacfd9a7328a03f8060bc0db28a25fdd8134b63db SHA512 e6d1c995025d3fcdac8fd35be68bffaabae2f59a81090a67c7c4f6356517c4b6f1f7653b1f7485e9d0b4bb82c5e6725764b255f010add59018e593dfa1b6127c WHIRLPOOL b53ea1e891f5f908d9d121fdfdc4bfd3c5f56f2df05f59c0efa29e5b4ba841bef9468b8700a6a74d57f122a4d3ad5835ee54f58d24e47bc978427f01859e652e
+DIST gsutil_3.38.tar.gz 1823304 SHA256 c272f1a637903ce84f8ae40a055bcb5eb6e605141bfd7986d970b1430afd88d8 SHA512 23d86455ddcf713b217ebc7ea9c2686dac0f903e9782e326bc12e18ec09477a16532d19eeceb5cfcffa32484a0391ddeb14c95090369ce21f69fc944ae9e6a4a WHIRLPOOL 5df5d353f5034cc5e79565bab93797560e752bf573aee4b56e49ccd6772378ec8ce5af7a3eb6dbfee7fd5000ef331baedf857d63b711f3ba6f9474a86ca5c9fb
+DIST gsutil_3.42.tar.gz 1878904 SHA256 50fc7acb7d1db8752f3eee106a3d8d65188107943e7cb30cfd3f94a9cfcdcf37 SHA512 084aaf43a44528af0cdfd9bd22beeb5d6abff240c09843cf35016d685d51b854ed5b2837eaa50c97bb44d5e1a3cdccbae6688ef27aa13f2a5db6040bf501b381 WHIRLPOOL 5b0d0fb1d2446a7b8777f368f073fdb4f7ad2d6407735976c178a2727a2548bf28522e06469dd0b7df1578d5586bc152fba3520b66f88d706417947aa3aa5578
+DIST gsutil_3.7.tar.gz 673203 SHA256 77907865287e57a8ce713e97155191bd44448d6888861a45345d9b035a3b3b87 SHA512 771fbe6f095955a14565ca50704a8a5b674935f0992564491e2a0e57f1a14e26f44f4379ed2b6160a7fe9f34299f405c22402d86d8a9042baa886dd8b7389cd3 WHIRLPOOL dd353f1e7ecc3262fc17463610e80b2f89c928d67490dfd5eaf99977ff5c578bbaaf1f6408de19c7c72e5ed88d7185549dbe2415ef021bf109860857ad419aef
+DIST gsutil_4.11.tar.gz 2137641 SHA256 4a9e538eb8461ad8ece4ac0dcf67b26b6a357456ffca6778f3612954710c3a3b SHA512 3b43e08a96962f5544fb5151ed8d81de12ecdec277a257c78f0fe230d1cee45ed170d4d0e58787b320e25ecc622a413b596954720cc573a1adf008fe039ed8a9 WHIRLPOOL 7ff6176c840a8e3c301f021f154c3a28cca1336681ead741d3c4eedcf6d6efed3762f2ab127026d27103a2f3e6bb5d8af7e23d2abc55859104e5653c39aa0d56
+DIST gsutil_4.12.tar.gz 2602559 SHA256 f08dff664ad2a8875dca9d2a64384a1eba5e391dc4e8cde9189e9394e7156d8e SHA512 3d651e2f40b1842f6855557119da911d519921c6e96ac6368a7aff7414db9332b72331f9fc479c25c1c26307ae08f1dbc9ac683badd79ee88b41fa881c1b4573 WHIRLPOOL d8e02b146e94a3fee1c91077f5d3eef5510628299f6fdefc36c1b4337f55a2cd10f3b16c4a4e7058ae598412c7cb73855b18ca1be5ebda201a042f7040696164
+DIST gsutil_4.13.tar.gz 2790817 SHA256 f6fa8a77ff0475ba4898b2a4453ed3ead551499485000420f12bc4f7cfbcc09e SHA512 b146c8ce6fba09b07a752842d1ca3f83c74250553a4dae50ce32bf8ece2ded366e1b60d5c0af3727e2f5ed8d0766c9345bbf1056c3af571a26d2ed76187b57c9 WHIRLPOOL 5a989c51a9e550523713dc658255036a044f0e88dfd3869ca362d573bae6ff83004bb3249674b15fe6082b666d3c598a6f133c9b2e3c7e373a20f5db54b6d361
+DIST gsutil_4.4.tar.gz 2165629 SHA256 aa1e906d46ef04a6a2c65b38ce95b96575c7640377d52e41de9cfb9ac4bb9b87 SHA512 a3a72e4159010af497941c1073af561615ff6e8ca58f387378c5f6d599f2c75b1b9f855066ff65640ef303aace5de3dfffad53378dfe31a3911e1fdeddeef672 WHIRLPOOL eb8b5dc528b5d54a7fab4812aa73da819eba1b3f16f5a01a2bd6c139215f99aac0fe6a4f49e1a02733d17a94c2595d0b1fa7a652cc2baf50121549c2374df0be
+DIST gsutil_4.5.tar.gz 2196988 SHA256 ab8dd64754be902a41dc696f2d186dcf232ef959b40e24bf56fd6ae2940ed822 SHA512 a8e1ac6f6aa47727cb90f335253f0a8f0c4a04631695c1be63c1276f0202a71770c8046039baaf5fa4b31100a8f85073ea9cf5e283b41902d9ef58f84704bfc8 WHIRLPOOL d7d8c3078722aa692369d288c9621754d6df6f0aa70eb6608cac75fd21c9825c577dbeef64f1615dbace2f6ac7e1167a820c0047aa732c1cdf8bde6462fd0c15
+DIST gsutil_4.6.tar.gz 2201289 SHA256 ba811fe4dd55a138cdc7ce41622aff5bc9f93503b012ea3abb47bc7524004db7 SHA512 66699451b6b6c030ed553b364565f1837caa252c7924c7184af695b215bbc3c1bb0d7893f18cf6ae1d8c2b466bb1a28bcc31fd908d867852832b4aa4409dfc49 WHIRLPOOL 59e179bd94a4c80f0223ceb76ffb1eaf5fcef445f6e9039c01024c49db5342ded90ab0e87f81df403f6f0f5a873bf7c362f4df594cf53d02668bbcdb7ff1c331
+DIST gsutil_4.7.tar.gz 3133131 SHA256 8f3892127f20a49d091b00a77c584643becf1a413c7f35512edffd12951657cb SHA512 744ea1a916ed1ba5125cdbc549f4df728e709b8becc91f076e31abd3cca22bda70a0b78b1e29e3773ca4b86961cc2b2320c001009b716a232334667906611b21 WHIRLPOOL 6d7fbb1c61e7b544cb2ca3ffa54616f3b7a1e7b1c1af128933a4c69e0d460a6017bb4e7574b09c05d4f2700d265ab9334ff7278b8b81f9fe0b0807a1bfcdbe67
+DIST gsutil_4.8.tar.gz 2128639 SHA256 693768d31597a165d44a90f0eb4a49c36a41c47508fe8370317f8133ea420890 SHA512 e9547957e43f66d9e157d1825aa27e0accae313a199008dbb38d8e5c89586eb44bc6d87a9c834a157959ebf840a5598d4aa8fbb1adb437d804ec74e51a3bc3c1 WHIRLPOOL 731ecc3a5ff4fc425c0b8b57a975bcbd34cd96df057be5d645fdeaf1fb4a3c7a3423fadeced738cf99291cc0e3281d8a9e49eb442c806d9a10e394a427979128
diff --git a/net-misc/gsutil/files/dummy.boto b/net-misc/gsutil/files/dummy.boto
new file mode 100644
index 000000000000..93e9dd2f8c77
--- /dev/null
+++ b/net-misc/gsutil/files/dummy.boto
@@ -0,0 +1,6 @@
+# dummy .boto file for testing
+
+[Credentials]
+gs_oauth2_refresh_token = 1/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+
+[GSUtil]
diff --git a/net-misc/gsutil/files/gsutil-3.37-drop-http_proxy-clearing.patch b/net-misc/gsutil/files/gsutil-3.37-drop-http_proxy-clearing.patch
new file mode 100644
index 000000000000..4c36035d21c5
--- /dev/null
+++ b/net-misc/gsutil/files/gsutil-3.37-drop-http_proxy-clearing.patch
@@ -0,0 +1,35 @@
+http://crbug.com/318478
+
+From 0067df5b08ebab29b88bbb7e6c1cd79dc4d96100 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Wed, 27 Nov 2013 14:57:05 -0500
+Subject: [PATCH] drop http_proxy clearing
+
+The boto logic takes care of merging the env vars and the settings in its
+boto config file, so there shouldn't be a need to clear things.
+---
+ gslib/__main__.py | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/gslib/__main__.py b/gslib/__main__.py
+index 82a69c1..a18db42 100644
+--- a/gslib/__main__.py
++++ b/gslib/__main__.py
+@@ -247,14 +247,6 @@ def main():
+ else:
+ command_name = args[0]
+
+- # Unset http_proxy environment variable if it's set, because it confuses
+- # boto. (Proxies should instead be configured via the boto config file.)
+- if 'http_proxy' in os.environ:
+- if debug > 1:
+- sys.stderr.write(
+- 'Unsetting http_proxy environment variable within gsutil run.\n')
+- del os.environ['http_proxy']
+-
+ return _RunNamedCommandAndHandleExceptions(
+ command_runner, command_name, args[1:], headers, debug,
+ parallel_operations)
+--
+1.8.4.3
+
diff --git a/net-misc/gsutil/files/gsutil-3.37-use-friendy-version-checks.patch b/net-misc/gsutil/files/gsutil-3.37-use-friendy-version-checks.patch
new file mode 100644
index 000000000000..5da56d476a99
--- /dev/null
+++ b/net-misc/gsutil/files/gsutil-3.37-use-friendy-version-checks.patch
@@ -0,0 +1,20 @@
+--- a/setup.py
++++ b/setup.py
+@@ -33,15 +33,13 @@ management tasks, including:
+ """
+
+ requires = [
+- 'boto==2.13.0',
++ 'boto>=2.13.0',
+ 'httplib2>=0.8',
+ 'python-gflags>=2.0',
+ 'google-api-python-client>=1.1',
+ 'pyOpenSSL>=0.13',
+ 'crcmod>=1.7',
+- # Not using 1.02 because of:
+- # https://code.google.com/p/socksipy-branch/issues/detail?id=3
+- 'SocksiPy-branch==1.01',
++ 'SocksiPy-branch>=1.01',
+ 'retry_decorator>=0.1.0',
+ ]
+
diff --git a/net-misc/gsutil/files/gsutil-3.38-use-friendy-version-checks.patch b/net-misc/gsutil/files/gsutil-3.38-use-friendy-version-checks.patch
new file mode 100644
index 000000000000..24641a27ca40
--- /dev/null
+++ b/net-misc/gsutil/files/gsutil-3.38-use-friendy-version-checks.patch
@@ -0,0 +1,20 @@
+--- a/setup.py
++++ b/setup.py
+@@ -33,15 +33,13 @@ management tasks, including:
+ """
+
+ requires = [
+- 'boto==2.17.0',
++ 'boto>=2.17.0',
+ 'httplib2>=0.8',
+ 'python-gflags>=2.0',
+ 'google-api-python-client>=1.1',
+ 'pyOpenSSL>=0.13',
+ 'crcmod>=1.7',
+- # Not using 1.02 because of:
+- # https://code.google.com/p/socksipy-branch/issues/detail?id=3
+- 'SocksiPy-branch==1.01',
++ 'SocksiPy-branch>=1.01',
+ 'retry_decorator>=1.0.0',
+ ]
+
diff --git a/net-misc/gsutil/files/gsutil-3.42-use-friendy-version-checks.patch b/net-misc/gsutil/files/gsutil-3.42-use-friendy-version-checks.patch
new file mode 100644
index 000000000000..5d8bbbc7635e
--- /dev/null
+++ b/net-misc/gsutil/files/gsutil-3.42-use-friendy-version-checks.patch
@@ -0,0 +1,20 @@
+--- a/setup.py
++++ b/setup.py
+@@ -33,15 +33,13 @@ management tasks, including:
+ """
+
+ requires = [
+- 'boto==2.22.1',
++ 'boto>=2.22.1',
+ 'httplib2>=0.8',
+ 'python-gflags>=2.0',
+ 'google-api-python-client>=1.1',
+ 'pyOpenSSL>=0.13',
+ 'crcmod>=1.7',
+- # Not using 1.02 because of:
+- # https://code.google.com/p/socksipy-branch/issues/detail?id=3
+- 'SocksiPy-branch==1.01',
++ 'SocksiPy-branch>=1.01',
+ 'retry_decorator>=1.0.0',
+ ]
+
diff --git a/net-misc/gsutil/files/gsutil-4.13-use-friendy-version-checks.patch b/net-misc/gsutil/files/gsutil-4.13-use-friendy-version-checks.patch
new file mode 100644
index 000000000000..fef0858c3fea
--- /dev/null
+++ b/net-misc/gsutil/files/gsutil-4.13-use-friendy-version-checks.patch
@@ -0,0 +1,24 @@
+--- a/setup.py
++++ b/setup.py
+@@ -35,10 +35,10 @@
+ """
+
+ requires = [
+- 'boto==2.38.0',
++ 'boto>=2.38.0',
+ 'crcmod>=1.7',
+ 'gcs-oauth2-boto-plugin>=1.9',
+- 'google-apitools==0.4.8',
++ 'google-apitools>=0.4.8',
+ 'httplib2>=0.8',
+ 'oauth2client>=1.4.11',
+ 'protorpc>=0.10.0',
+@@ -48,7 +48,7 @@
+ 'six>=1.8.0',
+ # Not using 1.02 because of:
+ # https://code.google.com/p/socksipy-branch/issues/detail?id=3
+- 'SocksiPy-branch==1.01',
++ 'SocksiPy-branch>=1.01',
+ ]
+
+ dependency_links = [
diff --git a/net-misc/gsutil/files/gsutil-4.4-use-friendy-version-checks.patch b/net-misc/gsutil/files/gsutil-4.4-use-friendy-version-checks.patch
new file mode 100644
index 000000000000..0443d109b588
--- /dev/null
+++ b/net-misc/gsutil/files/gsutil-4.4-use-friendy-version-checks.patch
@@ -0,0 +1,22 @@
+--- a/setup.py
++++ b/setup.py
+@@ -35,7 +35,7 @@ management tasks, including:
+ """
+
+ requires = [
+- 'boto==2.30.0',
++ 'boto>=2.30.0',
+ 'crcmod>=1.7',
+ 'gcs-oauth2-boto-plugin>=1.7',
+ 'google-api-python-client>=1.1',
+@@ -43,9 +43,7 @@ requires = [
+ 'pyOpenSSL>=0.13',
+ 'python-gflags>=2.0',
+ 'retry_decorator>=1.0.0',
+- # Not using 1.02 because of:
+- # https://code.google.com/p/socksipy-branch/issues/detail?id=3
+- 'SocksiPy-branch==1.01',
++ 'SocksiPy-branch>=1.01',
+ ]
+
+ dependency_links = [
diff --git a/net-misc/gsutil/files/gsutil-4.7-drop-http_proxy-clearing.patch b/net-misc/gsutil/files/gsutil-4.7-drop-http_proxy-clearing.patch
new file mode 100644
index 000000000000..67c07f03c48d
--- /dev/null
+++ b/net-misc/gsutil/files/gsutil-4.7-drop-http_proxy-clearing.patch
@@ -0,0 +1,36 @@
+http://crbug.com/318478
+https://github.com/GoogleCloudPlatform/gsutil/pull/171
+
+From 0067df5b08ebab29b88bbb7e6c1cd79dc4d96100 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Wed, 27 Nov 2013 14:57:05 -0500
+Subject: [PATCH] drop http_proxy clearing
+
+The boto logic takes care of merging the env vars and the settings in its
+boto config file, so there shouldn't be a need to clear things.
+---
+ gslib/__main__.py | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/gslib/__main__.py b/gslib/__main__.py
+index 82a69c1..a18db42 100644
+--- a/gslib/__main__.py
++++ b/gslib/__main__.py
+@@ -247,14 +247,6 @@ def main():
+ else:
+ command_name = args[0]
+
+- # Unset http_proxy environment variable if it's set, because it confuses
+- # boto. (Proxies should instead be configured via the boto config file.)
+- if 'http_proxy' in os.environ:
+- if debug > 1:
+- sys.stderr.write(
+- 'Unsetting http_proxy environment variable within gsutil run.\n')
+- del os.environ['http_proxy']
+-
+ if os.environ.get('_ARGCOMPLETE', '0') == '1':
+ return _PerformTabCompletion(command_runner)
+
+--
+1.8.4.3
+
diff --git a/net-misc/gsutil/files/gsutil-4.7-use-friendy-version-checks.patch b/net-misc/gsutil/files/gsutil-4.7-use-friendy-version-checks.patch
new file mode 100644
index 000000000000..9d9eb65a3643
--- /dev/null
+++ b/net-misc/gsutil/files/gsutil-4.7-use-friendy-version-checks.patch
@@ -0,0 +1,22 @@
+--- a/setup.py
++++ b/setup.py
+@@ -35,7 +35,7 @@ management tasks, including:
+ """
+
+ requires = [
+- 'boto==2.30.0',
++ 'boto>=2.30.0',
+ 'crcmod>=1.7',
+ 'gcs-oauth2-boto-plugin>=1.8',
+ 'httplib2>=0.8',
+@@ -44,9 +44,7 @@ requires = [
+ 'python-gflags>=2.0',
+ 'retry_decorator>=1.0.0',
+ 'six>=1.8.0',
+- # Not using 1.02 because of:
+- # https://code.google.com/p/socksipy-branch/issues/detail?id=3
+- 'SocksiPy-branch==1.01',
++ 'SocksiPy-branch>=1.01',
+ ]
+
+ dependency_links = [
diff --git a/net-misc/gsutil/files/gsutil-system-boto.patch b/net-misc/gsutil/files/gsutil-system-boto.patch
new file mode 100644
index 000000000000..88cb49c0f0ab
--- /dev/null
+++ b/net-misc/gsutil/files/gsutil-system-boto.patch
@@ -0,0 +1,23 @@
+http://code.google.com/p/gsutil/issues/detail?id=71
+
+--- a/gsutil
++++ b/gsutil
+@@ -41,13 +41,15 @@
+ _OutputAndExit('Unable to determine where gsutil is installed. Sorry, '
+ 'cannot run correctly without this.\n')
+ boto_lib_dir = os.path.join(gsutil_bin_dir, 'boto')
+-if not os.path.isdir(boto_lib_dir):
++if os.path.isdir(boto_lib_dir):
++ sys.path.insert(0, boto_lib_dir)
++try:
++ import boto
++except:
+ _OutputAndExit('There is no boto library under the gsutil install directory '
+ '(%s).\nThe gsutil command cannot work properly when installed '
+ 'this way.\nPlease re-install gsutil per the installation '
+ 'instructions.' % gsutil_bin_dir)
+-sys.path.insert(0, boto_lib_dir)
+-import boto
+ from boto.exception import BotoClientError
+ from boto.exception import InvalidAclError
+ from boto.exception import InvalidUriError
diff --git a/net-misc/gsutil/gsutil-3.14.ebuild b/net-misc/gsutil/gsutil-3.14.ebuild
new file mode 100644
index 000000000000..ec8a0862af8c
--- /dev/null
+++ b/net-misc/gsutil/gsutil-3.14.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils python multilib
+
+DESCRIPTION="command line tool for interacting with cloud storage services"
+HOMEPAGE="http://code.google.com/p/gsutil/"
+SRC_URI="http://commondatastorage.googleapis.com/pub/${PN}_${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ >=dev-python/boto-2.5.2"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ # use system boto
+ rm -rf boto
+ epatch "${FILESDIR}"/${PN}-system-boto.patch
+
+ # use the custom internal path to avoid polluting python system
+ sed -i \
+ -e "/^gsutil_bin_dir =/s:=.*:= '/usr/$(get_libdir)/${PN}';sys.path.insert(0, gsutil_bin_dir);:" \
+ gsutil || die
+
+ # trim some cruft
+ find gslib third_party -name README -delete
+}
+
+src_install() {
+ dobin gsutil || die
+
+ insinto /usr/$(get_libdir)/${PN}
+ doins -r gslib oauth2_plugin third_party VERSION || die
+
+ # http://code.google.com/p/gsutil/issues/detail?id=96
+ rm "${D}"/usr/$(get_libdir)/${PN}/gslib/commands/test.py || die
+
+ dodoc README
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r cloud{auth,reader}
+ fi
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/$(get_libdir)/${PN}
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/$(get_libdir)/${PN}
+}
diff --git a/net-misc/gsutil/gsutil-3.18.ebuild b/net-misc/gsutil/gsutil-3.18.ebuild
new file mode 100644
index 000000000000..ec8a0862af8c
--- /dev/null
+++ b/net-misc/gsutil/gsutil-3.18.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils python multilib
+
+DESCRIPTION="command line tool for interacting with cloud storage services"
+HOMEPAGE="http://code.google.com/p/gsutil/"
+SRC_URI="http://commondatastorage.googleapis.com/pub/${PN}_${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ >=dev-python/boto-2.5.2"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ # use system boto
+ rm -rf boto
+ epatch "${FILESDIR}"/${PN}-system-boto.patch
+
+ # use the custom internal path to avoid polluting python system
+ sed -i \
+ -e "/^gsutil_bin_dir =/s:=.*:= '/usr/$(get_libdir)/${PN}';sys.path.insert(0, gsutil_bin_dir);:" \
+ gsutil || die
+
+ # trim some cruft
+ find gslib third_party -name README -delete
+}
+
+src_install() {
+ dobin gsutil || die
+
+ insinto /usr/$(get_libdir)/${PN}
+ doins -r gslib oauth2_plugin third_party VERSION || die
+
+ # http://code.google.com/p/gsutil/issues/detail?id=96
+ rm "${D}"/usr/$(get_libdir)/${PN}/gslib/commands/test.py || die
+
+ dodoc README
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r cloud{auth,reader}
+ fi
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/$(get_libdir)/${PN}
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/$(get_libdir)/${PN}
+}
diff --git a/net-misc/gsutil/gsutil-3.21.ebuild b/net-misc/gsutil/gsutil-3.21.ebuild
new file mode 100644
index 000000000000..3fa0150cccc7
--- /dev/null
+++ b/net-misc/gsutil/gsutil-3.21.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils python multilib
+
+DESCRIPTION="command line tool for interacting with cloud storage services"
+HOMEPAGE="http://code.google.com/p/gsutil/"
+SRC_URI="http://commondatastorage.googleapis.com/pub/${PN}_${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ >=dev-python/boto-2.7.0"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ # use system boto
+ rm -rf boto
+ epatch "${FILESDIR}"/${PN}-system-boto.patch
+
+ # trim some cruft
+ find gslib third_party -name README -delete
+}
+
+src_install() {
+ insinto /usr/$(get_libdir)/${PN}
+ doins -r gslib gsutil oauth2_plugin third_party CHECKSUM VERSION || die
+
+ dodir /usr/bin
+ dosym /usr/$(get_libdir)/${PN}/gsutil /usr/bin/gsutil
+ fperms a+x /usr/$(get_libdir)/${PN}/gsutil
+
+ # http://code.google.com/p/gsutil/issues/detail?id=96
+ rm "${D}"/usr/$(get_libdir)/${PN}/gslib/commands/test.py || die
+
+ dodoc README
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r cloud{auth,reader}
+ fi
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/$(get_libdir)/${PN}
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/$(get_libdir)/${PN}
+}
diff --git a/net-misc/gsutil/gsutil-3.37.ebuild b/net-misc/gsutil/gsutil-3.37.ebuild
new file mode 100644
index 000000000000..90c3ee9aa9a5
--- /dev/null
+++ b/net-misc/gsutil/gsutil-3.37.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="command line tool for interacting with cloud storage services"
+HOMEPAGE="https://github.com/GoogleCloudPlatform/gsutil"
+SRC_URI="http://commondatastorage.googleapis.com/pub/${PN}_${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND="${DEPEND}
+ >=dev-python/boto-2.13[${PYTHON_USEDEP}]
+ >=dev-python/crcmod-1.7
+ >=dev-python/httplib2-0.8[${PYTHON_USEDEP}]
+ >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
+ dev-python/google-api-python-client[${PYTHON_USEDEP}]
+ dev-python/python-gflags[${PYTHON_USEDEP}]
+ dev-python/retry-decorator[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/socksipy-1.01[${PYTHON_USEDEP}]
+ "
+
+S=${WORKDIR}/${PN}
+
+DOCS=( README.md CHANGES.md )
+
+PATCHES=(
+ "${FILESDIR}/${P}-use-friendy-version-checks.patch"
+ "${FILESDIR}/${PN}-3.37-drop-http_proxy-clearing.patch"
+)
+
+python_test() {
+ export BOTO_CONFIG=${FILESDIR}/dummy.boto
+ ${PYTHON} gslib/__main__.py test -u || die "tests failed"
+}
diff --git a/net-misc/gsutil/gsutil-3.38.ebuild b/net-misc/gsutil/gsutil-3.38.ebuild
new file mode 100644
index 000000000000..fc42b591b48c
--- /dev/null
+++ b/net-misc/gsutil/gsutil-3.38.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="command line tool for interacting with cloud storage services"
+HOMEPAGE="https://github.com/GoogleCloudPlatform/gsutil"
+SRC_URI="http://commondatastorage.googleapis.com/pub/${PN}_${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND="${DEPEND}
+ >=dev-python/boto-2.17[${PYTHON_USEDEP}]
+ >=dev-python/crcmod-1.7
+ >=dev-python/httplib2-0.8[${PYTHON_USEDEP}]
+ >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
+ >=dev-python/google-api-python-client-1.1[${PYTHON_USEDEP}]
+ >=dev-python/python-gflags-2.0[${PYTHON_USEDEP}]
+ >=dev-python/retry-decorator-1.0.0[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/socksipy-1.01[${PYTHON_USEDEP}]
+ "
+
+S=${WORKDIR}/${PN}
+
+DOCS=( README.md CHANGES.md )
+
+PATCHES=(
+ "${FILESDIR}/${P}-use-friendy-version-checks.patch"
+ "${FILESDIR}/${PN}-3.37-drop-http_proxy-clearing.patch"
+)
+
+python_test() {
+ export BOTO_CONFIG=${FILESDIR}/dummy.boto
+ ${PYTHON} gslib/__main__.py test -u || die "tests failed"
+}
diff --git a/net-misc/gsutil/gsutil-3.42.ebuild b/net-misc/gsutil/gsutil-3.42.ebuild
new file mode 100644
index 000000000000..2b79a0472308
--- /dev/null
+++ b/net-misc/gsutil/gsutil-3.42.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="command line tool for interacting with cloud storage services"
+HOMEPAGE="https://github.com/GoogleCloudPlatform/gsutil"
+SRC_URI="http://commondatastorage.googleapis.com/pub/${PN}_${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND="${DEPEND}
+ >=dev-python/boto-2.22.1[${PYTHON_USEDEP}]
+ >=dev-python/crcmod-1.7
+ >=dev-python/httplib2-0.8[${PYTHON_USEDEP}]
+ >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
+ >=dev-python/google-api-python-client-1.1[${PYTHON_USEDEP}]
+ >=dev-python/python-gflags-2.0[${PYTHON_USEDEP}]
+ >=dev-python/retry-decorator-1.0.0[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/socksipy-1.01[${PYTHON_USEDEP}]
+ "
+
+S=${WORKDIR}/${PN}
+
+DOCS=( README.md CHANGES.md )
+
+PATCHES=(
+ "${FILESDIR}/${P}-use-friendy-version-checks.patch"
+ "${FILESDIR}/${PN}-3.37-drop-http_proxy-clearing.patch"
+)
+
+python_test() {
+ export BOTO_CONFIG=${FILESDIR}/dummy.boto
+ ${PYTHON} gslib/__main__.py test -u || die "tests failed"
+}
diff --git a/net-misc/gsutil/gsutil-3.7.ebuild b/net-misc/gsutil/gsutil-3.7.ebuild
new file mode 100644
index 000000000000..f97518340243
--- /dev/null
+++ b/net-misc/gsutil/gsutil-3.7.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils python multilib
+
+DESCRIPTION="command line tool for interacting with cloud storage services"
+HOMEPAGE="http://code.google.com/p/gsutil/"
+SRC_URI="http://commondatastorage.googleapis.com/pub/${PN}_${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ >=dev-python/boto-2.4.0"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ # use system boto
+ rm -rf boto
+ epatch "${FILESDIR}"/${PN}-system-boto.patch
+
+ # use the custom internal path to avoid polluting python system
+ sed -i \
+ -e "/^gsutil_bin_dir =/s:=.*:= '/usr/$(get_libdir)/${PN}';sys.path.insert(0, gsutil_bin_dir);:" \
+ gsutil || die
+
+ # trim some cruft
+ find gslib third_party -name README -delete
+}
+
+src_install() {
+ dobin gsutil || die
+
+ insinto /usr/$(get_libdir)/${PN}
+ doins -r gslib oauth2_plugin third_party VERSION || die
+
+ # http://code.google.com/p/gsutil/issues/detail?id=96
+ rm "${D}"/usr/$(get_libdir)/${PN}/gslib/commands/test.py || die
+
+ dodoc README
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r cloud{auth,reader}
+ fi
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/$(get_libdir)/${PN}
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/$(get_libdir)/${PN}
+}
diff --git a/net-misc/gsutil/gsutil-4.11.ebuild b/net-misc/gsutil/gsutil-4.11.ebuild
new file mode 100644
index 000000000000..a47f3f1fcbe8
--- /dev/null
+++ b/net-misc/gsutil/gsutil-4.11.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="command line tool for interacting with cloud storage services"
+HOMEPAGE="https://github.com/GoogleCloudPlatform/gsutil"
+SRC_URI="http://commondatastorage.googleapis.com/pub/${PN}_${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND="${DEPEND}
+ >=dev-python/boto-2.30.0[${PYTHON_USEDEP}]
+ >=dev-python/crcmod-1.7[${PYTHON_USEDEP}]
+ >=dev-python/httplib2-0.8[${PYTHON_USEDEP}]
+ >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
+ >=dev-python/gcs-oauth2-boto-plugin-1.8[${PYTHON_USEDEP}]
+ >=dev-python/oauth2client-1.4.4[${PYTHON_USEDEP}]
+ >=dev-python/python-gflags-2.0[${PYTHON_USEDEP}]
+ >=dev-python/retry-decorator-1.0.0[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/six-1.8.0[${PYTHON_USEDEP}]
+ >=dev-python/socksipy-1.01[${PYTHON_USEDEP}]"
+
+S=${WORKDIR}/${PN}
+
+DOCS=( README.md CHANGES.md )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.7-use-friendy-version-checks.patch"
+)
+
+python_test() {
+ export BOTO_CONFIG=${FILESDIR}/dummy.boto
+ ${PYTHON} gslib/__main__.py test -u || die "tests failed"
+}
diff --git a/net-misc/gsutil/gsutil-4.12.ebuild b/net-misc/gsutil/gsutil-4.12.ebuild
new file mode 100644
index 000000000000..43f920e0b7e7
--- /dev/null
+++ b/net-misc/gsutil/gsutil-4.12.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="command line tool for interacting with cloud storage services"
+HOMEPAGE="https://github.com/GoogleCloudPlatform/gsutil"
+SRC_URI="http://commondatastorage.googleapis.com/pub/${PN}_${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND="${DEPEND}
+ >=dev-python/boto-2.30.0[${PYTHON_USEDEP}]
+ >=dev-python/crcmod-1.7[${PYTHON_USEDEP}]
+ >=dev-python/httplib2-0.8[${PYTHON_USEDEP}]
+ >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
+ >=dev-python/gcs-oauth2-boto-plugin-1.9[${PYTHON_USEDEP}]
+ >=dev-python/google-apitools-0.4[${PYTHON_USEDEP}]
+ >=dev-python/oauth2client-1.4.4[${PYTHON_USEDEP}]
+ >=dev-python/protorpc-0.10.0[${PYTHON_USEDEP}]
+ >=dev-python/python-gflags-2.0[${PYTHON_USEDEP}]
+ >=dev-python/retry-decorator-1.0.0[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/six-1.8.0[${PYTHON_USEDEP}]
+ >=dev-python/socksipy-1.01[${PYTHON_USEDEP}]"
+
+S=${WORKDIR}/${PN}
+
+DOCS=( README.md CHANGES.md )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.7-use-friendy-version-checks.patch"
+)
+
+python_test() {
+ export BOTO_CONFIG=${FILESDIR}/dummy.boto
+ ${PYTHON} gslib/__main__.py test -u || die "tests failed"
+}
diff --git a/net-misc/gsutil/gsutil-4.13.ebuild b/net-misc/gsutil/gsutil-4.13.ebuild
new file mode 100644
index 000000000000..758792cbb9a1
--- /dev/null
+++ b/net-misc/gsutil/gsutil-4.13.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="command line tool for interacting with cloud storage services"
+HOMEPAGE="https://github.com/GoogleCloudPlatform/gsutil"
+SRC_URI="http://commondatastorage.googleapis.com/pub/${PN}_${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+RDEPEND="${PYTHON_DEPS}
+ >=dev-python/boto-2.38.0[${PYTHON_USEDEP}]
+ >=dev-python/crcmod-1.7[${PYTHON_USEDEP}]
+ >=dev-python/httplib2-0.8[${PYTHON_USEDEP}]
+ >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
+ >=dev-python/gcs-oauth2-boto-plugin-1.9[${PYTHON_USEDEP}]
+ >=dev-python/google-apitools-0.4.8[${PYTHON_USEDEP}]
+ >=dev-python/oauth2client-1.4.11[${PYTHON_USEDEP}]
+ >=dev-python/protorpc-0.10.0[${PYTHON_USEDEP}]
+ >=dev-python/python-gflags-2.0[${PYTHON_USEDEP}]
+ >=dev-python/retry-decorator-1.0.0[${PYTHON_USEDEP}]
+ >=dev-python/six-1.8.0[${PYTHON_USEDEP}]
+ >=dev-python/socksipy-1.01[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]"
+
+S=${WORKDIR}/${PN}
+
+DOCS=( README.md CHANGES.md )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.13-use-friendy-version-checks.patch"
+)
+
+python_test() {
+ export BOTO_CONFIG=${FILESDIR}/dummy.boto
+ ${PYTHON} gslib/__main__.py test -u || die "tests failed"
+}
diff --git a/net-misc/gsutil/gsutil-4.4.ebuild b/net-misc/gsutil/gsutil-4.4.ebuild
new file mode 100644
index 000000000000..ff88ecc2e132
--- /dev/null
+++ b/net-misc/gsutil/gsutil-4.4.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="command line tool for interacting with cloud storage services"
+HOMEPAGE="https://github.com/GoogleCloudPlatform/gsutil"
+SRC_URI="http://commondatastorage.googleapis.com/pub/${PN}_${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND="${DEPEND}
+ >=dev-python/boto-2.30.0[${PYTHON_USEDEP}]
+ >=dev-python/crcmod-1.7[${PYTHON_USEDEP}]
+ >=dev-python/httplib2-0.8[${PYTHON_USEDEP}]
+ >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
+ >=dev-python/gcs-oauth2-boto-plugin-1.7[${PYTHON_USEDEP}]
+ >=dev-python/google-api-python-client-1.1[${PYTHON_USEDEP}]
+ >=dev-python/python-gflags-2.0[${PYTHON_USEDEP}]
+ >=dev-python/retry-decorator-1.0.0[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/socksipy-1.01[${PYTHON_USEDEP}]"
+
+S=${WORKDIR}/${PN}
+
+DOCS=( README.md CHANGES.md )
+
+PATCHES=(
+ "${FILESDIR}/${P}-use-friendy-version-checks.patch"
+ "${FILESDIR}/${PN}-3.37-drop-http_proxy-clearing.patch"
+)
+
+python_test() {
+ export BOTO_CONFIG=${FILESDIR}/dummy.boto
+ ${PYTHON} gslib/__main__.py test -u || die "tests failed"
+}
diff --git a/net-misc/gsutil/gsutil-4.5.ebuild b/net-misc/gsutil/gsutil-4.5.ebuild
new file mode 100644
index 000000000000..f36aa22a7213
--- /dev/null
+++ b/net-misc/gsutil/gsutil-4.5.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="command line tool for interacting with cloud storage services"
+HOMEPAGE="https://github.com/GoogleCloudPlatform/gsutil"
+SRC_URI="http://commondatastorage.googleapis.com/pub/${PN}_${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND="${DEPEND}
+ >=dev-python/boto-2.30.0[${PYTHON_USEDEP}]
+ >=dev-python/crcmod-1.7[${PYTHON_USEDEP}]
+ >=dev-python/httplib2-0.8[${PYTHON_USEDEP}]
+ >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
+ >=dev-python/gcs-oauth2-boto-plugin-1.7[${PYTHON_USEDEP}]
+ >=dev-python/google-api-python-client-1.1[${PYTHON_USEDEP}]
+ >=dev-python/python-gflags-2.0[${PYTHON_USEDEP}]
+ >=dev-python/retry-decorator-1.0.0[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/socksipy-1.01[${PYTHON_USEDEP}]"
+
+S=${WORKDIR}/${PN}
+
+DOCS=( README.md CHANGES.md )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.4-use-friendy-version-checks.patch"
+ "${FILESDIR}/${PN}-3.37-drop-http_proxy-clearing.patch"
+)
+
+python_test() {
+ export BOTO_CONFIG=${FILESDIR}/dummy.boto
+ ${PYTHON} gslib/__main__.py test -u || die "tests failed"
+}
diff --git a/net-misc/gsutil/gsutil-4.6.ebuild b/net-misc/gsutil/gsutil-4.6.ebuild
new file mode 100644
index 000000000000..98b16fc8e724
--- /dev/null
+++ b/net-misc/gsutil/gsutil-4.6.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="command line tool for interacting with cloud storage services"
+HOMEPAGE="https://github.com/GoogleCloudPlatform/gsutil"
+SRC_URI="http://commondatastorage.googleapis.com/pub/${PN}_${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND="${DEPEND}
+ >=dev-python/boto-2.30.0[${PYTHON_USEDEP}]
+ >=dev-python/crcmod-1.7[${PYTHON_USEDEP}]
+ >=dev-python/httplib2-0.8[${PYTHON_USEDEP}]
+ >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
+ >=dev-python/gcs-oauth2-boto-plugin-1.8[${PYTHON_USEDEP}]
+ >=dev-python/google-api-python-client-1.1[${PYTHON_USEDEP}]
+ >=dev-python/python-gflags-2.0[${PYTHON_USEDEP}]
+ >=dev-python/retry-decorator-1.0.0[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/socksipy-1.01[${PYTHON_USEDEP}]"
+
+S=${WORKDIR}/${PN}
+
+DOCS=( README.md CHANGES.md )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.4-use-friendy-version-checks.patch"
+ "${FILESDIR}/${PN}-3.37-drop-http_proxy-clearing.patch"
+)
+
+python_test() {
+ export BOTO_CONFIG=${FILESDIR}/dummy.boto
+ ${PYTHON} gslib/__main__.py test -u || die "tests failed"
+}
diff --git a/net-misc/gsutil/gsutil-4.7.ebuild b/net-misc/gsutil/gsutil-4.7.ebuild
new file mode 100644
index 000000000000..e19170a0fde1
--- /dev/null
+++ b/net-misc/gsutil/gsutil-4.7.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="command line tool for interacting with cloud storage services"
+HOMEPAGE="https://github.com/GoogleCloudPlatform/gsutil"
+SRC_URI="http://commondatastorage.googleapis.com/pub/${PN}_${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND="${DEPEND}
+ >=dev-python/boto-2.30.0[${PYTHON_USEDEP}]
+ >=dev-python/crcmod-1.7[${PYTHON_USEDEP}]
+ >=dev-python/httplib2-0.8[${PYTHON_USEDEP}]
+ >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
+ >=dev-python/gcs-oauth2-boto-plugin-1.8[${PYTHON_USEDEP}]
+ >=dev-python/oauth2client-1.4.1[${PYTHON_USEDEP}]
+ >=dev-python/python-gflags-2.0[${PYTHON_USEDEP}]
+ >=dev-python/retry-decorator-1.0.0[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/six-1.8.0[${PYTHON_USEDEP}]
+ >=dev-python/socksipy-1.01[${PYTHON_USEDEP}]"
+
+S=${WORKDIR}/${PN}
+
+DOCS=( README.md CHANGES.md )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.7-use-friendy-version-checks.patch"
+ "${FILESDIR}/${PN}-4.7-drop-http_proxy-clearing.patch"
+)
+
+python_test() {
+ export BOTO_CONFIG=${FILESDIR}/dummy.boto
+ ${PYTHON} gslib/__main__.py test -u || die "tests failed"
+}
diff --git a/net-misc/gsutil/gsutil-4.8.ebuild b/net-misc/gsutil/gsutil-4.8.ebuild
new file mode 100644
index 000000000000..a47f3f1fcbe8
--- /dev/null
+++ b/net-misc/gsutil/gsutil-4.8.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="command line tool for interacting with cloud storage services"
+HOMEPAGE="https://github.com/GoogleCloudPlatform/gsutil"
+SRC_URI="http://commondatastorage.googleapis.com/pub/${PN}_${PV}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND="${DEPEND}
+ >=dev-python/boto-2.30.0[${PYTHON_USEDEP}]
+ >=dev-python/crcmod-1.7[${PYTHON_USEDEP}]
+ >=dev-python/httplib2-0.8[${PYTHON_USEDEP}]
+ >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
+ >=dev-python/gcs-oauth2-boto-plugin-1.8[${PYTHON_USEDEP}]
+ >=dev-python/oauth2client-1.4.4[${PYTHON_USEDEP}]
+ >=dev-python/python-gflags-2.0[${PYTHON_USEDEP}]
+ >=dev-python/retry-decorator-1.0.0[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/six-1.8.0[${PYTHON_USEDEP}]
+ >=dev-python/socksipy-1.01[${PYTHON_USEDEP}]"
+
+S=${WORKDIR}/${PN}
+
+DOCS=( README.md CHANGES.md )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.7-use-friendy-version-checks.patch"
+)
+
+python_test() {
+ export BOTO_CONFIG=${FILESDIR}/dummy.boto
+ ${PYTHON} gslib/__main__.py test -u || die "tests failed"
+}
diff --git a/net-misc/gsutil/metadata.xml b/net-misc/gsutil/metadata.xml
new file mode 100644
index 000000000000..cae2a6d112df
--- /dev/null
+++ b/net-misc/gsutil/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>vapier@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">gsutil</remote-id>
+ <remote-id type="github">GoogleCloudPlatform/gsutil</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/gtkvncviewer/Manifest b/net-misc/gtkvncviewer/Manifest
new file mode 100644
index 000000000000..aea79c4a426d
--- /dev/null
+++ b/net-misc/gtkvncviewer/Manifest
@@ -0,0 +1 @@
+DIST gtkvncviewer-0.4.tar.gz 79464 SHA256 e439fd92d445e87b8e450ac0b8fe3d555ceac579daf29028a36b551f231bf708
diff --git a/net-misc/gtkvncviewer/gtkvncviewer-0.4.ebuild b/net-misc/gtkvncviewer/gtkvncviewer-0.4.ebuild
new file mode 100644
index 000000000000..d09b94fd90bc
--- /dev/null
+++ b/net-misc/gtkvncviewer/gtkvncviewer-0.4.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+PYTHON_DEPEND="2"
+
+inherit eutils fdo-mime python
+
+DESCRIPTION="A small GTK tool to connect to VNC servers"
+HOMEPAGE="https://launchpad.net/gtkvncviewer"
+SRC_URI="https://launchpad.net/${PN}/trunk/0.4/+download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-python/gconf-python:2
+ dev-python/gnome-keyring-python
+ dev-python/pygtk:2
+ net-libs/gtk-vnc[python]"
+DEPEND="${RDEPEND}"
+
+src_install() {
+ dodir /usr/share/gtkvncviewer
+ domenu data/gtkvncviewer.desktop
+ rm -f data/gtkvncviewer.desktop
+ insinto /usr/share/gtkvncviewer
+ doins -r locale data gtkvncviewer.py
+ doman gtkvncviewer.1
+ dodoc AUTHORS CHANGELOG TODO
+ make_wrapper gtkvncviewer "/usr/bin/python2 ${PN}.py" "/usr/share/${PN}"
+ validate_desktop_entries
+}
+
+pkg_postinst() { fdo-mime_desktop_database_update; }
+pkg_postrm() { fdo-mime_desktop_database_update; }
diff --git a/net-misc/gtkvncviewer/metadata.xml b/net-misc/gtkvncviewer/metadata.xml
new file mode 100644
index 000000000000..eeff86f130f0
--- /dev/null
+++ b/net-misc/gtkvncviewer/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>angelos@gentoo.org</email>
+ <name>Christoph Mende</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="launchpad">gtkvncviewer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/guacamole-server/Manifest b/net-misc/guacamole-server/Manifest
new file mode 100644
index 000000000000..aebe61f34b86
--- /dev/null
+++ b/net-misc/guacamole-server/Manifest
@@ -0,0 +1,5 @@
+DIST guacamole-server-0.8.3.tar.gz 515611 SHA256 e958291ca967ce05d9e5e55d884b25725330fff6c067cbde4bbb7b039fb8db09 SHA512 c61428e83104fce004d99c83b31a195ef5dd01d601f5e5e15ab03530401fb9e23a8a6927b39a8854b14da7ab90407d9f56190ffc7649ff52501c59055d9a145a WHIRLPOOL 78ce02e7ad87120ca31be56a98fbeca71ab5b0725b7a456b70a5f8cef8d1d98b4b7fbcdc4bba4dd1f43da897118e3532ea5d1f4458864ef7ac6081942074542f
+DIST guacamole-server-0.9.0.tar.gz 556465 SHA256 289cb1ea0261396e9ede6aa0d2ac8d80b9ec03a124cb0669802f7e8556e21a58 SHA512 73942eecdeb8204a32e0d6ef0b92c2b23dea0b4a0e82693c05a81539319a7ff9db9ac897822f9ca33fb1913cec25058a16c67ec10d91778a3f1cf9615add5f0a WHIRLPOOL abb9c1d3fa144ae817fd87f42a1f4bfc69e9c6c3f41bac5f76b06b46dc8087d279a061b81097c3dad3c6ed5b528d8b400d8f8b3d3a4338189d401f6dc1845799
+DIST guacamole-server-0.9.2.tar.gz 595062 SHA256 b6e26751023082b6f0380323f05b8b50e71bcf4c1421c3118237b5a8df22660d SHA512 ed01bcbfc0612a1b05434cc5c412fbed6f877713049418aa25a577e9e020bd6abddeab4d31a50b5b4a6785b8c79f0625dd90181a643913bd813cbbba3a24bf6c WHIRLPOOL 6eac4e63cfabcedc2d31ed9c2063c6a0f0293dc0a9769e70bbf785d8236e5139caec5d255f9d2094220aca37eb2f96677223de6351a6c818141daf74e6b36185
+DIST guacamole-server-0.9.3.tar.gz 614640 SHA256 545e22401bbe62734c02577331c52e54dddf14dd950844d2ccc5aad318c16076 SHA512 eb296f17b27bc14633b511ce6cbe0025e18ea24e3b9b3e132b103de2071a9f18b64d7ced8f20bea1ab8f65755a047e98d670d522f4a5b4ec73e5696ecfb7d948 WHIRLPOOL db2f8f4d0839de9fa82bd0aeb047ed33468f817c0ee094388c7fb587ce044b586a097de94ac2e0e997bb757f31e6f4927e3b1d059f0caab6b7177ca37b5717a8
+DIST guacamole-server-0.9.7.tar.gz 639630 SHA256 285f367d89ee51981db84b00698b05b3d9ba5de2fb2922115c9e38d2b9b88d09 SHA512 c9ef2df6d0724c19e61b3f8913e94ff7c39f17e3beca0bd2eab1648e3c96d4b248bef9bc09b47fd8a4da6b994aea9df94e442286ce0fa3881d5e44b4923b1b14 WHIRLPOOL c7f2213b92e6ca40b93a251a72698229c7e34fbfaf00006b372910d7f2456c0cf6ccf75f8d89f136c41b61cd41ea492c52a14e970ff5bc2231fe826584c8d723
diff --git a/net-misc/guacamole-server/files/guacd b/net-misc/guacamole-server/files/guacd
new file mode 100644
index 000000000000..a38e3cbeb31d
--- /dev/null
+++ b/net-misc/guacamole-server/files/guacd
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DAEMON="/usr/sbin/guacd"
+PIDFILE="/run/guacd/guacd"
+
+depend() {
+ use net
+}
+
+start() {
+ checkpath -q -d -m 0755 -o guacd:guacd /run/guacd/
+ ebegin "Starting guacd"
+ start-stop-daemon --start --user guacd:guacd --exec "${DAEMON}" -- -p "${PIDFILE}"
+ eend $? "Failed to start guacd"
+}
+
+stop() {
+ ebegin "Stopping guacd"
+ start-stop-daemon --stop --pidfile "${PIDFILE}"
+ eend $? "Failed to stop guacd"
+}
diff --git a/net-misc/guacamole-server/files/guacd.service b/net-misc/guacamole-server/files/guacd.service
new file mode 100644
index 000000000000..547dc030259d
--- /dev/null
+++ b/net-misc/guacamole-server/files/guacd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Guacamole proxy daemon
+Documentation=man:guacd(8)
+
+[Service]
+ExecStart=/usr/sbin/guacd -f
+StandardOutput=null
+User=guacd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/guacamole-server/guacamole-server-0.8.3.ebuild b/net-misc/guacamole-server/guacamole-server-0.8.3.ebuild
new file mode 100644
index 000000000000..e7dc62387b17
--- /dev/null
+++ b/net-misc/guacamole-server/guacamole-server-0.8.3.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+DESCRIPTION="This is the proxy-daemon used by www-apps/guacamole"
+
+HOMEPAGE="http://guacamole.sourceforge.net/"
+SRC_URI="mirror://sourceforge/guacamole/${P}.tar.gz"
+
+LICENSE="AGPL-3"
+
+SLOT="0"
+
+KEYWORDS="~x86"
+
+IUSE="rdesktop vnc ssh pulseaudio vorbis"
+
+DEPEND="x11-libs/cairo
+ ssh? ( x11-libs/pango
+ net-libs/libssh )
+ rdesktop? ( >=net-misc/freerdp-1.1.0_beta1_p20130710 )
+ vnc? ( net-libs/libvncserver
+ pulseaudio? ( media-sound/pulseaudio ) )
+ vorbis? ( media-libs/libvorbis )"
+
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ econf --with-init-dir=/etc/init.d
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+}
diff --git a/net-misc/guacamole-server/guacamole-server-0.9.0.ebuild b/net-misc/guacamole-server/guacamole-server-0.9.0.ebuild
new file mode 100644
index 000000000000..c430e7f287dd
--- /dev/null
+++ b/net-misc/guacamole-server/guacamole-server-0.9.0.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 eutils
+DESCRIPTION="This is the proxy-daemon used by www-apps/guacamole"
+
+HOMEPAGE="http://guacamole.sourceforge.net/"
+SRC_URI="mirror://sourceforge/guacamole/${P}.tar.gz"
+
+LICENSE="AGPL-3"
+
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+
+IUSE="rdesktop vnc ssh pulseaudio vorbis"
+
+DEPEND="x11-libs/cairo
+ ssh? ( x11-libs/pango
+ net-libs/libssh2 )
+ rdesktop? ( >=net-misc/freerdp-1.1.0_beta1_p20130710 )
+ vnc? ( net-libs/libvncserver
+ pulseaudio? ( media-sound/pulseaudio ) )
+ vorbis? ( media-libs/libvorbis )"
+
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ econf --with-init-dir=/etc/init.d
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+}
diff --git a/net-misc/guacamole-server/guacamole-server-0.9.2.ebuild b/net-misc/guacamole-server/guacamole-server-0.9.2.ebuild
new file mode 100644
index 000000000000..0328de5cedc0
--- /dev/null
+++ b/net-misc/guacamole-server/guacamole-server-0.9.2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+DESCRIPTION="This is the proxy-daemon used by www-apps/guacamole"
+
+HOMEPAGE="http://guac-dev.org/"
+SRC_URI="mirror://sourceforge/guacamole/${P}.tar.gz"
+
+LICENSE="AGPL-3"
+
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+
+IUSE="rdesktop vnc ssh pulseaudio vorbis telnet"
+
+DEPEND="x11-libs/cairo
+ dev-libs/ossp-uuid
+ ssh? ( x11-libs/pango
+ net-libs/libssh2 )
+ rdesktop? ( >=net-misc/freerdp-1.1.0_beta1_p20130710 )
+ vnc? ( net-libs/libvncserver
+ pulseaudio? ( media-sound/pulseaudio ) )
+ vorbis? ( media-libs/libvorbis )
+ telnet? ( net-libs/libtelnet )"
+
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ econf --with-init-dir=/etc/init.d
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+}
diff --git a/net-misc/guacamole-server/guacamole-server-0.9.3.ebuild b/net-misc/guacamole-server/guacamole-server-0.9.3.ebuild
new file mode 100644
index 000000000000..7354e14a1275
--- /dev/null
+++ b/net-misc/guacamole-server/guacamole-server-0.9.3.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+DESCRIPTION="This is the proxy-daemon used by www-apps/guacamole"
+
+HOMEPAGE="http://guac-dev.org/"
+SRC_URI="mirror://sourceforge/guacamole/${P}.tar.gz"
+
+LICENSE="AGPL-3"
+
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+
+IUSE="rdesktop vnc ssh pulseaudio vorbis telnet pango terminal ssl"
+
+DEPEND="x11-libs/cairo
+ dev-libs/ossp-uuid
+ ssh? ( x11-libs/pango
+ net-libs/libssh2 )
+ rdesktop? ( >=net-misc/freerdp-1.1.0_beta1_p20130710
+ <net-misc/freerdp-9999 )
+ vnc? ( net-libs/libvncserver
+ pulseaudio? ( media-sound/pulseaudio ) )
+ vorbis? ( media-libs/libvorbis )
+ telnet? ( net-libs/libtelnet )
+ pango? ( x11-libs/pango )
+ ssl? ( dev-libs/openssl )"
+
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ econf --with-init-dir=/etc/init.d \
+ $(use ssh && echo "--with-ssh" || echo "--without-ssh") \
+ $(use rdesktop && echo "--with-rdp" || echo "--without-rdp") \
+ $(use vnc && echo "--with-vnc" || echo "--without-vnc") \
+ $(use pulseaudio && echo "--with-pulse" || echo "--without-pulse") \
+ $(use vorbis && echo "--with-vorbis" || echo "--without-vorbis") \
+ $(use telnet && echo "--with-telnet" || echo "--without-telnet") \
+ $(use pango && echo "--with-pango" || echo "--without-pango") \
+ $(use terminal && echo "--with-terminal" || echo "--without-terminal")
+ $(use ssl && echo "--with-ssl" || echo "--without-ssl")
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+}
diff --git a/net-misc/guacamole-server/guacamole-server-0.9.7.ebuild b/net-misc/guacamole-server/guacamole-server-0.9.7.ebuild
new file mode 100644
index 000000000000..d093bf36ed71
--- /dev/null
+++ b/net-misc/guacamole-server/guacamole-server-0.9.7.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd user
+DESCRIPTION="This is the proxy-daemon used by www-apps/guacamole"
+
+HOMEPAGE="http://guac-dev.org/"
+SRC_URI="mirror://sourceforge/guacamole/${P}.tar.gz"
+
+LICENSE="MIT"
+
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+
+IUSE="rdesktop vnc ssh pulseaudio vorbis telnet ssl"
+
+DEPEND="x11-libs/cairo
+ media-libs/libpng:*
+ dev-libs/ossp-uuid
+ rdesktop? ( <net-misc/freerdp-1.1.0_beta1_p20150312 )
+ ssh? ( x11-libs/pango
+ net-libs/libssh2 )
+ telnet? ( net-libs/libtelnet
+ x11-libs/pango )
+ vnc? ( net-libs/libvncserver
+ pulseaudio? ( media-sound/pulseaudio ) )
+ ssl? ( dev-libs/openssl:* )
+ vorbis? ( media-libs/libvorbis )"
+
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ local myconf="--without-terminal --without-pango"
+ if use ssh || use telnet; then
+ myconf="--with-terminal --with-pango"
+ fi
+
+ econf $myconf \
+ $(use_with ssh) \
+ $(use_with rdesktop rdp) \
+ $(use_with vnc) \
+ $(use_with pulseaudio pulse) \
+ $(use_with vorbis) \
+ $(use_with telnet) \
+ $(use_with ssl)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ doinitd "${FILESDIR}/guacd"
+ systemd_dounit "${FILESDIR}/guacd.service"
+}
+
+pkg_postinst() {
+ enewgroup guacd
+ enewuser guacd -1 -1 -1 guacd
+}
diff --git a/net-misc/guacamole-server/metadata.xml b/net-misc/guacamole-server/metadata.xml
new file mode 100644
index 000000000000..6a85e12515bf
--- /dev/null
+++ b/net-misc/guacamole-server/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>nativemad@gentoo.org</email>
+ <name>Andreas Schuerch</name>
+ </maintainer>
+ <longdescription>
+ This is the proxy-daemon for vnc, ssh and rdp connections used by www-apps/guacamole.
+ </longdescription>
+ <use>
+ <flag name="ssh">enable support for ssh connections</flag>
+ <flag name="telnet">enable support for telnet connections</flag>
+ <flag name="terminal">enable support for terminal sessions</flag>
+ <flag name="pango">enable pango rendering</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">guacamole</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/guidedog/Manifest b/net-misc/guidedog/Manifest
new file mode 100644
index 000000000000..db7e8cd38150
--- /dev/null
+++ b/net-misc/guidedog/Manifest
@@ -0,0 +1 @@
+DIST guidedog-1.1.tar.bz2 108059 SHA256 1ce34e72add7fcc75a1a4e743a6799e1a61d6bdbf52ad8f0d1bd8d9916a638ad SHA512 ae9820b59154311c216aec3f7b767539ea6d35ac712d9205142de29d9bb770ddc87fd8c3ae91b563556e0517ca50bfa0198191bd329f4af95beda3253510badf WHIRLPOOL 119b9b834ea0b0b703fbca229a9f1ff8a49ed7685a1991e6cf7a4d1490559b6990dd8c9cf7023e87a88bb7fb4fbabe448f1565b5c46a0b2d836e012f455a6948
diff --git a/net-misc/guidedog/guidedog-1.1-r1.ebuild b/net-misc/guidedog/guidedog-1.1-r1.ebuild
new file mode 100644
index 000000000000..8270e7d95105
--- /dev/null
+++ b/net-misc/guidedog/guidedog-1.1-r1.ebuild
@@ -0,0 +1,45 @@
+# 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-single-r1 kde4-base
+
+DESCRIPTION="A network/routing configuration utility for KDE 4"
+HOMEPAGE="http://www.simonzone.com/software/guidedog/"
+SRC_URI="http://www.simonzone.com/software/guidedog/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="4"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="debug"
+
+DEPEND="
+ ${PYTHON_DEPS}
+ dev-python/PyQt4[${PYTHON_USEDEP}]
+ $(add_kdebase_dep pykde4 "${PYTHON_USEDEP}")
+"
+RDEPEND="${DEPEND}
+ net-firewall/iptables
+"
+
+DOCS=( AUTHORS ChangeLog README TODO )
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+ kde4-base_pkg_setup
+}
+
+src_prepare() {
+ sed -e 's/python2.5/python/' -i src/sealed.py || die
+ python_fix_shebang src
+
+ kde4-base_src_prepare
+}
+
+src_install() {
+ kde4-base_src_install
+ rm -f "${ED}"usr/share/apps/guidedog/*.pyc
+}
diff --git a/net-misc/guidedog/metadata.xml b/net-misc/guidedog/metadata.xml
new file mode 100644
index 000000000000..8d1e86a9cefb
--- /dev/null
+++ b/net-misc/guidedog/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-misc/gupnp-tools/Manifest b/net-misc/gupnp-tools/Manifest
new file mode 100644
index 000000000000..af0381ab7c57
--- /dev/null
+++ b/net-misc/gupnp-tools/Manifest
@@ -0,0 +1,2 @@
+DIST gupnp-tools-0.8.10.tar.xz 487716 SHA256 592c53289ff1cd70e676405c56ca87b28d2da37a385d34a3bb9b944ba9108d17 SHA512 d6de9ef5700e1e783a4300317874a362f0d3ca475778a118acf00af4f9204a5d80b461a10407b47031025ddd8e6070ee372efc7e989ad2bf563d896abf10a362 WHIRLPOOL 197edcb39f918c0c13d3a9cda9024bbbe30572b226a25d80fc95c732eca6fe423615aa1169096ea23043bb4e6d17ac50e04a523f34ddad75d5759effb69c55b7
+DIST gupnp-tools-0.8.9.tar.xz 479616 SHA256 c0c3c7a6eacfeb83aa6c5acd5e2f48e1c12da6fb45cac14a972961d7918e8072 SHA512 2ca7a75f2019fc8ae84e477c3bed727913bdd4d00c27a8eb5d64afd47521b5f73d2c24564e757319cdb7c188bc6e27b7e22c9b08b5dbe74a7416dae0b029c073 WHIRLPOOL 355604537216ba791a91be9c2179e51b14cd56e97f2238479793ba86d7fd001ed4b370f79bda3485bc6216d0d23c77b902416604cf7005c01ff0b73f47876e46
diff --git a/net-misc/gupnp-tools/gupnp-tools-0.8.10.ebuild b/net-misc/gupnp-tools/gupnp-tools-0.8.10.ebuild
new file mode 100644
index 000000000000..f685f66d564e
--- /dev/null
+++ b/net-misc/gupnp-tools/gupnp-tools-0.8.10.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2
+
+DESCRIPTION="Free replacements of Intel UPnP tools that use GUPnP"
+HOMEPAGE="http://gupnp.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+RDEPEND="
+ >=dev-libs/glib-2.24:2
+ >=dev-libs/libxml2-2.4:2
+ >=net-libs/gssdp-0.13.3
+ >=net-libs/gupnp-0.20.8
+ >=net-libs/gupnp-av-0.5.5
+ net-libs/libsoup:2.4
+ sys-apps/util-linux
+ >=x11-libs/gtk+-3.10:3
+ >=x11-libs/gtksourceview-3.2:3.0
+"
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.40.6
+ sys-devel/gettext
+ virtual/pkgconfig
+"
diff --git a/net-misc/gupnp-tools/gupnp-tools-0.8.9.ebuild b/net-misc/gupnp-tools/gupnp-tools-0.8.9.ebuild
new file mode 100644
index 000000000000..9254a8ae65ae
--- /dev/null
+++ b/net-misc/gupnp-tools/gupnp-tools-0.8.9.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2
+
+DESCRIPTION="Free replacements of Intel UPnP tools that use GUPnP"
+HOMEPAGE="http://gupnp.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+RDEPEND="
+ >=dev-libs/glib-2.24:2
+ >=dev-libs/libxml2-2.4:2
+ >=net-libs/gssdp-0.13.3
+ >=net-libs/gupnp-0.20.8
+ >=net-libs/gupnp-av-0.5.5
+ net-libs/libsoup:2.4
+ sys-apps/util-linux
+ >=x11-libs/gtk+-3:3
+ >=x11-libs/gtksourceview-3.2:3.0
+ >=x11-themes/gnome-icon-theme-2.20
+"
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.40.6
+ sys-devel/gettext
+ virtual/pkgconfig
+"
diff --git a/net-misc/gupnp-tools/metadata.xml b/net-misc/gupnp-tools/metadata.xml
new file mode 100644
index 000000000000..da6fd63d0085
--- /dev/null
+++ b/net-misc/gupnp-tools/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>gnome</herd>
+</pkgmetadata>
diff --git a/net-misc/gvrpcd/Manifest b/net-misc/gvrpcd/Manifest
new file mode 100644
index 000000000000..7c8d8db4f520
--- /dev/null
+++ b/net-misc/gvrpcd/Manifest
@@ -0,0 +1 @@
+DIST gvrpcd-1.3.tar.gz 12066 SHA256 9069e3f97478498b849122c8306fdb76879bb7010fb2a393f815a8e74d3a1209 SHA512 53f2ad4c9ce5ee2bbf72c691ca0ea1d3d2e22dba98c18cdcbecc09c9082427f8ebc83277b4ffc40fd693652c932a4c093512f99157e82d5a3b97bb6f3d8ff444 WHIRLPOOL 4908bbff6aba30ed406483b541702dff03c3387f8415567fd40cb3520ae58608546a826eb688a558866320e8b19a572d9033ae879e52953737bfcc0d659950f4
diff --git a/net-misc/gvrpcd/files/conf.gvrpcd b/net-misc/gvrpcd/files/conf.gvrpcd
new file mode 100644
index 000000000000..f7105124728a
--- /dev/null
+++ b/net-misc/gvrpcd/files/conf.gvrpcd
@@ -0,0 +1,6 @@
+# On which interfaces should listen gvrpcd?
+INTERFACES="eth0"
+
+# Extra arguments. See gvrpcd -h for additional info.
+EXTRA_ARGS=""
+
diff --git a/net-misc/gvrpcd/files/gvrpcd-respect-ldflags.patch b/net-misc/gvrpcd/files/gvrpcd-respect-ldflags.patch
new file mode 100644
index 000000000000..0dc9ca6999aa
--- /dev/null
+++ b/net-misc/gvrpcd/files/gvrpcd-respect-ldflags.patch
@@ -0,0 +1,17 @@
+--- Makefile.orig 2012-09-23 16:31:55.761755338 +0400
++++ Makefile 2012-09-23 16:32:46.159759345 +0400
+@@ -1,4 +1,4 @@
+-LDFLAGS = -lnet
++LIBS = -lnet
+ TGTS = gvrpcd
+
+ all: $(TGTS)
+@@ -8,7 +8,7 @@
+ # gvrpcd.c:(.text+0x228): undefined reference to `libnet_init'
+ # But after moving LDFLAGS to end of the line, works just fine. Sigh...
+ gvrpcd: gvrpcd.c
+- $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
+
+ clean:
+ rm -f $(TGTS) *.o
diff --git a/net-misc/gvrpcd/files/init.gvrpcd b/net-misc/gvrpcd/files/init.gvrpcd
new file mode 100644
index 000000000000..6b82e1d25d63
--- /dev/null
+++ b/net-misc/gvrpcd/files/init.gvrpcd
@@ -0,0 +1,51 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+extra_commands="checkconfig"
+
+checkconfig() {
+ if [ -z "${INTERFACES}" ]; then
+ eerror "INTERFACES should be set. PLease edit /etc/conf.d/gvrpcd"
+ return 1
+ fi
+ if [ ! -d /proc/net/vlan ]; then
+ modprobe 8021q
+ if [ ! -d /proc/net/vlan ]; then
+ eerror "VLAN (802.1q) support is not present in this kernel"
+ return 1
+ fi
+ fi
+}
+
+depend() {
+ need net
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting gvrpcd"
+ for IFNAME in ${INTERFACES}; do
+ ebegin " on interface ${IFNAME}"
+ start-stop-daemon --start \
+ --pidfile /var/run/gvrpcd-${IFNAME}.pid \
+ --exec /usr/sbin/gvrpcd \
+ -- -d -p /var/run/gvrpcd-${IFNAME}.pid \
+ -i "${IFNAME}" ${EXTRA_ARGS}
+ eend $?
+ done
+# eend $?
+}
+
+stop() {
+ ebegin "Stoping gvrpcd"
+ for IFNAME in ${INTERFACES}; do
+ ebegin " on interface ${IFNAME}"
+ start-stop-daemon --stop --exec /usr/sbin/gvrpcd \
+ -p /var/run/gvrpcd-${IFNAME}.pid
+ eend $?
+ done
+# eend $?
+}
+
diff --git a/net-misc/gvrpcd/gvrpcd-1.3.ebuild b/net-misc/gvrpcd/gvrpcd-1.3.ebuild
new file mode 100644
index 000000000000..4f7b50340766
--- /dev/null
+++ b/net-misc/gvrpcd/gvrpcd-1.3.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils linux-info toolchain-funcs
+
+DESCRIPTION="A program for announcing VLANs using GVRP"
+HOMEPAGE="http://sokrates.mimuw.edu.pl/~sebek/gvrpcd/"
+SRC_URI="http://sokrates.mimuw.edu.pl/~sebek/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="net-libs/libnet:1.1"
+RDEPEND="${DEPEND}"
+
+CONFIG_CHECK="~VLAN_8021Q ~VLAN_8021Q_GVRP"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-respect-ldflags.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dosbin gvrpcd
+ dodoc README
+ newinitd "${FILESDIR}"/init.gvrpcd gvrpcd
+ newconfd "${FILESDIR}"/conf.gvrpcd gvrpcd
+}
diff --git a/net-misc/gvrpcd/metadata.xml b/net-misc/gvrpcd/metadata.xml
new file mode 100644
index 000000000000..0a34bcaad2cb
--- /dev/null
+++ b/net-misc/gvrpcd/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>proxy-maintainers</herd>
+ <maintainer>
+ <email>azamat.hackimov@gmail.com</email>
+ <name>Azamat H. Hackimov</name>
+ <description>Maintainer. Assign bugs to him</description>
+ </maintainer>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ <description>Proxy maintainer. CC him on bugs</description>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/gwget/Manifest b/net-misc/gwget/Manifest
new file mode 100644
index 000000000000..8906e60bc1d1
--- /dev/null
+++ b/net-misc/gwget/Manifest
@@ -0,0 +1 @@
+DIST gwget-1.0.4.tar.bz2 444843 SHA256 a65b2b2b3befb6cf34a697a13111b35498a6d63f9a9b048a22b8654f35ef643f SHA512 fab9d5eb4e6fd9d061a51848d7f4df9a44925ef8c74386753a7250c4d92b0c95419a8355acf83611c83838e87d906613659e146132a086ada0bdb69cc2ac13cd WHIRLPOOL 1179c07d3330611573c9cfe61d0380289a4f71a7d1b6bafc02e111cc8964acf4c25c6fa5b0801fca4c4fc7e5b94428ca13745eba9bf9e8836da6b1324acf6fdd
diff --git a/net-misc/gwget/files/gwget-1.0.4-glib-single-include.patch b/net-misc/gwget/files/gwget-1.0.4-glib-single-include.patch
new file mode 100644
index 000000000000..a5cf4ee995bc
--- /dev/null
+++ b/net-misc/gwget/files/gwget-1.0.4-glib-single-include.patch
@@ -0,0 +1,13 @@
+Index: gwget-1.0.4/src/gwget-application.h
+===================================================================
+--- gwget-1.0.4.orig/src/gwget-application.h
++++ gwget-1.0.4/src/gwget-application.h
+@@ -18,7 +18,7 @@
+ #ifndef GWGET_APPLICATION_H
+ #define GWGET_APPLICATION_H
+
+-#include <glib/gerror.h>
++#include <glib.h>
+ #include <glib-object.h>
+
+ G_BEGIN_DECLS
diff --git a/net-misc/gwget/files/gwget-1.0.4-libnotify-0.7.patch b/net-misc/gwget/files/gwget-1.0.4-libnotify-0.7.patch
new file mode 100644
index 000000000000..116cf60b9920
--- /dev/null
+++ b/net-misc/gwget/files/gwget-1.0.4-libnotify-0.7.patch
@@ -0,0 +1,29 @@
+--- src/systray.c
++++ src/systray.c
+@@ -6,6 +6,12 @@
+ #include "systray.h"
+ #include "main_window_cb.h"
+
++#ifdef HAVE_NOTIFY
++#ifndef NOTIFY_CHECK_VERSION
++#define NOTIFY_CHECK_VERSION(x,y,z) 0
++#endif
++#endif
++
+ static GdkPixbuf *systray_load_icon (const gchar *filename);
+ static GdkPixbuf *systray_pixbuf_new_from_file(const gchar *filename);
+ static void systray_clicked(GtkStatusIcon *status_icon,guint button,guint activate_time,gpointer user_data);
+@@ -224,7 +230,12 @@
+ if (!notify_is_initted ())
+ if (!notify_init ("gwget"))
+ return;
+- NotifyNotification *notification = notify_notification_new(primary,secondary,icon_name,NULL);
++ NotifyNotification *notification = notify_notification_new(primary,secondary,icon_name
++#if NOTIFY_CHECK_VERSION (0, 7, 0)
++ );
++#else
++ ,NULL);
++#endif
+ notify_notification_show(notification,NULL);
+ #endif
+
diff --git a/net-misc/gwget/gwget-1.0.4.ebuild b/net-misc/gwget/gwget-1.0.4.ebuild
new file mode 100644
index 000000000000..ea0aefd8ebe7
--- /dev/null
+++ b/net-misc/gwget/gwget-1.0.4.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+GNOME_TARBALL_SUFFIX="bz2"
+
+inherit eutils gnome2
+
+DESCRIPTION="GTK2 WGet Frontend"
+HOMEPAGE="http://gnome.org/projects/gwget/"
+
+KEYWORDS="amd64 ppc x86"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="epiphany libnotify"
+
+# FIXME: dbus should be optional
+# needs patching for linguas/intltool
+RDEPEND="net-misc/wget
+ >=x11-libs/gtk+-2.6:2
+ >=dev-libs/glib-2.16.0:2
+ >=gnome-base/gconf-2:2
+ >=gnome-base/libgnomeui-2
+ >=dev-libs/dbus-glib-0.70
+ epiphany? ( >=www-client/epiphany-1.4 )
+ libnotify? ( >=x11-libs/libnotify-0.2.2 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=dev-util/intltool-0.35.0
+ >=sys-devel/gettext-0.10.4"
+
+pkg_setup() {
+ DOCS="AUTHORS ChangeLog NEWS README THANKS TODO"
+ G2CONF="${G2CONF}
+ $(use_enable epiphany epiphany-extension)
+ $(use_enable libnotify)
+ --disable-static
+ --disable-schemas-install"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libnotify-0.7.patch
+ epatch "${FILESDIR}"/${P}-glib-single-include.patch
+ gnome2_src_prepare
+}
+
+src_install() {
+ gnome2_src_install
+
+ # remove /var/lib, which is created without any reason
+ rm -rf "${D}"/var || die "rm failed"
+}
diff --git a/net-misc/gwget/metadata.xml b/net-misc/gwget/metadata.xml
new file mode 100644
index 000000000000..9359a065c80e
--- /dev/null
+++ b/net-misc/gwget/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>gnome</herd>
+ <longdescription>Gwget2 is a gtk2 front-end for the wget program. Wget is commonly used for retrieving files from the internet, and with an easy to use gtk2 interface, gwget2 brings the utility of wget to the GNOME desktop. Gwget2 supports drag and drop from most gtk2 compatible browsers, as well as the ability to pause and continue downloads over sessions.</longdescription>
+ <longdescription lang="ja">
+Gwget2 は wget プログラムの GTK2 フロントエンドです。wget とはインターネットからファイルを回収するのに一般的に
+使われているもので、gwget2 はGNOME デスクトップへ wget ユーティリティを統合し、GTK2 インターフェイスで使い易くします。
+Gwget2 は GTK2 互換のブラウザからのドラッグ・アンド・ドロップ及びセッションを越えた停止と再開をサポートします。
+</longdescription>
+ <use>
+ <flag name="epiphany">Build epiphany extensions</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/gwhois/Manifest b/net-misc/gwhois/Manifest
new file mode 100644
index 000000000000..4b7caee10f86
--- /dev/null
+++ b/net-misc/gwhois/Manifest
@@ -0,0 +1 @@
+DIST gwhois_20120626.tar.gz 41698 SHA256 8d72f3228ff3f4334d8d9455434fdf38284c3f6db70de815a387f19b28bcefd6 SHA512 8ffaa611389929435f70d3f020e28249e6e3109c4e822e9318b050f52cf09d6934adbb14ab67a6361574ce8645656d5eaf24808dea453f2187352fc2b2513e0e WHIRLPOOL 1aede56813b9eec3e37c425b267b8894fdf14cc3a24af281c325efbe93a9688de72821a15d7e5517d1f1134b02625251ed273298c5d71f862084f6ab3c425c2e
diff --git a/net-misc/gwhois/files/gwhois.xinetd b/net-misc/gwhois/files/gwhois.xinetd
new file mode 100644
index 000000000000..b518371dd9df
--- /dev/null
+++ b/net-misc/gwhois/files/gwhois.xinetd
@@ -0,0 +1,18 @@
+## whois service
+service whois
+{
+ disable = no
+ socket_type = stream
+ protocol = tcp
+ port = 43
+ wait = no
+ user = gwhois
+# group =
+ server = /usr/bin/gwhois
+# server_args =
+ only_from = 0.0.0.0
+ instances = 20
+ log_on_success += PID HOST DURATION USERID EXIT
+ log_on_failure += HOST USERID
+ nice = 5
+}
diff --git a/net-misc/gwhois/gwhois-20120626.ebuild b/net-misc/gwhois/gwhois-20120626.ebuild
new file mode 100644
index 000000000000..d5674a8bb60d
--- /dev/null
+++ b/net-misc/gwhois/gwhois-20120626.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+MY_P=${P/_p/.}
+S="${WORKDIR}/${MY_P}"
+DESCRIPTION="generic whois"
+HOMEPAGE="http://gwhois.de/"
+SRC_URI="http://gwhois.de/gwhois/${MY_P/-/_}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86"
+IUSE=""
+
+RDEPEND="www-client/lynx
+ net-misc/curl
+ dev-lang/perl
+ dev-perl/libwww-perl
+ dev-perl/Net-LibIDN"
+
+src_install() {
+ dodir /etc/gwhois
+ insinto /etc/gwhois
+ doins pattern
+ dobin gwhois
+ doman gwhois.1
+ dodoc TODO "${FILESDIR}/gwhois.xinetd" README.RIPE
+ einfo ""
+ einfo "See included gwhois.xinetd for an example on how to"
+ einfo "use gwhois as a whois proxy using xinetd."
+ einfo "Just copy gwhois.xinetd to /etc/xinetd.d/gwhois"
+ einfo "and reload xinetd."
+ einfo ""
+}
+
+pkg_postinst() {
+ if [ -f /etc/gwhois/pattern.ripe ]; then
+ ewarn ""
+ ewarn "Will move old /etc/gwhois/pattern.ripe to removethis-pattern.ripe"
+ ewarn "as it causes malfunction with this version."
+ ewarn "If you did not modify the file, just remove it."
+ ewarn ""
+ mv /etc/gwhois/pattern.ripe /etc/gwhois/removethis-pattern.ripe
+ fi
+}
diff --git a/net-misc/gwhois/metadata.xml b/net-misc/gwhois/metadata.xml
new file mode 100644
index 000000000000..12152959d0ab
--- /dev/null
+++ b/net-misc/gwhois/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>wschlich@gentoo.org</email>
+ <name>Wolfram Schlich</name>
+ <description>Primary maintainer</description>
+</maintainer>
+<longdescription>
+gwhois is a generic whois client which can be used as a commandline
+whois client or as a whois proxy service using (x)inetd
+</longdescription>
+<longdescription lang="ja">
+gwhois は (x)inetd 経由のプロクシ・サービスとして利用できるコマンド
+ライン操作の一般的 whois クライアントです。
+</longdescription>
+</pkgmetadata>
diff --git a/net-misc/hashcash/Manifest b/net-misc/hashcash/Manifest
new file mode 100644
index 000000000000..a0d23f948e4a
--- /dev/null
+++ b/net-misc/hashcash/Manifest
@@ -0,0 +1 @@
+DIST hashcash-1.22.tgz 195193 RMD160 60037d7feebb6ba3d57c900a811a46580bd567be SHA1 0fa03c9f266026e505c0ab7b671ad93aef9310de SHA256 0192f12d41ce4848e60384398c5ff83579b55710601c7bffe6c88bc56b547896
diff --git a/net-misc/hashcash/hashcash-1.22-r1.ebuild b/net-misc/hashcash/hashcash-1.22-r1.ebuild
new file mode 100644
index 000000000000..b3af4c4ad480
--- /dev/null
+++ b/net-misc/hashcash/hashcash-1.22-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+IUSE=""
+DESCRIPTION="Utility to generate hashcash tokens"
+HOMEPAGE="http://www.hashcash.org"
+SRC_URI="http://www.hashcash.org/source/${P}.tgz"
+
+LICENSE="CPL-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i -e "/COPT_GENERIC = -O3/d" Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" generic || die
+}
+
+src_install() {
+ dobin hashcash
+ doman hashcash.1
+ dodoc CHANGELOG
+ insinto /usr/share/doc/${PF}/examples
+ doins contrib/hashcash-{request,sendmail{,.txt}} \
+ contrib/hashfork.{c,py,txt}
+}
diff --git a/net-misc/hashcash/metadata.xml b/net-misc/hashcash/metadata.xml
new file mode 100644
index 000000000000..59e2b8f78cb5
--- /dev/null
+++ b/net-misc/hashcash/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>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/hlfl/Manifest b/net-misc/hlfl/Manifest
new file mode 100644
index 000000000000..161ba5728e18
--- /dev/null
+++ b/net-misc/hlfl/Manifest
@@ -0,0 +1 @@
+DIST hlfl-0.60.1.tar.gz 104913 RMD160 361d917783465cdd2b687fbed8bc90d44262a53b SHA1 84b3cc51074fb79bb55d84d616790a6483ee49b7 SHA256 5572b42ae5d13fe15b230ff23541c031f4b4ddb5e0082ff772a85e94a5046549
diff --git a/net-misc/hlfl/hlfl-0.60.1.ebuild b/net-misc/hlfl/hlfl-0.60.1.ebuild
new file mode 100644
index 000000000000..13bbc85692ed
--- /dev/null
+++ b/net-misc/hlfl/hlfl-0.60.1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+IUSE=""
+DESCRIPTION="High Level Firewall Language"
+SRC_URI="ftp://ftp.hlfl.org/pub/hlfl/${P}.tar.gz"
+HOMEPAGE="http://www.hlfl.org"
+LICENSE="GPL-2"
+KEYWORDS="~ppc sparc x86"
+SLOT="0"
+
+DEPEND=""
+
+src_compile() {
+ sed -i -e 's:${datadir}/hlfl:${datadir}:' configure
+ econf --datadir=/usr/share/doc/${PF}
+ emake || die
+}
+
+src_install () {
+ dobin src/hlfl
+ doman doc/hlfl.1
+ insinto /usr/share/doc/${PF}
+ doins doc/services.hlfl
+
+ dodoc AUTHORS ChangeLog INSTALL NEWS README THANKS \
+ TODO doc/RoadMap doc/sample_1.hlfl doc/sample_2.hlfl \
+ doc/test.hlfl doc/syntax.txt doc/sample_3.hlfl doc/CodingStyle
+}
diff --git a/net-misc/hlfl/metadata.xml b/net-misc/hlfl/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/net-misc/hlfl/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/hotot/Manifest b/net-misc/hotot/Manifest
new file mode 100644
index 000000000000..64c0c5b870fb
--- /dev/null
+++ b/net-misc/hotot/Manifest
@@ -0,0 +1,2 @@
+DIST hotot-0.9.8.14.tar.gz 1234004 SHA256 1e67a8c39cfe250ed86633f9aedf366d25fe8133cca98fb0f28b9c1a0d7edd7b SHA512 96e110acfff50048d404e79e5345be16d85dde55f6ed952610e75cff248f78087f832dffba45302840d7fc737bb53e9642fbd44d93473713811cd402c0ca7456 WHIRLPOOL 50aa12a82f0c524d1e3dc76f74f30bcc5cd2879bef252aed6d81cf81f3cab70f4fcc09f4518f8c9c6566b6c7340b20bdeb264cbc81dcd1de915952e545510151
+DIST hotot-0.9.8.14_p20130514.tar.gz 1234379 SHA256 46198319c76516354b38fb6f02994e57ab39bf0707f533243c5c0753cde8d641 SHA512 3b4e041ebf48c7397c78139d2e8542178bf16a0bd73de8ea33781ba581b1ea3da9aefa3aa1d0bc91d32d46dd3f15902786982ef8ec64e548723cd4500386afae WHIRLPOOL e94e5eec52147fbf533858095dcc9924d381529a59c6e6d420fd06e1de50e62147660c5c0b9acf93a64efa4cdeea4c09a10303ac25e198f1709772bfcb417a0e
diff --git a/net-misc/hotot/hotot-0.9.8.14.ebuild b/net-misc/hotot/hotot-0.9.8.14.ebuild
new file mode 100644
index 000000000000..a6ad8b9193f5
--- /dev/null
+++ b/net-misc/hotot/hotot-0.9.8.14.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils python-single-r1 vcs-snapshot
+
+DESCRIPTION="lightweight & open source microblogging client"
+HOMEPAGE="http://hotot.org"
+SRC_URI="https://github.com/lyricat/Hotot/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="chrome gtk kde qt4"
+
+REQUIRED_USE="|| ( chrome gtk qt4 ) ${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ gtk? ( dev-python/pywebkitgtk )
+ qt4? ( dev-qt/qtwebkit:4
+ kde? ( kde-base/kdelibs ) )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ qt4? ( dev-qt/qtsql:4 )"
+
+pkg_setup() {
+ if ! use gtk ; then
+ if ! use qt4 ; then
+ ewarn "neither gtk not qt4 binaries will be build"
+ fi
+ fi
+ python-single-r1_pkg_setup
+}
+
+src_configure() {
+ mycmakeargs=(
+ ${mycmakeargs}
+ $(cmake-utils_use_with chrome CHROME)
+ $(cmake-utils_use_with gtk GTK)
+ $(cmake-utils_use_with gtk GTK2)
+ -DWITH_GTK3=OFF
+ $(cmake-utils_use_with kde KDE)
+ $(cmake-utils_use_with qt4 QT)
+ -DPYTHON_EXECUTABLE=${PYTHON} )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ find "${D}" -name "*.pyc" -delete
+}
+
+pkg_postinst() {
+ if use chrome; then
+ elog "TO install hotot for chrome, open chromium/google-chrome,"
+ elog "vist chrome://chrome/extensions/ and load /usr/share/hotot"
+ elog "as unpacked extension."
+ fi
+}
diff --git a/net-misc/hotot/hotot-0.9.8.14_p20130514.ebuild b/net-misc/hotot/hotot-0.9.8.14_p20130514.ebuild
new file mode 100644
index 000000000000..3f85cc516257
--- /dev/null
+++ b/net-misc/hotot/hotot-0.9.8.14_p20130514.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils python-single-r1 vcs-snapshot
+
+DESCRIPTION="lightweight & open source microblogging client"
+HOMEPAGE="http://hotot.org"
+SRC_URI="https://github.com/lyricat/Hotot/tarball/ed2ff013 -> ${P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="chrome gtk kde qt4"
+
+REQUIRED_USE="|| ( chrome gtk qt4 ) ${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ gtk? ( dev-python/pywebkitgtk[${PYTHON_USEDEP}] )
+ qt4? ( dev-qt/qtwebkit:4
+ kde? ( kde-base/kdelibs ) )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ qt4? ( dev-qt/qtsql:4 )"
+
+pkg_setup() {
+ if ! use gtk ; then
+ if ! use qt4 ; then
+ ewarn "neither gtk not qt4 binaries will be build"
+ fi
+ fi
+ python-single-r1_pkg_setup
+}
+
+src_configure() {
+ mycmakeargs=(
+ ${mycmakeargs}
+ $(cmake-utils_use_with chrome CHROME)
+ $(cmake-utils_use_with gtk GTK)
+ $(cmake-utils_use_with gtk GTK2)
+ -DWITH_GTK3=OFF
+ $(cmake-utils_use_with kde KDE)
+ $(cmake-utils_use_with qt4 QT)
+ -DPYTHON_EXECUTABLE=${PYTHON} )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ use gtk && dosym hotot-gtk2 /usr/bin/hotot
+
+ find "${D}" -name "*.pyc" -print -delete
+}
+
+pkg_postinst() {
+ if use chrome; then
+ elog "TO install hotot for chrome, open chromium/google-chrome,"
+ elog "vist chrome://chrome/extensions/ and load /usr/share/hotot"
+ elog "as unpacked extension."
+ fi
+}
diff --git a/net-misc/hotot/hotot-9999.ebuild b/net-misc/hotot/hotot-9999.ebuild
new file mode 100644
index 000000000000..4bb51e0393cb
--- /dev/null
+++ b/net-misc/hotot/hotot-9999.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils git-2 python-single-r1
+
+DESCRIPTION="lightweight & open source microblogging client"
+HOMEPAGE="http://hotot.org"
+EGIT_REPO_URI="git://github.com/lyricat/Hotot.git"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS=""
+IUSE="chrome gtk kde qt4"
+
+REQUIRED_USE="|| ( chrome gtk qt4 ) ${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ gtk? ( dev-python/pywebkitgtk[${PYTHON_USEDEP}] )
+ qt4? ( dev-qt/qtwebkit:4
+ kde? ( kde-base/kdelibs ) )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ qt4? ( dev-qt/qtsql:4 )"
+
+pkg_setup() {
+ if ! use gtk ; then
+ if ! use qt4 ; then
+ ewarn "neither gtk not qt4 binaries will be build"
+ fi
+ fi
+ python-single-r1_pkg_setup
+}
+
+src_configure() {
+ mycmakeargs=(
+ ${mycmakeargs}
+ $(cmake-utils_use_with chrome CHROME)
+ $(cmake-utils_use_with gtk GTK)
+ $(cmake-utils_use_with gtk GTK2)
+ -DWITH_GTK3=OFF
+ $(cmake-utils_use_with kde KDE)
+ $(cmake-utils_use_with qt4 QT)
+ -DPYTHON_EXECUTABLE=${PYTHON} )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ find "${D}" -name "*.pyc" -delete
+}
+
+pkg_postinst() {
+ if use chrome; then
+ elog "TO install hotot for chrome, open chromium/google-chrome,"
+ elog "vist chrome://chrome/extensions/ and load /usr/share/hotot"
+ elog "as unpacked extension."
+ fi
+}
diff --git a/net-misc/hotot/metadata.xml b/net-misc/hotot/metadata.xml
new file mode 100644
index 000000000000..a518f0d15322
--- /dev/null
+++ b/net-misc/hotot/metadata.xml
@@ -0,0 +1,9 @@
+<?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>
+<use><flag name="chrome">Build chrome browser extension</flag></use>
+</pkgmetadata>
diff --git a/net-misc/hsc/Manifest b/net-misc/hsc/Manifest
new file mode 100644
index 000000000000..c4f8c63a29b8
--- /dev/null
+++ b/net-misc/hsc/Manifest
@@ -0,0 +1 @@
+DIST hsc-1.0b.tar.bz2 623192 RMD160 aaf00b9bd92a669e7363d28edfb338cd9fdd7a96 SHA1 fd951d2007e93c897e055de7af0dae2e15215df0 SHA256 4c3e4b7a96851d8a8cd4c0ce7135c9730f2fb63b0ae3555183b0285d04b38a81
diff --git a/net-misc/hsc/files/hsc-1.0b-cflags.patch b/net-misc/hsc/files/hsc-1.0b-cflags.patch
new file mode 100644
index 000000000000..1459d5ad049a
--- /dev/null
+++ b/net-misc/hsc/files/hsc-1.0b-cflags.patch
@@ -0,0 +1,45 @@
+Index: hsc-1.0/configure.in
+===================================================================
+--- hsc-1.0.orig/configure.in
++++ hsc-1.0/configure.in
+@@ -46,12 +46,12 @@ case $host in
+ ;;
+ esac
+ echo "Configuring for $SYSTEM"
+-CFLAGS="-Wall -pedantic"
++CFLAGS="$CFLAGS -Wall -pedantic"
+
+ AC_ARG_ENABLE(debug,
+ AS_HELP_STRING([--enable-debug],[Compile programs with GDB support and debugging output]),
+ [CFLAGS="$CFLAGS -ggdb -g3 -DDEBUG"; REGEXDEBUG="regex/printchar.o"],
+- CFLAGS="$CFLAGS -fomit-frame-pointer -Os")
++ CFLAGS="$CFLAGS")
+ AC_ARG_ENABLE(efence,
+ AS_HELP_STRING([--enable-efence],[Link with efence library for memory debugging]),
+ CFLAGS="$CFLAGS -lefence")
+Index: hsc-1.0/src/regex/Makefile.in
+===================================================================
+--- hsc-1.0.orig/src/regex/Makefile.in
++++ hsc-1.0/src/regex/Makefile.in
+@@ -29,7 +29,7 @@ version = 0.12
+ CPPFLAGS =
+
+ # Likewise, you can override CFLAGS to optimize, use -Wall, etc.
+-CFLAGS = -g
++#CFLAGS = -g
+
+ # Ditto for LDFLAGS and LOADLIBES.
+ LDFLAGS =
+Index: hsc-1.0/src/Makefile.in
+===================================================================
+--- hsc-1.0.orig/src/Makefile.in
++++ hsc-1.0/src/Makefile.in
+@@ -27,7 +27,7 @@ DATADIR=@datadir@
+
+ CFLAGS = @CFLAGS@ -D@SYSTEM@ -I.
+ COMP = @CC@ -o $@ $(CFLAGS)
+-LINK = @CC@ -o $@ $(CFLAGS)
++LINK = @CC@ -o $@ $(CFLAGS) $(LDFLAGS)
+ LINKLIBS= @LINKLIBS@
+ MOVE = mv
+ COPY = cp
diff --git a/net-misc/hsc/files/hsc-1.0b-glibc-2.10.patch b/net-misc/hsc/files/hsc-1.0b-glibc-2.10.patch
new file mode 100644
index 000000000000..5c10efc0f9a2
--- /dev/null
+++ b/net-misc/hsc/files/hsc-1.0b-glibc-2.10.patch
@@ -0,0 +1,12 @@
+diff -ur hsc-1.0.orig/src/hsclib/css.c hsc-1.0/src/hsclib/css.c
+--- hsc-1.0.orig/src/hsclib/css.c 2006-04-03 17:18:37.000000000 +0300
++++ hsc-1.0/src/hsclib/css.c 2009-08-09 20:19:51.000000000 +0300
+@@ -129,7 +129,7 @@
+ #ifdef isblank
+ #undef isblank
+ #endif
+-static int isblank(int c)
++int isblank(int c)
+ {
+ return ((c == ' ') || (c == '\t'));
+ }
diff --git a/net-misc/hsc/files/hsc-1.0b-nostrip.patch b/net-misc/hsc/files/hsc-1.0b-nostrip.patch
new file mode 100644
index 000000000000..af4cc947d8fd
--- /dev/null
+++ b/net-misc/hsc/files/hsc-1.0b-nostrip.patch
@@ -0,0 +1,18 @@
+Index: hsc-1.0/src/Makefile.in
+===================================================================
+--- hsc-1.0.orig/src/Makefile.in
++++ hsc-1.0/src/Makefile.in
+@@ -87,10 +87,9 @@ rex:
+ # installation
+ #--------------------------------------------------------------------
+ install : all
+- strip $(EXE_ALL)
+- $(INSTALL) -Ds hsc/hsc $(BINDIR)/hsc
+- $(INSTALL) -Ds hsctools/hscdepp $(BINDIR)/hscdepp
+- $(INSTALL) -Ds hsctools/hscpitt $(BINDIR)/hscpitt
++ $(INSTALL) -D hsc/hsc $(BINDIR)/hsc
++ $(INSTALL) -D hsctools/hscdepp $(BINDIR)/hscdepp
++ $(INSTALL) -D hsctools/hscpitt $(BINDIR)/hscpitt
+
+ #--------------------------------------------------------------------
+ # cleanup - remove all objects and executables
diff --git a/net-misc/hsc/files/hsc-1.0b-parmake.patch b/net-misc/hsc/files/hsc-1.0b-parmake.patch
new file mode 100644
index 000000000000..8c93d32f4888
--- /dev/null
+++ b/net-misc/hsc/files/hsc-1.0b-parmake.patch
@@ -0,0 +1,13 @@
+Index: hsc-1.0/Makefile.in
+===================================================================
+--- hsc-1.0.orig/Makefile.in
++++ hsc-1.0/Makefile.in
+@@ -30,7 +30,7 @@ all: hsc docs
+
+ hsc:
+ make -C src
+-docs:
++docs: hsc
+ PATH="$(shell pwd)/src/hsc:$(PATH)" HSCEXTRAOPTS="IGNORE=21" make -C docs-source
+
+ install:
diff --git a/net-misc/hsc/hsc-1.0b.ebuild b/net-misc/hsc/hsc-1.0b.ebuild
new file mode 100644
index 000000000000..826d2d40d116
--- /dev/null
+++ b/net-misc/hsc/hsc-1.0b.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit autotools eutils
+
+DESCRIPTION="An HTML preprocessor using ML syntax"
+HOMEPAGE="http://www.linguistik.uni-erlangen.de/~msbethke/software.html"
+SRC_URI="http://www.linguistik.uni-erlangen.de/~msbethke/binaries/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+S=${WORKDIR}/${PN}-${PV/b/}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-cflags.patch"
+ epatch "${FILESDIR}/${P}-nostrip.patch"
+ epatch "${FILESDIR}/${P}-parmake.patch"
+ epatch "${FILESDIR}"/${P}-glibc-2.10.patch
+ eautoreconf
+}
+
+src_install() {
+ dodir /usr/share/hsc
+ emake BINDIR="${D}/usr/bin" DATADIR="${D}/usr/share/hsc" \
+ prefix="${D}/usr" docdir="${D}/usr/share/doc/${PF}" \
+ datadir="${D}/usr/share/hsc" install || die "make install failed"
+}
diff --git a/net-misc/hsc/metadata.xml b/net-misc/hsc/metadata.xml
new file mode 100644
index 000000000000..2193d772e351
--- /dev/null
+++ b/net-misc/hsc/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>ml</herd>
+</pkgmetadata>
diff --git a/net-misc/htbinit/Manifest b/net-misc/htbinit/Manifest
new file mode 100644
index 000000000000..85a10b2096f8
--- /dev/null
+++ b/net-misc/htbinit/Manifest
@@ -0,0 +1 @@
+DIST htb.init-v0.8.5 32038 SHA256 acfda369dff72b9073a8b70f2b05b1397a61a1cdb23970e5ed216d632ff33586 SHA512 5f54f662e8b30c4efa6c8cac50eeddfec8650aa6f651065c0962c32067ca7ba17266d20860c296bac44d1f78caa50f6c948f3c55d468a76f9ce2069a43d3c6dd WHIRLPOOL e83c96c152f5e781e963585794df339d5b44fbbfdc3f9bf23defb3c37aa301e08b7324877c784411138ffa600c6ce3c3b45e3ae92ba3e274a09eeb05d2d12d05
diff --git a/net-misc/htbinit/files/htb.init-v0.8.5_tos.patch b/net-misc/htbinit/files/htb.init-v0.8.5_tos.patch
new file mode 100644
index 000000000000..a798508631d3
--- /dev/null
+++ b/net-misc/htbinit/files/htb.init-v0.8.5_tos.patch
@@ -0,0 +1,51 @@
+--- htb.init.old 2005-03-15 14:56:08.328305288 +0200
++++ htb.init 2005-03-15 15:05:16.612953352 +0200
+@@ -240,6 +240,10 @@
+ # Maximum packet size HTB creates rate maps for. The default should
+ # be sufficient for most cases, it certainly is for Ethernet.
+ #
++# TOS=<number> optional, default "none"
++#
++# TOS field
++#
+ ### SFQ qdisc parameters
+ #
+ # The SFQ queueing discipline is a cheap way to fairly share class bandwidth
+@@ -435,6 +435,7 @@
+ HTB_CLASS="RATE\|CEIL\|BURST\|CBURST\|PRIO\|LEAF\|MTU"
+ HTB_CLASS="$HTB_CLASS\|PRIO_RULE\|PRIO_MARK\|PRIO_REALM"
+ HTB_CLASS="$HTB_CLASS\|LIMIT\|QUANTUM\|PERTURB"
++HTB_CLASS="$HTB_CLASS\|TOS"
+
+
+ #############################################################################
+@@ -646,7 +647,7 @@
+ ### Set defaults & load class
+ MTU=""; LEAF=none; PERTURB=10
+ RATE=""; BURST=""; CEIL=""; CBURST=""
+- PRIO=""; LIMIT=""; QUANTUM=""
++ PRIO=""; LIMIT=""; QUANTUM=""; TOS=""
+
+ PRIO_RULE=$PRIO_RULE_DEFAULT
+ PRIO_MARK=$PRIO_MARK_DEFAULT
+@@ -868,12 +869,19 @@
+ u32_d="${DPORT:+match ip dport $DPORT $DMASK}"
+ u32_d="${DADDR:+match ip dst $DADDR} $u32_d"
+
++
++ u32_tos=""
++ if [ -n "$TOS" ]; then
++ u32_tos="match ip tos $TOS 0xff"
++ fi
++
++
+ ### Uncomment the following if you want to see parsed rules
+ #echo "$rule: $u32_s $u32_d"
+
+ ### Attach u32 filter to the appropriate class
+ tc filter add dev $DEVICE parent 1:0 protocol ip \
+- prio $PRIO_RULE u32 $u32_s $u32_d classid 1:$CLASS
++ prio $PRIO_RULE u32 $u32_s $u32_d $u32_tos classid 1:$CLASS
+ done ### rule
+
+ [ "$1" = "compile" ] && echo
diff --git a/net-misc/htbinit/files/htb.init_find_fix.patch b/net-misc/htbinit/files/htb.init_find_fix.patch
new file mode 100644
index 000000000000..12222b3e32a5
--- /dev/null
+++ b/net-misc/htbinit/files/htb.init_find_fix.patch
@@ -0,0 +1,33 @@
+--- htb.init.old 2004-01-29 22:41:23.000000000 +0100
++++ htb.init 2006-09-08 00:22:11.000000000 +0200
+@@ -468,8 +468,8 @@
+ ### List of classes in $HTB_PATH
+ htb_class_list () {
+ for dev in `htb_device_list`; do
+- find $HTB_PATH \( -type f -or -type l \) \
+- -name "$dev-*" -not -name '*~' -maxdepth 1 \
++ find $HTB_PATH -maxdepth 1 \( -type f -or -type l \) \
++ -name "$dev-*" -not -name '*~' \
+ -printf "%f\n"| sort
+ done
+ } # htb_class_list
+@@ -483,8 +483,8 @@
+ ### Validate cache against config files
+ htb_valid_cache () {
+ for dev in `htb_device_list`; do
+- [ `find $HTB_PATH \( -type f -or -type l \) \
+- -name "$dev*" -maxdepth 1 -newer $HTB_CACHE| \
++ [ `find $HTB_PATH -maxdepth 1 \( -type f -or -type l \) \
++ -name "$dev*" -newer $HTB_CACHE| \
+ wc -l` -gt 0 ] && VALID=0
+ [ $VALID -ne 1 ] && break
+ done
+@@ -493,7 +493,7 @@
+
+ ### Find class config for device $1, which is newer than cache
+ htb_cache_older () {
+- [ `find $HTB_PATH -type f -name "$1*" -maxdepth 1 \
++ [ `find $HTB_PATH -maxdepth 1 -type f -name "$1*" \
+ -newer $HTB_CACHE| wc -l` -gt 0 ] && return 0
+ return 1
+ } # htb_cache_older
diff --git a/net-misc/htbinit/files/htb_0.8.5_esfq.diff b/net-misc/htbinit/files/htb_0.8.5_esfq.diff
new file mode 100644
index 000000000000..3130f6868a4f
--- /dev/null
+++ b/net-misc/htbinit/files/htb_0.8.5_esfq.diff
@@ -0,0 +1,53 @@
+--- htb.init.old 2004-01-29 22:41:23.000000000 +0100
++++ htb.init 2006-09-07 23:32:58.000000000 +0200
+@@ -226,7 +226,7 @@
+ # priority. Also, classes with higher priority are offered excess
+ # bandwidth first.
+ #
+-# LEAF=none|sfq|pfifo|bfifo optional, default "none"
++# LEAF=none|sfq|esfq|pfifo|bfifo optional, default "none"
+ #
+ # Tells the script to attach specified leaf queueing discipline to HTB
+ # class. By default, no leaf qdisc is used.
+@@ -261,6 +261,15 @@
+ # will never take place which is what you probably don't want. The
+ # default value of 10 seconds is probably a good value.
+ #
++### ESFQ qdisc parameters
++#
++# Same as SFQ and ...
++#
++# HASH=classic|src|dst
++#
++# src mean is fair per source IP
++# dsr mean is fair per destination IP
++#
+ ### PFIFO/BFIFO qdisc parameters
+ #
+ # Those are simple FIFO queueing disciplines. They only have one parameter
+@@ -427,14 +445,14 @@
+
+ ### Modules to probe for. Uncomment the last HTB_PROBE
+ ### line if you have QoS support compiled into kernel
+-HTB_PROBE="sch_htb sch_sfq cls_fw cls_u32 cls_route"
++HTB_PROBE="sch_htb sch_sfq sch_esfq cls_fw cls_u32 cls_route"
+ #HTB_PROBE=""
+
+ ### Config keywords
+ HTB_QDISC="DEFAULT\|DCACHE\|R2Q"
+ HTB_CLASS="RATE\|CEIL\|BURST\|CBURST\|PRIO\|LEAF\|MTU"
+ HTB_CLASS="$HTB_CLASS\|PRIO_RULE\|PRIO_MARK\|PRIO_REALM"
+-HTB_CLASS="$HTB_CLASS\|LIMIT\|QUANTUM\|PERTURB"
++HTB_CLASS="$HTB_CLASS\|LIMIT\|QUANTUM\|PERTURB\|HASH"
+ HTB_CLASS="$HTB_CLASS\|TOS"
+
+
+@@ -801,6 +819,8 @@
+ LEAFPARM="${PERTURB:+perturb $PERTURB} ${QUANTUM:+quantum $QUANTUM}"
+ elif [ "$LEAF" = "pfifo" -o "$LEAF" = "bfifo" ]; then
+ LEAFPARM="${LIMIT:+limit $LIMIT}"
++ elif [ "$LEAF" = "esfq" ]; then
++ LEAFPARM="${PERTURB:+perturb $PERTURB} ${QUANTUM:+quantum $QUANTUM} ${HASH:+hash $HASH}"
+ else
+ htb_fail_off "unknown leaf qdisc ($LEAF) in $classfile!"
+ fi
diff --git a/net-misc/htbinit/files/htb_0.8.5_ipv6.diff b/net-misc/htbinit/files/htb_0.8.5_ipv6.diff
new file mode 100644
index 000000000000..815f99545a61
--- /dev/null
+++ b/net-misc/htbinit/files/htb_0.8.5_ipv6.diff
@@ -0,0 +1,128 @@
+--- htb.init.old 2004-01-29 22:41:23.000000000 +0100
++++ htb.init 2006-09-07 23:32:58.000000000 +0200
+@@ -275,6 +284,7 @@
+ ### Filtering parameters
+ #
+ # RULE=[[saddr[/prefix]][:port[/mask]],][daddr[/prefix]][:port[/mask]]
++# RULEIPv6=[[saddr[/prefix]][_port[/mask]],][daddr[/prefix]][_port[/mask]]
+ #
+ # These parameters make up "u32" filter rules that select traffic for
+ # each of the classes. You can use multiple RULE fields per config.
+@@ -300,9 +310,13 @@
+ # RULE=10.5.5.5:80,
+ # selects traffic going from port 80 of single host 10.5.5.5
+ #
++# RULEIPv6=3ffe:80fe:c28:1:45d1:3a1:5e2b:e6c8
++# selects traffic going to IPv6 host 3ffe:80fe:c28:1:45d1:3a1:5e2b:e6c8
++#
+ #
+ #
+ # REALM=[srealm,][drealm]
++# REALMIPv6=[srealm,][drealm]
+ #
+ # These parameters make up "route" filter rules that classify traffic
+ # according to packet source/destination realms. For information about
+@@ -327,6 +341,7 @@
+ #
+ #
+ # MARK=<mark>
++# MARKIPv6=<mark>
+ #
+ # These parameters make up "fw" filter rules that select traffic for
+ # each of the classes accoring to firewall "mark". Mark is a decimal
+@@ -414,6 +429,9 @@
+ PRIO_RULE_DEFAULT=${PRIO_RULE:-100}
+ PRIO_MARK_DEFAULT=${PRIO_MARK:-200}
+ PRIO_REALM_DEFAULT=${PRIO_REALM:-300}
++PRIO_RULEIPv6=${PRIO_RULEIPv6:-150}
++PRIO_MARKIPv6=${PRIO_MARKIPv6:-250}
++PRIO_REALMIPv6=${PRIO_REALMIPv6:-350}
+
+ ### Default HTB_PATH & HTB_CACHE settings
+ HTB_PATH=${HTB_PATH:-/etc/sysconfig/htb}
+@@ -818,6 +838,13 @@
+ prio $PRIO_MARK handle $mark fw classid 1:$CLASS
+ done ### mark
+
++ ### Create fw filter for MARKIPv6 fields
++ for mark in `htb_cfile_rules MARKIPv6`; do
++ ### Attach fw filter to root class
++ tc filter add dev $DEVICE parent 1:0 protocol ipv6 \
++ prio $PRIO_MARKIPv6 handle $mark fw classid 1:$CLASS
++ done ### markipv6
++
+ ### Create route filter for REALM fields
+ for realm in `htb_cfile_rules REALM`; do
+ ### Split realm into source & destination realms
+@@ -833,6 +860,21 @@
+ ${DREALM:+to $DREALM} classid 1:$CLASS
+ done ### realm
+
++ ### Create route filter for REALMIPv6 fields
++ for realm in `htb_cfile_rules REALMIPv6`; do
++ ### Split realm into source & destination realms
++ SREALM=${realm%%,*}; DREALM=${realm##*,}
++ [ "$SREALM" = "$DREALM" ] && SREALM=""
++
++ ### Convert asterisks to empty strings
++ SREALM=${SREALM#\*}; DREALM=${DREALM#\*}
++
++ ### Attach route filter to the root class
++ tc filter add dev $DEVICE parent 1:0 protocol ipv6 \
++ prio $PRIO_REALM route ${SREALM:+from $SREALM} \
++ ${DREALM:+to $DREALM} classid 1:$CLASS
++ done ### realmipv6
++
+ ### Create u32 filter for RULE fields
+ for rule in `htb_cfile_rules RULE`; do
+ ### Split rule into source & destination
+@@ -876,6 +918,49 @@
+ prio $PRIO_RULE u32 $u32_s $u32_d classid 1:$CLASS
+ done ### rule
+
++ ### Create u32 filter for RULEIPv6 fields
++ for rule in `htb_cfile_rules RULEIPv6`; do
++ ### Split rule into source & destination
++ SRC=${rule%%,*}; DST=${rule##*,}
++ [ "$SRC" = "$rule" ] && SRC=""
++
++
++ ### Split destination into address, port & mask fields
++ DADDR=${DST%%_*}; DTEMP=${DST##*_}
++ [ "$DADDR" = "$DST" ] && DTEMP=""
++
++ DPORT=${DTEMP%%/*}; DMASK=${DTEMP##*/}
++ [ "$DPORT" = "$DTEMP" ] && DMASK="0xffff"
++
++
++ ### Split up source (if specified)
++ SADDR=""; SPORT=""
++ if [ -n "$SRC" ]; then
++ SADDR=${SRC%%_*}; STEMP=${SRC##*_}
++ [ "$SADDR" = "$SRC" ] && STEMP=""
++
++ SPORT=${STEMP%%/*}; SMASK=${STEMP##*/}
++ [ "$SPORT" = "$STEMP" ] && SMASK="0xffff"
++ fi
++
++
++ ### Convert asterisks to empty strings
++ SADDR=${SADDR#\*}; DADDR=${DADDR#\*}
++
++ ### Compose u32 filter rules
++ u32_s="${SPORT:+match ip6 sport $SPORT $SMASK}"
++ u32_s="${SADDR:+match ip6 src $SADDR} $u32_s"
++ u32_d="${DPORT:+match ip6 dport $DPORT $DMASK}"
++ u32_d="${DADDR:+match ip6 dst $DADDR} $u32_d"
++
++ ### Uncomment the following if you want to see parsed rules
++ #echo "$rule: $u32_s $u32_d"
++
++ ### Attach u32 filter to the appropriate class
++ tc filter add dev $DEVICE parent 1:0 protocol ipv6 \
++ prio $PRIO_RULEIPv6 u32 $u32_s $u32_d classid 1:$CLASS
++ done ### ruleipv6
++
+ [ "$1" = "compile" ] && echo
+ done ### classfile
+ ;;
diff --git a/net-misc/htbinit/files/htbinit.rc b/net-misc/htbinit/files/htbinit.rc
new file mode 100644
index 000000000000..7a27d58dd588
--- /dev/null
+++ b/net-misc/htbinit/files/htbinit.rc
@@ -0,0 +1,47 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_commands="stats list timecheck"
+extra_started_commands="reload"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting htbinit"
+ /usr/sbin/htb.init start
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping htbinit"
+ /usr/sbin/htb.init stop
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading htbinit"
+ /usr/sbin/htb.init start invalidate
+ eend $?
+}
+
+stats() {
+ ebegin "Showing htbinit stats"
+ /usr/sbin/htb.init stats
+ eend $?
+}
+
+list() {
+ ebegin "Showing htbinit list"
+ /usr/sbin/htb.init list
+ eend $?
+}
+
+timecheck() {
+ ebegin "Showing htbinit timecheck"
+ /usr/sbin/htb.init timecheck
+ eend $?
+}
diff --git a/net-misc/htbinit/files/prio_rule.patch b/net-misc/htbinit/files/prio_rule.patch
new file mode 100644
index 000000000000..28471aabb84e
--- /dev/null
+++ b/net-misc/htbinit/files/prio_rule.patch
@@ -0,0 +1,20 @@
+--- htb.init.old 2004-01-29 22:41:23.000000000 +0100
++++ htb.init 2006-09-08 00:03:32.000000000 +0200
+@@ -453,7 +457,7 @@
+ ### Load & filter file $HTB_PATH/$1
+ htb_filter_file () {
+ sed -n "s/#.*//; s/[^a-zA-Z0-9.,;:=/*-_]\+//g; \
+- /^[a-zA-Z0-9]\+=[a-zA-Z0-9.,:;/*-_]\+$/ p" $HTB_PATH/$1
++ /^[a-zA-Z0-9_]\+=[a-zA-Z0-9.,:;/*-_]\+$/ p" $HTB_PATH/$1
+ } # htb_filter_file
+
+
+@@ -517,7 +521,7 @@
+
+ htb_filter_file () {
+ sed 's/#.*//; s/[^a-zA-Z0-9.,;:=/*-_]\+//g' $HTB_PATH/$1 \
+- | grep '^[a-zA-Z0-9]\+=[a-zA-Z0-9.,;:/*-_]\+$'
++ | grep '^[a-zA-Z0-9_]\+=[a-zA-Z0-9.,;:/*-_]\+$'
+ } # htb_filter_file
+
+ htb_clsid_chain () {
diff --git a/net-misc/htbinit/files/timecheck_fix.patch b/net-misc/htbinit/files/timecheck_fix.patch
new file mode 100644
index 000000000000..de3791af997d
--- /dev/null
+++ b/net-misc/htbinit/files/timecheck_fix.patch
@@ -0,0 +1,42 @@
+--- htb.init.old 2004-01-29 22:41:23.000000000 +0100
++++ htb.init 2006-09-08 00:11:36.000000000 +0200
+@@ -891,7 +895,6 @@
+ TIME_TMP=`date +%w/%k:%M`
+ TIME_DOW=${TIME_TMP%%/*}
+ TIME_NOW=${TIME_TMP##*/}
+-TIME_ABS=`htb_time2abs $TIME_NOW`
+
+ ### Check all classes (if configured)
+ for classfile in `htb_class_list`; do
+@@ -914,6 +917,7 @@
+ ### Compute interval boundaries
+ BEG_ABS=`htb_time2abs $BEG_TIME`
+ END_ABS=`htb_time2abs $END_TIME`
++ TIME_ABS=`htb_time2abs $TIME_NOW`
+
+ ### Midnight wrap fixup
+ if [ $BEG_ABS -gt $END_ABS ]; then
+@@ -926,6 +930,23 @@
+ ### If time period matches, remember params and set MATCH flag
+ if [ $TIME_ABS -ge $BEG_ABS -a $TIME_ABS -lt $END_ABS ]; then
+ RATESPEC=${PARAMS%%,*}; CEILSPEC=${PARAMS##*,}
++
++ RNAME=""; CNAME=""
++
++ [ "$RATESPEC" = "prate" ] && RNAME=RATE_$PARENT
++ [ "$RATESPEC" = "pceil" ] && RNAME=CEIL_$PARENT
++
++ if [ -n "$RNAME" ]; then
++ RATESPEC=${!RNAME}
++ fi
++
++ [ "$CEILSPEC" = "prate" ] && CNAME=RATE_$PARENT
++ [ "$CEILSPEC" = "pceil" ] && CNAME=CEIL_$PARENT
++
++ if [ -n "$CNAME" ]; then
++ CEILSPEC=${!CNAME}
++ fi
++
+ [ "$RATESPEC" = "$CEILSPEC" ] && CEILSPEC=""
+
+ NEW_RATE=${RATESPEC%%/*}; NEW_BURST=${RATESPEC##*/}
diff --git a/net-misc/htbinit/htbinit-0.8.5-r6.ebuild b/net-misc/htbinit/htbinit-0.8.5-r6.ebuild
new file mode 100644
index 000000000000..134522da5ede
--- /dev/null
+++ b/net-misc/htbinit/htbinit-0.8.5-r6.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils linux-info
+
+DESCRIPTION="Sets up Hierachical Token Bucket based traffic control (QoS) with iproute2"
+HOMEPAGE="http://www.sourceforge.net/projects/htbinit"
+SRC_URI="mirror://sourceforge/htbinit/htb.init-v${PV}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="ipv6 esfq"
+
+DEPEND="sys-apps/iproute2"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}
+
+pkg_setup() {
+ for i in NET_SCH_HTB NET_SCH_SFQ NET_CLS_FW NET_CLS_U32 NET_CLS_ROUTE4 ; do
+ CONFIG_CHECK="${CONFIG_CHECK} ~${i}"
+ done
+ use esfq && CONFIG_CHECK="${CONFIG_CHECK} ~NET_SCH_ESFQ"
+ linux-info_pkg_setup
+}
+
+src_unpack() {
+ cp "${DISTDIR}"/htb.init-v${PV} "${S}"/htb.init || die
+}
+
+src_prepare() {
+ sed -i 's|/etc/sysconfig/htb|/etc/htb|g' "${S}"/htb.init
+ epatch "${FILESDIR}"/htb.init-v0.8.5_tos.patch
+ use ipv6 && epatch "${FILESDIR}"/htb_0.8.5_ipv6.diff
+ use esfq && epatch "${FILESDIR}"/htb_0.8.5_esfq.diff
+ epatch "${FILESDIR}"/prio_rule.patch
+ epatch "${FILESDIR}"/timecheck_fix.patch
+ epatch "${FILESDIR}"/htb.init_find_fix.patch
+ sed -i -e 's:/sbin/ip:/bin/ip:g' "${S}"/htb.init # bug #474700
+}
+
+src_compile() {
+ :
+}
+
+src_install() {
+ dosbin htb.init
+ newinitd "${FILESDIR}"/htbinit.rc htbinit
+ keepdir /etc/htb
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ elog 'Run "rc-update add htbinit default" to run htb.init at startup.'
+ elog 'Please, read carefully the htb.init documentation.'
+ elog 'New directory to store configuration is /etc/htb.'
+ fi
+}
diff --git a/net-misc/htbinit/metadata.xml b/net-misc/htbinit/metadata.xml
new file mode 100644
index 000000000000..dda213eb495f
--- /dev/null
+++ b/net-misc/htbinit/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+HTB.init is a shell script derived from CBQ.init that allows for easy setup of HTB-based traffic control on Linux. HTB (Hierachical Token Bucket) is a new queueing discipline which attempts to address the weaknesses of current CBQ implementation.
+</longdescription>
+ <longdescription lang="ja">
+HTB.init は、Linux 上で HTB を基盤にしたトラフィック・コントロールのセットアップを簡単にする
+CBQ.init に由来したシェル・スクリプトです。HTB (Hierachical Token Bucket) は現在の CBQ の実装の弱点に処置を講じる
+キューの新しい規律です。
+</longdescription>
+ <use>
+ <flag name="esfq">Add support for Enhanced Stochastic Fairness queueing discipline.</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">htbinit</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/htpdate/Manifest b/net-misc/htpdate/Manifest
new file mode 100644
index 000000000000..4212b089ea0d
--- /dev/null
+++ b/net-misc/htpdate/Manifest
@@ -0,0 +1,2 @@
+DIST htpdate-1.0.7.tar.gz 16848 SHA256 ba0b3f7b42306f2e2e146624785f80cc472eac9e7885007df50af0e1a21735c4 SHA512 83408545d1d2cc794f62efaf348e54cc2ce47dfb27815710e92d0c7d34360a581e637ef82424030c8a4fcabcc9a07205518fac08f426b37c7c4519cfa6696360 WHIRLPOOL e2e949d20b8d4afecd6c3c09aefa203417b16a4061e6d2fe05cf5e37d0dc736604ed5e1f0d8c03146eb3b5031ffc3ed8ec3213171513e6140a098bd1d5f268fb
+DIST htpdate-1.1.1.tar.gz 13303 SHA256 6fca5f13e323d4bf8e4a2ae20dfaae527b745b3cf19e9aeccfe2f211e7cc7a7a SHA512 bfc463692b7c4fb962c0b6f34e6063d2506e383490e6d6972b7da3740fbd0b835a07cddd3470bea29f8d2770160fba5f87fd3d768cb27a1f04ea9f5a39522918 WHIRLPOOL 7faa7ce4dd96d48a2a7ddc20a61a7230d9658042f3c9e39229ade41a312d78a0d5827a3348b2671de36fdbcb0aa35873fa5bee6e0c13218e94fbc23f3f2730b7
diff --git a/net-misc/htpdate/files/htpdate.conf b/net-misc/htpdate/files/htpdate.conf
new file mode 100644
index 000000000000..1c7e02decf27
--- /dev/null
+++ b/net-misc/htpdate/files/htpdate.conf
@@ -0,0 +1,12 @@
+# config file for /etc/init.d/htpdate
+
+# Add at least one http server to use:
+#SERVERS="<servername>"
+
+# If you are using a proxy server to connect to the
+# internet comment out the following line and insert the
+# address and port of your proxy server.
+#PROXY="-P <proxy>:<port>"
+
+# Set additional options, see 'man htpdate' for refernce
+HTPDATE_OPTS="-D -s"
diff --git a/net-misc/htpdate/files/htpdate.init-r1 b/net-misc/htpdate/files/htpdate.init-r1
new file mode 100644
index 000000000000..9cf98836786b
--- /dev/null
+++ b/net-misc/htpdate/files/htpdate.init-r1
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="Synchronizes local system with time offered by remote webservers over HTTP"
+pidfile="/run/htpdate.pid"
+command="/usr/sbin/htpdate"
+command_args="${HTPDATE_OPTS} ${PROXY} ${SERVERS}"
+
+depend() {
+ need net
+ use dns logger
+}
+
+start_pre() {
+ if [ -z "${SERVERS}" ] ; then
+ eerror "You need to set at least one http server to use in /etc/conf.d/htpdate"
+ return 1
+ fi
+}
diff --git a/net-misc/htpdate/htpdate-1.0.7.ebuild b/net-misc/htpdate/htpdate-1.0.7.ebuild
new file mode 100644
index 000000000000..66514f77b113
--- /dev/null
+++ b/net-misc/htpdate/htpdate-1.0.7.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit readme.gentoo toolchain-funcs unpacker
+
+DESCRIPTION="Synchronize local workstation with time offered by remote webservers"
+HOMEPAGE="http://www.vervest.org/fiki/bin/view/HTP/DownloadC"
+SRC_URI="http://www.vervest.org/htp/archive/c/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~mips ppc ~ppc64 s390 sh x86 ~amd64-linux ~x86-linux"
+
+DEPEND=""
+RDEPEND=""
+
+DOC_CONTENTS="If you would like to run htpdate as a daemon, set
+appropriate http servers in /etc/conf.d/htpdate!"
+
+src_unpack() {
+ default
+
+ cd "${S}" || die "change directory to ${S} failed"
+ unpacker htpdate.8.gz
+}
+
+src_prepare() {
+ # Use more standard adjtimex() to fix uClibc builds.
+ sed -i 's:ntp_adjtime:adjtimex:g' htpdate.[8c] || die
+}
+
+src_compile() {
+ emake CFLAGS="-Wall ${CFLAGS} ${LDFLAGS}" CC="$(tc-getCC)"
+}
+
+src_install() {
+ dosbin htpdate
+ doman htpdate.8
+ dodoc README Changelog
+
+ newconfd "${FILESDIR}"/htpdate.conf htpdate
+ newinitd "${FILESDIR}"/htpdate.init-r1 htpdate
+
+ readme.gentoo_create_doc
+}
diff --git a/net-misc/htpdate/htpdate-1.1.1.ebuild b/net-misc/htpdate/htpdate-1.1.1.ebuild
new file mode 100644
index 000000000000..d70048232eea
--- /dev/null
+++ b/net-misc/htpdate/htpdate-1.1.1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit readme.gentoo toolchain-funcs unpacker
+
+DESCRIPTION="Synchronize local workstation with time offered by remote webservers"
+HOMEPAGE="http://www.vervest.org/fiki/bin/view/HTP/DownloadC"
+SRC_URI="http://www.vervest.org/htp/archive/c/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND=""
+RDEPEND=""
+
+DOC_CONTENTS="If you would like to run htpdate as a daemon, set
+appropriate http servers in /etc/conf.d/htpdate!"
+
+src_prepare() {
+ # Use more standard adjtimex() to fix uClibc builds.
+ sed -i 's:ntp_adjtime:adjtimex:g' htpdate.[8c] || die
+}
+
+src_compile() {
+ emake CFLAGS="-Wall ${CFLAGS} ${LDFLAGS}" CC="$(tc-getCC)"
+}
+
+src_install() {
+ dosbin htpdate
+ doman htpdate.8
+ dodoc README Changelog
+
+ newconfd "${FILESDIR}"/htpdate.conf htpdate
+ newinitd "${FILESDIR}"/htpdate.init-r1 htpdate
+
+ readme.gentoo_create_doc
+}
diff --git a/net-misc/htpdate/metadata.xml b/net-misc/htpdate/metadata.xml
new file mode 100644
index 000000000000..8ad2b4de9bf4
--- /dev/null
+++ b/net-misc/htpdate/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>nullishzero@gentoo.org</email>
+ <name>Pavel Kazakov</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/httpie/Manifest b/net-misc/httpie/Manifest
new file mode 100644
index 000000000000..38c1b8aca490
--- /dev/null
+++ b/net-misc/httpie/Manifest
@@ -0,0 +1 @@
+DIST httpie-0.9.2.tar.gz 73153 SHA256 af3982d41743d986608f1fe6e437d0493df227993c7edf013cc1d61883d40d68 SHA512 5622caa2f3136137d85f91eba9b0a165ec987b696a5e001844c8ecb868d66cfc86b3f3fb3a1ac493d7603c67ca88de0e0ffc776dce855ad69364190607b4fb73 WHIRLPOOL e8a4aa09f7051176ee0340b6f6785bb57353bd4bf8c0dea66b9dc50a1e6aea254eafc7d54e128c78d6fdca2f44338bfcfe6f7aca7623dbf0cd5a7b79c9d1c739
diff --git a/net-misc/httpie/httpie-0.9.2.ebuild b/net-misc/httpie/httpie-0.9.2.ebuild
new file mode 100644
index 000000000000..82cb721a3e7c
--- /dev/null
+++ b/net-misc/httpie/httpie-0.9.2.ebuild
@@ -0,0 +1,23 @@
+# 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 CLI, cURL-like tool for humans"
+HOMEPAGE="http://httpie.org/ http://pypi.python.org/pypi/httpie"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ >=dev-python/requests-2.3.0[${PYTHON_USEDEP}]
+ >=dev-python/pygments-1.5[${PYTHON_USEDEP}]"
diff --git a/net-misc/httpie/metadata.xml b/net-misc/httpie/metadata.xml
new file mode 100644
index 000000000000..fd770ec7d0f6
--- /dev/null
+++ b/net-misc/httpie/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>vikraman@gentoo.org</email>
+ <name>Vikraman Choudhury</name>
+ </maintainer>
+ <longdescription lang="en">
+ HTTPie is a command line HTTP client. Its goal is to make CLI
+ interaction with web services as human-friendly as possible. It
+ provides a simple http command that allows for sending arbitrary HTTP
+ requests using a simple and natural syntax, and displays colorized
+ responses. HTTPie can be used for testing, debugging, and generally
+ interacting with HTTP servers.
+ </longdescription>
+ <upstream>
+ <remote-id type="pypi">httpie</remote-id>
+ </upstream>
+</pkgmetadata>
+
diff --git a/net-misc/httptunnel/Manifest b/net-misc/httptunnel/Manifest
new file mode 100644
index 000000000000..d4e43cbdbd77
--- /dev/null
+++ b/net-misc/httptunnel/Manifest
@@ -0,0 +1 @@
+DIST httptunnel-3.3.tar.gz 262749 SHA256 142f82b204876c2aa90f19193c7ff78d90bb4c2cba99dfd4ef625864aed1c556
diff --git a/net-misc/httptunnel/files/httptunnel-3.3-fix_write_stdin.patch b/net-misc/httptunnel/files/httptunnel-3.3-fix_write_stdin.patch
new file mode 100644
index 000000000000..904df6f91159
--- /dev/null
+++ b/net-misc/httptunnel/files/httptunnel-3.3-fix_write_stdin.patch
@@ -0,0 +1,12 @@
+diff -dur httptunnel-3.3/common.c httptunnel-3.3-fix_write_stdin/common.c
+--- httptunnel-3.3/common.c 2001-02-25 12:45:41.000000000 +0100
++++ httptunnel-3.3-fix_write_stdin/common.c 2007-06-20 21:38:54.000000000 +0200
+@@ -314,7 +314,7 @@
+
+ /* If fd == 0, then we are using --stdin-stdout so write to stdout,
+ * not fd. */
+- m = write_all (fd ? fd : 0, buf, (size_t)n);
++ m = write_all (fd ? fd : 1, buf, (size_t)n);
+ log_annoying ("write_all (%d, %p, %d) = %d", fd ? fd : 1, buf, n, m);
+ return m;
+ }
diff --git a/net-misc/httptunnel/httptunnel-3.3-r2.ebuild b/net-misc/httptunnel/httptunnel-3.3-r2.ebuild
new file mode 100644
index 000000000000..1f149a48fd58
--- /dev/null
+++ b/net-misc/httptunnel/httptunnel-3.3-r2.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="httptunnel can create IP tunnels through firewalls/proxies using HTTP"
+HOMEPAGE="http://www.nocrew.org/software/httptunnel.html"
+SRC_URI="http://www.nocrew.org/software/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc x86 ~x86-fbsd"
+IUSE=""
+SLOT="0"
+
+DEPEND=""
+RDEPEND=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-fix_write_stdin.patch
+ tc-export CC
+}
+
+src_configure() {
+ ./configure \
+ --host=${CHOST} \
+ --prefix=/usr \
+ --infodir=/usr/share/info \
+ --mandir=/usr/share/man || die
+}
diff --git a/net-misc/httptunnel/metadata.xml b/net-misc/httptunnel/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/net-misc/httptunnel/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/httptype/Manifest b/net-misc/httptype/Manifest
new file mode 100644
index 000000000000..e709a99bdbb2
--- /dev/null
+++ b/net-misc/httptype/Manifest
@@ -0,0 +1 @@
+DIST httptype-1.3.9.tar.gz 15254 SHA256 2b3981af663c406ae7f3a4e36b2def3f7a7a45a032e2bae76fe2f14757464526 SHA512 4e23bb60596bcfb0665c1ef5c0588ffc8bfe9b74bd7998577816b2e351ad55b2d8d01caf8e884e00be1f743adc31cb40264c8c55c90d9fc91ac7bf8180c1803d WHIRLPOOL 4af1caf417758f746e5c4c49e82944d0b0c46ea46f4b49edb3e6ebd06c1f7506b918207c48819069433b146333ffe05c7aab4057eec8ba7f0f7b20fd1e4896e8
diff --git a/net-misc/httptype/httptype-1.3.9-r1.ebuild b/net-misc/httptype/httptype-1.3.9-r1.ebuild
new file mode 100644
index 000000000000..20a986146f8e
--- /dev/null
+++ b/net-misc/httptype/httptype-1.3.9-r1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Returns the http host software of a website"
+HOMEPAGE="http://httptype.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-1"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86 ~amd64-linux"
+
+RDEPEND="dev-lang/perl"
+
+src_compile() { :; }
+
+src_install() {
+ dobin httptype
+ doman httptype.1
+ dodoc Changelog README
+}
diff --git a/net-misc/httptype/metadata.xml b/net-misc/httptype/metadata.xml
new file mode 100644
index 000000000000..c7ed39f7accc
--- /dev/null
+++ b/net-misc/httptype/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>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">httptype</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/htun/Manifest b/net-misc/htun/Manifest
new file mode 100644
index 000000000000..355750f42f01
--- /dev/null
+++ b/net-misc/htun/Manifest
@@ -0,0 +1 @@
+DIST htun-0.9.6.tar.gz 63745 SHA256 acf330a37f1ac676dcb82160f43f12e0b266263f8bf918d9990f1e17e57ed83f SHA512 d709e9b6a809df5711b3c3c61c207a0ce72a054904fbe0a39bb9c60f174b19eb5fe183e3218100f45941035f72c5212fcbd716858631d1f117e6f88608f8ea0d WHIRLPOOL 3ce553377c2107814455f9d421d5bf2cbfdb40b68e371fc3f078b2a32bfe486861d4d8a683b427238952873651606184186f9e425f22f57d34a0295c0f105a36
diff --git a/net-misc/htun/files/README.gentoo b/net-misc/htun/files/README.gentoo
new file mode 100644
index 000000000000..1710c726723a
--- /dev/null
+++ b/net-misc/htun/files/README.gentoo
@@ -0,0 +1,3 @@
+NOTE: HTun requires the Universal TUN/TAP module
+available in the Linux kernel. Make sure you have
+compiled the tun.o driver as a module!
diff --git a/net-misc/htun/files/htun-0.9.6-glibc.patch b/net-misc/htun/files/htun-0.9.6-glibc.patch
new file mode 100644
index 000000000000..66f9b5ba00a5
--- /dev/null
+++ b/net-misc/htun/files/htun-0.9.6-glibc.patch
@@ -0,0 +1,14 @@
+get things building with glibc-2.8
+
+http://bugs.gentoo.org/248100
+
+--- include/common.h
++++ include/common.h
+@@ -23,6 +23,7 @@
+ #ifndef __COMMON_H
+ #define __COMMON_H
+
++#include <limits.h>
+ #include <netinet/in.h>
+ #include <time.h>
+ #include "queue.h"
diff --git a/net-misc/htun/files/htun-0.9.6-makefile.patch b/net-misc/htun/files/htun-0.9.6-makefile.patch
new file mode 100644
index 000000000000..0a94966802d8
--- /dev/null
+++ b/net-misc/htun/files/htun-0.9.6-makefile.patch
@@ -0,0 +1,22 @@
+--- src/Makefile 2005-10-27 12:58:53.000000000 +0200
++++ src/Makefile 2013-03-08 22:20:52.360922189 +0100
+@@ -20,16 +20,14 @@
+
+ # $Id$
+
+-
+-CFLAGS = -I../include -I. -O -W -Wall -g -D_REENTRANT #-pg -a
+-LDFLAGS = -lfl -lpthread # -flex for linux, solaris ?
+-LEX_CFLAGS = -I../include -I. -g -D_REENTRANT #-pg -a
++CFLAGS := $(CFLAGS) -I../include -I. -O -W -Wall -D_REENTRANT
++LDFLAGS := $(LDFLAGS) -lfl -lpthread
++LEX_CFLAGS = -I../include -I. -D_REENTRANT
+
+ # in Linux, LFLAGS is empty. In Solaris, LFLAGS = -lnsl -lsocket
+ #LFLAGS = -lnsl -lsocket
+
+ VPATH = .:../include
+-CC := gcc
+ LEX = flex
+ YACC = yacc
+ INCLUDE := $(wildcard ../include/*.h)
diff --git a/net-misc/htun/htun-0.9.6.ebuild b/net-misc/htun/htun-0.9.6.ebuild
new file mode 100644
index 000000000000..e5ffb4446aa3
--- /dev/null
+++ b/net-misc/htun/htun-0.9.6.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils readme.gentoo
+
+DESCRIPTION="Project to tunnel IP traffic over HTTP"
+HOMEPAGE="http://linux.softpedia.com/get/System/Networking/HTun-14751.shtml"
+SRC_URI="http://www.sourcefiles.org/Networking/Tools/Proxy/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+# should not be replaced by virtual/yacc
+# at least failed with dev-util/bison
+DEPEND="dev-util/yacc"
+RDEPEND=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-glibc.patch #248100
+ epatch "${FILESDIR}"/${P}-makefile.patch
+
+ epatch_user
+}
+
+src_compile() {
+ emake -C src CC="$(tc-getCC)"
+}
+
+src_install() {
+ dosbin src/htund
+ insinto /etc
+ doins doc/htund.conf
+ dodoc doc/* README
+ readme.gentoo_create_doc
+}
diff --git a/net-misc/htun/metadata.xml b/net-misc/htun/metadata.xml
new file mode 100644
index 000000000000..59e2b8f78cb5
--- /dev/null
+++ b/net-misc/htun/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>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/hylafaxplus/Manifest b/net-misc/hylafaxplus/Manifest
new file mode 100644
index 000000000000..22395a9b4048
--- /dev/null
+++ b/net-misc/hylafaxplus/Manifest
@@ -0,0 +1,2 @@
+DIST hylafax-5.5.4.tar.gz 1347860 SHA256 699ea9e05a251c0f120d753c3dab2ef347b6bb8fe362dac8ff3e4ece0fdac3ff SHA512 c26c722bf9261ffa154979e015c2cfed982caffd8c7663f471e369d05544eb24edb0e70c7f06d02b77bf71956ae7a242a48f31a6567785acd8707be3b6946161 WHIRLPOOL 779cbc292065867317a4d4fc73725acfc1c4d39b0cab6b2339a9303e91488180430d2d87f4fb52869daa0b1343a7a4b700fbf5e711288409372b4d08fbf514ce
+DIST hylafax-5.5.5.tar.gz 1353495 SHA256 2916fb7ed6141dd6433336ee3ec4f9d93183d1142d1ebbecf696c646348e1f12 SHA512 ee6225ae044c567093103f35c30d848db757636c1d8db78e8f7cb43eb01ea34ab229a81ca4175e2bf30d3c87b598d5b5797b7d92b0dc852bf4b69c697baca8cf WHIRLPOOL e0e387a60abe242011a88178000b91eb93a22363deb7df925e70f9a8293a55db79c859b89dd4d4ac8520c1f62f652edfcad1fbb9cb1be429e1b5765e7572bf23
diff --git a/net-misc/hylafaxplus/files/hylafax-cryptglibc.patch b/net-misc/hylafaxplus/files/hylafax-cryptglibc.patch
new file mode 100644
index 000000000000..dbfc8bac5393
--- /dev/null
+++ b/net-misc/hylafaxplus/files/hylafax-cryptglibc.patch
@@ -0,0 +1,98 @@
+diff -urN hylafax-5.5.4/hfaxd/Login.c++ hylafax-5.5.4-libc217/hfaxd/Login.c++
+--- hylafax-5.5.4/hfaxd/Login.c++ 2013-08-07 01:23:35.000000000 +0200
++++ hylafax-5.5.4-libc217/hfaxd/Login.c++ 2013-11-13 12:56:02.000000000 +0100
+@@ -30,9 +30,6 @@
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <pwd.h>
+-#if HAS_CRYPT_H
+-#include <crypt.h>
+-#endif
+
+ void
+ HylaFAXServer::loginRefused(const char* why)
+@@ -434,7 +431,7 @@
+ /*
+ * Check hosts.hfaxd first, then PAM, and last, LDAP
+ */
+- if (pass[0] == '\0' || !(strcmp(crypt(pass, passWd), passWd) == 0 ||
++ if (pass[0] == '\0' || !(strcmp(Sys::crypt(pass, passWd), passWd) == 0 ||
+ pamCheck(the_user, pass) ||
+ ldapCheck(the_user,pass)))
+ {
+@@ -513,7 +510,7 @@
+ {
+ fxAssert(IS(LOGGEDIN), "ADMIN command permitted when not logged in");
+ // NB: null adminWd is permitted
+- if ((strcmp(crypt(pass, adminWd), adminWd) != 0) && !pamIsAdmin()) {
++ if ((strcmp(Sys::crypt(pass, adminWd), adminWd) != 0) && !pamIsAdmin()) {
+ if (++adminAttempts >= maxAdminAttempts) {
+ reply(530, "Password incorrect (closing connection).");
+ logNotice("Repeated admin failures from %s [%s]"
+diff -urN hylafax-5.5.4/hfaxd/SNPPServer.c++ hylafax-5.5.4-libc217/hfaxd/SNPPServer.c++
+--- hylafax-5.5.4/hfaxd/SNPPServer.c++ 2013-08-07 01:23:35.000000000 +0200
++++ hylafax-5.5.4-libc217/hfaxd/SNPPServer.c++ 2013-11-13 12:55:42.000000000 +0100
+@@ -36,9 +36,6 @@
+ #include "RE.h"
+
+ #include <ctype.h>
+-#if HAS_CRYPT_H
+-#include <crypt.h>
+-#endif
+
+ extern "C" {
+ #include <netdb.h>
+@@ -1003,7 +1000,7 @@
+
+ if (checkUser(loginID)) {
+ if (passWd != "") {
+- if (pass[0] == '\0' || !(streq(crypt(pass, passWd), passWd) || pamCheck(the_user, pass))) {
++ if (pass[0] == '\0' || !(streq(Sys::crypt(pass, passWd), passWd) || pamCheck(the_user, pass))) {
+ if (++loginAttempts >= maxLoginAttempts) {
+ reply(421, "Login incorrect (closing connection).");
+ logNotice("Repeated SNPP login failures for user %s from %s [%s]"
+diff -urN hylafax-5.5.4/hfaxd/User.c++ hylafax-5.5.4-libc217/hfaxd/User.c++
+--- hylafax-5.5.4/hfaxd/User.c++ 2013-08-07 01:23:35.000000000 +0200
++++ hylafax-5.5.4-libc217/hfaxd/User.c++ 2013-11-13 12:55:19.000000000 +0100
+@@ -30,9 +30,6 @@
+
+ #include <ctype.h>
+ #include <pwd.h>
+-#if HAS_CRYPT_H
+-#include <crypt.h>
+-#endif
+ #include <math.h>
+
+ #ifndef CHAR_BIT
+@@ -374,7 +371,7 @@
+ #else
+ to64(&salt[0], random(), 2);
+ #endif
+- result = crypt(pass, salt);
++ result = Sys::crypt(pass, salt);
+ return (true);
+ }
+
+diff -urN hylafax-5.5.4/util/Sys.h hylafax-5.5.4-libc217/util/Sys.h
+--- hylafax-5.5.4/util/Sys.h 2013-08-07 01:23:35.000000000 +0200
++++ hylafax-5.5.4-libc217/util/Sys.h 2013-11-13 12:56:26.000000000 +0100
+@@ -44,6 +44,10 @@
+ #include <osfcn.h>
+ #endif
+
++#if HAS_CRYPT_H
++#include <crypt.h>
++#endif
++
+ /*
+ * Wrapper functions for C library calls.
+ *
+@@ -140,5 +144,8 @@
+ { return ::fopen(filename, mode); }
+
+ static int getOpenMax();
++
++ static const char* crypt(const char* key, const char* salt)
++ { const char* enc = ::crypt(key, salt); return enc ? enc : ""; }
+ };
+ #endif /* _Sys_ */
diff --git a/net-misc/hylafaxplus/files/hylafaxplus-conf b/net-misc/hylafaxplus/files/hylafaxplus-conf
new file mode 100644
index 000000000000..911a59db4078
--- /dev/null
+++ b/net-misc/hylafaxplus/files/hylafaxplus-conf
@@ -0,0 +1,29 @@
+# Spool directory for HylaFAX
+spooldir="/var/spool/fax"
+
+# Faxq program path
+faxq="/usr/sbin/faxq"
+
+# hfaxd program path
+hfaxd="/usr/sbin/hfaxd"
+
+# faxgetty program path
+faxgetty="/usr/sbin/faxgetty"
+
+# Port of the hfaxd daemon for new protocol
+faxport=hylafax
+
+# Address used by hfaxd as binding address.
+faxbind="127.0.0.1"
+
+# Port of the hfaxd daemon for SNPP protocol
+snppport=444
+
+# Port of the hfaxd daemon for old protocol
+oldprotoport=4557
+
+# newproto | oldproto | snpp | any
+mode="newproto"
+
+# Directory where the pidfiles of HylaFAX are saved.
+piddir="/var/run"
diff --git a/net-misc/hylafaxplus/files/hylafaxplus-init b/net-misc/hylafaxplus/files/hylafaxplus-init
new file mode 100644
index 000000000000..47c16fdff2f2
--- /dev/null
+++ b/net-misc/hylafaxplus/files/hylafaxplus-init
@@ -0,0 +1,176 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Author Geaaru
+# Distributed under the terms of the GNU General Public License v2
+
+opts="zap"
+
+depend() {
+ use lo
+}
+
+checkconfig() {
+ ebegin "Check hylafax server configuration..."
+
+ if [ x$spooldir == x ] ; then
+ eerror "No spooldir directory defined"
+ return 1
+ else
+ SPOOL=$spooldir
+ einfo "Use spool directory $SPOOL"
+ fi
+
+ if [ x$mode == x ] ; then
+ eerror "No mode defined"
+ return 1
+ fi
+
+ if [ ! -f $SPOOL/etc/setup.cache ] ; then
+ eerror "No $SPOOL/etc/setup.cache file founded. Use faxsetup command"
+ return 1
+ fi
+
+ if [[ x$hfaxd == x || ! -f $hfaxd ]] ; then
+ eerror "No hfaxd daemon founded"
+ return 1
+ fi
+
+ if [[ x$faxq == x || ! -f $faxq ]] ; then
+ eerror "No faxq program founded"
+ return 1
+ fi
+
+ if [[ x$faxgetty == x || ! -f $faxgetty ]] ; then
+ eerror "No faxgetty program founded"
+ return 1
+ fi
+
+ if [ x$faxbind == x ] ; then
+ eerror "No binding address supply"
+ return 1
+ fi
+
+ if [ x$piddir == x ] ; then
+ PIDDIR=$SPOOL
+ else
+ PIDDIR=$piddir
+ fi
+
+
+ hfaxd_args="-l $faxbind -q $SPOOL"
+
+ case $mode in
+ newproto)
+ if [[ x$faxport == x ]] ; then
+ eerror "No faxport defined"
+ return 1
+ fi
+ hfaxd_args="$hfaxd_args -i $faxport"
+ ;;
+ oldproto)
+ if [[ x$oldprotoport == x ]] ; then
+ eerror "No oldprotoport defined"
+ return 1
+ fi
+ hfaxd_args="$hfaxd_args -o $oldprotoport"
+ ;;
+ snpp)
+ if [[ x$snppport == x ]] ; then
+ eerror "No snppport defined"
+ return 1
+ fi
+ hfaxd_args="$hfaxd_args -s $snppport"
+ ;;
+ any)
+ if [[ x$faxport == x || x$snppport == x || x$oldprotoport == x ]] ; then
+ eerror "No port data founded for old services"
+ return 1
+ fi
+ hfaxd_args="$hfaxd_args -i $faxport -s $snppport -o $oldprotoport"
+ ;;
+ *)
+ eerror "Invalid mode"
+ return 1
+ ;;
+
+ esac
+
+ faxq_args="-q $SPOOL"
+
+ # workaround for manage save of pidfile with start-stop-daemon
+ hfaxd_args="$hfaxd_args -d"
+ faxq_args="$faxq_args -D"
+
+ return 0
+}
+
+start() {
+ local result
+
+ checkconfig || return 1
+
+ ebegin "Starting HylaFAX server daemons"
+
+ start_faxq
+ result=$?
+
+ if [ $result -ne 0 ] ; then
+ eerror "Error on start $faxq daemon"
+ return 1
+ fi
+
+ start_hfaxd
+ result=$?
+
+ eend $result
+}
+
+start_hfaxd() {
+ local arguments="--start \
+ --make-pidfile --pidfile $PIDDIR/hfaxd.pid"
+
+ einfo "Starting $hfaxd with args $hfaxd_args"
+
+ start-stop-daemon -b ${arguments} --exec $hfaxd -- $hfaxd_args > /dev/null 2>&1
+
+ return $?;
+}
+
+start_faxq() {
+ local arguments="--start \
+ --make-pidfile --pidfile $PIDDIR/faxq.pid"
+ einfo "Starting $faxq ... "
+
+ start-stop-daemon -b ${arguments} --exec $faxq -- $faxq_args > /dev/null 2>&1
+
+ return $?
+}
+
+stop() {
+ checkconfig || return 1
+
+ ebegin "Stopping HylaFAX server daemons"
+
+ start-stop-daemon --stop --quiet --pidfile $PIDDIR/hfaxd.pid
+ start-stop-daemon --stop --quiet --pidfile $PIDDIR/faxq.pid
+ eend $?
+}
+
+zap() {
+ checkconfig || return 1
+
+ ebegin "Zap HylaFAX server daemon files"
+
+ if [ -f $PIDFILE/hfaxd.pid ] ; then
+ rm -f $PIDFILE/hfaxd.pid
+ fi
+
+ if [ -f $PIDFILE/faxq.pid ] ; then
+ rm -f $PIDFILE/faxq.pid
+ fi
+}
+
+restart() {
+ stop
+ start
+}
diff --git a/net-misc/hylafaxplus/files/ldconfig-patch b/net-misc/hylafaxplus/files/ldconfig-patch
new file mode 100644
index 000000000000..8b0f4352d51f
--- /dev/null
+++ b/net-misc/hylafaxplus/files/ldconfig-patch
@@ -0,0 +1,10 @@
+--- faxd/Makefile.LINUXdso.original 2011-12-30 18:17:59.000000000 +0100
++++ faxd/Makefile.LINUXdso 2011-12-30 18:18:51.000000000 +0100
+@@ -37,7 +37,6 @@
+
+ installDSO: libfaxserver.${DSO}
+ ${PUTSERV} -root ${INSTALLROOT} -F ${LIBDIR} -m 755 -O libfaxserver.${DSO}
+- [ `id -u` -eq 0 ] && ( PATH=${PATH}:/sbin ldconfig ${LIBDIR} ) || ( echo "ldconfig is required to be run as user root at install time" )
+
+ uninstallDSO::
+ ${RM} -f ${LIBDIR}/libfaxserver.${DSO}
diff --git a/net-misc/hylafaxplus/hylafaxplus-5.5.4-r1.ebuild b/net-misc/hylafaxplus/hylafaxplus-5.5.4-r1.ebuild
new file mode 100644
index 000000000000..1c8f78090e61
--- /dev/null
+++ b/net-misc/hylafaxplus/hylafaxplus-5.5.4-r1.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils multilib pam toolchain-funcs
+
+MY_PN="${PN/plus/}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Enterprise client-server fax package for class 1 and 2 fax modems"
+HOMEPAGE="http://hylafax.sourceforge.net"
+SRC_URI="mirror://sourceforge/hylafax/${MY_P}.tar.gz"
+
+SLOT="0"
+LICENSE="hylafaxplus"
+KEYWORDS="amd64 x86"
+
+IUSE="jbig html ldap mgetty pam"
+
+DEPEND=">=sys-libs/zlib-1.1.4
+ app-text/ghostscript-gpl
+ virtual/mta
+ media-libs/tiff[jbig?]
+ virtual/jpeg
+ jbig? ( media-libs/jbigkit )
+ virtual/awk
+ ldap? ( net-nds/openldap )
+ pam? ( virtual/pam )
+ mgetty? ( net-dialup/mgetty[-fax] )"
+
+RDEPEND="${DEPEND}
+ net-mail/metamail
+ !net-dialup/sendpage"
+
+S="${WORKDIR}/${MY_P}"
+
+export CONFIG_PROTECT="${CONFIG_PROTECT} /var/spool/fax/etc /usr/lib/fax"
+
+src_prepare() {
+ epatch "${FILESDIR}/ldconfig-patch"
+ epatch "${FILESDIR}/hylafax-cryptglibc.patch"
+
+ # force it not to strip binaries
+ for dir in etc util faxalter faxcover faxd faxmail faxrm faxstat \
+ hfaxd sendfax sendpage ; do
+ sed -i -e "s:-idb:-idb \"nostrip\" -idb:g" \
+ "${dir}"/Makefile.in || die "sed failed"
+ done
+
+ sed -i -e "s:hostname:hostname -f:g" util/{faxrcvd,pollrcvd}.sh.in || die "sed on hostname failed"
+
+ # Respect LDFLAGS(at least partially)
+ sed -i -e "/^LDFLAGS/s/LDOPTS}/LDOPTS} ${LDFLAGS}/" defs.in || die "sed on defs.in failed"
+
+ sed -i -e "s|-fpic|-fPIC|g" \
+ configure || die
+
+ epatch_user
+}
+
+src_configure() {
+ do_configure() {
+ echo ./configure --nointeractive ${1}
+ # eval required for quoting in ${my_conf} to work properly, better way?
+ eval ./configure --nointeractive ${1} || die "./configure failed"
+ }
+ local my_conf="
+ --with-DIR_BIN=/usr/bin
+ --with-DIR_SBIN=/usr/sbin
+ --with-DIR_LIB=/usr/$(get_libdir)
+ --with-DIR_LIBEXEC=/usr/sbin
+ --with-DIR_LIBDATA=/usr/$(get_libdir)/fax
+ --with-DIR_LOCALE=/usr/share/locale
+ --with-DIR_LOCKS=/var/lock
+ --with-DIR_MAN=/usr/share/man
+ --with-DIR_SPOOL=/var/spool/fax
+ --with-DIR_HTML=/usr/share/doc/${P}/html
+ --with-DIR_CGI="${WORKDIR}"
+ --with-PATH_DPSRIP=/var/spool/fax/bin/ps2fax
+ --with-PATH_IMPRIP=\"\"
+ --with-SYSVINIT=no
+ --with-REGEX=yes
+ --with-LIBTIFF=\"-ltiff -ljpeg -lz\"
+ --with-OPTIMIZER=\"${CFLAGS}\"
+ --with-DSO=auto
+ --with-HTML=$(usex html)"
+
+ if use mgetty; then
+ my_conf="${my_conf} \
+ --with-PATH_GETTY=/sbin/mgetty \
+ --with-PATH_EGETTY=/sbin/mgetty \
+ --with-PATH_VGETTY=/usr/sbin/vgetty"
+ else
+ # GETTY defaults to /sbin/agetty
+ my_conf="${my_conf} \
+ --with-PATH_EGETTY=/bin/false \
+ --with-PATH_VGETTY=/bin/false"
+ fi
+
+ #--enable-pam isn't valid
+ use pam || my_conf="${my_conf} $(use_enable pam)"
+ use ldap || my_conf="${my_conf} $(use_enable ldap)"
+ use jbig || my_conf="${my_conf} $(use_enable jbig)"
+
+ tc-export CC CXX AR RANLIB
+
+ do_configure "${my_conf}"
+}
+
+src_compile() {
+ # Parallel building is borked
+ emake -j1
+}
+
+src_install() {
+ dodir /usr/{bin,sbin} /usr/$(get_libdir)/fax /usr/share/man
+ dodir /var/spool /var/spool/recvq /var/spool/fax
+ fowners uucp:uucp /var/spool/fax
+ fperms 0600 /var/spool/fax
+ dodir "/usr/share/doc/${P}/samples"
+
+ emake DESTDIR="${D}" \
+ BIN="${D}/usr/bin" \
+ SBIN="${D}/usr/sbin" \
+ LIBDIR="${D}/usr/$(get_libdir)" \
+ LIB="${D}/usr/$(get_libdir)" \
+ LIBEXEC="${D}/usr/sbin" \
+ LIBDATA="${D}/usr/$(get_libdir)/fax" \
+ DIR_LOCALE="${D}/usr/share/locale" \
+ MAN="${D}/usr/share/man" \
+ SPOOL="${D}/var/spool/fax" \
+ HTMLDIR="${D}/usr/share/doc/${PF}/html" \
+ install
+
+ keepdir /var/spool/fax/{archive,client,etc,pollq,recvq,tmp}
+ keepdir /var/spool/fax/{status,sendq,log,info,doneq,docq,dev}
+
+ generate_files # in this case, it only generates the env.d entry
+
+ einfo "Adding env.d entry for ${PN}"
+ doenvd "${T}/99${PN}"
+
+ newconfd "${FILESDIR}/${PN}-conf" ${PN}
+ newinitd "${FILESDIR}/${PN}-init" ${PN}
+
+ use pam && pamd_mimic_system ${MY_PN} auth account session
+
+ dodoc CONTRIBUTORS README TODO
+ docinto samples
+}
+
+pkg_postinst() {
+ elog
+ elog "The faxonly USE flag has been removed; since ${PN} does not"
+ elog "require mgetty, and certain fax files conflict, you must build"
+ elog "mgetty without fax support if you wish to use them both. You"
+ elog "may want to add both to package.use so any future updates are"
+ elog "correctly built:"
+ elog
+ elog " net-dialup/mgetty -fax"
+ elog " net-misc/hylafax [-mgetty|mgetty]"
+ elog
+ elog "See the docs and man pages for detailed configuration info."
+ elog
+ elog "Now run faxsetup and (if necessary) faxaddmodem."
+ elog
+}
+
+generate_files() {
+ cat <<-EOF > "${T}/99${PN}"
+ PATH="/var/spool/fax/bin"
+ CONFIG_PROTECT="/var/spool/fax/etc /usr/$(get_libdir)/fax"
+ EOF
+}
diff --git a/net-misc/hylafaxplus/hylafaxplus-5.5.5.ebuild b/net-misc/hylafaxplus/hylafaxplus-5.5.5.ebuild
new file mode 100644
index 000000000000..16fb6fdb980a
--- /dev/null
+++ b/net-misc/hylafaxplus/hylafaxplus-5.5.5.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils multilib pam toolchain-funcs
+
+MY_PN="${PN/plus/}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Enterprise client-server fax package for class 1 and 2 fax modems"
+HOMEPAGE="http://hylafax.sourceforge.net"
+SRC_URI="mirror://sourceforge/hylafax/${MY_P}.tar.gz"
+
+SLOT="0"
+LICENSE="hylafaxplus"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="jbig html ldap mgetty pam"
+
+DEPEND=">=sys-libs/zlib-1.1.4
+ app-text/ghostscript-gpl
+ virtual/mta
+ media-libs/tiff[jbig?]
+ virtual/jpeg
+ jbig? ( media-libs/jbigkit )
+ virtual/awk
+ ldap? ( net-nds/openldap )
+ pam? ( virtual/pam )
+ mgetty? ( net-dialup/mgetty[-fax] )"
+
+RDEPEND="${DEPEND}
+ net-mail/metamail
+ !net-dialup/sendpage"
+
+S="${WORKDIR}/${MY_P}"
+
+export CONFIG_PROTECT="${CONFIG_PROTECT} /var/spool/fax/etc /usr/lib/fax"
+
+src_prepare() {
+ epatch "${FILESDIR}/ldconfig-patch"
+ epatch "${FILESDIR}/hylafax-cryptglibc.patch"
+
+ # force it not to strip binaries
+ for dir in etc util faxalter faxcover faxd faxmail faxrm faxstat \
+ hfaxd sendfax sendpage ; do
+ sed -i -e "s:-idb:-idb \"nostrip\" -idb:g" \
+ "${dir}"/Makefile.in || die "sed failed"
+ done
+
+ sed -i -e "s:hostname:hostname -f:g" util/{faxrcvd,pollrcvd}.sh.in || die "sed on hostname failed"
+
+ # Respect LDFLAGS(at least partially)
+ sed -i -e "/^LDFLAGS/s/LDOPTS}/LDOPTS} ${LDFLAGS}/" defs.in || die "sed on defs.in failed"
+
+ sed -i -e "s|-fpic|-fPIC|g" \
+ configure || die
+
+ epatch_user
+}
+
+src_configure() {
+ do_configure() {
+ echo ./configure --nointeractive ${1}
+ # eval required for quoting in ${my_conf} to work properly, better way?
+ eval ./configure --nointeractive ${1} || die "./configure failed"
+ }
+ local my_conf="
+ --with-DIR_BIN=/usr/bin
+ --with-DIR_SBIN=/usr/sbin
+ --with-DIR_LIB=/usr/$(get_libdir)
+ --with-DIR_LIBEXEC=/usr/sbin
+ --with-DIR_LIBDATA=/usr/$(get_libdir)/fax
+ --with-DIR_LOCALE=/usr/share/locale
+ --with-DIR_LOCKS=/var/lock
+ --with-DIR_MAN=/usr/share/man
+ --with-DIR_SPOOL=/var/spool/fax
+ --with-DIR_HTML=/usr/share/doc/${P}/html
+ --with-DIR_CGI="${WORKDIR}"
+ --with-PATH_DPSRIP=/var/spool/fax/bin/ps2fax
+ --with-PATH_IMPRIP=\"\"
+ --with-SYSVINIT=no
+ --with-REGEX=yes
+ --with-LIBTIFF=\"-ltiff -ljpeg -lz\"
+ --with-OPTIMIZER=\"${CFLAGS}\"
+ --with-DSO=auto
+ --with-HTML=$(usex html)"
+
+ if use mgetty; then
+ my_conf="${my_conf} \
+ --with-PATH_GETTY=/sbin/mgetty \
+ --with-PATH_EGETTY=/sbin/mgetty \
+ --with-PATH_VGETTY=/usr/sbin/vgetty"
+ else
+ # GETTY defaults to /sbin/agetty
+ my_conf="${my_conf} \
+ --with-PATH_EGETTY=/bin/false \
+ --with-PATH_VGETTY=/bin/false"
+ fi
+
+ #--enable-pam isn't valid
+ use pam || my_conf="${my_conf} $(use_enable pam)"
+ use ldap || my_conf="${my_conf} $(use_enable ldap)"
+ use jbig || my_conf="${my_conf} $(use_enable jbig)"
+
+ tc-export CC CXX AR RANLIB
+
+ do_configure "${my_conf}"
+}
+
+src_compile() {
+ # Parallel building is borked
+ emake -j1
+}
+
+src_install() {
+ dodir /usr/{bin,sbin} /usr/$(get_libdir)/fax /usr/share/man
+ dodir /var/spool /var/spool/recvq /var/spool/fax
+ fowners uucp:uucp /var/spool/fax
+ fperms 0600 /var/spool/fax
+ dodir "/usr/share/doc/${P}/samples"
+
+ emake DESTDIR="${D}" \
+ BIN="${D}/usr/bin" \
+ SBIN="${D}/usr/sbin" \
+ LIBDIR="${D}/usr/$(get_libdir)" \
+ LIB="${D}/usr/$(get_libdir)" \
+ LIBEXEC="${D}/usr/sbin" \
+ LIBDATA="${D}/usr/$(get_libdir)/fax" \
+ DIR_LOCALE="${D}/usr/share/locale" \
+ MAN="${D}/usr/share/man" \
+ SPOOL="${D}/var/spool/fax" \
+ HTMLDIR="${D}/usr/share/doc/${PF}/html" \
+ install
+
+ keepdir /var/spool/fax/{archive,client,etc,pollq,recvq,tmp}
+ keepdir /var/spool/fax/{status,sendq,log,info,doneq,docq,dev}
+
+ generate_files # in this case, it only generates the env.d entry
+
+ einfo "Adding env.d entry for ${PN}"
+ doenvd "${T}/99${PN}"
+
+ newconfd "${FILESDIR}/${PN}-conf" ${PN}
+ newinitd "${FILESDIR}/${PN}-init" ${PN}
+
+ use pam && pamd_mimic_system ${MY_PN} auth account session
+
+ dodoc CONTRIBUTORS README TODO
+ docinto samples
+}
+
+pkg_postinst() {
+ elog
+ elog "The faxonly USE flag has been removed; since ${PN} does not"
+ elog "require mgetty, and certain fax files conflict, you must build"
+ elog "mgetty without fax support if you wish to use them both. You"
+ elog "may want to add both to package.use so any future updates are"
+ elog "correctly built:"
+ elog
+ elog " net-dialup/mgetty -fax"
+ elog " net-misc/hylafax [-mgetty|mgetty]"
+ elog
+ elog "See the docs and man pages for detailed configuration info."
+ elog
+ elog "Now run faxsetup and (if necessary) faxaddmodem."
+ elog
+}
+
+generate_files() {
+ cat <<-EOF > "${T}/99${PN}"
+ PATH="/var/spool/fax/bin"
+ CONFIG_PROTECT="/var/spool/fax/etc /usr/$(get_libdir)/fax"
+ EOF
+}
diff --git a/net-misc/hylafaxplus/metadata.xml b/net-misc/hylafaxplus/metadata.xml
new file mode 100644
index 000000000000..69548ea80075
--- /dev/null
+++ b/net-misc/hylafaxplus/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-dialup</herd>
+ <maintainer>
+ <email>mattm@gentoo.org</email>
+ <name>Matthew Marlowe</name>
+ </maintainer>
+ <longdescription>
+ Enterprise client-server fax package for class 1 and 2 fax modems.
+ </longdescription>
+ <use>
+ <flag name="jbig">JBIG Fax Compression Support</flag>
+ <flag name="pam">hfaxd authentication via PAM</flag>
+ <flag name="mgetty">Receive faxes via serial port connections</flag>
+ <flag name="html">Convert faxes into html email</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">hylafax</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/i2pd/Manifest b/net-misc/i2pd/Manifest
new file mode 100644
index 000000000000..0712c33d631e
--- /dev/null
+++ b/net-misc/i2pd/Manifest
@@ -0,0 +1,2 @@
+DIST i2pd-0.5.0.tar.gz 352460 SHA256 7f2033fe1c380c458722d68f611d0fa69a844ceba71db13a918adac6e01a0594 SHA512 08c51dc5fa3712af54b7dcc9f4524fb19d7b42a279646c7852efdf1fd49cf4ea24192c936229954c3733ba4bcbc480205bcfeca739ffae3642f5c62bd24e0cf6 WHIRLPOOL 1812a8733f17cd6b9885cf8af3ad0412f238356121118d46fbed53cb826aaa6c878a045adb69e0a692fd5cd3fc720192c635f4e594d3d42efb2116f14bbba9e9
+DIST i2pd-0.6.0.tar.gz 360829 SHA256 149a8c2d870ebc3988aea06eec906c9e968b3d89ae282bd3b2b5ead205f7c3b7 SHA512 084c75c5f972dbc07740119c3ae1711924cf740391703a95752164eab7a04d6cea0cfb302530e1e1bebafb54f9eed552e747479ae55fb053e824cdf059ab3266 WHIRLPOOL a858a49173755e052f31a95f4f7075965dac0c89943a7dc05c3c88d51b646ab86a7510a9533e33d9c5f0e7736e9f702f6fd0de4e6a841cc3ec57ea5aaf2b991c
diff --git a/net-misc/i2pd/files/99i2pd b/net-misc/i2pd/files/99i2pd
new file mode 100644
index 000000000000..3cf3b46797c4
--- /dev/null
+++ b/net-misc/i2pd/files/99i2pd
@@ -0,0 +1 @@
+CONFIG_PROTECT="/var/lib/i2pd/certificates"
diff --git a/net-misc/i2pd/files/i2pd.1 b/net-misc/i2pd/files/i2pd.1
new file mode 100644
index 000000000000..4dc6958eed1c
--- /dev/null
+++ b/net-misc/i2pd/files/i2pd.1
@@ -0,0 +1,101 @@
+.TH I2PD "1" "November 29, 2014"
+
+.SH NAME
+i2pd \- Load-balanced unspoofable packet switching network
+
+.SH SYNOPSIS
+.B i2pd
+[\fIOPTION1\fR) [\fIOPTION2\fR]...
+
+.SH DESCRIPTION
+i2pd
+is a C++ implementation of the router for the I2P anonymizing network, offering
+a simple layer that identity-sensitive applications can use to securely
+communicate. All data is wrapped with several layers of encryption, and the
+network is both distributed and dynamic, with no trusted parties.
+
+.PP
+Any of the configuration options below can be used in the \fI2PDOPTIONS\fR variable in \fI/etc/conf.d/i2pd\fR.
+.BR
+.TP
+\fB\-\-host=\fR
+The external IP
+.TP
+\fB\-\-port=\fR
+The external port to listen on
+.TP
+\fB\-\-httpport=\fR
+The HTTP port to listen on
+.TP
+\fB\-\-log=\fR[\fI1\fR|\fI0\fR]
+.br
+Enable of disable logging to a file. \fI1\fR for yes, \fI0\fR for no. (default: \fI0\fR, off)
+.TP
+\fB\-\-daemon=\fR[\fI1\fR|\fI0\fR]
+Enable or disable daemon mode. Daemon mode is enabled with \fI1\fR and disabled with \fI0\fR. (default: \fI0\fR, off)
+.TP
+\fB\-\-service=\fR[\fI1\fR|\fI0\fR]
+If enabled, system folders (\fB/var/run/i2pd.pid\fR, \fB/var/log/i2pd.log\fR, \fB/var/lib/i2pd\fR) will be used. If off, \fB$HOME/.i2pd\fR will be used instead. (default: \fI0\fR, off).
+.TP
+\fB\-\-unreachable=\fR[\fI1\fR|\fI0\fR]
+\fI1\fR if router is declared as unreachable and works through introducers. (default: \fI0\fR, off)
+.TP
+\fB\-\-v6=\fR[\fI1\fR|\fI0\fR]
+\fI1\fR if \fBi2pd\fR should communicate via IPv6. (default: \fI0\fR, off)
+.TP
+\fB\-\-httpproxyport=\fR
+The local port for the HTTP Proxy to listen on (default: \fI4446\fR)
+.TP
+\fB\-\-socksproxyport=\fR
+The local port for the SOCKS proxy to listen on (default: \fI4447\fR)
+.TP
+\fB\-\-ircport=\fR
+The local port of IRC tunnel to listen on. (default: \fI6668\fR)
+.TP
+\fB\-\-ircdest=\fR
+I2P destination address of an IRC server to connect to, e.g. \fIirc.postman.i2p\fR
+.TP
+\fB\-\-irckeys=\fR
+optional keys file for local destination
+.TP
+\fB\-\-eepkeys=\fR
+File name containing destination keys. For example \fIprivKeys.dat\fR
+.TP
+\fB\-\-eephost=\fR
+Address incoming trafic is forwarded to, \fI127.0.0.1\fR by default
+.TP
+\fB\-\-eepport=\fR
+Port incoming trafic forward to. \fI80\fR by default
+.TP
+\fB\-\-samport=\fR
+Port of SAM bridge. Usually \fI7656\fR. SAM will not be enabled if this is not set. (default: unset)
+.TP
+\fB\-\-bobport=\fR
+Port of BOB command channel. Usually \fI2827\fR. BOB will not be enabled if this is not set. (default: unset)
+
+.SH FILES
+.PP
+/etc/conf.d/i2pd
+.RS 4
+i2pd service configuration file
+.RE
+.PP
+/etc/i2pd.conf
+.RS 4
+i2pd configuration file (when running as a system service). You may override the parameters here.
+.RE
+.PP
+/var/lib/i2pd/
+.RS 4
+i2pd profile directory (when running as a system service, see \fB\-\-service=\fR above)
+.RE
+.PP
+$HOME/.i2pd
+.RS 4
+i2pd profile directory (when running as a normal user)
+.SH AUTHOR
+This manual page was written by kytv <killyourtv@i2pmail.org> for the Debian system (but may be used by others). And adapted by Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org> to Gentoo.
+.BR
+Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation
+.BR
+On Gentoo systems, the complete text of the GNU General Public License Version 2 can be found in /usr/portage/licenses/GPL-2
diff --git a/net-misc/i2pd/files/i2pd.conf b/net-misc/i2pd/files/i2pd.conf
new file mode 100644
index 000000000000..10675e682741
--- /dev/null
+++ b/net-misc/i2pd/files/i2pd.conf
@@ -0,0 +1,4 @@
+log = 1
+daemon = 1
+service = 1
+
diff --git a/net-misc/i2pd/files/i2pd.confd b/net-misc/i2pd/files/i2pd.confd
new file mode 100644
index 000000000000..7913af7e6d00
--- /dev/null
+++ b/net-misc/i2pd/files/i2pd.confd
@@ -0,0 +1,6 @@
+I2PD_USER="${I2PD_USER:-i2pd}"
+I2PD_GROUP="${I2PD_GROUP:-i2pd}"
+I2PD_LOG="/var/log/i2pd.log"
+I2PD_PID="/var/run/i2pd.pid"
+# Options to i2pd
+I2PDOPTIONS="--conf=/etc/i2pd.conf"
diff --git a/net-misc/i2pd/files/i2pd.initd b/net-misc/i2pd/files/i2pd.initd
new file mode 100644
index 000000000000..cc3d2349b970
--- /dev/null
+++ b/net-misc/i2pd/files/i2pd.initd
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="C++ daemon for accessing the I2P network"
+
+depend() {
+ use dns logger netmount
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ checkpath -f "${I2PD_LOG}" -o "${I2PD_USER}:${I2PD_GROUP}"
+ checkpath -f "${I2PD_PID}" -o "${I2PD_USER}:${I2PD_GROUP}"
+ start-stop-daemon -S -b -u "${I2PD_USER}:${I2PD_GROUP}" /usr/bin/i2pd -- ${I2PDOPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon -K -p "${I2PD_PID}"
+ eend $?
+}
diff --git a/net-misc/i2pd/files/i2pd.logrotate b/net-misc/i2pd/files/i2pd.logrotate
new file mode 100644
index 000000000000..790cd2a2693d
--- /dev/null
+++ b/net-misc/i2pd/files/i2pd.logrotate
@@ -0,0 +1,14 @@
+/var/log/i2pd.log {
+ rotate 4
+ weekly
+ missingok
+ notifempty
+ compress
+ delaycompress
+ copytruncate
+ create 640 i2pd i2pd
+ postrotate
+ /etc/init.d/i2pd restart >/dev/null
+ endscript
+}
+
diff --git a/net-misc/i2pd/files/i2pd.service b/net-misc/i2pd/files/i2pd.service
new file mode 100644
index 000000000000..7f44cde2b2f3
--- /dev/null
+++ b/net-misc/i2pd/files/i2pd.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=C++ daemon for accessing the I2P network
+After=network.target
+
+[Service]
+Type=forking
+Restart=on-abnormal
+PIDFile=/var/run/i2pd.pid
+User=i2pd
+Group=i2pd
+PermissionsStartOnly=yes
+ExecStartPre=/bin/touch /var/run/i2pd.pid /var/log/i2pd.log
+ExecStartPre=/bin/chown i2pd:i2pd /run/i2pd.pid /var/log/i2pd.log
+ExecStart=/usr/lib/i2pd/i2p --conf=/etc/i2pd.conf
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/net-misc/i2pd/i2pd-0.5.0.ebuild b/net-misc/i2pd/i2pd-0.5.0.ebuild
new file mode 100644
index 000000000000..597fb3a4899b
--- /dev/null
+++ b/net-misc/i2pd/i2pd-0.5.0.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 eutils systemd user cmake-utils
+
+DESCRIPTION="A C++ daemon for accessing the I2P anonymous network"
+HOMEPAGE="https://github.com/PrivacySolutions/i2pd"
+SRC_URI="https://github.com/PrivacySolutions/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cpu_flags_x86_aes i2p-hardening static"
+
+RDEPEND="!static? ( >=dev-libs/boost-1.46[threads] )
+ !static? ( dev-libs/crypto++ )"
+DEPEND="${RDEPEND}
+ static? ( >=dev-libs/boost-1.46[static-libs,threads] )
+ static? ( dev-libs/crypto++[static-libs] )
+ >=dev-util/cmake-2.8
+ i2p-hardening? ( >=sys-devel/gcc-4.6 )
+ || ( >=sys-devel/gcc-4.6 >=sys-devel/clang-3.3 )"
+
+I2PD_USER="${I2PD_USER:-i2pd}"
+I2PD_GROUP="${I2PD_GROUP:-i2pd}"
+
+CMAKE_USE_DIR="${S}/build"
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use_with cpu_flags_x86_aes AESNI)
+ $(cmake-utils_use_with i2p-hardening HARDENING)
+ $(cmake-utils_use_with static STATIC)
+ -D WITH_LIBRARY=OFF
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ doman "${FILESDIR}/${PN}.1"
+ keepdir /var/lib/i2pd/
+ fowners "${I2PD_USER}:${I2PD_GROUP}" /var/lib/i2pd/
+ fperms 700 /var/lib/i2pd/
+ insinto /etc/
+ doins "${FILESDIR}/${PN}.conf"
+ fowners "${I2PD_USER}:${I2PD_GROUP}" "/etc/${PN}.conf"
+ fperms 600 "/etc/${PN}.conf"
+ dodir /usr/share/i2pd
+ cp -R "${S}/contrib/certificates" "${D}/var/lib/i2pd" || die "Install failed!"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ doenvd "${FILESDIR}/99${PN}"
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotate" "${PN}"
+}
+
+pkg_setup() {
+ enewgroup "${I2PD_GROUP}"
+ enewuser "${I2PD_USER}" -1 -1 "/var/lib/run/${PN}" "${I2PD_GROUP}"
+}
diff --git a/net-misc/i2pd/i2pd-0.6.0.ebuild b/net-misc/i2pd/i2pd-0.6.0.ebuild
new file mode 100644
index 000000000000..6dc85b5be117
--- /dev/null
+++ b/net-misc/i2pd/i2pd-0.6.0.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils systemd user cmake-utils
+
+DESCRIPTION="A C++ daemon for accessing the I2P anonymous network"
+HOMEPAGE="https://github.com/PrivacySolutions/i2pd"
+SRC_URI="https://github.com/PrivacySolutions/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cpu_flags_x86_aes i2p-hardening static"
+
+RDEPEND="!static? ( >=dev-libs/boost-1.46[threads] )
+ !static? ( dev-libs/crypto++ )"
+DEPEND="${RDEPEND}
+ static? ( >=dev-libs/boost-1.46[static-libs,threads] )
+ static? ( dev-libs/crypto++[static-libs] )
+ >=dev-util/cmake-2.8.5
+ i2p-hardening? ( >=sys-devel/gcc-4.6 )
+ || ( >=sys-devel/gcc-4.6 >=sys-devel/clang-3.3 )"
+
+I2PD_USER="${I2PD_USER:-i2pd}"
+I2PD_GROUP="${I2PD_GROUP:-i2pd}"
+
+CMAKE_USE_DIR="${S}/build"
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use_with cpu_flags_x86_aes AESNI)
+ $(cmake-utils_use_with i2p-hardening HARDENING)
+ $(cmake-utils_use_with static STATIC)
+ -DWITH_LIBRARY=OFF
+ -DWITH_BINARY=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc README.md
+ doman "${FILESDIR}/${PN}.1"
+ keepdir /var/lib/i2pd/
+ fowners "${I2PD_USER}:${I2PD_GROUP}" /var/lib/i2pd/
+ fperms 700 /var/lib/i2pd/
+ insinto /etc/
+ doins "${FILESDIR}/${PN}.conf"
+ fowners "${I2PD_USER}:${I2PD_GROUP}" "/etc/${PN}.conf"
+ fperms 600 "/etc/${PN}.conf"
+ dodir /usr/share/i2pd
+ cp -R "${S}/contrib/certificates" "${D}/var/lib/i2pd" || die "Install failed!"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ doenvd "${FILESDIR}/99${PN}"
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotate" "${PN}"
+}
+
+pkg_setup() {
+ enewgroup "${I2PD_GROUP}"
+ enewuser "${I2PD_USER}" -1 -1 "/var/lib/run/${PN}" "${I2PD_GROUP}"
+}
diff --git a/net-misc/i2pd/i2pd-9999.ebuild b/net-misc/i2pd/i2pd-9999.ebuild
new file mode 100644
index 000000000000..3dfbbe8b577f
--- /dev/null
+++ b/net-misc/i2pd/i2pd-9999.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils systemd user git-2 cmake-multilib
+
+DESCRIPTION="A C++ daemon for accessing the I2P anonymous network"
+HOMEPAGE="https://github.com/PrivacySolutions/i2pd"
+SRC_URI=""
+EGIT_REPO_URI="git://github.com/PrivacySolutions/i2pd"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="cpu_flags_x86_aes i2p-hardening library static"
+
+RDEPEND="!static? ( >=dev-libs/boost-1.46[threads] )
+ !static? ( dev-libs/crypto++ )
+ library? ( >=dev-libs/boost-1.46[threads,${MULTILIB_USEDEP}] )
+ library? ( dev-libs/crypto++[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ static? ( >=dev-libs/boost-1.46[static-libs,threads] )
+ static? ( dev-libs/crypto++[static-libs] )
+ >=dev-util/cmake-2.8.5
+ i2p-hardening? ( >=sys-devel/gcc-4.6 )
+ || ( >=sys-devel/gcc-4.6 >=sys-devel/clang-3.3 )"
+
+I2PD_USER="${I2PD_USER:-i2pd}"
+I2PD_GROUP="${I2PD_GROUP:-i2pd}"
+
+CMAKE_USE_DIR="${S}/build"
+
+multilib_src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use_with cpu_flags_x86_aes AESNI)
+ $(cmake-utils_use_with i2p-hardening HARDENING)
+ $(cmake-utils_use_with library LIBRARY)
+ $(cmake-utils_use_with static STATIC)
+ $(multilib_is_native_abi && echo -DWITH_BINARY=ON \
+ || echo -DWITH_BINARY=OFF)
+ )
+ (multilib_is_native_abi || use library) && cmake-utils_src_configure
+}
+
+multilib_src_compile() {
+ (multilib_is_native_abi || use library) && cmake-utils_src_compile
+}
+
+multilib_src_install() {
+ (multilib_is_native_abi || use library) && cmake-utils_src_install
+}
+
+multilib_src_install_all() {
+ dodoc README.md
+ doman "${FILESDIR}/${PN}.1"
+ keepdir /var/lib/i2pd/
+ fowners "${I2PD_USER}:${I2PD_GROUP}" /var/lib/i2pd/
+ fperms 700 /var/lib/i2pd/
+ insinto /etc/
+ doins "${FILESDIR}/${PN}.conf"
+ fowners "${I2PD_USER}:${I2PD_GROUP}" "/etc/${PN}.conf"
+ fperms 600 "/etc/${PN}.conf"
+ dodir /usr/share/i2pd
+ cp -R "${S}/contrib/certificates" "${D}/var/lib/i2pd" || die "Install failed!"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ doenvd "${FILESDIR}/99${PN}"
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotate" "${PN}"
+}
+
+pkg_setup() {
+ enewgroup "${I2PD_GROUP}"
+ enewuser "${I2PD_USER}" -1 -1 "/var/lib/run/${PN}" "${I2PD_GROUP}"
+}
diff --git a/net-misc/i2pd/metadata.xml b/net-misc/i2pd/metadata.xml
new file mode 100644
index 000000000000..4f8a4cad1613
--- /dev/null
+++ b/net-misc/i2pd/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>klondike@gentoo.org</email>
+ <name>Francisco Blas Izquierdo Riera</name>
+ </maintainer>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <use>
+ <flag name="i2p-hardening">
+ Compile with hardening on vanilla compilers/linkers
+ </flag>
+ <flag name="library">
+ Build the libi2pd library
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="github">PrivacySolutions/i2pd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/iaxmodem/Manifest b/net-misc/iaxmodem/Manifest
new file mode 100644
index 000000000000..f20834ac887c
--- /dev/null
+++ b/net-misc/iaxmodem/Manifest
@@ -0,0 +1 @@
+DIST iaxmodem-1.2.0.tar.gz 3075769 SHA256 fa263c0df0870cb8133c4bee141146ca5db47ece6db50899a6acf508d76591ed
diff --git a/net-misc/iaxmodem/files/iaxmodem.cfg b/net-misc/iaxmodem/files/iaxmodem.cfg
new file mode 100644
index 000000000000..8a30e912e58b
--- /dev/null
+++ b/net-misc/iaxmodem/files/iaxmodem.cfg
@@ -0,0 +1,88 @@
+; Sample Configuration for IAXmodem
+;
+; Comments can be placed into the IAXmodem configuration files by beginning
+; them with a semicolon (";").
+;
+; Copy this file to the /etc/iaxmodem directory with a unique file name.
+; The name of the file will serve as the identifier, if you choose to
+; launch iaxmodem in non-daemon mode.
+
+
+; The "nodaemon" entry exempts the modem from inclusion with daemon use.
+; Comment out this line, if you want to use this config in daemon mode!
+
+nodaemon
+
+; The "device" entry is the full name of the device that you will be using
+; in your modem application. If running multiple instances of iaxmodem then
+; you will need a different device for each instance.
+
+device /dev/ttyIAX
+
+; The "owner" entry (formatted "user:group") is the system user and group
+; that IAXmodem should use for the created device.
+
+owner uucp:uucp
+
+; The "mode" entry is the permissions mode for the created device.
+
+mode 660
+
+; The "port" entry refers to the preferred port number on which to listen
+; for communications from the Asterisk server (so if you're using more than
+; one IAXmodem on a single IP address you will need to have each IAXmodem
+; configuration use a different port). You should not use "4569" if Asterisk
+; is already listening on port 4569.
+
+port 4570
+
+; The "refresh" entry indicates the preference on how frequently to refresh
+; the registration with the Asterisk server. (However, the actual refresh
+; value that is used will be negotiated between IAXmodem and the Asterisk
+; server.) By setting this to a value of "0" (zero), IAXmodem will not
+; register with the server, and thus the server should be configured to
+; communicate with IAXmodem on a static address.
+
+refresh 300
+
+; The "server", "peername", and "secret" entries refer to the server name
+; (or address), the registered peer name for the IAXmodem client, and the
+; registered secret (password) for the IAXmodem client.
+
+server 127.0.0.1
+peername iaxmodem
+secret password
+
+; The entries "cidname" and "cidnumber" refer to the Caller*ID presentation
+; that will be made by IAXmodem to the Asterisk server.
+
+cidname John Doe
+cidnumber 8005551212
+
+; The "codec" entry refers to the preferred audio codec. This can be
+; "slinear", "alaw", or "ulaw".
+
+codec slinear
+;codec alaw
+;codec ulaw
+
+; The "record" entry causes audio files to be recorded.
+
+;record
+
+; The "replay" entry causes the audio files to be replayed back.
+
+;replay
+
+; The "nojitterbuffer" entry disables the very simple iaxmodem jitterbuffer
+
+;nojitterbuffer
+
+; The "iax2debug" entry enables debugging output for IAX2.
+
+;iax2debug
+
+; The "dspdebug" entry enables debugging output for the DSPs.
+
+;dspdebug
+
diff --git a/net-misc/iaxmodem/files/iaxmodem.confd b/net-misc/iaxmodem/files/iaxmodem.confd
new file mode 100644
index 000000000000..5998d8a36e96
--- /dev/null
+++ b/net-misc/iaxmodem/files/iaxmodem.confd
@@ -0,0 +1,6 @@
+# Configfile for /etc/init.d/iaxmodem
+
+# Set the priority of the iaxmodem process
+# Value: (highest) -20..19 (lowest)
+#
+#IAXMODEM_NICE="-5"
diff --git a/net-misc/iaxmodem/files/iaxmodem.initd b/net-misc/iaxmodem/files/iaxmodem.initd
new file mode 100644
index 000000000000..07b2f2a902d4
--- /dev/null
+++ b/net-misc/iaxmodem/files/iaxmodem.initd
@@ -0,0 +1,43 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="IAXmodem"
+description_reload="Reread configuration file and make the appropriate changes"
+extra_started_commands="reload"
+command="/usr/sbin/iaxmodem"
+pidfile="/var/run/iaxmodem.pid"
+name="iaxmodem"
+
+depend() {
+ use asterisk
+ need net
+}
+
+start() {
+ ebegin "Starting ${description}"
+ start-stop-daemon --start --quiet --pidfile "${pidfile}" \
+ --env TMPDIR="/tmp" --nice ${IAXMODEM_NICE:-0} --exec "${command}"
+ eend ${?}
+}
+
+stop() {
+ local childs=""
+ ebegin "Stopping ${description}"
+ # start-stop-daemon doesn't kill childs reliable, so we
+ # use a combination of pgrep + start-stop-daemon + kill
+ [ -s "${pidfile}" ] && childs=$(pgrep -P $(cat "${pidfile}"))
+ start-stop-daemon --stop --quiet --pidfile "${pidfile}" --retry TERM/10/KILL/5
+ if eend ${?}; then
+ # if there're still childs running, kill them!
+ [ -n "${childs}" ] && kill -KILL ${childs} 2>/dev/null
+ return 0
+ fi
+}
+
+reload() {
+ ebegin "Reloading ${description} configuration"
+ start-stop-daemon --stop --signal HUP --pidfile "${pidfile}"
+ eend ${?}
+}
diff --git a/net-misc/iaxmodem/files/iaxmodem.logrotated b/net-misc/iaxmodem/files/iaxmodem.logrotated
new file mode 100644
index 000000000000..037aa94ef9dd
--- /dev/null
+++ b/net-misc/iaxmodem/files/iaxmodem.logrotated
@@ -0,0 +1,9 @@
+/var/log/iaxmodem/* {
+ notifempty
+ missingok
+ size 1000k
+ sharedscripts
+ postrotate
+ /etc/init.d/iaxmodem --ifstarted --quiet reload
+ endscript
+}
diff --git a/net-misc/iaxmodem/iaxmodem-1.2.0.ebuild b/net-misc/iaxmodem/iaxmodem-1.2.0.ebuild
new file mode 100644
index 000000000000..69f905318690
--- /dev/null
+++ b/net-misc/iaxmodem/iaxmodem-1.2.0.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils toolchain-funcs multilib
+
+DESCRIPTION="Software modem that uses an IAX channel instead of a traditional phone line"
+HOMEPAGE="http://sourceforge.net/projects/iaxmodem/"
+SRC_URI="mirror://sourceforge/iaxmodem/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+RDEPEND="media-libs/tiff
+ sys-process/procps"
+
+DEPEND="${RDEPEND}
+ sys-apps/sed"
+
+src_prepare() {
+ # fix header file position
+ sed -i -e 's:iax/iax-client\.h:iax-client.h:g' iaxmodem.c
+
+ # fix broken line terminators
+ sed -i -e 's:\r::g' -e 's:--s$:--:g' -e 's:$:\r:g' iaxmodem.inf
+
+ # fix installation of libiax2 headers (though we don't need them)
+ sed -i -e 's: \(\$(includedir)/\): $(DESTDIR)\1:g' lib/libiax2/src/Makefile.in
+
+ # patch configure (we compile libs for ourself)
+ sed -i -e 's:^\(cd\|./configure\):# \1:g' configure
+ sed -i -e 's:build-libiax build-libspandsp ::g' Makefile.in
+
+ # fix dumb x86_64 libdir handling
+ sed -i -e 's: \(x86_64-\*)\): _DISABLED_\1:g' lib/spandsp/configure
+}
+
+src_configure() {
+ cd "${S}/lib/libiax2"
+ econf --disable-static \
+ --libdir=/usr/$(get_libdir)/iaxmodem \
+ --datadir=/usr/share/iaxmodem/libiax2 || die "econf libiax2 failed"
+
+ cd "${S}/lib/spandsp"
+ econf --disable-static \
+ --libdir=/usr/$(get_libdir)/iaxmodem \
+ --datadir=/usr/share/iaxmodem || die "econf spandsp failed"
+
+ cd "${S}"
+ ./configure || die "configure iaxmodem failed"
+}
+
+src_compile() {
+ cd "${S}/lib/libiax2"
+ emake || die "emake libiax2 failed"
+
+ cd "${S}/lib/spandsp"
+ emake || die "emake spandsp failed"
+
+ cd "${S}"
+ emake OBJS="iaxmodem.o" CC=$(tc-getCC) \
+ LDFLAGS="${LDFLAGS} -Wl,-rpath,/usr/$(get_libdir)/iaxmodem \
+ -Llib/spandsp/src/.libs -Llib/libiax2/src/.libs -lm -lutil -ltiff -lspandsp -liax" \
+ || die "emake iaxmodem failed"
+}
+
+src_install() {
+ cd "${S}/lib/libiax2"
+ emake DESTDIR="${D}" install || die "install libiax2 failed"
+
+ cd "${S}/lib/spandsp"
+ emake DESTDIR="${D}" install || die "install spandsp failed"
+
+ cd "${S}"
+ dosbin iaxmodem || die "install failed"
+
+ # remove libiax and spandsp headers, we don't need them
+ rm -rf "${D}usr/include" "${D}usr/bin/iax-config"
+
+ # install init-script + conf
+ newinitd "${FILESDIR}/iaxmodem.initd" iaxmodem
+ newconfd "${FILESDIR}/iaxmodem.confd" iaxmodem
+
+ # install docs
+ doman iaxmodem.1
+ newdoc CHANGES ChangeLog
+ newdoc lib/libiax2/ChangeLog ChangeLog.libiax2
+ newdoc lib/spandsp/ChangeLog ChangeLog.spandsp
+ dodoc FAQ README lib/spandsp/DueDiligence
+
+ # install sample configs
+ insinto /etc/iaxmodem
+ newins "${FILESDIR}/iaxmodem.cfg" default
+ insinto /usr/share/iaxmodem
+ doins config.ttyIAX iaxmodem-cfg.ttyIAX iaxmodem.inf
+
+ # install logrotate rule
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/iaxmodem.logrotated" iaxmodem
+
+ # create log dir
+ keepdir /var/log/iaxmodem
+}
diff --git a/net-misc/iaxmodem/metadata.xml b/net-misc/iaxmodem/metadata.xml
new file mode 100644
index 000000000000..e81a784a2e5d
--- /dev/null
+++ b/net-misc/iaxmodem/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-dialup</herd>
+ <longdescription lang="en">
+ IAXmodem is a software modem written in C that uses an IAX channel
+ (commonly provided by an Asterisk PBX system) instead of a traditional
+ phone line and uses a DSP library instead of DSP hardware chipsets.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">iaxmodem</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/icaclient/Manifest b/net-misc/icaclient/Manifest
new file mode 100644
index 000000000000..83d84765a135
--- /dev/null
+++ b/net-misc/icaclient/Manifest
@@ -0,0 +1,2 @@
+DIST ICAClient-12.1.0-0.i386.rpm 3527204 SHA256 bbcca2014053c5f8683d9ee21cbc57525d2da9743e03d954df8f2f6e7d4063ec SHA512 de907bd993c5d886cd134ac70f11b09beb5ea64ed843707dbe38c2a69bef557f36bce12e1cd5ab5088693522d6f2131bd3490859d8c6959695e525266fb770af WHIRLPOOL 56ad811140b5914b02d9e0d44ac18222d46f62dd27f87b88752232e4f27c9bd14c81bfc7026b1a42c7d8d34acbf1a98bc53c4d640271c89b61381ca40e918501
+DIST ICAClient_12.1.0-0.x86_64.rpm 3527196 SHA256 ee45958acee5a83dec4d41065caf8ee75f73603f86fd352af79b604389f841ba SHA512 aa470ae6ef84cb2da168cb050aafc7f0461d78895e29c3269dbd63bbf9f0263cce75f332717d7ab94aa2ae9655046bb70f4cd53c7fa3e123fca40a3a3546d006 WHIRLPOOL 723512714b821b0e8eed2bc9eed2638d0ed86cae01cc8ad1298aac8c1b751bfbc009a06df4154c53aea469e76a1bf0e19bbda9f89930918a9cd5952438eecfc4
diff --git a/net-misc/icaclient/files/10ICAClient b/net-misc/icaclient/files/10ICAClient
new file mode 100644
index 000000000000..31be24e3380a
--- /dev/null
+++ b/net-misc/icaclient/files/10ICAClient
@@ -0,0 +1,3 @@
+PATH=/opt/Citrix/ICAClient
+ROOTPATH=/opt/Citrix/ICAClient
+ICAROOT=/opt/Citrix/ICAClient
diff --git a/net-misc/icaclient/icaclient-12.1.0.ebuild b/net-misc/icaclient/icaclient-12.1.0.ebuild
new file mode 100644
index 000000000000..ff8a279009eb
--- /dev/null
+++ b/net-misc/icaclient/icaclient-12.1.0.ebuild
@@ -0,0 +1,189 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib eutils rpm
+
+DESCRIPTION="ICA Client for Citrix Presentation servers"
+HOMEPAGE="http://www.citrix.com/"
+# NB: the amd64 package contains 32bit code only
+SRC_URI="x86? ( ICAClient-12.1.0-0.i386.rpm )
+ amd64? ( ICAClient_12.1.0-0.x86_64.rpm )"
+
+LICENSE="icaclient"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="nsplugin linguas_de linguas_ja"
+RESTRICT="mirror strip userpriv fetch"
+
+ICAROOT="/opt/Citrix/ICAClient"
+
+QA_TEXTRELS="opt/Citrix/ICAClient/VDSCARD.DLL
+ opt/Citrix/ICAClient/TW1.DLL
+ opt/Citrix/ICAClient/NDS.DLL
+ opt/Citrix/ICAClient/CHARICONV.DLL
+ opt/Citrix/ICAClient/PDCRYPT1.DLL
+ opt/Citrix/ICAClient/VDCM.DLL
+ opt/Citrix/ICAClient/libctxssl.so
+ opt/Citrix/ICAClient/PDCRYPT2.DLL
+ opt/Citrix/ICAClient/npica.so
+ opt/Citrix/ICAClient/VDSPMIKE.DLL
+ opt/Citrix/ICAClient/VDFLASH2.DLL
+ opt/Citrix/ICAClient/lib/libavutil.so
+ opt/Citrix/ICAClient/lib/libavcodec.so
+ opt/Citrix/ICAClient/lib/libavformat.so
+ opt/Citrix/ICAClient/lib/libswscale.so"
+
+QA_EXECSTACK="opt/Citrix/ICAClient/wfica
+ opt/Citrix/ICAClient/libctxssl.so"
+
+RDEPEND="
+ x11-terms/xterm
+ media-fonts/font-adobe-100dpi
+ media-fonts/font-misc-misc
+ media-fonts/font-cursor-misc
+ media-fonts/font-xfree86-type1
+ media-fonts/font-misc-ethiopic
+ amd64? ( nsplugin? ( www-plugins/nspluginwrapper ) )
+ >=app-crypt/mit-krb5-1.12.1-r2[abi_x86_32(-)]
+ >=dev-libs/atk-2.10.0[abi_x86_32(-)]
+ >=dev-libs/glib-2.38.2-r1:2[abi_x86_32(-)]
+ >=media-libs/alsa-lib-1.0.27.2[abi_x86_32(-)]
+ >=media-libs/gst-plugins-base-0.10.36:0.10[abi_x86_32(-)]
+ >=media-libs/gstreamer-0.10.36-r2:0.10[abi_x86_32(-)]
+ >=media-libs/libogg-1.3.0[abi_x86_32(-)]
+ >=media-libs/libvorbis-1.3.3-r1[abi_x86_32(-)]
+ >=media-libs/speex-1.2_rc1-r1[abi_x86_32(-)]
+ >=virtual/ffmpeg-9-r1[abi_x86_32(-)]
+ >=x11-libs/cairo-1.12.14-r4[abi_x86_32(-)]
+ >=x11-libs/gdk-pixbuf-2.30.7:2[abi_x86_32(-)]
+ >=x11-libs/gtk+-2.24.23:2[abi_x86_32(-)]
+ >=x11-libs/libICE-1.0.8-r1[abi_x86_32(-)]
+ >=x11-libs/libSM-1.2.1-r1[abi_x86_32(-)]
+ >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
+ >=x11-libs/libXaw-1.0.11-r2[abi_x86_32(-)]
+ >=x11-libs/libXext-1.3.2[abi_x86_32(-)]
+ >=x11-libs/libXinerama-1.1.3[abi_x86_32(-)]
+ >=x11-libs/libXmu-1.1.1-r1[abi_x86_32(-)]
+ >=x11-libs/libXp-1.0.2[abi_x86_32(-)]
+ >=x11-libs/libXpm-3.5.10-r1[abi_x86_32(-)]
+ >=x11-libs/libXrender-0.9.8[abi_x86_32(-)]
+ >=x11-libs/libXt-1.1.4[abi_x86_32(-)]
+ >=x11-libs/motif-2.3.4-r1:0[abi_x86_32(-)]
+ >=x11-libs/pango-1.36.3[abi_x86_32(-)]
+ media-libs/flac[abi_x86_32(-)]
+"
+
+DEPEND=""
+S="${WORKDIR}${ICAROOT}"
+
+pkg_nofetch() {
+ elog "Download the client RPM file ${SRC_URI} from
+ http://www.citrix.com/English/ss/downloads/details.asp?downloadId=2323812&productId=1689163"
+ elog "and place it in ${DISTDIR:-/usr/portage/distfiles}."
+}
+
+pkg_setup() {
+ # Binary x86 package
+ has_multilib_profile && ABI="x86"
+}
+
+src_install() {
+ dodir "${ICAROOT}"
+
+ exeinto "${ICAROOT}"
+ doexe *.DLL libctxssl.so libproxy.so FlashContainer.bin wfica wfcmgr.bin util/wfcmgr
+
+ exeinto "${ICAROOT}"/lib
+ doexe lib/*.so
+
+ insinto "${ICAROOT}"
+ if use nsplugin
+ then
+ doins npica.so
+ dosym "${ICAROOT}"/npica.so /usr/$(get_libdir)/nsbrowser/plugins/npica.so
+ fi
+
+ doins nls/en/eula.txt
+
+ insinto "${ICAROOT}"/config
+ doins config/* config/.* nls/en/*.ini
+
+ insinto "${ICAROOT}"/gtk
+ doins gtk/*
+
+ insinto "${ICAROOT}"/gtk/glade
+ doins gtk/glade/*
+
+ dodir "${ICAROOT}"/help
+
+ insinto "${ICAROOT}"/config/usertemplate
+ doins config/usertemplate/*
+
+ LANGCODES="en"
+ use linguas_de && LANGCODES="${LANGCODES} de"
+ use linguas_ja && LANGCODES="${LANGCODES} ja"
+
+ for lang in ${LANGCODES}; do
+ insinto "${ICAROOT}"/nls/${lang}
+ doins nls/${lang}/*
+
+ insinto "${ICAROOT}"/nls/$lang/UTF-8
+ doins nls/${lang}/UTF-8/*
+
+ insinto "${ICAROOT}"/nls/${lang}/LC_MESSAGES
+ doins nls/${lang}/LC_MESSAGES/*
+
+ insinto "${ICAROOT}"/nls/${lang}
+ dosym UTF-8 "${ICAROOT}"/nls/${lang}/utf8
+
+ # We don't have 'more' anymore on the system - use 'less' instead
+ sed -e 's:MORE_CMD=more:MORE_CMD=less:g' -i "${D}"/"${ICAROOT}"/nls/${lang}/wfcmgr.msg
+ done
+
+ insinto "${ICAROOT}"/nls
+ dosym en /opt/Citrix/ICAClient/nls/C
+
+ insinto "${ICAROOT}"/icons
+ doins icons/*
+
+ insinto "${ICAROOT}"/keyboard
+ doins keyboard/*
+
+ rm -rf "${S}"/keystore/cacerts
+ dosym /etc/ssl/certs "${ICAROOT}"/keystore/cacerts
+ #insinto "${ICAROOT}"/keystore/cacerts
+ #doins keystore/cacerts/*
+
+ insinto "${ICAROOT}"/util
+ doins util/pac.js
+
+ exeinto "${ICAROOT}"/util
+ doexe util/{DeleteCompleteFlashCache.sh,echo_cmd,hdxcheck.sh,icalicense.sh,integrate.sh}
+ doexe util/{nslaunch,pacexec,pnabrowse,sunraymac.sh,what,xcapture}
+
+ # Citrix receiver 12 has util/gst_{play,read}.{32,64} versions, install both
+ doexe util/gst_{play,read}.{32,64}
+ # Ditto for libgstflatstm.so
+ doexe util/libgstflatstm.{32,64}.so
+
+ dosym "${ICAROOT}"/util/integrate.sh "${ICAROOT}"/util/disintegrate.sh
+
+ doenvd "${FILESDIR}"/10ICAClient
+
+ make_wrapper wfica "${ICAROOT}"/wfica . "${ICAROOT}"
+
+ # The .desktop file included in the rpm links to /usr/lib, so we
+ # make a new one. The program gives errors and has slowdowns if
+ # the locale is not English, so strip it since it has no
+ # translations anyway
+ doicon icons/*
+ make_wrapper wfcmgr "${ICAROOT}"/wfcmgr . "${ICAROOT}"
+ sed -e 's:^\# Configuration items.*:. "${ICAROOT}"/nls/en/wfcmgr.msg:g' -i "${D}"/"${ICAROOT}"/wfcmgr
+ make_desktop_entry wfcmgr 'Citrix ICA Client' manager
+
+ dodir /etc/revdep-rebuild/
+ echo "SEARCH_DIRS_MASK="${ICAROOT}"" > "${D}"/etc/revdep-rebuild/70icaclient
+}
diff --git a/net-misc/icaclient/metadata.xml b/net-misc/icaclient/metadata.xml
new file mode 100644
index 000000000000..aaf9b449ac5a
--- /dev/null
+++ b/net-misc/icaclient/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>fauli@gentoo.org</email>
+ <name>Christian Faulhammer</name>
+</maintainer>
+<longdescription>
+ ICAClient is a Linux client to a Citrix Metaframe Server.
+</longdescription>
+<longdescription lang="ja">
+ ICAClient は Citrix Metaframe Server への Linux 用クライアントです。
+</longdescription>
+<longdescription lang="de">
+ ICAClient ist ein Programm zum Zugriff auf Citrix Metaframe Server.
+</longdescription>
+</pkgmetadata>
diff --git a/net-misc/icecast/Manifest b/net-misc/icecast/Manifest
new file mode 100644
index 000000000000..559ddcd2139d
--- /dev/null
+++ b/net-misc/icecast/Manifest
@@ -0,0 +1 @@
+DIST icecast-2.4.2.tar.gz 2388381 SHA256 aa1ae2fa364454ccec61a9247949d19959cb0ce1b044a79151bf8657fd673f4f SHA512 6fc5a54b97f1efd63f0d3ea17fc7124cb30cfafae70615f5afdf878df9e3f57ca7882757a0691329d63ee4fc7555c695fefa415f2deb955d01244afc4528a260 WHIRLPOOL bbc369f1a5b35aec364a42aab28e92499fc0cb3a5fcef469899c77d801cd2123637328227d206c2bf9427a2c8c958036d706f61507677e240b6ef8e3546cb037
diff --git a/net-misc/icecast/files/icecast-2.3.3-fix-xiph_openssl.patch b/net-misc/icecast/files/icecast-2.3.3-fix-xiph_openssl.patch
new file mode 100644
index 000000000000..7db5be1500de
--- /dev/null
+++ b/net-misc/icecast/files/icecast-2.3.3-fix-xiph_openssl.patch
@@ -0,0 +1,13 @@
+Index: icecast-2.3.3/m4/xiph_openssl.m4
+===================================================================
+--- icecast-2.3.3.orig/m4/xiph_openssl.m4
++++ icecast-2.3.3/m4/xiph_openssl.m4
+@@ -10,7 +10,7 @@ AC_ARG_WITH(openssl,
+ AC_HELP_STRING([--with-openssl=PFX],[Prefix where openssl is installed (optional)]),
+ openssl_prefix="$withval", openssl_prefix="")
+
+-if test "x$openssl_prefix" != "x" -a "x$openssl_prefix" != "xyes"; then
++if test "x$openssl_prefix" != "x" -a "x$openssl_prefix" != "xyes" -a "x$openssl_prefix" != "xno"; then
+ OPENSSL_LIBS="-L$openssl_prefix/lib -lssl"
+ OPENSSL_CFLAGS="-I$openssl_prefix/include"
+ else
diff --git a/net-misc/icecast/files/icecast-2.3.3-libkate.patch b/net-misc/icecast/files/icecast-2.3.3-libkate.patch
new file mode 100644
index 000000000000..32cbd78ed964
--- /dev/null
+++ b/net-misc/icecast/files/icecast-2.3.3-libkate.patch
@@ -0,0 +1,28 @@
+Index: icecast-2.3.3/configure.in
+===================================================================
+--- icecast-2.3.3.orig/configure.in
++++ icecast-2.3.3/configure.in
+@@ -81,14 +81,18 @@ XIPH_PATH_SPEEX(
+ [ AC_MSG_WARN([Speex support disabled!])
+ ])
+
+-AC_CHECK_LIB(kate, kate_decode_init,[have_kate=yes],[have_kate=no], -logg)
+-if test "x$have_kate" == "xyes"
++AC_ARG_ENABLE([kate], AS_HELP_STRING([--disable-kate], [Disable karaoke and text encapsulation support for ogg]))
++if test "x$enable_kate" != "xno"
+ then
+- AC_CHECK_LIB(oggkate, kate_ogg_decode_headerin,[have_kate=yes],[have_kate=no],-lkate -logg)
++ AC_CHECK_LIB(kate, kate_decode_init,[have_kate=yes],[have_kate=no], -logg)
+ if test "x$have_kate" == "xyes"
+ then
+- KATE_LIBS="-loggkate -lkate -logg"
+- AC_DEFINE([HAVE_KATE],[1],[Define if you have libkate])
++ AC_CHECK_LIB(oggkate, kate_ogg_decode_headerin,[have_kate=yes],[have_kate=no],-lkate -logg)
++ if test "x$have_kate" == "xyes"
++ then
++ KATE_LIBS="-loggkate -lkate -logg"
++ AC_DEFINE([HAVE_KATE],[1],[Define if you have libkate])
++ fi
+ fi
+ fi
+ dnl we still use format_kate as it doesn't need libkate to work
diff --git a/net-misc/icecast/files/icecast.logrotate b/net-misc/icecast/files/icecast.logrotate
new file mode 100644
index 000000000000..4e7aafb8edcb
--- /dev/null
+++ b/net-misc/icecast/files/icecast.logrotate
@@ -0,0 +1,8 @@
+/var/log/icecast/*log {
+ missingok
+ notifempty
+ sharedscripts
+ postrotate
+ /etc/init.d/icecast reload > /dev/null 2>&1 || true
+ endscript
+}
diff --git a/net-misc/icecast/files/icecast.service b/net-misc/icecast/files/icecast.service
new file mode 100644
index 000000000000..badb65e5d93c
--- /dev/null
+++ b/net-misc/icecast/files/icecast.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=An opensource alternative to shoutcast
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/icecast -c /etc/icecast2/icecast.xml
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/icecast/files/icecast.xml b/net-misc/icecast/files/icecast.xml
new file mode 100644
index 000000000000..3415885deba4
--- /dev/null
+++ b/net-misc/icecast/files/icecast.xml
@@ -0,0 +1,180 @@
+<icecast>
+ <limits>
+ <clients>100</clients>
+ <sources>2</sources>
+ <queue-size>524288</queue-size>
+ <client-timeout>30</client-timeout>
+ <header-timeout>15</header-timeout>
+ <source-timeout>10</source-timeout>
+ <!-- If enabled, this will provide a burst of data when a client
+ first connects, thereby significantly reducing the startup
+ time for listeners that do substantial buffering. However,
+ it also significantly increases latency between the source
+ client and listening client. For low-latency setups, you
+ might want to disable this. -->
+ <burst-on-connect>1</burst-on-connect>
+ <!-- same as burst-on-connect, but this allows for being more
+ specific on how much to burst. Most people won't need to
+ change from the default 64k. Applies to all mountpoints -->
+ <burst-size>65535</burst-size>
+ </limits>
+
+ <authentication>
+ <!-- Sources log in with username 'source' -->
+ <source-password>hackme</source-password>
+ <!-- Relays log in username 'relay' -->
+ <relay-password>hackme</relay-password>
+
+ <!-- Admin logs in with the username given below -->
+ <admin-user>admin</admin-user>
+ <admin-password>hackme</admin-password>
+ </authentication>
+
+ <!-- Uncomment this if you want directory listings -->
+ <!--
+ <directory>
+ <yp-url-timeout>15</yp-url-timeout>
+ <yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
+ </directory>
+ <directory>
+ <yp-url-timeout>15</yp-url-timeout>
+ <yp-url>http://www.oddsock.org/cgi-bin/yp-cgi</yp-url>
+ </directory>
+ -->
+
+ <!-- This is the hostname other people will use to connect to your server.
+ It affects mainly the urls generated by Icecast for playlists and yp
+ listings. -->
+ <hostname>localhost</hostname>
+
+ <!-- You can use these two if you only want a single listener -->
+ <!--<port>8000</port> -->
+ <!--<bind-address>127.0.0.1</bind-address>-->
+
+ <!-- You may have multiple <listener> elements -->
+ <listen-socket>
+ <port>8000</port>
+ <!-- <bind-address>127.0.0.1</bind-address> -->
+ </listen-socket>
+ <!--
+ <listen-socket>
+ <port>8001</port>
+ </listen-socket>
+ -->
+
+ <!--<master-server>127.0.0.1</master-server>-->
+ <!--<master-server-port>8001</master-server-port>-->
+ <!--<master-update-interval>120</master-update-interval>-->
+ <!--<master-password>hackme</master-password>-->
+
+ <!-- setting this makes all relays on-demand unless overridden, this is
+ useful for master relays which do not have <relay> definitions here.
+ The default is 0 -->
+ <!--<relays-on-demand>1</relays-on-demand>-->
+
+ <!--
+ <relay>
+ <server>127.0.0.1</server>
+ <port>8001</port>
+ <mount>/example.ogg</mount>
+ <local-mount>/different.ogg</local-mount>
+ <on-demand>0</on-demand>
+
+ <relay-shoutcast-metadata>0</relay-shoutcast-metadata>
+ </relay>
+ -->
+
+ <!-- Only define a <mount> section if you want to use advanced options,
+ like alternative usernames or passwords -->
+ <!--
+ <mount>
+ <mount-name>/example-complex.ogg</mount-name>
+
+ <username>othersource</username>
+ <password>hackmemore</password>
+
+ <max-listeners>1</max-listeners>
+ <dump-file>/tmp/dump-example1.ogg</dump-file>
+ <burst-size>65536</burst-size>
+ <fallback-mount>/example2.ogg</fallback-mount>
+ <fallback-override>1</fallback-override>
+ <fallback-when-full>1</fallback-when-full>
+ <intro>/example_intro.ogg</intro>
+ <hidden>1</hidden>
+ <no-yp>1</no-yp>
+ <authentication type="htpasswd">
+ <option name="filename" value="myauth"/>
+ <option name="allow_duplicate_users" value="0"/>
+ </authentication>
+ <on-connect>/home/icecast/bin/stream-start</on-connect>
+ <on-disconnect>/home/icecast/bin/stream-stop</on-disconnect>
+ </mount>
+
+ <mount>
+ <mount-name>/auth_example.ogg</mount-name>
+ <authentication type="url">
+ <option name="mount_add" value="http://myauthserver.net/notify_mount.php"/>
+ <option name="mount_remove" value="http://myauthserver.net/notify_mount.php"/>
+ <option name="listener_add" value="http://myauthserver.net/notify_listener.php"/>
+ <option name="listener_remove" value="http://myauthserver.net/notify_listener.php"/>
+ </authentication>
+ </mount>
+
+ -->
+
+ <fileserve>1</fileserve>
+
+ <!-- set the mountpoint for a shoutcast source to use, the default if not
+ specified is /stream but you can change it here if an alternative is
+ wanted or an extension is required -->
+ <!--
+ <shoutcast-mount>/live.nsv</shoutcast-mount>
+ -->
+
+ <paths>
+ <!-- basedir is only used if chroot is enabled -->
+ <basedir>/usr/share/icecast</basedir>
+
+ <!-- Note that if <chroot> is turned on below, these paths must both
+ be relative to the new root, not the original root -->
+ <logdir>/var/log/icecast</logdir>
+ <webroot>/usr/share/icecast/web</webroot>
+ <adminroot>/usr/share/icecast/admin</adminroot>
+ <!-- <pidfile>/usr/share/icecast/icecast.pid</pidfile> -->
+
+ <!-- Aliases: treat requests for 'source' path as being for 'dest' path
+ May be made specific to a port or bound address using the "port"
+ and "bind-address" attributes.
+ -->
+ <!--
+ <alias source="/foo" dest="/bar"/>
+ -->
+ <!-- Aliases: can also be used for simple redirections as well,
+ this example will redirect all requests for http://server:port/ to
+ the status page
+ -->
+ <alias source="/" dest="/status.xsl"/>
+ </paths>
+
+ <logging>
+ <accesslog>access.log</accesslog>
+ <errorlog>error.log</errorlog>
+ <!-- <playlistlog>playlist.log</playlistlog> -->
+ <loglevel>4</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
+ <logsize>10000</logsize> <!-- Max size of a logfile -->
+ <!-- If logarchive is enabled (1), then when logsize is reached
+ the logfile will be moved to [error|access|playlist].log.DATESTAMP,
+ otherwise it will be moved to [error|access|playlist].log.old.
+ Default is non-archive mode (i.e. overwrite)
+ -->
+ <!-- <logarchive>1</logarchive> -->
+ </logging>
+
+ <security>
+ <chroot>0</chroot>
+ <changeowner>
+ <user>icecast</user>
+ <group>nogroup</group>
+ </changeowner>
+ </security>
+</icecast>
diff --git a/net-misc/icecast/files/init.d.icecast-2 b/net-misc/icecast/files/init.d.icecast-2
new file mode 100644
index 000000000000..bde5877c62b6
--- /dev/null
+++ b/net-misc/icecast/files/init.d.icecast-2
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+
+pidfile="/var/run/icecast.pid"
+command="/usr/bin/icecast"
+command_args="-c /etc/icecast2/icecast.xml"
+command_background="true"
+
+depend() {
+ need net
+}
+
+reload() {
+ ebegin "Reloading Icecast2 configuration"
+ start-stop-daemon --signal HUP --pidfile ${pidfile}
+ eend $?
+}
diff --git a/net-misc/icecast/icecast-2.4.2.ebuild b/net-misc/icecast/icecast-2.4.2.ebuild
new file mode 100644
index 000000000000..31271f707df7
--- /dev/null
+++ b/net-misc/icecast/icecast-2.4.2.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils autotools systemd user
+
+DESCRIPTION="An opensource alternative to shoutcast that supports mp3, ogg (vorbis/theora) and aac streaming"
+HOMEPAGE="http://www.icecast.org/"
+SRC_URI="http://downloads.xiph.org/releases/icecast/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86 ~x86-fbsd"
+IUSE="kate logrotate +speex +ssl +theora +yp"
+
+#Although there is a --with-ogg and --with-orbis configure option, they're
+#only useful for specifying paths, not for disabling.
+DEPEND="dev-libs/libxslt
+ dev-libs/libxml2
+ media-libs/libogg
+ media-libs/libvorbis
+ kate? ( media-libs/libkate )
+ logrotate? ( app-admin/logrotate )
+ speex? ( media-libs/speex )
+ theora? ( media-libs/libtheora )
+ yp? ( net-misc/curl )
+ ssl? ( dev-libs/openssl:0= )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewuser icecast -1 -1 -1 nogroup
+}
+
+src_prepare() {
+ # bug #368539
+ epatch "${FILESDIR}"/${PN}-2.3.3-libkate.patch
+ # bug #430434
+ epatch "${FILESDIR}"/${PN}-2.3.3-fix-xiph_openssl.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ --docdir=/usr/share/doc/${PF} \
+ --sysconfdir=/etc/icecast2 \
+ $(use_enable kate) \
+ $(use_with theora) \
+ $(use_with speex) \
+ $(use_with yp curl) \
+ $(use_with ssl openssl) \
+ $(use_enable yp)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS README TODO HACKING NEWS conf/icecast.xml.dist
+ dohtml -A chm,hhc,hhp doc/*
+
+ newinitd "${FILESDIR}"/init.d.icecast-2 icecast
+ systemd_dounit "${FILESDIR}"/${PN}.service
+
+ insinto /etc/icecast2
+ doins "${FILESDIR}"/icecast.xml
+ fperms 600 /etc/icecast2/icecast.xml
+
+ if use logrotate; then
+ dodir /etc/logrotate.d
+ insopts -m0644
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${PN}.logrotate ${PN}
+ fi
+ diropts -m0764 -o icecast -g nogroup
+ dodir /var/log/icecast
+ keepdir /var/log/icecast
+ rm -rf "${D}"/usr/share/doc/icecast
+}
+
+pkg_postinst() {
+ touch "${ROOT}"var/log/icecast/{access,error}.log
+ chown icecast:nogroup "${ROOT}"var/log/icecast/{access,error}.log
+}
diff --git a/net-misc/icecast/metadata.xml b/net-misc/icecast/metadata.xml
new file mode 100644
index 000000000000..0d2c237afa84
--- /dev/null
+++ b/net-misc/icecast/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>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <use>
+ <flag name="kate">Add karaoke and text encapsulation support for Ogg files</flag>
+ <flag name="logrotate">Install support files for <pkg>app-admin/logrotate</pkg>?</flag>
+ <flag name="yp">Build support for yp public directory listings</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/ices/Manifest b/net-misc/ices/Manifest
new file mode 100644
index 000000000000..3593aff18156
--- /dev/null
+++ b/net-misc/ices/Manifest
@@ -0,0 +1,2 @@
+DIST ices-2.0.1.tar.bz2 273805 SHA256 04ec784b5ca6f5a2951631252d61e01c6d16c6fcf17cbe32d702dbe761fc238d
+DIST ices-2.0.2.tar.bz2 293818 SHA256 96458df835033c39236ad3bb099286c033241f8ea7c138e7ccf714e7ade75900 SHA512 ff257b478a7237886ba59bf7d1a494ebd4c7c12fd74e8e10c00ea65710249ead1b5b1ae8d9540fab05f2e4486949c6e350f3da59a1d1bf261397ca257806b2c7 WHIRLPOOL a0523f412aae8cb967de4614fb549e7dfc31aef3980639bce13cfd5d8bec118a2ffa7962d3d59b3fc01ddd105c98554e2b1528ae93b5b41fc3244721abecdd0d
diff --git a/net-misc/ices/files/ices.initd b/net-misc/ices/files/ices.initd
new file mode 100644
index 000000000000..595bfb300019
--- /dev/null
+++ b/net-misc/ices/files/ices.initd
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting IceS 2"
+ start-stop-daemon --background --start --pidfile /var/run/ices.pid --make-pidfile --exec /usr/bin/ices /etc/ices2/ices.xml
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping IceS 2"
+ start-stop-daemon --stop --pidfile /var/run/ices.pid --name ices
+ eend $?
+}
diff --git a/net-misc/ices/files/ices.initd-r1 b/net-misc/ices/files/ices.initd-r1
new file mode 100644
index 000000000000..0e86303562a0
--- /dev/null
+++ b/net-misc/ices/files/ices.initd-r1
@@ -0,0 +1,14 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="Icecast OGG streaming client"
+pidfile="/var/run/ices.pid"
+command="/usr/bin/ices"
+command_args="/etc/ices2/ices.xml"
+command_background="true"
+
+depend() {
+ need net
+}
diff --git a/net-misc/ices/ices-2.0.1-r1.ebuild b/net-misc/ices/ices-2.0.1-r1.ebuild
new file mode 100644
index 000000000000..eae1baa47337
--- /dev/null
+++ b/net-misc/ices/ices-2.0.1-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils user
+
+DESCRIPTION="Icecast OGG streaming client, supports on the fly re-encoding"
+HOMEPAGE="http://www.icecast.org/ices.php"
+SRC_URI="http://downloads.xiph.org/releases/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ppc64 sparc x86"
+IUSE=""
+
+RDEPEND="dev-libs/libxml2
+ >=media-libs/libshout-2
+ >=media-libs/libvorbis-1"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+pkg_setup() {
+ enewgroup ices
+ enewuser ices -1 -1 -1 ices
+}
+
+src_compile() {
+ econf --sysconfdir=/etc/ices2
+ emake || die "emake failed."
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dodoc AUTHORS README TODO
+ insinto /etc/ices2
+ doins conf/*.xml
+ dohtml doc/*.{html,css}
+ newman debian/ices2.1 ices.1
+ newinitd "${FILESDIR}"/ices.initd ices
+ keepdir /var/log/ices
+ fperms 660 /var/log/ices
+ fowners ices:ices /var/log/ices
+ rm -rf "${D}"/usr/share/ices
+}
diff --git a/net-misc/ices/ices-2.0.2.ebuild b/net-misc/ices/ices-2.0.2.ebuild
new file mode 100644
index 000000000000..71e80229255e
--- /dev/null
+++ b/net-misc/ices/ices-2.0.2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils user
+
+DESCRIPTION="Icecast OGG streaming client, supports on the fly re-encoding"
+HOMEPAGE="http://www.icecast.org/ices.php"
+SRC_URI="http://downloads.xiph.org/releases/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ppc64 ~sparc ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/libxml2
+ >=media-libs/libshout-2
+ >=media-libs/libvorbis-1"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+pkg_setup() {
+ enewgroup ices
+ enewuser ices -1 -1 -1 ices
+}
+
+src_configure() {
+ econf --sysconfdir=/etc/ices2
+}
+
+src_install() {
+ default
+ insinto /etc/ices2
+ doins conf/*.xml
+ dohtml doc/*.{html,css}
+ newinitd "${FILESDIR}"/ices.initd-r1 ices
+ keepdir /var/log/ices
+ fperms 660 /var/log/ices
+ fowners ices:ices /var/log/ices
+ rm -rf "${D}"/usr/share/ices
+}
diff --git a/net-misc/ices/metadata.xml b/net-misc/ices/metadata.xml
new file mode 100644
index 000000000000..3bf6bcfeb512
--- /dev/null
+++ b/net-misc/ices/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>sound</herd>
+</pkgmetadata>
diff --git a/net-misc/identicurse/Manifest b/net-misc/identicurse/Manifest
new file mode 100644
index 000000000000..62ddb017e539
--- /dev/null
+++ b/net-misc/identicurse/Manifest
@@ -0,0 +1 @@
+DIST identicurse-0.9.tar.bz2 62278 SHA256 27caaf2e2af1fdcb3428aa811d7a03d2104f13fb9055b3ef612a7d4c70352ebb
diff --git a/net-misc/identicurse/files/0.9-config_json_path.patch b/net-misc/identicurse/files/0.9-config_json_path.patch
new file mode 100644
index 000000000000..08f985f1eebd
--- /dev/null
+++ b/net-misc/identicurse/files/0.9-config_json_path.patch
@@ -0,0 +1,22 @@
+--- a/setup.py
++++ b/setup.py
+@@ -42,7 +42,7 @@
+
+ license="GPLv3+",
+
+- data_files=[('identicurse',['README', 'conf/config.json'])],
++ data_files=[('share/identicurse',['conf/config.json'])],
+ packages=find_packages('src'),
+ package_dir={'': 'src'},
+ include_package_data=True,
+--- a/src/identicurse/identicurse.py
++++ b/src/identicurse/identicurse.py
+@@ -156,7 +156,7 @@
+ else:
+ import getpass, time
+ # no config yet, so let's build one
+- config.config.load(os.path.join(self.path, "config.json"))
++ config.config.load(os.path.join("/", "usr", "share", "identicurse", "config.json"))
+ print "No config was found, so we will now run through a few quick questions to set up a basic config for you (which will be saved as %s so you can manually edit it later). If the default (where defaults are available, they're stated in []) is already fine for any question, just press Enter without typing anything, and the default will be used." % (config.config.filename)
+ print "This version of IdentiCurse supports OAuth login. Using OAuth to log in means that you do not need to enter your username and password."
+ use_oauth = raw_input("Use OAuth [Y/n]? ").upper()
diff --git a/net-misc/identicurse/files/identicurse-gzipped_readme.patch b/net-misc/identicurse/files/identicurse-gzipped_readme.patch
new file mode 100644
index 000000000000..b4575ef07b97
--- /dev/null
+++ b/net-misc/identicurse/files/identicurse-gzipped_readme.patch
@@ -0,0 +1,15 @@
+Description: Point the online help to /usr/share/identicurse/README.
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=612976
+Author: Alessio Treglia <alessio@debian.org>
+
+--- a/src/identicurse/tabbage.py
++++ b/src/identicurse/tabbage.py
+@@ -225,6 +225,8 @@ class Help(Tab):
+ def __init__(self, window, identicurse_path):
+ self.name = "Help"
+ self.path = os.path.join(identicurse_path, "README")
++ if not os.path.isfile(self.path):
++ self.path = '/usr/share/identicurse/README'
+ Tab.__init__(self, window)
+
+ def update(self):
diff --git a/net-misc/identicurse/identicurse-0.9.ebuild b/net-misc/identicurse/identicurse-0.9.ebuild
new file mode 100644
index 000000000000..428b27e56d80
--- /dev/null
+++ b/net-misc/identicurse/identicurse-0.9.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_DEPEND="2"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.*"
+
+inherit distutils versionator
+
+MY_PV=$(get_version_component_range 1-2)
+
+DESCRIPTION="A simple Identi.ca client with a curses-based UI"
+HOMEPAGE="http://identicurse.net"
+SRC_URI="http://identicurse.net/release/${MY_PV}/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-python/setuptools"
+RDEPEND="dev-python/oauth"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-gzipped_readme.patch \
+ "${FILESDIR}"/${PV}-config_json_path.patch
+ rm -rf src/oauth #405735
+ distutils_src_prepare
+}
diff --git a/net-misc/identicurse/metadata.xml b/net-misc/identicurse/metadata.xml
new file mode 100644
index 000000000000..6062d6be9022
--- /dev/null
+++ b/net-misc/identicurse/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription>A simple Identi.ca client with a curses-based UI.</longdescription>
+</pkgmetadata>
diff --git a/net-misc/ifenslave/Manifest b/net-misc/ifenslave/Manifest
new file mode 100644
index 000000000000..e68f96063691
--- /dev/null
+++ b/net-misc/ifenslave/Manifest
@@ -0,0 +1,2 @@
+DIST ifenslave-2.6_1.1.0-17.debian.tar.gz 9406 SHA256 5d34e36dcdd83ec9615e2cb51951888939179be6350eab1cc6c978b0ff662a75 SHA512 90773620e15883f39f3bf3039133385d21d597f2051b81d98f96a2d7b9d7f69bf8f00bab0ffa2ad0fde5b2f4b83cac683b24925f26b6f014c0fa06f6d1023de5 WHIRLPOOL 5ab7bbe48c33efbad002270c704f2ff7149ff435b748a5aa6e1476dbf5ee14a23f71225fcb1f2da21e40b38897a58678d94be72828aa30fe8cb0dcd6c7f5e9ff
+DIST ifenslave-2.6_1.1.0.orig.tar.gz 8002 SHA256 7917bf34de80a2492eb225adf9168c83a4854ac8a008ed0fd5b3fd147ccd3041 SHA512 65d9b632e88c63dc4c2bae752a4561cc7f315278b301c906c6f023934d6af8cdb894d06e1582d831bf0ac88f8d27751115b4f2e8bea6cbb89a705e4bc04068c7 WHIRLPOOL badadeb1377ec29e8be108b4365137724473593f15bab8c57550b450889c6a41b5c5be2dc9c281c1cae9e2ef02dbbddab9d1bd716036e366b3ae5a203aa4e2b4
diff --git a/net-misc/ifenslave/ifenslave-1.1.0-r6.ebuild b/net-misc/ifenslave/ifenslave-1.1.0-r6.ebuild
new file mode 100644
index 000000000000..3d652b7bc3f1
--- /dev/null
+++ b/net-misc/ifenslave/ifenslave-1.1.0-r6.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+MY_PN="ifenslave-2.6" # this is NOT an error
+DEBIAN_PV="17"
+DEBIANPKG_TARBALL="${MY_PN}_${PV}.orig.tar.gz"
+DEBIANPKG_PATCH="${MY_PN}_${PV}-${DEBIAN_PV}.debian.tar.gz"
+DEBIANPKG_BASE="mirror://debian/pool/main/${MY_PN:0:1}/${MY_PN}"
+
+inherit toolchain-funcs linux-info
+
+DESCRIPTION="Attach and detach slave interfaces to a bonding device"
+HOMEPAGE="http://sf.net/projects/bonding/"
+SRC_URI="${DEBIANPKG_BASE}/${DEBIANPKG_TARBALL}
+ ${DEBIANPKG_BASE}/${DEBIANPKG_PATCH}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~mips ppc sparc x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="sys-devel/gcc
+ >=sys-kernel/linux-headers-2.4.22
+ ${RDEPEND}"
+
+CONFIG_CHECK="~BONDING"
+WARNING_BONDING="CONFIG_BONDING is required to get bond devices in the kernel"
+
+src_compile() {
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} ${PN}.c -o ${PN} || die "Failed to compile!"
+}
+
+src_install() {
+ into /
+ dosbin ${PN}
+ into
+
+ # there really is no better documentation than the sourcecode :-)
+ dodoc ${PN}.c
+
+ doman "${WORKDIR}/debian/${PN}.8"
+}
+
+pkg_preinst() {
+ if [[ -f /etc/modules.d/bond ]] || [[ -f /etc/modprobe.d/bond ]]; then
+ elog "You may want to remove /etc/modules.d/bond and/or /etc/modprobe.d/bond"
+ elog "because it likely causes some deprecation warnings like:"
+ elog "Loading kernel module for a network device with CAP_SYS_MODULE (deprecated). Use CAP_NET_ADMIN and alias netdev-bond0 instead"
+ elog "It may also cause unexpected behaviour."
+ fi
+}
diff --git a/net-misc/ifenslave/metadata.xml b/net-misc/ifenslave/metadata.xml
new file mode 100644
index 000000000000..75c5a9141f49
--- /dev/null
+++ b/net-misc/ifenslave/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>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ </maintainer>
+ <maintainer>
+ <email>prometheanfire@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/igmpproxy/Manifest b/net-misc/igmpproxy/Manifest
new file mode 100644
index 000000000000..71829c4c8b6b
--- /dev/null
+++ b/net-misc/igmpproxy/Manifest
@@ -0,0 +1 @@
+DIST igmpproxy-0.1.tar.gz 140159 SHA256 ee18ff3d8c3ae3a29dccb7e5eedf332337330020168bd95a11cece8d7d7ee6ae SHA512 1a569814d8984610402313d8c4adb78ff362f82ae28c968a8ba0fb411e12a704d1b51b387111b51517ab8fb2e86952bbd196f27eccd311c11ce288fc6fa25ad4 WHIRLPOOL b7e446c4c3a9c318d65cc51a54df4900ea334c521e8a8adfa487dc48c80ea81f4d17097b4bbd52eee9d7d76c5d45aca74d194ed31e002837b308e2bbcd95dea4
diff --git a/net-misc/igmpproxy/files/igmpproxy-conf.d b/net-misc/igmpproxy/files/igmpproxy-conf.d
new file mode 100644
index 000000000000..a7a2b348d2a5
--- /dev/null
+++ b/net-misc/igmpproxy/files/igmpproxy-conf.d
@@ -0,0 +1,6 @@
+# Specify a configuration file
+IGMPPROXY_CONFIG="/etc/igmpproxy.conf"
+
+# Additional command line options.
+# See igmpproxy(8) for more information.
+IGMPPROXY_OPTS=""
diff --git a/net-misc/igmpproxy/files/igmpproxy-init.d b/net-misc/igmpproxy/files/igmpproxy-init.d
new file mode 100644
index 000000000000..0b138c3b5c41
--- /dev/null
+++ b/net-misc/igmpproxy/files/igmpproxy-init.d
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+ use logger
+}
+
+start() {
+ ebegin "Starting IGMPproxy"
+ start-stop-daemon --start --background \
+ --make-pidfile --pidfile /var/run/igmpproxy.pid \
+ --exec /usr/sbin/igmpproxy -- \
+ ${IGMPPROXY_OPTS} "${IGMPPROXY_CONFIG:-/etc/igmpproxy.conf}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping IGMPproxy"
+ start-stop-daemon --stop --pidfile /var/run/igmpproxy.pid
+ eend $?
+}
+
diff --git a/net-misc/igmpproxy/files/igmpproxy.service b/net-misc/igmpproxy/files/igmpproxy.service
new file mode 100644
index 000000000000..a682bed09e0a
--- /dev/null
+++ b/net-misc/igmpproxy/files/igmpproxy.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=IGMP proxy
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/igmpproxy /etc/igmpproxy.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/igmpproxy/igmpproxy-0.1-r1.ebuild b/net-misc/igmpproxy/igmpproxy-0.1-r1.ebuild
new file mode 100644
index 000000000000..508ca613cc52
--- /dev/null
+++ b/net-misc/igmpproxy/igmpproxy-0.1-r1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit linux-info systemd
+
+DESCRIPTION="Multicast Routing Daemon using only IGMP signalling (Internet Group Management Protocol)"
+HOMEPAGE="http://sourceforge.net/projects/igmpproxy"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 Stanford"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+CONFIG_CHECK="~IP_MULTICAST ~IP_MROUTE"
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ newinitd "${FILESDIR}/${PN}-init.d" ${PN}
+ newconfd "${FILESDIR}/${PN}-conf.d" ${PN}
+ systemd_dounit "${FILESDIR}/${PN}.service"
+}
diff --git a/net-misc/igmpproxy/metadata.xml b/net-misc/igmpproxy/metadata.xml
new file mode 100644
index 000000000000..a05381eb1e7f
--- /dev/null
+++ b/net-misc/igmpproxy/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ IGMPproxy is a simple dynamic Multicast Routing Daemon using only IGMP signalling.
+ It's intended for simple forwarding of Multicast traffic between networks.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">igmpproxy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/iodine/Manifest b/net-misc/iodine/Manifest
new file mode 100644
index 000000000000..080608ceadf0
--- /dev/null
+++ b/net-misc/iodine/Manifest
@@ -0,0 +1 @@
+DIST iodine-0.7.0.tar.gz 96181 SHA256 ad2b40acf1421316ec15800dcde0f587ab31d7d6f891fa8b9967c4ded93c013e SHA512 49fe4f0cf614d3400cbfdade84eb4f50430f8f92004f663a08acc1514e8ff342443a8c3f855828bbca1864a3fafe419b5256f8a80fc4024b364d4c8c953fc0ec WHIRLPOOL ac098f9a409c75768b6b2da0f755560ea932a97855df32aefe860237a28ebf1ef1b576860378575522221214d9dc65c26f0297fafe628ea770e4449217c5d593
diff --git a/net-misc/iodine/files/iodine-0.7.0-TestMessage.patch b/net-misc/iodine/files/iodine-0.7.0-TestMessage.patch
new file mode 100644
index 000000000000..6b814b6f2d74
--- /dev/null
+++ b/net-misc/iodine/files/iodine-0.7.0-TestMessage.patch
@@ -0,0 +1,12 @@
+--- iodine-0.7.0/Makefile
++++ iodine-0.7.0/Makefile
+@@ -35,8 +35,7 @@
+ $(RM) $(RM_FLAGS) $(DESTDIR)$(mandir)/man8/iodine.8
+
+ test: all
+- @echo "!! The check library is required for compiling and running the tests"
+- @echo "!! Get it at http://check.sf.net"
++ @echo "Executing tests target"
+ @(cd tests; $(MAKE) TARGETOS=$(TARGETOS) all)
+
+ clean:
diff --git a/net-misc/iodine/files/iodine-0.7.0-new-systemd.patch b/net-misc/iodine/files/iodine-0.7.0-new-systemd.patch
new file mode 100644
index 000000000000..1f54d38073d1
--- /dev/null
+++ b/net-misc/iodine/files/iodine-0.7.0-new-systemd.patch
@@ -0,0 +1,33 @@
+From cc4bc22447d15deacf44bc1d369621a63c934427 Mon Sep 17 00:00:00 2001
+From: "Jason A. Donenfeld" <Jason@zx2c4.com>
+Date: Fri, 25 Jul 2014 02:02:48 +0200
+Subject: [PATCH] osflags: use pkg-config for systemd support
+
+Recent versions of systemd don't ship with libsystemd-daemon.so anymore,
+but instead use libsystemd.so for everything. This is obviously
+problematic for using the same LDFLAGS on old systemd and new systemd.
+So, they also ship compatability pkgconfig files, which use the old
+names but return the new library. So, the most portable way to support
+both old and new systemd is to use pkgconfig. It's not a problem either,
+since systems that use systemd are bound to also have pkgconfig
+installed.
+---
+ src/osflags | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/osflags b/src/osflags
+index 9eda8f0..0f8a26c 100755
+--- a/src/osflags
++++ b/src/osflags
+@@ -19,7 +19,7 @@ link)
+ Linux)
+ FLAGS="";
+ [ -e /usr/include/selinux/selinux.h ] && FLAGS="$FLAGS -lselinux";
+- [ -e /usr/include/systemd/sd-daemon.h ] && FLAGS="$FLAGS -lsystemd-daemon";
++ [ -e /usr/include/systemd/sd-daemon.h ] && FLAGS="$FLAGS $(pkg-config --libs libsystemd-daemon)";
+ echo $FLAGS;
+ ;;
+ esac
+--
+1.9.3
+
diff --git a/net-misc/iodine/files/iodined-1.init b/net-misc/iodine/files/iodined-1.init
new file mode 100644
index 000000000000..2db184a8d093
--- /dev/null
+++ b/net-misc/iodine/files/iodined-1.init
@@ -0,0 +1,62 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+PID_FILE="/run/iodined.pid"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting iodined"
+ ARGS=""
+ if [ "$IODINED_USER" ]; then
+ ARGS="$ARGS -u $IODINED_USER"
+ fi
+ if [ "$IODINED_CHROOT" ]; then
+ ARGS="$ARGS -t $IODINED_CHROOT"
+ fi
+ if [ "$IODINED_MTU" ]; then
+ ARGS="$ARGS -m $IODINED_MTU"
+ fi
+ if [ "$IODINED_LISTENPORT" ]; then
+ ARGS="$ARGS -p $IODINED_LISTENPORT"
+ fi
+ if [ "$IODINED_EXTERN_IP" ]; then
+ ARGS="$ARGS -n $IODINED_EXTERN_IP"
+ fi
+ if [ "$IODINED_LOCAL_DNS_PORT" ]; then
+ ARGS="$ARGS -b $IODINED_LOCAL_DNS_PORT"
+ fi
+ if [ "$IODINED_LISTENIP" ]; then
+ ARGS="$ARGS -l $IODINED_LISTENIP"
+ fi
+ if [ "$IODINED_PASSWD" ]; then
+ ARGS="$ARGS -P $IODINED_PASSWD"
+ else
+ eerror "Please set a password (IODINED_PASSWD) in /etc/conf.d/iodined!"
+ return 1
+ fi
+ if [ "$IODINED_IP" ]; then
+ ARGS="$ARGS $IODINED_IP"
+ else
+ eerror "Please set an IP (IODINED_IP) in /etc/conf.d/iodined!"
+ return 1
+ fi
+ if [ "$IODINED_DOMAIN" ]; then
+ ARGS="$ARGS $IODINED_DOMAIN"
+ else
+ eerror "Please set a domain (IODINED_DOMAIN) in /etc/conf.d/iodined!"
+ return 1
+ fi
+ start-stop-daemon --start --exec /usr/sbin/iodined --pidfile $PID_FILE -- -F $PID_FILE $ARGS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping iodined"
+ start-stop-daemon --stop --exec /usr/sbin/iodined --pidfile $PID_FILE
+ eend $?
+}
diff --git a/net-misc/iodine/files/iodined.conf b/net-misc/iodine/files/iodined.conf
new file mode 100644
index 000000000000..7889b0892eea
--- /dev/null
+++ b/net-misc/iodine/files/iodined.conf
@@ -0,0 +1,44 @@
+# /etc/conf.d/iodined: config file for /etc/init.d/iodined
+
+# Drop privileges to this user after startup
+# This is used by the -u argument. Comment out to keep running as root.
+IODINED_USER="nobody"
+
+# Chroot to this directory after startup
+# This is used by the -t argument. Comment out to avoid chroot.
+IODINED_CHROOT="/var/empty"
+
+# This password needs to be used in all clients when they connect
+# This is used by the -P argument
+IODINED_PASSWD=""
+
+# This is the MTU (Max Transmit Unit) used in the tunnel.
+# You probably dont need this field at all, downstream data will
+# now be fragmented. This is used by the -m argument
+#IODINED_MTU=1020
+
+# The server port to listen on. You should normally not change this.
+# See man page. This is used by the -p argument
+#IODINED_LISTENPORT=53
+
+# The IP address to return as reply to NS queries. If not set, it will
+# be the destination address of the query. Used by the -n argument
+#IODINED_EXTERN_IP=1.1.1.1
+
+# The port used by a "real" DNS server on localhost. Queries for
+# domains not handled by iodined will be forwarded to this port,
+# and answers will be routed back. Used by the -b argument
+#IODINED_LOCAL_DNS_PORT=5353
+
+# The IP number to listen on.
+# This is used by the -l argument
+#IODINED_LISTENIP=127.0.0.1
+
+# This IP number will be used by the local tun device.
+IODINED_IP="172.28.0.1"
+
+# Use subdomains to this domain for network tunneling
+# If a real domain is used, it should be delegated to this server with
+# a NS entry in the domain zone (see man page)
+IODINED_DOMAIN="blah.abc"
+
diff --git a/net-misc/iodine/files/iodined.init b/net-misc/iodine/files/iodined.init
new file mode 100644
index 000000000000..bb0915f91ecd
--- /dev/null
+++ b/net-misc/iodine/files/iodined.init
@@ -0,0 +1,62 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+PID_FILE="/var/run/iodined.pid"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting iodined"
+ ARGS=""
+ if [ "$IODINED_USER" ]; then
+ ARGS="$ARGS -u $IODINED_USER"
+ fi
+ if [ "$IODINED_CHROOT" ]; then
+ ARGS="$ARGS -t $IODINED_CHROOT"
+ fi
+ if [ "$IODINED_MTU" ]; then
+ ARGS="$ARGS -m $IODINED_MTU"
+ fi
+ if [ "$IODINED_LISTENPORT" ]; then
+ ARGS="$ARGS -p $IODINED_LISTENPORT"
+ fi
+ if [ "$IODINED_EXTERN_IP" ]; then
+ ARGS="$ARGS -n $IODINED_EXTERN_IP"
+ fi
+ if [ "$IODINED_LOCAL_DNS_PORT" ]; then
+ ARGS="$ARGS -b $IODINED_LOCAL_DNS_PORT"
+ fi
+ if [ "$IODINED_LISTENIP" ]; then
+ ARGS="$ARGS -l $IODINED_LISTENIP"
+ fi
+ if [ "$IODINED_PASSWD" ]; then
+ ARGS="$ARGS -P $IODINED_PASSWD"
+ else
+ eerror "Please set a password (IODINED_PASSWD) in /etc/conf.d/iodined!"
+ return 1
+ fi
+ if [ "$IODINED_IP" ]; then
+ ARGS="$ARGS $IODINED_IP"
+ else
+ eerror "Please set an IP (IODINED_IP) in /etc/conf.d/iodined!"
+ return 1
+ fi
+ if [ "$IODINED_DOMAIN" ]; then
+ ARGS="$ARGS $IODINED_DOMAIN"
+ else
+ eerror "Please set a domain (IODINED_DOMAIN) in /etc/conf.d/iodined!"
+ return 1
+ fi
+ start-stop-daemon --start --exec /usr/bin/iodined --pidfile $PID_FILE -- -F $PID_FILE $ARGS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping iodined"
+ start-stop-daemon --stop --exec /usr/bin/iodined --pidfile $PID_FILE
+ eend $?
+}
diff --git a/net-misc/iodine/iodine-0.7.0.ebuild b/net-misc/iodine/iodine-0.7.0.ebuild
new file mode 100644
index 000000000000..ec2d1dd880d0
--- /dev/null
+++ b/net-misc/iodine/iodine-0.7.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit linux-info eutils toolchain-funcs
+
+DESCRIPTION="IP over DNS tunnel"
+HOMEPAGE="http://code.kryo.se/iodine/"
+SRC_URI="http://code.kryo.se/${PN}/${P}.tar.gz"
+
+CONFIG_CHECK="~TUN"
+
+LICENSE="ISC GPL-2" #GPL-2 for init script bug #426060
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RDEPEND="sys-libs/zlib"
+DEPEND="${RDEPEND}
+ test? ( dev-libs/check )"
+
+src_prepare(){
+ epatch "${FILESDIR}"/${P}-TestMessage.patch
+ epatch "${FILESDIR}"/${P}-new-systemd.patch
+
+ sed -e '/^\s@echo \(CC\|LD\)/d' \
+ -e 's:^\(\s\)@:\1:' \
+ -i {,src/}Makefile || die
+
+ tc-export CC
+}
+
+src_compile() {
+ #shipped ./Makefiles doesn't pass -j<n> to submake
+ emake -C src TARGETOS=Linux all
+}
+
+src_install() {
+ #don't re-run submake
+ sed -e '/^install:/s: all: :' \
+ -i Makefile || die
+ emake prefix="${EPREFIX}"usr DESTDIR="${D}" install
+
+ dodoc CHANGELOG README TODO
+
+ newinitd "${FILESDIR}"/iodined-1.init iodined
+ newconfd "${FILESDIR}"/iodined.conf iodined
+ keepdir /var/empty
+}
diff --git a/net-misc/iodine/metadata.xml b/net-misc/iodine/metadata.xml
new file mode 100644
index 000000000000..2fe9ba7b2dd5
--- /dev/null
+++ b/net-misc/iodine/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>vostorga@gentoo.org</email>
+ <name>Víctor Ostorga</name>
+ </maintainer>
+ <maintainer>
+ <email>root@kryo.se</email>
+ <name>Erik Ekman</name>
+ </maintainer>
+ <maintainer>
+ <email>zx2c4@gentoo.org</email>
+ <name>Jason A. Donenfeld</name>
+ </maintainer>
+ <longdescription>iodine lets you tunnel IPv4 data through a DNS server. This can be usable in different situations where internet access is firewalled, but DNS queries are allowed</longdescription>
+</pkgmetadata>
diff --git a/net-misc/ip-sentinel/Manifest b/net-misc/ip-sentinel/Manifest
new file mode 100644
index 000000000000..76c2412e6fea
--- /dev/null
+++ b/net-misc/ip-sentinel/Manifest
@@ -0,0 +1 @@
+DIST ip-sentinel-0.12.tar.bz2 165803 SHA256 1767fe155280361804cf1a62b2f77228bd764452668783050b6309cca888fb22 SHA512 dfa025fd96260073903ffe33dbaa5a146658dee2b8cb9bc04da0894a8de83207971a7f1e731128e42a0421052cdc352ed43a0298916f521d5f230533266e5077 WHIRLPOOL 5e377d38b5a6c5a70bc23044fa5103efdf48a3511df76ab7435e9445e5e85c2b910bd40bb6af2e0e40ab455c78754e7e97954f99a504a14e060086c6fbd27557
diff --git a/net-misc/ip-sentinel/files/ip-sentinel.cfg b/net-misc/ip-sentinel/files/ip-sentinel.cfg
new file mode 100644
index 000000000000..f767cd1d0d5f
--- /dev/null
+++ b/net-misc/ip-sentinel/files/ip-sentinel.cfg
@@ -0,0 +1,11 @@
+# This is configuration file for ip-sentinel
+
+# Next line blocks all computers inside network
+0.0.0.0/0
+
+# Now please add computers that are allowed to communicate
+# ! denotes not to block
+!10.10.146.1
+!10.10.146.236@be:ef:de:ad:be:ef
+
+# see "man ip-sentinel" for more details.
diff --git a/net-misc/ip-sentinel/files/ip-sentinel.conf.d b/net-misc/ip-sentinel/files/ip-sentinel.conf.d
new file mode 100644
index 000000000000..d61fc9f5bfc9
--- /dev/null
+++ b/net-misc/ip-sentinel/files/ip-sentinel.conf.d
@@ -0,0 +1,11 @@
+# Configure which interface for ip-sentinel to listen on.
+IFACE="eth0"
+
+# Insert any other options needed
+OPTS=""
+
+# If you wish to run ip-sentinel in a chroot, run:
+# emerge --config =net-misc/<ip-sentinel-version>
+# and un-comment the following line.
+# You can specify a different chroot directory but MAKE SURE it's empty.
+# CHROOT="/chroot/ip-sentinel"
diff --git a/net-misc/ip-sentinel/files/ip-sentinel.init b/net-misc/ip-sentinel/files/ip-sentinel.init
new file mode 100644
index 000000000000..1f293ad64a98
--- /dev/null
+++ b/net-misc/ip-sentinel/files/ip-sentinel.init
@@ -0,0 +1,50 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+CFG_FILE="/etc/ip-sentinel.cfg"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -f "${CFG_FILE}" ] ; then
+ eerror "File ${CFG_FILE} does not exists!"
+ return 1
+ fi
+
+ if [ -n "${CHROOT}" ] ; then
+ local_opts="--user ipsentinel --group ipsentinel -r ${CHROOT}"
+ else
+ local_opts="--user ipsentinel --group ipsentinel -r /"
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting ip-sentinel..."
+ start-stop-daemon --start --quiet --exec /usr/sbin/ip-sentinel -- --ipfile ${CFG_FILE} ${local_opts} $OPTS $IFACE &
+ eend $? "Failed to start ip-sentinel"
+}
+
+stop() {
+ ebegin "Stoping ip-sentinel..."
+ start-stop-daemon --stop --quiet --pidfile /var/run/ip-sentinel.run
+ eend $? "Failed to stop ip-sentinel"
+}
+
+restart () {
+ svc_stop
+ echo "Please, wait while child process quit..."
+ while `ps aux | grep -v 'init.d' | grep [i]p-sentinel >/dev/null`
+ do
+ echo -n ". "
+ sleep 1
+ done
+ echo "[Done]"
+ svc_start
+}
+
diff --git a/net-misc/ip-sentinel/ip-sentinel-0.12.ebuild b/net-misc/ip-sentinel/ip-sentinel-0.12.ebuild
new file mode 100644
index 000000000000..fbea56fca359
--- /dev/null
+++ b/net-misc/ip-sentinel/ip-sentinel-0.12.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 user
+
+DESCRIPTION="Prevent unauthorized usage of IPs in the local ethernet broadcastdomain by answering ARP-requests"
+HOMEPAGE="http://www.nongnu.org/ip-sentinel/"
+LICENSE="GPL-2"
+SRC_URI="http://savannah.nongnu.org/download/ip-sentinel/${P}.tar.bz2"
+SLOT="0"
+KEYWORDS="x86"
+
+DOCS=( AUTHORS ChangeLog NEWS README THANKS )
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/ip-sentinel.init ip-sentinel
+ newconfd "${FILESDIR}"/ip-sentinel.conf.d ip-sentinel
+
+ insinto /etc
+ newins "${FILESDIR}"/ip-sentinel.cfg ip-sentinel.cfg
+}
+
+pkg_setup() {
+ enewgroup ipsentinel
+ enewuser ipsentinel -1 -1 -1 ipsentinel
+}
+
+pkg_postinst() {
+ elog "You can edit /etc/conf.d/ip-sentinel to customize startup daemon"
+ elog "settings."
+ elog
+ elog "Default ip-sentinel config is in /etc/ip-sentinel.cfg"
+ elog
+ elog "The ip-sentinel ebuild has chroot support."
+ elog "If you like to run ip-sentinel in chroot AND this is a new install OR"
+ elog "your ip-sentinel doesn't already run in chroot, simply run:"
+ elog "emerge --config =${CATEGORY}/${PF}"
+ elog "Before running the above command you might want to change the chroot"
+ elog "dir in /etc/conf.d/ip-sentinel, otherwise /chroot/ip-sentinel will be used."
+ echo
+ ewarn "And please! DO NOT START THIS DAEMON thoughtlessly."
+ ewarn "If you DO this will BLOCK ALL communication inside your ethernet"
+ ewarn "segment!!! If you have any doubts do not start ip-sentinel."
+}
+
+pkg_config() {
+ CHROOT=`sed -n 's/^[[:blank:]]\?CHROOT="\([^"]\+\)"/\1/p' /etc/conf.d/ip-sentinel 2>/dev/null`
+
+ if [ ! -d "${CHROOT:=/chroot/ip-sentinel}" ] ; then
+ ebegin "Setting up the chroot directory"
+ mkdir -m 0755 -p "${CHROOT}/etc"
+ cp -R /etc/ip-sentinel.cfg "${CHROOT}/etc"
+ eend
+
+ if [ "`grep '^#[[:blank:]]\?CHROOT' /etc/conf.d/ip-sentinel`" ] ; then
+ sed -e '/^#[[:blank:]]\?CHROOT/s/^#[[:blank:]]\?//' \
+ -i /etc/conf.d/ip-sentinel
+ fi
+ else
+ eerror
+ eerror "${CHROOT} already exists. Quitting."
+ eerror
+ fi
+}
diff --git a/net-misc/ip-sentinel/metadata.xml b/net-misc/ip-sentinel/metadata.xml
new file mode 100644
index 000000000000..d6c671a6f308
--- /dev/null
+++ b/net-misc/ip-sentinel/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<longdescription>
+This program tries to prevent unauthorized usage of IPs within the local
+ethernet broadcastdomain by giving an answer to ARP-requests. After receiving
+such a faked reply, the requesting party stores the told MAC in its ARP-table
+and will send future packets to this MAC. Because this MAC is invalid, the host
+with the invalid IP can not be reached.
+</longdescription>
+<longdescription lang="ja">
+このプログラムは ARP リクエストへの応答を利用したローカルイーサネットの
+ブロードキャストドメイン内で認められていない IP パケットの使用法を阻止し
+ようと試みます。偽造された応答を受信すれば、そのリクエスト・パーティは
+ARP テーブル内の該当する MAC アドレスを覚え、その後のパケットをこの MAC
+アドレスへ送ります。何故ならばこの MAC アドレスは不正なもので、無効な IP
+パケットはそのホストへ到達できないからです。
+</longdescription>
+</pkgmetadata>
diff --git a/net-misc/ipcalc/Manifest b/net-misc/ipcalc/Manifest
new file mode 100644
index 000000000000..8912eacb7e6c
--- /dev/null
+++ b/net-misc/ipcalc/Manifest
@@ -0,0 +1 @@
+DIST ipcalc-0.41.tar.gz 21599 SHA256 dda9c571ce3369e5b6b06e92790434b54bec1f2b03f1c9df054c0988aa4e2e8a SHA512 089eb2b9a38b07caa182ff11547a93d86aed570311fc8cd9e636c7546ab4d15acc854b9d79bbba9c797dcfbbedd1d6f4d521aec97bf613905fe5198a29c9889d WHIRLPOOL 7fbc5393d68fed03a5f9fc97d45ab31280d7a0244b78c4874945b675deb06ba5e7c3acae375ed151993da047a15d8c9f93c1e19640cf1a4425b67e05848f70d9
diff --git a/net-misc/ipcalc/ipcalc-0.41.ebuild b/net-misc/ipcalc/ipcalc-0.41.ebuild
new file mode 100644
index 000000000000..b50b0daa9878
--- /dev/null
+++ b/net-misc/ipcalc/ipcalc-0.41.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="calculates broadcast/network/etc... from an IP address and netmask"
+LICENSE="GPL-2+"
+HOMEPAGE="http://jodies.de/ipcalc"
+SRC_URI="${HOMEPAGE}-archive/${P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+
+RDEPEND=">=dev-lang/perl-5.6.0"
+
+src_install () {
+ dobin ${PN}
+ dodoc changelog contributors
+}
diff --git a/net-misc/ipcalc/metadata.xml b/net-misc/ipcalc/metadata.xml
new file mode 100644
index 000000000000..78692635ad22
--- /dev/null
+++ b/net-misc/ipcalc/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>netmon</herd>
+</pkgmetadata>
diff --git a/net-misc/iperf/Manifest b/net-misc/iperf/Manifest
new file mode 100644
index 000000000000..fd6545614734
--- /dev/null
+++ b/net-misc/iperf/Manifest
@@ -0,0 +1,3 @@
+DIST iperf-2.0.5.tar.gz 248583 SHA256 636b4eff0431cea80667ea85a67ce4c68698760a9837e1e9d13096d20362265b SHA512 da9a0c01dea2a9dd33aa130b11d938d5f44dd6c3ab27526b0a43df5bf2550fede04238a00b7d54037426afe90ac6d8c4f4ae6861aa170ca7835b6664c9d6537f WHIRLPOOL d66b007fad372516c7f7377872b69ea450fa9ff6d1492f2a224a73f2fb3f7616bd2d57a34a815d4d95683d81fd02d76472d4727323e920410034ba725f6476ce
+DIST iperf-3.0.11.tar.gz 426434 SHA256 c774b807ea4db20e07558c47951df186b6fb1dd0cdef4282c078853ad87cc712 SHA512 292b826099a1fc813f2fbe4506f8bd8b3b2e4dde04e33a097cce966d7502b3c521a29b9ba74e55fe38406fdb85090695f59febbf4ca31bb1ffc801b3b7615d19 WHIRLPOOL e16799997d7e3c0abe2e2a93bd559a69c0d3c96aab954cd9fb4be93cc8ce4f38c7a2ced034b1b03b2dc257bd5c82d202b4da528ee11f86ed99890fb02cad4b04
+DIST iperf-3.1_beta3.tar.gz 542912 SHA256 ed96fd8dcc7150f3bb93536e3f1858121210e7f90cd637d76400e26cb1426679 SHA512 eab26b54a14e86fbe1503979b5924abdb3438710c7baf782fef97e7170f4d81eb9946b000fadd89d123daecb03b6a09fc429615c076fb0a444d30929983e3be8 WHIRLPOOL a627a88fe7c863af354a7e00bfe066bd06daee7e1fc72de385d4294b7304bd7ce1af7c35a0bf257305b5851db8a1b376d58f39e2053c8aa801b7a16bae0c9531
diff --git a/net-misc/iperf/files/iperf-3.0.5-flags.patch b/net-misc/iperf/files/iperf-3.0.5-flags.patch
new file mode 100644
index 000000000000..9c11c282c339
--- /dev/null
+++ b/net-misc/iperf/files/iperf-3.0.5-flags.patch
@@ -0,0 +1,31 @@
+* Do not inject -g
+* Do not make a profiled build
+
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -1,6 +1,6 @@
+ lib_LTLIBRARIES = libiperf.la # Build and install an iperf library
+ bin_PROGRAMS = iperf3 # Build and install an iperf binary
+-noinst_PROGRAMS = t_timer t_units t_uuid iperf3_profile # Build, but don't install the test programs and a profiled version of iperf3
++noinst_PROGRAMS = t_timer t_units t_uuid # Build, but don't install the test programs and a profiled version of iperf3
+ include_HEADERS = iperf_api.h # Defines the headers that get installed with the program
+
+
+@@ -37,14 +37,13 @@
+
+ # Specify the sources and various flags for the iperf binary
+ iperf3_SOURCES = main.c
+-iperf3_CFLAGS = -g
++iperf3_CFLAGS =
+ iperf3_LDADD = libiperf.la
+-iperf3_LDFLAGS = -g
++iperf3_LDFLAGS =
+
+ # Specify the sources and various flags for the profiled iperf binary. This
+ # binary recompiles all the source files to make sure they are all profiled.
+-iperf3_profile_SOURCES = main.c \
+- $(libiperf_la_SOURCES)
++iperf3_profile_SOURCES = main.c
+
+ iperf3_profile_CFLAGS = -pg -g
+ iperf3_profile_LDADD = libiperf.la
diff --git a/net-misc/iperf/files/iperf-bidirectional-tcp-server.patch b/net-misc/iperf/files/iperf-bidirectional-tcp-server.patch
new file mode 100644
index 000000000000..88a1a4f00c4c
--- /dev/null
+++ b/net-misc/iperf/files/iperf-bidirectional-tcp-server.patch
@@ -0,0 +1,23 @@
+Description: Fix bidirectional TCP server exiting after the test
+ iperf bidirectional test using parameter -r or -d doesn't work as
+ expected, the server exits after the test, but it should continue listening
+ for new connections.
+Author: Roberto Lumbreras <rover@debian.org>
+Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=449796
+Forwarded: http://sourceforge.net/tracker/?func=detail&aid=1983829&group_id=128336&atid=711371
+
+--- a/src/Client.cpp
++++ b/src/Client.cpp
+@@ -212,10 +212,12 @@ void Client::Run( void ) {
+ char* readAt = mBuf;
+
+ #if HAVE_THREAD
++ /*
+ if ( !isUDP( mSettings ) ) {
+ RunTCP();
+ return;
+ }
++ */
+ #endif
+
+ // Indicates if the stream is readable
diff --git a/net-misc/iperf/files/iperf-cast-to-max_size_t-instead-of-int.patch b/net-misc/iperf/files/iperf-cast-to-max_size_t-instead-of-int.patch
new file mode 100644
index 000000000000..34d37eef671d
--- /dev/null
+++ b/net-misc/iperf/files/iperf-cast-to-max_size_t-instead-of-int.patch
@@ -0,0 +1,20 @@
+Description: iperf does not handle right large time values
+ Reported by Eugene Butan <eugene@mikrotik.com>
+ When I invoke 'iperf' with '-t 100000000' argument from an ordinary shell
+ prompt it immediately exits displaying incorrect bandwidth. If I supply
+ smaller time value, iperf works as expected.
+Author: Roberto Lumbreras <rover@debian.org>
+Bug-Debian: http://bugs.debian.org/346099
+Forwarded: https://sourceforge.net/tracker/index.php?func=detail&aid=3140391&group_id=128336&atid=711371
+
+--- a/src/Settings.cpp
++++ b/src/Settings.cpp
+@@ -458,7 +458,7 @@
+ case 't': // seconds to write for
+ // time mode (instead of amount mode)
+ setModeTime( mExtSettings );
+- mExtSettings->mAmount = (int) (atof( optarg ) * 100.0);
++ mExtSettings->mAmount = (max_size_t) (atof( optarg ) * 100.0);
+ break;
+
+ case 'u': // UDP instead of TCP
diff --git a/net-misc/iperf/files/iperf-die-on-bind-fail.patch b/net-misc/iperf/files/iperf-die-on-bind-fail.patch
new file mode 100644
index 000000000000..1f54cf556d29
--- /dev/null
+++ b/net-misc/iperf/files/iperf-die-on-bind-fail.patch
@@ -0,0 +1,19 @@
+Description: iperf die on bind fail
+ When iperf encounters a fatal error when binding to a port, such as
+ the port being already in use or lacking permission, it fails to give
+ fatal error, but instead pretends to continue to listen on the port.
+Author: Deny IP Any Any <denyipanyany@gmail.com>
+Bug-Debian: http://bugs.debian.org/517239
+Forwarded: https://sourceforge.net/tracker/?func=detail&aid=3140400&group_id=128336&atid=711371
+
+--- a/src/Listener.cpp
++++ b/src/Listener.cpp
+@@ -333,7 +333,7 @@
+ #endif
+ {
+ rc = bind( mSettings->mSock, (sockaddr*) &mSettings->local, mSettings->size_local );
+- WARN_errno( rc == SOCKET_ERROR, "bind" );
++ FAIL_errno( rc == SOCKET_ERROR, "bind", mSettings );
+ }
+ // listen for connections (TCP only).
+ // default backlog traditionally 5
diff --git a/net-misc/iperf/files/iperf-fix-bandwidth-limit.patch b/net-misc/iperf/files/iperf-fix-bandwidth-limit.patch
new file mode 100644
index 000000000000..eb9df8cd31b3
--- /dev/null
+++ b/net-misc/iperf/files/iperf-fix-bandwidth-limit.patch
@@ -0,0 +1,21 @@
+
+2011-10-14 Israel G. Lugo <israel.lugo@lugosys.com>
+
+* Fix delay_loop() for delays of 1s and greater. Was causing breakage when a
+low bandwidth limit was specified.
+
+
+--- a/compat/delay.cpp
++++ b/compat/delay.cpp
+@@ -63,8 +63,9 @@ void delay_loop(unsigned long usec)
+ {
+ struct timespec requested, remaining;
+
+- requested.tv_sec = 0;
+- requested.tv_nsec = usec * 1000L;
++ /* convert to seconds; nanosleep requires 0 <= tv_nsec <= 999999999 */
++ requested.tv_sec = usec / 1000000UL;
++ requested.tv_nsec = (usec % 1000000UL) * 1000UL;
+
+ while (nanosleep(&requested, &remaining) == -1)
+ if (errno == EINTR)
diff --git a/net-misc/iperf/files/iperf-fix-format-security-ftbfs.patch b/net-misc/iperf/files/iperf-fix-format-security-ftbfs.patch
new file mode 100644
index 000000000000..2f5b03277209
--- /dev/null
+++ b/net-misc/iperf/files/iperf-fix-format-security-ftbfs.patch
@@ -0,0 +1,96 @@
+Description: iperf format string FTBFS with -Werror=format-security
+ Reported by Didier Raboud <odyx@debian.org>
+Author: Simon Paillard <spaillard@debian.org>
+Bug-Debian: http://bugs.debian.org/643408
+
+--- a/compat/Thread.c
++++ b/compat/Thread.c
+@@ -381,7 +381,7 @@
+ Condition_Lock( thread_sNum_cond );
+ thread_sNum -= nonterminating_num;
+ if ( thread_sNum > 1 && nonterminating_num > 0 && interrupt != 0 ) {
+- fprintf( stderr, wait_server_threads );
++ fprintf( stderr, "%s", wait_server_threads );
+ }
+ nonterminating_num = 0;
+ Condition_Signal( &thread_sNum_cond );
+--- a/src/ReportDefault.c
++++ b/src/ReportDefault.c
+@@ -78,7 +78,7 @@
+ if ( stats->mUDP != (char)kMode_Server ) {
+ // TCP Reporting
+ if( !header_printed ) {
+- printf( report_bw_header);
++ printf( "%s", report_bw_header);
+ header_printed = 1;
+ }
+ printf( report_bw_format, stats->transferID,
+@@ -87,7 +87,7 @@
+ } else {
+ // UDP Reporting
+ if( !header_printed ) {
+- printf( report_bw_jitter_loss_header);
++ printf( "%s", report_bw_jitter_loss_header);
+ header_printed = 1;
+ }
+ printf( report_bw_jitter_loss_format, stats->transferID,
+@@ -159,7 +159,7 @@
+ (data->mThreadMode == kMode_Listener ? 0 : 1) );
+ win_requested = data->mTCPWin;
+
+- printf( separator_line );
++ printf( "%s", separator_line );
+ if ( data->mThreadMode == kMode_Listener ) {
+ printf( server_port,
+ (isUDP( data ) ? "UDP" : "TCP"),
+@@ -198,7 +198,7 @@
+ printf( warn_window_requested, buffer );
+ }
+ printf( "\n" );
+- printf( separator_line );
++ printf( "%s", separator_line );
+ }
+
+ /*
+@@ -286,7 +286,7 @@
+ } else if ( checkMSS_MTU( inMSS, 576 ) ) {
+ net = "minimum";
+ mtu = 576;
+- printf( warn_no_pathmtu );
++ printf( "%s", warn_no_pathmtu );
+ } else {
+ mtu = inMSS + 40;
+ net = "unknown interface";
+--- a/src/Reporter.c
++++ b/src/Reporter.c
+@@ -896,7 +896,7 @@
+ } else if ( checkMSS_MTU( inMSS, 576 ) ) {
+ net = "minimum";
+ mtu = 576;
+- printf( warn_no_pathmtu );
++ printf( "%s", warn_no_pathmtu );
+ } else {
+ mtu = inMSS + 40;
+ net = "unknown interface";
+--- a/src/Settings.cpp
++++ b/src/Settings.cpp
+@@ -375,8 +375,8 @@
+ break;
+
+ case 'h': // print help and exit
+- fprintf(stderr, usage_long1);
+- fprintf(stderr, usage_long2);
++ fprintf(stderr, "%s", usage_long1);
++ fprintf(stderr, "%s", usage_long2);
+ exit(1);
+ break;
+
+@@ -482,7 +482,7 @@
+ break;
+
+ case 'v': // print version and exit
+- fprintf( stderr, version );
++ fprintf( stderr, "%s", version );
+ exit(1);
+ break;
+
diff --git a/net-misc/iperf/files/iperf-ipv6_mcast_check.patch b/net-misc/iperf/files/iperf-ipv6_mcast_check.patch
new file mode 100644
index 000000000000..bef05259a4d8
--- /dev/null
+++ b/net-misc/iperf/files/iperf-ipv6_mcast_check.patch
@@ -0,0 +1,22 @@
+Description: Fix improper check for IPv6 family when sending multicast
+ This patch fixes the proper behavior of -T (hop-limit setting) when
+ sending IPv6 multicast packets. Due to this bug, it was always fixed to 1.
+ .
+ SetSocketOptions() is called before socket connection, thus sa_family is
+ still set to 0. This is causing the if-branch in the multicast check
+ to always assume a non-IPv6 socket.
+ Checking the remote-peer family works reliably, instead.
+Author: Luca Bruno <lucab@debian.org>
+Last-Update: 2012-05-24
+
+--- a/src/PerfSocket.cpp
++++ b/src/PerfSocket.cpp
+@@ -109,7 +109,7 @@ void SetSocketOptions( thread_Settings *
+ if ( isMulticast( inSettings ) && ( inSettings->mTTL > 0 ) ) {
+ int val = inSettings->mTTL;
+ #ifdef HAVE_MULTICAST
+- if ( !SockAddr_isIPv6( &inSettings->local ) ) {
++ if ( !SockAddr_isIPv6( &inSettings->peer ) ) {
+ int rc = setsockopt( inSettings->mSock, IPPROTO_IP, IP_MULTICAST_TTL,
+ (const void*) &val, (Socklen_t) sizeof(val));
+
diff --git a/net-misc/iperf/files/iperf.confd b/net-misc/iperf/files/iperf.confd
new file mode 100644
index 000000000000..01bd473328e3
--- /dev/null
+++ b/net-misc/iperf/files/iperf.confd
@@ -0,0 +1,6 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# extra options (run iperf -h for a list of supported options)
+IPERF_OPTS="--format Mbytes"
diff --git a/net-misc/iperf/files/iperf.initd-r1 b/net-misc/iperf/files/iperf.initd-r1
new file mode 100644
index 000000000000..dae8cf04ab49
--- /dev/null
+++ b/net-misc/iperf/files/iperf.initd-r1
@@ -0,0 +1,15 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="IP bandwidth measurement server"
+command="/usr/bin/iperf"
+
+command_background="yes"
+pidfile="/run/${SVCNAME}.pid"
+command_args="-s ${IPERF_OPTS}"
+
+# note: iperf has a -D/--daemon flag but we seem to hit a bug
+# where it starts to eat all CPU after client disconnect,
+# see bug #344875
diff --git a/net-misc/iperf/iperf-2.0.5-r2.ebuild b/net-misc/iperf/iperf-2.0.5-r2.ebuild
new file mode 100644
index 000000000000..3e2238c03f75
--- /dev/null
+++ b/net-misc/iperf/iperf-2.0.5-r2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit base
+
+DESCRIPTION="Tool to measure IP bandwidth using UDP or TCP"
+HOMEPAGE="http://iperf.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="HPND"
+SLOT="2"
+KEYWORDS="amd64 ~arm hppa ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint"
+IUSE="ipv6 threads debug"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-fix-bandwidth-limit.patch
+ "${FILESDIR}"/${PN}-cast-to-max_size_t-instead-of-int.patch
+ "${FILESDIR}"/${PN}-die-on-bind-fail.patch
+ "${FILESDIR}"/${PN}-bidirectional-tcp-server.patch
+ "${FILESDIR}"/${PN}-fix-format-security-ftbfs.patch
+ "${FILESDIR}"/${PN}-ipv6_mcast_check.patch
+ )
+DOCS="INSTALL README"
+
+src_configure() {
+ econf \
+ $(use_enable ipv6) \
+ $(use_enable threads) \
+ $(use_enable debug debuginfo)
+}
+
+src_install() {
+ default
+ dohtml doc/*
+ newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+}
diff --git a/net-misc/iperf/iperf-3.0.11.ebuild b/net-misc/iperf/iperf-3.0.11.ebuild
new file mode 100644
index 000000000000..4291b3a31d1b
--- /dev/null
+++ b/net-misc/iperf/iperf-3.0.11.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="A TCP, UDP, and SCTP network bandwidth measurement tool"
+LICENSE="BSD"
+SLOT="3"
+HOMEPAGE="https://github.com/esnet/iperf/"
+SRC_URI="https://codeload.github.com/esnet/${PN}/tar.gz/${PV} -> ${P}.tar.gz"
+KEYWORDS="amd64 ~arm hppa ~mips ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint"
+IUSE="static-libs"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.0.5-flags.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/net-misc/iperf/iperf-3.1_beta3.ebuild b/net-misc/iperf/iperf-3.1_beta3.ebuild
new file mode 100644
index 000000000000..4b4687a92d36
--- /dev/null
+++ b/net-misc/iperf/iperf-3.1_beta3.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="A TCP, UDP, and SCTP network bandwidth measurement tool"
+LICENSE="BSD"
+SLOT="3"
+HOMEPAGE="https://github.com/esnet/iperf/"
+SRC_URI="https://codeload.github.com/esnet/${PN}/tar.gz/${PV/_beta/b} -> ${P}.tar.gz"
+KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint"
+IUSE="static-libs"
+
+S=${WORKDIR}/${P/_beta/b}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.0.5-flags.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/net-misc/iperf/metadata.xml b/net-misc/iperf/metadata.xml
new file mode 100644
index 000000000000..9371ad630434
--- /dev/null
+++ b/net-misc/iperf/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>netmon</herd>
+ <upstream>
+ <remote-id type="github">esnet/iperf</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/ipsc/Manifest b/net-misc/ipsc/Manifest
new file mode 100644
index 000000000000..ac1de107d70e
--- /dev/null
+++ b/net-misc/ipsc/Manifest
@@ -0,0 +1 @@
+DIST ipsc-0.4.3.2.tar.bz2 16764 SHA256 6b414cb3b5fd17cafd453259a29cafb14a389c74e8d6e8ad9f97c6df60de0db7
diff --git a/net-misc/ipsc/ipsc-0.4.3.2-r2.ebuild b/net-misc/ipsc/ipsc-0.4.3.2-r2.ebuild
new file mode 100644
index 000000000000..79406ed0a696
--- /dev/null
+++ b/net-misc/ipsc/ipsc-0.4.3.2-r2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="IP Subnet Calculator"
+HOMEPAGE="http://packages.debian.org/unstable/net/ipsc"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i \
+ -e "s:^CC = gcc:CC = $(tc-getCC):" \
+ -e "/^CFLAGS = .*/d" \
+ -e "s/^LIBS = /LDLIBS = /" \
+ -e '/$(CC).*\\$/,+1d' \
+ -e '/$(CC)/d' \
+ src/Makefile || die "Unable to sed upstream Makefile"
+}
+
+src_compile() {
+ cd src
+ emake || die "Compilation failed"
+}
+
+src_install() {
+ dodoc README ChangeLog TODO CONTRIBUTORS
+ dobin src/ipsc
+ doman src/ipsc.1
+}
diff --git a/net-misc/ipsc/metadata.xml b/net-misc/ipsc/metadata.xml
new file mode 100644
index 000000000000..fa29b94a8471
--- /dev/null
+++ b/net-misc/ipsc/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>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ <description>This LINX engineer favourite is actively maintained.</description>
+</maintainer>
+<longdescription></longdescription>
+</pkgmetadata>
diff --git a/net-misc/ipsorcery/Manifest b/net-misc/ipsorcery/Manifest
new file mode 100644
index 000000000000..57161ecd6a15
--- /dev/null
+++ b/net-misc/ipsorcery/Manifest
@@ -0,0 +1 @@
+DIST ipsorc-2.0.9.tar.gz 38600 RMD160 04feb19a054b8a7d6a23320a4ec8f0c520511593 SHA1 f17968df6472e589c9ac10ffe8ae6b11a44d7b03 SHA256 bf1d9d022861db216521a8227e76c680211d95c2942160091eeabfc914af8644
diff --git a/net-misc/ipsorcery/ipsorcery-2.0.9-r1.ebuild b/net-misc/ipsorcery/ipsorcery-2.0.9-r1.ebuild
new file mode 100644
index 000000000000..1e3ae8697a94
--- /dev/null
+++ b/net-misc/ipsorcery/ipsorcery-2.0.9-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit toolchain-funcs
+
+DESCRIPTION="Ipsorcery allows you to generate IP, TCP, UDP, ICMP, and IGMP packets"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="mirror://gentoo/ipsorc-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ~sparc x86"
+IUSE=""
+
+S=${WORKDIR}/ipsorc-${PV}
+
+src_prepare() {
+ sed -i \
+ -e 's:-g -O2:$(LDFLAGS) $(CFLAGS):' \
+ Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" con || die
+}
+
+src_install() {
+ dosbin ipmagic || die
+ dodoc BUGS changelog HOWTO README
+}
diff --git a/net-misc/ipsorcery/metadata.xml b/net-misc/ipsorcery/metadata.xml
new file mode 100644
index 000000000000..1076258a0ce8
--- /dev/null
+++ b/net-misc/ipsorcery/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>maintainer-needed@gentoo.org</email>
+</maintainer>
+<longdescription></longdescription>
+</pkgmetadata>
diff --git a/net-misc/ipsvd/Manifest b/net-misc/ipsvd/Manifest
new file mode 100644
index 000000000000..fc4e90df855e
--- /dev/null
+++ b/net-misc/ipsvd/Manifest
@@ -0,0 +1 @@
+DIST ipsvd-1.0.0.tar.gz 77903 SHA256 ef7a725bc85acb5d09ab57658385bb470b3e4da5a4ffc88b5da6c6bd37d01fad
diff --git a/net-misc/ipsvd/files/ipsvd-1.0.0-fix-parallel-make.diff b/net-misc/ipsvd/files/ipsvd-1.0.0-fix-parallel-make.diff
new file mode 100644
index 000000000000..0b29a8e8cbb1
--- /dev/null
+++ b/net-misc/ipsvd/files/ipsvd-1.0.0-fix-parallel-make.diff
@@ -0,0 +1,42 @@
+--- Makefile.orig 2011-01-21 00:43:02.000000000 +0100
++++ Makefile 2011-01-21 00:47:27.000000000 +0100
+@@ -61,7 +61,7 @@
+ check-ipsvd-cdb: load check-ipsvd-cdb.o uint32_unpack.o unix.a byte.a
+ ./load check-ipsvd-cdb uint32_unpack.o unix.a byte.a
+
+-tcpsvd.o: compile sysdeps tcpsvd.c ipsvd_log.h
++tcpsvd.o: compile sysdeps tcpsvd.c ipsvd_log.h iopause.h
+ ./compile tcpsvd.c
+
+ sslsvd.o: compile sysdeps tcpsvd.c ssl_io.c ipsvd_log.h matrixssl
+@@ -70,7 +70,7 @@
+ ssl_io.o: compile sysdeps ssl_io.c matrixssl
+ ./compile -I./matrixssl ssl_io.c
+
+-udpsvd.o: compile sysdeps udpsvd.c ipsvd_log.h
++udpsvd.o: compile sysdeps udpsvd.c ipsvd_log.h iopause.h
+ ./compile udpsvd.c
+
+ ipsvd-cdb.o: compile sysdeps ipsvd-cdb.c
+@@ -94,10 +94,10 @@
+ ipsvd_fmt.o: compile ipsvd_fmt.c
+ ./compile ipsvd_fmt.c
+
+-ipsvd_check.o: compile ipsvd_check.c uint64.h
++ipsvd_check.o: compile ipsvd_check.c uint64.h iopause.h
+ ./compile ipsvd_check.c
+
+-ipsvd_hostname.o: compile ipsvd_hostname.c uint64.h
++ipsvd_hostname.o: compile ipsvd_hostname.c uint64.h iopause.h
+ ./compile ipsvd_hostname.c
+
+ ipsvd_phcc.o: compile ipsvd_phcc.c
+@@ -274,7 +274,7 @@
+ ./compile dns_rcrw.c
+
+ dns_resolve.o: compile dns_resolve.c iopause.h taia.h tai.h uint64.h taia.h \
+- byte.h dns.h stralloc.h gen_alloc.h iopause.h taia.h
++ byte.h dns.h stralloc.h gen_alloc.h taia.h
+ ./compile dns_resolve.c
+
+ dns_sortip.o: compile dns_sortip.c byte.h dns.h stralloc.h gen_alloc.h \
diff --git a/net-misc/ipsvd/ipsvd-1.0.0-r1.ebuild b/net-misc/ipsvd/ipsvd-1.0.0-r1.ebuild
new file mode 100644
index 000000000000..2d4bf6bdcfd0
--- /dev/null
+++ b/net-misc/ipsvd/ipsvd-1.0.0-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit toolchain-funcs flag-o-matic eutils
+
+DESCRIPTION="ipsvd is a set of internet protocol service daemons for Unix"
+HOMEPAGE="http://smarden.org/ipsvd/"
+SRC_URI="http://smarden.org/ipsvd/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static"
+
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}/net/${P}"
+
+src_prepare() {
+ cd "${S}"/src
+ epatch "${FILESDIR}"/${P}-fix-parallel-make.diff
+}
+
+src_configure() {
+ cd "${S}"/src
+ if use static ; then
+ append-ldflags -static
+ fi
+
+ echo "$(tc-getCC) ${CFLAGS}" > conf-cc
+ echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
+}
+
+src_compile() {
+ cd "${S}"/src
+ emake || die "make failed"
+}
+
+src_install() {
+ dobin src/{tcpsvd,udpsvd,ipsvd-cdb} || die "dobin"
+ dodoc package/{CHANGES,README}
+
+ dohtml doc/*.html
+ doman man/ipsvd-instruct.5 man/ipsvd.7 man/udpsvd.8 \
+ man/tcpsvd.8 man/ipsvd-cdb.8
+}
diff --git a/net-misc/ipsvd/metadata.xml b/net-misc/ipsvd/metadata.xml
new file mode 100644
index 000000000000..7af589e8bf54
--- /dev/null
+++ b/net-misc/ipsvd/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>maintainer-needed@gentoo.org</email>
+</maintainer>
+<longdescription>
+ipsvd is a set of internet protocol service daemons for Unix. It currently
+includes a TCP/IP service daemon, an SSLv3 TCP/IP service daemon (Linux and
+MacOSX), and a UDP/IP service daemon.
+
+An internet protocol service (ipsv) daemon waits for incoming connections on a
+local socket; for new connections, it conditionally runs an arbitrary program
+with standard input reading from the socket, and standard output writing to the
+socket (if connected), to handle the connection. Standard error is used for
+logging.
+
+ipsv daemons can be told to read and follow pre-defined instructions on how to
+handle incoming connections; based on the client's IP address or hostname, they
+can run different programs, set a different environment, deny a connection, or
+set a per host concurrency limit.
+
+Normally the ipsv daemons are run by a supervisor process, such as runsv from
+the runit package, or supervise from the daemontools package.
+
+ipsvd can be used to run services normally run by inetd, xinetd, or tcpserver.
+</longdescription>
+</pkgmetadata>
diff --git a/net-misc/iputils/Manifest b/net-misc/iputils/Manifest
new file mode 100644
index 000000000000..40e0b48a681b
--- /dev/null
+++ b/net-misc/iputils/Manifest
@@ -0,0 +1,2 @@
+DIST iputils-s20121221-manpages.tar.bz2 23778 SHA256 6fc7ed7d281b7a2ee00e4f75e5465c90498c685bcc988afdff74db4eaa736d1c SHA512 006be62e61bf1555c99dbd5aac270cbd8d1074a3016fdde3aeed47e5c9b1acd326aa30a596c532d6688827f7f61966a6e3141eaa3b6f4f943eb21ac227282d8c WHIRLPOOL da0ccb577c4b2189553419df2c093404752fb2865eb3e0bfececfc242d930ceb44f96b32d945cfdd0c9ca060359651b2ec8479db5cc9220cda412dfeee5e910d
+DIST iputils-s20121221.tar.bz2 155344 SHA256 450f549fc5b620c23c5929aa6d54b7ddfc7ee1cb1e8efdc5e8bb21d8d0c5319f SHA512 693d240becd766c345c3af2053fc0699b9358e54d667d40738c21d731b70e779112d81476a220d8300ca54250120385414a13610d445996f95a90571047389f4 WHIRLPOOL 64529180eb4b8e2f7a60c18df7cac49e10a4b7702514252d418b16dcdc10a85ccb0a7f8beb51274cc9d708be2026c4c136e720986795fd39d314e4f9d5590ec9
diff --git a/net-misc/iputils/files/021109-uclibc-no-ether_ntohost.patch b/net-misc/iputils/files/021109-uclibc-no-ether_ntohost.patch
new file mode 100644
index 000000000000..e790d2b51038
--- /dev/null
+++ b/net-misc/iputils/files/021109-uclibc-no-ether_ntohost.patch
@@ -0,0 +1,24 @@
+--- iputils/rarpd.c.mps 2004-06-10 15:27:01.000000000 +0200
++++ iputils/rarpd.c 2004-06-10 15:26:29.000000000 +0200
+@@ -42,7 +42,9 @@ int listen_arp;
+ char *ifname;
+ char *tftp_dir = "/etc/tftpboot";
+
++#ifndef __UCLIBC__
+ extern int ether_ntohost(char *name, unsigned char *ea);
++#endif
+ void usage(void) __attribute__((noreturn));
+
+ struct iflink
+@@ -305,7 +307,11 @@ struct rarp_map *rarp_lookup(int ifindex
+ 6,
+ };
+
++#ifndef __UCLIBC__
+ if (ether_ntohost(ename, lladdr) != 0 ||
++#else
++ if (
++#endif
+ (hp = gethostbyname(ename)) == NULL) {
+ if (verbose)
+ syslog(LOG_INFO, "not found in /etc/ethers");
diff --git a/net-misc/iputils/files/iputils-20071127-nonroot-floodping.patch b/net-misc/iputils/files/iputils-20071127-nonroot-floodping.patch
new file mode 100644
index 000000000000..cae87791dc21
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20071127-nonroot-floodping.patch
@@ -0,0 +1,11 @@
+--- iputils-s20071127/ping_common.h.orig 2008-06-10 11:16:06.000000000 +0100
++++ iputils-s20071127/ping_common.h 2008-06-10 11:16:18.000000000 +0100
+@@ -28,7 +28,7 @@
+
+ #define MAXWAIT 10 /* max seconds to wait for response */
+ #define MININTERVAL 10 /* Minimal interpacket gap */
+-#define MINUSERINTERVAL 200 /* Minimal allowed interval for non-root */
++#define MINUSERINTERVAL 0 /* Minimal allowed interval for non-root */
+
+ #define SCHINT(a) (((a) <= MININTERVAL) ? MININTERVAL : (a))
+
diff --git a/net-misc/iputils/files/iputils-20100418-so_mark.patch b/net-misc/iputils/files/iputils-20100418-so_mark.patch
new file mode 100644
index 000000000000..ad92254d6f8d
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20100418-so_mark.patch
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/335347
+
+fix building with older linux headers that don't define SO_MARK
+
+--- ping_common.c
++++ ping_common.c
+@@ -485,6 +485,7 @@
+ fprintf(stderr, "Warning: no SO_TIMESTAMP support, falling back to SIOCGSTAMP\n");
+ }
+ #endif
++#ifdef SO_MARK
+ if (options & F_MARK) {
+ if (setsockopt(icmp_sock, SOL_SOCKET, SO_MARK,
+ &mark, sizeof(mark)) == -1) {
+@@ -494,6 +495,7 @@
+ fprintf(stderr, "Warning: Failed to set mark %d\n", mark);
+ }
+ }
++#endif
+
+ /* Set some SNDTIMEO to prevent blocking forever
+ * on sends, when device is too slow or stalls. Just put limit
diff --git a/net-misc/iputils/files/iputils-20121221-crypto-build.patch b/net-misc/iputils/files/iputils-20121221-crypto-build.patch
new file mode 100644
index 000000000000..1ec3c101d525
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20121221-crypto-build.patch
@@ -0,0 +1,35 @@
+From 568e990d30fc7e9416e0a6f8c74ea5013921eaec Mon Sep 17 00:00:00 2001
+From: Arjan van de Ven <arjanvandeven@gmail.com>
+Date: Wed, 16 Jan 2013 03:12:15 +0900
+Subject: [PATCH [iputils]] ping6: Fix build command line argument with gnutls.
+
+The ping6 command can use either openssl or gnutls...
+and the Makefile has a bunch of setup for defining which of the two to use.
+
+Unfortunately, the final -D define on the commandline to enable gnutls
+inside the ping6.c file didn't actually make it onto the gcc
+commandline.
+This patch adds the $(DEF_CRYPTO) Makefile variable to fix this gap.
+
+Signed-off-by: Arjan van de Ven <arjanvandeven@gmail.com>
+Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index c62d9df..89249f5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -149,7 +149,7 @@ LIB_clockdiff = $(LIB_CAP)
+ DEF_ping_common = $(DEF_CAP) $(DEF_IDN)
+ DEF_ping = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS)
+ LIB_ping = $(LIB_CAP) $(LIB_IDN)
+-DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR)
++DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR) $(DEF_CRYPTO)
+ LIB_ping6 = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV) $(LIB_CRYPTO)
+
+ ping: ping_common.o
+--
+1.8.0.2
+
diff --git a/net-misc/iputils/files/iputils-20121221-makefile.patch b/net-misc/iputils/files/iputils-20121221-makefile.patch
new file mode 100644
index 000000000000..66424c85cf8e
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20121221-makefile.patch
@@ -0,0 +1,61 @@
+From c66609d2c830d6fe06f48f5d38c54eb5cc6f2975 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Thu, 24 Jan 2013 23:36:16 -0500
+Subject: [PATCH [iputils]] fix handling of CFLAGS
+
+This defaults CFLAGS to -O3 without clobbering settings people have set
+up in the environment already.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Makefile | 13 +++++--------
+ 1 file changed, 5 insertions(+), 8 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 2c49940..ecabac3 100644
+--- a/Makefile
++++ b/Makefile
+@@ -2,8 +2,6 @@
+ # Configuration
+ #
+
+-# CC
+-CC=gcc
+ # Path to parent kernel include files directory
+ LIBC_INCLUDE=/usr/include
+ # Libraries
+@@ -48,11 +46,10 @@ ENABLE_RDISC_SERVER=no
+
+ # -------------------------------------
+ # What a pity, all new gccs are buggy and -Werror does not work. Sigh.
+-# CCOPT=-fno-strict-aliasing -Wstrict-prototypes -Wall -Werror -g
+-CCOPT=-fno-strict-aliasing -Wstrict-prototypes -Wall -g
+-CCOPTOPT=-O3
+-GLIBCFIX=-D_GNU_SOURCE
+-DEFINES=
++# CFLAGS+=-fno-strict-aliasing -Wstrict-prototypes -Wall -Werror -g
++CFLAGS?=-O3 -g
++CFLAGS+=-fno-strict-aliasing -Wstrict-prototypes -Wall
++CPPFLAGS+=-D_GNU_SOURCE
+ LDLIB=
+
+ FUNC_LIB = $(if $(filter static,$(1)),$(LDFLAG_STATIC) $(2) $(LDFLAG_DYNAMIC),$(2))
+@@ -113,7 +110,6 @@ IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
+ IPV6_TARGETS=tracepath6 traceroute6 ping6
+ TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
+
+-CFLAGS=$(CCOPTOPT) $(CCOPT) $(GLIBCFIX) $(DEFINES)
+ LDLIBS=$(LDLIB) $(ADDLIB)
+
+ UNAME_N:=$(shell uname -n)
+@@ -132,6 +128,7 @@ all: $(TARGETS)
+ $(COMPILE.c) $< $(DEF_$(patsubst %.o,%,$@)) -S -o $@
+ %.o: %.c
+ $(COMPILE.c) $< $(DEF_$(patsubst %.o,%,$@)) -o $@
++LINK.o += $(CFLAGS)
+ $(TARGETS): %: %.o
+ $(LINK.o) $^ $(LIB_$@) $(LDLIBS) -o $@
+
+--
+1.8.0.2
+
diff --git a/net-misc/iputils/files/iputils-20121221-openssl.patch b/net-misc/iputils/files/iputils-20121221-openssl.patch
new file mode 100644
index 000000000000..1c6ba81dab8b
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20121221-openssl.patch
@@ -0,0 +1,92 @@
+From b57d77dcfa5cb363b7eba5b331324669a8505ac4 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Thu, 24 Jan 2013 23:32:39 -0500
+Subject: [PATCH [iputils]] ping6: allow disabling of openssl support
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Makefile | 5 ++++-
+ ping6.c | 14 +++++++++++++-
+ 2 files changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 89249f5..2c49940 100644
+--- a/Makefile
++++ b/Makefile
+@@ -36,7 +36,7 @@ ARPING_DEFAULT_DEVICE=
+
+ # GNU TLS library for ping6 [yes|no|static]
+ USE_GNUTLS=yes
+-# Crypto library for ping6 [shared|static]
++# Crypto library for ping6 [shared|static|no]
+ USE_CRYPTO=shared
+ # Resolv library for ping6 [yes|static]
+ USE_RESOLV=yes
+@@ -63,7 +63,10 @@ ifneq ($(USE_GNUTLS),no)
+ LIB_CRYPTO = $(call FUNC_LIB,$(USE_GNUTLS),$(LDFLAG_GNUTLS))
+ DEF_CRYPTO = -DUSE_GNUTLS
+ else
++ifneq ($(USE_CRYPTO),no)
+ LIB_CRYPTO = $(call FUNC_LIB,$(USE_CRYPTO),$(LDFLAG_CRYPTO))
++ DEF_CRYPTO = -DUSE_OPENSSL
++endif
+ endif
+
+ # USE_RESOLV: LIB_RESOLV
+diff --git a/ping6.c b/ping6.c
+index c39864d..f2f90af 100644
+--- a/ping6.c
++++ b/ping6.c
+@@ -168,8 +168,10 @@ static int icmp_sock;
+
+ #ifdef USE_GNUTLS
+ # include <gnutls/openssl.h>
+-#else
++# define USE_CRYPTO
++#elif defined USE_OPENSSL
+ # include <openssl/md5.h>
++# define USE_CRYPTO
+ #endif
+
+ /* Node Information query */
+@@ -326,6 +328,7 @@ static void niquery_init_nonce(void)
+ #if !PING6_NONCE_MEMORY
+ static int niquery_nonce(__u8 *nonce, int fill)
+ {
++# ifdef USE_CRYPTO
+ static __u8 digest[MD5_DIGEST_LENGTH];
+ static int seq = -1;
+
+@@ -348,6 +351,10 @@ static int niquery_nonce(__u8 *nonce, int fill)
+ return -1;
+ return ntohsp((__u16 *)nonce);
+ }
++# else
++ fprintf(stderr, "ping6: function not available; crypto disabled\n");
++ exit(3);
++# endif
+ }
+ #endif
+
+@@ -502,6 +509,7 @@ static int niquery_option_subject_addr_handler(int index, const char *arg)
+
+ static int niquery_option_subject_name_handler(int index, const char *arg)
+ {
++#ifdef USE_CRYPTO
+ static char nigroup_buf[INET6_ADDRSTRLEN + 1 + IFNAMSIZ];
+ unsigned char *dnptrs[2], **dpp, **lastdnptr;
+ int n;
+@@ -627,6 +635,10 @@ errexit:
+ free(idn);
+ free(name);
+ exit(1);
++#else
++ fprintf(stderr, "ping6: function not available; crypto disabled\n");
++ exit(3);
++#endif
+ }
+
+ int niquery_option_help_handler(int index, const char *arg)
+--
+1.8.0.2
+
diff --git a/net-misc/iputils/files/iputils-20121221-owl-pingsock.diff b/net-misc/iputils/files/iputils-20121221-owl-pingsock.diff
new file mode 100644
index 000000000000..283aa989f322
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20121221-owl-pingsock.diff
@@ -0,0 +1,224 @@
+http://openwall.info/wiki/people/segoon/ping
+
+--- iputils-s20101006/ping.c
++++ iputils-s20101006/ping.c
+@@ -88,6 +88,7 @@ struct sockaddr_in whereto; /* who to pi
+ int optlen = 0;
+ int settos = 0; /* Set TOS, Precendence or other QOS options */
+ int icmp_sock; /* socket file descriptor */
++int using_ping_socket = 0;
+ u_char outpack[0x10000];
+ int maxpacket = sizeof(outpack);
+
+@@ -123,7 +124,11 @@ main(int argc, char **argv)
+ char *target, hnamebuf[MAX_HOSTNAMELEN];
+ char rspace[3 + 4 * NROUTES + 1]; /* record route space */
+
+- icmp_sock = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
++ icmp_sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_ICMP);
++ if (icmp_sock != -1)
++ using_ping_socket = 1;
++ else
++ icmp_sock = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
+ socket_errno = errno;
+
+ uid = getuid();
+@@ -377,13 +382,35 @@ main(int argc, char **argv)
+ }
+ }
+
+- if ((options&F_STRICTSOURCE) &&
+- bind(icmp_sock, (struct sockaddr*)&source, sizeof(source)) == -1) {
+- perror("bind");
+- exit(2);
++ if (!using_ping_socket) {
++ if ((options&F_STRICTSOURCE) &&
++ bind(icmp_sock, (struct sockaddr*)&source, sizeof(source)) == -1) {
++ perror("bind");
++ exit(2);
++ }
++ } else {
++ struct sockaddr_in sa;
++ socklen_t sl;
++
++ sa.sin_family = AF_INET;
++ sa.sin_port = 0;
++ sa.sin_addr.s_addr = (options&F_STRICTSOURCE) ?
++ source.sin_addr.s_addr : 0;
++ sl = sizeof(sa);
++
++ if (bind(icmp_sock, (struct sockaddr *) &sa, sl) == -1) {
++ perror("bind");
++ exit(2);
++ }
++
++ if (getsockname(icmp_sock, (struct sockaddr *) &sa, &sl) == -1) {
++ perror("getsockname");
++ exit(2);
++ }
++ ident = sa.sin_port;
+ }
+
+- if (1) {
++ if (!using_ping_socket) {
+ struct icmp_filter filt;
+ filt.data = ~((1<<ICMP_SOURCE_QUENCH)|
+ (1<<ICMP_DEST_UNREACH)|
+@@ -398,6 +425,12 @@ main(int argc, char **argv)
+ hold = 1;
+ if (setsockopt(icmp_sock, SOL_IP, IP_RECVERR, (char *)&hold, sizeof(hold)))
+ fprintf(stderr, "WARNING: your kernel is veeery old. No problems.\n");
++ if (using_ping_socket) {
++ if (setsockopt(icmp_sock, SOL_IP, IP_RECVTTL, (char *)&hold, sizeof(hold)))
++ perror("WARNING: setsockopt(IP_RECVTTL)");
++ if (setsockopt(icmp_sock, SOL_IP, IP_RETOPTS, (char *)&hold, sizeof(hold)))
++ perror("WARNING: setsockopt(IP_RETOPTS)");
++ }
+
+ /* record route option */
+ if (options & F_RROUTE) {
+@@ -566,6 +599,7 @@ int receive_error_msg()
+ nerrors++;
+ } else if (e->ee_origin == SO_EE_ORIGIN_ICMP) {
+ struct sockaddr_in *sin = (struct sockaddr_in*)(e+1);
++ int error_pkt;
+
+ if (res < sizeof(icmph) ||
+ target.sin_addr.s_addr != whereto.sin_addr.s_addr ||
+@@ -576,9 +610,18 @@ int receive_error_msg()
+ goto out;
+ }
+
+- acknowledge(ntohs(icmph.un.echo.sequence));
++ error_pkt = (e->ee_type != ICMP_REDIRECT &&
++ e->ee_type != ICMP_SOURCE_QUENCH);
++ if (error_pkt) {
++ acknowledge(ntohs(icmph.un.echo.sequence));
++ net_errors++;
++ nerrors++;
++ }
++ else {
++ saved_errno = 0;
++ }
+
+- if (!working_recverr) {
++ if (!using_ping_socket && !working_recverr) {
+ struct icmp_filter filt;
+ working_recverr = 1;
+ /* OK, it works. Add stronger filter. */
+@@ -589,15 +632,14 @@ int receive_error_msg()
+ perror("\rWARNING: setsockopt(ICMP_FILTER)");
+ }
+
+- net_errors++;
+- nerrors++;
+ if (options & F_QUIET)
+ goto out;
+ if (options & F_FLOOD) {
+- write_stdout("\bE", 2);
++ if (error_pkt)
++ write_stdout("\bE", 2);
+ } else {
+ print_timestamp();
+- printf("From %s icmp_seq=%u ", pr_addr(sin->sin_addr.s_addr), ntohs(icmph.un.echo.sequence));
++ printf("From %s: icmp_seq=%u ", pr_addr(sin->sin_addr.s_addr), ntohs(icmph.un.echo.sequence));
+ pr_icmph(e->ee_type, e->ee_code, e->ee_info, NULL);
+ fflush(stdout);
+ }
+@@ -695,15 +737,41 @@ parse_reply(struct msghdr *msg, int cc,
+ struct iphdr *ip;
+ int hlen;
+ int csfailed;
++ struct cmsghdr *cmsg;
++ int ttl;
++ __u8 *opts;
++ int optlen;
+
+ /* Check the IP header */
+ ip = (struct iphdr *)buf;
+- hlen = ip->ihl*4;
+- if (cc < hlen + 8 || ip->ihl < 5) {
+- if (options & F_VERBOSE)
+- fprintf(stderr, "ping: packet too short (%d bytes) from %s\n", cc,
+- pr_addr(from->sin_addr.s_addr));
+- return 1;
++ if (!using_ping_socket) {
++ hlen = ip->ihl*4;
++ if (cc < hlen + 8 || ip->ihl < 5) {
++ if (options & F_VERBOSE)
++ fprintf(stderr, "ping: packet too short (%d bytes) from %s\n", cc,
++ pr_addr(from->sin_addr.s_addr));
++ return 1;
++ }
++ ttl = ip->ttl;
++ opts = buf + sizeof(struct iphdr);
++ optlen = hlen - sizeof(struct iphdr);
++ } else {
++ hlen = 0;
++ ttl = 0;
++ opts = buf;
++ optlen = 0;
++ for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) {
++ if (cmsg->cmsg_level != SOL_IP)
++ continue;
++ if (cmsg->cmsg_type == IP_TTL) {
++ if (cmsg->cmsg_len < sizeof(int))
++ continue;
++ ttl = *(int *) CMSG_DATA(cmsg);
++ } else if (cmsg->cmsg_type == IP_RETOPTS) {
++ opts = (__u8 *) CMSG_DATA(cmsg);
++ optlen = cmsg->cmsg_len;
++ }
++ }
+ }
+
+ /* Now the ICMP part */
+@@ -716,7 +784,7 @@ parse_reply(struct msghdr *msg, int cc,
+ return 1; /* 'Twas not our ECHO */
+ if (gather_statistics((__u8*)icp, sizeof(*icp), cc,
+ ntohs(icp->un.echo.sequence),
+- ip->ttl, 0, tv, pr_addr(from->sin_addr.s_addr),
++ ttl, 0, tv, pr_addr(from->sin_addr.s_addr),
+ pr_echo_reply))
+ return 0;
+ } else {
+@@ -807,7 +875,7 @@ parse_reply(struct msghdr *msg, int cc,
+ }
+
+ if (!(options & F_FLOOD)) {
+- pr_options(buf + sizeof(struct iphdr), hlen);
++ pr_options(opts, optlen + sizeof(struct iphdr));
+
+ if (options & F_AUDIBLE)
+ putchar('\a');
+@@ -916,8 +984,7 @@ void pr_icmph(__u8 type, __u8 code, __u3
+ printf("Redirect, Bad Code: %d", code);
+ break;
+ }
+- if (icp)
+- printf("(New nexthop: %s)\n", pr_addr(icp->un.gateway));
++ printf("(New nexthop: %s)\n", pr_addr(icp ? icp->un.gateway : info));
+ if (icp && (options & F_VERBOSE))
+ pr_iph((struct iphdr*)(icp + 1));
+ break;
+@@ -1217,7 +1284,7 @@ void install_filter(void)
+ insns
+ };
+
+- if (once)
++ if (once || using_ping_socket)
+ return;
+ once = 1;
+
+--- iputils-s20101006/ping_common.c
++++ iputils-s20101006/ping_common.c
+@@ -515,7 +515,8 @@ void setup(int icmp_sock)
+ *p++ = i;
+ }
+
+- ident = htons(getpid() & 0xFFFF);
++ if (!ident)
++ ident = htons(getpid() & 0xFFFF);
+
+ set_signal(SIGINT, sigexit);
+ set_signal(SIGALRM, sigexit);
diff --git a/net-misc/iputils/files/iputils-20121221-parallel-doc.patch b/net-misc/iputils/files/iputils-20121221-parallel-doc.patch
new file mode 100644
index 000000000000..22bfb8811ed3
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20121221-parallel-doc.patch
@@ -0,0 +1,74 @@
+From 4e322b85a12ba3ef5e8118724e3442b2ebb0f6d6 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Wed, 1 Aug 2012 11:43:34 -0400
+Subject: [PATCH iputils] doc: fix parallel build of html/man pages
+
+The use of the same tempdir prevents building of these files in parallel.
+So build all of them in unique tempdirs so we can do them in parallel.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ doc/Makefile | 37 ++++++++++++++++++++++++-------------
+ 1 file changed, 24 insertions(+), 13 deletions(-)
+
+diff --git a/doc/Makefile b/doc/Makefile
+index 7ec4f1c..4f930a3 100644
+--- a/doc/Makefile
++++ b/doc/Makefile
+@@ -12,29 +12,40 @@ man: $(MANFILES)
+ # lots of some strange temporary junk directories and files.
+ # So, scope it to a temporary dir and clean all after each run.
+
+-$(HTMLFILES): index.db
+- @-rm -rf tmp.db2html
+- @mkdir tmp.db2html
+- @set -e; cd tmp.db2html; docbook2html ../$< ; mv *.html ..
+- @-rm -rf tmp.db2html
++SETUP_TMPDIR = \
++ t="tmp.db2html.$@"; \
++ rm -rf $$t; \
++ mkdir $$t; \
++ cd $$t
++CLEAN_TMPDIR = \
++ cd ..; \
++ rm -rf $$t
++
++MAKE_HTML = \
++ @set -e; \
++ $(SETUP_TMPDIR); \
++ docbook2html ../$<; \
++ mv *.html ..; \
++ $(CLEAN_TMPDIR)
+
++$(HTMLFILES): index.db
++ $(MAKE_HTML)
+ iputils.html: iputils.db
+- @-rm -rf tmp.db2html
+- @mkdir tmp.db2html
+- @set -e; cd tmp.db2html; docbook2html -u -o html ../$< ; mv html/$@ ..
+- @-rm -rf tmp.db2html
++ $(MAKE_HTML)
+
+ # docbook2man produces utterly ugly output and I did not find
+ # any way to customize this but hacking backend perl script a little.
+ # Well, hence...
+
+ $(MANFILES): index.db
+- @-mkdir tmp.db2man
+- @set -e; cd tmp.db2man; nsgmls ../$< | sgmlspl ../docbook2man-spec.pl ; mv $@ ..
+- @-rm -rf tmp.db2man
++ @set -e; \
++ $(SETUP_TMPDIR); \
++ nsgmls ../$< | sgmlspl ../docbook2man-spec.pl; \
++ mv $@ ..; \
++ $(CLEAN_TMPDIR)
+
+ clean:
+- @rm -rf $(MANFILES) $(HTMLFILES) iputils.html tmp.db2html tmp.db2man
++ @rm -rf $(MANFILES) $(HTMLFILES) iputils.html tmp.db2html* tmp.db2man*
+
+ snapshot:
+ @date "+%y%m%d" > snapshot.db
+--
+2.3.5
+
diff --git a/net-misc/iputils/files/iputils-20121221-printf-size.patch b/net-misc/iputils/files/iputils-20121221-printf-size.patch
new file mode 100644
index 000000000000..6d6c3b7d2580
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20121221-printf-size.patch
@@ -0,0 +1,64 @@
+From 23fcb10ae15a96aa9e5a823cfe0b612d9522691c Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 14 Aug 2010 01:16:42 -0400
+Subject: [PATCH [iputils]] tracepath: re-use printf return in print_host
+
+Since the printf funcs already return the length of chars displayed,
+use that value instead of re-calculating the length with strlen.
+
+This also fixes the handling of the strlen return -- it's a size_t,
+not an int.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ tracepath.c | 11 ++++-------
+ tracepath6.c | 11 ++++-------
+ 2 files changed, 8 insertions(+), 14 deletions(-)
+
+diff --git a/tracepath.c b/tracepath.c
+index 8a08f1d..f155816 100644
+--- a/tracepath.c
++++ b/tracepath.c
+@@ -73,13 +73,10 @@ void data_wait(int fd)
+
+ void print_host(const char *a, const char *b, int both)
+ {
+- int plen = 0;
+- printf("%s", a);
+- plen = strlen(a);
+- if (both) {
+- printf(" (%s)", b);
+- plen += strlen(b) + 3;
+- }
++ int plen;
++ plen = printf("%s", a);
++ if (both)
++ plen += printf(" (%s)", b);
+ if (plen >= HOST_COLUMN_SIZE)
+ plen = HOST_COLUMN_SIZE - 1;
+ printf("%*s", HOST_COLUMN_SIZE - plen, "");
+diff --git a/tracepath6.c b/tracepath6.c
+index 126fadf..bee95c3 100644
+--- a/tracepath6.c
++++ b/tracepath6.c
+@@ -86,13 +86,10 @@ void data_wait(int fd)
+
+ void print_host(const char *a, const char *b, int both)
+ {
+- int plen = 0;
+- printf("%s", a);
+- plen = strlen(a);
+- if (both) {
+- printf(" (%s)", b);
+- plen += strlen(b) + 3;
+- }
++ int plen;
++ plen = printf("%s", a);
++ if (both)
++ plen += printf(" (%s)", b);
+ if (plen >= HOST_COLUMN_SIZE)
+ plen = HOST_COLUMN_SIZE - 1;
+ printf("%*s", HOST_COLUMN_SIZE - plen, "");
+--
+1.8.0.2
+
diff --git a/net-misc/iputils/files/iputils-20121221-strtod.patch b/net-misc/iputils/files/iputils-20121221-strtod.patch
new file mode 100644
index 000000000000..303acf5c42c4
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20121221-strtod.patch
@@ -0,0 +1,45 @@
+https://bugs.gentoo.org/472592
+
+From dd0aa192626f94d08e399fc2a743ee72c50853fb Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Fri, 24 Apr 2015 20:41:31 -0400
+Subject: [PATCH iputils] ping: fix -i number parsing in locales
+
+Always use #.# format for the -i flag even when the current locale uses
+a different separator. Locale de_DE which uses #,# normally.
+
+Simple testcase:
+$ make USE_IDN=1
+$ LANG=de_DE.UTF8 ./ping -i 0.5 localhost
+
+Reported-by: Sergey Fionov <fionov@gmail.com>
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ ping_common.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/ping_common.c b/ping_common.c
+index 62f53a6..0a37e09 100644
+--- a/ping_common.c
++++ b/ping_common.c
+@@ -269,9 +269,17 @@ void common_options(int ch)
+ double dbl;
+ char *ep;
+
++#ifdef USE_IDN
++ setlocale(LC_ALL, "C");
++#endif
++
+ errno = 0;
+ dbl = strtod(optarg, &ep);
+
++#ifdef USE_IDN
++ setlocale(LC_ALL, "");
++#endif
++
+ if (errno || *ep != '\0' ||
+ !finite(dbl) || dbl < 0.0 || dbl >= (double)INT_MAX / 1000 - 1.0) {
+ fprintf(stderr, "ping: bad timing interval\n");
+--
+2.3.5
+
diff --git a/net-misc/iputils/files/iputils-20121221-tftpd-setid.patch b/net-misc/iputils/files/iputils-20121221-tftpd-setid.patch
new file mode 100644
index 000000000000..0ea56685d26d
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20121221-tftpd-setid.patch
@@ -0,0 +1,34 @@
+From d81a44625b04d487c895473aa77af13420b7afdd Mon Sep 17 00:00:00 2001
+From: YOSHIFUJI Hideaki <hideaki.yoshifuji@miraclelinux.com>
+Date: Thu, 19 Jun 2014 17:25:49 +0900
+Subject: [PATCH iputils] tftpd: Exit if setuid()/setgid() failed.
+
+Signed-off-by: YOSHIFUJI Hideaki <hideaki.yoshifuji@miraclelinux.com>
+---
+ tftpd.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/tftpd.c b/tftpd.c
+index 2a39ec4..e3af2f4 100644
+--- a/tftpd.c
++++ b/tftpd.c
+@@ -111,8 +111,14 @@ int main(int ac, char **av)
+
+ /* Sanity. If parent forgot to setuid() on us. */
+ if (geteuid() == 0) {
+- setgid(65534);
+- setuid(65534);
++ if (setgid(65534)) {
++ syslog(LOG_ERR, "setgid");
++ exit(1);
++ }
++ if (setuid(65534)) {
++ syslog(LOG_ERR, "setuid");
++ exit(1);
++ }
+ }
+
+ ac--; av++;
+--
+2.3.5
+
diff --git a/net-misc/iputils/files/iputils-20121221-tftpd-syslog.patch b/net-misc/iputils/files/iputils-20121221-tftpd-syslog.patch
new file mode 100644
index 000000000000..ad34f3b5f646
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20121221-tftpd-syslog.patch
@@ -0,0 +1,38 @@
+From e88ed3752872d7c7ca37d95eb4d434ca4d3c4eae Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 19 Apr 2014 10:39:39 -0400
+Subject: [PATCH iputils] tftpd: fix syslog setup
+
+Commit d81a44625b04d487c895473aa77af13420b7afdd added support for checking
+the set*id calls, but would call syslog() before it had called openlog().
+Move the call up earlier to fix that.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ tftpd.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tftpd.c b/tftpd.c
+index e3af2f4..7ddc8eb 100644
+--- a/tftpd.c
++++ b/tftpd.c
+@@ -109,6 +109,8 @@ int main(int ac, char **av)
+ register int n = 0;
+ int on = 1;
+
++ openlog("tftpd", LOG_PID, LOG_DAEMON);
++
+ /* Sanity. If parent forgot to setuid() on us. */
+ if (geteuid() == 0) {
+ if (setgid(65534)) {
+@@ -125,7 +127,6 @@ int main(int ac, char **av)
+ while (ac-- > 0 && n < MAXARG)
+ dirs[n++] = *av++;
+
+- openlog("tftpd", LOG_PID, LOG_DAEMON);
+ if (ioctl(0, FIONBIO, &on) < 0) {
+ syslog(LOG_ERR, "ioctl(FIONBIO): %m\n");
+ exit(1);
+--
+2.3.5
+
diff --git a/net-misc/iputils/files/iputils-99999999-openssl.patch b/net-misc/iputils/files/iputils-99999999-openssl.patch
new file mode 100644
index 000000000000..13f5639a6fb6
--- /dev/null
+++ b/net-misc/iputils/files/iputils-99999999-openssl.patch
@@ -0,0 +1,97 @@
+From 321d64b9f94653322e678e34ac214ddb73a71db8 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Thu, 24 Jan 2013 23:32:39 -0500
+Subject: [PATCH iputils] ping6: allow disabling of openssl support
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Makefile | 5 ++++-
+ iputils_md5dig.h | 4 +++-
+ ping6.c | 10 ++++++++++
+ 3 files changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 54e5a6d..7147f08 100644
+--- a/Makefile
++++ b/Makefile
+@@ -36,7 +36,7 @@ ARPING_DEFAULT_DEVICE=
+
+ # Libgcrypt (for MD5) for ping6 [yes|no|static]
+ USE_GCRYPT=yes
+-# Crypto library for ping6 [shared|static]
++# Crypto library for ping6 [shared|static|no]
+ USE_CRYPTO=shared
+ # Resolv library for ping6 [yes|static]
+ USE_RESOLV=yes
+@@ -63,7 +63,10 @@ ifneq ($(USE_GCRYPT),no)
+ LIB_CRYPTO = $(call FUNC_LIB,$(USE_GCRYPT),$(LDFLAG_GCRYPT))
+ DEF_CRYPTO = -DUSE_GCRYPT
+ else
++ifneq ($(USE_CRYPTO),no)
+ LIB_CRYPTO = $(call FUNC_LIB,$(USE_CRYPTO),$(LDFLAG_CRYPTO))
++ DEF_CRYPTO = -DUSE_OPENSSL
++endif
+ endif
+
+ # USE_RESOLV: LIB_RESOLV
+diff --git a/iputils_md5dig.h b/iputils_md5dig.h
+index 4cec866..d6c4d46 100644
+--- a/iputils_md5dig.h
++++ b/iputils_md5dig.h
+@@ -5,8 +5,10 @@
+ # include <stdlib.h>
+ # include <gcrypt.h>
+ # define IPUTILS_MD5DIG_LEN 16
+-#else
++# define USE_CRYPTO
++#elif defined(USE_OPENSSL)
+ # include <openssl/md5.h>
++# define USE_CRYPTO
+ #endif
+
+ #ifdef USE_GCRYPT
+diff --git a/ping6.c b/ping6.c
+index 7085f31..7b7c1af 100644
+--- a/ping6.c
++++ b/ping6.c
+@@ -324,6 +324,7 @@ static void niquery_init_nonce(void)
+ #if !PING6_NONCE_MEMORY
+ static int niquery_nonce(__u8 *nonce, int fill)
+ {
++# ifdef USE_CRYPTO
+ static __u8 digest[MD5_DIGEST_LENGTH];
+ static int seq = -1;
+
+@@ -346,6 +347,10 @@ static int niquery_nonce(__u8 *nonce, int fill)
+ return -1;
+ return ntohsp((__u16 *)nonce);
+ }
++# else
++ fprintf(stderr, "ping6: function not available; crypto disabled\n");
++ exit(3);
++# endif
+ }
+ #endif
+
+@@ -500,6 +505,7 @@ static int niquery_option_subject_addr_handler(int index, const char *arg)
+
+ static int niquery_option_subject_name_handler(int index, const char *arg)
+ {
++#ifdef USE_CRYPTO
+ static char nigroup_buf[INET6_ADDRSTRLEN + 1 + IFNAMSIZ];
+ unsigned char *dnptrs[2], **dpp, **lastdnptr;
+ int n;
+@@ -625,6 +631,10 @@ errexit:
+ free(idn);
+ free(name);
+ exit(1);
++#else
++ fprintf(stderr, "ping6: function not available; crypto disabled\n");
++ exit(3);
++#endif
+ }
+
+ int niquery_option_help_handler(int index, const char *arg)
+--
+2.3.5
+
diff --git a/net-misc/iputils/files/iputils-99999999-tftpd-syslog.patch b/net-misc/iputils/files/iputils-99999999-tftpd-syslog.patch
new file mode 100644
index 000000000000..ad34f3b5f646
--- /dev/null
+++ b/net-misc/iputils/files/iputils-99999999-tftpd-syslog.patch
@@ -0,0 +1,38 @@
+From e88ed3752872d7c7ca37d95eb4d434ca4d3c4eae Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 19 Apr 2014 10:39:39 -0400
+Subject: [PATCH iputils] tftpd: fix syslog setup
+
+Commit d81a44625b04d487c895473aa77af13420b7afdd added support for checking
+the set*id calls, but would call syslog() before it had called openlog().
+Move the call up earlier to fix that.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ tftpd.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tftpd.c b/tftpd.c
+index e3af2f4..7ddc8eb 100644
+--- a/tftpd.c
++++ b/tftpd.c
+@@ -109,6 +109,8 @@ int main(int ac, char **av)
+ register int n = 0;
+ int on = 1;
+
++ openlog("tftpd", LOG_PID, LOG_DAEMON);
++
+ /* Sanity. If parent forgot to setuid() on us. */
+ if (geteuid() == 0) {
+ if (setgid(65534)) {
+@@ -125,7 +127,6 @@ int main(int ac, char **av)
+ while (ac-- > 0 && n < MAXARG)
+ dirs[n++] = *av++;
+
+- openlog("tftpd", LOG_PID, LOG_DAEMON);
+ if (ioctl(0, FIONBIO, &on) < 0) {
+ syslog(LOG_ERR, "ioctl(FIONBIO): %m\n");
+ exit(1);
+--
+2.3.5
+
diff --git a/net-misc/iputils/files/rarpd.conf.d b/net-misc/iputils/files/rarpd.conf.d
new file mode 100644
index 000000000000..ef7fc48e17bf
--- /dev/null
+++ b/net-misc/iputils/files/rarpd.conf.d
@@ -0,0 +1,8 @@
+# Config file for /etc/init.d/rarpd
+
+# You probably want to select the interface for this to listen on.
+# By default it uses loopback which most likely won't help.
+RARPD_IFACE="lo"
+
+# See the rarpd(8) manpage for more info.
+RARPD_OPTS="-b /tftpboot"
diff --git a/net-misc/iputils/files/rarpd.init.d b/net-misc/iputils/files/rarpd.init.d
new file mode 100755
index 000000000000..155b0d10f144
--- /dev/null
+++ b/net-misc/iputils/files/rarpd.init.d
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pidfile="/var/run/rarpd.pid"
+command="/usr/sbin/rarpd"
+# The -d option keeps it from forking. This way s-s-d can do the fork and
+# set up the pidfile with the right value below.
+command_args="-d ${RARPD_OPTS} ${RARPD_IFACE}"
+start_stop_daemon_args="--background --make-pidfile"
+
+start_pre() {
+ if [ ! -f /etc/ethers ] ; then
+ eerror "Please create /etc/ethers with the following content:"
+ eerror "[MAC address] [name or IP]"
+ return 1
+ fi
+ return 0
+}
diff --git a/net-misc/iputils/iputils-20121221-r1.ebuild b/net-misc/iputils/iputils-20121221-r1.ebuild
new file mode 100644
index 000000000000..93ec07836f38
--- /dev/null
+++ b/net-misc/iputils/iputils-20121221-r1.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# For released versions, we precompile the man/html pages and store
+# them in a tarball on our mirrors. This avoids ugly issues while
+# building stages, and when the jade/sgml packages are broken (which
+# seems to be more common than would be nice).
+
+EAPI="4"
+
+inherit flag-o-matic eutils toolchain-funcs fcaps
+if [[ ${PV} == "99999999" ]] ; then
+ EGIT_REPO_URI="git://www.linux-ipv6.org/gitroot/iputils"
+ inherit git-2
+else
+ SRC_URI="http://www.skbuff.net/iputils/iputils-s${PV}.tar.bz2
+ mirror://gentoo/iputils-s${PV}-manpages.tar.bz2"
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="Network monitoring tools including ping and ping6"
+HOMEPAGE="http://www.linuxfoundation.org/collaborate/workgroups/networking/iputils"
+
+LICENSE="BSD-4"
+SLOT="0"
+IUSE="caps doc gnutls idn ipv6 SECURITY_HAZARD ssl static"
+
+LIB_DEPEND="caps? ( sys-libs/libcap[static-libs(+)] )
+ idn? ( net-dns/libidn[static-libs(+)] )
+ ipv6? ( ssl? (
+ gnutls? (
+ net-libs/gnutls[openssl(+)]
+ net-libs/gnutls[static-libs(+)]
+ )
+ !gnutls? ( dev-libs/openssl:0[static-libs(+)] )
+ ) )"
+RDEPEND="!net-misc/rarpd
+ !static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ virtual/os-headers"
+if [[ ${PV} == "99999999" ]] ; then
+ DEPEND+="
+ app-text/openjade
+ dev-perl/SGMLSpm
+ app-text/docbook-sgml-dtd
+ app-text/docbook-sgml-utils
+ "
+fi
+
+S=${WORKDIR}/${PN}-s${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/021109-uclibc-no-ether_ntohost.patch
+ epatch "${FILESDIR}"/${PN}-20121221-openssl.patch #335436
+ epatch "${FILESDIR}"/${PN}-20121221-crypto-build.patch
+ epatch "${FILESDIR}"/${PN}-20100418-so_mark.patch #335347
+ epatch "${FILESDIR}"/${PN}-20121221-makefile.patch
+ epatch "${FILESDIR}"/${PN}-20121221-printf-size.patch
+ epatch "${FILESDIR}"/${PN}-20121221-owl-pingsock.diff
+ use SECURITY_HAZARD && epatch "${FILESDIR}"/${PN}-20071127-nonroot-floodping.patch
+ use static && append-ldflags -static
+}
+
+src_compile() {
+ tc-export CC
+ emake \
+ USE_CAP=$(usex caps) \
+ USE_IDN=$(usex idn) \
+ USE_GNUTLS=$(usex gnutls) \
+ USE_CRYPTO=$(usex ssl) \
+ $(use ipv6 || echo IPV6_TARGETS=)
+
+ if [[ ${PV} == "99999999" ]] ; then
+ emake -j1 html man
+ fi
+}
+
+ipv6() { usex ipv6 "$*" '' ; }
+
+src_install() {
+ into /
+ dobin arping ping $(ipv6 ping6)
+ into /usr
+ dobin clockdiff
+ dosbin rarpd rdisc ipg tftpd tracepath $(ipv6 tracepath6)
+
+ dodoc INSTALL RELNOTES
+ use ipv6 \
+ && dosym ping.8 /usr/share/man/man8/ping6.8 \
+ || rm -f doc/*6.8
+ rm -f doc/{setkey,traceroute6}.8
+ doman doc/*.8
+
+ use doc && dohtml doc/*.html
+}
+
+pkg_postinst() {
+ fcaps cap_net_raw \
+ bin/{ar,}ping \
+ $(ipv6 bin/ping6) \
+ usr/bin/clockdiff
+}
diff --git a/net-misc/iputils/iputils-20121221-r2.ebuild b/net-misc/iputils/iputils-20121221-r2.ebuild
new file mode 100644
index 000000000000..965b833c24c2
--- /dev/null
+++ b/net-misc/iputils/iputils-20121221-r2.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# For released versions, we precompile the man/html pages and store
+# them in a tarball on our mirrors. This avoids ugly issues while
+# building stages, and when the jade/sgml packages are broken (which
+# seems to be more common than would be nice).
+
+EAPI="4"
+
+inherit flag-o-matic eutils toolchain-funcs fcaps
+if [[ ${PV} == "99999999" ]] ; then
+ EGIT_REPO_URI="git://www.linux-ipv6.org/gitroot/iputils"
+ inherit git-2
+else
+ SRC_URI="http://www.skbuff.net/iputils/iputils-s${PV}.tar.bz2
+ mirror://gentoo/iputils-s${PV}-manpages.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="Network monitoring tools including ping and ping6"
+HOMEPAGE="http://www.linuxfoundation.org/collaborate/workgroups/networking/iputils"
+
+LICENSE="BSD-4"
+SLOT="0"
+IUSE="arping caps clockdiff doc gnutls idn ipv6 rarpd rdisc SECURITY_HAZARD ssl static tftpd tracepath traceroute"
+
+LIB_DEPEND="caps? ( sys-libs/libcap[static-libs(+)] )
+ idn? ( net-dns/libidn[static-libs(+)] )
+ ipv6? ( ssl? (
+ gnutls? (
+ net-libs/gnutls[openssl(+)]
+ net-libs/gnutls[static-libs(+)]
+ )
+ !gnutls? ( dev-libs/openssl:0[static-libs(+)] )
+ ) )"
+RDEPEND="arping? ( !net-misc/arping )
+ rarpd? ( !net-misc/rarpd )
+ traceroute? ( !net-misc/traceroute )
+ !static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ virtual/os-headers"
+if [[ ${PV} == "99999999" ]] ; then
+ DEPEND+="
+ app-text/openjade
+ dev-perl/SGMLSpm
+ app-text/docbook-sgml-dtd
+ app-text/docbook-sgml-utils
+ "
+fi
+
+S=${WORKDIR}/${PN}-s${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/021109-uclibc-no-ether_ntohost.patch
+ epatch "${FILESDIR}"/${PN}-20121221-openssl.patch #335436
+ epatch "${FILESDIR}"/${PN}-20121221-crypto-build.patch
+ epatch "${FILESDIR}"/${PN}-20100418-so_mark.patch #335347
+ epatch "${FILESDIR}"/${PN}-20121221-tftpd-setid.patch
+ epatch "${FILESDIR}"/${PN}-20121221-tftpd-syslog.patch
+ epatch "${FILESDIR}"/${PN}-20121221-makefile.patch
+ epatch "${FILESDIR}"/${PN}-20121221-parallel-doc.patch
+ epatch "${FILESDIR}"/${PN}-20121221-printf-size.patch
+ epatch "${FILESDIR}"/${PN}-20121221-owl-pingsock.diff
+ epatch "${FILESDIR}"/${PN}-20121221-strtod.patch #472592
+ use SECURITY_HAZARD && epatch "${FILESDIR}"/${PN}-20071127-nonroot-floodping.patch
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ IPV4_TARGETS=(
+ ping
+ $(for v in arping clockdiff rarpd rdisc tftpd tracepath ; do usev ${v} ; done)
+ )
+ IPV6_TARGETS=(
+ ping6
+ $(usex tracepath 'tracepath6' '')
+ $(usex traceroute 'traceroute6' '')
+ )
+ use ipv6 || IPV6_TARGETS=()
+}
+
+src_compile() {
+ tc-export CC
+ emake \
+ USE_CAP=$(usex caps) \
+ USE_IDN=$(usex idn) \
+ USE_GNUTLS=$(usex gnutls) \
+ USE_CRYPTO=$(usex ssl) \
+ IPV4_TARGETS="${IPV4_TARGETS[*]}" \
+ IPV6_TARGETS="${IPV6_TARGETS[*]}"
+
+ if [[ ${PV} == "99999999" ]] ; then
+ emake html man
+ fi
+}
+
+src_install() {
+ into /
+ dobin ping $(usex ipv6 'ping6' '')
+ use ipv6 && dosym ping.8 "${EPREFIX}"/usr/share/man/man8/ping6.8
+ doman doc/ping.8
+
+ if use arping ; then
+ dobin arping
+ doman doc/arping.8
+ fi
+
+ into /usr
+
+ local u
+ for u in clockdiff rarpd rdisc tftpd tracepath ; do
+ if use ${u} ; then
+ case ${u} in
+ clockdiff) dobin ${u};;
+ *) dosbin ${u};;
+ esac
+ doman doc/${u}.8
+ fi
+ done
+
+ if use tracepath && use ipv6 ; then
+ dosbin tracepath6
+ dosym tracepath.8 "${EPREFIX}"/usr/share/man/man8/tracepath6.8
+ fi
+
+ if use traceroute && use ipv6 ; then
+ dosbin traceroute6
+ doman doc/traceroute6.8
+ fi
+
+ if use rarpd ; then
+ newinitd "${FILESDIR}"/rarpd.init.d rarpd
+ newconfd "${FILESDIR}"/rarpd.conf.d rarpd
+ fi
+
+ dodoc INSTALL RELNOTES
+
+ use doc && dohtml doc/*.html
+}
+
+pkg_postinst() {
+ fcaps cap_net_raw \
+ bin/ping \
+ $(usex ipv6 'bin/ping6' '') \
+ $(usex arping 'bin/arping' '') \
+ $(usex clockdiff 'usr/bin/clockdiff' '')
+}
diff --git a/net-misc/iputils/iputils-20121221.ebuild b/net-misc/iputils/iputils-20121221.ebuild
new file mode 100644
index 000000000000..be378b2b2357
--- /dev/null
+++ b/net-misc/iputils/iputils-20121221.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# For released versions, we precompile the man/html pages and store
+# them in a tarball on our mirrors. This avoids ugly issues while
+# building stages, and when the jade/sgml packages are broken (which
+# seems to be more common than would be nice).
+
+EAPI="4"
+
+inherit flag-o-matic eutils toolchain-funcs
+if [[ ${PV} == "99999999" ]] ; then
+ EGIT_REPO_URI="git://www.linux-ipv6.org/gitroot/iputils"
+ inherit git-2
+else
+ SRC_URI="http://www.skbuff.net/iputils/iputils-s${PV}.tar.bz2
+ mirror://gentoo/iputils-s${PV}-manpages.tar.bz2"
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="Network monitoring tools including ping and ping6"
+HOMEPAGE="http://www.linuxfoundation.org/collaborate/workgroups/networking/iputils"
+
+LICENSE="BSD-4"
+SLOT="0"
+IUSE="caps doc gnutls idn ipv6 SECURITY_HAZARD ssl static"
+
+LIB_DEPEND="caps? ( sys-libs/libcap[static-libs(+)] )
+ idn? ( net-dns/libidn[static-libs(+)] )
+ ipv6? (
+ gnutls? ( net-libs/gnutls[static-libs(+)] )
+ ssl? ( dev-libs/openssl:0[static-libs(+)] )
+ )"
+RDEPEND="!net-misc/rarpd
+ !static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ virtual/os-headers"
+if [[ ${PV} == "99999999" ]] ; then
+ DEPEND+="
+ app-text/openjade
+ dev-perl/SGMLSpm
+ app-text/docbook-sgml-dtd
+ app-text/docbook-sgml-utils
+ "
+fi
+
+S=${WORKDIR}/${PN}-s${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/021109-uclibc-no-ether_ntohost.patch
+ epatch "${FILESDIR}"/${PN}-20121221-openssl.patch #335436
+ epatch "${FILESDIR}"/${PN}-20121221-crypto-build.patch
+ epatch "${FILESDIR}"/${PN}-20100418-so_mark.patch #335347
+ epatch "${FILESDIR}"/${PN}-20121221-makefile.patch
+ epatch "${FILESDIR}"/${PN}-20121221-printf-size.patch
+ epatch "${FILESDIR}"/${PN}-20121221-owl-pingsock.diff
+ use SECURITY_HAZARD && epatch "${FILESDIR}"/${PN}-20071127-nonroot-floodping.patch
+ use static && append-ldflags -static
+}
+
+src_compile() {
+ tc-export CC
+ emake \
+ USE_CAP=$(usex caps) \
+ USE_IDN=$(usex idn) \
+ USE_GNUTLS=$(usex gnutls) \
+ USE_CRYPTO=$(usex ssl) \
+ $(use ipv6 || echo IPV6_TARGETS=)
+
+ if [[ ${PV} == "99999999" ]] ; then
+ emake -j1 html man
+ fi
+}
+
+src_install() {
+ into /
+ dobin ping
+ use ipv6 && dobin ping6
+ dosbin arping
+ into /usr
+ dosbin tracepath
+ use ipv6 && dosbin trace{path,route}6
+ dosbin clockdiff rarpd rdisc ipg tftpd
+
+ fperms 4711 /bin/ping
+ use ipv6 && fperms 4711 /bin/ping6 /usr/sbin/traceroute6
+
+ dodoc INSTALL RELNOTES
+ use ipv6 \
+ && dosym ping.8 /usr/share/man/man8/ping6.8 \
+ || rm -f doc/*6.8
+ rm -f doc/setkey.8
+ doman doc/*.8
+
+ use doc && dohtml doc/*.html
+}
diff --git a/net-misc/iputils/iputils-99999999.ebuild b/net-misc/iputils/iputils-99999999.ebuild
new file mode 100644
index 000000000000..3957639d062f
--- /dev/null
+++ b/net-misc/iputils/iputils-99999999.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# For released versions, we precompile the man/html pages and store
+# them in a tarball on our mirrors. This avoids ugly issues while
+# building stages, and when the jade/sgml packages are broken (which
+# seems to be more common than would be nice).
+
+EAPI="4"
+
+inherit flag-o-matic eutils toolchain-funcs fcaps
+if [[ ${PV} == "99999999" ]] ; then
+ EGIT_REPO_URI="git://www.linux-ipv6.org/gitroot/iputils"
+ inherit git-2
+else
+ SRC_URI="http://www.skbuff.net/iputils/iputils-s${PV}.tar.bz2
+ mirror://gentoo/iputils-s${PV}-manpages.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="Network monitoring tools including ping and ping6"
+HOMEPAGE="http://www.linuxfoundation.org/collaborate/workgroups/networking/iputils"
+
+LICENSE="BSD-4"
+SLOT="0"
+IUSE="arping caps clockdiff doc gnutls idn ipv6 rarpd rdisc SECURITY_HAZARD ssl static tftpd tracepath traceroute"
+
+LIB_DEPEND="caps? ( sys-libs/libcap[static-libs(+)] )
+ idn? ( net-dns/libidn[static-libs(+)] )
+ ipv6? ( ssl? (
+ gnutls? (
+ net-libs/gnutls[openssl(+)]
+ net-libs/gnutls[static-libs(+)]
+ )
+ !gnutls? ( dev-libs/openssl:0[static-libs(+)] )
+ ) )"
+RDEPEND="arping? ( !net-misc/arping )
+ rarpd? ( !net-misc/rarpd )
+ traceroute? ( !net-misc/traceroute )
+ !static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ virtual/os-headers"
+if [[ ${PV} == "99999999" ]] ; then
+ DEPEND+="
+ app-text/openjade
+ dev-perl/SGMLSpm
+ app-text/docbook-sgml-dtd
+ app-text/docbook-sgml-utils
+ "
+fi
+
+S=${WORKDIR}/${PN}-s${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/021109-uclibc-no-ether_ntohost.patch
+ epatch "${FILESDIR}"/${PN}-99999999-openssl.patch #335436
+ epatch "${FILESDIR}"/${PN}-99999999-tftpd-syslog.patch
+ epatch "${FILESDIR}"/${PN}-20121221-makefile.patch
+ epatch "${FILESDIR}"/${PN}-20121221-parallel-doc.patch
+ epatch "${FILESDIR}"/${PN}-20121221-strtod.patch #472592
+ use SECURITY_HAZARD && epatch "${FILESDIR}"/${PN}-20071127-nonroot-floodping.patch
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ IPV4_TARGETS=(
+ ping
+ $(for v in arping clockdiff rarpd rdisc tftpd tracepath ; do usev ${v} ; done)
+ )
+ IPV6_TARGETS=(
+ ping6
+ $(usex tracepath 'tracepath6' '')
+ $(usex traceroute 'traceroute6' '')
+ )
+ use ipv6 || IPV6_TARGETS=()
+}
+
+src_compile() {
+ tc-export CC
+ emake \
+ USE_CAP=$(usex caps) \
+ USE_IDN=$(usex idn) \
+ USE_GNUTLS=$(usex gnutls) \
+ USE_CRYPTO=$(usex ssl) \
+ IPV4_TARGETS="${IPV4_TARGETS[*]}" \
+ IPV6_TARGETS="${IPV6_TARGETS[*]}"
+
+ if [[ ${PV} == "99999999" ]] ; then
+ emake html man
+ fi
+}
+
+src_install() {
+ into /
+ dobin ping $(usex ipv6 'ping6' '')
+ use ipv6 && dosym ping.8 "${EPREFIX}"/usr/share/man/man8/ping6.8
+ doman doc/ping.8
+
+ if use arping ; then
+ dobin arping
+ doman doc/arping.8
+ fi
+
+ into /usr
+
+ local u
+ for u in clockdiff rarpd rdisc tftpd tracepath ; do
+ if use ${u} ; then
+ case ${u} in
+ clockdiff) dobin ${u};;
+ *) dosbin ${u};;
+ esac
+ doman doc/${u}.8
+ fi
+ done
+
+ if use tracepath && use ipv6 ; then
+ dosbin tracepath6
+ dosym tracepath.8 "${EPREFIX}"/usr/share/man/man8/tracepath6.8
+ fi
+
+ if use traceroute && use ipv6 ; then
+ dosbin traceroute6
+ doman doc/traceroute6.8
+ fi
+
+ if use rarpd ; then
+ newinitd "${FILESDIR}"/rarpd.init.d rarpd
+ newconfd "${FILESDIR}"/rarpd.conf.d rarpd
+ fi
+
+ dodoc INSTALL RELNOTES
+
+ use doc && dohtml doc/*.html
+}
+
+pkg_postinst() {
+ fcaps cap_net_raw \
+ bin/ping \
+ $(usex ipv6 'bin/ping6' '') \
+ $(usex arping 'bin/arping' '') \
+ $(usex clockdiff 'usr/bin/clockdiff' '')
+}
diff --git a/net-misc/iputils/metadata.xml b/net-misc/iputils/metadata.xml
new file mode 100644
index 000000000000..dc01592f7171
--- /dev/null
+++ b/net-misc/iputils/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+ <use>
+ <flag name="arping">Build and install arping -- tool for sending ARP requests to peers (see also <pkg>net-analyzer/arping</pkg>)</flag>
+ <flag name="clockdiff">Build and install clockdiff -- tool for comparing clocks via ICMP packets</flag>
+ <flag name="rarpd">Build and install rarpd -- server for handling RARP (reverse ARP) requests; generally only used by old systems</flag>
+ <flag name="rdisc">Build and install rdisc -- server for the client side of the ICMP router discover protocol</flag>
+ <flag name="tftpd">Build and install tftpd -- server for the Trivial File Transfer Protocol (see also <pkg>net-ftp/tftp-hpa</pkg>)</flag>
+ <flag name="tracepath">Build and install tracepath -- tool for tracing network paths for discovering MTU values</flag>
+ <flag name="traceroute">Build and install traceroute -- tool for tracing network paths (see also <pkg>net-analyzer/traceroute</pkg>)</flag>
+ <flag name="SECURITY_HAZARD">Allow non-root users to flood (ping -f). This is generally a very bad idea.</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:skbuff:iputils</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/ipv6calc/Manifest b/net-misc/ipv6calc/Manifest
new file mode 100644
index 000000000000..932e8d460cbe
--- /dev/null
+++ b/net-misc/ipv6calc/Manifest
@@ -0,0 +1,3 @@
+DIST ipv6calc-0.94.1.tar.gz 749953 SHA256 3bd73fd92c1d971fadea41b39830975b4a20bbcd26587dfb2835964b33de4040 SHA512 804aaa1a78aacd5c78e0de0642438ab85fe00d6bac36310022653c5f4d6e24c0d4c616133dcc9b0e35a0288f4f477f277376ea9465521702e5b46c098aa0fd16 WHIRLPOOL 481aabebcff8b4591105757c3e583c56f1fd2ae4ebe101cb562691abd0a2aaa55eee6eeaec9145e6caba2c1a5f9a4829af125465ea0836e4000c1a67a13e7691
+DIST ipv6calc-0.97.4.tar.gz 1037582 SHA256 ed2c9e895fdbffa3bee2e46591e0a010eacdefc1bf8eace5fbee9abaa9c3df39 SHA512 133f4e281da8eb1ea13b7c37123ae9f1b88e100553de758ceaa6cc63b0306e4711447bc7a4c171508fc5ce1ed447daec9749c5a75e5288deef0efcdc095bfcde WHIRLPOOL f6a9eb3201045851705f3631cd35e2aead26a167687b4c2064829ae530a803d6e48c57ac5d47996124b8e41706c1cc91850b9b42f225552640b4dbc9ebf17cb8
+DIST ipv6calc-0.98.0.tar.gz 1113488 SHA256 2397f7a77c76cb1c8df73bcd584e532af8bcdb913bfef6eada1184ff28c9200b SHA512 56899764528a38b6c1b628027bb14fb81f3ddb26939cfd73902fb0363a14d3cc7a271fa04d13a9d50b83633b53bc5dd0b7c37784d89a2ab21e34d07f6549c8ec WHIRLPOOL 868f4556a206a14bcb36622230d527db4a23bf11019020bdf7eeb5a8635f28da4047eac558de0fa90efd17d2cc3d5575fde3ac9c427b6e6d71baa03cb06aee33
diff --git a/net-misc/ipv6calc/files/ipv6calc-0.96.0-fix-link-order.patch b/net-misc/ipv6calc/files/ipv6calc-0.96.0-fix-link-order.patch
new file mode 100644
index 000000000000..b1e48dcf7e3b
--- /dev/null
+++ b/net-misc/ipv6calc/files/ipv6calc-0.96.0-fix-link-order.patch
@@ -0,0 +1,48 @@
+diff -Naur ipv6calc-0.96.0.orig/ipv6calc/Makefile.in ipv6calc-0.96.0/ipv6calc/Makefile.in
+--- ipv6calc-0.96.0.orig/ipv6calc/Makefile.in 2014-02-03 01:45:20.000000000 -0500
++++ ipv6calc-0.96.0/ipv6calc/Makefile.in 2014-02-19 09:36:48.504688355 -0500
+@@ -16,7 +16,7 @@
+
+ INCLUDES= @MD5_INCLUDE@ @GETOPT_INCLUDE@ @IP2LOCATION_INCLUDE@ @GEOIP_INCLUDE@ -I../ -I../lib/ -I../databases/lib/
+
+-LIBS = @IP2LOCATION_LIB@ @GEOIP_LIB@ @DYNLOAD_LIB@ @IPV6CALC_LIB@
++LIBS = @IPV6CALC_LIB@ @IP2LOCATION_LIB@ @GEOIP_LIB@ @DYNLOAD_LIB@
+
+ GETOBJS = @LIBOBJS@
+
+diff -Naur ipv6calc-0.96.0.orig/ipv6loganon/Makefile.in ipv6calc-0.96.0/ipv6loganon/Makefile.in
+--- ipv6calc-0.96.0.orig/ipv6loganon/Makefile.in 2014-02-02 14:33:21.000000000 -0500
++++ ipv6calc-0.96.0/ipv6loganon/Makefile.in 2014-02-19 09:37:01.211687339 -0500
+@@ -18,7 +18,7 @@
+
+ INCLUDES= $(COPTS) @MD5_INCLUDE@ @GETOPT_INCLUDE@ @IP2LOCATION_INCLUDE@ @GEOIP_INCLUDE@ -I../ -I../lib/
+
+-LIBS = @IP2LOCATION_LIB@ @GEOIP_LIB@ @DYNLOAD_LIB@ @IPV6CALC_LIB@
++LIBS = @IPV6CALC_LIB@ @IP2LOCATION_LIB@ @GEOIP_LIB@ @DYNLOAD_LIB@
+
+ GETOBJS = @LIBOBJS@
+
+diff -Naur ipv6calc-0.96.0.orig/ipv6logconv/Makefile.in ipv6calc-0.96.0/ipv6logconv/Makefile.in
+--- ipv6calc-0.96.0.orig/ipv6logconv/Makefile.in 2014-02-02 14:33:21.000000000 -0500
++++ ipv6calc-0.96.0/ipv6logconv/Makefile.in 2014-02-19 09:36:32.225689657 -0500
+@@ -18,7 +18,7 @@
+
+ INCLUDES= @MD5_INCLUDE@ @GETOPT_INCLUDE@ @IP2LOCATION_INCLUDE@ @GEOIP_INCLUDE@ -I../ -I../lib/ -I../databases/lib/
+
+-LIBS = @IP2LOCATION_LIB@ @GEOIP_LIB@ @DYNLOAD_LIB@ @IPV6CALC_LIB@
++LIBS = @IPV6CALC_LIB@ @IP2LOCATION_LIB@ @GEOIP_LIB@ @DYNLOAD_LIB@
+
+ GETOBJS = @LIBOBJS@
+
+diff -Naur ipv6calc-0.96.0.orig/ipv6logstats/Makefile.in ipv6calc-0.96.0/ipv6logstats/Makefile.in
+--- ipv6calc-0.96.0.orig/ipv6logstats/Makefile.in 2014-02-02 14:33:21.000000000 -0500
++++ ipv6calc-0.96.0/ipv6logstats/Makefile.in 2014-02-19 09:37:15.840686169 -0500
+@@ -18,7 +18,7 @@
+
+ INCLUDES= $(COPTS) @MD5_INCLUDE@ @GETOPT_INCLUDE@ @IP2LOCATION_INCLUDE@ @GEOIP_INCLUDE@ -I../ -I../lib/ -I../databases/lib/
+
+-LIBS = @IP2LOCATION_LIB@ @GEOIP_LIB@ @DYNLOAD_LIB@ @IPV6CALC_LIB@
++LIBS = @IPV6CALC_LIB@ @IP2LOCATION_LIB@ @GEOIP_LIB@ @DYNLOAD_LIB@
+
+ GETOBJS = @LIBOBJS@
+
diff --git a/net-misc/ipv6calc/ipv6calc-0.94.1.ebuild b/net-misc/ipv6calc/ipv6calc-0.94.1.ebuild
new file mode 100644
index 000000000000..3b97253784f2
--- /dev/null
+++ b/net-misc/ipv6calc/ipv6calc-0.94.1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit fixheadtails
+
+DESCRIPTION="IPv6 address calculator"
+HOMEPAGE="http://www.deepspace6.net/projects/ipv6calc.html"
+SRC_URI="ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 hppa ppc sparc x86 ~amd64-linux ~x86-linux"
+IUSE="geoip test"
+
+RDEPEND="
+ geoip? ( >=dev-libs/geoip-1.4.7 )
+"
+DEPEND="${RDEPEND}
+ test? ( dev-perl/Digest-SHA1 )"
+
+#dev-perl/URI is needed for web interface, that is not installed now
+
+src_prepare() {
+ ht_fix_file configure
+}
+
+src_configure() {
+ if use geoip; then
+ myconf=$(use_enable geoip)
+ myconf+=" --with-geoip-ipv4-default-file=${EPREFIX}/usr/share/GeoIP/GeoIP.dat"
+ myconf+=" --with-geoip-ipv6-default-file=${EPREFIX}/usr/share/GeoIP/GeoIPv6.dat"
+ fi
+ econf ${myconf}
+}
+
+src_compile() {
+ # Disable default CFLAGS (-O2 and -g)
+ emake DEFAULT_CFLAGS=""
+}
+
+src_test() {
+ if [[ ${EUID} -eq 0 ]]; then
+ # Disable tests that fail as root
+ echo true > ipv6logstats/test_ipv6logstats.sh
+ fi
+ default
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc ChangeLog CREDITS README TODO USAGE
+}
diff --git a/net-misc/ipv6calc/ipv6calc-0.97.4.ebuild b/net-misc/ipv6calc/ipv6calc-0.97.4.ebuild
new file mode 100644
index 000000000000..e14128a3bccb
--- /dev/null
+++ b/net-misc/ipv6calc/ipv6calc-0.97.4.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit eutils
+
+DESCRIPTION="IPv6 address calculator"
+HOMEPAGE="http://www.deepspace6.net/projects/ipv6calc.html"
+SRC_URI="ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="geoip test"
+
+RDEPEND="
+ dev-libs/openssl:=
+ geoip? ( >=dev-libs/geoip-1.4.7 )
+"
+DEPEND="${RDEPEND}
+ test? ( dev-perl/Digest-SHA1 )
+"
+
+#dev-perl/URI is needed for web interface, that is not installed now
+
+src_configure() {
+ if use geoip; then
+ myconf=$(use_enable geoip)
+ myconf+=" --with-geoip-db=${EPREFIX}/usr/share/GeoIP"
+ fi
+ econf \
+ --disable-bundled-getopt \
+ --disable-bundled-md5 \
+ --enable-shared \
+ --enable-dynamic-load \
+ --enable-db-ieee \
+ --enable-db-ipv4 \
+ --enable-db-ipv6 \
+ --disable-ip2location \
+ ${myconf}
+}
+
+src_compile() {
+ # Disable default CFLAGS (-O2 and -g)
+ emake DEFAULT_CFLAGS=""
+}
+
+src_test() {
+ if [[ ${EUID} -eq 0 ]]; then
+ # Disable tests that fail as root
+ echo true > ipv6logstats/test_ipv6logstats.sh
+ fi
+ default
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc ChangeLog CREDITS README TODO USAGE
+}
diff --git a/net-misc/ipv6calc/ipv6calc-0.98.0.ebuild b/net-misc/ipv6calc/ipv6calc-0.98.0.ebuild
new file mode 100644
index 000000000000..526f6b80f208
--- /dev/null
+++ b/net-misc/ipv6calc/ipv6calc-0.98.0.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit eutils
+
+DESCRIPTION="IPv6 address calculator"
+HOMEPAGE="http://www.deepspace6.net/projects/ipv6calc.html"
+SRC_URI="ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="geoip test"
+
+RDEPEND="
+ dev-libs/openssl:=
+ geoip? ( >=dev-libs/geoip-1.4.7 )
+"
+DEPEND="${RDEPEND}
+ test? ( dev-perl/Digest-SHA1 )
+"
+
+#dev-perl/URI is needed for web interface, that is not installed now
+
+src_configure() {
+ # These options are broken. You can't disable them. That's
+ # okay because we want then force enabled.
+ # --disable-db-as-registry
+ # --disable-db-cc-registry
+ if use geoip; then
+ myconf=$(use_enable geoip)
+ myconf+=" --with-geoip-db=${EPREFIX}/usr/share/GeoIP"
+ fi
+ econf \
+ --disable-bundled-getopt \
+ --disable-bundled-md5 \
+ --enable-shared \
+ --enable-dynamic-load \
+ --enable-db-ieee \
+ --enable-db-ipv4 \
+ --enable-db-ipv6 \
+ --disable-dbip \
+ --disable-external \
+ --disable-ip2location \
+ ${myconf}
+}
+
+src_compile() {
+ # Disable default CFLAGS (-O2 and -g)
+ emake DEFAULT_CFLAGS=""
+}
+
+src_test() {
+ if [[ ${EUID} -eq 0 ]]; then
+ # Disable tests that fail as root
+ echo true > ipv6logstats/test_ipv6logstats.sh
+ fi
+ default
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc ChangeLog CREDITS README TODO USAGE
+}
diff --git a/net-misc/ipv6calc/metadata.xml b/net-misc/ipv6calc/metadata.xml
new file mode 100644
index 000000000000..5010986109dc
--- /dev/null
+++ b/net-misc/ipv6calc/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>pva@gentoo.org</email>
+ <name>Peter Volkov</name>
+ </maintainer>
+ <maintainer>
+ <email>aaron@flappyport.com</email>
+ <name>Aaron Bauman</name>
+ </maintainer>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/ipx-utils/Manifest b/net-misc/ipx-utils/Manifest
new file mode 100644
index 000000000000..9beeb5817b87
--- /dev/null
+++ b/net-misc/ipx-utils/Manifest
@@ -0,0 +1 @@
+DIST ipx-1.1.tar.gz 8177 SHA256 c59c3dbb8cfb8ef5b3cb76a302d5f38254e9dbbbd99fae3f048e3751605d7fb8 SHA512 cb1bcf0c28939ab5ff1e1cf36f1cb8cbfcb7c019d65df5fc56a1b43673406cdf4abffa3d6164615e42ce955f078c05f721da90ca54353870e552c01bb3c2973d WHIRLPOOL 829715dd9e0b3d1cf7ee5443fe3081bf2534b4f5e85ea096f0cf722d94e068c53141a3504ac9dc51457747d4038e249bd187dced1d07cb867fd106575ae07d65
diff --git a/net-misc/ipx-utils/files/ipx-utils-1.1-makefile.patch b/net-misc/ipx-utils/files/ipx-utils-1.1-makefile.patch
new file mode 100644
index 000000000000..5a596f818d19
--- /dev/null
+++ b/net-misc/ipx-utils/files/ipx-utils-1.1-makefile.patch
@@ -0,0 +1,24 @@
+--- ipx-1.1.orig/Makefile
++++ ipx-1.1/Makefile
+@@ -10,17 +10,8 @@ clean:
+ install: $(UTILS)
+ for i in $(UTILS); \
+ do \
+- install --strip $$i /sbin; \
+- install $$i.8 /usr/man/man8; \
++ install $$i ${DESTDIR}/sbin; \
++ install $$i.8 ${DESTDIR}/usr/share/man/man8; \
+ done
+- install init.ipx /etc/rc.d/init.d/ipx
+- install -m 0644 config.ipx /etc/sysconfig/ipx
+- rm -f /etc/rc.d/rc2.d/S15ipx
+- ln -sf /etc/rc.d/init.d/ipx /etc/rc.d/rc2.d/S15ipx
+- rm -f /etc/rc.d/rc3.d/S15ipx
+- ln -sf /etc/rc.d/init.d/ipx /etc/rc.d/rc3.d/S15ipx
+- rm -f /etc/rc.d/rc5.d/S15ipx
+- ln -sf /etc/rc.d/init.d/ipx /etc/rc.d/rc5.d/S15ipx
+- rm -f /etc/rc.d/rc6.d/K55ipx
+- ln -sf /etc/rc.d/init.d/ipx /etc/rc.d/rc6.d/K55ipx
+-
++# install init.ipx /etc/rc.d/init.d/ipx
++# install -m 0644 config.ipx /etc/sysconfig/ipx
diff --git a/net-misc/ipx-utils/files/ipx-utils-1.1-proc.patch b/net-misc/ipx-utils/files/ipx-utils-1.1-proc.patch
new file mode 100644
index 000000000000..d82d228ff139
--- /dev/null
+++ b/net-misc/ipx-utils/files/ipx-utils-1.1-proc.patch
@@ -0,0 +1,13 @@
+--- ipx-1.1/ipx_interface.c.orig 2004-10-16 13:14:40.677964152 -0400
++++ ipx-1.1/ipx_interface.c 2004-10-16 13:15:18.464219768 -0400
+@@ -191,7 +191,9 @@
+ exit(-1);
+ }
+
+- fp = fopen("/proc/net/ipx_interface", "r");
++ fp = fopen("/proc/net/ipx/interface", "r");
++ if (fp == NULL)
++ fp = fopen("/proc/net/ipx_interface", "r");
+ if (fp == NULL) {
+ fprintf(stderr,
+ "%s: Unable to open \"/proc/net/ipx_interface.\"\n",
diff --git a/net-misc/ipx-utils/files/ipx.confd b/net-misc/ipx-utils/files/ipx.confd
new file mode 100644
index 000000000000..d061d0d0de83
--- /dev/null
+++ b/net-misc/ipx-utils/files/ipx.confd
@@ -0,0 +1,27 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Config file for /etc/init.d/ipx
+
+# Automatically selecting a primary interface.
+IPX_AUTO_PRIMARY=on
+
+# Automatically creating interfaces.
+IPX_AUTO_INTERFACE=on
+
+# Interface to which IPX sockets are bound.
+IPX_DEVICE=eth0
+
+# The IPX frame type to use
+IPX_FRAME=802.2
+
+# Create a special kind of IPX interface that does not
+# have a physical device or frame type.
+IPX_INTERNAL_NET=no
+
+# Network number
+IPX_NETNUM=1
+
+# Node number
+IPX_NODENUM=1
diff --git a/net-misc/ipx-utils/files/ipx.init b/net-misc/ipx-utils/files/ipx.init
new file mode 100644
index 000000000000..091c9d8de706
--- /dev/null
+++ b/net-misc/ipx-utils/files/ipx.init
@@ -0,0 +1,43 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+#NB: Config is in /etc/conf.d/ipx
+
+depend() {
+ use net
+}
+
+start() {
+ local retval=0
+
+ ebegin "Bringing IPX up"
+ if [ ${IPX_INTERNAL_NET} = "yes" ]
+ then
+ /sbin/ipx_internal_net add ${IPX_NETNUM} ${IPX_NODENUM}
+ retval=$?
+ else
+ /sbin/ipx_interface add -p ${IPX_DEVICE} \
+ ${IPX_FRAME} ${IPX_NETNUM}
+ retval=$?
+ fi
+
+ ipx_configure \
+ --auto_primary=${IPX_AUTO_PRIMARY} \
+ --auto_interface=${IPX_AUTO_INTERFACE}
+ retval=$(( $retval + $? ))
+ eend ${retval} "Failed to bring IPX up"
+}
+
+stop() {
+ local retval=0
+
+ ebegin "Bringing IPX down"
+ /bin/umount -v -a -tncpfs
+ /sbin/ipx_configure --auto_primary=off --auto_interface=off
+ retval=$?
+ /sbin/ipx_interface delall
+ retval=$(( $retval + $? ))
+ eend ${retval} "Failed to down IPX"
+}
diff --git a/net-misc/ipx-utils/ipx-utils-1.1-r3.ebuild b/net-misc/ipx-utils/ipx-utils-1.1-r3.ebuild
new file mode 100644
index 000000000000..5ed3c8e796a6
--- /dev/null
+++ b/net-misc/ipx-utils/ipx-utils-1.1-r3.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit eutils
+
+DESCRIPTION="The IPX Utilities"
+HOMEPAGE="ftp://sunsite.unc.edu/pub/Linux/system/filesystems/ncpfs/"
+SRC_URI="ftp://sunsite.unc.edu/pub/Linux/system/filesystems/ncpfs/${P/-utils}.tar.gz"
+
+LICENSE="ipx-utils GPL-2" # GPL-2 only for init script
+SLOT="0"
+KEYWORDS="amd64 ppc64 x86"
+IUSE=""
+
+DEPEND=""
+
+S=${WORKDIR}/${P/-utils}
+
+src_prepare() {
+ sed -i "s:-O2 -Wall:${CFLAGS}:" "${S}"/Makefile
+ epatch "${FILESDIR}"/${P}-makefile.patch
+ epatch "${FILESDIR}"/${P}-proc.patch #67642
+}
+
+src_install() {
+ dodir /sbin /usr/share/man/man8
+ dodoc "${S}"/README
+ emake DESTDIR="${D}" install
+
+ newconfd "${FILESDIR}"/ipx.confd ipx
+ newinitd "${FILESDIR}"/ipx.init ipx
+}
diff --git a/net-misc/ipx-utils/metadata.xml b/net-misc/ipx-utils/metadata.xml
new file mode 100644
index 000000000000..2e90b802bc7c
--- /dev/null
+++ b/net-misc/ipx-utils/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>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
+
diff --git a/net-misc/isatapd/Manifest b/net-misc/isatapd/Manifest
new file mode 100644
index 000000000000..e74c4cf5662d
--- /dev/null
+++ b/net-misc/isatapd/Manifest
@@ -0,0 +1 @@
+DIST isatapd-0.9.7.tar.gz 111524 SHA256 927e1bb5fff4582723c642b41561c5ee6d57b15d05c19ea00c589168898897fa SHA512 3ddfc8385b666ec8c0552c7b46841f2b5e8ebb5d9aa3119a9a6d4cacea728cb81dced802d51b7c98da4bbb839de6fe68ef1bc5f62914b48638b6f168fc06100a WHIRLPOOL 8f5cde92cf61ef2cd1c0027802a18ec0aba8e8c0935be30650c62a22f011e03e255976e4858a7490844ab55afee6e83303f616e95fb72c13c61db8ad8e7895a4
diff --git a/net-misc/isatapd/files/isatapd.service-r2 b/net-misc/isatapd/files/isatapd.service-r2
new file mode 100644
index 000000000000..8d695eda35ca
--- /dev/null
+++ b/net-misc/isatapd/files/isatapd.service-r2
@@ -0,0 +1,15 @@
+[Unit]
+Description=ISATAP Client for Linux
+After=network.target nss-lookup.target
+
+[Service]
+ExecStart=/usr/sbin/isatapd ${DAEMON_OPTS} \
+ --interval ${ISATAP_INTERVAL} \
+ --name ${ISATAP_NAME} \
+ --link ${ISATAP_LINK} \
+ --mtu ${ISATAP_MTU} \
+ --check-dns ${ISATAP_CHECK_DNS} \
+ ${ISATAP_ROUTERS}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/isatapd/files/isatapd.service.conf b/net-misc/isatapd/files/isatapd.service.conf
new file mode 100644
index 000000000000..87fe0be4a23d
--- /dev/null
+++ b/net-misc/isatapd/files/isatapd.service.conf
@@ -0,0 +1,30 @@
+[Service]
+# A space separated list of one or more hostnames/IPv4 addresses to use as
+# potential routers.
+# The default is the unqualified hostname 'isatap'
+Environment="ISATAP_ROUTERS=isatap"
+
+# Interval in seconds to send router solicitations.
+# Default (unset): 'auto'
+Environment="ISATAP_INTERVAL=auto"
+
+# Interval in seconds to check for DNS changes. Set to 0 to disable.
+# Default: 3600
+Environment="ISATAP_CHECK_DNS=3600"
+
+# Link tunnel to device
+# Default (unset): automatically find outgoing device
+Environment="ISATAP_LINK=auto"
+
+# The name of the ISATAP tunnel device
+# Default is 'is0' if ISATAP_LINK is unset and 'is_${ISATAP_LINK}' otherwise.
+Environment="ISATAP_NAME=auto"
+
+# IPv6 MTU of the created ISATAP tunnel interface. The IPv4 path to
+# the ISATAP router and all other ISATAP clients should be able to
+# handle at least MTU+20 bytes.
+# The minimum IPv6 MTU (1280 Bytes) is the safest choice here
+Environment="ISATAP_MTU=1280"
+
+# Additional options, see isatapd(8) for details
+Environment="DAEMON_OPTS="
diff --git a/net-misc/isatapd/isatapd-0.9.7-r2.ebuild b/net-misc/isatapd/isatapd-0.9.7-r2.ebuild
new file mode 100644
index 000000000000..11972cea4a09
--- /dev/null
+++ b/net-misc/isatapd/isatapd-0.9.7-r2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit linux-info systemd
+
+DESCRIPTION="creates and maintains an ISATAP tunnel (rfc5214)"
+HOMEPAGE="http://www.saschahlusiak.de/linux/isatap.htm"
+SRC_URI="http://www.saschahlusiak.de/linux/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+CONFIG_CHECK="~TUN"
+ERROR_TUN="CONFIG_TUN is needed for isatapd to work"
+
+src_prepare() {
+ sed -e '/^opts/s:opts:extra_started_commands:' \
+ -i openrc/isatapd.init.d || die
+}
+
+src_install() {
+ default
+
+ newinitd openrc/isatapd.init.d isatapd
+ newconfd openrc/isatapd.conf.d isatapd
+ systemd_newunit "${FILESDIR}"/${PN}.service-r2 ${PN}.service
+ systemd_install_serviced "${FILESDIR}"/${PN}.service.conf
+}
diff --git a/net-misc/isatapd/metadata.xml b/net-misc/isatapd/metadata.xml
new file mode 100644
index 000000000000..59acc2cc580e
--- /dev/null
+++ b/net-misc/isatapd/metadata.xml
@@ -0,0 +1,9 @@
+<?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>
+</pkgmetadata>
+
diff --git a/net-misc/italc/Manifest b/net-misc/italc/Manifest
new file mode 100644
index 000000000000..5b2f89adecd8
--- /dev/null
+++ b/net-misc/italc/Manifest
@@ -0,0 +1 @@
+DIST italc-2.0.0.tar.bz2 3413075 SHA256 edb5e0502ad73e3398f63e2f485fa7ca7d12cae50315801ac3f22304ccdb6aac SHA512 2e0a0ce97933df1d7332f37d8342f39dd3fad019147e212cb4c2e4e241fdace9ae7febb48cd8808017108de201850d132de7dde35d01a7e60fef6f69302cb4af WHIRLPOOL fa90a335cc5253a513eda1216def0e712e47ccb5b6c1991066090447569a6580d1ee58ac9faa337498e62a7c9c43c40cd17c5260acb7447fb2fffb88d93002a5
diff --git a/net-misc/italc/files/italc-2.0.0-gcc-4.7.patch b/net-misc/italc/files/italc-2.0.0-gcc-4.7.patch
new file mode 100644
index 000000000000..b000b4f34852
--- /dev/null
+++ b/net-misc/italc/files/italc-2.0.0-gcc-4.7.patch
@@ -0,0 +1,15 @@
+ lib/src/LocalSystem.cpp | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/lib/src/LocalSystem.cpp b/lib/src/LocalSystem.cpp
+index fd40609..5827634 100644
+--- a/lib/src/LocalSystem.cpp
++++ b/lib/src/LocalSystem.cpp
+@@ -30,6 +30,7 @@
+ #include <QtGui/QWidget>
+ #include <QtNetwork/QHostInfo>
+
++#include <unistd.h>
+
+ #ifdef ITALC_BUILD_WIN32
+
diff --git a/net-misc/italc/italc-2.0.0.ebuild b/net-misc/italc/italc-2.0.0.ebuild
new file mode 100644
index 000000000000..57f24f152557
--- /dev/null
+++ b/net-misc/italc/italc-2.0.0.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-r2 eutils cmake-utils user
+
+DESCRIPTION="Intelligent Teaching And Learning with Computers (iTALC) supports working with computers in school"
+HOMEPAGE="http://italc.sourceforge.net/"
+SRC_URI="mirror://sourceforge/italc/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="
+ dev-libs/lzo
+ dev-libs/openssl
+ sys-apps/tcp-wrappers
+ sys-libs/zlib
+ virtual/jpeg
+ dev-qt/qtcore:4
+ dev-qt/qtxmlpatterns:4
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXrandr
+ x11-libs/libXtst
+ x11-apps/xinput
+ dev-qt/qtgui:4"
+DEPEND="${RDEPEND}
+ x11-proto/inputproto"
+
+PROPERTIES="interactive"
+
+PATCHES=( "${FILESDIR}"/${P}-gcc-4.7.patch )
+
+DOCS=( TODO README AUTHORS INSTALL ChangeLog )
+
+pkg_setup() {
+ enewgroup italc
+}
+
+pkg_postinst() {
+ elog "On the master, please run "
+ elog "# emerge --config =${CATEGORY}/${PF}"
+
+ elog "Please add the logins of master users (teachers) to the italc group by running"
+ elog "# usermod -a -G italc <loginname>"
+
+ echo ""
+}
+
+pkg_config() {
+ if [ ! -d /etc/italc/keys ] ; then
+ einfo "Creating public and private keys for italc in /etc/italc/keys."
+ /usr/bin/ica -role teacher -createkeypair > /dev/null
+ eend $?
+ einfo "Setting chmod 640 on private keys."
+ chgrp -R italc /etc/italc
+ chmod -R o-rwx /etc/italc/keys/private
+ else
+ einfo "Not creating new keypair, as /etc/italc/keys already exists"
+ fi
+}
diff --git a/net-misc/italc/metadata.xml b/net-misc/italc/metadata.xml
new file mode 100644
index 000000000000..f8f190542814
--- /dev/null
+++ b/net-misc/italc/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">italc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/ixp4xx/Manifest b/net-misc/ixp4xx/Manifest
new file mode 100644
index 000000000000..1103f79f5c90
--- /dev/null
+++ b/net-misc/ixp4xx/Manifest
@@ -0,0 +1,3 @@
+DIST GPL_ixp400LinuxEthernetDriverPatch-1_5.zip 30291 RMD160 d38e5898683cf03cd738c92e76416ba92e5f453d SHA1 ed5905aeff0e663100dd0ae4c2be0b608afe48f1 SHA256 7136fcdb4c7d7d9d9a879dd0e00541993cc95388bdcbc823b1b6545508ae21e4
+DIST IPL_ixp400AccessLibrary-2_1.zip 2227460 RMD160 3b2efba0d72b4e74a14c4d14c9194339ab3a6103 SHA1 0c1d2d49454cfeecff2a09cbaed18fe6d6ccc00a SHA256 5ae00e704db0a2d8186b603c8699738b4d0a60361a6226002654d5b7a7ae1987
+DIST IPL_ixp400NpeLibrary-2_1.zip 168570 RMD160 d295fbecd51144ec6c6e9c9223d5c2b7e6eb6f12 SHA1 cbc3eb2720dff73c3c8a79e4eddc9567a762f25f SHA256 a641c27a73731f4596058837f9d8463155729fe4f2fe14a8429a317302af9152
diff --git a/net-misc/ixp4xx/files/2.1/10-oe-ixethdb-header.patch b/net-misc/ixp4xx/files/2.1/10-oe-ixethdb-header.patch
new file mode 100644
index 000000000000..0b3702a3e101
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/10-oe-ixethdb-header.patch
@@ -0,0 +1,11 @@
+--- ixp400_xscale_sw/src/ethDB/include/IxEthDB_p.h
++++ ixp400_xscale_sw/src/ethDB/include/IxEthDB_p.h
+@@ -693,7 +693,7 @@ IX_ETH_DB_PUBLIC UINT32 ixEthDBEntryXORH
+ IX_ETH_DB_PUBLIC UINT32 ixEthDBKeyXORHash(void *macAddress);
+
+ /* Port updates */
+-IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBNPEUpdateHandler(IxEthDBPortId portID, IxEthDBFeature type);
++IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBNPEUpdateHandler(IxEthDBPortId portID, IxEthDBRecordType type);
+ IX_ETH_DB_PUBLIC void ixEthDBUpdatePortLearningTrees(IxEthDBPortMap triggerPorts);
+ IX_ETH_DB_PUBLIC void ixEthDBNPEAccessRequest(IxEthDBPortId portID);
+ IX_ETH_DB_PUBLIC void ixEthDBUpdateLock(void);
diff --git a/net-misc/ixp4xx/files/2.1/11-oe-bit-macro.patch b/net-misc/ixp4xx/files/2.1/11-oe-bit-macro.patch
new file mode 100644
index 000000000000..40cc8d87d9b5
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/11-oe-bit-macro.patch
@@ -0,0 +1,14 @@
+--- ixp400_xscale_sw/src/include/IxTypes.h
++++ ixp400_xscale_sw/src/include/IxTypes.h
+@@ -79,6 +79,10 @@
+ #endif
+ #endif
+
++#ifndef BIT
++#define BIT(x) ((1)<<(x))
++#endif
++
+ #include "IxOsalBackward.h"
+
+ #endif /* IxTypes_H */
+
diff --git a/net-misc/ixp4xx/files/2.1/12-oe-ixnpemhconfigisr-is-private.patch b/net-misc/ixp4xx/files/2.1/12-oe-ixnpemhconfigisr-is-private.patch
new file mode 100644
index 000000000000..3b1848fb67d9
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/12-oe-ixnpemhconfigisr-is-private.patch
@@ -0,0 +1,18 @@
+--- ixp400_xscale_sw/src/npeMh/IxNpeMhSymbols.c
++++ ixp400_xscale_sw/src/npeMh/IxNpeMhSymbols.c
+@@ -63,7 +63,6 @@ EXPORT_SYMBOL(ixNpeMhMessagesReceive);
+ EXPORT_SYMBOL(ixNpeMhShow);
+ EXPORT_SYMBOL(ixNpeMhShowReset);
+
+-extern void ixNpeMhConfigIsr (void *parameter);
+ extern BOOL ixNpeMhConfigInFifoIsFull(IxNpeMhNpeId npeId);
+ extern BOOL ixNpeMhConfigOutFifoIsEmpty (IxNpeMhNpeId npeId);
+ extern void ixNpeMhConfigLockRelease (IxNpeMhNpeId npeId);
+@@ -72,7 +71,6 @@ extern void ixNpeMhConfigOutFifoRead (Ix
+ extern void ixNpeMhConfigInFifoWrite (IxNpeMhNpeId npeId,IxNpeMhMessage message);
+ extern struct ixNpeMhConfigNpeInfo ixNpeMhConfigNpeInfo[IX_NPEMH_NUM_NPES];
+
+-EXPORT_SYMBOL(ixNpeMhConfigIsr);
+ EXPORT_SYMBOL(ixNpeMhConfigInFifoIsFull);
+ EXPORT_SYMBOL(ixNpeMhConfigOutFifoIsEmpty);
+ EXPORT_SYMBOL(ixNpeMhConfigLockRelease);
diff --git a/net-misc/ixp4xx/files/2.1/13-oe-le.patch b/net-misc/ixp4xx/files/2.1/13-oe-le.patch
new file mode 100644
index 000000000000..0a52db5e060b
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/13-oe-le.patch
@@ -0,0 +1,13 @@
+--- ixp400_xscale_sw/src/include/IxQMgr.h
++++ ixp400_xscale_sw/src/include/IxQMgr.h
+@@ -96,8 +98,8 @@
+
+ #else
+
+-#define IX_QMGR_INLINE_READ_LONG IX_OSAL_READ_LONG_LE_DC
+-#define IX_QMGR_INLINE_WRITE_LONG IX_OSAL_WRITE_LONG_LE_DC
++#define IX_QMGR_INLINE_READ_LONG IX_OSAL_READ_LONG_LE_AC
++#define IX_QMGR_INLINE_WRITE_LONG IX_OSAL_WRITE_LONG_LE_AC
+
+ #endif
+
diff --git a/net-misc/ixp4xx/files/2.1/30-oe-Makefile.patch b/net-misc/ixp4xx/files/2.1/30-oe-Makefile.patch
new file mode 100644
index 000000000000..8332b4daeaa3
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/30-oe-Makefile.patch
@@ -0,0 +1,26 @@
+--- ixp_osal/Makefile
++++ ixp_osal/Makefile
+@@ -185,7 +185,7 @@ endif
+ INCLUDE_DIRS = include $(OSAL_DIRS:%=$(MAIN_INC_PREFIX)/%) $(OSAL_DIRS:%=$(OS_INC_PREFIX)/%)
+
+ ifeq ($(IX_OSAL_MK_HOST_OS), linux)
+-INCLUDE_DIRS += $(LINUX_SRC)/include/asm-arm/arch-ixp425/
++INCLUDE_DIRS += $(LINUX_SRC)/include/asm-arm/arch-ixp4xx/
+ endif
+
+ CFLAGS += $(INCLUDE_DIRS:%=-I%)
+--- ixp_osal/os/linux/make/macros.mk
++++ ixp_osal/os/linux/make/macros.mk
+@@ -88,10 +88,10 @@ AR := $(LINUX_CROSS_COMPILE)ar
+ # Compiler & linker options
+
+ # Compiler flags
+-LINUX_MACH_CFLAGS := -D__LINUX_ARM_ARCH__=5 -mcpu=xscale -mtune=xscale
++LINUX_MACH_CFLAGS := -D__LINUX_ARM_ARCH__=5 -mtune=xscale
+
+ CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -Wall -Wno-trigraphs -fno-common \
+- -pipe -mapcs-32 -mshort-load-bytes -msoft-float -DMODULE \
++ -pipe -mapcs-32 -msoft-float -DMODULE \
+ -D__linux -DCPU=33 -DXSCALE=33 $(LINUX_MACH_CFLAGS) -DEXPORT_SYMTAB
+
+ # Linux linker flags
diff --git a/net-misc/ixp4xx/files/2.1/31-oe-2.6.patch b/net-misc/ixp4xx/files/2.1/31-oe-2.6.patch
new file mode 100644
index 000000000000..edea920cb781
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/31-oe-2.6.patch
@@ -0,0 +1,137 @@
+--- ixp_osal/os/linux/src/core/IxOsalOsMsgQ.c
++++ ixp_osal/os/linux/src/core/IxOsalOsMsgQ.c
+@@ -45,9 +45,9 @@
+ * -- End Intel Copyright Notice --
+ */
+ #include <linux/linkage.h>
++#include <linux/spinlock.h>
+ #include <linux/ipc.h>
+ #include <linux/msg.h>
+-#include <linux/spinlock.h>
+ #include <linux/interrupt.h>
+
+ #include "IxOsal.h"
+--- ixp_osal/os/linux/src/core/IxOsalOsSemaphore.c
++++ ixp_osal/os/linux/src/core/IxOsalOsSemaphore.c
+@@ -46,7 +46,7 @@
+ */
+
+ #include <linux/slab.h>
+-#include <asm-arm/hardirq.h>
++#include <linux/hardirq.h>
+ #include "IxOsal.h"
+
+ /* Define a large number */
+@@ -93,7 +93,7 @@
+ {
+
+ IX_STATUS ixStatus = IX_SUCCESS;
+- UINT32 timeoutTime;
++ unsigned long timeoutTime;
+
+ if (sid == NULL)
+ {
+@@ -261,7 +261,7 @@ ixOsalMutexInit (IxOsalMutex * mutex)
+ PUBLIC IX_STATUS
+ ixOsalMutexLock (IxOsalMutex * mutex, INT32 timeout)
+ {
+- UINT32 timeoutTime;
++ unsigned long timeoutTime;
+
+ if (in_irq ())
+ {
+--- ixp_osal/os/linux/src/core/IxOsalOsServices.c
++++ ixp_osal/os/linux/src/core/IxOsalOsServices.c
+@@ -54,6 +54,7 @@
+ #include <linux/time.h>
+ #include <linux/sched.h>
+ #include <linux/slab.h>
++#include <linux/interrupt.h>
+
+ #include "IxOsal.h"
+
+@@ -89,7 +90,7 @@
+ /*
+ * General interrupt handler
+ */
+-static void
++static irqreturn_t
+ ixOsalOsIsrProxy (int irq, void *dev_id, struct pt_regs *regs)
+ {
+ IxOsalInfoType *isr_proxy_info = (IxOsalInfoType *) dev_id;
+@@ -98,6 +99,7 @@
+ "ixOsalOsIsrProxy: Interrupt used before ixOsalIrqBind was invoked");
+
+ isr_proxy_info->routine (isr_proxy_info->parameter);
++ return IRQ_HANDLED;
+ }
+
+ /*
+@@ -105,11 +107,12 @@
+ * This handler saves the interrupted Program Counter (PC)
+ * into a global variable
+ */
+-static void
++static irqreturn_t
+ ixOsalOsIsrProxyWithPC (int irq, void *dev_id, struct pt_regs *regs)
+ {
+ ixOsalLinuxInterruptedPc = regs->ARM_pc;
+ ixOsalOsIsrProxy(irq, dev_id, regs);
++ return IRQ_HANDLED;
+ }
+
+ /**************************************
+@@ -191,10 +194,15 @@
+ PUBLIC UINT32
+ ixOsalIrqLock ()
+ {
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
++ unsigned long flags;
++ local_irq_save(flags);
++#else
+ UINT32 flags;
+ save_flags (flags);
+ cli ();
+- return flags;
++#endif
++ return (UINT32)flags;
+ }
+
+ /* Enable interrupts and task scheduling,
+@@ -204,7 +212,11 @@
+ PUBLIC void
+ ixOsalIrqUnlock (UINT32 lockKey)
+ {
++# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
++ local_irq_restore((unsigned long)lockKey);
++# else
+ restore_flags (lockKey);
++# endif
+ }
+
+ PUBLIC UINT32
+@@ -329,7 +341,7 @@
+ PUBLIC void
+ ixOsalSleep (UINT32 milliseconds)
+ {
+- if (milliseconds != 0)
++ if (milliseconds*HZ >= 1000)
+ {
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout ((milliseconds * HZ) / 1000);
+--- ixp_osal/os/linux/src/core/IxOsalOsThread.c
++++ ixp_osal/os/linux/src/core/IxOsalOsThread.c
+@@ -65,12 +65,7 @@ thread_internal (void *unused)
+ void *arg = IxOsalOsThreadData.arg;
+ static int seq = 0;
+
+- daemonize ();
+- reparent_to_init ();
+-
+- exit_files (current);
+-
+- snprintf(current->comm, sizeof(current->comm), "IxOsal %d", ++seq);
++ daemonize ("IxOsal %d", ++seq);
+
+ up (&IxOsalThreadMutex);
+
diff --git a/net-misc/ixp4xx/files/2.1/32-oe-invalidate-cache.patch b/net-misc/ixp4xx/files/2.1/32-oe-invalidate-cache.patch
new file mode 100644
index 000000000000..bb20ff026e8a
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/32-oe-invalidate-cache.patch
@@ -0,0 +1,110 @@
+--- ixp_osal/os/linux/include/core/IxOsalOs.h
++++ ixp_osal/os/linux/include/core/IxOsalOs.h
+@@ -56,6 +56,7 @@
+ #include <linux/cache.h>
+ #include <linux/mm.h>
+ #include <linux/config.h>
++#include <linux/version.h>
+ #include <asm/pgalloc.h>
+
+ /**
+@@ -66,9 +67,23 @@
+
+ #define IX_OSAL_OS_MMU_PHYS_TO_VIRT(addr) ((addr) ? phys_to_virt((unsigned int)(addr)) : 0)
+
+-#define IX_OSAL_OS_CACHE_INVALIDATE(addr, size) ( invalidate_dcache_range((__u32)addr, (__u32)addr + size ))
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
++/*
++ * 2.6 kernels do not export the required cache functions.
++ */
++extern void ixOsalCacheInvalidateRange(unsigned long start, unsigned long size);
++extern void ixOsalCacheFlushRange(unsigned long start, unsigned long size);
++
++#define IX_OSAL_OS_CACHE_INVALIDATE(addr, size) \
++ixOsalCacheInvalidateRange((unsigned long)addr, (unsigned long)addr + size)
++#define IX_OSAL_OS_CACHE_FLUSH(addr, size) \
++ixOsalCacheFlushRange((unsigned long)addr, (unsigned long)addr + size )
+
++#else
++
++#define IX_OSAL_OS_CACHE_INVALIDATE(addr, size) ( invalidate_dcache_range((__u32)addr, (__u32)addr + size ))
+ #define IX_OSAL_OS_CACHE_FLUSH(addr, size) ( clean_dcache_range((__u32)addr, (__u32)addr + size ))
++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) */
+
+ /* Cache preload not available*/
+ #define IX_OSAL_OS_CACHE_PRELOAD(addr,size) {}
+--- ixp_osal/os/linux/src/core/IxOsalOsCacheMMU.c
++++ ixp_osal/os/linux/src/core/IxOsalOsCacheMMU.c
+@@ -210,3 +210,59 @@ ixOsalCacheDmaFree (void *ptr)
+ free_pages ((unsigned int) memptr, order);
+ }
+ }
++
++
++/*
++ * 2.6 kernels do not export the required cache functions.
++ */
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
++
++#define _IX_STR(x) #x
++#define IX_STR(x) _IX_STR(x)
++#define IX_CLM IX_STR(IX_OSAL_CACHE_LINE_SIZE-1)
++
++/*
++ * reimplementation of kernel's invalidate_dcache_range()
++ */
++void
++ixOsalCacheInvalidateRange(unsigned long start, unsigned long size)
++{
++ __asm__
++ (" tst %0, #" IX_CLM "\n"
++ " mcrne p15, 0, %0, c7, c10, 1 @ clean D cache line\n"
++ " bic %0, %0, #" IX_CLM "\n"
++ " tst %1, #" IX_CLM "\n"
++ " mcrne p15, 0, %1, c7, c10, 1 @ clean D cache line\n"
++ "1: mcr p15, 0, %0, c7, c6, 1 @ invalidate D cache line\n"
++ " add %0, %0, #" IX_STR(IX_OSAL_CACHE_LINE_SIZE) "\n"
++ " cmp %0, %1\n"
++ " blo 1b\n"
++ " mcr p15, 0, %0, c7, c10, 4 @ drain write & fill buffer\n"
++ : /* no output */
++ : "r"(start), "r"(size)
++ : "cc");
++}
++
++/*
++ * reimplementation of kernel's invalidate_dcache_range()
++ */
++void
++ixOsalCacheFlushRange(unsigned long start, unsigned long size)
++{
++ __asm__
++ (" bic %0, %0, #" IX_CLM "\n"
++ "1: mcr p15, 0, %0, c7, c10, 1 @ clean D cache line\n"
++ " add %0, %0, #" IX_STR(IX_OSAL_CACHE_LINE_SIZE) "\n"
++ " cmp %0, %1\n"
++ " blo 1b\n"
++ " mcr p15, 0, %0, c7, c10, 4 @ drain write & fill buffer\n"
++ : /* no output */
++ : "r"(start), "r"(size)
++ : "cc");
++}
++
++#undef _IX_STR
++#undef IX_STR
++#undef IX_CLM
++
++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) */
+--- ixp_osal/os/linux/src/core/IxOsalOsSymbols.c
++++ ixp_osal/os/linux/src/core/IxOsalOsSymbols.c
+@@ -64,6 +64,10 @@ EXPORT_SYMBOL (ixOsalMemSet);
+
+ EXPORT_SYMBOL (ixOsalCacheDmaMalloc);
+ EXPORT_SYMBOL (ixOsalCacheDmaFree);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
++EXPORT_SYMBOL (ixOsalCacheInvalidateRange);
++EXPORT_SYMBOL (ixOsalCacheFlushRange);
++#endif
+
+ EXPORT_SYMBOL (ixOsalThreadCreate);
+ EXPORT_SYMBOL (ixOsalThreadStart);
diff --git a/net-misc/ixp4xx/files/2.1/33-oe-ixp4xx-header.patch b/net-misc/ixp4xx/files/2.1/33-oe-ixp4xx-header.patch
new file mode 100644
index 000000000000..3246bd2f45b5
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/33-oe-ixp4xx-header.patch
@@ -0,0 +1,103 @@
+--- ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Base.h
++++ ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Base.h
+@@ -0,0 +1,72 @@
++/*
++ * Glue for the current linux definitons of this stuff.
++ */
++#ifndef IxOsalOsIxp425Base_H
++#define IxOsalOsIxp425Base_H 1
++#include <asm-arm/arch-ixp4xx/ixp4xx-regs.h>
++
++/* Force Address Coherent (the default) mapping on LE - Linux 2.6
++ * does not have a way of changing it.
++ */
++#if defined IX_OSAL_LINUX_LE
++# if !defined IX_OSAL_ENFORCED_LE_AC_MAPPING
++# define IX_OSAL_ENFORCED_LE_AC_MAPPING
++# endif
++# if defined IX_OSAL_LE_DC_MAPPING
++# error Little Endian Data Coherent mapping not supported on this platform
++# endif
++
++/* This doesn't matter on a BE build because it will never be used,
++ * however it will be selected and will fail on an LE build.
++ */
++# undef IX_OSAL_LE_DC
++# define IX_OSAL_LE_DC IX_OSAL_LE_DC_IS_INVALID_ON_THIS_PLATFORM
++#endif
++
++/* Physical addresses. */
++#define IXP425_PERIPHERAL_BASE_PHYS IXP4XX_PERIPHERAL_BASE_PHYS
++#define IXP425_EXP_CFG_BASE_PHYS IXP4XX_EXP_CFG_BASE_PHYS
++#define IXP425_PCI_CFG_BASE_PHYS IXP4XX_PCI_CFG_BASE_PHYS
++
++//#define IXP425_EXP_BUS_BASE1_PHYS
++#define IXP425_EXP_BUS_BASE2_PHYS IXP4XX_EXP_BUS_CS2_BASE_PHYS
++//#define IXP425_EXP_BUS_CS0_BASE_PHYS
++//#define IXP425_EXP_BUS_CS1_BASE_PHYS
++//#define IXP425_EXP_BUS_CS4_BASE_PHYS
++#define IXP425_EthA_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x9000)
++#define IXP425_EthB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xA000)
++//#define IXP425_GPIO_BASE_PHYS
++#define IXP425_INTC_BASE_PHYS IXP4XX_INTC_BASE_PHYS
++//#define IXP425_NPEA_BASE_PHYS
++//#define IXP425_NPEB_BASE_PHYS
++//#define IXP425_NPEC_BASE_PHYS
++//#define IXP425_PMU_BASE_PHYS
++#define IXP425_QMGR_BASE_PHYS IXP4XX_QMGR_BASE_PHYS
++#define IXP425_TIMER_BASE_PHYS IXP4XX_TIMER_BASE_PHYS
++//#define IXP425_UART1_BASE_PHYS
++//#define IXP425_UART2_BASE_PHYS
++#define IXP425_USB_BASE_PHYS IXP4XX_USB_BASE_PHYS
++
++/* Virtual addresses. */
++#define IXP425_PERIPHERAL_BASE_VIRT IXP4XX_PERIPHERAL_BASE_VIRT
++#define IXP425_PERIPHERAL_REGION_SIZE IXP4XX_PERIPHERAL_REGION_SIZE
++#define IXP425_EXP_CFG_BASE_VIRT IXP4XX_EXP_CFG_BASE_VIRT
++#define IXP425_PCI_CFG_BASE_VIRT IXP4XX_PCI_CFG_BASE_VIRT
++
++//#define IXP425_EthA_BASE_VIRT
++//#define IXP425_EthB_BASE_VIRT
++//#define IXP425_GPIO_BASE_VIRT
++//#define IXP425_NPEA_BASE_VIRT
++//#define IXP425_NPEB_BASE_VIRT
++//#define IXP425_NPEC_BASE_VIRT
++//#define IXP425_QMGR_BASE_VIRT /* must be ioremapped on Linux 2.6 */
++//#define IXP425_TIMER_BASE_VIRT
++//#define IXP425_UART1_BASE_VIRT
++//#define IXP425_UART2_BASE_VIRT
++//#define IXP425_USB_BASE_VIRT
++
++/* Miscellaneous stuff. */
++#define IRQ_IXP425_XSCALE_PMU IRQ_IXP4XX_XSCALE_PMU
++#define IXP425_ICMR IXP4XX_ICMR
++#define IRQ_IXP425_USB IRQ_IXP4XX_USB
++#endif
+--- ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h
++++ ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h
+@@ -53,6 +53,8 @@
+ #error "Error: IxOsalOsIxp425Sys.h cannot be included directly before IxOsalOsIxp400.h"
+ #endif
+
++#include "IxOsalOsIxp425Base.h"
++
+ /* Memory Base Address */
+ #define IX_OSAL_IXP400_EXP_BUS_PHYS_BASE IXP425_EXP_BUS_BASE2_PHYS
+ #define IX_OSAL_IXP400_EXP_BUS_BOOT_PHYS_BASE IXP425_EXP_BUS_BASE1_PHYS
+@@ -98,12 +100,12 @@ IxOsalMemoryMap ixOsalGlobalMemoryMap[]
+ * Queue Manager
+ */
+ {
+- IX_OSAL_STATIC_MAP, /* type */
++ IX_OSAL_DYNAMIC_MAP, /* type */
+ IX_OSAL_IXP400_QMGR_PHYS_BASE, /* physicalAddress */
+ IX_OSAL_IXP400_QMGR_MAP_SIZE, /* size */
+- IX_OSAL_IXP400_QMGR_VIRT_BASE, /* virtualAddress */
+- NULL, /* mapFunction */
+- NULL, /* unmapFunction */
++ 0, /* virtualAddress */
++ ixOsalLinuxMemMap, /* mapFunction */
++ ixOsalLinuxMemUnmap, /* unmapFunction */
+ 0, /* refCount */
+ IX_OSAL_BE | IX_OSAL_LE_DC, /* endianType */
+ "qMgr" /* name */
diff --git a/net-misc/ixp4xx/files/2.1/34-oe-le.patch b/net-misc/ixp4xx/files/2.1/34-oe-le.patch
new file mode 100644
index 000000000000..46af56ba24ab
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/34-oe-le.patch
@@ -0,0 +1,65 @@
+--- ixp_osal/include/modules/ioMem/IxOsalIoMem.h
++++ ixp_osal/include/modules/ioMem/IxOsalIoMem.h
+@@ -117,8 +117,8 @@ ixOsalCoreWordSwap (UINT32 wordIn)
+ #endif /* ndef __wince */
+
+ #define IX_OSAL_SWAP_SHORT(sData) ((sData >> 8) | ((sData & 0xFF) << 8))
+-#define IX_OSAL_SWAP_SHORT_ADDRESS(sAddr) ((sAddr) ^ 0x2)
+-#define IX_OSAL_SWAP_BYTE_ADDRESS(bAddr) ((bAddr) ^ 0x3)
++#define IX_OSAL_SWAP_SHORT_ADDRESS(sAddr) ((UINT16*)((UINT32)(sAddr) ^ 0x2))
++#define IX_OSAL_SWAP_BYTE_ADDRESS(bAddr) ((UINT8*)((UINT32)(bAddr) ^ 0x3))
+
+ #define IX_OSAL_BE_XSTOBUSL(wData) (wData)
+ #define IX_OSAL_BE_XSTOBUSS(sData) (sData)
+--- ixp_osal/include/modules/ioMem/IxOsalMemAccess.h
++++ ixp_osal/include/modules/ioMem/IxOsalMemAccess.h
+@@ -84,7 +84,7 @@
+
+ #elif defined (IX_OSAL_LINUX_LE)
+
+-#define IX_SDRAM_LE_DATA_COHERENT
++#define IX_SDRAM_LE_ADDRESS_COHERENT
+
+ #elif defined (IX_OSAL_WINCE_LE)
+
+--- ixp_osal/os/linux/include/platforms/ixp400/IxOsalOsIxp400CustomizedMapping.h
++++ ixp_osal/os/linux/include/platforms/ixp400/IxOsalOsIxp400CustomizedMapping.h
+@@ -171,7 +171,7 @@
+ ***************************/
+ #if (IX_COMPONENT_NAME == ix_qmgr)
+
+-#define IX_OSAL_LE_DC_MAPPING
++#define IX_OSAL_LE_AC_MAPPING
+
+ #endif /* qmgr */
+
+--- ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h
++++ ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h
+@@ -107,7 +107,7 @@ IxOsalMemoryMap ixOsalGlobalMemoryMap[]
+ ixOsalLinuxMemMap, /* mapFunction */
+ ixOsalLinuxMemUnmap, /* unmapFunction */
+ 0, /* refCount */
+- IX_OSAL_BE | IX_OSAL_LE_DC, /* endianType */
++ IX_OSAL_BE | IX_OSAL_LE_AC, /* endianType */
+ "qMgr" /* name */
+ },
+
+--- ixp_osal/os/linux/src/modules/ioMem/IxOsalOsIoMem.c
++++ ixp_osal/os/linux/src/modules/ioMem/IxOsalOsIoMem.c
+@@ -45,6 +45,7 @@
+ * -- End Intel Copyright Notice --
+ */
+
++#include <asm/page.h>
+ #include <asm/io.h>
+ #include <linux/ioport.h>
+
+@@ -54,6 +55,8 @@
+ PUBLIC void
+ ixOsalLinuxMemMap (IxOsalMemoryMap * map)
+ {
++ /* Linux requires LE mappings to use address coherency */
++ IX_OSAL_ENSURE((map->mapEndianType & IX_OSAL_LE_DC) == 0, "LE Data Coherency not supported");
+ map->virtualAddress = (UINT32) ioremap (map->physicalAddress, map->size);
+ }
+
diff --git a/net-misc/ixp4xx/files/2.1/35-oe-assert.patch b/net-misc/ixp4xx/files/2.1/35-oe-assert.patch
new file mode 100644
index 000000000000..0ba1e0f0fcf7
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/35-oe-assert.patch
@@ -0,0 +1,37 @@
+# Unnecessary patch - reduces the code size slightly, gives clearer
+# messages if IX_OSAL_ENSURE_ON is set
+--- ixp_osal/include/IxOsalAssert.h
++++ ixp_osal/include/IxOsalAssert.h
+@@ -72,8 +72,8 @@
+ */
+ #ifdef IX_OSAL_ENSURE_ON
+ #define IX_OSAL_ENSURE(c, str) do { \
+-if (!(c)) ixOsalLog (IX_OSAL_LOG_LVL_MESSAGE, IX_OSAL_LOG_DEV_STDOUT, str, \
+-0, 0, 0, 0, 0, 0); } while (0)
++if (!(c)) ixOsalLog (IX_OSAL_LOG_LVL_MESSAGE, IX_OSAL_LOG_DEV_STDOUT, __FILE__ ": line %d: " str, \
++__LINE__, 0, 0, 0, 0, 0); } while (0)
+
+ #else
+ #define IX_OSAL_ENSURE(c, str)
+--- ixp_osal/os/linux/include/core/IxOsalOsAssert.h
++++ ixp_osal/os/linux/include/core/IxOsalOsAssert.h
+@@ -47,11 +47,18 @@
+
+ #ifndef IxOsalOsAssert_H
+ #define IxOsalOsAssert_H
++#ifdef IX_OSAL_ENSURE_ON
+ #define IX_OSAL_OS_ASSERT(c) if(!(c)) \
+ { \
+- ixOsalLog (IX_OSAL_LOG_LVL_ERROR, IX_OSAL_LOG_DEV_STDOUT, "Assertion failure \n", 0, 0, 0, 0, 0, 0);\
++ ixOsalLog (IX_OSAL_LOG_LVL_ERROR, IX_OSAL_LOG_DEV_STDOUT, "%s line %d: Assertion failure: %s\n", (int)__FILE__, __LINE__, (int)#c, 0, 0, 0);\
+ BUG(); \
+ }
++#else
++#define IX_OSAL_OS_ASSERT(c) if(!(c)) \
++ { \
++ BUG(); \
++ }
++#endif
+
+ /*
+ * Place holder.
diff --git a/net-misc/ixp4xx/files/2.1/40-yvasilev-oslinux.patch b/net-misc/ixp4xx/files/2.1/40-yvasilev-oslinux.patch
new file mode 100644
index 000000000000..6c2228dded67
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/40-yvasilev-oslinux.patch
@@ -0,0 +1,20 @@
+--- ixp400_xscale_sw/src/oslinux/IxLinuxInit.c
++++ ixp400_xscale_sw/src/oslinux/IxLinuxInit.c
+@@ -160,7 +160,7 @@ int ixNpe_dev_open (struct inode *inode,
+ return -EEXIST;
+ }
+
+- MOD_INC_USE_COUNT; /* Increment use count to prevent premature rmmod-ing */
++ /* MOD_INC_USE_COUNT; */ /* Increment use count to prevent premature rmmod-ing */
+ ixNpeDlSegmentedListHead = NULL; /* Reset linked list which keeps track of Microcode fragments */
+ ixNpeDlSegmentedListTail = NULL;
+ ixNpeDlTotalBytesReadIn = 0;
+@@ -225,7 +225,7 @@ int ixNpe_dev_release (struct inode *ino
+ kfree (temp);
+ }
+
+- MOD_DEC_USE_COUNT;
++ /* MOD_DEC_USE_COUNT; */
+
+ return 0;
+ }
diff --git a/net-misc/ixp4xx/files/2.1/41-oemod-Makefile.patch b/net-misc/ixp4xx/files/2.1/41-oemod-Makefile.patch
new file mode 100644
index 000000000000..68bb33a2399b
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/41-oemod-Makefile.patch
@@ -0,0 +1,55 @@
+--- ixp400_xscale_sw/Makefile
++++ ixp400_xscale_sw/Makefile
+@@ -297,9 +297,9 @@ endif
+ else # IX_TARGET_OS == vxworks
+ # linux compiler flags
+ MAKE_DEP_FLAG := -M
+-LINUX_MACH_CFLAGS := -D__LINUX_ARM_ARCH__=5 -mcpu=xscale -mtune=xscale
++LINUX_MACH_CFLAGS := -D__LINUX_ARM_ARCH__=5 -mtune=xscale
+
+-CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -Wall -Wno-trigraphs -fno-common -pipe -mapcs-32 -mshort-load-bytes -msoft-float -DMODULE -Isrc/include -D__linux -DCPU=33 -DXSCALE=33 $(LINUX_MACH_CFLAGS)
++CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -Wall -Wno-trigraphs -fno-common -pipe -mapcs-32 -msoft-float -DMODULE -Isrc/include -D__linux -DCPU=33 -DXSCALE=33 $(LINUX_MACH_CFLAGS)
+ ifndef IX_INCLUDE_MICROCODE
+ CFLAGS += -DIX_NPEDL_READ_MICROCODE_FROM_FILE
+ endif
+@@ -867,9 +867,11 @@ $(NPE_DAT) : $(NPE_CONVERTER)
+
+ ifeq ($(IX_HOST_OS),linux)
+ ifndef IX_INCLUDE_MICROCODE
++ifdef IX_BUILD_MICROCODE
+ Makefile: $(NPE_CONVERTER) $(NPE_DAT)
+ endif
+ endif
++endif
+
+ ################################################################
+ # Rules to check that macros are defined.
+@@ -1319,6 +1321,10 @@ endif
+
+ ixp400.o : $(OBJ_DIR)/ixp400.o
+
++ixp400.ko : $(OBJ_DIR)/ixp400.ko
++
++ixp400_eth.ko : $(OBJ_DIR)/ixp400_eth.ko
++
+ ifndef IX_INCLUDE_MICROCODE
+ $(OBJ_DIR)/ixp400.o: $(COMPONENTS:%=$(OBJ_DIR)/ixp400_%.o) $(OSAL_MODULE)
+ $(LD) $(LDFLAGS) $^ -o $@
+@@ -1327,7 +1333,17 @@ $(OBJ_DIR)/ixp400.o: $(COMPONENTS:%=$(OB
+ $(LD) $(LDFLAGS) $^ -o $@
+ endif
+
++$(OBJ_DIR)/ixp400_ial.o_shipped : $(OBJ_DIR)/ixp400.o
++ mv $^ $@
+
++$(OBJ_DIR)/ixp400.ko : $(OBJ_DIR)/ixp400_ial.o_shipped
++ cp Makefile.ixp400 $(OBJ_DIR)/Makefile
++ $(MAKE) LINUX_SRC=$($(IX_TARGET)_KERNEL_DIR) CROSS_COMPILE=$(LINUX_CROSS_COMPILE) -C $(OBJ_DIR) ixp400.ko
++
++$(OBJ_DIR)/ixp400_eth.ko : $(IX_XSCALE_SW)/../ixp400_eth.c
++ cp Makefile.ixp400_eth $(OBJ_DIR)/Makefile
++ cp $(IX_XSCALE_SW)/../ixp400_eth.c $(OBJ_DIR)/ixp400_eth.c
++ $(MAKE) LINUX_SRC=$($(IX_TARGET)_KERNEL_DIR) CROSS_COMPILE=$(LINUX_CROSS_COMPILE) OSAL_DIR=$(OSAL_DIR) -C $(OBJ_DIR) ixp400_eth.ko
+
+ ################################################################
+ # clean - deletes everything that can be rebuilt
diff --git a/net-misc/ixp4xx/files/2.1/42-yvasilev-Makefile-ixp400.patch b/net-misc/ixp4xx/files/2.1/42-yvasilev-Makefile-ixp400.patch
new file mode 100644
index 000000000000..3769e9cfe156
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/42-yvasilev-Makefile-ixp400.patch
@@ -0,0 +1,13 @@
+--- ixp400_xscale_sw/Makefile.ixp400
++++ ixp400_xscale_sw/Makefile.ixp400
+@@ -0,0 +1,10 @@
++obj-m := ixp400.o
++ixp400-y := ixp400_ial.o
++
++PWD := $(shell pwd)
++
++ixp400.ko:
++ $(MAKE) V=1 -C $(LINUX_SRC) SUBDIRS=$(PWD) ARCH=arm modules
++
++clean:
++ rm -f ixp400.ko
diff --git a/net-misc/ixp4xx/files/2.1/43-yvasilev-Makefile-ixp400_eth.patch b/net-misc/ixp4xx/files/2.1/43-yvasilev-Makefile-ixp400_eth.patch
new file mode 100644
index 000000000000..b53976d3a81a
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/43-yvasilev-Makefile-ixp400_eth.patch
@@ -0,0 +1,35 @@
+--- ixp400_xscale_sw/Makefile.ixp400_eth
++++ ixp400_xscale_sw/Makefile.ixp400_eth
+@@ -0,0 +1,32 @@
++obj-m := ixp400_eth.o
++
++PWD := $(shell pwd)
++
++CFLAGS = -Wall \
++ -DCONFIG_MODULES -DMODULES -O -I$(LINUX_SRC)/include/ \
++ -I$(IX_XSCALE_SW)/src/include/ \
++ -I$(OSAL_DIR)/ \
++ -I$(OSAL_DIR)/os/linux/include/ \
++ -I$(OSAL_DIR)/os/linux/include/modules/ \
++ -I$(OSAL_DIR)/os/linux/include/modules/ioMem/ \
++ -I$(OSAL_DIR)/os/linux/include/modules/core/ \
++ -I$(OSAL_DIR)/os/linux/include/modules/bufferMgt/ \
++ -I$(OSAL_DIR)/os/linux/include/core/ \
++ -I$(OSAL_DIR)/os/linux/include/platforms/ \
++ -I$(OSAL_DIR)/os/linux/include/platforms/ixp400/ \
++ -I$(OSAL_DIR)/os/linux/include/core/ \
++ -I$(OSAL_DIR)/include/ \
++ -I$(OSAL_DIR)/include/modules/ \
++ -I$(OSAL_DIR)/include/modules/bufferMgt/ \
++ -I$(OSAL_DIR)/include/modules/ioMem/ \
++ -I$(OSAL_DIR)/include/modules/core/ \
++ -I$(OSAL_DIR)/include/platforms/ \
++ -I$(OSAL_DIR)/include/platforms/ixp400/ \
++ -I$(OSAL_DIR)/os/linux/include/platforms/ixp400/ixp425/
++export CFLAGS
++
++ixp400_eth.ko:
++ $(MAKE) V=1 -C $(LINUX_SRC) SUBDIRS=$(PWD) ARCH=arm modules
++
++clean:
++ rm -f ixp400_eth.ko
diff --git a/net-misc/ixp4xx/files/2.1/50-oemod-ixp400_eth.patch b/net-misc/ixp4xx/files/2.1/50-oemod-ixp400_eth.patch
new file mode 100644
index 000000000000..a51f89b99536
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/50-oemod-ixp400_eth.patch
@@ -0,0 +1,171 @@
+--- ixp400_eth.c
++++ ixp400_eth.c
+@@ -128,6 +128,7 @@ static int dev_max_count = 2; /* only NP
+ static int dev_max_count = 3; /* all NPEs are used */
+ #endif
+
++static int dev_max_count = 1;
+ #ifndef CONFIG_IXP400_NAPI
+ /* netdev_max_backlog: ideally /proc/sys/net/core/netdev_max_backlog, but any
+ * value > 46 looks to work. This is used to control the maximum number of
+@@ -157,7 +158,11 @@ MODULE_PARM(dev_max_count, "i");
+ MODULE_PARM_DESC(dev_max_count, "Number of devices to initialize");
+
+ /* devices will be called ixp0 and ixp1 */
++#ifdef IX_DEVICE_NAME_ETH
++#define DEVICE_NAME "eth"
++#else
+ #define DEVICE_NAME "ixp"
++#endif
+
+ /* boolean values for PHY link speed, duplex, and autonegotiation */
+ #define PHY_SPEED_10 0
+@@ -347,6 +352,12 @@ static int dev_pmu_timer_init(void);
+ extern void
+ ixEthTxFrameDoneQMCallback(IxQMgrQId qId, IxQMgrCallbackId callbackId);
+
++#ifdef CONFIG_NET_POLL_CONTROLLER
++/* poll controller (needed for netconsole et al) */
++static void
++ixp425eth_poll_controller(struct net_device *dev);
++#endif
++
+ /* Private device data */
+ typedef struct {
+ spinlock_t lock; /* multicast management lock */
+@@ -1838,7 +1849,11 @@ static inline void dev_eth_type_trans(un
+ skb->len -= header_len;
+
+ /* fill the pkt arrival time (set at the irq callback entry) */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+ skb->stamp = irq_stamp;
++#else
++ skb_set_timestamp(skb, &irq_stamp);
++#endif
+
+ /* fill the input device field */
+ skb->dev = dev;
+@@ -2028,6 +2043,16 @@ static void rx_cb(UINT32 callbackTag, IX
+ skb->tail = skb->data + len;
+ skb->len = len;
+
++#ifndef __ARMEB__
++ {
++ /* Byte swap all words containing data from the buffer. */
++ unsigned long *p = (unsigned long*)((unsigned)skb->data & ~0x3);
++ unsigned long *e = (unsigned long*)(((unsigned)skb->data + skb->len + 3) & ~0x3);
++ while (p < e)
++ *p = ntohl(*p), ++p;
++ }
++#endif
++
+ #ifdef DEBUG_DUMP
+ skb_dump("rx", skb);
+ #endif
+@@ -2418,6 +2443,16 @@ static int dev_hard_start_xmit(struct sk
+ return 0;
+ }
+
++#ifndef __ARMEB__
++ {
++ /* Byte swap all words containing data from the buffer. */
++ unsigned long *p = (unsigned long*)((unsigned)skb->data & ~0x3);
++ unsigned long *e = (unsigned long*)(((unsigned)skb->data + skb->len + 3) & ~0x3);
++ while (p < e)
++ *p = ntohl(*p), ++p;
++ }
++#endif
++
+ #ifdef DEBUG_DUMP
+ skb_dump("tx", skb);
+ #endif
+@@ -3014,7 +3049,7 @@ static int phy_init(void)
+ }
+
+ /* set port MAC addr and update the dev struct if successfull */
+-int dev_set_mac_address(struct net_device *dev, void *addr)
++static int set_mac_address(struct net_device *dev, void *addr)
+ {
+ int res;
+ IxEthAccMacAddr npeMacAddr;
+@@ -3052,6 +3087,19 @@ int dev_set_mac_address(struct net_devic
+ return 0;
+ }
+
++#ifdef CONFIG_NET_POLL_CONTROLLER
++/*
++ * Polling receive - used by netconsole and other diagnostic tools
++ * to allow network i/o with interrupts disabled.
++ * (stolen from 8139too.c by siddy)
++ */
++static void ixp425eth_poll_controller(struct net_device *dev)
++{
++ disable_irq(dev->irq);
++ dev_qmgr_os_isr(dev->irq, dev, NULL);
++ enable_irq(dev->irq);
++}
++#endif
+
+ /*
+ * TX QDISC
+@@ -3241,6 +3289,8 @@ static int __devinit dev_eth_probe(struc
+ kmalloc(sizeof(struct semaphore), GFP_KERNEL);
+ if (!priv->maintenanceCheckThreadComplete)
+ {
++ P_ERROR("%s: Failed to allocate maintenance semaphore %d\n",
++ ndev->name, priv->port_id);
+ goto error;
+ }
+ priv->lock = SPIN_LOCK_UNLOCKED;
+@@ -3265,8 +3315,11 @@ static int __devinit dev_eth_probe(struc
+ ndev->get_stats = dev_get_stats;
+ ndev->set_multicast_list = dev_set_multicast_list;
+ ndev->flags |= IFF_MULTICAST;
++#ifdef CONFIG_NET_POLL_CONTROLLER
++ ndev->poll_controller = ixp425eth_poll_controller;
++#endif
+
+- ndev->set_mac_address = dev_set_mac_address;
++ ndev->set_mac_address = set_mac_address;
+
+ #ifdef CONFIG_IXP400_NAPI
+ ndev->poll = &dev_rx_poll;
+@@ -3347,7 +3400,11 @@ static int __devinit dev_eth_probe(struc
+
+ #if IS_KERNEL26
+ if (register_netdev(ndev))
++ {
++ P_ERROR("%s: Failed to register netdevice %d\n",
++ ndev->name, priv->port_id);
+ goto error;
++ }
+ #else
+ found_devices++;
+ #endif /* IS_KERNEL26 */
+@@ -3357,6 +3414,8 @@ static int __devinit dev_eth_probe(struc
+ /* register EthAcc callbacks for this port */
+ if (dev_rxtxcallback_register(portId, (UINT32)ndev))
+ {
++ P_ERROR("%s: Failed to register callback %d\n",
++ ndev->name, priv->port_id);
+ goto error;
+ }
+
+@@ -3380,6 +3439,7 @@ static int __devinit dev_eth_probe(struc
+
+ /* Error handling: enter here whenever error detected */
+ error:
++ P_ERROR("%s: dev_eth_probe fails\n", ndev->name);
+ TRACE;
+
+ #ifdef CONFIG_IXP400_ETH_QDISC_ENABLED
+@@ -3515,6 +3575,9 @@ static int __init ixp400_eth_init(void)
+ TRACE;
+
+ P_INFO("Initializing IXP400 NPE Ethernet driver software v. " MOD_VERSION " \n");
++#ifdef IX_OSAL_ENSURE_ON
++ ixOsalLogLevelSet(IX_OSAL_LOG_LVL_ALL);
++#endif
+
+ TRACE;
+
diff --git a/net-misc/ixp4xx/files/2.1/README b/net-misc/ixp4xx/files/2.1/README
new file mode 100644
index 000000000000..8d2900e2d2df
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/README
@@ -0,0 +1 @@
+This patches are ripped from OE and Yuri Vasilevski
diff --git a/net-misc/ixp4xx/ixp4xx-2.1.ebuild b/net-misc/ixp4xx/ixp4xx-2.1.ebuild
new file mode 100644
index 000000000000..97f730b8bad5
--- /dev/null
+++ b/net-misc/ixp4xx/ixp4xx-2.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs linux-mod
+
+DESCRIPTION="kernel drivers for intel ixp4xx systems (like the NSLU2)"
+HOMEPAGE="http://www.intel.com/design/network/products/npfamily/ixp420.htm"
+SRC_URI="ftp://aiedownload.intel.com/df-support/9515/eng/IPL_ixp400AccessLibrary-2_1.zip
+ ftp://aiedownload.intel.com/df-support/9517/eng/IPL_ixp400NpeLibrary-2_1.zip
+ ftp://aiedownload.intel.com/df-support/9519/eng/GPL_ixp400LinuxEthernetDriverPatch-1_5.zip"
+
+LICENSE="ixp4xx"
+SLOT="0"
+KEYWORDS="-* arm"
+IUSE=""
+RESTRICT="mirror"
+
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+S=${WORKDIR}/ixp400_xscale_sw
+
+src_unpack() {
+ unpack ${A}
+ epatch "${FILESDIR}"/2.1/*.patch
+}
+
+src_compile() {
+ cd ixp400_xscale_sw
+ local ix_target
+ [[ $(printf "#include <endian.h>\n#if __BYTE_ORDER == __LITTLE_ENDIAN\nlittle\n#else\nbig\n#endif\n" | $(tc-getCPP) - | tail -n 1) == "little" ]] \
+ && ix_target=linuxle \
+ || ix_target=linuxbe
+ make \
+ LINUX_CROSS_COMPILE=${CHOST}- \
+ ${ix_target}_KERNEL_DIR=${KERNEL_DIR} \
+ IX_XSCALE_SW=${PWD} \
+ IX_TARGET=${ix_target} \
+ IX_DEVICE=ixp42X \
+ IX_PLATFORM=ixdp42x \
+ COMPONENTS="qmgr npeMh npeDl ethAcc ethDB ethMii featureCtrl osServices oslinux" \
+ IX_INCLUDE_MICROCODE=1 \
+ ixp400.${KV_OBJ} ixp400_eth.${KV_OBJ} \
+ || die "failed to build kernel modules"
+ cp lib/${ix_target}/ixp400.${KV_OBJ} lib/${ix_target}/ixp400_eth.${KV_OBJ} . || die
+}
+
+src_install() {
+ MODULE_NAMES="ixp400(kernel/drivers/ixp400:${S}) ixp400_eth(kernel/drivers/net:${S})"
+ linux-mod_src_install
+}
diff --git a/net-misc/ixp4xx/metadata.xml b/net-misc/ixp4xx/metadata.xml
new file mode 100644
index 000000000000..874dddb6a57c
--- /dev/null
+++ b/net-misc/ixp4xx/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>arm</herd>
+<herd>embedded</herd>
+</pkgmetadata>
diff --git a/net-misc/java-wakeonlan/Manifest b/net-misc/java-wakeonlan/Manifest
new file mode 100644
index 000000000000..d61677495795
--- /dev/null
+++ b/net-misc/java-wakeonlan/Manifest
@@ -0,0 +1 @@
+DIST wakeonlan-1.0.0.zip 352181 SHA256 dfcdb54eb1333b5f9be74d7f493f68fce496d031b9b81656740e8b2fd1d62e43 SHA512 286cba36b70fae8a85dfdbb1fa4c0e3345f1d3b67187571d9134fc7cb432874613f6a713d40c1d9d9874af09dc03214441a5f88f9ea3d3cf29ce0d059fddcdee WHIRLPOOL e0424946eae1f646eb4c5fd527bfc24257884655a808a434c484125604fff5df213a8613746062b24e1c3d164e7f18f93c4192ce6bf0af0b08529b6bebc78a0a
diff --git a/net-misc/java-wakeonlan/files/java-wakeonlan-1.0.0-build.xml.patch b/net-misc/java-wakeonlan/files/java-wakeonlan-1.0.0-build.xml.patch
new file mode 100644
index 000000000000..d3c352bd52d1
--- /dev/null
+++ b/net-misc/java-wakeonlan/files/java-wakeonlan-1.0.0-build.xml.patch
@@ -0,0 +1,43 @@
+--- build.xml 2004-06-03 16:21:44.000000000 +0300
++++ build.xml.fixed 2009-01-31 11:48:56.000000000 +0200
+@@ -38,7 +38,6 @@
+ target="${build.target}"
+ classpathref="build.classpath" >
+ <src path="${src.dir}" />
+- <src path="${testsrc.dir}" />
+ </javac>
+ <copy todir="${build.classes.dir}" overwrite="true">
+ <fileset dir="${src.dir}">
+@@ -56,6 +55,16 @@
+ </copy>
+ </target>
+
++ <target name="build-test">
++ <javac destdir="${build.classes.dir}"
++ debug="${build.debug}"
++ optimize="${build.optimize}"
++ target="${build.target}"
++ classpathref="build.classpath" >
++ <src path="${testsrc.dir}" />
++ </javac>
++ </target>
++
+ <target name="init.javadoc">
+ <mkdir dir="${deploy.javadoc.dir}"/>
+ </target>
+@@ -74,7 +83,7 @@
+ </javadoc>
+ </target>
+
+- <target name="test" depends="build">
++ <target name="test" depends="build-test">
+ <junit showoutput="true" printsummary="true">
+ <classpath >
+ <path refid="build.classpath" />
+@@ -179,4 +188,4 @@
+ <antcall target="deploy.ws" />
+ <antcall target="deploy.zip" />
+ </target>
+-</project>
+\ Dosya sonunda yenisatır yok.
++</project>
diff --git a/net-misc/java-wakeonlan/java-wakeonlan-1.0.0-r2.ebuild b/net-misc/java-wakeonlan/java-wakeonlan-1.0.0-r2.ebuild
new file mode 100644
index 000000000000..9174dfa142b5
--- /dev/null
+++ b/net-misc/java-wakeonlan/java-wakeonlan-1.0.0-r2.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+JAVA_PKG_IUSE="doc source"
+
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="A wakeonlan commandline tool and Java library"
+SRC_URI="http://www.moldaner.de/wakeonlan/download/wakeonlan-${PV}.zip"
+HOMEPAGE="http://www.moldaner.de/wakeonlan/"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="test"
+
+CDEPEND="dev-java/jsap:0
+ dev-java/junit:4"
+RDEPEND=">=virtual/jre-1.6
+ ${CDEPEND}"
+DEPEND=">=virtual/jdk-1.6
+ app-arch/unzip
+ test? (
+ dev-java/ant-junit:0
+ )
+ ${CDEPEND}"
+
+S=${WORKDIR}/wakeonlan-${PV}
+
+EANT_GENTOO_CLASSPATH="jsap"
+EANT_BUILD_TARGET="deploy"
+JAVA_ANT_CLASSPATH_TAGS+=" javadoc"
+
+src_unpack() {
+ unpack ${A}
+}
+
+java_prepare() {
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-build.xml.patch
+ find -name "*.jar" | xargs rm -v
+ java-ant_rewrite-classpath
+}
+
+EANT_TEST_CLASSPATH="${EANT_GENTOO_CLASSPATH},junit-4"
+EANT_TEST_TARGET="test"
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ java-pkg_dojar deploy/wakeonlan.jar
+ java-pkg_dolauncher ${PN} --main wol.WakeOnLan
+ dodoc doc/README
+ use doc && java-pkg_dojavadoc deploy/doc/javadoc
+ use source && java-pkg_dosrc src/wol
+}
diff --git a/net-misc/java-wakeonlan/metadata.xml b/net-misc/java-wakeonlan/metadata.xml
new file mode 100644
index 000000000000..838c00a4a448
--- /dev/null
+++ b/net-misc/java-wakeonlan/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>java</herd>
+</pkgmetadata>
diff --git a/net-misc/jigdo/Manifest b/net-misc/jigdo/Manifest
new file mode 100644
index 000000000000..402b2b0f3d67
--- /dev/null
+++ b/net-misc/jigdo/Manifest
@@ -0,0 +1 @@
+DIST jigdo-0.7.3.tar.bz2 644670 SHA256 875c069abad67ce67d032a9479228acdb37c8162236c0e768369505f264827f0 SHA512 e183a2d93126935057244b9eb6bf6dadc1900cb17c36194f69e63a15d70ddfea81ce1167de5abfcdfd7507ac9fe6250a05be9d9d29392c961d44fde796158f7c WHIRLPOOL 25ffc64cc57dd8bd98c3edc7560e6d5bac3e8dd710237d9ccd75f73f40e819259176aa71f3fccb2ac20bc50b8509465340b788b23ab191b000b81a33343d1f19
diff --git a/net-misc/jigdo/files/jigdo-0.7.3-gcc43.patch b/net-misc/jigdo/files/jigdo-0.7.3-gcc43.patch
new file mode 100644
index 000000000000..07356f0233ee
--- /dev/null
+++ b/net-misc/jigdo/files/jigdo-0.7.3-gcc43.patch
@@ -0,0 +1,80 @@
+diff -ur jigdo-0.7.3.orig/src/compat.hh jigdo-0.7.3/src/compat.hh
+--- jigdo-0.7.3.orig/src/compat.hh 2005-07-02 10:21:35.000000000 -0700
++++ jigdo-0.7.3/src/compat.hh 2008-03-11 23:01:45.000000000 -0700
+@@ -20,6 +20,7 @@
+
+ #include <string>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <unistd-jigdo.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+diff -ur jigdo-0.7.3.orig/src/gtk/gtk-single-url.cc jigdo-0.7.3/src/gtk/gtk-single-url.cc
+--- jigdo-0.7.3.orig/src/gtk/gtk-single-url.cc 2005-10-15 14:27:39.000000000 -0700
++++ jigdo-0.7.3/src/gtk/gtk-single-url.cc 2008-03-11 23:05:48.000000000 -0700
+@@ -15,6 +15,7 @@
+
+ #include <time.h>
+ #include <errno.h>
++#include <string.h>
+
+ #include <autoptr.hh>
+ #include <gtk-single-url.hh>
+diff -ur jigdo-0.7.3.orig/src/gtk/jigdo.cc jigdo-0.7.3/src/gtk/jigdo.cc
+--- jigdo-0.7.3.orig/src/gtk/jigdo.cc 2005-07-09 15:21:04.000000000 -0700
++++ jigdo-0.7.3/src/gtk/jigdo.cc 2008-03-11 23:06:26.000000000 -0700
+@@ -16,6 +16,8 @@
+ # include <unistd-jigdo.h>
+ #endif
+
++#include <string.h>
++
+ #include <iostream>
+ #include <string>
+ #include <vector>
+diff -ur jigdo-0.7.3.orig/src/recursedir.cc jigdo-0.7.3/src/recursedir.cc
+--- jigdo-0.7.3.orig/src/recursedir.cc 2006-05-14 11:23:31.000000000 -0700
++++ jigdo-0.7.3/src/recursedir.cc 2008-03-11 23:04:21.000000000 -0700
+@@ -32,6 +32,7 @@
+ #include <recursedir.hh>
+
+ #include <iostream>
++#include <string.h>
+ #include <errno.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+diff -ur jigdo-0.7.3.orig/src/util/configfile.cc jigdo-0.7.3/src/util/configfile.cc
+--- jigdo-0.7.3.orig/src/util/configfile.cc 2003-09-27 14:31:04.000000000 -0700
++++ jigdo-0.7.3/src/util/configfile.cc 2008-03-11 23:05:00.000000000 -0700
+@@ -19,6 +19,8 @@
+ #include <iostream>
+ #include <fstream>
+
++#include <string.h>
++
+ #include <configfile.hh>
+ #include <string.hh>
+ //______________________________________________________________________
+diff -ur jigdo-0.7.3.orig/src/util/md5sum.hh jigdo-0.7.3/src/util/md5sum.hh
+--- jigdo-0.7.3.orig/src/util/md5sum.hh 2005-04-09 16:09:52.000000000 -0700
++++ jigdo-0.7.3/src/util/md5sum.hh 2008-03-11 23:07:04.000000000 -0700
+@@ -28,6 +28,8 @@
+
+ #include <config.h>
+
++#include <string.h>
++
+ #include <cstdlib>
+ #include <iosfwd>
+ #include <string>
+diff -ur jigdo-0.7.3.orig/src/util/string-utf.cc jigdo-0.7.3/src/util/string-utf.cc
+--- jigdo-0.7.3.orig/src/util/string-utf.cc 2004-09-11 16:26:30.000000000 -0700
++++ jigdo-0.7.3/src/util/string-utf.cc 2008-03-11 23:07:43.000000000 -0700
+@@ -15,6 +15,7 @@
+ #include <glib.h>
+ #include <stdarg.h>
+ #include <stdio.h>
++#include <string.h>
+
+ #include <debug.hh>
+ #include <string-utf.hh>
diff --git a/net-misc/jigdo/files/jigdo-0.7.3-strip.patch b/net-misc/jigdo/files/jigdo-0.7.3-strip.patch
new file mode 100644
index 000000000000..c4be7a95c5ad
--- /dev/null
+++ b/net-misc/jigdo/files/jigdo-0.7.3-strip.patch
@@ -0,0 +1,23 @@
+--- jigdo-0.7.3/Makefile.in.orig 2006-05-19 16:55:41.000000000 +0200
++++ jigdo-0.7.3/Makefile.in 2009-09-04 17:37:31.000000000 +0200
+@@ -15,7 +15,7 @@
+
+ PACKAGE = jigdo
+ INSTALL = @INSTALL@
+-INSTALL_EXE = @INSTALL@ -s
++INSTALL_EXE = @INSTALL@
+ INSTALL_DATA = @INSTALL@ -m 644
+ INSTALL_SCRIPT = @INSTALL@ -m 755
+ AWK = @AWK@
+--- jigdo-0.7.3/src/Makefile.in.orig 2005-07-06 17:51:28.000000000 +0200
++++ jigdo-0.7.3/src/Makefile.in 2009-09-04 17:38:58.000000000 +0200
+@@ -161,8 +161,7 @@
+ cd .. && sh config.status; \
+ fi
+ strip:
+- for p in $(programs); do if test -f "$$p"; then \
+- strip -R .comment -R .note "$$p"; fi; done
++ true
+
+ TEST-DEFAULTOBJS = util/log.o util/string-utf.o util/debug.o
+ TEST-LDFLAGS = @LDFLAGS@ $(GLIBLIBS)
diff --git a/net-misc/jigdo/jigdo-0.7.3-r2.ebuild b/net-misc/jigdo/jigdo-0.7.3-r2.ebuild
new file mode 100644
index 000000000000..925daee8d547
--- /dev/null
+++ b/net-misc/jigdo/jigdo-0.7.3-r2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils
+
+DESCRIPTION="Jigsaw Download is a tool designed to ease the distribution of large files, for example DVD images"
+HOMEPAGE="http://atterer.net/jigdo/"
+SRC_URI="http://atterer.net/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="gtk nls berkdb"
+
+RDEPEND="gtk? ( x11-libs/gtk+:2 )
+ berkdb? ( >=sys-libs/db-3.2 )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gcc43.patch \
+ "${FILESDIR}"/${P}-strip.patch
+}
+
+src_configure() {
+ local myconf
+ use berkdb || myconf="${myconf} --without-libdb"
+ econf $(use_enable nls) ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ doicon gfx/jigdo-icon.png
+ make_desktop_entry "${PN}" "${PN}" jigdo-icon
+ dodoc changelog README THANKS doc/{Hacking,README-bindist,TechDetails}.txt
+ dohtml doc/*.html
+}
diff --git a/net-misc/jigdo/metadata.xml b/net-misc/jigdo/metadata.xml
new file mode 100644
index 000000000000..72dbea83cc69
--- /dev/null
+++ b/net-misc/jigdo/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ Jigsaw Download, or jigdo for short, is a tool designed to ease the
+ distribution of very large files over the internet, for example CD or
+ DVD images. Its aim is to make downloading the images as easy for users
+ as a click on a direct download link in a browser, while avoiding all
+ the problems that server administrators have with hosting such large
+ files.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/jlj/Manifest b/net-misc/jlj/Manifest
new file mode 100644
index 000000000000..1d4f30bef71c
--- /dev/null
+++ b/net-misc/jlj/Manifest
@@ -0,0 +1 @@
+DIST jlj_2.12.tar.gz 32480 SHA256 da3e1626338c5337e28bb4bc8da0b64d7a8ab441a52aa2364037e9eea152bc27 SHA512 e0d14520c584ca6bca473286cadef46c7deefc47d48fc39e3bd61e01189fe445a9452406a3aec1ed05d9d44925042589cc1396991b56f02018ea01df11ab8594 WHIRLPOOL 4b8667c422e5c456d5deb3d7e3a6b6666f917c4bc2e0d03bb773959c5a060fccf569e85713f2651e8288e06d5edfb30d92186428e992983207f61685bd88d5f4
diff --git a/net-misc/jlj/jlj-2.12.ebuild b/net-misc/jlj/jlj-2.12.ebuild
new file mode 100644
index 000000000000..47e08819f356
--- /dev/null
+++ b/net-misc/jlj/jlj-2.12.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="A simple console LiveJournal entry system"
+HOMEPAGE="http://umlautllama.com/projects/perl/#jlj"
+SRC_URI="http://umlautllama.com/projects/perl/${PN}_${PV}.tar.gz"
+LICENSE="freedist"
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc x86"
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-lang/perl"
+
+S=${WORKDIR}/${PN}
+
+src_install() {
+ newbin ${PN}.pl ${PN} || die
+ newdoc .livejournal.rc livejournal.rc
+ dodoc README.JLJ
+}
+
+pkg_postinst() {
+ elog "README.JLJ and a sample livejournal.rc have been installed to"
+ elog "/usr/share/doc/${PF}/"
+}
diff --git a/net-misc/jlj/metadata.xml b/net-misc/jlj/metadata.xml
new file mode 100644
index 000000000000..bd9d5943c2b9
--- /dev/null
+++ b/net-misc/jlj/metadata.xml
@@ -0,0 +1,9 @@
+<?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>
+ <name>Default Assignee for Orphaned Packages</name>
+ </maintainer>
+</pkgmetadata>
+
diff --git a/net-misc/jrdesktop/Manifest b/net-misc/jrdesktop/Manifest
new file mode 100644
index 000000000000..c4c8e06d705f
--- /dev/null
+++ b/net-misc/jrdesktop/Manifest
@@ -0,0 +1 @@
+DIST jrdesktop-source-0.3.1.0.tar.gz 228134 SHA256 9b9cccd6c62c0487bd2a124fb3ed9159c750340d6d7139a28df002e67c384f40
diff --git a/net-misc/jrdesktop/jrdesktop-0.3.1.0.ebuild b/net-misc/jrdesktop/jrdesktop-0.3.1.0.ebuild
new file mode 100644
index 000000000000..6b39ed997ab3
--- /dev/null
+++ b/net-misc/jrdesktop/jrdesktop-0.3.1.0.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+JAVA_PKG_IUSE="source doc"
+WANT_ANT_TASKS="ant-nodeps"
+
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="Java Remote Desktop (jrdesktop) software for viewing and/or controlling a distance PC"
+HOMEPAGE="http://jrdesktop.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}-source-${PV}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+S="${WORKDIR}/${PN}"
+
+DEPEND=">=virtual/jdk-1.6"
+RDEPEND=">=virtual/jre-1.6"
+
+EANT_EXTRA_ARGS="-Djnlp.enabled=false"
+
+src_install() {
+ java-pkg_dojar "dist/${PN}.jar"
+
+ use source && java-pkg_dosrc src/*
+ use doc && java-pkg_dojavadoc dist/javadoc
+
+ java-pkg_dolauncher
+}
diff --git a/net-misc/jrdesktop/metadata.xml b/net-misc/jrdesktop/metadata.xml
new file mode 100644
index 000000000000..5db1b0e61f49
--- /dev/null
+++ b/net-misc/jrdesktop/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>
+ <longdescription lang="en">
+ Java Remote Desktop (jrdesktop) is an open source software for viewing and/or controlling a distance PC.
+
+Besides then screenshots, keyboard and mouse events transfer, jrdesktop includes many additional features (like: file transfer, data compression, color conversion, ...).
+
+jrdesktop uses RMI (Remote Method Invocation) with SSL/TLS to establish a secured connection between the viewer and the server.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">jrdesktop</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/jumpgate/Manifest b/net-misc/jumpgate/Manifest
new file mode 100644
index 000000000000..a3e679b7be9e
--- /dev/null
+++ b/net-misc/jumpgate/Manifest
@@ -0,0 +1 @@
+DIST jumpgate-0.7.tar.gz 40789 SHA256 5b380f5607f747f682fb9275cc0c8278e64673d4e1c425241164c88596401c22 SHA512 63f236c8328b6c7824b4d533fa2750bc011130ea70787d5960928f74410be72d484a3261c18109d6f0c9d77864aa857ca7d0dddeefb0b56b78cd0300f1fdbb19 WHIRLPOOL 90fc535a5810534a226e14e041fec17926e66c86f8275d3abe1a46af18e564a5aa74cc4bd327fc0be38e04d87187639c74e72d1cdd87cb66f68eed28895aab25
diff --git a/net-misc/jumpgate/jumpgate-0.7.ebuild b/net-misc/jumpgate/jumpgate-0.7.ebuild
new file mode 100644
index 000000000000..e64c117795a9
--- /dev/null
+++ b/net-misc/jumpgate/jumpgate-0.7.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools eutils toolchain-funcs
+
+DESCRIPTION="An advanced TCP connection forwarder"
+HOMEPAGE="http://jumpgate.sourceforge.net/"
+SRC_URI="http://jumpgate.sourceforge.net/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="x86 amd64"
+IUSE=""
+
+src_prepare() {
+ if [ "$(gcc-major-version)" == "4" ] ; then
+ sed -i -e '/^AC_CHECK_TYPE/d' configure.in || die
+ eautoreconf
+ fi
+}
+
+src_install() {
+ emake install install_prefix="${D}"
+ dodoc README ChangeLog
+}
diff --git a/net-misc/jumpgate/metadata.xml b/net-misc/jumpgate/metadata.xml
new file mode 100644
index 000000000000..f031b496edeb
--- /dev/null
+++ b/net-misc/jumpgate/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>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
+
diff --git a/net-misc/jwhois/Manifest b/net-misc/jwhois/Manifest
new file mode 100644
index 000000000000..6752d3db2a2c
--- /dev/null
+++ b/net-misc/jwhois/Manifest
@@ -0,0 +1,2 @@
+DIST jwhois-3.2.3.tar.gz 430792 SHA256 ada17cb751ec09f91d4f22938bf9a83e7cc548f2cfce09fcc00101c142583f24
+DIST jwhois-4.0.tar.gz 493007 SHA256 fa9bb86782b915c6d730bb723f876dc9b345a617db375aaf3416ec22553cd64e SHA512 5d625c3f1031a8eb8ef766ef5d47a8c1a4396d1ad3344fc9449f80dd71ad84aadf21ba67f5c2f99348f732a4df998eefe699fcec4efcadf87f579b70302a44ae WHIRLPOOL 9584e765df94bddaf4ac705e0b487e8ee5533374a633cb3ead2178189bfe16b7c7ee572b58e5f724097342599851afbdf3a3c96a687c6427e6f16d46fa96ab4a
diff --git a/net-misc/jwhois/files/jwhois-3.2.3-whois-de.patch b/net-misc/jwhois/files/jwhois-3.2.3-whois-de.patch
new file mode 100644
index 000000000000..9bd56b5b2eda
--- /dev/null
+++ b/net-misc/jwhois/files/jwhois-3.2.3-whois-de.patch
@@ -0,0 +1,18 @@
+fix from upstream cvs
+
+http://bugs.gentoo.org/159776
+
+--- jwhois-3.2.3/example/jwhois.conf
++++ jwhois-3.2.3/example/jwhois.conf
+@@ -180,7 +180,10 @@
+ "\\.cx$" = "whois.nic.cx";
+ "\\.cy$" = "whois.ripe.net";
+ "\\.cz$" = "whois.nic.cz";
+- "\\.de$" = "www.denic.de";
++ "\\.de$" {
++ whois-server = "whois.denic.de";
++ query-format = "-C UTF-8 -T dn,ace $*";
++ }
+ "\\.dk$" = "whois.dk-hostmaster.dk";
+ "\\.do$" = "whois.nic.do";
+ "\\.dz$" = "whois.ripe.net";
diff --git a/net-misc/jwhois/files/jwhois-4.0-connect-logic.patch b/net-misc/jwhois/files/jwhois-4.0-connect-logic.patch
new file mode 100644
index 000000000000..e0b10f6b50b9
--- /dev/null
+++ b/net-misc/jwhois/files/jwhois-4.0-connect-logic.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/208875
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542148
+https://savannah.gnu.org/bugs/index.php?37135
+
+--- a/src/utils.c
++++ b/src/utils.c
+@@ -288,7 +288,7 @@ make_connect(const char *host, int port)
+
+ retlen = sizeof(retval);
+ error = getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &retval, &retlen);
+- if (error < 0 || retval)
++ if (error == 0 && !retval)
+ {
+ break;
+ }
diff --git a/net-misc/jwhois/jwhois-3.2.3-r1.ebuild b/net-misc/jwhois/jwhois-3.2.3-r1.ebuild
new file mode 100644
index 000000000000..3fae7563ed3e
--- /dev/null
+++ b/net-misc/jwhois/jwhois-3.2.3-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="Advanced Internet Whois client capable of recursive queries"
+HOMEPAGE="http://www.gnu.org/software/jwhois/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="nls"
+
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-whois-de.patch #159776
+}
+
+src_compile() {
+ econf \
+ --localstatedir=/var/cache \
+ --without-cache \
+ $(use_enable nls) \
+ || die "econf failed"
+ emake || die
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README TODO
+}
diff --git a/net-misc/jwhois/jwhois-4.0-r1.ebuild b/net-misc/jwhois/jwhois-4.0-r1.ebuild
new file mode 100644
index 000000000000..18550fa11eff
--- /dev/null
+++ b/net-misc/jwhois/jwhois-4.0-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils
+
+DESCRIPTION="Advanced Internet Whois client capable of recursive queries"
+HOMEPAGE="http://www.gnu.org/software/jwhois/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="idn nls"
+
+RDEPEND="idn? ( net-dns/libidn )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-connect-logic.patch #208875
+}
+
+src_configure() {
+ econf \
+ --localstatedir="${EPREFIX}/var/cache" \
+ --without-cache \
+ $(use_enable nls) \
+ $(use_with idn libidn)
+}
diff --git a/net-misc/jwhois/jwhois-4.0.ebuild b/net-misc/jwhois/jwhois-4.0.ebuild
new file mode 100644
index 000000000000..e13c9f38d4e6
--- /dev/null
+++ b/net-misc/jwhois/jwhois-4.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Advanced Internet Whois client capable of recursive queries"
+HOMEPAGE="http://www.gnu.org/software/jwhois/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ~ppc ppc64 s390 sh sparc x86"
+IUSE="idn nls"
+
+DEPEND="idn? ( net-dns/libidn )"
+
+src_compile() {
+ econf \
+ --localstatedir=/var/cache \
+ --without-cache \
+ $(use_enable nls) \
+ $(use_with idn libidn) \
+ || die "econf failed"
+ emake || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README TODO
+}
diff --git a/net-misc/jwhois/metadata.xml b/net-misc/jwhois/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/net-misc/jwhois/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>base-system</herd>
+</pkgmetadata>
diff --git a/net-misc/keychain/Manifest b/net-misc/keychain/Manifest
new file mode 100644
index 000000000000..f70bb94cdf4c
--- /dev/null
+++ b/net-misc/keychain/Manifest
@@ -0,0 +1,3 @@
+DIST keychain-2.7.1.tar.bz2 51379 SHA256 1107fe3f78f6429d4861d64c5666f068f159326d22ab80a8ed0948cb25375191 SHA512 03cbf86d39964266c0ad53cec6ac48ecb478b49b3b9a1de7c29ec13179af8dc0f4679a5ed6e52ed1fbe087d4d3a5d31174f7f793aa23c3c04fce8a3f51d13168 WHIRLPOOL 3b2051f695e888419596b352e8bad6e986d2088d651f260d63abf3ff7da2e116aee6fb8c1d6036780e6dca9be951b2c4ac122f715ed4c1b1f93547971cdece2f
+DIST keychain-2.8.0.tar.gz 43855 SHA256 f6cc957b7a2942fb3975383f4bb97311956db586502fe4deb39b0a8cf0652ced SHA512 229c8fd417ba7d41f8c0310ab6a60e11978852046c36431bbd9a6587d50f1daec9550a02e6bcd82ddfde6bfeb929d10985f5041e30ec2e18b6f0138d526c24c9 WHIRLPOOL 699457c878eaf197e43f979c17ebcb415618fdf207a40fd3152156261ddbc881c3c340d8e8ff233540aea72c436e156ced4bef9c7fe47af3ad7018f20fd43919
+DIST keychain-2.8.1.tar.gz 43866 SHA256 2ef5a85479783b80a52308dcd25c8f9c365e67699828ead95d4418bed399be95 SHA512 d04868f66e3dd3f75a550a261b3ee0dcc1e2f1dfa058f673305bc60c20eda867099d6ae53f4e92be521a66c630ca3e585bc1a19f58eaadad1441ad5ebe27f926 WHIRLPOOL 64d39f06eb9fd5ca36b4e2981c462509537c5561d4c0de88e0c6d8192703def2c73765fe7f102439265656bb6e586bd3ecfe59b8f1f4225f09f3d4ebe3cce91a
diff --git a/net-misc/keychain/files/keychain-2.7.1-openssh-6.8.patch b/net-misc/keychain/files/keychain-2.7.1-openssh-6.8.patch
new file mode 100644
index 000000000000..6b652a02927e
--- /dev/null
+++ b/net-misc/keychain/files/keychain-2.7.1-openssh-6.8.patch
@@ -0,0 +1,47 @@
+Backported from d76c2e9aa1c05ceac1c2d06a29783ee95e876a37 upstream commit
+
+OpenSSH 6.8, which was just released, includes the following change:
+
+http://www.openssh.com/txt/release-6.8
+
+Fingerprints now have the hash algorithm prepended. An example of
+the new format: SHA256:mVPwvezndPv/ARoIadVY98vAC0g+P/5633yTC4d/wXE
+Please note that visual host keys will also be different.
+
+(Previous versions always dumped in MD5 with no prefix.)
+
+The pattern match that keychain uses doesn't work with the new
+fingerprint format. The patch below takes care of it.
+
+I used shopt extglob so I could use @( ) for the alternative. I'm not
+a bash pattern whiz; there may be a better way to do that.
+
+Upstream commit by Daniel Robbins
+Link: https://github.com/funtoo/keychain/commit/d76c2e9aa1c05ceac1c2d06a29783ee95e876a37
+Signed-off-by: Markos Chandras <hwoarang@gentoo.org>
+
+Index: keychain-2.7.1/keychain
+===================================================================
+--- keychain-2.7.1.orig/keychain
++++ keychain-2.7.1/keychain
+@@ -50,6 +50,8 @@ confirmopt=false
+ unset ssh_confirm
+ unset GREP_OPTIONS
+
++shopt -s extglob
++
+ BLUE=""
+ CYAN=""
+ CYANN=""
+@@ -671,6 +673,11 @@ extract_fingerprints() {
+ # 1024 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 /home/barney/.ssh/id_dsa (DSA)
+ echo "$ef_line" | cut -f2 -d' '
+ ;;
++ *\ @(SHA256|MD5):[0-9a-zA-Z\+\/=]*)
++ # The new OpenSSH 6.8+ format,
++ # 1024 SHA256:mVPwvezndPv/ARoIadVY98vAC0g+P/5633yTC4d/wXE /home/barney/.ssh/id_dsa (DSA)
++ echo "$ef_line" | cut -f2 -d' '
++ ;;
+ *)
+ # Fall back to filename. Note that commercial ssh is handled
+ # explicitly in ssh_l and ssh_f, so hopefully this rule will
diff --git a/net-misc/keychain/files/keychain-2.8.0-posix-sh.patch b/net-misc/keychain/files/keychain-2.8.0-posix-sh.patch
new file mode 100644
index 000000000000..70b093b923cc
--- /dev/null
+++ b/net-misc/keychain/files/keychain-2.8.0-posix-sh.patch
@@ -0,0 +1,35 @@
+From 6052ce29af20d237f6fe6f044e9f4110e053c763 Mon Sep 17 00:00:00 2001
+From: vaeth <martin@mvath.de>
+Date: Sat, 21 Mar 2015 20:14:13 +0100
+Subject: [PATCH] Re-introduce POSIX compatibility
+
+By making the openssh 6.8 format match slightly more verbose, one can make it POSIX compatible again and remove the bashism "shopt". This way, the script works (again) if /bin/sh is a symlink to dash.
+---
+ keychain.sh | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/keychain.sh b/keychain.sh
+index 6dae912..1ab79ba 100755
+--- a/keychain.sh
++++ b/keychain.sh
+@@ -56,8 +56,6 @@ unset ssh_confirm
+ unset GREP_OPTIONS
+ realpath_bin="`command -v realpath`"
+
+-shopt -s extglob
+-
+ BLUE=""
+ CYAN=""
+ CYANN=""
+@@ -683,7 +681,7 @@ extract_fingerprints() {
+ # 1024 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 /home/barney/.ssh/id_dsa (DSA)
+ echo "$ef_line" | cut -f2 -d' '
+ ;;
+- *\ @(SHA256|MD5):[0-9a-zA-Z\+\/=]*)
++ *\ SHA256:[0-9a-zA-Z\+\/=]*|*\ MD5:[0-9a-zA-Z\+\/=]*)
+ # The new OpenSSH 6.8+ format,
+ # 1024 SHA256:mVPwvezndPv/ARoIadVY98vAC0g+P/5633yTC4d/wXE /home/barney/.ssh/id_dsa (DSA)
+ echo "$ef_line" | cut -f2 -d' '
+--
+2.3.5
+
diff --git a/net-misc/keychain/keychain-2.7.1-r1.ebuild b/net-misc/keychain/keychain-2.7.1-r1.ebuild
new file mode 100644
index 000000000000..9a381e47ece9
--- /dev/null
+++ b/net-misc/keychain/keychain-2.7.1-r1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="manage ssh and GPG keys in a convenient and secure manner. Frontend for ssh-agent/ssh-add"
+HOMEPAGE="http://www.funtoo.org/wiki/Keychain"
+SRC_URI="http://www.funtoo.org/archive/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+DEPEND=""
+RDEPEND="app-shells/bash
+ virtual/ssh"
+
+src_compile() { :; }
+
+src_install() {
+ dobin ${PN}
+ doman ${PN}.1
+ dodoc ChangeLog README.rst
+}
diff --git a/net-misc/keychain/keychain-2.7.1-r2.ebuild b/net-misc/keychain/keychain-2.7.1-r2.ebuild
new file mode 100644
index 000000000000..cee0b6475168
--- /dev/null
+++ b/net-misc/keychain/keychain-2.7.1-r2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="manage ssh and GPG keys in a convenient and secure manner. Frontend for ssh-agent/ssh-add"
+HOMEPAGE="http://www.funtoo.org/wiki/Keychain"
+SRC_URI="http://www.funtoo.org/archive/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+DEPEND=""
+RDEPEND="app-shells/bash
+ virtual/ssh"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-openssh-6.8.patch
+}
+
+src_compile() { :; }
+
+src_install() {
+ dobin ${PN}
+ doman ${PN}.1
+ dodoc ChangeLog README.rst
+}
diff --git a/net-misc/keychain/keychain-2.8.0.ebuild b/net-misc/keychain/keychain-2.8.0.ebuild
new file mode 100644
index 000000000000..e7850196ee87
--- /dev/null
+++ b/net-misc/keychain/keychain-2.8.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="manage ssh and GPG keys in a convenient and secure manner"
+HOMEPAGE="http://www.funtoo.org/Keychain"
+SRC_URI="https://github.com/funtoo/keychain/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+DEPEND="dev-lang/perl"
+RDEPEND=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-posix-sh.patch
+}
+
+src_install() {
+ dobin ${PN}
+ doman ${PN}.1
+ dodoc ChangeLog README.md
+}
diff --git a/net-misc/keychain/keychain-2.8.1.ebuild b/net-misc/keychain/keychain-2.8.1.ebuild
new file mode 100644
index 000000000000..2349e533ecb2
--- /dev/null
+++ b/net-misc/keychain/keychain-2.8.1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="manage ssh and GPG keys in a convenient and secure manner"
+HOMEPAGE="http://www.funtoo.org/Keychain"
+SRC_URI="https://github.com/funtoo/keychain/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh ~sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+DEPEND="dev-lang/perl"
+RDEPEND=""
+
+src_install() {
+ dobin ${PN}
+ doman ${PN}.1
+ dodoc ChangeLog README.md
+}
diff --git a/net-misc/keychain/metadata.xml b/net-misc/keychain/metadata.xml
new file mode 100644
index 000000000000..373a5008f7c7
--- /dev/null
+++ b/net-misc/keychain/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>base-system</herd>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>drobbins@funtoo.org</email>
+ <name>Daniel Robbins</name>
+ <description>Upstream contact, please CC on bugs</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">funtoo/keychain</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/knemo/Manifest b/net-misc/knemo/Manifest
new file mode 100644
index 000000000000..31b013cb0fcb
--- /dev/null
+++ b/net-misc/knemo/Manifest
@@ -0,0 +1 @@
+DIST 12956-knemo-0.7.6.tar.bz2 667835 SHA256 0f7a92ec48842261507eb216f2ec38a604ce693405d505702836fa5a04dc218a SHA512 a200e01d75fd518bb5b3230d458919dd5e1aed2cb5dddccc8e7e38c44776bca375472a15e50ee1499c5df7b0b8fa30514755df7f8971952313a66679a0bab194 WHIRLPOOL beb09f5bc02ae778458e0c640a44fe47581c280e652d91138fa983d43837a2c357211302eaba4356356631ca264ea131bf4af71846d8c463a0ebb1f512bf60f4
diff --git a/net-misc/knemo/knemo-0.7.6-r1.ebuild b/net-misc/knemo/knemo-0.7.6-r1.ebuild
new file mode 100644
index 000000000000..9b8e8d3a1638
--- /dev/null
+++ b/net-misc/knemo/knemo-0.7.6-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="ar bg br bs cs cy da de el en_GB eo es et fi fr ga gl hr hu is it
+ja ka km lt ms nb nds nl pl pt pt_BR ro ru rw sk sl sr sv tr ug uk zh_CN zh_TW"
+inherit kde4-base
+
+DESCRIPTION="The KDE Network Monitor"
+HOMEPAGE="http://kde-apps.org/content/show.php?content=12956"
+SRC_URI="http://www.kde-apps.org/CONTENT/content-files/12956-${P}.tar.bz2"
+
+SLOT="4"
+KEYWORDS="amd64 x86"
+LICENSE="GPL-2"
+IUSE="debug wifi"
+
+DEPEND="
+ $(add_kdebase_dep ksysguard)
+ $(add_kdebase_dep systemsettings)
+ dev-libs/libnl:3
+ sys-apps/net-tools
+ dev-qt/qtsql:4[sqlite]
+ wifi? ( net-wireless/wireless-tools )
+"
+RDEPEND="${DEPEND}"
+
+DOCS=( AUTHORS ChangeLog README )
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use_no wifi WIRELESS_SUPPORT)
+ )
+
+ kde4-base_src_configure
+}
diff --git a/net-misc/knemo/metadata.xml b/net-misc/knemo/metadata.xml
new file mode 100644
index 000000000000..8d1e86a9cefb
--- /dev/null
+++ b/net-misc/knemo/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-misc/knock/Manifest b/net-misc/knock/Manifest
new file mode 100644
index 000000000000..fb7ed0b1acc1
--- /dev/null
+++ b/net-misc/knock/Manifest
@@ -0,0 +1,2 @@
+DIST knock-0.6.tar.gz 125772 SHA256 75a4e8ef8c59efa2cc910375191162adf0deeca20b7ab80d9eb0072f696ca541 SHA512 79179fe0358abfeb001b787522154b5045f9dd679e8b6bea0f375a064e56ed5166c20dee094b42d56338afdf19041c94f4c86b8d5d385d1cc02ca525c1b73714 WHIRLPOOL 556c27ac8dfaf58fa866b3644bbb4557dbbaf3f42896024825eccaf25896fa436685a1f1afce2ffe617c7948e368e189c1b00ddf83e19761886fde0c9c33ac02
+DIST knock-0.7.tar.gz 110791 SHA256 9938479c321066424f74c61f6bee46dfd355a828263dc89561a1ece3f56578a4 SHA512 eab5d855f7111d9411e84a56a15e8ea74f41c5bd9dee27ab49f0d8d509eeeb96a60c508928c92916dc0ec9b737c447ca8ca5ed4db6479b389549d60e76a85aa7 WHIRLPOOL 6d25c5d68edf5f1da9eeb8814f965fd0cdbb5c9cadd08895566200d61373481e8f9100818809c6048909112e37c7c95dc0fa558dd9f01e95cb22207583d2d64f
diff --git a/net-misc/knock/files/knockd.confd.2 b/net-misc/knock/files/knockd.confd.2
new file mode 100644
index 000000000000..cd72be91ddde
--- /dev/null
+++ b/net-misc/knock/files/knockd.confd.2
@@ -0,0 +1,9 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# interface to listen to
+IFACE="eth0"
+
+# extra options for knockd daemon
+OPTS=""
diff --git a/net-misc/knock/files/knockd.initd.2 b/net-misc/knock/files/knockd.initd.2
new file mode 100644
index 000000000000..2a52490cee3b
--- /dev/null
+++ b/net-misc/knock/files/knockd.initd.2
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+: ${CONFIGFILE:=/etc/knockd.conf}
+: ${IFACE:=eth0}
+
+get_config() {
+ [ -f ${CONFIGFILE} ] && conf=$(awk 'tolower($1) == "'$1'" { print $3 }' ${CONFIGFILE})
+
+ echo ${conf:-$2}
+}
+
+depend() {
+ need net
+ use net.${IFACE}
+
+ [ "$(get_config usesyslog no)" != "no" ] && use logger
+}
+
+pidfile=$(get_config pidfile /var/run/knockd.pid)
+
+command=/usr/sbin/knockd
+command_args="-d -i ${IFACE} ${OPTS}"
diff --git a/net-misc/knock/knock-0.6.ebuild b/net-misc/knock/knock-0.6.ebuild
new file mode 100644
index 000000000000..8ddab2d763e7
--- /dev/null
+++ b/net-misc/knock/knock-0.6.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A simple port-knocking daemon"
+HOMEPAGE="http://www.zeroflux.org/projects/knock"
+SRC_URI="http://www.zeroflux.org/proj/knock/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86"
+IUSE="+server"
+
+DEPEND="server? ( net-libs/libpcap )"
+RDEPEND="${DEPEND}
+ server? ( sys-apps/openrc )"
+
+src_prepare() {
+ sed -e "/^AM_CFLAGS/s: -g : :" \
+ -e "/dist_doc_DATA/s:COPYING::" \
+ -i Makefile.in || die
+ sed -e "s:/usr/sbin/iptables:/sbin/iptables:g" \
+ -i knockd.conf || die
+}
+
+src_configure() {
+ econf $(use_enable server knockd)
+}
+
+src_install() {
+ emake DESTDIR="${D}" docdir="${EROOT}/usr/share/doc/${PF}" install
+
+ if use server ; then
+ newinitd "${FILESDIR}"/knockd.initd.2 knock
+ newconfd "${FILESDIR}"/knockd.confd.2 knock
+ fi
+}
+
+pkg_postinst() {
+ if use server && ! has_version net-firewall/iptables ; then
+ einfo
+ elog "You're really encouraged to install net-firewall/iptables to"
+ elog "actually modify your firewall and use the example configuration."
+ einfo
+ fi
+}
diff --git a/net-misc/knock/knock-0.7.ebuild b/net-misc/knock/knock-0.7.ebuild
new file mode 100644
index 000000000000..dee0bba231a7
--- /dev/null
+++ b/net-misc/knock/knock-0.7.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A simple port-knocking daemon"
+HOMEPAGE="http://www.zeroflux.org/projects/knock"
+SRC_URI="http://www.zeroflux.org/proj/knock/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86"
+IUSE="+server"
+
+DEPEND="server? ( net-libs/libpcap )"
+RDEPEND="${DEPEND}
+ server? ( sys-apps/openrc )"
+
+src_prepare() {
+ sed -e "/^AM_CFLAGS/s: -g : :" \
+ -e "/dist_doc_DATA/s:COPYING::" \
+ -i Makefile.in || die
+ sed -e "s:/usr/sbin/iptables:/sbin/iptables:g" \
+ -i knockd.conf || die
+}
+
+src_configure() {
+ econf $(use_enable server knockd)
+}
+
+src_install() {
+ emake DESTDIR="${D}" docdir="${EROOT}/usr/share/doc/${PF}" install
+
+ if use server ; then
+ newinitd "${FILESDIR}"/knockd.initd.2 knock
+ newconfd "${FILESDIR}"/knockd.confd.2 knock
+ fi
+}
+
+pkg_postinst() {
+ if use server && ! has_version net-firewall/iptables ; then
+ einfo
+ elog "You're really encouraged to install net-firewall/iptables to"
+ elog "actually modify your firewall and use the example configuration."
+ einfo
+ fi
+}
diff --git a/net-misc/knock/metadata.xml b/net-misc/knock/metadata.xml
new file mode 100644
index 000000000000..584231482dd8
--- /dev/null
+++ b/net-misc/knock/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>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <use>
+ <flag name='server'>Installs the knockd server daemon.</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/knutclient/Manifest b/net-misc/knutclient/Manifest
new file mode 100644
index 000000000000..af9f994ebcb4
--- /dev/null
+++ b/net-misc/knutclient/Manifest
@@ -0,0 +1 @@
+DIST knutclient-1.0.5.tar.gz 1413989 SHA256 470ab12d5a8edf67f17ed1a52a12bd1977c22c68d5b0348ba812a24dc960b126 SHA512 24e8495f1c3d31e76885bbda3f3c4459e7426271c8bc1410d3e0cb37b829ed660cd87db7c57a54d522e1788297f6d23ab617a44e8dcf7f3f48b5077a58bfc2d6 WHIRLPOOL 552d133ff96182688a5bc8be7406715470c874a40256b1b423c2d04e4ed282408507ad5d95e1ec35dc54f757291e641c6509302340e36c35648040c22047340d
diff --git a/net-misc/knutclient/files/knutclient-1.0.5-desktop.patch b/net-misc/knutclient/files/knutclient-1.0.5-desktop.patch
new file mode 100644
index 000000000000..ea81f9aef5d5
--- /dev/null
+++ b/net-misc/knutclient/files/knutclient-1.0.5-desktop.patch
@@ -0,0 +1,15 @@
+Removes deprecated and useless items.
+
+--- knutclient.desktop
++++ knutclient.desktop
+@@ -6,9 +6,8 @@
+ Comment[de]=
+ Comment[cs]=Klient pro UPS syst� NUT
+ Comment[es]=Cliente KDE para NUT
+-Exec=knutclient -caption "%c" %i %m
++Exec=knutclient
+ Icon=knutclient
+-MiniIcon=knutclient
+ Type=Application
+ X-DocPath=knutclient/index.html
+ GenericName=KNutClient
diff --git a/net-misc/knutclient/knutclient-1.0.5.ebuild b/net-misc/knutclient/knutclient-1.0.5.ebuild
new file mode 100644
index 000000000000..46f23d145d9e
--- /dev/null
+++ b/net-misc/knutclient/knutclient-1.0.5.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+KDE_LINGUAS="cs de es fr it pl pt_BR ru uk"
+KDE_HANDBOOK="optional"
+MY_P="knc${PV//./}"
+
+inherit kde4-base
+
+DESCRIPTION="A visual KDE client for UPS systems"
+HOMEPAGE="http://sites.google.com/a/prynych.cz/knutclient/"
+SRC_URI="ftp://ftp.buzuluk.cz/pub/alo/knutclient/stable/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="4"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+PATCHES=( "${FILESDIR}/${P}-desktop.patch" )
+DOCS=( ChangeLog )
+
+S=${WORKDIR}/${MY_P}
diff --git a/net-misc/knutclient/metadata.xml b/net-misc/knutclient/metadata.xml
new file mode 100644
index 000000000000..8d1e86a9cefb
--- /dev/null
+++ b/net-misc/knutclient/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-misc/ksshaskpass/Manifest b/net-misc/ksshaskpass/Manifest
new file mode 100644
index 000000000000..e65c3cc20e59
--- /dev/null
+++ b/net-misc/ksshaskpass/Manifest
@@ -0,0 +1 @@
+DIST 50971-ksshaskpass-0.5.3.tar.gz 11010 SHA256 a3a47eba74a52ec3d9d8740ed9a29a5aa852d4e268b5d81154f85b90258a2124 SHA512 0274b58fb9dbb634688e5ee8b22a88012483907769796733c79f8e3c115463702a9cdd787d49d0b94a7942f5f88ed3465a6161d6e4516711b2bba5c47a91fa50 WHIRLPOOL d3e68640d3e0049bdd071fe72bf0bd9767bf349c94b2fbb42e7fafe6259d895ec2d5122ae9477e66073c53cbbda704ec0237328dd948b21207b2db2b39946450
diff --git a/net-misc/ksshaskpass/ksshaskpass-0.5.3-r1.ebuild b/net-misc/ksshaskpass/ksshaskpass-0.5.3-r1.ebuild
new file mode 100644
index 000000000000..be26dd48d37e
--- /dev/null
+++ b/net-misc/ksshaskpass/ksshaskpass-0.5.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=5
+
+inherit kde4-base
+
+DESCRIPTION="KDE implementation of ssh-askpass with Kwallet integration"
+HOMEPAGE="http://www.kde-apps.org/content/show.php?content=50971&forumpage=0"
+SRC_URI="http://www.kde-apps.org/CONTENT/content-files/50971-${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86"
+SLOT="4"
+IUSE="debug"
+
+RDEPEND="net-misc/openssh"
+
+CFG="ksshaskpass.sh"
+
+src_prepare() {
+ STARTUPDIR=/etc/kde/startup
+ SHUTDOWNDIR=/etc/kde/shutdown
+
+ kde4-base_src_prepare
+}
+
+src_install() {
+ kde4-base_src_install
+
+ cat <<-EOF > "${T}/${CFG}"
+export SSH_ASKPASS="${PREFIX}/bin/ksshaskpass"
+EOF
+ insinto "${STARTUPDIR}"
+ doins "${T}/${CFG}"
+}
+
+pkg_postinst() {
+ kde4-base_pkg_postinst
+
+ elog
+ elog "In order to have ksshagent start at kde startup,"
+ elog "edit ${STARTUPDIR}/agent-startup.sh and uncomment"
+ elog "the lines enabling ssh-agent."
+ elog
+ elog "If you do so, do not forget to uncomment the respective"
+ elog "lines in ${SHUTDOWNDIR}/agent-shutdown.sh to"
+ elog "properly kill the agent when the session ends."
+ elog
+ elog "${P} has been installed as your default askpass application in KDE4 session."
+ elog "If it's not desired, point the one you want to use in ${STARTUPDIR}/${CFG}"
+ elog
+}
diff --git a/net-misc/ksshaskpass/metadata.xml b/net-misc/ksshaskpass/metadata.xml
new file mode 100644
index 000000000000..8d1e86a9cefb
--- /dev/null
+++ b/net-misc/ksshaskpass/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-misc/kumofs/Manifest b/net-misc/kumofs/Manifest
new file mode 100644
index 000000000000..762645e62c7e
--- /dev/null
+++ b/net-misc/kumofs/Manifest
@@ -0,0 +1 @@
+DIST kumofs-0.4.13.tar.gz 534413 SHA256 18080ef4e3194b08a0370cfb66375bb8bcc0a8983ffacbe989310abe7fad68c3
diff --git a/net-misc/kumofs/files/kumo-gateway.confd b/net-misc/kumofs/files/kumo-gateway.confd
new file mode 100644
index 000000000000..8df9c177616b
--- /dev/null
+++ b/net-misc/kumofs/files/kumo-gateway.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/kumo-gateway: config file for /etc/init.d/kumo-gateway
+
+#KUMO_GATEWAY_OPTS="-m manager1 -p manager2 -t 11211"
+KUMO_GATEWAY_OPTS="-m ${HOSTNAME} -t 11211"
diff --git a/net-misc/kumofs/files/kumo-gateway.initd b/net-misc/kumofs/files/kumo-gateway.initd
new file mode 100644
index 000000000000..8978be6ce569
--- /dev/null
+++ b/net-misc/kumofs/files/kumo-gateway.initd
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+KUMO_GATEWAY_EXEC="${KUMO_GATEWAY_EXEC:-/usr/bin/kumo-gateway}"
+KUMO_GATEWAY_PID="${KUMO_GATEWAY_PID:-/var/run/kumo-gateway.pid}"
+
+depend() {
+ use net kumo-manager
+ after ntp-client ntpd rdate openrdate adjtimex hwclock
+ provide memcached
+}
+
+start() {
+ ebegin "Starting kumo-gateway"
+ start-stop-daemon --start --quiet --exec "${KUMO_GATEWAY_EXEC}" \
+ -- -d "${KUMO_GATEWAY_PID}" ${KUMO_GATEWAY_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping kumo-gateway"
+ start-stop-daemon --stop --quiet --pidfile "${KUMO_GATEWAY_PID}"
+ eend $?
+}
diff --git a/net-misc/kumofs/files/kumo-manager.confd b/net-misc/kumofs/files/kumo-manager.confd
new file mode 100644
index 000000000000..fc2b6f344300
--- /dev/null
+++ b/net-misc/kumofs/files/kumo-manager.confd
@@ -0,0 +1,6 @@
+# /etc/conf.d/kumo-manager: config file for /etc/init.d/kumo-manager
+
+#KUMO_MANAGER_HOSTNAME="${HOSTNAME}"
+
+#KUMO_MANAGER_OPTS="-p manager2"
+KUMO_MANAGER_OPTS=""
diff --git a/net-misc/kumofs/files/kumo-manager.initd b/net-misc/kumofs/files/kumo-manager.initd
new file mode 100644
index 000000000000..7f86b079fccc
--- /dev/null
+++ b/net-misc/kumofs/files/kumo-manager.initd
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+KUMO_MANAGER_HOSTNAME="${KUMO_MANAGER_HOSTNAME:-${HOSTNAME}}"
+KUMO_MANAGER_EXEC="${KUMO_MANAGER_EXEC:-/usr/bin/kumo-manager}"
+KUMO_MANAGER_PID="${KUMO_MANAGER_PID:-/var/run/kumo-manager.pid}"
+
+depend() {
+ use net
+ after ntp-client ntpd rdate openrdate adjtimex hwclock
+}
+
+start() {
+ ebegin "Starting kumo-manager"
+ start-stop-daemon --start --quiet --exec "${KUMO_MANAGER_EXEC}" \
+ -- -l "${KUMO_MANAGER_HOSTNAME}" -d "${KUMO_MANAGER_PID}" \
+ ${KUMO_MANAGER_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping kumo-manager"
+ start-stop-daemon --stop --quiet --pidfile "${KUMO_MANAGER_PID}"
+ eend $?
+}
diff --git a/net-misc/kumofs/files/kumo-server.confd b/net-misc/kumofs/files/kumo-server.confd
new file mode 100644
index 000000000000..fccaf0812317
--- /dev/null
+++ b/net-misc/kumofs/files/kumo-server.confd
@@ -0,0 +1,6 @@
+# /etc/conf.d/kumo-server: config file for /etc/init.d/kumo-server
+
+#KUMO_SERVER_HOSTNAME="${HOSTNAME}"
+
+#KUMO_SERVER_OPTS="-m manager1 -p manager2 -s /var/lib/kumofs/kumodb.tch"
+KUMO_SERVER_OPTS="-m ${HOSTNAME} -s /var/lib/kumofs/kumodb.tch"
diff --git a/net-misc/kumofs/files/kumo-server.initd b/net-misc/kumofs/files/kumo-server.initd
new file mode 100644
index 000000000000..117d0ec84d2b
--- /dev/null
+++ b/net-misc/kumofs/files/kumo-server.initd
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+KUMO_SERVER_HOSTNAME="${KUMO_SERVER_HOSTNAME:-${HOSTNAME}}"
+KUMO_SERVER_EXEC="${KUMO_SERVER_EXEC:-/usr/bin/kumo-server}"
+KUMO_SERVER_PID="${KUMO_SERVER_PID:-/var/run/kumo-server.pid}"
+
+depend() {
+ use net kumo-manager
+ after ntp-client ntpd rdate openrdate adjtimex hwclock
+}
+
+start() {
+ ebegin "Starting kumo-server"
+ start-stop-daemon --start --quiet --exec "${KUMO_SERVER_EXEC}" \
+ -- -l "${KUMO_SERVER_HOSTNAME}" -d "${KUMO_SERVER_PID}" \
+ ${KUMO_SERVER_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping kumo-server"
+ start-stop-daemon --stop --quiet --pidfile "${KUMO_SERVER_PID}"
+ eend $?
+}
diff --git a/net-misc/kumofs/kumofs-0.4.13.ebuild b/net-misc/kumofs/kumofs-0.4.13.ebuild
new file mode 100644
index 000000000000..a94c816469d0
--- /dev/null
+++ b/net-misc/kumofs/kumofs-0.4.13.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+DESCRIPTION="a scalable and highly available distributed key-value store"
+HOMEPAGE="http://github.com/etolabo/kumofs"
+SRC_URI="mirror://github/etolabo/kumofs/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=dev-db/tokyocabinet-1.4.10
+ >=dev-libs/msgpack-0.3.1
+ dev-libs/openssl
+ >=dev-ruby/msgpack-0.3.1
+ >=dev-lang/ruby-1.8.6
+ sys-libs/zlib"
+RDEPEND="${DEPEND}"
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+
+ newinitd "${FILESDIR}/kumo-gateway.initd" kumo-gateway || die
+ newconfd "${FILESDIR}/kumo-gateway.confd" kumo-gateway || die
+ newinitd "${FILESDIR}/kumo-manager.initd" kumo-manager || die
+ newconfd "${FILESDIR}/kumo-manager.confd" kumo-manager || die
+ newinitd "${FILESDIR}/kumo-server.initd" kumo-server || die
+ newconfd "${FILESDIR}/kumo-server.confd" kumo-server || die
+
+ keepdir /var/lib/kumofs || die
+
+ dodoc AUTHORS ChangeLog NEWS NOTICE README README.md doc/doc.*.md || die
+}
diff --git a/net-misc/kumofs/metadata.xml b/net-misc/kumofs/metadata.xml
new file mode 100644
index 000000000000..7221ae7341e6
--- /dev/null
+++ b/net-misc/kumofs/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">etolabo/kumofs</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/kvpnc/Manifest b/net-misc/kvpnc/Manifest
new file mode 100644
index 000000000000..ec31aecf928d
--- /dev/null
+++ b/net-misc/kvpnc/Manifest
@@ -0,0 +1,2 @@
+DIST kvpnc-0.9.6-kde4-locale.tar.bz2 2020192 SHA256 a675f9ed3d66e7fa94a0fd530fa60521d0ef739043bcfe2702be77b0299a47c7 SHA512 a2e5c7f465ec77e61f882cb2a45da7da3c868de164e8cdefe2a987d9040e1762ebd6f3e089f008dfcc7f7fad47b9847c059d615c94a995805af0ca3f1fd4d209 WHIRLPOOL 03b5a49027d024cb2645ea481735223f1551d65fed027690619f75ed38c05ecdc3b31b73e4e1d4309450088b709e35535081c614e4a9136d2da8fc954d739a15
+DIST kvpnc-0.9.6a-kde4.tar.bz2 579425 SHA256 6bf8c1f13f8d54f73f7ebb4102f912a5ebc01697ea36975977de8e57c97771f3 SHA512 e30e3fcb9729a378c84d636c7efe0e45ce7d15bcfab2f5f6cd4e37951de1db10c343e5e14dc13aafc4d540058ebc2ca0c2ad30c555fd78f0de552107d13d2467 WHIRLPOOL 8dadbf4fa0ba3790d8545a05cf9db5e462ba1d5a72c898faeee556d7e071c71e2cfaf81a07b5ff17a790399f044b87d1dc56f43799c7f58df049cf43829896cf
diff --git a/net-misc/kvpnc/files/kvpnc-0.9.6a-gcc47.patch b/net-misc/kvpnc/files/kvpnc-0.9.6a-gcc47.patch
new file mode 100644
index 000000000000..db59b5baaf86
--- /dev/null
+++ b/net-misc/kvpnc/files/kvpnc-0.9.6a-gcc47.patch
@@ -0,0 +1,11 @@
+diff -ruN kvpnc-0.9.6a-kde4.orig/src/kvpnc.cpp kvpnc-0.9.6a-kde4/src/kvpnc.cpp
+--- kvpnc-0.9.6a-kde4.orig/src/kvpnc.cpp 2012-06-25 22:16:25.395420711 +0200
++++ kvpnc-0.9.6a-kde4/src/kvpnc.cpp 2012-06-25 22:17:41.598424971 +0200
+@@ -75,6 +75,7 @@
+ #include <cstdlib>
+ #include <ctime>
+ #include <iomanip>
++#include <unistd.h>
+
+ #include "ui_mainviewbase4.h"
+ #include "ciscocertificateenrollment.h"
diff --git a/net-misc/kvpnc/files/kvpnc-0.9.6a-ifconfig.patch b/net-misc/kvpnc/files/kvpnc-0.9.6a-ifconfig.patch
new file mode 100644
index 000000000000..1413bccc97e1
--- /dev/null
+++ b/net-misc/kvpnc/files/kvpnc-0.9.6a-ifconfig.patch
@@ -0,0 +1,38 @@
+diff -ruN kvpnc-0.9.6a-kde4/src/kvpncconfig.cpp kvpnc-0.9.6a-kde4-patched/src/kvpncconfig.cpp
+--- kvpnc-0.9.6a-kde4/src/kvpncconfig.cpp 2010-03-08 05:26:33.000000000 -0500
++++ kvpnc-0.9.6a-kde4-patched/src/kvpncconfig.cpp 2013-05-23 10:36:35.536865224 -0400
+@@ -58,8 +58,8 @@
+ pathToPing = "";
+ pathToOpenvpn = "/usr/sbin/openvpn";
+ pathToIp = "/sbin/ip";
+- pathToIfconfig = "/sbin/ifconfig";
+- pathToRoute = "/sbin/route";
++ pathToIfconfig = "/bin/ifconfig";
++ pathToRoute = "/bin/route";
+ pathToNetstat = "/bin/netstat";
+ pathToL2tpd = "/usr/sbin/l2tpd";
+ pathToPkcs11Tool = "/usr/bin/pkcs11-tool";
+@@ -874,8 +874,8 @@
+ pathToOpenssl = configgroup.readEntry("Path to openssl", "/usr/bin/openssl");
+ pathToIpsec = configgroup.readEntry("Path to freeswan", "/usr/sbin/ipsec");
+ pathToIp = configgroup.readEntry("Path to iputility", "/sbin/ip");
+- pathToIfconfig = configgroup.readEntry("Path to ifconfig", "/sbin/ifconfig");
+- pathToRoute = configgroup.readEntry("Path to route", "/sbin/route");
++ pathToIfconfig = configgroup.readEntry("Path to ifconfig", "/bin/ifconfig");
++ pathToRoute = configgroup.readEntry("Path to route", "/bin/route");
+ pathToNetstat = configgroup.readEntry("Path to netstat", "/bin/netstat");
+ pathToPppd = configgroup.readEntry("Path to pppd", "/usr/sbin/pppd");
+ pathToPptp = configgroup.readEntry("Path to pptp", "/usr/sbin/pptp");
+@@ -1516,10 +1516,10 @@
+ pathToIp = "/sbin/ip";
+
+ if (pathToIfconfig.isEmpty())
+- pathToIfconfig = "/sbin/ifconfig";
++ pathToIfconfig = "/bin/ifconfig";
+
+ if (pathToRoute.isEmpty())
+- pathToRoute = "/sbin/route";
++ pathToRoute = "/bin/route";
+
+ if (pathToNetstat.isEmpty())
+ pathToNetstat = "/bin/netstat";
diff --git a/net-misc/kvpnc/files/kvpnc-0.9.6a-scriptsec.patch b/net-misc/kvpnc/files/kvpnc-0.9.6a-scriptsec.patch
new file mode 100644
index 000000000000..4e8b4d6d92b7
--- /dev/null
+++ b/net-misc/kvpnc/files/kvpnc-0.9.6a-scriptsec.patch
@@ -0,0 +1,15 @@
+diff -ruN kvpnc-0.9.6a-kde4.orig/src/kvpnc.cpp kvpnc-0.9.6a-kde4/src/kvpnc.cpp
+--- kvpnc-0.9.6a-kde4.orig/src/kvpnc.cpp 2010-03-08 11:26:33.000000000 +0100
++++ kvpnc-0.9.6a-kde4/src/kvpnc.cpp 2012-06-25 22:12:51.454408816 +0200
+@@ -6030,7 +6030,10 @@
+ }
+
+
+- if (GlobalConfig->OpenvpnNeedSecurityParameter || (OpenvpnMajor == 2 && OpenvpnMinor == 1 && OpenvpnExtraVer > 8 && OpenvpnExtra == "rc")|| ( OpenvpnMajor == 2 && OpenvpnMinor == 1 ) || (OpenvpnMajor > 2 && OpenvpnMinor >= 2)) {
++ if (GlobalConfig->OpenvpnNeedSecurityParameter ||
++ (OpenvpnMajor == 2 && OpenvpnMinor == 1 && OpenvpnExtraVer > 8 && OpenvpnExtra == "rc")||
++ (OpenvpnMajor == 2 && OpenvpnMinor >= 1 ) ||
++ (OpenvpnMajor > 2)) {
+ if (GlobalConfig->KvpncDebugLevel > 3)
+ GlobalConfig->appendLogEntry(i18n("OpenVPN >= 2.1-rc9 detected, adding script security parameter to config."), KVpncEnum::info);
+
diff --git a/net-misc/kvpnc/kvpnc-0.9.6a-r2.ebuild b/net-misc/kvpnc/kvpnc-0.9.6a-r2.ebuild
new file mode 100644
index 000000000000..8c9d74e48627
--- /dev/null
+++ b/net-misc/kvpnc/kvpnc-0.9.6a-r2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="ar br cs da de el en_GB eo es et eu fr ga gl hi hne it ja ka lt
+ms nb nds nl nn pa pl pt pt_BR ro ru sv tr uk zh_CN zh_TW"
+inherit kde4-base
+
+DESCRIPTION="KDE frontend for various VPN clients"
+HOMEPAGE="http://home.gna.org/kvpnc/"
+SRC_URI="http://download.gna.org/kvpnc/${P}-kde4.tar.bz2
+ http://download.gna.org/kvpnc/${P/a}-kde4-locale.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="4"
+KEYWORDS="amd64 x86"
+IUSE="debug"
+
+RDEPEND="
+ dev-libs/libgcrypt:0
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+"
+
+S=${WORKDIR}/${P}-kde4
+
+PATCHES=(
+ "${FILESDIR}/${P}-scriptsec.patch"
+ "${FILESDIR}/${P}-gcc47.patch"
+ "${FILESDIR}/${P}-ifconfig.patch"
+)
+
+src_prepare() {
+ mv -vf "${WORKDIR}"/${P/a}-kde4-locale/po . || die
+
+ echo "find_package ( Msgfmt REQUIRED )" >> CMakeLists.txt || die
+ echo "find_package ( Gettext REQUIRED )" >> CMakeLists.txt || die
+ echo "add_subdirectory ( po )" >> CMakeLists.txt || die
+
+ sed -i \
+ -e "s:0.9.2-svn:${PV}:" \
+ CMakeLists.txt || die
+
+ kde4-base_src_prepare
+}
+
+src_configure() {
+ mycmakeargs=( "-DWITH_libgcrypt=ON" )
+ kde4-base_src_configure
+}
diff --git a/net-misc/kvpnc/metadata.xml b/net-misc/kvpnc/metadata.xml
new file mode 100644
index 000000000000..8d36d5b01cd2
--- /dev/null
+++ b/net-misc/kvpnc/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-misc/l7-filter-userspace/Manifest b/net-misc/l7-filter-userspace/Manifest
new file mode 100644
index 000000000000..3b1f7469e06c
--- /dev/null
+++ b/net-misc/l7-filter-userspace/Manifest
@@ -0,0 +1,2 @@
+DIST l7-filter-userspace-0.11.tar.gz 129986 SHA256 008a62430f95a162fd209d4bf3d7359c588ca4b27f89c7bcaa7a10ff48591d97
+DIST l7-filter-userspace-0.12-beta1.tar.gz 130254 SHA256 1f4503c219334fba9c696c2243a3e926e5b299916baf1512ff6969da2d399d29 SHA512 9c49b7e951ced6a44f8ee6f3a261ba14b1e3fe44a83e175f7f5a5821616ec8bc2b0a287f10b4485120e7783c9623c34aae2ee1d8997c258cdfb8230c1f87d137 WHIRLPOOL 719bd6fb3513a676fdd4de828095e847565040993676cadcc4e5dda46459edb578355a13086d5f8bb5575fe32e2df1e835029cfd0bb0e50884e75f37c409ccfc
diff --git a/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-arm-ppc-getopt-help-fix.patch b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-arm-ppc-getopt-help-fix.patch
new file mode 100644
index 000000000000..29801ceed31a
--- /dev/null
+++ b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-arm-ppc-getopt-help-fix.patch
@@ -0,0 +1,21 @@
+--- l7-filter-userspace-0.11/l7-filter.cpp.old 2010-07-12 10:43:58.485002456 +0100
++++ l7-filter-userspace-0.11/l7-filter.cpp 2010-07-12 11:14:38.825001868 +0100
+@@ -186,15 +186,11 @@
+ conffilename = "";
+ const char *opts = "f:q:vh?sb:dn:p:m:cz";
+
+- int done = 0;
+- while(!done)
++ int c;
++ while ((c = getopt (argc, argv, opts)) != -1)
+ {
+- char c;
+- switch(c = getopt(argc, argv, opts))
++ switch(c)
+ {
+- case -1:
+- done = 1;
+- break;
+ case 'f':
+ conffilename = optarg;
+ break;
diff --git a/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-datatype.patch b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-datatype.patch
new file mode 100644
index 000000000000..eb49c595844b
--- /dev/null
+++ b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-datatype.patch
@@ -0,0 +1,11 @@
+--- l7-filter-userspace-0.11/l7-queue.cpp.orig 2008-09-27 10:51:01.000000000 +0400
++++ l7-filter-userspace-0.11/l7-queue.cpp 2011-11-05 03:11:08.595773935 +0400
+@@ -196,7 +196,7 @@
+ ifi = nfq_get_outdev(tb);
+ if(ifi) l7printf(4, "outdev = %d ", ifi);
+
+- ret = nfq_get_payload(tb, &data);
++ ret = nfq_get_payload(tb, (unsigned char**)&data);
+ if(ret >= 0) l7printf(4, "payload_len = %d\n", ret);
+
+ char ip_protocol = data[9];
diff --git a/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-libnetfilter_conntrack-0.0.100.patch b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-libnetfilter_conntrack-0.0.100.patch
new file mode 100644
index 000000000000..6cc941ddd1a6
--- /dev/null
+++ b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-libnetfilter_conntrack-0.0.100.patch
@@ -0,0 +1,104 @@
+diff -Naur l7-filter-userspace-0.11-orig/l7-conntrack.cpp l7-filter-userspace-0.11-ptch/l7-conntrack.cpp
+--- l7-filter-userspace-0.11-orig/l7-conntrack.cpp 2009-02-26 21:40:28.000000000 +0000
++++ l7-filter-userspace-0.11-ptch/l7-conntrack.cpp 2009-10-19 17:40:42.000000000 +0000
+@@ -121,25 +121,10 @@
+ return (char *)buffer;
+ }
+
+-static int sprintf_conntrack_key(char *buf, struct nfct_conntrack *ct,
+- unsigned int flags)
+-{
+- int size = 0;
+-
+- size += nfct_sprintf_protocol(buf, ct);
+- size += nfct_sprintf_address(buf+size, &ct->tuple[NFCT_DIR_ORIGINAL]);
+- size += nfct_sprintf_proto(buf+size, &ct->tuple[NFCT_DIR_ORIGINAL]);
+-
+- /* Delete the last blank space */
+- buf[size-1] = '\0';
+-
+- return size;
+-}
+-
+-static string make_key(nfct_conntrack* ct, int flags)
++static string make_key(nfct_conntrack* ct, int flags, int type)
+ {
+ char key[512];
+- int keysize = sprintf_conntrack_key(key, ct, flags);
++ int keysize = nfct_snprintf(key, sizeof(key), (const nf_conntrack *)ct, type, NFCT_O_DEFAULT, flags);
+ if(keysize >= 512){
+ cerr << "Yike! Overflowed key!\n";
+ exit(1);
+@@ -148,28 +133,28 @@
+ return key;
+ }
+
+-static int l7_handle_conntrack_event(void *arg, unsigned int flags, int type,
++static int l7_handle_conntrack_event(enum nf_conntrack_msg_type type, struct nf_conntrack* arg,
+ void *data)
+ {
+ l7_conntrack * l7_conntrack_handler = (l7_conntrack *) data;
+
+ nfct_conntrack* ct = (nfct_conntrack*)arg;
++ u_int8_t protonum = *(u_int8_t *)nfct_get_attr((const nf_conntrack *)ct, ATTR_ORIG_L4PROTO);
+
+ // I don't think there is any demand for ICMP. These are enough work for now.
+- if(ct->tuple[0].protonum != IPPROTO_TCP &&
+- ct->tuple[0].protonum != IPPROTO_UDP) return 0;
++ if(protonum != IPPROTO_TCP && protonum != IPPROTO_UDP) return 0;
+
+- if(type == NFCT_MSG_DESTROY) l7printf(3, "Got event: NFCT_MSG_DESTROY\n");
+- if(type == NFCT_MSG_NEW) l7printf(3, "Got event: NFCT_MSG_NEW\n");
+- if(type == NFCT_MSG_UPDATE) l7printf(3, "Got event: NFCT_MSG_UPDATE\n");
+- if(type == NFCT_MSG_UNKNOWN) l7printf(3, "Got event: NFCT_MSG_UNKNOWN\n");
++ if(type == NFCT_T_DESTROY) l7printf(3, "Got event: NFCT_T_DESTROY\n");
++ if(type == NFCT_T_NEW) l7printf(3, "Got event: NFCT_T_NEW\n");
++ if(type == NFCT_T_UPDATE) l7printf(3, "Got event: NFCT_T_UPDATE\n");
++ if(type == NFCT_T_UNKNOWN) l7printf(3, "Got event: NFCT_T_UNKNOWN\n");
+
+ // On the first packet, create the connection buffer, etc.
+- if(type == NFCT_MSG_NEW){
+- string key = make_key(ct, flags);
++ if(type == NFCT_T_NEW){
++ string key = make_key(ct, 0, NFCT_T_NEW);
+ if (l7_conntrack_handler->get_l7_connection(key)){
+ // this happens sometimes
+- cerr << "Received NFCT_MSG_NEW but already have a connection. Packets = "
++ cerr << "Received NFCT_T_NEW but already have a connection. Packets = "
+ << l7_conntrack_handler->get_l7_connection(key)->get_num_packets()
+ << endl;
+ l7_conntrack_handler->remove_l7_connection(key);
+@@ -179,9 +164,9 @@
+ l7_conntrack_handler->add_l7_connection(thisconnection, key);
+ thisconnection->key = key;
+ }
+- else if(type == NFCT_MSG_DESTROY){
++ else if(type == NFCT_T_DESTROY){
+ // clean up the connection buffer, etc.
+- string key = make_key(ct, flags);
++ string key = make_key(ct, 0, NFCT_T_DESTROY);
+ if(l7_conntrack_handler->get_l7_connection(key)){
+ l7_conntrack_handler->remove_l7_connection(key);
+ }
+@@ -193,7 +178,7 @@
+
+ l7_conntrack::~l7_conntrack()
+ {
+- nfct_conntrack_free(ct);
++ free(ct);
+ nfct_close(cth);
+ }
+
+@@ -230,9 +215,9 @@
+ {
+ int ret;
+
+- nfct_register_callback(cth, l7_handle_conntrack_event, (void *)this);
+- ret = nfct_event_conntrack(cth); // this is the main loop
++ nfct_callback_register(cth, NFCT_T_NEW, l7_handle_conntrack_event, (void *)this);
++ ret = nfct_catch(cth); // this is the main loop
+
+ nfct_close(cth);
+- nfct_conntrack_free(ct);
++ free(ct);
+ }
diff --git a/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-map-access-threadsafe.patch b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-map-access-threadsafe.patch
new file mode 100644
index 000000000000..fea0f5bbb5a6
--- /dev/null
+++ b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-map-access-threadsafe.patch
@@ -0,0 +1,55 @@
+--- l7-filter-userspace-0.11/l7-conntrack.cpp.orig 2009-02-26 21:40:28.000000000 +0000
++++ l7-filter-userspace-0.11/l7-conntrack.cpp 2010-07-23 13:03:23.000000000 +0100
+@@ -195,11 +195,13 @@
+ {
+ nfct_conntrack_free(ct);
+ nfct_close(cth);
++ pthread_mutex_destroy(&map_mutex);
+ }
+
+ l7_conntrack::l7_conntrack(void* l7_classifier_in)
+ {
+ l7_classifier = (l7_classify *)l7_classifier_in;
++ pthread_mutex_init(&map_mutex, NULL);
+
+ // Now open a handler that is subscribed to all possible events
+ cth = nfct_open(CONNTRACK, NFCT_ALL_CT_GROUPS);
+@@ -211,19 +213,27 @@
+
+ l7_connection *l7_conntrack::get_l7_connection(const string key)
+ {
+- return l7_connections[key];
++ l7_connection *conn;
++ pthread_mutex_lock(&map_mutex);
++ conn = l7_connections[key];
++ pthread_mutex_unlock(&map_mutex);
++ return conn;
+ }
+
+ void l7_conntrack::add_l7_connection(l7_connection* connection,
+ const string key)
+ {
++ pthread_mutex_lock(&map_mutex);
+ l7_connections[key] = connection;
++ pthread_mutex_unlock(&map_mutex);
+ }
+
+ void l7_conntrack::remove_l7_connection(const string key)
+ {
++ pthread_mutex_lock(&map_mutex);
+ delete l7_connections[key];
+ l7_connections.erase(l7_connections.find(key));
++ pthread_mutex_unlock(&map_mutex);
+ }
+
+ void l7_conntrack::start()
+--- l7-filter-userspace-0.11/l7-conntrack.h.orig 2010-07-23 13:04:49.000000000 +0100
++++ l7-filter-userspace-0.11/l7-conntrack.h 2010-07-23 13:05:56.000000000 +0100
+@@ -52,6 +52,7 @@
+ l7_map l7_connections;
+ struct nfct_conntrack *ct;
+ struct nfct_handle *cth; // the callback
++ pthread_mutex_t map_mutex;
+
+ public:
+ l7_conntrack(void * foo);
diff --git a/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-pattern-loading-leak.patch b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-pattern-loading-leak.patch
new file mode 100644
index 000000000000..835fc8ffb9f1
--- /dev/null
+++ b/net-misc/l7-filter-userspace/files/l7-filter-userspace-0.11-pattern-loading-leak.patch
@@ -0,0 +1,10 @@
+diff --git a/l7-filter-userspace/trunk/l7-classify.cpp b/l7-filter-userspace/trunk/l7-classify.cpp
+index 8b5b77e..1c80d4d 100644
+--- a/l7-filter-userspace/trunk/l7-classify.cpp
++++ b/l7-filter-userspace/trunk/l7-classify.cpp
+@@ -59,6 +59,7 @@ l7_pattern::l7_pattern(string name, string pattern_string, int eflags,
+ cerr << "error compiling " << name << " -- " << pattern_string << endl;
+ exit(1);
+ }
++ free(preprocessed);
+ }
diff --git a/net-misc/l7-filter-userspace/l7-filter-userspace-0.11.ebuild b/net-misc/l7-filter-userspace/l7-filter-userspace-0.11.ebuild
new file mode 100644
index 000000000000..891c61daca15
--- /dev/null
+++ b/net-misc/l7-filter-userspace/l7-filter-userspace-0.11.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils autotools
+
+DESCRIPTION="Userspace utilities for layer 7 iptables QoS"
+HOMEPAGE="http://l7-filter.clearfoundation.com/"
+SRC_URI="mirror://sourceforge/l7-filter/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+SLOT="0"
+DEPEND=">=net-libs/libnetfilter_conntrack-0.0.100
+ net-libs/libnetfilter_queue"
+RDEPEND="net-misc/l7-protocols
+ ${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-map-access-threadsafe.patch"
+ epatch "${FILESDIR}/${P}-arm-ppc-getopt-help-fix.patch"
+ epatch "${FILESDIR}/${P}-libnetfilter_conntrack-0.0.100.patch"
+ epatch "${FILESDIR}/${P}-pattern-loading-leak.patch"
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc README TODO BUGS THANKS AUTHORS
+}
diff --git a/net-misc/l7-filter-userspace/l7-filter-userspace-0.12_beta1.ebuild b/net-misc/l7-filter-userspace/l7-filter-userspace-0.12_beta1.ebuild
new file mode 100644
index 000000000000..aca733580a09
--- /dev/null
+++ b/net-misc/l7-filter-userspace/l7-filter-userspace-0.12_beta1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils versionator
+
+MY_P=${PN}-$(replace_version_separator 2 '-')
+
+DESCRIPTION="Userspace utilities for layer 7 iptables QoS"
+HOMEPAGE="http://l7-filter.clearfoundation.com/"
+SRC_URI="http://download.clearfoundation.com/l7-filter/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+SLOT="0"
+
+DEPEND=">=net-libs/libnetfilter_conntrack-0.0.100
+ >=net-libs/libnetfilter_queue-1.0.0
+ net-libs/libnfnetlink"
+RDEPEND="${DEPEND}
+ net-misc/l7-protocols"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS=( README TODO BUGS THANKS AUTHORS )
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-0.11-libnetfilter_conntrack-0.0.100.patch" \
+ "${FILESDIR}/${PN}-0.11-datatype.patch"
+}
diff --git a/net-misc/l7-filter-userspace/metadata.xml b/net-misc/l7-filter-userspace/metadata.xml
new file mode 100644
index 000000000000..554c6cf7fcdb
--- /dev/null
+++ b/net-misc/l7-filter-userspace/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>bircoph@gentoo.org</email>
+ <name>Andrew Savchenko</name>
+ </maintainer>
+</pkgmetadata>
+
diff --git a/net-misc/l7-protocols/Manifest b/net-misc/l7-protocols/Manifest
new file mode 100644
index 000000000000..00d23ac757c9
--- /dev/null
+++ b/net-misc/l7-protocols/Manifest
@@ -0,0 +1 @@
+DIST l7-protocols-2009-05-28.tar.gz 142050 SHA256 d6bf98a69268558543bd32fccea287cb3f14b37521d18c790e2b6f8dcfaa5381 SHA512 020730d0170537213080dcefd847439a2306eea759317e4054549d12e344520e9db222ca48f74c184cb17ba5ff244270b688fb7e89ed0dd21a196e02721e4477 WHIRLPOOL d40993652acac332261fba3555cbce1196e3d35cc52e68ac1fc71b6e5623bce31caa059f021823a6e8225e1d6bcf0a2f529921bd25a15403e912e8f11cbb6245
diff --git a/net-misc/l7-protocols/l7-protocols-2009.05.28.ebuild b/net-misc/l7-protocols/l7-protocols-2009.05.28.ebuild
new file mode 100644
index 000000000000..8a199803a209
--- /dev/null
+++ b/net-misc/l7-protocols/l7-protocols-2009.05.28.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils fixheadtails toolchain-funcs
+
+IUSE=""
+
+MY_P=${PN}-${PV//./-}
+
+DESCRIPTION="Protocol definitions of l7-filter kernel modules"
+HOMEPAGE="http://l7-filter.sourceforge.net/protocols"
+
+SRC_URI="mirror://sourceforge/l7-filter/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ppc ppc64 ~s390 ~sh sparc x86"
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ sed -e "s|gcc.*\-o|$(tc-getCC) ${CFLAGS} ${LDFLAGS} -o|g" \
+ -e "s|g++.*\-o|$(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} -o|g" \
+ -i testing/Makefile
+ ht_fix_file testing/*.sh
+}
+
+src_compile() {
+ emake -C testing || die
+}
+
+# NOTE Testing mechanism is currently broken:
+# stack smashing attack in function main()
+
+# Is also extraordinarly inefficent getting random data.
+#
+#src_test() {
+# cd testing
+# find ${S} -name \*.pat -print -exec ./test_match.sh {} \; \
+# -exec ./timeit.sh {} \; || die "failed tests"
+# einfo "patterns past testing"
+#}
+
+src_install() {
+ dodir /usr/share/${PN}
+ pushd testing > /dev/null
+ cp -pPR randprintable randchars test_speed-{kernel,userspace} README \
+ match_kernel *.sh data "${D}"/usr/share/${PN}
+ popd > /dev/null
+ mv example_traffic "${D}"/usr/share/${PN}
+
+ dodoc README CHANGELOG HOWTO WANTED || die
+ for dir in extra file_types malware ; do
+ newdoc ${dir}/README README.${dir}
+ done
+ rm -rf README CHANGELOG HOWTO LICENSE Makefile WANTED */README testing
+
+ dodir /etc/l7-protocols
+ cp -R * "${D}"/etc/l7-protocols
+ chown -R root:0 "${D}"
+}
diff --git a/net-misc/l7-protocols/metadata.xml b/net-misc/l7-protocols/metadata.xml
new file mode 100644
index 000000000000..125e82bf5480
--- /dev/null
+++ b/net-misc/l7-protocols/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>bircoph@gentoo.org</email>
+ <name>Andrew Savchenko</name>
+ </maintainer>
+ <longdescription>
+ These are patterns (protocol definitions) for the Linux layer 7 packet
+ classifier (l7-filter). To use them, you need the kernel and iptables patches
+ (or l7-filter userspace version) available trough ebuild tree as
+ net-misc/l7-filter and net-firewall/iptables built with l7filter USE flag.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">l7-filter</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/lambdamoo/Manifest b/net-misc/lambdamoo/Manifest
new file mode 100644
index 000000000000..a87c0be37566
--- /dev/null
+++ b/net-misc/lambdamoo/Manifest
@@ -0,0 +1 @@
+DIST LambdaMOO-1.8.1.tar.gz 363803 SHA256 1c404855e5db85224e4fec0667bbbb9b2a3e98ac82d49e885ddb4ce8c24f3e5a
diff --git a/net-misc/lambdamoo/files/1.8.1-enable-outbound.patch b/net-misc/lambdamoo/files/1.8.1-enable-outbound.patch
new file mode 100644
index 000000000000..b96e013683b8
--- /dev/null
+++ b/net-misc/lambdamoo/files/1.8.1-enable-outbound.patch
@@ -0,0 +1,13 @@
+diff -ur MOO-1.8.1.orig/options.h MOO-1.8.1/options.h
+--- MOO-1.8.1.orig/options.h 2003-04-17 15:25:25.000000000 -0500
++++ MOO-1.8.1/options.h 2003-04-17 15:27:33.000000000 -0500
+@@ -155,7 +155,7 @@
+ * NP_SINGLE or NP_LOCAL.
+ */
+
+-/* #define OUTBOUND_NETWORK */
++#define OUTBOUND_NETWORK
+
+ /******************************************************************************
+ * The following constants define certain aspects of the server's network
+
diff --git a/net-misc/lambdamoo/files/lambdamoo.conf b/net-misc/lambdamoo/files/lambdamoo.conf
new file mode 100644
index 000000000000..3f84faefe344
--- /dev/null
+++ b/net-misc/lambdamoo/files/lambdamoo.conf
@@ -0,0 +1,6 @@
+# The full path to your database, without the extention.
+# For example:
+DB_PREFIX=/usr/share/lambdamoo/Minimal
+
+# The port LambdaMOO should listen for incoming connections on
+PORT=7777
diff --git a/net-misc/lambdamoo/files/lambdamoo.rc b/net-misc/lambdamoo/files/lambdamoo.rc
new file mode 100644
index 000000000000..142ce15dc8a9
--- /dev/null
+++ b/net-misc/lambdamoo/files/lambdamoo.rc
@@ -0,0 +1,48 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# adapted from Pavel Curtis' restart.sh
+
+depend() {
+ need net
+}
+
+check_setup() {
+ if [ ! -r ${DB_PREFIX}.db ] ; then
+ eerror "Unable to read ${DB_PREFIX}.db"
+ return 1
+ fi
+
+ if [ -r ${DB_PREFIX}.db.new ] ; then
+ mv ${DB_PREFIX}.db ${DB_PREFIX}.db.old
+ mv ${DB_PREFIX}.db.new ${DB_PREFIX}.db
+ #Pavel compressed the old db here, I have not to save start time.
+ fi
+
+ if [ -f /var/log/lambdamoo.log ] ; then
+ cat /var/log/lambdamoo.log >> /var/log/lambdamoo.log.old
+ rm /var/log/lambdamoo.log
+ fi
+
+ return 0
+}
+
+start() {
+ check_setup || return 1
+
+ ebegin "Starting LambdaMOO"
+ echo "`date`: RESTARTED" >> ${DB_PREFIX}.log
+ start-stop-daemon --start --startas /usr/sbin/moo \
+ --pidfile /var/run/LambdaMOO.pid --make-pidfile \
+ -- -l /var/log/lambdamoo.log ${DB_PREFIX}.db ${DB_PREFIX}.db.new ${PORT} &
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping LambdaMOO"
+ start-stop-daemon -o --quiet --stop --pidfile /var/run/LambdaMOO.pid
+ eend $?
+ [ -f /var/run/LambdaMOO.pid ] && rm /var/run/LambdaMOO.pid
+}
diff --git a/net-misc/lambdamoo/lambdamoo-1.8.1-r2.ebuild b/net-misc/lambdamoo/lambdamoo-1.8.1-r2.ebuild
new file mode 100644
index 000000000000..423f46ff2c74
--- /dev/null
+++ b/net-misc/lambdamoo/lambdamoo-1.8.1-r2.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 autotools
+
+DESCRIPTION="networked mud that can be used for different types of collaborative software"
+HOMEPAGE="http://sourceforge.net/projects/lambdamoo/"
+SRC_URI="mirror://sourceforge/lambdamoo/LambdaMOO-${PV}.tar.gz"
+
+LICENSE="LambdaMOO GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~sparc"
+IUSE=""
+
+DEPEND="sys-devel/bison"
+RDEPEND=""
+
+S=${WORKDIR}/MOO-${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-enable-outbound.patch
+ sed -i Makefile.in \
+ -e '/ -o /s|$(CFLAGS)|& $(LDFLAGS)|g' \
+ || die "sed Makefile.in"
+ eautoreconf
+}
+
+src_compile() {
+ emake \
+ CC=$(tc-getCC) \
+ CFLAGS="${CFLAGS} \
+ -DHAVE_MKFIFO=1" \
+ || die "emake failed!"
+}
+
+src_install() {
+ dosbin moo
+ insinto /usr/share/${PN}
+ doins Minimal.db
+ dodoc *.txt README*
+
+ newinitd "${FILESDIR}"/lambdamoo.rc ${PN}
+ newconfd "${FILESDIR}"/lambdamoo.conf ${PN}
+}
diff --git a/net-misc/lambdamoo/metadata.xml b/net-misc/lambdamoo/metadata.xml
new file mode 100644
index 000000000000..602d45342949
--- /dev/null
+++ b/net-misc/lambdamoo/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">lambdamoo</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/lanmap/Manifest b/net-misc/lanmap/Manifest
new file mode 100644
index 000000000000..df9fff0b70e9
--- /dev/null
+++ b/net-misc/lanmap/Manifest
@@ -0,0 +1 @@
+DIST lanmap-2006-03-07-rev81.zip 405933 SHA256 9a67645c5cde565e61c1a717a17a3491d027e72bfe6825d1d50262f6a6600fa3 SHA512 9216d753548fba48f4fcd18a55136a50c0dd01c87f1d5f7736319a7a71b28bd50f082a9aa94d8c426924e0fa4fb6537cd8c8cbd2a289736ede54fd4c6f4679f2 WHIRLPOOL e7d9d24dfafea9430d3a65da6d6cf7b8b12d176d6b99911f581a12074166c09099b56fcf50913e293c42ab962fc5f4bc41184184aaa41fbd453f7a3f667e86f3
diff --git a/net-misc/lanmap/files/lanmap-81-make.patch b/net-misc/lanmap/files/lanmap-81-make.patch
new file mode 100644
index 000000000000..e0c1988cc836
--- /dev/null
+++ b/net-misc/lanmap/files/lanmap-81-make.patch
@@ -0,0 +1,69 @@
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -2,8 +2,8 @@
+ # $Id$
+
+ # complation
+-CFLAGS = -W -Wall -Wno-unused -DLINUX -DLANMAP_DATADIR=$(LANMAP_DATADIR)
+-LDFLAGS = -lpcap -lm
++CFLAGS += -DLINUX -DLANMAP_DATADIR=$(LANMAP_DATADIR)
++LDFLAGS += -lpcap -lm
+ CFLAGS_DEBUG = -D_DEBUG -ggdb
+ LDFLAGS_DEBUG = -pg
+ BINARY = lanmap
+@@ -14,12 +14,12 @@
+ $(CC) $(OBJS) -o $(BINARY) $(LDFLAGS)
+
+ static:
+- make clean
+- make LDFLAGS="$(LDFLAGS) -static" all
++ $(MAKE) clean
++ $(MAKE) LDFLAGS="$(LDFLAGS) -static" all
+
+ debug:
+- make clean
+- make CFLAGS="$(CFLAGS) $(CFLAGS_DEBUG)" LDFLAGS="$(LDFLAGS)" all
++ $(MAKE) clean
++ $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_DEBUG)" LDFLAGS="$(LDFLAGS)" all
+
+ # for testing the classify code by itself
+ os_classify: os_classify.c misc.c
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -10,18 +10,18 @@
+ DATADEST = ${prefix}/share/lanmap/
+
+ all:
+- cd ./src && make LANMAP_DATADIR="$(DATADEST)"
++ cd ./src && $(MAKE) LANMAP_DATADIR="$(DATADEST)"
+
+ install:
+- install -m 0755 ./src/$(BINARY) $(BINDEST)
++ install -m 0755 -D ./src/$(BINARY) $(BINDEST)/$(BINARY)
+ install -m 0755 -d $(DATADEST)
+ install -m 0755 -d $(DATADEST)data/
+ install -m 0755 -d $(DATADEST)data/graph/
+ install -m 0755 -d $(DATADEST)graph/img/
+ install -m 0644 ./data/mac_vendor $(DATADEST)data/
+- install -m 0644 -d $(DATADEST)graph
++ install -m 0755 -d $(DATADEST)graph
+ install -m 0644 ./graph/lanmap.header $(DATADEST)graph/
+- for f in ./graph/img/*.{png,gif,svg}; do install -m 0644 $$f $(DATADEST)graph/img/; done
++ for f in ./graph/img/*.gif ./graph/img/*.png ./graph/img/*.svg; do install -m 0644 $$f $(DATADEST)graph/img/; done
+
+ uninstall:
+ rm $(BINDEST)$(BINARY)
+@@ -29,11 +29,11 @@
+
+ clean:
+ rm -f ./src/$(BINARY)
+- cd ./src && make clean
++ cd ./src && $(MAKE) clean
+
+ distclean: clean
+ rm -f Makefile config.cache config.log config.status config.h
+
+ debug:
+- cd ./src && make debug
++ cd ./src && $(MAKE) debug
+
diff --git a/net-misc/lanmap/files/lanmap-81-printf-format.patch b/net-misc/lanmap/files/lanmap-81-printf-format.patch
new file mode 100644
index 000000000000..cbe330434f20
--- /dev/null
+++ b/net-misc/lanmap/files/lanmap-81-printf-format.patch
@@ -0,0 +1,11 @@
+--- a/src/misc.c
++++ b/src/misc.c
+@@ -58,7 +58,7 @@
+ linebuf[64] = ' ';
+ linebuf[56 + j - 1 + (j - 1 > 7) + 1] = '\n';
+ linebuf[56 + j - 1 + (j - 1 > 7) + 2] = '\0';
+- printf(linebuf);
++ printf("%s", linebuf);
+ #ifdef DEBUG
+ if (strlen(linebuf) > 73) {
+ fprintf(stderr, "line too long, wtf?!\n");
diff --git a/net-misc/lanmap/lanmap-81-r1.ebuild b/net-misc/lanmap/lanmap-81-r1.ebuild
new file mode 100644
index 000000000000..0d754b63e3de
--- /dev/null
+++ b/net-misc/lanmap/lanmap-81-r1.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 toolchain-funcs
+
+DESCRIPTION="lanmap sits quietly on a network and builds a picture of what it sees"
+HOMEPAGE="http://www.parseerror.com/lanmap"
+SRC_URI="http://www.parseerror.com/${PN}/rev/${PN}-2006-03-07-rev${PV}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+
+CDEPEND="net-libs/libpcap"
+RDEPEND="
+ ${CDEPEND}
+ media-gfx/graphviz
+"
+DEPEND="
+ ${CDEPEND}
+ app-arch/unzip
+"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-make.patch
+ rm configure || die
+ eautoreconf
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake prefix="${ED}"/usr install
+ dodoc README.txt TODO.txt
+}
diff --git a/net-misc/lanmap/lanmap-81-r2.ebuild b/net-misc/lanmap/lanmap-81-r2.ebuild
new file mode 100644
index 000000000000..c85554e2d695
--- /dev/null
+++ b/net-misc/lanmap/lanmap-81-r2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils toolchain-funcs
+
+DESCRIPTION="lanmap sits quietly on a network and builds a picture of what it sees"
+HOMEPAGE="http://www.parseerror.com/lanmap"
+SRC_URI="http://www.parseerror.com/${PN}/rev/${PN}-2006-03-07-rev${PV}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+
+CDEPEND="net-libs/libpcap"
+RDEPEND="
+ ${CDEPEND}
+ media-gfx/graphviz
+"
+DEPEND="
+ ${CDEPEND}
+ app-arch/unzip
+"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-make.patch \
+ "${FILESDIR}"/${P}-printf-format.patch
+ rm configure || die
+ eautoreconf
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake prefix="${ED}"/usr install
+ dodoc README.txt TODO.txt
+}
diff --git a/net-misc/lanmap/metadata.xml b/net-misc/lanmap/metadata.xml
new file mode 100644
index 000000000000..9ca15ca788e8
--- /dev/null
+++ b/net-misc/lanmap/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
+
diff --git a/net-misc/lcr/lcr-9999.ebuild b/net-misc/lcr/lcr-9999.ebuild
new file mode 100644
index 000000000000..fd6b40bedbd9
--- /dev/null
+++ b/net-misc/lcr/lcr-9999.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit git-2 autotools
+
+DESCRIPTION="Linux Call Router"
+HOMEPAGE="http://isdn.eversberg.eu/"
+EGIT_REPO_URI="git://git.misdn.eu/lcr.git"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="asterisk +ssl +gsm-bs +gsm-ms ss5 +sip gsmhr misdn"
+
+DEPEND="
+ media-libs/opencore-amr
+ asterisk? ( net-misc/asterisk )
+ ssl? ( dev-libs/openssl )
+ gsm-bs? ( net-wireless/openbsc )
+ sip? ( net-libs/sofia-sip )
+ gsm-ms? ( net-wireless/osmocom-bb )
+"
+ #mdisn? ( net-misc/misdn )
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with asterisk) \
+ $(use_with ssl) \
+ $(use_with gsm-bs) \
+ $(use_with gsm-ms) \
+ $(use_with ss5) \
+ $(use_with sip) \
+ $(use_with misdn) \
+ $(use_enable gsmhr)
+}
+
+src_compile() {
+ emake -j1
+}
+
+pkg_postinst() {
+ use gsmhr || return
+ ewarn "You have enabled the gsmhr use flag, for the GSM half-rate"
+ ewarn "codec. This is strongly discouraged, except for testing,"
+ ewarn "because of extremely high CPU usage."
+}
diff --git a/net-misc/lcr/metadata.xml b/net-misc/lcr/metadata.xml
new file mode 100644
index 000000000000..71c2d675f77c
--- /dev/null
+++ b/net-misc/lcr/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>radio</herd>
+ <use>
+ <flag name="asterisk">net-misc/asterisk channel driver</flag>
+ <flag name="misdn">net-misc/misdn driver</flag>
+ <flag name="gsm-bs">net-wireless/openbsc driver</flag>
+ <flag name="gsm-ms">net-wireless/osmobb driver</flag>
+ <flag name="ss5">CCITT No. 5 support</flag>
+ <flag name="sip">SIP support</flag>
+ <flag name="gsmhr">Support for GSM HR codec using reference code (very slow)</flag>
+ </use>
+</pkgmetadata>
+
diff --git a/net-misc/leapcast/Manifest b/net-misc/leapcast/Manifest
new file mode 100644
index 000000000000..a8678ff8aa30
--- /dev/null
+++ b/net-misc/leapcast/Manifest
@@ -0,0 +1 @@
+DIST leapcast-0.1.3.tar.gz 13522 SHA256 0ef6535a18e43b61daae8ee9f9fa05f055f2777254491d7834e86c34a9482264 SHA512 03307f0375dbc49bbf20138e3c47a819d6832721a9fc9ae5b06c5886e8a3b8ff59efcd66a8ee5fed40e968eb014d664fd1890391fb22346d84a40bd73bd150b3 WHIRLPOOL a0e51c1d7dc01340f92c3685ccfca30e5add40a983a80475346cf0071d635935a14489590451e54389ab1125b979bd80721c104ef0da28e4877eb42de05fd061
diff --git a/net-misc/leapcast/leapcast-0.1.3-r1.ebuild b/net-misc/leapcast/leapcast-0.1.3-r1.ebuild
new file mode 100644
index 000000000000..ca9dabe1fa1b
--- /dev/null
+++ b/net-misc/leapcast/leapcast-0.1.3-r1.ebuild
@@ -0,0 +1,27 @@
+# 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
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/dz0ny/leapcast.git"
+ inherit git-2
+else
+ SRC_URI="https://github.com/dz0ny/leapcast/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Simple ChromeCast emulation app"
+HOMEPAGE="https://github.com/dz0ny/leapcast"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE=""
+
+RDEPEND="dev-python/requests[$PYTHON_USEDEP]
+ www-servers/tornado[$PYTHON_USEDEP]"
diff --git a/net-misc/leapcast/leapcast-9999.ebuild b/net-misc/leapcast/leapcast-9999.ebuild
new file mode 100644
index 000000000000..ca9dabe1fa1b
--- /dev/null
+++ b/net-misc/leapcast/leapcast-9999.ebuild
@@ -0,0 +1,27 @@
+# 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
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/dz0ny/leapcast.git"
+ inherit git-2
+else
+ SRC_URI="https://github.com/dz0ny/leapcast/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Simple ChromeCast emulation app"
+HOMEPAGE="https://github.com/dz0ny/leapcast"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE=""
+
+RDEPEND="dev-python/requests[$PYTHON_USEDEP]
+ www-servers/tornado[$PYTHON_USEDEP]"
diff --git a/net-misc/leapcast/metadata.xml b/net-misc/leapcast/metadata.xml
new file mode 100644
index 000000000000..b0e0a5887535
--- /dev/null
+++ b/net-misc/leapcast/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>bman@gentoo.org</email>
+ <name>Aaron Bauman</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">dz0ny/leapcast</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/libreswan/Manifest b/net-misc/libreswan/Manifest
new file mode 100644
index 000000000000..9e20181db59f
--- /dev/null
+++ b/net-misc/libreswan/Manifest
@@ -0,0 +1,6 @@
+DIST libreswan-3.10.tar.gz 9787915 SHA256 aa6bb559c27dfaef58a9bc3e194c6633a2423bbfcb4888591596f1678eec4c1e SHA512 fe3dbe0c8779050e5787da08541c312a79b091c2669cec102b3bb07ce1d4a53f2f7f99cbe60665cde4002c8e98597485f2039ea73640194c317d2d3fb15626d9 WHIRLPOOL 93c3542a74d4cef97b5f0b8af6e43078aed8af5aa15810b31a29285bad5f64520924470e5b3a924fcb078497ce40be51a95e40d988e01781d8543e568fc6d101
+DIST libreswan-3.12.tar.gz 9793222 SHA256 044dc63a69637e99ee4c0b86c2d9775d14b14e9e22ebd5a27caf504a956cf1be SHA512 d378d9290ba4a552b5c5eacb324651733b28094c4e4d72123bcc7ca9c6c651679bdf514b48585db16731bd18059c62cb950140066d0cbb5c3aa8c85b8b23652c WHIRLPOOL c0e7bde2dc1f5e09da3e5fda43a9c50225f793ac5b72d5b860249459c73a67387f4a2ea006a04b612a38f2d72feede2d4ab0af9e393b8aa33e313e778d71e2c9
+DIST libreswan-3.13.tar.gz 9797529 SHA256 25a6888f850a83eb17d7f041783babb316b07f88a4a327f276d760a273b86f32 SHA512 81385a566b736a97836e70fb4e7827864f6bd27387d29aaaf49c126af305fd8b82c92021186eecceb830418e27ed1d775d70b47a1d1cfe159bc9f2b9c2430e2d WHIRLPOOL 805f9b3adef86367fe9de44908705254693bc1036bac2dca2addd4fb9c661efeb84334d1b77f25612ade5e5a203b33c9cc78b5c117a8b12c3e530b1e01f5600a
+DIST libreswan-3.7.tar.gz 11135078 SHA256 7d62d11d30d3b7a4c011dfff4385e0eb778d99ccb2cdf2e8c35b37b34bd156c9 SHA512 b612d956ac4fe1dc102898e5a0a500a0a855654cd30363cae41d4ef4bcb9091c8f058a962ceab1c00348e301b17258f31b6814120c4578d6a119abede30ecff3 WHIRLPOOL 171014eef323a2d49019452f1bb429f76ca091f736e567aea906a3e811fc9c3b67794ec6c42ee6513b4087bb94c44776051b7e975224ddbae1bedfe26bf64c6f
+DIST libreswan-3.8.tar.gz 11104943 SHA256 a2e285fc9d20d2819a8fd8e3742d3aa5b1b33f0fd371584788800b7a5ebf12e4 SHA512 de2c7b92a22762bb3fb2d10c5efd60d9de2cc8289f31e61c23ee6c9e876a8f3fd327b3613de7c38b1fc4979cdf047baa5d78f7f809196c59f62d2b51b93cb246 WHIRLPOOL fe515ea5923b7f0161f056788d20991e243b67cb237b6b954c6385652148afac3df1ab5235b36f31bfbcf3bb680b718e32a80734abc047e1e9110d4030073294
+DIST libreswan-3.9.tar.gz 9720359 SHA256 3b586a8f6121c982757a09c1711a86c853be6f7bb7bf81a8a265dba31728f74b SHA512 59b2a461ed6877886e3e64603ae9adf83840c8348be96fb719a2b268a62d15495c049a8aebeb3d76156b1e6cda806fd7fe674c7006e8c1bd727996717f31e5e9 WHIRLPOOL 62f9be12b25fd9e0f36b778290674313f40b2da9be9525217285882250a184f38ce0ce48781b74ff6aa358e0525e04aeaf0ee15a8f7dcb10909d14e6268f48d4
diff --git a/net-misc/libreswan/files/ipsec.service b/net-misc/libreswan/files/ipsec.service
new file mode 100755
index 000000000000..36e2f97d822c
--- /dev/null
+++ b/net-misc/libreswan/files/ipsec.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=Internet Key Exchange (IKE) Protocol Daemon for IPsec
+After=syslog.target
+After=network.target
+
+[Service]
+Type=simple
+ExecStartPre=/usr/libexec/ipsec/addconn --config /etc/ipsec.conf --checkconfig
+ExecStartPre=/usr/libexec/ipsec/_stackmanager start
+ExecStart=/usr/libexec/ipsec/pluto --config /etc/ipsec.conf --nofork
+ExecStop=/usr/libexec/ipsec/whack --shutdown
+ExecStopPost=/bin/ip xfrm policy flush
+ExecStopPost=/bin/ip xfrm state flush
+ExecReload=/usr/libexec/ipsec/whack --listen
+
+[Install]
+WantedBy=multi-user.target
+Alias=libreswan.service
+Alias=pluto.service
diff --git a/net-misc/libreswan/files/libreswan-3.7-curl.patch b/net-misc/libreswan/files/libreswan-3.7-curl.patch
new file mode 100644
index 000000000000..cc808abb0ae8
--- /dev/null
+++ b/net-misc/libreswan/files/libreswan-3.7-curl.patch
@@ -0,0 +1,30 @@
+diff --git a/include/secrets.h b/include/secrets.h
+index c5ac092..92c1679 100644
+--- a/include/secrets.h
++++ b/include/secrets.h
+@@ -173,10 +173,8 @@ extern struct secret *lsw_find_secret_by_id(struct secret *secrets,
+ const struct id *his_id,
+ bool asym);
+
+-#if defined(LIBCURL) || defined(LDAP_VER)
+ extern void lock_certs_and_keys(const char *who);
+ extern void unlock_certs_and_keys(const char *who);
+-#endif
+
+ #include "x509.h"
+ extern const struct RSA_private_key*lsw_get_x509_private_key(
+diff --git a/include/x509.h b/include/x509.h
+index f85e5b9..a796f89 100644
+--- a/include/x509.h
++++ b/include/x509.h
+@@ -230,8 +230,9 @@ extern void unlock_authcert_list(const char *who); /* in secrets.c */
+ #else
+ /* WARNING empty x509 locking functions defined bypassing real locking */
+ /* not fixing this hack, see issues #1390, #1391, #1392 */
++#define check_crls(who) /* nothing */
++#define lock_crl_list(who) /* nothing */
+ #define unlock_crl_list(who) /* nothing */
+-#define lock_cacert_list(who) /* nothing */
+ #define lock_authcert_list(who) /* nothing */
+ #define unlock_authcert_list(who) /* nothing */
+ #endif
diff --git a/net-misc/libreswan/files/libreswan-3.7-openrc-pidfile.patch b/net-misc/libreswan/files/libreswan-3.7-openrc-pidfile.patch
new file mode 100644
index 000000000000..9c9f696d0834
--- /dev/null
+++ b/net-misc/libreswan/files/libreswan-3.7-openrc-pidfile.patch
@@ -0,0 +1,37 @@
+From ee43bdf59ad20e099093a5de4a7cfe63f0c12ba0 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Mon, 6 Jan 2014 14:43:37 -0500
+Subject: [PATCH] packaging: Fix pidfile handling in openrc init script
+
+Variable is referenced as PLUTO_PIDFILE in start() and stop().
+
+Also, don't initialize PLUTO_OPTS to blank; this allows the sysadmin to
+set it in /etc/conf.d/ipsec.
+---
+ initsystems/openrc/ipsec.init.in | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/initsystems/openrc/ipsec.init.in b/initsystems/openrc/ipsec.init.in
+index f3ab2f9..c121897 100755
+--- a/initsystems/openrc/ipsec.init.in
++++ b/initsystems/openrc/ipsec.init.in
+@@ -1,7 +1,5 @@
+ #!/sbin/runscript
+
+-PLUTO_OPTS=""
+-
+ name="ipsec pluto daemon"
+ extra_commands="configtest"
+ extra_started_commands="reload"
+@@ -12,7 +10,7 @@ description_reload="reloads the configuration - does not affect existing connect
+ PLUTO_BINARY=${PLUTO_BINARY:-@FINALLIBDIR@/pluto}
+ PLUTO_CONFFILE=${PLUTO_CONFFILE:-@FINALCONFFILE@}
+ IPSEC_BINARY=${IPSEC_BINARY:-@FINALSBINDIR@/ipsec}
+-PLUTO_PID=${PLUTO_PID:-/var/run/pluto/pluto.pid}
++PLUTO_PIDFILE=${PLUTO_PIDFILE:-/var/run/pluto/pluto.pid}
+
+ depend() {
+ need net
+--
+1.8.5.2
+
diff --git a/net-misc/libreswan/files/libreswan-3.7-openrc.patch b/net-misc/libreswan/files/libreswan-3.7-openrc.patch
new file mode 100644
index 000000000000..6bbbda53e61f
--- /dev/null
+++ b/net-misc/libreswan/files/libreswan-3.7-openrc.patch
@@ -0,0 +1,24 @@
+From 2ad34532b42cfb791ed25cbf2fb9f6c964a12fcb Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sat, 4 Jan 2014 14:44:51 -0500
+Subject: [PATCH] packaging: Fix srcdir in openrc Makfile
+
+Signed-off-by: Paul Wouters <pwouters@redhat.com>
+---
+ initsystems/openrc/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/initsystems/openrc/Makefile b/initsystems/openrc/Makefile
+index 837ad61..eb5515e 100644
+--- a/initsystems/openrc/Makefile
++++ b/initsystems/openrc/Makefile
+@@ -1,5 +1,5 @@
+ LIBRESWANSRCDIR?=$(shell cd ../..; pwd)
+-srcdir?=${LIBRESWANSRCDIR}/initsystems/sysvinit/
++srcdir?=${LIBRESWANSRCDIR}/initsystems/openrc/
+
+ INITDFILE=ipsec.init
+ SUBDIRS=
+--
+1.8.5.2
+
diff --git a/net-misc/libreswan/libreswan-3.10.ebuild b/net-misc/libreswan/libreswan-3.10.ebuild
new file mode 100644
index 000000000000..e2e4694ea546
--- /dev/null
+++ b/net-misc/libreswan/libreswan-3.10.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd toolchain-funcs
+
+if [[ ${PV} != 9999 ]]; then
+ SRC_URI="https://download.libreswan.org/${P}.tar.gz"
+ KEYWORDS="amd64 ~ppc x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/libreswan/libreswan.git"
+fi
+
+DESCRIPTION="IPsec implementation for Linux, fork of Openswan"
+HOMEPAGE="https://libreswan.org/"
+
+LICENSE="GPL-2 BSD-4 RSA DES"
+SLOT="0"
+IUSE="caps curl dnssec ldap pam"
+
+COMMON_DEPEND="
+ dev-libs/gmp
+ dev-libs/nspr
+ caps? ( sys-libs/libcap-ng )
+ curl? ( net-misc/curl )
+ dnssec? ( net-dns/unbound net-libs/ldns )
+ ldap? ( net-nds/openldap )
+ pam? ( sys-libs/pam )
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ dev-libs/nss
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+RDEPEND="${COMMON_DEPEND}
+ dev-libs/nss[utils(+)]
+ sys-apps/iproute2
+ !net-misc/openswan
+ !net-misc/strongswan
+"
+
+src_prepare() {
+ epatch_user
+}
+
+usetf() {
+ usex "$1" true false
+}
+
+src_configure() {
+ tc-export AR CC
+ export INC_USRLOCAL=/usr
+ export INC_MANDIR=share/man
+ export FINALEXAMPLECONFDIR=/usr/share/doc/${PF}
+ export FINALDOCDIR=/usr/share/doc/${PF}/html
+ export INITSYSTEM=openrc
+ export INC_RCDIRS=
+ export INC_RCDEFAULT=/etc/init.d
+ export USERCOMPILE=
+ export USERLINK=
+ export USE_DNSSEC=$(usetf dnssec)
+ export USE_LIBCAP_NG=$(usetf caps)
+ export USE_LIBCURL=$(usetf curl)
+ export USE_LDAP=$(usetf ldap)
+ export USE_XAUTHPAM=$(usetf pam)
+}
+
+src_compile() {
+ emake programs
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ echo "include /etc/ipsec.d/*.secrets" > "${D}"/etc/ipsec.secrets
+ fperms 0600 /etc/ipsec.secrets
+
+ systemd_dounit "${FILESDIR}/ipsec.service"
+
+ dodoc CHANGES README
+ dodoc -r docs
+
+ find "${D}" -type d -empty -delete || die
+}
+
+pkg_postinst() {
+ local IPSEC_CONFDIR=${ROOT%/}/etc/ipsec.d
+ if [[ ! -f ${IPSEC_CONFDIR}/cert8.db ]]; then
+ ebegin "Setting up NSS database in ${IPSEC_CONFDIR}"
+ certutil -N -d "${IPSEC_CONFDIR}" -f <(echo)
+ eend $?
+ fi
+}
diff --git a/net-misc/libreswan/libreswan-3.12.ebuild b/net-misc/libreswan/libreswan-3.12.ebuild
new file mode 100644
index 000000000000..c6d6c25a8b72
--- /dev/null
+++ b/net-misc/libreswan/libreswan-3.12.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd toolchain-funcs
+
+if [[ ${PV} != 9999 ]]; then
+ SRC_URI="https://download.libreswan.org/${P}.tar.gz"
+ KEYWORDS="~amd64 ~ppc ~x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/libreswan/libreswan.git"
+fi
+
+DESCRIPTION="IPsec implementation for Linux, fork of Openswan"
+HOMEPAGE="https://libreswan.org/"
+
+LICENSE="GPL-2 BSD-4 RSA DES"
+SLOT="0"
+IUSE="caps curl dnssec ldap pam"
+
+COMMON_DEPEND="
+ dev-libs/gmp
+ dev-libs/nspr
+ caps? ( sys-libs/libcap-ng )
+ curl? ( net-misc/curl )
+ dnssec? ( net-dns/unbound net-libs/ldns )
+ ldap? ( net-nds/openldap )
+ pam? ( sys-libs/pam )
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ dev-libs/nss
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+RDEPEND="${COMMON_DEPEND}
+ dev-libs/nss[utils(+)]
+ sys-apps/iproute2
+ !net-misc/openswan
+ !net-misc/strongswan
+"
+
+src_prepare() {
+ epatch_user
+}
+
+usetf() {
+ usex "$1" true false
+}
+
+src_configure() {
+ tc-export AR CC
+ export INC_USRLOCAL=/usr
+ export INC_MANDIR=share/man
+ export FINALEXAMPLECONFDIR=/usr/share/doc/${PF}
+ export FINALDOCDIR=/usr/share/doc/${PF}/html
+ export INITSYSTEM=openrc
+ export INC_RCDIRS=
+ export INC_RCDEFAULT=/etc/init.d
+ export USERCOMPILE=
+ export USERLINK=
+ export USE_DNSSEC=$(usetf dnssec)
+ export USE_LIBCAP_NG=$(usetf caps)
+ export USE_LIBCURL=$(usetf curl)
+ export USE_LDAP=$(usetf ldap)
+ export USE_XAUTHPAM=$(usetf pam)
+}
+
+src_compile() {
+ emake programs
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ echo "include /etc/ipsec.d/*.secrets" > "${D}"/etc/ipsec.secrets
+ fperms 0600 /etc/ipsec.secrets
+
+ systemd_dounit "${FILESDIR}/ipsec.service"
+
+ dodoc CHANGES README
+ dodoc -r docs
+
+ find "${D}" -type d -empty -delete || die
+}
+
+pkg_postinst() {
+ local IPSEC_CONFDIR=${ROOT%/}/etc/ipsec.d
+ if [[ ! -f ${IPSEC_CONFDIR}/cert8.db ]]; then
+ ebegin "Setting up NSS database in ${IPSEC_CONFDIR}"
+ certutil -N -d "${IPSEC_CONFDIR}" -f <(echo)
+ eend $?
+ fi
+}
diff --git a/net-misc/libreswan/libreswan-3.13.ebuild b/net-misc/libreswan/libreswan-3.13.ebuild
new file mode 100644
index 000000000000..1f36ee572908
--- /dev/null
+++ b/net-misc/libreswan/libreswan-3.13.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd toolchain-funcs
+
+if [[ ${PV} != 9999 ]]; then
+ SRC_URI="https://download.libreswan.org/${P}.tar.gz"
+ KEYWORDS="amd64 ~ppc x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/libreswan/libreswan.git"
+fi
+
+DESCRIPTION="IPsec implementation for Linux, fork of Openswan"
+HOMEPAGE="https://libreswan.org/"
+
+LICENSE="GPL-2 BSD-4 RSA DES"
+SLOT="0"
+IUSE="caps curl dnssec ldap pam"
+
+COMMON_DEPEND="
+ dev-libs/gmp:0=
+ dev-libs/nspr
+ caps? ( sys-libs/libcap-ng )
+ curl? ( net-misc/curl )
+ dnssec? ( net-dns/unbound net-libs/ldns )
+ ldap? ( net-nds/openldap )
+ pam? ( sys-libs/pam )
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ dev-libs/nss
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+RDEPEND="${COMMON_DEPEND}
+ dev-libs/nss[utils(+)]
+ sys-apps/iproute2
+ !net-misc/openswan
+ !net-misc/strongswan
+"
+
+src_prepare() {
+ epatch_user
+}
+
+usetf() {
+ usex "$1" true false
+}
+
+src_configure() {
+ tc-export AR CC
+ export INC_USRLOCAL=/usr
+ export INC_MANDIR=share/man
+ export FINALEXAMPLECONFDIR=/usr/share/doc/${PF}
+ export FINALDOCDIR=/usr/share/doc/${PF}/html
+ export INITSYSTEM=openrc
+ export INC_RCDIRS=
+ export INC_RCDEFAULT=/etc/init.d
+ export USERCOMPILE=
+ export USERLINK=
+ export USE_DNSSEC=$(usetf dnssec)
+ export USE_LIBCAP_NG=$(usetf caps)
+ export USE_LIBCURL=$(usetf curl)
+ export USE_LDAP=$(usetf ldap)
+ export USE_XAUTHPAM=$(usetf pam)
+}
+
+src_compile() {
+ emake programs
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ echo "include /etc/ipsec.d/*.secrets" > "${D}"/etc/ipsec.secrets
+ fperms 0600 /etc/ipsec.secrets
+
+ systemd_dounit "${FILESDIR}/ipsec.service"
+
+ dodoc CHANGES README
+ dodoc -r docs
+
+ find "${D}" -type d -empty -delete || die
+}
+
+pkg_postinst() {
+ local IPSEC_CONFDIR=${ROOT%/}/etc/ipsec.d
+ if [[ ! -f ${IPSEC_CONFDIR}/cert8.db ]]; then
+ ebegin "Setting up NSS database in ${IPSEC_CONFDIR}"
+ certutil -N -d "${IPSEC_CONFDIR}" -f <(echo)
+ eend $?
+ fi
+}
diff --git a/net-misc/libreswan/libreswan-3.7-r1.ebuild b/net-misc/libreswan/libreswan-3.7-r1.ebuild
new file mode 100644
index 000000000000..0f68e88bdcea
--- /dev/null
+++ b/net-misc/libreswan/libreswan-3.7-r1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd toolchain-funcs
+
+if [[ ${PV} != 9999 ]]; then
+ SRC_URI="https://download.libreswan.org/${P}.tar.gz"
+ KEYWORDS="~amd64 ~ppc ~x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/libreswan/libreswan.git"
+fi
+
+DESCRIPTION="IPsec implementation for Linux, fork of Openswan"
+HOMEPAGE="https://libreswan.org/"
+
+LICENSE="GPL-2 BSD-4 RSA DES"
+SLOT="0"
+IUSE="caps curl dnssec ldap pam"
+
+COMMON_DEPEND="
+ dev-libs/gmp
+ dev-libs/nspr
+ caps? ( sys-libs/libcap-ng )
+ curl? ( net-misc/curl )
+ dnssec? ( net-dns/unbound net-libs/ldns )
+ ldap? ( net-nds/openldap )
+ pam? ( sys-libs/pam )
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ dev-libs/nss
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+RDEPEND="${COMMON_DEPEND}
+ dev-libs/nss[utils(+)]
+ sys-apps/iproute2
+ !net-misc/openswan
+ !net-misc/strongswan
+"
+
+src_prepare() {
+ epatch "${FILESDIR}/libreswan-3.7-curl.patch"
+ epatch "${FILESDIR}/libreswan-3.7-openrc.patch"
+ epatch "${FILESDIR}/libreswan-3.7-openrc-pidfile.patch"
+ epatch_user
+}
+
+usetf() {
+ usex "$1" true false
+}
+
+src_configure() {
+ tc-export AR CC
+ export INC_USRLOCAL=/usr
+ export INC_MANDIR=share/man
+ export FINALEXAMPLECONFDIR=/usr/share/doc/${PF}
+ export FINALDOCDIR=/usr/share/doc/${PF}/html
+ export INITSYSTEM=openrc
+ export INC_RCDIRS=
+ export INC_RCDEFAULT=/etc/init.d
+ export USERCOMPILE=
+ export USERLINK=
+ export USE_DNSSEC=$(usetf dnssec)
+ export USE_LIBCAP_NG=$(usetf caps)
+ export USE_LIBCURL=$(usetf curl)
+ export USE_LDAP=$(usetf ldap)
+ export USE_XAUTHPAM=$(usetf pam)
+}
+
+src_compile() {
+ emake programs
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ sed -i -e '1s:python$:python2:' "${D}"/usr/libexec/ipsec/verify || die
+
+ echo "include /etc/ipsec.d/*.secrets" > "${D}"/etc/ipsec.secrets
+ fperms 0600 /etc/ipsec.secrets
+
+ systemd_dounit "${FILESDIR}/ipsec.service"
+
+ dodoc BUGS CHANGES README
+ dodoc -r docs
+}
+
+pkg_postinst() {
+ local IPSEC_CONFDIR=${ROOT%/}/etc/ipsec.d
+ if [[ ! -f ${IPSEC_CONFDIR}/cert8.db ]]; then
+ ebegin "Setting up NSS database in ${IPSEC_CONFDIR}"
+ certutil -N -d "${IPSEC_CONFDIR}" -f <(echo)
+ eend $?
+ fi
+}
diff --git a/net-misc/libreswan/libreswan-3.8.ebuild b/net-misc/libreswan/libreswan-3.8.ebuild
new file mode 100644
index 000000000000..e86fa02bfe63
--- /dev/null
+++ b/net-misc/libreswan/libreswan-3.8.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd toolchain-funcs
+
+if [[ ${PV} != 9999 ]]; then
+ SRC_URI="https://download.libreswan.org/${P}.tar.gz"
+ KEYWORDS="amd64 ~ppc x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/libreswan/libreswan.git"
+fi
+
+DESCRIPTION="IPsec implementation for Linux, fork of Openswan"
+HOMEPAGE="https://libreswan.org/"
+
+LICENSE="GPL-2 BSD-4 RSA DES"
+SLOT="0"
+IUSE="caps curl dnssec ldap pam"
+
+COMMON_DEPEND="
+ dev-libs/gmp
+ dev-libs/nspr
+ caps? ( sys-libs/libcap-ng )
+ curl? ( net-misc/curl )
+ dnssec? ( net-dns/unbound net-libs/ldns )
+ ldap? ( net-nds/openldap )
+ pam? ( sys-libs/pam )
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ dev-libs/nss
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+RDEPEND="${COMMON_DEPEND}
+ dev-libs/nss[utils(+)]
+ sys-apps/iproute2
+ !net-misc/openswan
+ !net-misc/strongswan
+"
+
+src_prepare() {
+ epatch_user
+}
+
+usetf() {
+ usex "$1" true false
+}
+
+src_configure() {
+ tc-export AR CC
+ export INC_USRLOCAL=/usr
+ export INC_MANDIR=share/man
+ export FINALEXAMPLECONFDIR=/usr/share/doc/${PF}
+ export FINALDOCDIR=/usr/share/doc/${PF}/html
+ export INITSYSTEM=openrc
+ export INC_RCDIRS=
+ export INC_RCDEFAULT=/etc/init.d
+ export USERCOMPILE=
+ export USERLINK=
+ export USE_DNSSEC=$(usetf dnssec)
+ export USE_LIBCAP_NG=$(usetf caps)
+ export USE_LIBCURL=$(usetf curl)
+ export USE_LDAP=$(usetf ldap)
+ export USE_XAUTHPAM=$(usetf pam)
+}
+
+src_compile() {
+ emake programs
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ sed -i -e '1s:python$:python2:' "${D}"/usr/libexec/ipsec/verify || die
+
+ echo "include /etc/ipsec.d/*.secrets" > "${D}"/etc/ipsec.secrets
+ fperms 0600 /etc/ipsec.secrets
+
+ systemd_dounit "${FILESDIR}/ipsec.service"
+
+ dodoc BUGS CHANGES README
+ dodoc -r docs
+
+ find "${D}" -type d -empty -delete || die
+}
+
+pkg_postinst() {
+ local IPSEC_CONFDIR=${ROOT%/}/etc/ipsec.d
+ if [[ ! -f ${IPSEC_CONFDIR}/cert8.db ]]; then
+ ebegin "Setting up NSS database in ${IPSEC_CONFDIR}"
+ certutil -N -d "${IPSEC_CONFDIR}" -f <(echo)
+ eend $?
+ fi
+}
diff --git a/net-misc/libreswan/libreswan-3.9.ebuild b/net-misc/libreswan/libreswan-3.9.ebuild
new file mode 100644
index 000000000000..e4bcdb98a6c4
--- /dev/null
+++ b/net-misc/libreswan/libreswan-3.9.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd toolchain-funcs
+
+if [[ ${PV} != 9999 ]]; then
+ SRC_URI="https://download.libreswan.org/${P}.tar.gz"
+ KEYWORDS="~amd64 ~ppc ~x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/libreswan/libreswan.git"
+fi
+
+DESCRIPTION="IPsec implementation for Linux, fork of Openswan"
+HOMEPAGE="https://libreswan.org/"
+
+LICENSE="GPL-2 BSD-4 RSA DES"
+SLOT="0"
+IUSE="caps curl dnssec ldap pam"
+
+COMMON_DEPEND="
+ dev-libs/gmp
+ dev-libs/nspr
+ caps? ( sys-libs/libcap-ng )
+ curl? ( net-misc/curl )
+ dnssec? ( net-dns/unbound net-libs/ldns )
+ ldap? ( net-nds/openldap )
+ pam? ( sys-libs/pam )
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ dev-libs/nss
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+RDEPEND="${COMMON_DEPEND}
+ dev-libs/nss[utils(+)]
+ sys-apps/iproute2
+ !net-misc/openswan
+ !net-misc/strongswan
+"
+
+src_prepare() {
+ epatch_user
+}
+
+usetf() {
+ usex "$1" true false
+}
+
+src_configure() {
+ tc-export AR CC
+ export INC_USRLOCAL=/usr
+ export INC_MANDIR=share/man
+ export FINALEXAMPLECONFDIR=/usr/share/doc/${PF}
+ export FINALDOCDIR=/usr/share/doc/${PF}/html
+ export INITSYSTEM=openrc
+ export INC_RCDIRS=
+ export INC_RCDEFAULT=/etc/init.d
+ export USERCOMPILE=
+ export USERLINK=
+ export USE_DNSSEC=$(usetf dnssec)
+ export USE_LIBCAP_NG=$(usetf caps)
+ export USE_LIBCURL=$(usetf curl)
+ export USE_LDAP=$(usetf ldap)
+ export USE_XAUTHPAM=$(usetf pam)
+}
+
+src_compile() {
+ emake programs
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ sed -i -e '1s:python$:python2:' "${D}"/usr/libexec/ipsec/verify || die
+
+ echo "include /etc/ipsec.d/*.secrets" > "${D}"/etc/ipsec.secrets
+ fperms 0600 /etc/ipsec.secrets
+
+ systemd_dounit "${FILESDIR}/ipsec.service"
+
+ dodoc CHANGES README
+ dodoc -r docs
+
+ find "${D}" -type d -empty -delete || die
+}
+
+pkg_postinst() {
+ local IPSEC_CONFDIR=${ROOT%/}/etc/ipsec.d
+ if [[ ! -f ${IPSEC_CONFDIR}/cert8.db ]]; then
+ ebegin "Setting up NSS database in ${IPSEC_CONFDIR}"
+ certutil -N -d "${IPSEC_CONFDIR}" -f <(echo)
+ eend $?
+ fi
+}
diff --git a/net-misc/libreswan/libreswan-9999.ebuild b/net-misc/libreswan/libreswan-9999.ebuild
new file mode 100644
index 000000000000..b4c24412356b
--- /dev/null
+++ b/net-misc/libreswan/libreswan-9999.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd toolchain-funcs
+
+if [[ ${PV} != 9999 ]]; then
+ SRC_URI="https://download.libreswan.org/${P}.tar.gz"
+ KEYWORDS="~amd64 ~ppc ~x86"
+else
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/libreswan/libreswan.git"
+fi
+
+DESCRIPTION="IPsec implementation for Linux, fork of Openswan"
+HOMEPAGE="https://libreswan.org/"
+
+LICENSE="GPL-2 BSD-4 RSA DES"
+SLOT="0"
+IUSE="caps curl dnssec ldap pam"
+
+COMMON_DEPEND="
+ dev-libs/gmp:0=
+ dev-libs/nspr
+ caps? ( sys-libs/libcap-ng )
+ curl? ( net-misc/curl )
+ dnssec? ( net-dns/unbound net-libs/ldns )
+ ldap? ( net-nds/openldap )
+ pam? ( sys-libs/pam )
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ dev-libs/nss
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+RDEPEND="${COMMON_DEPEND}
+ dev-libs/nss[utils(+)]
+ sys-apps/iproute2
+ !net-misc/openswan
+ !net-misc/strongswan
+"
+
+src_prepare() {
+ epatch_user
+}
+
+usetf() {
+ usex "$1" true false
+}
+
+src_configure() {
+ tc-export AR CC
+ export INC_USRLOCAL=/usr
+ export INC_MANDIR=share/man
+ export FINALEXAMPLECONFDIR=/usr/share/doc/${PF}
+ export FINALDOCDIR=/usr/share/doc/${PF}/html
+ export INITSYSTEM=openrc
+ export INC_RCDIRS=
+ export INC_RCDEFAULT=/etc/init.d
+ export USERCOMPILE=
+ export USERLINK=
+ export USE_DNSSEC=$(usetf dnssec)
+ export USE_LIBCAP_NG=$(usetf caps)
+ export USE_LIBCURL=$(usetf curl)
+ export USE_LDAP=$(usetf ldap)
+ export USE_XAUTHPAM=$(usetf pam)
+}
+
+src_compile() {
+ emake programs
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ echo "include /etc/ipsec.d/*.secrets" > "${D}"/etc/ipsec.secrets
+ fperms 0600 /etc/ipsec.secrets
+
+ systemd_dounit "${FILESDIR}/ipsec.service"
+
+ dodoc CHANGES README
+ dodoc -r docs
+
+ find "${D}" -type d -empty -delete || die
+}
+
+pkg_postinst() {
+ local IPSEC_CONFDIR=${ROOT%/}/etc/ipsec.d
+ if [[ ! -f ${IPSEC_CONFDIR}/cert8.db ]]; then
+ ebegin "Setting up NSS database in ${IPSEC_CONFDIR}"
+ certutil -N -d "${IPSEC_CONFDIR}" -f <(echo)
+ eend $?
+ fi
+}
diff --git a/net-misc/libreswan/metadata.xml b/net-misc/libreswan/metadata.xml
new file mode 100644
index 000000000000..006bc2396c11
--- /dev/null
+++ b/net-misc/libreswan/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>floppym@gentoo.org</email>
+ <name>Mike Gilbert</name>
+ </maintainer>
+ <use>
+ <flag name="dnssec">Use DNSSEC resolver (requires <pkg>net-dns/unbound</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/libss7/Manifest b/net-misc/libss7/Manifest
new file mode 100644
index 000000000000..9b04d8e4068d
--- /dev/null
+++ b/net-misc/libss7/Manifest
@@ -0,0 +1 @@
+DIST libss7-1.0.2.tar.gz 60834 SHA256 654188973371e61b4af511eae18756675dbf7c1e17e6f400f2860f3d32ac4b37 SHA512 ff2a7f37aa8186df6059e0069fb12174d9c32147354eeff742faab28923feaa0459e82037139273cb436211e2bf709047a4f88740791fb63543dfac1f4ce3d11 WHIRLPOOL 9c2400c710a62d31762402838b20617834842068779b9b6c7298cb2e5dc8e25b91f02614fe592768ba789cb1fa82ee1184420dc7ba83a11a623cfe77bfbd1a85
diff --git a/net-misc/libss7/files/1.0.2-ldflags.patch b/net-misc/libss7/files/1.0.2-ldflags.patch
new file mode 100644
index 000000000000..d88fe25237b7
--- /dev/null
+++ b/net-misc/libss7/files/1.0.2-ldflags.patch
@@ -0,0 +1,12 @@
+diff -uNr libss7-1.0.2.ORIG/Makefile libss7-1.0.2/Makefile
+--- libss7-1.0.2.ORIG/Makefile 2012-08-23 10:49:15.341155719 +0100
++++ libss7-1.0.2/Makefile 2012-08-23 10:50:35.403236983 +0100
+@@ -54,7 +54,7 @@
+ ranlib $(STATIC_LIBRARY)
+
+ $(DYNAMIC_LIBRARY): $(DYNAMIC_OBJS)
+- $(CC) -shared $(SOFLAGS) -o $@ $(DYNAMIC_OBJS)
++ $(CC) -shared $(SOFLAGS) $(LDFLAGS) -o $@ $(DYNAMIC_OBJS)
+ $(LDCONFIG) $(LDCONFIG_FLAGS) .
+ ln -sf libss7.so.1 libss7.so
+ ln -sf libss7.so.1.0 libss7.so.1
diff --git a/net-misc/libss7/files/1.0.2-no-ldconfig.patch b/net-misc/libss7/files/1.0.2-no-ldconfig.patch
new file mode 100644
index 000000000000..166fd01745cb
--- /dev/null
+++ b/net-misc/libss7/files/1.0.2-no-ldconfig.patch
@@ -0,0 +1,11 @@
+diff -uNr libss7-1.0.2.ORIG/Makefile libss7-1.0.2/Makefile
+--- libss7-1.0.2.ORIG/Makefile 2012-08-23 10:26:35.733775711 +0100
++++ libss7-1.0.2/Makefile 2012-08-23 10:27:06.826807271 +0100
+@@ -48,7 +48,6 @@
+ install -m 755 $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)$(libdir)
+ ( cd $(INSTALL_PREFIX)$(libdir) ; ln -sf libss7.so.1 libss7.so ; ln -sf libss7.so.1.0 libss7.so.1 )
+ install -m 644 $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(libdir)
+- if test $$(id -u) = 0; then $(LDCONFIG); fi
+
+ $(STATIC_LIBRARY): $(STATIC_OBJS)
+ ar rcs $(STATIC_LIBRARY) $(STATIC_OBJS)
diff --git a/net-misc/libss7/files/1.0.2-werror-idiocy.patch b/net-misc/libss7/files/1.0.2-werror-idiocy.patch
new file mode 100644
index 000000000000..8eed3e5e2196
--- /dev/null
+++ b/net-misc/libss7/files/1.0.2-werror-idiocy.patch
@@ -0,0 +1,12 @@
+diff -uNr libss7-1.0.2.ORIG/Makefile libss7-1.0.2/Makefile
+--- libss7-1.0.2.ORIG/Makefile 2012-08-23 10:22:27.855524115 +0100
++++ libss7-1.0.2/Makefile 2012-08-23 10:22:46.156542689 +0100
+@@ -11,7 +11,7 @@
+ DYNAMIC_OBJS=mtp2.o ss7_sched.o ss7.o mtp3.o isup.o version.o
+ STATIC_LIBRARY=libss7.a
+ DYNAMIC_LIBRARY=libss7.so.1.0
+-CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC
++CFLAGS=-Wall -Wstrict-prototypes -Wmissing-prototypes -g -fPIC
+ LDCONFIG_FLAGS=-n
+ SOFLAGS=-Wl,-hlibss7.so.1
+ LDCONFIG=/sbin/ldconfig
diff --git a/net-misc/libss7/libss7-1.0.2.ebuild b/net-misc/libss7/libss7-1.0.2.ebuild
new file mode 100644
index 000000000000..27235d0f6ed5
--- /dev/null
+++ b/net-misc/libss7/libss7-1.0.2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit base toolchain-funcs
+
+DESCRIPTION="Signalling System 7 (SS7) protocol library"
+HOMEPAGE="http://www.asterisk.org/"
+SRC_URI="http://downloads.asterisk.org/pub/telephony/${PN}/releases/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND=">=net-misc/dahdi-2.0.0"
+PATCHES=(
+ "${FILESDIR}/${PV}-werror-idiocy.patch"
+ "${FILESDIR}/${PV}-no-ldconfig.patch"
+ "${FILESDIR}/${PV}-ldflags.patch"
+)
+
+src_compile() {
+ emake CC=$(tc-getCC) LD=$(tc-getLD) DESTDIR="${D}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc ChangeLog README NEWS* || die "dodoc failed"
+}
diff --git a/net-misc/libss7/metadata.xml b/net-misc/libss7/metadata.xml
new file mode 100644
index 000000000000..3ed4669f55a4
--- /dev/null
+++ b/net-misc/libss7/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>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/libteam/Manifest b/net-misc/libteam/Manifest
new file mode 100644
index 000000000000..131f8227d795
--- /dev/null
+++ b/net-misc/libteam/Manifest
@@ -0,0 +1,3 @@
+DIST libteam-1.0.tar.gz 99558 SHA256 5fb6dcf296f07be20e6ff61b4f18f4e98346ed158032f8d733bedd6f39b48f8f SHA512 69206709ebb9ad576b844402ad5c2327bf85a0d48d386a51decafd22f0fd638fa0d6d09e822afb77d511006d20749c3820b84c17e4c6874ce1fdc1499484a313 WHIRLPOOL f68274b50771aa67ac30abf38f9f2af8401eb84cacaf0eeb3468dbb845b3336af78d0459eec087d8081551c13640fa2097e1dfc5d4741c33a2bb7c29682bd7c6
+DIST libteam-1.11.tar.gz 497560 SHA256 b89e81258f8a8f4abd718ec1c91f85cb66d4d29e4d50095a3d2a4ffd8ce4bf7a SHA512 0e7da9ffbe2e0fe15d1caa67bdb2b8acb69f12884656005d4a0bd91beb82c71eb380af46263d92c543b42fc0087d40a4b607847ee895482109a6f34847eafcbf WHIRLPOOL d1eed93acdb6212e0615170f927c77d359f8963262700aa76104859dd102fa4407fbae6f5705b104f2e59905cfa24a3551c9488cf214e1c9456a58004cfba187
+DIST libteam-1.14.tar.gz 524122 SHA256 294cdabd85cddfeac304ecbd4f331ef3f9afbf03f8b8ef7bb3a9c5827ab22d97 SHA512 11cad4baf42b27cf9bce106d202d5e6dd2685bac45784233868f0757c12d9b6f672db6d65e4cd1138de4f22c89665838db578b1ce30c8da283f3e258a56b65e8 WHIRLPOOL 9471099dde384948274c925bfbd38530be71b4676a15283bc645b47aab7d7199ba0c494bd5ccaece8dc4f124044b4f3cd4efcae3b00a809b4d9f6c6978525968
diff --git a/net-misc/libteam/libteam-1.0.ebuild b/net-misc/libteam/libteam-1.0.ebuild
new file mode 100644
index 000000000000..b3bc121d26c4
--- /dev/null
+++ b/net-misc/libteam/libteam-1.0.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils linux-info
+
+DESCRIPTION="Library and tools set for controlling team network device"
+HOMEPAGE="https://fedorahosted.org/libteam/"
+SRC_URI="https://github.com/jpirko/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="debug examples static-libs +syslog"
+
+DEPEND="dev-libs/jansson
+ dev-libs/libdaemon
+ >=dev-libs/libnl-3.2.19[utils]
+ sys-apps/dbus
+ "
+RDEPEND="${DEPEND}
+ syslog? ( virtual/logger )"
+
+CONFIG_CHECK="~NET_TEAM ~NET_TEAM_MODE_ROUNDROBIN ~NET_TEAM_MODE_ACTIVEBACKUP"
+ERROR_NET_TEAM="NET_TEAM is not enabled in this kernel!
+Only >=3.3.0 kernel version support in team mode"
+
+DOCS=( HOWTO.BASICS README )
+
+src_prepare() {
+ # avoid using -Werror in CFLAGS
+ sed -i -e '/^CFLAGS/s/-Werror//' configure.ac || die 'sed on CFLAGS failed'
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable debug)
+ $(use_enable syslog logging)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ insinto /etc/dbus-1/system.d
+ doins teamd/dbus/teamd.conf
+
+ if use examples; then
+ docinto examples
+ dodoc teamd/example_configs/*
+ fi
+}
diff --git a/net-misc/libteam/libteam-1.11.ebuild b/net-misc/libteam/libteam-1.11.ebuild
new file mode 100644
index 000000000000..09ae4905f741
--- /dev/null
+++ b/net-misc/libteam/libteam-1.11.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+inherit autotools-utils linux-info
+
+DESCRIPTION="Library and tools set for controlling team network device"
+HOMEPAGE="http://libteam.org"
+SRC_URI="http://libteam.org/files/${P}.tar.gz"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="dbus debug examples static-libs +syslog"
+
+DEPEND=">=dev-libs/jansson-2.4
+ dev-libs/libdaemon
+ >=dev-libs/libnl-3.2.19[utils]
+ dbus? ( sys-apps/dbus )
+ "
+RDEPEND="${DEPEND}
+ syslog? ( virtual/logger )"
+
+CONFIG_CHECK="~NET_TEAM ~NET_TEAM_MODE_ROUNDROBIN ~NET_TEAM_MODE_ACTIVEBACKUP"
+ERROR_NET_TEAM="NET_TEAM is not enabled in this kernel!
+Only >=3.3.0 kernel version support in team mode"
+
+DOCS=( README )
+
+src_prepare() {
+ # avoid using -Werror in CFLAGS
+ sed -i -e '/^CFLAGS/s/-Werror//' configure.ac || die 'sed on CFLAGS failed'
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable debug)
+ $(use_enable syslog logging)
+ $(use_enable dbus)
+ --disable-zmq
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ insinto /etc/dbus-1/system.d
+ doins teamd/dbus/teamd.conf
+
+ if use examples; then
+ docinto examples
+ dodoc teamd/example_configs/*
+ fi
+}
diff --git a/net-misc/libteam/libteam-1.14.ebuild b/net-misc/libteam/libteam-1.14.ebuild
new file mode 100644
index 000000000000..e83dab4a1644
--- /dev/null
+++ b/net-misc/libteam/libteam-1.14.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+inherit autotools-utils linux-info
+
+DESCRIPTION="Library and tools set for controlling team network device"
+HOMEPAGE="http://libteam.org"
+SRC_URI="http://libteam.org/files/${P}.tar.gz"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="dbus debug examples static-libs +syslog zmq"
+
+DEPEND=">=dev-libs/jansson-2.4
+ dev-libs/libdaemon
+ >=dev-libs/libnl-3.2.19[utils]
+ dbus? ( sys-apps/dbus )
+ zmq? ( >=net-libs/zeromq-3.2.0 )
+ "
+
+RDEPEND="${DEPEND}
+ syslog? ( virtual/logger )"
+
+CONFIG_CHECK="~NET_TEAM ~NET_TEAM_MODE_ROUNDROBIN ~NET_TEAM_MODE_ACTIVEBACKUP ~NET_TEAM_MODE_BROADCAST ~NET_TEAM_MODE_RANDOM ~NET_TEAM_MODE_LOADBALANCE"
+ERROR_NET_TEAM="NET_TEAM is not enabled in this kernel!
+Only >=3.3.0 kernel version support in team mode"
+
+DOCS=( README )
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable debug)
+ $(use_enable syslog logging)
+ $(use_enable dbus)
+ $(use_enable zmq)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ insinto /etc/dbus-1/system.d
+ doins teamd/dbus/teamd.conf
+
+ if use examples; then
+ docinto examples
+ dodoc teamd/example_configs/*
+ fi
+}
diff --git a/net-misc/libteam/metadata.xml b/net-misc/libteam/metadata.xml
new file mode 100644
index 000000000000..eb53daa65851
--- /dev/null
+++ b/net-misc/libteam/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>andreis.vinogradovs@gmail.com</email>
+ <name>Andreis Vinogradovs</name>
+ <description>Maintainer. Assign bugs to him</description>
+ </maintainer>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ <description>Proxy maintainer. CC him on bugs</description>
+ </maintainer>
+ <use>
+ <flag name='zmq'>Build witch <pkg>net-libs/zeromq</pkg> support</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/linux-eoip/Manifest b/net-misc/linux-eoip/Manifest
new file mode 100644
index 000000000000..d942a70d19b8
--- /dev/null
+++ b/net-misc/linux-eoip/Manifest
@@ -0,0 +1 @@
+DIST linux-eoip-0.5.tgz 657013 SHA256 97fa59518353fa91b032b651ace60e94c31f18613ea695dea3154d932bf1a8ff SHA512 a8ed24a0bc4bf6dc97b125ece4ec6b46d20ee1aa09a21f7127854394c085143d4cf1d973e544869bbe6da6de86df7ee6c6901ca1e0dcf9c1610d5d35fdeea7c0 WHIRLPOOL e07613523825ec7add49b4b73562ee01b33c3133e9f692eea7480258b50057cd2a2b9cbb988a4e058d650d60f6217a81c22d89909a3261c68a14791c487e3f8b
diff --git a/net-misc/linux-eoip/linux-eoip-0.5.ebuild b/net-misc/linux-eoip/linux-eoip-0.5.ebuild
new file mode 100644
index 000000000000..404b35444c13
--- /dev/null
+++ b/net-misc/linux-eoip/linux-eoip-0.5.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+inherit eutils autotools-utils
+
+DESCRIPTION="Linux support for proprietary MIkrotik EoIP protocol"
+HOMEPAGE="http://code.google.com/p/linux-eoip/"
+SRC_URI="http://linux-eoip.googlecode.com/files/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ dev-libs/lzo:2
+ "
+
+RDEPEND="${DEPEND}"
+DOCS=( README )
+
+src_prepare() {
+ esvn_clean
+ sed -e 's/bin_PROGRAMS/sbin_PROGRAMS/g' -i Makefile.am
+ autotools-utils_src_prepare
+}
+
+src_install() {
+ autotools-utils_src_install
+ insinto /etc
+ doins vip.cfg eoip.cfg
+}
diff --git a/net-misc/linux-eoip/metadata.xml b/net-misc/linux-eoip/metadata.xml
new file mode 100644
index 000000000000..41458c8e4043
--- /dev/null
+++ b/net-misc/linux-eoip/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>proxy-maintainers</herd>
+<maintainer>
+ <email>andreis.vinogradovs@gmail.com</email>
+ <name>Andreis Vinogradovs</name>
+ <description>Maintainer. Assign bugs to him</description>
+</maintainer>
+<maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ <description>Proxy maintainer. CC him on bugs</description>
+</maintainer>
+<upstream>
+ <maintainer>
+ <email>nuclearcat@nuclearcat.com</email>
+ <name>Denys Fedoryshchenko</name>
+ </maintainer>
+</upstream>
+</pkgmetadata>
diff --git a/net-misc/linux-identd/Manifest b/net-misc/linux-identd/Manifest
new file mode 100644
index 000000000000..a34daaee2d6a
--- /dev/null
+++ b/net-misc/linux-identd/Manifest
@@ -0,0 +1 @@
+DIST linux-identd-1.3.tar.gz 16719 SHA256 3d82fcf7202f5cd8d92ddcb71c7098f9f76fc81679dcf3076dde82bed12a04fd SHA512 3f533933da0d3be42713ee3ab18a31c72c19434363635b3a996ad1a0b7516eb3a2127f181b4c584a19671ae4e270ab6248a2c975b6e8ae26817990bee3c3bab4 WHIRLPOOL b9745d555668f6b5bb088fd6cfd6595932b5b690349e82a94d5ca54f52572dd2e90610845838a743d17f3a22f55d477853b59867fb3a72d3eb75b0a642a89e0a
diff --git a/net-misc/linux-identd/files/identd.init b/net-misc/linux-identd/files/identd.init
new file mode 100644
index 000000000000..d5ffc5d1a391
--- /dev/null
+++ b/net-misc/linux-identd/files/identd.init
@@ -0,0 +1,21 @@
+#!/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 identd"
+ start-stop-daemon --start --quiet --name identd \
+ --startas /usr/sbin/identd -- -d
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping identd"
+ start-stop-daemon --stop --quiet --name identd
+ eend $?
+}
diff --git a/net-misc/linux-identd/files/identd.xinetd b/net-misc/linux-identd/files/identd.xinetd
new file mode 100644
index 000000000000..a51d49b2019a
--- /dev/null
+++ b/net-misc/linux-identd/files/identd.xinetd
@@ -0,0 +1,9 @@
+service ident
+{
+ disable = no
+ socket_type = stream
+ wait = no
+ user = nobody
+ protocol = tcp
+ server = /usr/sbin/in.identd
+}
diff --git a/net-misc/linux-identd/linux-identd-1.3-r1.ebuild b/net-misc/linux-identd/linux-identd-1.3-r1.ebuild
new file mode 100644
index 000000000000..d6607ef5fb23
--- /dev/null
+++ b/net-misc/linux-identd/linux-identd-1.3-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="A real IDENT daemon for linux"
+HOMEPAGE="http://www.fukt.bsnet.se/~per/identd/"
+SRC_URI="http://www.fukt.bsnet.se/~per/identd/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~hppa ia64 ~mips ppc sparc x86"
+IUSE="xinetd"
+
+DEPEND=""
+RDEPEND="xinetd? ( sys-apps/xinetd )"
+
+src_compile() {
+ emake CC="$(tc-getCC)" CEXTRAS="${CFLAGS}"
+}
+
+src_install() {
+ dodir /etc/init.d /usr/sbin /usr/share/man/man8
+ dodoc README ChangeLog
+ emake install DESTDIR="${D}" MANDIR=/usr/share/man
+
+ if use xinetd; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/identd.xinetd identd
+ else
+ newinitd "${FILESDIR}"/identd.init identd
+ fi
+}
diff --git a/net-misc/linux-identd/metadata.xml b/net-misc/linux-identd/metadata.xml
new file mode 100644
index 000000000000..f9d50da18d39
--- /dev/null
+++ b/net-misc/linux-identd/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>maintainer-needed@gentoo.org</email>
+ <description>This package lacks a primary herd or maintainer.</description>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/linuxptp/Manifest b/net-misc/linuxptp/Manifest
new file mode 100644
index 000000000000..2914012059d5
--- /dev/null
+++ b/net-misc/linuxptp/Manifest
@@ -0,0 +1 @@
+DIST linuxptp-1.5.tgz 139127 SHA256 ecebc8503a9fd2340299f8015e520527c32cf3760d34849fa0e855bbbf4b1090 SHA512 03ec0c3a283e08f9e62dfa7d059326887db541aa53b5c65e03534079083f39666a441a4303f428f3b972976483e683e603bdc2ec232495ccab46153531124974 WHIRLPOOL e5fb5398cf239221f08ec52830252aa4eeaabcef6341cc9c04a9ff3794d4d93f18247323b0a1fd26a088e00d6816087d7149e8625e7b25d91882be9dc034dec1
diff --git a/net-misc/linuxptp/linuxptp-1.5.ebuild b/net-misc/linuxptp/linuxptp-1.5.ebuild
new file mode 100644
index 000000000000..bb2894ecfe2d
--- /dev/null
+++ b/net-misc/linuxptp/linuxptp-1.5.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit linux-info
+
+DESCRIPTION="The Linux Precision Time Protocol (PTP) implementation"
+HOMEPAGE="http://linuxptp.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/v${PV}/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+CONFIG_CHECK="PPS NETWORK_PHY_TIMESTAMPING PTP_1588_CLOCK"
+
+src_compile() {
+ export EXTRA_CFLAGS=${CFLAGS}
+ emake prefix=/usr mandir=/usr/share/man
+}
+
+src_install() {
+ emake \
+ prefix="${D}"/usr \
+ mandir="${D}"/usr/share/man \
+ infodir="${D}"/usr/share/info \
+ libdir="${D}"/usr/$(get_libdir) \
+ install
+
+ dodoc README.org
+}
diff --git a/net-misc/linuxptp/metadata.xml b/net-misc/linuxptp/metadata.xml
new file mode 100644
index 000000000000..fb12766c5057
--- /dev/null
+++ b/net-misc/linuxptp/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>tomjbe@gentoo.org</email>
+ <name>Thomas Beierlein</name>
+ </maintainer>
+ <longdescription>The package implements the Linux version of the
+ Precision Time Protocol (PTP)
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">linuxptp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/liveice/Manifest b/net-misc/liveice/Manifest
new file mode 100644
index 000000000000..037f374ac3bc
--- /dev/null
+++ b/net-misc/liveice/Manifest
@@ -0,0 +1 @@
+DIST liveice.tar.gz 85171 SHA256 d295bc85b925f4e35569e5426968062cc8051ec62bd0528c34727667283eb11c SHA512 6b6b7ed7f4aa2b27e2b97db407554955e332002c059bbf3fbb5c5fe60c1d6aa5cd594d2698524a9b447fc3a81de96fb46945c2386467f1773ff0ba2b10da78e4 WHIRLPOOL 7c3b70be89882b5a8003eff977698bb63b65a75caf2264666573fa39b24b99293692e1f684f693904108badd31ad757577824a320b55367a94ce3b8cf6d143aa
diff --git a/net-misc/liveice/liveice-2000530-r1.ebuild b/net-misc/liveice/liveice-2000530-r1.ebuild
new file mode 100644
index 000000000000..fe0a997e91b5
--- /dev/null
+++ b/net-misc/liveice/liveice-2000530-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Live Source Client For IceCast"
+HOMEPAGE="http://star.arm.ac.uk/~spm/software/liveice.html"
+SRC_URI="http://star.arm.ac.uk/~spm/software/liveice.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE=""
+
+RDEPEND="media-sound/lame
+ media-sound/mpg123"
+DEPEND=""
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ # cannot use LDFLAGS directly as the Makefile uses it for LIBS
+ sed -i Makefile.in \
+ -e 's|-o liveice|$(LLFLAGS) &|' \
+ || die "sed Makefile.in"
+ tc-export CC
+}
+
+src_compile() {
+ emake LLFLAGS="${LDFLAGS}" || die
+}
+src_install() {
+ dobin liveice || die
+ dodoc liveice.cfg README.liveice README.quickstart README_new_mixer.txt Changes.txt
+}
diff --git a/net-misc/liveice/metadata.xml b/net-misc/liveice/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/net-misc/liveice/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/livestreamer/Manifest b/net-misc/livestreamer/Manifest
new file mode 100644
index 000000000000..5fbc60765422
--- /dev/null
+++ b/net-misc/livestreamer/Manifest
@@ -0,0 +1,4 @@
+DIST livestreamer-1.11.1.tar.gz 864035 SHA256 69e2bc2a72fca682e5e328db18cefeef2f32ea59413fb0847dc478abca1f2cc2 SHA512 1edac388ee91540309c396bbc6a426b2008bbc0066fea7a5861517c9f0da49edc1a398e2bf3e8c9a3ab58bfaec9c15d57fff6d72dd8f9b8c8de9c4537f443429 WHIRLPOOL 393e20cb64873e84daf31ff543db7002306e7e37b68710729c024e78f9b566a75bae57220175fd3fae7331cb8c228d72698574c417ab0f93ea901601458e8f8b
+DIST livestreamer-1.12.1.tar.gz 873050 SHA256 3255bc78adbdc233b9586d3b5348134ab5ae656580c9f2489d03068c369a0fb6 SHA512 40d959c0b0884519e6a2a45e28865e76def1ce15d5afaa79e506e552e189e3187e98d26c8dabde5734c2dce7fe2ec8215782e3b4bdd63132b02bc37ff42a4373 WHIRLPOOL a6b6d1e9e3cef7e14f3f50dfbc87653df1dfb155cf524ef936a05a86805ca339035ed13432e1da7f75a1aaf2d15ca52ee9b52fe030f8df6f8fb28b19a5684033
+DIST livestreamer-1.12.2.tar.gz 877052 SHA256 4d6e2954abff198dce082f34a19a54dbf6fb95ca53567d92a661e527fe68e3ba SHA512 547886b494a7562e479cf31db15b5b02545f2ebc5f8b70d0fe0006d3748c5c9f20517638c7642377e2bdc4083738829eacf272e8d68f332da212bf65300f5d12 WHIRLPOOL f898483137a2c3de15512938052cda516a531c1d02990811f8a65ac9c2c0c7f1a55608e659cdadce0dc939b0cf4f294a9133a7af814599787858d1a3435c2e3c
+DIST livestreamer-1.7.2.tar.gz 557683 SHA256 0fba4fe00736992ac31dc3a7edc3850b6d2ff8c4d67ca518db699010f1f12ece SHA512 79db7a020828790372206bf2e145b2fe99e5b94965206f44dbcf553653f88aa4163cc866631202371290eec67bf915de05a5ab348fcb6752c2362f46fc1af15e WHIRLPOOL 782abfe62062ff33a785585364b6506a9c76246d0a7551509a91f90e5bf69052b329aad7bacd4676c2adae4782b966db0481565f20668dd3c75251682621b172
diff --git a/net-misc/livestreamer/livestreamer-1.11.1.ebuild b/net-misc/livestreamer/livestreamer-1.11.1.ebuild
new file mode 100644
index 000000000000..1c0b530b2e22
--- /dev/null
+++ b/net-misc/livestreamer/livestreamer-1.11.1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DESCRIPTION="CLI tool that pipes video streams from services like twitch.tv into a video player"
+HOMEPAGE="https://github.com/chrippa/livestreamer"
+SRC_URI="https://github.com/chrippa/livestreamer/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+inherit distutils-r1
+
+KEYWORDS="amd64 ~mips x86"
+LICENSE="Apache-2.0 BSD-2 MIT-with-advertising"
+SLOT="0"
+
+RDEPEND="dev-python/pycrypto[${PYTHON_USEDEP}]
+ >=dev-python/requests-1.0[${PYTHON_USEDEP}]
+ virtual/python-futures[${PYTHON_USEDEP}]
+ virtual/python-singledispatch[${PYTHON_USEDEP}]
+ >media-video/rtmpdump-2.4"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]"
diff --git a/net-misc/livestreamer/livestreamer-1.12.1.ebuild b/net-misc/livestreamer/livestreamer-1.12.1.ebuild
new file mode 100644
index 000000000000..805684937b47
--- /dev/null
+++ b/net-misc/livestreamer/livestreamer-1.12.1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DESCRIPTION="CLI tool that pipes video streams from services like twitch.tv into a video player"
+HOMEPAGE="https://github.com/chrippa/livestreamer"
+SRC_URI="https://github.com/chrippa/livestreamer/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+inherit distutils-r1
+
+KEYWORDS="~amd64 ~mips ~x86"
+LICENSE="Apache-2.0 BSD-2 MIT-with-advertising"
+SLOT="0"
+IUSE="doc test"
+
+RDEPEND="dev-python/pycrypto[${PYTHON_USEDEP}]
+ >=dev-python/requests-1.0[${PYTHON_USEDEP}]
+ virtual/python-futures[${PYTHON_USEDEP}]
+ virtual/python-singledispatch[${PYTHON_USEDEP}]
+ >media-video/rtmpdump-2.4"
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+ test? ( ${RDEPEND} )
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
+
+python_compile_all() {
+ use doc && emake -C docs html
+}
+
+python_test() {
+ esetup.py test
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( docs/_build/html/. )
+ distutils-r1_python_install_all
+}
diff --git a/net-misc/livestreamer/livestreamer-1.12.2.ebuild b/net-misc/livestreamer/livestreamer-1.12.2.ebuild
new file mode 100644
index 000000000000..805684937b47
--- /dev/null
+++ b/net-misc/livestreamer/livestreamer-1.12.2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DESCRIPTION="CLI tool that pipes video streams from services like twitch.tv into a video player"
+HOMEPAGE="https://github.com/chrippa/livestreamer"
+SRC_URI="https://github.com/chrippa/livestreamer/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+inherit distutils-r1
+
+KEYWORDS="~amd64 ~mips ~x86"
+LICENSE="Apache-2.0 BSD-2 MIT-with-advertising"
+SLOT="0"
+IUSE="doc test"
+
+RDEPEND="dev-python/pycrypto[${PYTHON_USEDEP}]
+ >=dev-python/requests-1.0[${PYTHON_USEDEP}]
+ virtual/python-futures[${PYTHON_USEDEP}]
+ virtual/python-singledispatch[${PYTHON_USEDEP}]
+ >media-video/rtmpdump-2.4"
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+ test? ( ${RDEPEND} )
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
+
+python_compile_all() {
+ use doc && emake -C docs html
+}
+
+python_test() {
+ esetup.py test
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( docs/_build/html/. )
+ distutils-r1_python_install_all
+}
diff --git a/net-misc/livestreamer/livestreamer-1.7.2.ebuild b/net-misc/livestreamer/livestreamer-1.7.2.ebuild
new file mode 100644
index 000000000000..e163f85aabb6
--- /dev/null
+++ b/net-misc/livestreamer/livestreamer-1.7.2.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DESCRIPTION="CLI tool that pipes video streams from services like twitch.tv into a video player"
+HOMEPAGE="https://github.com/chrippa/livestreamer"
+SRC_URI="https://github.com/chrippa/livestreamer/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+PYTHON_COMPAT=( python2_7 )
+inherit distutils-r1
+
+KEYWORDS="amd64 ~mips x86"
+LICENSE="Apache-2.0 BSD-2 MIT-with-advertising"
+SLOT="0"
+
+RDEPEND="dev-python/pycrypto
+ >=dev-python/requests-1.0
+ >media-video/rtmpdump-2.4"
+DEPEND="${RDEPEND}
+ dev-python/setuptools"
diff --git a/net-misc/livestreamer/metadata.xml b/net-misc/livestreamer/metadata.xml
new file mode 100644
index 000000000000..0cfaa62977f9
--- /dev/null
+++ b/net-misc/livestreamer/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>proxy-maintainers</herd>
+ <maintainer>
+ <email>the.telvanni@gmail.com</email>
+ <name>Guillaume Lespinasse</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">chrippa/livestreamer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/lksctp-tools/Manifest b/net-misc/lksctp-tools/Manifest
new file mode 100644
index 000000000000..1a7cdd135e66
--- /dev/null
+++ b/net-misc/lksctp-tools/Manifest
@@ -0,0 +1,2 @@
+DIST lksctp-tools-1.0.13.tar.gz 564530 SHA256 7c681868a95afc420f941d2f7dc6bfe07658de109aba6969c407ddf213c2f2a5 SHA512 bdcf06223641ca062fd528ad87efbd3ac2a4e721b691bade528ae6d2ad8eaee5a6c0516eff42c83a3afed812c378f3ce782b93efe8ec830d91280b7419ce17b4 WHIRLPOOL a6d02d4ce9a05d40c28d34437f79da2158684d3cab7b9c2ea0ddac61d2c2464af0eb1931865a80bc889a17ea544a93e2125314d9b53c576cf719a09608ef37d4
+DIST lksctp-tools-1.0.16.tar.gz 565446 SHA256 0903dd526b7f30a89d5031aa2c82757612becc38ed7bc6e4f972f8deae351f26 SHA512 ea771f3ffeef4630638ee9cbdf01723d01b1b0ca2e8f147a2b61b907339bd1a0c5d621a58638a3b700b6ffc41de06c7b9002645254a471e279663b64b313f467 WHIRLPOOL cebff8ede44ce9ca82da14b6d5a622876e0b86805672320364bab9ca5c8fc92197c806a88898fbd06598c9120ec5b044d2fd94e3f1814d2742c743217ef12cee
diff --git a/net-misc/lksctp-tools/files/lksctp-tools-1.0.13-build.patch b/net-misc/lksctp-tools/files/lksctp-tools-1.0.13-build.patch
new file mode 100644
index 000000000000..919bb1728aee
--- /dev/null
+++ b/net-misc/lksctp-tools/files/lksctp-tools-1.0.13-build.patch
@@ -0,0 +1,30 @@
+From 2f2ba4e271b91535860705ca5911a3a6e1f64121 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@flameeyes.eu>
+Date: Sat, 23 Feb 2013 23:08:49 -0800
+Subject: [PATCH lksctp-tools] build: fix out-of-tree build of withsctp.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+
+Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
+---
+ src/withsctp/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/withsctp/Makefile.am b/src/withsctp/Makefile.am
+index e091049..cecf606 100644
+--- a/src/withsctp/Makefile.am
++++ b/src/withsctp/Makefile.am
+@@ -10,7 +10,7 @@ include $(top_srcdir)/Makefile.rules
+ bin_PROGRAMS = checksctp
+ bin_SCRIPTS = withsctp
+
+-AM_CPPFLAGS=-I../include
++AM_CPPFLAGS=-I$(top_srcdir)/src/include
+ pkglib_LTLIBRARIES = libwithsctp.la
+ libwithsctp_la_SOURCES = sctp_load_libs.c sctp_socket.c sctp_bind.c \
+ sctp_sockopt.c sctp_socket.h
+--
+1.8.1.2
+
diff --git a/net-misc/lksctp-tools/files/lksctp-tools-1.0.8-prefix.patch b/net-misc/lksctp-tools/files/lksctp-tools-1.0.8-prefix.patch
new file mode 100644
index 000000000000..6e5808468d50
--- /dev/null
+++ b/net-misc/lksctp-tools/files/lksctp-tools-1.0.8-prefix.patch
@@ -0,0 +1,13 @@
+default @bindir@ expands to ${exec_prefix}/bin and default @exec_prefix@
+expands to ${prefix}
+
+--- src/withsctp/withsctp.in
++++ src/withsctp/withsctp.in
+@@ -1,5 +1,7 @@
+ #!/bin/sh
+ # -*- sh -*-
++prefix=@prefix@
++exec_prefix=@exec_prefix@
+ LIBDIR=@libdir@/@PACKAGE@
+ BINDIR=@bindir@
+ export LD_PRELOAD=${LIBDIR}/libwithsctp.so.1.0.6
diff --git a/net-misc/lksctp-tools/lksctp-tools-1.0.13.ebuild b/net-misc/lksctp-tools/lksctp-tools-1.0.13.ebuild
new file mode 100644
index 000000000000..1b0f576b62ef
--- /dev/null
+++ b/net-misc/lksctp-tools/lksctp-tools-1.0.13.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib flag-o-matic autotools autotools-utils
+
+DESCRIPTION="Tools for Linux Kernel Stream Control Transmission Protocol implementation"
+HOMEPAGE="http://lksctp.sourceforge.net/"
+SRC_URI="mirror://sourceforge/lksctp/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2+ LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc ppc64 sparc x86"
+IUSE="kernel_linux static-libs"
+
+# This is only supposed to work with Linux to begin with.
+DEPEND=">=sys-kernel/linux-headers-2.6"
+RDEPEND=""
+
+REQUIRED_USE="kernel_linux"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0.8-prefix.patch #181602
+ epatch "${FILESDIR}"/${P}-build.patch
+ sed -i 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die
+ eautoreconf
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+
+ autotools-utils_src_configure
+}
+
+DOCS=( AUTHORS ChangeLog INSTALL NEWS README ROADMAP )
+
+src_install() {
+ autotools-utils_src_install
+
+ dodoc doc/*txt
+ newdoc src/withsctp/README README.withsctp
+
+ # Don't install static library or libtool file, since this is used
+ # only as preloadable library.
+ use static-libs && rm "${D}"/usr/$(get_libdir)/${PN}/*.a
+}
diff --git a/net-misc/lksctp-tools/lksctp-tools-1.0.16.ebuild b/net-misc/lksctp-tools/lksctp-tools-1.0.16.ebuild
new file mode 100644
index 000000000000..92c033b79dec
--- /dev/null
+++ b/net-misc/lksctp-tools/lksctp-tools-1.0.16.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib flag-o-matic autotools autotools-utils
+
+DESCRIPTION="Tools for Linux Kernel Stream Control Transmission Protocol implementation"
+HOMEPAGE="http://lksctp.sourceforge.net/"
+SRC_URI="mirror://sourceforge/lksctp/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2+ LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86"
+IUSE="kernel_linux static-libs"
+
+# This is only supposed to work with Linux to begin with.
+DEPEND=">=sys-kernel/linux-headers-2.6"
+RDEPEND=""
+
+REQUIRED_USE="kernel_linux"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0.8-prefix.patch #181602
+ eautoreconf
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+
+ autotools-utils_src_configure
+}
+
+DOCS=( AUTHORS ChangeLog INSTALL NEWS README ROADMAP )
+
+src_install() {
+ autotools-utils_src_install
+
+ dodoc doc/*txt
+ newdoc src/withsctp/README README.withsctp
+
+ # Don't install static library or libtool file, since this is used
+ # only as preloadable library.
+ use static-libs && rm "${D}"/usr/$(get_libdir)/${PN}/*.a
+}
diff --git a/net-misc/lksctp-tools/metadata.xml b/net-misc/lksctp-tools/metadata.xml
new file mode 100644
index 000000000000..18b686c7ac57
--- /dev/null
+++ b/net-misc/lksctp-tools/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ <description>
+ Diego and Luca are using SCTP for development, so they'll know
+ if it works
+ </description>
+ </maintainer>
+ <maintainer>
+ <email>lu_zero@gentoo.org</email>
+ <description>
+ Luca and Diego are using SCTP for development, so they'll know
+ if it works
+ </description>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">lksctp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/lldpd/Manifest b/net-misc/lldpd/Manifest
new file mode 100644
index 000000000000..731b417caaba
--- /dev/null
+++ b/net-misc/lldpd/Manifest
@@ -0,0 +1,2 @@
+DIST lldpd-0.7.11.tar.gz 1509215 SHA256 5257169e0de6037e81efb1bcb26f6dd5755e3efa0a025144d6763bdfaf982e6b SHA512 7f5454ef4255a4fae0e323703d607bd93254b8a511984e434539d0305de1298f8bcf481beb2f121876bedc9890e6f1338cc30f5b08d7b5cf261cf87d5bb69bff WHIRLPOOL 710826936318099a562c7503653ce002c60256055e5f34d7328e7bc5397805c5790670efcc746a11f5abb5a2ff1b6590c888a3ccf02048f260f83a6ea855f28a
+DIST lldpd-0.7.13.tar.gz 1523864 SHA256 bbba3ef922f6b6cc6d2c0f008066dc882750557661c54dd1b97ae7936678d92d SHA512 3fa476a3e06e2d5c15a29a3b46bfd2e147bdd55884fef4748f1197454cde45f82d33e4cc66eb70e559a1e3ad150577781d308b2f39c08f86d75412368099d4a5 WHIRLPOOL c641e0f9f21ce9510a7e30f14ccc0ab34c54251ccbec5317a30504f5b4bca4b64e88391d7a252340490a919bb1d13764627404d1f2c2b9d19057f5b4ca561a97
diff --git a/net-misc/lldpd/files/lldpd-0.7.11-bash-completion-dir.patch b/net-misc/lldpd/files/lldpd-0.7.11-bash-completion-dir.patch
new file mode 100644
index 000000000000..9e2735d737a2
--- /dev/null
+++ b/net-misc/lldpd/files/lldpd-0.7.11-bash-completion-dir.patch
@@ -0,0 +1,9 @@
+diff --git a/src/client/Makefile.am b/src/client/Makefile.am
+index 454bdeb..f1580a0 100644
+--- a/src/client/Makefile.am
++++ b/src/client/Makefile.am
+@@ -44,2 +44,2 @@ endif
+-bashcompletiondir = $(sysconfdir)/bash_completion.d
+-dist_bashcompletion_DATA = lldpcli.bash-completion
++bashcompletiondir = $(datadir)/bash-completion/completions
++dist_bashcompletion_DATA = lldpcli
diff --git a/net-misc/lldpd/files/lldpd-0.7.11-zsh-completion-dir.patch b/net-misc/lldpd/files/lldpd-0.7.11-zsh-completion-dir.patch
new file mode 100644
index 000000000000..ff20d9aabc75
--- /dev/null
+++ b/net-misc/lldpd/files/lldpd-0.7.11-zsh-completion-dir.patch
@@ -0,0 +1,7 @@
+diff --git a/src/client/Makefile.am b/src/client/Makefile.am
+index 454bdeb..fd391fd 100644
+--- a/src/client/Makefile.am
++++ b/src/client/Makefile.am
+@@ -46 +46 @@ dist_bashcompletion_DATA = lldpcli.bash-completion
+-zshcompletiondir = $(datadir)/zsh/vendor-completions
++zshcompletiondir = $(datadir)/zsh/site-functions
diff --git a/net-misc/lldpd/files/lldpd-confd-1 b/net-misc/lldpd/files/lldpd-confd-1
new file mode 100644
index 000000000000..f719a1381d80
--- /dev/null
+++ b/net-misc/lldpd/files/lldpd-confd-1
@@ -0,0 +1,5 @@
+# /etc/conf.d/lldpd: config file for /etc/init.d/lldpd
+
+# see man page for lldpd or run `lldpd -h`
+# for valid cmdline options
+#LLDPD_OPTS=""
diff --git a/net-misc/lldpd/files/lldpd-initd-4 b/net-misc/lldpd/files/lldpd-initd-4
new file mode 100644
index 000000000000..49f996cf7984
--- /dev/null
+++ b/net-misc/lldpd/files/lldpd-initd-4
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+name=lldpd
+pidfile=/run/lldpd.pid
+command=/usr/sbin/lldpd
+retry="TERM/10/KILL/5"
+command_args="${LLDPD_OPTS}"
+
+depend() {
+ use net
+}
+
+start_pre() {
+ checkpath --directory /run/lldpd
+}
+
+# vim:ft=gentoo-init-d:noet:ts=4:sts=4:sw=4:
diff --git a/net-misc/lldpd/files/lldpd.service b/net-misc/lldpd/files/lldpd.service
new file mode 100644
index 000000000000..c5be8a830021
--- /dev/null
+++ b/net-misc/lldpd/files/lldpd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Link Layer Discovery Protocol daemon
+After=syslog.target
+After=network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/sbin/lldpd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/lldpd/lldpd-0.7.11-r3.ebuild b/net-misc/lldpd/lldpd-0.7.11-r3.ebuild
new file mode 100644
index 000000000000..c51e9337131d
--- /dev/null
+++ b/net-misc/lldpd/lldpd-0.7.11-r3.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils user systemd bash-completion-r1 autotools
+
+DESCRIPTION="Implementation of IEEE 802.1ab (LLDP)"
+HOMEPAGE="http://vincentbernat.github.com/lldpd/"
+SRC_URI="http://media.luffy.cx/files/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="cdp doc +dot1 +dot3 edp fdp graph jansson json-c +lldpmed seccomp sonmp
+ snmp static-libs readline xml zsh-completion"
+
+RDEPEND=">=dev-libs/libevent-2.0.5
+ snmp? ( net-analyzer/net-snmp[extensible(+)] )
+ xml? ( dev-libs/libxml2 )
+ jansson? ( dev-libs/jansson )
+ json-c? ( dev-libs/json-c )
+ seccomp? ( sys-libs/libseccomp )
+ zsh-completion? ( app-shells/zsh )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? (
+ graph? ( app-doc/doxygen[dot] )
+ !graph? ( app-doc/doxygen )
+ )"
+
+REQUIRED_USE="graph? ( doc ) json-c? ( !jansson )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-zsh-completion-dir.patch
+ "${FILESDIR}"/${P}-bash-completion-dir.patch
+)
+
+pkg_setup() {
+ ebegin "Creating lldpd user and group"
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+ eend $?
+}
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --without-embedded-libevent \
+ --with-privsep-user=${PN} \
+ --with-privsep-group=${PN} \
+ --with-privsep-chroot=/run/${PN} \
+ --with-lldpd-ctl-socket=/run/${PN}.socket \
+ --with-lldpd-pid-file=/run/${PN}.pid \
+ --docdir=/usr/share/doc/${PF} \
+ $(use_enable graph doxygen-dot) \
+ $(use_enable doc doxygen-man) \
+ $(use_enable doc doxygen-pdf) \
+ $(use_enable doc doxygen-html) \
+ $(use_enable cdp) \
+ $(use_enable dot1) \
+ $(use_enable dot3) \
+ $(use_enable edp) \
+ $(use_enable fdp) \
+ $(use_enable lldpmed) \
+ $(use_enable sonmp) \
+ $(use_enable static-libs static) \
+ $(use_with json-c) \
+ $(use_with jansson) \
+ $(use_with readline) \
+ $(use_with seccomp) \
+ $(use_with snmp) \
+ $(use_with xml)
+}
+
+src_compile() {
+ emake
+ use doc && emake doxygen-doc
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ prune_libtool_files
+
+ newinitd "${FILESDIR}"/${PN}-initd-4 ${PN}
+ newconfd "${FILESDIR}"/${PN}-confd-1 ${PN}
+ newbashcomp src/client/lldpcli.bash-completion lldpcli
+
+ use doc && dohtml -r doxygen/html/*
+
+ keepdir /etc/${PN}.d
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
diff --git a/net-misc/lldpd/lldpd-0.7.13.ebuild b/net-misc/lldpd/lldpd-0.7.13.ebuild
new file mode 100644
index 000000000000..ed5c658d6f3c
--- /dev/null
+++ b/net-misc/lldpd/lldpd-0.7.13.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils user systemd bash-completion-r1 autotools
+
+DESCRIPTION="Implementation of IEEE 802.1ab (LLDP)"
+HOMEPAGE="http://vincentbernat.github.com/lldpd/"
+SRC_URI="http://media.luffy.cx/files/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cdp doc +dot1 +dot3 edp fdp graph jansson json-c +lldpmed seccomp sonmp
+ snmp static-libs readline xml zsh-completion"
+
+RDEPEND=">=dev-libs/libevent-2.0.5
+ snmp? ( net-analyzer/net-snmp[extensible(+)] )
+ xml? ( dev-libs/libxml2 )
+ jansson? ( dev-libs/jansson )
+ json-c? ( dev-libs/json-c )
+ seccomp? ( sys-libs/libseccomp )
+ zsh-completion? ( app-shells/zsh )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? (
+ graph? ( app-doc/doxygen[dot] )
+ !graph? ( app-doc/doxygen )
+ )"
+
+REQUIRED_USE="graph? ( doc ) json-c? ( !jansson )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.7.11-zsh-completion-dir.patch
+ "${FILESDIR}"/${PN}-0.7.11-bash-completion-dir.patch
+)
+
+pkg_setup() {
+ ebegin "Creating lldpd user and group"
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+ eend $?
+}
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+ epatch_user
+ eautoreconf
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ --without-embedded-libevent \
+ --with-privsep-user=${PN} \
+ --with-privsep-group=${PN} \
+ --with-privsep-chroot=/run/${PN} \
+ --with-lldpd-ctl-socket=/run/${PN}.socket \
+ --with-lldpd-pid-file=/run/${PN}.pid \
+ --docdir=/usr/share/doc/${PF} \
+ $(use_enable graph doxygen-dot) \
+ $(use_enable doc doxygen-man) \
+ $(use_enable doc doxygen-pdf) \
+ $(use_enable doc doxygen-html) \
+ $(use_enable cdp) \
+ $(use_enable dot1) \
+ $(use_enable dot3) \
+ $(use_enable edp) \
+ $(use_enable fdp) \
+ $(use_enable lldpmed) \
+ $(use_enable sonmp) \
+ $(use_enable static-libs static) \
+ $(use_with json-c) \
+ $(use_with jansson) \
+ $(use_with readline) \
+ $(use_with seccomp) \
+ $(use_with snmp) \
+ $(use_with xml)
+}
+
+src_compile() {
+ emake
+ use doc && emake doxygen-doc
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ prune_libtool_files
+
+ newinitd "${FILESDIR}"/${PN}-initd-4 ${PN}
+ newconfd "${FILESDIR}"/${PN}-confd-1 ${PN}
+ newbashcomp src/client/lldpcli.bash-completion lldpcli
+
+ use doc && dohtml -r doxygen/html/*
+
+ keepdir /etc/${PN}.d
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
diff --git a/net-misc/lldpd/metadata.xml b/net-misc/lldpd/metadata.xml
new file mode 100644
index 000000000000..123423424b46
--- /dev/null
+++ b/net-misc/lldpd/metadata.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>chutzpah@gentoo.org</email>
+ <name>Patrick McLean</name>
+ </maintainer>
+ <longdescription lang="en">
+LLDP (Link Layer Discovery Protocol) (also known as 802.1ab) is an industry standard protocol designed to supplant proprietary Link-Layer protocols such as Extreme's EDP (Extreme Discovery Protocol) and CDP (Cisco Discovery Protocol). The goal of LLDP is to provide an inter-vendor compatible mechanism to deliver Link-Layer notifications to adjacent network devices.
+
+lldpd is a lldp daemon for GNU/Linux and implements both reception and sending. It supports both LLDP and LLDP-MED (contributed by Michael Hanig). It also implements an SNMP subagent for net-snmp to get local and remote LLDP information. The LLDP MIB is partially implemented but the most useful tables are here.
+
+lldpd supports bridge, vlan and bonding. bonding need to be done on real physical devices, not on bridges, vlans, etc. However, vlans can be mapped on the bonding device. You can bridge vlan but not add vlans on bridges. More complex setups may give false results.
+
+A small utility, lldpctl, allows to query information collected through the command line.
+
+lldpd also implements CDP (Cisco Discovery Protocol), FDP (Foundry Discovery Protocol), SONMP (Nortel Discovery Protocol) and EDP (Extreme Discovery Protocol). However, recent versions of IOS should support LLDP and most Extreme stuff support LLDP. When a EDP, CDP or SONMP frame is received on a given interface, lldpd starts sending EDP, CDP or SONMP frame on this interface. Informations collected through EDP/CDP/FDP/SONMP are integrated with other informations and can be queried with lldpctl or through SNMP.
+
+ With the help of lldpd, you can get a map of your network. You may also want to look at Wiremaps or NetDisco which are a web application that helps you to see what is connected to where.
+ </longdescription>
+ <use>
+ <flag name='cdp'>Enable Cisco Discovery Protocol</flag>
+ <flag name='graph'>Create dot graphs in documentations</flag>
+ <flag name='dot1'>Enable Dot1 extension (VLAN stuff)</flag>
+ <flag name='dot3'>Enable Dot3 extension (PHY stuff)</flag>
+ <flag name='edp'>Enable Extreme Discovery Protocol</flag>
+ <flag name='fdp'>Enable Foundry Discovery Protocol</flag>
+ <flag name='jansson'>Enable JSON output via Jansson</flag>
+ <flag name='json-c'>Enable JSON output via json-c</flag>
+ <flag name='lldpmed'>Enable LLDP-MED extension</flag>
+ <flag name='sonmp'>Enable SynOptics Network Management</flag>
+ <flag name='snmp'>Enable the use of SNMP</flag>
+ </use>
+</pkgmetadata>
+
diff --git a/net-misc/logmein-hamachi/Manifest b/net-misc/logmein-hamachi/Manifest
new file mode 100644
index 000000000000..e121ed74997c
--- /dev/null
+++ b/net-misc/logmein-hamachi/Manifest
@@ -0,0 +1,2 @@
+DIST logmein-hamachi-2.1.0.139-x64.tgz 1329615 SHA256 2eda310852e09f34439e8afeeba1614e62a1e91e5aa3947ba530de7c8b5a3ac9 SHA512 e4c0a3de2361f707dfbe168bfa90543f139082624c04b121f3186ecb10aa56a9e9e942989cd1148d6a4fcabedba172bb1196206c14a1124b32d20154ee4be177 WHIRLPOOL f2e890945ccdf48ef409a145037de8a08e310928183c6cf7a2fb1c0f80f6143c4d4e98f88cdf54e754bea27dd1f1fd1fda844a33e702cf4171a2eacaeef08dbc
+DIST logmein-hamachi-2.1.0.139-x86.tgz 1254911 SHA256 103de9c76aceff78ce039dd48e7a71f43a627d833e58b63317e75ab1e2331d80 SHA512 49e5b57563e1599a71bc543c81bb1355b210d432a1daaf3975a1625aafd1cd46233fe8a1914d9309d8116d597abc42cd8cfd75e0729eed4bc379eaab30c808e4 WHIRLPOOL bb014a77f272589a93caadbf162696326849fa8b2398a4a768ab0adf685678debffada0db5a5dbd037afc0141cf771eff15ef13c7c4e91616c1c64df8b5306d5
diff --git a/net-misc/logmein-hamachi/files/logmein-hamachi.confd b/net-misc/logmein-hamachi/files/logmein-hamachi.confd
new file mode 100644
index 000000000000..a4de40249809
--- /dev/null
+++ b/net-misc/logmein-hamachi/files/logmein-hamachi.confd
@@ -0,0 +1,16 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# /etc/conf.d/logmein-hamachi
+# Config file for logmein-hamachi control script
+
+# Location of config, identity and log files
+CONFDIR="/var/lib/logmein-hamachi"
+
+# Your nickname
+# Set it to enable auto-login when starting the service
+NICKNAME=""
+
+# Seconds to wait before auto-login (if enabled)
+WAIT="2"
diff --git a/net-misc/logmein-hamachi/files/logmein-hamachi.initd b/net-misc/logmein-hamachi/files/logmein-hamachi.initd
new file mode 100644
index 000000000000..25dce7d0947a
--- /dev/null
+++ b/net-misc/logmein-hamachi/files/logmein-hamachi.initd
@@ -0,0 +1,77 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DAEMON=/opt/logmein-hamachi/bin/hamachid
+PIDFILE=/var/run/logmein-hamachi/hamachid.pid
+
+depend() {
+ need net
+}
+
+checktun() {
+ [ $(uname -s) = "Linux" ] || return 0
+ [ -e /dev/net/tun ] && return 0
+ modprobe tun && return 0
+
+ eerror "TUN/TAP support is not available in the running kernel"
+ return 1
+}
+
+start_pre() {
+ checkpath -d /var/run/logmein-hamachi
+}
+
+start()
+{
+ # returns
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+
+ checktun || return 2
+
+ ebegin "Starting hamachi"
+
+ start-stop-daemon --quiet --start --exec "${DAEMON}" \
+ --pidfile "${PIDFILE}" -- -c "${CONFDIR}"
+ result=$?
+
+ if [ ${result} -eq 0 ] && [ -n "${NICKNAME}" ]; then
+ # it fails logging in immediately
+ sleep ${WAIT}
+ /usr/bin/hamachi login
+ if [ -z "$(/usr/bin/hamachi | grep 'logged in')" ]; then
+ start-stop-daemon --quiet --stop \
+ --exec "${DAEMON}" --pidfile "${PIDFILE}"
+ result=1
+ else
+ /usr/bin/hamachi set-nick "${NICKNAME}"
+ fi
+ fi
+
+ eend ${result}
+}
+
+stop()
+{
+ # returns
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+
+ ebegin "Stopping hamachi"
+
+ /usr/bin/hamachi logout
+ start-stop-daemon --quiet --stop --exec "${DAEMON}" \
+ --pidfile "${PIDFILE}"
+
+ eend $?
+}
+
+status() {
+ service_started "${SVCNAME}" || return 1
+ /usr/bin/hamachi
+ /usr/bin/hamachi list
+}
diff --git a/net-misc/logmein-hamachi/files/logmein-hamachi.service b/net-misc/logmein-hamachi/files/logmein-hamachi.service
new file mode 100644
index 000000000000..609447e16373
--- /dev/null
+++ b/net-misc/logmein-hamachi/files/logmein-hamachi.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=LogMeIn Hamachi daemon
+After=local-fs.target network.target
+
+[Service]
+ExecStart=/opt/logmein-hamachi/bin/hamachid
+Type=forking
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/logmein-hamachi/logmein-hamachi-2.1.0.139.ebuild b/net-misc/logmein-hamachi/logmein-hamachi-2.1.0.139.ebuild
new file mode 100644
index 000000000000..354b3b98d44d
--- /dev/null
+++ b/net-misc/logmein-hamachi/logmein-hamachi-2.1.0.139.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils linux-info systemd
+
+DESCRIPTION="LogMeIn Hamachi VPN tunneling engine"
+HOMEPAGE="https://secure.logmein.com/products/hamachi"
+SRC_URI="x86? ( https://secure.logmein.com/labs/${P}-x86.tgz )
+ amd64? ( https://secure.logmein.com/labs/${P}-x64.tgz )"
+
+LICENSE="LogMeIn"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+
+RDEPEND="!net-misc/hamachi"
+
+RESTRICT="mirror"
+
+QA_PREBUILT="/opt/${PN}/bin/hamachid"
+QA_PRESTRIPPED="/opt/${PN}/bin/hamachid"
+QA_WX_LOAD="/opt/${PN}/bin/hamachid"
+
+pkg_setup() {
+ einfo "Checking your kernel configuration for TUN/TAP support."
+ CONFIG_CHECK="~TUN"
+ check_extra_config
+}
+
+src_unpack() {
+ unpack ${A}
+ mv "${P}-$(use x86 && echo x86 || echo x64)" "${S}" || die
+}
+
+src_install() {
+ into /opt/${PN}
+ dobin hamachid dnsup dnsdown
+ dosym /opt/${PN}/bin/hamachid /usr/bin/hamachi
+
+ # Config and log directory
+ dodir /var/lib/${PN}
+
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+
+ dodoc CHANGES README
+}
+
+pkg_postinst() {
+ elog "LogMeIn Hamachi2 is installed."
+ elog "Consult the README file on how to configure your client."
+ elog "You can run the client 'hamachi' as root,"
+ elog "or as a user if you add a newline terminated line:"
+ elog "Ipc.User <login name>"
+ elog "to the file '/var/lib/${PN}/h2-engine-override.cfg'"
+ elog "and restart the daemon with"
+ elog "/etc/init.d/${PN} restart"
+ elog "or:"
+ elog "systemctl restart ${PN}"
+ elog "To enable auto-login when the service starts set a nickname in"
+ elog "/etc/conf.d/${PN} (only supported using openRC)"
+}
diff --git a/net-misc/logmein-hamachi/metadata.xml b/net-misc/logmein-hamachi/metadata.xml
new file mode 100644
index 000000000000..c9fafa9c83d1
--- /dev/null
+++ b/net-misc/logmein-hamachi/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>proxy-maintainers</herd>
+ <maintainer>
+ <email>nonno.cicala@libero.it</email>
+ <name>Simone Scanzoni</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/mdidentd/Manifest b/net-misc/mdidentd/Manifest
new file mode 100644
index 000000000000..312bf55fedea
--- /dev/null
+++ b/net-misc/mdidentd/Manifest
@@ -0,0 +1 @@
+DIST ezbounce-1.04c.tar.gz 192630 SHA256 5be7b903e3682aee9d1758f60957486e4aa08da717fc763caab1415454eaebd8
diff --git a/net-misc/mdidentd/files/1.04a-glibc210.patch b/net-misc/mdidentd/files/1.04a-glibc210.patch
new file mode 100644
index 000000000000..9f059cef3309
--- /dev/null
+++ b/net-misc/mdidentd/files/1.04a-glibc210.patch
@@ -0,0 +1,32 @@
+diff -NrU5 ezbounce-1.04c.original/lib/general.cpp ezbounce-1.04c/lib/general.cpp
+--- ezbounce-1.04c.original/lib/general.cpp 2009-08-08 18:50:44.000000000 -0600
++++ ezbounce-1.04c/lib/general.cpp 2009-08-08 18:55:30.000000000 -0600
+@@ -366,11 +366,11 @@
+ while (*p == sep)
+ p++;
+ do {
+ if (numfound == which && *p)
+ {
+- char * next = strchr(p, sep);
++ const char * next = strchr(p, sep);
+ if ((get_rest && buffer) || (!next /* && *(p+1) */) )
+ {
+ if (buffer)
+ safe_strcpy(buffer, p, maxsize);
+ return 1;
+diff -NrU5 ezbounce-1.04c.original/mdidentd/identd.cpp ezbounce-1.04c/mdidentd/identd.cpp
+--- ezbounce-1.04c.original/mdidentd/identd.cpp 2009-08-08 18:50:44.000000000 -0600
++++ ezbounce-1.04c/mdidentd/identd.cpp 2009-08-08 19:00:08.000000000 -0600
+@@ -739,11 +739,11 @@
+ while (*p == sep)
+ p++;
+ do {
+ if (numfound == which && *p)
+ {
+- char * next = strchr(p, sep);
++ const char * next = strchr(p, sep);
+ if ((get_rest && buffer) || (!next /* && *(p+1) */) )
+ {
+ if (buffer)
+ safe_strcpy(buffer, p, maxsize);
+ return 1;
diff --git a/net-misc/mdidentd/files/1.04a-pidfile.patch b/net-misc/mdidentd/files/1.04a-pidfile.patch
new file mode 100644
index 000000000000..ec75f22b85b6
--- /dev/null
+++ b/net-misc/mdidentd/files/1.04a-pidfile.patch
@@ -0,0 +1,17 @@
+--- mdidentd/identd.cpp.orig 2003-11-03 19:21:50.175424408 -0500
++++ mdidentd/identd.cpp 2003-11-03 19:25:05.683702632 -0500
+@@ -709,6 +709,14 @@
+ return -1;
+
+ default:
++ FILE *pidfile;
++ /* make the pid file */
++ pidfile = fopen("/var/run/mdidentd.pid", "w");
++ if (pidfile) {
++ fprintf(pidfile, "%i", xx);
++ fclose(pidfile);
++ } else
++ perror("Could not write pidfile");
+ return xx;
+
+ }
diff --git a/net-misc/mdidentd/files/1.04a-security.patch b/net-misc/mdidentd/files/1.04a-security.patch
new file mode 100644
index 000000000000..70815d38434c
--- /dev/null
+++ b/net-misc/mdidentd/files/1.04a-security.patch
@@ -0,0 +1,77 @@
+--- ezbounce-1.04a/mdidentd/identd.cpp
++++ ezbounce-1.04a/mdidentd/identd.cpp 2003-10-20 20:23:26.000000000 +0000
+@@ -44,6 +44,7 @@
+
+ #include <unistd.h>
+ #include <sys/socket.h>
++#include <pwd.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <arpa/inet.h>
+@@ -76,6 +77,7 @@
+ static bool foreground, auto_kill; /* Some options */
+ bool no_real;
+ static uid_t uid; /* Become this user after binding sock */
++static gid_t gid; /* Primary group of uid */
+ static unsigned int hard_limit; /* Max # of fake idents */
+ static unsigned int num_conns;
+ static unsigned int num_unix;
+@@ -179,10 +181,16 @@
+ id = argv[y+1];
+ if (!id)
+ {
+- fprintf(stderr, "Option '-u' requires numeric user id to follow it\n");
++ fprintf(stderr, "Option '-u' requires user id to follow it\n");
+ exit(1);
+ }
+- uid = (uid_t) atoi(id);
++ struct passwd *pw_ent;
++ if (!(pw_ent = getpwnam(id))) {
++ fprintf(stderr, "Option '-u' requires valid user id to follow it\n");
++ exit(1);
++ }
++ uid = pw_ent->pw_uid;
++ gid = pw_ent->pw_gid;
+ y++;
+ break;
+ case 'h':
+@@ -277,9 +285,6 @@
+ unix_listen_fd = -1;
+ return 0;
+ }
+- /* Must make it world writable if we expect to receive connections
+- on it */
+- fchmod(unix_listen_fd, 0777);
+ return 1;
+ }
+
+@@ -396,7 +401,7 @@
+ * see if matches any of our fake ones, if not..
+ * its time to load the user's other identd.
+ *
+- * Currently replies system name as 'OTHER'.
++ * Currently replies system name as 'UNIX'.
+ */
+ static int reply(conn * c)
+ {
+@@ -422,8 +427,8 @@
+ if (table->lookup(p1, p2, ident, sizeof(ident)))
+ {
+ syslog(LOG_INFO, "Request from %s for: %d , %d ", inet_ntoa(sin.sin_addr), p1, p2);
+- syslog(LOG_INFO, "(fake) reply: %d, %d : USERID : OTHER :%s", p1, p2, ident);
+- fdprintf(c->fd, "%d , %d : USERID : OTHER :%s\r\n",
++ syslog(LOG_INFO, "(fake) reply: %d , %d : USERID : UNIX : %s", p1, p2, ident);
++ fdprintf(c->fd, "%d , %d : USERID : UNIX : %s\r\n",
+ p1, p2, ident);
+ if (auto_kill)
+ table->remove(p1, p2, ident);
+@@ -491,7 +496,8 @@
+ /* we already did this. but it doesn't work. i dunno why.
+ * i am messing up somwhere. dunno where. but we will do it again.
+ * and it will work. so there!! */
+- chmod(MDIDENTD_SOCK_PATH, 0777);
++ chmod(MDIDENTD_SOCK_PATH, 0770);
++ chown(MDIDENTD_SOCK_PATH, uid, gid);
+ #ifndef NOFORK
+ if (!foreground)
+ {
diff --git a/net-misc/mdidentd/files/mdidentd.conf.d b/net-misc/mdidentd/files/mdidentd.conf.d
new file mode 100644
index 000000000000..4b7793565ce0
--- /dev/null
+++ b/net-misc/mdidentd/files/mdidentd.conf.d
@@ -0,0 +1,3 @@
+# /etc/conf.d/mdidentd: config file for /etc/init.d/mdidentd
+
+MDIDENTD_UID=mdidentd
diff --git a/net-misc/mdidentd/files/mdidentd.init.d b/net-misc/mdidentd/files/mdidentd.init.d
new file mode 100644
index 000000000000..a21e287d6fe1
--- /dev/null
+++ b/net-misc/mdidentd/files/mdidentd.init.d
@@ -0,0 +1,21 @@
+#!/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 mdidentd"
+ /usr/sbin/mdidentd -u ${MDIDENTD_UID} -kr /usr/sbin/mdidentd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping mdidentd"
+ kill $(</var/run/mdidentd.pid)
+ eend $?
+ rm -f /var/run/mdidentd.pid
+}
diff --git a/net-misc/mdidentd/mdidentd-1.04c.ebuild b/net-misc/mdidentd/mdidentd-1.04c.ebuild
new file mode 100644
index 000000000000..c028d3059166
--- /dev/null
+++ b/net-misc/mdidentd/mdidentd-1.04c.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils user
+
+DESCRIPTION="This is an identd with provides registering of idents"
+HOMEPAGE="http://druglord.freelsd.org/ezbounce/"
+SRC_URI="http://druglord.freelsd.org/ezbounce/files/ezbounce-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="ssl"
+
+DEPEND="ssl? ( dev-libs/openssl )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/ezbounce-${PV}
+
+pkg_setup() {
+ enewgroup mdidentd
+ enewuser mdidentd -1 -1 /dev/null mdidentd
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/1.04a-security.patch
+ epatch "${FILESDIR}"/1.04a-pidfile.patch
+ epatch "${FILESDIR}"/1.04a-glibc210.patch
+}
+
+src_compile() {
+ econf $(use_with ssl) || die
+ emake CXX="$(tc-getCXX)" -C mdidentd CXX_OPTIMIZATIONS="${CXXFLAGS}" || die
+}
+
+src_install() {
+ dosbin mdidentd/mdidentd || die
+ dodoc mdidentd/README
+
+ newinitd "${FILESDIR}"/mdidentd.init.d mdidentd
+ newconfd "${FILESDIR}"/mdidentd.conf.d mdidentd
+}
diff --git a/net-misc/mdidentd/metadata.xml b/net-misc/mdidentd/metadata.xml
new file mode 100644
index 000000000000..6ef15e900f17
--- /dev/null
+++ b/net-misc/mdidentd/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-irc</herd>
+</pkgmetadata>
diff --git a/net-misc/mediatomb/Manifest b/net-misc/mediatomb/Manifest
new file mode 100644
index 000000000000..f8cf86b6d40d
--- /dev/null
+++ b/net-misc/mediatomb/Manifest
@@ -0,0 +1,4 @@
+DIST mediatomb-0.12.1.tar.gz 1240612 SHA256 31163c34a7b9d1c9735181737cb31306f29f1f2a0335fb4f53ecccf8f62f11cd SHA512 36e7269a532a79c91b4ea7be36f92cbefa913a1f856e422e46fe2b97ee7a569dd20c38b0cbe651a8e7faacde892ea18f3cac66c3c0737480c44f9b9bc3a45438 WHIRLPOOL 6a9e294aa9f8f40850863a86bae4fd6a81d198d7f4cf34d67a6a0cd568c387ef0f0bd5a3524c7bc05cb304f4e86dd0c12dc773bd1034c1924af6919cc740177b
+DIST mediatomb-0.12.2_pre20150118.tar.gz 2413534 SHA256 a892fe02151978433f3604d10f6dca35a935c61ea0988bd10312cdbdb1055a8b SHA512 968b9a91de48396e05ed1c65e77e576fc5b959bce7b2b77cde14f4aa88fbc57ac2b0e6d34f7365a071a01a6c7285f36866097c9e7608eef7e33c3d4d215e0675 WHIRLPOOL c9be68ece751811e9796a5dc43e1852daebbbc7c58fda7867afd23e070e84f8c48d32ca3b2ae2dfc1a422c4443d5d5e74b30841c1dabf35bb00d68336f0287df
+DIST mediatomb_0.12.1-4.debian.tar.gz 34161 SHA256 b1e48d01f4f99362ef554c9220df21c48f6b76ad716e29427948a524e5c84d90 SHA512 21f876de3ec0b24bfcb37d387b5337d574f2e62e12944547f0a2e69e34532e296097fd04cce9941e994c3823a7bb863172db4fc3024d490f2a2359b7f0adb079 WHIRLPOOL ad38bc64411f1aac25672c522b862401897f0e4225ea21bab317a1c3311ef87a3e688f6ea1abb5a30eeb4cb3165dabbbff158eb5d4267dba901a54f15017078d
+DIST mediatomb_0.12.1-5.debian.tar.gz 36001 SHA256 bfbc971eeaeb09791d4cf1b1102a19ca9ce69d67c97608bba7b8ce3b519a8625 SHA512 420cf0d4fc0aa82337f2893ef18f04f9d079d833f2540d6bee504d423e8acee5e5ae528d97f5cd4228d6648777c62d6186532f7a74d3d0cb04f9226a2de1dd95 WHIRLPOOL 3d826181f97873fc9acb67fa5a3171b9e0c60862066cc0dd29e05a4f793828fbcfb438dd1375d56144933d101824a4f498b5dbf1e269e3bb12e4ee53d9b13d59
diff --git a/net-misc/mediatomb/files/mediatomb-0.12.0.confd b/net-misc/mediatomb/files/mediatomb-0.12.0.confd
new file mode 100644
index 000000000000..7f5c00830251
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.12.0.confd
@@ -0,0 +1,28 @@
+# /etc/conf.d/mediatomb: config file for /etc/init.d/mediatomb
+
+# See the mediatomb(1) manpage for more info.
+
+# MediaTomb Web UI port.
+# NOTE: The minimum value allowed is 49152
+MEDIATOMB_PORT=49152
+
+# Run MediaTomb as this user.
+# NOTE: For security reasons do not run MediaTomb as root.
+MEDIATOMB_USER="mediatomb"
+
+# Run MediaTomb as this group.
+# NOTE: For security reasons do not run MediaTomb as root.
+MEDIATOMB_GROUP="mediatomb"
+
+# Path to MediaTomb config file.
+MEDIATOMB_CONFIG="/etc/mediatomb/config.xml"
+
+# Path to MediaTomb log file.
+MEDIATOMB_LOGFILE="/var/log/mediatomb.log"
+
+# Path to MediaTomb pid file.
+MEDIATOMB_PIDFILE="/var/run/mediatomb.pid"
+
+# Other options you want to pass to MediaTomb.
+# Add "--interface ${MEDIATOMB_INTERFACE}" to bind to a named interface.
+MEDIATOMB_OPTIONS=""
diff --git a/net-misc/mediatomb/files/mediatomb-0.12.0.config b/net-misc/mediatomb/files/mediatomb-0.12.0.config
new file mode 100644
index 000000000000..0cd03b15d8e8
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.12.0.config
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<config version="2" xmlns="http://mediatomb.cc/config/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mediatomb.cc/config/2 http://mediatomb.cc/config/2.xsd">
+ <server>
+ <ui enabled="yes" show-tooltips="yes">
+ <accounts enabled="no" session-timeout="30">
+ <account user="mediatomb" password="mediatomb"/>
+ </accounts>
+ </ui>
+ <name>MediaTomb</name>
+ <udn></udn>
+ <home>/var/lib/mediatomb</home>
+ <webroot>/usr/share/mediatomb/web</webroot>
+ <storage>
+ <sqlite3 enabled="yes">
+ <database-file>mediatomb.db</database-file>
+ </sqlite3>
+ <mysql enabled="no">
+ <host>host</host>
+ <database>database</database>
+ <username>username</username>
+ <password>password</password>
+ </mysql>
+ </storage>
+ <protocolInfo extend="yes"/>
+ <pc-directory upnp-hide="no"/>
+ <extended-runtime-options>
+ <ffmpegthumbnailer enabled="no">
+ <thumbnail-size>160</thumbnail-size>
+ <seek-percentage>10</seek-percentage>
+ <filmstrip-overlay>no</filmstrip-overlay>
+ <workaround-bugs>no</workaround-bugs>
+ <image-quality>8</image-quality>
+ </ffmpegthumbnailer>
+ <mark-played-items enabled="no" suppress-cds-updates="yes">
+ <string mode="prepend">*</string>
+ <mark>
+ <content>video</content>
+ </mark>
+ </mark-played-items>
+ <lastfm enabled="no">
+ <username>username</username>
+ <password>password</password>
+ </lastfm>
+ </extended-runtime-options>
+ </server>
+ <import hidden-files="no">
+ <scripting script-charset="UTF-8">
+ <common-script>/usr/share/mediatomb/js/common.js</common-script>
+ <playlist-script>/usr/share/mediatomb/js/playlists.js</playlist-script>
+ <virtual-layout type="builtin">
+ <import-script>/usr/share/mediatomb/js/import.js</import-script>
+ </virtual-layout>
+ </scripting>
+ <mappings>
+ <extension-mimetype ignore-unknown="no">
+ <map from="mp3" to="audio/mpeg"/>
+ <map from="ogx" to="application/ogg"/>
+ <map from="ogv" to="video/ogg"/>
+ <map from="oga" to="audio/ogg"/>
+ <map from="ogg" to="audio/ogg"/>
+ <map from="ogm" to="video/ogg"/>
+ <map from="asf" to="video/x-ms-asf"/>
+ <map from="asx" to="video/x-ms-asf"/>
+ <map from="wma" to="audio/x-ms-wma"/>
+ <map from="wax" to="audio/x-ms-wax"/>
+ <map from="wmv" to="video/x-ms-wmv"/>
+ <map from="wvx" to="video/x-ms-wvx"/>
+ <map from="wm" to="video/x-ms-wm"/>
+ <map from="wmx" to="video/x-ms-wmx"/>
+ <map from="m3u" to="audio/x-mpegurl"/>
+ <map from="pls" to="audio/x-scpls"/>
+ <map from="flv" to="video/x-flv"/>
+ <map from="mkv" to="video/x-matroska"/>
+ <map from="mka" to="audio/x-matroska"/>
+ <map from="avi" to="video/divx"/>
+ <map from="m2ts" to="video/avc"/>
+ <map from="cr2" to="image/raw"/>
+ <map from="nef" to="image/raw"/>
+ </extension-mimetype>
+ <mimetype-upnpclass>
+ <map from="audio/*" to="object.item.audioItem.musicTrack"/>
+ <map from="video/*" to="object.item.videoItem"/>
+ <map from="image/*" to="object.item.imageItem"/>
+ </mimetype-upnpclass>
+ <mimetype-contenttype>
+ <treat mimetype="audio/mpeg" as="mp3"/>
+ <treat mimetype="application/ogg" as="ogg"/>
+ <treat mimetype="video/ogg" as="ogg"/>
+ <treat mimetype="audio/ogg" as="ogg"/>
+ <treat mimetype="audio/x-flac" as="flac"/>
+ <treat mimetype="image/jpeg" as="jpg"/>
+ <treat mimetype="audio/x-mpegurl" as="playlist"/>
+ <treat mimetype="audio/x-scpls" as="playlist"/>
+ <treat mimetype="audio/x-wav" as="pcm"/>
+ <treat mimetype="audio/L16" as="pcm"/>
+ <treat mimetype="video/x-msvideo" as="avi"/>
+ <treat mimetype="video/mp4" as="mp4"/>
+ <treat mimetype="audio/mp4" as="mp4"/>
+ <treat mimetype="video/divx" as="avi"/>
+ </mimetype-contenttype>
+ </mappings>
+ <online-content>
+ <YouTube enabled="no" refresh="28800" update-at-start="yes" purge-after="604800" racy-content="exclude" format="mp4" hd="no">
+ <favorites user="NationalGeographic"/>
+ <playlists user="PlayStation"/>
+ <uploads user="Google"/>
+ <standardfeed feed="most_viewed" time-range="today"/>
+ <standardfeed feed="recently_featured" time-range="today"/>
+ </YouTube>
+ </online-content>
+ </import>
+ <transcoding enabled="no">
+ <mimetype-profile-mappings>
+ <transcode mimetype="audio/ogg" using="audio2pcm"/>
+ <transcode mimetype="audio/x-flac" using="audio2pcm"/>
+ <transcode mimetype="video/ogg" using="video2mpeg"/>
+ <transcode mimetype="video/x-flv" using="video2mpeg"/>
+ </mimetype-profile-mappings>
+ <profiles>
+ <profile name="audio2pcm" enabled="yes" type="external">
+ <mimetype>audio/L16</mimetype>
+ <accept-url>no</accept-url>
+ <first-resource>yes</first-resource>
+ <hide-original-resource>yes</hide-original-resource>
+ <accept-ogg-theora>no</accept-ogg-theora>
+ <sample-frequency>44100</sample-frequency>
+ <audio-channels>2</audio-channels>
+ <agent command="ffmpeg" arguments="-i %in -acodec pcm_s16be -ab 192k -ar 44100 -ac 2 -f s16be -y %out"/>
+ <buffer size="1048576" chunk-size="131072" fill-size="262144"/>
+ </profile>
+ <profile name="video2mpeg" enabled="yes" type="external">
+ <mimetype>video/mpeg</mimetype>
+ <accept-url>no</accept-url>
+ <first-resource>yes</first-resource>
+ <hide-original-resource>yes</hide-original-resource>
+ <accept-ogg-theora>yes</accept-ogg-theora>
+ <sample-frequency>48000</sample-frequency>
+ <audio-channels>2</audio-channels>
+ <agent command="ffmpeg" arguments="-i %in -vcodec mpeg2video -b 4096k -r 25 -acodec mp2 -ab 192k -ar 48000 -ac 2 -async 1 -f dvd -threads 2 -y %out"/>
+ <buffer size="10485760" chunk-size="262144" fill-size="524288"/>
+ </profile>
+ </profiles>
+ </transcoding>
+</config>
diff --git a/net-misc/mediatomb/files/mediatomb-0.12.0.initd b/net-misc/mediatomb/files/mediatomb-0.12.0.initd
new file mode 100644
index 000000000000..5f6112b3499b
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.12.0.initd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+
+depend() {
+ need net #MYSQL#
+}
+
+start() {
+ ebegin "Starting MediaTomb"
+ start-stop-daemon --start --quiet --exec /usr/bin/mediatomb \
+ --pidfile ${MEDIATOMB_PIDFILE} -- --daemon \
+ --pidfile ${MEDIATOMB_PIDFILE} --user ${MEDIATOMB_USER} \
+ --group ${MEDIATOMB_GROUP} --logfile ${MEDIATOMB_LOGFILE} \
+ --config ${MEDIATOMB_CONFIG} --port ${MEDIATOMB_PORT} \
+ ${MEDIATOMB_OPTIONS}
+ eend $?
+}
+
+stop () {
+ ebegin "Stopping MediaTomb"
+ start-stop-daemon --stop --retry 10 --quiet --pidfile ${MEDIATOMB_PIDFILE}
+ eend $?
+}
diff --git a/net-misc/mediatomb/files/mediatomb-0.12.1-avformatcontext-pointer.patch b/net-misc/mediatomb/files/mediatomb-0.12.1-avformatcontext-pointer.patch
new file mode 100644
index 000000000000..ab3e7cf7e17d
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.12.1-avformatcontext-pointer.patch
@@ -0,0 +1,19 @@
+When opening a file to check its avformat, the AVFormatContext pointer was
+not initialized to NULL before it was passed by reference to the open
+function.
+
+Patch by Bradley Broom <bmbroom@gmail.com>
+
+https://bugs.gentoo.org/show_bug.cgi?id=446922
+
+--- mediatomb-0.12.1/src/metadata/ffmpeg_handler.cc
++++ mediatomb-0.12.1/src/metadata/ffmpeg_handler.cc
+@@ -281,7 +281,7 @@
+ int x = 0;
+ int y = 0;
+
+- AVFormatContext *pFormatCtx;
++ AVFormatContext *pFormatCtx = NULL;
+
+ // Suppress all log messages
+ av_log_set_callback(FfmpegNoOutputStub);
diff --git a/net-misc/mediatomb/files/mediatomb-0.12.1-flac-metadata.patch b/net-misc/mediatomb/files/mediatomb-0.12.1-flac-metadata.patch
new file mode 100644
index 000000000000..0228dffd08d8
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.12.1-flac-metadata.patch
@@ -0,0 +1,446 @@
+diff -urpN a/build/Makefile.am b/build/Makefile.am
+--- a/build/Makefile.am 2010-03-22 21:39:46.000000000 +1100
++++ b/build/Makefile.am 2013-12-16 10:16:32.426878578 +1100
+@@ -18,6 +18,7 @@ libmediatomb_a_CXXFLAGS = \
+ $(ICONV_CXXFLAGS) \
+ $(LIBMAGIC_CFLAGS) \
+ $(ID3LIB_CFLAGS) \
++ $(FLAC_CFLAGS) \
+ $(LIBEXIF_CFLAGS) \
+ $(ZLIB_CFLAGS) \
+ $(PTHREAD_CFLAGS) \
+@@ -44,6 +45,7 @@ mediatomb_CXXFLAGS = -I$(top_srcdir)/src
+ $(ICONV_CXXFLAGS) \
+ $(LIBMAGIC_CFLAGS) \
+ $(ID3LIB_CFLAGS) \
++ $(FLAC_CFLAGS) \
+ $(LIBEXIF_CFLAGS) \
+ $(ZLIB_CFLAGS) \
+ $(PTHREAD_CFLAGS) \
+@@ -78,6 +80,7 @@ mediatomb_LDADD = \
+ $(JS_LIBS) \
+ $(LIBMAGIC_LIBS) \
+ $(ID3LIB_LIBS) \
++ $(FLAC_LIBS) \
+ $(LIBEXIF_LIBS) \
+ $(ZLIB_LIBS) \
+ $(RT_LIBS) \
+diff -urpN a/build/libmediatomb_src b/build/libmediatomb_src
+--- a/build/libmediatomb_src 2010-03-23 04:09:53.000000000 +1100
++++ b/build/libmediatomb_src 2013-12-16 10:14:49.730356868 +1100
+@@ -98,6 +98,8 @@ libmediatomb_a_SOURCES = \
+ ../src/metadata/libmp4v2_handler.h \
+ ../src/metadata/taglib_handler.cc \
+ ../src/metadata/taglib_handler.h \
++../src/metadata/flac_handler.cc \
++../src/metadata/flac_handler.h \
+ ../src/mpegdemux/buffer.c \
+ ../src/mpegdemux/buffer.h \
+ ../src/mpegdemux/mpegdemux.c \
+diff -urpN a/configure.ac b/configure.ac
+--- a/configure.ac 2010-04-08 08:38:51.000000000 +1000
++++ b/configure.ac 2013-12-16 10:24:16.547793225 +1100
+@@ -1314,6 +1314,35 @@ LDFLAGS="$LDFLAGS_SAVE"
+ LIBS="$LIBS_SAVE"
+ CXXFLAGS="$CXXFLAGS_SAVE"
+ CPPFLAGS="$CPPFLAGS_SAVE"
++
++######### FLAC
++
++FLAC_STATUS=
++
++MT_OPTION([FLAC], [enable],
++ [FLAC metadata extraction with the help of FLAC],[],[])
++
++if test "x$FLAC_OPTION_ENABLED" = xyes; then
++ MT_CHECK_PACKAGE([FLAC],
++ [FLAC/metadata],
++ [FLAC], [main])
++else
++ FLAC_STATUS=disabled
++fi
++
++if test "x$FLAC_STATUS" != xyes; then
++ if (test "x$FLAC_OPTION_REQUESTED" = xyes) &&
++ (test "x$FLAC_OPTION_ENABLED" = xyes); then
++ AC_MSG_ERROR([unable to configure FLAC support])
++ fi
++else
++ CFLAGS="$CFLAGS $FLAC_CFLAGS"
++ CXXFLAGS="$CXXFLAGS $FLAC_CFLAGS"
++ LDFLAGS="$LDFLAGS $FLAC_LDFLAGS $FLAC_LIBS"
++ AC_LANG_SAVE
++ AC_LANG_CPLUSPLUS
++fi
++
+ ######## curl
+
+ CURL_PROG_FOUND=0
+@@ -1914,7 +1943,7 @@ if (test "x$SOPCAST_OPTION_ENABLED" = xy
+ AC_DEFINE([SOPCAST], [1], [Enable support for the SopCast service])
+ fi
+
+-AC_DEFINE_UNQUOTED([COMPILE_INFO], "\thost:\t\t\t$host\n\tsqlite3:\t\t$SQLITE3_STATUS\n\tmysql:\t\t\t$MYSQL_STATUS\n\tlibjs:\t\t\t$JS_OK\n\tlibmagic:\t\t$LIBMAGIC_STATUS\n\tinotify:\t\t$INOTIFY_STATUS\n\tlibexif:\t\t$LIBEXIF_STATUS\n\tid3lib:\t\t\t$ID3LIB_STATUS\n\ttaglib:\t\t\t$TAGLIB_STATUS\n\tffmpeg\t\t\t$FFMPEG_STATUS\n\tlibmp4v2:\t\t$LIBMP4V2_STATUS\n\texternal transcoding:\t$EXTERNAL_TRANSCODING_OPTION_ENABLED\n\tcurl:\t\t\t$CURL_OK\n\tYouTube:\t\t$YOUTUBE_OPTION_ENABLED\n\tlibextractor\t\t$LIBEXTRACTOR_STATUS\n\tdb-autocreate:\t\t$DB_AUTOCREATE_OPTION_ENABLED\n\tdebug log:\t\t$DEBUG_LOG_OPTION_ENABLED\n\tprotocol info extension:$PROTOCOLINFO_EXTENSION_OPTION_ENABLED\n\tffmpegthumbnailer:\t$FFMPEGTHUMBNAILER_STATUS\n\tlastfmlib:\t\t$LASTFMLIB_STATUS\n\tdata directory:\t\t$PACKAGE_DATADIR", [compile option summary])
++AC_DEFINE_UNQUOTED([COMPILE_INFO], "\thost:\t\t\t$host\n\tsqlite3:\t\t$SQLITE3_STATUS\n\tmysql:\t\t\t$MYSQL_STATUS\n\tlibjs:\t\t\t$JS_OK\n\tlibmagic:\t\t$LIBMAGIC_STATUS\n\tinotify:\t\t$INOTIFY_STATUS\n\tlibexif:\t\t$LIBEXIF_STATUS\n\tid3lib:\t\t\t$ID3LIB_STATUS\n\ttaglib:\t\t\t$TAGLIB_STATUS\n\tFLAC:\t\t\t$FLAC_STATUS\n\tffmpeg\t\t\t$FFMPEG_STATUS\n\tlibmp4v2:\t\t$LIBMP4V2_STATUS\n\texternal transcoding:\t$EXTERNAL_TRANSCODING_OPTION_ENABLED\n\tcurl:\t\t\t$CURL_OK\n\tYouTube:\t\t$YOUTUBE_OPTION_ENABLED\n\tlibextractor\t\t$LIBEXTRACTOR_STATUS\n\tdb-autocreate:\t\t$DB_AUTOCREATE_OPTION_ENABLED\n\tdebug log:\t\t$DEBUG_LOG_OPTION_ENABLED\n\tprotocol info extension:$PROTOCOLINFO_EXTENSION_OPTION_ENABLED\n\tffmpegthumbnailer:\t$FFMPEGTHUMBNAILER_STATUS\n\tlastfmlib:\t\t$LASTFMLIB_STATUS\n\tdata directory:\t\t$PACKAGE_DATADIR", [compile option summary])
+
+ ###############
+ AC_CONFIG_FILES([
+@@ -1946,6 +1975,7 @@ echo "inotify : $INOTIFY_S
+ echo "libexif : $LIBEXIF_STATUS"
+ echo "id3lib : $ID3LIB_STATUS"
+ echo "taglib : $TAGLIB_STATUS"
++echo "FLAC : $FLAC_STATUS"
+ echo "libmp4v2 : $LIBMP4V2_STATUS"
+ echo "ffmpeg : $FFMPEG_STATUS"
+ echo "ffmpegthumbnailer : $FFMPEGTHUMBNAILER_STATUS"
+diff -urpN a/src/cds_resource_manager.cc b/src/cds_resource_manager.cc
+--- a/src/cds_resource_manager.cc 2010-03-26 01:58:11.000000000 +1100
++++ b/src/cds_resource_manager.cc 2013-12-16 10:25:15.277987292 +1100
+@@ -372,6 +372,7 @@ void CdsResourceManager::addResources(Re
+ // only add upnp:AlbumArtURI if we have an AA, skip the resource
+ if ((i > 0) && ((item->getResource(i)->getHandlerType() == CH_ID3) ||
+ (item->getResource(i)->getHandlerType() == CH_MP4) ||
++ (item->getResource(i)->getHandlerType() == CH_FLAC) ||
+ (item->getResource(i)->getHandlerType() == CH_EXTURL)))
+ {
+ String rct;
+diff -urpN a/src/config_manager.cc b/src/config_manager.cc
+--- a/src/config_manager.cc 2010-03-26 01:58:11.000000000 +1100
++++ b/src/config_manager.cc 2013-12-16 10:26:57.220886235 +1100
+@@ -624,6 +624,10 @@ String ConfigManager::createDefaultConfi
+ _(CONTENT_TYPE_OGG)));
+ mtcontent->appendElementChild(treat_as(_("audio/x-flac"),
+ _(CONTENT_TYPE_FLAC)));
++ mtcontent->appendElementChild(treat_as(_("audio/x-ms-wma"),
++ _(CONTENT_TYPE_WMA)));
++ mtcontent->appendElementChild(treat_as(_("audio/x-wavpack"),
++ _(CONTENT_TYPE_WAVPACK)));
+ mtcontent->appendElementChild(treat_as(_("image/jpeg"),
+ _(CONTENT_TYPE_JPG)));
+ mtcontent->appendElementChild(treat_as(_("audio/x-mpegurl"),
+diff -urpN a/src/metadata/flac_handler.cc b/src/metadata/flac_handler.cc
+--- a/src/metadata/flac_handler.cc 1970-01-01 10:00:00.000000000 +1000
++++ b/src/metadata/flac_handler.cc 2013-12-16 10:30:19.955604387 +1100
+@@ -0,0 +1,204 @@
++/*MT*
++
++ MediaTomb - http://www.mediatomb.cc/
++
++ flac_handler.cc - this file is part of MediaTomb.
++
++ Copyright (C) 2005 Gena Batyan <bgeradz@mediatomb.cc>,
++ Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
++
++ Copyright (C) 2006-2009 Gena Batyan <bgeradz@mediatomb.cc>,
++ Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>,
++ Leonhard Wimmer <leo@mediatomb.cc>
++
++ MediaTomb is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License version 2
++ as published by the Free Software Foundation.
++
++ MediaTomb is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ version 2 along with MediaTomb; if not, write to the Free Software
++ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
++
++ # $Id$
++*/
++
++/// \file flac_handler.cc
++/// \brief Implementeation of the FlacHandler class.
++
++#ifdef HAVE_CONFIG_H
++ #include "autoconfig.h"
++#endif
++
++#ifdef HAVE_FLAC
++
++#include <FLAC/all.h>
++
++#include "flac_handler.h"
++#include "string_converter.h"
++#include "config_manager.h"
++#include "common.h"
++#include "tools.h"
++#include "mem_io_handler.h"
++
++#include "content_manager.h"
++
++using namespace zmm;
++
++FlacHandler::FlacHandler() : MetadataHandler()
++{
++}
++
++static void addField(metadata_fields_t field, const FLAC__StreamMetadata* tags, Ref<CdsItem> item)
++{
++ String value;
++ int i;
++
++ Ref<StringConverter> sc = StringConverter::i2i(); // sure is sure
++
++ switch (field)
++ {
++ case M_TITLE:
++ i = FLAC__metadata_object_vorbiscomment_find_entry_from(tags, /*offset=*/0, "TITLE");
++ break;
++ case M_ARTIST:
++ i = FLAC__metadata_object_vorbiscomment_find_entry_from(tags, /*offset=*/0, "ARTIST");
++ break;
++ case M_ALBUM:
++ i = FLAC__metadata_object_vorbiscomment_find_entry_from(tags, /*offset=*/0, "ALBUM");
++ break;
++ case M_DATE:
++ i = FLAC__metadata_object_vorbiscomment_find_entry_from(tags, /*offset=*/0, "DATE");
++ break;
++ case M_GENRE:
++ i = FLAC__metadata_object_vorbiscomment_find_entry_from(tags, /*offset=*/0, "GENRE");
++ break;
++ case M_DESCRIPTION:
++ i = FLAC__metadata_object_vorbiscomment_find_entry_from(tags, /*offset=*/0, "DESCRIPTION");
++ break;
++ case M_TRACKNUMBER:
++ i = FLAC__metadata_object_vorbiscomment_find_entry_from(tags, /*offset=*/0, "TRACKNUMBER");
++ break;
++ default:
++ return;
++ }
++
++ if( 0 <= i )
++ value = strchr((const char *)tags->data.vorbis_comment.comments[i].entry, '=') + 1;
++ else
++ return;
++
++ value = trim_string(value);
++
++ if (string_ok(value))
++ {
++ item->setMetadata(MT_KEYS[field].upnp, sc->convert(value));
++ log_debug("Setting metadata on item: %d, %s\n", field, sc->convert(value).c_str());
++ }
++}
++
++void FlacHandler::fillMetadata(Ref<CdsItem> item)
++{
++ FLAC__StreamMetadata* tags = NULL;
++ FLAC__StreamMetadata streaminfo;
++ Ref<StringConverter> sc = StringConverter::i2i(); // sure is sure
++
++ if( !FLAC__metadata_get_tags(item->getLocation().c_str(), &tags) )
++ return;
++
++ if( FLAC__METADATA_TYPE_VORBIS_COMMENT == tags->type )
++ {
++ for (int i = 0; i < M_MAX; i++)
++ addField((metadata_fields_t) i, tags, item);
++ }
++
++ FLAC__metadata_object_delete(tags);
++ tags = NULL;
++
++ if( !FLAC__metadata_get_streaminfo(item->getLocation().c_str(), &streaminfo) )
++ return;
++
++ if( FLAC__METADATA_TYPE_STREAMINFO == streaminfo.type )
++ {
++ // note: UPnP requires bytes/second
++ item->getResource(0)->addAttribute(MetadataHandler::getResAttrName(R_BITRATE), String::from((unsigned)((streaminfo.data.stream_info.bits_per_sample * streaminfo.data.stream_info.sample_rate) / 8)));
++ // note: UPnP requires HMS
++ item->getResource(0)->addAttribute(MetadataHandler::getResAttrName(R_DURATION), secondsToHMS((unsigned)(streaminfo.data.stream_info.total_samples / streaminfo.data.stream_info.sample_rate)));
++ item->getResource(0)->addAttribute(MetadataHandler::getResAttrName(R_SAMPLEFREQUENCY), String::from(streaminfo.data.stream_info.sample_rate));
++ item->getResource(0)->addAttribute(MetadataHandler::getResAttrName(R_NRAUDIOCHANNELS), String::from(streaminfo.data.stream_info.channels));
++ }
++
++ if( !FLAC__metadata_get_picture(item->getLocation().c_str(),
++ &tags,
++ FLAC__STREAM_METADATA_PICTURE_TYPE_FRONT_COVER,
++ NULL,
++ NULL,
++ (unsigned)-1,
++ (unsigned)-1,
++ (unsigned)-1,
++ (unsigned)-1 ) )
++ return;
++
++ if( FLAC__METADATA_TYPE_PICTURE == tags->type )
++ {
++ String art_mimetype = tags->data.picture.mime_type;
++ log_debug("Mime type : %s\n", sc->convert(art_mimetype).c_str());
++
++ // saw that simply "PNG" was used with some mp3's, so mimetype setting
++ // was probably invalid
++ if (!string_ok(art_mimetype) || (art_mimetype.index('/') == -1))
++ {
++#ifdef HAVE_MAGIC
++ art_mimetype = ContentManager::getInstance()->getMimeTypeFromBuffer((void *)tags->data.picture.data, tags->data.picture.data_length);
++ if (!string_ok(art_mimetype))
++#endif
++ art_mimetype = _(MIMETYPE_DEFAULT);
++
++ log_debug("Mime type via magic: %s\n", sc->convert(art_mimetype).c_str());
++ }
++
++ // if we could not determine the mimetype, then there is no
++ // point to add the resource - it's probably garbage
++ if (art_mimetype != _(MIMETYPE_DEFAULT))
++ {
++ Ref<CdsResource> resource(new CdsResource(CH_FLAC));
++ resource->addAttribute(MetadataHandler::getResAttrName(R_PROTOCOLINFO), renderProtocolInfo(art_mimetype));
++ resource->addParameter(_(RESOURCE_CONTENT_TYPE), _(ID3_ALBUM_ART));
++ item->addResource(resource);
++ }
++ }
++
++ FLAC__metadata_object_delete(tags);
++}
++
++Ref<IOHandler> FlacHandler::serveContent(Ref<CdsItem> item, int resNum, off_t *data_size)
++{
++ FLAC__StreamMetadata* picture = NULL;
++
++ if( !FLAC__metadata_get_picture(item->getLocation().c_str(),
++ &picture,
++ FLAC__STREAM_METADATA_PICTURE_TYPE_FRONT_COVER,
++ NULL,
++ NULL,
++ (unsigned)-1,
++ (unsigned)-1,
++ (unsigned)-1,
++ (unsigned)-1 ) )
++ throw _Exception(_("FlacHandler: could not exctract cover from: ") + item->getLocation());
++
++ if( FLAC__METADATA_TYPE_PICTURE != picture->type )
++ throw _Exception(_("TagHandler: resource has no album information"));
++
++ Ref<IOHandler> h(new MemIOHandler((void *)picture->data.picture.data, picture->data.picture.data_length));
++ *data_size = picture->data.picture.data_length;
++
++ FLAC__metadata_object_delete(picture);
++
++ return h;
++}
++
++#endif // HAVE_FLAC
+diff -urpN a/src/metadata/flac_handler.h b/src/metadata/flac_handler.h
+--- a/src/metadata/flac_handler.h 1970-01-01 10:00:00.000000000 +1000
++++ b/src/metadata/flac_handler.h 2013-12-16 10:31:24.061822827 +1100
+@@ -0,0 +1,47 @@
++/*MT*
++
++ MediaTomb - http://www.mediatomb.cc/
++
++ flac_handler.h - this file is part of MediaTomb.
++
++ Copyright (C) 2005 Gena Batyan <bgeradz@mediatomb.cc>,
++ Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
++
++ Copyright (C) 2006-2009 Gena Batyan <bgeradz@mediatomb.cc>,
++ Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>,
++ Leonhard Wimmer <leo@mediatomb.cc>
++
++ MediaTomb is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License version 2
++ as published by the Free Software Foundation.
++
++ MediaTomb is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ version 2 along with MediaTomb; if not, write to the Free Software
++ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
++
++ # $Id$
++*/
++
++/// \file flac_handler.h
++/// \brief Definition of the FlacHandler class.
++
++#ifndef __METADATA_FLAC_H__
++#define __METADATA_FLAC_H__
++
++#include "metadata_handler.h"
++
++/// \brief This class is responsible for reading FLAC metadata
++class FlacHandler : public MetadataHandler
++{
++public:
++ FlacHandler();
++ virtual void fillMetadata(zmm::Ref<CdsItem> item);
++ virtual zmm::Ref<IOHandler> serveContent(zmm::Ref<CdsItem> item, int resNum, off_t *data_size);
++};
++
++#endif // __METADATA_FLAC_H__
+diff -urpN a/src/metadata_handler.cc b/src/metadata_handler.cc
+--- a/src/metadata_handler.cc 2010-03-26 01:58:11.000000000 +1100
++++ b/src/metadata_handler.cc 2013-12-16 10:35:48.783540865 +1100
+@@ -51,6 +51,10 @@
+ #endif // HAVE_ID3LIB
+ #endif // HAVE_TAGLIB
+
++#ifdef HAVE_FLAC
++#include "metadata/flac_handler.h"
++#endif
++
+ #ifdef HAVE_LIBMP4V2
+ #include "metadata/libmp4v2_handler.h"
+ #endif
+@@ -140,7 +144,8 @@ void MetadataHandler::setMetadata(Ref<Cd
+ if ((content_type == CONTENT_TYPE_MP3) ||
+ ((content_type == CONTENT_TYPE_OGG) &&
+ (!item->getFlag(OBJECT_FLAG_OGG_THEORA))) ||
+- (content_type == CONTENT_TYPE_FLAC))
++ (content_type == CONTENT_TYPE_WMA) ||
++ (content_type == CONTENT_TYPE_WAVPACK))
+ {
+ handler = Ref<MetadataHandler>(new TagHandler());
+ break;
+@@ -155,7 +160,13 @@ void MetadataHandler::setMetadata(Ref<Cd
+ #endif // HAVE_ID3LIB
+ #endif // HAVE_TAGLIB
+
+-
++#ifdef HAVE_FLAC
++ if (content_type == CONTENT_TYPE_FLAC)
++ {
++ handler = Ref<MetadataHandler>(new FlacHandler());
++ break;
++ }
++#endif
+
+ #ifdef HAVE_EXIV2
+ /*
+@@ -277,6 +288,10 @@ Ref<MetadataHandler> MetadataHandler::cr
+ case CH_FFTH:
+ return Ref<MetadataHandler>(new FfmpegHandler());
+ #endif
++#ifdef HAVE_FLAC
++ case CH_FLAC:
++ return Ref<MetadataHandler>(new FlacHandler());
++#endif
+ default:
+ throw _Exception(_("unknown content handler ID: ") + handlerType);
+ }
+diff -urpN a/src/metadata_handler.h b/src/metadata_handler.h
+--- a/src/metadata_handler.h 2010-03-26 01:58:11.000000000 +1100
++++ b/src/metadata_handler.h 2013-12-16 10:52:23.234353526 +1100
+@@ -45,10 +45,13 @@
+ #define CH_EXTURL 4
+ #define CH_MP4 5
+ #define CH_FFTH 6
++#define CH_FLAC 7
+
+ #define CONTENT_TYPE_MP3 "mp3"
+ #define CONTENT_TYPE_OGG "ogg"
+ #define CONTENT_TYPE_FLAC "flac"
++#define CONTENT_TYPE_WMA "wma"
++#define CONTENT_TYPE_WAVPACK "wv"
+ #define CONTENT_TYPE_JPG "jpg"
+ #define CONTENT_TYPE_PLAYLIST "playlist"
+ #define CONTENT_TYPE_MP4 "mp4"
diff --git a/net-misc/mediatomb/files/mediatomb-0.12.1-inotify-hard-links.patch b/net-misc/mediatomb/files/mediatomb-0.12.1-inotify-hard-links.patch
new file mode 100644
index 000000000000..af9a887befe0
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.12.1-inotify-hard-links.patch
@@ -0,0 +1,34 @@
+make sure new hard links get processed like new files by handling
+the IN_CREATE flag properly
+
+patch by Mike Frysinger
+
+--- a/src/autoscan_inotify.cc
++++ b/src/autoscan_inotify.cc
+@@ -281,7 +284,7 @@
+ }
+ }
+
+- if (adir != nil && mask & (IN_DELETE | IN_DELETE_SELF | IN_MOVE_SELF | IN_CLOSE_WRITE | IN_MOVED_FROM | IN_MOVED_TO | IN_UNMOUNT))
++ if (adir != nil && mask & (IN_DELETE | IN_DELETE_SELF | IN_MOVE_SELF | IN_CLOSE_WRITE | IN_MOVED_FROM | IN_MOVED_TO | IN_UNMOUNT | IN_CREATE))
+ {
+ String fullPath;
+ if (mask & IN_ISDIR)
+@@ -289,7 +292,7 @@
+ else
+ fullPath = path;
+
+- if (! (mask & IN_MOVED_TO))
++ if (! (mask & (IN_MOVED_TO | IN_CREATE)))
+ {
+ log_debug("deleting %s\n", fullPath.c_str());
+
+@@ -312,7 +315,7 @@
+ if (objectID != INVALID_OBJECT_ID)
+ cm->removeObject(objectID);
+ }
+- if (mask & (IN_CLOSE_WRITE | IN_MOVED_TO))
++ if (mask & (IN_CLOSE_WRITE | IN_MOVED_TO | IN_CREATE))
+ {
+ log_debug("adding %s\n", path.c_str());
+ // path, recursive, async, hidden, low priority, cancellable
diff --git a/net-misc/mediatomb/files/mediatomb-0.12.1-libav9.patch b/net-misc/mediatomb/files/mediatomb-0.12.1-libav9.patch
new file mode 100644
index 000000000000..7193b7c03cd4
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.12.1-libav9.patch
@@ -0,0 +1,42 @@
+diff -burN mediatomb-0.12.1.old//src/metadata/ffmpeg_handler.cc mediatomb-0.12.1/src/metadata/ffmpeg_handler.cc
+--- mediatomb-0.12.1.old//src/metadata/ffmpeg_handler.cc 2012-11-25 14:55:05.335753129 +0100
++++ mediatomb-0.12.1/src/metadata/ffmpeg_handler.cc 2012-11-25 15:29:42.840677486 +0100
+@@ -110,8 +110,8 @@
+ return;
+ for (const mapping_t *m = mapping; m->avname != NULL; m++)
+ {
+- AVMetadataTag *tag = NULL;
+- tag = av_metadata_get(pFormatCtx->metadata, m->avname, NULL, 0);
++ AVDictionaryEntry *tag = NULL;
++ tag = av_dict_get(pFormatCtx->metadata, m->avname, NULL, 0);
+ if (tag && tag->value && tag->value[0])
+ {
+ log_debug("Added metadata %s: %s\n", m->avname, tag->value);
+@@ -290,14 +290,14 @@
+ av_register_all();
+
+ // Open video file
+- if (av_open_input_file(&pFormatCtx,
+- item->getLocation().c_str(), NULL, 0, NULL) != 0)
++ if (avformat_open_input(&pFormatCtx,
++ item->getLocation().c_str(), NULL, NULL) != 0)
+ return; // Couldn't open file
+
+ // Retrieve stream information
+- if (av_find_stream_info(pFormatCtx) < 0)
++ if (avformat_find_stream_info(pFormatCtx, NULL) < 0)
+ {
+- av_close_input_file(pFormatCtx);
++ avformat_close_input(&pFormatCtx);
+ return; // Couldn't find stream information
+ }
+ // Add metadata using ffmpeg library calls
+@@ -306,7 +306,7 @@
+ addFfmpegResourceFields(item, pFormatCtx, &x, &y);
+
+ // Close the video file
+- av_close_input_file(pFormatCtx);
++ avformat_close_input(&pFormatCtx);
+ }
+
+ static bool _mkdir(const char *path)
diff --git a/net-misc/mediatomb/files/mediatomb-0.12.1-libextractor.patch b/net-misc/mediatomb/files/mediatomb-0.12.1-libextractor.patch
new file mode 100644
index 000000000000..e46aca9c487f
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.12.1-libextractor.patch
@@ -0,0 +1,675 @@
+http://bugs.gentoo.org/435394
+
+port to libextractor-0.6.x
+
+patch by Mike Frysinger <vapier@gentoo.org>
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -1631,7 +1631,7 @@ MT_CHECK_OPTIONAL_PACKAGE([lastfmlib], [disable],
+ ######## extractor
+
+ if test "x$LIBEXTRACTOR_OPTION_ENABLED" = xyes; then
+- MT_CHECK_PACKAGE([libextractor], [extractor], [extractor], [EXTRACTOR_getKeywords])
++ MT_CHECK_PACKAGE([libextractor], [extractor], [extractor], [EXTRACTOR_extract])
+ fi
+
+ if test "x$LIBEXTRACTOR_STATUS" = xyes; then
+--- a/src/metadata/extractor_handler.cc
++++ b/src/metadata/extractor_handler.cc
+@@ -55,322 +55,344 @@ ExtractorHandler::ExtractorHandler() : MetadataHandler()
+ {
+ }
+
+-static EXTRACTOR_KeywordType getTagFromString(String tag)
++static EXTRACTOR_MetaType getTagFromString(String tag)
+ {
+- if (tag == "EXTRACTOR_UNKNOWN")
+- return EXTRACTOR_UNKNOWN;
+- if (tag == "EXTRACTOR_FILENAME")
+- return EXTRACTOR_FILENAME;
+- if (tag == "EXTRACTOR_MIMETYPE")
+- return EXTRACTOR_MIMETYPE;
+- if (tag == "EXTRACTOR_TITLE")
+- return EXTRACTOR_TITLE;
+- if (tag == "EXTRACTOR_AUTHOR")
+- return EXTRACTOR_AUTHOR;
+- if (tag == "EXTRACTOR_ARTIST")
+- return EXTRACTOR_ARTIST;
+- if (tag == "EXTRACTOR_DESCRIPTION")
+- return EXTRACTOR_DESCRIPTION;
+- if (tag == "EXTRACTOR_COMMENT")
+- return EXTRACTOR_COMMENT;
+- if (tag == "EXTRACTOR_DATE")
+- return EXTRACTOR_DATE;
+- if (tag == "EXTRACTOR_PUBLISHER")
+- return EXTRACTOR_PUBLISHER;
+- if (tag == "EXTRACTOR_LANGUAGE")
+- return EXTRACTOR_LANGUAGE;
+- if (tag == "EXTRACTOR_ALBUM")
+- return EXTRACTOR_ALBUM;
+- if (tag == "EXTRACTOR_GENRE")
+- return EXTRACTOR_GENRE;
+- if (tag == "EXTRACTOR_LOCATION")
+- return EXTRACTOR_LOCATION;
+- if (tag == "EXTRACTOR_VERSIONNUMBER")
+- return EXTRACTOR_VERSIONNUMBER;
+- if (tag == "EXTRACTOR_ORGANIZATION")
+- return EXTRACTOR_ORGANIZATION;
+- if (tag == "EXTRACTOR_COPYRIGHT")
+- return EXTRACTOR_COPYRIGHT;
+- if (tag == "EXTRACTOR_SUBJECT")
+- return EXTRACTOR_SUBJECT;
+- if (tag == "EXTRACTOR_KEYWORDS")
+- return EXTRACTOR_KEYWORDS;
+- if (tag == "EXTRACTOR_CONTRIBUTOR")
+- return EXTRACTOR_CONTRIBUTOR;
+- if (tag == "EXTRACTOR_RESOURCE_TYPE")
+- return EXTRACTOR_RESOURCE_TYPE;
+- if (tag == "EXTRACTOR_FORMAT")
+- return EXTRACTOR_FORMAT;
+- if (tag == "EXTRACTOR_RESOURCE_IDENTIFIER")
+- return EXTRACTOR_RESOURCE_IDENTIFIER;
+- if (tag == "EXTRACTOR_SOURCE")
+- return EXTRACTOR_SOURCE;
+- if (tag == "EXTRACTOR_RELATION")
+- return EXTRACTOR_RELATION;
+- if (tag == "EXTRACTOR_COVERAGE")
+- return EXTRACTOR_COVERAGE;
+- if (tag == "EXTRACTOR_SOFTWARE")
+- return EXTRACTOR_SOFTWARE;
+- if (tag == "EXTRACTOR_DISCLAIMER")
+- return EXTRACTOR_DISCLAIMER;
+- if (tag == "EXTRACTOR_WARNING")
+- return EXTRACTOR_WARNING;
+- if (tag == "EXTRACTOR_TRANSLATED")
+- return EXTRACTOR_TRANSLATED;
+- if (tag == "EXTRACTOR_CREATION_DATE")
+- return EXTRACTOR_CREATION_DATE;
+- if (tag == "EXTRACTOR_MODIFICATION_DATE")
+- return EXTRACTOR_MODIFICATION_DATE;
+- if (tag == "EXTRACTOR_CREATOR")
+- return EXTRACTOR_CREATOR;
+- if (tag == "EXTRACTOR_PRODUCER")
+- return EXTRACTOR_PRODUCER;
+- if (tag == "EXTRACTOR_PAGE_COUNT")
+- return EXTRACTOR_PAGE_COUNT;
+- if (tag == "EXTRACTOR_PAGE_ORIENTATION")
+- return EXTRACTOR_PAGE_ORIENTATION;
+- if (tag == "EXTRACTOR_PAPER_SIZE")
+- return EXTRACTOR_PAPER_SIZE;
+- if (tag == "EXTRACTOR_USED_FONTS")
+- return EXTRACTOR_USED_FONTS;
+- if (tag == "EXTRACTOR_PAGE_ORDER")
+- return EXTRACTOR_PAGE_ORDER;
+- if (tag == "EXTRACTOR_CREATED_FOR")
+- return EXTRACTOR_CREATED_FOR;
+- if (tag == "EXTRACTOR_MAGNIFICATION")
+- return EXTRACTOR_MAGNIFICATION;
+- if (tag == "EXTRACTOR_RELEASE")
+- return EXTRACTOR_RELEASE;
+- if (tag == "EXTRACTOR_GROUP")
+- return EXTRACTOR_GROUP;
+- if (tag == "EXTRACTOR_SIZE")
+- return EXTRACTOR_SIZE;
+- if (tag == "EXTRACTOR_SUMMARY")
+- return EXTRACTOR_SUMMARY;
+- if (tag == "EXTRACTOR_PACKAGER")
+- return EXTRACTOR_PACKAGER;
+- if (tag == "EXTRACTOR_VENDOR")
+- return EXTRACTOR_VENDOR;
+- if (tag == "EXTRACTOR_LICENSE")
+- return EXTRACTOR_LICENSE;
+- if (tag == "EXTRACTOR_DISTRIBUTION")
+- return EXTRACTOR_DISTRIBUTION;
+- if (tag == "EXTRACTOR_BUILDHOST")
+- return EXTRACTOR_BUILDHOST;
+- if (tag == "EXTRACTOR_OS")
+- return EXTRACTOR_OS;
+- if (tag == "EXTRACTOR_DEPENDENCY")
+- return EXTRACTOR_DEPENDENCY;
+- if (tag == "EXTRACTOR_HASH_MD4")
+- return EXTRACTOR_HASH_MD4;
+- if (tag == "EXTRACTOR_HASH_MD5")
+- return EXTRACTOR_HASH_MD5;
+- if (tag == "EXTRACTOR_HASH_SHA0")
+- return EXTRACTOR_HASH_SHA0;
+- if (tag == "EXTRACTOR_HASH_SHA1")
+- return EXTRACTOR_HASH_SHA1;
+- if (tag == "EXTRACTOR_HASH_RMD160")
+- return EXTRACTOR_HASH_RMD160;
+- if (tag == "EXTRACTOR_RESOLUTION")
+- return EXTRACTOR_RESOLUTION;
+- if (tag == "EXTRACTOR_CATEGORY")
+- return EXTRACTOR_CATEGORY;
+- if (tag == "EXTRACTOR_BOOKTITLE")
+- return EXTRACTOR_BOOKTITLE;
+- if (tag == "EXTRACTOR_PRIORITY")
+- return EXTRACTOR_PRIORITY;
+- if (tag == "EXTRACTOR_CONFLICTS")
+- return EXTRACTOR_CONFLICTS;
+- if (tag == "EXTRACTOR_REPLACES")
+- return EXTRACTOR_REPLACES;
+- if (tag == "EXTRACTOR_PROVIDES")
+- return EXTRACTOR_PROVIDES;
+- if (tag == "EXTRACTOR_CONDUCTOR")
+- return EXTRACTOR_CONDUCTOR;
+- if (tag == "EXTRACTOR_INTERPRET")
+- return EXTRACTOR_INTERPRET;
+- if (tag == "EXTRACTOR_OWNER")
+- return EXTRACTOR_OWNER;
+- if (tag == "EXTRACTOR_LYRICS")
+- return EXTRACTOR_LYRICS;
+- if (tag == "EXTRACTOR_MEDIA_TYPE")
+- return EXTRACTOR_MEDIA_TYPE;
+- if (tag == "EXTRACTOR_CONTACT")
+- return EXTRACTOR_CONTACT;
+- if (tag == "EXTRACTOR_THUMBNAIL_DATA")
+- return EXTRACTOR_THUMBNAIL_DATA;
+-
+-#ifdef EXTRACTOR_GE_0_5_2
+- if (tag == "EXTRACTOR_PUBLICATION_DATE")
+- return EXTRACTOR_PUBLICATION_DATE;
+- if (tag == "EXTRACTOR_CAMERA_MAKE")
+- return EXTRACTOR_CAMERA_MAKE;
+- if (tag == "EXTRACTOR_CAMERA_MODEL")
+- return EXTRACTOR_CAMERA_MODEL;
+- if (tag == "EXTRACTOR_EXPOSURE")
+- return EXTRACTOR_EXPOSURE;
+- if (tag == "EXTRACTOR_APERTURE")
+- return EXTRACTOR_APERTURE;
+- if (tag == "EXTRACTOR_EXPOSURE_BIAS")
+- return EXTRACTOR_EXPOSURE_BIAS;
+- if (tag == "EXTRACTOR_FLASH")
+- return EXTRACTOR_FLASH;
+- if (tag == "EXTRACTOR_FLASH_BIAS")
+- return EXTRACTOR_FLASH_BIAS;
+- if (tag == "EXTRACTOR_FOCAL_LENGTH")
+- return EXTRACTOR_FOCAL_LENGTH;
+- if (tag == "EXTRACTOR_FOCAL_LENGTH_35MM")
+- return EXTRACTOR_FOCAL_LENGTH_35MM;
+- if (tag == "EXTRACTOR_ISO_SPEED")
+- return EXTRACTOR_ISO_SPEED;
+- if (tag == "EXTRACTOR_EXPOSURE_MODE")
+- return EXTRACTOR_EXPOSURE_MODE;
+- if (tag == "EXTRACTOR_METERING_MODE")
+- return EXTRACTOR_METERING_MODE;
+- if (tag == "EXTRACTOR_MACRO_MODE")
+- return EXTRACTOR_MACRO_MODE;
+- if (tag == "EXTRACTOR_IMAGE_QUALITY")
+- return EXTRACTOR_IMAGE_QUALITY;
+- if (tag == "EXTRACTOR_WHITE_BALANCE")
+- return EXTRACTOR_WHITE_BALANCE;
+- if (tag == "EXTRACTOR_ORIENTATION")
+- return EXTRACTOR_ORIENTATION;
+-#endif // EXTRACTOR_GE_0_5_2
++#define T(x) [EXTRACTOR_METATYPE_##x] = "EXTRACTOR_METATYPE_"#x,
++ /* XXX: should convert to EXTRACTOR_metatype_to_string() somehow */
++ const char *types[] =
++ {
++ T(RESERVED)
++ T(MIMETYPE)
++ T(FILENAME)
++ T(COMMENT)
++
++ T(TITLE)
++ T(BOOK_TITLE)
++ T(BOOK_EDITION)
++ T(BOOK_CHAPTER_NUMBER)
++ T(JOURNAL_NAME)
++ T(JOURNAL_VOLUME)
++ T(JOURNAL_NUMBER)
++ T(PAGE_COUNT)
++ T(PAGE_RANGE)
++ T(AUTHOR_NAME)
++ T(AUTHOR_EMAIL)
++ T(AUTHOR_INSTITUTION)
++ T(PUBLISHER)
++ T(PUBLISHER_ADDRESS)
++ T(PUBLISHER_INSTITUTION)
++ T(PUBLISHER_SERIES)
++ T(PUBLICATION_TYPE)
++ T(PUBLICATION_YEAR)
++ T(PUBLICATION_MONTH)
++ T(PUBLICATION_DAY)
++ T(PUBLICATION_DATE)
++ T(BIBTEX_EPRINT)
++ T(BIBTEX_ENTRY_TYPE)
++ T(LANGUAGE)
++ T(CREATION_TIME)
++ T(URL)
++
++ T(URI)
++ T(ISRC)
++ T(HASH_MD4)
++ T(HASH_MD5)
++ T(HASH_SHA0)
++ T(HASH_SHA1)
++ T(HASH_RMD160)
++
++ T(GPS_LATITUDE_REF)
++ T(GPS_LATITUDE)
++ T(GPS_LONGITUDE_REF)
++ T(GPS_LONGITUDE)
++ T(LOCATION_CITY)
++ T(LOCATION_SUBLOCATION)
++ T(LOCATION_COUNTRY)
++ T(LOCATION_COUNTRY_CODE)
++
++ T(UNKNOWN)
++ T(DESCRIPTION)
++ T(COPYRIGHT)
++ T(RIGHTS)
++ T(KEYWORDS)
++ T(ABSTRACT)
++ T(SUMMARY)
++ T(SUBJECT)
++ T(CREATOR)
++ T(FORMAT)
++ T(FORMAT_VERSION)
++
++ T(CREATED_BY_SOFTWARE)
++ T(UNKNOWN_DATE)
++ T(CREATION_DATE)
++ T(MODIFICATION_DATE)
++ T(LAST_PRINTED)
++ T(LAST_SAVED_BY)
++ T(TOTAL_EDITING_TIME)
++ T(EDITING_CYCLES)
++ T(MODIFIED_BY_SOFTWARE)
++ T(REVISION_HISTORY)
++
++ T(EMBEDDED_FILE_SIZE)
++ T(FINDER_FILE_TYPE)
++ T(FINDER_FILE_CREATOR)
++
++ T(PACKAGE_NAME)
++ T(PACKAGE_VERSION)
++ T(SECTION)
++ T(UPLOAD_PRIORITY)
++ T(PACKAGE_DEPENDENCY)
++ T(PACKAGE_CONFLICTS)
++ T(PACKAGE_REPLACES)
++ T(PACKAGE_PROVIDES)
++ T(PACKAGE_RECOMMENDS)
++ T(PACKAGE_SUGGESTS)
++ T(PACKAGE_MAINTAINER)
++ T(PACKAGE_INSTALLED_SIZE)
++ T(PACKAGE_SOURCE)
++ T(PACKAGE_ESSENTIAL)
++ T(TARGET_ARCHITECTURE)
++ T(PACKAGE_PRE_DEPENDENCY)
++ T(LICENSE)
++ T(PACKAGE_DISTRIBUTION)
++ T(BUILDHOST)
++ T(VENDOR)
++ T(TARGET_OS)
++ T(SOFTWARE_VERSION)
++ T(TARGET_PLATFORM)
++ T(RESOURCE_TYPE)
++ T(LIBRARY_SEARCH_PATH)
++ T(LIBRARY_DEPENDENCY)
++
++ T(CAMERA_MAKE)
++ T(CAMERA_MODEL)
++ T(EXPOSURE)
++ T(APERTURE)
++ T(EXPOSURE_BIAS)
++ T(FLASH)
++ T(FLASH_BIAS)
++ T(FOCAL_LENGTH)
++ T(FOCAL_LENGTH_35MM)
++ T(ISO_SPEED)
++ T(EXPOSURE_MODE)
++ T(METERING_MODE)
++ T(MACRO_MODE)
++ T(IMAGE_QUALITY)
++ T(WHITE_BALANCE)
++ T(ORIENTATION)
++ T(MAGNIFICATION)
++
++ T(IMAGE_DIMENSIONS)
++ T(PRODUCED_BY_SOFTWARE)
++ T(THUMBNAIL)
++ T(IMAGE_RESOLUTION)
++ T(SOURCE)
++
++ T(CHARACTER_SET)
++ T(LINE_COUNT)
++ T(PARAGRAPH_COUNT)
++ T(WORD_COUNT)
++ T(CHARACTER_COUNT)
++ T(PAGE_ORIENTATION)
++ T(PAPER_SIZE)
++ T(TEMPLATE)
++ T(COMPANY)
++ T(MANAGER)
++ T(REVISION_NUMBER)
++
++ T(DURATION)
++ T(ALBUM)
++ T(ARTIST)
++ T(GENRE)
++ T(TRACK_NUMBER)
++ T(DISC_NUMBER)
++ T(PERFORMER)
++ T(CONTACT_INFORMATION)
++ T(SONG_VERSION)
++ T(PICTURE)
++ T(COVER_PICTURE)
++ T(CONTRIBUTOR_PICTURE)
++ T(EVENT_PICTURE)
++ T(LOGO)
++ T(BROADCAST_TELEVISION_SYSTEM)
++ T(SOURCE_DEVICE)
++ T(DISCLAIMER)
++ T(WARNING)
++ T(PAGE_ORDER)
++ T(WRITER)
++ T(PRODUCT_VERSION)
++ T(CONTRIBUTOR_NAME)
++ T(MOVIE_DIRECTOR)
++ T(NETWORK_NAME)
++ T(SHOW_NAME)
++ T(CHAPTER_NAME)
++ T(SONG_COUNT)
++ T(STARTING_SONG)
++ T(PLAY_COUNTER)
++ T(CONDUCTOR)
++ T(INTERPRETATION)
++ T(COMPOSER)
++ T(BEATS_PER_MINUTE)
++ T(ENCODED_BY)
++ T(ORIGINAL_TITLE)
++ T(ORIGINAL_ARTIST)
++ T(ORIGINAL_WRITER)
++ T(ORIGINAL_RELEASE_YEAR)
++ T(ORIGINAL_PERFORMER)
++ T(LYRICS)
++ T(POPULARITY_METER)
++ T(LICENSEE)
++ T(MUSICIAN_CREDITS_LIST)
++ T(MOOD)
++ T(SUBTITLE)
++
++ T(GNUNET_DISPLAY_TYPE)
++ T(GNUNET_FULL_DATA)
++ T(RATING)
++ T(ORGANIZATION)
++ T(RIPPER)
++ T(PRODUCER)
++ T(GROUP)
++ T(GNUNET_ORIGINAL_FILENAME)
++ };
++#undef T
++ size_t i;
++
++ for (i = 0; i < sizeof(types) / sizeof(types[0]); ++i)
++ if (!strcmp(types[i], tag.c_str()))
++ return (EXTRACTOR_MetaType) i;
+
+ log_warning("Ignoring unknown libextractor tag: %s\n", tag.c_str());
+- return EXTRACTOR_UNKNOWN;
++ return EXTRACTOR_METATYPE_UNKNOWN;
+ }
+
+-static void addMetaField(metadata_fields_t field, EXTRACTOR_KeywordList *keywords, Ref<CdsItem> item, Ref<StringConverter> sc)
++struct field_state {
++ Ref<CdsItem> item;
++ Ref<StringConverter> sc;
++ Ref<Array<StringBase> > aux;
++};
++
++static int addField(void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type,
++ enum EXTRACTOR_MetaFormat format, const char *data_mime_type,
++ const char *data, size_t data_len)
+ {
+- String value;
+- const char *temp = NULL;
+-
++ metadata_fields_t field = M_MAX;
++ resource_attributes_t attr = R_MAX;
++
++ if (!data)
++ return 0;
++
++ log_debug("metadata %zu [%s] -> %s\n", (size_t)type, EXTRACTOR_metatype_to_string(type), data);
++
+ /// \todo check if UTF-8 conversion is needed, may already be in UTF-8
+-
+- switch (field)
++
++ switch (type)
+ {
+- case M_TITLE:
+- temp = EXTRACTOR_extractLast(EXTRACTOR_TITLE, keywords);
++ case EXTRACTOR_METATYPE_TITLE:
++ field = M_TITLE;
+ break;
+- case M_ARTIST:
+- temp = EXTRACTOR_extractLast(EXTRACTOR_ARTIST, keywords);
++ case EXTRACTOR_METATYPE_ARTIST:
++ field = M_ARTIST;
+ break;
+- case M_ALBUM:
+- temp = EXTRACTOR_extractLast(EXTRACTOR_ALBUM, keywords);
++ case EXTRACTOR_METATYPE_ALBUM:
++ field = M_ALBUM;
+ break;
+- case M_DATE:
+- temp = EXTRACTOR_extractLast(EXTRACTOR_DATE, keywords);
++ case EXTRACTOR_METATYPE_PUBLICATION_YEAR:
++ field = M_DATE;
+ break;
+- case M_GENRE:
+- temp = EXTRACTOR_extractLast(EXTRACTOR_GENRE, keywords);
++ case EXTRACTOR_METATYPE_GENRE:
++ field = M_GENRE;
+ break;
+- case M_DESCRIPTION:
+- temp = EXTRACTOR_extractLast(EXTRACTOR_DESCRIPTION, keywords);
+-
+- if (temp == NULL)
+- temp = EXTRACTOR_extractLast(EXTRACTOR_COMMENT, keywords);
++ case EXTRACTOR_METATYPE_DESCRIPTION:
++ field = M_DESCRIPTION;
++ break;
++ case EXTRACTOR_METATYPE_COMMENT:
++ field = M_DESCRIPTION;
++ break;
++ case EXTRACTOR_METATYPE_IMAGE_DIMENSIONS:
++ attr = R_RESOLUTION;
+ break;
+- default:
+- return;
+ }
+
+- if (temp != NULL)
+- value = temp;
++ String value;
++ struct field_state *field_state = (struct field_state *)cls;
++ Ref<CdsItem> item = field_state->item;
++ Ref<StringConverter> sc = field_state->sc;
++ Ref<Array<StringBase> > aux = field_state->aux;
++
++ if (field == M_MAX && attr == R_MAX && aux == nil)
++ {
++ log_debug("no match\n");
++ return 0;
++ }
+
++ value = data;
+ value = trim_string(value);
+-
+- if (string_ok(value))
++ if (!string_ok(value))
++ return 0;
++
++ if (field != M_MAX)
+ {
+ item->setMetadata(MT_KEYS[field].upnp, sc->convert(value));
+-// log_debug("Setting metadata on item: %d, %s\n", field, sc->convert(value).c_str());
++ log_debug("Setting metadata on item: %d, %s\n", field, sc->convert(value).c_str());
+ }
+-}
+
+-static void addResourceField(resource_attributes_t attr, EXTRACTOR_KeywordList *keywords, Ref<CdsItem> item, Ref<StringConverter> sc)
+-{
+- String value;
+- const char *temp = NULL;
+-
+- switch (attr)
++ if (attr != R_MAX)
+ {
+- case R_RESOLUTION:
+- temp = EXTRACTOR_extractLast(EXTRACTOR_SIZE, keywords);
+- break;
+-/* case R_SIZE:
+- temp = EXTRACTOR_extractLast(EXTRACTOR_SIZE, keywords);
+- break;
+-*/
+- default:
+- return;
++ item->getResource(0)->addAttribute(MetadataHandler::getResAttrName(attr), value);
++ log_debug("Setting attribute on item: %d, %s\n", attr, value.c_str());
+ }
+
+- if (temp != NULL)
+- value = temp;
+-
+- if (string_ok(value))
++ if (aux != nil)
+ {
+- item->getResource(0)->addAttribute(MetadataHandler::getResAttrName(attr), value);
++ String tmp;
++ for (int j = 0; j < aux->size(); j++)
++ {
++ tmp = aux->get(j);
++ if (string_ok(tmp))
++ {
++ if (type == getTagFromString(tmp))
++ {
++ value = sc->convert(value);
++ item->setAuxData(tmp, value);
++ log_debug(("Adding tag: %s with value %s\n", tmp.c_str(), value.c_str()));
++ }
++ }
++ }
+ }
++
++ return 0;
+ }
+
+
+
+-Ref<RExp> ReAudioFormat;
+-EXTRACTOR_ExtractorList *extractors = NULL;
+-bool load_libraries_failed = false;
++static Ref<RExp> ReAudioFormat;
++static EXTRACTOR_PluginList *plugins = NULL;
++static bool load_libraries_failed = false;
+
+ void ExtractorHandler::fillMetadata(Ref<CdsItem> item)
+ {
+ if (load_libraries_failed)
+ return;
+- Ref<Array<StringBase> > aux;
+- Ref<StringConverter> sc = StringConverter::i2i();
+-
+- if (! extractors)
++ if (! plugins)
+ {
+- extractors = EXTRACTOR_loadDefaultLibraries();
+- if (! extractors)
++ plugins = EXTRACTOR_plugin_add_defaults(EXTRACTOR_OPTION_DEFAULT_POLICY);
++ if (! plugins)
++ {
+ load_libraries_failed = true;
++ return;
++ }
+ }
+- EXTRACTOR_KeywordList *keywords = EXTRACTOR_getKeywords(extractors, item->getLocation().c_str());
+-
+- //EXTRACTOR_printKeywords(stdout, keywords);
+
+- for (int i = 0; i < M_MAX; i++)
+- addMetaField((metadata_fields_t)i, keywords, item, sc);
+-
+- for (int i = 0; i < R_MAX; i++)
+- addResourceField((resource_attributes_t)i, keywords, item, sc);
++ log_debug("processing %s\n", item->getLocation().c_str());
+
+ Ref<ConfigManager> cm = ConfigManager::getInstance();
+- aux = cm->getStringArrayOption(CFG_IMPORT_LIBOPTS_EXTRACTOR_AUXDATA_TAGS_LIST);
+- if (aux != nil)
+- {
+- String value;
+- String tmp;
+- const char *temp = NULL;
+-
+- for (int j = 0; j < aux->size(); j++)
+- {
+-
+- tmp = aux->get(j);
+- if (string_ok(tmp))
+- {
+- temp = EXTRACTOR_extractLast(getTagFromString(tmp), keywords);
+- if (temp != NULL)
+- {
+- value = temp;
+- if (string_ok(value))
+- {
+- value = sc->convert(value);
+- item->setAuxData(tmp, value);
+-// log_debug(("Adding tag: %s with value %s\n", tmp.c_str(), value.c_str()));
+- }
+- }
+- }
+- }
+- }
++ struct field_state field_state = {
++ .item = item,
++ .sc = StringConverter::i2i(),
++ .aux = cm->getStringArrayOption(CFG_IMPORT_LIBOPTS_EXTRACTOR_AUXDATA_TAGS_LIST),
++ };
++ EXTRACTOR_extract(plugins, item->getLocation().c_str(), NULL, 0, addField, &field_state);
+
+ if (ReAudioFormat == nil)
+ {
+@@ -379,35 +401,9 @@ void ExtractorHandler::fillMetadata(Ref<CdsItem> item)
+ ReAudioFormat->compile(_("([0-9]+)\\s+kbps,\\s*([0-9]+)\\s+hz,\\s*"
+ "(([0-9]+)h)?([0-9]+)m([0-9]+)\\s(\\S+)"), "i");
+ }
+-
+- /*
+- temp = EXTRACTOR_extractLast(EXTRACTOR_FORMAT, keywords);
+- log_debug("EXTRACTOR_FORMAT: %s\n", temp);
+-
+- if (temp)
+- {
+- Ref<Matcher> matcher = ReAudioFormat->match((char *)temp);
+- if (matcher != nil)
+- {
+- log_debug(("BR:%s FR:%s H:%s M:%s S:%s TYPE:%s\n",
+- matcher->group(1).c_str(),
+- matcher->group(2).c_str(),
+- matcher->group(4).c_str(),
+- matcher->group(5).c_str(),
+- matcher->group(6).c_str(),
+- matcher->group(7).c_str()));
+- }
+- else
+- {
+- log_debug(("format pattern unmatched!"));
+- }
+- }
+-
+- */
+- EXTRACTOR_freeKeywords(keywords);
+
+ // commented out for the sake of efficiency
+- // EXTRACTOR_removeAll(extractors);
++ // EXTRACTOR_plugin_remove_all(plugins);
+ }
+
+ Ref<IOHandler> ExtractorHandler::serveContent(Ref<CdsItem> item, int resNum, off_t *data_size)
diff --git a/net-misc/mediatomb/files/mediatomb-0.12.1-libmp4v2.patch b/net-misc/mediatomb/files/mediatomb-0.12.1-libmp4v2.patch
new file mode 100644
index 000000000000..6a6b51e1e05a
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.12.1-libmp4v2.patch
@@ -0,0 +1,187 @@
+diff -urN old/src/metadata/libmp4v2_handler.cc new/src/metadata/libmp4v2_handler.cc
+--- old/src/metadata/libmp4v2_handler.cc 2012-04-05 01:46:26.000000000 +0200
++++ new/src/metadata/libmp4v2_handler.cc 2012-04-05 02:01:24.000000000 +0200
+@@ -65,29 +65,28 @@
+ static void addMetaField(metadata_fields_t field, MP4FileHandle mp4, Ref<CdsItem> item)
+ {
+ String value;
+- char* mp4_retval = NULL;
+- u_int16_t track;
+- u_int16_t total_tracks;
+-
+ Ref<StringConverter> sc = StringConverter::i2i();
+
++ const MP4Tags* new_tags = MP4TagsAlloc();
++
++ if (!MP4TagsFetch(new_tags, mp4))
++ return;
++
+ switch (field)
+ {
+ case M_TITLE:
+- MP4GetMetadataName(mp4, &mp4_retval);
++ value = new_tags->name;
+ break;
+ case M_ARTIST:
+- MP4GetMetadataArtist(mp4, &mp4_retval);
++ value = new_tags->artist;
+ break;
+ case M_ALBUM:
+- MP4GetMetadataAlbum(mp4, &mp4_retval);
++ value = new_tags->album;
+ break;
+ case M_DATE:
+- MP4GetMetadataYear(mp4, &mp4_retval);
+- if (mp4_retval)
++ value = new_tags->releaseDate;
++ if (value.length() > 0)
+ {
+- value = mp4_retval;
+- free(mp4_retval);
+ if (string_ok(value))
+ value = value + "-01-01";
+ else
+@@ -95,34 +94,31 @@
+ }
+ break;
+ case M_GENRE:
+- MP4GetMetadataGenre(mp4, &mp4_retval);
++ value = new_tags->genre;
+ break;
+ case M_DESCRIPTION:
+- MP4GetMetadataComment(mp4, &mp4_retval);
++ value = new_tags->comments;
+ break;
+ case M_TRACKNUMBER:
+- MP4GetMetadataTrack(mp4, &track, &total_tracks);
+- if (track > 0)
++ if (new_tags->track)
+ {
+- value = String::from(track);
+- item->setTrackNumber((int)track);
++ value = String::from(new_tags->track->index);
++ item->setTrackNumber((int)new_tags->track->index);
+ }
+ else
++ {
++ MP4TagsFree( new_tags );
+ return;
++ }
+ break;
+ default:
++ MP4TagsFree( new_tags );
+ return;
+ }
+
+- if ((field != M_DATE) && (field != M_TRACKNUMBER) &&
+- (mp4_retval))
+- {
+- value = mp4_retval;
+- free(mp4_retval);
+- }
+-
++ MP4TagsFree( new_tags );
+ value = trim_string(value);
+-
++
+ if (string_ok(value))
+ {
+ item->setMetadata(MT_KEYS[field].upnp, sc->convert(value));
+@@ -190,14 +186,19 @@
+ }
+
+ #if defined(HAVE_MAGIC)
+- u_int8_t *art_data;
+- u_int32_t art_data_len;
++ void *art_data = 0;
++ u_int32_t art_data_len = 0;
+ String art_mimetype;
++
++ const MP4Tags* new_tags = MP4TagsAlloc();
++ MP4TagsFetch(new_tags, mp4);
++ if (new_tags->artworkCount)
++ {
++ art_data = new_tags->artwork->data;
++ art_data_len = new_tags->artwork->size;
++ }
+ #ifdef HAVE_MP4_GET_METADATA_COVER_ART_COUNT
+- if (MP4GetMetadataCoverArtCount(mp4) &&
+- MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len))
+-#else
+- MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len);
++ if (new_tags->artworkCount && art_data_len > 0)
+ #endif
+ {
+ if (art_data)
+@@ -211,11 +212,10 @@
+ }
+ catch (Exception ex)
+ {
+- free(art_data);
++ MP4TagsFree(new_tags);
+ throw ex;
+ }
+
+- free(art_data);
+ if (art_mimetype != _(MIMETYPE_DEFAULT))
+ {
+ Ref<CdsResource> resource(new CdsResource(CH_MP4));
+@@ -225,6 +225,7 @@
+ }
+ }
+ }
++ MP4TagsFree(new_tags);
+ #endif
+ MP4Close(mp4);
+ }
+@@ -249,26 +250,35 @@
+
+ if (ctype != ID3_ALBUM_ART)
+ throw _Exception(_("LibMP4V2Handler: got unknown content type: ") + ctype);
++
++ const MP4Tags* new_tags = MP4TagsAlloc();
++ if (MP4TagsFetch(new_tags, mp4))
++ {
+ #ifdef HAVE_MP4_GET_METADATA_COVER_ART_COUNT
+- if (!MP4GetMetadataCoverArtCount(mp4))
+- throw _Exception(_("LibMP4V2Handler: resource has no album art information"));
++ if (!new_tags->artworkCount)
++ throw _Exception(_("LibMP4V2Handler: resource has no album art information"));
+ #endif
+- u_int8_t *art_data;
+- u_int32_t art_data_len;
+- if (MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len))
+- {
+- if (art_data)
++ void *art_data = 0;
++ u_int32_t art_data_len;
++
++ const MP4TagArtwork* art = new_tags->artwork;
++ art_data = art->data;
++ art_data_len = art->size;
++ if (art)
+ {
+- *data_size = (off_t)art_data_len;
+- Ref<IOHandler> h(new MemIOHandler((void *)art_data, art_data_len));
+- free(art_data);
+- return h;
++ if (art_data)
++ {
++ *data_size = (off_t)art_data_len;
++ Ref<IOHandler> h(new MemIOHandler(art_data, art_data_len));
++ MP4TagsFree(new_tags);
++ return h;
++ }
+ }
++ MP4TagsFree(new_tags);
+ }
+-
+ throw _Exception(_("LibMP4V2Handler: could not serve album art "
+- "for file") + item->getLocation() +
+- " - embedded image not found");
++ "for file") + item->getLocation() +
++ " - embedded image not found");
+ }
+
+ #endif // HAVE_LIBMP4V2
+De binära filerna old/src/metadata/.libmp4v2_handler.cc.swp och new/src/metadata/.libmp4v2_handler.cc.swp skiljer
diff --git a/net-misc/mediatomb/files/mediatomb-0.12.1-mozjs187.patch b/net-misc/mediatomb/files/mediatomb-0.12.1-mozjs187.patch
new file mode 100644
index 000000000000..c4b080a3656b
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.12.1-mozjs187.patch
@@ -0,0 +1,260 @@
+maybe this is correct, maybe it's not. spidermonkey's documentation blows, so
+who is to say!
+
+https://bugs.gentoo.org/423991
+
+--- a/src/scripting/dvd_image_import_script.cc
++++ b/src/scripting/dvd_image_import_script.cc
+@@ -232,8 +232,6 @@ DVDImportScript::DVDImportScript(Ref<Runtime> runtime) : Script(runtime)
+
+ String scriptPath = ConfigManager::getInstance()->getOption(CFG_IMPORT_SCRIPTING_DVD_SCRIPT);
+ load(scriptPath);
+- root = JS_NewScriptObject(cx, script);
+- JS_AddNamedRoot(cx, &root, "DVDImportScript");
+ log_info("Loaded %s\n", scriptPath.c_str());
+
+ Ref<Dictionary> mappings =
+@@ -296,21 +294,4 @@ void DVDImportScript::processDVDObject(Ref<CdsObject> obj)
+ #endif
+ }
+
+-DVDImportScript::~DVDImportScript()
+-{
+-#ifdef JS_THREADSAFE
+- JS_SetContextThread(cx);
+- JS_BeginRequest(cx);
+-#endif
+-
+- if (root)
+- JS_RemoveRoot(cx, &root);
+-
+-#ifdef JS_THREADSAFE
+- JS_EndRequest(cx);
+- JS_ClearContextThread(cx);
+-#endif
+-
+-}
+-
+ #endif // HAVE_JS
+--- a/src/scripting/dvd_image_import_script.h
++++ b/src/scripting/dvd_image_import_script.h
+@@ -41,7 +41,6 @@ class DVDImportScript : public Script
+ {
+ public:
+ DVDImportScript(zmm::Ref<Runtime> runtime);
+- ~DVDImportScript();
+ /// \brief Adds a DVD object to the database
+ ///
+ /// \param title DVD title number
+--- a/src/scripting/import_script.cc
++++ b/src/scripting/import_script.cc
+@@ -53,8 +53,6 @@ ImportScript::ImportScript(Ref<Runtime> runtime) : Script(runtime)
+ try
+ {
+ load(scriptPath);
+- root = JS_NewObject(cx, NULL, script, NULL);
+- JS_AddNamedObjectRoot(cx, &root, "ImportScript");
+ }
+ catch (Exception ex)
+ {
+@@ -109,21 +107,4 @@ void ImportScript::processCdsObject(Ref<CdsObject> obj, String rootpath)
+ #endif
+ }
+
+-ImportScript::~ImportScript()
+-{
+-#ifdef JS_THREADSAFE
+- JS_SetContextThread(cx);
+- JS_BeginRequest(cx);
+-#endif
+-
+- if (root)
+- JS_RemoveObjectRoot(cx, &root);
+-
+-#ifdef JS_THREADSAFE
+- JS_EndRequest(cx);
+- JS_ClearContextThread(cx);
+-#endif
+-
+-}
+-
+ #endif // HAVE_JS
+--- a/src/scripting/import_script.h
++++ b/src/scripting/import_script.h
+@@ -41,11 +41,8 @@ class ImportScript : public Script
+ {
+ public:
+ ImportScript(zmm::Ref<Runtime> runtime);
+- ~ImportScript();
+ void processCdsObject(zmm::Ref<CdsObject> obj, zmm::String rootpath);
+ virtual script_class_t whoami() { return S_IMPORT; }
+-private:
+- JSObject *root;
+ };
+
+ #endif // __SCRIPTING_IMPORT_SCRIPT_H__
+--- a/src/scripting/playlist_parser_script.cc
++++ b/src/scripting/playlist_parser_script.cc
+@@ -93,8 +93,6 @@ PlaylistParserScript::PlaylistParserScript(Ref<Runtime> runtime) : Script(runtim
+
+ String scriptPath = ConfigManager::getInstance()->getOption(CFG_IMPORT_SCRIPTING_PLAYLIST_SCRIPT);
+ load(scriptPath);
+- root = JS_NewObject(cx, NULL, script, NULL);
+- JS_AddNamedObjectRoot(cx, &root, "PlaylistScript");
+ }
+ catch (Exception ex)
+ {
+@@ -236,21 +234,4 @@ void PlaylistParserScript::processPlaylistObject(zmm::Ref<CdsObject> obj, Ref<Ge
+
+ }
+
+-
+-PlaylistParserScript::~PlaylistParserScript()
+-{
+-#ifdef JS_THREADSAFE
+- JS_SetContextThread(cx);
+- JS_BeginRequest(cx);
+-#endif
+-
+- if (root)
+- JS_RemoveObjectRoot(cx, &root);
+-
+-#ifdef JS_THREADSAFE
+- JS_EndRequest(cx);
+- JS_ClearContextThread(cx);
+-#endif
+-
+-}
+ #endif // HAVE_JS
+--- a/src/scripting/playlist_parser_script.h
++++ b/src/scripting/playlist_parser_script.h
+@@ -42,7 +42,6 @@ class PlaylistParserScript : public Script
+ {
+ public:
+ PlaylistParserScript(zmm::Ref<Runtime> runtime);
+- ~PlaylistParserScript();
+ zmm::String readln();
+ void processPlaylistObject(zmm::Ref<CdsObject> obj, zmm::Ref<GenericTask> task);
+ virtual script_class_t whoami() { return S_PLAYLIST; }
+@@ -52,7 +51,6 @@ private:
+ int currentObjectID;
+ char *currentLine;
+ zmm::Ref<GenericTask> currentTask;
+- JSObject *root;
+ };
+
+ #endif // __SCRIPTING_PLAYLIST_PARSER_SCRIPT_H__
+--- a/src/scripting/script.cc
++++ b/src/scripting/script.cc
+@@ -427,15 +427,10 @@ static JSFunctionSpec js_global_functions[] = {
+ try
+ {
+ common_script = _load(common_scr_path);
+- common_root = JS_NewObject(cx, NULL, common_script, NULL);
+- JS_AddNamedObjectRoot(cx, &common_root, "common-script");
+ _execute(common_script);
+ }
+ catch (Exception e)
+ {
+- if (common_root)
+- JS_RemoveObjectRoot(cx, &common_root);
+-
+ log_js("Unable to load %s: %s\n", common_scr_path.c_str(),
+ e.getMessage().c_str());
+ }
+@@ -459,8 +454,6 @@ Script::~Script()
+ JS_SetContextThread(cx);
+ JS_BeginRequest(cx);
+ #endif
+- if (common_root)
+- JS_RemoveObjectRoot(cx, &common_root);
+
+ /*
+ * scripts are unrooted and will be cleaned up by GC
+@@ -532,12 +532,12 @@ void Script::defineFunctions(JSFunctionSpec *functions)
+ throw _Exception(_("Scripting: JS_DefineFunctions failed"));
+ }
+
+-JSObject *Script::_load(zmm::String scriptPath)
++JSScript *Script::_load(zmm::String scriptPath)
+ {
+ if (glob == NULL)
+ initGlobalObject();
+
+- JSObject *scr;
++ JSScript *scr;
+
+ String scriptText = read_text_file(scriptPath);
+
+@@ -568,7 +568,7 @@ void Script::load(zmm::String scriptPath)
+ }
+
+
+-void Script::_execute(JSObject *scr)
++void Script::_execute(JSScript *scr)
+ {
+ jsval ret_val;
+
+--- a/src/scripting/script.h
++++ b/src/scripting/script.h
+@@ -66,8 +66,8 @@ public:
+ JSRuntime *rt;
+ JSContext *cx;
+ JSObject *glob;
+- JSObject *script;
+- JSObject *common_script;
++ JSScript *script;
++ JSScript *common_script;
+
+ public:
+ Script(zmm::Ref<Runtime> runtime);
+@@ -112,11 +112,9 @@ protected:
+ zmm::Ref<CdsObject> processed;
+
+ private:
+- JSObject *common_root;
+-
+ void initGlobalObject();
+- JSObject *_load(zmm::String scriptPath);
+- void _execute(JSObject *scr);
++ JSScript *_load(zmm::String scriptPath);
++ void _execute(JSScript *scr);
+ zmm::Ref<StringConverter> _p2i;
+ zmm::Ref<StringConverter> _j2i;
+ zmm::Ref<StringConverter> _f2i;
+--- a/configure.ac
++++ b/configure.ac
+@@ -1036,13 +1036,13 @@
+ ],
+ [
+ unset ac_cv_lib_smjs_JS_NewObject
+- AC_CHECK_LIB(mozjs185, JS_NewObject,
++ AC_CHECK_LIB(mozjs187, JS_NewObject,
+ [
+- MOZLIB=mozjs185
+- JS_LIBS="-lmozjs185"
++ MOZLIB=mozjs187
++ JS_LIBS="-lmozjs187"
+ ],
+ [
+- unset ac_cv_lib_mozjs185_JS_NewObject
++ unset ac_cv_lib_mozjs187_JS_NewObject
+ AC_CHECK_LIB(mozjs, JS_NewObject,
+ [
+ MOZLIB=mozjs
+@@ -1064,11 +1064,11 @@
+ MOZLIB=smjs
+ ],
+ [
+- unset ac_cv_lib_mozjs185_JS_NewObject
+- AC_CHECK_LIB(mozjs185, JS_NewObject,
++ unset ac_cv_lib_mozjs187_JS_NewObject
++ AC_CHECK_LIB(mozjs187, JS_NewObject,
+ [
+- JS_LIBS="-L$SEARCH_DIR_LIBS -lmozjs185"
+- MOZLIB=mozjs185
++ JS_LIBS="-L$SEARCH_DIR_LIBS -lmozjs187"
++ MOZLIB=mozjs187
+ ],
+ [
+ LDFLAGS="-L$SEARCH_DIR_LIBS $LDFLAGS_SAVE -lmozjs"
diff --git a/net-misc/mediatomb/files/mediatomb-0.12.1-system-ar.patch b/net-misc/mediatomb/files/mediatomb-0.12.1-system-ar.patch
new file mode 100644
index 000000000000..349bf7d8da74
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.12.1-system-ar.patch
@@ -0,0 +1,35 @@
+--- configure.ac 2010-04-08 00:38:51.000000000 +0200
++++ configure.ac 2013-05-30 12:27:55.620514386 +0200
+@@ -318,6 +318,10 @@
+ AC_PROG_CC
+ AC_PROG_RANLIB
+ AC_PROG_GCC_TRADITIONAL
++AN_MAKEVAR([AR], [AC_PROG_AR])
++AN_PROGRAM([ar], [AC_PROG_AR])
++AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])
++AC_PROG_AR
+ AC_HEADER_DIRENT
+ AC_HEADER_STDC
+ AC_HEADER_SYS_WAIT
+--- build/Makefile.in 2010-04-08 00:40:15.000000000 +0200
++++ build/Makefile.in 2013-05-30 12:25:55.310337928 +0200
+@@ -50,7 +50,7 @@
+ CONFIG_CLEAN_FILES =
+ CONFIG_CLEAN_VPATH_FILES =
+ LIBRARIES = $(noinst_LIBRARIES)
+-AR = ar
++AR = @AR@
+ ARFLAGS = cru
+ libmediatomb_a_AR = $(AR) $(ARFLAGS)
+ libmediatomb_a_LIBADD =
+--- tombupnp/build/Makefile.in 2010-04-08 00:40:16.000000000 +0200
++++ tombupnp/build/Makefile.in 2013-05-30 12:26:18.420371823 +0200
+@@ -48,7 +48,7 @@
+ CONFIG_CLEAN_FILES =
+ CONFIG_CLEAN_VPATH_FILES =
+ LIBRARIES = $(noinst_LIBRARIES)
+-AR = ar
++AR = @AR@
+ ARFLAGS = cru
+ libtombupnp_a_AR = $(AR) $(ARFLAGS)
+ libtombupnp_a_LIBADD =
diff --git a/net-misc/mediatomb/files/mediatomb-0.12.1-system-uuid.patch b/net-misc/mediatomb/files/mediatomb-0.12.1-system-uuid.patch
new file mode 100644
index 000000000000..053f18cea879
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.12.1-system-uuid.patch
@@ -0,0 +1,36 @@
+use libuuid from the system rather than local bundled code
+
+http://bugs.gentoo.org/270830
+
+--- a/build/Makefile.am
++++ b/build/Makefile.am
+@@ -58,6 +58,7 @@ mediatomb_CXXFLAGS = -I$(top_srcdir)/src \
+ mediatomb_LDADD = \
+ libmediatomb.a \
+ $(top_srcdir)/tombupnp/build/libtombupnp.a \
++ -luuid \
+ $(LIBEXIF_LDFLAGS) \
+ $(ZLIB_LDFLAGS) \
+ $(EXPAT_LDFLAGS) \
+--- a/build/libmediatomb_src
++++ b/build/libmediatomb_src
+@@ -231,19 +231,6 @@ libmediatomb_a_SOURCES = \
+ ../src/url.h \
+ ../src/url_request_handler.cc \
+ ../src/url_request_handler.h \
+-../src/uuid/clear.c \
+-../src/uuid/compare.c \
+-../src/uuid/copy.c \
+-../src/uuid/gen_uuid.c \
+-../src/uuid/isnull.c \
+-../src/uuid/pack.c \
+-../src/uuid/parse.c \
+-../src/uuid/unpack.c \
+-../src/uuid/unparse.c \
+-../src/uuid/uuid.h \
+-../src/uuid/uuidP.h \
+-../src/uuid/uuid_time.c \
+-../src/uuid/uuid_types.h \
+ ../src/web/action.cc \
+ ../src/web/add.cc \
+ ../src/web/add_object.cc \
diff --git a/net-misc/mediatomb/files/mediatomb-0.12.1-thumb-cache.patch b/net-misc/mediatomb/files/mediatomb-0.12.1-thumb-cache.patch
new file mode 100644
index 000000000000..3d357b4392aa
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.12.1-thumb-cache.patch
@@ -0,0 +1,237 @@
+http://sourceforge.net/tracker/?func=detail&aid=3291468&group_id=129766&atid=715782
+
+[PATCH] Add the cache feature of ffmpegthumbnailer.
+
+I want the cache feature of ffmpegthumbnailer because my machine
+is not powerful :-(
+So I created this patch for the cache feature.
+
+This patch adds a new option "cache-dir" in config.xml.
+If not specifying any string, the cache feature is disable.
+And specifying some directory, the cache feature is enable
+and the cache files will be created under the directory.
+
+Signed-off-by: Ken'ichi Ohmichi <ken1ohmichi@gmail.com>
+---
+diff --git a/src/common.h b/src/common.h
+index d1998b3..358f4d1 100644
+--- a/src/common.h
++++ b/src/common.h
+@@ -367,6 +367,8 @@
+ #define DEFAULT_FFMPEGTHUMBNAILER_FILMSTRIP_OVERLAY YES
+ #define DEFAULT_FFMPEGTHUMBNAILER_WORKAROUND_BUGS NO
+ #define DEFAULT_FFMPEGTHUMBNAILER_IMAGE_QUALITY 8
++ #define DEFAULT_FFMPEGTHUMBNAILER_CACHE_DIR_ENABLED YES
++ #define DEFAULT_FFMPEGTHUMBNAILER_CACHE_DIR ""
+ #endif
+
+ #if defined(HAVE_LASTFMLIB)
+diff --git a/src/config_manager.cc b/src/config_manager.cc
+index 8c975f8..2902090 100644
+--- a/src/config_manager.cc
++++ b/src/config_manager.cc
+@@ -1873,6 +1873,24 @@ void ConfigManager::validate(String serverhome)
+
+ NEW_INT_OPTION(temp_int);
+ SET_INT_OPTION(CFG_SERVER_EXTOPTS_FFMPEGTHUMBNAILER_IMAGE_QUALITY);
++
++ temp = getOption("/server/extended-runtime-options/ffmpegthumbnailer/"
++ "cache-dir", DEFAULT_FFMPEGTHUMBNAILER_CACHE_DIR);
++
++ NEW_OPTION(temp);
++ SET_OPTION(CFG_SERVER_EXTOPTS_FFMPEGTHUMBNAILER_CACHE_DIR);
++
++ temp = getOption("/server/extended-runtime-options/ffmpegthumbnailer/"
++ "cache-dir/attribute::enabled",
++ DEFAULT_FFMPEGTHUMBNAILER_CACHE_DIR_ENABLED);
++
++ if (!validateYesNo(temp))
++ throw _Exception(_("Error in config file: "
++ "invalid \"enabled\" attribute value in "
++ "ffmpegthumbnailer <cache-dir> tag"));
++
++ NEW_BOOL_OPTION(temp == YES ? true : false);
++ SET_BOOL_OPTION(CFG_SERVER_EXTOPTS_FFMPEGTHUMBNAILER_CACHE_DIR_ENABLED);
+ }
+ #endif
+
+diff --git a/src/config_manager.h b/src/config_manager.h
+index 52b9842..a447a60 100644
+--- a/src/config_manager.h
++++ b/src/config_manager.h
+@@ -110,6 +110,8 @@ typedef enum
+ CFG_SERVER_EXTOPTS_FFMPEGTHUMBNAILER_FILMSTRIP_OVERLAY,
+ CFG_SERVER_EXTOPTS_FFMPEGTHUMBNAILER_WORKAROUND_BUGS,
+ CFG_SERVER_EXTOPTS_FFMPEGTHUMBNAILER_IMAGE_QUALITY,
++ CFG_SERVER_EXTOPTS_FFMPEGTHUMBNAILER_CACHE_DIR_ENABLED,
++ CFG_SERVER_EXTOPTS_FFMPEGTHUMBNAILER_CACHE_DIR,
+ #endif
+ CFG_SERVER_EXTOPTS_MARK_PLAYED_ITEMS_ENABLED,
+ CFG_SERVER_EXTOPTS_MARK_PLAYED_ITEMS_STRING_MODE_PREPEND,
+diff --git a/src/metadata/ffmpeg_handler.cc b/src/metadata/ffmpeg_handler.cc
+index a637d9c..8e7ef23 100644
+--- a/src/metadata/ffmpeg_handler.cc
++++ b/src/metadata/ffmpeg_handler.cc
+@@ -50,6 +50,9 @@
+ // INT64_C is not defined in ffmpeg/avformat.h but is needed
+ // macro defines included via autoconfig.h
+ #include <stdint.h>
++#include <sys/stat.h>
++#include <errno.h>
++#include <string.h>
+
+ //#ifdef FFMPEG_NEEDS_EXTERN_C
+ extern "C"
+@@ -279,6 +282,122 @@ void FfmpegHandler::fillMetadata(Ref<CdsItem> item)
+ av_close_input_file(pFormatCtx);
+ }
+
++#ifdef HAVE_FFMPEGTHUMBNAILER
++
++static int _mkdir(const char *path)
++{
++ int ret = mkdir(path, 0777);
++
++ if (ret == 0) {
++ // Make sure we are +x in case of restrictive umask that strips +x.
++ struct stat st;
++ if (stat(path, &st)) {
++ log_warning("could not stat(%s): %s\n", path, strerror(errno));
++ return -1;
++ }
++ mode_t xbits = S_IXUSR | S_IXGRP | S_IXOTH;
++ if (!(st.st_mode & xbits)) {
++ if (chmod(path, st.st_mode | xbits)) {
++ log_warning("could not chmod(%s, +x): %s\n", path, strerror(errno));
++ return -1;
++ }
++ }
++ }
++
++ return ret;
++}
++
++static bool makeThumbnailCacheDir(String& path)
++{
++ char *path_temp = strdup(path.c_str());
++ char *last_slash = strrchr(path_temp, '/');
++ char *slash = last_slash;
++ bool ret = false;
++
++ if (!last_slash)
++ return ret;
++
++ // Assume most dirs exist, so scan backwards first.
++ // Avoid stat/access checks due to TOCTOU races.
++ errno = 0;
++ for (slash = last_slash; slash > path_temp; --slash) {
++ if (*slash != '/')
++ continue;
++ *slash = '\0';
++ if (_mkdir(path_temp) == 0) {
++ // Now we can forward scan.
++ while (slash < last_slash) {
++ *slash = DIR_SEPARATOR;
++ if (_mkdir(path_temp) < 0)
++ // Allow EEXIST in case of someone else doing `mkdir`.
++ if (errno != EEXIST)
++ goto done;
++ slash += strlen(slash);
++ }
++ if (slash == last_slash)
++ ret = true;
++ break;
++ } else if (errno == EEXIST) {
++ ret = true;
++ break;
++ } else if (errno != ENOENT) {
++ break;
++ }
++ }
++
++ done:
++ free(path_temp);
++ return ret;
++}
++
++static String getThumbnailCacheFilePath(String& movie_filename, bool create)
++{
++ Ref<ConfigManager> cfg = ConfigManager::getInstance();
++ String cache_dir = cfg->getOption(CFG_SERVER_EXTOPTS_FFMPEGTHUMBNAILER_CACHE_DIR);
++
++ if (cache_dir.length() == 0) {
++ String home_dir = cfg->getOption(CFG_SERVER_HOME);
++ cache_dir = home_dir + "/cache-dir";
++ }
++
++ cache_dir = cache_dir + movie_filename + "-thumb.jpg";
++ if (create && !makeThumbnailCacheDir(cache_dir))
++ cache_dir = "";
++ return cache_dir;
++}
++
++static bool readThumbnailCacheFile(String movie_filename, uint8_t **ptr_img, size_t *size_img)
++{
++ String path = getThumbnailCacheFilePath(movie_filename, false);
++ FILE *fp = fopen(path.c_str(), "rb");
++ if (!fp)
++ return false;
++
++ size_t bytesRead;
++ uint8_t buffer[1024];
++ *ptr_img = NULL;
++ *size_img = 0;
++ while ((bytesRead = fread(buffer, 1, sizeof(buffer), fp)) > 0) {
++ *ptr_img = (uint8_t *)realloc(*ptr_img, *size_img + bytesRead);
++ memcpy(*ptr_img + *size_img, buffer, bytesRead);
++ *size_img += bytesRead;
++ }
++ fclose(fp);
++ return true;
++}
++
++static void writeThumbnailCacheFile(String movie_filename, uint8_t *ptr_img, int size_img)
++{
++ String path = getThumbnailCacheFilePath(movie_filename, true);
++ FILE *fp = fopen(path.c_str(), "wb");
++ if (!fp)
++ return;
++ fwrite(ptr_img, sizeof(uint8_t), size_img, fp);
++ fclose(fp);
++}
++
++#endif
++
+ Ref<IOHandler> FfmpegHandler::serveContent(Ref<CdsItem> item, int resNum, off_t *data_size)
+ {
+ *data_size = -1;
+@@ -288,6 +407,18 @@ Ref<IOHandler> FfmpegHandler::serveContent(Ref<CdsItem> item, int resNum, off_t
+ if (!cfg->getBoolOption(CFG_SERVER_EXTOPTS_FFMPEGTHUMBNAILER_ENABLED))
+ return nil;
+
++ if (cfg->getBoolOption(CFG_SERVER_EXTOPTS_FFMPEGTHUMBNAILER_CACHE_DIR_ENABLED)) {
++ uint8_t *ptr_image;
++ size_t size_image;
++ if (readThumbnailCacheFile(item->getLocation(),
++ &ptr_image, &size_image)) {
++ *data_size = (off_t)size_image;
++ Ref<IOHandler> h(new MemIOHandler(ptr_image, size_image));
++ free(ptr_image);
++ log_debug("Returning cached thumbnail for file: %s\n", item->getLocation().c_str());
++ return h;
++ }
++ }
+ #ifdef FFMPEGTHUMBNAILER_OLD_API
+ video_thumbnailer *th = create_thumbnailer();
+ image_data *img = create_image_data();
+@@ -318,6 +449,10 @@ Ref<IOHandler> FfmpegHandler::serveContent(Ref<CdsItem> item, int resNum, off_t
+ #endif // old api
+ throw _Exception(_("Could not generate thumbnail for ") +
+ item->getLocation());
++ if (cfg->getBoolOption(CFG_SERVER_EXTOPTS_FFMPEGTHUMBNAILER_CACHE_DIR_ENABLED)) {
++ writeThumbnailCacheFile(item->getLocation(),
++ img->image_data_ptr, img->image_data_size);
++ }
+
+ *data_size = (off_t)img->image_data_size;
+ Ref<IOHandler> h(new MemIOHandler((void *)img->image_data_ptr,
diff --git a/net-misc/mediatomb/files/mediatomb-0.12.1-thumbnail-locking.patch b/net-misc/mediatomb/files/mediatomb-0.12.1-thumbnail-locking.patch
new file mode 100644
index 000000000000..70658c495d25
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.12.1-thumbnail-locking.patch
@@ -0,0 +1,71 @@
+if you try to generate a bunch of thumbnails at once, it can crash:
+
+Program received signal SIGABRT, Aborted.
+[Switching to Thread 0x7fdb7a6cb700 (LWP 17295)]
+0x00007fdb8031c899 in __GI_raise (sig=sig@entry=0x6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
+56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
+(gdb) bt
+#0 0x00007fdb8031c899 in __GI_raise (sig=sig@entry=0x6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
+#1 0x00007fdb8031de27 in __GI_abort () at abort.c:89
+#2 0x00007fdb7f6b9222 in ff_unlock_avcodec () at /var/tmp/portage/media-video/ffmpeg-1.2.6/work/ffmpeg-1.2.6/libavcodec/utils.c:2767
+#3 0x00007fdb7f6b9662 in avcodec_open2 (avctx=0x7fdb64032080, codec=<optimized out>, options=0x0) at /var/tmp/portage/media-video/ffmpeg-1.2.6/work/ffmpeg-1.2.6/libavcodec/utils.c:1132
+#4 0x00007fdb81be57bb in ffmpegthumbnailer::MovieDecoder::initializeVideo (this=this@entry=0x7fdb7a6ca000) at libffmpegthumbnailer/moviedecoder.cpp:176
+#5 0x00007fdb81be599c in ffmpegthumbnailer::MovieDecoder::initialize (this=0x7fdb7a6ca000, filename=...) at libffmpegthumbnailer/moviedecoder.cpp:86
+#6 0x00007fdb81be92cc in ffmpegthumbnailer::VideoThumbnailer::generateThumbnail (this=this@entry=0x7fdb6402af90, videoFile=..., imageWriter=..., pAvContext=pAvContext@entry=0x0) at libffmpegthumbnailer/videothumbnailer.cpp:118
+#7 0x00007fdb81be97b4 in ffmpegthumbnailer::VideoThumbnailer::generateThumbnail (this=this@entry=0x7fdb6402af90, videoFile=..., type=<optimized out>, type@entry=Jpeg, buffer=..., pAvContext=pAvContext@entry=0x0) at libffmpegthumbnailer/videothumbnailer.cpp:191
+#8 0x00007fdb81bea23e in video_thumbnailer_generate_thumbnail_to_buffer (thumbnailer=<optimized out>, movie_filename=0x7fdb7003abc0 "........mp4", generated_image_data=0x7fdb64022680) at libffmpegthumbnailer/videothumbnailerc.cpp:113
+#9 0x00000000004ebfed in FfmpegHandler::serveContent (this=this@entry=0x7fdb64020ff0, item=..., resNum=resNum@entry=0x1, data_size=data_size@entry=0x7fdb7a6caaf0) at ../src/metadata/ffmpeg_handler.cc:475
+#10 0x00000000004e48d7 in FileRequestHandler::open (this=<optimized out>, filename=<optimized out>, info=0x7fdb7a6caaf0, mode=<optimized out>) at ../src/file_request_handler.cc:575
+#11 0x00000000004bba74 in web_open (filename=0x7fdb640175f0 "/content/media/object_id/16634/res_id/1/rh/6/ext/file.jpg", info=0x7fdb7a6caaf0, mode=UPNP_READ) at ../src/web_callbacks.cc:198
+#12 0x000000000052674b in process_request (Fp=<synthetic pointer>, RespInstr=0x7fdb7a6cab70, alias=0x7fdb7a6cab20, filename=0x7fdb7a6caad0, headers=0x7fdb7a6caab0, rtype=<synthetic pointer>, req=0x7fdb7a6cacd0) at ../upnp/src/genlib/net/http/webserver.c:1343
+#13 web_server_callback (parser=0x7fdb7a6cacd0, req=0x7fdb7a6cacd0, info=0x7fdb7a6cacc0) at ../upnp/src/genlib/net/http/webserver.c:1803
+#14 0x000000000051f29a in dispatch_request (hparser=0x7fdb7a6cacd0, info=0x7fdb7a6cacc0) at ../upnp/src/genlib/miniserver/miniserver.c:236
+#15 handle_request (args=0x7fdb6c000c40) at ../upnp/src/genlib/miniserver/miniserver.c:339
+#16 0x000000000052cc66 in WorkerThread (arg=0x7a80e0 <gRecvThreadPool>) at ../threadutil/src/ThreadPool.c:594
+#17 0x00007fdb80697333 in start_thread (arg=0x7fdb7a6cb700) at pthread_create.c:309
+#18 0x00007fdb803d226d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
+(gdb)
+
+--- a/src/metadata/ffmpeg_handler.cc
++++ b/src/metadata/ffmpeg_handler.cc
+@@ -311,6 +311,10 @@ void FfmpegHandler::fillMetadata(Ref<CdsItem> item)
+
+ #ifdef HAVE_FFMPEGTHUMBNAILER
+
++// The ffmpegthumbnailer code (ffmpeg?) is not threading safe.
++// Add a lock around the usage to avoid crashing randomly.
++static pthread_mutex_t thumb_lock;
++
+ static int _mkdir(const char *path)
+ {
+ int ret = mkdir(path, 0777);
+@@ -446,6 +450,9 @@ Ref<IOHandler> FfmpegHandler::serveContent(Ref<CdsItem> item, int resNum, off_t
+ return h;
+ }
+ }
++
++ pthread_mutex_lock(&thumb_lock);
++
+ #ifdef FFMPEGTHUMBNAILER_OLD_API
+ video_thumbnailer *th = create_thumbnailer();
+ image_data *img = create_image_data();
+@@ -474,8 +481,11 @@ Ref<IOHandler> FfmpegHandler::serveContent(Ref<CdsItem> item, int resNum, off_t
+ if (video_thumbnailer_generate_thumbnail_to_buffer(th,
+ item->getLocation().c_str(), img) != 0)
+ #endif // old api
++ {
++ pthread_mutex_unlock(&thumb_lock);
+ throw _Exception(_("Could not generate thumbnail for ") +
+ item->getLocation());
++ }
+ if (cfg->getBoolOption(CFG_SERVER_EXTOPTS_FFMPEGTHUMBNAILER_CACHE_DIR_ENABLED)) {
+ writeThumbnailCacheFile(item->getLocation(),
+ img->image_data_ptr, img->image_data_size);
+@@ -491,6 +501,7 @@ Ref<IOHandler> FfmpegHandler::serveContent(Ref<CdsItem> item, int resNum, off_t
+ video_thumbnailer_destroy_image_data(img);
+ video_thumbnailer_destroy(th);
+ #endif// old api
++ pthread_mutex_unlock(&thumb_lock);
+ return h;
+ #else
+ return nil;
diff --git a/net-misc/mediatomb/files/mediatomb-0.12.1-youtube-dl.patch b/net-misc/mediatomb/files/mediatomb-0.12.1-youtube-dl.patch
new file mode 100644
index 000000000000..6001d2fc5661
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.12.1-youtube-dl.patch
@@ -0,0 +1,141 @@
+--- mediatomb-0.12.1.orig/src/youtube_video_url.cc 2013-12-17 22:46:24.272442249 +0000
++++ mediatomb-0.12.1/src/youtube_video_url.cc 2013-12-17 22:57:25.968039083 +0000
+@@ -117,89 +117,68 @@ String YouTubeVideoURL::getVideoURL(Stri
+
+ watch = _(YOUTUBE_URL_WATCH) + video_id;
+
+- Ref<URL> url(new URL(YOUTUBE_PAGESIZE));
++ /*
++ * NOTE ON PATCH:
++ *
++ * The original code does not seem to work anymore.
++ *
++ * I have commented-out all the original code, and instead
++ * replaced it with a call/exec to youtube-dl (this is a separate/stand-alone python script).
++ *
++ * Available at http://rg3.github.io/youtube-dl/
++ *
++ *
++ * The current code works on a/my samsung TV. I have not tested it further on other devices.
++ * (I needed a quick fix, because I wanted to watch some video's. :) )
++ *
++ * I thought I would share the results.
++ *
++ * Suggestions / feedback -> bas-patch@tcfaa.nl
++ *
++ * Regards, Bas Nedermeijer
++ */
++
++ int pipefd[2];
++ pipe(pipefd);
++
++ if (fork() == 0)
++ {
++ // close reading end in the child
++ close(pipefd[0]);
++
++ // send stdout to the pipe
++ dup2(pipefd[1], 1);
++ // send stderr to the pipe
++ dup2(pipefd[1], 2);
+
+- Ref<StringBuffer> buffer = url->download(watch, &retcode, curl_handle,
+- false, verbose, true);
+- if (retcode != 200)
+- {
+- throw _Exception(_("Failed to get URL for video with id ")
+- + watch + _("HTTP response code: ") +
+- String::from(retcode));
+- }
++ // this descriptor is no longer needed
++ close(pipefd[1]);
+
+- log_debug("------> GOT BUFFER %s\n", buffer->toString().c_str());
+-
+- Ref<Matcher> matcher = reVideoURLParams->matcher(buffer->toString());
+- String params;
+- if (matcher->next())
+- {
+-// params = trim_string(matcher->group(1));
+- params = trim_string( matcher->group( 0 ) );
+- /*
+- int brace = params.index( '{' );
+- if ( brace > 0 )
+- params = params.substring( brace );
+- brace = params.index( '}' );
+- if ( brace > 0 )
+- params = params.substring( 0, brace + 1 );
+- */
+- Ref<Matcher> m2 = param_t->matcher(params);
+- if (m2->next())
+- {
+- String hmm = m2->group(1);
+- if (string_ok(hmm))
+- params = hmm;
+- else
+- {
+- throw _Exception(_("Could not retrieve \"t\" parameter."));
+- }
+- }
++ // This code assumes youtube-dl is available for usage.
++ execl("/usr/bin/youtube-dl", "/usr/bin/youtube-dl","-g",watch.c_str(),NULL);
+ }
+ else
+ {
+- throw _Exception(_("Failed to get URL for video with id (step 1)") + video_id);
+- }
++ // parent
++ char buffery[8192];
++ memset(&buffery[0], 0, sizeof(buffery));
+
+- params = _(YOUTUBE_URL_GET) + YOUTUBE_URL_PARAM_VIDEO_ID + '=' +
+- video_id + '&' + YOUTUBE_URL_PARAM_T + '=' + params;
++ close(pipefd[1]); // close the write end of the pipe in the parent
+
+- if (mp4)
+- {
+- String format = _("&fmt=18");
+-
+- if (hd)
++ // Hopefully the read is never called twice, otherwise the buffer will become corrupt.
++ while (read(pipefd[0], buffery, sizeof(buffery)) != 0)
+ {
+- matcher = HD->matcher(buffer->toString());
+- if (matcher->next())
+- {
+- if (trim_string(matcher->group(1)) == "true")
+- format = _("&fmt=22");
+- }
+ }
+-
+- params = params + format;
+- }
+
+- buffer = url->download(params, &retcode, curl_handle, true, verbose, true);
++ log_debug("------> GOT BUFFER %s\n", buffery);
++ String result = _(buffery);
+
+- matcher = redirectLocation->matcher(buffer->toString());
+- if (matcher->next())
+- {
+- if (string_ok(trim_string(matcher->group(1))))
+- return trim_string(matcher->group(1));
+- else
+- throw _Exception(_("Failed to get URL for video with id (step 2)")+
+- video_id);
+- }
++ result = trim_string(result);
+
+- if (retcode != 303)
+- {
+- throw _Exception(_("Unexpected reply from YouTube: ") +
+- String::from(retcode));
+- }
++ log_debug("------> GOT BUFFER (after trimming) %s\n", result.c_str());
+
+- throw _Exception(_("Could not retrieve YouTube video URL"));
++ return result;
++ }
+ }
+
+ #endif//YOUTUBE
diff --git a/net-misc/mediatomb/files/mediatomb-0.12.1.initd b/net-misc/mediatomb/files/mediatomb-0.12.1.initd
new file mode 100644
index 000000000000..49ea8fa2c559
--- /dev/null
+++ b/net-misc/mediatomb/files/mediatomb-0.12.1.initd
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+ # In order to properly support this (need vs use), we would have to
+ # parse ${MEDIATOMB_CONFIG} and see if mysql is enabled and if it is
+ # pointing to the local system. #368409
+ use mysql
+}
+
+start() {
+ ebegin "Starting MediaTomb"
+ start-stop-daemon --start --quiet --exec /usr/bin/mediatomb \
+ --pidfile ${MEDIATOMB_PIDFILE} -- --daemon \
+ --pidfile ${MEDIATOMB_PIDFILE} --user ${MEDIATOMB_USER} \
+ --group ${MEDIATOMB_GROUP} --logfile ${MEDIATOMB_LOGFILE} \
+ --config ${MEDIATOMB_CONFIG} --port ${MEDIATOMB_PORT} \
+ ${MEDIATOMB_OPTIONS}
+ eend $?
+}
+
+stop () {
+ ebegin "Stopping MediaTomb"
+ start-stop-daemon --stop --retry 10 --quiet --pidfile ${MEDIATOMB_PIDFILE}
+ eend $?
+}
diff --git a/net-misc/mediatomb/mediatomb-0.12.1-r7.ebuild b/net-misc/mediatomb/mediatomb-0.12.1-r7.ebuild
new file mode 100644
index 000000000000..7ab5e96d1c24
--- /dev/null
+++ b/net-misc/mediatomb/mediatomb-0.12.1-r7.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils linux-info user
+
+DEB_VER="4"
+DESCRIPTION="MediaTomb is an open source UPnP MediaServer"
+HOMEPAGE="http://www.mediatomb.cc/"
+
+SRC_URI="mirror://sourceforge/mediatomb/${P}.tar.gz
+ mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV}-${DEB_VER}.debian.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc x86"
+
+IUSE="curl debug +exif +ffmpeg flac id3tag +inotify +javascript lastfm
+ libextractor +magic +mp4 mysql +sqlite +taglib thumbnail +zlib"
+REQUIRED_USE="
+ || ( mysql sqlite )
+ taglib? ( !id3tag )
+ id3tag? ( !taglib )
+ thumbnail? ( ffmpeg !libextractor )
+ ffmpeg? ( !libextractor )
+ libextractor? ( !ffmpeg !thumbnail )
+"
+
+DEPEND="mysql? ( virtual/mysql )
+ dev-libs/expat
+ id3tag? ( media-libs/id3lib )
+ javascript? ( >=dev-lang/spidermonkey-1.8.5:0 )
+ taglib? ( media-libs/taglib )
+ sqlite? ( >=dev-db/sqlite-3 )
+ lastfm? ( >=media-libs/lastfmlib-0.4 )
+ exif? ( media-libs/libexif )
+ libextractor? ( media-libs/libextractor )
+ mp4? ( >=media-libs/libmp4v2-1.9.1_p479:0 )
+ ffmpeg? ( virtual/ffmpeg )
+ flac? ( media-libs/flac )
+ thumbnail? ( media-video/ffmpegthumbnailer[jpeg] )
+ curl? ( net-misc/curl net-misc/youtube-dl )
+ magic? ( sys-apps/file )
+ sys-apps/util-linux
+ zlib? ( sys-libs/zlib )
+ virtual/libiconv
+"
+RDEPEND="${DEPEND}"
+
+CONFIG_CHECK="~INOTIFY_USER"
+
+pkg_setup() {
+ enewgroup mediatomb
+ enewuser mediatomb -1 -1 /dev/null mediatomb
+}
+
+src_prepare() {
+
+ # Apply Debians patchset
+ local p dd="${WORKDIR}"/debian/patches
+ sed -i -r '/^[-+]{3} /s:[.][.]/::' "${dd}"/* || die
+ for p in $(<"${dd}"/series) ; do
+ epatch "${dd}"/${p}
+ done
+
+ # libmp4v2 API breakage #410235
+ epatch "${FILESDIR}"/${P}-libmp4v2.patch
+
+ # Use system libuuid #270830
+ epatch "${FILESDIR}"/${P}-system-uuid.patch
+
+ # Support spidermonkey-187 #423991 #482392
+ if has_version "~dev-lang/spidermonkey-1.8.7" ; then
+ epatch "${FILESDIR}"/${P}-mozjs187.patch
+ fi
+
+ # Support libextractor-0.6.0 #435394
+ epatch "${FILESDIR}"/${P}-libextractor.patch
+
+ # Fix inotify and hard links
+ epatch "${FILESDIR}"/${P}-inotify-hard-links.patch
+
+ # Add support for caching thumbnails
+ epatch "${FILESDIR}"/${P}-thumb-cache.patch
+
+ # Support libav-9 #443178
+ epatch "${FILESDIR}"/${P}-libav9.patch
+
+ # Fix Crash due to Uninitalized AVFormatContext pointer #446922
+ epatch "${FILESDIR}"/${P}-avformatcontext-pointer.patch
+
+ # Respect AR #464710
+ epatch "${FILESDIR}"/${P}-system-ar.patch
+
+ # Add flac metadata support #494398
+ epatch "${FILESDIR}"/${P}-flac-metadata.patch
+
+ # Work around broken youtube support by using youtube-dl #467110
+ epatch "${FILESDIR}"/${P}-youtube-dl.patch
+
+ epatch_user
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable curl) \
+ $(use_enable curl youtube) \
+ $(use_enable debug tombdebug) \
+ $(use_enable exif libexif) \
+ $(use_enable ffmpeg) \
+ $(use_enable flac FLAC) \
+ $(use_enable id3tag id3lib) \
+ $(use_enable inotify) \
+ $(use_enable javascript libjs) \
+ $(use_enable lastfm lastfmlib) \
+ $(use_enable libextractor) \
+ $(use_enable magic libmagic) \
+ $(use_enable mp4 libmp4v2) \
+ $(use_enable mysql) \
+ $(use_enable sqlite sqlite3) \
+ $(use_enable taglib) \
+ $(use_enable thumbnail ffmpegthumbnailer) \
+ $(use_enable zlib) \
+ --enable-external-transcoding \
+ --enable-protocolinfo-extension
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/${PN}-0.12.1.initd ${PN}
+ use mysql || sed -i -e "/use mysql/d" "${ED}"/etc/init.d/${PN}
+ newconfd "${FILESDIR}"/${PN}-0.12.0.confd ${PN}
+
+ insinto /etc/mediatomb
+ newins "${FILESDIR}/${PN}-0.12.0.config" config.xml
+ fperms 0600 /etc/mediatomb/config.xml
+ fowners mediatomb:mediatomb /etc/mediatomb/config.xml
+
+ keepdir /var/lib/mediatomb
+ fowners mediatomb:mediatomb /var/lib/mediatomb
+}
+
+pkg_postinst() {
+ if use mysql ; then
+ elog "MediaTomb has been built with MySQL support and needs"
+ elog "to be configured before being started."
+ elog "For more information, please consult the MediaTomb"
+ elog "documentation: http://mediatomb.cc/pages/documentation"
+ elog
+ fi
+
+ elog "To configure MediaTomb edit:"
+ elog "/etc/mediatomb/config.xml"
+ elog
+ elog "The MediaTomb web interface can be reached at (after the service is started):"
+ elog "http://localhost:49152/"
+}
diff --git a/net-misc/mediatomb/mediatomb-0.12.1-r8.ebuild b/net-misc/mediatomb/mediatomb-0.12.1-r8.ebuild
new file mode 100644
index 000000000000..e0d46477e307
--- /dev/null
+++ b/net-misc/mediatomb/mediatomb-0.12.1-r8.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils linux-info user
+
+DEB_VER="5"
+DESCRIPTION="MediaTomb is an open source UPnP MediaServer"
+HOMEPAGE="http://www.mediatomb.cc/"
+
+SRC_URI="mirror://sourceforge/mediatomb/${P}.tar.gz
+ mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV}-${DEB_VER}.debian.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc x86"
+
+IUSE="curl debug +exif +ffmpeg flac id3tag +inotify +javascript lastfm
+ libextractor +magic +mp4 mysql +sqlite +taglib thumbnail +zlib"
+REQUIRED_USE="
+ || ( mysql sqlite )
+ taglib? ( !id3tag )
+ id3tag? ( !taglib )
+ thumbnail? ( ffmpeg !libextractor )
+ ffmpeg? ( !libextractor )
+ libextractor? ( !ffmpeg !thumbnail )
+"
+
+DEPEND="mysql? ( virtual/mysql )
+ dev-libs/expat
+ id3tag? ( media-libs/id3lib )
+ javascript? ( >=dev-lang/spidermonkey-1.8.5:0 )
+ taglib? ( media-libs/taglib )
+ sqlite? ( >=dev-db/sqlite-3 )
+ lastfm? ( >=media-libs/lastfmlib-0.4 )
+ exif? ( media-libs/libexif )
+ libextractor? ( media-libs/libextractor )
+ mp4? ( >=media-libs/libmp4v2-1.9.1_p479:0 )
+ ffmpeg? ( virtual/ffmpeg )
+ flac? ( media-libs/flac )
+ thumbnail? ( media-video/ffmpegthumbnailer[jpeg] )
+ curl? ( net-misc/curl net-misc/youtube-dl )
+ magic? ( sys-apps/file )
+ sys-apps/util-linux
+ zlib? ( sys-libs/zlib )
+ virtual/libiconv
+"
+RDEPEND="${DEPEND}"
+
+CONFIG_CHECK="~INOTIFY_USER"
+
+pkg_setup() {
+ enewgroup mediatomb
+ enewuser mediatomb -1 -1 /dev/null mediatomb
+}
+
+src_prepare() {
+ # Apply Debians patchset
+ local p dd="${WORKDIR}"/debian/patches
+ sed -i -r '/^[-+]{3} /s:[.][.]/::' "${dd}"/* || die
+ # We use our version as it seems to be more complete.
+ sed -i '/^0010_fix_libmp4v2_build.patch/d' "${dd}"/series || die
+ for p in $(<"${dd}"/series) ; do
+ epatch "${dd}"/${p}
+ done
+
+ # libmp4v2 API breakage #410235
+ epatch "${FILESDIR}"/${P}-libmp4v2.patch
+
+ # Use system libuuid #270830
+ epatch "${FILESDIR}"/${P}-system-uuid.patch
+
+ # Support spidermonkey-187 #423991 #482392
+ if has_version "~dev-lang/spidermonkey-1.8.7" ; then
+ epatch "${FILESDIR}"/${P}-mozjs187.patch
+ fi
+
+ # Support libextractor-0.6.0 #435394
+ epatch "${FILESDIR}"/${P}-libextractor.patch
+
+ # Fix inotify and hard links
+ epatch "${FILESDIR}"/${P}-inotify-hard-links.patch
+
+ # Add support for caching thumbnails
+ epatch "${FILESDIR}"/${P}-thumb-cache.patch
+ epatch "${FILESDIR}"/${P}-thumbnail-locking.patch
+
+ # Respect AR #464710
+ epatch "${FILESDIR}"/${P}-system-ar.patch
+
+ # Add flac metadata support #494398
+ epatch "${FILESDIR}"/${P}-flac-metadata.patch
+
+ # Work around broken youtube support by using youtube-dl #467110
+ epatch "${FILESDIR}"/${P}-youtube-dl.patch
+
+ epatch_user
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable curl) \
+ $(use_enable curl youtube) \
+ $(use_enable debug tombdebug) \
+ $(use_enable exif libexif) \
+ $(use_enable ffmpeg) \
+ $(use_enable flac FLAC) \
+ $(use_enable id3tag id3lib) \
+ $(use_enable inotify) \
+ $(use_enable javascript libjs) \
+ $(use_enable lastfm lastfmlib) \
+ $(use_enable libextractor) \
+ $(use_enable magic libmagic) \
+ $(use_enable mp4 libmp4v2) \
+ $(use_enable mysql) \
+ $(use_enable sqlite sqlite3) \
+ $(use_enable taglib) \
+ $(use_enable thumbnail ffmpegthumbnailer) \
+ $(use_enable zlib) \
+ --enable-external-transcoding \
+ --enable-protocolinfo-extension
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/${PN}-0.12.1.initd ${PN}
+ use mysql || sed -i -e "/use mysql/d" "${ED}"/etc/init.d/${PN}
+ newconfd "${FILESDIR}"/${PN}-0.12.0.confd ${PN}
+
+ insinto /etc/mediatomb
+ newins "${FILESDIR}/${PN}-0.12.0.config" config.xml
+ fperms 0600 /etc/mediatomb/config.xml
+ fowners mediatomb:mediatomb /etc/mediatomb/config.xml
+
+ keepdir /var/lib/mediatomb
+ fowners mediatomb:mediatomb /var/lib/mediatomb
+}
+
+pkg_postinst() {
+ if use mysql ; then
+ elog "MediaTomb has been built with MySQL support and needs"
+ elog "to be configured before being started."
+ elog "For more information, please consult the MediaTomb"
+ elog "documentation: http://mediatomb.cc/pages/documentation"
+ elog
+ fi
+
+ elog "To configure MediaTomb edit:"
+ elog "/etc/mediatomb/config.xml"
+ elog
+ elog "The MediaTomb web interface can be reached at (after the service is started):"
+ elog "http://localhost:49152/"
+}
diff --git a/net-misc/mediatomb/mediatomb-0.12.2_pre20150118-r1.ebuild b/net-misc/mediatomb/mediatomb-0.12.2_pre20150118-r1.ebuild
new file mode 100644
index 000000000000..a2081aaa5108
--- /dev/null
+++ b/net-misc/mediatomb/mediatomb-0.12.2_pre20150118-r1.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils linux-info systemd user vcs-snapshot
+
+DESCRIPTION="MediaTomb is an open source UPnP MediaServer"
+HOMEPAGE="http://www.mediatomb.cc/"
+SRC_URI="https://github.com/v00d00/${PN}/archive/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+IUSE="curl debug +exif +ffmpeg flac id3tag +inotify +javascript lastfm
+ libav +magic +mp4 mysql +sqlite +taglib thumbnail +zlib"
+REQUIRED_USE="
+ || ( mysql sqlite )
+ taglib? ( !id3tag )
+ id3tag? ( !taglib )
+ thumbnail? ( ffmpeg )
+"
+
+DEPEND="mysql? ( virtual/mysql )
+ dev-libs/expat
+ id3tag? ( media-libs/id3lib )
+ javascript? ( >=dev-lang/spidermonkey-1.8.5:0 )
+ taglib? ( media-libs/taglib )
+ sqlite? ( >=dev-db/sqlite-3 )
+ lastfm? ( >=media-libs/lastfmlib-0.4 )
+ exif? ( media-libs/libexif )
+ mp4? ( >=media-libs/libmp4v2-1.9.1_p479:0 )
+ ffmpeg? (
+ libav? ( >=media-video/libav-10:0= )
+ !libav? ( >=media-video/ffmpeg-2.2:0= )
+ )
+ flac? ( media-libs/flac )
+ thumbnail? ( media-video/ffmpegthumbnailer[jpeg] )
+ curl? ( net-misc/curl net-misc/youtube-dl )
+ magic? ( sys-apps/file )
+ sys-apps/util-linux
+ zlib? ( sys-libs/zlib )
+ virtual/libiconv
+"
+RDEPEND="${DEPEND}"
+
+CONFIG_CHECK="~INOTIFY_USER"
+
+pkg_setup() {
+ use inotify && linux-info_pkg_setup
+
+ enewgroup mediatomb
+ enewuser mediatomb -1 -1 /dev/null mediatomb
+}
+
+src_prepare() {
+ # Support spidermonkey-187 #423991 #482392
+ if has_version "~dev-lang/spidermonkey-1.8.7" ; then
+ epatch "${FILESDIR}"/${PN}-0.12.1-mozjs187.patch
+ fi
+
+ epatch_user
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable curl) \
+ $(use_enable curl youtube) \
+ $(use_enable debug tombdebug) \
+ $(use_enable exif libexif) \
+ $(use_enable ffmpeg) \
+ $(use_enable flac) \
+ $(use_enable id3tag id3lib) \
+ $(use_enable inotify) \
+ $(use_enable javascript libjs) \
+ $(use_enable lastfm lastfm) \
+ $(use_enable magic libmagic) \
+ $(use_enable mp4 libmp4v2) \
+ $(use_enable mysql) \
+ $(use_enable sqlite sqlite3) \
+ $(use_enable taglib) \
+ $(use_enable thumbnail ffmpegthumbnailer) \
+ --enable-external-transcoding \
+ --enable-protocolinfo-extension
+}
+
+src_install() {
+ default
+
+ systemd_dounit "${S}"/scripts/systemd/"${PN}".service
+ use mysql && systemd_dounit "${S}"/scripts/systemd/"${PN}"-mysql.service
+
+ newinitd "${FILESDIR}"/${PN}-0.12.1.initd ${PN}
+ use mysql || sed -i -e "/use mysql/d" "${ED}"/etc/init.d/${PN}
+ newconfd "${FILESDIR}"/${PN}-0.12.0.confd ${PN}
+
+ insinto /etc/mediatomb
+ newins "${FILESDIR}/${PN}-0.12.0.config" config.xml
+ fperms 0600 /etc/mediatomb/config.xml
+ fowners mediatomb:mediatomb /etc/mediatomb/config.xml
+
+ keepdir /var/lib/mediatomb
+ fowners mediatomb:mediatomb /var/lib/mediatomb
+}
+
+pkg_postinst() {
+ if use mysql ; then
+ elog "MediaTomb has been built with MySQL support and needs"
+ elog "to be configured before being started."
+ elog "For more information, please consult the MediaTomb"
+ elog "documentation: http://mediatomb.cc/pages/documentation"
+ elog
+ fi
+
+ elog "To configure MediaTomb edit:"
+ elog "/etc/mediatomb/config.xml"
+ elog
+ elog "The MediaTomb web interface can be reached at (after the service is started):"
+ elog "http://localhost:49152/"
+}
diff --git a/net-misc/mediatomb/mediatomb-0.12.2_pre20150118.ebuild b/net-misc/mediatomb/mediatomb-0.12.2_pre20150118.ebuild
new file mode 100644
index 000000000000..c835557f0cb4
--- /dev/null
+++ b/net-misc/mediatomb/mediatomb-0.12.2_pre20150118.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils linux-info systemd user vcs-snapshot
+
+DESCRIPTION="MediaTomb is an open source UPnP MediaServer"
+HOMEPAGE="http://www.mediatomb.cc/"
+SRC_URI="https://github.com/v00d00/${PN}/archive/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+IUSE="curl debug +exif +ffmpeg flac id3tag +inotify +javascript lastfm
+ +magic +mp4 mysql +sqlite +taglib thumbnail +zlib"
+REQUIRED_USE="
+ || ( mysql sqlite )
+ taglib? ( !id3tag )
+ id3tag? ( !taglib )
+ thumbnail? ( ffmpeg )
+"
+
+DEPEND="mysql? ( virtual/mysql )
+ dev-libs/expat
+ id3tag? ( media-libs/id3lib )
+ javascript? ( >=dev-lang/spidermonkey-1.8.5:0 )
+ taglib? ( media-libs/taglib )
+ sqlite? ( >=dev-db/sqlite-3 )
+ lastfm? ( >=media-libs/lastfmlib-0.4 )
+ exif? ( media-libs/libexif )
+ mp4? ( >=media-libs/libmp4v2-1.9.1_p479:0 )
+ ffmpeg? ( || ( >=media-video/libav-10 >=media-video/ffmpeg-2.2 ) )
+ flac? ( media-libs/flac )
+ thumbnail? ( media-video/ffmpegthumbnailer[jpeg] )
+ curl? ( net-misc/curl net-misc/youtube-dl )
+ magic? ( sys-apps/file )
+ sys-apps/util-linux
+ zlib? ( sys-libs/zlib )
+ virtual/libiconv
+"
+RDEPEND="${DEPEND}"
+
+CONFIG_CHECK="~INOTIFY_USER"
+
+pkg_setup() {
+ use inotify && linux-info_pkg_setup
+
+ enewgroup mediatomb
+ enewuser mediatomb -1 -1 /dev/null mediatomb
+}
+
+src_prepare() {
+ # Support spidermonkey-187 #423991 #482392
+ if has_version "~dev-lang/spidermonkey-1.8.7" ; then
+ epatch "${FILESDIR}"/${PN}-0.12.1-mozjs187.patch
+ fi
+
+ epatch_user
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable curl) \
+ $(use_enable curl youtube) \
+ $(use_enable debug tombdebug) \
+ $(use_enable exif libexif) \
+ $(use_enable ffmpeg) \
+ $(use_enable flac) \
+ $(use_enable id3tag id3lib) \
+ $(use_enable inotify) \
+ $(use_enable javascript libjs) \
+ $(use_enable lastfm lastfm) \
+ $(use_enable magic libmagic) \
+ $(use_enable mp4 libmp4v2) \
+ $(use_enable mysql) \
+ $(use_enable sqlite sqlite3) \
+ $(use_enable taglib) \
+ $(use_enable thumbnail ffmpegthumbnailer) \
+ --enable-external-transcoding \
+ --enable-protocolinfo-extension
+}
+
+src_install() {
+ default
+
+ systemd_dounit "${S}"/scripts/systemd/"${PN}".service
+ use mysql && systemd_dounit "${S}"/scripts/systemd/"${PN}"-mysql.service
+
+ newinitd "${FILESDIR}"/${PN}-0.12.1.initd ${PN}
+ use mysql || sed -i -e "/use mysql/d" "${ED}"/etc/init.d/${PN}
+ newconfd "${FILESDIR}"/${PN}-0.12.0.confd ${PN}
+
+ insinto /etc/mediatomb
+ newins "${FILESDIR}/${PN}-0.12.0.config" config.xml
+ fperms 0600 /etc/mediatomb/config.xml
+ fowners mediatomb:mediatomb /etc/mediatomb/config.xml
+
+ keepdir /var/lib/mediatomb
+ fowners mediatomb:mediatomb /var/lib/mediatomb
+}
+
+pkg_postinst() {
+ if use mysql ; then
+ elog "MediaTomb has been built with MySQL support and needs"
+ elog "to be configured before being started."
+ elog "For more information, please consult the MediaTomb"
+ elog "documentation: http://mediatomb.cc/pages/documentation"
+ elog
+ fi
+
+ elog "To configure MediaTomb edit:"
+ elog "/etc/mediatomb/config.xml"
+ elog
+ elog "The MediaTomb web interface can be reached at (after the service is started):"
+ elog "http://localhost:49152/"
+}
diff --git a/net-misc/mediatomb/metadata.xml b/net-misc/mediatomb/metadata.xml
new file mode 100644
index 000000000000..e72dfea052a7
--- /dev/null
+++ b/net-misc/mediatomb/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>video</herd>
+ <maintainer>
+ <email>thev00d00@gentoo.org</email>
+ <name>Ian Whyman</name>
+ </maintainer>
+ <use>
+ <flag name="curl">Support YouTube and external media sources (e.g. internet radio)</flag>
+ <flag name="flac">Enable FLAC metadata/artwork support</flag>
+ <flag name="id3tag">Use <pkg>media-libs/libid3tag</pkg> for reading files' metadata rather than taglib</flag>
+ <flag name="inotify">Enable inotify filesystem monitoring support</flag>
+ <flag name="lastfm">Enable last.fm support</flag>
+ <flag name="libextractor">Use libextractor to gather files' metadata</flag>
+ <flag name="magic">Use libmagic to determine file types</flag>
+ <flag name="mysql">Use <pkg>dev-db/mysql</pkg> as backend rather than SQLite3</flag>
+ <flag name="taglib">Use <pkg>media-libs/taglib</pkg> for reading files' metadata rather than id3lib</flag>
+ <flag name="thumbnail">Enables video thumbnails generation through <pkg>media-video/ffmpegthumbnailer</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="github">v00d00/mediatomb</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/megatools/Manifest b/net-misc/megatools/Manifest
new file mode 100644
index 000000000000..6b9a4ba03d5c
--- /dev/null
+++ b/net-misc/megatools/Manifest
@@ -0,0 +1,3 @@
+DIST megatools-1.9.93.tar.gz 116391 SHA256 e744de3448fecb0d103a5462fa0f0ac4ea82dd780984180531425ebfc837f97f SHA512 71f5ba72e963e337da93cb3386aafeba4a6d58b75bbe848ef590940688e634c2b0175d6fae88515dd844fff6f789ba54618bc0cbba8f083432c0eac27d40df83 WHIRLPOOL 392ceb5d7ea62aaaccb203e884eee67bd203235370e6228466ac3a37714543613bfa07402d0eb92b261903850912e01ec29aa2aaf9f9f14de4e8aef16054f2e0
+DIST megatools-1.9.94.tar.gz 115526 SHA256 10d694cb1514484f9fd92760165870ed070014434b8e20d4a3a34befdadfcf12 SHA512 ff457563fc056425c4fed51021cd0d16578b628163a8cb96fe04fbdccddb0046c9172aa75a1f2df70bc0356b509f25ef29ba03a1430c2453d18edc4cc8e1012f WHIRLPOOL b3f060be9c3702a576c8019c733d889af905a72a9f22d62c5a1bd0b7c19f2cb3755ae8b70d743fae4625f6b294e19226f0d8b2e9bc0ad863048e46845591e42c
+DIST megatools-1.9.95.tar.gz 114825 SHA256 2e87b1ab12249f0168d7ed69a6f29213378dd0f77f516301f0de138d403e2423 SHA512 28ca49fdc4384f559f9f99b6cab78b03d4da1b2caa3637cf1420c037516496dd9cba4494211dd05e235bd1fc50e954a65813a6f2e0d6f5bbb532cd6897a37143 WHIRLPOOL 32901fa0f100661c79b48070ef1f8d7528d652d432a633911ad326cff967ef03ab3c935aa160bec5e8b9498d74c8385d51b731bf40bfdf27551fd2e4bc828e05
diff --git a/net-misc/megatools/files/megatools-1.9.92-fuse.patch b/net-misc/megatools/files/megatools-1.9.92-fuse.patch
new file mode 100644
index 000000000000..6841fe9fade4
--- /dev/null
+++ b/net-misc/megatools/files/megatools-1.9.92-fuse.patch
@@ -0,0 +1,42 @@
+diff --git a/configure.ac b/configure.ac
+index cc8ff46..15ca668 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -41,17 +41,32 @@ AC_SUBST(MEGA_REQUIRES)
+ AC_SUBST(MEGA_CFLAGS)
+ AC_SUBST(MEGA_LIBS)
+
+-PKG_CHECK_MODULES(FUSE, [$FUSE_REQUIRES], [ENABLE_FUSE=yes], [ENABLE_FUSE=no])
+-AC_SUBST(FUSE_CFLAGS)
+-AC_SUBST(FUSE_LIBS)
+-AM_CONDITIONAL([ENABLE_FUSE], [test x$ENABLE_FUSE = xyes])
+-
+ GLIB_MAKEFILE='$(top_srcdir)/Makefile.glib'
+ AC_SUBST(GLIB_MAKEFILE)
+
+ PKG_CHECK_MODULES(GLIBTESTS, [glib-2.0 >= 2.34.0], [ENABLE_TESTS=yes], [ENABLE_TESTS=no])
+ AM_CONDITIONAL([ENABLE_TESTS], [test x$ENABLE_TESTS = xyes])
+
++# check fuse
++AC_ARG_WITH([fuse],
++ AS_HELP_STRING([--without-fuse], [Ignore presence of fuse and disable it]))
++
++AS_IF([test "x$with_fuse" != "xno"],
++ [PKG_CHECK_MODULES(FUSE, [$FUSE_REQUIRES], [ENABLE_FUSE=yes], [ENABLE_FUSE=no])],
++ [ENABLE_FUSE=no])
++
++AS_IF([test "x$ENABLE_FUSE" = "xyes"],
++ [
++ AC_SUBST(FUSE_CFLAGS)
++ AC_SUBST(FUSE_LIBS)
++ ],
++ [AS_IF([test "x$with_fuse" = "xyes"],
++ [AC_MSG_ERROR([fuse support requested but not found])
++ ])
++])
++
++AM_CONDITIONAL([ENABLE_FUSE], [test "x$ENABLE_FUSE" = "xyes"])
++
+ # enable dev compiler warnings
+ AC_ARG_ENABLE([warnings], AC_HELP_STRING([--enable-warnings], [Build with compiler warnings enabled.]))
+ AS_IF([test "x$enable_warnings" = "xyes"], [
diff --git a/net-misc/megatools/megatools-1.9.93.ebuild b/net-misc/megatools/megatools-1.9.93.ebuild
new file mode 100644
index 000000000000..60a3cebd1846
--- /dev/null
+++ b/net-misc/megatools/megatools-1.9.93.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+inherit autotools-utils
+
+DESCRIPTION="Command line tools and C library for accessing Mega cloud storage"
+HOMEPAGE="https://github.com/megous/megatools"
+SRC_URI="https://github.com/megous/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="fuse introspection static-libs"
+
+COMMON_DEPEND="dev-libs/glib:2
+ dev-libs/openssl:0
+ net-misc/curl
+ fuse? ( sys-fs/fuse )
+"
+RDEPEND="${COMMON_DEPEND}
+ net-libs/glib-networking[ssl]
+"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ app-text/asciidoc"
+
+src_configure() {
+ local myeconfargs=(
+ --enable-shared
+ --enable-docs-build
+ --disable-maintainer-mode
+ --disable-warnings
+ --disable-glibtest
+ $(use_enable static-libs static)
+ $(use_enable introspection)
+ $(use_with fuse)
+ )
+ autotools-utils_src_configure
+}
diff --git a/net-misc/megatools/megatools-1.9.94.ebuild b/net-misc/megatools/megatools-1.9.94.ebuild
new file mode 100644
index 000000000000..9c6aea0c4ce5
--- /dev/null
+++ b/net-misc/megatools/megatools-1.9.94.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+inherit autotools-utils
+
+DESCRIPTION="Command line tools and C library for accessing Mega cloud storage"
+HOMEPAGE="https://github.com/megous/megatools"
+SRC_URI="https://github.com/megous/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="fuse introspection static-libs"
+
+COMMON_DEPEND="dev-libs/glib:2
+ dev-libs/openssl:0
+ net-misc/curl
+ fuse? ( sys-fs/fuse )
+"
+RDEPEND="${COMMON_DEPEND}
+ net-libs/glib-networking[ssl]
+"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ app-text/asciidoc"
+
+src_configure() {
+ local myeconfargs=(
+ --enable-shared
+ --enable-docs-build
+ --disable-maintainer-mode
+ --disable-warnings
+ --disable-glibtest
+ $(use_enable static-libs static)
+ $(use_enable introspection)
+ $(use_with fuse)
+ )
+ autotools-utils_src_configure
+}
diff --git a/net-misc/megatools/megatools-1.9.95.ebuild b/net-misc/megatools/megatools-1.9.95.ebuild
new file mode 100644
index 000000000000..9c6aea0c4ce5
--- /dev/null
+++ b/net-misc/megatools/megatools-1.9.95.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+inherit autotools-utils
+
+DESCRIPTION="Command line tools and C library for accessing Mega cloud storage"
+HOMEPAGE="https://github.com/megous/megatools"
+SRC_URI="https://github.com/megous/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="fuse introspection static-libs"
+
+COMMON_DEPEND="dev-libs/glib:2
+ dev-libs/openssl:0
+ net-misc/curl
+ fuse? ( sys-fs/fuse )
+"
+RDEPEND="${COMMON_DEPEND}
+ net-libs/glib-networking[ssl]
+"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ app-text/asciidoc"
+
+src_configure() {
+ local myeconfargs=(
+ --enable-shared
+ --enable-docs-build
+ --disable-maintainer-mode
+ --disable-warnings
+ --disable-glibtest
+ $(use_enable static-libs static)
+ $(use_enable introspection)
+ $(use_with fuse)
+ )
+ autotools-utils_src_configure
+}
diff --git a/net-misc/megatools/metadata.xml b/net-misc/megatools/metadata.xml
new file mode 100644
index 000000000000..579df4723ce3
--- /dev/null
+++ b/net-misc/megatools/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>dlan@gentoo.org</email>
+ <name>Yixun Lan</name>
+ </maintainer>
+ <longdescription lang="en">
+Megatools is a collection of programs for accessing Mega service from
+a command line of your desktop or server.
+
+Mega website can be found at http://mega.co.nz.
+</longdescription>
+ <use>
+ <flag name="fuse">
+ Enables support for the filesystem in userspace plugin through <pkg>sys-fs/fuse</pkg>.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="github">megous/megatools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/memcached/Manifest b/net-misc/memcached/Manifest
new file mode 100644
index 000000000000..19bc955a880f
--- /dev/null
+++ b/net-misc/memcached/Manifest
@@ -0,0 +1,5 @@
+DIST memcached-1.2.6.tar.gz 217651 SHA256 365c5719997af9477aedf4ff0435fbd83aadf5fa9b1c7a2e0d744f865aac578e SHA512 0e492c0dbd84321533588b9373827c41e90b6ef0ce233e5849c3291c25179947e4e332c7e972285c6899e45317edfcc718e558bf63ce1f2d00180dd95b927c63 WHIRLPOOL 0b08ff9534ac983bbc7f4ec5190d61f7f55d217080d18f406bb655fc6c202ef162a91043070b18875b80af28e5ce5c5ae15cfcbda18044de5f85c9701f3f9b9a
+DIST memcached-1.2.8.tar.gz 221285 SHA256 9e36702833a9213d607801a44325d108e6b86abc7af82fe265cce4b96eb2269e SHA512 582a40aa1ebe20232ecb004830919d0ba4fe3d6fa15e6d51d1d929ab13719d90629858ae7fda4f45a78b877a03dd68241938e6b18a48bc5421df99a8437498df WHIRLPOOL f84a494951d95bd14ed43713f8b61425c01cc58efdabb844a2b8092d20ee00afb4dd239e950618bf0e8bc85ec79ecb4f0904f068049e507d653b8be218f5850e
+DIST memcached-1.3.3.tar.gz 260203 SHA256 3728c714c3c0194a429f754d739067bea193d66359a03a63437428bf4a2cce84 SHA512 ce05d12b00fbb88d7020073591015ec918fb8e90476e2b1d652349520595416a65634a8d22cc5486a9d723b9fb938493145c8b70b9a3a31f426a6e55a9803eec WHIRLPOOL b4df09679deb9adb9fdf83b23e9d79f116e29d0c26f8f8c102f4fba3b01d939889ded347e98f977ee278072328aadd4079ba34053bbc680203bcc28aea63e519
+DIST memcached-1.4.17.tar.gz 326970 SHA256 d9173ef6d99ba798c982ea4566cb4f0e64eb23859fdbf9926a89999d8cdc0458 SHA512 cf44500f81494efe8b27d2859d160e288260323d9c0ca6f0d0507c131257048012248e6a7639e410cec6765219d4595359d9335281eeb3b238306972a5bd859d WHIRLPOOL 2c9115630e0fd68d42e0771aea7d59f1d296b1f5ff4f2d586095ecd01ded6f4c60d0722a1ba63b926042e304b3e88521b2f862dffecec5c0145b96785c4b2b14
+DIST memcached-1.4.24.tar.gz 354917 SHA256 08a426c504ecf64633151eec1058584754d2f54e62e5ed2d6808559401617e55 SHA512 446676ae7b21d8d9246f38d3df06b167ea93a853f88ac70ae3a99b1a85a4de3d452ee266e77fac599660b9bc6e785bc89224f46e16ff6e216476d50e4706b9f6 WHIRLPOOL 269e920a0d5279786a4f4ef516b71fa7e95cacdf8627a2b692d2387a66d5d9a80618f190cf013bf070aff0f73d70d6e75dc4e3402fe8e64b372026be83170e3d
diff --git a/net-misc/memcached/files/1.1.12/conf b/net-misc/memcached/files/1.1.12/conf
new file mode 100644
index 000000000000..6609d16bb205
--- /dev/null
+++ b/net-misc/memcached/files/1.1.12/conf
@@ -0,0 +1,28 @@
+# Copyright 2003 Gentoo Technologies, Inc
+# $Id$
+# memcached config file
+
+MEMCACHED_BINARY="/usr/bin/memcached"
+
+#Specify memory usage in megabytes (do not use letters)
+#64MB is default
+MEMUSAGE="64"
+
+#User to run as
+MEMCACHED_RUNAS="memcached"
+
+#Specify maximum number of concurrent connections
+#1024 is default
+MAXCONN="1024"
+
+#Listen for connections on what address?
+LISTENON=""
+
+#Listen for connections on what port?
+PORT="11211"
+
+#PID file location
+PIDFILE="/var/run/memcached/memcached-${PORT}.pid"
+
+#Other Options
+MISC_OPTS=""
diff --git a/net-misc/memcached/files/1.1.12/init b/net-misc/memcached/files/1.1.12/init
new file mode 100644
index 000000000000..30035c39c80f
--- /dev/null
+++ b/net-misc/memcached/files/1.1.12/init
@@ -0,0 +1,48 @@
+#!/sbin/runscript
+# $Id$
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ -z "${LISTENON}" ]; then
+ ewarn "You should edit /etc/conf.d/memcached and specify an address to listen on."
+ ewarn "Listening on any address (I hope your firewall is set up properly)"
+ fi
+}
+
+start() {
+ ebegin "Starting memcached"
+ checkconfig
+ local dir="$(dirname ${PIDFILE})"
+ if [ ! -d "${dir}" ]; then
+ einfo " Creating ${dir}"
+ mkdir -p "${dir}"
+ fi
+ chown ${MEMCACHED_RUNAS} "${dir}"
+ if [ -f ${PIDFILE} ]; then
+ einfo " Removing stale pidfile ${PIDFILE}"
+ rm -f ${PIDFILE} 1>/dev/null
+ fi
+
+ if [ -z "${LISTENON}" ]; then
+ c_LISTENON=""
+ else
+ c_LISTENON="-l ${LISTENON}"
+ fi
+
+ /sbin/start-stop-daemon --start \
+ --exec ${MEMCACHED_BINARY} -- \
+ -d -p ${PORT} ${c_LISTENON} -m ${MEMUSAGE} \
+ -c ${MAXCONN} -u ${MEMCACHED_RUNAS} -P ${PIDFILE} ${MISC_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping memcached"
+ start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
+ rm -f ${PIDFILE}
+ eend $?
+}
+
diff --git a/net-misc/memcached/files/1.1.13/conf b/net-misc/memcached/files/1.1.13/conf
new file mode 100644
index 000000000000..6609d16bb205
--- /dev/null
+++ b/net-misc/memcached/files/1.1.13/conf
@@ -0,0 +1,28 @@
+# Copyright 2003 Gentoo Technologies, Inc
+# $Id$
+# memcached config file
+
+MEMCACHED_BINARY="/usr/bin/memcached"
+
+#Specify memory usage in megabytes (do not use letters)
+#64MB is default
+MEMUSAGE="64"
+
+#User to run as
+MEMCACHED_RUNAS="memcached"
+
+#Specify maximum number of concurrent connections
+#1024 is default
+MAXCONN="1024"
+
+#Listen for connections on what address?
+LISTENON=""
+
+#Listen for connections on what port?
+PORT="11211"
+
+#PID file location
+PIDFILE="/var/run/memcached/memcached-${PORT}.pid"
+
+#Other Options
+MISC_OPTS=""
diff --git a/net-misc/memcached/files/1.1.13/init b/net-misc/memcached/files/1.1.13/init
new file mode 100644
index 000000000000..1cbb60a75755
--- /dev/null
+++ b/net-misc/memcached/files/1.1.13/init
@@ -0,0 +1,47 @@
+#!/sbin/runscript
+# $Id$
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ -z "${LISTENON}" ]; then
+ ewarn "You should edit /etc/conf.d/memcached and specify an address to listen on."
+ ewarn "Listening on any address (I hope your firewall is set up properly)"
+ fi
+}
+
+start() {
+ ebegin "Starting memcached"
+ checkconfig
+ local dir="$(dirname ${PIDFILE})"
+ if [ ! -d "${dir}" ]; then
+ einfo " Creating ${dir}"
+ mkdir -p "${dir}"
+ fi
+ chown ${MEMCACHED_RUNAS} "${dir}"
+ if [ -f ${PIDFILE} ]; then
+ einfo " Removing stale pidfile ${PIDFILE}"
+ rm -f ${PIDFILE} 1>/dev/null
+ fi
+
+ if [ -z "${LISTENON}" ]; then
+ c_LISTENON=""
+ else
+ c_LISTENON="-l ${LISTENON}"
+ fi
+
+ /sbin/start-stop-daemon --start --pidfile ${PIDFILE} \
+ --exec ${MEMCACHED_BINARY} -- \
+ -d -p ${PORT} ${c_LISTENON} -m ${MEMUSAGE} \
+ -c ${MAXCONN} -u ${MEMCACHED_RUNAS} -P ${PIDFILE} ${MISC_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping memcached"
+ start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
+ rm -f ${PIDFILE}
+ eend $?
+}
diff --git a/net-misc/memcached/files/1.2.6/conf b/net-misc/memcached/files/1.2.6/conf
new file mode 100644
index 000000000000..61c3c7176522
--- /dev/null
+++ b/net-misc/memcached/files/1.2.6/conf
@@ -0,0 +1,32 @@
+# Copyright 2003 Gentoo Technologies, Inc
+# $Id$
+# memcached config file
+
+MEMCACHED_BINARY="/usr/bin/memcached"
+
+#Specify memory usage in megabytes (do not use letters)
+#64MB is default
+MEMUSAGE="64"
+
+#User to run as
+MEMCACHED_RUNAS="memcached"
+
+#Specify maximum number of concurrent connections
+#1024 is default
+MAXCONN="1024"
+
+#Listen for connections on what address?
+# If this is empty, memcached will listen on 0.0.0.0
+# be sure you have a firewall in place!
+LISTENON=""
+
+#Listen for connections on what port?
+PORT="11211"
+
+#PID file location
+# '-${PORT}.${CONF}.pid' will be appended to this!
+# You do not normally need to change this.
+PIDBASE="/var/run/memcached/memcached"
+
+#Other Options
+MISC_OPTS=""
diff --git a/net-misc/memcached/files/1.2.6/init b/net-misc/memcached/files/1.2.6/init
new file mode 100644
index 000000000000..1c0e59b76642
--- /dev/null
+++ b/net-misc/memcached/files/1.2.6/init
@@ -0,0 +1,75 @@
+#!/sbin/runscript
+# $Id$
+
+CONF="${SVCNAME#*.}"
+CONFBASE="/etc/conf.d/memcached"
+
+[ -z "${PIDBASE}" ] && PIDBASE="/var/run/memcached/memcached"
+[ "${CONF}" == "memcached" ] && CONF=''
+
+if [ -n "${CONF}" ]; then
+ PIDFILE="${PIDBASE}-${PORT}.${CONF}.pid"
+ CONFSRC="${CONFBASE}.${CONF}"
+ if [ -f "${CONFSRC}" ]; then
+ source "${CONFSRC}"
+ else
+ eerror "The configuration file $CONFSRC was not found!"
+ fi
+else
+ PIDFILE="${PIDBASE}-${PORT}.pid"
+ CONFSRC="${CONFBASE}"
+fi
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ -z "${LISTENON}" ]; then
+ ewarn "You should edit $CONFSRC and specify an address to listen on."
+ ewarn "Listening on any address (check your firewall!)"
+ fi
+}
+
+start() {
+ if [ -n "${CONF}" ]; then
+ ebegin "Starting memcached (${CONF})"
+ else
+ ebegin "Starting memcached"
+ fi
+ checkconfig
+ local dir="$(dirname ${PIDFILE})"
+ if [ ! -d "${dir}" ]; then
+ einfo " Creating ${dir}"
+ mkdir -p "${dir}"
+ fi
+ chown ${MEMCACHED_RUNAS} "${dir}"
+ if [ -f "${PIDFILE}" ]; then
+ einfo " Removing stale pidfile ${PIDFILE}"
+ rm -f "${PIDFILE}" 1>/dev/null
+ fi
+
+ if [ -z "${LISTENON}" ]; then
+ c_LISTENON=""
+ else
+ c_LISTENON="-l ${LISTENON}"
+ fi
+
+ /sbin/start-stop-daemon --start --pidfile "${PIDFILE}" \
+ --exec "${MEMCACHED_BINARY}" -- \
+ -d -p ${PORT} ${c_LISTENON} -m ${MEMUSAGE} \
+ -c ${MAXCONN} -u ${MEMCACHED_RUNAS} -P "${PIDFILE}" \
+ ${MISC_OPTS}
+ eend $?
+}
+
+stop() {
+ if [ -n "${CONF}" ]; then
+ ebegin "Stopping memcached (${CONF})"
+ else
+ ebegin "Stopping memcached"
+ fi
+ start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
+ rm -f "${PIDFILE}"
+ eend $?
+}
diff --git a/net-misc/memcached/files/1.3.3/conf b/net-misc/memcached/files/1.3.3/conf
new file mode 100644
index 000000000000..341ce57f022c
--- /dev/null
+++ b/net-misc/memcached/files/1.3.3/conf
@@ -0,0 +1,35 @@
+# Copyright 2003 Gentoo Technologies, Inc
+# $Id$
+# memcached config file
+
+MEMCACHED_BINARY="/usr/bin/memcached"
+
+#Specify memory usage in megabytes (do not use letters)
+#64MB is default
+MEMUSAGE="64"
+
+#User to run as
+MEMCACHED_RUNAS="memcached"
+
+#Specify maximum number of concurrent connections
+#1024 is default
+MAXCONN="1024"
+
+#Listen for connections on what address?
+# If this is empty, memcached will listen on 0.0.0.0
+# be sure you have a firewall in place!
+LISTENON=""
+
+#Listen for connections on what port?
+PORT="11211"
+
+# Listen for UDP connecitons on what port? 0 means turn off UDP
+UDPPORT="${PORT}"
+
+#PID file location
+# '-${PORT}.${CONF}.pid' will be appended to this!
+# You do not normally need to change this.
+PIDBASE="/var/run/memcached/memcached"
+
+#Other Options
+MISC_OPTS=""
diff --git a/net-misc/memcached/files/1.3.3/init b/net-misc/memcached/files/1.3.3/init
new file mode 100644
index 000000000000..e10adbd73518
--- /dev/null
+++ b/net-misc/memcached/files/1.3.3/init
@@ -0,0 +1,77 @@
+#!/sbin/runscript
+
+CONF="${SVCNAME#*.}"
+CONFBASE="/etc/conf.d/memcached"
+
+[ -z "${PIDBASE}" ] && PIDBASE="/var/run/memcached/memcached"
+[ "${CONF}" = "memcached" ] && CONF=''
+
+if [ -n "${CONF}" ]; then
+ PIDFILE="${PIDBASE}-${PORT}.${CONF}.pid"
+ CONFSRC="${CONFBASE}.${CONF}"
+ if [ -f "${CONFSRC}" ]; then
+ . "${CONFSRC}"
+ else
+ eerror "The configuration file $CONFSRC was not found!"
+ fi
+else
+ PIDFILE="${PIDBASE}-${PORT}.pid"
+ CONFSRC="${CONFBASE}"
+fi
+
+depend() {
+ need net
+ # per bug #269022, accurate time is important for memcached!
+ # We include the full list of ways it might be set on boot.
+ after ntp-client ntpd rdate openrdate adjtimex hwclock
+}
+
+checkconfig() {
+ if [ -z "${LISTENON}" ]; then
+ ewarn "You should edit $CONFSRC and specify an address to listen on."
+ ewarn "Listening on any address (check your firewall!)"
+ fi
+}
+
+start() {
+ if [ -n "${CONF}" ]; then
+ ebegin "Starting memcached (${CONF})"
+ else
+ ebegin "Starting memcached"
+ fi
+ checkconfig
+ local dir="$(dirname ${PIDFILE})"
+ if [ ! -d "${dir}" ]; then
+ einfo " Creating ${dir}"
+ mkdir -p "${dir}"
+ fi
+ chown ${MEMCACHED_RUNAS} "${dir}"
+ if [ -f "${PIDFILE}" ]; then
+ einfo " Removing stale pidfile ${PIDFILE}"
+ rm -f "${PIDFILE}" 1>/dev/null
+ fi
+
+ if [ -z "${LISTENON}" ]; then
+ c_LISTENON=""
+ else
+ c_LISTENON="-l ${LISTENON}"
+ fi
+
+ /sbin/start-stop-daemon --start --pidfile "${PIDFILE}" \
+ --exec "${MEMCACHED_BINARY}" -- \
+ -d -p ${PORT} -U ${UDPPORT} ${c_LISTENON} -m ${MEMUSAGE} \
+ -c ${MAXCONN} -u ${MEMCACHED_RUNAS} -P "${PIDFILE}" \
+ ${MISC_OPTS}
+ eend $?
+}
+
+stop() {
+ if [ -n "${CONF}" ]; then
+ ebegin "Stopping memcached (${CONF})"
+ else
+ ebegin "Stopping memcached"
+ fi
+ start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
+ rm -f "${PIDFILE}"
+ eend $?
+}
diff --git a/net-misc/memcached/files/memcached-1.2.2-fbsd.patch b/net-misc/memcached/files/memcached-1.2.2-fbsd.patch
new file mode 100644
index 000000000000..76f237698cf7
--- /dev/null
+++ b/net-misc/memcached/files/memcached-1.2.2-fbsd.patch
@@ -0,0 +1,12 @@
+Index: memcached-1.2.2/memcached.h
+===================================================================
+--- memcached-1.2.2.orig/memcached.h
++++ memcached-1.2.2/memcached.h
+@@ -4,6 +4,7 @@
+ #include "config.h"
+ #include <sys/types.h>
+ #include <sys/time.h>
++#include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <event.h>
+
diff --git a/net-misc/memcached/files/memcached-1.3.3-gcc4-slab-fixup.patch b/net-misc/memcached/files/memcached-1.3.3-gcc4-slab-fixup.patch
new file mode 100644
index 000000000000..5b703502e73c
--- /dev/null
+++ b/net-misc/memcached/files/memcached-1.3.3-gcc4-slab-fixup.patch
@@ -0,0 +1,25 @@
+Compile fix for illegal syntax to make GCC4 happy.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+diff -Nuar -Nuar memcached-1.3.3.orig/slabs.c memcached-1.3.3/slabs.c
+--- memcached-1.3.3.orig/slabs.c 2009-04-02 12:29:32.000000000 -0700
++++ memcached-1.3.3/slabs.c 2009-06-03 14:11:04.134757232 -0700
+@@ -419,7 +419,7 @@
+ slab = p->slab_list[p->killing - 1];
+ slab_end = (char*)slab + POWER_BLOCK;
+
+- for (iter = slab; iter < slab_end; (char*)iter += p->size) {
++ for (iter = slab; iter < slab_end; iter = (char*)iter + p->size) {
+ item *it = (item *)iter;
+ if (it->slabs_clsid) {
+ if (it->refcount) was_busy = true;
+@@ -449,7 +449,7 @@
+ dp->end_page_free = dp->perslab;
+ /* this isn't too critical, but other parts of the code do asserts to
+ make sure this field is always 0. */
+- for (iter = slab; iter < slab_end; (char*)iter += dp->size) {
++ for (iter = slab; iter < slab_end; iter = (char*)iter + dp->size) {
+ ((item *)iter)->slabs_clsid = 0;
+ }
+ return 1;
diff --git a/net-misc/memcached/files/memcached-1.4.0-fix-as-needed-linking.patch b/net-misc/memcached/files/memcached-1.4.0-fix-as-needed-linking.patch
new file mode 100644
index 000000000000..d8a8ff295fc3
--- /dev/null
+++ b/net-misc/memcached/files/memcached-1.4.0-fix-as-needed-linking.patch
@@ -0,0 +1,47 @@
+Users that try to second-guess us and specify -DNDEBUG are just asking to cause
+problems. They cause breakage with the testapp and -debug versions.
+
+So let's ensure that testapp and -debug use per-object compile flags, and thus
+preventing flags leaking between stuff. The #undef at the top of testapp.c is
+redundant now, but not removed.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+X-Gentoo-Bug: 278780
+X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=278780
+
+diff -Nuar memcached-1.4.0/testapp.c memcached-1.4.0/testapp.c
+--- memcached-1.4.0/testapp.c 2009-07-09 09:43:42.000000000 -0700
++++ memcached-1.4.0/testapp.c 2009-07-27 16:41:14.468907751 -0700
+@@ -115,12 +115,16 @@
+ char old = *(p - 1);
+ *(p - 1) = 0;
+ cache_free(cache, p);
++#ifndef NDEBUG
+ assert(cache_error == -1);
++#endif
+ *(p - 1) = old;
+
+ p[sizeof(uint32_t)] = 0;
+ cache_free(cache, p);
++#ifndef NDEBUG
+ assert(cache_error == 1);
++#endif
+
+ /* restore signal handler */
+ sigaction(SIGABRT, &old_action, NULL);
+diff -Nuar memcached-1.4.0.orig/Makefile.am memcached-1.4.0/Makefile.am
+--- memcached-1.4.0.orig/Makefile.am 2009-07-09 09:43:42.000000000 -0700
++++ memcached-1.4.0/Makefile.am 2009-07-27 17:45:20.973106097 -0700
+@@ -27,8 +27,12 @@
+
+ memcached_debug_SOURCES = $(memcached_SOURCES)
+ memcached_CPPFLAGS = -DNDEBUG
++
+ memcached_debug_LDADD = @PROFILER_LDFLAGS@
+ memcached_debug_CFLAGS = @PROFILER_FLAGS@
++memcached_debug_CPPFLAGS = -UNDEBUG
++
++testapp_CPPFLAGS = -UNDEBUG
+
+ memcached_LDADD =
+ memcached_DEPENDENCIES =
diff --git a/net-misc/memcached/files/memcached-1.4.17-EWOULDBLOCK.patch b/net-misc/memcached/files/memcached-1.4.17-EWOULDBLOCK.patch
new file mode 100644
index 000000000000..115c6bbc8633
--- /dev/null
+++ b/net-misc/memcached/files/memcached-1.4.17-EWOULDBLOCK.patch
@@ -0,0 +1,21 @@
+errno.h(0P):
+ EAGAIN Resource unavailable, try again (may be the same value as [EWOULDBLOCK]).
+
+ [...]
+
+ EWOULDBLOCK
+ Operation would block (may be the same value as [EAGAIN]).
+
+
+--- a/testapp.c
++++ b/testapp.c
+@@ -1840,6 +1840,9 @@
+ switch (errno) {
+ case EINTR:
+ break;
++#if (EAGAIN != EWOULDBLOCK)
++ case EAGAIN:
++#endif
+ case ENOMEM:
+ case EWOULDBLOCK:
+ more = false; \ No newline at end of file
diff --git a/net-misc/memcached/files/memcached-1.4.4-as-needed.patch b/net-misc/memcached/files/memcached-1.4.4-as-needed.patch
new file mode 100644
index 000000000000..f6e5cde11057
--- /dev/null
+++ b/net-misc/memcached/files/memcached-1.4.4-as-needed.patch
@@ -0,0 +1,31 @@
+diff -Nuar memcached-1.4.4.orig/configure.ac memcached-1.4.4/configure.ac
+--- memcached-1.4.4.orig/configure.ac 2009-11-24 16:40:29.000000000 -0800
++++ memcached-1.4.4/configure.ac 2009-11-27 15:20:38.000000000 -0800
+@@ -115,6 +115,14 @@
+ AC_SUBST(ENABLE_SASL)
+ AC_SUBST(PROFILER_LDFLAGS)
+
++dnl Check whether the user's system supports pthread before adding -pthread to CFLAGS
++dnl otherwise we won't get -l{threads} in LIBS
++dnl AFAIK -pthread should be added to LDFLAGS on BSD systems
++AC_SEARCH_LIBS(pthread_create, [pthread pthreads thread threads] )
++if test "x$ac_cv_search_pthread_create" == "xno"; then
++ AC_MSG_ERROR([Can't enable threads without the POSIX thread library.])
++fi
++
+ AC_ARG_ENABLE(coverage,
+ [AS_HELP_STRING([--disable-coverage],[Disable code coverage])])
+
+@@ -376,12 +384,6 @@
+
+ AC_C_HTONLL
+
+-dnl Check whether the user's system supports pthread
+-AC_SEARCH_LIBS(pthread_create, pthread)
+-if test "x$ac_cv_search_pthread_create" = "xno"; then
+- AC_MSG_ERROR([Can't enable threads without the POSIX thread library.])
+-fi
+-
+ AC_CHECK_FUNCS(mlockall)
+ AC_CHECK_FUNCS(getpagesizes)
+ AC_CHECK_FUNCS(memcntl)
diff --git a/net-misc/memcached/files/memcached.confd b/net-misc/memcached/files/memcached.confd
new file mode 100644
index 000000000000..aad80780e759
--- /dev/null
+++ b/net-misc/memcached/files/memcached.confd
@@ -0,0 +1,40 @@
+# memcached config file
+
+MEMCACHED_BINARY="/usr/bin/memcached"
+
+# Specify memory usage in megabytes (do not use letters)
+# 64MB is default
+MEMUSAGE="64"
+
+# User to run as
+MEMCACHED_RUNAS="memcached"
+
+# Specify maximum number of concurrent connections
+# 1024 is default
+MAXCONN="1024"
+
+# Listen for connections on what address?
+# If this is empty, memcached will listen on 0.0.0.0
+# be sure you have a firewall in place!
+LISTENON=""
+
+# Listen for connections on what port?
+PORT="11211"
+
+# Listen for UDP connecitons on what port? 0 means turn off UDP
+UDPPORT="${PORT}"
+
+# PID file location
+# '-${PORT}.${CONF}.pid' will be appended to this!
+# You do not normally need to change this.
+PIDBASE="/var/run/memcached/memcached"
+
+# Socket to listen on
+#SOCKET="/var/run/memcached/memcached.sock"
+
+# Socket mask
+# 0700 is default
+#SOCKET_MASK="0700"
+
+# Other Options
+MISC_OPTS=""
diff --git a/net-misc/memcached/files/memcached.init b/net-misc/memcached/files/memcached.init
new file mode 100644
index 000000000000..dd181ebf3f10
--- /dev/null
+++ b/net-misc/memcached/files/memcached.init
@@ -0,0 +1,93 @@
+#!/sbin/runscript
+
+CONF="${SVCNAME#*.}"
+CONFBASE="/etc/conf.d/memcached"
+
+[ -z "${PIDBASE}" ] && PIDBASE="/run/memcached/memcached"
+[ "${CONF}" == "memcached" ] && CONF=''
+
+if [ -n "${CONF}" ]; then
+ PIDFILE="${PIDBASE}.${CONF}.pid"
+ CONFSRC="${CONFBASE}.${CONF}"
+ if [ -f "${CONFSRC}" ]; then
+ source "${CONFSRC}"
+ else
+ eerror "The configuration file $CONFSRC was not found!"
+ fi
+else
+ PIDFILE="${PIDBASE}.pid"
+ CONFSRC="${CONFBASE}"
+fi
+
+depend() {
+ if [ -z "${SOCKET}" ]; then
+ need net
+ fi
+ # per bug #269022, accurate time is important for memcached!
+ # We include the full list of ways it might be set on boot.
+ after ntp-client ntpd rdate openrdate adjtimex hwclock
+}
+
+checkconfig() {
+ if [ -z "${LISTENON}" ] && [ -z "${SOCKET}" ]; then
+ ewarn "You should edit $CONFSRC and specify an address or socket to listen on."
+ ewarn "Listening on any address (check your firewall!)"
+ fi
+}
+
+start() {
+ if [ -n "${CONF}" ]; then
+ ebegin "Starting memcached (${CONF})"
+ else
+ ebegin "Starting memcached"
+ fi
+ checkconfig
+ local dir="$(dirname ${PIDFILE})"
+ if [ ! -d "${dir}" ]; then
+ einfo " Creating ${dir}"
+ mkdir -p "${dir}"
+ fi
+
+ chown ${MEMCACHED_RUNAS} "${dir}"
+ if [ -f "${PIDFILE}" ]; then
+ einfo " Removing stale pidfile ${PIDFILE}"
+ rm -f "${PIDFILE}" 1>/dev/null
+ fi
+
+
+ if [ -n "${SOCKET}" ]; then
+ CONNECTION="-s ${SOCKET}"
+
+ if [ -n "${SOCKET_MASK}" ]; then
+ CONNECTION="${CONNECTION} -a ${SOCKET_MASK}"
+ fi
+ else
+ CONNECTION="-p ${PORT} -U ${UDPPORT}"
+
+ if [ -n "${LISTENON}" ]; then
+ CONNECTION="${CONNECTION} -l ${LISTENON}"
+ fi
+ fi
+
+ /sbin/start-stop-daemon --start --pidfile "${PIDFILE}" \
+ --exec "${MEMCACHED_BINARY}" -- \
+ -d ${CONNECTION} -m ${MEMUSAGE} \
+ -c ${MAXCONN} -u ${MEMCACHED_RUNAS} -P "${PIDFILE}" \
+ ${MISC_OPTS}
+
+ eend $?
+}
+
+stop() {
+ if [ -n "${CONF}" ]; then
+ ebegin "Stopping memcached (${CONF})"
+ else
+ ebegin "Stopping memcached"
+ fi
+
+ start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
+
+ rm -f "${PIDFILE}"
+
+ eend $?
+}
diff --git a/net-misc/memcached/files/memcached.init2 b/net-misc/memcached/files/memcached.init2
new file mode 100644
index 000000000000..929378100305
--- /dev/null
+++ b/net-misc/memcached/files/memcached.init2
@@ -0,0 +1,90 @@
+#!/sbin/runscript
+
+CONF="${SVCNAME#*.}"
+CONFBASE="/etc/conf.d/memcached"
+
+[ -z "${PIDBASE}" ] && PIDBASE="/run/memcached/memcached"
+[ "${CONF}" = "memcached" ] && CONF=''
+
+if [ -n "${CONF}" ]; then
+ PIDFILE="${PIDBASE}.${CONF}.pid"
+ CONFSRC="${CONFBASE}.${CONF}"
+ if [ -f "${CONFSRC}" ]; then
+ source "${CONFSRC}"
+ else
+ eerror "The configuration file $CONFSRC was not found!"
+ fi
+else
+ PIDFILE="${PIDBASE}.pid"
+ CONFSRC="${CONFBASE}"
+fi
+
+depend() {
+ # per bug #269022, accurate time is important for memcached!
+ # We include the full list of ways it might be set on boot.
+ after ntp-client ntpd rdate openrdate adjtimex hwclock
+}
+
+checkconfig() {
+ if [ -z "${LISTENON}" ] && [ -z "${SOCKET}" ]; then
+ ewarn "You should edit $CONFSRC and specify an address or socket to listen on."
+ ewarn "Listening on any address (check your firewall!)"
+ fi
+}
+
+start() {
+ if [ -n "${CONF}" ]; then
+ ebegin "Starting memcached (${CONF})"
+ else
+ ebegin "Starting memcached"
+ fi
+ checkconfig
+ local dir="$(dirname ${PIDFILE})"
+ if [ ! -d "${dir}" ]; then
+ einfo " Creating ${dir}"
+ mkdir -p "${dir}"
+ fi
+
+ chown ${MEMCACHED_RUNAS} "${dir}"
+ if [ -f "${PIDFILE}" ]; then
+ einfo " Removing stale pidfile ${PIDFILE}"
+ rm -f "${PIDFILE}" 1>/dev/null
+ fi
+
+
+ if [ -n "${SOCKET}" ]; then
+ CONNECTION="-s ${SOCKET}"
+
+ if [ -n "${SOCKET_MASK}" ]; then
+ CONNECTION="${CONNECTION} -a ${SOCKET_MASK}"
+ fi
+ else
+ CONNECTION="-p ${PORT} -U ${UDPPORT}"
+
+ if [ -n "${LISTENON}" ]; then
+ CONNECTION="${CONNECTION} -l ${LISTENON}"
+ fi
+ fi
+
+ /sbin/start-stop-daemon --start --pidfile "${PIDFILE}" \
+ --exec "${MEMCACHED_BINARY}" -- \
+ -d ${CONNECTION} -m ${MEMUSAGE} \
+ -c ${MAXCONN} -u ${MEMCACHED_RUNAS} -P "${PIDFILE}" \
+ ${MISC_OPTS}
+
+ eend $?
+}
+
+stop() {
+ if [ -n "${CONF}" ]; then
+ ebegin "Stopping memcached (${CONF})"
+ else
+ ebegin "Stopping memcached"
+ fi
+
+ start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
+
+ rm -f "${PIDFILE}"
+
+ eend $?
+}
diff --git a/net-misc/memcached/files/memcached.service b/net-misc/memcached/files/memcached.service
new file mode 100644
index 000000000000..f51fd1f35730
--- /dev/null
+++ b/net-misc/memcached/files/memcached.service
@@ -0,0 +1,12 @@
+[Unit]
+After=network.target
+Description=High-performance, distributed memory object caching system
+Documentation=man:memcached(1)
+Documentation=http://code.google.com/p/memcached/
+
+[Service]
+ExecStart=/usr/bin/memcached
+User=memcached
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/memcached/memcached-1.2.6-r1.ebuild b/net-misc/memcached/memcached-1.2.6-r1.ebuild
new file mode 100644
index 000000000000..7daad90c4075
--- /dev/null
+++ b/net-misc/memcached/memcached-1.2.6-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils user
+
+MY_PV="${PV/_rc/-rc}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="High-performance, distributed memory object caching system"
+HOMEPAGE="http://www.danga.com/memcached/"
+SRC_URI="http://www.danga.com/memcached/dist/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
+IUSE="nptl test"
+
+RDEPEND=">=dev-libs/libevent-1.4
+ dev-lang/perl"
+DEPEND="${RDEPEND}
+ test? ( virtual/perl-Test-Harness >=dev-perl/Cache-Memcached-1.24 )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${PN}-1.2.2-fbsd.patch"
+}
+
+src_compile() {
+ econf $(use_enable nptl threads)
+ emake || die "emake failed."
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dobin scripts/memcached-tool
+
+ dodoc AUTHORS ChangeLog NEWS README TODO doc/{CONTRIBUTORS,*.txt}
+
+ newconfd "${FILESDIR}"/1.2.6/conf memcached
+ newinitd "${FILESDIR}"/1.2.6/init memcached
+}
+
+pkg_postinst() {
+ enewuser memcached -1 -1 /dev/null daemon
+
+ elog "With this version of Memcached Gentoo now supports multiple instances."
+ elog "To enable this you must create a symlink in /etc/init.d/ for each instance"
+ elog "to /etc/init.d/memcached and create the matching conf files in /etc/conf.d/"
+ elog "Please see Gentoo bug #122246 for more info"
+}
+
+src_test() {
+ emake -j1 test || die "Failed testing"
+}
diff --git a/net-misc/memcached/memcached-1.2.8-r1.ebuild b/net-misc/memcached/memcached-1.2.8-r1.ebuild
new file mode 100644
index 000000000000..5d0e6173b707
--- /dev/null
+++ b/net-misc/memcached/memcached-1.2.8-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils autotools user
+
+MY_PV="${PV/_rc/-rc}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="High-performance, distributed memory object caching system"
+HOMEPAGE="http://code.google.com/p/memcached/"
+SRC_URI="http://memcached.googlecode.com/files/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ppc64 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE="nptl test"
+
+RDEPEND=">=dev-libs/libevent-1.4
+ dev-lang/perl"
+DEPEND="${RDEPEND}
+ test? ( virtual/perl-Test-Harness >=dev-perl/Cache-Memcached-1.24 )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${PN}-1.2.2-fbsd.patch"
+ sed -i -e 's,-Werror,,g' configure.ac || die "sed failed"
+ eautoreconf
+}
+
+src_compile() {
+ econf $(use_enable nptl threads)
+ emake || die "emake failed."
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dobin scripts/memcached-tool
+
+ dodoc AUTHORS ChangeLog NEWS README TODO doc/{CONTRIBUTORS,*.txt}
+
+ newconfd "${FILESDIR}"/1.2.6/conf memcached
+ newinitd "${FILESDIR}"/1.2.6/init memcached
+}
+
+pkg_postinst() {
+ enewuser memcached -1 -1 /dev/null daemon
+
+ elog "With this version of Memcached Gentoo now supports multiple instances."
+ elog "To enable this you must create a symlink in /etc/init.d/ for each instance"
+ elog "to /etc/init.d/memcached and create the matching conf files in /etc/conf.d/"
+ elog "Please see Gentoo bug #122246 for more info"
+}
+
+src_test() {
+ emake -j1 test || die "Failed testing"
+}
diff --git a/net-misc/memcached/memcached-1.3.3-r5.ebuild b/net-misc/memcached/memcached-1.3.3-r5.ebuild
new file mode 100644
index 000000000000..fbe7fa147cd5
--- /dev/null
+++ b/net-misc/memcached/memcached-1.3.3-r5.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils autotools flag-o-matic user
+
+MY_PV="${PV/_rc/-rc}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="High-performance, distributed memory object caching system"
+HOMEPAGE="http://code.google.com/p/memcached/"
+SRC_URI="http://memcached.googlecode.com/files/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
+IUSE="test slabs-reassign"
+
+RDEPEND=">=dev-libs/libevent-1.4
+ dev-lang/perl"
+DEPEND="${RDEPEND}
+ test? ( virtual/perl-Test-Harness >=dev-perl/Cache-Memcached-1.24 )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${PN}-1.2.2-fbsd.patch"
+ epatch "${FILESDIR}/${PN}-1.3.3-gcc4-slab-fixup.patch"
+ sed -i -e 's,-Werror,,g' configure.ac || die "sed failed"
+ eautoreconf
+ use slabs-reassign && append-flags -DALLOW_SLABS_REASSIGN
+}
+
+src_compile() {
+ econf
+ emake || die "emake failed."
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dobin scripts/memcached-tool
+
+ dodoc AUTHORS ChangeLog NEWS README TODO doc/{CONTRIBUTORS,*.txt}
+
+ newconfd "${FILESDIR}"/1.3.3/conf memcached
+ newinitd "${FILESDIR}"/1.3.3/init memcached
+}
+
+pkg_postinst() {
+ enewuser memcached -1 -1 /dev/null daemon
+
+ elog "With this version of Memcached Gentoo now supports multiple instances."
+ elog "To enable this you should create a symlink in /etc/init.d/ for each instance"
+ elog "to /etc/init.d/memcached and create the matching conf files in /etc/conf.d/"
+ elog "Please see Gentoo bug #122246 for more info"
+}
+
+src_test() {
+ emake -j1 test || die "Failed testing"
+}
diff --git a/net-misc/memcached/memcached-1.4.17-r3.ebuild b/net-misc/memcached/memcached-1.4.17-r3.ebuild
new file mode 100644
index 000000000000..452d75d3e589
--- /dev/null
+++ b/net-misc/memcached/memcached-1.4.17-r3.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils flag-o-matic systemd user
+
+MY_PV="${PV/_rc/-rc}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="High-performance, distributed memory object caching system"
+HOMEPAGE="http://code.google.com/p/memcached/"
+SRC_URI="http://www.memcached.org/files/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="test slabs-reassign debug sasl" # hugetlbfs later
+
+RDEPEND=">=dev-libs/libevent-1.4
+ dev-lang/perl
+ sasl? ( dev-libs/cyrus-sasl )"
+DEPEND="${RDEPEND}
+ test? ( virtual/perl-Test-Harness >=dev-perl/Cache-Memcached-1.24 )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.2.2-fbsd.patch"
+ # Handled different upstream
+ #epatch "${FILESDIR}/${PN}-1.3.3-gcc4-slab-fixup.patch"
+ epatch "${FILESDIR}/${PN}-1.4.0-fix-as-needed-linking.patch"
+ epatch "${FILESDIR}/${PN}-1.4.4-as-needed.patch"
+ epatch "${FILESDIR}/${PN}-1.4.17-EWOULDBLOCK.patch"
+ sed -i -e 's,-Werror,,g' configure.ac || die
+ sed -i -e 's,AM_CONFIG_HEADER,AC_CONFIG_HEADERS,' configure.ac || die
+ eautoreconf
+ use slabs-reassign && append-flags -DALLOW_SLABS_REASSIGN
+}
+
+src_configure() {
+ econf \
+ --disable-docs \
+ $(use_enable sasl)
+ # The xml2rfc tool to build the additional docs requires TCL :-(
+ # `use_enable doc docs`
+}
+
+src_compile() {
+ # There is a heavy degree of per-object compile flags
+ # Users do NOT know better than upstream. Trying to compile the testapp and
+ # the -debug version with -DNDEBUG _WILL_ fail.
+ append-flags -UNDEBUG -pthread
+ emake testapp memcached-debug CFLAGS="${CFLAGS}"
+ filter-flags -UNDEBUG
+ emake
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dobin scripts/memcached-tool
+ use debug && dobin memcached-debug
+
+ dodoc AUTHORS ChangeLog NEWS README.md doc/{CONTRIBUTORS,*.txt}
+
+ newconfd "${FILESDIR}/memcached.confd" memcached
+ newinitd "${FILESDIR}/memcached.init" memcached
+ systemd_dounit "${FILESDIR}/memcached.service"
+}
+
+pkg_postinst() {
+ enewuser memcached -1 -1 /dev/null daemon
+
+ elog "With this version of Memcached Gentoo now supports multiple instances."
+ elog "To enable this you should create a symlink in /etc/init.d/ for each instance"
+ elog "to /etc/init.d/memcached and create the matching conf files in /etc/conf.d/"
+ elog "Please see Gentoo bug #122246 for more info"
+}
+
+src_test() {
+ emake -j1 test
+}
diff --git a/net-misc/memcached/memcached-1.4.17.ebuild b/net-misc/memcached/memcached-1.4.17.ebuild
new file mode 100644
index 000000000000..daf71672257e
--- /dev/null
+++ b/net-misc/memcached/memcached-1.4.17.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils autotools flag-o-matic user
+
+MY_PV="${PV/_rc/-rc}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="High-performance, distributed memory object caching system"
+HOMEPAGE="http://code.google.com/p/memcached/"
+SRC_URI="http://www.memcached.org/files/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="test slabs-reassign debug sasl" # hugetlbfs later
+
+RDEPEND=">=dev-libs/libevent-1.4
+ dev-lang/perl
+ sasl? ( dev-libs/cyrus-sasl )"
+DEPEND="${RDEPEND}
+ test? ( virtual/perl-Test-Harness >=dev-perl/Cache-Memcached-1.24 )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.2.2-fbsd.patch"
+ # Handled different upstream
+ #epatch "${FILESDIR}/${PN}-1.3.3-gcc4-slab-fixup.patch"
+ epatch "${FILESDIR}/${PN}-1.4.0-fix-as-needed-linking.patch"
+ epatch "${FILESDIR}/${PN}-1.4.4-as-needed.patch"
+ sed -i -e 's,-Werror,,g' configure.ac || die "sed failed"
+ eautoreconf
+ use slabs-reassign && append-flags -DALLOW_SLABS_REASSIGN
+}
+
+src_configure() {
+ econf \
+ --disable-docs \
+ $(use_enable sasl)
+ # The xml2rfc tool to build the additional docs requires TCL :-(
+ # `use_enable doc docs`
+}
+
+src_compile() {
+ # There is a heavy degree of per-object compile flags
+ # Users do NOT know better than upstream. Trying to compile the testapp and
+ # the -debug version with -DNDEBUG _WILL_ fail.
+ append-flags -UNDEBUG -pthread
+ emake testapp memcached-debug CFLAGS="${CFLAGS}"
+ filter-flags -UNDEBUG
+ emake
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dobin scripts/memcached-tool
+ use debug && dobin memcached-debug
+
+ dodoc AUTHORS ChangeLog NEWS README.md doc/{CONTRIBUTORS,*.txt}
+
+ newconfd "${FILESDIR}/memcached.confd" memcached
+ newinitd "${FILESDIR}/memcached.init" memcached
+}
+
+pkg_postinst() {
+ enewuser memcached -1 -1 /dev/null daemon
+
+ elog "With this version of Memcached Gentoo now supports multiple instances."
+ elog "To enable this you should create a symlink in /etc/init.d/ for each instance"
+ elog "to /etc/init.d/memcached and create the matching conf files in /etc/conf.d/"
+ elog "Please see Gentoo bug #122246 for more info"
+}
+
+src_test() {
+ emake -j1 test
+}
diff --git a/net-misc/memcached/memcached-1.4.24.ebuild b/net-misc/memcached/memcached-1.4.24.ebuild
new file mode 100644
index 000000000000..be9572ba8b0d
--- /dev/null
+++ b/net-misc/memcached/memcached-1.4.24.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils flag-o-matic systemd user
+
+MY_PV="${PV/_rc/-rc}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="High-performance, distributed memory object caching system"
+HOMEPAGE="http://code.google.com/p/memcached/"
+SRC_URI="http://www.memcached.org/files/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="test slabs-reassign debug sasl selinux" # hugetlbfs later
+
+RDEPEND=">=dev-libs/libevent-1.4
+ dev-lang/perl
+ sasl? ( dev-libs/cyrus-sasl )
+ selinux? ( sec-policy/selinux-memcached )"
+DEPEND="${RDEPEND}
+ test? ( virtual/perl-Test-Harness >=dev-perl/Cache-Memcached-1.24 )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.2.2-fbsd.patch"
+ # Handled different upstream
+ #epatch "${FILESDIR}/${PN}-1.3.3-gcc4-slab-fixup.patch"
+ epatch "${FILESDIR}/${PN}-1.4.0-fix-as-needed-linking.patch"
+ epatch "${FILESDIR}/${PN}-1.4.4-as-needed.patch"
+ epatch "${FILESDIR}/${PN}-1.4.17-EWOULDBLOCK.patch"
+ sed -i -e 's,-Werror,,g' configure.ac || die
+ sed -i -e 's,AM_CONFIG_HEADER,AC_CONFIG_HEADERS,' configure.ac || die
+ eautoreconf
+ use slabs-reassign && append-flags -DALLOW_SLABS_REASSIGN
+}
+
+src_configure() {
+ econf \
+ --disable-docs \
+ $(use_enable sasl)
+ # The xml2rfc tool to build the additional docs requires TCL :-(
+ # `use_enable doc docs`
+}
+
+src_compile() {
+ # There is a heavy degree of per-object compile flags
+ # Users do NOT know better than upstream. Trying to compile the testapp and
+ # the -debug version with -DNDEBUG _WILL_ fail.
+ append-flags -UNDEBUG -pthread
+ emake testapp memcached-debug CFLAGS="${CFLAGS}"
+ filter-flags -UNDEBUG
+ emake
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dobin scripts/memcached-tool
+ use debug && dobin memcached-debug
+
+ dodoc AUTHORS ChangeLog NEWS README.md doc/{CONTRIBUTORS,*.txt}
+
+ newconfd "${FILESDIR}/memcached.confd" memcached
+ newinitd "${FILESDIR}/memcached.init2" memcached
+ systemd_dounit "${FILESDIR}/memcached.service"
+}
+
+pkg_postinst() {
+ enewuser memcached -1 -1 /dev/null daemon
+
+ elog "With this version of Memcached Gentoo now supports multiple instances."
+ elog "To enable this you should create a symlink in /etc/init.d/ for each instance"
+ elog "to /etc/init.d/memcached and create the matching conf files in /etc/conf.d/"
+ elog "Please see Gentoo bug #122246 for more info"
+}
+
+src_test() {
+ emake -j1 test
+}
diff --git a/net-misc/memcached/metadata.xml b/net-misc/memcached/metadata.xml
new file mode 100644
index 000000000000..67d99f9fa5cf
--- /dev/null
+++ b/net-misc/memcached/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <email>prometheanfire@gentoo.org</email>
+ </maintainer>
+ <longdescription>High-performance, distributed memory object caching system, generic in nature,
+but intended for use in speeding up dynamic web applications by alleviating
+database load.
+Danga Interactive developed memcached to enhance the speed of LiveJournal.com, a
+site which was already doing 20 million+ dynamic page views per day for 1
+million users with a bunch of webservers and a bunch of database servers.
+memcached dropped the database load to almost nothing, yielding faster page load
+times for users, better resource utilization, and faster access to the databases
+on a memcache miss.</longdescription>
+ <use>
+ <flag name="slabs-reassign">Allow manual reassignment of memory slabs at the cost of slab optimizations.</flag>
+ </use>
+ <upstream>
+ <remote-id type="google-code">memcached</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/metadata.xml b/net-misc/metadata.xml
new file mode 100644
index 000000000000..0848d7ad90c9
--- /dev/null
+++ b/net-misc/metadata.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The net-misc category contains various miscellaneous networking tools
+ and utilities.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie net-misc enthält verschiedenste Programme und Werkzeuge
+ rund um Netzwerke.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría net-misc contiene varias herramientas y utilidades
+ relacionadas con las redes.
+ </longdescription>
+ <longdescription lang="ja">
+ net-miscカテゴリーには多種多様なネットワーキング・ツールと
+ ユーティリティが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De net-misc categorie bevat verschillende netwerkapplicaties.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm net-misc chứa các công cụ mạng khác nhau.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria net-misc contiene vari strumenti ed utilità per la gestione delle reti.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria net-misc contém várias ferramentas e utilitários
+ de rede.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria net-misc zawiera różne dodatkowe narzędzia i programy sieciowe.
+ </longdescription>
+</catmetadata>
+
diff --git a/net-misc/mico/Manifest b/net-misc/mico/Manifest
new file mode 100644
index 000000000000..77ce7c11525a
--- /dev/null
+++ b/net-misc/mico/Manifest
@@ -0,0 +1,3 @@
+DIST mico-2.3.13-gentoo-patches-0.3.tar.bz2 9547 SHA256 4d76e7e696ac4af60dc40ecc81d3a142cbec410c2e1b9155270a7865e71afca4 SHA512 1e22066313f3af495678094a5b83f502b080e645b7379bd6b860d71f69b7a02db19047d3f8433b04d3d1f0a2b41e56e480f217041381027638d2b84a373bef5d WHIRLPOOL fbfabcaafee1ca286697a3ae37c24f8451283683e1f1787f8df3c267b8e4b8da69c79817b82bec810852069e021f541db3f05f76feec6256243bb2ad70a41788
+DIST mico-2.3.13.tar.gz 3269814 SHA256 a355fd0205440f0c8793b68d105b179942d883babc6b1fe69113707b88fe1d69 SHA512 b4c09b5a41e480b8211529776b83e84669e1e91ccba7a0d2d940834f217bc7f3d9ef74101dadc43778c6813b733ccfdae2b00eab2f0993b58193bb9f270e3895 WHIRLPOOL e8f5b92502a012e4f316ae341a25a0c24def7718f7a85fed7e24de5298d593b1a2af2fcb21e89d857e6da65d6b0765108eb3f77e820874d98047127d07734389
+DIST mico-9999-gentoo-patches-20120924.tar.bz2 11693 SHA256 054fb0347c67bcbff41b2fd42204c389f9c5fbd4d07fd014f2c356a428f72d32 SHA512 5a1a775c67494776094d228a02ff5546256f11c255dcda18b6fe7c08ac87d6d969540559c2876de571c2b1bf5b1fefa03ba3e6b6749c0589c725153463dc886a WHIRLPOOL 686e7600abb0b5e3f1247b446dc0240e33679a2da821cc8741fc0b7c86f4d289c1c7603c0fcd5dc47f19b7639b8ed0e011b265516c0eb0195a04e9780dba338d
diff --git a/net-misc/mico/metadata.xml b/net-misc/mico/metadata.xml
new file mode 100644
index 000000000000..67ce74da039b
--- /dev/null
+++ b/net-misc/mico/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>haubi@gentoo.org</email>
+ <name>Michael Haubenwallner</name>
+ </maintainer>
+ <longdescription lang="en">
+ MICO is a mature, secure, robust, fully standards-compliant
+ implementation of the CORBA standard. It is available as GNU open source
+ software and is widely used for robust application integration. MICO is
+ renowned for its market-leading security features, its great
+ user-friendliness, and its full standard-compliance.
+ </longdescription>
+</pkgmetadata>
+
diff --git a/net-misc/mico/mico-2.3.13-r7.ebuild b/net-misc/mico/mico-2.3.13-r7.ebuild
new file mode 100644
index 000000000000..1afdc6bac4af
--- /dev/null
+++ b/net-misc/mico/mico-2.3.13-r7.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils flag-o-matic toolchain-funcs autotools
+
+DESCRIPTION="A freely available and fully compliant implementation of the CORBA standard"
+HOMEPAGE="http://www.mico.org/"
+SRC_URI="http://www.mico.org/${P}.tar.gz"
+
+PATCH_VER=0.3
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86 ~ppc-aix ~ia64-hpux ~amd64-linux ~x86-linux ~sparc-solaris ~x86-winnt"
+IUSE="gtk postgres qt4 ssl tcl threads X"
+RESTRICT="test" #298101
+
+[[ -z ${PATCH_VER} ]] || \
+ SRC_URI="${SRC_URI} http://dev.gentoo.org/~haubi/distfiles/${P}-gentoo-patches-${PATCH_VER}.tar.bz2"
+
+# doesn't compile:
+# bluetooth? ( net-wireless/bluez )
+
+RDEPEND="
+ gtk? ( x11-libs/gtk+:2 )
+ postgres? ( dev-db/postgresql )
+ qt4? ( dev-qt/qtgui:4[qt3support] )
+ ssl? ( dev-libs/openssl )
+ tcl? ( dev-lang/tcl:0 )
+ X? ( x11-libs/libXt )
+"
+DEPEND="${RDEPEND}
+ >=sys-devel/flex-2.5.2
+ >=sys-devel/bison-1.22
+"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ EPATCH_SUFFIX=patch epatch "${WORKDIR}"/patches
+
+ eautoreconf
+
+ # cannot use big TOC (AIX only), gdb doesn't like it.
+ # This assumes that the compiler (or -wrapper) uses
+ # gcc flag '-mminimal-toc' for compilation.
+ sed -i -e 's/,-bbigtoc//' "${S}"/configure
+
+ if use qt4; then
+ sed -i -e "s, -lqt\", $(pkg-config --libs Qt3Support)\"," configure ||
+ die "cannot update to use Qt3Support of qt4"
+ fi
+}
+
+src_configure() {
+ tc-export CC CXX
+
+ if use gtk; then
+ # need gtk-1 wrapper for gtk-2
+ export PATH="${WORKDIR}"/helpers:${PATH}
+ fi
+
+ # Don't know which version of JavaCUP would suffice, but there is no
+ # configure argument to disable checking for JavaCUP.
+ # So we override the configure check to not find 'javac'.
+ export ac_cv_path_JAVAC=no
+
+ # '--without-ssl' just does not add another search path - the only way
+ # to disable openssl utilization seems to override the configure check.
+ use ssl || export ac_cv_lib_ssl_open=no
+
+ # CFLAGS aren't used when checking for <qapplication.h>, but CPPFLAGS are.
+ use qt4 && append-cppflags $(pkg-config --cflags Qt3Support)
+
+ local myconf=
+ myconf() {
+ myconf="${myconf} $*"
+ }
+
+ myconf --disable-mini-stl
+ myconf $(use_enable threads)
+
+ # '--without-*' or '--with-*=no' does not disable some features,
+ # the value needs to be empty instead.
+ # This applies to: gtk, pgsql, qt, tcl, bluetooth.
+ myconf --with-gtk=$( use gtk && echo "${EPREFIX}"/usr)
+ myconf --with-pgsql=$(use postgres && echo "${EPREFIX}"/usr)
+ myconf --with-qt=$( use qt4 && echo "${EPREFIX}"/usr)
+ myconf --with-tcl=$( use tcl && echo "${EPREFIX}"/usr)
+ # bluetooth and wireless both don't compile cleanly
+ myconf --with-bluetooth=''
+ myconf --disable-wireless
+ # But --without-x works.
+ myconf $(use_with X x "${EPREFIX}"/usr)
+
+ # http://www.mico.org/pipermail/mico-devel/2009-April/010285.html
+ [[ ${CHOST} == *-hpux* ]] && append-cppflags -D_XOPEN_SOURCE_EXTENDED
+
+ if [[ ${CHOST} == *-winnt* ]]; then
+ # disabling static libs, since ar on interix takes nearly
+ # one hour per library, thanks to mico's monster objects.
+ use threads &&
+ ewarn "disabling USE='threads', does not work on ${CHOST}"
+ myconf --disable-threads --disable-static --enable-final
+ append-flags -D__STDC__
+ fi
+
+ econf ${myconf}
+}
+
+src_install() {
+ emake INSTDIR="${ED}"usr SHARED_INSTDIR="${ED}"usr install LDCONFIG=: || die "install failed"
+ if [[ $(get_libdir) != lib ]]; then #500744
+ mv "${ED}"usr/lib "${ED}"usr/$(get_libdir) || die
+ fi
+
+ dodir /usr/share || die
+ mv "${ED}"usr/man "${ED}"usr/share || die
+ dodir /usr/share/doc/${PF} || die
+ mv "${ED}"usr/doc "${ED}"usr/share/doc/${PF} || die
+
+ dodoc BUGS CHANGES* CONVERT FAQ README* ROADMAP TODO VERSION WTODO || die
+}
diff --git a/net-misc/mico/mico-9999.ebuild b/net-misc/mico/mico-9999.ebuild
new file mode 100644
index 000000000000..31e18f720a26
--- /dev/null
+++ b/net-misc/mico/mico-9999.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils flag-o-matic toolchain-funcs autotools
+
+if [[ ${PV} == 9999 ]]; then
+ EDARCS_REPOSITORY="http://mico.org/mico-darcs-repository"
+ inherit darcs
+fi
+
+PATCH_VER=20120924
+
+DESCRIPTION="A freely available and fully compliant implementation of the CORBA standard"
+HOMEPAGE="http://www.mico.org/"
+SRC_URI="http://www.mico.org/${P}.tar.gz"
+
+[[ ${PV} == 9999 ]] &&
+ SRC_URI=""
+
+[[ -n ${PATCH_VER} ]] &&
+ SRC_URI="${SRC_URI} http://dev.gentoo.org/~haubi/distfiles/${P}-gentoo-patches-${PATCH_VER}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="gtk postgres qt4 ssl tcl threads X"
+RESTRICT="test" #298101
+
+# doesn't compile:
+# bluetooth? ( net-wireless/bluez )
+
+RDEPEND="
+ gtk? ( x11-libs/gtk+:2 )
+ postgres? ( dev-db/postgresql )
+ qt4? ( dev-qt/qtgui:4[qt3support] )
+ ssl? ( dev-libs/openssl )
+ tcl? ( dev-lang/tcl:0 )
+ X? ( x11-libs/libXt )
+"
+DEPEND="${RDEPEND}
+ >=sys-devel/flex-2.5.2
+ >=sys-devel/bison-1.22
+"
+
+if [[ ${PV} == 9999 ]]; then
+ src_unpack() {
+ darcs_src_unpack
+ default
+ }
+fi
+
+src_prepare() {
+ EPATCH_SUFFIX=patch epatch "${WORKDIR}"/patches
+
+ eautoreconf
+
+ # cannot use big TOC (AIX only), gdb doesn't like it.
+ # This assumes that the compiler (or -wrapper) uses
+ # gcc flag '-mminimal-toc' for compilation.
+ sed -i -e 's/,-bbigtoc//' "${S}"/configure
+
+ if use qt4; then
+ sed -i -e "s, -lqt\", $(pkg-config --libs Qt3Support)\"," configure ||
+ die "cannot update to use Qt3Support of qt4"
+ fi
+}
+
+src_configure() {
+ tc-export CC CXX
+
+ # Don't know which version of JavaCUP would suffice, but there is no
+ # configure argument to disable checking for JavaCUP.
+ # So we override the configure check to not find 'javac'.
+ export ac_cv_path_JAVAC=no
+
+ # '--without-ssl' just does not add another search path - the only way
+ # to disable openssl utilization seems to override the configure check.
+ use ssl || export ac_cv_lib_ssl_open=no
+
+ # CFLAGS aren't used when checking for <qapplication.h>, but CPPFLAGS are.
+ use qt4 && append-cppflags $(pkg-config --cflags Qt3Support)
+
+ local myconf=
+ myconf() {
+ myconf="${myconf} $*"
+ }
+
+ myconf --disable-mini-stl
+ myconf $(use_enable threads)
+
+ # '--without-*' or '--with-*=no' does not disable some features,
+ # the value needs to be empty instead.
+ # This applies to: pgsql, qt, tcl, bluetooth.
+ myconf --with-pgsql=$(use postgres && echo "${EPREFIX}"/usr)
+ myconf --with-qt=$( use qt4 && echo "${EPREFIX}"/usr)
+ myconf --with-tcl=$( use tcl && echo "${EPREFIX}"/usr)
+ # bluetooth and wireless both don't compile cleanly
+ myconf --with-bluetooth=''
+ myconf --disable-wireless
+ # But --without-x works.
+ myconf $(use_with X x "${EPREFIX}"/usr)
+ # Same for gtk after patch 013, searches for gtk release.
+ myconf $(use_with gtk gtk 2)
+
+ # http://www.mico.org/pipermail/mico-devel/2009-April/010285.html
+ [[ ${CHOST} == *-hpux* ]] && append-cppflags -D_XOPEN_SOURCE_EXTENDED
+
+ if [[ ${CHOST} == *-winnt* ]]; then
+ # disabling static libs, since ar on interix takes nearly
+ # one hour per library, thanks to mico's monster objects.
+ use threads &&
+ ewarn "disabling USE='threads', does not work on ${CHOST}"
+ myconf --disable-threads --disable-static --enable-final
+ append-flags -D__STDC__
+ fi
+
+ econf ${myconf}
+}
+
+src_install() {
+ emake INSTDIR="${ED}"usr SHARED_INSTDIR="${ED}"usr install LDCONFIG=: || die "install failed"
+ if [[ $(get_libdir) != lib ]]; then #500744
+ mv "${ED}"usr/lib "${ED}"usr/$(get_libdir) || die
+ fi
+
+ dodir /usr/share || die
+ mv "${ED}"usr/man "${ED}"usr/share || die
+ dodir /usr/share/doc/${PF} || die
+ mv "${ED}"usr/doc "${ED}"usr/share/doc/${PF} || die
+
+ dodoc BUGS CHANGES* CONVERT README* ROADMAP TODO VERSION WTODO || die
+}
diff --git a/net-misc/midentd/Manifest b/net-misc/midentd/Manifest
new file mode 100644
index 000000000000..f1e9f8fac61a
--- /dev/null
+++ b/net-misc/midentd/Manifest
@@ -0,0 +1 @@
+DIST midentd-2.3.1.tar.gz 14298 SHA256 ad720d07e59203370e05611e3007a6295eddbf6131c974a21574415bc89309d4 SHA512 e5bed5c8850317fc6fc30b96b62b91fd8c53965a00c317d33bc8df0f3b06043d65793d8bd7cb1413f52465227c54dd430a2f945627d99c630866d2b025d9a3ab WHIRLPOOL 69e3ac6ea6b6ff73dce7d467e2ce35e0cd3bbd823093bcc544ec3e5e8bcdba27e252959e5bc3cbc05e4110246d86274c4f0f09e65c99429f24d4a8c7b8057b9a
diff --git a/net-misc/midentd/files/2.3.1-pidfile.patch b/net-misc/midentd/files/2.3.1-pidfile.patch
new file mode 100644
index 000000000000..248fcc08f203
--- /dev/null
+++ b/net-misc/midentd/files/2.3.1-pidfile.patch
@@ -0,0 +1,19 @@
+--- midentd.orig 2004-05-13 21:57:43.642441512 -0400
++++ midentd 2004-05-13 22:01:10.165045304 -0400
+@@ -74,6 +75,7 @@
+ close STDIN; open STDIN, "/dev/null";
+ close STDOUT; open STDOUT, ">/dev/null";
+ close STDERR; open STDERR, ">/dev/null";
++ open PIDFILE, ">/var/run/midentd.pid";
+ umask 0466;
+ &logger ("Daemon started, listening.");
+ # FIXME, maximum number of connections should be limited
+@@ -87,6 +89,8 @@
+ if ($< != $uid || $> != $uid) {
+ die "Can't change UID\n";
+ }
++ print PIDFILE $$;
++ close PIDFILE;
+ while (accept (SOCKET, SERVER)) {
+ $in = *SOCKET;
+ $out = *SOCKET;
diff --git a/net-misc/midentd/files/midentd.conf.d b/net-misc/midentd/files/midentd.conf.d
new file mode 100644
index 000000000000..3edc5bdc7654
--- /dev/null
+++ b/net-misc/midentd/files/midentd.conf.d
@@ -0,0 +1,6 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Options to pass to midentd
+MIDENTD_OPTS="-u nobody"
diff --git a/net-misc/midentd/files/midentd.rc b/net-misc/midentd/files/midentd.rc
new file mode 100644
index 000000000000..ed89ba4d0fa0
--- /dev/null
+++ b/net-misc/midentd/files/midentd.rc
@@ -0,0 +1,18 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+start() {
+ ebegin "Starting midentd"
+ /usr/sbin/midentd ${MIDENTD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping midentd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/midentd.pid
+ local ret=$?
+ rm -f /var/run/midentd.pid
+ eend ${ret}
+}
diff --git a/net-misc/midentd/metadata.xml b/net-misc/midentd/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/net-misc/midentd/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/midentd/midentd-2.3.1-r1.ebuild b/net-misc/midentd/midentd-2.3.1-r1.ebuild
new file mode 100644
index 000000000000..16c0c10cebfb
--- /dev/null
+++ b/net-misc/midentd/midentd-2.3.1-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="ident daemon with masquerading and fake replies support"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="dev-lang/perl"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-pidfile.patch
+ sed -i \
+ -e 's:/usr/local:/usr:' \
+ -e 's:service ident:service auth:' \
+ -e 's:disable = no:disable = yes:' \
+ midentd.xinetd || die
+}
+
+src_install() {
+ dosbin midentd midentd.logcycle
+
+ insinto /etc/xinetd.d
+ newins midentd.xinetd midentd
+ newinitd "${FILESDIR}"/midentd.rc midentd
+ newconfd "${FILESDIR}"/midentd.conf.d midentd
+
+ dodoc CHANGELOG README
+
+ dodir /var/log
+ touch "${D}"/var/log/midentd.log
+ fowners nobody:nobody /var/log/midentd.log
+}
diff --git a/net-misc/mikutter/Manifest b/net-misc/mikutter/Manifest
new file mode 100644
index 000000000000..69738071fc98
--- /dev/null
+++ b/net-misc/mikutter/Manifest
@@ -0,0 +1 @@
+DIST mikutter.3.1.1.tar.gz 2556358 SHA256 b7c45048e4594542d78bb9cabe1911a69326f1311fc581fc346821c07c11b30d SHA512 fb0bf39444a06c58850990687a4b76f8bfb0cb91bb6501ac60565f06bb40431acf054a1a08a8a2fc29b1a0d852fb3444c478676f126ab20ae7db8d60f0870dca WHIRLPOOL ddceeb8e764b848543f00450f07a46140f8fa6908e3cf7e3fd420a2ea084f13e2e59965cbaed407195e475ebf1dced7ce099813e0efa6b858925e6728d128156
diff --git a/net-misc/mikutter/files/mikutter b/net-misc/mikutter/files/mikutter
new file mode 100644
index 000000000000..129b8cd6f106
--- /dev/null
+++ b/net-misc/mikutter/files/mikutter
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+EPREFIX=${0%/usr/bin/mikutter}
+
+DISABLE_BUNDLER_SETUP= $EPREFIX/usr/bin/ruby19 $EPREFIX/usr/share/mikutter/mikutter.rb $*
+
diff --git a/net-misc/mikutter/files/mikutter-0.2.2.1537-disable-bundler.patch b/net-misc/mikutter/files/mikutter-0.2.2.1537-disable-bundler.patch
new file mode 100644
index 000000000000..582787dab704
--- /dev/null
+++ b/net-misc/mikutter/files/mikutter-0.2.2.1537-disable-bundler.patch
@@ -0,0 +1,31 @@
+commit d2d55a4c463c43de4577b479b7717f7648005e5c
+Author: Toshiaki Asai <toshi.alternative@gmail.com>
+Date: Sat Mar 15 23:31:59 2014 +0900
+
+ 環境変数 DISABLE_BUNDLER_SETUP を空にセットすることで、bundlerを読みに行く挙動を抑制できるようにした refs #645
+
+diff --git a/mikutter.rb b/mikutter.rb
+index 3adcb90..695e2f5 100755
+--- a/mikutter.rb
++++ b/mikutter.rb
+@@ -13,12 +13,14 @@ You should have received a copy of the GNU General Public License along with thi
+ =end
+ mikutter_directory = File.expand_path(File.dirname(__FILE__))
+
+-begin
+- ENV['BUNDLE_GEMFILE'] = File.expand_path(File.join(File.dirname($0), "Gemfile"))
+- require 'bundler/setup'
+-rescue LoadError, SystemExit
+- # bundlerがないか、依存関係の解決に失敗した場合
+- # System の gem を使ってみる
++unless ENV['DISABLE_BUNDLER_SETUP']
++ begin
++ ENV['BUNDLE_GEMFILE'] = File.expand_path(File.join(File.dirname($0), "Gemfile"))
++ require 'bundler/setup'
++ rescue LoadError, SystemExit
++ # bundlerがないか、依存関係の解決に失敗した場合
++ # System の gem を使ってみる
++ end
+ end
+
+ Thread.abort_on_exception = true
diff --git a/net-misc/mikutter/metadata.xml b/net-misc/mikutter/metadata.xml
new file mode 100644
index 000000000000..ac07e856ce8a
--- /dev/null
+++ b/net-misc/mikutter/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/mikutter/mikutter-3.1.1.ebuild b/net-misc/mikutter/mikutter-3.1.1.ebuild
new file mode 100644
index 000000000000..5e49f50f5de6
--- /dev/null
+++ b/net-misc/mikutter/mikutter-3.1.1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+USE_RUBY="ruby20"
+
+inherit eutils ruby-ng
+
+if [ "${PV}" = "9999" ]; then
+ EGIT_REPO_URI="git://toshia.dip.jp/mikutter.git"
+ inherit git-2
+ KEYWORDS=""
+ EGIT_SOURCEDIR="${WORKDIR}/all"
+else
+ MY_P="${PN}.${PV}"
+ SRC_URI="http://mikutter.hachune.net/bin/${MY_P}.tar.gz"
+ KEYWORDS="~amd64"
+ RUBY_S="${PN}"
+fi
+
+DESCRIPTION="Simple, powerful and moeful twitter client"
+HOMEPAGE="http://mikutter.hachune.net/"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="+libnotify sound"
+
+DEPEND=""
+RDEPEND="
+ libnotify? ( x11-libs/libnotify )
+ sound? ( media-sound/alsa-utils )"
+
+ruby_add_rdepend "dev-ruby/addressable
+ dev-ruby/bsearch
+ dev-ruby/delayer
+ dev-ruby/json
+ dev-ruby/memoize
+ >=dev-ruby/moneta-0.7
+ >=dev-ruby/oauth-0.4.7
+ dev-ruby/rcairo
+ >=dev-ruby/ruby-gettext-3.0.1
+ >=dev-ruby/ruby-gtk2-2.2.0
+ dev-ruby/ruby-hmac
+ dev-ruby/typed-array
+ virtual/ruby-ssl"
+
+all_ruby_unpack() {
+ if [ "${PV}" = "9999" ];then
+ git-2_src_unpack
+ else
+ default
+ fi
+}
+
+each_ruby_install() {
+ exeinto /usr/share/mikutter
+ doexe mikutter.rb
+ insinto /usr/share/mikutter
+ doins -r core plugin
+ #if use ruby_targets_ruby21; then
+ # sed -e 's/ruby19/ruby21/' "${FILESDIR}"/mikutter
+ if use ruby_targets_ruby20; then
+ sed -e 's/ruby19/ruby20/' "${FILESDIR}"/mikutter
+ else
+ die
+ fi | newbin - mikutter
+ dodoc README
+ make_desktop_entry mikutter Mikutter \
+ /usr/share/mikutter/core/skin/data/icon.png
+}
diff --git a/net-misc/mikutter/mikutter-9999.ebuild b/net-misc/mikutter/mikutter-9999.ebuild
new file mode 100644
index 000000000000..5e49f50f5de6
--- /dev/null
+++ b/net-misc/mikutter/mikutter-9999.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+USE_RUBY="ruby20"
+
+inherit eutils ruby-ng
+
+if [ "${PV}" = "9999" ]; then
+ EGIT_REPO_URI="git://toshia.dip.jp/mikutter.git"
+ inherit git-2
+ KEYWORDS=""
+ EGIT_SOURCEDIR="${WORKDIR}/all"
+else
+ MY_P="${PN}.${PV}"
+ SRC_URI="http://mikutter.hachune.net/bin/${MY_P}.tar.gz"
+ KEYWORDS="~amd64"
+ RUBY_S="${PN}"
+fi
+
+DESCRIPTION="Simple, powerful and moeful twitter client"
+HOMEPAGE="http://mikutter.hachune.net/"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="+libnotify sound"
+
+DEPEND=""
+RDEPEND="
+ libnotify? ( x11-libs/libnotify )
+ sound? ( media-sound/alsa-utils )"
+
+ruby_add_rdepend "dev-ruby/addressable
+ dev-ruby/bsearch
+ dev-ruby/delayer
+ dev-ruby/json
+ dev-ruby/memoize
+ >=dev-ruby/moneta-0.7
+ >=dev-ruby/oauth-0.4.7
+ dev-ruby/rcairo
+ >=dev-ruby/ruby-gettext-3.0.1
+ >=dev-ruby/ruby-gtk2-2.2.0
+ dev-ruby/ruby-hmac
+ dev-ruby/typed-array
+ virtual/ruby-ssl"
+
+all_ruby_unpack() {
+ if [ "${PV}" = "9999" ];then
+ git-2_src_unpack
+ else
+ default
+ fi
+}
+
+each_ruby_install() {
+ exeinto /usr/share/mikutter
+ doexe mikutter.rb
+ insinto /usr/share/mikutter
+ doins -r core plugin
+ #if use ruby_targets_ruby21; then
+ # sed -e 's/ruby19/ruby21/' "${FILESDIR}"/mikutter
+ if use ruby_targets_ruby20; then
+ sed -e 's/ruby19/ruby20/' "${FILESDIR}"/mikutter
+ else
+ die
+ fi | newbin - mikutter
+ dodoc README
+ make_desktop_entry mikutter Mikutter \
+ /usr/share/mikutter/core/skin/data/icon.png
+}
diff --git a/net-misc/mindterm/Manifest b/net-misc/mindterm/Manifest
new file mode 100644
index 000000000000..e3b3a603acac
--- /dev/null
+++ b/net-misc/mindterm/Manifest
@@ -0,0 +1 @@
+DIST mindterm_3.4-src.zip 1224973 SHA256 46d19b5037db3aa687f33bcda36590385b555a3abae98deb32be0ffd2ec70183
diff --git a/net-misc/mindterm/files/mindterm-3.2-missingclasses.patch b/net-misc/mindterm/files/mindterm-3.2-missingclasses.patch
new file mode 100644
index 000000000000..b231d64ad9fa
--- /dev/null
+++ b/net-misc/mindterm/files/mindterm-3.2-missingclasses.patch
@@ -0,0 +1,19 @@
+diff -Nur mindterm_3.2/filesets.xml mindterm_3.2_patched/filesets.xml
+--- mindterm_3.2/filesets.xml 2007-10-02 16:09:12.000000000 +0300
++++ mindterm_3.2_patched/filesets.xml 2009-02-01 10:56:02.000000000 +0200
+@@ -145,6 +145,7 @@
+ com/mindbright/security/publickey/DSAPrivateKey.class
+ com/mindbright/security/publickey/DSAPublicKey.class
+ com/mindbright/security/publickey/DSAWithSHA1.class
++ com/mindbright/security/publickey/DSAWithSHA1$DSASIG.class
+ com/mindbright/security/publickey/DiffieHellman.class
+ com/mindbright/security/publickey/ModPGroups.class
+ com/mindbright/security/publickey/RawDSAWithSHA1.class
+@@ -565,6 +566,7 @@
+ com/mindbright/terminal/tandem6530/ProtectBlockMode.class
+ com/mindbright/terminal/tandem6530/ActionHandler.class
+ com/mindbright/terminal/tandem6530/Parser.class
++ com/mindbright/terminal/tandem6530/Parser*.class
+ com/mindbright/terminal/tandem6530/Parser$Collector.class
+ com/mindbright/terminal/tandem6530/ParseException.class
+ com/mindbright/terminal/tandem6530/BadColorException.class
diff --git a/net-misc/mindterm/metadata.xml b/net-misc/mindterm/metadata.xml
new file mode 100644
index 000000000000..838c00a4a448
--- /dev/null
+++ b/net-misc/mindterm/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>java</herd>
+</pkgmetadata>
diff --git a/net-misc/mindterm/mindterm-3.4.ebuild b/net-misc/mindterm/mindterm-3.4.ebuild
new file mode 100644
index 000000000000..f6526a6f376e
--- /dev/null
+++ b/net-misc/mindterm/mindterm-3.4.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+WANT_ANT_TASKS="ant-nodeps"
+JAVA_PKG_IUSE="doc test examples"
+inherit eutils java-pkg-2 java-ant-2
+
+MY_P=${P/-/_}
+
+DESCRIPTION="A Java SSH Client"
+HOMEPAGE="http://www.appgate.com/products/80_MindTerm/"
+SRC_URI="http://www.appgate.com/downloads/MindTerm-${PV}/${MY_P}-src.zip"
+
+LICENSE="mindterm"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+COMMON_DEP="dev-java/jzlib:0"
+RDEPEND=">=virtual/jre-1.4
+ ${COMMON_DEP}"
+DEPEND=">=virtual/jdk-1.4
+ app-arch/unzip
+ ${COMMON_DEP}"
+
+S=${WORKDIR}/${MY_P}
+
+JAVA_PKG_FILTER_COMPILER="jikes"
+EANT_BUILD_TARGET="mindterm.jar lite"
+EANT_DOC_TARGET="doc"
+EANT_GENTOO_CLASSPATH="jzlib"
+JAVA_ANT_CLASSPATH_TAGS+=" javadoc"
+
+src_prepare() {
+ java-pkg-2_src_prepare
+ java-ant_rewrite-classpath
+ rm -vr com/jcraft || die "Failed to remove bundled jcraft"
+}
+
+# Don't even compile
+RESTRICT="test"
+src_test() {
+ ANT_TASKS="ant-junit ant-nodeps" eant test \
+ -Dgentoo.classpath="$(java-pkg_getjars jzlib,junit):mindterm.jar"
+}
+
+src_install() {
+ java-pkg_dojar *.jar
+
+ java-pkg_dolauncher ${PN} --main com.mindbright.application.MindTerm
+
+ dodoc README.txt RELEASE_NOTES.txt CHANGES || die
+ use doc && java-pkg_dojavadoc javadoc
+ use examples && java-pkg_doexamples "${S}/examples/"
+}
diff --git a/net-misc/minidlna/Manifest b/net-misc/minidlna/Manifest
new file mode 100644
index 000000000000..dfe3eaabd9ba
--- /dev/null
+++ b/net-misc/minidlna/Manifest
@@ -0,0 +1,3 @@
+DIST minidlna-1.1.3.tar.gz 481789 SHA256 ed42d5cadf9488a95a0107341918879ef8ce4c650e19337688c46cdcd484bc4e SHA512 3b3c28ed17325a1d2c461c51c7958fcc7fd02b71332a952e06f0ad8bca04f8ff58a74bb3d221ad432282c7289953bd31c213c2703008fb36037c39a743001aa9 WHIRLPOOL 4ac0a4344feb026d483562d5711f3f3ce4f70d68d9b043ec54e7d3667c7b38e2d1b7df2cbb2a5c9d05d4afc29182fe65c95389530b187000e496902734bb498e
+DIST minidlna-1.1.4.tar.gz 494478 SHA256 9814c04a2c506a0dd942c4218d30c07dedf90dabffbdef2d308a3f9f23545314 SHA512 24c2d82222798278d60faa46c6d7b19e44a91868da869f7d2aa2bf3c68e343a6c2a323f67223ea69242919047b08f059ed9c7a49b0b516384244acd98b51db4e WHIRLPOOL 5f82dd2130086e90784b05d67037e9c40e20b539ddc1bfb3733910beee44578027d9c245aa1f6117ba05b3c039a2b32125ea561f71c63cf0e422664e7067007f
+DIST minidlna-gentoo-artwork.patch.xz 49372 SHA256 37ae7228b07b7c81c8962c5dc88a41ed1691bdf1b019b654a9fc93ac1da0c7ce SHA512 3bdaadc2a2331e9ebf37ed80d1de7cebd6307ab068dc9cf067159b2c0754a765b2076c07e988602af4dd2d6c49c819da8a1f668258950e15592027b353f22b5e WHIRLPOOL e243b9b6a002af5e3ee1bb196239790ff86724624ebccb34c84ac072426341db6b5f44e455d13657d5284220fe2688ddf3a2ec0212a7b86525eb02a6c080af80
diff --git a/net-misc/minidlna/files/minidlna-1.0.18-Makefile.patch b/net-misc/minidlna/files/minidlna-1.0.18-Makefile.patch
new file mode 100644
index 000000000000..2ce5e64cd422
--- /dev/null
+++ b/net-misc/minidlna/files/minidlna-1.0.18-Makefile.patch
@@ -0,0 +1,11 @@
+--- Makefile
++++ Makefile
+@@ -12,7 +12,7 @@
+ #
+ #CFLAGS = -Wall -O -D_GNU_SOURCE -g -DDEBUG
+ #CFLAGS = -Wall -g -Os -D_GNU_SOURCE
+-CFLAGS = -Wall -g -O3 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
++CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
+ -I/usr/include/ffmpeg \
+ -I/usr/include/libavutil -I/usr/include/libavcodec -I/usr/include/libavformat \
+ -I/usr/include/ffmpeg/libavutil -I/usr/include/ffmpeg/libavcodec -I/usr/include/ffmpeg/libavformat
diff --git a/net-misc/minidlna/files/minidlna-1.0.23-r1.initd b/net-misc/minidlna/files/minidlna-1.0.23-r1.initd
new file mode 100644
index 000000000000..1ba3e1b4a764
--- /dev/null
+++ b/net-misc/minidlna/files/minidlna-1.0.23-r1.initd
@@ -0,0 +1,53 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting MiniDLNA"
+ local params=""
+ local stop=0
+
+ checkpath -q -d -m 0755 -o ${M_USER:-nobody}:${M_GROUP:-nogroup} /var/run/minidlna
+
+ params="$params -P /var/run/minidlna/minidlna.pid"
+
+ if [[ "${RESCAN}" = "true" || "{$RESCAN}" = yes ]]; then
+ params="$params -R"
+ fi
+
+ #set the config file and check if it exists
+ if [ -z "${CONFIG}" ]; then
+ if [ ! -f "/etc/minidlna.conf" ]; then
+ ewarn "You did not set the config file correctly"
+ stop=1
+ fi
+ params="$params -f /etc/minidlna.conf"
+ else
+ if [ ! -f "${CONFIG}" ]; then
+ ewarn "The specified config file does not exist"
+ stop=1
+ fi
+ params="$params -f ${CONFIG}"
+ fi
+
+
+ if [ $stop -eq 1 ]; then
+ eend 1
+ else
+ start-stop-daemon --start \
+ --user ${M_USER:-nobody} --group ${M_GROUP:-nogroup} \
+ --exec /usr/sbin/minidlna -- ${params}
+ eend $?
+ fi
+}
+
+stop() {
+ ebegin "Stopping MiniDLNA"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/minidlna
+ eend $?
+}
diff --git a/net-misc/minidlna/files/minidlna-1.0.23.confd b/net-misc/minidlna/files/minidlna-1.0.23.confd
new file mode 100644
index 000000000000..c98c7ab02e43
--- /dev/null
+++ b/net-misc/minidlna/files/minidlna-1.0.23.confd
@@ -0,0 +1,14 @@
+# /etc/conf.d/minidlna
+
+# Should minidlna rescan the entire collection on startup?
+# Warning: This may take a long time!
+RESCAN="false"
+
+# The location of the config file
+#CONFIG="/etc/minidlna.conf"
+
+# Specify the user/group minidlna should run as
+#M_USER="nobody"
+#M_GROUP="nogroup"
+
+# vim: ft=gentoo-conf-d
diff --git a/net-misc/minidlna/files/minidlna-1.0.25.confd b/net-misc/minidlna/files/minidlna-1.0.25.confd
new file mode 100644
index 000000000000..97d15b00c391
--- /dev/null
+++ b/net-misc/minidlna/files/minidlna-1.0.25.confd
@@ -0,0 +1,14 @@
+# /etc/conf.d/minidlna
+
+# Should minidlna rescan the entire collection on startup?
+# Warning: This may take a long time!
+RESCAN="false"
+
+# The location of the config file
+#CONFIG="/etc/minidlna.conf"
+
+# Specify the user/group minidlna should run as
+#M_USER="minidlna"
+#M_GROUP="minidlna"
+
+# vim: ft=gentoo-conf-d
diff --git a/net-misc/minidlna/files/minidlna-1.1.0.initd b/net-misc/minidlna/files/minidlna-1.1.0.initd
new file mode 100644
index 000000000000..9ccffe73265a
--- /dev/null
+++ b/net-misc/minidlna/files/minidlna-1.1.0.initd
@@ -0,0 +1,53 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting MiniDLNA"
+ local params=""
+ local stop=0
+
+ checkpath -q -d -m 0755 -o ${M_USER:-minidlna}:${M_GROUP:-minidlna} /var/run/minidlna
+
+ params="$params -P /var/run/minidlna/minidlna.pid"
+
+ if [[ "${RESCAN}" = "true" || "{$RESCAN}" = yes ]]; then
+ params="$params -R"
+ fi
+
+ #set the config file and check if it exists
+ if [ -z "${CONFIG}" ]; then
+ if [ ! -f "/etc/minidlna.conf" ]; then
+ ewarn "You did not set the config file correctly"
+ stop=1
+ fi
+ params="$params -f /etc/minidlna.conf"
+ else
+ if [ ! -f "${CONFIG}" ]; then
+ ewarn "The specified config file does not exist"
+ stop=1
+ fi
+ params="$params -f ${CONFIG}"
+ fi
+
+
+ if [ $stop -eq 1 ]; then
+ eend 1
+ else
+ start-stop-daemon --start \
+ --user ${M_USER:-minidlna} --group ${M_GROUP:-minidlna} \
+ --exec /usr/sbin/minidlnad -- ${params}
+ eend $?
+ fi
+}
+
+stop() {
+ ebegin "Stopping MiniDLNA"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/minidlnad
+ eend $?
+}
diff --git a/net-misc/minidlna/files/minidlna-1.1.0.service b/net-misc/minidlna/files/minidlna-1.1.0.service
new file mode 100644
index 000000000000..908b1d59f45d
--- /dev/null
+++ b/net-misc/minidlna/files/minidlna-1.1.0.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=MiniDLNA is a DLNA/UPnP-AV server software
+After=syslog.target local-fs.target network.target
+
+[Service]
+User=minidlna
+Group=minidlna
+Type=forking
+PIDFile=/var/run/minidlna/minidlna.pid
+ExecStart=/usr/sbin/minidlnad -f /etc/minidlna.conf -P /var/run/minidlna/minidlna.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/minidlna/files/minidlna-1.1.2.initd b/net-misc/minidlna/files/minidlna-1.1.2.initd
new file mode 100644
index 000000000000..c7f30260ff8c
--- /dev/null
+++ b/net-misc/minidlna/files/minidlna-1.1.2.initd
@@ -0,0 +1,53 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting MiniDLNA"
+ local params=""
+ local stop=0
+
+ checkpath -q -d -m 0755 -o ${M_USER:-minidlna}:${M_GROUP:-minidlna} /run/minidlna
+
+ params="$params -P /run/minidlna/minidlna.pid"
+
+ if [[ "${RESCAN}" = "true" || "{$RESCAN}" = yes ]]; then
+ params="$params -R"
+ fi
+
+ #set the config file and check if it exists
+ if [ -z "${CONFIG}" ]; then
+ if [ ! -f "/etc/minidlna.conf" ]; then
+ ewarn "You did not set the config file correctly"
+ stop=1
+ fi
+ params="$params -f /etc/minidlna.conf"
+ else
+ if [ ! -f "${CONFIG}" ]; then
+ ewarn "The specified config file does not exist"
+ stop=1
+ fi
+ params="$params -f ${CONFIG}"
+ fi
+
+
+ if [ $stop -eq 1 ]; then
+ eend 1
+ else
+ start-stop-daemon --start \
+ --user ${M_USER:-minidlna} --group ${M_GROUP:-minidlna} \
+ --exec /usr/sbin/minidlnad -- ${params}
+ eend $?
+ fi
+}
+
+stop() {
+ ebegin "Stopping MiniDLNA"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/minidlnad
+ eend $?
+}
diff --git a/net-misc/minidlna/files/minidlna-1.1.2.service b/net-misc/minidlna/files/minidlna-1.1.2.service
new file mode 100644
index 000000000000..0d9571787d95
--- /dev/null
+++ b/net-misc/minidlna/files/minidlna-1.1.2.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=MiniDLNA server
+After=network.target
+
+[Service]
+User=minidlna
+Group=minidlna
+ExecStart=/usr/sbin/minidlnad -f /etc/minidlna.conf -P /run/minidlna/minidlna.pid -S
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/minidlna/metadata.xml b/net-misc/minidlna/metadata.xml
new file mode 100644
index 000000000000..9f19b86fa285
--- /dev/null
+++ b/net-misc/minidlna/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+</maintainer>
+<upstream>
+ <bugs-to>http://sourceforge.net/tracker/?group_id=243163</bugs-to>
+ <remote-id type="sourceforge">minidlna</remote-id>
+</upstream>
+<use>
+ <flag name="netgear">Enable netgear branding</flag>
+ <flag name="readynas">Enable readynas branding</flag>
+</use>
+</pkgmetadata>
+
diff --git a/net-misc/minidlna/minidlna-1.1.3.ebuild b/net-misc/minidlna/minidlna-1.1.3.ebuild
new file mode 100644
index 000000000000..833a66685db8
--- /dev/null
+++ b/net-misc/minidlna/minidlna-1.1.3.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils systemd toolchain-funcs user
+
+DESCRIPTION="DLNA/UPnP-AV compliant media server"
+HOMEPAGE="http://minidlna.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="netgear readynas"
+
+RDEPEND="dev-db/sqlite
+ media-libs/flac
+ media-libs/libexif
+ media-libs/libid3tag
+ media-libs/libogg
+ media-libs/libvorbis
+ virtual/ffmpeg
+ virtual/jpeg"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+pkg_setup() {
+ local my_is_new="yes"
+ [ -d "${EPREFIX}"/var/lib/${PN} ] && my_is_new="no"
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
+ if [ -d "${EPREFIX}"/var/lib/${PN} ] && [ "${my_is_new}" == "yes" ] ; then
+ # created by above enewuser command w/ wrong group and permissions
+ chown ${PN}:${PN} "${EPREFIX}"/var/lib/${PN} || die
+ chmod 0750 "${EPREFIX}"/var/lib/${PN} || die
+ # if user already exists, but /var/lib/minidlna is missing
+ # rely on ${D}/var/lib/minidlna created in src_install
+ fi
+}
+
+src_prepare() {
+ sed -e "/log_dir/s:/var/log:/var/log/${PN}:" \
+ -e "/db_dir/s:/var/cache/:/var/lib/:" \
+ -i ${PN}.conf || die
+
+ epatch_user
+}
+
+src_configure() {
+ econf \
+ --disable-silent-rules \
+ --with-db-path=/var/lib/${PN} \
+ --with-log-path=/var/log/${PN} \
+ --enable-tivo \
+ $(use_enable netgear) \
+ $(use_enable readynas)
+}
+
+src_install() {
+ default
+
+ insinto /etc
+ doins ${PN}.conf
+
+ newconfd "${FILESDIR}"/${PN}-1.0.25.confd ${PN}
+ newinitd "${FILESDIR}"/${PN}-1.1.2.initd ${PN}
+ systemd_newunit "${FILESDIR}"/${PN}-1.1.2.service ${PN}.service
+ echo "d /run/${PN} 0755 ${PN} ${PN} -" > "${T}"/${PN}.conf
+ systemd_dotmpfilesd "${T}"/${PN}.conf
+
+ dodir /var/{lib,log}/${PN}
+ fowners ${PN}:${PN} /var/{lib,log}/${PN}
+ fperms 0750 /var/{lib,log}/${PN}
+
+ dodoc AUTHORS NEWS README TODO
+ doman ${PN}d.8 ${PN}.conf.5
+}
+
+pkg_postinst() {
+ elog "minidlna now runs as minidlna:minidlna (bug 426726),"
+ elog "logfile is moved to /var/log/minidlna/minidlna.log,"
+ elog "cache is moved to /var/lib/minidlna."
+ elog "Please edit /etc/conf.d/${PN} and file ownerships to suit your needs."
+}
diff --git a/net-misc/minidlna/minidlna-1.1.4.ebuild b/net-misc/minidlna/minidlna-1.1.4.ebuild
new file mode 100644
index 000000000000..2af071524411
--- /dev/null
+++ b/net-misc/minidlna/minidlna-1.1.4.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils linux-info systemd toolchain-funcs user
+
+DESCRIPTION="DLNA/UPnP-AV compliant media server"
+HOMEPAGE="http://minidlna.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.gz
+ http://dev.gentoo.org/~xmw/${PN}-gentoo-artwork.patch.xz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm x86"
+IUSE="netgear readynas"
+
+RDEPEND="dev-db/sqlite:3
+ media-libs/flac
+ media-libs/libexif
+ media-libs/libid3tag
+ media-libs/libogg
+ media-libs/libvorbis
+ virtual/ffmpeg
+ virtual/jpeg:0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+CONFIG_CHECK="~INOTIFY_USER"
+
+pkg_setup() {
+ local my_is_new="yes"
+ [ -d "${EPREFIX}"/var/lib/${PN} ] && my_is_new="no"
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
+ if [ -d "${EPREFIX}"/var/lib/${PN} ] && [ "${my_is_new}" == "yes" ] ; then
+ # created by above enewuser command w/ wrong group and permissions
+ chown ${PN}:${PN} "${EPREFIX}"/var/lib/${PN} || die
+ chmod 0750 "${EPREFIX}"/var/lib/${PN} || die
+ # if user already exists, but /var/lib/minidlna is missing
+ # rely on ${D}/var/lib/minidlna created in src_install
+ fi
+
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ sed -e "/log_dir/s:/var/log:/var/log/${PN}:" \
+ -e "/db_dir/s:/var/cache/:/var/lib/:" \
+ -i ${PN}.conf || die
+
+ epatch "${WORKDIR}"/${PN}-gentoo-artwork.patch
+
+ epatch_user
+}
+
+src_configure() {
+ econf \
+ --disable-silent-rules \
+ --with-db-path=/var/lib/${PN} \
+ --with-log-path=/var/log/${PN} \
+ --enable-tivo \
+ $(use_enable netgear) \
+ $(use_enable readynas)
+}
+
+src_install() {
+ default
+
+ insinto /etc
+ doins ${PN}.conf
+
+ newconfd "${FILESDIR}"/${PN}-1.0.25.confd ${PN}
+ newinitd "${FILESDIR}"/${PN}-1.1.2.initd ${PN}
+ systemd_newunit "${FILESDIR}"/${PN}-1.1.2.service ${PN}.service
+ echo "d /run/${PN} 0755 ${PN} ${PN} -" > "${T}"/${PN}.conf
+ systemd_dotmpfilesd "${T}"/${PN}.conf
+
+ dodir /var/{lib,log}/${PN}
+ fowners ${PN}:${PN} /var/{lib,log}/${PN}
+ fperms 0750 /var/{lib,log}/${PN}
+
+ dodoc AUTHORS NEWS README TODO
+ doman ${PN}d.8 ${PN}.conf.5
+}
+
+pkg_postinst() {
+ elog "minidlna now runs as minidlna:minidlna (bug 426726),"
+ elog "logfile is moved to /var/log/minidlna/minidlna.log,"
+ elog "cache is moved to /var/lib/minidlna."
+ elog "Please edit /etc/conf.d/${PN} and file ownerships to suit your needs."
+}
diff --git a/net-misc/minissdpd/Manifest b/net-misc/minissdpd/Manifest
new file mode 100644
index 000000000000..90f2b61deccc
--- /dev/null
+++ b/net-misc/minissdpd/Manifest
@@ -0,0 +1,3 @@
+DIST minissdpd-1.2.20141204.tar.gz 26978 SHA256 f35b14ef9b165bd6b5c44cebc3adbfad92e899d3424c54aea008c5541315abb7 SHA512 73089b616e12ae3ce391f0fa84a6fb09ed61011493d523bd212f02437f59fe8c028127f2839a6b791479d7b821a9ed6786be661ff4b3dc0064f1fbc9b1f9c299 WHIRLPOOL 026e9b10f49bb8a0441178e3b290a5669d982715e5828c73231bdff1366b5ea4d3b92f3e4b412a30b7e9627597b88cadc1b64ef38945bf690712fdabeea390db
+DIST minissdpd-1.3.20150527.tar.gz 31025 SHA256 18d966e01f94c481937d233f69b1a4c60e12e0d6e9e991086142b3f8c44de8bb SHA512 31c6b267ead8c1b3e12681de404de818d80e578151deb6515c5f4a0cf35dadd93de7058d51d371c4e0921549d9ee31d20acabd5baf78df3908262c2547a8e837 WHIRLPOOL b0e83276a92f2e9dc328be706d0a41c84605ba23a553aabc5498167a9122138f2097a6d36f08f75fcbf763d984a682c52479466d267ed889943e2c4d83476ad2
+DIST minissdpd-1.3.tar.gz 30326 SHA256 86476b581efa7640c7e9695dd7e43ccafa26c77e77fd0176d79bc5e8ad117196 SHA512 d05ceaf4151eef10cca8fc5685cff1778d7ef47da8e33ebe4c14977fce4ffb0cfbc6fe6e7f21e7e61c59fe876c722d41060154ec2118b4f24e15e167b46a65fa WHIRLPOOL ee91ec1ab1d16823e1f67dc63aa0ca6d8946b9e66a5003deee131b14a888095acfc345522f3c5e5aea01e0e76844f172703841e5ae65080e182dcacf483f0ad0
diff --git a/net-misc/minissdpd/files/minissdpd-1.2-remove-initd.patch b/net-misc/minissdpd/files/minissdpd-1.2-remove-initd.patch
new file mode 100644
index 000000000000..9a5f5966e90f
--- /dev/null
+++ b/net-misc/minissdpd/files/minissdpd-1.2-remove-initd.patch
@@ -0,0 +1,14 @@
+diff -Naur minissdpd-1.1.20120121.orig//Makefile minissdpd-1.1.20120121/Makefile
+--- minissdpd-1.1.20120121.orig//Makefile 2012-01-02 05:46:24.000000000 -0500
++++ minissdpd-1.1.20120121/Makefile 2012-01-22 07:01:54.000000000 -0500
+@@ -42,10 +42,6 @@
+ $(INSTALL) minissdpd $(SBININSTALLDIR)
+ $(INSTALL) -d $(MANINSTALLDIR)/man1
+ $(INSTALL) minissdpd.1 $(MANINSTALLDIR)/man1/minissdpd.1
+-ifneq ($(OS), Darwin)
+- $(INSTALL) -d $(PREFIX)/etc/init.d
+- $(INSTALL) minissdpd.init.d.script $(PREFIX)/etc/init.d/minissdpd
+-endif
+
+ minissdpd: $(MINISSDPDOBJS)
+ $(CC) $(CFLAGS) -o $@ $(MINISSDPDOBJS)
diff --git a/net-misc/minissdpd/files/minissdpd-1.2-respect-CC.patch b/net-misc/minissdpd/files/minissdpd-1.2-respect-CC.patch
new file mode 100644
index 000000000000..99d8c947fcbd
--- /dev/null
+++ b/net-misc/minissdpd/files/minissdpd-1.2-respect-CC.patch
@@ -0,0 +1,12 @@
+diff -Naur minissdpd-1.2.orig//Makefile minissdpd-1.2/Makefile
+--- minissdpd-1.2.orig//Makefile 2012-05-02 06:26:50.000000000 -0400
++++ minissdpd-1.2/Makefile 2012-05-25 10:02:32.000000000 -0400
+@@ -18,7 +18,7 @@
+ CFLAGS += -fno-strict-aliasing -fno-common
+ CFLAGS += -D_GNU_SOURCE
+ CFLAGS += -ansi
+-CC = gcc
++CC ?= gcc
+ RM = rm -f
+ INSTALL = install
+ OS = $(shell uname -s)
diff --git a/net-misc/minissdpd/files/minissdpd.confd b/net-misc/minissdpd/files/minissdpd.confd
new file mode 100644
index 000000000000..43b662eca182
--- /dev/null
+++ b/net-misc/minissdpd/files/minissdpd.confd
@@ -0,0 +1,10 @@
+# /etc/conf.d/minissdpd: config file for /etc/init.d/minissdpd
+
+# Configure on which interface or interfaces minissdpd will listen.
+# List all interfaces space separated. If this is not specified then
+# minissdpd will listen on just the interface for the default route.
+# You probably want that when running minissdpd with miniupnpc on the
+# client, but you most likely want to specify the internal interface
+# when running with miniupnpd on the gateway.
+#
+# MINISSDPD_IFACE="eth0 eth1"
diff --git a/net-misc/minissdpd/files/minissdpd.initd-r1 b/net-misc/minissdpd/files/minissdpd.initd-r1
new file mode 100644
index 000000000000..d09ed2c5a985
--- /dev/null
+++ b/net-misc/minissdpd/files/minissdpd.initd-r1
@@ -0,0 +1,61 @@
+#!/sbin/runscript
+
+MINISSDPD="/usr/sbin/minissdpd"
+PIDFILE="/var/run/minissdpd.pid"
+
+ROUTE="/bin/route"
+IFCONFIG="/bin/ifconfig"
+
+depend() {
+ need net
+ before miniupnpd
+}
+
+checkconfig() {
+ if [ "x$MINISSDPD_IFACE" != "x" ]; then
+ interfaces=$($IFCONFIG | grep "Link encap" | awk '{ print $1 }')
+ for interface in $MINISSDPD_IFACE; do
+ hit=0
+ for available in $interfaces; do
+ if [ "$interface" = "$available" ]; then
+ hit=1
+ fi
+ done
+ if [ $hit = 0 ]; then
+ ewarn "Interface $interface not available"
+ return 1
+ fi
+ done
+ fi
+ return 0
+}
+
+start() {
+ ebegin "Starting minissdpd"
+ checkconfig || return 1
+
+ if [ "x$MINISSDPD_IFACE" = "x" ]; then
+ # We assume that the default interface has an IP address
+ interface=$($ROUTE | grep default | awk -- '{ print $8 }')
+ IP="$($IFCONFIG $interface | grep 'inet' | sed 's/^.*inet \([0-9.]\+\).\+/\1/')"
+ ARGS="-i $IP "
+ else
+ ARGS=""
+ for interface in $MINISSDPD_IFACE; do
+ # An interface may not have an IP address, so don't listen if it doesn't
+ IP="$($IFCONFIG $interface | grep 'inet' | sed 's/^.*inet \([0-9.]\+\).\+/\1/')"
+ if [ "x$IP" != "x" ]; then
+ ARGS+="-i $IP "
+ fi
+ done
+ fi
+
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $MINISSDPD -- $ARGS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping minissdpd"
+ start-stop-daemon --stop --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/net-misc/minissdpd/files/minissdpd.initd-r2 b/net-misc/minissdpd/files/minissdpd.initd-r2
new file mode 100644
index 000000000000..97f5f4070e5f
--- /dev/null
+++ b/net-misc/minissdpd/files/minissdpd.initd-r2
@@ -0,0 +1,61 @@
+#!/sbin/runscript
+
+MINISSDPD="/usr/sbin/minissdpd"
+PIDFILE="/var/run/minissdpd.pid"
+
+depend() {
+ need net
+ before miniupnpd
+}
+
+interfaceup() {
+ # interface exists?
+ if [ ! -f /sys/class/net/$1/flags ]; then return 1; fi
+ let "IFUP = `cat /sys/class/net/$1/flags` & 1"
+ # interface has UP flag?
+ if [ $IFUP -eq 0 ]; then return 1; fi
+ return 0
+}
+
+# awk script: scans the /proc routing table for local subnets
+# 1. filter list for entries with a gateway (column 3) of 0.0.0.0 (ie interface-local)
+# 2. read column 2 for network-order hex encoded subnet address
+# 3. match against a 10.x.x.x, 172.(16-31).x.x, or 192.168.x.x address
+# 4. print out any interface (column 1) that matches
+privateinterfaces() {
+ awk -f - /proc/net/route <<'FindPrivateNetworks'
+function p(m,n) { return(and(IP,m) == n); }
+$3=="00000000" { IP=strtonum("0x"$2); if (p(0xff,0x0a) || p(0x1fff,0x10ac) || p(0xffff,0xa8c0)) print $1; }
+FindPrivateNetworks
+}
+
+start() {
+ ebegin "Starting minissdpd"
+
+ ARGS=""
+ if [ "x$MINISSDPD_IFACE" = "x" ]; then
+ ewarn "No interfaces provided, using interfaces on private networks"
+ IFLIST=$(privateinterfaces)
+ else
+ IFLIST="$MINISSDPD_IFACE"
+ fi
+
+ eindent
+ for IF in $IFLIST; do
+ if interfaceup $IF; then
+ einfo Adding interface $IF
+ ARGS+="-i $IF "
+ else
+ ewarn "Interface $IF is not up"
+ fi
+ done
+ eoutdent
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $MINISSDPD -- $ARGS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping minissdpd"
+ start-stop-daemon --stop --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/net-misc/minissdpd/metadata.xml b/net-misc/minissdpd/metadata.xml
new file mode 100644
index 000000000000..1e7587374fdf
--- /dev/null
+++ b/net-misc/minissdpd/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-misc/minissdpd/minissdpd-1.2.20141204.ebuild b/net-misc/minissdpd/minissdpd-1.2.20141204.ebuild
new file mode 100644
index 000000000000..3055f5c45d9b
--- /dev/null
+++ b/net-misc/minissdpd/minissdpd-1.2.20141204.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit eutils toolchain-funcs
+
+DESCRIPTION="MiniSSDP Daemon"
+SRC_URI="http://miniupnp.free.fr/files/${P}.tar.gz"
+HOMEPAGE="http://miniupnp.free.fr/"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=sys-apps/net-tools-1.60_p20120127084908[-old-output]
+ || ( net-misc/miniupnpd net-libs/miniupnpc )"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.2-respect-CC.patch"
+ epatch "${FILESDIR}/${PN}-1.2-remove-initd.patch"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install () {
+ einstall PREFIX="${D}"
+ newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ dodoc Changelog.txt README
+ doman minissdpd.1
+}
diff --git a/net-misc/minissdpd/minissdpd-1.3-r1.ebuild b/net-misc/minissdpd/minissdpd-1.3-r1.ebuild
new file mode 100644
index 000000000000..2aaba3988386
--- /dev/null
+++ b/net-misc/minissdpd/minissdpd-1.3-r1.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 eutils toolchain-funcs
+
+DESCRIPTION="MiniSSDP Daemon"
+SRC_URI="http://miniupnp.free.fr/files/${P}.tar.gz"
+HOMEPAGE="http://miniupnp.free.fr/"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="|| ( net-misc/miniupnpd net-libs/miniupnpc )"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.2-respect-CC.patch"
+ epatch "${FILESDIR}/${PN}-1.2-remove-initd.patch"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install () {
+ einstall PREFIX="${D}"
+ newinitd "${FILESDIR}/${PN}.initd-r2" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ dodoc Changelog.txt README
+ doman minissdpd.1
+}
diff --git a/net-misc/minissdpd/minissdpd-1.3.20150527.ebuild b/net-misc/minissdpd/minissdpd-1.3.20150527.ebuild
new file mode 100644
index 000000000000..47c9ac237cd5
--- /dev/null
+++ b/net-misc/minissdpd/minissdpd-1.3.20150527.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit eutils toolchain-funcs
+
+DESCRIPTION="MiniSSDP Daemon"
+SRC_URI="http://miniupnp.free.fr/files/${P}.tar.gz"
+HOMEPAGE="http://miniupnp.free.fr/"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="|| ( net-misc/miniupnpd net-libs/miniupnpc )"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.2-respect-CC.patch"
+ epatch "${FILESDIR}/${PN}-1.2-remove-initd.patch"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install () {
+ einstall PREFIX="${D}"
+ newinitd "${FILESDIR}/${PN}.initd-r2" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ dodoc Changelog.txt README
+ doman minissdpd.1
+}
diff --git a/net-misc/minissdpd/minissdpd-1.3.ebuild b/net-misc/minissdpd/minissdpd-1.3.ebuild
new file mode 100644
index 000000000000..3055f5c45d9b
--- /dev/null
+++ b/net-misc/minissdpd/minissdpd-1.3.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit eutils toolchain-funcs
+
+DESCRIPTION="MiniSSDP Daemon"
+SRC_URI="http://miniupnp.free.fr/files/${P}.tar.gz"
+HOMEPAGE="http://miniupnp.free.fr/"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=sys-apps/net-tools-1.60_p20120127084908[-old-output]
+ || ( net-misc/miniupnpd net-libs/miniupnpc )"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.2-respect-CC.patch"
+ epatch "${FILESDIR}/${PN}-1.2-remove-initd.patch"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install () {
+ einstall PREFIX="${D}"
+ newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ dodoc Changelog.txt README
+ doman minissdpd.1
+}
diff --git a/net-misc/miniupnpd/Manifest b/net-misc/miniupnpd/Manifest
new file mode 100644
index 000000000000..331feec2c0c8
--- /dev/null
+++ b/net-misc/miniupnpd/Manifest
@@ -0,0 +1 @@
+DIST miniupnpd-1.9.20141209.tar.gz 193183 SHA256 e2bc8040e912574af122cd295012b566b574032e39d76086c5ad1968bbc9aba3 SHA512 c2cd66a48401c735f6e36909c6d69cf55c13ff559bcd1324e971ec03e062591477499590019d122a483531d95df7255ec1cd552f6a512c581046f61118fbdbd2 WHIRLPOOL 7000b2aa67fbdcd869a2bfa1e2f7ac1430cf7cffd926cff37add5c5101c8b97d521ea23b2b0749885f73c6e97ff24cd8076b4eea5388de76f3df27d20b366f06
diff --git a/net-misc/miniupnpd/files/miniupnpd-1.10-build.patch b/net-misc/miniupnpd/files/miniupnpd-1.10-build.patch
new file mode 100644
index 000000000000..cd2350766c5d
--- /dev/null
+++ b/net-misc/miniupnpd/files/miniupnpd-1.10-build.patch
@@ -0,0 +1,83 @@
+--- a/Makefile.linux
++++ b/Makefile.linux
+@@ -75,70 +75,10 @@ LDFLAGS += $(shell $(PKG_CONFIG) --libs-
+ LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-other libiptc)
+ else
+
+-ifeq "$(wildcard /etc/gentoo-release )" ""
+-LDLIBS ?= -liptc
+-else # gentoo
+-# the following is better, at least on gentoo with iptables 1.4.6
+-# see http://miniupnp.tuxfamily.org/forum/viewtopic.php?p=1618
+-# and http://miniupnp.tuxfamily.org/forum/viewtopic.php?p=2183
+-LDLIBS ?= -lip4tc
+-CPPFLAGS := -DIPTABLES_143 $(CPPFLAGS)
+-endif
+-
+-ARCH ?= $(shell uname -m | grep -q "x86_64" && echo 64)
+-ifdef IPTABLESPATH
+-CPPFLAGS := $(CPPFLAGS) -I$(IPTABLESPATH)/include/
+-LDFLAGS := $(LDFLAFGS) -L$(IPTABLESPATH)/libiptc/
+-# get iptables version and set IPTABLES_143 macro if needed
+-ifeq ($(TARGET_OPENWRT),)
+-IPTABLESVERSION := $(shell grep "\#define VERSION" $(IPTABLESPATH)/config.h | tr -d \" |cut -d" " -f3 )
+-IPTABLESVERSION1 := $(shell echo $(IPTABLESVERSION) | cut -d. -f1 )
+-IPTABLESVERSION2 := $(shell echo $(IPTABLESVERSION) | cut -d. -f2 )
+-IPTABLESVERSION3 := $(shell echo $(IPTABLESVERSION) | cut -d. -f3 )
+-# test if iptables version >= 1.4.3
+-TEST := $(shell [ \( \( $(IPTABLESVERSION1) -ge 1 \) -a \( $(IPTABLESVERSION2) -ge 4 \) \) -a \( $(IPTABLESVERSION3) -ge 3 \) ] && echo 1 )
+-ifeq ($(TEST), 1)
+-CPPFLAGS := $(CPPFLAGS) -DIPTABLES_143
+-# the following sucks, but works
+-LDLIBS = $(IPTABLESPATH)/libiptc/.libs/libip4tc.o
+-#LDLIBS = $(IPTABLESPATH)/libiptc/.libs/libiptc.a
+-else # ifeq ($(TEST), 1)
+-LDLIBS = $(IPTABLESPATH)/libiptc/libiptc.a
+-endif # ifeq ($(TEST), 1)
+-else # ($(TARGET_OPENWRT),)
+-# openWRT :
+-# check for system-wide iptables files. Test if iptables version >= 1.4.3
+-# the following test has to be verified :
+-TEST := $(shell test -f /usr/include/iptables/internal.h && grep -q "\#define IPTABLES_VERSION" /usr/include/iptables/internal.h && echo 1)
+-ifeq ($(TEST), 1)
+-CPPFLAGS := $(CPPFLAGS) -DIPTABLES_143
+-LDLIBS = -liptc
+-endif # ($(TEST), 1)
+-TEST_LIB := $(shell test -f /usr/lib$(ARCH)/libiptc.a && echo 1)
+-ifeq ($(TEST_LIB), 1)
+-LDLIBS = -liptc /usr/lib$(ARCH)/libiptc.a
+-endif # ($(TEST_LIB), 1)
+-endif # ($(TARGET_OPENWRT),)
+-else # ifdef IPTABLESPATH
+-# IPTABLESPATH not defined
+-# the following test has to be verified :
+-TEST := $(shell test -f /usr/include/xtables.h && grep -q "XTABLES_VERSION_CODE" /usr/include/xtables.h && echo 1)
+-ifeq ($(TEST), 1)
+-CPPFLAGS := $(CPPFLAGS) -DIPTABLES_143
+-LDLIBS = -liptc
+-TESTIP4TC := $(shell test -f /lib/libip4tc.so && echo 1)
+-ifeq ($(TESTIP4TC), 1)
+-LDLIBS := $(LDLIBS) -lip4tc
+-endif # ($(TESTIP4TC), 1)
+-TESTIP6TC := $(shell test -f /lib/libip6tc.so && echo 1)
+-ifeq ($(TESTIP6TC), 1)
+-LDLIBS := $(LDLIBS) -lip6tc
+-endif # ($(TESTIP6TC), 1)
+-endif # ($(TEST), 1)
+-endif # ifdef IPTABLESPATH
+ endif # ifdef PCFILE_FOUND
+
+-LDLIBS += -lnfnetlink
++LDLIBS += -lip4tc -lnfnetlink
++CPPFLAGS += -DIPTABLES_143
+
+ TEST := $(shell $(PKG_CONFIG) --atleast-version=1.0.2 libnetfilter_conntrack && $(PKG_CONFIG) --atleast-version=1.0.3 libmnl && echo 1)
+ ifeq ($(TEST),1)
+@@ -184,7 +124,6 @@ install: miniupnpd miniupnpd.8 miniupnpd
+ $(INSTALL) linux/miniupnpd.init.d.script $(DESTDIR)$(PREFIX)/etc/init.d/miniupnpd
+ $(INSTALL) -d $(DESTDIR)$(MANINSTALLDIR)
+ $(INSTALL) --mode=0644 miniupnpd.8 $(DESTDIR)$(MANINSTALLDIR)
+- gzip -f $(DESTDIR)$(MANINSTALLDIR)/miniupnpd.8
+
+ # genuuid is using the uuidgen CLI tool which is part of libuuid
+ # from the e2fsprogs
diff --git a/net-misc/miniupnpd/files/miniupnpd-conf.d b/net-misc/miniupnpd/files/miniupnpd-conf.d
new file mode 100644
index 000000000000..8482ef2d185b
--- /dev/null
+++ b/net-misc/miniupnpd/files/miniupnpd-conf.d
@@ -0,0 +1,2 @@
+ARGS='-f /etc/miniupnpd/miniupnpd.conf'
+
diff --git a/net-misc/miniupnpd/files/miniupnpd-init.d b/net-misc/miniupnpd/files/miniupnpd-init.d
new file mode 100644
index 000000000000..37ccde1f8adb
--- /dev/null
+++ b/net-misc/miniupnpd/files/miniupnpd-init.d
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net iptables
+ use minissdpd
+}
+
+start() {
+ ebegin "Starting miniupnpd"
+ /etc/miniupnpd/iptables_init.sh
+ start-stop-daemon --start --pidfile /var/run/miniupnpd.pid --exec /usr/sbin/miniupnpd -- ${ARGS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping miniupnpd"
+ start-stop-daemon --stop --pidfile /var/run/miniupnpd.pid
+ eend $?
+ /etc/miniupnpd/iptables_removeall.sh
+}
diff --git a/net-misc/miniupnpd/metadata.xml b/net-misc/miniupnpd/metadata.xml
new file mode 100644
index 000000000000..3daf0e8091b2
--- /dev/null
+++ b/net-misc/miniupnpd/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>gurligebis@gentoo.org</email>
+ <name>Bjarke Istrup Pedersen</name>
+ </maintainer>
+ <longdescription>
+ MiniUPnP Internet Gateway Device Deamon, used to allow UPnP enabled clients to forward ports.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/miniupnpd/miniupnpd-1.10_pre20141209.ebuild b/net-misc/miniupnpd/miniupnpd-1.10_pre20141209.ebuild
new file mode 100644
index 000000000000..97e3a7cf7c96
--- /dev/null
+++ b/net-misc/miniupnpd/miniupnpd-1.10_pre20141209.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+MY_PV=1.9.20141209
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="MiniUPnP IGD Daemon"
+HOMEPAGE="http://miniupnp.free.fr/"
+SRC_URI="http://miniupnp.free.fr/files/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+RDEPEND=">=net-firewall/iptables-1.4.6
+ net-libs/libnfnetlink"
+DEPEND="${RDEPEND}
+ sys-apps/util-linux
+ sys-apps/lsb-release"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.10-build.patch
+ mv Makefile.linux Makefile || die
+}
+
+src_configure() {
+ tc-export CC
+ export STRIP=true
+
+ emake config.h
+ sed -i -r \
+ -e '/#define ENABLE_LEASEFILE/s:(/[*]|[*]/)::g' \
+ config.h || die
+
+ sed -i -r \
+ -e '/#define ENABLE_MANUFACTURER_INFO_CONFIGURATION/s:(/[*]|[*]/)::g' \
+ config.h || die
+}
+
+src_compile() {
+ # By default, it builds a bunch of unittests we don't run.
+ emake CC="$(tc-getCC)" miniupnpd
+}
+
+src_install() {
+ emake install PREFIX="${ED}"
+
+ newinitd "${FILESDIR}"/${PN}-init.d ${PN}
+ newconfd "${FILESDIR}"/${PN}-conf.d ${PN}
+}
+
+pkg_postinst() {
+ elog "Please correct the external interface in the top of the two"
+ elog "scripts in /etc/miniupnpd and edit the config file in there too"
+}
diff --git a/net-misc/miredo/Manifest b/net-misc/miredo/Manifest
new file mode 100644
index 000000000000..3eb6bd6e06be
--- /dev/null
+++ b/net-misc/miredo/Manifest
@@ -0,0 +1,2 @@
+DIST miredo-1.2.5.tar.xz 474236 SHA256 9d6c6aacfbde0e152481273cda4dc9a62f8724c4c941fa8e0806e89ab9992262 SHA512 94bc71b7093783ad103a0aceb95ad3de1739e4ec1d763b3c6cea9bb1768f55359448957f623ee3f966955c555bb9f71ff0216d9d4e8d2ff244bb058731702c70 WHIRLPOOL 45b38f19fc50bb5661dcc51166c721c507d70b29072c7a2c3195c093ec91259dfbcdc40e3889f5242af79cf2f04fb7fdb3e48f7bd2cc15d6262813891fa9624c
+DIST miredo-1.2.6.tar.xz 477668 SHA256 fa26d2f4a405415833669e2e2e22677b225d8f83600844645d5683535ea43149 SHA512 9cbc604aecde566f921834a220be7675981e1c603cbcc81c3e2e9c58fdcdae2e78ec6ffc180939d5b8f6d7598ba3967270532b2c0c04de8b688a86c436719caf WHIRLPOOL 5b2723568e1cc583e15b32dbb578c12438ba30802bc1e11a912829c010d655d8a867f8070e1b9a4a2c1c910ca4abc1ef6109d87372f382e8787d4514d035d513
diff --git a/net-misc/miredo/files/miredo-1.2.5-configure-libcap.diff b/net-misc/miredo/files/miredo-1.2.5-configure-libcap.diff
new file mode 100644
index 000000000000..cffdbf1e562e
--- /dev/null
+++ b/net-misc/miredo/files/miredo-1.2.5-configure-libcap.diff
@@ -0,0 +1,33 @@
+--- configure.ac.ori 2012-06-14 21:55:13.756603416 +0200
++++ configure.ac 2012-06-14 23:12:01.425399836 +0200
+@@ -150,16 +150,23 @@
+
+ # POSIX capabilities
+ LIBCAP=""
+-AC_CHECK_HEADERS([sys/capability.h], [
+- AC_CHECK_LIB(cap, cap_set_proc, [
+- LIBCAP="-lcap"
+- AC_DEFINE(HAVE_LIBCAP, 1,
+- [Define to 1 if you have the `cap' library (-lcap).])
+- ])
++AC_ARG_WITH(libcap,
++ AS_HELP_STRING([--with-libcap], [enable POSIX 1003.1e capabilities]),
++ with_libcap=$withval,
++ with_libcap=auto)
++AC_MSG_CHECKING([whether to enable POSIX 1003.1e capabilities])
++AC_MSG_RESULT($with_libcap)
++
++AS_IF([test "x$with_libcap" != "xno"], [
++ AC_CHECK_HEADERS([sys/capability.h])
++ AC_CHECK_LIB(cap, cap_set_proc, [
++ LIBCAP="-lcap"
++ AC_DEFINE(HAVE_LIBCAP, 1,
++ [Define to 1 if you have the cap library (-lcap).])
++ ])
+ ])
+ AC_SUBST(LIBCAP)
+
+-
+ # Judy
+ AC_ARG_WITH(Judy,
+ [AS_HELP_STRING(--with-Judy,
diff --git a/net-misc/miredo/files/miredo-1.2.5-ip-path.patch b/net-misc/miredo/files/miredo-1.2.5-ip-path.patch
new file mode 100644
index 000000000000..1d7b0fc39f6e
--- /dev/null
+++ b/net-misc/miredo/files/miredo-1.2.5-ip-path.patch
@@ -0,0 +1,28 @@
+Index: miredo-1.2.5/misc/client-hook.iproute
+===================================================================
+--- miredo-1.2.5.orig/misc/client-hook.iproute
++++ miredo-1.2.5/misc/client-hook.iproute
+@@ -5,7 +5,10 @@
+ # Distributed under the terms of the GNU General Public License version 2.
+
+ # Linux iproute2 path:
+-IP="/sbin/ip"
++IP="ip"
++
++test -x "/sbin/ip" && IP=/sbin/ip
++test -x "/bin/ip" && IP=/bin/ip
+
+ # Linux default route default metric is 1024
+ # (we put 1029 so that Teredo is used as a last resort):
+@@ -23,11 +26,6 @@ PRIO=32765
+ # (default: specified by the Teredo server, or 1280)
+ #MTU=1400
+
+-if ! test -x "$IP"; then
+- echo "$0: iproute2 is required! Please install it." >&2
+- exit 1
+-fi
+-
+ # Nothing to do with destroy event
+ if test "$STATE" = "destroy"; then exit 0; fi
+
diff --git a/net-misc/miredo/files/miredo.conf.2 b/net-misc/miredo/files/miredo.conf.2
new file mode 100644
index 000000000000..f4ef08a23112
--- /dev/null
+++ b/net-misc/miredo/files/miredo.conf.2
@@ -0,0 +1,2 @@
+# Options to pass to the daemon
+EXTRA_OPTS=""
diff --git a/net-misc/miredo/files/miredo.rc.2 b/net-misc/miredo/files/miredo.rc.2
new file mode 100644
index 000000000000..a9f7d066d1d4
--- /dev/null
+++ b/net-misc/miredo/files/miredo.rc.2
@@ -0,0 +1,14 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need localmount
+ after net modules
+ use dns logger
+}
+
+command=/usr/sbin/${SVCNAME}
+command_args="${MIREDO_OPTS}"
+pidfile=/var/run/${SVCNAME}.pid
diff --git a/net-misc/miredo/metadata.xml b/net-misc/miredo/metadata.xml
new file mode 100644
index 000000000000..91437cda0cd8
--- /dev/null
+++ b/net-misc/miredo/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>flameeyes@gentoo.org</email>
+</maintainer>
+<maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+</maintainer>
+<longdescription lang="en">
+Miredo is an open-source Teredo IPv6 tunneling software, for Linux and the
+BSD operating systems. It includes functional implementations of all
+components of the Teredo specification (client, relay and server). It is
+meant to provide IPv6 connectivity even from behind NAT devices.
+</longdescription>
+</pkgmetadata>
+
diff --git a/net-misc/miredo/miredo-1.2.5-r2.ebuild b/net-misc/miredo/miredo-1.2.5-r2.ebuild
new file mode 100644
index 000000000000..74714e059b3a
--- /dev/null
+++ b/net-misc/miredo/miredo-1.2.5-r2.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools eutils linux-info user
+
+DESCRIPTION="Miredo is an open-source Teredo IPv6 tunneling software"
+HOMEPAGE="http://www.remlab.net/miredo/"
+SRC_URI="http://www.remlab.net/files/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+caps"
+
+RDEPEND="sys-apps/iproute2
+ dev-libs/judy
+ caps? ( sys-libs/libcap )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils"
+
+CONFIG_CHECK="~IPV6" #318777
+
+#tries to connect to external networks (#339180)
+RESTRICT="test"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO THANKS )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-configure-libcap.diff
+ epatch "${FILESDIR}"/${P}-ip-path.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-static \
+ --enable-miredo-user \
+ --localstatedir=/var \
+ $(use_with caps libcap)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+
+ newinitd "${FILESDIR}"/miredo.rc.2 miredo
+ newconfd "${FILESDIR}"/miredo.conf.2 miredo
+ newinitd "${FILESDIR}"/miredo.rc.2 miredo-server
+ newconfd "${FILESDIR}"/miredo.conf.2 miredo-server
+
+ insinto /etc/miredo
+ doins misc/miredo-server.conf
+}
+
+pkg_preinst() {
+ enewgroup miredo
+ enewuser miredo -1 -1 /var/empty miredo
+}
diff --git a/net-misc/miredo/miredo-1.2.6.ebuild b/net-misc/miredo/miredo-1.2.6.ebuild
new file mode 100644
index 000000000000..1fe63d5ec13f
--- /dev/null
+++ b/net-misc/miredo/miredo-1.2.6.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools eutils linux-info user
+
+DESCRIPTION="Miredo is an open-source Teredo IPv6 tunneling software"
+HOMEPAGE="http://www.remlab.net/miredo/"
+SRC_URI="http://www.remlab.net/files/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+caps"
+
+RDEPEND="sys-apps/iproute2
+ dev-libs/judy
+ caps? ( sys-libs/libcap )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils"
+
+CONFIG_CHECK="~IPV6" #318777
+
+#tries to connect to external networks (#339180)
+RESTRICT="test"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO THANKS )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.2.5-configure-libcap.diff
+ epatch "${FILESDIR}"/${PN}-1.2.5-ip-path.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-static \
+ --enable-miredo-user \
+ --localstatedir=/var \
+ $(use_with caps libcap)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+
+ newinitd "${FILESDIR}"/miredo.rc.2 miredo
+ newconfd "${FILESDIR}"/miredo.conf.2 miredo
+ newinitd "${FILESDIR}"/miredo.rc.2 miredo-server
+ newconfd "${FILESDIR}"/miredo.conf.2 miredo-server
+
+ insinto /etc/miredo
+ doins misc/miredo-server.conf
+}
+
+pkg_preinst() {
+ enewgroup miredo
+ enewuser miredo -1 -1 /var/empty miredo
+}
diff --git a/net-misc/mknbi/Manifest b/net-misc/mknbi/Manifest
new file mode 100644
index 000000000000..add2ec8af1a8
--- /dev/null
+++ b/net-misc/mknbi/Manifest
@@ -0,0 +1 @@
+DIST mknbi-1.4.4.tar.gz 212454 SHA256 e5c62131a79cebf31234af252975d4c242ed8face0249f11a5772aeff50e3f02
diff --git a/net-misc/mknbi/files/mknbi-1.4.3-nossp.patch b/net-misc/mknbi/files/mknbi-1.4.3-nossp.patch
new file mode 100644
index 000000000000..71289a336c4c
--- /dev/null
+++ b/net-misc/mknbi/files/mknbi-1.4.3-nossp.patch
@@ -0,0 +1,11 @@
+--- Makefile.orig 2005-04-17 10:50:53.000000000 -0400
++++ Makefile 2005-04-17 10:51:17.000000000 -0400
+@@ -18,7 +18,7 @@
+ FIRSTRELOCS= 0x92800 0x82800
+ OLDGAS:= $(shell $(AS) --version | grep -q '2\.9\.1' && echo -DGAS291)
+ CFLAGS= -I. -Os -ffreestanding -fstrength-reduce -fomit-frame-pointer \
+- -mcpu=i386 \
++ -mcpu=i386 -fno-stack-protector -fno-stack-protector-all -fno-pie \
+ -Wall -W -Wno-format -Wno-unused -DVERSION=\"$(VERSION)$(EXTRAVERSION)\"
+ LDBINARYFLAG= --oformat binary
+ FIRST32SIZE= 6144
diff --git a/net-misc/mknbi/files/mknbi-1.4.4-gcc4.patch b/net-misc/mknbi/files/mknbi-1.4.4-gcc4.patch
new file mode 100644
index 000000000000..5c7c58386653
--- /dev/null
+++ b/net-misc/mknbi/files/mknbi-1.4.4-gcc4.patch
@@ -0,0 +1,27 @@
+diff -ruN mknbi-1.4.4/nfl.c mknbi-1.4.4.thor/nfl.c
+--- mknbi-1.4.4/nfl.c 2003-09-22 16:47:08.000000000 +0200
++++ mknbi-1.4.4.thor/nfl.c 2006-05-19 13:36:42.000000000 +0200
+@@ -666,7 +666,7 @@
+ if (bhdr->b_signature != ELF_BHDR_MAGIC) {
+ return;
+ }
+-
++ /* probably breaks nothing, but why declare unsigned char and make cast to (signed) char??? */
+ note = ((char *)bhdr) + sizeof(*bhdr);
+ end = ((char *)bhdr) + bhdr->b_size;
+ while (note < end) {
+diff -ruN mknbi-1.4.4/nfl.h mknbi-1.4.4.thor/nfl.h
+--- mknbi-1.4.4/nfl.h 2003-01-12 09:39:03.000000000 +0100
++++ mknbi-1.4.4.thor/nfl.h 2006-05-19 13:36:42.000000000 +0200
+@@ -182,7 +182,10 @@
+ extern int auto_fill;
+
+ /* This variable specifies which console should be used. */
+-extern int terminal;
++/* Decide if you want static _or_ external!
++ gcc-4 finally starts complaining about this nonsense.
++ (plus: no file besides nfl.c uses this header anyway...)
++extern int terminal; */
+
+ #define TERMINAL_CONSOLE (1 << 0) /* keyboard and screen */
+ #define TERMINAL_SERIAL (1 << 1) /* serial console */
diff --git a/net-misc/mknbi/metadata.xml b/net-misc/mknbi/metadata.xml
new file mode 100644
index 000000000000..adc9ebf47c78
--- /dev/null
+++ b/net-misc/mknbi/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">etherboot</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/mknbi/mknbi-1.4.4.ebuild b/net-misc/mknbi/mknbi-1.4.4.ebuild
new file mode 100644
index 000000000000..254135a50433
--- /dev/null
+++ b/net-misc/mknbi/mknbi-1.4.4.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="Utility for making tagged kernel images useful for netbooting"
+SRC_URI="mirror://sourceforge/etherboot/${P}.tar.gz"
+RESTRICT="mirror"
+HOMEPAGE="http://etherboot.sourceforge.net"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+
+RDEPEND=">=dev-lang/perl-5.6.1
+ !sys-boot/netboot"
+DEPEND="${RDEPEND}
+ dev-lang/nasm"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch \
+ "${FILESDIR}"/mknbi-1.4.3-nossp.patch \
+ "${FILESDIR}"/${P}-gcc4.patch
+
+ sed -i \
+ -e "s:\/usr\/local:\/usr:" \
+ -e "s:COPYING::" \
+ -e "s:\-mcpu:\-march:" Makefile \
+ || die "sed failed"
+ sed -r /^DOCDIR/s:packages/.*:${PF}: -i Makefile || die "sed failed"
+
+ #apply modifications to CFLAGS to fix for gcc 3.4: bug #64049
+ if [ "`gcc-major-version`" -ge "3" -a "`gcc-minor-version`" -ge "4" ]
+ then
+ sed -i \
+ -e 's:\-mcpu:\-mtune:' \
+ -e 's:CFLAGS=:CFLAGS= -minline-all-stringops:' Makefile \
+ || die "sed failed"
+ fi
+ if [ "`gcc-major-version`" = "4" ]; then
+ sed -i \
+ -e 's:\-fno-stack-protector-all::' Makefile \
+ || die "sed failed"
+ fi
+}
+
+src_install() {
+ export BUILD_ROOT="${D}"
+ emake DESTDIR="${D}" install || die "emake failed"
+ prepalldocs
+}
diff --git a/net-misc/mobile-broadband-provider-info/Manifest b/net-misc/mobile-broadband-provider-info/Manifest
new file mode 100644
index 000000000000..fde8e11d4d33
--- /dev/null
+++ b/net-misc/mobile-broadband-provider-info/Manifest
@@ -0,0 +1 @@
+DIST mobile-broadband-provider-info-20120614.tar.xz 73600 SHA256 72507a732e0cd16cf27424bb094b1c7a03e2206c119ad124722a283e587755f1 SHA512 780f9381d2b03a329cc420eca4dfcc5e89c0c29114db028d42aff417f09d7c01f3b474df27f6ecc838ae3e0a78a9efcb5ffe90e393b4ad71152d2e12231768b1 WHIRLPOOL 873b5f1bb3c4dcb3a8ee833747830e7022e35a0bdb79ee0eb27537277211751785d18a126c359b55afd2cbfee6a831d7b012f657778e284b1da5531fab264d4e
diff --git a/net-misc/mobile-broadband-provider-info/metadata.xml b/net-misc/mobile-broadband-provider-info/metadata.xml
new file mode 100644
index 000000000000..da6fd63d0085
--- /dev/null
+++ b/net-misc/mobile-broadband-provider-info/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>gnome</herd>
+</pkgmetadata>
diff --git a/net-misc/mobile-broadband-provider-info/mobile-broadband-provider-info-20120614.ebuild b/net-misc/mobile-broadband-provider-info/mobile-broadband-provider-info-20120614.ebuild
new file mode 100644
index 000000000000..7a1e43f1c806
--- /dev/null
+++ b/net-misc/mobile-broadband-provider-info/mobile-broadband-provider-info-20120614.ebuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit gnome.org
+
+DESCRIPTION="Database of mobile broadband service providers"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager/MobileBroadband"
+
+LICENSE="CC-PD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
+IUSE=""
+
+DOCS="README" # ChangeLog and NEWS are both dead
diff --git a/net-misc/modemmanager/Manifest b/net-misc/modemmanager/Manifest
new file mode 100644
index 000000000000..458c1211c4d9
--- /dev/null
+++ b/net-misc/modemmanager/Manifest
@@ -0,0 +1,6 @@
+DIST ModemManager-1.4.0.tar.xz 1313396 SHA256 efe12c30d4660a4694dec2a1ea68ea176f4dc3cb4b9e843929115943dc189ca0 SHA512 4c6ab92f6151c190585f83cbd5a50f283f1bea9a98207d81a9cc577a26ff9ff32b0b1efade0a1f44dfc5f77d96da999aede1626a1ddb2a97a9741884408685fb WHIRLPOOL 1c75bc86dea1fa9d5a7510cbc5cfdc2ea1a23e28a9d42ed30a7124f4f13535703eec3b240b9de2398562af11cfa3fa55c24cc5a5a55f4b1817e4a58217c98c22
+DIST ModemManager-1.4.10.tar.xz 1408036 SHA256 107ba0b4d0749aebb0347691a39f60891cc6004aeca8b2128d69c50557049a63 SHA512 b76d0cf5ece5c711fec183f5d2297ea5c35e61bee3f0e1165cf5ff5b52ee6d8d749266cc9232a214cc9141fb736973055959593f03a18e0389d41de01a4857d3 WHIRLPOOL d44afd0e61f4ec94f4ecd53093a613fade19eac204acb1c7e2ab17ee98ade6e201f8b3aa96642ed607c9727cdea2d46c637b5b6e568b565035669ef89fd253a8
+DIST ModemManager-1.4.2.tar.xz 1350604 SHA256 07d332fbe6f45f788f740810951e04042aaf023bd5ecf8ef0b3a06e37703585d SHA512 8be9387f78de5213ff77374ee2cba67c08301b29b2cd957c8bab86446d1227759833b9ecafb3caef590701f6422bae587db848391cf15c1dd16b5421e976a4c6 WHIRLPOOL 6a554a80ce53d1eb41f993ee5113a8f5606f20dde5c415f4c3375510bd5acb655f84ff5a17a5d678ba615810bcbc1366005b3d72dbab2b087a50f5e5352641a2
+DIST ModemManager-1.4.4.tar.xz 1395696 SHA256 1bf88861259772dc81e864e2faccfff0590d41676451a128c5f4e73550dd14d8 SHA512 66cc177b1fa0fef9da4c61a0019278fdcf00580b48ec4b0a01202b6132f887d64858871dcdc5965f8833eb85e49fe50f9406398961569d8e9a5d15003d1205cf WHIRLPOOL a9e960024c46bd3eeb39efaedd53a9401ebe88b3f158afc66908d0bdf4175b1ea31dadd229f9c9251167267e970ae3df177df26ab8075a0baf38d5794116d7ff
+DIST ModemManager-1.4.6.tar.xz 1396764 SHA256 0cedabf46310f8c56630b116944f54ee64369c76c2f35f5f460ca19a8bb5a5cd SHA512 fb74961df2e3e1604de58838da6e8dd7cf80fee97dbfd71eb7f2df60cc319bf38df8c5706a5933856c500b014d3156066e608bb0820c967ddbd964bd9fc2fdec WHIRLPOOL 4f63ac160a4d4acddd2064a58204e6ba410543aefc936ffb753fbb15e004d089cf874ee2390df174638ae15f26f4cf7c7e720de793e69f0cd0b6a923558b0af1
+DIST ModemManager-1.4.8.tar.xz 1397444 SHA256 d951eaffbe513bcde54f90602c6c423a49593f656d6485ba95f6fcb4bc1e8003 SHA512 6dfbdbf579d1b7dd624836877d6556cdb15eec73c60c329d1d6200563495f8943d90f55e2d4e98b7741c05a19f11ac2de61dcabb4aec16a2ae61db453eafc3b5 WHIRLPOOL 47ff7cc8a1f89996110eb0932274fdeceb940f63b2991cf7a1b96541b30e8c39e52cf7f30b4947c8670ca787e10698093cf4e0401aed3ec2564228e9cfdcb8c8
diff --git a/net-misc/modemmanager/files/01-org.freedesktop.ModemManager1.rules b/net-misc/modemmanager/files/01-org.freedesktop.ModemManager1.rules
new file mode 100644
index 000000000000..7fca6472611e
--- /dev/null
+++ b/net-misc/modemmanager/files/01-org.freedesktop.ModemManager1.rules
@@ -0,0 +1,7 @@
+// Let users in plugdev group modify ModemManager
+polkit.addRule(function(action, subject) {
+ if (/^org\.freedesktop\.ModemManager1\.(Device\.Control|Contacts|Messaging|Location)$/.test(action.id) &&
+ subject.isInGroup("plugdev") && subject.active) {
+ return "yes";
+ }
+});
diff --git a/net-misc/modemmanager/metadata.xml b/net-misc/modemmanager/metadata.xml
new file mode 100644
index 000000000000..c10566d5d9a6
--- /dev/null
+++ b/net-misc/modemmanager/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>gnome</herd>
+ <use>
+ <flag name="mbim">Enable MBIM modem protocol</flag>
+ <flag name="qmi">Enable support for the QMI modem protocol used by
+ devices with Qualcomm chipsets</flag>
+ <flag name="qmi-newest">Avoid deprecated QMI commands. Warning: may
+ cause incompatibility with older devices.</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/modemmanager/modemmanager-1.4.0.ebuild b/net-misc/modemmanager/modemmanager-1.4.0.ebuild
new file mode 100644
index 000000000000..b5cda34e77db
--- /dev/null
+++ b/net-misc/modemmanager/modemmanager-1.4.0.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+VALA_MIN_API_VERSION="0.18"
+VALA_USE_DEPEND="vapigen"
+
+inherit gnome2 user readme.gentoo udev vala
+
+DESCRIPTION="Modem and mobile broadband management libraries"
+HOMEPAGE="http://cgit.freedesktop.org/ModemManager/ModemManager/"
+SRC_URI="http://www.freedesktop.org/software/ModemManager/ModemManager-${PV}.tar.xz"
+
+LICENSE="GPL-2+"
+SLOT="0/1" # subslot = dbus interface version, i.e. N in org.freedesktop.ModemManager${N}
+KEYWORDS="~alpha amd64 arm ~arm64 ~ia64 ~mips ppc ppc64 ~sparc x86"
+IUSE="+introspection mbim policykit +qmi qmi-newest vala"
+REQUIRED_USE="
+ qmi-newest? ( qmi )
+ vala? ( introspection )
+"
+
+RDEPEND="
+ >=dev-libs/glib-2.32:2
+ virtual/libgudev:=
+ introspection? ( >=dev-libs/gobject-introspection-0.9.6 )
+ mbim? ( >=net-libs/libmbim-1.10 )
+ policykit? ( >=sys-auth/polkit-0.106[introspection] )
+ qmi? ( >=net-libs/libqmi-1.6.0:= )
+"
+DEPEND="${RDEPEND}
+ dev-util/gdbus-codegen
+ >=dev-util/intltool-0.40
+ sys-devel/gettext
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+"
+
+S="${WORKDIR}/ModemManager-${PV}"
+
+src_prepare() {
+ DOC_CONTENTS="If your USB modem shows up as a Flash drive when you plug it in,
+ You should install sys-apps/usb_modeswitch which will automatically
+ switch it over to USB modem mode whenever you plug it in.\n"
+
+ if use policykit; then
+ DOC_CONTENTS+="\nTo control your modem without needing to enter the root password,
+ add your user account to the 'plugdev' group."
+ fi
+
+ use vala && vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --with-udev-base-dir="$(get_udevdir)" \
+ --disable-static \
+ --with-dist-version=${PVR} \
+ $(use_enable introspection) \
+ $(use_with mbim) \
+ $(use_with policykit polkit) \
+ $(use_with qmi) \
+ $(use_with qmi-newest newest-qmi-commands) \
+ $(use_enable vala)
+}
+
+src_install() {
+ gnome2_src_install
+
+ # Allow users in plugdev group full control over their modem
+ if use policykit; then
+ insinto /usr/share/polkit-1/rules.d/
+ doins "${FILESDIR}"/01-org.freedesktop.ModemManager1.rules
+ fi
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+
+ use policykit && enewgroup plugdev
+
+ # The polkit rules file moved to /usr/share
+ old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.ModemManager.rules"
+ if [[ -f "${old_rules}" ]]; then
+ case "$(md5sum ${old_rules})" in
+ c5ff02532cb1da2c7545c3069e5d0992* | 5c50f0dc603c0a56e2851a5ce9389335* )
+ # Automatically delete the old rules.d file if the user did not change it
+ elog
+ elog "Removing old ${old_rules} ..."
+ rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
+ ;;
+ * )
+ elog "The ${old_rules}"
+ elog "file moved to /usr/share/polkit-1/rules.d/ in >=modemmanager-0.5.2.0-r2"
+ elog "If you edited ${old_rules}"
+ elog "without changing its behavior, you may want to remove it."
+ ;;
+ esac
+ fi
+
+ readme.gentoo_print_elog
+}
diff --git a/net-misc/modemmanager/modemmanager-1.4.10.ebuild b/net-misc/modemmanager/modemmanager-1.4.10.ebuild
new file mode 100644
index 000000000000..f4441121c4fe
--- /dev/null
+++ b/net-misc/modemmanager/modemmanager-1.4.10.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+VALA_USE_DEPEND="vapigen"
+
+inherit gnome2 user readme.gentoo udev vala
+
+DESCRIPTION="Modem and mobile broadband management libraries"
+HOMEPAGE="http://cgit.freedesktop.org/ModemManager/ModemManager/"
+SRC_URI="http://www.freedesktop.org/software/ModemManager/ModemManager-${PV}.tar.xz"
+
+LICENSE="GPL-2+"
+SLOT="0/1" # subslot = dbus interface version, i.e. N in org.freedesktop.ModemManager${N}
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="+introspection mbim policykit +qmi qmi-newest vala"
+REQUIRED_USE="
+ qmi-newest? ( qmi )
+ vala? ( introspection )
+"
+
+RDEPEND="
+ >=dev-libs/glib-2.32:2
+ virtual/libgudev:=
+ introspection? ( >=dev-libs/gobject-introspection-0.9.6 )
+ mbim? ( >=net-libs/libmbim-1.10 )
+ policykit? ( >=sys-auth/polkit-0.106[introspection] )
+ qmi? ( >=net-libs/libqmi-1.12.4:= )
+"
+DEPEND="${RDEPEND}
+ dev-util/gdbus-codegen
+ >=dev-util/intltool-0.40
+ sys-devel/gettext
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+"
+
+S="${WORKDIR}/ModemManager-${PV}"
+
+src_prepare() {
+ DOC_CONTENTS="If your USB modem shows up as a Flash drive when you plug it in,
+ You should install sys-apps/usb_modeswitch which will automatically
+ switch it over to USB modem mode whenever you plug it in.\n"
+
+ if use policykit; then
+ DOC_CONTENTS+="\nTo control your modem without needing to enter the root password,
+ add your user account to the 'plugdev' group."
+ fi
+
+ use vala && vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --with-udev-base-dir="$(get_udevdir)" \
+ --disable-static \
+ --with-dist-version=${PVR} \
+ $(use_enable introspection) \
+ $(use_with mbim) \
+ $(use_with policykit polkit) \
+ $(use_with qmi) \
+ $(use_with qmi-newest newest-qmi-commands) \
+ $(use_enable vala)
+}
+
+src_install() {
+ gnome2_src_install
+
+ # Allow users in plugdev group full control over their modem
+ if use policykit; then
+ insinto /usr/share/polkit-1/rules.d/
+ doins "${FILESDIR}"/01-org.freedesktop.ModemManager1.rules
+ fi
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+
+ use policykit && enewgroup plugdev
+
+ # The polkit rules file moved to /usr/share
+ old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.ModemManager.rules"
+ if [[ -f "${old_rules}" ]]; then
+ case "$(md5sum ${old_rules})" in
+ c5ff02532cb1da2c7545c3069e5d0992* | 5c50f0dc603c0a56e2851a5ce9389335* )
+ # Automatically delete the old rules.d file if the user did not change it
+ elog
+ elog "Removing old ${old_rules} ..."
+ rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
+ ;;
+ * )
+ elog "The ${old_rules}"
+ elog "file moved to /usr/share/polkit-1/rules.d/ in >=modemmanager-0.5.2.0-r2"
+ elog "If you edited ${old_rules}"
+ elog "without changing its behavior, you may want to remove it."
+ ;;
+ esac
+ fi
+
+ readme.gentoo_print_elog
+}
diff --git a/net-misc/modemmanager/modemmanager-1.4.2.ebuild b/net-misc/modemmanager/modemmanager-1.4.2.ebuild
new file mode 100644
index 000000000000..29071b197353
--- /dev/null
+++ b/net-misc/modemmanager/modemmanager-1.4.2.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+VALA_USE_DEPEND="vapigen"
+
+inherit gnome2 user readme.gentoo udev vala
+
+DESCRIPTION="Modem and mobile broadband management libraries"
+HOMEPAGE="http://cgit.freedesktop.org/ModemManager/ModemManager/"
+SRC_URI="http://www.freedesktop.org/software/ModemManager/ModemManager-${PV}.tar.xz"
+
+LICENSE="GPL-2+"
+SLOT="0/1" # subslot = dbus interface version, i.e. N in org.freedesktop.ModemManager${N}
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~mips ppc ppc64 ~sparc x86"
+IUSE="+introspection mbim policykit +qmi qmi-newest vala"
+REQUIRED_USE="
+ qmi-newest? ( qmi )
+ vala? ( introspection )
+"
+
+RDEPEND="
+ >=dev-libs/glib-2.32:2
+ virtual/libgudev:=
+ introspection? ( >=dev-libs/gobject-introspection-0.9.6 )
+ mbim? ( >=net-libs/libmbim-1.10 )
+ policykit? ( >=sys-auth/polkit-0.106[introspection] )
+ qmi? ( >=net-libs/libqmi-1.6.0:= )
+"
+DEPEND="${RDEPEND}
+ dev-util/gdbus-codegen
+ >=dev-util/intltool-0.40
+ sys-devel/gettext
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+"
+
+S="${WORKDIR}/ModemManager-${PV}"
+
+src_prepare() {
+ DOC_CONTENTS="If your USB modem shows up as a Flash drive when you plug it in,
+ You should install sys-apps/usb_modeswitch which will automatically
+ switch it over to USB modem mode whenever you plug it in.\n"
+
+ if use policykit; then
+ DOC_CONTENTS+="\nTo control your modem without needing to enter the root password,
+ add your user account to the 'plugdev' group."
+ fi
+
+ use vala && vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --with-udev-base-dir="$(get_udevdir)" \
+ --disable-static \
+ --with-dist-version=${PVR} \
+ $(use_enable introspection) \
+ $(use_with mbim) \
+ $(use_with policykit polkit) \
+ $(use_with qmi) \
+ $(use_with qmi-newest newest-qmi-commands) \
+ $(use_enable vala)
+}
+
+src_install() {
+ gnome2_src_install
+
+ # Allow users in plugdev group full control over their modem
+ if use policykit; then
+ insinto /usr/share/polkit-1/rules.d/
+ doins "${FILESDIR}"/01-org.freedesktop.ModemManager1.rules
+ fi
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+
+ use policykit && enewgroup plugdev
+
+ # The polkit rules file moved to /usr/share
+ old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.ModemManager.rules"
+ if [[ -f "${old_rules}" ]]; then
+ case "$(md5sum ${old_rules})" in
+ c5ff02532cb1da2c7545c3069e5d0992* | 5c50f0dc603c0a56e2851a5ce9389335* )
+ # Automatically delete the old rules.d file if the user did not change it
+ elog
+ elog "Removing old ${old_rules} ..."
+ rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
+ ;;
+ * )
+ elog "The ${old_rules}"
+ elog "file moved to /usr/share/polkit-1/rules.d/ in >=modemmanager-0.5.2.0-r2"
+ elog "If you edited ${old_rules}"
+ elog "without changing its behavior, you may want to remove it."
+ ;;
+ esac
+ fi
+
+ readme.gentoo_print_elog
+}
diff --git a/net-misc/modemmanager/modemmanager-1.4.4.ebuild b/net-misc/modemmanager/modemmanager-1.4.4.ebuild
new file mode 100644
index 000000000000..f4441121c4fe
--- /dev/null
+++ b/net-misc/modemmanager/modemmanager-1.4.4.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+VALA_USE_DEPEND="vapigen"
+
+inherit gnome2 user readme.gentoo udev vala
+
+DESCRIPTION="Modem and mobile broadband management libraries"
+HOMEPAGE="http://cgit.freedesktop.org/ModemManager/ModemManager/"
+SRC_URI="http://www.freedesktop.org/software/ModemManager/ModemManager-${PV}.tar.xz"
+
+LICENSE="GPL-2+"
+SLOT="0/1" # subslot = dbus interface version, i.e. N in org.freedesktop.ModemManager${N}
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="+introspection mbim policykit +qmi qmi-newest vala"
+REQUIRED_USE="
+ qmi-newest? ( qmi )
+ vala? ( introspection )
+"
+
+RDEPEND="
+ >=dev-libs/glib-2.32:2
+ virtual/libgudev:=
+ introspection? ( >=dev-libs/gobject-introspection-0.9.6 )
+ mbim? ( >=net-libs/libmbim-1.10 )
+ policykit? ( >=sys-auth/polkit-0.106[introspection] )
+ qmi? ( >=net-libs/libqmi-1.12.4:= )
+"
+DEPEND="${RDEPEND}
+ dev-util/gdbus-codegen
+ >=dev-util/intltool-0.40
+ sys-devel/gettext
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+"
+
+S="${WORKDIR}/ModemManager-${PV}"
+
+src_prepare() {
+ DOC_CONTENTS="If your USB modem shows up as a Flash drive when you plug it in,
+ You should install sys-apps/usb_modeswitch which will automatically
+ switch it over to USB modem mode whenever you plug it in.\n"
+
+ if use policykit; then
+ DOC_CONTENTS+="\nTo control your modem without needing to enter the root password,
+ add your user account to the 'plugdev' group."
+ fi
+
+ use vala && vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --with-udev-base-dir="$(get_udevdir)" \
+ --disable-static \
+ --with-dist-version=${PVR} \
+ $(use_enable introspection) \
+ $(use_with mbim) \
+ $(use_with policykit polkit) \
+ $(use_with qmi) \
+ $(use_with qmi-newest newest-qmi-commands) \
+ $(use_enable vala)
+}
+
+src_install() {
+ gnome2_src_install
+
+ # Allow users in plugdev group full control over their modem
+ if use policykit; then
+ insinto /usr/share/polkit-1/rules.d/
+ doins "${FILESDIR}"/01-org.freedesktop.ModemManager1.rules
+ fi
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+
+ use policykit && enewgroup plugdev
+
+ # The polkit rules file moved to /usr/share
+ old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.ModemManager.rules"
+ if [[ -f "${old_rules}" ]]; then
+ case "$(md5sum ${old_rules})" in
+ c5ff02532cb1da2c7545c3069e5d0992* | 5c50f0dc603c0a56e2851a5ce9389335* )
+ # Automatically delete the old rules.d file if the user did not change it
+ elog
+ elog "Removing old ${old_rules} ..."
+ rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
+ ;;
+ * )
+ elog "The ${old_rules}"
+ elog "file moved to /usr/share/polkit-1/rules.d/ in >=modemmanager-0.5.2.0-r2"
+ elog "If you edited ${old_rules}"
+ elog "without changing its behavior, you may want to remove it."
+ ;;
+ esac
+ fi
+
+ readme.gentoo_print_elog
+}
diff --git a/net-misc/modemmanager/modemmanager-1.4.6.ebuild b/net-misc/modemmanager/modemmanager-1.4.6.ebuild
new file mode 100644
index 000000000000..f4441121c4fe
--- /dev/null
+++ b/net-misc/modemmanager/modemmanager-1.4.6.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+VALA_USE_DEPEND="vapigen"
+
+inherit gnome2 user readme.gentoo udev vala
+
+DESCRIPTION="Modem and mobile broadband management libraries"
+HOMEPAGE="http://cgit.freedesktop.org/ModemManager/ModemManager/"
+SRC_URI="http://www.freedesktop.org/software/ModemManager/ModemManager-${PV}.tar.xz"
+
+LICENSE="GPL-2+"
+SLOT="0/1" # subslot = dbus interface version, i.e. N in org.freedesktop.ModemManager${N}
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="+introspection mbim policykit +qmi qmi-newest vala"
+REQUIRED_USE="
+ qmi-newest? ( qmi )
+ vala? ( introspection )
+"
+
+RDEPEND="
+ >=dev-libs/glib-2.32:2
+ virtual/libgudev:=
+ introspection? ( >=dev-libs/gobject-introspection-0.9.6 )
+ mbim? ( >=net-libs/libmbim-1.10 )
+ policykit? ( >=sys-auth/polkit-0.106[introspection] )
+ qmi? ( >=net-libs/libqmi-1.12.4:= )
+"
+DEPEND="${RDEPEND}
+ dev-util/gdbus-codegen
+ >=dev-util/intltool-0.40
+ sys-devel/gettext
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+"
+
+S="${WORKDIR}/ModemManager-${PV}"
+
+src_prepare() {
+ DOC_CONTENTS="If your USB modem shows up as a Flash drive when you plug it in,
+ You should install sys-apps/usb_modeswitch which will automatically
+ switch it over to USB modem mode whenever you plug it in.\n"
+
+ if use policykit; then
+ DOC_CONTENTS+="\nTo control your modem without needing to enter the root password,
+ add your user account to the 'plugdev' group."
+ fi
+
+ use vala && vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --with-udev-base-dir="$(get_udevdir)" \
+ --disable-static \
+ --with-dist-version=${PVR} \
+ $(use_enable introspection) \
+ $(use_with mbim) \
+ $(use_with policykit polkit) \
+ $(use_with qmi) \
+ $(use_with qmi-newest newest-qmi-commands) \
+ $(use_enable vala)
+}
+
+src_install() {
+ gnome2_src_install
+
+ # Allow users in plugdev group full control over their modem
+ if use policykit; then
+ insinto /usr/share/polkit-1/rules.d/
+ doins "${FILESDIR}"/01-org.freedesktop.ModemManager1.rules
+ fi
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+
+ use policykit && enewgroup plugdev
+
+ # The polkit rules file moved to /usr/share
+ old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.ModemManager.rules"
+ if [[ -f "${old_rules}" ]]; then
+ case "$(md5sum ${old_rules})" in
+ c5ff02532cb1da2c7545c3069e5d0992* | 5c50f0dc603c0a56e2851a5ce9389335* )
+ # Automatically delete the old rules.d file if the user did not change it
+ elog
+ elog "Removing old ${old_rules} ..."
+ rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
+ ;;
+ * )
+ elog "The ${old_rules}"
+ elog "file moved to /usr/share/polkit-1/rules.d/ in >=modemmanager-0.5.2.0-r2"
+ elog "If you edited ${old_rules}"
+ elog "without changing its behavior, you may want to remove it."
+ ;;
+ esac
+ fi
+
+ readme.gentoo_print_elog
+}
diff --git a/net-misc/modemmanager/modemmanager-1.4.8.ebuild b/net-misc/modemmanager/modemmanager-1.4.8.ebuild
new file mode 100644
index 000000000000..7ff5253711e9
--- /dev/null
+++ b/net-misc/modemmanager/modemmanager-1.4.8.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+VALA_USE_DEPEND="vapigen"
+
+inherit gnome2 user readme.gentoo udev vala
+
+DESCRIPTION="Modem and mobile broadband management libraries"
+HOMEPAGE="http://cgit.freedesktop.org/ModemManager/ModemManager/"
+SRC_URI="http://www.freedesktop.org/software/ModemManager/ModemManager-${PV}.tar.xz"
+
+LICENSE="GPL-2+"
+SLOT="0/1" # subslot = dbus interface version, i.e. N in org.freedesktop.ModemManager${N}
+KEYWORDS="~alpha amd64 arm ~ia64 ~mips ppc ppc64 ~sparc x86"
+IUSE="+introspection mbim policykit +qmi qmi-newest vala"
+REQUIRED_USE="
+ qmi-newest? ( qmi )
+ vala? ( introspection )
+"
+
+RDEPEND="
+ >=dev-libs/glib-2.32:2
+ virtual/libgudev:=
+ introspection? ( >=dev-libs/gobject-introspection-0.9.6 )
+ mbim? ( >=net-libs/libmbim-1.10 )
+ policykit? ( >=sys-auth/polkit-0.106[introspection] )
+ qmi? ( >=net-libs/libqmi-1.12.4:= )
+"
+DEPEND="${RDEPEND}
+ dev-util/gdbus-codegen
+ >=dev-util/intltool-0.40
+ sys-devel/gettext
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+"
+
+S="${WORKDIR}/ModemManager-${PV}"
+
+src_prepare() {
+ DOC_CONTENTS="If your USB modem shows up as a Flash drive when you plug it in,
+ You should install sys-apps/usb_modeswitch which will automatically
+ switch it over to USB modem mode whenever you plug it in.\n"
+
+ if use policykit; then
+ DOC_CONTENTS+="\nTo control your modem without needing to enter the root password,
+ add your user account to the 'plugdev' group."
+ fi
+
+ use vala && vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --with-udev-base-dir="$(get_udevdir)" \
+ --disable-static \
+ --with-dist-version=${PVR} \
+ $(use_enable introspection) \
+ $(use_with mbim) \
+ $(use_with policykit polkit) \
+ $(use_with qmi) \
+ $(use_with qmi-newest newest-qmi-commands) \
+ $(use_enable vala)
+}
+
+src_install() {
+ gnome2_src_install
+
+ # Allow users in plugdev group full control over their modem
+ if use policykit; then
+ insinto /usr/share/polkit-1/rules.d/
+ doins "${FILESDIR}"/01-org.freedesktop.ModemManager1.rules
+ fi
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+
+ use policykit && enewgroup plugdev
+
+ # The polkit rules file moved to /usr/share
+ old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.ModemManager.rules"
+ if [[ -f "${old_rules}" ]]; then
+ case "$(md5sum ${old_rules})" in
+ c5ff02532cb1da2c7545c3069e5d0992* | 5c50f0dc603c0a56e2851a5ce9389335* )
+ # Automatically delete the old rules.d file if the user did not change it
+ elog
+ elog "Removing old ${old_rules} ..."
+ rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
+ ;;
+ * )
+ elog "The ${old_rules}"
+ elog "file moved to /usr/share/polkit-1/rules.d/ in >=modemmanager-0.5.2.0-r2"
+ elog "If you edited ${old_rules}"
+ elog "without changing its behavior, you may want to remove it."
+ ;;
+ esac
+ fi
+
+ readme.gentoo_print_elog
+}
diff --git a/net-misc/monmotha/Manifest b/net-misc/monmotha/Manifest
new file mode 100644
index 000000000000..dd8eff369734
--- /dev/null
+++ b/net-misc/monmotha/Manifest
@@ -0,0 +1 @@
+DIST rc.firewall-2.3.8 56204 SHA256 4d273d377baebfa5404cbaf87a40227b0000133ecb56c0c7539f548f516929f0
diff --git a/net-misc/monmotha/files/monmotha.rc6 b/net-misc/monmotha/files/monmotha.rc6
new file mode 100644
index 000000000000..50f31b9811cd
--- /dev/null
+++ b/net-misc/monmotha/files/monmotha.rc6
@@ -0,0 +1,41 @@
+#!/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 the MonMotha Firewall"
+ /etc/monmotha/monmotha > /var/log/monmotha.log
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping the MonMotha Firewall"
+
+ # RESET ALL IPTABLES STUFF
+
+ /sbin/iptables -P INPUT ACCEPT
+ /sbin/iptables -P FORWARD ACCEPT
+ /sbin/iptables -P OUTPUT ACCEPT
+
+ /sbin/iptables -t nat -P PREROUTING ACCEPT
+ /sbin/iptables -t nat -P POSTROUTING ACCEPT
+ /sbin/iptables -t nat -P OUTPUT ACCEPT
+
+ /sbin/iptables -t mangle -P PREROUTING ACCEPT
+ /sbin/iptables -t mangle -P OUTPUT ACCEPT
+
+ /sbin/iptables -F
+ /sbin/iptables -t nat -F
+ /sbin/iptables -t mangle -F
+
+ /sbin/iptables -X
+ /sbin/iptables -t nat -X
+ /sbin/iptables -t mangle -X
+
+ eend $?
+}
diff --git a/net-misc/monmotha/metadata.xml b/net-misc/monmotha/metadata.xml
new file mode 100644
index 000000000000..59e2b8f78cb5
--- /dev/null
+++ b/net-misc/monmotha/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>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/monmotha/monmotha-2.3.8.ebuild b/net-misc/monmotha/monmotha-2.3.8.ebuild
new file mode 100644
index 000000000000..9ee024bf147c
--- /dev/null
+++ b/net-misc/monmotha/monmotha-2.3.8.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="MonMotha IPTables-based firewall script"
+HOMEPAGE="http://monmotha.mplug.org/firewall/"
+LICENSE="GPL-2"
+
+KEYWORDS="x86 ~amd64"
+IUSE=""
+SLOT="0"
+RDEPEND=">=net-firewall/iptables-1.2.5"
+
+MY_PVP=(${PV//[-\._]/ })
+
+S=${WORKDIR}
+
+SRC_URI="http://monmotha.mplug.org/~monmotha/firewall/firewall/${MY_PVP[0]}.${MY_PVP[1]}/rc.firewall-${PV}"
+
+src_unpack() {
+ cp "${DISTDIR}"/${A} "${S}"/
+}
+
+src_install() {
+ newinitd "${FILESDIR}/monmotha.rc6" monmotha
+ exeinto /etc/monmotha
+ newexe "${S}/rc.firewall-${PV}" monmotha
+}
+
+pkg_postinst () {
+ einfo "Don't forget to add the 'monmotha' startup script to your default"
+ einfo "runlevel by typing the following command:"
+ einfo ""
+ einfo " rc-update add monmotha default"
+ einfo ""
+ einfo "You need to edit /etc/monmotha/monmotha before using"
+ einfo "it. Enter the right vars in the file, start the script"
+ einfo "by typing: '/etc/init.d/monmotha start' and it should work."
+ einfo ""
+ einfo "Don't forget to change the path to iptables!!!"
+ einfo ""
+ einfo "Note: If You are stopping the firewall, all iptables rulesets"
+ einfo "will be flushed!!!"
+ einfo ""
+}
diff --git a/net-misc/mosh/Manifest b/net-misc/mosh/Manifest
new file mode 100644
index 000000000000..b343b575cc89
--- /dev/null
+++ b/net-misc/mosh/Manifest
@@ -0,0 +1,2 @@
+DIST mosh-1.2.4.tar.gz 283047 SHA256 e74d0d323226046e402dd469a176075fc2013b69b0e67cea49762c957175df46 SHA512 f7505faffdc8da734179b37339b554f83cbf5450b251cd2aa50d63cd6e4cbefa0da17a1c1b2a61858735ac9e5cee5841ed20e81e244380f5f9a02af1b87199cc WHIRLPOOL b7fe6c87deb139faa4c6542b8de8bb8356e00889a8fc5a9a4d9609312f1654720eda0bdf9db97f48ccf6f15e6b4b2cd9c8d5105e84177a7ce0d3d36923a15e34
+DIST mosh-1.2.5.tar.gz 308857 SHA256 1af809e5d747c333a852fbf7acdbf4d354dc4bbc2839e3afe5cf798190074be3 SHA512 6a5a42e5ed3f265bc8bee045340a59f604ab8f08b041573264f5679c29678e84d101537aa2d856923eee8d0a0f9c052dc81cfbfa50ce12bd0eeddc5c8f1fc3ae WHIRLPOOL df91c18f4f68250fbb91d79b3072f594adb829f46d4228c965082883ee71401d80efef06ceb4662686eda3bdccb43cede365a1cef4c099efe9c41f775b4fdd8c
diff --git a/net-misc/mosh/files/mosh-1.2.5-git-version.patch b/net-misc/mosh/files/mosh-1.2.5-git-version.patch
new file mode 100644
index 000000000000..d97d98377b89
--- /dev/null
+++ b/net-misc/mosh/files/mosh-1.2.5-git-version.patch
@@ -0,0 +1,16 @@
+--- mosh-1.2.5/Makefile.am
++++ mosh-1.2.5/Makefile.am
+@@ -8,12 +8,7 @@
+
+ VERSION:
+ @echo @PACKAGE_STRING@ > VERSION.dist
+- @set -e; if git describe --dirty --always > VERSION.git 2>&1 && \
+- [ -z `git rev-parse --show-prefix` ]; then \
+- if ! diff -q VERSION.git VERSION > /dev/null 2>&1; then \
+- mv -f VERSION.git VERSION; \
+- fi; \
+- elif ! diff -q VERSION.dist VERSION > /dev/null 2>&1; then \
++ @set -e; if ! diff -q VERSION.dist VERSION > /dev/null 2>&1; then \
+ mv -f VERSION.dist VERSION; \
+ fi
+ @rm -f VERSION.dist VERSION.git
diff --git a/net-misc/mosh/metadata.xml b/net-misc/mosh/metadata.xml
new file mode 100644
index 000000000000..3cfe38c76178
--- /dev/null
+++ b/net-misc/mosh/metadata.xml
@@ -0,0 +1,31 @@
+<?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>
+<maintainer>
+ <email>monsieurp@gentoo.org</email>
+ <name>Patrice Clement</name>
+</maintainer>
+<use>
+ <flag name="client">Build network client</flag>
+ <flag name="examples">Include example scripts</flag>
+ <flag name="mosh-hardening">Enable compiler and linker options to frustrate memory corruption exploits</flag>
+ <flag name="server">Build network server</flag>
+ <flag name="ufw">Install net-firewall/ufw rule set</flag>
+ <flag name="utempter">Include libutempter support</flag>
+</use>
+<longdescription>
+Mosh is a remote terminal application that supports:
+ - intermittent network connectivity,
+ - roaming to different IP address without dropping the connection, and
+ - intelligent local echo and line editing to reduce the effects
+ of "network lag" on high-latency connections.
+</longdescription>
+<upstream>
+ <bugs-to>https://github.com/keithw/mosh/issues</bugs-to>
+</upstream>
+</pkgmetadata>
+
diff --git a/net-misc/mosh/mosh-1.2.4.ebuild b/net-misc/mosh/mosh-1.2.4.ebuild
new file mode 100644
index 000000000000..c8bfbe4ec918
--- /dev/null
+++ b/net-misc/mosh/mosh-1.2.4.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools bash-completion-r1 vcs-snapshot
+
+DESCRIPTION="Mobile shell that supports roaming and intelligent local echo"
+HOMEPAGE="http://mosh.mit.edu"
+SRC_URI="http://mosh.mit.edu/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~mips ppc x86 ~amd64-linux ~arm-linux ~x86-linux ~x64-macos"
+IUSE="+client examples +mosh-hardening +server ufw +utempter"
+REQUIRED_USE="|| ( client server )
+ examples? ( client )"
+
+RDEPEND="dev-libs/protobuf
+ sys-libs/ncurses:5
+ virtual/ssh
+ client? ( dev-lang/perl
+ dev-perl/IO-Tty )
+ utempter? ( sys-libs/libutempter )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-completion \
+ $(use_enable client) \
+ $(use_enable server) \
+ $(use_enable examples) \
+ $(use_enable ufw) \
+ $(use_enable mosh-hardening hardening) \
+ $(use_with utempter)
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_install() {
+ default
+
+ for myprog in $(find src/examples -type f -perm /0111) ; do
+ newbin ${myprog} ${PN}-$(basename ${myprog})
+ elog "${myprog} installed as ${PN}-$(basename ${myprog})"
+ done
+
+ # bug 477384
+ dobashcomp conf/bash_completion.d/mosh
+}
diff --git a/net-misc/mosh/mosh-1.2.5-r1.ebuild b/net-misc/mosh/mosh-1.2.5-r1.ebuild
new file mode 100644
index 000000000000..6c424c4fe9e6
--- /dev/null
+++ b/net-misc/mosh/mosh-1.2.5-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools bash-completion-r1 eutils vcs-snapshot
+
+DESCRIPTION="Mobile shell that supports roaming and intelligent local echo"
+HOMEPAGE="http://mosh.mit.edu"
+SRC_URI="http://mosh.mit.edu/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86 ~amd64-linux ~arm-linux ~x86-linux ~x64-macos"
+IUSE="+client examples +mosh-hardening +server ufw +utempter"
+
+REQUIRED_USE="|| ( client server )
+ examples? ( client )"
+
+RDEPEND="dev-libs/protobuf
+ sys-libs/ncurses:5
+ virtual/ssh
+ client? (
+ dev-lang/perl
+ dev-perl/IO-Tty
+ )
+ utempter? (
+ sys-libs/libutempter
+ )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+# [0] - avoid sandbox-violation calling git describe in Makefile
+PATCHES=(
+ "${FILESDIR}"/${P}-git-version.patch
+)
+
+src_prepare() {
+ # apply patches.
+ epatch ${PATCHES[@]}
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-completion \
+ $(use_enable client) \
+ $(use_enable server) \
+ $(use_enable examples) \
+ $(use_enable ufw) \
+ $(use_enable mosh-hardening hardening) \
+ $(use_with utempter)
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_install() {
+ default
+
+ for myprog in $(find src/examples -type f -perm /0111) ; do
+ newbin ${myprog} ${PN}-$(basename ${myprog})
+ elog "${myprog} installed as ${PN}-$(basename ${myprog})"
+ done
+
+ # bug 477384
+ dobashcomp conf/bash-completion/completions/mosh
+}
diff --git a/net-misc/mosh/mosh-1.2.5.ebuild b/net-misc/mosh/mosh-1.2.5.ebuild
new file mode 100644
index 000000000000..17448479c918
--- /dev/null
+++ b/net-misc/mosh/mosh-1.2.5.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools bash-completion-r1 eutils vcs-snapshot
+
+DESCRIPTION="Mobile shell that supports roaming and intelligent local echo"
+HOMEPAGE="http://mosh.mit.edu"
+SRC_URI="http://mosh.mit.edu/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86 ~amd64-linux ~arm-linux ~x86-linux ~x64-macos"
+IUSE="+client examples +mosh-hardening +server ufw +utempter"
+REQUIRED_USE="|| ( client server )
+ examples? ( client )"
+
+RDEPEND="dev-libs/protobuf
+ sys-libs/ncurses:5
+ virtual/ssh
+ client? ( dev-lang/perl
+ dev-perl/IO-Tty )
+ utempter? ( sys-libs/libutempter )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ # avoid sandbox-violation calling git describe in Makefile
+ epatch "${FILESDIR}"/${P}-git-version.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-completion \
+ $(use_enable client) \
+ $(use_enable server) \
+ $(use_enable examples) \
+ $(use_enable ufw) \
+ $(use_enable mosh-hardening hardening) \
+ $(use_with utempter)
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_install() {
+ default
+
+ for myprog in $(find src/examples -type f -perm /0111) ; do
+ newbin ${myprog} ${PN}-$(basename ${myprog})
+ elog "${myprog} installed as ${PN}-$(basename ${myprog})"
+ done
+
+ # bug 477384
+ dobashcomp conf/bash-completion/completions/mosh
+}
diff --git a/net-misc/mosh/mosh-9999.ebuild b/net-misc/mosh/mosh-9999.ebuild
new file mode 100644
index 000000000000..39b29814ad89
--- /dev/null
+++ b/net-misc/mosh/mosh-9999.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools bash-completion-r1 git-r3
+
+DESCRIPTION="Mobile shell that supports roaming and intelligent local echo"
+HOMEPAGE="http://mosh.mit.edu"
+EGIT_REPO_URI="https://github.com/keithw/mosh.git"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS=""
+IUSE="+client examples +mosh-hardening +server ufw +utempter"
+REQUIRED_USE="|| ( client server )
+ examples? ( client )"
+
+RDEPEND="dev-libs/protobuf
+ sys-libs/ncurses:5
+ virtual/ssh
+ client? ( dev-lang/perl
+ dev-perl/IO-Tty )
+ utempter? ( sys-libs/libutempter )"
+DEPEND="${RDEPEND}
+ dev-vcs/git[curl]
+ virtual/pkgconfig"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-completion \
+ $(use_enable client) \
+ $(use_enable server) \
+ $(use_enable examples) \
+ $(use_enable ufw) \
+ $(use_enable mosh-hardening hardening) \
+ $(use_with utempter)
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_install() {
+ default
+
+ for myprog in $(find src/examples -type f -perm /0111) ; do
+ newbin ${myprog} ${PN}-$(basename ${myprog})
+ elog "${myprog} installed as ${PN}-$(basename ${myprog})"
+ done
+
+ # bug 477384
+ dobashcomp conf/bash-completion/completions/mosh
+}
diff --git a/net-misc/mrouted/Manifest b/net-misc/mrouted/Manifest
new file mode 100644
index 000000000000..f5182d070a3b
--- /dev/null
+++ b/net-misc/mrouted/Manifest
@@ -0,0 +1 @@
+DIST mrouted-3.9.5.tar.bz2 112746 RMD160 85c92215c71744c7d1d3cd9211c0b560a5884cba SHA1 0c4055591beb96464befee80400017579eabed01 SHA256 10f0204f3a420033df7b5dfe4cac96dfba58649cbd813d7c6e2253367601b147
diff --git a/net-misc/mrouted/files/mrouted.rc b/net-misc/mrouted/files/mrouted.rc
new file mode 100644
index 000000000000..fa47acbd6eff
--- /dev/null
+++ b/net-misc/mrouted/files/mrouted.rc
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use logger
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /etc/mrouted.conf ] ; then
+ eerror "You need an /etc/mrouted.conf file to run mrouted"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting mrouted"
+ start-stop-daemon --start --quiet --pidfile /var/run/mrouted.pid \
+ --startas /usr/bin/mrouted -- -c /etc/mrouted.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping mrouted"
+ start-stop-daemon --stop --quiet --pidfile /var/run/mrouted.pid
+ eend $?
+}
diff --git a/net-misc/mrouted/metadata.xml b/net-misc/mrouted/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/net-misc/mrouted/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/mrouted/mrouted-3.9.5.ebuild b/net-misc/mrouted/mrouted-3.9.5.ebuild
new file mode 100644
index 000000000000..9b0dd9b4f073
--- /dev/null
+++ b/net-misc/mrouted/mrouted-3.9.5.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="IP multicast routing daemon"
+HOMEPAGE="http://troglobit.com/mrouted.shtml"
+SRC_URI="ftp://ftp.vmlinux.org/pub/People/jocke/${PN}/${P}.tar.bz2"
+LICENSE="Stanford GPL-2"
+
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND="|| ( dev-util/yacc sys-devel/bison )"
+RDEPEND=""
+
+src_prepare() {
+ # Respect user CFLAGS, remove upstream optimisation and -Werror
+ sed -i Makefile \
+ -e '/^CFLAGS/{s|[[:space:]]=| +=|g;s|-O2||g;s|-Werror||g}' \
+ || die
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) || die
+}
+
+src_install() {
+ dobin mrouted || die
+ dosbin mtrace mrinfo map-mbone || die
+ doman mrouted.8 mtrace.8 mrinfo.8 map-mbone.8 || die
+
+ insinto /etc
+ doins mrouted.conf || die
+ newinitd "${FILESDIR}"/mrouted.rc mrouted || die
+}
diff --git a/net-misc/mulk/Manifest b/net-misc/mulk/Manifest
new file mode 100644
index 000000000000..f52209a6a6bc
--- /dev/null
+++ b/net-misc/mulk/Manifest
@@ -0,0 +1,2 @@
+DIST mulk-0.6.0.tar.gz 459141 SHA256 c2afee9c510cf9e56a92d911879f0c7f55fca1f9e5fe9615a39e5a71fca64312 SHA512 9e42add34305b071ac5132c645be75d3666e2a47b6b3a7c7eb46b1fbc130db85bccdd31dd54586b20c4d3629f000219c630511d6f2a59d241d60afce2cfeee37 WHIRLPOOL 50917be333c770c839dfc85a08a91f16eefb57bfa99ae3e951c0541d13c55df6b238d7b433c5ff26ef6c473f5c39762d8481548b53367fdff0d960ce9d4413ce
+DIST mulk-0.7.0.tar.gz 487995 SHA256 aca61867fc0b93ebcd8a564c57394b97dabed2f9973835933f88c137defcdd1e SHA512 e1c6cf14b0ee2e42d83c8ad33d011feec9eb192ea4f8495cc67926db934d7ac132dfea66e40c47844965321573bd5b0734e4b19fe34c97c38170ee0cf4643499 WHIRLPOOL a31975155e20470dfc670e64cc552f1456d4f6a75bc3986d76c8e5d1f1fd6f06fccea42d9d57bff809b7b226dfc752d743265d925e02d58e2bb2c9da1b0d6ff5
diff --git a/net-misc/mulk/files/mulk-0.6.0-large-file.patch b/net-misc/mulk/files/mulk-0.6.0-large-file.patch
new file mode 100644
index 000000000000..801433080e46
--- /dev/null
+++ b/net-misc/mulk/files/mulk-0.6.0-large-file.patch
@@ -0,0 +1,32 @@
+Index: mulk-0.6.0/lib/defines.h
+===================================================================
+--- mulk-0.6.0.orig/lib/defines.h
++++ mulk-0.6.0/lib/defines.h
+@@ -41,6 +41,12 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <time.h>
++#ifdef HAVE_STDINT_H
++ #include <stdint.h>
++#endif
++#ifdef HAVE_INTTYPES_H
++ #include <inttypes.h>
++#endif
+ #include <curl/curl.h>
+ #include <curl/multi.h>
+ #include <uriparser/Uri.h>
+Index: mulk-0.6.0/lib/m_malloc.c
+===================================================================
+--- mulk-0.6.0.orig/lib/m_malloc.c
++++ mulk-0.6.0/lib/m_malloc.c
+@@ -34,10 +34,6 @@
+
+ #ifdef MULKDEBUG
+
+-#ifdef HAVE_STDINT_H
+-#include <stdint.h> /* for uint32_t */
+-#endif
+-
+ #define HASH_TABLE_SIZE 131072 /* 2^17, use always power of 2 */
+ #define HASH_CHUNK_SIZE 2048
+ #define INC_INDEX(i) i = ((i == HASH_TABLE_SIZE-1) ? 0 : i+1)
diff --git a/net-misc/mulk/metadata.xml b/net-misc/mulk/metadata.xml
new file mode 100644
index 000000000000..e6a7a27838a9
--- /dev/null
+++ b/net-misc/mulk/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>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <use>
+ <flag name="checksum">Enable checksum verification for Metalink from <pkg>dev-libs/openssl</pkg></flag>
+ <flag name="metalink">Enable support for <pkg>media-libs/libmetalink</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">mulk</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/mulk/mulk-0.6.0.ebuild b/net-misc/mulk/mulk-0.6.0.ebuild
new file mode 100644
index 000000000000..545c6088e812
--- /dev/null
+++ b/net-misc/mulk/mulk-0.6.0.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit base
+
+MY_PV=${PV/_beta/}
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Download agent similar to wget/curl"
+HOMEPAGE="http://mulk.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="checksum debug metalink"
+
+DEPEND="net-misc/curl
+ app-text/htmltidy
+ dev-libs/uriparser
+ metalink? (
+ media-libs/libmetalink
+ checksum? ( dev-libs/openssl )
+ )"
+
+REQUIRE_USE="checksum? ( metalink )"
+
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-large-file.patch
+)
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable metalink) \
+ $(use metalink && use checksum && echo --enable-checksum)
+}
diff --git a/net-misc/mulk/mulk-0.7.0.ebuild b/net-misc/mulk/mulk-0.7.0.ebuild
new file mode 100644
index 000000000000..ba5d01d4c697
--- /dev/null
+++ b/net-misc/mulk/mulk-0.7.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit base
+
+MY_PV=${PV/_beta/}
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Download agent similar to wget/curl"
+HOMEPAGE="http://mulk.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="checksum debug metalink"
+
+DEPEND="net-misc/curl
+ app-text/htmltidy
+ dev-libs/uriparser
+ metalink? (
+ media-libs/libmetalink
+ checksum? ( dev-libs/openssl )
+ )"
+
+REQUIRE_USE="checksum? ( metalink )"
+
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable metalink) \
+ $(use metalink && use checksum && echo --enable-checksum)
+}
diff --git a/net-misc/nat-traverse/Manifest b/net-misc/nat-traverse/Manifest
new file mode 100644
index 000000000000..bcb45a66d1ef
--- /dev/null
+++ b/net-misc/nat-traverse/Manifest
@@ -0,0 +1 @@
+DIST nat-traverse-0.6.tar.bz2 17230 SHA256 71a7421512975c72e94859c44a54b75405ae6fc8b89c9517b2ed0dd7512f6bb9 SHA512 4ee940b1bdef9ea061d983e0df780378d1dfde16e770ac7af8c11c8746f867f5e4cc80280decfa478062defcf3f9f1f5023e212cd2f9c36e67758be68da254fc WHIRLPOOL 8bddc823f09ae1cc76e1874bdaad18b7142653241090da8d5aba757bb0444095cd76ad923ffa706c92a1169a8db297b6d03c4be0031cbb79abeaaae4138f9482
diff --git a/net-misc/nat-traverse/metadata.xml b/net-misc/nat-traverse/metadata.xml
new file mode 100644
index 000000000000..1e7587374fdf
--- /dev/null
+++ b/net-misc/nat-traverse/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-misc/nat-traverse/nat-traverse-0.6.ebuild b/net-misc/nat-traverse/nat-traverse-0.6.ebuild
new file mode 100644
index 000000000000..da5015d5431b
--- /dev/null
+++ b/net-misc/nat-traverse/nat-traverse-0.6.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Traverse NAT gateways with the Use of UDP"
+HOMEPAGE="http://linide.sourceforge.net/nat-traverse/"
+SRC_URI="http://linide.sourceforge.net/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~mips ~ppc ~ppc64 x86"
+IUSE=""
+
+RDEPEND=">=dev-lang/perl-5.6.1"
+
+src_install() {
+ doman nat-traverse.1
+ dobin nat-traverse
+
+ dodoc ChangeLog README
+}
diff --git a/net-misc/ncp/Manifest b/net-misc/ncp/Manifest
new file mode 100644
index 000000000000..181c0f73c4cd
--- /dev/null
+++ b/net-misc/ncp/Manifest
@@ -0,0 +1 @@
+DIST ncp-1.2.4.tar.bz2 6172 SHA256 6cfa72edd5f7717bf7a4a93ccc74c4abd89892360e2e0bb095a73c24b9359b88
diff --git a/net-misc/ncp/metadata.xml b/net-misc/ncp/metadata.xml
new file mode 100644
index 000000000000..a91e4fc24559
--- /dev/null
+++ b/net-misc/ncp/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>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+<longdescription lang="en">
+"ncp" is a utility for copying files in a LAN. It has absolutely no security or integrity checking, no throttling, no features, except one: you don't have to type the coordinates of your peer.
+</longdescription>
+<use><flag name="diet">Compile against <pkg>dev-libs/dietlibc</pkg></flag></use>
+</pkgmetadata>
+
diff --git a/net-misc/ncp/ncp-1.2.4.ebuild b/net-misc/ncp/ncp-1.2.4.ebuild
new file mode 100644
index 000000000000..8d23474661c1
--- /dev/null
+++ b/net-misc/ncp/ncp-1.2.4.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="utility for copying files in a LAN (npoll, npush)"
+HOMEPAGE="http://www.fefe.de/ncp/"
+SRC_URI="http://dl.fefe.de/${P}.tar.bz2"
+
+LICENSE="public-domain" # mail from author, bug 446540
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="diet"
+
+RDEPEND=""
+DEPEND=">=dev-libs/libowfat-0.28-r1
+ diet? ( dev-libs/dietlibc )"
+
+src_prepare() {
+ rm Makefile || die
+ sed -e '/^ncp:/,+5s:strip:#strip:' \
+ -i GNUmakefile || die
+}
+
+src_compile() {
+ emake \
+ CC="$(use diet && echo "diet -Os ")$(tc-getCC)" \
+ CFLAGS="${CFLAGS} -I/usr/include/libowfat" \
+ LDFLAGS="${LDFLAGS}" \
+ STRIP="#"
+}
+
+src_install() {
+ dobin ${PN}
+ dosym ${PN} /usr/bin/npoll
+ dosym ${PN} /usr/bin/npush
+
+ doman ncp.1 npush.1
+ dodoc NEWS
+}
diff --git a/net-misc/ndisc6/Manifest b/net-misc/ndisc6/Manifest
new file mode 100644
index 000000000000..e6c8acd29b50
--- /dev/null
+++ b/net-misc/ndisc6/Manifest
@@ -0,0 +1,2 @@
+DIST ndisc6-0.9.9.tar.bz2 233493 RMD160 19f9f9dbd5f072a57ccffe8acad2f3fb8a06eb87 SHA1 9abca715b07b5aab6aa95335aad1bffa4edc6916 SHA256 fbc5909f9509082bf235c040071b3c2ff9f58af48b4e39c4c6bf706690c9cc44
+DIST ndisc6-1.0.2.tar.bz2 239249 RMD160 b88675ad9e0fd4a497d36be356f968799721d529 SHA1 4cb64703cb5056d5457dc96854e6f3d1d4402512 SHA256 6acec8a0cb9efa3ac98456f46c3016aeec0598b0c7557c95242b5228ad62ca7a
diff --git a/net-misc/ndisc6/files/rdnssd.conf b/net-misc/ndisc6/files/rdnssd.conf
new file mode 100644
index 000000000000..c5bad72b0d96
--- /dev/null
+++ b/net-misc/ndisc6/files/rdnssd.conf
@@ -0,0 +1,2 @@
+# Options to pass to the rdnssd process
+RDNSSD_OPTS="-H /etc/rdnssd/resolvconf"
diff --git a/net-misc/ndisc6/files/rdnssd.rc b/net-misc/ndisc6/files/rdnssd.rc
new file mode 100644
index 000000000000..5c5c1154dd0a
--- /dev/null
+++ b/net-misc/ndisc6/files/rdnssd.rc
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need localmount
+ before net
+ use logger
+}
+
+start() {
+ ebegin "Starting rdnssd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/rdnssd -- ${RDNSSD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping rdnssd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/rdnssd.pid
+ if [ -x /sbin/resolvconf ]; then
+ /sbin/resolvconf -f -d rdnssd || true
+ fi
+ eend $?
+}
diff --git a/net-misc/ndisc6/files/rdnssd.rc-1 b/net-misc/ndisc6/files/rdnssd.rc-1
new file mode 100644
index 000000000000..4d79f6a578e9
--- /dev/null
+++ b/net-misc/ndisc6/files/rdnssd.rc-1
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need localmount
+ before net
+ use logger
+}
+
+start() {
+ ebegin "Starting rdnssd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/rdnssd -- ${RDNSSD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping rdnssd"
+ start-stop-daemon --stop --quiet --pidfile /var/lib/run/rdnssd.pid
+ if [ -x /sbin/resolvconf ]; then
+ /sbin/resolvconf -f -d rdnssd || true
+ fi
+ eend $?
+}
diff --git a/net-misc/ndisc6/files/resolvconf b/net-misc/ndisc6/files/resolvconf
new file mode 100644
index 000000000000..335c6c2707df
--- /dev/null
+++ b/net-misc/ndisc6/files/resolvconf
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if [ -x /sbin/resolvconf ]; then
+ exec /sbin/resolvconf -a rdnssd </var/run/rdnssd/resolv.conf
+else
+ exec "`dirname "$0"`"/merge-hook
+fi
diff --git a/net-misc/ndisc6/files/resolvconf-1 b/net-misc/ndisc6/files/resolvconf-1
new file mode 100644
index 000000000000..c08aa6a3df19
--- /dev/null
+++ b/net-misc/ndisc6/files/resolvconf-1
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if [ -x /sbin/resolvconf ]; then
+ exec /sbin/resolvconf -a rdnssd </var/lib/run/rdnssd/resolv.conf
+else
+ exec "`dirname "$0"`"/merge-hook
+fi
diff --git a/net-misc/ndisc6/metadata.xml b/net-misc/ndisc6/metadata.xml
new file mode 100644
index 000000000000..59acc2cc580e
--- /dev/null
+++ b/net-misc/ndisc6/metadata.xml
@@ -0,0 +1,9 @@
+<?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>
+</pkgmetadata>
+
diff --git a/net-misc/ndisc6/ndisc6-0.9.9-r2.ebuild b/net-misc/ndisc6/ndisc6-0.9.9-r2.ebuild
new file mode 100644
index 000000000000..75a195475bef
--- /dev/null
+++ b/net-misc/ndisc6/ndisc6-0.9.9-r2.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Recursive DNS Servers discovery Daemon (rdnssd) for IPv6"
+HOMEPAGE="http://www.remlab.net/ndisc6/"
+SRC_URI="http://www.remlab.net/files/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND="dev-lang/perl
+ sys-devel/gettext"
+RDEPEND=""
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ newinitd "${FILESDIR}"/rdnssd.rc-1 rdnssd || die
+ newconfd "${FILESDIR}"/rdnssd.conf rdnssd || die
+ exeinto /etc/rdnssd
+ newexe "${FILESDIR}"/resolvconf-1 resolvconf || die
+ dodoc AUTHORS ChangeLog NEWS README || die
+}
diff --git a/net-misc/ndisc6/ndisc6-0.9.9.ebuild b/net-misc/ndisc6/ndisc6-0.9.9.ebuild
new file mode 100644
index 000000000000..cb3a67f00eed
--- /dev/null
+++ b/net-misc/ndisc6/ndisc6-0.9.9.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Recursive DNS Servers discovery Daemon (rdnssd) for IPv6"
+HOMEPAGE="http://www.remlab.net/ndisc6/"
+SRC_URI="http://www.remlab.net/files/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE=""
+
+DEPEND="dev-lang/perl
+ sys-devel/gettext"
+RDEPEND=""
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ newinitd "${FILESDIR}"/rdnssd.rc rdnssd || die
+ newconfd "${FILESDIR}"/rdnssd.conf rdnssd || die
+ exeinto /etc/rdnssd
+ doexe "${FILESDIR}"/resolvconf || die
+ dodoc AUTHORS ChangeLog NEWS README || die
+}
diff --git a/net-misc/ndisc6/ndisc6-1.0.2.ebuild b/net-misc/ndisc6/ndisc6-1.0.2.ebuild
new file mode 100644
index 000000000000..4c3afaea98f4
--- /dev/null
+++ b/net-misc/ndisc6/ndisc6-1.0.2.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Recursive DNS Servers discovery Daemon (rdnssd) for IPv6"
+HOMEPAGE="http://www.remlab.net/ndisc6/"
+SRC_URI="http://www.remlab.net/files/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND="dev-lang/perl
+ sys-devel/gettext"
+RDEPEND=""
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ newinitd "${FILESDIR}"/rdnssd.rc-1 rdnssd || die
+ newconfd "${FILESDIR}"/rdnssd.conf rdnssd || die
+ exeinto /etc/rdnssd
+ newexe "${FILESDIR}"/resolvconf-1 resolvconf || die
+ dodoc AUTHORS ChangeLog NEWS README || die
+}
diff --git a/net-misc/ndppd/Manifest b/net-misc/ndppd/Manifest
new file mode 100644
index 000000000000..f44c7ea3c57a
--- /dev/null
+++ b/net-misc/ndppd/Manifest
@@ -0,0 +1 @@
+DIST ndppd-0.2.3.tar.gz 31459 SHA256 047764681c0b6409f9ac011359f83140639d6f62697df2c9f4f2180985017f9c SHA512 3e9a1b84c2aea81c863d384514b528e1944f592ee057a42553d53804899c880519354f8a5049102a7753b30a99fe69dfbd16ef5686c890345160ffb22f3adca0 WHIRLPOOL dc5332dd84b03701b3050e818694de5f017594b2f7e2a0231b6fac437a7f14d74a1388cdbfca9549c2e4eb10894909d9525fd0dc84b4b52528878fe367c540c2
diff --git a/net-misc/ndppd/files/ndppd.initd b/net-misc/ndppd/files/ndppd.initd
new file mode 100644
index 000000000000..67d6de86f9c0
--- /dev/null
+++ b/net-misc/ndppd/files/ndppd.initd
@@ -0,0 +1,14 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+command="/usr/sbin/ndppd"
+pidfile="/var/run/ndppd.pid"
+command_args="-p $pidfile -d"
+start_stop_daemon_args="--quiet"
+description="Proxies NDP messages between interfaces."
+
+depend() {
+ use net
+}
diff --git a/net-misc/ndppd/metadata.xml b/net-misc/ndppd/metadata.xml
new file mode 100644
index 000000000000..70b099927c12
--- /dev/null
+++ b/net-misc/ndppd/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>zx2c4@gentoo.org</email>
+ <name>Jason A. Donenfeld</name>
+ </maintainer>
+ <longdescription>
+ ndppd, or NDP Proxy Daemon, is a daemon that proxies NDP (Neighbor Discovery Protocol) messages between interfaces.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/ndppd/ndppd-0.2.3.ebuild b/net-misc/ndppd/ndppd-0.2.3.ebuild
new file mode 100644
index 000000000000..a26fdf95061e
--- /dev/null
+++ b/net-misc/ndppd/ndppd-0.2.3.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Proxies NDP messages between interfaces"
+HOMEPAGE="http://priv.nu/projects/ndppd/"
+SRC_URI="http://priv.nu/projects/ndppd/files/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_install()
+{
+ emake PREFIX=/usr DESTDIR="${D}" install
+ insinto /etc
+ newins ndppd.conf-dist ndppd.conf
+ newinitd "${FILESDIR}"/ndppd.initd ndppd
+}
diff --git a/net-misc/nemesis/Manifest b/net-misc/nemesis/Manifest
new file mode 100644
index 000000000000..958f1ebe00c8
--- /dev/null
+++ b/net-misc/nemesis/Manifest
@@ -0,0 +1 @@
+DIST nemesis-1.4.tar.gz 144187 SHA256 803f5cf5c7c4af15128b8cd7f7610730cbed1427f062a31c2f5255790fb1bab4 SHA512 a8d4b434a9b0287e704ab923900c43051dc3aac4a7063e702aa93d7c89cfdeac287a6f40138bdca140e2c889e024f885288c4953940104ac12631cf7394501c8 WHIRLPOOL 9aff914eceed0a8db1c662f88ea2565d7bd56ad25d92cf15b6ee97e5567d6a535bbed72274fcdfea76171b2e3ba79388b2bfbba210f03ee6a1b8c43a701c4083
diff --git a/net-misc/nemesis/files/1.4-libnet-1.0.patch b/net-misc/nemesis/files/1.4-libnet-1.0.patch
new file mode 100644
index 000000000000..b4c55c374efa
--- /dev/null
+++ b/net-misc/nemesis/files/1.4-libnet-1.0.patch
@@ -0,0 +1,127 @@
+--- nemesis-1.4.orig/configure 2006-12-15 13:56:46.000000000 -0700
++++ nemesis-1.4/configure 2006-12-15 14:17:33.000000000 -0700
+@@ -4150 +4150 @@
+-CPPFLAGS="${CPPFLAGS} `libnet-config --defines`"
++CPPFLAGS="${CPPFLAGS} `libnet-1.0-config --defines`"
+@@ -4153 +4153 @@
+-if test `libnet-config --cflags | wc -c` = "1"; then
++if test `libnet-1.0-config --cflags | wc -c` = "1"; then
+@@ -4157 +4157 @@
+- CPPFLAGS="${CPPFLAGS} `libnet-config --cflags`"
++ CPPFLAGS="${CPPFLAGS} `libnet-1.0-config --cflags`"
+@@ -4160,3 +4160,3 @@
+-if test `libnet-config --libs | wc -c` = "1"; then
+- { echo "$as_me:$LINENO: WARNING: libnet-config --libs is broken on your system. If you" >&5
+-echo "$as_me: WARNING: libnet-config --libs is broken on your system. If you" >&2;}
++if test `libnet-1.0-config --libs | wc -c` = "1"; then
++ { echo "$as_me:$LINENO: WARNING: libnet-1.0-config --libs is broken on your system. If you" >&5
++echo "$as_me: WARNING: libnet-1.0-config --libs is broken on your system. If you" >&2;}
+@@ -4167 +4167 @@
+- LIBS="${LIBS} `libnet-config --libs | sed s/\-lnet//`"
++ LIBS="${LIBS} `libnet-1.0-config --libs | sed s/\-lnet-1.0//`"
+@@ -4712,2 +4712,2 @@
+-echo "$as_me:$LINENO: checking for libnet_build_ip in -lnet" >&5
+-echo $ECHO_N "checking for libnet_build_ip in -lnet... $ECHO_C" >&6
++echo "$as_me:$LINENO: checking for libnet_build_ip in -lnet-1.0" >&5
++echo $ECHO_N "checking for libnet_build_ip in -lnet-1.0... $ECHO_C" >&6
+@@ -4718 +4718 @@
+-LIBS="-lnet $LIBS"
++LIBS="-lnet-1.0 $LIBS"
+@@ -4781 +4781 @@
+- LIBS="-lnet $LIBS"
++ LIBS="-lnet-1.0 $LIBS"
+@@ -5263 +5263 @@
+-for ac_header in libnet.h
++for ac_header in libnet-1.0.h
+@@ -5433 +5433 @@
+- libnet_dir=`libnet-config --cflags | cut -dI -f2`
++ libnet_dir=`libnet-1.0-config --cflags | cut -dI -f2`
+@@ -5438 +5438 @@
+- if test -r $i/libnet.h; then
++ if test -r $i/libnet-1.0.h; then
+@@ -5444 +5444 @@
+- if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet.h | grep -v 1.0.2a >/dev/null"; then
++ if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet-1.0.h | grep -v 1.0.2a >/dev/null"; then
+@@ -5455 +5455 @@
+- echo " ERROR: unable to find" "libnet 1.0.2a (libnet.h)"
++ echo " ERROR: unable to find" "libnet 1.0.2a (libnet-1.0.h)"
+@@ -5474 +5474 @@
+- echo " ERROR: unable to find" "libnet 1.0.2a (libnet.h)"
++ echo " ERROR: unable to find" "libnet 1.0.2a (libnet-1.0.h)"
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-arp.h nemesis-1.4beta3/src/nemesis-arp.h
+--- nemesis-1.4beta3.orig/src/nemesis-arp.h 2003-08-19 15:45:45.675664688 -0400
++++ nemesis-1.4beta3/src/nemesis-arp.h 2003-08-19 15:47:07.631205552 -0400
+@@ -30 +30 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-dns.h nemesis-1.4beta3/src/nemesis-dns.h
+--- nemesis-1.4beta3.orig/src/nemesis-dns.h 2003-08-19 15:45:45.675664688 -0400
++++ nemesis-1.4beta3/src/nemesis-dns.h 2003-08-19 15:47:07.638204488 -0400
+@@ -30 +30 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-ethernet.h nemesis-1.4beta3/src/nemesis-ethernet.h
+--- nemesis-1.4beta3.orig/src/nemesis-ethernet.h 2003-08-19 15:45:45.676664536 -0400
++++ nemesis-1.4beta3/src/nemesis-ethernet.h 2003-08-19 15:47:07.641204032 -0400
+@@ -29 +29 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-functions.c nemesis-1.4beta3/src/nemesis-functions.c
+--- nemesis-1.4beta3.orig/src/nemesis-functions.c 2003-08-19 15:45:45.676664536 -0400
++++ nemesis-1.4beta3/src/nemesis-functions.c 2003-08-19 15:47:07.656201752 -0400
+@@ -37 +37 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-icmp.h nemesis-1.4beta3/src/nemesis-icmp.h
+--- nemesis-1.4beta3.orig/src/nemesis-icmp.h 2003-08-19 15:45:45.676664536 -0400
++++ nemesis-1.4beta3/src/nemesis-icmp.h 2003-08-19 15:47:07.665200384 -0400
+@@ -31 +31 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-igmp.h nemesis-1.4beta3/src/nemesis-igmp.h
+--- nemesis-1.4beta3.orig/src/nemesis-igmp.h 2003-08-19 15:45:45.676664536 -0400
++++ nemesis-1.4beta3/src/nemesis-igmp.h 2003-08-19 15:47:07.670199624 -0400
+@@ -30 +30 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-ip.h nemesis-1.4beta3/src/nemesis-ip.h
+--- nemesis-1.4beta3.orig/src/nemesis-ip.h 2003-08-19 15:45:45.676664536 -0400
++++ nemesis-1.4beta3/src/nemesis-ip.h 2003-08-19 15:47:07.677198560 -0400
+@@ -26 +26 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-ospf.h nemesis-1.4beta3/src/nemesis-ospf.h
+--- nemesis-1.4beta3.orig/src/nemesis-ospf.h 2003-08-19 15:45:45.677664384 -0400
++++ nemesis-1.4beta3/src/nemesis-ospf.h 2003-08-19 15:47:07.684197496 -0400
+@@ -33 +33 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-rip.h nemesis-1.4beta3/src/nemesis-rip.h
+--- nemesis-1.4beta3.orig/src/nemesis-rip.h 2003-08-19 15:45:45.678664232 -0400
++++ nemesis-1.4beta3/src/nemesis-rip.h 2003-08-19 15:47:07.717192480 -0400
+@@ -33 +33 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-tcp.h nemesis-1.4beta3/src/nemesis-tcp.h
+--- nemesis-1.4beta3.orig/src/nemesis-tcp.h 2003-08-19 15:45:45.678664232 -0400
++++ nemesis-1.4beta3/src/nemesis-tcp.h 2003-08-19 15:47:07.723191568 -0400
+@@ -30 +30 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-udp.h nemesis-1.4beta3/src/nemesis-udp.h
+--- nemesis-1.4beta3.orig/src/nemesis-udp.h 2003-08-19 15:45:45.678664232 -0400
++++ nemesis-1.4beta3/src/nemesis-udp.h 2003-08-19 15:47:07.728190808 -0400
+@@ -30 +30 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis.h nemesis-1.4beta3/src/nemesis.h
+--- nemesis-1.4beta3.orig/src/nemesis.h 2003-08-19 15:45:45.678664232 -0400
++++ nemesis-1.4beta3/src/nemesis.h 2003-08-19 15:47:07.731190352 -0400
+@@ -15 +15 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+--- nemesis-1.4.orig/src/nemesis-printout.c 2006-12-15 13:56:46.000000000 -0700
++++ nemesis-1.4/src/nemesis-printout.c 2006-12-15 14:47:14.000000000 -0700
+@@ -34 +34 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
diff --git a/net-misc/nemesis/files/1.4_beta3-libnet-1.0.patch b/net-misc/nemesis/files/1.4_beta3-libnet-1.0.patch
new file mode 100644
index 000000000000..693ce6b5f1f0
--- /dev/null
+++ b/net-misc/nemesis/files/1.4_beta3-libnet-1.0.patch
@@ -0,0 +1,123 @@
+diff -r -U 0 nemesis-1.4beta3.orig/configure nemesis-1.4beta3/configure
+--- nemesis-1.4beta3.orig/configure 2003-08-19 15:45:45.674664840 -0400
++++ nemesis-1.4beta3/configure 2003-08-19 15:47:50.916625168 -0400
+@@ -2704 +2704 @@
+-CPPFLAGS="${CPPFLAGS} `libnet-config --defines`"
++CPPFLAGS="${CPPFLAGS} `libnet-1.0-config --defines`"
+@@ -2707 +2707 @@
+-if test `libnet-config --cflags | wc -c` = "1"; then
++if test `libnet-1.0-config --cflags | wc -c` = "1"; then
+@@ -2711 +2711 @@
+- CPPFLAGS="${CPPFLAGS} `libnet-config --cflags`"
++ CPPFLAGS="${CPPFLAGS} `libnet-1.0-config --cflags`"
+@@ -2714,3 +2714,3 @@
+-if test `libnet-config --libs | wc -c` = "1"; then
+- { echo "$as_me:2715: WARNING: libnet-config --libs is broken on your system. If you" >&5
+-echo "$as_me: WARNING: libnet-config --libs is broken on your system. If you" >&2;}
++if test `libnet-1.0-config --libs | wc -c` = "1"; then
++ { echo "$as_me:2715: WARNING: libnet-1.0-config --libs is broken on your system. If you" >&5
++echo "$as_me: WARNING: libnet-1.0-config --libs is broken on your system. If you" >&2;}
+@@ -2721 +2721 @@
+- LIBS="${LIBS} `libnet-config --libs | sed s/\-lnet//`"
++ LIBS="${LIBS} `libnet-1.0-config --libs | sed s/\-lnet-1.0//`"
+@@ -3553 +3553 @@
+-for ac_header in libnet.h
++for ac_header in libnet-1.0.h
+@@ -3621 +3621 @@
+- libnet_dir=`libnet-config --cflags | cut -dI -f2`
++ libnet_dir=`libnet-1.0-config --cflags | cut -dI -f2`
+@@ -3626 +3626 @@
+- if test -r $i/libnet.h; then
++ if test -r $i/libnet-1.0.h; then
+@@ -3632 +3632 @@
+- if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet.h | grep -v 1.0.2a >/dev/null"; then
++ if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet-1.0.h | grep -v 1.0.2a >/dev/null"; then
+@@ -3643 +3643 @@
+- echo " ERROR: unable to find" "libnet 1.0.2a (libnet.h)"
++ echo " ERROR: unable to find" "libnet 1.0.2a (libnet-1.0.h)"
+@@ -3662 +3662 @@
+- echo " ERROR: unable to find" "libnet 1.0.2a (libnet.h)"
++ echo " ERROR: unable to find" "libnet 1.0.2a (libnet-1.0.h)"
+@@ -3699,2 +3699,2 @@
+-echo "$as_me:3699: checking for libnet_build_ip in -lnet" >&5
+-echo $ECHO_N "checking for libnet_build_ip in -lnet... $ECHO_C" >&6
++echo "$as_me:3699: checking for libnet_build_ip in -lnet-1.0" >&5
++echo $ECHO_N "checking for libnet_build_ip in -lnet-1.0... $ECHO_C" >&6
+@@ -3705 +3705 @@
+-LIBS="-lnet $LIBS"
++LIBS="-lnet-1.0 $LIBS"
+@@ -3753 +3753 @@
+- LIBS="-lnet $LIBS"
++ LIBS="-lnet-1.0 $LIBS"
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-arp.h nemesis-1.4beta3/src/nemesis-arp.h
+--- nemesis-1.4beta3.orig/src/nemesis-arp.h 2003-08-19 15:45:45.675664688 -0400
++++ nemesis-1.4beta3/src/nemesis-arp.h 2003-08-19 15:47:07.631205552 -0400
+@@ -30 +30 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-dns.h nemesis-1.4beta3/src/nemesis-dns.h
+--- nemesis-1.4beta3.orig/src/nemesis-dns.h 2003-08-19 15:45:45.675664688 -0400
++++ nemesis-1.4beta3/src/nemesis-dns.h 2003-08-19 15:47:07.638204488 -0400
+@@ -30 +30 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-ethernet.h nemesis-1.4beta3/src/nemesis-ethernet.h
+--- nemesis-1.4beta3.orig/src/nemesis-ethernet.h 2003-08-19 15:45:45.676664536 -0400
++++ nemesis-1.4beta3/src/nemesis-ethernet.h 2003-08-19 15:47:07.641204032 -0400
+@@ -29 +29 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-functions.c nemesis-1.4beta3/src/nemesis-functions.c
+--- nemesis-1.4beta3.orig/src/nemesis-functions.c 2003-08-19 15:45:45.676664536 -0400
++++ nemesis-1.4beta3/src/nemesis-functions.c 2003-08-19 15:47:07.656201752 -0400
+@@ -37 +37 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-icmp.h nemesis-1.4beta3/src/nemesis-icmp.h
+--- nemesis-1.4beta3.orig/src/nemesis-icmp.h 2003-08-19 15:45:45.676664536 -0400
++++ nemesis-1.4beta3/src/nemesis-icmp.h 2003-08-19 15:47:07.665200384 -0400
+@@ -31 +31 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-igmp.h nemesis-1.4beta3/src/nemesis-igmp.h
+--- nemesis-1.4beta3.orig/src/nemesis-igmp.h 2003-08-19 15:45:45.676664536 -0400
++++ nemesis-1.4beta3/src/nemesis-igmp.h 2003-08-19 15:47:07.670199624 -0400
+@@ -30 +30 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-ip.h nemesis-1.4beta3/src/nemesis-ip.h
+--- nemesis-1.4beta3.orig/src/nemesis-ip.h 2003-08-19 15:45:45.676664536 -0400
++++ nemesis-1.4beta3/src/nemesis-ip.h 2003-08-19 15:47:07.677198560 -0400
+@@ -26 +26 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-ospf.h nemesis-1.4beta3/src/nemesis-ospf.h
+--- nemesis-1.4beta3.orig/src/nemesis-ospf.h 2003-08-19 15:45:45.677664384 -0400
++++ nemesis-1.4beta3/src/nemesis-ospf.h 2003-08-19 15:47:07.684197496 -0400
+@@ -33 +33 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-rip.h nemesis-1.4beta3/src/nemesis-rip.h
+--- nemesis-1.4beta3.orig/src/nemesis-rip.h 2003-08-19 15:45:45.678664232 -0400
++++ nemesis-1.4beta3/src/nemesis-rip.h 2003-08-19 15:47:07.717192480 -0400
+@@ -33 +33 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-tcp.h nemesis-1.4beta3/src/nemesis-tcp.h
+--- nemesis-1.4beta3.orig/src/nemesis-tcp.h 2003-08-19 15:45:45.678664232 -0400
++++ nemesis-1.4beta3/src/nemesis-tcp.h 2003-08-19 15:47:07.723191568 -0400
+@@ -30 +30 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-udp.h nemesis-1.4beta3/src/nemesis-udp.h
+--- nemesis-1.4beta3.orig/src/nemesis-udp.h 2003-08-19 15:45:45.678664232 -0400
++++ nemesis-1.4beta3/src/nemesis-udp.h 2003-08-19 15:47:07.728190808 -0400
+@@ -30 +30 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis.h nemesis-1.4beta3/src/nemesis.h
+--- nemesis-1.4beta3.orig/src/nemesis.h 2003-08-19 15:45:45.678664232 -0400
++++ nemesis-1.4beta3/src/nemesis.h 2003-08-19 15:47:07.731190352 -0400
+@@ -15 +15 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
diff --git a/net-misc/nemesis/files/nemesis-1.4-fileio.patch b/net-misc/nemesis/files/nemesis-1.4-fileio.patch
new file mode 100644
index 000000000000..07c96bc17a74
--- /dev/null
+++ b/net-misc/nemesis/files/nemesis-1.4-fileio.patch
@@ -0,0 +1,37 @@
+--- nemesis-1.4-orig/source/src/nemesis-fileio.c Fri Oct 31 16:29:36 2003
++++ nemesis-1.4/source/src/nemesis-fileio.c Fri May 19 17:31:13 2006
+@@ -63,7 +63,7 @@
+ fp = stdin;
+ fd = fileno(fp);
+ }
+- else if ((fd = open(file, O_RDONLY)) < 0)
++ else if ((fp = fopen(file, "rb")) < 0)
+ {
+ #if !defined(WIN32)
+ fprintf(stderr, "ERROR: Unable to open %s file: %s. %s\n",
+@@ -82,8 +82,12 @@
+ return -1;
+ }
+
++#ifdef DEBUG
++ printf("DEBUG: trying to read max %u bytes from %s\n", maxsize, file);
++#endif
++
+ /* read() can return negative values on successful reads, test for -1 */
+- if ((bytesread = read(fd, (void *)memory, maxsize)) == -1)
++ if ((bytesread = fread((void *)memory, 1, maxsize, fp)) == -1)
+ {
+ #if !defined(WIN32)
+ fprintf(stderr, "ERROR: Unable to read %s file: %s. %s\n",
+@@ -106,6 +110,11 @@
+ if (strncmp(file, "-", 1))
+ close(fd);
+ }
++
++#ifdef DEBUG
++ printf("DEBUG: bytes read from %s: %u.\n", file, bytesread);
++#endif
++
+ return bytesread;
+ }
+
diff --git a/net-misc/nemesis/files/nemesis-1.4-libnet-1.0.patch b/net-misc/nemesis/files/nemesis-1.4-libnet-1.0.patch
new file mode 100644
index 000000000000..b4c55c374efa
--- /dev/null
+++ b/net-misc/nemesis/files/nemesis-1.4-libnet-1.0.patch
@@ -0,0 +1,127 @@
+--- nemesis-1.4.orig/configure 2006-12-15 13:56:46.000000000 -0700
++++ nemesis-1.4/configure 2006-12-15 14:17:33.000000000 -0700
+@@ -4150 +4150 @@
+-CPPFLAGS="${CPPFLAGS} `libnet-config --defines`"
++CPPFLAGS="${CPPFLAGS} `libnet-1.0-config --defines`"
+@@ -4153 +4153 @@
+-if test `libnet-config --cflags | wc -c` = "1"; then
++if test `libnet-1.0-config --cflags | wc -c` = "1"; then
+@@ -4157 +4157 @@
+- CPPFLAGS="${CPPFLAGS} `libnet-config --cflags`"
++ CPPFLAGS="${CPPFLAGS} `libnet-1.0-config --cflags`"
+@@ -4160,3 +4160,3 @@
+-if test `libnet-config --libs | wc -c` = "1"; then
+- { echo "$as_me:$LINENO: WARNING: libnet-config --libs is broken on your system. If you" >&5
+-echo "$as_me: WARNING: libnet-config --libs is broken on your system. If you" >&2;}
++if test `libnet-1.0-config --libs | wc -c` = "1"; then
++ { echo "$as_me:$LINENO: WARNING: libnet-1.0-config --libs is broken on your system. If you" >&5
++echo "$as_me: WARNING: libnet-1.0-config --libs is broken on your system. If you" >&2;}
+@@ -4167 +4167 @@
+- LIBS="${LIBS} `libnet-config --libs | sed s/\-lnet//`"
++ LIBS="${LIBS} `libnet-1.0-config --libs | sed s/\-lnet-1.0//`"
+@@ -4712,2 +4712,2 @@
+-echo "$as_me:$LINENO: checking for libnet_build_ip in -lnet" >&5
+-echo $ECHO_N "checking for libnet_build_ip in -lnet... $ECHO_C" >&6
++echo "$as_me:$LINENO: checking for libnet_build_ip in -lnet-1.0" >&5
++echo $ECHO_N "checking for libnet_build_ip in -lnet-1.0... $ECHO_C" >&6
+@@ -4718 +4718 @@
+-LIBS="-lnet $LIBS"
++LIBS="-lnet-1.0 $LIBS"
+@@ -4781 +4781 @@
+- LIBS="-lnet $LIBS"
++ LIBS="-lnet-1.0 $LIBS"
+@@ -5263 +5263 @@
+-for ac_header in libnet.h
++for ac_header in libnet-1.0.h
+@@ -5433 +5433 @@
+- libnet_dir=`libnet-config --cflags | cut -dI -f2`
++ libnet_dir=`libnet-1.0-config --cflags | cut -dI -f2`
+@@ -5438 +5438 @@
+- if test -r $i/libnet.h; then
++ if test -r $i/libnet-1.0.h; then
+@@ -5444 +5444 @@
+- if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet.h | grep -v 1.0.2a >/dev/null"; then
++ if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet-1.0.h | grep -v 1.0.2a >/dev/null"; then
+@@ -5455 +5455 @@
+- echo " ERROR: unable to find" "libnet 1.0.2a (libnet.h)"
++ echo " ERROR: unable to find" "libnet 1.0.2a (libnet-1.0.h)"
+@@ -5474 +5474 @@
+- echo " ERROR: unable to find" "libnet 1.0.2a (libnet.h)"
++ echo " ERROR: unable to find" "libnet 1.0.2a (libnet-1.0.h)"
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-arp.h nemesis-1.4beta3/src/nemesis-arp.h
+--- nemesis-1.4beta3.orig/src/nemesis-arp.h 2003-08-19 15:45:45.675664688 -0400
++++ nemesis-1.4beta3/src/nemesis-arp.h 2003-08-19 15:47:07.631205552 -0400
+@@ -30 +30 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-dns.h nemesis-1.4beta3/src/nemesis-dns.h
+--- nemesis-1.4beta3.orig/src/nemesis-dns.h 2003-08-19 15:45:45.675664688 -0400
++++ nemesis-1.4beta3/src/nemesis-dns.h 2003-08-19 15:47:07.638204488 -0400
+@@ -30 +30 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-ethernet.h nemesis-1.4beta3/src/nemesis-ethernet.h
+--- nemesis-1.4beta3.orig/src/nemesis-ethernet.h 2003-08-19 15:45:45.676664536 -0400
++++ nemesis-1.4beta3/src/nemesis-ethernet.h 2003-08-19 15:47:07.641204032 -0400
+@@ -29 +29 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-functions.c nemesis-1.4beta3/src/nemesis-functions.c
+--- nemesis-1.4beta3.orig/src/nemesis-functions.c 2003-08-19 15:45:45.676664536 -0400
++++ nemesis-1.4beta3/src/nemesis-functions.c 2003-08-19 15:47:07.656201752 -0400
+@@ -37 +37 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-icmp.h nemesis-1.4beta3/src/nemesis-icmp.h
+--- nemesis-1.4beta3.orig/src/nemesis-icmp.h 2003-08-19 15:45:45.676664536 -0400
++++ nemesis-1.4beta3/src/nemesis-icmp.h 2003-08-19 15:47:07.665200384 -0400
+@@ -31 +31 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-igmp.h nemesis-1.4beta3/src/nemesis-igmp.h
+--- nemesis-1.4beta3.orig/src/nemesis-igmp.h 2003-08-19 15:45:45.676664536 -0400
++++ nemesis-1.4beta3/src/nemesis-igmp.h 2003-08-19 15:47:07.670199624 -0400
+@@ -30 +30 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-ip.h nemesis-1.4beta3/src/nemesis-ip.h
+--- nemesis-1.4beta3.orig/src/nemesis-ip.h 2003-08-19 15:45:45.676664536 -0400
++++ nemesis-1.4beta3/src/nemesis-ip.h 2003-08-19 15:47:07.677198560 -0400
+@@ -26 +26 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-ospf.h nemesis-1.4beta3/src/nemesis-ospf.h
+--- nemesis-1.4beta3.orig/src/nemesis-ospf.h 2003-08-19 15:45:45.677664384 -0400
++++ nemesis-1.4beta3/src/nemesis-ospf.h 2003-08-19 15:47:07.684197496 -0400
+@@ -33 +33 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-rip.h nemesis-1.4beta3/src/nemesis-rip.h
+--- nemesis-1.4beta3.orig/src/nemesis-rip.h 2003-08-19 15:45:45.678664232 -0400
++++ nemesis-1.4beta3/src/nemesis-rip.h 2003-08-19 15:47:07.717192480 -0400
+@@ -33 +33 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-tcp.h nemesis-1.4beta3/src/nemesis-tcp.h
+--- nemesis-1.4beta3.orig/src/nemesis-tcp.h 2003-08-19 15:45:45.678664232 -0400
++++ nemesis-1.4beta3/src/nemesis-tcp.h 2003-08-19 15:47:07.723191568 -0400
+@@ -30 +30 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis-udp.h nemesis-1.4beta3/src/nemesis-udp.h
+--- nemesis-1.4beta3.orig/src/nemesis-udp.h 2003-08-19 15:45:45.678664232 -0400
++++ nemesis-1.4beta3/src/nemesis-udp.h 2003-08-19 15:47:07.728190808 -0400
+@@ -30 +30 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+diff -r -U 0 nemesis-1.4beta3.orig/src/nemesis.h nemesis-1.4beta3/src/nemesis.h
+--- nemesis-1.4beta3.orig/src/nemesis.h 2003-08-19 15:45:45.678664232 -0400
++++ nemesis-1.4beta3/src/nemesis.h 2003-08-19 15:47:07.731190352 -0400
+@@ -15 +15 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
+--- nemesis-1.4.orig/src/nemesis-printout.c 2006-12-15 13:56:46.000000000 -0700
++++ nemesis-1.4/src/nemesis-printout.c 2006-12-15 14:47:14.000000000 -0700
+@@ -34 +34 @@
+-#include <libnet.h>
++#include <libnet-1.0.h>
diff --git a/net-misc/nemesis/files/nemesis-1.4-prototcp.patch b/net-misc/nemesis/files/nemesis-1.4-prototcp.patch
new file mode 100644
index 000000000000..0e75a2e43c39
--- /dev/null
+++ b/net-misc/nemesis/files/nemesis-1.4-prototcp.patch
@@ -0,0 +1,33 @@
+--- nemesis-1.4-orig/source/src/nemesis-proto_tcp.c Fri Oct 31 16:29:38 2003
++++ nemesis-1.4/source/src/nemesis-proto_tcp.c Fri May 19 17:31:13 2006
+@@ -16,7 +16,7 @@
+ FileData *ipod, FileData *tcpod, char *device)
+ {
+ int n;
+- u_int32_t tcp_packetlen = 0, tcp_meta_packetlen = 0;
++ u_int32_t tcp_packetlen = 0, tcp_meta_packetlen = 0, tcp_headerlen = 0, ip_headerlen = 0;
+ static u_int8_t *pkt;
+ static int sockfd = -1;
+ struct libnet_link_int *l2 = NULL;
+@@ -58,13 +58,20 @@
+ #endif
+ }
+
++ ip_headerlen = LIBNET_IP_H + ipod->file_s;
++ tcp_headerlen = LIBNET_TCP_H + tcpod->file_s;
++
+ tcp_packetlen = link_offset + LIBNET_IP_H + LIBNET_TCP_H + pd->file_s +
+ ipod->file_s + tcpod->file_s;
+
+- tcp_meta_packetlen = tcp_packetlen - (link_offset + LIBNET_IP_H);
++ tcp_meta_packetlen = LIBNET_TCP_H + pd->file_s;
+
+ #ifdef DEBUG
++ printf("DEBUG: link offsetlength %u.\n", link_offset);
++ printf("DEBUG: IP header length %u.\n", ip_headerlen);
++ printf("DEBUG: TCP header length %u.\n", tcp_headerlen);
+ printf("DEBUG: TCP packet length %u.\n", tcp_packetlen);
++ printf("DEBUG: TCP meta length %u.\n", tcp_meta_packetlen);
+ printf("DEBUG: IP options size %u.\n", ipod->file_s);
+ printf("DEBUG: TCP options size %u.\n", tcpod->file_s);
+ printf("DEBUG: TCP payload size %u.\n", pd->file_s);
diff --git a/net-misc/nemesis/metadata.xml b/net-misc/nemesis/metadata.xml
new file mode 100644
index 000000000000..20177dc2b05e
--- /dev/null
+++ b/net-misc/nemesis/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>proxy-maintainers</herd>
+ <maintainer>
+ <email>rainbow@irh.it</email>
+ <name>rainbow</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">nemesis</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/nemesis/nemesis-1.4-r1.ebuild b/net-misc/nemesis/nemesis-1.4-r1.ebuild
new file mode 100644
index 000000000000..9cd57187c4f2
--- /dev/null
+++ b/net-misc/nemesis/nemesis-1.4-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils
+
+DESCRIPTION="A commandline-based, portable human IP stack for UNIX/Linux"
+HOMEPAGE="http://nemesis.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P/_}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~sparc ~x86"
+IUSE=""
+
+RDEPEND="net-libs/libpcap"
+DEPEND="${RDEPEND}
+ =net-libs/libnet-1.0*"
+
+DOCS="CREDITS ChangeLog README"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-fileio.patch
+ epatch "${FILESDIR}"/${P}-libnet-1.0.patch
+ epatch "${FILESDIR}"/${P}-prototcp.patch
+}
diff --git a/net-misc/nemesis/nemesis-1.4.ebuild b/net-misc/nemesis/nemesis-1.4.ebuild
new file mode 100644
index 000000000000..e24abb77e5f1
--- /dev/null
+++ b/net-misc/nemesis/nemesis-1.4.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="A commandline-based, portable human IP stack for UNIX/Linux"
+HOMEPAGE="http://nemesis.sourceforge.net/"
+SRC_URI="mirror://sourceforge/nemesis/${P/_}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 sparc x86"
+IUSE=""
+
+RDEPEND="net-libs/libpcap"
+DEPEND="${RDEPEND}
+ =net-libs/libnet-1.0*"
+
+S=${WORKDIR}/${P/_}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PV}-libnet-1.0.patch
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die
+ dodoc CREDITS ChangeLog INSTALL README
+}
diff --git a/net-misc/netcf/Manifest b/net-misc/netcf/Manifest
new file mode 100644
index 000000000000..54a3deb24b93
--- /dev/null
+++ b/net-misc/netcf/Manifest
@@ -0,0 +1 @@
+DIST netcf-0.1.9.tar.gz 579227 RMD160 29bc4166c605cb1a7ee75c00429002c5603c359d SHA1 9cb91e94989215ad23a7c3b3f5c59fefaf0df261 SHA256 01a6ad0879a1140deaf7b46d3d38a852370bcdc6456c43f02e2db0715c2fb3bb
diff --git a/net-misc/netcf/metadata.xml b/net-misc/netcf/metadata.xml
new file mode 100644
index 000000000000..b2b86fc4d13d
--- /dev/null
+++ b/net-misc/netcf/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>cardoe@gentoo.org</email>
+ <name>Doug Goldstein</name>
+ <description>Anyone can take over this package if they
+ want</description>
+ </maintainer>
+</pkgmetadata>
+
diff --git a/net-misc/netcf/netcf-0.1.9.ebuild b/net-misc/netcf/netcf-0.1.9.ebuild
new file mode 100644
index 000000000000..921e291a7266
--- /dev/null
+++ b/net-misc/netcf/netcf-0.1.9.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="netcf is a cross-platform network configuration library"
+HOMEPAGE="https://fedorahosted.org/netcf/"
+SRC_URI="https://fedorahosted.org/released/netcf/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=app-admin/augeas-0.5.0
+ dev-libs/libnl:1.1
+ dev-libs/libxml2
+ dev-libs/libxslt
+ sys-libs/readline"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ # static libs are a waste of time and disk for this
+ econf --disable-static
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install || die "install failed"
+ dodoc AUTHORS ChangeLog README NEWS
+}
diff --git a/net-misc/netctl/Manifest b/net-misc/netctl/Manifest
new file mode 100644
index 000000000000..f6205ecb64a1
--- /dev/null
+++ b/net-misc/netctl/Manifest
@@ -0,0 +1,2 @@
+DIST netctl-1.10.tar.xz 43576 SHA256 106cc09f810b7922be8c117129ee739fcd3270c20ee57eb807410158cc560b03 SHA512 f42b6f5abf4115d745bac73af68562a2c3974347051699cab66cb0e1f7254e52492ddeda51c338498f7f6479226bf4c6e9f46d2c3a8b1f3594244dd9e10dddd9 WHIRLPOOL b7303273d1250de5dd2d85c988a21a427bfb13470096b29963993aee1dd82efc0444c8f953dfd308cddd42b02a5238ffce35c823e3c8774e0d54c515a5aa34ca
+DIST netctl-1.9.tar.xz 43256 SHA256 86040e40d28b1f6e12b8a34daa3bc107ef94005d5e0bff9c43ed8e22f7cb4181 SHA512 586cf8389d33c130d2cb94fa35479436a6dba70ff05bc7b59d2c3148760ddb3030f00d06bdb8c09cb6bac4fc0d94a4f3a3ced7d3b30973e58323af1676ef6f42 WHIRLPOOL dbff6d0d8c7389a5ec4da6555fbc8bec3f63a5498049e77148aae8b54d97f0820eada8e3e0458ddd06572d1aafb1cb3378579e4f11aa7433cb86ff6710a6c06e
diff --git a/net-misc/netctl/metadata.xml b/net-misc/netctl/metadata.xml
new file mode 100644
index 000000000000..c524795cfacb
--- /dev/null
+++ b/net-misc/netctl/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>floppym@gentoo.org</email>
+ <name>Mike Gilbert</name>
+ </maintainer>
+ <maintainer>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/netctl/netctl-1.10.ebuild b/net-misc/netctl/netctl-1.10.ebuild
new file mode 100644
index 000000000000..88a933e680b8
--- /dev/null
+++ b/net-misc/netctl/netctl-1.10.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit bash-completion-r1
+
+if [[ ${PV} = *9999* ]]; then
+ EGIT_REPO_URI="git://projects.archlinux.org/netctl.git"
+ inherit git-2
+ DEPEND="app-text/asciidoc"
+else
+ SRC_URI="ftp://ftp.archlinux.org/other/packages/${PN}/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Profile based network connection tool from Arch Linux"
+HOMEPAGE="https://wiki.archlinux.org/index.php/Netctl
+ https://www.archlinux.org/packages/core/any/netctl/
+ https://projects.archlinux.org/netctl.git/"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE=""
+
+DEPEND+="
+ virtual/pkgconfig
+ sys-apps/systemd
+"
+RDEPEND="
+ >=app-shells/bash-4.0
+ >=net-dns/openresolv-3.5.4-r1
+ sys-apps/iproute2
+ sys-apps/systemd
+ !<net-misc/dhcpcd-6.4.0
+"
+
+src_prepare() {
+ sed -i -e "s:/usr/bin/ifplugd:/usr/sbin/ifplugd:" \
+ "services/netctl-ifplugd@.service" || die
+}
+
+src_compile() {
+ return 0
+}
+
+src_install() {
+ emake DESTDIR="${D%/}" SHELL=bash install
+ dodoc AUTHORS NEWS README
+ newbashcomp contrib/bash-completion netctl
+ bashcomp_alias netctl netctl-auto wifi-menu
+ insinto /usr/share/zsh/site-functions
+ newins contrib/zsh-completion _netctl
+}
+
+optfeature() {
+ local desc=$1
+ shift
+ while (( $# )); do
+ if has_version "$1"; then
+ elog " [I] $1 for ${desc}"
+ else
+ elog " [ ] $1 for ${desc}"
+ fi
+ shift
+ done
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "To get additional features, a number of optional runtime dependencies may be"
+ elog "installed."
+ optfeature "DHCP support" net-misc/dhcpcd ">=net-misc/dhcp-5.6.7[client]"
+ optfeature "WPA support" net-wireless/wpa_supplicant
+ optfeature "interactive assistant" dev-util/dialog
+ optfeature "automatic connection" sys-apps/ifplugd
+ optfeature "bonding support" net-misc/ifenslave
+ optfeature "dialup support" net-dialup/ppp
+ fi
+}
diff --git a/net-misc/netctl/netctl-1.9.ebuild b/net-misc/netctl/netctl-1.9.ebuild
new file mode 100644
index 000000000000..8fd90dca1862
--- /dev/null
+++ b/net-misc/netctl/netctl-1.9.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit bash-completion-r1
+
+if [[ ${PV} = *9999* ]]; then
+ EGIT_REPO_URI="git://projects.archlinux.org/netctl.git"
+ inherit git-2
+ DEPEND="app-text/asciidoc"
+else
+ SRC_URI="ftp://ftp.archlinux.org/other/packages/${PN}/${P}.tar.xz"
+ KEYWORDS="amd64 x86"
+fi
+
+DESCRIPTION="Profile based network connection tool from Arch Linux"
+HOMEPAGE="https://wiki.archlinux.org/index.php/Netctl
+ https://www.archlinux.org/packages/core/any/netctl/
+ https://projects.archlinux.org/netctl.git/"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE=""
+
+DEPEND+="
+ virtual/pkgconfig
+ sys-apps/systemd
+"
+RDEPEND="
+ >=app-shells/bash-4.0
+ >=net-dns/openresolv-3.5.4-r1
+ sys-apps/iproute2
+ sys-apps/systemd
+ !<net-misc/dhcpcd-6.4.0
+"
+
+src_prepare() {
+ sed -i -e "s:/usr/bin/ifplugd:/usr/sbin/ifplugd:" \
+ "services/netctl-ifplugd@.service" || die
+}
+
+src_compile() {
+ return 0
+}
+
+src_install() {
+ emake DESTDIR="${D%/}" SHELL=bash install
+ dodoc AUTHORS NEWS README
+ newbashcomp contrib/bash-completion netctl
+ bashcomp_alias netctl netctl-auto wifi-menu
+ insinto /usr/share/zsh/site-functions
+ newins contrib/zsh-completion _netctl
+}
+
+optfeature() {
+ local desc=$1
+ shift
+ while (( $# )); do
+ if has_version "$1"; then
+ elog " [I] $1 for ${desc}"
+ else
+ elog " [ ] $1 for ${desc}"
+ fi
+ shift
+ done
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "To get additional features, a number of optional runtime dependencies may be"
+ elog "installed."
+ optfeature "DHCP support" net-misc/dhcpcd ">=net-misc/dhcp-5.6.7[client]"
+ optfeature "WPA support" net-wireless/wpa_supplicant
+ optfeature "interactive assistant" dev-util/dialog
+ optfeature "automatic connection" sys-apps/ifplugd
+ optfeature "bonding support" net-misc/ifenslave
+ optfeature "dialup support" net-dialup/ppp
+ fi
+}
diff --git a/net-misc/netctl/netctl-9999.ebuild b/net-misc/netctl/netctl-9999.ebuild
new file mode 100644
index 000000000000..87bbb92b396b
--- /dev/null
+++ b/net-misc/netctl/netctl-9999.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit bash-completion-r1
+
+if [[ ${PV} = *9999* ]]; then
+ EGIT_REPO_URI="git://projects.archlinux.org/netctl.git"
+ inherit git-2
+ DEPEND="app-text/asciidoc"
+else
+ SRC_URI="ftp://ftp.archlinux.org/other/packages/${PN}/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Profile based network connection tool from Arch Linux"
+HOMEPAGE="https://wiki.archlinux.org/index.php/Netctl
+ https://www.archlinux.org/packages/core/any/netctl/
+ https://projects.archlinux.org/netctl.git/"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE=""
+
+DEPEND+="
+ virtual/pkgconfig
+ sys-apps/systemd
+"
+RDEPEND="
+ >=app-shells/bash-4.0
+ >=net-dns/openresolv-3.5.4-r1
+ sys-apps/iproute2
+ sys-apps/systemd
+ !<net-misc/dhcpcd-6.4.0
+"
+
+src_prepare() {
+ sed -i -e "s:/usr/bin/ifplugd:/usr/sbin/ifplugd:" \
+ "services/netctl-ifplugd@.service" || die
+}
+
+src_compile() {
+ return 0
+}
+
+src_install() {
+ emake DESTDIR="${D%/}" SHELL=bash install
+ dodoc AUTHORS NEWS README
+ newbashcomp contrib/bash-completion netctl
+ insinto /usr/share/zsh/site-functions
+ newins contrib/zsh-completion _netctl
+}
+
+optfeature() {
+ local desc=$1
+ shift
+ while (( $# )); do
+ if has_version "$1"; then
+ elog " [I] $1 for ${desc}"
+ else
+ elog " [ ] $1 for ${desc}"
+ fi
+ shift
+ done
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "To get additional features, a number of optional runtime dependencies may be"
+ elog "installed."
+ optfeature "DHCP support" net-misc/dhcpcd ">=net-misc/dhcp-5.6.7[client]"
+ optfeature "WPA support" net-wireless/wpa_supplicant
+ optfeature "interactive assistant" dev-util/dialog
+ optfeature "automatic connection" sys-apps/ifplugd
+ optfeature "bonding support" net-misc/ifenslave
+ optfeature "dialup support" net-dialup/ppp
+ fi
+}
diff --git a/net-misc/netdate/Manifest b/net-misc/netdate/Manifest
new file mode 100644
index 000000000000..f2d80cf843c5
--- /dev/null
+++ b/net-misc/netdate/Manifest
@@ -0,0 +1 @@
+DIST netdate-1.2.tar.bz2 7516 RMD160 e82ec586c065453cf657d48563ab74970ddde6a6 SHA1 9c2dbf72a7fea36cc7488b4178ac389e64fdceb4 SHA256 f282e384408565b9d7f4198f01bcdad326d27dd2e6c83d2084f2bb43b10ea802
diff --git a/net-misc/netdate/metadata.xml b/net-misc/netdate/metadata.xml
new file mode 100644
index 000000000000..c6d862855eb5
--- /dev/null
+++ b/net-misc/netdate/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-misc/netdate/netdate-1.2.ebuild b/net-misc/netdate/netdate-1.2.ebuild
new file mode 100644
index 000000000000..80d466347d68
--- /dev/null
+++ b/net-misc/netdate/netdate-1.2.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="A Utility to synchronize the time with ntp-servers"
+HOMEPAGE="ftp://ftp.suse.com/pub/people/kukuk/ipv6/"
+SRC_URI="ftp://ftp.suse.com/pub/people/kukuk/ipv6/${P}.tar.bz2"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips s390 sh sparc x86"
+IUSE=""
+
+DEPEND=""
+
+S=${WORKDIR}/${PN}
+
+src_compile() {
+ emake || die "make failed"
+}
+
+src_install() {
+ dobin netdate || die
+ doman netdate.8
+ dodoc README
+}
diff --git a/net-misc/netfleet/Manifest b/net-misc/netfleet/Manifest
new file mode 100644
index 000000000000..d63284521003
--- /dev/null
+++ b/net-misc/netfleet/Manifest
@@ -0,0 +1 @@
+DIST netfleet_0.2.1.tar.bz2 162733 SHA256 05ec6e3a47e59a89c740272f2f21d60ad019df8dd3dda03daa05f3e536ecf8e2
diff --git a/net-misc/netfleet/metadata.xml b/net-misc/netfleet/metadata.xml
new file mode 100644
index 000000000000..c75db4b62d8e
--- /dev/null
+++ b/net-misc/netfleet/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>qt</herd>
+ <longdescription lang="en">
+ </longdescription>
+ <upstream>
+ <remote-id type="google-code">netfleet</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/netfleet/netfleet-0.2.1.ebuild b/net-misc/netfleet/netfleet-0.2.1.ebuild
new file mode 100644
index 000000000000..0a7846e3fa88
--- /dev/null
+++ b/net-misc/netfleet/netfleet-0.2.1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit qt4-r2 versionator
+
+MY_PV=$(replace_version_separator 3 '-')
+MY_P="${PN}_${MY_PV}"
+
+DESCRIPTION="Qt4 cross-platform multi-threaded download utility"
+HOMEPAGE="http://qt-apps.org/content/show.php/?content=103312"
+SRC_URI="http://netfleet.googlecode.com/files/${MY_P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug"
+
+DEPEND=">=dev-qt/qtgui-4.5.0:4"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+DOCS="readme.txt"
diff --git a/net-misc/netifrc/Manifest b/net-misc/netifrc/Manifest
new file mode 100644
index 000000000000..5be696d85b1e
--- /dev/null
+++ b/net-misc/netifrc/Manifest
@@ -0,0 +1,5 @@
+DIST netifrc-0.2.2.tar.bz2 61115 SHA256 24c2748bec768691799d97c540061d46960756b390475107539e104868f36a4d SHA512 c31b5f5ccd5e76a568ba5acf143eea5413c5911fa7a14a00a983a71cbe737fc40e814686f4916377ac5404b35805503463c2cb371943a76a27124247fd9f9fe3 WHIRLPOOL 43010906bdd64e9631688f8f8a948d08ca4b42c9188c4941f406361e9455b712097596d4fbf86c3643bdb9d32a2c29367bc950edc025ebdcc771fbe30b87c080
+DIST netifrc-0.2.3.tar.bz2 61427 SHA256 c108d34caf555e411a80b56f08ef03693512e076e1a91c320d3aadd080ebc4b7 SHA512 fb3c555956e83831ae6bb0e73c8e1e0a6f3d9c806d148aa2f3e9dc92edc48a19bc65743eea1dc8ada924081eb2cedc5e02b14d8614145f08b1728e973cfd412d WHIRLPOOL 67e0492f1cabd0ca7630dfe38816dc64ec368615a8ac026e63bfdeff70bb72a01027212c3cf6aba720cca34ff10df8570542a718eff6bf7d95104bcfd33f4654
+DIST netifrc-0.2.4.tar.bz2 61828 SHA256 9b53eb3c8e6e80cd4073a34f911a28055c28b9f7a9f119a397002b0de7ac0691 SHA512 a8dd7d1d79e91eb37c938a7b06c835d667d5b39ad5e7bdbd6a1b18d17ac6f828935a83ca119d49b9903e9fe7ca48f0c003b28a6c52252f9f0217b96ec2c2df41 WHIRLPOOL dcc538f9cced599ba1689b96bf6a412c590a1557cdde7027ac2b5066977594352660f32c5d30ddc24a4c6fd870d62ea6f7f98e44a89a534fe37b1e8787ec1e04
+DIST netifrc-0.3.0.tar.bz2 68461 SHA256 9b0bd794a7714c06d2baa11553af018f694c2c71d121e657630d9c9ee94cafc6 SHA512 e28c00e5318c17e46bbdbcd471252729b73a4a0af930a4bf6213d30441650390b6bb83678cfd1fbeddd8102f947016a18976538dcf316cfab08461adf301686c WHIRLPOOL aa868e8b9dccb6d2ba48f37318adae57cf8314d1b45d9ad1fdc5d6b85b0b432b7b3f5b784d9d3ae824612699947b6bd47810c4cf44daf25aef52673a1fa2120c
+DIST netifrc-0.3.1.tar.bz2 69213 SHA256 a92a96b6f065981ee1c0232a507f3695230eeb7fb6172ec9048c2538b36cfea8 SHA512 de7d9291c3303e077c86e1fd42c6d9319308f0b51f28a034f9ed830aa504d2830ce96816a391811bcfadd07500e9c439acd4c4365555d7a3e47e58178b53465b WHIRLPOOL b2b0384880abb52a6d31a640688ecbdf17e4ba02aed9660e63c99c80eed315384459984abe1ef527526bed5a142e2c13275b7e7f68332fc6d9368bd98dcdd461
diff --git a/net-misc/netifrc/metadata.xml b/net-misc/netifrc/metadata.xml
new file mode 100644
index 000000000000..24a084b29e4f
--- /dev/null
+++ b/net-misc/netifrc/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>netifrc@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ This package contains the Gentoo network interface management
+ scripts, which were separated from OpenRC.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/netifrc/netifrc-0.2.2.ebuild b/net-misc/netifrc/netifrc-0.2.2.ebuild
new file mode 100644
index 000000000000..1fd98fa2af50
--- /dev/null
+++ b/net-misc/netifrc/netifrc-0.2.2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils udev
+
+DESCRIPTION="Gentoo Network Interface Management Scripts"
+HOMEPAGE="http://www.gentoo.org/proj/en/base/openrc/"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="git://anongit.gentoo.org/proj/${PN}.git"
+ inherit git-2
+else
+ SRC_URI="http://dev.gentoo.org/~robbat2/distfiles/${P}.tar.bz2"
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE=""
+
+COMMON_DEPEND="!<sys-fs/udev-init-scripts-26-r1
+ !<sys-fs/udev-172"
+DEPEND="${COMMON_DEPEND}
+ kernel_linux? ( virtual/pkgconfig )"
+RDEPEND="${COMMON_DEPEND}
+ >=sys-apps/openrc-0.12
+ !<sys-apps/openrc-0.12"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ local ver="git-${EGIT_VERSION:0:6}"
+ sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/git.mk || die
+ einfo "Producing ChangeLog from Git history"
+ GIT_DIR="${S}/.git" git log >"${S}"/ChangeLog
+ fi
+
+ # Allow user patches to be applied without modifying the ebuild
+ epatch_user
+}
+
+src_compile() {
+ MAKE_ARGS="${MAKE_ARGS}
+ LIBEXECDIR=${EPREFIX}/lib/${PN} PF=${PF}
+ UDEVDIR=$(get_udevdir)"
+
+ use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
+
+ emake ${MAKE_ARGS} all
+}
+
+src_install() {
+ emake ${MAKE_ARGS} DESTDIR="${D}" install
+ dodoc README CREDITS FEATURE-REMOVAL-SCHEDULE STYLE TODO ChangeLog
+}
+
+pkg_postinst() {
+ if [[ ! -e "${EROOT}"/etc/conf.d/net && -z $REPLACING_VERSIONS ]]; then
+ elog "The network configuration scripts will use dhcp by"
+ elog "default to set up your interfaces."
+ elog "If you need to set up something more complete, see"
+ elog "${EROOT}/usr/share/doc/${P}/README"
+ fi
+}
diff --git a/net-misc/netifrc/netifrc-0.2.3.ebuild b/net-misc/netifrc/netifrc-0.2.3.ebuild
new file mode 100644
index 000000000000..0c9884b81355
--- /dev/null
+++ b/net-misc/netifrc/netifrc-0.2.3.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils udev
+
+DESCRIPTION="Gentoo Network Interface Management Scripts"
+HOMEPAGE="http://www.gentoo.org/proj/en/base/openrc/"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="git://anongit.gentoo.org/proj/${PN}.git"
+ inherit git-2
+else
+ SRC_URI="http://dev.gentoo.org/~robbat2/distfiles/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE=""
+
+COMMON_DEPEND="!<sys-fs/udev-init-scripts-26-r1
+ !<sys-fs/udev-172"
+DEPEND="${COMMON_DEPEND}
+ kernel_linux? ( virtual/pkgconfig )"
+RDEPEND="${COMMON_DEPEND}
+ >=sys-apps/openrc-0.12
+ !<sys-apps/openrc-0.12"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ local ver="git-${EGIT_VERSION:0:6}"
+ sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/git.mk || die
+ einfo "Producing ChangeLog from Git history"
+ GIT_DIR="${S}/.git" git log >"${S}"/ChangeLog
+ fi
+
+ # Allow user patches to be applied without modifying the ebuild
+ epatch_user
+}
+
+src_compile() {
+ MAKE_ARGS="${MAKE_ARGS}
+ LIBEXECDIR=${EPREFIX}/lib/${PN} PF=${PF}
+ UDEVDIR=$(get_udevdir)"
+
+ use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
+
+ emake ${MAKE_ARGS} all
+}
+
+src_install() {
+ emake ${MAKE_ARGS} DESTDIR="${D}" install
+ dodoc README CREDITS FEATURE-REMOVAL-SCHEDULE STYLE TODO ChangeLog
+}
+
+pkg_postinst() {
+ if [[ ! -e "${EROOT}"/etc/conf.d/net && -z $REPLACING_VERSIONS ]]; then
+ elog "The network configuration scripts will use dhcp by"
+ elog "default to set up your interfaces."
+ elog "If you need to set up something more complete, see"
+ elog "${EROOT}/usr/share/doc/${P}/README"
+ fi
+}
diff --git a/net-misc/netifrc/netifrc-0.2.4.ebuild b/net-misc/netifrc/netifrc-0.2.4.ebuild
new file mode 100644
index 000000000000..d83015c286c3
--- /dev/null
+++ b/net-misc/netifrc/netifrc-0.2.4.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils udev
+
+DESCRIPTION="Gentoo Network Interface Management Scripts"
+HOMEPAGE="http://www.gentoo.org/proj/en/base/openrc/"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="git://anongit.gentoo.org/proj/${PN}.git"
+ inherit git-2
+else
+ SRC_URI="http://dev.gentoo.org/~robbat2/distfiles/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE=""
+
+COMMON_DEPEND="!<sys-fs/udev-init-scripts-26-r1
+ !<sys-fs/udev-172"
+DEPEND="${COMMON_DEPEND}
+ kernel_linux? ( virtual/pkgconfig )"
+RDEPEND="${COMMON_DEPEND}
+ >=sys-apps/openrc-0.12
+ !<sys-apps/openrc-0.12"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ local ver="git-${EGIT_VERSION:0:6}"
+ sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/git.mk || die
+ einfo "Producing ChangeLog from Git history"
+ GIT_DIR="${S}/.git" git log >"${S}"/ChangeLog
+ fi
+
+ # Allow user patches to be applied without modifying the ebuild
+ epatch_user
+}
+
+src_compile() {
+ MAKE_ARGS="${MAKE_ARGS}
+ LIBEXECDIR=${EPREFIX}/lib/${PN} PF=${PF}
+ UDEVDIR=${EPREFIX}$(get_udevdir)"
+
+ use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
+
+ emake ${MAKE_ARGS} all
+}
+
+src_install() {
+ emake ${MAKE_ARGS} DESTDIR="${D}" install
+ dodoc README CREDITS FEATURE-REMOVAL-SCHEDULE STYLE TODO ChangeLog
+}
+
+pkg_postinst() {
+ if [[ ! -e "${EROOT}"/etc/conf.d/net && -z $REPLACING_VERSIONS ]]; then
+ elog "The network configuration scripts will use dhcp by"
+ elog "default to set up your interfaces."
+ elog "If you need to set up something more complete, see"
+ elog "${EROOT}/usr/share/doc/${P}/README"
+ fi
+}
diff --git a/net-misc/netifrc/netifrc-0.3.0.ebuild b/net-misc/netifrc/netifrc-0.3.0.ebuild
new file mode 100644
index 000000000000..7fc5e8baffdb
--- /dev/null
+++ b/net-misc/netifrc/netifrc-0.3.0.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd
+
+DESCRIPTION="Gentoo Network Interface Management Scripts"
+HOMEPAGE="http://www.gentoo.org/proj/en/base/openrc/"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="git://anongit.gentoo.org/proj/${PN}.git"
+ #EGIT_REPO_URI="git://github.com/gentoo/netifrc" # Alternate
+ inherit git-r3
+else
+ SRC_URI="http://dev.gentoo.org/~robbat2/distfiles/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE=""
+
+DEPEND="kernel_linux? ( virtual/pkgconfig )
+ !<sys-fs/udev-172"
+RDEPEND="sys-apps/gentoo-functions"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ local ver="git-${EGIT_VERSION:0:6}"
+ sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/git.mk || die
+ einfo "Producing ChangeLog from Git history"
+ GIT_DIR="${S}/.git" git log >"${S}"/ChangeLog
+ fi
+
+ # Allow user patches to be applied without modifying the ebuild
+ epatch_user
+}
+
+src_compile() {
+ MAKE_ARGS="${MAKE_ARGS}
+ LIBEXECDIR=${EPREFIX}/lib/${PN} PF=${PF}"
+
+ use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
+
+ emake ${MAKE_ARGS} all
+}
+
+src_install() {
+ emake ${MAKE_ARGS} DESTDIR="${D}" install
+ dodoc README CREDITS FEATURE-REMOVAL-SCHEDULE STYLE TODO ChangeLog
+
+ # Install the service file
+ LIBEXECDIR=${EPREFIX}/lib/${PN}
+ UNIT_DIR="$(systemd_get_unitdir)"
+ sed "s:@LIBEXECDIR@:${LIBEXECDIR}:" "${S}/systemd/net_at.service.in" > "${T}/net_at.service" || die
+ systemd_newunit "${T}/net_at.service" 'net@.service'
+ dosym "${UNIT_DIR#${EPREFIX}}/net@.service" "${UNIT_DIR#${EPREFIX}}/net@lo.service"
+}
+
+pkg_postinst() {
+ if [[ ! -e "${EROOT}"/etc/conf.d/net && -z $REPLACING_VERSIONS ]]; then
+ elog "The network configuration scripts will use dhcp by"
+ elog "default to set up your interfaces."
+ elog "If you need to set up something more complete, see"
+ elog "${EROOT}/usr/share/doc/${P}/README"
+ fi
+}
diff --git a/net-misc/netifrc/netifrc-0.3.1.ebuild b/net-misc/netifrc/netifrc-0.3.1.ebuild
new file mode 100644
index 000000000000..3d20bb85506f
--- /dev/null
+++ b/net-misc/netifrc/netifrc-0.3.1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd udev
+
+DESCRIPTION="Gentoo Network Interface Management Scripts"
+HOMEPAGE="http://www.gentoo.org/proj/en/base/openrc/"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="git://anongit.gentoo.org/proj/${PN}.git"
+ #EGIT_REPO_URI="git://github.com/gentoo/netifrc" # Alternate
+ inherit git-r3
+else
+ SRC_URI="http://dev.gentoo.org/~robbat2/distfiles/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE=""
+
+DEPEND="kernel_linux? ( virtual/pkgconfig )
+ !<sys-fs/udev-172"
+RDEPEND="sys-apps/gentoo-functions"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ local ver="git-${EGIT_VERSION:0:6}"
+ sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/git.mk || die
+ einfo "Producing ChangeLog from Git history"
+ GIT_DIR="${S}/.git" git log >"${S}"/ChangeLog
+ fi
+
+ # Allow user patches to be applied without modifying the ebuild
+ epatch_user
+}
+
+src_compile() {
+ MAKE_ARGS="${MAKE_ARGS}
+ UDEVDIR=${EPREFIX}$(get_udevdir)
+ LIBEXECDIR=${EPREFIX}/lib/${PN} PF=${PF}"
+
+ use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
+
+ emake ${MAKE_ARGS} all
+}
+
+src_install() {
+ emake ${MAKE_ARGS} DESTDIR="${D}" install
+ dodoc README CREDITS FEATURE-REMOVAL-SCHEDULE STYLE TODO ChangeLog
+
+ # Install the service file
+ LIBEXECDIR=${EPREFIX}/lib/${PN}
+ UNIT_DIR="$(systemd_get_unitdir)"
+ sed "s:@LIBEXECDIR@:${LIBEXECDIR}:" "${S}/systemd/net_at.service.in" > "${T}/net_at.service" || die
+ systemd_newunit "${T}/net_at.service" 'net@.service'
+ dosym "${UNIT_DIR#${EPREFIX}}/net@.service" "${UNIT_DIR#${EPREFIX}}/net@lo.service"
+}
+
+pkg_postinst() {
+ if [[ ! -e "${EROOT}"/etc/conf.d/net && -z $REPLACING_VERSIONS ]]; then
+ elog "The network configuration scripts will use dhcp by"
+ elog "default to set up your interfaces."
+ elog "If you need to set up something more complete, see"
+ elog "${EROOT}/usr/share/doc/${P}/README"
+ fi
+}
diff --git a/net-misc/netifrc/netifrc-9999.ebuild b/net-misc/netifrc/netifrc-9999.ebuild
new file mode 100644
index 000000000000..61da5eb6647c
--- /dev/null
+++ b/net-misc/netifrc/netifrc-9999.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd udev
+
+DESCRIPTION="Gentoo Network Interface Management Scripts"
+HOMEPAGE="http://www.gentoo.org/proj/en/base/openrc/"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="git://anongit.gentoo.org/proj/${PN}.git"
+ #EGIT_REPO_URI="git://github.com/gentoo/netifrc" # Alternate
+ inherit git-r3
+else
+ SRC_URI="http://dev.gentoo.org/~robbat2/dist/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+fi
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE=""
+
+DEPEND="kernel_linux? ( virtual/pkgconfig )
+ !<sys-fs/udev-172"
+RDEPEND="sys-apps/gentoo-functions"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ local ver="git-${EGIT_VERSION:0:6}"
+ sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/git.mk || die
+ einfo "Producing ChangeLog from Git history"
+ GIT_DIR="${S}/.git" git log >"${S}"/ChangeLog
+ fi
+
+ # Allow user patches to be applied without modifying the ebuild
+ epatch_user
+}
+
+src_compile() {
+ MAKE_ARGS="${MAKE_ARGS}
+ UDEVDIR=${EPREFIX}$(get_udevdir)
+ LIBEXECDIR=${EPREFIX}/lib/${PN} PF=${PF}"
+
+ use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}"
+
+ emake ${MAKE_ARGS} all
+}
+
+src_install() {
+ emake ${MAKE_ARGS} DESTDIR="${D}" install
+ dodoc README CREDITS FEATURE-REMOVAL-SCHEDULE STYLE TODO ChangeLog
+
+ # Install the service file
+ LIBEXECDIR=${EPREFIX}/lib/${PN}
+ UNIT_DIR="$(systemd_get_unitdir)"
+ sed "s:@LIBEXECDIR@:${LIBEXECDIR}:" "${S}/systemd/net_at.service.in" > "${T}/net_at.service" || die
+ systemd_newunit "${T}/net_at.service" 'net@.service'
+ dosym "${UNIT_DIR#${EPREFIX}}/net@.service" "${UNIT_DIR#${EPREFIX}}/net@lo.service"
+}
+
+pkg_postinst() {
+ if [[ ! -e "${EROOT}"/etc/conf.d/net && -z $REPLACING_VERSIONS ]]; then
+ elog "The network configuration scripts will use dhcp by"
+ elog "default to set up your interfaces."
+ elog "If you need to set up something more complete, see"
+ elog "${EROOT}/usr/share/doc/${P}/README"
+ fi
+}
diff --git a/net-misc/netkit-bootparamd/Manifest b/net-misc/netkit-bootparamd/Manifest
new file mode 100644
index 000000000000..4066882e0c12
--- /dev/null
+++ b/net-misc/netkit-bootparamd/Manifest
@@ -0,0 +1 @@
+DIST netkit-bootparamd_0.17.orig.tar.gz 13934 SHA256 7fd44b14f7ee5bf930bdd03b0c3a15bdb6efb60a862af47269b05361c4ed395c
diff --git a/net-misc/netkit-bootparamd/files/0.17-jumpstart.patch b/net-misc/netkit-bootparamd/files/0.17-jumpstart.patch
new file mode 100644
index 000000000000..41b471b5075f
--- /dev/null
+++ b/net-misc/netkit-bootparamd/files/0.17-jumpstart.patch
@@ -0,0 +1,25 @@
+diff -urN netkit-bootparamd-0.17.old/rpc.bootparamd/rpc.bootparamd.c netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c
+--- netkit-bootparamd-0.17.old/rpc.bootparamd/rpc.bootparamd.c 2000-07-22 12:23:56.000000000 -0400
++++ netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c 2004-09-13 17:42:43.000000000 -0400
+@@ -136,11 +136,16 @@
+ strncpy(path, where, sizeof(path));
+ path[sizeof(path)-1] = 0;
+ he = gethostbyname(hostname);
+- if (!he) goto failed;
+- bcopy( he->h_addr, &res.server_address.bp_address_u.ip_addr, 4);
+- res.server_name = hostname;
+- res.server_path = path;
+- res.server_address.address_type = IP_ADDR_TYPE;
++ if (!he) { /* jumpstart parameters are not valid hosts */
++ res.server_name = hostname;
++ res.server_path = path;
++ bzero(&res.server_address.bp_address_u.ip_addr,4);
++ } else {
++ bcopy( he->h_addr, &res.server_address.bp_address_u.ip_addr, 4);
++ res.server_name = hostname;
++ res.server_path = path;
++ res.server_address.address_type = IP_ADDR_TYPE;
++ }
+ }
+ else { /* special for dump, answer with null strings */
+ if (!strcmp(getfile->file_id, "dump")) {
diff --git a/net-misc/netkit-bootparamd/files/bootparamd.confd b/net-misc/netkit-bootparamd/files/bootparamd.confd
new file mode 100644
index 000000000000..f7e233a46de3
--- /dev/null
+++ b/net-misc/netkit-bootparamd/files/bootparamd.confd
@@ -0,0 +1,3 @@
+#
+
+OPTS_RPC_BOOTPARAMD="-s"
diff --git a/net-misc/netkit-bootparamd/files/bootparamd.initd b/net-misc/netkit-bootparamd/files/bootparamd.initd
new file mode 100644
index 000000000000..167b52474d55
--- /dev/null
+++ b/net-misc/netkit-bootparamd/files/bootparamd.initd
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+[ -e /etc/conf.d/bootparamd ] && . /etc/conf.d/bootparamd
+
+rpc_bin=/usr/sbin/rpc.bootparamd
+
+depend() {
+ use ypbind net
+ need portmap
+ after quota
+}
+
+start() {
+ ebegin "Starting bootparamd"
+ ${rpc_bin} ${OPTS_RPC_BOOTPARAMD}
+ eend $? "make sure DNOTIFY support is enabled ..."
+}
+
+stop() {
+ ebegin "Stopping bootparamd"
+ start-stop-daemon --stop --exec ${rpc_bin}
+ eend $?
+}
diff --git a/net-misc/netkit-bootparamd/metadata.xml b/net-misc/netkit-bootparamd/metadata.xml
new file mode 100644
index 000000000000..5b80fb94c393
--- /dev/null
+++ b/net-misc/netkit-bootparamd/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>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-misc/netkit-bootparamd/netkit-bootparamd-0.17-r2.ebuild b/net-misc/netkit-bootparamd/netkit-bootparamd-0.17-r2.ebuild
new file mode 100644
index 000000000000..134fd9613558
--- /dev/null
+++ b/net-misc/netkit-bootparamd/netkit-bootparamd-0.17-r2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="Netkit - bootparamd"
+HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/"
+SRC_URI="mirror://debian/pool/main/n/netkit-bootparamd/${PN}_${PV}.orig.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~hppa ~mips ppc sparc x86"
+IUSE=""
+
+DEPEND="!<=net-misc/netkit-bootpd-0.17-r2"
+RDEPEND=${DEPEND}
+
+src_unpack() {
+ unpack ${A}
+ epatch "${FILESDIR}"/0.17-jumpstart.patch
+}
+
+src_compile() {
+ # Note this is not an autoconf configure
+ ./configure || die "configure failed"
+ emake || die "make failed"
+}
+
+src_install() {
+ into /usr
+ dosbin rpc.bootparamd/bootparamd || die "installing binary failed"
+ dosym bootparamd /usr/sbin/rpc.bootparamd
+ doman rpc.bootparamd/bootparamd.8
+ dosym bootparamd.8.gz /usr/share/man/man8/rpc.bootparamd.8.gz
+ doman rpc.bootparamd/bootparams.5
+ dodoc README ChangeLog
+ newdoc rpc.bootparamd/README README.bootparamd
+}
diff --git a/net-misc/netkit-bootparamd/netkit-bootparamd-0.17-r3.ebuild b/net-misc/netkit-bootparamd/netkit-bootparamd-0.17-r3.ebuild
new file mode 100644
index 000000000000..539a9db5454a
--- /dev/null
+++ b/net-misc/netkit-bootparamd/netkit-bootparamd-0.17-r3.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Netkit - bootparamd"
+HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/"
+SRC_URI="mirror://debian/pool/main/n/${PN}/${PN}_${PV}.orig.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ~mips ppc sparc x86"
+IUSE=""
+
+DEPEND="!<=net-misc/netkit-bootpd-0.17-r2"
+RDEPEND=${DEPEND}
+
+src_prepare() {
+ epatch "${FILESDIR}"/0.17-jumpstart.patch
+
+ # don't reset LDFLAGS (bug #335457), manpages into /usr/share/man
+ sed -i -e '/^LDFLAGS=/d ; /MANDIR=/s:man:share/man:' configure || die
+
+ sed -i -e 's:install -s:install:' rpc.bootparamd/Makefile || die
+}
+
+src_configure() {
+ # Note this is not an autoconf configure
+ CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" ./configure || die
+}
+
+src_install() {
+ dodir usr/bin usr/sbin usr/share/man/man8 || die
+ emake INSTALLROOT="${D}" install || die
+
+ newconfd "${FILESDIR}"/bootparamd.confd bootparamd || die
+ newinitd "${FILESDIR}"/bootparamd.initd bootparamd || die
+
+ doman rpc.bootparamd/bootparams.5 || die
+ dodoc README ChangeLog || die
+ newdoc rpc.bootparamd/README README.bootparamd || die
+}
diff --git a/net-misc/netkit-bootpd/Manifest b/net-misc/netkit-bootpd/Manifest
new file mode 100644
index 000000000000..a511cfbb0a86
--- /dev/null
+++ b/net-misc/netkit-bootpd/Manifest
@@ -0,0 +1 @@
+DIST bootpd-2.4.tar.gz 99765 RMD160 88de24f8429bf40b5f3f9bd7c59c5cf66b7d6770 SHA1 689a7f0f4868984bbd1d7fe02923ebdbc3075161 SHA256 13edffae98fd92d99e23b19456b0199d9496fd2121c1325c762bccd23f586682
diff --git a/net-misc/netkit-bootpd/files/netkit-bootpd-2.4-misc.patch b/net-misc/netkit-bootpd/files/netkit-bootpd-2.4-misc.patch
new file mode 100644
index 000000000000..bf4183e932c7
--- /dev/null
+++ b/net-misc/netkit-bootpd/files/netkit-bootpd-2.4-misc.patch
@@ -0,0 +1,86 @@
+diff -Naur bootpd-2.4/bootpd.c bootpd-2.4.new/bootpd.c
+--- bootpd-2.4/bootpd.c 1995-02-19 16:53:02.000000000 +0100
++++ bootpd-2.4.new/bootpd.c 2006-03-01 12:32:06.665548576 +0100
+@@ -185,7 +185,7 @@
+ * main server loop is started.
+ */
+
+-void
++int
+ main(argc, argv)
+ int argc;
+ char **argv;
+@@ -559,9 +559,9 @@
+ break;
+ }
+ }
++ return(0);
+ }
+
+-
+
+
+ /*
+diff -Naur bootpd-2.4/bootpef.c bootpd-2.4.new/bootpef.c
+--- bootpd-2.4/bootpef.c 1994-11-27 14:36:13.000000000 +0100
++++ bootpd-2.4.new/bootpef.c 2006-03-01 12:32:06.652550552 +0100
+@@ -139,7 +139,7 @@
+ * Initialization such as command-line processing is done and then the
+ * main server loop is started.
+ */
+-void
++int
+ main(argc, argv)
+ int argc;
+ char **argv;
+@@ -275,6 +275,7 @@
+ mktagfile(hp);
+ hp = (struct host *) hash_NextEntry(nmhashtable);
+ }
++ return(0);
+ }
+
+
+diff -Naur bootpd-2.4/bootpgw.c bootpd-2.4.new/bootpgw.c
+--- bootpd-2.4/bootpgw.c 1994-11-27 14:36:21.000000000 +0100
++++ bootpd-2.4.new/bootpgw.c 2006-03-01 12:32:06.665548576 +0100
+@@ -152,7 +152,7 @@
+ * main server loop is started.
+ */
+
+-void
++int
+ main(argc, argv)
+ int argc;
+ char **argv;
+@@ -481,6 +481,7 @@
+ break;
+ }
+ }
++ return(0);
+ }
+
+
+diff -Naur bootpd-2.4/getether.c bootpd-2.4.new/getether.c
+--- bootpd-2.4/getether.c 1994-11-27 14:36:20.000000000 +0100
++++ bootpd-2.4.new/getether.c 2006-03-01 12:32:06.664548728 +0100
+@@ -340,7 +340,7 @@
+ if (ioctl(fd, SIOCGIFHWADDR, &phys) < 0) {
+ report(LOG_ERR, "getether: ioctl SIOCGIFHWADDR failed");
+ } else {
+- bcopy(phys.ifr_hwaddr, eap, EALEN);
++ bcopy(&phys.ifr_hwaddr, eap, EALEN);
+ rc = 0;
+ }
+ close(fd);
+diff -Naur bootpd-2.4/report.c bootpd-2.4.new/report.c
+--- bootpd-2.4/report.c 1994-11-27 14:36:16.000000000 +0100
++++ bootpd-2.4.new/report.c 2006-03-01 12:32:06.658549640 +0100
+@@ -10,6 +10,7 @@
+
+ #include <stdio.h>
+ #include <syslog.h>
++#include <errno.h>
+
+ #include "report.h"
+
diff --git a/net-misc/netkit-bootpd/files/netkit-bootpd-2.4.patch b/net-misc/netkit-bootpd/files/netkit-bootpd-2.4.patch
new file mode 100644
index 000000000000..1daf765a95e1
--- /dev/null
+++ b/net-misc/netkit-bootpd/files/netkit-bootpd-2.4.patch
@@ -0,0 +1,701 @@
+diff -ur bootpd-2.4.orig/bootpd.c bootpd-2.4/bootpd.c
+--- bootpd-2.4.orig/bootpd.c 1995-02-19 17:53:02.000000000 +0200
++++ bootpd-2.4/bootpd.c 2010-07-07 14:55:03.000000000 +0300
+@@ -117,14 +117,14 @@
+ extern void dumptab P((char *));
+
+ PRIVATE void catcher P((int));
+-PRIVATE int chk_access P((char *, int32 *));
++PRIVATE int chk_access P((char *, int32_t *));
+ #ifdef VEND_CMU
+ PRIVATE void dovend_cmu P((struct bootp *, struct host *));
+ #endif
+-PRIVATE void dovend_rfc1048 P((struct bootp *, struct host *, int32));
++PRIVATE void dovend_rfc1048 P((struct bootp *, struct host *, int32_t));
+ PRIVATE void handle_reply P((void));
+ PRIVATE void handle_request P((void));
+-PRIVATE void sendreply P((int forward, int32 dest_override));
++PRIVATE void sendreply P((int forward, int32_t dest_override));
+ PRIVATE void usage P((void));
+
+ #undef P
+@@ -185,7 +185,7 @@
+ * main server loop is started.
+ */
+
+-void
++int
+ main(argc, argv)
+ int argc;
+ char **argv;
+@@ -339,7 +339,7 @@
+ "%s: invalid timeout specification\n", progname);
+ break;
+ }
+- actualtimeout.tv_sec = (int32) (60 * n);
++ actualtimeout.tv_sec = (int32_t) (60 * n);
+ /*
+ * If the actual timeout is zero, pass a NULL pointer
+ * to select so it blocks indefinitely, otherwise,
+@@ -559,9 +559,9 @@
+ break;
+ }
+ }
++ return(0);
+ }
+
+-
+
+
+ /*
+@@ -616,9 +616,9 @@
+ struct bootp *bp = (struct bootp *) pktbuf;
+ struct host *hp = NULL;
+ struct host dummyhost;
+- int32 bootsize = 0;
++ int32_t bootsize = 0;
+ unsigned hlen, hashcode;
+- int32 dest;
++ int32_t dest;
+ char realpath[1024] = {""};
+ char *clntpath;
+ char *homedir, *bootfile;
+@@ -726,7 +726,7 @@
+ * with a timestamp lower than the threshold.
+ */
+ if (hp->flags.min_wait) {
+- u_int32 t = (u_int32) ntohs(bp->bp_secs);
++ uint32_t t = (uint32_t) ntohs(bp->bp_secs);
+ if (t < hp->min_wait) {
+ if (debug > 1)
+ report(LOG_INFO,
+@@ -997,7 +997,7 @@
+ PRIVATE void
+ sendreply(forward, dst_override)
+ int forward;
+- int32 dst_override;
++ int32_t dst_override;
+ {
+ struct bootp *bp = (struct bootp *) pktbuf;
+ struct in_addr dst;
+@@ -1110,12 +1110,12 @@
+ PRIVATE int
+ chk_access(path, filesize)
+ char *path;
+- int32 *filesize;
++ int32_t *filesize;
+ {
+ struct stat st;
+
+ if ((stat(path, &st) == 0) && (st.st_mode & (S_IREAD >> 6))) {
+- *filesize = (int32) st.st_size;
++ *filesize = (int32_t) st.st_size;
+ return 0;
+ } else {
+ return -1;
+@@ -1211,7 +1211,7 @@
+ dovend_rfc1048(bp, hp, bootsize)
+ struct bootp *bp;
+ struct host *hp;
+- int32 bootsize;
++ int32_t bootsize;
+ {
+ int bytesleft, len;
+ byte *vp;
+diff -ur bootpd-2.4.orig/bootpd.c-org bootpd-2.4/bootpd.c-org
+--- bootpd-2.4.orig/bootpd.c-org 1994-11-27 15:36:21.000000000 +0200
++++ bootpd-2.4/bootpd.c-org 2010-07-07 14:55:03.000000000 +0300
+@@ -117,14 +117,14 @@
+ extern void dumptab P((char *));
+
+ PRIVATE void catcher P((int));
+-PRIVATE int chk_access P((char *, int32 *));
++PRIVATE int chk_access P((char *, int32_t *));
+ #ifdef VEND_CMU
+ PRIVATE void dovend_cmu P((struct bootp *, struct host *));
+ #endif
+-PRIVATE void dovend_rfc1048 P((struct bootp *, struct host *, int32));
++PRIVATE void dovend_rfc1048 P((struct bootp *, struct host *, int32_t));
+ PRIVATE void handle_reply P((void));
+ PRIVATE void handle_request P((void));
+-PRIVATE void sendreply P((int forward, int32 dest_override));
++PRIVATE void sendreply P((int forward, int32_t dest_override));
+ PRIVATE void usage P((void));
+
+ #undef P
+@@ -339,7 +339,7 @@
+ "%s: invalid timeout specification\n", progname);
+ break;
+ }
+- actualtimeout.tv_sec = (int32) (60 * n);
++ actualtimeout.tv_sec = (int32_t) (60 * n);
+ /*
+ * If the actual timeout is zero, pass a NULL pointer
+ * to select so it blocks indefinitely, otherwise,
+@@ -606,9 +606,9 @@
+ struct bootp *bp = (struct bootp *) pktbuf;
+ struct host *hp = NULL;
+ struct host dummyhost;
+- int32 bootsize = 0;
++ int32_t bootsize = 0;
+ unsigned hlen, hashcode;
+- int32 dest;
++ int32_t dest;
+ char realpath[1024];
+ char *clntpath;
+ char *homedir, *bootfile;
+@@ -716,7 +716,7 @@
+ * with a timestamp lower than the threshold.
+ */
+ if (hp->flags.min_wait) {
+- u_int32 t = (u_int32) ntohs(bp->bp_secs);
++ uint32_t t = (uint32_t) ntohs(bp->bp_secs);
+ if (t < hp->min_wait) {
+ if (debug > 1)
+ report(LOG_INFO,
+@@ -987,7 +987,7 @@
+ PRIVATE void
+ sendreply(forward, dst_override)
+ int forward;
+- int32 dst_override;
++ int32_t dst_override;
+ {
+ struct bootp *bp = (struct bootp *) pktbuf;
+ struct in_addr dst;
+@@ -1100,12 +1100,12 @@
+ PRIVATE int
+ chk_access(path, filesize)
+ char *path;
+- int32 *filesize;
++ int32_t *filesize;
+ {
+ struct stat st;
+
+ if ((stat(path, &st) == 0) && (st.st_mode & (S_IREAD >> 6))) {
+- *filesize = (int32) st.st_size;
++ *filesize = (int32_t) st.st_size;
+ return 0;
+ } else {
+ return -1;
+@@ -1201,7 +1201,7 @@
+ dovend_rfc1048(bp, hp, bootsize)
+ struct bootp *bp;
+ struct host *hp;
+- int32 bootsize;
++ int32_t bootsize;
+ {
+ int bytesleft, len;
+ byte *vp;
+diff -ur bootpd-2.4.orig/bootpd.h bootpd-2.4/bootpd.h
+--- bootpd-2.4.orig/bootpd.h 1994-11-27 15:36:13.000000000 +0200
++++ bootpd-2.4/bootpd.h 2010-07-07 14:55:03.000000000 +0300
+@@ -180,8 +180,8 @@
+ htype, /* RFC826 says this should be 16-bits but
+ RFC951 only allocates 1 byte. . . */
+ haddr[MAXHADDRLEN];
+- int32 time_offset;
+- unsigned int32 bootsize,
++ int32_t time_offset;
++ uint32_t bootsize,
+ msg_size,
+ min_wait;
+ struct in_addr bootserver,
+diff -ur bootpd-2.4.orig/Bootpd-linux.diffs bootpd-2.4/Bootpd-linux.diffs
+--- bootpd-2.4.orig/Bootpd-linux.diffs 1995-02-28 02:14:29.000000000 +0200
++++ bootpd-2.4/Bootpd-linux.diffs 2010-07-07 14:55:03.000000000 +0300
+@@ -21,17 +21,17 @@
+ --- 494,499 ----
+ ***************
+ *** 619,625 ****
+- int32 bootsize = 0;
++ int32_t bootsize = 0;
+ unsigned hlen, hashcode;
+- int32 dest;
++ int32_t dest;
+ ! char realpath[1024] = {""};
+ char *clntpath;
+ char *homedir, *bootfile;
+ int n;
+ --- 609,615 ----
+- int32 bootsize = 0;
++ int32_t bootsize = 0;
+ unsigned hlen, hashcode;
+- int32 dest;
++ int32_t dest;
+ ! char realpath[1024];
+ char *clntpath;
+ char *homedir, *bootfile;
+diff -ur bootpd-2.4.orig/bootpef.c bootpd-2.4/bootpef.c
+--- bootpd-2.4.orig/bootpef.c 1994-11-27 15:36:13.000000000 +0200
++++ bootpd-2.4/bootpef.c 2010-07-07 14:55:03.000000000 +0300
+@@ -97,7 +97,7 @@
+ #define P(args) ()
+ #endif
+
+-static void dovend_rfc1048 P((struct bootp *, struct host *, int32));
++static void dovend_rfc1048 P((struct bootp *, struct host *, int32_t));
+ static void mktagfile P((struct host *));
+ static void usage P((void));
+
+@@ -139,7 +139,7 @@
+ * Initialization such as command-line processing is done and then the
+ * main server loop is started.
+ */
+-void
++int
+ main(argc, argv)
+ int argc;
+ char **argv;
+@@ -275,6 +275,7 @@
+ mktagfile(hp);
+ hp = (struct host *) hash_NextEntry(nmhashtable);
+ }
++ return(0);
+ }
+
+
+diff -ur bootpd-2.4.orig/bootpgw.c bootpd-2.4/bootpgw.c
+--- bootpd-2.4.orig/bootpgw.c 1994-11-27 15:36:21.000000000 +0200
++++ bootpd-2.4/bootpgw.c 2010-07-07 14:55:03.000000000 +0300
+@@ -139,7 +139,7 @@
+ int pktlen;
+ char *progname;
+ char *servername;
+-int32 server_ipa; /* Real server IP address, network order. */
++int32_t server_ipa; /* Real server IP address, network order. */
+
+ char myhostname[64];
+ struct in_addr my_ip_addr;
+@@ -152,7 +152,7 @@
+ * main server loop is started.
+ */
+
+-void
++int
+ main(argc, argv)
+ int argc;
+ char **argv;
+@@ -298,7 +298,7 @@
+ "%s: invalid timeout specification\n", progname);
+ break;
+ }
+- actualtimeout.tv_sec = (int32) (60 * n);
++ actualtimeout.tv_sec = (int32_t) (60 * n);
+ /*
+ * If the actual timeout is zero, pass a NULL pointer
+ * to select so it blocks indefinitely, otherwise,
+@@ -481,6 +481,7 @@
+ break;
+ }
+ }
++ return(0);
+ }
+
+
+diff -ur bootpd-2.4.orig/bootp.h bootpd-2.4/bootp.h
+--- bootpd-2.4.orig/bootp.h 1994-11-27 15:36:13.000000000 +0200
++++ bootpd-2.4/bootp.h 2010-07-07 14:55:03.000000000 +0300
+@@ -31,7 +31,7 @@
+ *
+ */
+
+-#include "bptypes.h" /* for int32, u_int32 */
++#include "bptypes.h" /* for int32_t, uint32_t */
+
+ #define BP_CHADDR_LEN 16
+ #define BP_SNAME_LEN 64
+@@ -44,7 +44,7 @@
+ unsigned char bp_htype; /* hardware addr type */
+ unsigned char bp_hlen; /* hardware addr length */
+ unsigned char bp_hops; /* gateway hops */
+- unsigned int32 bp_xid; /* transaction ID */
++ uint32_t bp_xid; /* transaction ID */
+ unsigned short bp_secs; /* seconds since boot began */
+ unsigned short bp_flags; /* RFC1532 broadcast, etc. */
+ struct in_addr bp_ciaddr; /* client IP address */
+@@ -133,13 +133,13 @@
+
+ struct cmu_vend {
+ char v_magic[4]; /* magic number */
+- unsigned int32 v_flags; /* flags/opcodes, etc. */
++ uint32_t v_flags; /* flags/opcodes, etc. */
+ struct in_addr v_smask; /* Subnet mask */
+ struct in_addr v_dgate; /* Default gateway */
+ struct in_addr v_dns1, v_dns2; /* Domain name servers */
+ struct in_addr v_ins1, v_ins2; /* IEN-116 name servers */
+ struct in_addr v_ts1, v_ts2; /* Time servers */
+- int32 v_unused[6]; /* currently unused */
++ int32_t v_unused[6]; /* currently unused */
+ };
+
+
+diff -ur bootpd-2.4.orig/bootptest.c bootpd-2.4/bootptest.c
+--- bootpd-2.4.orig/bootptest.c 1994-11-27 15:36:19.000000000 +0200
++++ bootpd-2.4/bootptest.c 2010-07-07 14:55:03.000000000 +0300
+@@ -125,12 +125,12 @@
+ char *servername = NULL;
+ char *vendor_file = NULL;
+ char *bp_file = NULL;
+- int32 server_addr; /* inet addr, network order */
++ int32_t server_addr; /* inet addr, network order */
+ int s; /* Socket file descriptor */
+ int n, tolen, fromlen, recvcnt;
+ int use_hwa = 0;
+- int32 vend_magic;
+- int32 xid;
++ int32_t vend_magic;
++ int32_t xid;
+
+ progname = strrchr(argv[0], '/');
+ if (progname)
+@@ -286,8 +286,8 @@
+ bp = (struct bootp *) sndbuf;
+ bzero(bp, sizeof(*bp));
+ bp->bp_op = BOOTREQUEST;
+- xid = (int32) getpid();
+- bp->bp_xid = (u_int32) htonl(xid);
++ xid = (int32_t) getpid();
++ bp->bp_xid = (uint32_t) htonl(xid);
+ if (bp_file)
+ strncpy(bp->bp_file, bp_file, BP_FILE_LEN);
+
+diff -ur bootpd-2.4.orig/bptypes.h bootpd-2.4/bptypes.h
+--- bootpd-2.4.orig/bptypes.h 1994-11-27 15:36:14.000000000 +0200
++++ bootpd-2.4/bptypes.h 2010-07-07 14:55:03.000000000 +0300
+@@ -1,18 +1,10 @@
+ /* bptypes.h */
++#include <sys/types.h>
+
+ #ifndef BPTYPES_H
+ #define BPTYPES_H
+
+ /*
+- * 32 bit integers are different types on various architectures
+- */
+-
+-#ifndef int32
+-#define int32 long
+-#endif
+-typedef unsigned int32 u_int32;
+-
+-/*
+ * Nice typedefs. . .
+ */
+
+diff -ur bootpd-2.4.orig/dovend.c bootpd-2.4/dovend.c
+--- bootpd-2.4.orig/dovend.c 1994-11-27 15:36:19.000000000 +0200
++++ bootpd-2.4/dovend.c 2010-07-07 14:55:03.000000000 +0300
+@@ -385,7 +385,7 @@
+
+ void
+ insert_u_long(value, dest)
+- u_int32 value;
++ uint32_t value;
+ byte **dest;
+ {
+ byte *temp;
+diff -ur bootpd-2.4.orig/dovend.h bootpd-2.4/dovend.h
+--- bootpd-2.4.orig/dovend.h 1994-11-27 15:36:14.000000000 +0200
++++ bootpd-2.4/dovend.h 2010-07-07 14:55:03.000000000 +0300
+@@ -8,6 +8,6 @@
+
+ extern int dovend_rfc1497 P((struct host *hp, u_char *buf, int len));
+ extern int insert_ip P((int, struct in_addr_list *, u_char **, int *));
+-extern void insert_u_long P((u_int32, u_char **));
++extern void insert_u_long P((uint32_t, u_char **));
+
+ #undef P
+diff -ur bootpd-2.4.orig/getether.c bootpd-2.4/getether.c
+--- bootpd-2.4.orig/getether.c 1994-11-27 15:36:20.000000000 +0200
++++ bootpd-2.4/getether.c 2010-07-07 14:58:09.000000000 +0300
+@@ -14,6 +14,8 @@
+ #include <ctype.h>
+ #include <syslog.h>
+
++#include <string.h> /* bzero and strcpy */
++
+ #include "report.h"
+ #define EALEN 6
+
+@@ -340,7 +342,7 @@
+ if (ioctl(fd, SIOCGIFHWADDR, &phys) < 0) {
+ report(LOG_ERR, "getether: ioctl SIOCGIFHWADDR failed");
+ } else {
+- bcopy(phys.ifr_hwaddr, eap, EALEN);
++ bcopy(&phys.ifr_hwaddr, eap, EALEN);
+ rc = 0;
+ }
+ close(fd);
+diff -ur bootpd-2.4.orig/lookup.c bootpd-2.4/lookup.c
+--- bootpd-2.4.orig/lookup.c 1994-11-27 15:36:15.000000000 +0200
++++ bootpd-2.4/lookup.c 2010-07-07 14:55:03.000000000 +0300
+@@ -69,7 +69,7 @@
+ int
+ lookup_ipa(hostname, result)
+ char *hostname;
+- u_int32 *result;
++ uint32_t *result;
+ {
+ struct hostent *hp;
+ hp = gethostbyname(hostname);
+@@ -90,10 +90,10 @@
+ */
+ int
+ lookup_netmask(addr, result)
+- u_int32 addr; /* both in network order */
+- u_int32 *result;
++ uint32_t addr; /* both in network order */
++ uint32_t *result;
+ {
+- int32 m, a;
++ int32_t m, a;
+
+ a = ntohl(addr);
+ m = 0;
+diff -ur bootpd-2.4.orig/lookup.h bootpd-2.4/lookup.h
+--- bootpd-2.4.orig/lookup.h 1994-11-27 15:36:15.000000000 +0200
++++ bootpd-2.4/lookup.h 2010-07-07 14:55:03.000000000 +0300
+@@ -1,6 +1,6 @@
+ /* lookup.h */
+
+-#include "bptypes.h" /* for int32, u_int32 */
++#include "bptypes.h" /* for int32_t, uint32_t */
+
+ #ifdef __STDC__
+ #define P(args) args
+@@ -9,7 +9,7 @@
+ #endif
+
+ extern u_char *lookup_hwa P((char *hostname, int htype));
+-extern int lookup_ipa P((char *hostname, u_int32 *addr));
+-extern int lookup_netmask P((u_int32 addr, u_int32 *mask));
++extern int lookup_ipa P((char *hostname, uint32_t *addr));
++extern int lookup_netmask P((uint32_t addr, uint32_t *mask));
+
+ #undef P
+diff -ur bootpd-2.4.orig/Makefile bootpd-2.4/Makefile
+--- bootpd-2.4.orig/Makefile 1995-02-28 12:59:19.000000000 +0200
++++ bootpd-2.4/Makefile 2010-07-07 14:57:07.000000000 +0300
+@@ -40,7 +40,7 @@
+ BINDIR=/usr/etc
+ MANDIR=/usr/local/man
+
+-CFLAGS= $(OPTDEFS) $(SYSDEFS) $(FILEDEFS) $(MOREDEFS)
++CFLAGS+= $(OPTDEFS) $(SYSDEFS) $(FILEDEFS) $(MOREDEFS)
+ PROGS= bootpd bootpef bootpgw bootptest
+ TESTS= trylook trygetif trygetea
+
+@@ -86,7 +86,7 @@
+
+ # DEC/OSF1 on the Alpha
+ alpha:
+- $(MAKE) SYSDEFS="-DETC_ETHERS -Dint32=int -D_SOCKADDR_LEN" \
++ $(MAKE) SYSDEFS="-DETC_ETHERS -Dint32_t=int -D_SOCKADDR_LEN" \
+ STRERROR=strerror.o
+
+ # Control Data EP/IX 1.4.3 system, BSD 4.3 mode
+@@ -124,7 +124,7 @@
+ # Linux
+ ###
+ linux:
+- $(MAKE) CC="gcc -O2" \
++ $(MAKE) CC="${CC}" \
+ SYSDEFS="-Dlinux" \
+ SYSLIBS="" \
+ LOG_FACILITY="-DLOG_BOOTP=LOG_LOCAL2" \
+@@ -143,36 +143,36 @@
+ OBJ_D= bootpd.o dovend.o readfile.o hash.o dumptab.o \
+ lookup.o getif.o hwaddr.o tzone.o report.o $(STRERROR)
+ bootpd: $(OBJ_D)
+- $(CC) -o $@ $(OBJ_D) $(SYSLIBS)
++ $(CC) $(LDFLAGS) -o $@ $(OBJ_D) $(SYSLIBS)
+
+ OBJ_EF= bootpef.o dovend.o readfile.o hash.o dumptab.o \
+ lookup.o hwaddr.o tzone.o report.o $(STRERROR)
+ bootpef: $(OBJ_EF)
+- $(CC) -o $@ $(OBJ_EF) $(SYSLIBS)
++ $(CC) $(LDFLAGS) -o $@ $(OBJ_EF) $(SYSLIBS)
+
+ OBJ_GW= bootpgw.o getif.o hwaddr.o report.o $(STRERROR)
+ bootpgw: $(OBJ_GW)
+- $(CC) -o $@ $(OBJ_GW) $(SYSLIBS)
++ $(CC) $(LDFLAGS) -o $@ $(OBJ_GW) $(SYSLIBS)
+
+ OBJ_TEST= bootptest.o print-bootp.o getif.o getether.o \
+ report.o $(STRERROR)
+ bootptest: $(OBJ_TEST)
+- $(CC) -o $@ $(OBJ_TEST) $(SYSLIBS)
++ $(CC) $(LDFLAGS) -o $@ $(OBJ_TEST) $(SYSLIBS)
+
+ # This is just for testing the lookup functions.
+ TRYLOOK= trylook.o lookup.o report.o $(STRERROR)
+ trylook : $(TRYLOOK)
+- $(CC) -o $@ $(TRYLOOK) $(SYSLIBS)
++ $(CC) $(LDFLAGS) -o $@ $(TRYLOOK) $(SYSLIBS)
+
+ # This is just for testing getif.
+ TRYGETIF= trygetif.o getif.o report.o $(STRERROR)
+ trygetif : $(TRYGETIF)
+- $(CC) -o $@ $(TRYGETIF) $(SYSLIBS)
++ $(CC) $(LDFLAGS) -o $@ $(TRYGETIF) $(SYSLIBS)
+
+ # This is just for testing getether.
+ TRYGETEA= trygetea.o getether.o report.o $(STRERROR)
+ trygetea : $(TRYGETEA)
+- $(CC) -o $@ $(TRYGETEA) $(SYSLIBS)
++ $(CC) $(LDFLAGS) -o $@ $(TRYGETEA) $(SYSLIBS)
+
+ # This rule just keeps the LOG_BOOTP define localized.
+ report.o : report.c
+diff -ur bootpd-2.4.orig/print-bootp.c bootpd-2.4/print-bootp.c
+--- bootpd-2.4.orig/print-bootp.c 1994-11-27 15:36:21.000000000 +0200
++++ bootpd-2.4/print-bootp.c 2010-07-07 14:55:03.000000000 +0300
+@@ -170,9 +170,9 @@
+
+ TCHECK(bp->bp_vend[0], vdlen);
+ printf(" vend");
+- if (!bcmp(bp->bp_vend, vm_rfc1048, sizeof(u_int32)))
++ if (!bcmp(bp->bp_vend, vm_rfc1048, sizeof(uint32_t)))
+ rfc1048_print(bp->bp_vend, vdlen);
+- else if (!bcmp(bp->bp_vend, vm_cmu, sizeof(u_int32)))
++ else if (!bcmp(bp->bp_vend, vm_cmu, sizeof(uint32_t)))
+ cmu_print(bp->bp_vend, vdlen);
+ else
+ other_print(bp->bp_vend, vdlen);
+@@ -192,7 +192,7 @@
+ * a: ASCII
+ * b: byte (8-bit)
+ * i: inet address
+- * l: int32
++ * l: int32_t
+ * s: short (16-bit)
+ */
+ char *
+@@ -281,7 +281,7 @@
+ u_char tag;
+ u_char *ep;
+ register int len, j;
+- u_int32 ul;
++ uint32_t ul;
+ u_short us;
+ struct in_addr ia;
+ char *optstr;
+@@ -289,7 +289,7 @@
+ printf("-rfc1395");
+
+ /* Step over magic cookie */
+- bp += sizeof(int32);
++ bp += sizeof(int32_t);
+ /* Setup end pointer */
+ ep = bp + length;
+ while (bp < ep) {
+diff -ur bootpd-2.4.orig/readfile.c bootpd-2.4/readfile.c
+--- bootpd-2.4.orig/readfile.c 1994-11-27 15:36:22.000000000 +0200
++++ bootpd-2.4/readfile.c 2010-07-07 14:55:03.000000000 +0300
+@@ -149,7 +149,7 @@
+
+ PRIVATE int nhosts; /* Number of hosts (/w hw or IP address) */
+ PRIVATE int nentries; /* Total number of entries */
+-PRIVATE int32 modtime = 0; /* Last modification time of bootptab */
++PRIVATE int32_t modtime = 0; /* Last modification time of bootptab */
+ PRIVATE char *current_hostname; /* Name of the current entry. */
+ PRIVATE char current_tagname[8];
+
+@@ -260,7 +260,7 @@
+ get_shared_string P((char **));
+ PRIVATE char *
+ get_string P((char **, char *, u_int *));
+-PRIVATE u_int32
++PRIVATE uint32_t
+ get_u_long P((char **));
+ PRIVATE boolean
+ goodname P((char *));
+@@ -279,7 +279,7 @@
+ PRIVATE byte *
+ prs_haddr P((char **, u_int));
+ PRIVATE int
+- prs_inetaddr P((char **, u_int32 *));
++ prs_inetaddr P((char **, uint32_t *));
+ PRIVATE void
+ read_entry P((FILE *, char *, u_int *));
+ PRIVATE char *
+@@ -415,7 +415,7 @@
+ */
+ if (goodname(hp->hostname->string)) {
+ char *hn = hp->hostname->string;
+- u_int32 value;
++ uint32_t value;
+ if (hp->flags.iaddr == 0) {
+ if (lookup_ipa(hn, &value)) {
+ report(LOG_ERR, "can not get IP addr for %s", hn);
+@@ -798,8 +798,8 @@
+ byte *tmphaddr;
+ struct shared_string *ss;
+ struct symbolmap *symbolptr;
+- u_int32 value;
+- int32 timeoff;
++ uint32_t value;
++ int32_t timeoff;
+ int i, numsymbols;
+ unsigned len;
+ int optype; /* Indicates boolean, addition, or deletion */
+@@ -1674,11 +1674,11 @@
+ PRIVATE int
+ prs_inetaddr(src, result)
+ char **src;
+- u_int32 *result;
++ uint32_t *result;
+ {
+ char tmpstr[MAXSTRINGLEN];
+- register u_int32 value;
+- u_int32 parts[4], *pp;
++ register uint32_t value;
++ uint32_t parts[4], *pp;
+ int n;
+ char *s, *t;
+
+@@ -1862,11 +1862,11 @@
+ * point to the first illegal character.
+ */
+
+-PRIVATE u_int32
++PRIVATE uint32_t
+ get_u_long(src)
+ char **src;
+ {
+- register u_int32 value, base;
++ register uint32_t value, base;
+ char c;
+
+ /*
+diff -ur bootpd-2.4.orig/report.c bootpd-2.4/report.c
+--- bootpd-2.4.orig/report.c 1994-11-27 15:36:16.000000000 +0200
++++ bootpd-2.4/report.c 2010-07-07 14:55:03.000000000 +0300
+@@ -10,6 +10,7 @@
+
+ #include <stdio.h>
+ #include <syslog.h>
++#include <errno.h>
+
+ #include "report.h"
+
+diff -ur bootpd-2.4.orig/tzone.c bootpd-2.4/tzone.c
+--- bootpd-2.4.orig/tzone.c 1994-11-27 15:36:17.000000000 +0200
++++ bootpd-2.4/tzone.c 2010-07-07 14:55:03.000000000 +0300
+@@ -19,7 +19,7 @@
+ #include "tzone.h"
+
+ /* This is what other modules use. */
+-int32 secondswest;
++int32_t secondswest;
+
+ /*
+ * Get our timezone offset so we can give it to clients if the
+diff -ur bootpd-2.4.orig/tzone.h bootpd-2.4/tzone.h
+--- bootpd-2.4.orig/tzone.h 1994-11-27 15:36:17.000000000 +0200
++++ bootpd-2.4/tzone.h 2010-07-07 14:55:03.000000000 +0300
+@@ -1,3 +1,3 @@
+ /* tzone.h */
+-extern int32 secondswest;
++extern int32_t secondswest;
+ extern void tzone_init();
diff --git a/net-misc/netkit-bootpd/metadata.xml b/net-misc/netkit-bootpd/metadata.xml
new file mode 100644
index 000000000000..5b80fb94c393
--- /dev/null
+++ b/net-misc/netkit-bootpd/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>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-misc/netkit-bootpd/netkit-bootpd-2.4-r1.ebuild b/net-misc/netkit-bootpd/netkit-bootpd-2.4-r1.ebuild
new file mode 100644
index 000000000000..a552889ed750
--- /dev/null
+++ b/net-misc/netkit-bootpd/netkit-bootpd-2.4-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+inherit eutils toolchain-funcs
+
+MY_P=${P/netkit-}
+
+DESCRIPTION="Netkit - bootp"
+HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netboot/"
+SRC_URI="ftp://ftp.uk.linux.org/pub/linux/Networking/netboot/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ~mips ppc ~sparc x86"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}.patch
+}
+
+src_compile() {
+ tc-export CC
+ emake linux || die
+}
+
+src_install() {
+ dosbin bootp{d,ef,gw,test} || die
+
+ for x in d ef gw test; do
+ dosym bootp${x} /usr/sbin/in.bootp${x} || die
+ done
+
+ doman *.5 *.8
+ dodoc Announce Changes Problems README{,-linux} ToDo
+}
diff --git a/net-misc/netkit-fingerd/Manifest b/net-misc/netkit-fingerd/Manifest
new file mode 100644
index 000000000000..7c8b384bbb99
--- /dev/null
+++ b/net-misc/netkit-fingerd/Manifest
@@ -0,0 +1 @@
+DIST bsd-finger_0.17.orig.tar.gz 25521 SHA256 84885d668d117ef50e01c7034a45d8343d747cec6212e40e8d08151bc18e13fa SHA512 07570a9a5797579273938ef728f222f483c733e78eb6acb00e2bce9ff9df29aa85ed715872032701c8f67fcbc7cf5501f12dc2b8234c30df7d25f50cc38359b0 WHIRLPOOL bb1fe0bcba7197513fb8a56a60f17a52049e82e37d1f21a2012943aeb5092cdcc711421e621536d9497383e26466237a7cfeb50884e23575c2b522b2784fb39b
diff --git a/net-misc/netkit-fingerd/files/fingerd.xinetd b/net-misc/netkit-fingerd/files/fingerd.xinetd
new file mode 100644
index 000000000000..f5a86e3686b3
--- /dev/null
+++ b/net-misc/netkit-fingerd/files/fingerd.xinetd
@@ -0,0 +1,10 @@
+service finger
+{
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ user = nobody
+ server = /usr/sbin/in.fingerd
+ server_args = -w
+ disable = yes
+}
diff --git a/net-misc/netkit-fingerd/files/netkit-fingerd-0.17-name-check.patch b/net-misc/netkit-fingerd/files/netkit-fingerd-0.17-name-check.patch
new file mode 100644
index 000000000000..aa40221f4e01
--- /dev/null
+++ b/net-misc/netkit-fingerd/files/netkit-fingerd-0.17-name-check.patch
@@ -0,0 +1,26 @@
+fix possible usage of uninitialized memory
+
+http://bugs.gentoo.org/80286
+
+--- bsd-finger-0.17/finger/lprint.c
++++ bsd-finger-0.17/finger/lprint.c
+@@ -100,7 +100,7 @@
+ * office, office phone, home phone if available
+ */
+ xprintf("Login: %-15s\t\t\tName: %s\nDirectory: %-25s",
+- pn->name, pn->realname, pn->dir);
++ pn->name, pn->realname ? pn->realname : "", pn->dir);
+ xprintf("\tShell: %-s\n", *pn->shell ? pn->shell : _PATH_BSHELL);
+
+ /*
+--- bsd-finger-0.17/finger/util.c
++++ bsd-finger-0.17/finger/util.c
+@@ -149,6 +149,8 @@
+ rname[j] = 0;
+
+ pn->realname = rname;
++ } else {
++ pn->realname = NULL;
+ }
+
+ pn->office = fields[1] ? strdup(fields[1]) : NULL;
diff --git a/net-misc/netkit-fingerd/files/netkit-fingerd-0.17-r2-gentoo.diff b/net-misc/netkit-fingerd/files/netkit-fingerd-0.17-r2-gentoo.diff
new file mode 100644
index 000000000000..e7c2d776147d
--- /dev/null
+++ b/net-misc/netkit-fingerd/files/netkit-fingerd-0.17-r2-gentoo.diff
@@ -0,0 +1,22 @@
+--- bsd-finger-0.17/finger/lprint.c~ Tue Sep 14 12:51:11 1999
++++ bsd-finger-0.17/finger/lprint.c Sun Apr 29 21:49:04 2001
+@@ -48,7 +48,7 @@
+ #include <sys/types.h>
+ #include <sys/file.h>
+ #include <sys/stat.h>
+-#include <sys/time.h>
++#include <time.h>
+ #include "finger.h"
+
+ static void lprint(PERSON *pn);
+--- bsd-finger-0.17/finger/sprint.c~ Sun Dec 12 19:59:33 1999
++++ bsd-finger-0.17/finger/sprint.c Sun Apr 29 21:49:22 2001
+@@ -40,7 +40,7 @@
+ #endif /* not lint */
+
+ #include <sys/types.h>
+-#include <sys/time.h>
++#include <time.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
diff --git a/net-misc/netkit-fingerd/metadata.xml b/net-misc/netkit-fingerd/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/net-misc/netkit-fingerd/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>base-system</herd>
+</pkgmetadata>
diff --git a/net-misc/netkit-fingerd/netkit-fingerd-0.17-r3.ebuild b/net-misc/netkit-fingerd/netkit-fingerd-0.17-r3.ebuild
new file mode 100644
index 000000000000..12735af1caf9
--- /dev/null
+++ b/net-misc/netkit-fingerd/netkit-fingerd-0.17-r3.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+MY_PN="${PN/netkit/bsd}"
+MY_PN="${MY_PN/rd/r}"
+DESCRIPTION="Netkit - fingerd and finger client"
+HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/"
+SRC_URI="mirror://debian/pool/main/b/${MY_PN}/${MY_PN}_${PV}.orig.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+IUSE=""
+
+S=${WORKDIR}/${MY_PN}-${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-r2-gentoo.diff
+ epatch "${FILESDIR}"/${P}-name-check.patch #80286
+}
+
+src_configure() {
+ # We'll skip this stage as the configure script is crappy and not really
+ # needed -- src_install installs all files by hand.
+ touch MCONFIG
+ tc-export CC
+}
+
+src_compile() {
+ emake CC="${CC}"
+}
+
+src_install() {
+ dobin finger/finger
+ dosbin fingerd/fingerd
+ dosym fingerd /usr/sbin/in.fingerd
+ doman finger/finger.1 fingerd/fingerd.8
+ dosym fingerd.8 /usr/share/man/man8/in.fingerd.8
+ dodoc README ChangeLog BUGS
+
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/fingerd.xinetd fingerd
+}
diff --git a/net-misc/netkit-routed/Manifest b/net-misc/netkit-routed/Manifest
new file mode 100644
index 000000000000..c80f3823d840
--- /dev/null
+++ b/net-misc/netkit-routed/Manifest
@@ -0,0 +1 @@
+DIST netkit-routed_0.17.orig.tar.gz 36435 SHA256 0d6e7eb31e2ece9eccca1e0cbf01425b8a749bf08b83fbacad4164cc67784824 SHA512 9dea1048af22d5bbcec0aa9722a518e81d4415c7cc3219ae13d38450b0960fb30e0b082648717336c5870fa65f921a3830aadca23d0595ca719f89f4615afbc9 WHIRLPOOL 7a5ab21cf9faf11361f70b2efcaf6a6be04534b6f7696ce61ff462734e93043d764ed1a88dff8f52eeb016883848b51607d87a3112777bd06ee64d08cc7f4bf1
diff --git a/net-misc/netkit-routed/files/netkit-routed-0.17-printf.patch b/net-misc/netkit-routed/files/netkit-routed-0.17-printf.patch
new file mode 100644
index 000000000000..16607a22b9b1
--- /dev/null
+++ b/net-misc/netkit-routed/files/netkit-routed-0.17-printf.patch
@@ -0,0 +1,20 @@
+echo -n isn't supported by all shells, use printf instead, which is portable.
+
+Patch by Andrew Miller.
+
+https://bugs.gentoo.org/529992
+
+--- a/configure
++++ b/configure
+@@ -235,10 +235,7 @@
+
+ echo 'Generating MCONFIG...'
+ (
+- echo -n '# Generated by configure (confgen version 2) on '
+- date
+- echo '#'
+- echo
++ printf "#\n# Generated by configure (confgen version 2) on $(date)\n#\n\n"
+
+ echo "SBINDIR=$SBINDIR"
+ echo "MANDIR=$MANDIR"
diff --git a/net-misc/netkit-routed/files/netkit-routed-0.17-time.patch b/net-misc/netkit-routed/files/netkit-routed-0.17-time.patch
new file mode 100644
index 000000000000..9aa866d48367
--- /dev/null
+++ b/net-misc/netkit-routed/files/netkit-routed-0.17-time.patch
@@ -0,0 +1,20 @@
+--- a/routed/main.c 2000-01-06 00:16:12.000000000 +0100
++++ b/routed/main.c 2010-08-26 23:04:56.000000000 +0200
+@@ -57,6 +57,7 @@
+ #include <syslog.h>
+ #include <assert.h>
+ #include <sys/utsname.h>
++#include <time.h>
+
+ #define BUFSPACE (127*1024) /* max. input buffer size to request */
+
+--- a/routed/trace.c 2000-07-23 01:25:11.000000000 +0200
++++ b/routed/trace.c 2010-08-26 23:05:17.000000000 +0200
+@@ -50,6 +50,7 @@
+ #include <syslog.h>
+ #include <errno.h>
+ #include "pathnames.h"
++#include <time.h>
+
+ #define NRECORDS 50 /* size of circular trace buffer */
+
diff --git a/net-misc/netkit-routed/files/routed.confd b/net-misc/netkit-routed/files/routed.confd
new file mode 100644
index 000000000000..1b27653ec59d
--- /dev/null
+++ b/net-misc/netkit-routed/files/routed.confd
@@ -0,0 +1,16 @@
+# /etc/conf.d/routed
+
+# Normally routed is simply run as "/usr/sbin/routed". Set this
+# option to run routed with additional parameters, for example:
+#
+# -d Enable additional debugging information
+# -s Force routed to supply routing information
+# -q Opposite of the -s option
+#
+# Additional options are listed in the routed(8) manual page.
+#
+# Our default configuration is to run quietly, i.e. don't publish
+# routes. This is to keep from catching users unaware since routed
+# will publish routes if there's more than one interface configured on
+# the machine.
+ROUTED_OPTS="-q"
diff --git a/net-misc/netkit-routed/files/routed.initd b/net-misc/netkit-routed/files/routed.initd
new file mode 100644
index 000000000000..562af6f10adb
--- /dev/null
+++ b/net-misc/netkit-routed/files/routed.initd
@@ -0,0 +1,21 @@
+#!/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 routed"
+ /sbin/start-stop-daemon --start --quiet \
+ --exec /usr/sbin/routed -- ${ROUTED_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping routed"
+ /sbin/start-stop-daemon --stop --quiet --exec /usr/sbin/routed
+ eend $?
+}
diff --git a/net-misc/netkit-routed/metadata.xml b/net-misc/netkit-routed/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/net-misc/netkit-routed/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/netkit-routed/netkit-routed-0.17-r4.ebuild b/net-misc/netkit-routed/netkit-routed-0.17-r4.ebuild
new file mode 100644
index 000000000000..8910c4453c6d
--- /dev/null
+++ b/net-misc/netkit-routed/netkit-routed-0.17-r4.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Netkit - routed"
+HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/"
+SRC_URI="mirror://debian/pool/main/n/netkit-routed/${PN}_${PV}.orig.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="alpha ~amd64 ~mips ppc sparc x86"
+IUSE=""
+
+src_prepare() {
+ sed -i configure -e '/^LDFLAGS=/d' || die
+ epatch "${FILESDIR}"/${P}-time.patch
+ epatch "${FILESDIR}"/${P}-printf.patch #529992
+}
+
+src_configure() {
+ # Not an autotools generated configure script
+ ./configure --with-c-compiler=$(tc-getCC) || die
+}
+
+src_install() {
+ # ripquery
+ dosbin ripquery/ripquery
+ doman ripquery/ripquery.8
+
+ # routed
+ dosbin routed/routed
+ dosym routed /usr/sbin/in.routed
+ doman routed/routed.8
+ dosym routed.8 /usr/share/man/man8/in.routed.8
+
+ # docs
+ dodoc README ChangeLog
+ newdoc routed/README README.routed
+
+ # init scripts
+ newconfd "${FILESDIR}"/routed.confd routed
+ newinitd "${FILESDIR}"/routed.initd routed
+}
diff --git a/net-misc/netkit-rsh/Manifest b/net-misc/netkit-rsh/Manifest
new file mode 100644
index 000000000000..9528963fc1d3
--- /dev/null
+++ b/net-misc/netkit-rsh/Manifest
@@ -0,0 +1,3 @@
+DIST netkit-rsh-0.17-patches-3.tar.lzma 13875 SHA256 e7ab523e06cf12cf2b88b404106fd56534ec15b65621e660dfd6e833037680f0 SHA512 0d9c6a8a8d13264b8f2eb6b62e6c65b67cf8b09bd36043acae405c7b2154724733db15d653e4f7ac7d21feebcfa6cd365ca89993fc77eabc5a709d7a6383b187 WHIRLPOOL 9aff6b1cbe1a94cd8bfb371c007cbdd0f0ad6b048fe769eba67bef5b66a4a7fdc3280fef93a9b27be78434e2d97f122445c563aa413a83a8b22224b101ba0df5
+DIST netkit-rsh-0.17.tar.gz 58268 SHA256 edcac7fa18015f0bc04e573f3f54ae3b638d71335df1ad7dae692779914ad669 SHA512 0d8da4a779da137f7b3f158ad010b71f2357c86a2160dbd19331cbf45f86a46110cdfdfd3c4ba2d19ddf3634917bf981eb91bfde02c3cdbc946df8695db75218 WHIRLPOOL 25ea38f5f7883fc89ab9c1dce6b850b177ec78ea2d619341f6001acca61e619bbf1e9d6b79b13eee164d16261ba1b72d07c74f522f192272ce61a2280c4a01b4
+DIST rexec-1.5.tar.gz 18469 SHA256 9bcf9986eb9637d1b8e8ab62a61c80f3422d628e837e72c6ad8c2e38604ccaf4 SHA512 7ed455a921ad71749154bd8e586ac2a624f357b56be17db73b9ed7c1ca1bc19cfb9aee748f79cc649184dfb535ffe5e887643b73a25c3fb6520d4e19fae7333a WHIRLPOOL 3356766c1c048da0c8be0a62cfb2d1f2c13aad0122bf4bfd8540f0e3622a40e9646aa2a9ebbe2f588d9d18a84f70960a60eb496f727b4367f4e20f9d9548ca6d
diff --git a/net-misc/netkit-rsh/files/rexec.pamd-pambase b/net-misc/netkit-rsh/files/rexec.pamd-pambase
new file mode 100644
index 000000000000..8657883e32aa
--- /dev/null
+++ b/net-misc/netkit-rsh/files/rexec.pamd-pambase
@@ -0,0 +1,6 @@
+# For root login to succeed here with pam_securetty, "rexec" must be
+# listed in /etc/securetty.
+auth required pam_securetty.so
+auth include system-remote-login
+account include system-remote-login
+session include system-remote-login
diff --git a/net-misc/netkit-rsh/files/rexec.xinetd b/net-misc/netkit-rsh/files/rexec.xinetd
new file mode 100644
index 000000000000..fea3710ec664
--- /dev/null
+++ b/net-misc/netkit-rsh/files/rexec.xinetd
@@ -0,0 +1,12 @@
+service exec
+{
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ user = root
+ group = tty
+ server = /usr/sbin/in.rexecd
+ log_on_success = PID HOST USERID EXIT DURATION
+ log_on_failure = USERID ATTEMPT
+ disable = yes
+}
diff --git a/net-misc/netkit-rsh/files/rlogin.pamd-pambase b/net-misc/netkit-rsh/files/rlogin.pamd-pambase
new file mode 100644
index 000000000000..9b4481edd6f8
--- /dev/null
+++ b/net-misc/netkit-rsh/files/rlogin.pamd-pambase
@@ -0,0 +1,9 @@
+#%PAM-1.0
+# For root login to succeed here with pam_securetty, "rlogin" must be
+# listed in /etc/securetty.
+auth required pam_securetty.so
+auth sufficient pam_rhosts.so
+auth include system-remote-login
+account include system-remote-login
+password include system-remote-login
+session include system-remote-login
diff --git a/net-misc/netkit-rsh/files/rlogin.xinetd b/net-misc/netkit-rsh/files/rlogin.xinetd
new file mode 100644
index 000000000000..76a99beba8d1
--- /dev/null
+++ b/net-misc/netkit-rsh/files/rlogin.xinetd
@@ -0,0 +1,12 @@
+service login
+{
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ user = root
+ group = tty
+ server = /usr/sbin/in.rlogind
+ log_on_success = PID HOST USERID EXIT DURATION
+ log_on_failure = USERID ATTEMPT
+ disable = yes
+}
diff --git a/net-misc/netkit-rsh/files/rsh.pamd-pambase b/net-misc/netkit-rsh/files/rsh.pamd-pambase
new file mode 100644
index 000000000000..460a2cd99f99
--- /dev/null
+++ b/net-misc/netkit-rsh/files/rsh.pamd-pambase
@@ -0,0 +1,11 @@
+#%PAM-1.0
+# For root login to succeed here with pam_securetty, "rsh" must be
+# listed in /etc/securetty.
+auth required pam_securetty.so
+
+# Uncomment this and comment the following to use rhosts_auth module
+#auth required pam_rhosts.so
+auth include system-remote-login
+
+account include system-remote-login
+session include system-remote-login
diff --git a/net-misc/netkit-rsh/files/rsh.xinetd b/net-misc/netkit-rsh/files/rsh.xinetd
new file mode 100644
index 000000000000..3d1fa6527943
--- /dev/null
+++ b/net-misc/netkit-rsh/files/rsh.xinetd
@@ -0,0 +1,12 @@
+service shell
+{
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ user = root
+ group = tty
+ server = /usr/sbin/in.rshd
+ log_on_success = PID HOST USERID EXIT DURATION
+ log_on_failure = USERID ATTEMPT
+ disable = yes
+}
diff --git a/net-misc/netkit-rsh/metadata.xml b/net-misc/netkit-rsh/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/net-misc/netkit-rsh/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>base-system</herd>
+</pkgmetadata>
diff --git a/net-misc/netkit-rsh/netkit-rsh-0.17-r10.ebuild b/net-misc/netkit-rsh/netkit-rsh-0.17-r10.ebuild
new file mode 100644
index 000000000000..459b4ba58383
--- /dev/null
+++ b/net-misc/netkit-rsh/netkit-rsh-0.17-r10.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils pam toolchain-funcs fcaps
+
+PATCHVER="3"
+DESCRIPTION="Netkit's Remote Shell Suite: rexec{,d} rlogin{,d} rsh{,d}"
+HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/"
+SRC_URI="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${P}.tar.gz
+ mirror://gentoo/rexec-1.5.tar.gz
+ mirror://gentoo/${P}-patches-${PATCHVER}.tar.lzma"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
+IUSE="pam"
+
+RDEPEND=">=sys-libs/ncurses-5.2
+ pam? ( >=sys-auth/pambase-20080219.1 )"
+DEPEND="${RDEPEND}
+ || ( app-arch/xz-utils app-arch/lzma-utils )"
+
+FILECAPS=(
+ cap_net_bind_service usr/bin/r{cp,login,sh}
+)
+
+src_unpack() {
+ default
+
+ cd "${S}"
+ rm -rf rexec
+ mv ../rexec rexec
+}
+
+src_prepare() {
+ [[ -n ${PATCHVER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+
+ if tc-is-cross-compiler ; then
+ # Can't do runtime tests when cross-compiling
+ sed -i -e "s|./__conftest|: ./__conftest|" configure
+ fi
+}
+
+src_configure() {
+ tc-export CC
+ ./configure $(use pam && echo --without-pam) || die
+
+ sed -i \
+ -e "s:-pipe -O2:${CFLAGS}:" \
+ -e "/^LDFLAGS=$/d" \
+ -e "s:-Wpointer-arith::" \
+ MCONFIG || die
+}
+
+src_install() {
+ local b exe
+ insinto /etc/xinetd.d
+ for b in rcp rexec{,d} rlogin{,d} rsh{,d} ; do
+ if [[ ${b} == *d ]] ; then
+ dosbin ${b}/${b}
+ dosym ${b} /usr/sbin/in.${b}
+ doman ${b}/${b}.8
+ else
+ dobin ${b}/${b}
+ doman ${b}/${b}.1
+ if [[ ${b} != "rcp" ]]; then
+ newins "${FILESDIR}"/${b}.xinetd ${b}
+ newpamd "${FILESDIR}/${b}.pamd-pambase" ${b}
+ fi
+ fi
+ done
+ dodoc README ChangeLog BUGS
+ newdoc rexec/README README.rexec
+}
diff --git a/net-misc/netkit-rsh/netkit-rsh-0.17-r9.ebuild b/net-misc/netkit-rsh/netkit-rsh-0.17-r9.ebuild
new file mode 100644
index 000000000000..deefa64d15e8
--- /dev/null
+++ b/net-misc/netkit-rsh/netkit-rsh-0.17-r9.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils pam toolchain-funcs
+
+PATCHVER="3"
+DESCRIPTION="Netkit's Remote Shell Suite: rexec{,d} rlogin{,d} rsh{,d}"
+HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/"
+SRC_URI="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${P}.tar.gz
+ mirror://gentoo/rexec-1.5.tar.gz
+ mirror://gentoo/${P}-patches-${PATCHVER}.tar.lzma"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
+IUSE="pam"
+
+RDEPEND=">=sys-libs/ncurses-5.2
+ pam? ( >=sys-auth/pambase-20080219.1 )"
+DEPEND="${RDEPEND}
+ || ( app-arch/xz-utils app-arch/lzma-utils )"
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ rm -rf rexec
+ mv ../rexec rexec
+
+ if [[ -n ${PATCHVER} ]] ; then
+ EPATCH_SUFFIX="patch"
+ epatch "${WORKDIR}"/patch
+ fi
+
+ if tc-is-cross-compiler ; then
+ # Can't do runtime tests when cross-compiling
+ sed -i -e "s|./__conftest|: ./__conftest|" configure
+ fi
+}
+
+src_compile() {
+ local myconf
+ use pam || myconf="--without-pam"
+ tc-export CC
+ ./configure ${myconf} || die
+
+ sed -i \
+ -e "s:-pipe -O2:${CFLAGS}:" \
+ -e "/^LDFLAGS=$/d" \
+ -e "s:-Wpointer-arith::" \
+ MCONFIG || die "could not sed MCONFIG"
+ emake || die
+}
+
+src_install() {
+ local b exe
+ insinto /etc/xinetd.d
+ for b in rcp rexec{,d} rlogin{,d} rsh{,d} ; do
+ if [[ ${b:0-1} == "d" ]] ; then
+ dosbin ${b}/${b} || die "dosbin ${b} failed"
+ dosym ${b} /usr/sbin/in.${b}
+ doman ${b}/${b}.8
+ else
+ dobin ${b}/${b} || die "dobin ${b} failed"
+ doman ${b}/${b}.1
+ [[ ${b} != "rexec" ]] \
+ && fperms 4711 /usr/bin/${b}
+ if [[ ${b} != "rcp" ]]; then
+ newins "${FILESDIR}"/${b}.xinetd ${b}
+ newpamd "${FILESDIR}/${b}.pamd-pambase" ${b}
+ fi
+ fi
+ done
+ dodoc README ChangeLog BUGS
+ newdoc rexec/README README.rexec
+}
diff --git a/net-misc/netkit-rusers/Manifest b/net-misc/netkit-rusers/Manifest
new file mode 100644
index 000000000000..1cad7bcc0827
--- /dev/null
+++ b/net-misc/netkit-rusers/Manifest
@@ -0,0 +1 @@
+DIST netkit-rusers-0.17.tar.gz 22063 SHA256 f00138651865ad2dcfec5dedda0cda403cb80c4ab68efcc3bbccafe198c24b6d
diff --git a/net-misc/netkit-rusers/files/netkit-rusers-0.17-include.patch b/net-misc/netkit-rusers/files/netkit-rusers-0.17-include.patch
new file mode 100644
index 000000000000..9dccf5442c41
--- /dev/null
+++ b/net-misc/netkit-rusers/files/netkit-rusers-0.17-include.patch
@@ -0,0 +1,30 @@
+--- ./rup/err.c.orig 1997-04-06 00:13:31.000000000 +0200
++++ ./rup/err.c 2010-12-31 19:29:41.000000000 +0100
+@@ -8,6 +8,7 @@
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <err.h>
++#include <stdlib.h> /* exit() */
+
+ void err(int eval, const char *fmt, ...) {
+ va_list ap;
+--- ./rpc.rusersd/rusers_proc.c.orig 2000-07-23 05:11:56.000000000 +0200
++++ ./rpc.rusersd/rusers_proc.c 2010-12-31 19:27:50.000000000 +0100
+@@ -40,6 +40,7 @@
+ #include <sys/socket.h>
+ #include <sys/param.h>
+ #include <sys/stat.h>
++#include <time.h> /* time() */
+ #ifdef XIDLE
+ #include <setjmp.h>
+ #include <X11/Xlib.h>
+--- ./rusers/rusers.c.orig 1999-12-12 20:32:05.000000000 +0100
++++ ./rusers/rusers.c 2010-12-31 19:30:33.000000000 +0100
+@@ -44,6 +44,7 @@
+ #include <utmp.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <time.h> /* ctime() */
+
+ #include "../version.h"
+
diff --git a/net-misc/netkit-rusers/metadata.xml b/net-misc/netkit-rusers/metadata.xml
new file mode 100644
index 000000000000..59e2b8f78cb5
--- /dev/null
+++ b/net-misc/netkit-rusers/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>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/netkit-rusers/netkit-rusers-0.17-r1.ebuild b/net-misc/netkit-rusers/netkit-rusers-0.17-r1.ebuild
new file mode 100644
index 000000000000..b0c474aa8408
--- /dev/null
+++ b/net-misc/netkit-rusers/netkit-rusers-0.17-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Netkit - rup rpc.rusersd rusers"
+HOMEPAGE="http://www.hcs.harvard.edu/~dholland/computers/netkit.html"
+SRC_URI="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-include.patch
+ sed -i configure -e '/^LDFLAGS=/d' || die "sed configure"
+}
+
+src_configure() {
+ ./configure --with-c-compiler=$(tc-getCC) || die
+ sed -i MCONFIG -e "s:-O2::" -e "s:-Wpointer-arith::" || die "sed MCONFIG"
+}
+
+src_compile() {
+ # see bug #244867 for parallel make issues
+ emake -j1 || die
+}
+
+src_install() {
+ into /usr
+ dobin rup/rup
+ doman rup/rup.1
+ dobin rpc.rusersd/rusersd
+ doman rpc.rusersd/rpc.rusersd.8
+ dobin rusers/rusers
+ doman rusers/rusers.1
+ dodoc README ChangeLog
+}
diff --git a/net-misc/netkit-rwall/Manifest b/net-misc/netkit-rwall/Manifest
new file mode 100644
index 000000000000..1f595d7c3458
--- /dev/null
+++ b/net-misc/netkit-rwall/Manifest
@@ -0,0 +1 @@
+DIST netkit-rwall-0.17.tar.gz 11861 SHA256 97bd59f787d19bc3dff633d35eeb627176574aa7adf65b64a6a4d8dc08f752ed
diff --git a/net-misc/netkit-rwall/metadata.xml b/net-misc/netkit-rwall/metadata.xml
new file mode 100644
index 000000000000..59e2b8f78cb5
--- /dev/null
+++ b/net-misc/netkit-rwall/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>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/netkit-rwall/netkit-rwall-0.17-r1.ebuild b/net-misc/netkit-rwall/netkit-rwall-0.17-r1.ebuild
new file mode 100644
index 000000000000..302c840dcdce
--- /dev/null
+++ b/net-misc/netkit-rwall/netkit-rwall-0.17-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="Netkit - rwall"
+HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/"
+SRC_URI="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_prepare() {
+ sed \
+ -e "s:-O2 -Wall:-Wall:" \
+ -e "s:-Wpointer-arith::" \
+ -i MCONFIG.in || die
+ sed \
+ -e '/^LDFLAGS=/d' \
+ -i configure || die "sed configure"
+}
+
+src_configure() {
+ ./configure \
+ --verbose \
+ --with-c-compiler=$(tc-getCC) || die
+}
+
+src_install() {
+ dobin rwall/rwall
+ doman rwall/rwall.1 rpc.rwalld/rpc.rwalld.8
+ dosbin rpc.rwalld/rwalld
+ dosym rpc.rwalld.8 /usr/share/man/man8/rwall.8
+ dodoc README ChangeLog BUGS
+}
diff --git a/net-misc/netkit-rwho/Manifest b/net-misc/netkit-rwho/Manifest
new file mode 100644
index 000000000000..1802cc70b712
--- /dev/null
+++ b/net-misc/netkit-rwho/Manifest
@@ -0,0 +1,2 @@
+DIST netkit-rwho-0.17-patches.tar.bz2 7725 SHA256 c666d60fa21538f909374cdc1a3e661875559c3859f759fe060f35047dc3e54e SHA512 947f62316220791af7f36eee3d44481224ebda3410fb3e527fb1f066a663f56d6aec44483955edbbff1936972e86aeff9d6905d123ed78cb10d72ee6cb0f7454 WHIRLPOOL 5b8c47050a44ee3a80b6b622da9b947e30176d535cce2682a160df3c46153a321d279a30386df4aa21c69bdb12ecbaf20e0fa5867648e96917697f3ede394842
+DIST netkit-rwho-0.17.tar.gz 20610 SHA256 0409e2ce4bfdb2dacb2c193d0fedfc49bb975cb057c5c6b0ffcca603a1188da7 SHA512 ea1444b613d95f53100cf8f8d374dd132611432380b9142182c4fb5595014605896656b9a272945534371265e226fe591c22c12a9bdde9c763794249660e7b58 WHIRLPOOL 65a7d4851cba7c94d240e56e254df4978741eb780dd269063773620289894cc7269e5491e5955c22746345f4e4191379d10a022a1317a091a1e3a13210de1418
diff --git a/net-misc/netkit-rwho/files/netkit-rwho-0.17-confd b/net-misc/netkit-rwho/files/netkit-rwho-0.17-confd
new file mode 100644
index 000000000000..3a5f684f1544
--- /dev/null
+++ b/net-misc/netkit-rwho/files/netkit-rwho-0.17-confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/rwhod: config file for /etc/init.d/rwhod
+
+# rwhod arguments
+RWHOD_OPTIONS="-b"
diff --git a/net-misc/netkit-rwho/files/netkit-rwho-0.17-cron b/net-misc/netkit-rwho/files/netkit-rwho-0.17-cron
new file mode 100644
index 000000000000..96c6ddf6d2f1
--- /dev/null
+++ b/net-misc/netkit-rwho/files/netkit-rwho-0.17-cron
@@ -0,0 +1,8 @@
+#!/bin/sh
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+#
+# Clean up stale rwho entries after one month
+find /var/spool/rwho -mindepth 1 -maxdepth 1 -type f ! -name .keep \
+ ! -ctime -30 -print0 | xargs -r0 rm -f
diff --git a/net-misc/netkit-rwho/files/netkit-rwho-0.17-printf.patch b/net-misc/netkit-rwho/files/netkit-rwho-0.17-printf.patch
new file mode 100644
index 000000000000..89eaf82881f8
--- /dev/null
+++ b/net-misc/netkit-rwho/files/netkit-rwho-0.17-printf.patch
@@ -0,0 +1,23 @@
+echo -n isn't supported by all shells, use printf instead, which is portable.
+
+Note, if you apply this patch after 0004-ldflags.patch, the changes begin at line 276.
+If you run it before 0004-ldflags.patch, the changes begin at line 277.
+
+Patch by Andrew Miller.
+
+https://bugs.gentoo.org/529974
+
+--- a/configure
++++ b/configure
+@@ -276,10 +276,7 @@
+
+ echo 'Generating MCONFIG...'
+ (
+- echo -n '# Generated by configure (confgen version 2) on '
+- date
+- echo '#'
+- echo
++ printf "#\n# Generated by configure (confgen version 2) on $(date)\n#\n\n"
+
+ echo "BINDIR=$BINDIR"
+ echo "SBINDIR=$SBINDIR"
diff --git a/net-misc/netkit-rwho/files/netkit-rwho-0.17-rc b/net-misc/netkit-rwho/files/netkit-rwho-0.17-rc
new file mode 100644
index 000000000000..480adc98e8b1
--- /dev/null
+++ b/net-misc/netkit-rwho/files/netkit-rwho-0.17-rc
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting rwhod"
+ /sbin/start-stop-daemon --start --quiet --exec /usr/sbin/rwhod -- $RWHOD_OPTIONS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping rwhod"
+ /sbin/start-stop-daemon --stop --quiet --name rwhod
+ eend $?
+}
diff --git a/net-misc/netkit-rwho/metadata.xml b/net-misc/netkit-rwho/metadata.xml
new file mode 100644
index 000000000000..43ff75467369
--- /dev/null
+++ b/net-misc/netkit-rwho/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>netmon</herd>
+</pkgmetadata>
diff --git a/net-misc/netkit-rwho/netkit-rwho-0.17-r4.ebuild b/net-misc/netkit-rwho/netkit-rwho-0.17-r4.ebuild
new file mode 100644
index 000000000000..a06307396f48
--- /dev/null
+++ b/net-misc/netkit-rwho/netkit-rwho-0.17-r4.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Netkit - ruptime/rwho/rwhod"
+HOMEPAGE="http://www.hcs.harvard.edu/~dholland/computers/netkit.html"
+SRC_URI="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${P}.tar.gz
+ https://dev.gentoo.org/~jer/${P}-patches.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~mips ppc s390 sh sparc x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${WORKDIR}"/000{1,2,3,4}-*.patch
+ epatch "${FILESDIR}"/${P}-printf.patch #529974
+}
+
+src_configure() {
+ # Not an autotools build system
+ ./configure --with-c-compiler=$(tc-getCC) || die
+ sed -i \
+ -e "s:-O2::" \
+ -e "s:-Wpointer-arith::" \
+ MCONFIG || die
+}
+
+src_install() {
+ keepdir /var/spool/rwho
+
+ into /usr
+ dobin ruptime/ruptime rwho/rwho
+ dosbin rwhod/rwhod
+
+ doman ruptime/ruptime.1 rwho/rwho.1 rwhod/rwhod.8
+ dodoc README ChangeLog
+
+ newinitd "${FILESDIR}"/${P}-rc rwhod
+ newconfd "${FILESDIR}"/${P}-confd rwhod
+
+ exeinto /etc/cron.monthly
+ doexe "${FILESDIR}"/${P}-cron
+}
diff --git a/net-misc/netkit-talk/Manifest b/net-misc/netkit-talk/Manifest
new file mode 100644
index 000000000000..8eb414ad8fc6
--- /dev/null
+++ b/net-misc/netkit-talk/Manifest
@@ -0,0 +1 @@
+DIST netkit-ntalk-0.17.tar.gz 37396 SHA256 d8f614e8d4d7981a0adf0f84d2d3954018d5fe0e57a8e5731256d66cbcf45e90 SHA512 5a886c0f73179060f926d4af781a6b9d4de7b62562a69db7b93c4fd783ad12b488ee967af18e5a11f98e7f94d659c1688d2a3d4ba4a00bdec31869aa39a321c5 WHIRLPOOL 0c37b9dffb1a17e93105ebf56b42f4014bd839abc077d4e8b11aa3d4d49cb8f791bbff704ed6d6b248302b2a8f3554a7093da2f86c9e975424adbaa084e2ca15
diff --git a/net-misc/netkit-talk/files/netkit-talk-0.17-ipv6.diff b/net-misc/netkit-talk/files/netkit-talk-0.17-ipv6.diff
new file mode 100644
index 000000000000..f426bf7dfadf
--- /dev/null
+++ b/net-misc/netkit-talk/files/netkit-talk-0.17-ipv6.diff
@@ -0,0 +1,56 @@
+--- a/talkd/talkd.c
++++ b/talkd/talkd.c
+@@ -164,13 +164,14 @@
+ const char *theirip;
+
+ struct hostent *hp;
++ struct sockaddr_in6 addr;
+ struct sockaddr_in sn;
+ int cc, i, ok;
+ socklen_t addrlen;
+
+- addrlen = sizeof(sn);
++ addrlen = sizeof(addr);
+ cc = recvfrom(0, inbuf, sizeof(inbuf), 0,
+- (struct sockaddr *)&sn, &addrlen);
++ (struct sockaddr *)&addr, &addrlen);
+ if (cc<0) {
+ if (errno==EINTR || errno==EAGAIN) {
+ return;
+@@ -185,14 +186,30 @@
+ */
+ lastmsgtime = time(NULL);
+
+- if (addrlen!=sizeof(sn)) {
+- syslog(LOG_WARNING, "recvfrom: bogus address length");
+- return;
+- }
+- if (sn.sin_family!=AF_INET) {
++ sn.sin_family = AF_INET;
++ switch (addr.sin6_family)
++ {
++ case AF_INET:
++ sn.sin_addr=((struct sockaddr_in*)&addr)->sin_addr;
++ sn.sin_port=((struct sockaddr_in*)&addr)->sin_port;
++ break;
++ case AF_INET6:
++ // addr must be ::FFFF:x.x.x.x
++ if (addr.sin6_addr.s6_addr32[0]!=0 ||
++ addr.sin6_addr.s6_addr32[1]!=0 ||
++ addr.sin6_addr.s6_addr16[5]!=0xffff ||
++ addr.sin6_addr.s6_addr16[4]!=0)
++ {
++ syslog(LOG_WARNING, "IPv6 address family not supported by talkd");
++ return;
++ }
++ sn.sin_port=addr.sin6_port;
++ sn.sin_addr.s_addr=addr.sin6_addr.s6_addr32[3];
++ break;
++ default:
+ syslog(LOG_WARNING, "recvfrom: bogus address family");
+ return;
+- }
++ }
+
+ /*
+ * If we get here we have an address we can reply to, although
diff --git a/net-misc/netkit-talk/files/netkit-talk-0.17-time.patch b/net-misc/netkit-talk/files/netkit-talk-0.17-time.patch
new file mode 100644
index 000000000000..3a0ccadcb744
--- /dev/null
+++ b/net-misc/netkit-talk/files/netkit-talk-0.17-time.patch
@@ -0,0 +1,20 @@
+--- a/talkd/table.c
++++ b/talkd/table.c
+@@ -57,6 +57,7 @@
+
+ #include "prot_talkd.h"
+ #include "proto.h"
++#include <time.h>
+
+ #define MAX_ID 16000 /* << 2^15 so I don't have sign troubles */
+
+--- a/talkd/announce.c
++++ b/talkd/announce.c
+@@ -49,6 +49,7 @@
+ #include <fcntl.h>
+ #include <string.h>
+ #include <paths.h>
++#include <time.h>
+ #include "prot_talkd.h"
+ #include "proto.h"
+
diff --git a/net-misc/netkit-talk/files/talk.xinetd b/net-misc/netkit-talk/files/talk.xinetd
new file mode 100644
index 000000000000..524282582b24
--- /dev/null
+++ b/net-misc/netkit-talk/files/talk.xinetd
@@ -0,0 +1,13 @@
+# default: off
+# description: The talk server accepts talk requests for chatting with users \
+# on other systems.
+service ntalk
+{
+# flags = IPv4
+ disable = yes
+ socket_type = dgram
+ wait = yes
+ user = nobody
+ group = tty
+ server = /usr/sbin/in.talkd
+}
diff --git a/net-misc/netkit-talk/metadata.xml b/net-misc/netkit-talk/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/net-misc/netkit-talk/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/netkit-talk/netkit-talk-0.17-r5.ebuild b/net-misc/netkit-talk/netkit-talk-0.17-r5.ebuild
new file mode 100644
index 000000000000..d0a645ed1d63
--- /dev/null
+++ b/net-misc/netkit-talk/netkit-talk-0.17-r5.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+MY_P=netkit-ntalk-${PV}
+S=${WORKDIR}/netkit-ntalk-${PV}
+
+DESCRIPTION="Netkit - talkd"
+HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/"
+SRC_URI="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ppc64 sparc x86"
+IUSE="ipv6"
+
+COMMON_DEPEND=">=sys-libs/ncurses-5.2"
+DEPEND="
+ ${COMMON_DEPEND}
+ virtual/pkgconfig
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ virtual/inetd
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-time.patch
+ use ipv6 && epatch "${FILESDIR}"/${P}-ipv6.diff
+ sed -i configure -e '/^LDFLAGS=/d' || die
+}
+
+src_configure() {
+ # not autotools based?
+ ./configure --with-c-compiler=$(tc-getCC) || die
+}
+
+src_compile() {
+ emake LIBCURSES="$( $(tc-getPKG_CONFIG) --libs ncurses )"
+}
+
+src_install() {
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/talk.xinetd talk
+ dobin talk/talk
+ doman talk/talk.1
+ dosbin talkd/talkd
+ dosym talkd /usr/sbin/in.talkd
+ doman talkd/talkd.8
+ dosym talkd.8 /usr/share/man/man8/in.talkd.8
+ dodoc README ChangeLog BUGS
+}
diff --git a/net-misc/netkit-telnetd/Manifest b/net-misc/netkit-telnetd/Manifest
new file mode 100644
index 000000000000..e05fcdf385d1
--- /dev/null
+++ b/net-misc/netkit-telnetd/Manifest
@@ -0,0 +1,2 @@
+DIST netkit-telnet-0.17.tar.gz 133749 SHA256 9c80d5c7838361a328fb6b60016d503def9ce53ad3c589f3b08ff71a2bb88e00 SHA512 e2cfabed12326af5e288def1821353eacffb4586008263dcd1bed1a9dd9d8548e51e68d7ede58ea75927783ba534ea8807ec722271843a77146f064f3d826dd3 WHIRLPOOL 0a04763f8d42b1985295f9db3472aa80f4f1cc96a151ab66e34275c18809dcbc1a072c4754c0a989cca576a7d7ff6d8795865f6b372b1fe4953dbe0e87665728
+DIST netkit-telnet_0.17-36.diff.gz 27226 SHA256 cd192e3acbef83a3e8fbacfa26e1f6ededfe50587e9b372b5a38ce5928d746f7 SHA512 7cd1ec5f96fcacee551700d65f62b6c217e0d9b5220a218aa60fceb3883d0754831606a247355dc2bf6486a02175b8d9b27058d6bc788de8e1b80545fdedbf9a WHIRLPOOL c651f4cacabe5b42fefb9f9fa1f306d5aafad7c8b3e0c5eb6afcf15609487ef726991a1e5eb88c7f95364a1e166b26f01814b3671b72ffec14673e5927898a7b
diff --git a/net-misc/netkit-telnetd/files/net.issue.sample b/net-misc/netkit-telnetd/files/net.issue.sample
new file mode 100644
index 000000000000..79a4f21259d3
--- /dev/null
+++ b/net-misc/netkit-telnetd/files/net.issue.sample
@@ -0,0 +1,4 @@
+# Example /etc/issue.net(5)
+
+# This is %h running %s:%r on a %m
+# You are on /dev/ttyp%t at %d' > ${D}/etc/issue.net
diff --git a/net-misc/netkit-telnetd/files/netkit-telnetd-0.17-cflags-gnu_source.patch b/net-misc/netkit-telnetd/files/netkit-telnetd-0.17-cflags-gnu_source.patch
new file mode 100644
index 000000000000..1ebbda77c078
--- /dev/null
+++ b/net-misc/netkit-telnetd/files/netkit-telnetd-0.17-cflags-gnu_source.patch
@@ -0,0 +1,23 @@
+--- telnetd/Makefile.orig 2004-09-29 22:16:50.175839840 -0500
++++ telnetd/Makefile 2004-09-29 22:09:30.439689896 -0500
+@@ -10,7 +10,7 @@
+
+ CFLAGS += '-DISSUE_FILE="/etc/issue.net"' -DPARANOID_TTYS \
+ -DNO_REVOKE -DKLUDGELINEMODE -DDIAGNOSTICS \
+- -DLOGIN_WRAPPER=\"/usr/lib/telnetlogin\"
++ -DLOGIN_WRAPPER=\"/usr/sbin/telnetlogin\" -D_GNU_SOURCE
+ # LIBS += $(LIBTERMCAP)
+
+ OBJS = telnetd.o state.o termstat.o slc.o sys_term.o utility.o \
+--- telnet/Makefile.orig 2004-11-01 15:23:29 -0500
++++ telnet/Makefile 2004-11-01 16:05:05 -0500
+@@ -6,7 +6,7 @@
+ #CXXFLAGS:=$(patsubst -O2, -g, $(CXXFLAGS))
+
+ # -DAUTHENTICATE
+-CXXFLAGS += -DUSE_TERMIO -DKLUDGELINEMODE
++CXXFLAGS += -DUSE_TERMIO -DKLUDGELINEMODE -D_GNU_SOURCE
+ LIBS = $(LIBTERMCAP)
+
+ SRCS = commands.cc main.cc network.cc ring.cc sys_bsd.cc telnet.cc \
+
diff --git a/net-misc/netkit-telnetd/files/netkit-telnetd-0.17-gentoo.patch b/net-misc/netkit-telnetd/files/netkit-telnetd-0.17-gentoo.patch
new file mode 100644
index 000000000000..75e5f69d2ef3
--- /dev/null
+++ b/net-misc/netkit-telnetd/files/netkit-telnetd-0.17-gentoo.patch
@@ -0,0 +1,81 @@
+diff -r -u netkit-telnet-0.17_orig/telnet/main.cc netkit-telnet-0.17/telnet/main.cc
+--- netkit-telnet-0.17_orig/telnet/main.cc 1999-08-01 07:06:37.000000000 +0200
++++ netkit-telnet-0.17/telnet/main.cc 2002-04-05 09:22:35.000000000 +0200
+@@ -43,6 +43,7 @@
+
+ #include "../version.h"
+
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <getopt.h>
+ #include <string.h>
+diff -r -u netkit-telnet-0.17_orig/telnet/Makefile netkit-telnet-0.17/telnet/Makefile
+--- netkit-telnet-0.17_orig/telnet/Makefile 1999-08-01 07:06:37.000000000 +0200
++++ netkit-telnet-0.17/telnet/Makefile 2002-04-05 09:26:01.000000000 +0200
+@@ -7,7 +7,7 @@
+
+ # -DAUTHENTICATE
+ CXXFLAGS += -DUSE_TERMIO -DKLUDGELINEMODE
+-LIBS += $(LIBTERMCAP)
++LIBS += $(LIBTERMCAP) -lcurses
+
+ SRCS = commands.cc main.cc network.cc ring.cc sys_bsd.cc telnet.cc \
+ terminal.cc tn3270.cc utilities.cc genget.cc environ.cc netlink.cc
+diff -r -u netkit-telnet-0.17_orig/telnet/netlink.cc netkit-telnet-0.17/telnet/netlink.cc
+--- netkit-telnet-0.17_orig/telnet/netlink.cc 2000-07-23 06:16:25.000000000 +0200
++++ netkit-telnet-0.17/telnet/netlink.cc 2002-04-05 09:24:35.000000000 +0200
+@@ -2,6 +2,7 @@
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+diff -r -u netkit-telnet-0.17_orig/telnet/network.cc netkit-telnet-0.17/telnet/network.cc
+--- netkit-telnet-0.17_orig/telnet/network.cc 1996-08-13 10:09:58.000000000 +0200
++++ netkit-telnet-0.17/telnet/network.cc 2002-04-05 09:22:52.000000000 +0200
+@@ -37,6 +37,7 @@
+ char net_rcsid[] =
+ "$Id$";
+
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/time.h>
+diff -r -u netkit-telnet-0.17_orig/telnet/terminal.cc netkit-telnet-0.17/telnet/terminal.cc
+--- netkit-telnet-0.17_orig/telnet/terminal.cc 1999-12-12 20:48:05.000000000 +0100
++++ netkit-telnet-0.17/telnet/terminal.cc 2002-04-05 09:23:53.000000000 +0200
+@@ -41,6 +41,8 @@
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <termios.h>
++#include <string.h>
++#include <stdlib.h>
+ #include <unistd.h>
+ #include <signal.h>
+ #include <errno.h>
+diff -r -u netkit-telnet-0.17_orig/telnet/utilities.cc netkit-telnet-0.17/telnet/utilities.cc
+--- netkit-telnet-0.17_orig/telnet/utilities.cc 1999-12-12 16:33:40.000000000 +0100
++++ netkit-telnet-0.17/telnet/utilities.cc 2002-04-05 09:24:14.000000000 +0200
+@@ -46,6 +46,8 @@
+ #include <sys/time.h>
+ #include <sys/socket.h>
+ #include <unistd.h>
++#include <string.h>
++#include <stdlib.h>
+ #include <ctype.h>
+
+ #include "ring.h"
+diff -r -u netkit-telnet-0.17_orig/telnetd/Makefile netkit-telnet-0.17/telnetd/Makefile
+--- netkit-telnet-0.17_orig/telnetd/Makefile 1999-12-14 01:43:30.000000000 +0100
++++ netkit-telnet-0.17/telnetd/Makefile 2002-04-05 09:36:47.000000000 +0200
+@@ -10,7 +10,7 @@
+
+ CFLAGS += '-DISSUE_FILE="/etc/issue.net"' -DPARANOID_TTYS \
+ -DNO_REVOKE -DKLUDGELINEMODE -DDIAGNOSTICS
+-# LIBS += $(LIBTERMCAP)
++LIBS += -lutil
+
+ OBJS = telnetd.o state.o termstat.o slc.o sys_term.o utility.o \
+ global.o setproctitle.o
diff --git a/net-misc/netkit-telnetd/files/telnetd.xinetd b/net-misc/netkit-telnetd/files/telnetd.xinetd
new file mode 100644
index 000000000000..63dd6dac9e7f
--- /dev/null
+++ b/net-misc/netkit-telnetd/files/telnetd.xinetd
@@ -0,0 +1,10 @@
+service telnet
+{
+ flags = REUSE
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/sbin/in.telnetd
+ log_on_failure += USERID
+ disable = yes
+}
diff --git a/net-misc/netkit-telnetd/metadata.xml b/net-misc/netkit-telnetd/metadata.xml
new file mode 100644
index 000000000000..2df74362e718
--- /dev/null
+++ b/net-misc/netkit-telnetd/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription>The telnetd program is a server which supports the DARPA telnet interactive communication protocol.</longdescription>
+ <upstream>
+ <remote-id type="launchpad">netkit-telnet</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/netkit-telnetd/netkit-telnetd-0.17-r10.ebuild b/net-misc/netkit-telnetd/netkit-telnetd-0.17-r10.ebuild
new file mode 100644
index 000000000000..a02cf271b464
--- /dev/null
+++ b/net-misc/netkit-telnetd/netkit-telnetd-0.17-r10.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+PATCHLEVEL=36
+DESCRIPTION="Standard Linux telnet client and server"
+#old HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/"
+# This might be the best HOMEPAGE now?
+HOMEPAGE="https://launchpad.net/netkit-telnet"
+# http://packages.debian.org/stablesource/netkit-telnet
+# http://packages.debian.org/testing/source/netkit-telnet
+# No upstream mirror exists anymore?
+# old ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/netkit-telnet-${PV}.tar.gz
+SRC_URI="mirror://gentoo/netkit-telnet-${PV}.tar.gz
+ mirror://debian/pool/main/n/netkit-telnet/netkit-telnet_0.17-${PATCHLEVEL}.diff.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
+IUSE=""
+
+DEPEND=">=sys-libs/ncurses-5.2
+ !net-misc/telnet-bsd"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/netkit-telnet-${PV}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ # Patch: [0]
+ # Gentoo lacks a maintainer for this package right now. And a
+ # security problem arose. While reviewing our options for how
+ # should we proceed with the security bug we decided it would be
+ # better to just stay in sync with debian's own netkit-telnet
+ # package. Lots of bug fixes by them over time which were not in
+ # our telnetd.
+ epatch "${WORKDIR}"/netkit-telnet_0.17-${PATCHLEVEL}.diff
+
+ # Patch: [1]
+ # after the deb patch we need to add a small patch that defines
+ # gnu source. This is needed for gcc-3.4.x (needs to be pushed
+ # back to the deb folk?)
+ epatch "${FILESDIR}"/netkit-telnetd-0.17-cflags-gnu_source.patch
+}
+
+src_compile() {
+ tc-export CC CXX
+
+ ./configure --prefix=/usr || die
+
+ sed -i \
+ -e "s:-pipe -O2:${CFLAGS}:" \
+ -e "s:^\(LDFLAGS=\).*:\1${LDFLAGS}:" \
+ -e "s:-Wpointer-arith::" \
+ MCONFIG || die
+
+ emake || die
+ cd telnetlogin && emake || die
+}
+
+src_install() {
+ dobin telnet/telnet || die
+
+ dosbin telnetd/telnetd || die
+ dosym telnetd /usr/sbin/in.telnetd || die
+ dosbin telnetlogin/telnetlogin || die
+ doman telnet/telnet.1 || die
+ doman telnetd/*.8 || die
+ doman telnetd/issue.net.5 || die
+ dosym telnetd.8 /usr/share/man/man8/in.telnetd.8 || die
+ doman telnetlogin/telnetlogin.8 || die
+ dodoc BUGS ChangeLog README || die
+ dodoc "${FILESDIR}"/net.issue.sample || die
+ newdoc telnet/README README.telnet || die
+ newdoc telnet/TODO TODO.telnet || die
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/telnetd.xinetd telnetd || die
+}
diff --git a/net-misc/netkit-timed/Manifest b/net-misc/netkit-timed/Manifest
new file mode 100644
index 000000000000..9939a9b2a303
--- /dev/null
+++ b/net-misc/netkit-timed/Manifest
@@ -0,0 +1 @@
+DIST netkit-timed-0.17.tar.gz 48655 SHA256 3be296794158639a350fd71506ffdad9ebd5d2a2640bbf533147e95d55d592fe
diff --git a/net-misc/netkit-timed/files/0.17-CFLAG-DEF-fix.patch b/net-misc/netkit-timed/files/0.17-CFLAG-DEF-fix.patch
new file mode 100644
index 000000000000..6d3fbf704ba5
--- /dev/null
+++ b/net-misc/netkit-timed/files/0.17-CFLAG-DEF-fix.patch
@@ -0,0 +1,55 @@
+diff -ru netkit-timed-0.17/configure netkit-timed-0.17.fixed/configure
+--- netkit-timed-0.17/configure 2000-07-23 15:12:26.000000000 +0930
++++ netkit-timed-0.17.fixed/configure 2004-08-07 09:22:47.860505136 +0930
+@@ -115,39 +115,6 @@
+ echo 'no'
+ fi
+
+-if [ x$DEBUG = x ]; then
+- echo -n "Checking if $CC accepts -O2... "
+- if (
+- $CC -O2 __conftest.c -o __conftest
+- ) >/dev/null 2>&1; then
+- echo 'yes'
+- CFLAGS="$CFLAGS -O2"
+- else
+- echo 'no'
+- echo -n "Checking if $CC accepts -O... "
+- if (
+- $CC -O __conftest.c -o __conftest
+- ) >/dev/null 2>&1; then
+- echo 'yes'
+- CFLAGS="$CFLAGS -O"
+- else
+- echo 'no'
+- fi
+- fi
+-
+-else
+- echo -n "Checking if $CC accepts -g... "
+- if (
+- $CC -g __conftest.c -o __conftest
+- ) >/dev/null 2>&1; then
+- echo 'yes'
+- CFLAGS="$CFLAGS -g"
+- else
+- echo 'no'
+- fi
+-
+-fi
+-
+ LDFLAGS=
+ LIBS=
+
+diff -ru netkit-timed-0.17/timed/timed/timed.c netkit-timed-0.17.fixed/timed/timed/timed.c
+--- netkit-timed-0.17/timed/timed/timed.c 1999-12-13 03:35:07.000000000 +0930
++++ netkit-timed-0.17.fixed/timed/timed/timed.c 2004-08-07 09:26:32.299385240 +0930
+@@ -898,7 +898,7 @@
+ void
+ get_goodgroup(int force)
+ {
+-# define NG_DELAY (30*60*CLK_TCK) /* 30 minutes */
++# define NG_DELAY (30*60*CLOCKS_PER_SEC) /* 30 minutes */
+ static unsigned long last_update = -NG_DELAY;
+ unsigned long new_update;
+ /* struct hosttbl *htp; */
diff --git a/net-misc/netkit-timed/files/0.17-timed-opt-parsing.patch b/net-misc/netkit-timed/files/0.17-timed-opt-parsing.patch
new file mode 100644
index 000000000000..5b5855478d5a
--- /dev/null
+++ b/net-misc/netkit-timed/files/0.17-timed-opt-parsing.patch
@@ -0,0 +1,12 @@
+diff -ur netkit-timed-0.17.orig/timed/timed/timed.c netkit-timed-0.17/timed/timed/timed.c
+--- netkit-timed-0.17.orig/timed/timed/timed.c 2006-07-28 00:12:03.000000000 -0700
++++ netkit-timed-0.17/timed/timed/timed.c 2006-07-28 00:12:52.000000000 -0700
+@@ -158,7 +158,7 @@
+ struct nets *nt;
+ struct sockaddr_in server;
+ u_short port;
+- char c;
++ signed char c;
+ #ifdef sgi
+ FILE *timetrim_st;
+ #endif
diff --git a/net-misc/netkit-timed/files/timed.rc6 b/net-misc/netkit-timed/files/timed.rc6
new file mode 100644
index 000000000000..f6345262c2cb
--- /dev/null
+++ b/net-misc/netkit-timed/files/timed.rc6
@@ -0,0 +1,20 @@
+#!/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 timed"
+ start-stop-daemon --start --quiet --exec /usr/sbin/timed
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping timed"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/timed
+ eend $?
+}
diff --git a/net-misc/netkit-timed/metadata.xml b/net-misc/netkit-timed/metadata.xml
new file mode 100644
index 000000000000..f9d50da18d39
--- /dev/null
+++ b/net-misc/netkit-timed/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>maintainer-needed@gentoo.org</email>
+ <description>This package lacks a primary herd or maintainer.</description>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/netkit-timed/netkit-timed-0.17-r9.ebuild b/net-misc/netkit-timed/netkit-timed-0.17-r9.ebuild
new file mode 100644
index 000000000000..a745dd2f0bf2
--- /dev/null
+++ b/net-misc/netkit-timed/netkit-timed-0.17-r9.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+IUSE=""
+DESCRIPTION="Netkit - timed"
+SRC_URI="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${P}.tar.gz"
+HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/"
+KEYWORDS="amd64 ~mips ppc ppc64 sparc x86"
+LICENSE="BSD GPL-2"
+SLOT="0"
+
+DEPEND=""
+RDEPEND=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/0.17-CFLAG-DEF-fix.patch
+ epatch "${FILESDIR}"/0.17-timed-opt-parsing.patch
+ sed -i configure \
+ -e '/^LDFLAGS=/d' \
+ || die "sed configure"
+}
+
+src_configure() {
+ # Note this is not an autoconf configure script. econf fails
+ append-flags -DCLK_TCK=CLOCKS_PER_SEC
+ ./configure --prefix=/usr --with-c-compiler=$(tc-getCC) || die "bad configure"
+}
+
+src_install() {
+ dosbin timed/timed/timed || die
+ doman timed/timed/timed.8 || die
+ dosbin timed/timedc/timedc || die
+ doman timed/timedc/timedc.8 || die
+ dodoc README ChangeLog BUGS || die
+
+ newinitd "${FILESDIR}"/timed.rc6 timed || die
+}
diff --git a/net-misc/netpipe/Manifest b/net-misc/netpipe/Manifest
new file mode 100644
index 000000000000..5019cca38aa4
--- /dev/null
+++ b/net-misc/netpipe/Manifest
@@ -0,0 +1 @@
+DIST netpipe.tar.gz 30593 RMD160 7146d29bdb00ca36a3c3d0fa5a9cb5b026d50982 SHA1 3d5199e92fe5b954b18a42ae4cfd9aaf76e94f75 SHA256 89cfcd5ca5898d77fd5cd64634610667f3b9e087db20536d7636739295d7cdf3
diff --git a/net-misc/netpipe/metadata.xml b/net-misc/netpipe/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/net-misc/netpipe/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/netpipe/netpipe-1.0.0_beta2-r1.ebuild b/net-misc/netpipe/netpipe-1.0.0_beta2-r1.ebuild
new file mode 100644
index 000000000000..2386dd5d4de4
--- /dev/null
+++ b/net-misc/netpipe/netpipe-1.0.0_beta2-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="tool to reliably distribute binary data using UDP broadcasting techniques"
+HOMEPAGE="http://www.wudika.de/~jan/netpipe/"
+SRC_URI="http://www.wudika.de/~jan/${PN}/${PN}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+S="${WORKDIR}/${PN}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i \
+ -e "s:^OPT=.*:OPT = ${CFLAGS} ${LDFLAGS}:" \
+ -e "s:^CC=.*:CC = $(tc-getCC):" \
+ Makefile || die "sed failed"
+}
+
+src_install() {
+ dobin netpipe || die "dobin failed"
+ dodoc DOCUMENTATION INSTALL TECH-NOTES || die
+}
diff --git a/net-misc/netpipe/netpipe-1.0.0_beta2.ebuild b/net-misc/netpipe/netpipe-1.0.0_beta2.ebuild
new file mode 100644
index 000000000000..01ab500684d1
--- /dev/null
+++ b/net-misc/netpipe/netpipe-1.0.0_beta2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="tool to reliably distribute binary data using UDP broadcasting techniques"
+HOMEPAGE="http://www.wudika.de/~jan/netpipe/"
+SRC_URI="http://www.wudika.de/~jan/netpipe/${PN}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="ppc x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}/${PN}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i \
+ -e "s:^OPT=.*:OPT = ${CFLAGS}:" \
+ -e "s:^CC=.*:CC = $(tc-getCC):" \
+ Makefile
+}
+
+src_install() {
+ dobin netpipe || die "dobin failed"
+ dodoc DOCUMENTATION INSTALL TECH-NOTES
+}
diff --git a/net-misc/netpipes/Manifest b/net-misc/netpipes/Manifest
new file mode 100644
index 000000000000..74fe735526dd
--- /dev/null
+++ b/net-misc/netpipes/Manifest
@@ -0,0 +1 @@
+DIST netpipes-4.2-export.tar.gz 75276 SHA256 0712b2cd55ad78084385d215f8037aad3c53b06a6fd8c9bda83ec23afd440a27 SHA512 a875922d179b98d5d663825cb83dc92b515ca3fa77e44ce05941a0de58951840626836b597ea244a660be637d61be3428de7dab413a1c439e4673c82dae02531 WHIRLPOOL 555850c5ff14be9b7517782dc855683c5b7bc4921d81c4c6ec091cde1a18a8ca89844214dff2eb2fb04f2165fbd3929ae2be6d7a9407fccfd4f9e48b53f0c523
diff --git a/net-misc/netpipes/files/netpipes-4.2-string.patch b/net-misc/netpipes/files/netpipes-4.2-string.patch
new file mode 100644
index 000000000000..8dfc3cdcd137
--- /dev/null
+++ b/net-misc/netpipes/files/netpipes-4.2-string.patch
@@ -0,0 +1,10 @@
+--- a/timelimit.c
++++ b/timelimit.c
+@@ -30,6 +30,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <errno.h>
++#include <string.h>
+ extern int errno;
+ #include "common.h"
+
diff --git a/net-misc/netpipes/metadata.xml b/net-misc/netpipes/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-misc/netpipes/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>netmon</herd>
+</pkgmetadata>
diff --git a/net-misc/netpipes/netpipes-4.2-r2.ebuild b/net-misc/netpipes/netpipes-4.2-r2.ebuild
new file mode 100644
index 000000000000..0ae9c0fc6434
--- /dev/null
+++ b/net-misc/netpipes/netpipes-4.2-r2.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 eutils toolchain-funcs
+
+DESCRIPTION="a package to manipulate BSD TCP/IP stream sockets"
+HOMEPAGE="http://web.purplefrog.com/~thoth/netpipes/"
+SRC_URI="http://web.purplefrog.com/~thoth/netpipes/ftp/${P}-export.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+S=${WORKDIR}/${P}-export
+
+src_prepare() {
+ sed -i \
+ -e 's:CFLAGS =:CFLAGS +=:' \
+ -e '/ -o /s:${CFLAGS}:$(CFLAGS) $(LDFLAGS):g' \
+ Makefile || die
+
+ epatch "${FILESDIR}/${P}"-string.patch
+}
+
+src_compile () {
+ emake CC=$(tc-getCC)
+}
+
+src_install() {
+ dodir /usr/share/man
+ emake INSTROOT="${D}"/usr INSTMAN="${D}"/usr/share/man install
+}
diff --git a/net-misc/netprofiles-ims/Manifest b/net-misc/netprofiles-ims/Manifest
new file mode 100644
index 000000000000..9ff60c1ede5e
--- /dev/null
+++ b/net-misc/netprofiles-ims/Manifest
@@ -0,0 +1 @@
+DIST netprofiles-ims-0.1.0134.tar.gz 4218 SHA256 c981082edab9080cfb12e21e44bd977f9fa7fc43e9aee47336bc74cb5a6f25ab
diff --git a/net-misc/netprofiles-ims/metadata.xml b/net-misc/netprofiles-ims/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/net-misc/netprofiles-ims/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/netprofiles-ims/netprofiles-ims-0.1.0134.ebuild b/net-misc/netprofiles-ims/netprofiles-ims-0.1.0134.ebuild
new file mode 100644
index 000000000000..6d3eebf742da
--- /dev/null
+++ b/net-misc/netprofiles-ims/netprofiles-ims-0.1.0134.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="The Netprofiles Interface Management System (IMS) is an easy way to manage multiple network configurations for your wired or wireless network cards"
+
+HOMEPAGE="http://www.furuba.net/~buckminst/gentoo/"
+SRC_URI="http://www.furuba.net/~buckminst/gentoo/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+DEPEND=""
+
+src_install() {
+ dosbin netprofiles
+ doinitd netprofiles-ims
+}
diff --git a/net-misc/netsed/Manifest b/net-misc/netsed/Manifest
new file mode 100644
index 000000000000..68ccd149f10e
--- /dev/null
+++ b/net-misc/netsed/Manifest
@@ -0,0 +1,2 @@
+DIST netsed.tgz 6352 SHA256 a04f6b235d787b1efd96ecdb398e6c8456301dbf965840e6fcbad36c68372dce
+DIST netsed_0.01c-2.diff.gz 3140 SHA256 90799c1da3a219e61b12e4c19810b6b5558de3760ce75e38c592b8b423ac7426
diff --git a/net-misc/netsed/metadata.xml b/net-misc/netsed/metadata.xml
new file mode 100644
index 000000000000..62d3535dd72b
--- /dev/null
+++ b/net-misc/netsed/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="freshmeat">netsed</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/netsed/netsed-0.01b.ebuild b/net-misc/netsed/netsed-0.01b.ebuild
new file mode 100644
index 000000000000..2fd1ee7e4c39
--- /dev/null
+++ b/net-misc/netsed/netsed-0.01b.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="Small tool for altering forwarded network data in real time"
+HOMEPAGE="http://freshmeat.net/projects/netsed"
+SRC_URI="http://dione.ids.pl/~lcamtuf/${PN}.tgz
+ http://http.us.debian.org/debian/pool/main/n/netsed/${PN}_0.01c-2.diff.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+
+src_unpack() {
+ mkdir -p "${S}"
+ cd "${S}"
+ unpack ${A}
+}
+
+src_compile() {
+ epatch "${DISTDIR}"/${PN}_0.01c-2.diff.gz
+ make CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dobin netsed
+ doman debian/netsed.1
+ dodoc README
+}
diff --git a/net-misc/netstat-nat/Manifest b/net-misc/netstat-nat/Manifest
new file mode 100644
index 000000000000..0741ac0c2b3c
--- /dev/null
+++ b/net-misc/netstat-nat/Manifest
@@ -0,0 +1 @@
+DIST netstat-nat-1.4.10.tar.gz 83865 SHA256 e945faa283a49f33af15de915a949c9273a230fc17154925364c547adab676ca SHA512 2089119b26039e656fbe76701e556f7d766159c96b18968195f255e15072af37972c83a8f05edb0b767a12f0521598975673d10d8ba5e6ed6b754a927d4f069d WHIRLPOOL 531c2989a69e26d2b66657727e0a30aebb57f689be458d6df8339adfb9f47b1cadf438c917ef49e1859c8b239379c9cd991528be887f734b833741e15aadc838
diff --git a/net-misc/netstat-nat/files/netstat-nat-1.4.10-install.patch b/net-misc/netstat-nat/files/netstat-nat-1.4.10-install.patch
new file mode 100644
index 000000000000..f56300fb432c
--- /dev/null
+++ b/net-misc/netstat-nat/files/netstat-nat-1.4.10-install.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,7 +1,7 @@
+ bin_PROGRAMS = netstat-nat
+ netstat_nat_SOURCES = netstat-nat.c netstat-nat.h
+ docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
+-doc_DATA = INSTALL NEWS README ChangeLog AUTHORS COPYING NEWS
++doc_DATA = NEWS README ChangeLog AUTHORS
+ dist_man_MANS = netstat-nat.1
+ EXTRA_DIST = netstat-nat.spec
+ SUBDIRS =
diff --git a/net-misc/netstat-nat/metadata.xml b/net-misc/netstat-nat/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-misc/netstat-nat/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>netmon</herd>
+</pkgmetadata>
diff --git a/net-misc/netstat-nat/netstat-nat-1.4.10.ebuild b/net-misc/netstat-nat/netstat-nat-1.4.10.ebuild
new file mode 100644
index 000000000000..8d895fd0aec8
--- /dev/null
+++ b/net-misc/netstat-nat/netstat-nat-1.4.10.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Display NAT connections"
+HOMEPAGE="http://tweegy.nl/projects/netstat-nat/index.html"
+SRC_URI="http://tweegy.nl/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc sparc x86"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-install.patch
+ eautoreconf
+}
diff --git a/net-misc/networkmanager-openconnect/Manifest b/net-misc/networkmanager-openconnect/Manifest
new file mode 100644
index 000000000000..b7032cd8922d
--- /dev/null
+++ b/net-misc/networkmanager-openconnect/Manifest
@@ -0,0 +1,3 @@
+DIST NetworkManager-openconnect-0.9.10.0.tar.xz 438008 SHA256 8007d70a6943388bfa141f99fc4da9965fd122cf2741512ce0cf9c0f9c78331a SHA512 0543db106524e66782ce51854bfe29e2e0317e9e0de1d303c4c8a0e021d2cd04defa9421fffada8d5f6a4cd79672bf4dd7683415102c0ce85a9dea4132ad2f55 WHIRLPOOL a16a34214186c9446b31ccce87248007fef33b44073bf740dae1494ba5fec52d3814601680b2b1288ee02dcca4d57099e49b38717ef4ef14865bdcbe1de7d6b8
+DIST NetworkManager-openconnect-1.0.0.tar.xz 465812 SHA256 06f322f8efe9b882b19dcaa4314049171fd38701e902f688cbdcacfd21d23f5f SHA512 3a919750e865bf51213bba99cf141255a04e4452facca7ac40115cb9c66b5767e1831b11f10b3d93901f6d794aca22cf55ed80e2e061d8c38548727d0831eac5 WHIRLPOOL 0f3609a1d36f9e1a1859e2fe4c1a650bac7226eea5904b67190af85987ada9b075707d22cce4fb07880ce4da9ddca0fb1c08bd13b76a1343c08630a523b30039
+DIST NetworkManager-openconnect-1.0.2.tar.xz 543000 SHA256 120a055863841df1763d4c6b5de03e6f7180fa1a218f376ecc9c75a5862e600e SHA512 54ec54ec1b3387f8c3375181b1e537d4100eea4dc896dbda6f7c785de49f3e3b4c5b73204ee246b21b3f718e9391b4476768a596550aa54a23b8ee04a9191f9f WHIRLPOOL 89c45f5b45ed832cc1a15b0210dac7504f9d96ceca71cbc934670f1920bb2661be21dfa4d34305e37f057a640a2742c1535813d44f303a206378899e53e780c9
diff --git a/net-misc/networkmanager-openconnect/files/0.9.10.0/0016-Add-HOTP-support.patch b/net-misc/networkmanager-openconnect/files/0.9.10.0/0016-Add-HOTP-support.patch
new file mode 100644
index 000000000000..9dc8c4ae70d6
--- /dev/null
+++ b/net-misc/networkmanager-openconnect/files/0.9.10.0/0016-Add-HOTP-support.patch
@@ -0,0 +1,148 @@
+From b3815e96635c8f89c6161bdb6de53cd3c01c8535 Mon Sep 17 00:00:00 2001
+From: David Woodhouse <David.Woodhouse@intel.com>
+Date: Tue, 12 Aug 2014 14:55:39 +0100
+Subject: [PATCH 16/34] Add HOTP support
+
+This requires migrating the token_secret from a config item to a secret,
+which thankfully doesn't seem to be too diffcult.
+---
+ auth-dialog/main.c | 24 +++++++++++++++++++++++-
+ properties/nm-openconnect-dialog.ui | 6 ++++++
+ properties/nm-openconnect.c | 18 ++++++++++++++----
+ 3 files changed, 43 insertions(+), 5 deletions(-)
+
+diff --git a/auth-dialog/main.c b/auth-dialog/main.c
+index 2133e52..b078d48 100644
+--- a/auth-dialog/main.c
++++ b/auth-dialog/main.c
+@@ -1194,7 +1194,9 @@ static int get_config (GHashTable *options, GHashTable *secrets,
+ openconnect_passphrase_from_fsid(vpninfo);
+
+ token_mode = g_hash_table_lookup (options, NM_OPENCONNECT_KEY_TOKEN_MODE);
+- token_secret = g_hash_table_lookup (options, NM_OPENCONNECT_KEY_TOKEN_SECRET);
++ token_secret = g_hash_table_lookup (secrets, NM_OPENCONNECT_KEY_TOKEN_SECRET);
++ if (!token_secret || !token_secret[0])
++ token_secret = g_hash_table_lookup (options, NM_OPENCONNECT_KEY_TOKEN_SECRET);
+ if (token_mode) {
+ int ret = 0;
+
+@@ -1204,6 +1206,10 @@ static int get_config (GHashTable *options, GHashTable *secrets,
+ ret = __openconnect_set_token_mode(vpninfo, OC_TOKEN_MODE_STOKEN, NULL);
+ else if (!strcmp(token_mode, "totp") && token_secret)
+ ret = __openconnect_set_token_mode(vpninfo, OC_TOKEN_MODE_TOTP, token_secret);
++#if OPENCONNECT_CHECK_VER(3,4)
++ else if (!strcmp(token_mode, "hotp") && token_secret)
++ ret = __openconnect_set_token_mode(vpninfo, OC_TOKEN_MODE_HOTP, token_secret);
++#endif
+
+ if (ret)
+ fprintf(stderr, "Failed to initialize software token: %d\n", ret);
+@@ -1229,6 +1235,17 @@ static void populate_vpnhost_combo(auth_ui_data *ui_data)
+ }
+ }
+
++#if OPENCONNECT_CHECK_VER(3,4)
++static int update_token(void *cbdata, const char *tok)
++{
++ auth_ui_data *ui_data = cbdata;
++ g_hash_table_insert (ui_data->secrets, g_strdup (NM_OPENCONNECT_KEY_TOKEN_SECRET),
++ g_strdup(tok));
++
++ return 0;
++}
++#endif
++
+ static int write_new_config(void *cbdata, char *buf, int buflen)
+ {
+ auth_ui_data *ui_data = cbdata;
+@@ -1801,6 +1818,11 @@ int main (int argc, char **argv)
+ fprintf(stderr, "Failed to find VPN UUID %s\n", vpn_uuid);
+ return 1;
+ }
++
++#if OPENCONNECT_CHECK_VER(3,4)
++ openconnect_set_token_callbacks (_ui_data->vpninfo, _ui_data, NULL, update_token);
++#endif
++
+ build_main_dialog(_ui_data);
+
+ #ifdef OPENCONNECT_OPENSSL
+diff --git a/properties/nm-openconnect-dialog.ui b/properties/nm-openconnect-dialog.ui
+index b3401db..4643b73 100644
+--- a/properties/nm-openconnect-dialog.ui
++++ b/properties/nm-openconnect-dialog.ui
+@@ -766,6 +766,12 @@
+ <col id="2" translatable="no">totp</col>
+ <col id="3" translatable="no">True</col>
+ </row>
++ <row>
++ <col id="0" translatable="yes">HOTP - manually entered</col>
++ <col id="1" translatable="no">hotp</col>
++ <col id="2" translatable="no">hotp</col>
++ <col id="3" translatable="no">True</col>
++ </row>
+ </data>
+ </object>
+ </interface>
+diff --git a/properties/nm-openconnect.c b/properties/nm-openconnect.c
+index e00e757..dfd5f5c 100644
+--- a/properties/nm-openconnect.c
++++ b/properties/nm-openconnect.c
+@@ -214,7 +214,7 @@ import (NMVpnPluginUiInterface *iface, const char *path, GError **error)
+ /* Soft token secret */
+ buf = g_key_file_get_string (keyfile, "openconnect", "StokenString", NULL);
+ if (buf)
+- nm_setting_vpn_add_data_item (s_vpn, NM_OPENCONNECT_KEY_TOKEN_SECRET, buf);
++ nm_setting_vpn_add_secret (s_vpn, NM_OPENCONNECT_KEY_TOKEN_SECRET, buf);
+
+ return connection;
+ }
+@@ -297,9 +297,14 @@ export (NMVpnPluginUiInterface *iface,
+ if (value && strlen (value))
+ token_mode = value;
+
+- value = nm_setting_vpn_get_data_item (s_vpn, NM_OPENCONNECT_KEY_TOKEN_SECRET);
++ value = nm_setting_vpn_get_secret (s_vpn, NM_OPENCONNECT_KEY_TOKEN_SECRET);
+ if (value && strlen (value))
+ token_secret = value;
++ else {
++ value = nm_setting_vpn_get_data_item (s_vpn, NM_OPENCONNECT_KEY_TOKEN_SECRET);
++ if (value && strlen (value))
++ token_secret = value;
++ }
+
+ fprintf (f,
+ "[openconnect]\n"
+@@ -427,6 +432,9 @@ init_token_mode_options (GtkComboBox *token_mode)
+ iter_valid = gtk_list_store_remove (token_mode_list, &iter);
+ else if (!strcmp (token_type, "totp") && !openconnect_has_oath_support ())
+ iter_valid = gtk_list_store_remove (token_mode_list, &iter);
++ else if (!strcmp (token_type, "hotp") &&
++ (!openconnect_has_oath_support () || !OPENCONNECT_CHECK_VER(3,4)))
++ iter_valid = gtk_list_store_remove (token_mode_list, &iter);
+ else {
+ iter_valid = gtk_tree_model_iter_next (model, &iter);
+ valid_rows++;
+@@ -492,7 +500,9 @@ init_token_ui (OpenconnectPluginUiWidget *self,
+ if (!buffer)
+ return FALSE;
+ if (s_vpn) {
+- value = nm_setting_vpn_get_data_item (s_vpn, NM_OPENCONNECT_KEY_TOKEN_SECRET);
++ value = nm_setting_vpn_get_secret (s_vpn, NM_OPENCONNECT_KEY_TOKEN_SECRET);
++ if (!value)
++ value = nm_setting_vpn_get_data_item (s_vpn, NM_OPENCONNECT_KEY_TOKEN_SECRET);
+ if (value)
+ gtk_text_buffer_set_text (buffer, value, -1);
+ }
+@@ -653,7 +663,7 @@ update_connection (NMVpnPluginUiWidgetInterface *iface,
+ *dst = 0;
+
+ if (strlen (str))
+- nm_setting_vpn_add_data_item (s_vpn, NM_OPENCONNECT_KEY_TOKEN_SECRET, str);
++ nm_setting_vpn_add_secret (s_vpn, NM_OPENCONNECT_KEY_TOKEN_SECRET, str);
+ }
+
+ if (!check_validity (self, error))
+--
+2.2.0
+
diff --git a/net-misc/networkmanager-openconnect/files/0.9.10.0/0017-Always-return-success-from-auth-dialog.patch b/net-misc/networkmanager-openconnect/files/0.9.10.0/0017-Always-return-success-from-auth-dialog.patch
new file mode 100644
index 000000000000..f5427130c5dd
--- /dev/null
+++ b/net-misc/networkmanager-openconnect/files/0.9.10.0/0017-Always-return-success-from-auth-dialog.patch
@@ -0,0 +1,68 @@
+From 5e899ec0dfff56ac15f9e19cccb8b8d17f792afd Mon Sep 17 00:00:00 2001
+From: David Woodhouse <David.Woodhouse@intel.com>
+Date: Tue, 12 Aug 2014 14:58:05 +0100
+Subject: [PATCH 17/34] Always return success from auth-dialog
+
+We want to store the secrets even when we ultimately failed to log in.
+This was slightly suboptimal even before, when we were failing to remember
+things like the 'autoconnect' and 'certsigs' secrets. But now with HOTP
+it's particularly important that we keep track of which tokens have been
+used *even* if we end up failing to log in.
+
+Even if we don't get a valid login cookie, it's OK to return success.
+---
+ auth-dialog/main.c | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/auth-dialog/main.c b/auth-dialog/main.c
+index b078d48..7171247 100644
+--- a/auth-dialog/main.c
++++ b/auth-dialog/main.c
+@@ -180,7 +180,6 @@ typedef struct auth_ui_data {
+ GtkWidget *last_notice_icon;
+ GtkTextBuffer *log;
+
+- int retval;
+ int cookie_retval;
+
+ int cancel_pipes[2];
+@@ -1376,7 +1375,6 @@ static gboolean cookie_obtained(auth_ui_data *ui_data)
+ gtk_widget_show_all(ui_data->ssl_box);
+ gtk_widget_set_sensitive(ui_data->cancel_button, FALSE);
+ }
+- ui_data->retval = 1;
+ } else if (!ui_data->cookie_retval) {
+ OPENCONNECT_X509 *cert;
+ gchar *key, *value;
+@@ -1413,13 +1411,11 @@ static gboolean cookie_obtained(auth_ui_data *ui_data)
+ keyring_store_passwords,
+ NULL);
+ }
+- ui_data->retval = 0;
+
+ gtk_main_quit();
+ } else {
+ /* no cookie; user cancellation */
+ gtk_widget_show (ui_data->no_form_label);
+- ui_data->retval = 1;
+ }
+
+ g_hash_table_remove_all (ui_data->success_secrets);
+@@ -1672,7 +1668,6 @@ static auth_ui_data *init_ui_data (char *vpn_name, GHashTable *options, GHashTab
+ auth_ui_data *ui_data;
+
+ ui_data = g_slice_new0(auth_ui_data);
+- ui_data->retval = 1;
+
+ ui_data->form_entries = g_queue_new();
+ g_mutex_init(&ui_data->form_mutex);
+@@ -1848,5 +1843,5 @@ int main (int argc, char **argv)
+
+ wait_for_quit ();
+
+- return _ui_data->retval;
++ return 0;
+ }
+--
+2.2.0
+
diff --git a/net-misc/networkmanager-openconnect/files/0.9.10.0/0025-Support-libopenconnect.so.4.patch b/net-misc/networkmanager-openconnect/files/0.9.10.0/0025-Support-libopenconnect.so.4.patch
new file mode 100644
index 000000000000..ed366702b1ce
--- /dev/null
+++ b/net-misc/networkmanager-openconnect/files/0.9.10.0/0025-Support-libopenconnect.so.4.patch
@@ -0,0 +1,127 @@
+From 58944a3ef9c92f7afa07cbb539d062e1956bafc0 Mon Sep 17 00:00:00 2001
+From: David Woodhouse <David.Woodhouse@intel.com>
+Date: Thu, 30 Oct 2014 23:09:14 +0000
+Subject: [PATCH 25/34] Support libopenconnect.so.4
+
+---
+ auth-dialog/main.c | 38 ++++++++++++++++++++++++++------------
+ 1 file changed, 26 insertions(+), 12 deletions(-)
+
+diff --git a/auth-dialog/main.c b/auth-dialog/main.c
+index 7171247..8285bf4 100644
+--- a/auth-dialog/main.c
++++ b/auth-dialog/main.c
+@@ -89,6 +89,21 @@
+ #define OC_FORM_RESULT_NEWGROUP 2
+ #endif
+
++#if OPENCONNECT_CHECK_VER(4,0)
++#define dup_option_value(opt) g_strdup((opt)->_value);
++#define OC3DUP(x) (x)
++#define write_config_const const
++#else
++#define dup_option_value(opt) g_strdup((opt)->value);
++#define openconnect_set_option_value(opt, val) do { \
++ struct oc_form_opt *_o = (opt); \
++ free(_o->value); _o->value = g_strdup(val); \
++ } while (0)
++#define openconnect_free_cert_info(v, x) free(x)
++#define OC3DUP(x) g_strdup(x)
++#define write_config_const /* */
++#endif
++
+ #ifdef OPENCONNECT_OPENSSL
+ #include <openssl/ssl.h>
+ #include <openssl/bio.h>
+@@ -712,7 +727,7 @@ static gboolean ui_form (struct oc_auth_form *form)
+ data->entry_text = g_strdup (find_form_answer(ui_data->secrets,
+ form, opt));
+ if (!data->entry_text)
+- data->entry_text = g_strdup (opt->value);
++ data->entry_text = dup_option_value(opt);
+ } else {
+ GHashTable *attrs;
+
+@@ -776,8 +791,7 @@ static gboolean set_initial_authgroup (auth_ui_data *ui_data, struct oc_auth_for
+ for (i = 0; i < sopt->nr_choices; i++) {
+ struct oc_choice *ch = FORMCHOICE(sopt, i);
+ if (!strcmp(saved_group, ch->name) && i != AUTHGROUP_SELECTION(form)) {
+- free(opt->value);
+- opt->value = g_strdup(saved_group);
++ openconnect_set_option_value(opt, saved_group);
+ return TRUE;
+ }
+ }
+@@ -823,7 +837,7 @@ static int nm_process_auth_form (void *cbdata, struct oc_auth_form *form)
+ g_cancellable_cancel(data->cancel);
+
+ if (data->entry_text) {
+- data->opt->value = g_strdup (data->entry_text);
++ openconnect_set_option_value(data->opt, data->entry_text);
+
+ if (data->opt->type == OC_FORM_OPT_TEXT ||
+ data->opt->type == OC_FORM_OPT_SELECT) {
+@@ -932,7 +946,7 @@ static gboolean user_validate_cert(cert_data *data)
+ text = gtk_text_view_new();
+ buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));
+ gtk_text_buffer_set_text(buffer, details, -1);
+- free(details);
++ openconnect_free_cert_info(data->ui_data->vpninfo, details);
+ gtk_text_view_set_editable(GTK_TEXT_VIEW(text), 0);
+ gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(text), FALSE);
+ gtk_container_add(GTK_CONTAINER(scroll), text);
+@@ -1166,7 +1180,7 @@ static int get_config (GHashTable *options, GHashTable *secrets,
+
+ cafile = g_hash_table_lookup (options, NM_OPENCONNECT_KEY_CACERT);
+ if (cafile)
+- openconnect_set_cafile(vpninfo, g_strdup (cafile));
++ openconnect_set_cafile(vpninfo, OC3DUP (cafile));
+
+ csd = g_hash_table_lookup (options, NM_OPENCONNECT_KEY_CSD_ENABLE);
+ if (csd && !strcmp(csd, "yes")) {
+@@ -1176,16 +1190,16 @@ static int get_config (GHashTable *options, GHashTable *secrets,
+ if (csd_wrapper && !csd_wrapper[0])
+ csd_wrapper = NULL;
+
+- openconnect_setup_csd(vpninfo, getuid(), 1, g_strdup (csd_wrapper));
++ openconnect_setup_csd(vpninfo, getuid(), 1, OC3DUP (csd_wrapper));
+ }
+
+ proxy = g_hash_table_lookup (options, NM_OPENCONNECT_KEY_PROXY);
+- if (proxy && proxy[0] && openconnect_set_http_proxy(vpninfo, g_strdup (proxy)))
++ if (proxy && proxy[0] && openconnect_set_http_proxy(vpninfo, OC3DUP (proxy)))
+ return -EINVAL;
+
+ cert = g_hash_table_lookup (options, NM_OPENCONNECT_KEY_USERCERT);
+ sslkey = g_hash_table_lookup (options, NM_OPENCONNECT_KEY_PRIVKEY);
+- openconnect_set_client_cert (vpninfo, g_strdup (cert), g_strdup (sslkey));
++ openconnect_set_client_cert (vpninfo, OC3DUP (cert), OC3DUP (sslkey));
+
+ pem_passphrase_fsid = g_hash_table_lookup (options,
+ NM_OPENCONNECT_KEY_PEM_PASSPHRASE_FSID);
+@@ -1245,7 +1259,7 @@ static int update_token(void *cbdata, const char *tok)
+ }
+ #endif
+
+-static int write_new_config(void *cbdata, char *buf, int buflen)
++static int write_new_config(void *cbdata, write_config_const char *buf, int buflen)
+ {
+ auth_ui_data *ui_data = cbdata;
+ g_hash_table_insert (ui_data->secrets, g_strdup ("xmlconfig"),
+@@ -1472,11 +1486,11 @@ static void connect_host(auth_ui_data *ui_data)
+ if (openconnect_parse_url(ui_data->vpninfo, host->hostaddress)) {
+ fprintf(stderr, "Failed to parse server URL '%s'\n",
+ host->hostaddress);
+- openconnect_set_hostname (ui_data->vpninfo, g_strdup(host->hostaddress));
++ openconnect_set_hostname (ui_data->vpninfo, OC3DUP (host->hostaddress));
+ }
+
+ if (!openconnect_get_urlpath(ui_data->vpninfo) && host->usergroup)
+- openconnect_set_urlpath(ui_data->vpninfo, g_strdup(host->usergroup));
++ openconnect_set_urlpath(ui_data->vpninfo, OC3DUP (host->usergroup));
+
+
+ g_hash_table_insert (ui_data->success_secrets, g_strdup("lasthost"),
+--
+2.2.0
+
diff --git a/net-misc/networkmanager-openconnect/files/0.9.10.0/0026-Drop-support-for-libopenconnect.so.1.patch b/net-misc/networkmanager-openconnect/files/0.9.10.0/0026-Drop-support-for-libopenconnect.so.1.patch
new file mode 100644
index 000000000000..835f694e4fb1
--- /dev/null
+++ b/net-misc/networkmanager-openconnect/files/0.9.10.0/0026-Drop-support-for-libopenconnect.so.1.patch
@@ -0,0 +1,283 @@
+From b8c7e773204d3b4a85a27d7d2ae58dfc1939e1a8 Mon Sep 17 00:00:00 2001
+From: David Woodhouse <David.Woodhouse@intel.com>
+Date: Thu, 30 Oct 2014 23:16:20 +0000
+Subject: [PATCH 26/34] Drop support for libopenconnect.so.1
+
+---
+ auth-dialog/main.c | 201 +----------------------------------------------------
+ 1 file changed, 2 insertions(+), 199 deletions(-)
+
+diff --git a/auth-dialog/main.c b/auth-dialog/main.c
+index 8285bf4..df0146c 100644
+--- a/auth-dialog/main.c
++++ b/auth-dialog/main.c
+@@ -49,20 +49,6 @@
+
+ #include "openconnect.h"
+
+-#if OPENCONNECT_API_VERSION_MAJOR == 1
+-#define openconnect_vpninfo_new openconnect_vpninfo_new_with_cbdata
+-#define openconnect_init_ssl openconnect_init_openssl
+-#endif
+-
+-#ifndef OPENCONNECT_CHECK_VER
+-#define OPENCONNECT_CHECK_VER(x,y) 0
+-#endif
+-
+-#if !OPENCONNECT_CHECK_VER(1,5)
+-#define OPENCONNECT_X509 X509
+-#define OPENCONNECT_OPENSSL
+-#endif
+-
+ #if !OPENCONNECT_CHECK_VER(2,1)
+ #define __openconnect_set_token_mode(...) -EOPNOTSUPP
+ #elif !OPENCONNECT_CHECK_VER(2,2)
+@@ -104,12 +90,6 @@
+ #define write_config_const /* */
+ #endif
+
+-#ifdef OPENCONNECT_OPENSSL
+-#include <openssl/ssl.h>
+-#include <openssl/bio.h>
+-#include <openssl/ui.h>
+-#endif
+-
+ static const SecretSchema openconnect_secret_schema = {
+ "org.freedesktop.NetworkManager.Connection.Openconnect",
+ SECRET_SCHEMA_DONT_MATCH_NAME,
+@@ -301,9 +281,6 @@ typedef struct ui_fragment_data {
+ GtkWidget *entry;
+ GCancellable *cancel;
+ auth_ui_data *ui_data;
+-#ifdef OPENCONNECT_OPENSSL
+- UI_STRING *uis;
+-#endif
+ struct oc_form_opt *opt;
+ char *entry_text;
+ int initial_selection;
+@@ -315,27 +292,9 @@ static void entry_activate_cb(GtkWidget *widget, auth_ui_data *ui_data)
+ gtk_dialog_response(GTK_DIALOG(ui_data->dialog), AUTH_DIALOG_RESPONSE_LOGIN);
+ }
+
+-#ifdef OPENCONNECT_OPENSSL
+-static void do_check_visibility(ui_fragment_data *data, gboolean *visible)
+-{
+- int min_len;
+-
+- if (!data->uis)
+- return;
+-
+- min_len = UI_get_result_minsize(data->uis);
+-
+- if (min_len && (!data->entry_text || strlen(data->entry_text) < min_len))
+- *visible = FALSE;
+-}
+-#endif
+ static void evaluate_login_visibility(auth_ui_data *ui_data)
+ {
+ gboolean visible = TRUE;
+-#ifdef OPENCONNECT_OPENSSL
+- g_queue_foreach(ui_data->form_entries, (GFunc)do_check_visibility,
+- &visible);
+-#endif
+ gtk_widget_set_sensitive (ui_data->login_button, visible);
+ }
+
+@@ -343,9 +302,6 @@ static void entry_changed(GtkEntry *entry, ui_fragment_data *data)
+ {
+ g_free (data->entry_text);
+ data->entry_text = g_strdup(gtk_entry_get_text(entry));
+-#ifdef OPENCONNECT_OPENSSL
+- evaluate_login_visibility(data->ui_data);
+-#endif
+ }
+
+ static void do_override_label(ui_fragment_data *data, struct oc_choice *choice)
+@@ -387,26 +343,6 @@ static void combo_changed(GtkComboBox *combo, ui_fragment_data *data)
+ FORMCHOICE(sopt, entry));
+ }
+
+-#ifdef OPENCONNECT_OPENSSL
+-static gboolean ui_write_error (ui_fragment_data *data)
+-{
+- ssl_box_add_error(data->ui_data, UI_get0_output_string(data->uis));
+-
+- g_slice_free (ui_fragment_data, data);
+-
+- return FALSE;
+-}
+-
+-static gboolean ui_write_info (ui_fragment_data *data)
+-{
+- ssl_box_add_info(data->ui_data, UI_get0_output_string(data->uis));
+-
+- g_slice_free (ui_fragment_data, data);
+-
+- return FALSE;
+-}
+-#endif
+-
+ static gboolean ui_write_prompt (ui_fragment_data *data)
+ {
+ auth_ui_data *ui_data = _ui_data; /* FIXME global */
+@@ -414,16 +350,8 @@ static gboolean ui_write_prompt (ui_fragment_data *data)
+ int visible;
+ const char *label;
+
+-#ifdef OPENCONNECT_OPENSSL
+- if (data->uis) {
+- label = UI_get0_output_string(data->uis);
+- visible = UI_get_input_flags(data->uis) & UI_INPUT_FLAG_ECHO;
+- } else
+-#endif
+- {
+- label = data->opt->label;
+- visible = (data->opt->type == OC_FORM_OPT_TEXT);
+- }
++ label = data->opt->label;
++ visible = (data->opt->type == OC_FORM_OPT_TEXT);
+
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+ gtk_box_pack_start(GTK_BOX(data->ui_data->ssl_box), hbox, FALSE, FALSE, 0);
+@@ -512,128 +440,6 @@ static gboolean ui_show (auth_ui_data *ui_data)
+ return FALSE;
+ }
+
+-#ifdef OPENCONNECT_OPENSSL
+-/* runs in worker thread */
+-static int ui_open(UI *ui)
+-{
+- auth_ui_data *ui_data = _ui_data; /* FIXME global */
+-
+- UI_add_user_data(ui, ui_data);
+-
+- return 1;
+-}
+-
+-/* runs in worker thread */
+-static int ui_write(UI *ui, UI_STRING *uis)
+-{
+- auth_ui_data *ui_data;
+- ui_fragment_data *data;
+-
+- ui_data = UI_get0_user_data(ui);
+-
+- /* return if a new host has been selected */
+- if (ui_data->cancelled) {
+- return 1;
+- }
+-
+- data = g_slice_new0 (ui_fragment_data);
+- data->ui_data = ui_data;
+- data->uis = uis;
+-
+- switch(UI_get_string_type(uis)) {
+- case UIT_ERROR:
+- g_idle_add ((GSourceFunc)ui_write_error, data);
+- break;
+-
+- case UIT_INFO:
+- g_idle_add ((GSourceFunc)ui_write_info, data);
+- break;
+-
+- case UIT_PROMPT:
+- case UIT_VERIFY:
+- g_mutex_lock (&ui_data->form_mutex);
+- g_queue_push_head(ui_data->form_entries, data);
+- g_mutex_unlock (&ui_data->form_mutex);
+-
+- g_idle_add ((GSourceFunc)ui_write_prompt, data);
+- break;
+-
+- case UIT_BOOLEAN:
+- /* FIXME */
+- case UIT_NONE:
+- default:
+- g_slice_free (ui_fragment_data, data);
+- }
+- return 1;
+-}
+-
+-/* runs in worker thread */
+-static int ui_flush(UI* ui)
+-{
+- auth_ui_data *ui_data;
+- int response;
+-
+- ui_data = UI_get0_user_data(ui);
+-
+- g_idle_add((GSourceFunc)ui_show, ui_data);
+- g_mutex_lock(&ui_data->form_mutex);
+- /* wait for ui to show */
+- while (!ui_data->form_shown) {
+- g_cond_wait(&ui_data->form_shown_changed, &ui_data->form_mutex);
+- }
+- ui_data->form_shown = FALSE;
+-
+- if (!ui_data->cancelled) {
+- /* wait for form submission or cancel */
+- while (!ui_data->form_retval) {
+- g_cond_wait(&ui_data->form_retval_changed, &ui_data->form_mutex);
+- }
+- response = GPOINTER_TO_INT (ui_data->form_retval);
+- ui_data->form_retval = NULL;
+- } else
+- response = AUTH_DIALOG_RESPONSE_CANCEL;
+-
+- /* set entry results and free temporary data structures */
+- while (!g_queue_is_empty (ui_data->form_entries)) {
+- ui_fragment_data *data;
+- data = g_queue_pop_tail (ui_data->form_entries);
+- if (data->entry_text) {
+- UI_set_result(ui, data->uis, data->entry_text);
+- }
+- if (data->cancel) {
+- g_cancellable_cancel(data->cancel);
+- }
+- g_slice_free (ui_fragment_data, data);
+- }
+- ui_data->form_grabbed = 0;
+- g_mutex_unlock(&ui_data->form_mutex);
+-
+- /* -1 = cancel,
+- * 0 = failure,
+- * 1 = success */
+- return (response == AUTH_DIALOG_RESPONSE_LOGIN ? 1 : -1);
+-}
+-
+-/* runs in worker thread */
+-static int ui_close(UI *ui)
+-{
+- return 1;
+-}
+-
+-static int init_openssl_ui(void)
+-{
+- UI_METHOD *ui_method = UI_create_method("OpenConnect VPN UI (gtk)");
+-
+- UI_method_set_opener(ui_method, ui_open);
+- UI_method_set_flusher(ui_method, ui_flush);
+- UI_method_set_writer(ui_method, ui_write);
+- UI_method_set_closer(ui_method, ui_close);
+-
+- UI_set_default_method(ui_method);
+- return 0;
+-}
+-#endif /* OPENCONNECT_OPENSSL */
+-
+ static char *find_form_answer(GHashTable *secrets, struct oc_auth_form *form,
+ struct oc_form_opt *opt)
+ {
+@@ -1834,9 +1640,6 @@ int main (int argc, char **argv)
+
+ build_main_dialog(_ui_data);
+
+-#ifdef OPENCONNECT_OPENSSL
+- init_openssl_ui();
+-#endif
+ openconnect_init_ssl();
+
+ /* Start connecting now if there's only one host. Or if configured to */
+--
+2.2.0
+
diff --git a/net-misc/networkmanager-openconnect/files/0.9.10.0/0028-Update-to-new-hash-handling-fix-to-match-stored-cert.patch b/net-misc/networkmanager-openconnect/files/0.9.10.0/0028-Update-to-new-hash-handling-fix-to-match-stored-cert.patch
new file mode 100644
index 000000000000..223d59f0c1db
--- /dev/null
+++ b/net-misc/networkmanager-openconnect/files/0.9.10.0/0028-Update-to-new-hash-handling-fix-to-match-stored-cert.patch
@@ -0,0 +1,185 @@
+From 2dc45e25b200e1b70e862f46c9f7ad652e59c8a2 Mon Sep 17 00:00:00 2001
+From: David Woodhouse <David.Woodhouse@intel.com>
+Date: Mon, 3 Nov 2014 17:39:43 +0000
+Subject: [PATCH 28/34] Update to new hash handling, fix to match stored certs
+ only for the same host/port
+
+---
+ auth-dialog/main.c | 90 +++++++++++++++++++++++++++++-------------------------
+ 1 file changed, 49 insertions(+), 41 deletions(-)
+
+diff --git a/auth-dialog/main.c b/auth-dialog/main.c
+index df0146c..38f3a8f 100644
+--- a/auth-dialog/main.c
++++ b/auth-dialog/main.c
+@@ -694,7 +694,7 @@ static char* get_title(const char *vpn_name)
+
+ typedef struct cert_data {
+ auth_ui_data *ui_data;
+- OPENCONNECT_X509 *peer_cert;
++ char *cert_details;
+ const char *reason;
+ } cert_data;
+
+@@ -722,13 +722,10 @@ static gboolean user_validate_cert(cert_data *data)
+ {
+ auth_ui_data *ui_data = _ui_data; /* FIXME global */
+ char *title;
+- char *details;
+ GtkWidget *dlg, *text, *scroll;
+ GtkTextBuffer *buffer;
+ int result;
+
+- details = openconnect_get_cert_details(ui_data->vpninfo, data->peer_cert);
+-
+ title = get_title(data->ui_data->vpn_name);
+ dlg = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_QUESTION,
+ GTK_BUTTONS_OK_CANCEL,
+@@ -751,8 +748,7 @@ static gboolean user_validate_cert(cert_data *data)
+
+ text = gtk_text_view_new();
+ buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));
+- gtk_text_buffer_set_text(buffer, details, -1);
+- openconnect_free_cert_info(data->ui_data->vpninfo, details);
++ gtk_text_buffer_set_text(buffer, data->cert_details, -1);
+ gtk_text_view_set_editable(GTK_TEXT_VIEW(text), 0);
+ gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(text), FALSE);
+ gtk_container_add(GTK_CONTAINER(scroll), text);
+@@ -775,36 +771,40 @@ static gboolean user_validate_cert(cert_data *data)
+
+ /* runs in worker thread */
+ static int validate_peer_cert(void *cbdata,
+- OPENCONNECT_X509 *peer_cert, const char *reason)
++#if !OPENCONNECT_CHECK_VER(5,0)
++ OPENCONNECT_X509 *peer_cert,
++#endif
++ const char *reason)
+ {
+ auth_ui_data *ui_data = cbdata;
+- char fingerprint[41];
+- char *certs_data;
+ int ret = 0;
+ cert_data *data;
++ char *certkey;
++ char *accepted_hash = NULL;
++#if OPENCONNECT_CHECK_VER(5,0)
++ const char *fingerprint = openconnect_get_peer_cert_hash(ui_data->vpninfo);
++#else
++ char fingerprint[41];
+
+ ret = openconnect_get_cert_sha1(ui_data->vpninfo, peer_cert, fingerprint);
+ if (ret)
+ return ret;
+
+- certs_data = g_hash_table_lookup (ui_data->secrets, "certsigs");
+- if (certs_data) {
+- char **certs = g_strsplit_set(certs_data, "\t", 0);
+- char **this = certs;
++#define openconnect_check_peer_cert_hash(v, h) strcmp(h, fingerprint)
++#define openconnect_get_peer_cert_details(v) openconnect_get_cert_details(v, peer_cert);
++#endif
+
+- while (*this) {
+- if (!strcmp(*this, fingerprint)) {
+- g_strfreev(certs);
+- goto out;
+- }
+- this++;
+- }
+- g_strfreev(certs);
+- }
++ certkey = g_strdup_printf ("certificate:%s:%d",
++ openconnect_get_hostname(ui_data->vpninfo),
++ openconnect_get_port(ui_data->vpninfo));
++
++ accepted_hash = g_hash_table_lookup (ui_data->secrets, certkey);
++ if (accepted_hash && !openconnect_check_peer_cert_hash(ui_data->vpninfo, accepted_hash))
++ goto accepted;
+
+ data = g_slice_new(cert_data);
+ data->ui_data = ui_data; /* FIXME uses global */
+- data->peer_cert = peer_cert;
++ data->cert_details = openconnect_get_peer_cert_details(ui_data->vpninfo);
+ data->reason = reason;
+
+ g_mutex_lock(&ui_data->form_mutex);
+@@ -813,27 +813,27 @@ static int validate_peer_cert(void *cbdata,
+ g_idle_add((GSourceFunc)user_validate_cert, data);
+
+ /* wait for user to accept or cancel */
+- while (ui_data->cert_response == CERT_USER_NOT_READY) {
++ while (ui_data->cert_response == CERT_USER_NOT_READY)
+ g_cond_wait(&ui_data->cert_response_changed, &ui_data->form_mutex);
+- }
+- if (ui_data->cert_response == CERT_ACCEPTED) {
+- if (certs_data) {
+- char *new = g_strdup_printf("%s\t%s", certs_data, fingerprint);
+- g_hash_table_insert (ui_data->secrets,
+- g_strdup ("certsigs"), new);
+- } else {
+- g_hash_table_insert (ui_data->secrets, g_strdup ("certsigs"),
+- g_strdup (fingerprint));
+- }
++
++ openconnect_free_cert_info(data->ui_data->vpninfo, data->cert_details);
++ g_slice_free(cert_data, data);
++
++ if (ui_data->cert_response == CERT_ACCEPTED)
+ ret = 0;
+- } else {
++ else
+ ret = -EINVAL;
+- }
++
+ g_mutex_unlock (&ui_data->form_mutex);
+
+- g_slice_free(cert_data, data);
++ accepted:
++ if (!ret) {
++ g_hash_table_insert (ui_data->secrets, certkey,
++ g_strdup(fingerprint));
++ certkey = NULL;
++ }
+
+- out:
++ g_free (certkey);
+ return ret;
+ }
+
+@@ -1196,7 +1196,7 @@ static gboolean cookie_obtained(auth_ui_data *ui_data)
+ gtk_widget_set_sensitive(ui_data->cancel_button, FALSE);
+ }
+ } else if (!ui_data->cookie_retval) {
+- OPENCONNECT_X509 *cert;
++ const void *cert;
+ gchar *key, *value;
+
+ /* got cookie */
+@@ -1218,14 +1218,22 @@ static gboolean cookie_obtained(auth_ui_data *ui_data)
+ g_hash_table_insert (ui_data->secrets, key, value);
+ openconnect_clear_cookie(ui_data->vpninfo);
+
++#if OPENCONNECT_CHECK_VER(5,0)
++ cert = openconnect_get_peer_cert_hash (ui_data->vpninfo);
++ if (cert) {
++ key = g_strdup (NM_OPENCONNECT_KEY_GWCERT);
++ value = g_strdup (cert);
++ g_hash_table_insert (ui_data->secrets, key, value);
++ }
++#else
+ cert = openconnect_get_peer_cert (ui_data->vpninfo);
+ if (cert) {
+ key = g_strdup (NM_OPENCONNECT_KEY_GWCERT);
+ value = g_malloc0 (41);
+- openconnect_get_cert_sha1(ui_data->vpninfo, cert, value);
++ openconnect_get_cert_sha1(ui_data->vpninfo, (void *)cert, value);
+ g_hash_table_insert (ui_data->secrets, key, value);
+ }
+-
++#endif
+ if (get_save_passwords(ui_data->secrets)) {
+ g_hash_table_foreach(ui_data->success_passwords,
+ keyring_store_passwords,
+--
+2.2.0
+
diff --git a/net-misc/networkmanager-openconnect/metadata.xml b/net-misc/networkmanager-openconnect/metadata.xml
new file mode 100644
index 000000000000..e210f22ed961
--- /dev/null
+++ b/net-misc/networkmanager-openconnect/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>gnome</herd>
+ <maintainer>
+ <email>steev@gentoo.org</email>
+ <name>Stephen Klimaszewski</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/networkmanager-openconnect/networkmanager-openconnect-0.9.10.0-r1.ebuild b/net-misc/networkmanager-openconnect/networkmanager-openconnect-0.9.10.0-r1.ebuild
new file mode 100644
index 000000000000..785249c13653
--- /dev/null
+++ b/net-misc/networkmanager-openconnect/networkmanager-openconnect-0.9.10.0-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager-${PN##*-}"
+
+inherit gnome2 user
+
+DESCRIPTION="NetworkManager OpenConnect plugin"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gtk"
+
+RDEPEND="
+ app-crypt/libsecret
+ >=net-misc/networkmanager-0.9.6:=
+ >=dev-libs/glib-2.32:2
+ >=dev-libs/dbus-glib-0.74
+ dev-libs/libxml2:2
+ >=net-misc/openconnect-3.02:=
+ gtk? ( >=x11-libs/gtk+-3.4:3 )
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ dev-util/intltool
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ EPATCH_FORCE=yes EPATCH_SUFFIX=patch EPATCH_SOURCE="${FILESDIR}/${PV}" epatch
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ $(use_with gtk gnome) \
+ $(use_with gtk authdlg)
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ enewgroup nm-openconnect
+ enewuser nm-openconnect -1 -1 -1 nm-openconnect
+}
diff --git a/net-misc/networkmanager-openconnect/networkmanager-openconnect-0.9.10.0.ebuild b/net-misc/networkmanager-openconnect/networkmanager-openconnect-0.9.10.0.ebuild
new file mode 100644
index 000000000000..63720dc17d0b
--- /dev/null
+++ b/net-misc/networkmanager-openconnect/networkmanager-openconnect-0.9.10.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager-${PN##*-}"
+
+inherit gnome2 user
+
+DESCRIPTION="NetworkManager OpenConnect plugin"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="gtk"
+
+RDEPEND="
+ app-crypt/libsecret
+ >=net-misc/networkmanager-0.9.6:=
+ >=dev-libs/glib-2.32:2
+ >=dev-libs/dbus-glib-0.74
+ dev-libs/libxml2:2
+ >=net-misc/openconnect-3.02:=
+ gtk? ( >=x11-libs/gtk+-3.4:3 )
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ dev-util/intltool
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch_user
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ $(use_with gtk gnome) \
+ $(use_with gtk authdlg)
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ enewgroup nm-openconnect
+ enewuser nm-openconnect -1 -1 -1 nm-openconnect
+}
diff --git a/net-misc/networkmanager-openconnect/networkmanager-openconnect-1.0.0.ebuild b/net-misc/networkmanager-openconnect/networkmanager-openconnect-1.0.0.ebuild
new file mode 100644
index 000000000000..16c7bc1d02df
--- /dev/null
+++ b/net-misc/networkmanager-openconnect/networkmanager-openconnect-1.0.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager-${PN##*-}"
+
+inherit gnome2 user
+
+DESCRIPTION="NetworkManager OpenConnect plugin"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="gtk"
+
+RDEPEND="
+ app-crypt/libsecret
+ >=net-misc/networkmanager-0.9.10:=
+ >=dev-libs/glib-2.32:2
+ >=dev-libs/dbus-glib-0.74
+ dev-libs/libxml2:2
+ >=net-misc/openconnect-3.02:=
+ gtk? ( >=x11-libs/gtk+-3.4:3 )
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ dev-util/intltool
+ virtual/pkgconfig
+"
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ $(use_with gtk gnome) \
+ $(use_with gtk authdlg)
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ enewgroup nm-openconnect
+ enewuser nm-openconnect -1 -1 -1 nm-openconnect
+}
diff --git a/net-misc/networkmanager-openconnect/networkmanager-openconnect-1.0.2.ebuild b/net-misc/networkmanager-openconnect/networkmanager-openconnect-1.0.2.ebuild
new file mode 100644
index 000000000000..16c7bc1d02df
--- /dev/null
+++ b/net-misc/networkmanager-openconnect/networkmanager-openconnect-1.0.2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager-${PN##*-}"
+
+inherit gnome2 user
+
+DESCRIPTION="NetworkManager OpenConnect plugin"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="gtk"
+
+RDEPEND="
+ app-crypt/libsecret
+ >=net-misc/networkmanager-0.9.10:=
+ >=dev-libs/glib-2.32:2
+ >=dev-libs/dbus-glib-0.74
+ dev-libs/libxml2:2
+ >=net-misc/openconnect-3.02:=
+ gtk? ( >=x11-libs/gtk+-3.4:3 )
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ dev-util/intltool
+ virtual/pkgconfig
+"
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ $(use_with gtk gnome) \
+ $(use_with gtk authdlg)
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ enewgroup nm-openconnect
+ enewuser nm-openconnect -1 -1 -1 nm-openconnect
+}
diff --git a/net-misc/networkmanager-openswan/Manifest b/net-misc/networkmanager-openswan/Manifest
new file mode 100644
index 000000000000..08d2d1aa6c76
--- /dev/null
+++ b/net-misc/networkmanager-openswan/Manifest
@@ -0,0 +1,4 @@
+DIST NetworkManager-openswan-0.9.8.4.tar.xz 301068 SHA256 b11bbfeb2eb2efe6392a94f4b8f41efc3c79a947ed2eff3f0881d5bcd2edf107 SHA512 0e32005d979923add3db42333f6bf3f5e6759cde9436a4f6deb9e21f0ec227b5fe91467dbb2e4d95ed576cbfef016096123e36684af006b4b38ed141cc3eab20 WHIRLPOOL d211035e4d2d1ba068a3fed2b09d6177114c1fd90253a8518064fff6b859144441fc42b5388db7ae5b61731d8713dc8c79bcd2caa4490fba0135677f7bfafe25
+DIST NetworkManager-openswan-1.0.0.tar.xz 306000 SHA256 baac8816c95cc8d50aa00cbe8a78d8ddeb0b8ce710367e7e776ef36dd80c97fd SHA512 c39a9d21bca6d1a831cdbbe58115801d317e0d3f62f2298d04333a940e425220915e5803fe8e32b9e18a78584acb7e978b885546ab99d15895f9a7281c2cd337 WHIRLPOOL 54dec450f81ddbc9f8554daa2f27d228fc7edd64b72dad2ee203a88b4a61e1955063b8d3680ed3d7660f67b138d9db340e5ac2c352b4fde7228589d44b4c137e
+DIST NetworkManager-openswan-1.0.2.tar.xz 307168 SHA256 9a31b792e9b0d6a577a00fe8b9fb45d363bed790b43bbedbf1015fefb164adba SHA512 b1b5b7f8085c1b7ff48970416b527cf28ca617c9073115c0753e36c9f0aa45961febe82a73aa77e51feca677ef5ac3e6c8c7c6d9601b12ecb2eeea8c56899d07 WHIRLPOOL 5cc047b199aff8e1fc27ae038a1ea2c99f34ef508eb0aeeaf6345307eddf8f189f2b9d66e545e97099c128f05c9a51bd779ebe64a46a8d9a2af98a1231d53f58
+DIST networkmanager-openswan-0.9.8.4-patches.tar.bz2 11604 SHA256 fbf01743fa6cd0cb8986a218d54e5da5d0eb8caed92f05f8aa68a87de07b4a0b SHA512 f488b5c25011ef5af2e862f2f9885b1529448303da47ca611339e8b5929be2212d4dcacc08e5b8075ef3f57ed1bd0f09d163e0582b14dcbf2a81b2dc12cc77b0 WHIRLPOOL d36dd8b68ec70e57ce2aea79ed50aa47e071416396de3a85f6fcdf3c0b722952265608695dc62d2e78f9c51c03a9279edf92386d635d09acdf7ed371f7600e2a
diff --git a/net-misc/networkmanager-openswan/metadata.xml b/net-misc/networkmanager-openswan/metadata.xml
new file mode 100644
index 000000000000..e210f22ed961
--- /dev/null
+++ b/net-misc/networkmanager-openswan/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>gnome</herd>
+ <maintainer>
+ <email>steev@gentoo.org</email>
+ <name>Stephen Klimaszewski</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/networkmanager-openswan/networkmanager-openswan-0.9.8.4-r1.ebuild b/net-misc/networkmanager-openswan/networkmanager-openswan-0.9.8.4-r1.ebuild
new file mode 100644
index 000000000000..9ca749a9ef97
--- /dev/null
+++ b/net-misc/networkmanager-openswan/networkmanager-openswan-0.9.8.4-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager-${PN##*-}"
+
+inherit autotools eutils gnome2
+
+DESCRIPTION="NetworkManager Openswan plugin"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+SRC_URI="${SRC_URI} http://dev.gentoo.org/~pacho/gnome/${P}-patches.tar.bz2"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="gtk"
+
+RDEPEND="
+ >=net-misc/networkmanager-0.9.8:=
+ >=dev-libs/dbus-glib-0.74
+ || ( net-misc/openswan net-misc/libreswan )
+ gtk? (
+ >=x11-libs/gtk+-3.0.0:3
+ gnome-base/gnome-keyring
+ gnome-base/libgnome-keyring
+ )"
+
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ dev-util/intltool
+ virtual/pkgconfig"
+
+src_prepare() {
+ # Apply patches from Fedora, upstream bug #735692
+ epatch "${WORKDIR}/${P}-patches"/*.patch
+ echo "auth-dialog/nm-openswan-auth-dialog.desktop.in" >> po/POTFILES.in || die
+ echo "auth-dialog/nm-openswan-auth-dialog.desktop.in.in" >> po/POTFILES.in || die
+
+ eautoreconf
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ --with-dist-version=Gentoo \
+ --with-gtkver=3 \
+ $(use_with gtk gnome)
+}
diff --git a/net-misc/networkmanager-openswan/networkmanager-openswan-1.0.0.ebuild b/net-misc/networkmanager-openswan/networkmanager-openswan-1.0.0.ebuild
new file mode 100644
index 000000000000..87cb09caea58
--- /dev/null
+++ b/net-misc/networkmanager-openswan/networkmanager-openswan-1.0.0.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager-${PN##*-}"
+
+inherit gnome2
+
+DESCRIPTION="NetworkManager Openswan plugin"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="gtk"
+
+RDEPEND="
+ >=dev-libs/glib-2.32:2
+ >=dev-libs/libnl-3.2.8:3
+ >=net-misc/networkmanager-0.9.10:=
+ >=dev-libs/dbus-glib-0.74
+ || ( net-misc/openswan net-misc/libreswan )
+ gtk? (
+ app-crypt/libsecret
+ >=x11-libs/gtk+-3.4:3
+ )
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ dev-util/intltool
+ virtual/pkgconfig
+"
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ --with-dist-version=Gentoo \
+ $(use_with gtk gnome)
+}
diff --git a/net-misc/networkmanager-openswan/networkmanager-openswan-1.0.2.ebuild b/net-misc/networkmanager-openswan/networkmanager-openswan-1.0.2.ebuild
new file mode 100644
index 000000000000..46804201191f
--- /dev/null
+++ b/net-misc/networkmanager-openswan/networkmanager-openswan-1.0.2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager-${PN##*-}"
+
+inherit gnome2
+
+DESCRIPTION="NetworkManager Openswan plugin"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="gtk"
+
+RDEPEND="
+ >=dev-libs/glib-2.32:2
+ >=dev-libs/libnl-3.2.8:3
+ >=net-misc/networkmanager-0.9.10:=
+ >=dev-libs/dbus-glib-0.74
+ || ( net-misc/openswan net-misc/libreswan )
+ gtk? (
+ app-crypt/libsecret
+ >=gnome-extra/nm-applet-0.9.10
+ >=x11-libs/gtk+-3.4:3
+ )
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ dev-util/intltool
+ virtual/pkgconfig
+"
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ --with-dist-version=Gentoo \
+ $(use_with gtk gnome)
+}
diff --git a/net-misc/networkmanager-openvpn/Manifest b/net-misc/networkmanager-openvpn/Manifest
new file mode 100644
index 000000000000..3a665930da91
--- /dev/null
+++ b/net-misc/networkmanager-openvpn/Manifest
@@ -0,0 +1,4 @@
+DIST NetworkManager-openvpn-0.9.10.0.tar.xz 400648 SHA256 7b65e738a189758b090eca7a2da63d444776c89adb979e71bcc3a982a1ff140d SHA512 89ba98c3c5e1598d4619b2199e3f4030d3b130e0b738478da28b0b6ccbb5083763b8709b1b2a61d8e847522eff09a25d56da8eadd2016e22e8838077d02f0e88 WHIRLPOOL 568acc5eb72bf701bad5822f99be19677e1ea4c2545f4503d7ba9885378902bcdb0ed68b5c074f1b79adf7a30fa5f2cb0d3813fbb7258e50bd9e6b7f84cb3e53
+DIST NetworkManager-openvpn-0.9.8.4.tar.xz 395816 SHA256 af8c52b6a61af3c178eed1ea8f1d4704bea87331fde43deb3d4aafe1821e6687 SHA512 e0b5f0dd4eb07adbc4d07dac4d3a2dd19f9154bb5eb654d2ae0ab4c9dce2f351c65e3b4edfd9635ac254b14cf5bed0aecf659b98f410d932ecd22b0363677e70 WHIRLPOOL b9c2a32325224d1e293ddf9072a69892ba41c253b0b493640fd5f6d048cbe93609c6252408a3ef148707d51cf512155ba24bddb5df8757dacafed1f8927f340f
+DIST NetworkManager-openvpn-1.0.0.tar.xz 406752 SHA256 d0ad918c8d3736b690f0ed031c03251829fa110aa339e0e531e47100551f1bf0 SHA512 f9034b4b5cccc990e361cc446e42397b12114437e639a31008cac03804dd66a5b27b69dcc72b4ba1d3beaba256f0ab8ed4f50a8a1503f224828251aae5131570 WHIRLPOOL 532d8561abf3c1acc8f068747e99492dde393b8a287f257e4a17f23ee62b2fd13e9bc03f97825f58f654b09021cb2a309977268cd07dd7649125c945d5fbfc7f
+DIST NetworkManager-openvpn-1.0.2.tar.xz 413496 SHA256 1643824bc7fdab42e1dab836bf81c328692295c86f146bde602eca093b394bb0 SHA512 7ee60b47ac0825e116e8c90c577fee778d2a271cdc97772aa716a9a348a576a3afb8db541473297a3cd775fd716d528df385622c54a82139b3701ebab1980a50 WHIRLPOOL fdbc330736bd8b24a834b01c5cc1dd81acaef557fa754b5668a8354ebc39c85288798259ae6c107c76d4fc329217f776057f7c50a631695d481e7ccee0ee385c
diff --git a/net-misc/networkmanager-openvpn/metadata.xml b/net-misc/networkmanager-openvpn/metadata.xml
new file mode 100644
index 000000000000..e210f22ed961
--- /dev/null
+++ b/net-misc/networkmanager-openvpn/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>gnome</herd>
+ <maintainer>
+ <email>steev@gentoo.org</email>
+ <name>Stephen Klimaszewski</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.9.10.0.ebuild b/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.9.10.0.ebuild
new file mode 100644
index 000000000000..bb02e71efe13
--- /dev/null
+++ b/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.9.10.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
+GNOME_ORG_MODULE="NetworkManager-${PN##*-}"
+GCONF_DEBUG="no"
+
+inherit eutils gnome2
+
+DESCRIPTION="NetworkManager OpenVPN plugin"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="gtk test"
+
+RDEPEND="
+ >=dev-libs/dbus-glib-0.74
+ >=dev-libs/glib-2.32:2
+ >=net-misc/networkmanager-0.9.9
+ >=net-misc/openvpn-2.1_rc9
+ gtk? (
+ app-crypt/libsecret
+ >=gnome-extra/nm-applet-0.9.9.0
+ >=x11-libs/gtk+-3.4:3
+ )"
+
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ >=dev-util/intltool-0.35
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ # Test will fail if the machine doesn't have a particular locale installed
+ # FAIL: (tls-import-data) unexpected 'ca' secret value
+ sed '/test_non_utf8_import (plugin, test_dir)/ d' \
+ -i properties/tests/test-import-export.c || die "sed failed"
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ --with-dist-version=Gentoo \
+ $(use_with gtk gnome) \
+ $(use_with test tests)
+}
diff --git a/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.9.8.4.ebuild b/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.9.8.4.ebuild
new file mode 100644
index 000000000000..f7807b74e008
--- /dev/null
+++ b/net-misc/networkmanager-openvpn/networkmanager-openvpn-0.9.8.4.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GNOME_ORG_MODULE="NetworkManager-${PN##*-}"
+
+inherit eutils gnome2-utils gnome.org
+
+DESCRIPTION="NetworkManager OpenVPN plugin"
+HOMEPAGE="http://www.gnome.org/projects/NetworkManager/"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="gtk test"
+
+RDEPEND="
+ >=dev-libs/dbus-glib-0.74
+ >=net-misc/networkmanager-0.9.8
+ >=net-misc/openvpn-2.1_rc9
+ gtk? (
+ >=x11-libs/gtk+-2.91.4:3
+ gnome-base/gnome-keyring
+ gnome-base/libgnome-keyring
+ )"
+
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ >=dev-util/intltool-0.35
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ # Test will fail if the machine doesn't have a particular locale installed
+ # FAIL: (tls-import-data) unexpected 'ca' secret value
+ sed '/test_non_utf8_import (plugin, test_dir)/ d' \
+ -i properties/tests/test-import-export.c || die "sed failed"
+
+ gnome2_disable_deprecation_warning
+}
+
+src_configure() {
+ econf \
+ --disable-more-warnings \
+ --disable-static \
+ --with-dist-version=Gentoo \
+ --with-gtkver=3 \
+ $(use_with gtk gnome) \
+ $(use_with test tests)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/net-misc/networkmanager-openvpn/networkmanager-openvpn-1.0.0-r1.ebuild b/net-misc/networkmanager-openvpn/networkmanager-openvpn-1.0.0-r1.ebuild
new file mode 100644
index 000000000000..135bdf1df92b
--- /dev/null
+++ b/net-misc/networkmanager-openvpn/networkmanager-openvpn-1.0.0-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager-${PN##*-}"
+
+inherit eutils gnome2
+
+DESCRIPTION="NetworkManager OpenVPN plugin"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="gtk test"
+
+RDEPEND="
+ >=dev-libs/dbus-glib-0.74
+ >=dev-libs/glib-2.32:2
+ >=net-misc/networkmanager-0.9.10:=
+ >=net-misc/openvpn-2.1_rc9
+ gtk? (
+ app-crypt/libsecret
+ >=gnome-extra/nm-applet-0.9.9.0
+ >=x11-libs/gtk+-3.4:3
+ )"
+
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ >=dev-util/intltool-0.35
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ # Test will fail if the machine doesn't have a particular locale installed
+ # FAIL: (tls-import-data) unexpected 'ca' secret value, upstream bug #742708
+ sed '/test_non_utf8_import (plugin, test_dir)/ d' \
+ -i properties/tests/test-import-export.c || die "sed failed"
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ # --localstatedir=/var needed per bug #536248
+ gnome2_src_configure \
+ --localstatedir=/var \
+ --disable-more-warnings \
+ --disable-static \
+ --with-dist-version=Gentoo \
+ $(use_with gtk gnome) \
+ $(use_with test tests)
+}
diff --git a/net-misc/networkmanager-openvpn/networkmanager-openvpn-1.0.0.ebuild b/net-misc/networkmanager-openvpn/networkmanager-openvpn-1.0.0.ebuild
new file mode 100644
index 000000000000..8fe1f5adbe5c
--- /dev/null
+++ b/net-misc/networkmanager-openvpn/networkmanager-openvpn-1.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
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager-${PN##*-}"
+
+inherit eutils gnome2
+
+DESCRIPTION="NetworkManager OpenVPN plugin"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="gtk test"
+
+RDEPEND="
+ >=dev-libs/dbus-glib-0.74
+ >=dev-libs/glib-2.32:2
+ >=net-misc/networkmanager-0.9.10:=
+ >=net-misc/openvpn-2.1_rc9
+ gtk? (
+ app-crypt/libsecret
+ >=gnome-extra/nm-applet-0.9.9.0
+ >=x11-libs/gtk+-3.4:3
+ )"
+
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ >=dev-util/intltool-0.35
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ # Test will fail if the machine doesn't have a particular locale installed
+ # FAIL: (tls-import-data) unexpected 'ca' secret value, upstream bug #742708
+ sed '/test_non_utf8_import (plugin, test_dir)/ d' \
+ -i properties/tests/test-import-export.c || die "sed failed"
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ --with-dist-version=Gentoo \
+ $(use_with gtk gnome) \
+ $(use_with test tests)
+}
diff --git a/net-misc/networkmanager-openvpn/networkmanager-openvpn-1.0.2.ebuild b/net-misc/networkmanager-openvpn/networkmanager-openvpn-1.0.2.ebuild
new file mode 100644
index 000000000000..135bdf1df92b
--- /dev/null
+++ b/net-misc/networkmanager-openvpn/networkmanager-openvpn-1.0.2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager-${PN##*-}"
+
+inherit eutils gnome2
+
+DESCRIPTION="NetworkManager OpenVPN plugin"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="gtk test"
+
+RDEPEND="
+ >=dev-libs/dbus-glib-0.74
+ >=dev-libs/glib-2.32:2
+ >=net-misc/networkmanager-0.9.10:=
+ >=net-misc/openvpn-2.1_rc9
+ gtk? (
+ app-crypt/libsecret
+ >=gnome-extra/nm-applet-0.9.9.0
+ >=x11-libs/gtk+-3.4:3
+ )"
+
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ >=dev-util/intltool-0.35
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ # Test will fail if the machine doesn't have a particular locale installed
+ # FAIL: (tls-import-data) unexpected 'ca' secret value, upstream bug #742708
+ sed '/test_non_utf8_import (plugin, test_dir)/ d' \
+ -i properties/tests/test-import-export.c || die "sed failed"
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ # --localstatedir=/var needed per bug #536248
+ gnome2_src_configure \
+ --localstatedir=/var \
+ --disable-more-warnings \
+ --disable-static \
+ --with-dist-version=Gentoo \
+ $(use_with gtk gnome) \
+ $(use_with test tests)
+}
diff --git a/net-misc/networkmanager-pptp/Manifest b/net-misc/networkmanager-pptp/Manifest
new file mode 100644
index 000000000000..b8fe619348c8
--- /dev/null
+++ b/net-misc/networkmanager-pptp/Manifest
@@ -0,0 +1,4 @@
+DIST NetworkManager-pptp-0.9.10.0.tar.xz 350984 SHA256 564b16c9b2821a1d2ede06f56f4db5cb0d62ccb35f87c92ad6c636ed48e0af58 SHA512 97ed2840e3615d9131319e752536fd5ed30d8fe1e3084fd82ec963f5efa30ff627cd30d1c21cc6382ea58c2edd4422d3ce597d170bb26c2471d044c19c19b2c8 WHIRLPOOL 932d9eeb9f2dce7cb528e5fd6f841208f09454830365ae99c1afa9c26bc05a6049a1b50c52b66d61a3eec9ef976f3eee2b9a9b01ed57b9a9b822c01430c96aa1
+DIST NetworkManager-pptp-0.9.8.4.tar.xz 353004 SHA256 97ba8f6f726056c3b8e0e1c8d2ab3d32791cadd7c3a38e0478fb2bd3ecafdce8 SHA512 86138cb91b22596c075575cad7ad6c5c9efa3cc6d3491bb148b6ba79007968764b6043c3b89d1034b6825d25f2cf56158f9f278d5a2c12636e34c541384e5489 WHIRLPOOL 2ce9389bbc3623748f74e706389ae7b6969aa82fe0c63dcc6293721b90d373d4046a7a89c09e26a80531724b7208eba49871b139924141969dddb519f9e6884d
+DIST NetworkManager-pptp-1.0.0.tar.xz 351716 SHA256 200d5c65cdae248d3b4d0daa76a4f8bc1432376ed4da7afedd5085bb0da7ee76 SHA512 554811d19324fa73406b6a37f0bcb8694f076e25eedb8f2ba6ac4acda4d2890bb4af750d6ec14df3a0ee330f137f385f40fa8ccb579c6d712a08d9aba9080b77 WHIRLPOOL cfd0e7cce0a049123d05e60acde1122569e0f80f414f4b0b89a74107f3898db4a95205f6e0646fe687fb4a3927682faae0fa1937b7634df30bc4db65fd75e04a
+DIST NetworkManager-pptp-1.0.2.tar.xz 353420 SHA256 37cb7c6064d1a65ea9b67bb9d31947c2434db3cfb55a2911481fa4e48e332017 SHA512 02518ed9b38ce8fde61d254a9375b709dbca394e5037f213203ab5b58dd7525813862d5a115f036612cefc362a28063cb2fd394621a53269a315578076592bbe WHIRLPOOL ca03929b928b8830b64ee8418e28f562d85da074a293e88938289230a4feb9afd691ef79fbdac8e435cc28fc0a98bb2b1161815b8c73c2bfd80a4c007f3a9dad
diff --git a/net-misc/networkmanager-pptp/metadata.xml b/net-misc/networkmanager-pptp/metadata.xml
new file mode 100644
index 000000000000..e210f22ed961
--- /dev/null
+++ b/net-misc/networkmanager-pptp/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>gnome</herd>
+ <maintainer>
+ <email>steev@gentoo.org</email>
+ <name>Stephen Klimaszewski</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/networkmanager-pptp/networkmanager-pptp-0.9.10.0.ebuild b/net-misc/networkmanager-pptp/networkmanager-pptp-0.9.10.0.ebuild
new file mode 100644
index 000000000000..1bb2ddc57a41
--- /dev/null
+++ b/net-misc/networkmanager-pptp/networkmanager-pptp-0.9.10.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager-${PN##*-}"
+
+inherit gnome2
+
+DESCRIPTION="NetworkManager PPTP plugin"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="gtk"
+
+RDEPEND="
+ >=net-misc/networkmanager-0.9.6
+ >=dev-libs/dbus-glib-0.74
+ >=dev-libs/glib-2.32:2
+ net-dialup/ppp:=
+ net-dialup/pptpclient
+ gtk? (
+ app-crypt/libsecret
+ >=gnome-extra/nm-applet-0.9.9.0
+ >=x11-libs/gtk+-3.4:3
+ )"
+
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ dev-util/intltool
+ virtual/pkgconfig
+"
+
+src_configure() {
+ local myconf
+ # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
+ local PPPD_VER=`best_version net-dialup/ppp`
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+ PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
+ myconf="${myconf} --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER}"
+
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ --with-dist-version=Gentoo \
+ $(use_with gtk gnome) \
+ ${myconf}
+}
diff --git a/net-misc/networkmanager-pptp/networkmanager-pptp-0.9.8.4.ebuild b/net-misc/networkmanager-pptp/networkmanager-pptp-0.9.8.4.ebuild
new file mode 100644
index 000000000000..7161bec46d29
--- /dev/null
+++ b/net-misc/networkmanager-pptp/networkmanager-pptp-0.9.8.4.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GNOME_ORG_MODULE="NetworkManager-${PN##*-}"
+
+inherit eutils gnome2-utils gnome.org
+
+DESCRIPTION="NetworkManager PPTP plugin"
+HOMEPAGE="http://www.gnome.org/projects/NetworkManager/"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="gtk"
+
+RDEPEND="
+ >=net-misc/networkmanager-0.9.8
+ >=dev-libs/dbus-glib-0.74
+ net-dialup/ppp
+ net-dialup/pptpclient
+ gtk? (
+ >=x11-libs/gtk+-2.91.4:3
+ gnome-base/gnome-keyring
+ gnome-base/libgnome-keyring
+ )"
+
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ dev-util/intltool
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ gnome2_disable_deprecation_warning
+}
+
+src_configure() {
+ econf \
+ --disable-more-warnings \
+ --disable-static \
+ --with-dist-version=Gentoo \
+ --with-gtkver=3 \
+ $(use_with gtk gnome)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/net-misc/networkmanager-pptp/networkmanager-pptp-1.0.0.ebuild b/net-misc/networkmanager-pptp/networkmanager-pptp-1.0.0.ebuild
new file mode 100644
index 000000000000..85f1c5d68f7e
--- /dev/null
+++ b/net-misc/networkmanager-pptp/networkmanager-pptp-1.0.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager-${PN##*-}"
+
+inherit gnome2
+
+DESCRIPTION="NetworkManager PPTP plugin"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="gtk"
+
+RDEPEND="
+ >=net-misc/networkmanager-0.9.10:=
+ >=dev-libs/dbus-glib-0.74
+ >=dev-libs/glib-2.32:2
+ net-dialup/ppp:=
+ net-dialup/pptpclient
+ gtk? (
+ app-crypt/libsecret
+ >=gnome-extra/nm-applet-0.9.9.0
+ >=x11-libs/gtk+-3.4:3
+ )"
+
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ dev-util/intltool
+ virtual/pkgconfig
+"
+
+src_configure() {
+ local myconf
+ # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
+ local PPPD_VER=`best_version net-dialup/ppp`
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+ PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
+ myconf="${myconf} --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER}"
+
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ --with-dist-version=Gentoo \
+ $(use_with gtk gnome) \
+ ${myconf}
+}
diff --git a/net-misc/networkmanager-pptp/networkmanager-pptp-1.0.2.ebuild b/net-misc/networkmanager-pptp/networkmanager-pptp-1.0.2.ebuild
new file mode 100644
index 000000000000..85f1c5d68f7e
--- /dev/null
+++ b/net-misc/networkmanager-pptp/networkmanager-pptp-1.0.2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager-${PN##*-}"
+
+inherit gnome2
+
+DESCRIPTION="NetworkManager PPTP plugin"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="gtk"
+
+RDEPEND="
+ >=net-misc/networkmanager-0.9.10:=
+ >=dev-libs/dbus-glib-0.74
+ >=dev-libs/glib-2.32:2
+ net-dialup/ppp:=
+ net-dialup/pptpclient
+ gtk? (
+ app-crypt/libsecret
+ >=gnome-extra/nm-applet-0.9.9.0
+ >=x11-libs/gtk+-3.4:3
+ )"
+
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ dev-util/intltool
+ virtual/pkgconfig
+"
+
+src_configure() {
+ local myconf
+ # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
+ local PPPD_VER=`best_version net-dialup/ppp`
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+ PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
+ myconf="${myconf} --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER}"
+
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ --with-dist-version=Gentoo \
+ $(use_with gtk gnome) \
+ ${myconf}
+}
diff --git a/net-misc/networkmanager-sstp/Manifest b/net-misc/networkmanager-sstp/Manifest
new file mode 100644
index 000000000000..d52a64291d20
--- /dev/null
+++ b/net-misc/networkmanager-sstp/Manifest
@@ -0,0 +1 @@
+DIST NetworkManager-sstp-0.9.8.tar.bz2 417652 SHA256 b5b29c53ccc69683e624f509ec303d06dd1e68b35912be57fa763f1417370e74 SHA512 37f0df1a674a92d06bcb9d6ab45f02c4eb53c11a4ae11f87b32c191836be59cb30a6062cce5111cf7b34bad599194456a7b4f796419e053e6659028b219ff0bb WHIRLPOOL 00009c3668c23b7995b24d3bd6379d9715775492cfb8f96e56455047c0008035068f30dc67177d5a5f6917eb277a31acbf4aae0c8ea0627dc21f073beb884242
diff --git a/net-misc/networkmanager-sstp/metadata.xml b/net-misc/networkmanager-sstp/metadata.xml
new file mode 100644
index 000000000000..484deacc4471
--- /dev/null
+++ b/net-misc/networkmanager-sstp/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>proxy-maintainers</herd>
+<maintainer>
+ <email>andreis.vinogradovs@gmail.com</email>
+ <name>Andreis Vinogradovs</name>
+ <description>Maintainer. Assign bugs to him</description>
+</maintainer>
+<maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ <description>Proxy maintainer. CC him on bugs</description>
+</maintainer>
+<upstream>
+ <remote-id type="sourceforge">sstp-client</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/net-misc/networkmanager-sstp/networkmanager-sstp-0.9.8.ebuild b/net-misc/networkmanager-sstp/networkmanager-sstp-0.9.8.ebuild
new file mode 100644
index 000000000000..14dcc525e9f3
--- /dev/null
+++ b/net-misc/networkmanager-sstp/networkmanager-sstp-0.9.8.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+MY_PN="NetworkManager-sstp"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Client for the proprietary Microsoft Secure Socket Tunneling Protocol(SSTP)"
+HOMEPAGE="http://sourceforge.net/projects/sstp-client/"
+SRC_URI="mirror://sourceforge/project/sstp-client/network-manager-sstp/${PV}-1/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gtk"
+
+RDEPEND=">=dev-libs/dbus-glib-0.74
+ net-misc/sstp-client
+ >=net-misc/networkmanager-${PV}
+ net-dialup/ppp:=
+ gtk? (
+ x11-libs/gtk+:3
+ gnome-base/gnome-keyring
+ gnome-base/libgnome-keyring
+ )
+"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/gettext
+ dev-util/intltool
+"
+
+S="${WORKDIR}/${MY_P}"
+
+src_configure() {
+ local PPPD_VERSION="$(echo $(best_version net-dialup/ppp) | sed -e 's:net-dialup/ppp-\(.*\):\1:' -e 's:-r.*$::')"
+ econf \
+ --disable-more-warnings \
+ --disable-static \
+ --with-dist-version=Gentoo \
+ --with-pppd-plugin-dir="${EPREFIX}/usr/$(get_libdir)/pppd/${PPPD_VERSION}" \
+ --with-gtkver=3 \
+ $(use_with gtk gnome)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/net-misc/networkmanager-vpnc/Manifest b/net-misc/networkmanager-vpnc/Manifest
new file mode 100644
index 000000000000..5c46a91f9a6c
--- /dev/null
+++ b/net-misc/networkmanager-vpnc/Manifest
@@ -0,0 +1,4 @@
+DIST NetworkManager-vpnc-0.9.10.0.tar.xz 348824 SHA256 cf9168876602af8d56c79c888ce168b62485dc65bb7690a86ce5f4603eb48774 SHA512 0291f605cbbc15ddc54ccc60f9249ff6f62e4724944a5a22183580cc66db28dcda75bee49cb1c2964a35e126fb9b956d9ffd1cbd1a7fe058ecd798464ad6cd9a WHIRLPOOL 32b74d78807a7989fbccb2bb044886626776e3860de69f72b5b661a7a5a92772b732cdc683a1c0c483e261df5a8584c7b4f9a1f87b262a5eb1cab606a8fab2f5
+DIST NetworkManager-vpnc-0.9.8.6.tar.xz 348168 SHA256 40306cd713d4e6e9df6a520d2992664d22173b3327e94df45a6dac23f0a8abd6 SHA512 ccd44a5a55caa46d950a1afca393987820fcd60f13a921599d6fa47d09508c5e72cc58861824b0d83376bd4cf3105f0ef1163d2b88afe72ea467f5f8f6a8ab1d WHIRLPOOL 292abff615e239460702f9eba44cdbfd2ab7710674f695e1772cc0b8d9ee3b7eff548ac0216b2ca43695d3c4c109c02b528d929ff6aedbef7a3725b64a7e77e0
+DIST NetworkManager-vpnc-1.0.0.tar.xz 356224 SHA256 5ed0413932cd2d6100dc8b95e11ce18c44a182d81aca1dfd0400a6e419359894 SHA512 c3b99e5c8bab084fe47684dc991044c1fab65e36a91c9df9dafde1a78dadffdecce12b001206ad4351638ae5a2518381a7952346908baa7346c2eaa2e3b41e93 WHIRLPOOL 66dc5aee71004ca58de871f4f1f4b416d41c37959bdc5b345d088e39ba12fd37bc34a65f98b37c728d16f48488011f4b0c39ca9cd09d4b1394ad4c99dd76baf9
+DIST NetworkManager-vpnc-1.0.2.tar.xz 358100 SHA256 3e17bfc505d304b3d21a784c06fc4b990cabdafd6886b47632496dfba0dea500 SHA512 8f6fdf84d4951c0f623791a40ff141db34d7d00b3d48e3afc80a8bb1d591840717ef7eb145c9c021423174404eeb3133c537d3b970940cd7b43595a0257473d3 WHIRLPOOL aea37a15d893ce0af9a2220afe70fe4c93f33783132a7fa1d4b19e5fd1922a2bc08dc0ce86ea029ecd09fee4b742dd3e407c8896afe3cd7cc71ce4a2152149e6
diff --git a/net-misc/networkmanager-vpnc/metadata.xml b/net-misc/networkmanager-vpnc/metadata.xml
new file mode 100644
index 000000000000..e210f22ed961
--- /dev/null
+++ b/net-misc/networkmanager-vpnc/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>gnome</herd>
+ <maintainer>
+ <email>steev@gentoo.org</email>
+ <name>Stephen Klimaszewski</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/networkmanager-vpnc/networkmanager-vpnc-0.9.10.0.ebuild b/net-misc/networkmanager-vpnc/networkmanager-vpnc-0.9.10.0.ebuild
new file mode 100644
index 000000000000..ad715e6df1bc
--- /dev/null
+++ b/net-misc/networkmanager-vpnc/networkmanager-vpnc-0.9.10.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager-${PN##*-}"
+
+inherit gnome2
+
+DESCRIPTION="NetworkManager VPNC plugin"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="gtk test"
+
+RDEPEND="
+ >=net-misc/networkmanager-0.9.6
+ >=dev-libs/dbus-glib-0.74
+ >=dev-libs/glib-2.32:2
+ >=net-misc/vpnc-0.5
+ gtk? (
+ app-crypt/libsecret
+ >=gnome-extra/nm-applet-0.9.9.0
+ >=x11-libs/gtk+-3.4:3
+ )
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ dev-util/intltool
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ # Test will fail if the machine doesn't have a particular locale installed
+ sed '/test_non_utf8_import (plugin/ d' \
+ -i properties/tests/test-import-export.c || die "sed failed"
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ --with-dist-version=Gentoo \
+ $(use_with gtk gnome) \
+ $(use_with test tests)
+}
diff --git a/net-misc/networkmanager-vpnc/networkmanager-vpnc-0.9.8.6.ebuild b/net-misc/networkmanager-vpnc/networkmanager-vpnc-0.9.8.6.ebuild
new file mode 100644
index 000000000000..d338400ae43e
--- /dev/null
+++ b/net-misc/networkmanager-vpnc/networkmanager-vpnc-0.9.8.6.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GNOME_ORG_MODULE="NetworkManager-${PN##*-}"
+
+inherit eutils gnome2-utils gnome.org
+
+DESCRIPTION="NetworkManager VPNC plugin"
+HOMEPAGE="http://www.gnome.org/projects/NetworkManager/"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="gtk test"
+
+RDEPEND="
+ >=net-misc/networkmanager-0.9.8
+ >=dev-libs/dbus-glib-0.74
+ >=net-misc/vpnc-0.5
+ gtk? (
+ >=x11-libs/gtk+-2.91.4:3
+ gnome-base/gnome-keyring
+ gnome-base/libgnome-keyring
+ )
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ dev-util/intltool
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ # Test will fail if the machine doesn't have a particular locale installed
+ sed '/test_non_utf8_import (plugin/ d' \
+ -i properties/tests/test-import-export.c || die "sed failed"
+
+ gnome2_disable_deprecation_warning
+}
+
+src_configure() {
+ econf \
+ --disable-more-warnings \
+ --disable-static \
+ --with-dist-version=Gentoo \
+ --with-gtkver=3 \
+ $(use_with gtk gnome) \
+ $(use_with test tests)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/net-misc/networkmanager-vpnc/networkmanager-vpnc-1.0.0.ebuild b/net-misc/networkmanager-vpnc/networkmanager-vpnc-1.0.0.ebuild
new file mode 100644
index 000000000000..5765c3207c94
--- /dev/null
+++ b/net-misc/networkmanager-vpnc/networkmanager-vpnc-1.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
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager-${PN##*-}"
+
+inherit gnome2
+
+DESCRIPTION="NetworkManager VPNC plugin"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="gtk test"
+
+RDEPEND="
+ >=net-misc/networkmanager-0.9.10:=
+ >=dev-libs/dbus-glib-0.74
+ >=dev-libs/glib-2.32:2
+ >=net-misc/vpnc-0.5
+ gtk? (
+ app-crypt/libsecret
+ >=gnome-extra/nm-applet-0.9.9.0
+ >=x11-libs/gtk+-3.4:3
+ )
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ dev-util/intltool
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ # Test will fail if the machine doesn't have a particular locale installed
+ # upstream bug #742708
+ sed '/test_non_utf8_import (plugin/ d' \
+ -i properties/tests/test-import-export.c || die "sed failed"
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ --with-dist-version=Gentoo \
+ $(use_with gtk gnome) \
+ $(use_with test tests)
+}
diff --git a/net-misc/networkmanager-vpnc/networkmanager-vpnc-1.0.2.ebuild b/net-misc/networkmanager-vpnc/networkmanager-vpnc-1.0.2.ebuild
new file mode 100644
index 000000000000..3aae170eb85a
--- /dev/null
+++ b/net-misc/networkmanager-vpnc/networkmanager-vpnc-1.0.2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager-${PN##*-}"
+
+inherit gnome2
+
+DESCRIPTION="NetworkManager VPNC plugin"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="gtk test"
+
+RDEPEND="
+ >=net-misc/networkmanager-0.9.10:=
+ >=dev-libs/dbus-glib-0.74
+ >=dev-libs/glib-2.32:2
+ >=net-misc/vpnc-0.5.3_p550
+ gtk? (
+ app-crypt/libsecret
+ >=gnome-extra/nm-applet-0.9.9.0
+ >=x11-libs/gtk+-3.4:3
+ )
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ dev-util/intltool
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ # Test will fail if the machine doesn't have a particular locale installed
+ # upstream bug #742708
+ sed '/test_non_utf8_import (plugin/ d' \
+ -i properties/tests/test-import-export.c || die "sed failed"
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ --with-dist-version=Gentoo \
+ $(use_with gtk gnome) \
+ $(use_with test tests)
+}
diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest
new file mode 100644
index 000000000000..96ae1db3c177
--- /dev/null
+++ b/net-misc/networkmanager/Manifest
@@ -0,0 +1,5 @@
+DIST NetworkManager-0.9.10.1_pre20141101.tar.xz 2507248 SHA256 5f2e61c74713ce9ebb755c23c9aca279f321eb924247c282bdd50c2c8337fe40 SHA512 0cc4ec34e5933229a9b25e25b26d7619ac1a61275cd4c33a658c98578e6a27d4d2b1337c1e839467c625739a6ae2175ab6d883c4bfbe35642dbbafb7b11a421d WHIRLPOOL 1d0fb976ffc26aba74fc8b8bee081efc236ea647da0970a5564730522f2f837bfa5cd0853268d5098126810a4429b2ff7840f9cf66e6faa3bd5829b175679681
+DIST NetworkManager-0.9.8.10.tar.xz 2015492 SHA256 064d27223d3824859df12e1fb25b787fec1c68bbc864dc52a0289b9211c4c972 SHA512 8688b8dceadf87d26b76bdda76ecb0b383ecaa7991487e6f6ddc150cf311f2f0cb3487afd91f19ecde2925585e8d53c8761fd45743f25c488eff6a7811ca4200 WHIRLPOOL 29c4f2189eb812c23e8c1cfbce728c525282ad3f04d3c9c25b3a80a043c95f2a9419fa71ac6f8a59d7abde8a30275e68e3ef615b74f78c07846757d92f114e1c
+DIST NetworkManager-1.0.0.tar.xz 3210884 SHA256 3a66afec670c975edd9832e620b725a5f16ed267a1b9e1b2d51ef27250d85947 SHA512 7089496ce31bfdffe99c0f031b6326734d2e36b3bb9a2ed0ecbe3dad64bff0dc993b2e6bcac770b31bcfe634833bd8dbabc23d128356dbba8243a6d8fc489a5e WHIRLPOOL df928cb0a9be0782b1f853d808273f798ca62be5f0fd650caf033fb16b98ef696c7f90eaed90488ef7f6a9e607cf74cd865848523fbbf08cd26487e98b4a455a
+DIST NetworkManager-1.0.2.tar.xz 3210588 SHA256 359385707494bedbb48cfe0992ccfbcc4ac147dae1f7a47055c71e96439508ff SHA512 9c5884c75c2a2aae478d99bde4ecbb0dc4293b3f50dcf78a1579aa13e09ab95b01981a366f1dc58cd5d02fe77dc90fc0941f00142cd5ef1cea14c3b9d89f5c36 WHIRLPOOL 0a9f4bc6cc0f176bfc1c82294b45392c86b6d6a65cefe38fc80fce8f09584f275a23163d1909dfde9427405fe7b4086b8e2bc4995eded4cf441b8024fa00657d
+DIST NetworkManager-1.0.4.tar.xz 3364168 SHA256 e4099fa2f4f4b8d95d0ad9fdd03ec20960845085fa500bf79aecbf54cee018c9 SHA512 b07583ca654a95dc018a712626ba0065c2ff5d9904b326891be684b32526f360f287b46cbd11026277a385558c1b55e38a086ae2b0aab059b63a4f3e11566cb1 WHIRLPOOL d6a612a855e216b7b46c620a85ceb3b3893029cf83bb9699ed0ba1c2d349abdeb4ee8921155216fb8285ac369cea64704836984e86bbf3813d8287b4803fc49a
diff --git a/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules b/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules
new file mode 100644
index 000000000000..d00b268537e1
--- /dev/null
+++ b/net-misc/networkmanager/files/01-org.freedesktop.NetworkManager.settings.modify.system.rules
@@ -0,0 +1,7 @@
+// Let users in plugdev group modify NetworkManager
+polkit.addRule(function(action, subject) {
+ if (action.id == "org.freedesktop.NetworkManager.settings.modify.system" &&
+ subject.isInGroup("plugdev") && subject.active) {
+ return "yes";
+ }
+});
diff --git a/net-misc/networkmanager/files/10-openrc-status-r4 b/net-misc/networkmanager/files/10-openrc-status-r4
new file mode 100644
index 000000000000..e195ccc19687
--- /dev/null
+++ b/net-misc/networkmanager/files/10-openrc-status-r4
@@ -0,0 +1,35 @@
+#!/bin/sh
+# Copyright (c) 2012 Alexandre Rostovtsev
+# Released under the 2-clause BSD license.
+
+# Ensures that the NetworkManager OpenRC service is marked as started and
+# providing net only when it has a successful connection.
+
+if [ ! -e "/run/openrc/softlevel" ]; then
+ # OpenRC is not running
+ exit 0
+fi
+
+# Ensure rc-service is in PATH
+PATH="${PATH}:@EPREFIX@/sbin:@EPREFIX@/usr/sbin"
+
+# Exit if the NetworkManager OpenRC service is not running
+rc-service NetworkManager status 2>&1 | grep -Eq "status: (starting|started|inactive|stopping)" || exit 0
+
+# Call rc-service in background mode so that the start/stop functions update
+# NetworkManager service status to started or inactive instead of actually
+# starting or stopping the daemon
+export IN_BACKGROUND=YES
+
+case "$2" in
+ up) nm-online -t 0 -x &&
+ ! rc-service NetworkManager status 2>&1 | grep -q started &&
+ exec rc-service NetworkManager start ;;
+ down) nm-online -t 0 -x ||
+ rc-service NetworkManager status 2>&1 | grep -q stopped ||
+ exec rc-service NetworkManager stop ;;
+ pre-sleep) rc-service NetworkManager status 2>&1 | grep -q stopped ||
+ exec rc-service NetworkManager stop ;;
+esac
+exit 0
+# vim: set ts=4:
diff --git a/net-misc/networkmanager/files/conf.d.NetworkManager b/net-misc/networkmanager/files/conf.d.NetworkManager
new file mode 100644
index 000000000000..4a99229654fa
--- /dev/null
+++ b/net-misc/networkmanager/files/conf.d.NetworkManager
@@ -0,0 +1,4 @@
+# If NetworkManager does not establish a connection within $INACTIVE_TIMEOUT
+# seconds after starting, the service will be marked as inactive, and it will
+# continue to wait for a connection in background mode.
+INACTIVE_TIMEOUT=1
diff --git a/net-misc/networkmanager/files/init.d.NetworkManager b/net-misc/networkmanager/files/init.d.NetworkManager
new file mode 100755
index 000000000000..bd828b78dfd2
--- /dev/null
+++ b/net-misc/networkmanager/files/init.d.NetworkManager
@@ -0,0 +1,57 @@
+#!/sbin/runscript
+# Copyright (c) 2008 Saleem Abdulrasool <compnerd@compnerd.org>
+# Distributed under the terms of the GNU General Purpose License v2
+# $Id$
+
+description="NetworkManager daemon. The service is marked as started only \
+when a network connection is established."
+
+depend() {
+ need dbus
+ provide net
+}
+
+start() {
+ # If we are re-called by a dispatcher event, we want to mark the service
+ # as started without starting the daemon again
+ yesno "${IN_BACKGROUND}" && return 0
+
+ [ -z "${INACTIVE_TIMEOUT}" ] && INACTIVE_TIMEOUT="1"
+
+ ebegin "Starting NetworkManager"
+ start-stop-daemon --start --quiet --pidfile /run/NetworkManager/NetworkManager.pid \
+ --exec /usr/sbin/NetworkManager -- --pid-file /run/NetworkManager/NetworkManager.pid
+ local _retval=$?
+ eend "${_retval}"
+ if [ "x${_retval}" = 'x0' ] && ! nm-online -t "${INACTIVE_TIMEOUT}"; then
+ einfo "Marking NetworkManager as inactive. It will automatically be marked"
+ einfo "as started after a network connection has been established."
+ mark_service_inactive
+ fi
+ return "${_retval}"
+}
+
+stop() {
+ # If we are re-called by a dispatcher event, we want to mark the service
+ # as inactive without stopping the daemon
+ if yesno "${IN_BACKGROUND}"; then
+ mark_service_inactive "${SVCNAME}"
+ return 0
+ fi
+
+ ebegin "Stopping NetworkManager"
+ local pidfile=/run/NetworkManager/NetworkManager.pid
+ if [ ! -e "${pidfile}" ] && [ -e /var/run/NetworkManager.pid ]; then
+ # Try stopping the pid file used by <0.9.7
+ pidfile=/var/run/NetworkManager.pid
+ start-stop-daemon --stop --quiet --pidfile "${pidfile}"
+ ret=$?
+ [ ${ret} = 0 ] && [ -e "${pidfile}" ] && rm "${pidfile}"
+ eend ${ret}
+ else
+ start-stop-daemon --stop --quiet --pidfile "${pidfile}"
+ eend $?
+ fi
+}
+
+# vim: set ft=gentoo-init-d ts=4 :
diff --git a/net-misc/networkmanager/files/networkmanager-0.9.10.0-arpingpath.patch b/net-misc/networkmanager/files/networkmanager-0.9.10.0-arpingpath.patch
new file mode 100644
index 000000000000..f8e0d5260014
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-0.9.10.0-arpingpath.patch
@@ -0,0 +1,16 @@
+Source: Timo Gurr <tgurr@exherbo.org>
+Upstream: Reported, https://bugzilla.gnome.org/show_bug.cgi?id=734131
+Reason: fix hardcoded path to arping
+
+diff -Naur NetworkManager-0.9.10.0.old/src/devices/nm-device.c NetworkManager-0.9.10.0/src/devices/nm-device.c
+--- NetworkManager-0.9.10.0.old/src/devices/nm-device.c 2014-07-04 02:44:19.000000000 +0200
++++ NetworkManager-0.9.10.0/src/devices/nm-device.c 2014-09-01 17:35:29.656282068 +0200
+@@ -4429,7 +4429,7 @@
+ static void
+ send_arps (NMDevice *self, const char *mode_arg)
+ {
+- const char *argv[] = { "/sbin/arping", mode_arg, "-q", "-I", nm_device_get_ip_iface (self), "-c", "1", NULL, NULL };
++ const char *argv[] = { "/bin/arping", mode_arg, "-q", "-I", nm_device_get_ip_iface (self), "-c", "1", NULL, NULL };
+ int ip_arg = G_N_ELEMENTS (argv) - 2;
+ NMConnection *connection;
+ NMSettingIP4Config *s_ip4;
diff --git a/net-misc/networkmanager/files/networkmanager-0.9.8.4-pre-sleep.patch b/net-misc/networkmanager/files/networkmanager-0.9.8.4-pre-sleep.patch
new file mode 100644
index 000000000000..6e6dfbe8ee29
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-0.9.8.4-pre-sleep.patch
@@ -0,0 +1,131 @@
+From ffb08fa288cea4c9ac8f18fd83e063b2e86ac51b Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Sun, 27 Jan 2013 23:39:56 -0500
+Subject: [PATCH] Implement "pre-sleep" action dispatch
+
+Based on work by Christian Becke <christianbecke@gmail.com> in
+https://bugzilla.gnome.org/show_bug.cgi?id=387832
+---
+ callouts/nm-dispatcher-utils.c | 3 ++-
+ src/nm-dispatcher.c | 8 ++++++--
+ src/nm-dispatcher.h | 3 ++-
+ src/nm-manager.c | 28 +++++++++++++++++++++-------
+ 4 files changed, 31 insertions(+), 11 deletions(-)
+
+diff --git a/callouts/nm-dispatcher-utils.c b/callouts/nm-dispatcher-utils.c
+index 8824295..66cbc4b 100644
+--- a/callouts/nm-dispatcher-utils.c
++++ b/callouts/nm-dispatcher-utils.c
+@@ -409,7 +409,8 @@ nm_dispatcher_utils_construct_envp (const char *action,
+ g_return_val_if_fail (*out_iface == NULL, NULL);
+
+ /* Hostname changes don't require a device nor contain a connection */
+- if (!strcmp (action, "hostname"))
++ if (!strcmp (action, "hostname") ||
++ !strcmp (action, "pre-sleep"))
+ return g_new0 (char *, 1);
+
+ /* Canonicalize the VPN interface name; "" is used when passing it through
+diff --git a/src/nm-dispatcher.c b/src/nm-dispatcher.c
+index 12cd0f0..42d7e12 100644
+--- a/src/nm-dispatcher.c
++++ b/src/nm-dispatcher.c
+@@ -237,6 +237,8 @@ action_to_string (DispatcherAction action)
+ return "dhcp4-change";
+ case DISPATCHER_ACTION_DHCP6_CHANGE:
+ return "dhcp6-change";
++ case DISPATCHER_ACTION_PRE_SLEEP:
++ return "pre-sleep";
+ default:
+ break;
+ }
+@@ -269,7 +271,8 @@ _dispatcher_call (DispatcherAction action,
+ DispatchInfo *info;
+
+ /* All actions except 'hostname' require a device */
+- if (action != DISPATCHER_ACTION_HOSTNAME)
++ if (action != DISPATCHER_ACTION_HOSTNAME &&
++ action != DISPATCHER_ACTION_PRE_SLEEP)
+ g_return_val_if_fail (NM_IS_DEVICE (device), NULL);
+ /* VPN actions require at least an IPv4 config (for now) */
+ if (action == DISPATCHER_ACTION_VPN_UP)
+@@ -308,7 +311,8 @@ _dispatcher_call (DispatcherAction action,
+ vpn_ip6_props = value_hash_create ();
+
+ /* hostname actions only send the hostname */
+- if (action != DISPATCHER_ACTION_HOSTNAME) {
++ if (action != DISPATCHER_ACTION_HOSTNAME &&
++ action != DISPATCHER_ACTION_PRE_SLEEP) {
+ fill_device_props (device,
+ device_props,
+ device_ip4_props,
+diff --git a/src/nm-dispatcher.h b/src/nm-dispatcher.h
+index 05a6c87..8e95834 100644
+--- a/src/nm-dispatcher.h
++++ b/src/nm-dispatcher.h
+@@ -39,7 +39,8 @@ typedef enum {
+ DISPATCHER_ACTION_VPN_PRE_DOWN,
+ DISPATCHER_ACTION_VPN_DOWN,
+ DISPATCHER_ACTION_DHCP4_CHANGE,
+- DISPATCHER_ACTION_DHCP6_CHANGE
++ DISPATCHER_ACTION_DHCP6_CHANGE,
++ DISPATCHER_ACTION_PRE_SLEEP = 999,
+ } DispatcherAction;
+
+ typedef void (*DispatcherFunc) (gconstpointer call, gpointer user_data);
+diff --git a/src/nm-manager.c b/src/nm-manager.c
+index 811f49d..f52956d 100644
+--- a/src/nm-manager.c
++++ b/src/nm-manager.c
+@@ -73,6 +73,7 @@
+ #include "nm-sleep-monitor.h"
+ #include "nm-connectivity.h"
+ #include "nm-policy.h"
++#include "nm-dispatcher.h"
+
+
+ #define NM_AUTOIP_DBUS_SERVICE "org.freedesktop.nm_avahi_autoipd"
+@@ -3350,6 +3351,23 @@ impl_manager_deactivate_connection (NMManager *self,
+ }
+
+ static void
++pre_sleep_dispatcher_done (gpointer call, gpointer user_data)
++{
++ NMManager *self = (NMManager *) user_data;
++ NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
++ GSList *iter;
++
++ /* Just deactivate and down all devices from the device list,
++ * to keep things fast the device list will get resynced when
++ * the manager wakes up.
++ */
++ for (iter = priv->devices; iter; iter = iter->next)
++ nm_device_set_managed (NM_DEVICE (iter->data), FALSE, NM_DEVICE_STATE_REASON_SLEEPING);
++
++ nm_manager_update_state (self);
++}
++
++static void
+ do_sleep_wake (NMManager *self)
+ {
+ NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
+@@ -3359,13 +3377,9 @@ do_sleep_wake (NMManager *self)
+ if (manager_sleeping (self)) {
+ nm_log_info (LOGD_SUSPEND, "sleeping or disabling...");
+
+- /* Just deactivate and down all devices from the device list,
+- * to keep things fast the device list will get resynced when
+- * the manager wakes up.
+- */
+- for (iter = priv->devices; iter; iter = iter->next)
+- nm_device_set_managed (NM_DEVICE (iter->data), FALSE, NM_DEVICE_STATE_REASON_SLEEPING);
+-
++ nm_dispatcher_call (DISPATCHER_ACTION_PRE_SLEEP, NULL, NULL,
++ pre_sleep_dispatcher_done, self);
++ return;
+ } else {
+ nm_log_info (LOGD_SUSPEND, "waking up and re-enabling...");
+
+--
+1.8.3.2
+
diff --git a/net-misc/networkmanager/files/networkmanager-0.9.8.9-fix-crash-on-wifi-rescan.patch b/net-misc/networkmanager/files/networkmanager-0.9.8.9-fix-crash-on-wifi-rescan.patch
new file mode 100644
index 000000000000..35e9c04aff4b
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-0.9.8.9-fix-crash-on-wifi-rescan.patch
@@ -0,0 +1,47 @@
+From 4099c9242b091604466dda081dc5f6909354258b Mon Sep 17 00:00:00 2001
+From: M. Vefa Bicakci <m.v.b@runbox.com>
+Date: Sat, 24 May 2014 23:37:00 +0000
+Subject: core: fix crash during Wi-Fi rescan by emitting NM_DEVICE_AUTH_REQUEST signal correctly
+
+Fixes regression introduced by commit da59b6d2229b85afbb9e14846931376340dc6030.
+
+https://mail.gnome.org/archives/networkmanager-list/2014-May/msg00038.html
+
+Backport-of: d9653484859c426f707b4759bc9882f7a57c1152
+[thaller@redhat.com: original patch modified in nm-device-wifi.c to pass no
+ connection, as it is done on master]
+Signed-off-by: Thomas Haller <thaller@redhat.com>
+---
+diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c
+index 8ca5278..052d68f 100644
+--- a/src/nm-device-wifi.c
++++ b/src/nm-device-wifi.c
+@@ -1563,6 +1563,7 @@ impl_device_request_scan (NMDeviceWifi *self,
+ g_signal_emit_by_name (device,
+ NM_DEVICE_AUTH_REQUEST,
+ context,
++ NULL,
+ NM_AUTH_PERMISSION_NETWORK_CONTROL,
+ TRUE,
+ request_scan_cb,
+diff --git a/src/nm-manager.c b/src/nm-manager.c
+index 9037e64..96bf3b4 100644
+--- a/src/nm-manager.c
++++ b/src/nm-manager.c
+@@ -1874,10 +1874,10 @@ device_auth_request_cb (NMDevice *device,
+ }
+
+ /* Ensure the subject has permissions for this connection */
+- if (!nm_auth_uid_in_acl (connection,
+- priv->session_monitor,
+- sender_uid,
+- &error_desc)) {
++ if (connection != NULL && !nm_auth_uid_in_acl (connection,
++ priv->session_monitor,
++ sender_uid,
++ &error_desc)) {
+ error = g_error_new_literal (NM_MANAGER_ERROR,
+ NM_MANAGER_ERROR_PERMISSION_DENIED,
+ error_desc);
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/net-misc/networkmanager/files/networkmanager-1.0.0-find-helpers.patch b/net-misc/networkmanager/files/networkmanager-1.0.0-find-helpers.patch
new file mode 100644
index 000000000000..a84909c8253e
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-1.0.0-find-helpers.patch
@@ -0,0 +1,23 @@
+From 6f643d2761650e53fd3b647526110a8473138b5d Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Thu, 8 Jan 2015 11:55:50 +0100
+Subject: core: add /bin to the default search path
+
+https://bugzilla.gnome.org/show_bug.cgi?id=742576
+(cherry picked from commit abbca50ca9d552a28eca792f12ec618df6128fff)
+
+diff --git a/src/NetworkManagerUtils.c b/src/NetworkManagerUtils.c
+index 2c291cd..6747b65 100644
+--- a/src/NetworkManagerUtils.c
++++ b/src/NetworkManagerUtils.c
+@@ -814,6 +814,7 @@ const char *const NM_PATHS_DEFAULT[] = {
+ "/sbin/",
+ "/usr/sbin/",
+ "/usr/local/sbin/",
++ "/bin/",
+ "/usr/bin/",
+ "/usr/local/bin/",
+ NULL,
+--
+cgit v0.10.2
+
diff --git a/net-misc/networkmanager/files/networkmanager-1.0.0-lto-switch.patch b/net-misc/networkmanager/files/networkmanager-1.0.0-lto-switch.patch
new file mode 100644
index 000000000000..5d66c3393c71
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-1.0.0-lto-switch.patch
@@ -0,0 +1,36 @@
+From cda2802fe960737abb4623166ca4f75a63b5fe5a Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Thu, 8 Jan 2015 12:01:32 +0100
+Subject: build: fix --enable-lto configure option to allow disabling option
+ explicitly
+
+When specifying '--enable-lto=anything' or '--disable-lto',
+the configure script would always set enable_lto=yes.
+
+The only way to disable lto, was *not* specifying the
+configure option.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=742575
+(cherry picked from commit 6eccfda0face594f86dea495d2ed2546b0d37e77)
+
+diff --git a/configure.ac b/configure.ac
+index b6bf38e..b407686 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -821,10 +821,11 @@ AM_CONDITIONAL(BUILD_NMTUI, test "$build_nmtui" = yes)
+
+ NM_COMPILER_WARNINGS
+
+-AC_ARG_ENABLE(lto, AS_HELP_STRING([--enable-lto], [Enable Link Time Optimization for smaller size (default: no)]),
+- [enable_lto=yes], [enable_lto=no])
++AC_ARG_ENABLE(lto, AS_HELP_STRING([--enable-lto], [Enable Link Time Optimization for smaller size (default: no)]))
+ if (test "${enable_lto}" = "yes"); then
+ CFLAGS="-flto $CFLAGS"
++else
++ enable_lto='no'
+ fi
+
+
+--
+cgit v0.10.2
+
diff --git a/net-misc/networkmanager/files/networkmanager-1.0.0-remove-bashisms.patch b/net-misc/networkmanager/files/networkmanager-1.0.0-remove-bashisms.patch
new file mode 100644
index 000000000000..366627f7eb18
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-1.0.0-remove-bashisms.patch
@@ -0,0 +1,44 @@
+From 4c3c9a38272112fe7a6a248ba521d55ac1b66892 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?R=C3=A9mi=20Cardona?= <remi@gentoo.org>
+Date: Sun, 25 Jan 2015 13:02:19 +0100
+Subject: [PATCH] build: use POSIX-compliant 'printf' instead of 'echo'
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes the following error when running ./configure with dash:
+
+ checking for QT... yes
+ checking for moc-qt4... no
+ checking for moc... moc
+ configure: error: --with-udev-dir must be an absolute path or 'yes' or
+ 'no'. Instead it is '/lib/udev'
+
+As per the Autoconf Manual's section on "Limitations of Shell Builtins":
+
+ The simple echo is probably the most surprising source of portability
+ troubles. It is not possible to use ‘echo’ portably unless both
+ options and escape sequences are omitted.
+
+https://www.gnu.org/software/automake/faq/autoconf.html#echo
+https://bugs.gentoo.org/536540
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index b407686..5c87c7e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -302,7 +302,7 @@ AM_CONDITIONAL(WITH_QT, test "${enable_qt}" = "yes")
+
+ AC_ARG_WITH(udev-dir, AS_HELP_STRING([--with-udev-dir=DIR], [Absolute path of the udev base directory. Set to 'no' not to install the udev rules]), [], [with_udev_dir="yes"])
+ if (test "$with_udev_dir" != 'no'); then
+- if (test "$with_udev_dir" != 'yes' && echo -n "$with_udev_dir" | grep -v -q '^/'); then
++ if (test "$with_udev_dir" != 'yes' && printf '%s' "$with_udev_dir" | grep -v -q '^/'); then
+ AC_MSG_ERROR([--with-udev-dir must be an absolute path or 'yes' or 'no'. Instead it is '$with_udev_dir'])
+ fi
+ if (test "$with_udev_dir" = 'yes'); then
+--
+2.2.1
+
diff --git a/net-misc/networkmanager/files/networkmanager-1.0.2-configure-dhcpcd.patch b/net-misc/networkmanager/files/networkmanager-1.0.2-configure-dhcpcd.patch
new file mode 100644
index 000000000000..52325810f0b2
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-1.0.2-configure-dhcpcd.patch
@@ -0,0 +1,31 @@
+From 6baca260d11b4c2f92e8765ff0f66786e507022a Mon Sep 17 00:00:00 2001
+From: Dan Williams <dcbw@redhat.com>
+Date: Tue, 26 May 2015 18:21:31 -0500
+Subject: Partially revert "dhcp: gracefully recover from failed DHCP BOUND
+ state transitions (bgo #743700)"
+
+This reverts commit 7daf63461de4195b1626ca15f835fc7cbc56e847.
+
+Turns out the removal of the second set of [] in configure.ac causes the command
+to be wrong in 'configure' and the test to be incorrect.
+
+diff --git a/configure.ac b/configure.ac
+index ba22057..d9a90c1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -668,10 +668,10 @@ fi
+ if test "$with_dhcpcd" = "yes"; then
+ AC_PATH_PROGS(with_dhcpcd, dhcpcd, no, /sbin:/usr/sbin:/usr/local/sbin)
+ if test "$with_dhcpcd" != "no"; then
+- if ! $with_dhcpcd --version 2>&1 | grep -q "^dhcpcd [456789]\."; then
++ if ! $with_dhcpcd --version 2>&1 | grep -q "^dhcpcd [[456789]]\."; then
+ AC_MSG_WARN([Cannot use dhcpcd, version 4.x or higher is required])
+ with_dhcpcd=no
+- elif $with_dhcpcd --version 2>&1 | grep -q "^dhcpcd [6789]\."; then
++ elif $with_dhcpcd --version 2>&1 | grep -q "^dhcpcd [[6789]]\."; then
+ AC_DEFINE(DHCPCD_SUPPORTS_IPV6, 1, [Define if dhcpcd supports IPv6 (6.x+)])
+ fi
+ fi
+--
+cgit v0.10.2
+
diff --git a/net-misc/networkmanager/files/nm-system-settings.conf-ifnet b/net-misc/networkmanager/files/nm-system-settings.conf-ifnet
new file mode 100644
index 000000000000..4d14ee7b8041
--- /dev/null
+++ b/net-misc/networkmanager/files/nm-system-settings.conf-ifnet
@@ -0,0 +1,6 @@
+[main]
+plugins=ifnet,keyfile
+
+[ifnet]
+managed=true
+auto_refresh=false
diff --git a/net-misc/networkmanager/metadata.xml b/net-misc/networkmanager/metadata.xml
new file mode 100644
index 000000000000..ed6d30f37115
--- /dev/null
+++ b/net-misc/networkmanager/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>gnome</herd>
+ <use>
+ <flag name="connection-sharing">Use <pkg>net-dns/dnsmasq</pkg> and
+ <pkg>net-firewall/iptables</pkg> for connection sharing</flag>
+ <flag name="consolekit">Use <pkg>sys-auth/consolekit</pkg> for session
+ tracking</flag>
+ <flag name="dhclient">Use dhclient from <pkg>net-misc/dhcp</pkg> for
+ getting ip</flag>
+ <flag name="dhcpcd">Use <pkg>net-misc/dhcpcd</pkg> for getting ip</flag>
+ <flag name="modemmanager">Enable support for mobile broadband devices
+ using <pkg>net-misc/modemmanager</pkg></flag>
+ <flag name="nss">Use <pkg>dev-libs/nss</pkg> for cryptography</flag>
+ <flag name="ppp">Enable support for mobile broadband and PPPoE
+ connections using <pkg>net-dialup/ppp</pkg></flag>
+ <flag name="resolvconf">Use <pkg>net-dns/openresolv</pkg> for managing
+ DNS information</flag>
+ <flag name="teamd">Enable Teamd control support</flag>
+ <flag name="wifi">Enable support for wifi and 802.1x security using
+ <pkg>net-wireless/wpa_supplicant</pkg></flag>
+ <flag name="wext">Enable support for the deprecated Wext (Wireless
+ Extensions) API; needed for some older drivers (e.g. ipw2200,
+ ndiswrapper)</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/networkmanager/networkmanager-0.9.10.1_pre20141101.ebuild b/net-misc/networkmanager/networkmanager-0.9.10.1_pre20141101.ebuild
new file mode 100644
index 000000000000..df2a5a4b58d3
--- /dev/null
+++ b/net-misc/networkmanager/networkmanager-0.9.10.1_pre20141101.ebuild
@@ -0,0 +1,302 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager"
+GNOME2_LA_PUNT="yes"
+VALA_MIN_API_VERSION="0.18"
+VALA_USE_DEPEND="vapigen"
+
+# Tests need python2, https://bugzilla.gnome.org/show_bug.cgi?id=739448
+PYTHON_COMPAT=( python2_7 )
+
+inherit bash-completion-r1 eutils gnome2 linux-info multilib python-any-r1 systemd user readme.gentoo toolchain-funcs vala versionator virtualx udev
+
+DESCRIPTION="Universal network configuration daemon for laptops, desktops, servers and virtualization hosts"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+SRC_URI="http://dev.gentoo.org/~pacho/gnome/${GNOME_ORG_MODULE}-${PV}.tar.xz"
+
+LICENSE="GPL-2+"
+SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
+
+IUSE="bluetooth connection-sharing consolekit +dhclient dhcpcd gnutls +introspection \
+kernel_linux +nss +modemmanager ncurses +ppp resolvconf selinux systemd teamd test \
+vala +wext +wifi zeroconf" # wimax
+
+KEYWORDS="amd64 arm ~ppc ~ppc64 x86"
+
+REQUIRED_USE="
+ modemmanager? ( ppp )
+ ^^ ( nss gnutls )
+ ^^ ( dhclient dhcpcd )
+"
+
+S="${WORKDIR}/${GNOME_ORG_MODULE}-0.9.10.1"
+
+# gobject-introspection-0.10.3 is needed due to gnome bug 642300
+# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
+# TODO: Qt support?
+#
+# iputils version needed due path changes (#523632). Upstream fixed
+# it with a major refactor committed to 'master' for handling different
+# paths for arping and other tools and, then, the version requirement
+# will be able to be dropped on next major NM version
+COMMON_DEPEND="
+ >=sys-apps/dbus-1.2
+ >=dev-libs/dbus-glib-0.100
+ >=dev-libs/glib-2.32:2
+ >=dev-libs/libnl-3.2.8:3=
+ >=sys-auth/polkit-0.106
+ net-libs/libndp
+ >=net-libs/libsoup-2.26:2.4=
+ >=net-misc/iputils-20121221-r1
+ sys-libs/readline:0
+ >=virtual/libgudev-165:=
+ bluetooth? ( >=net-wireless/bluez-5 )
+ connection-sharing? (
+ net-dns/dnsmasq[dhcp]
+ net-firewall/iptables )
+ gnutls? (
+ dev-libs/libgcrypt:0=
+ net-libs/gnutls:= )
+ modemmanager? ( >=net-misc/modemmanager-0.7.991 )
+ ncurses? ( >=dev-libs/newt-0.52.15 )
+ nss? ( >=dev-libs/nss-3.11:= )
+ dhclient? ( =net-misc/dhcp-4*[client] )
+ dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
+ introspection? ( >=dev-libs/gobject-introspection-0.10.3 )
+ ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] net-dialup/rp-pppoe )
+ resolvconf? ( net-dns/openresolv )
+ systemd? ( >=sys-apps/systemd-183:0= )
+ teamd? ( >=net-misc/libteam-1.9 )
+ zeroconf? ( net-dns/avahi:=[autoipd] )
+ || ( sys-power/upower sys-power/upower-pm-utils >=sys-apps/systemd-183 )
+"
+RDEPEND="${COMMON_DEPEND}
+ consolekit? ( sys-auth/consolekit )
+ wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-util/gtk-doc-am
+ >=dev-util/intltool-0.40
+ >=sys-devel/gettext-0.17
+ >=sys-kernel/linux-headers-2.6.29
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+ test? (
+ $(python_gen_any_dep '
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/pygobject:2[${PYTHON_USEDEP}]')
+ )
+"
+
+sysfs_deprecated_check() {
+ ebegin "Checking for SYSFS_DEPRECATED support"
+
+ if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
+ eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
+ eerror "or NetworkManager will not work correctly."
+ eerror "See http://bugs.gentoo.org/333639 for more info."
+ die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
+ fi
+ eend $?
+}
+
+pkg_pretend() {
+ if use kernel_linux; then
+ get_version
+ if linux_config_exists; then
+ sysfs_deprecated_check
+ else
+ ewarn "Was unable to determine your kernel .config"
+ ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
+ ewarn "See http://bugs.gentoo.org/333639 for more info."
+ fi
+
+ fi
+}
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+src_prepare() {
+ DOC_CONTENTS="To modify system network connections without needing to enter the
+ root password, add your user account to the 'plugdev' group."
+
+ # Find arping at proper place, bug #523632
+ epatch "${FILESDIR}/${PN}-0.9.10.0-arpingpath.patch"
+
+ # Force use of /run, avoid eautoreconf, upstream bug #737139
+ sed -e 's:$localstatedir/run/:/run/:' -i configure || die
+
+ use vala && vala_src_prepare
+
+ epatch_user # don't remove, users often want custom patches for NM
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ local myconf
+
+ # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
+ if use ppp; then
+ local PPPD_VER=`best_version net-dialup/ppp`
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+ PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
+ myconf="${myconf} --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER}"
+ fi
+
+ # unit files directory needs to be passed only when systemd is enabled,
+ # otherwise systemd support is not disabled completely, bug #524534
+ use systemd && myconf="${myconf} "$(systemd_with_unitdir)""
+
+ # TODO: enable wimax when we have a libnl:3 compatible revision of it
+ # wimax will be removed, bug #522822
+ # ifnet plugin always disabled until someone volunteers to actively
+ # maintain and fix it
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ --localstatedir=/var \
+ --disable-ifnet \
+ --without-netconfig \
+ --with-dbus-sys-dir=/etc/dbus-1/system.d \
+ --with-udev-dir="$(get_udevdir)" \
+ --with-config-plugins-default=keyfile \
+ --with-iptables=/sbin/iptables \
+ --with-libsoup=yes \
+ --enable-concheck \
+ --with-crypto=$(usex nss nss gnutls) \
+ --with-session-tracking=$(usex systemd systemd $(usex consolekit consolekit no)) \
+ --with-suspend-resume=$(usex systemd systemd upower) \
+ $(use_enable bluetooth bluez5-dun) \
+ $(use_enable introspection) \
+ $(use_enable ppp) \
+ --disable-wimax \
+ $(use_with dhclient) \
+ $(use_with dhcpcd) \
+ $(use_with modemmanager modem-manager-1) \
+ $(use_with ncurses nmtui) \
+ $(use_with resolvconf) \
+ $(use_with selinux) \
+ $(use_enable teamd teamdctl) \
+ $(use_enable test tests) \
+ $(use_enable vala) \
+ --without-valgrind \
+ $(use_with wext) \
+ ${myconf}
+}
+
+src_test() {
+ python_setup
+ Xemake check
+}
+
+src_install() {
+ # Install completions at proper place, bug #465100
+ gnome2_src_install completiondir="$(get_bashcompdir)"
+
+ readme.gentoo_create_doc
+
+ newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager
+ newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
+
+ # /var/run/NetworkManager is used by some distros, but not by Gentoo
+ rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed"
+
+ # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
+ keepdir /etc/NetworkManager/dispatcher.d
+
+ # Provide openrc net dependency only when nm is connected
+ exeinto /etc/NetworkManager/dispatcher.d
+ newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
+ sed -e "s:@EPREFIX@:${EPREFIX}:g" \
+ -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
+
+ keepdir /etc/NetworkManager/system-connections
+ chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765
+
+ # Allow users in plugdev group to modify system connections
+ insinto /usr/share/polkit-1/rules.d/
+ doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ readme.gentoo_print_elog
+
+ if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
+ ewarn "The ${PN} system configuration file has moved to a new location."
+ ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
+ ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
+ ewarn
+ ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
+ fi
+
+ # The polkit rules file moved to /usr/share
+ old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+ if [[ -f "${old_rules}" ]]; then
+ case "$(md5sum ${old_rules})" in
+ 574d0cfa7e911b1f7792077003060240* )
+ # Automatically delete the old rules.d file if the user did not change it
+ elog
+ elog "Removing old ${old_rules} ..."
+ rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
+ ;;
+ * )
+ elog "The ${old_rules}"
+ elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
+ elog "If you edited ${old_rules}"
+ elog "without changing its behavior, you may want to remove it."
+ ;;
+ esac
+ fi
+
+ # ifnet plugin was disabled for systemd users with 0.9.8.6 version
+ # and for all people with 0.9.10.0-r1 (see ChangeLog for full explanations)
+ if use systemd; then
+ if ! version_is_at_least 0.9.8.6 ${REPLACING_VERSIONS}; then
+ ewarn "Ifnet plugin won't be used with systemd support enabled"
+ ewarn "as it is meant to be used with openRC and can cause collisions"
+ ewarn "(like bug #485658)."
+ ewarn "Because of this, you will likely need to reconfigure some of"
+ ewarn "your networks. To do this you can rely on Gnome control center,"
+ ewarn "nm-connection-editor or nmtui tools for example once updated"
+ ewarn "NetworkManager version is installed."
+ fi
+ else
+ if ! version_is_at_least 0.9.10.0-r1 ${REPLACING_VERSIONS}; then
+ ewarn "Ifnet plugin is now disabled because of it being unattended"
+ ewarn "and unmaintained for a long time, leading to some unfixed bugs"
+ ewarn "and new problems appearing. We will now use upstream 'keyfile'"
+ ewarn "plugin."
+ ewarn "Because of this, you will likely need to reconfigure some of"
+ ewarn "your networks. To do this you can rely on Gnome control center,"
+ ewarn "nm-connection-editor or nmtui tools for example once updated"
+ ewarn "NetworkManager version is installed."
+ fi
+ fi
+
+ # NM fallbacks to plugin specified at compile time (upstream bug #738611)
+ # but still show a warning to remember people to have cleaner config file
+ if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
+ if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
+ ewarn
+ ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
+ ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
+ ewarn
+ fi
+ fi
+
+ # NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457
+ if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
+ ewarn "You have psk-flags=1 setting in above files, you will need to"
+ ewarn "either reconfigure affected networks or, at least, set the flag"
+ ewarn "value to '0'."
+ fi
+}
diff --git a/net-misc/networkmanager/networkmanager-0.9.8.10-r1.ebuild b/net-misc/networkmanager/networkmanager-0.9.8.10-r1.ebuild
new file mode 100644
index 000000000000..ad313eaab0a8
--- /dev/null
+++ b/net-misc/networkmanager/networkmanager-0.9.8.10-r1.ebuild
@@ -0,0 +1,252 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GNOME_ORG_MODULE="NetworkManager"
+VALA_MIN_API_VERSION="0.18"
+VALA_USE_DEPEND="vapigen"
+
+inherit bash-completion-r1 gnome.org linux-info systemd user readme.gentoo toolchain-funcs vala virtualx udev eutils
+
+DESCRIPTION="Universal network configuration daemon for laptops, desktops, servers and virtualization hosts"
+HOMEPAGE="http://projects.gnome.org/NetworkManager/"
+
+LICENSE="GPL-2+"
+SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
+IUSE="avahi bluetooth connection-sharing consolekit dhclient +dhcpcd gnutls +introspection kernel_linux +nss +modemmanager +ppp resolvconf systemd test vala +wext +wifi" # wimax
+
+KEYWORDS="~alpha amd64 arm ~ia64 ppc ppc64 ~sparc x86"
+
+REQUIRED_USE="
+ modemmanager? ( ppp )
+ ^^ ( nss gnutls )
+ ^^ ( dhclient dhcpcd )
+"
+
+# gobject-introspection-0.10.3 is needed due to gnome bug 642300
+# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
+# TODO: Qt support?
+COMMON_DEPEND="
+ >=sys-apps/dbus-1.2
+ >=dev-libs/dbus-glib-0.94
+ >=dev-libs/glib-2.30
+ >=dev-libs/libnl-3.2.7:3=
+ >=sys-auth/polkit-0.106
+ >=net-libs/libsoup-2.26:2.4=
+ virtual/libgudev:=
+ bluetooth? ( >=net-wireless/bluez-4.82 )
+ avahi? ( net-dns/avahi:=[autoipd] )
+ connection-sharing? (
+ net-dns/dnsmasq[dhcp]
+ net-firewall/iptables )
+ gnutls? (
+ dev-libs/libgcrypt:0=
+ net-libs/gnutls:= )
+ modemmanager? ( >=net-misc/modemmanager-0.7.991 )
+ nss? ( >=dev-libs/nss-3.11:= )
+ dhclient? ( =net-misc/dhcp-4*[client] )
+ dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
+ introspection? ( >=dev-libs/gobject-introspection-0.10.3 )
+ ppp? ( >=net-dialup/ppp-2.4.5[ipv6] )
+ resolvconf? ( net-dns/openresolv )
+ systemd? ( >=sys-apps/systemd-183:0= )
+ || ( sys-power/upower sys-power/upower-pm-utils >=sys-apps/systemd-183 )
+"
+RDEPEND="${COMMON_DEPEND}
+ virtual/udev
+ consolekit? ( sys-auth/consolekit )
+ wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-util/gtk-doc-am
+ >=dev-util/intltool-0.40
+ >=sys-devel/gettext-0.17
+ >=sys-kernel/linux-headers-2.6.29
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+ test? (
+ dev-lang/python:2.7
+ dev-python/dbus-python[python_targets_python2_7]
+ dev-python/pygobject:2[python_targets_python2_7] )
+"
+
+sysfs_deprecated_check() {
+ ebegin "Checking for SYSFS_DEPRECATED support"
+
+ if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
+ eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
+ eerror "or NetworkManager will not work correctly."
+ eerror "See http://bugs.gentoo.org/333639 for more info."
+ die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
+ fi
+ eend $?
+}
+
+pkg_pretend() {
+ if use kernel_linux; then
+ get_version
+ if linux_config_exists; then
+ sysfs_deprecated_check
+ else
+ ewarn "Was unable to determine your kernel .config"
+ ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
+ ewarn "See http://bugs.gentoo.org/333639 for more info."
+ fi
+
+ fi
+}
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+src_prepare() {
+ DOC_CONTENTS="To modify system network connections without needing to enter the
+ root password, add your user account to the 'plugdev' group."
+
+ # Bug #402085, https://bugzilla.gnome.org/show_bug.cgi?id=387832
+ epatch "${FILESDIR}/${PN}-0.9.8.4-pre-sleep.patch"
+
+ # https://www.mail-archive.com/networkmanager-list@gnome.org/msg24038.html
+ epatch "${FILESDIR}/${PN}-0.9.8.9-fix-crash-on-wifi-rescan.patch"
+
+ # Use python2.7 shebangs for test scripts
+ sed -e 's@\(^#!.*python\)@\12.7@' \
+ -i */tests/*.py || die
+
+ # Fix completiondir, avoid eautoreconf, bug #465100
+ sed -i "s|^completiondir =.*|completiondir = $(get_bashcompdir)|" \
+ cli/completion/Makefile.in || die "sed completiondir failed"
+
+ ## Force use of /run, avoid eautoreconf
+ sed -e 's:$localstatedir/run/:/run/:' -i configure || die
+
+ use vala && vala_src_prepare
+
+ epatch_user # don't remove, users often want custom patches for NM
+}
+
+src_configure() {
+ # TODO: enable wimax when we have a libnl:3 compatible revision of it
+ # We are not ready for bluez5 yet
+ econf \
+ --enable-bluez4 \
+ --disable-more-warnings \
+ --disable-static \
+ --localstatedir=/var \
+ $(usex systemd '--disable-ifnet' '--enable-ifnet') \
+ --without-netconfig \
+ --with-dbus-sys-dir=/etc/dbus-1/system.d \
+ --with-udev-dir="$(get_udevdir)" \
+ --with-iptables=/sbin/iptables \
+ --enable-concheck \
+ --with-crypto=$(usex nss nss gnutls) \
+ --with-session-tracking=$(usex systemd systemd $(usex consolekit consolekit no)) \
+ --with-suspend-resume=$(usex systemd systemd upower) \
+ $(use_enable introspection) \
+ $(use_enable ppp) \
+ --disable-wimax \
+ $(use_with dhclient) \
+ $(use_with dhcpcd) \
+ $(use_with modemmanager modem-manager-1) \
+ $(use_with resolvconf) \
+ $(use_enable test tests) \
+ $(use_enable vala) \
+ $(use_with wext) \
+ "$(systemd_with_unitdir)"
+}
+
+src_test() {
+ # bug #????
+ cp libnm-util/tests/certs/test_ca_cert.pem src/settings/plugins/ifnet/tests/ || die
+ Xemake check
+}
+
+src_install() {
+ default
+
+ readme.gentoo_create_doc
+
+ # Gentoo init script
+ newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager
+
+ # /var/run/NetworkManager is used by some distros, but not by Gentoo
+ rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed"
+
+ # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
+ keepdir /etc/NetworkManager/dispatcher.d
+
+ # Provide openrc net dependency only when nm is connected
+ exeinto /etc/NetworkManager/dispatcher.d
+ newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
+ sed -e "s:@EPREFIX@:${EPREFIX}:g" \
+ -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
+
+ # Default conf.d file
+ newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
+
+ # Add keyfile plugin support
+ keepdir /etc/NetworkManager/system-connections
+ chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765
+
+ if ! use systemd; then
+ insinto /etc/NetworkManager
+ newins "${FILESDIR}/nm-system-settings.conf-ifnet" NetworkManager.conf
+ fi
+
+ # Allow users in plugdev group to modify system connections
+ insinto /usr/share/polkit-1/rules.d/
+ doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+
+ prune_libtool_files --modules
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+
+ if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
+ ewarn "The ${PN} system configuration file has moved to a new location."
+ ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
+ ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
+ ewarn
+ ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
+ fi
+
+ # The polkit rules file moved to /usr/share
+ old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+ if [[ -f "${old_rules}" ]]; then
+ case "$(md5sum ${old_rules})" in
+ 574d0cfa7e911b1f7792077003060240* )
+ # Automatically delete the old rules.d file if the user did not change it
+ elog
+ elog "Removing old ${old_rules} ..."
+ rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
+ ;;
+ * )
+ elog "The ${old_rules}"
+ elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
+ elog "If you edited ${old_rules}"
+ elog "without changing its behavior, you may want to remove it."
+ ;;
+ esac
+ fi
+
+ if use systemd; then
+ if [[ ${REPLACING_VERSIONS} < 0.9.8.6 ]]; then
+ ewarn "Ifnet plugin won't be used with systemd support enabled"
+ ewarn "as it is meant to be used with openRC and can cause collisions"
+ ewarn "(like bug #485658)."
+ ewarn "Because of this, you will likely need to reconfigure some of"
+ ewarn "your networks."
+ fi
+
+ if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
+ if grep -q plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
+ ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
+ ewarn "Since it won't be used when running under Systemd, you will need to stop setting"
+ ewarn "ifnet plugin there to allow NetworkManager to work."
+ fi
+ fi
+ fi
+}
diff --git a/net-misc/networkmanager/networkmanager-1.0.0.ebuild b/net-misc/networkmanager/networkmanager-1.0.0.ebuild
new file mode 100644
index 000000000000..ec2d35afd307
--- /dev/null
+++ b/net-misc/networkmanager/networkmanager-1.0.0.ebuild
@@ -0,0 +1,305 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager"
+GNOME2_LA_PUNT="yes"
+VALA_MIN_API_VERSION="0.18"
+VALA_USE_DEPEND="vapigen"
+
+# Tests need python2, https://bugzilla.gnome.org/show_bug.cgi?id=739448
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools bash-completion-r1 eutils gnome2 linux-info multilib python-any-r1 systemd \
+ user readme.gentoo toolchain-funcs vala versionator virtualx udev
+
+DESCRIPTION="Universal network configuration daemon for laptops, desktops, servers and virtualization hosts"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
+
+IUSE="bluetooth connection-sharing consolekit +dhclient dhcpcd gnutls +introspection \
+kernel_linux +nss +modemmanager ncurses +ppp resolvconf selinux systemd teamd test \
+vala +wext +wifi zeroconf" # wimax
+
+KEYWORDS="~alpha amd64 arm ~arm64 ppc ppc64 ~sparc x86"
+
+REQUIRED_USE="
+ modemmanager? ( ppp )
+ ^^ ( nss gnutls )
+ ^^ ( dhclient dhcpcd )
+"
+
+# gobject-introspection-0.10.3 is needed due to gnome bug 642300
+# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
+# TODO: Qt support?
+COMMON_DEPEND="
+ >=sys-apps/dbus-1.2
+ >=dev-libs/dbus-glib-0.100
+ >=dev-libs/glib-2.32:2
+ >=dev-libs/libnl-3.2.8:3=
+ >=sys-auth/polkit-0.106
+ net-libs/libndp
+ >=net-libs/libsoup-2.26:2.4=
+ net-misc/iputils
+ sys-libs/readline:0
+ >=virtual/libgudev-165:=
+ bluetooth? ( >=net-wireless/bluez-5 )
+ connection-sharing? (
+ net-dns/dnsmasq[dhcp]
+ net-firewall/iptables )
+ gnutls? (
+ dev-libs/libgcrypt:0=
+ net-libs/gnutls:= )
+ modemmanager? ( >=net-misc/modemmanager-0.7.991 )
+ ncurses? ( >=dev-libs/newt-0.52.15 )
+ nss? ( >=dev-libs/nss-3.11:= )
+ dhclient? ( =net-misc/dhcp-4*[client] )
+ dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
+ introspection? ( >=dev-libs/gobject-introspection-0.10.3 )
+ ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] net-dialup/rp-pppoe )
+ resolvconf? ( net-dns/openresolv )
+ systemd? ( >=sys-apps/systemd-209:0= )
+ teamd? ( >=net-misc/libteam-1.9 )
+ zeroconf? ( net-dns/avahi:=[autoipd] )
+ || ( sys-power/upower sys-power/upower-pm-utils >=sys-apps/systemd-209 )
+"
+RDEPEND="${COMMON_DEPEND}
+ consolekit? ( sys-auth/consolekit )
+ wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-util/gdbus-codegen
+ dev-util/gtk-doc-am
+ >=dev-util/intltool-0.40
+ >=sys-devel/gettext-0.17
+ >=sys-kernel/linux-headers-2.6.29
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+ test? (
+ $(python_gen_any_dep '
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/pygobject:2[${PYTHON_USEDEP}]')
+ )
+"
+
+sysfs_deprecated_check() {
+ ebegin "Checking for SYSFS_DEPRECATED support"
+
+ if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
+ eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
+ eerror "or NetworkManager will not work correctly."
+ eerror "See http://bugs.gentoo.org/333639 for more info."
+ die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
+ fi
+ eend $?
+}
+
+pkg_pretend() {
+ if use kernel_linux; then
+ get_version
+ if linux_config_exists; then
+ sysfs_deprecated_check
+ else
+ ewarn "Was unable to determine your kernel .config"
+ ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
+ ewarn "See http://bugs.gentoo.org/333639 for more info."
+ fi
+
+ fi
+}
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+src_prepare() {
+ DOC_CONTENTS="To modify system network connections without needing to enter the
+ root password, add your user account to the 'plugdev' group."
+
+ # Find arping in our paths, upstream bug #742576 (from 1.0 branch)
+ epatch "${FILESDIR}"/${PN}-1.0.0-find-helpers.patch
+
+ # Fix lto configure switch, upstream bug #742575 (from 1.0 branch)
+ epatch "${FILESDIR}"/${PN}-1.0.0-lto-switch.patch
+
+ # Fix build with /bin/sh != bash, see bug #536540, upstream bug #743480
+ epatch "${FILESDIR}/${PN}-1.0.0-remove-bashisms.patch"
+
+ # Force use of /run, avoid eautoreconf, upstream bug #737139
+ sed -e 's:$localstatedir/run/:/run/:' -i configure || die
+
+ use vala && vala_src_prepare
+
+ epatch_user # don't remove, users often want custom patches for NM
+
+ eautoreconf
+ gnome2_src_prepare
+}
+
+src_configure() {
+ local myconf
+
+ # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
+ if use ppp; then
+ local PPPD_VER=`best_version net-dialup/ppp`
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+ PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
+ myconf="${myconf} --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER}"
+ fi
+
+ # unit files directory needs to be passed only when systemd is enabled,
+ # otherwise systemd support is not disabled completely, bug #524534
+ use systemd && myconf="${myconf} "$(systemd_with_unitdir)""
+
+ # TODO: enable wimax when we have a libnl:3 compatible revision of it
+ # wimax will be removed, bug #522822
+ # ifnet plugin always disabled until someone volunteers to actively
+ # maintain and fix it
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ --localstatedir=/var \
+ --disable-lto \
+ --disable-config-plugin-ibft \
+ --disable-ifnet \
+ --without-netconfig \
+ --with-dbus-sys-dir=/etc/dbus-1/system.d \
+ --with-udev-dir="$(get_udevdir)" \
+ --with-config-plugins-default=keyfile \
+ --with-iptables=/sbin/iptables \
+ --with-libsoup=yes \
+ --enable-concheck \
+ --with-crypto=$(usex nss nss gnutls) \
+ --with-session-tracking=$(usex systemd systemd $(usex consolekit consolekit no)) \
+ --with-suspend-resume=$(usex systemd systemd upower) \
+ $(use_enable bluetooth bluez5-dun) \
+ $(use_enable introspection) \
+ $(use_enable ppp) \
+ --disable-wimax \
+ $(use_with dhclient) \
+ $(use_with dhcpcd) \
+ $(use_with modemmanager modem-manager-1) \
+ $(use_with ncurses nmtui) \
+ $(use_with resolvconf) \
+ $(use_with selinux) \
+ $(use_enable teamd teamdctl) \
+ $(use_enable test tests) \
+ $(use_enable vala) \
+ --without-valgrind \
+ $(use_with wext) \
+ ${myconf}
+}
+
+src_test() {
+ python_setup
+ Xemake check
+}
+
+src_install() {
+ # Install completions at proper place, bug #465100
+ gnome2_src_install completiondir="$(get_bashcompdir)"
+
+ readme.gentoo_create_doc
+
+ newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager
+ newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
+
+ # /var/run/NetworkManager is used by some distros, but not by Gentoo
+ rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed"
+ rmdir -v "${ED}/var/run" || die "rmdir failed"
+
+ # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
+ keepdir /etc/NetworkManager/dispatcher.d
+
+ # Provide openrc net dependency only when nm is connected
+ exeinto /etc/NetworkManager/dispatcher.d
+ newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
+ sed -e "s:@EPREFIX@:${EPREFIX}:g" \
+ -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
+
+ keepdir /etc/NetworkManager/system-connections
+ chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765
+
+ # Allow users in plugdev group to modify system connections
+ insinto /usr/share/polkit-1/rules.d/
+ doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ readme.gentoo_print_elog
+
+ if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
+ ewarn "The ${PN} system configuration file has moved to a new location."
+ ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
+ ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
+ ewarn
+ ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
+ fi
+
+ # The polkit rules file moved to /usr/share
+ old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+ if [[ -f "${old_rules}" ]]; then
+ case "$(md5sum ${old_rules})" in
+ 574d0cfa7e911b1f7792077003060240* )
+ # Automatically delete the old rules.d file if the user did not change it
+ elog
+ elog "Removing old ${old_rules} ..."
+ rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
+ ;;
+ * )
+ elog "The ${old_rules}"
+ elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
+ elog "If you edited ${old_rules}"
+ elog "without changing its behavior, you may want to remove it."
+ ;;
+ esac
+ fi
+
+ # ifnet plugin was disabled for systemd users with 0.9.8.6 version
+ # and for all people with 0.9.10.0-r1 (see ChangeLog for full explanations)
+ if use systemd; then
+ if ! version_is_at_least 0.9.8.6 ${REPLACING_VERSIONS}; then
+ ewarn "Ifnet plugin won't be used with systemd support enabled"
+ ewarn "as it is meant to be used with openRC and can cause collisions"
+ ewarn "(like bug #485658)."
+ ewarn "Because of this, you will likely need to reconfigure some of"
+ ewarn "your networks. To do this you can rely on Gnome control center,"
+ ewarn "nm-connection-editor or nmtui tools for example once updated"
+ ewarn "NetworkManager version is installed."
+ fi
+ else
+ if ! version_is_at_least 0.9.10.0-r1 ${REPLACING_VERSIONS}; then
+ ewarn "Ifnet plugin is now disabled because of it being unattended"
+ ewarn "and unmaintained for a long time, leading to some unfixed bugs"
+ ewarn "and new problems appearing. We will now use upstream 'keyfile'"
+ ewarn "plugin."
+ ewarn "Because of this, you will likely need to reconfigure some of"
+ ewarn "your networks. To do this you can rely on Gnome control center,"
+ ewarn "nm-connection-editor or nmtui tools for example once updated"
+ ewarn "NetworkManager version is installed."
+ fi
+ fi
+
+ # NM fallbacks to plugin specified at compile time (upstream bug #738611)
+ # but still show a warning to remember people to have cleaner config file
+ if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
+ if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
+ ewarn
+ ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
+ ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
+ ewarn
+ fi
+ fi
+
+ # NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457
+ if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
+ ewarn "You have psk-flags=1 setting in above files, you will need to"
+ ewarn "either reconfigure affected networks or, at least, set the flag"
+ ewarn "value to '0'."
+ fi
+}
diff --git a/net-misc/networkmanager/networkmanager-1.0.2-r1.ebuild b/net-misc/networkmanager/networkmanager-1.0.2-r1.ebuild
new file mode 100644
index 000000000000..4d6eca62c023
--- /dev/null
+++ b/net-misc/networkmanager/networkmanager-1.0.2-r1.ebuild
@@ -0,0 +1,298 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager"
+GNOME2_LA_PUNT="yes"
+VALA_MIN_API_VERSION="0.18"
+VALA_USE_DEPEND="vapigen"
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit autotools bash-completion-r1 eutils gnome2 linux-info multilib python-any-r1 systemd \
+ user readme.gentoo toolchain-funcs vala versionator virtualx udev
+
+DESCRIPTION="Universal network configuration daemon for laptops, desktops, servers and virtualization hosts"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
+
+IUSE="bluetooth connection-sharing consolekit +dhclient dhcpcd gnutls +introspection \
+kernel_linux +nss +modemmanager ncurses +ppp resolvconf selinux systemd teamd test \
+vala +wext +wifi zeroconf" # wimax
+
+KEYWORDS="~alpha amd64 arm ~arm64 ~ppc ppc64 ~sparc x86"
+
+REQUIRED_USE="
+ modemmanager? ( ppp )
+ ^^ ( nss gnutls )
+ ^^ ( dhclient dhcpcd )
+"
+
+# gobject-introspection-0.10.3 is needed due to gnome bug 642300
+# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
+# TODO: Qt support?
+COMMON_DEPEND="
+ >=sys-apps/dbus-1.2
+ >=dev-libs/dbus-glib-0.100
+ >=dev-libs/glib-2.32:2
+ >=dev-libs/libnl-3.2.8:3=
+ >=sys-auth/polkit-0.106
+ net-libs/libndp
+ >=net-libs/libsoup-2.26:2.4=
+ net-misc/iputils
+ sys-libs/readline:0
+ >=virtual/libgudev-165:=
+ bluetooth? ( >=net-wireless/bluez-5 )
+ connection-sharing? (
+ net-dns/dnsmasq[dhcp]
+ net-firewall/iptables )
+ gnutls? (
+ dev-libs/libgcrypt:0=
+ net-libs/gnutls:= )
+ modemmanager? ( >=net-misc/modemmanager-0.7.991 )
+ ncurses? ( >=dev-libs/newt-0.52.15 )
+ nss? ( >=dev-libs/nss-3.11:= )
+ dhclient? ( >=net-misc/dhcp-4[client] )
+ dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
+ introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
+ ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] net-dialup/rp-pppoe )
+ resolvconf? ( net-dns/openresolv )
+ systemd? ( >=sys-apps/systemd-209:0= )
+ !systemd? ( || ( sys-power/upower sys-power/upower-pm-utils ) )
+ teamd? ( >=net-misc/libteam-1.9 )
+ zeroconf? ( net-dns/avahi:=[autoipd] )
+"
+RDEPEND="${COMMON_DEPEND}
+ consolekit? ( sys-auth/consolekit )
+ wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-util/gdbus-codegen
+ dev-util/gtk-doc-am
+ >=dev-util/intltool-0.40
+ >=sys-devel/gettext-0.17
+ >=sys-kernel/linux-headers-2.6.29
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+ test? (
+ $(python_gen_any_dep '
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/pygobject:2[${PYTHON_USEDEP}]')
+ )
+"
+
+sysfs_deprecated_check() {
+ ebegin "Checking for SYSFS_DEPRECATED support"
+
+ if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
+ eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
+ eerror "or NetworkManager will not work correctly."
+ eerror "See http://bugs.gentoo.org/333639 for more info."
+ die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
+ fi
+ eend $?
+}
+
+pkg_pretend() {
+ if use kernel_linux; then
+ get_version
+ if linux_config_exists; then
+ sysfs_deprecated_check
+ else
+ ewarn "Was unable to determine your kernel .config"
+ ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
+ ewarn "See http://bugs.gentoo.org/333639 for more info."
+ fi
+
+ fi
+}
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+src_prepare() {
+ DOC_CONTENTS="To modify system network connections without needing to enter the
+ root password, add your user account to the 'plugdev' group."
+
+ # Force use of /run, avoid eautoreconf, upstream bug #737139
+ sed -e 's:$localstatedir/run/:/run/:' -i configure || die
+
+ # Partially revert commit that breaks dhcpcd detection, bug #549970
+ epatch "${FILESDIR}"/${PN}-1.0.2-configure-dhcpcd.patch
+
+ use vala && vala_src_prepare
+
+ epatch_user # don't remove, users often want custom patches for NM
+
+ eautoreconf
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ local myconf
+
+ # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
+ if use ppp; then
+ local PPPD_VER=`best_version net-dialup/ppp`
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+ PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
+ myconf="${myconf} --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER}"
+ fi
+
+ # unit files directory needs to be passed only when systemd is enabled,
+ # otherwise systemd support is not disabled completely, bug #524534
+ use systemd && myconf="${myconf} "$(systemd_with_unitdir)""
+
+ # TODO: enable wimax when we have a libnl:3 compatible revision of it
+ # wimax will be removed, bug #522822
+ # ifnet plugin always disabled until someone volunteers to actively
+ # maintain and fix it
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ --localstatedir=/var \
+ --disable-lto \
+ --disable-config-plugin-ibft \
+ --disable-ifnet \
+ --without-netconfig \
+ --with-dbus-sys-dir=/etc/dbus-1/system.d \
+ --with-udev-dir="$(get_udevdir)" \
+ --with-config-plugins-default=keyfile \
+ --with-iptables=/sbin/iptables \
+ --with-libsoup=yes \
+ --enable-concheck \
+ --with-crypto=$(usex nss nss gnutls) \
+ --with-session-tracking=$(usex systemd systemd $(usex consolekit consolekit no)) \
+ --with-suspend-resume=$(usex systemd systemd upower) \
+ $(use_enable bluetooth bluez5-dun) \
+ $(use_enable introspection) \
+ $(use_enable ppp) \
+ --disable-wimax \
+ $(use_with dhclient) \
+ $(use_with dhcpcd) \
+ $(use_with modemmanager modem-manager-1) \
+ $(use_with ncurses nmtui) \
+ $(use_with resolvconf) \
+ $(use_with selinux) \
+ $(use_enable teamd teamdctl) \
+ $(use_enable test tests) \
+ $(use_enable vala) \
+ --without-valgrind \
+ $(use_with wext) \
+ ${myconf}
+}
+
+src_test() {
+ python_setup
+ Xemake check
+}
+
+src_install() {
+ # Install completions at proper place, bug #465100
+ gnome2_src_install completiondir="$(get_bashcompdir)"
+
+ ! use systemd && readme.gentoo_create_doc
+
+ newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager
+ newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
+
+ # /var/run/NetworkManager is used by some distros, but not by Gentoo
+ rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed"
+ rmdir -v "${ED}/var/run" || die "rmdir failed"
+
+ # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
+ keepdir /etc/NetworkManager/dispatcher.d
+
+ # Provide openrc net dependency only when nm is connected
+ exeinto /etc/NetworkManager/dispatcher.d
+ newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
+ sed -e "s:@EPREFIX@:${EPREFIX}:g" \
+ -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
+
+ keepdir /etc/NetworkManager/system-connections
+ chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765
+
+ # Allow users in plugdev group to modify system connections
+ insinto /usr/share/polkit-1/rules.d/
+ doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ ! use systemd && readme.gentoo_print_elog
+
+ if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
+ ewarn "The ${PN} system configuration file has moved to a new location."
+ ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
+ ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
+ ewarn
+ ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
+ fi
+
+ # The polkit rules file moved to /usr/share
+ old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+ if [[ -f "${old_rules}" ]]; then
+ case "$(md5sum ${old_rules})" in
+ 574d0cfa7e911b1f7792077003060240* )
+ # Automatically delete the old rules.d file if the user did not change it
+ elog
+ elog "Removing old ${old_rules} ..."
+ rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
+ ;;
+ * )
+ elog "The ${old_rules}"
+ elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
+ elog "If you edited ${old_rules}"
+ elog "without changing its behavior, you may want to remove it."
+ ;;
+ esac
+ fi
+
+ # ifnet plugin was disabled for systemd users with 0.9.8.6 version
+ # and for all people with 0.9.10.0-r1 (see ChangeLog for full explanations)
+ if use systemd; then
+ if ! version_is_at_least 0.9.8.6 ${REPLACING_VERSIONS}; then
+ ewarn "Ifnet plugin won't be used with systemd support enabled"
+ ewarn "as it is meant to be used with openRC and can cause collisions"
+ ewarn "(like bug #485658)."
+ ewarn "Because of this, you will likely need to reconfigure some of"
+ ewarn "your networks. To do this you can rely on Gnome control center,"
+ ewarn "nm-connection-editor or nmtui tools for example once updated"
+ ewarn "NetworkManager version is installed."
+ fi
+ else
+ if ! version_is_at_least 0.9.10.0-r1 ${REPLACING_VERSIONS}; then
+ ewarn "Ifnet plugin is now disabled because of it being unattended"
+ ewarn "and unmaintained for a long time, leading to some unfixed bugs"
+ ewarn "and new problems appearing. We will now use upstream 'keyfile'"
+ ewarn "plugin."
+ ewarn "Because of this, you will likely need to reconfigure some of"
+ ewarn "your networks. To do this you can rely on Gnome control center,"
+ ewarn "nm-connection-editor or nmtui tools for example once updated"
+ ewarn "NetworkManager version is installed."
+ fi
+ fi
+
+ # NM fallbacks to plugin specified at compile time (upstream bug #738611)
+ # but still show a warning to remember people to have cleaner config file
+ if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
+ if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
+ ewarn
+ ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
+ ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
+ ewarn
+ fi
+ fi
+
+ # NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457
+ if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
+ ewarn "You have psk-flags=1 setting in above files, you will need to"
+ ewarn "either reconfigure affected networks or, at least, set the flag"
+ ewarn "value to '0'."
+ fi
+}
diff --git a/net-misc/networkmanager/networkmanager-1.0.2.ebuild b/net-misc/networkmanager/networkmanager-1.0.2.ebuild
new file mode 100644
index 000000000000..fae9c40fedc2
--- /dev/null
+++ b/net-misc/networkmanager/networkmanager-1.0.2.ebuild
@@ -0,0 +1,292 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager"
+GNOME2_LA_PUNT="yes"
+VALA_MIN_API_VERSION="0.18"
+VALA_USE_DEPEND="vapigen"
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit bash-completion-r1 eutils gnome2 linux-info multilib python-any-r1 systemd \
+ user readme.gentoo toolchain-funcs vala versionator virtualx udev
+
+DESCRIPTION="Universal network configuration daemon for laptops, desktops, servers and virtualization hosts"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
+
+IUSE="bluetooth connection-sharing consolekit +dhclient dhcpcd gnutls +introspection \
+kernel_linux +nss +modemmanager ncurses +ppp resolvconf selinux systemd teamd test \
+vala +wext +wifi zeroconf" # wimax
+
+KEYWORDS="~alpha amd64 arm ~arm64 ppc ppc64 ~sparc x86"
+
+REQUIRED_USE="
+ modemmanager? ( ppp )
+ ^^ ( nss gnutls )
+ ^^ ( dhclient dhcpcd )
+"
+
+# gobject-introspection-0.10.3 is needed due to gnome bug 642300
+# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
+# TODO: Qt support?
+COMMON_DEPEND="
+ >=sys-apps/dbus-1.2
+ >=dev-libs/dbus-glib-0.100
+ >=dev-libs/glib-2.32:2
+ >=dev-libs/libnl-3.2.8:3=
+ >=sys-auth/polkit-0.106
+ net-libs/libndp
+ >=net-libs/libsoup-2.26:2.4=
+ net-misc/iputils
+ sys-libs/readline:0
+ >=virtual/libgudev-165:=
+ bluetooth? ( >=net-wireless/bluez-5 )
+ connection-sharing? (
+ net-dns/dnsmasq[dhcp]
+ net-firewall/iptables )
+ gnutls? (
+ dev-libs/libgcrypt:0=
+ net-libs/gnutls:= )
+ modemmanager? ( >=net-misc/modemmanager-0.7.991 )
+ ncurses? ( >=dev-libs/newt-0.52.15 )
+ nss? ( >=dev-libs/nss-3.11:= )
+ dhclient? ( >=net-misc/dhcp-4[client] )
+ dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
+ introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
+ ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] net-dialup/rp-pppoe )
+ resolvconf? ( net-dns/openresolv )
+ systemd? ( >=sys-apps/systemd-209:0= )
+ !systemd? ( || ( sys-power/upower sys-power/upower-pm-utils ) )
+ teamd? ( >=net-misc/libteam-1.9 )
+ zeroconf? ( net-dns/avahi:=[autoipd] )
+"
+RDEPEND="${COMMON_DEPEND}
+ consolekit? ( sys-auth/consolekit )
+ wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-util/gdbus-codegen
+ dev-util/gtk-doc-am
+ >=dev-util/intltool-0.40
+ >=sys-devel/gettext-0.17
+ >=sys-kernel/linux-headers-2.6.29
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+ test? (
+ $(python_gen_any_dep '
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/pygobject:2[${PYTHON_USEDEP}]')
+ )
+"
+
+sysfs_deprecated_check() {
+ ebegin "Checking for SYSFS_DEPRECATED support"
+
+ if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
+ eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
+ eerror "or NetworkManager will not work correctly."
+ eerror "See http://bugs.gentoo.org/333639 for more info."
+ die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
+ fi
+ eend $?
+}
+
+pkg_pretend() {
+ if use kernel_linux; then
+ get_version
+ if linux_config_exists; then
+ sysfs_deprecated_check
+ else
+ ewarn "Was unable to determine your kernel .config"
+ ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
+ ewarn "See http://bugs.gentoo.org/333639 for more info."
+ fi
+
+ fi
+}
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+src_prepare() {
+ DOC_CONTENTS="To modify system network connections without needing to enter the
+ root password, add your user account to the 'plugdev' group."
+
+ # Force use of /run, avoid eautoreconf, upstream bug #737139
+ sed -e 's:$localstatedir/run/:/run/:' -i configure || die
+
+ use vala && vala_src_prepare
+
+ epatch_user # don't remove, users often want custom patches for NM
+ gnome2_src_prepare
+}
+
+src_configure() {
+ local myconf
+
+ # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
+ if use ppp; then
+ local PPPD_VER=`best_version net-dialup/ppp`
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+ PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
+ myconf="${myconf} --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER}"
+ fi
+
+ # unit files directory needs to be passed only when systemd is enabled,
+ # otherwise systemd support is not disabled completely, bug #524534
+ use systemd && myconf="${myconf} "$(systemd_with_unitdir)""
+
+ # TODO: enable wimax when we have a libnl:3 compatible revision of it
+ # wimax will be removed, bug #522822
+ # ifnet plugin always disabled until someone volunteers to actively
+ # maintain and fix it
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ --localstatedir=/var \
+ --disable-lto \
+ --disable-config-plugin-ibft \
+ --disable-ifnet \
+ --without-netconfig \
+ --with-dbus-sys-dir=/etc/dbus-1/system.d \
+ --with-udev-dir="$(get_udevdir)" \
+ --with-config-plugins-default=keyfile \
+ --with-iptables=/sbin/iptables \
+ --with-libsoup=yes \
+ --enable-concheck \
+ --with-crypto=$(usex nss nss gnutls) \
+ --with-session-tracking=$(usex systemd systemd $(usex consolekit consolekit no)) \
+ --with-suspend-resume=$(usex systemd systemd upower) \
+ $(use_enable bluetooth bluez5-dun) \
+ $(use_enable introspection) \
+ $(use_enable ppp) \
+ --disable-wimax \
+ $(use_with dhclient) \
+ $(use_with dhcpcd) \
+ $(use_with modemmanager modem-manager-1) \
+ $(use_with ncurses nmtui) \
+ $(use_with resolvconf) \
+ $(use_with selinux) \
+ $(use_enable teamd teamdctl) \
+ $(use_enable test tests) \
+ $(use_enable vala) \
+ --without-valgrind \
+ $(use_with wext) \
+ ${myconf}
+}
+
+src_test() {
+ python_setup
+ Xemake check
+}
+
+src_install() {
+ # Install completions at proper place, bug #465100
+ gnome2_src_install completiondir="$(get_bashcompdir)"
+
+ ! use systemd && readme.gentoo_create_doc
+
+ newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager
+ newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
+
+ # /var/run/NetworkManager is used by some distros, but not by Gentoo
+ rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed"
+ rmdir -v "${ED}/var/run" || die "rmdir failed"
+
+ # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
+ keepdir /etc/NetworkManager/dispatcher.d
+
+ # Provide openrc net dependency only when nm is connected
+ exeinto /etc/NetworkManager/dispatcher.d
+ newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
+ sed -e "s:@EPREFIX@:${EPREFIX}:g" \
+ -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
+
+ keepdir /etc/NetworkManager/system-connections
+ chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765
+
+ # Allow users in plugdev group to modify system connections
+ insinto /usr/share/polkit-1/rules.d/
+ doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ ! use systemd && readme.gentoo_print_elog
+
+ if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
+ ewarn "The ${PN} system configuration file has moved to a new location."
+ ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
+ ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
+ ewarn
+ ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
+ fi
+
+ # The polkit rules file moved to /usr/share
+ old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+ if [[ -f "${old_rules}" ]]; then
+ case "$(md5sum ${old_rules})" in
+ 574d0cfa7e911b1f7792077003060240* )
+ # Automatically delete the old rules.d file if the user did not change it
+ elog
+ elog "Removing old ${old_rules} ..."
+ rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
+ ;;
+ * )
+ elog "The ${old_rules}"
+ elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
+ elog "If you edited ${old_rules}"
+ elog "without changing its behavior, you may want to remove it."
+ ;;
+ esac
+ fi
+
+ # ifnet plugin was disabled for systemd users with 0.9.8.6 version
+ # and for all people with 0.9.10.0-r1 (see ChangeLog for full explanations)
+ if use systemd; then
+ if ! version_is_at_least 0.9.8.6 ${REPLACING_VERSIONS}; then
+ ewarn "Ifnet plugin won't be used with systemd support enabled"
+ ewarn "as it is meant to be used with openRC and can cause collisions"
+ ewarn "(like bug #485658)."
+ ewarn "Because of this, you will likely need to reconfigure some of"
+ ewarn "your networks. To do this you can rely on Gnome control center,"
+ ewarn "nm-connection-editor or nmtui tools for example once updated"
+ ewarn "NetworkManager version is installed."
+ fi
+ else
+ if ! version_is_at_least 0.9.10.0-r1 ${REPLACING_VERSIONS}; then
+ ewarn "Ifnet plugin is now disabled because of it being unattended"
+ ewarn "and unmaintained for a long time, leading to some unfixed bugs"
+ ewarn "and new problems appearing. We will now use upstream 'keyfile'"
+ ewarn "plugin."
+ ewarn "Because of this, you will likely need to reconfigure some of"
+ ewarn "your networks. To do this you can rely on Gnome control center,"
+ ewarn "nm-connection-editor or nmtui tools for example once updated"
+ ewarn "NetworkManager version is installed."
+ fi
+ fi
+
+ # NM fallbacks to plugin specified at compile time (upstream bug #738611)
+ # but still show a warning to remember people to have cleaner config file
+ if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
+ if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
+ ewarn
+ ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
+ ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
+ ewarn
+ fi
+ fi
+
+ # NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457
+ if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
+ ewarn "You have psk-flags=1 setting in above files, you will need to"
+ ewarn "either reconfigure affected networks or, at least, set the flag"
+ ewarn "value to '0'."
+ fi
+}
diff --git a/net-misc/networkmanager/networkmanager-1.0.4-r1.ebuild b/net-misc/networkmanager/networkmanager-1.0.4-r1.ebuild
new file mode 100644
index 000000000000..c36fad64d061
--- /dev/null
+++ b/net-misc/networkmanager/networkmanager-1.0.4-r1.ebuild
@@ -0,0 +1,342 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager"
+GNOME2_LA_PUNT="yes"
+VALA_USE_DEPEND="vapigen"
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit autotools bash-completion-r1 eutils gnome2 linux-info multilib python-any-r1 systemd \
+ user readme.gentoo toolchain-funcs vala versionator virtualx udev multilib-minimal
+
+DESCRIPTION="Universal network configuration daemon for laptops, desktops, servers and virtualization hosts"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
+
+IUSE="bluetooth connection-sharing consolekit +dhclient dhcpcd gnutls +introspection \
+kernel_linux +nss +modemmanager ncurses +ppp resolvconf selinux systemd teamd test \
+vala +wext +wifi zeroconf" # wimax
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
+
+REQUIRED_USE="
+ modemmanager? ( ppp )
+ wext? ( wifi )
+ ^^ ( nss gnutls )
+ ^^ ( dhclient dhcpcd )
+"
+
+# gobject-introspection-0.10.3 is needed due to gnome bug 642300
+# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
+# TODO: Qt support?
+COMMON_DEPEND="
+ >=sys-apps/dbus-1.2[${MULTILIB_USEDEP}]
+ >=dev-libs/dbus-glib-0.100[${MULTILIB_USEDEP}]
+ >=dev-libs/glib-2.37.6:2[${MULTILIB_USEDEP}]
+ >=dev-libs/libnl-3.2.8:3=
+ >=sys-auth/polkit-0.106
+ net-libs/libndp
+ >=net-libs/libsoup-2.26:2.4=
+ net-misc/iputils
+ sys-libs/readline:0
+ >=virtual/libgudev-165:=[${MULTILIB_USEDEP}]
+ bluetooth? ( >=net-wireless/bluez-5 )
+ connection-sharing? (
+ net-dns/dnsmasq[dhcp]
+ net-firewall/iptables )
+ gnutls? (
+ dev-libs/libgcrypt:0=[${MULTILIB_USEDEP}]
+ net-libs/gnutls:=[${MULTILIB_USEDEP}] )
+ modemmanager? ( >=net-misc/modemmanager-0.7.991 )
+ ncurses? ( >=dev-libs/newt-0.52.15 )
+ nss? ( >=dev-libs/nss-3.11:=[${MULTILIB_USEDEP}] )
+ dhclient? ( >=net-misc/dhcp-4[client] )
+ dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
+ introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
+ ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] net-dialup/rp-pppoe )
+ resolvconf? ( net-dns/openresolv )
+ systemd? ( >=sys-apps/systemd-209:0= )
+ !systemd? ( || ( sys-power/upower sys-power/upower-pm-utils ) )
+ teamd? ( >=net-misc/libteam-1.9 )
+ zeroconf? ( net-dns/avahi:=[autoipd] )
+"
+RDEPEND="${COMMON_DEPEND}
+ consolekit? ( sys-auth/consolekit )
+ wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-util/gdbus-codegen
+ dev-util/gtk-doc-am
+ >=dev-util/intltool-0.40
+ >=sys-devel/gettext-0.17
+ >=sys-kernel/linux-headers-2.6.29
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+ test? (
+ $(python_gen_any_dep '
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/pygobject:2[${PYTHON_USEDEP}]')
+ )
+"
+
+sysfs_deprecated_check() {
+ ebegin "Checking for SYSFS_DEPRECATED support"
+
+ if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
+ eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
+ eerror "or NetworkManager will not work correctly."
+ eerror "See http://bugs.gentoo.org/333639 for more info."
+ die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
+ fi
+ eend $?
+}
+
+pkg_pretend() {
+ if use kernel_linux; then
+ get_version
+ if linux_config_exists; then
+ sysfs_deprecated_check
+ else
+ ewarn "Was unable to determine your kernel .config"
+ ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
+ ewarn "See http://bugs.gentoo.org/333639 for more info."
+ fi
+
+ fi
+}
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+src_prepare() {
+ DOC_CONTENTS="To modify system network connections without needing to enter the
+ root password, add your user account to the 'plugdev' group."
+
+ # Force use of /run, avoid eautoreconf, upstream bug #737139, fixed in 'master'
+ sed -e 's:$localstatedir/run/:/run/:' -i configure || die
+
+ use vala && vala_src_prepare
+
+ epatch_user # don't remove, users often want custom patches for NM
+
+ eautoreconf
+
+ gnome2_src_prepare
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
+ if use ppp; then
+ local PPPD_VER=`best_version net-dialup/ppp`
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+ PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
+ myconf+=( --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER} )
+ fi
+
+ # unit files directory needs to be passed only when systemd is enabled,
+ # otherwise systemd support is not disabled completely, bug #524534
+ use systemd && myconf+=( "$(systemd_with_unitdir)" )
+
+ if multilib_is_native_abi; then
+ # work-around man out-of-source brokenness, must be done before configure
+ mkdir man || die
+ find "${S}"/man -name '*.?' -exec ln -s {} man/ ';' || die
+ else
+ # libnl, libndp are only used for executables, not libraries
+ myconf+=( LIB{NL,NDP}_{CFLAGS,LIBS}=' ' )
+ fi
+
+ # TODO: enable wimax when we have a libnl:3 compatible revision of it
+ # wimax will be removed, bug #522822
+ # ifnet plugin always disabled until someone volunteers to actively
+ # maintain and fix it
+ ECONF_SOURCE=${S} \
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ --localstatedir=/var \
+ --disable-lto \
+ --disable-config-plugin-ibft \
+ --disable-ifnet \
+ --without-netconfig \
+ --with-dbus-sys-dir=/etc/dbus-1/system.d \
+ --with-udev-dir="$(get_udevdir)" \
+ --with-config-plugins-default=keyfile \
+ --with-iptables=/sbin/iptables \
+ $(multilib_native_with libsoup) \
+ $(multilib_native_enable concheck) \
+ --with-crypto=$(usex nss nss gnutls) \
+ --with-session-tracking=$(multilib_native_usex systemd systemd $(multilib_native_usex consolekit consolekit no)) \
+ --with-suspend-resume=$(multilib_native_usex systemd systemd upower) \
+ $(multilib_native_use_enable bluetooth bluez5-dun) \
+ $(multilib_native_use_enable introspection) \
+ $(multilib_native_use_enable ppp) \
+ --disable-wimax \
+ $(use_with dhclient) \
+ $(use_with dhcpcd) \
+ $(multilib_native_use_with modemmanager modem-manager-1) \
+ $(multilib_native_use_with ncurses nmtui) \
+ $(multilib_native_use_with resolvconf) \
+ $(multilib_native_use_with selinux) \
+ $(multilib_native_use_enable teamd teamdctl) \
+ $(multilib_native_use_enable test tests) \
+ $(multilib_native_use_enable vala) \
+ --without-valgrind \
+ $(multilib_native_use_with wext) \
+ $(multilib_native_use_enable wifi) \
+ "${myconf[@]}"
+
+ # work-around gtk-doc out-of-source brokedness
+ if multilib_is_native_abi; then
+ local d
+ for d in api libnm libnm-util libnm-glib; do
+ ln -s "${S}"/docs/${d}/html docs/${d}/html || die
+ done
+ fi
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ emake
+ else
+ emake all-am
+ emake -C include
+ emake -C introspection # generated headers, needed for libnm
+ emake -C libnm-core
+ emake -C libnm
+ emake -C libnm-util
+ emake -C libnm-glib
+ fi
+}
+
+multilib_src_test() {
+ if multilib_is_native_abi; then
+ python_setup
+ Xemake check
+ fi
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ # Install completions at proper place, bug #465100
+ gnome2_src_install completiondir="$(get_bashcompdir)"
+ else
+ emake DESTDIR="${D}" install-am
+ emake DESTDIR="${D}" install -C include
+ emake DESTDIR="${D}" install -C introspection
+ emake DESTDIR="${D}" install -C libnm-core
+ emake DESTDIR="${D}" install -C libnm
+ emake DESTDIR="${D}" install -C libnm-util
+ emake DESTDIR="${D}" install -C libnm-glib
+ fi
+}
+
+multilib_src_install_all() {
+ ! use systemd && readme.gentoo_create_doc
+
+ newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager
+ newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
+
+ # /var/run/NetworkManager is used by some distros, but not by Gentoo
+ rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed"
+ rmdir -v "${ED}/var/run" || die "rmdir failed"
+
+ # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
+ keepdir /etc/NetworkManager/dispatcher.d
+
+ # Provide openrc net dependency only when nm is connected
+ exeinto /etc/NetworkManager/dispatcher.d
+ newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
+ sed -e "s:@EPREFIX@:${EPREFIX}:g" \
+ -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
+
+ keepdir /etc/NetworkManager/system-connections
+ chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765
+
+ # Allow users in plugdev group to modify system connections
+ insinto /usr/share/polkit-1/rules.d/
+ doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ ! use systemd && readme.gentoo_print_elog
+
+ if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
+ ewarn "The ${PN} system configuration file has moved to a new location."
+ ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
+ ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
+ ewarn
+ ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
+ fi
+
+ # The polkit rules file moved to /usr/share
+ old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+ if [[ -f "${old_rules}" ]]; then
+ case "$(md5sum ${old_rules})" in
+ 574d0cfa7e911b1f7792077003060240* )
+ # Automatically delete the old rules.d file if the user did not change it
+ elog
+ elog "Removing old ${old_rules} ..."
+ rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
+ ;;
+ * )
+ elog "The ${old_rules}"
+ elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
+ elog "If you edited ${old_rules}"
+ elog "without changing its behavior, you may want to remove it."
+ ;;
+ esac
+ fi
+
+ # ifnet plugin was disabled for systemd users with 0.9.8.6 version
+ # and for all people with 0.9.10.0-r1 (see ChangeLog for full explanations)
+ if use systemd; then
+ if ! version_is_at_least 0.9.8.6 ${REPLACING_VERSIONS}; then
+ ewarn "Ifnet plugin won't be used with systemd support enabled"
+ ewarn "as it is meant to be used with openRC and can cause collisions"
+ ewarn "(like bug #485658)."
+ ewarn "Because of this, you will likely need to reconfigure some of"
+ ewarn "your networks. To do this you can rely on Gnome control center,"
+ ewarn "nm-connection-editor or nmtui tools for example once updated"
+ ewarn "NetworkManager version is installed."
+ fi
+ else
+ if ! version_is_at_least 0.9.10.0-r1 ${REPLACING_VERSIONS}; then
+ ewarn "Ifnet plugin is now disabled because of it being unattended"
+ ewarn "and unmaintained for a long time, leading to some unfixed bugs"
+ ewarn "and new problems appearing. We will now use upstream 'keyfile'"
+ ewarn "plugin."
+ ewarn "Because of this, you will likely need to reconfigure some of"
+ ewarn "your networks. To do this you can rely on Gnome control center,"
+ ewarn "nm-connection-editor or nmtui tools for example once updated"
+ ewarn "NetworkManager version is installed."
+ fi
+ fi
+
+ # NM fallbacks to plugin specified at compile time (upstream bug #738611)
+ # but still show a warning to remember people to have cleaner config file
+ if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
+ if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
+ ewarn
+ ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
+ ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
+ ewarn
+ fi
+ fi
+
+ # NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457
+ if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
+ ewarn "You have psk-flags=1 setting in above files, you will need to"
+ ewarn "either reconfigure affected networks or, at least, set the flag"
+ ewarn "value to '0'."
+ fi
+}
diff --git a/net-misc/networkmanager/networkmanager-1.0.4.ebuild b/net-misc/networkmanager/networkmanager-1.0.4.ebuild
new file mode 100644
index 000000000000..3e3557772dd9
--- /dev/null
+++ b/net-misc/networkmanager/networkmanager-1.0.4.ebuild
@@ -0,0 +1,296 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME_ORG_MODULE="NetworkManager"
+GNOME2_LA_PUNT="yes"
+VALA_USE_DEPEND="vapigen"
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit autotools bash-completion-r1 eutils gnome2 linux-info multilib python-any-r1 systemd \
+ user readme.gentoo toolchain-funcs vala versionator virtualx udev
+
+DESCRIPTION="Universal network configuration daemon for laptops, desktops, servers and virtualization hosts"
+HOMEPAGE="https://wiki.gnome.org/Projects/NetworkManager"
+
+LICENSE="GPL-2+"
+SLOT="0" # add subslot if libnm-util.so.2 or libnm-glib.so.4 bumps soname version
+
+IUSE="bluetooth connection-sharing consolekit +dhclient dhcpcd gnutls +introspection \
+kernel_linux +nss +modemmanager ncurses +ppp resolvconf selinux systemd teamd test \
+vala +wext +wifi zeroconf" # wimax
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
+
+REQUIRED_USE="
+ modemmanager? ( ppp )
+ wext? ( wifi )
+ ^^ ( nss gnutls )
+ ^^ ( dhclient dhcpcd )
+"
+
+# gobject-introspection-0.10.3 is needed due to gnome bug 642300
+# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
+# TODO: Qt support?
+COMMON_DEPEND="
+ >=sys-apps/dbus-1.2
+ >=dev-libs/dbus-glib-0.100
+ >=dev-libs/glib-2.37.6:2
+ >=dev-libs/libnl-3.2.8:3=
+ >=sys-auth/polkit-0.106
+ net-libs/libndp
+ >=net-libs/libsoup-2.26:2.4=
+ net-misc/iputils
+ sys-libs/readline:0
+ >=virtual/libgudev-165:=
+ bluetooth? ( >=net-wireless/bluez-5 )
+ connection-sharing? (
+ net-dns/dnsmasq[dhcp]
+ net-firewall/iptables )
+ gnutls? (
+ dev-libs/libgcrypt:0=
+ net-libs/gnutls:= )
+ modemmanager? ( >=net-misc/modemmanager-0.7.991 )
+ ncurses? ( >=dev-libs/newt-0.52.15 )
+ nss? ( >=dev-libs/nss-3.11:= )
+ dhclient? ( >=net-misc/dhcp-4[client] )
+ dhcpcd? ( >=net-misc/dhcpcd-4.0.0_rc3 )
+ introspection? ( >=dev-libs/gobject-introspection-0.10.3:= )
+ ppp? ( >=net-dialup/ppp-2.4.5:=[ipv6] net-dialup/rp-pppoe )
+ resolvconf? ( net-dns/openresolv )
+ systemd? ( >=sys-apps/systemd-209:0= )
+ !systemd? ( || ( sys-power/upower sys-power/upower-pm-utils ) )
+ teamd? ( >=net-misc/libteam-1.9 )
+ zeroconf? ( net-dns/avahi:=[autoipd] )
+"
+RDEPEND="${COMMON_DEPEND}
+ consolekit? ( sys-auth/consolekit )
+ wifi? ( >=net-wireless/wpa_supplicant-0.7.3-r3[dbus] )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-util/gdbus-codegen
+ dev-util/gtk-doc-am
+ >=dev-util/intltool-0.40
+ >=sys-devel/gettext-0.17
+ >=sys-kernel/linux-headers-2.6.29
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+ test? (
+ $(python_gen_any_dep '
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/pygobject:2[${PYTHON_USEDEP}]')
+ )
+"
+
+sysfs_deprecated_check() {
+ ebegin "Checking for SYSFS_DEPRECATED support"
+
+ if { linux_chkconfig_present SYSFS_DEPRECATED_V2; }; then
+ eerror "Please disable SYSFS_DEPRECATED_V2 support in your kernel config and recompile your kernel"
+ eerror "or NetworkManager will not work correctly."
+ eerror "See http://bugs.gentoo.org/333639 for more info."
+ die "CONFIG_SYSFS_DEPRECATED_V2 support detected!"
+ fi
+ eend $?
+}
+
+pkg_pretend() {
+ if use kernel_linux; then
+ get_version
+ if linux_config_exists; then
+ sysfs_deprecated_check
+ else
+ ewarn "Was unable to determine your kernel .config"
+ ewarn "Please note that if CONFIG_SYSFS_DEPRECATED_V2 is set in your kernel .config, NetworkManager will not work correctly."
+ ewarn "See http://bugs.gentoo.org/333639 for more info."
+ fi
+
+ fi
+}
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+src_prepare() {
+ DOC_CONTENTS="To modify system network connections without needing to enter the
+ root password, add your user account to the 'plugdev' group."
+
+ # Force use of /run, avoid eautoreconf, upstream bug #737139, fixed in 'master'
+ sed -e 's:$localstatedir/run/:/run/:' -i configure || die
+
+ use vala && vala_src_prepare
+
+ epatch_user # don't remove, users often want custom patches for NM
+
+ eautoreconf
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ local myconf
+
+ # Same hack as net-dialup/pptpd to get proper plugin dir for ppp, bug #519986
+ if use ppp; then
+ local PPPD_VER=`best_version net-dialup/ppp`
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+ PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
+ myconf="${myconf} --with-pppd-plugin-dir=/usr/$(get_libdir)/pppd/${PPPD_VER}"
+ fi
+
+ # unit files directory needs to be passed only when systemd is enabled,
+ # otherwise systemd support is not disabled completely, bug #524534
+ use systemd && myconf="${myconf} "$(systemd_with_unitdir)""
+
+ # TODO: enable wimax when we have a libnl:3 compatible revision of it
+ # wimax will be removed, bug #522822
+ # ifnet plugin always disabled until someone volunteers to actively
+ # maintain and fix it
+ gnome2_src_configure \
+ --disable-more-warnings \
+ --disable-static \
+ --localstatedir=/var \
+ --disable-lto \
+ --disable-config-plugin-ibft \
+ --disable-ifnet \
+ --without-netconfig \
+ --with-dbus-sys-dir=/etc/dbus-1/system.d \
+ --with-udev-dir="$(get_udevdir)" \
+ --with-config-plugins-default=keyfile \
+ --with-iptables=/sbin/iptables \
+ --with-libsoup=yes \
+ --enable-concheck \
+ --with-crypto=$(usex nss nss gnutls) \
+ --with-session-tracking=$(usex systemd systemd $(usex consolekit consolekit no)) \
+ --with-suspend-resume=$(usex systemd systemd upower) \
+ $(use_enable bluetooth bluez5-dun) \
+ $(use_enable introspection) \
+ $(use_enable ppp) \
+ --disable-wimax \
+ $(use_with dhclient) \
+ $(use_with dhcpcd) \
+ $(use_with modemmanager modem-manager-1) \
+ $(use_with ncurses nmtui) \
+ $(use_with resolvconf) \
+ $(use_with selinux) \
+ $(use_enable teamd teamdctl) \
+ $(use_enable test tests) \
+ $(use_enable vala) \
+ --without-valgrind \
+ $(use_with wext) \
+ $(use_enable wifi) \
+ ${myconf}
+}
+
+src_test() {
+ python_setup
+ Xemake check
+}
+
+src_install() {
+ # Install completions at proper place, bug #465100
+ gnome2_src_install completiondir="$(get_bashcompdir)"
+
+ ! use systemd && readme.gentoo_create_doc
+
+ newinitd "${FILESDIR}/init.d.NetworkManager" NetworkManager
+ newconfd "${FILESDIR}/conf.d.NetworkManager" NetworkManager
+
+ # /var/run/NetworkManager is used by some distros, but not by Gentoo
+ rmdir -v "${ED}/var/run/NetworkManager" || die "rmdir failed"
+ rmdir -v "${ED}/var/run" || die "rmdir failed"
+
+ # Need to keep the /etc/NetworkManager/dispatched.d for dispatcher scripts
+ keepdir /etc/NetworkManager/dispatcher.d
+
+ # Provide openrc net dependency only when nm is connected
+ exeinto /etc/NetworkManager/dispatcher.d
+ newexe "${FILESDIR}/10-openrc-status-r4" 10-openrc-status
+ sed -e "s:@EPREFIX@:${EPREFIX}:g" \
+ -i "${ED}/etc/NetworkManager/dispatcher.d/10-openrc-status" || die
+
+ keepdir /etc/NetworkManager/system-connections
+ chmod 0600 "${ED}"/etc/NetworkManager/system-connections/.keep* # bug #383765
+
+ # Allow users in plugdev group to modify system connections
+ insinto /usr/share/polkit-1/rules.d/
+ doins "${FILESDIR}/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ ! use systemd && readme.gentoo_print_elog
+
+ if [[ -e "${EROOT}etc/NetworkManager/nm-system-settings.conf" ]]; then
+ ewarn "The ${PN} system configuration file has moved to a new location."
+ ewarn "You must migrate your settings from ${EROOT}/etc/NetworkManager/nm-system-settings.conf"
+ ewarn "to ${EROOT}etc/NetworkManager/NetworkManager.conf"
+ ewarn
+ ewarn "After doing so, you can remove ${EROOT}etc/NetworkManager/nm-system-settings.conf"
+ fi
+
+ # The polkit rules file moved to /usr/share
+ old_rules="${EROOT}etc/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules"
+ if [[ -f "${old_rules}" ]]; then
+ case "$(md5sum ${old_rules})" in
+ 574d0cfa7e911b1f7792077003060240* )
+ # Automatically delete the old rules.d file if the user did not change it
+ elog
+ elog "Removing old ${old_rules} ..."
+ rm -f "${old_rules}" || eerror "Failed, please remove ${old_rules} manually"
+ ;;
+ * )
+ elog "The ${old_rules}"
+ elog "file moved to /usr/share/polkit-1/rules.d/ in >=networkmanager-0.9.4.0-r4"
+ elog "If you edited ${old_rules}"
+ elog "without changing its behavior, you may want to remove it."
+ ;;
+ esac
+ fi
+
+ # ifnet plugin was disabled for systemd users with 0.9.8.6 version
+ # and for all people with 0.9.10.0-r1 (see ChangeLog for full explanations)
+ if use systemd; then
+ if ! version_is_at_least 0.9.8.6 ${REPLACING_VERSIONS}; then
+ ewarn "Ifnet plugin won't be used with systemd support enabled"
+ ewarn "as it is meant to be used with openRC and can cause collisions"
+ ewarn "(like bug #485658)."
+ ewarn "Because of this, you will likely need to reconfigure some of"
+ ewarn "your networks. To do this you can rely on Gnome control center,"
+ ewarn "nm-connection-editor or nmtui tools for example once updated"
+ ewarn "NetworkManager version is installed."
+ fi
+ else
+ if ! version_is_at_least 0.9.10.0-r1 ${REPLACING_VERSIONS}; then
+ ewarn "Ifnet plugin is now disabled because of it being unattended"
+ ewarn "and unmaintained for a long time, leading to some unfixed bugs"
+ ewarn "and new problems appearing. We will now use upstream 'keyfile'"
+ ewarn "plugin."
+ ewarn "Because of this, you will likely need to reconfigure some of"
+ ewarn "your networks. To do this you can rely on Gnome control center,"
+ ewarn "nm-connection-editor or nmtui tools for example once updated"
+ ewarn "NetworkManager version is installed."
+ fi
+ fi
+
+ # NM fallbacks to plugin specified at compile time (upstream bug #738611)
+ # but still show a warning to remember people to have cleaner config file
+ if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
+ if grep plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
+ ewarn
+ ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
+ ewarn "Since it won't be used, you will need to stop setting ifnet plugin there."
+ ewarn
+ fi
+ fi
+
+ # NM shows lots of errors making nmcli neither unusable, bug #528748 upstream bug #690457
+ if grep -r "psk-flags=1" "${EROOT}"/etc/NetworkManager/; then
+ ewarn "You have psk-flags=1 setting in above files, you will need to"
+ ewarn "either reconfigure affected networks or, at least, set the flag"
+ ewarn "value to '0'."
+ fi
+}
diff --git a/net-misc/ng-utils/Manifest b/net-misc/ng-utils/Manifest
new file mode 100644
index 000000000000..f63f23802933
--- /dev/null
+++ b/net-misc/ng-utils/Manifest
@@ -0,0 +1 @@
+DIST ng-utils-0.6.tar.gz 83119 RMD160 98cdb774203c6a2e0fe758aac99e798bb3b29be2 SHA1 f837768e39a836eb087db0e02ebe5ec5f63ca799 SHA256 bfad56e6b7418500c77f58ba9c308b36144962e446874af19dea60b091d02862
diff --git a/net-misc/ng-utils/metadata.xml b/net-misc/ng-utils/metadata.xml
new file mode 100644
index 000000000000..a40624fba8f0
--- /dev/null
+++ b/net-misc/ng-utils/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/ng-utils/ng-utils-0.6.ebuild b/net-misc/ng-utils/ng-utils-0.6.ebuild
new file mode 100644
index 000000000000..bce3fb5c0a51
--- /dev/null
+++ b/net-misc/ng-utils/ng-utils-0.6.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="A collection of small tools for accessing netgroup contents"
+HOMEPAGE="ftp://ftp.hungry.com/pub/hungry/ng-utils"
+SRC_URI="ftp://ftp.hungry.com/pub/hungry/ng-utils/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+}
diff --git a/net-misc/npapi-sdk/Manifest b/net-misc/npapi-sdk/Manifest
new file mode 100644
index 000000000000..3051bf2473f7
--- /dev/null
+++ b/net-misc/npapi-sdk/Manifest
@@ -0,0 +1,2 @@
+DIST npapi-sdk-0.27.2.tar.bz2 65811 SHA256 01bf34bdd0fcaa546ba3d5c96f5d91f91dd117d4ed5ffe13f56bbd5aa566ae77 SHA512 827d52fbc8eb601ac0e486aed267b1ca6cb8732c92f1224f4b38e039288b77d07d47c5d4cf384a3114403b85e7f086f345912f1b20b41d27785c9bb367514842 WHIRLPOOL 9de6204b6112eff9a2621b3885475b0ea9fae9fd5d9d36200583e856126b6170edff5f7cfcbe21bbc5b133150479e7c2f68de7fd0b5b1f5e50c5c19542275bfb
+DIST npapi-sdk-0.27.tar.bz2 64040 SHA256 6c674423bdea1ea8a60ac6009bcb28c3343f1a5abe727cc0bbe869d5eccff15e SHA512 12e28c354cca36a15578cd507d78644e016dff03e4940140d11ecb598a89464898e8be9fb17e7e86a696906fe9992f3c55da18c41dd1b0b8d33cb049e2056607 WHIRLPOOL 4a00c1927f15e99a4ae7fb2483c578e9ec152d36ef447d14c5e5b2f24b1d4f1aa99888e90ef413843a8dc21a78a52c70bf0998dc64079b87d0d853e1a3760c15
diff --git a/net-misc/npapi-sdk/metadata.xml b/net-misc/npapi-sdk/metadata.xml
new file mode 100644
index 000000000000..185e561eac9f
--- /dev/null
+++ b/net-misc/npapi-sdk/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>mozilla</herd>
+ <maintainer>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <maintainer>
+ <email>anarchy@gentoo.org</email>
+ <name>Jory A. Pratt</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="bitbucket">mgorny/npapi-sdk</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/npapi-sdk/npapi-sdk-0.27.2.ebuild b/net-misc/npapi-sdk/npapi-sdk-0.27.2.ebuild
new file mode 100644
index 000000000000..dd3ed8994147
--- /dev/null
+++ b/net-misc/npapi-sdk/npapi-sdk-0.27.2.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools-utils
+
+DESCRIPTION="NPAPI headers bundle"
+HOMEPAGE="https://bitbucket.org/mgorny/npapi-sdk/"
+SRC_URI="https://www.bitbucket.org/mgorny/${PN}/downloads/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~ia64 ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND="virtual/pkgconfig"
diff --git a/net-misc/npapi-sdk/npapi-sdk-0.27.ebuild b/net-misc/npapi-sdk/npapi-sdk-0.27.ebuild
new file mode 100644
index 000000000000..b7366adf4903
--- /dev/null
+++ b/net-misc/npapi-sdk/npapi-sdk-0.27.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools-utils
+
+DESCRIPTION="NPAPI headers bundle"
+HOMEPAGE="https://bitbucket.org/mgorny/npapi-sdk/"
+SRC_URI="https://www.bitbucket.org/mgorny/${PN}/downloads/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~ia64 ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND="virtual/pkgconfig"
diff --git a/net-misc/npapi-sdk/npapi-sdk-9999.ebuild b/net-misc/npapi-sdk/npapi-sdk-9999.ebuild
new file mode 100644
index 000000000000..8321475e3ce3
--- /dev/null
+++ b/net-misc/npapi-sdk/npapi-sdk-9999.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+#if LIVE
+AUTOTOOLS_AUTORECONF=yes
+EGIT_REPO_URI="https://bitbucket.org/mgorny/${PN}.git"
+
+inherit git-r3
+#endif
+
+inherit autotools-utils
+
+DESCRIPTION="NPAPI headers bundle"
+HOMEPAGE="https://bitbucket.org/mgorny/npapi-sdk/"
+SRC_URI="https://www.bitbucket.org/mgorny/${PN}/downloads/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND="virtual/pkgconfig"
+#if LIVE
+
+KEYWORDS=""
+SRC_URI=
+#endif
diff --git a/net-misc/nstx/Manifest b/net-misc/nstx/Manifest
new file mode 100644
index 000000000000..7277c53cdda5
--- /dev/null
+++ b/net-misc/nstx/Manifest
@@ -0,0 +1,2 @@
+DIST nstx-1.1-beta6.tgz 20458 SHA256 57a1962a66e9cb64fe70839d852c56cd253092260eab589a8173740b75b21450
+DIST nstx_1.1-beta6-5.diff.gz 10063 SHA256 ee301d0bee2a3e44f576a6c8cf1534878264f6d79a489eae5ca7237262cd0d32
diff --git a/net-misc/nstx/files/nstx-1.1_beta6_00-linux-tuntap.patch b/net-misc/nstx/files/nstx-1.1_beta6_00-linux-tuntap.patch
new file mode 100644
index 000000000000..524fd705a86e
--- /dev/null
+++ b/net-misc/nstx/files/nstx-1.1_beta6_00-linux-tuntap.patch
@@ -0,0 +1,465 @@
+diff -ru nstx-1.1-beta6.orig/nstx_tuntap.c nstx-1.1-beta6/nstx_tuntap.c
+--- nstx-1.1-beta6.orig/nstx_tuntap.c 2009-03-16 05:31:24.000000000 +0000
++++ nstx-1.1-beta6/nstx_tuntap.c 2009-03-16 22:45:28.000000000 +0000
+@@ -19,13 +19,15 @@
+
+ #ifdef linux
+ #include <linux/if_tun.h>
+-#define TUNDEV "/dev/net/tun"
++#define TUNINT "tun0"
++#define TUNDEVNODE "/dev/net/tun"
+ #else
+ # include <net/if_tun.h>
++# define TUNINT "NULL?"
+ # if __FreeBSD_version < 500000
+-# define TUNDEV "/dev/tun2"
++# define TUNDEVNODE "/dev/tun2"
+ # else
+-# define TUNDEV "/dev/tun"
++# define TUNDEVNODE "/dev/tun"
+ # endif
+ #endif
+
+@@ -33,127 +35,135 @@
+
+ #define MAXPKT 2000
+
+-#define TAPDEV "/dev/tap0"
++#define TAPINT "tap0"
++#define TAPDEVNODE "/dev/net/tun"
+
+ int tfd = -1, nfd = -1;
+ static char dev[IFNAMSIZ+1];
+
+-static int tun_alloc (const char *path);
++static int tun_alloc (const char * interface, const char * device_node);
++static int tap_alloc (const char * interface, const char * device_node);
++
+ #ifdef linux
+-static int tap_alloc (const char *path);
++static int tuntap_alloc_linux(const char * interface, const char * device_node,
++ int mode);
++#else
++static int tun_alloc_bsd(const char * interface, const char * device_node);
+ #endif
+
+ void
+-open_tuntap(const char *device)
++open_tuntap(const char * interface, const char * device_node, int tun)
+ {
+- int tunerr;
+-#ifdef linux
+- int taperr;
+-#endif
++ int err;
++
++ if (!interface)
++ interface = (tun ? TUNINT : TAPINT);
++
++ if (!device_node)
++ device_node = (tun ? TUNDEVNODE : TAPDEVNODE);
++
++ fprintf(stderr, "Opening %s interface %s at %s... ", tun ? "tun" : "tap",
++ interface, device_node);
++
++ err = (tun ? tun_alloc(interface, device_node) : tap_alloc(interface,
++ device_node));
++
++ if (!err) {
++ fprintf(stderr, "using interface %s\n", dev);
++
++ if (tun)
++ fprintf(stderr, "you will now need to assign an ip and routing to "
++ "this interface\n");
++ else
++ fprintf(stderr, "you will now need to add bridging or other rules "
++ "to this interface\n");
++ return;
++ }
+
+- fprintf(stderr, "Opening tun/tap-device... ");
+- if ((tunerr = tun_alloc(device ? device : TUNDEV))
++ fprintf(stderr, "failed! (%s)\n", strerror(err));
++
++ fprintf(stderr, "Diagnostics: ");
++
++ if (err == EPERM)
++ fprintf(stderr, "you usually have to be root to use nstx.\n");
++ else if (err == ENOENT)
++ fprintf(stderr, "maybe you need kernel support -- did you modprobe "
++ "tap?\n");
++ else if (err == ENODEV)
++ fprintf(stderr, "maybe you need kernel support -- did you modprobe "
++ "tap?\n");
+ #ifdef linux
+- && (taperr = tap_alloc(device ? device : TAPDEV))
++#else
++ else if ((err == EINVAL) && !tun)
++ fprintf(stderr, "tap support is only available under linux\n");
+ #endif
+- ) {
+- fprintf(stderr, "failed!\n"
+- "Diagnostics:\nTun ("TUNDEV"): ");
+- switch (tunerr) {
+- case EPERM:
+- fprintf(stderr, "Permission denied. You usually have to "
+- "be root to use nstx.\n");
+- break;
+- case ENOENT:
+- fprintf(stderr, TUNDEV " not found. Please create /dev/net/ and\n"
+- " mknod /dev/net/tun c 10 200 to use the tun-device\n");
+- break;
+- case ENODEV:
+- fprintf(stderr, "Device not available. Make sure you have "
+- "kernel-support\n for the tun-device. Under linux, you "
+- "need tun.o (Universal tun/tap-device)\n");
+- break;
+- default:
+- perror("Unexpected error");
+- break;
+- }
+- fprintf(stderr, "Tap ("TAPDEV"):\n(only available under linux)\n");
++ else
++ fprintf(stderr, "none, sorry\n");
++
++ exit(EXIT_FAILURE);
++}
++
++int tun_alloc(const char * interface, const char * device_node)
++{
+ #ifdef linux
+- switch (taperr) {
+- case EPERM:
+- fprintf(stderr, "Permission denied. You generally have to "
+- "be root to use nstx.\n");
+- break;
+- case ENOENT:
+- fprintf(stderr, TAPDEV " not found. Please\n"
+- " mknod /dev/tap0 c 36 16 to use the tap-device\n");
+- break;
+- case ENODEV:
+- fprintf(stderr, "Device not available. Make sure you have kernel-support\n"
+- " for the tap-device. Under linux, you need netlink_dev.o and ethertap.o\n");
+- break;
+- default:
+- fprintf(stderr, "Unexpected error: %s\n", strerror(taperr));
+- break;
+- }
++ return tuntap_alloc_linux(interface, device_node, IFF_TUN);
++#else
++ return tun_alloc_bsd(interface, device_node);
+ #endif
+- exit(EXIT_FAILURE);
+- }
+-
+- fprintf(stderr, "using device %s\n"
+- "Please configure this device appropriately (IP, routes, etc.)\n", dev);
+ }
+
+-int
+-tun_alloc (const char *path)
++int tap_alloc(const char * interface, const char * device_node)
+ {
+ #ifdef linux
+- struct ifreq ifr;
++ return tuntap_alloc_linux(interface, device_node, IFF_TAP);
+ #else
+- struct stat st;
++ return EINVAL;
+ #endif
+-
+- if ((tfd = open(path, O_RDWR)) < 0)
+- return errno;
++}
+
+ #ifdef linux
+- memset(&ifr, 0, sizeof(ifr));
++
++int tuntap_alloc_linux(const char * interface, const char * device_node,
++ int mode)
++{
++ struct ifreq ifr;
++
++ if ((tfd = open(device_node, O_RDWR)) < 0)
++ return errno;
++
++ memset(&ifr, 0, sizeof(ifr));
+
+- ifr.ifr_flags = IFF_TUN|IFF_NO_PI;
++ ifr.ifr_flags = mode | IFF_NO_PI;
++ strncpy(ifr.ifr_name, interface, sizeof(ifr.ifr_name));
++ ifr.ifr_name[sizeof(ifr.ifr_name) - 1] = 0;
+
+- if (ioctl(tfd, TUNSETIFF, (void *) &ifr) < 0)
+- {
+- close(tfd);
+- tfd = -1;
+- return errno;
+- }
+- strncpy(dev, ifr.ifr_name, IFNAMSIZ+1);
+-#else
+- fstat(tfd, &st);
+- strncpy(dev, devname(st.st_rdev, S_IFCHR), IFNAMSIZ+1);
+-#endif
++ if (ioctl(tfd, TUNSETIFF, (void *) &ifr) < 0) {
++ close(tfd);
++ tfd = -1;
++ return errno;
++ }
++
++ strncpy(dev, ifr.ifr_name, IFNAMSIZ+1);
+
+- return 0;
++ return 0;
+ }
+
++#else /* bsd */
+
+-#ifdef linux
+-int
+-tap_alloc(const char *path)
++int tun_alloc_bsd(const char * interface, const char * device_node)
+ {
+- char *ptr;
+-
+- if ((tfd = open(path, O_RDWR)) < 0)
++ struct stat st;
++
++ if ((tfd = open(device_node, O_RDWR)) < 0)
+ return errno;
+-
+- if ((ptr = strrchr(path, '/')))
+- strncpy(dev, ptr+1, IFNAMSIZ+1);
+- else
+- strncpy(dev, path, IFNAMSIZ+1);
++
++ fstat(tfd, &st);
++ strncpy(dev, devname(st.st_rdev, S_IFCHR), IFNAMSIZ+1);
+
+ return 0;
+ }
+-#endif
++
++#endif /* linux/bsd */
+
+ void
+ open_ns(const char *ip)
+diff -ru nstx-1.1-beta6.orig/nstxcd.8 nstx-1.1-beta6/nstxcd.8
+--- nstx-1.1-beta6.orig/nstxcd.8 2009-03-16 05:31:24.000000000 +0000
++++ nstx-1.1-beta6/nstxcd.8 2009-03-16 23:16:21.000000000 +0000
+@@ -3,7 +3,7 @@
+ nstxcd \- IP over DNS tunneling client
+
+ .SH SYNOPSIS
+-.B "nstxcd \fIDOMAIN\fR \fIIPADDRESS\fR"
++.B "nstxcd \fIOPTIONS\fR \fIDOMAIN\fR \fIIPADDRESS\fR"
+
+ .SH DESCRIPTION
+ .B nstxcd
+@@ -13,6 +13,14 @@
+ .SH OPTIONS
+ .B nstxcd
+ takes the following options:
++.IP \-I tun/tap interface
++Use this tun/tap interface instead of the default (tun0/tap0)
++.IP \-d tun/tap device node
++Use this tun/tap device node instead of the default (/dev/net/tun on Linux)
++.IP \-t
++Tun mode (default)
++.IP \-T
++Tap mode
+ .IP "domain"
+ The domain that nstxcd will send requests to. This domain must be delegated
+ to a machine that is running nstxd.
+@@ -22,9 +30,9 @@
+ .SH USAGE
+ .Bnstxcd
+ should be run against a domain that has been delegated to a machine running
+-nstxd. It will then take any packets that are sent to the tun0 interface and
+-send them over DNS to the other tunnel endpoint. Responses will appear on
+-the tun0 interface.
++nstxd. It will then take any packets that are sent to the tun/tap interface and
++send them over DNS to the other tunnel endpoint. Responses will appear on the
++tun/tap interface.
+
+ .SH AUTHORS
+
+diff -ru nstx-1.1-beta6.orig/nstxcd.c nstx-1.1-beta6/nstxcd.c
+--- nstx-1.1-beta6.orig/nstxcd.c 2009-03-16 05:31:24.000000000 +0000
++++ nstx-1.1-beta6/nstxcd.c 2009-03-16 23:16:07.000000000 +0000
+@@ -55,25 +55,44 @@
+ static void
+ usage(const char *prog, int code)
+ {
+- fprintf(stderr, "Usage: %s [-d tun-device] <domainname> <dns-server>\n"
+- "Example: %s tun.yomama.com 125.23.53.12\n", prog, prog);
++ fprintf(stderr, "Usage: %s [options] <domainname> <dns-server>\n"
++ "Where options are:\n"
++ "\t-d path (use this tun/tap device node instead of default)\n"
++ "\t-I interface (use this tun/tap interface instead of default)\n"
++#ifdef linux
++ "\t-t (tun mode, default)\n"
++ "\t-T (tap mode)\n"
++#endif
++ "example:\n"
++ "%s tun.yomama.com 125.23.53.12\n", prog, prog);
+ exit(code);
+ }
+
+ int main (int argc, char * argv[]) {
+ struct nstxmsg *msg;
+- const char *device = NULL;
++ const char *interface = NULL;
++ const char *device_node = NULL;
+ int ch;
++ int tun = 1;
+
+ nsid = time(NULL);
+
+ if (argc < 3)
+ usage(argv[0], EX_USAGE);
+
+- while ((ch = getopt(argc, argv, "hd:")) != -1) {
++ while ((ch = getopt(argc, argv, "hd:I:tT")) != -1) {
+ switch (ch) {
++ case 'I':
++ interface = optarg;
++ break;
+ case 'd':
+- device = optarg;
++ device_node = optarg;
++ break;
++ case 't':
++ tun = 1;
++ break;
++ case 'T':
++ tun = 0;
+ break;
+ case 'h':
+ usage(argv[0], 0);
+@@ -85,7 +104,7 @@
+ dns_setsuffix(argv[optind]);
+
+ qsettimeout(10);
+- open_tuntap(device);
++ open_tuntap(interface, device_node, tun);
+ open_ns(argv[optind + 1]);
+
+ for (;;) {
+diff -ru nstx-1.1-beta6.orig/nstxd.8 nstx-1.1-beta6/nstxd.8
+--- nstx-1.1-beta6.orig/nstxd.8 2009-03-16 05:31:24.000000000 +0000
++++ nstx-1.1-beta6/nstxd.8 2009-03-16 23:16:32.000000000 +0000
+@@ -3,7 +3,7 @@
+ nstxd \- IP over DNS tunneling daemon
+
+ .SH SYNOPSIS
+-.B "nstxd \fIOPTION\fR \fIDOMAIN\fR"
++.B "nstxd \fIOPTIONS\fR \fIDOMAIN\fR"
+
+ .SH DESCRIPTION
+ .B nstxd
+@@ -14,8 +14,14 @@
+ .SH OPTIONS
+ .B nstxd
+ takes the following option:
+-.IP \-d tun-device
+-Use this tun device instead of tun0
++.IP \-I tun/tap interface
++Use this tun/tap interface instead of the default (tun0/tap0)
++.IP \-d tun/tap device node
++Use this tun/tap device node instead of the default (/dev/net/tun on linux)
++.IP \-t
++Tun mode (default)
++.IP \-T
++Tap mode
+ .IP \-i ipaddr
+ Bind to this IP address rather than every available address
+ .IP \-C dir
+@@ -33,9 +39,9 @@
+ .SH USAGE
+ A domain should be delegated to the machine that will run nstxd. nstxd should
+ then be run giving that domain as the only argument. nstxd will then listen
+-for requests and translate them into IP packets that will appear on the tun0
+-interface. Packets sent to the tun0 interface will be transferred back to
+-the client as DNS answers.
++for requests and translate them into IP packets that will appear on the given
++tun/tap interface. Packets sent to the tun/tap interface will be transferred
++back to the client as DNS answers.
+
+ .SH AUTHORS
+
+diff -ru nstx-1.1-beta6.orig/nstxd.c nstx-1.1-beta6/nstxd.c
+--- nstx-1.1-beta6.orig/nstxd.c 2009-03-16 05:31:24.000000000 +0000
++++ nstx-1.1-beta6/nstxd.c 2009-03-16 23:15:30.000000000 +0000
+@@ -55,7 +55,12 @@
+ {
+ fprintf (stderr, "usage: %s [options] <domainname>\n"
+ "Where options are:\n"
+- "\t-d tun-device (use this tun/tap device instead of default\n"
++ "\t-d path (use this tun/tap device node instead of default)\n"
++ "\t-I interface (use this tun/tap interface instead of default)\n"
++#ifdef linux
++ "\t-t (tun mode, default)\n"
++ "\t-T (tap mode)\n"
++#endif
+ "\t-i ip.to.bi.nd (bind to port 53 on this IP only)\n"
+ "\t-C dir (chroot() to this directory after initialization)\n"
+ "\t-D (call daemon(3) to detach from terminal)\n"
+@@ -68,13 +73,15 @@
+
+ int main (int argc, char *argv[]) {
+ signed char ch;
+- const char *device = NULL, *dir = NULL;
++ const char *interface = NULL, *dir = NULL;
++ const char *device_node = NULL;
+ in_addr_t bindto = INADDR_ANY;
+ uid_t uid = 0;
+ int daemonize = 0;
+ int logmask = LOG_UPTO(LOG_INFO);
++ int tun = 1;
+
+- while ((ch = getopt(argc, argv, "gDC:u:hd:i:")) != -1) {
++ while ((ch = getopt(argc, argv, "gDC:u:hd:I:i:tT")) != -1) {
+ switch(ch) {
+ case 'i':
+ bindto = inet_addr(optarg);
+@@ -84,8 +91,17 @@
+ exit(EX_USAGE);
+ }
+ break;
++ case 'I':
++ interface = optarg;
++ break;
+ case 'd':
+- device = optarg;
++ device_node = optarg;
++ break;
++ case 't':
++ tun = 1;
++ break;
++ case 'T':
++ tun = 0;
+ break;
+ case 'D':
+ daemonize = 1;
+@@ -121,7 +137,7 @@
+
+ dns_setsuffix(argv[optind]);
+
+- open_tuntap(device);
++ open_tuntap(interface, device_node, tun);
+ open_ns_bind(bindto);
+
+ if (dir) {
+diff -ru nstx-1.1-beta6.orig/nstxfun.h nstx-1.1-beta6/nstxfun.h
+--- nstx-1.1-beta6.orig/nstxfun.h 2009-03-16 05:31:24.000000000 +0000
++++ nstx-1.1-beta6/nstxfun.h 2009-03-16 22:40:44.000000000 +0000
+@@ -52,7 +52,7 @@
+
+ /* DNS */
+
+-void open_tuntap (const char *device);
++void open_tuntap (const char * interface, const char * device_node, int tun);
+ void open_ns (const char *ip);
+ void open_ns_bind(in_addr_t ip);
+
diff --git a/net-misc/nstx/files/nstx-1.1_beta6_01-bind-interface-name.patch b/net-misc/nstx/files/nstx-1.1_beta6_01-bind-interface-name.patch
new file mode 100644
index 000000000000..0d65f0f6d68b
--- /dev/null
+++ b/net-misc/nstx/files/nstx-1.1_beta6_01-bind-interface-name.patch
@@ -0,0 +1,134 @@
+diff -ru nstx-1.1-beta6.tuntap/Makefile nstx-1.1-beta6/Makefile
+--- nstx-1.1-beta6.tuntap/Makefile 2009-03-16 23:22:11.000000000 +0000
++++ nstx-1.1-beta6/Makefile 2009-03-16 23:27:09.000000000 +0000
+@@ -1,9 +1,9 @@
+ CFLAGS += -ggdb -Wall -Werror -Wsign-compare
+
+-NSTXD_SRCS = nstxd.c nstx_encode.c nstx_pstack.c nstx_dns.c nstx_tuntap.c nstx_queue.c
++NSTXD_SRCS = nstxd.c nstx_encode.c nstx_pstack.c nstx_dns.c nstx_tuntap.c nstx_queue.c nstx_util.c
+ NSTXD_OBJS = ${NSTXD_SRCS:.c=.o}
+
+-NSTXCD_SRCS = nstxcd.c nstx_encode.c nstx_pstack.c nstx_dns.c nstx_tuntap.o nstx_queue.c
++NSTXCD_SRCS = nstxcd.c nstx_encode.c nstx_pstack.c nstx_dns.c nstx_tuntap.o nstx_queue.c nstx_util.c
+ NSTXCD_OBJS = ${NSTXCD_SRCS:.c=.o}
+
+ PROGS = nstxd nstxcd
+diff -ru nstx-1.1-beta6.tuntap/nstx_util.c nstx-1.1-beta6/nstx_util.c
+--- nstx-1.1-beta6.tuntap/nstx_util.c 2004-06-27 21:43:34.000000000 +0000
++++ nstx-1.1-beta6/nstx_util.c 2009-03-16 23:28:37.000000000 +0000
+@@ -27,6 +27,10 @@
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
++#include <net/if.h>
++#include <sys/ioctl.h>
++#include <arpa/inet.h>
++#include <errno.h>
+
+ #include "nstxfun.h"
+
+@@ -48,6 +52,48 @@
+ close(fd);
+ }
+
++static int iface_addr(const char * name, in_addr_t * result) {
++ int r, s;
++ struct ifreq ifr;
++ struct sockaddr_in * sin;
++
++ s = socket(AF_INET, SOCK_DGRAM, 0);
++
++ if (s < 0) {
++ perror("socket");
++ return s;
++ }
++
++ strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
++ ifr.ifr_name[sizeof(ifr.ifr_name) - 1] = 0;
++
++ r = ioctl(s, SIOCGIFADDR, &ifr);
++
++ if (r < 0) {
++ perror("ioctl(SIOCGIFADDR)");
++ return r;
++ }
++
++ sin = (struct sockaddr_in *)&ifr.ifr_addr;
++ *result = sin->sin_addr.s_addr;
++
++ if (*result == INADDR_ANY || *result == INADDR_NONE) {
++ fprintf(stderr, "interface %s has no assigned address\n", name);
++ return -EINVAL;
++ }
++
++ return 0;
++}
++
++int addr_convert(const char * s, in_addr_t * result) {
++ *result = inet_addr(s);
++
++ if (*result != INADDR_NONE)
++ return 0;
++
++ return iface_addr(s, result);
++}
++
+ #ifdef WITH_PKTDUMP
+ void
+ pktdump (const char *prefix, unsigned short id, const char *data,
+diff -ru nstx-1.1-beta6.tuntap/nstxd.8 nstx-1.1-beta6/nstxd.8
+--- nstx-1.1-beta6.tuntap/nstxd.8 2009-03-16 23:23:46.000000000 +0000
++++ nstx-1.1-beta6/nstxd.8 2009-03-16 23:29:59.000000000 +0000
+@@ -22,8 +22,8 @@
+ Tun mode (default)
+ .IP \-T
+ Tap mode
+-.IP \-i ipaddr
+-Bind to this IP address rather than every available address
++.IP \-i ipaddr|interface
++Bind to this IP address or interface rather than every available address
+ .IP \-C dir
+ Chroot to this directory on startup
+ .IP \-D
+diff -ru nstx-1.1-beta6.tuntap/nstxd.c nstx-1.1-beta6/nstxd.c
+--- nstx-1.1-beta6.tuntap/nstxd.c 2009-03-16 23:23:46.000000000 +0000
++++ nstx-1.1-beta6/nstxd.c 2009-03-16 23:32:45.000000000 +0000
+@@ -61,7 +61,7 @@
+ "\t-t (tun mode, default)\n"
+ "\t-T (tap mode)\n"
+ #endif
+- "\t-i ip.to.bi.nd (bind to port 53 on this IP only)\n"
++ "\t-i ip|interface (bind to port 53 on this IP/interface only)\n"
+ "\t-C dir (chroot() to this directory after initialization)\n"
+ "\t-D (call daemon(3) to detach from terminal)\n"
+ "\t-g (enable debug messages)\n"
+@@ -80,14 +80,15 @@
+ int daemonize = 0;
+ int logmask = LOG_UPTO(LOG_INFO);
+ int tun = 1;
++ int r;
+
+ while ((ch = getopt(argc, argv, "gDC:u:hd:I:i:tT")) != -1) {
+ switch(ch) {
+ case 'i':
+- bindto = inet_addr(optarg);
+- if (bindto == INADDR_NONE) {
+- fprintf(stderr, "`%s' is not an IP-address\n",
+- optarg);
++ r = addr_convert(optarg, &bindto);
++ if (r < 0) {
++ fprintf(stderr, "couldn't use interface %s: %s\n", optarg,
++ strerror(-r));
+ exit(EX_USAGE);
+ }
+ break;
+diff -ru nstx-1.1-beta6.tuntap/nstxfun.h nstx-1.1-beta6/nstxfun.h
+--- nstx-1.1-beta6.tuntap/nstxfun.h 2009-03-16 23:23:46.000000000 +0000
++++ nstx-1.1-beta6/nstxfun.h 2009-03-16 23:28:37.000000000 +0000
+@@ -102,4 +102,6 @@
+ void pktdump (const char *, unsigned short, const char *, size_t, int);
+ #endif
+
++int addr_convert(const char *, in_addr_t *);
++
+ #endif /* _NSTXHDR_H */
diff --git a/net-misc/nstx/files/nstx-1.1_beta6_02-warn-on-frag.patch b/net-misc/nstx/files/nstx-1.1_beta6_02-warn-on-frag.patch
new file mode 100644
index 000000000000..251ad583150b
--- /dev/null
+++ b/net-misc/nstx/files/nstx-1.1_beta6_02-warn-on-frag.patch
@@ -0,0 +1,22 @@
+Only in nstx-1.1-beta6.orig/: nstx_dns.o
+Only in nstx-1.1-beta6.orig/: nstx_encode.o
+Only in nstx-1.1-beta6.orig/: nstx_pstack.o
+diff -ru nstx-1.1-beta6.orig/nstx_tuntap.c nstx-1.1-beta6/nstx_tuntap.c
+--- nstx-1.1-beta6.orig/nstx_tuntap.c 2009-03-16 23:56:02.000000000 +0000
++++ nstx-1.1-beta6/nstx_tuntap.c 2009-03-17 00:06:00.000000000 +0000
+@@ -274,7 +274,13 @@
+ sendtun(const char *data, size_t len)
+ {
+ // printf("Sent len %d, csum %d\n", len, checksum(data, len));
+- write(tfd, data, len);
++ size_t w = write(tfd, data, len);
++
++ if (w < len) {
++ fprintf(stderr, "packet was descrutively fragmented! (len=%zd, "
++ "wrote=%zd)\n",
++ len, w);
++ }
+ }
+
+ void
+Only in nstx-1.1-beta6.orig/: nstxd.o
diff --git a/net-misc/nstx/files/nstx-1.1_beta6_03-delete-dwrite.patch b/net-misc/nstx/files/nstx-1.1_beta6_03-delete-dwrite.patch
new file mode 100644
index 000000000000..e943fa106b73
--- /dev/null
+++ b/net-misc/nstx/files/nstx-1.1_beta6_03-delete-dwrite.patch
@@ -0,0 +1,18 @@
+diff -ru nstx-1.1-beta6.orig/nstx_util.c nstx-1.1-beta6/nstx_util.c
+--- nstx-1.1-beta6.orig/nstx_util.c 2009-03-17 00:08:18.000000000 +0000
++++ nstx-1.1-beta6/nstx_util.c 2009-03-17 00:08:37.000000000 +0000
+@@ -44,14 +44,6 @@
+ return x;
+ }
+
+-void dwrite (char *path, char *buf, int len) {
+- int fd;
+-
+- fd = open(path, O_RDWR|O_CREAT|O_TRUNC, 0600);
+- write(fd, buf, len);
+- close(fd);
+-}
+-
+ static int iface_addr(const char * name, in_addr_t * result) {
+ int r, s;
+ struct ifreq ifr;
diff --git a/net-misc/nstx/files/nstx-1.1_beta6_04-delete-werror.patch b/net-misc/nstx/files/nstx-1.1_beta6_04-delete-werror.patch
new file mode 100644
index 000000000000..35f7d0199b9d
--- /dev/null
+++ b/net-misc/nstx/files/nstx-1.1_beta6_04-delete-werror.patch
@@ -0,0 +1,9 @@
+diff -ru nstx-1.1-beta6.orig/Makefile nstx-1.1-beta6/Makefile
+--- nstx-1.1-beta6.orig/Makefile 2009-03-17 03:29:43.000000000 +0000
++++ nstx-1.1-beta6/Makefile 2009-03-17 03:29:53.000000000 +0000
+@@ -1,4 +1,4 @@
+-CFLAGS += -ggdb -Wall -Werror -Wsign-compare
++CFLAGS += -ggdb -Wall -Wsign-compare
+
+ NSTXD_SRCS = nstxd.c nstx_encode.c nstx_pstack.c nstx_dns.c nstx_tuntap.c nstx_queue.c nstx_util.c
+ NSTXD_OBJS = ${NSTXD_SRCS:.c=.o}
diff --git a/net-misc/nstx/files/nstx-1.1_beta6_05-respect-ldflags.patch b/net-misc/nstx/files/nstx-1.1_beta6_05-respect-ldflags.patch
new file mode 100644
index 000000000000..47edb029edb9
--- /dev/null
+++ b/net-misc/nstx/files/nstx-1.1_beta6_05-respect-ldflags.patch
@@ -0,0 +1,19 @@
+Respects LDFLAGS
+
+http://bugs.gentoo.org/show_bug.cgi?id=323919
+
+--- nstx-1.1-beta6/Makefile
++++ nstx-1.1-beta6/Makefile
+@@ -11,10 +11,10 @@
+ all: $(PROGS)
+
+ nstxd: $(NSTXD_OBJS)
+- $(CC) $(CFLAGS) -o nstxd $(NSTXD_OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o nstxd $(NSTXD_OBJS)
+
+ nstxcd: $(NSTXCD_OBJS)
+- $(CC) $(CFLAGS) -o nstxcd $(NSTXCD_OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o nstxcd $(NSTXCD_OBJS)
+
+ clean:
+ rm -f *.o $(PROGS) Makefile.bak *~ core
diff --git a/net-misc/nstx/files/nstxcd.conf b/net-misc/nstx/files/nstxcd.conf
new file mode 100644
index 000000000000..a04b9d09571e
--- /dev/null
+++ b/net-misc/nstx/files/nstxcd.conf
@@ -0,0 +1,46 @@
+# /etc/conf.d/nstxcd: config file for /etc/init.d/nstxcd
+
+# DOMAIN is the DNS domain which will be the base for NSTX tunneling. You must
+# set up this domain such that its nameserver points to this machine. For
+# example, if your tunnel domain is "tunnelhere.example.com", the nameserver for
+# example.com should have the following record:
+#
+# tunnelhere.example.com IN NS this.machine.example.com
+#DOMAIN="tunnelhere.example.com"
+
+# Set to "TUN" for TUN (IP/layer-3) mode, or "TAP" for TAP (ethernet/layer-2)
+# mode. You must use the same mode your server is using, or you will send and
+# receive only garbage.
+MODE="TUN"
+
+# This will be the virtual TUN/TAP interface created by nstxcd. If unset,
+# defaults to tun0 or tap0. Note that no IP configuration will be supplied by
+# nstxd -- you must do this yourself using net scripts.
+#TUNTAP_INTERFACE=tun53
+
+# The DNS server where nstxcd will send queries. This is not necessarily the
+# same server as the one where the nstxd server is running. What constitutes a
+# good choice here depends on your situation: if you can send DNS queries to an
+# arbitrary address on the Internet, you could simply point straight to the
+# instance of nstxd, if you know its IP address. If you don't, you might use a
+# public DNS server, like one of the ones hosted by Level3 (4.2.2.1-4.2.2.6),
+# although it is almost certainly better to set up your nstxd server instance
+# with dynamic DNS so you can always find it.
+#
+# If you are constrained to sending DNS queries to a DHCP-provided server on
+# your local LAN, your only choice is to point to that server. This will always
+# work, but may yield limited performance relative to directly talking to nstxd
+# or talking via a high-performance DNS server.
+#
+# If you leave DNS_SERVER unset, the init script will select the first
+# nameserver from resolv.conf. This is the most fault-tolerant configuration.
+#DNS_SERVER=""
+
+# This option contains a space-separated list of interfaces that should be up
+# before we start. It's convenient to put your DHCP-facing address in here, so
+# autodetection of DNS_SERVER from resolv.conf will work.
+#NEED_INTERFACES=""
+
+# Other miscellaneous options to pass to nstxcd (man 7 nstxcd for details)
+#NSTXCD_OPTS=""
+
diff --git a/net-misc/nstx/files/nstxcd.init b/net-misc/nstx/files/nstxcd.init
new file mode 100644
index 000000000000..7315c72f4b93
--- /dev/null
+++ b/net-misc/nstx/files/nstxcd.init
@@ -0,0 +1,104 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# (Written by Phillip Berndt <phillip.berndt at gmail dot com>)
+# (Modified by Steven Brudenell <steven dot brudenell at gmail>)
+# $Id$
+
+depend() {
+ local iface
+
+ for iface in ${NEED_INTERFACES} ; do
+ need net.${iface}
+ done
+
+ # If the user set TUNTAP_INTERFACE, they probably have a net script
+ # configuring that interface. nstxcd is responsible for actually creating
+ # the stupid thing, so we need to run before the config.
+ if [ ! -z ${TUNTAP_INTERFACE} ] ; then
+ if [ -x /etc/init.d/net.${TUNTAP_INTERFACE} ] ; then
+ before net.${TUNTAP_INTERFACE}
+ fi
+ fi
+}
+
+loadtun() {
+ if [ ! -e /dev/net/tun ]
+ then
+ ebegin "Loading TUN/TAP kernel module"
+ modprobe -q tun
+ eend $?
+ fi
+
+ if [ ! -e /dev/net/tun ]
+ then
+ eend 1 "Failed to load TUN driver! (did you compile your kernel with TUN/TAP support?)"
+ return 1
+ fi
+
+ return 0
+}
+
+checkconfig() {
+ if [ -z "${DOMAIN}" ] ; then
+ eerror "DOMAIN must be set"
+ return 1
+ fi
+
+ [ -z "${TUNTAP_INTERFACE}" ] || NSTXCD_OPTS="${NSTXCD_OPTS} -I ${TUNTAP_INTERFACE}"
+ [ -z "${TUNTAP_DEVICE}" ] || NSTXCD_OPTS="${NSTXCD_OPTS} -d ${TUNTAP_DEVICE}"
+
+ case "${MODE}" in
+ TUN)
+ NSTXCD_OPTS="${NSTXCD_OPTS} -t"
+ ;;
+ TAP)
+ NSTXCD_OPTS="${NSTXCD_OPTS} -T"
+ ;;
+ *)
+ eerror "MODE must be either TUN or TAP"
+ return 1
+ ;;
+ esac
+
+ if [ -z "${DNS_SERVER}" ] ; then
+ DNS_SERVER=`awk '/^nameserver/{ print $2; exit; }' /etc/resolv.conf`
+
+ if [ -z "${DNS_SERVER}" ] ; then
+ eerror "DNS_SERVER not set, and couldn't determine a nameserver from /etc/resolv.conf"
+ return 1
+ fi
+ export DNS_SERVER
+ fi
+
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ loadtun || return 1
+
+ ebegin "Starting nstxcd"
+
+ start-stop-daemon \
+ --start \
+ --background \
+ --make-pidfile \
+ --exec /usr/sbin/nstxcd \
+ --pidfile "/var/run/nstxcd.pid" \
+ -- ${NSTXCD_OPTS} ${DOMAIN} ${DNS_SERVER}
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping nstxcd"
+
+ start-stop-daemon \
+ --stop \
+ --exec /usr/sbin/nstxcd \
+ --pidfile "/var/run/nstxcd.pid"
+
+ eend $?
+}
diff --git a/net-misc/nstx/files/nstxd.conf b/net-misc/nstx/files/nstxd.conf
new file mode 100644
index 000000000000..4d3365a7142d
--- /dev/null
+++ b/net-misc/nstx/files/nstxd.conf
@@ -0,0 +1,35 @@
+# /etc/conf.d/nstxd: config file for /etc/init.d/nstxd
+
+# DOMAIN is the DNS domain which will be the base for NSTX tunneling. You must
+# set up this domain such that its nameserver points to this machine. For
+# example, if your tunnel domain is "tunnelhere.example.com", the nameserver for
+# example.com should have the following record:
+#
+# tunnelhere.example.com IN NS this.machine.example.com
+#DOMAIN="tunnelhere.example.com"
+
+# Set to "TUN" for TUN (IP/layer-3) mode, or "TAP" for TAP (ethernet/layer-2)
+# mode. Your clients must run in the same mode, or you will send and receive
+# only garbage.
+MODE="TUN"
+
+# This will be the virtual TUN/TAP interface created by nstxd. If unset,
+# defaults to tun0 or tap0. Note that no IP configuration will be supplied by
+# nstxd -- you must do this yourself using net scripts.
+#TUNTAP_INTERFACE=tun53
+
+# Interface to bind to, instead of binding to all available interfaces. You can
+# supply either an interface name or IP address here. Useful if you run an
+# internal DNS server but want to run NSTX on your external interface. Note that
+# nstxd always binds to port 53.
+#BIND_INTERFACE=eth1
+#BIND_INTERFACE=1.2.3.4
+
+# Chroot to this directory after startup
+#CHROOT=/dev/null
+
+# Drop privileges to this user after startup
+#NSTXD_USER=nstxd
+
+# Other miscellaneous options to pass to nstxd (man 7 nstxd for details)
+#NSTXD_OPTS=""
diff --git a/net-misc/nstx/files/nstxd.init b/net-misc/nstx/files/nstxd.init
new file mode 100644
index 000000000000..ce4bed8377aa
--- /dev/null
+++ b/net-misc/nstx/files/nstxd.init
@@ -0,0 +1,95 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# (Written by Phillip Berndt <phillip.berndt at gmail dot com>)
+# (Modified by Steven Brudenell <steven dot brudenell at gmail>)
+# $Id$
+
+depend() {
+ if [ ! -z "${BIND_INTERFACE}" ] ; then
+ if [ -x /etc/init.d/net.${BIND_INTERFACE} ] ; then
+ need net.${BIND_INTERFACE}
+ fi
+ fi
+
+ # If the user set TUNTAP_INTERFACE, they probably have a net script
+ # configuring that interface. nstxcd is responsible for actually creating
+ # the stupid thing, so we need to run before the config.
+ if [ ! -z "${TUNTAP_INTERFACE}" ] ; then
+ if [ -x /etc/init.d/net.${TUNTAP_INTERFACE} ] ; then
+ before net.${TUNTAP_INTERFACE}
+ fi
+ fi
+}
+
+loadtun() {
+ if [ ! -e /dev/net/tun ]
+ then
+ ebegin "Loading TUN/TAP kernel module"
+ modprobe -q tun
+ eend $?
+ fi
+
+ if [ ! -e /dev/net/tun ]
+ then
+ eend 1 "Failed to load TUN driver! (did you compile your kernel with TUN/TAP support?)"
+ return 1
+ fi
+
+ return 0
+}
+
+checkconfig() {
+ if [ -z "${DOMAIN}" ] ; then
+ eerror "DOMAIN must be set"
+ return 1
+ fi
+
+ [ -z "${TUNTAP_INTERFACE}" ] || NSTXD_OPTS="${NSTXD_OPTS} -I ${TUNTAP_INTERFACE}"
+ [ -z "${TUNTAP_DEVICE}" ] || NSTXD_OPTS="${NSTXD_OPTS} -d ${TUNTAP_DEVICE}"
+ [ -z "${BIND_INTERFACE}" ] || NSTXD_OPTS="${NSTXD_OPTS} -i ${BIND_INTERFACE}"
+ [ -z "${CHROOT}" ] || NSTXD_OPTS="${NSTXD_OPTS} -C ${CHROOT}"
+ [ -z "${NSTXD_USER}" ] || NSTXD_OPTS="${NSTXD_OPTS} -u ${NSTXD_USER}"
+
+ case "${MODE}" in
+ TUN)
+ NSTXD_OPTS="${NSTXD_OPTS} -t"
+ ;;
+ TAP)
+ NSTXD_OPTS="${NSTXD_OPTS} -T"
+ ;;
+ *)
+ eerror "MODE must be either TUN or TAP"
+ return 1
+ ;;
+ esac
+}
+
+start() {
+ checkconfig || return 1
+
+ loadtun || return 1
+
+ ebegin "Starting nstxd"
+
+ start-stop-daemon \
+ --start \
+ --background \
+ --make-pidfile \
+ --exec /usr/sbin/nstxd \
+ --pidfile "/var/run/nstxd.pid" \
+ -- ${NSTXD_OPTS} ${DOMAIN}
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping nstxd"
+
+ start-stop-daemon \
+ --stop \
+ --exec /usr/sbin/nstxd \
+ --pidfile "/var/run/nstxd.pid"
+
+ eend $?
+}
diff --git a/net-misc/nstx/metadata.xml b/net-misc/nstx/metadata.xml
new file mode 100644
index 000000000000..c6d862855eb5
--- /dev/null
+++ b/net-misc/nstx/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-misc/nstx/nstx-1.1_beta6-r3.ebuild b/net-misc/nstx/nstx-1.1_beta6-r3.ebuild
new file mode 100644
index 000000000000..0dd62c409e92
--- /dev/null
+++ b/net-misc/nstx/nstx-1.1_beta6-r3.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit versionator toolchain-funcs eutils linux-info
+
+MY_PV=$(replace_version_separator 2 - "${PV}")
+MY_P="${PN}-${MY_PV}"
+DEBIAN_PV="5"
+DEBIAN_A="${PN}_${MY_PV}-${DEBIAN_PV}.diff.gz"
+
+DESCRIPTION="IP over DNS tunnel"
+SRC_URI="http://dereference.de/nstx/${MY_P}.tgz
+ mirror://debian/pool/main/${PN:0:1}/${PN}/${DEBIAN_A}"
+HOMEPAGE="http://dereference.de/nstx/"
+DEPEND="virtual/os-headers"
+KEYWORDS="amd64 x86"
+IUSE=""
+LICENSE="GPL-2"
+SLOT="0"
+S="${WORKDIR}/${MY_P}"
+
+CONFIG_CHECK="~TUN"
+
+src_unpack() {
+ unpack "${MY_P}.tgz"
+ epatch "${DISTDIR}"/${DEBIAN_A} \
+ "${FILESDIR}"/${PN}-1.1_beta6_00-linux-tuntap.patch \
+ "${FILESDIR}"/${PN}-1.1_beta6_01-bind-interface-name.patch \
+ "${FILESDIR}"/${PN}-1.1_beta6_02-warn-on-frag.patch \
+ "${FILESDIR}"/${PN}-1.1_beta6_03-delete-dwrite.patch \
+ "${FILESDIR}"/${PN}-1.1_beta6_04-delete-werror.patch \
+ "${FILESDIR}"/${PN}-1.1_beta6_05-respect-ldflags.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die
+}
+
+src_install() {
+ into /usr
+ dosbin nstxcd nstxd || die
+ dodoc README Changelog || die
+ doman *.8 || die
+
+ newinitd "${FILESDIR}"/nstxd.init nstxd
+ newconfd "${FILESDIR}"/nstxd.conf nstxd
+ newinitd "${FILESDIR}"/nstxcd.init nstxcd
+ newconfd "${FILESDIR}"/nstxcd.conf nstxcd
+}
+
+pkg_postinst() {
+ einfo "Please read the documentation provided in"
+ einfo " `find /usr/share/doc/${PF}/ -name 'README*'`"
+}
diff --git a/net-misc/ntp/Manifest b/net-misc/ntp/Manifest
new file mode 100644
index 000000000000..da5183400991
--- /dev/null
+++ b/net-misc/ntp/Manifest
@@ -0,0 +1,8 @@
+DIST ntp-4.2.6p5-manpages.tar.bz2 47874 SHA256 f49203cba2301ce27a53113a6e22d844b258114604f2c9ee1371833babc70f9c SHA512 57d4b8fc4482a41c6595418ebff1a861d4bd7ee175b13cf5580a5915749a096b3a906ca8ddf9fc9c57ead783df22b7b9326b51bbab9cd8340576413bee3e7f84 WHIRLPOOL 83c2d95fe953ab2cd7729bc03d89e44a2de85cb68b4ec72c123a034846866aebf7b83eeb4e45add6aa1443f2de83bfbb1ecdbb437534d827d1e1a4a08f91cfd4
+DIST ntp-4.2.6p5.tar.gz 4202539 SHA256 d6ab8371f9d31e594eb6922823d5ccd03dcc4e9d84b0e23ea25ac1405432f91c SHA512 8d76fc7e92b2ea6dd5031e6030a7aba4ff6fb3e19d3bc0153852509861be5d0960e70604814163caedb81f8315a451d78371f99634a50b55cfe1cbd2c69e3046 WHIRLPOOL 9943706ad02e377cb38d65caed6f675d37db7aa53dd86319b17405791494bf11244ac933867516cca9438947202b595b6606088a8aaa436655f9eeb8d078b77e
+DIST ntp-4.2.8-manpages.tar.bz2 46542 SHA256 9c68840456c7002796baea70231e6cf7f6bc06583bbab370a09f837a66f2c409 SHA512 a87db65da978fcaf123763a6de59a399a3c799d59374acd1c397d7a7816e6ee2ff6091f24ff41223cf719effd2e595dfa7699006a724d2908d380c6098603d28 WHIRLPOOL cb0e53cc0132573d6b2910301c1d7743874598b1487968ec9e49f467a8aa62340609379c8cffb42da2694703955581629aa78897a9319f71b3589600e882b9b0
+DIST ntp-4.2.8.tar.gz 6750364 SHA256 2e920df8b6a5a410567a73767fa458c00c7f0acec3213e69ed0134414a50d8ee SHA512 d69ed02e57c66d5c57616bb5e4be0d58e7410dd27ea96acaed6e8b63726a37cd22ae73e8bdff089abbe8e19bcd8bee05733ab362249018fc495fcedc71aa3a44 WHIRLPOOL 4bfe1222c250425e3fc229649d1d4ae11fa6a32eb03f9d15b95575ee31171761321730c83d6e283551fc89647370a86791ec1c262c49826b31106d4317fb64e1
+DIST ntp-4.2.8p2-manpages.tar.bz2 46421 SHA256 c22f74e0361e5eb921e495ff0f1b8987c26d90db72393dfb307f68498d6501e8 SHA512 8b211e891e96006ba4fa054fe5f111ae5b52cc4b990d4bbe691fd0724f6373ec54428fc39ea0cffc8fe66f757d6f99355ac69f3dc76ad43f8f95c145f3adee9c WHIRLPOOL f1b85c4e39934d308dbaaca1b22779e33c18489abfd9e17ad26368462032445d164a2dbb96fa9865128bc138ce8f8f8790d9eeffc0c37339ed5eafa0ee687a72
+DIST ntp-4.2.8p2.tar.gz 6820869 SHA256 0d69bc0e95caad43ea04fdad410e756bae1a71e67b1c2bd799b76b55e04c9b31 SHA512 7b39e4d8a362afd37dc57a742841fadcd4634bb1d21d59d72d484b759a867d82b90d8c77e6e104c73ec8690489b80b0f9e2e86e4dfcfa34a49621cee3dee16d0 WHIRLPOOL 70d63c895a62bcd790760e6205d6b666ab47dfc9fc8737f10d1cd7d4a2c3cafb4efe6b8141570921c5024e71b00ebca73574562694678f448ee7680a982a0084
+DIST ntp-4.2.8p3-manpages.tar.bz2 46419 SHA256 83f9641e52fd79ac8bd76f7d62214591389f97fed5200e8b5d85aa31070f9112 SHA512 1d15c63f5c88e0b45f5de3a35042fde9a3a01413ab460f553124ad996832b46c72212070ccbefc0e70aef8ffe4c634b7424e06ac31f62cd921a3df13b3746d6b WHIRLPOOL 92aa9cebe97454e1d7d1533546bee131795ab6f28538b0326423afbca10b83fadc8693c8148de08d7d7bed0773d462d204632ba38e16a4c442b1bae10094a501
+DIST ntp-4.2.8p3.tar.gz 7099575 SHA256 818ca4f2ed6ca845b1c5ec43f5e6ad905eaa0fc0aab2d509ed6b962a37fbf38f SHA512 5a628f72e900ac8c8a4754bc9620e6511f68035b3a1e1108d619b1beab307d3f6c9f5dad4f3ca3f4e252d0e7e3bf48900044df2934aa87df1f699316db5e9598 WHIRLPOOL 4d66c9403b0bf8b4a9b297bd13974f88bcdc3f524bede0e633f7ee17b688bdd60dcc4e8a23fa7a4efd82540fab515df0b40c140edbefd1bb51352edd06b08d2d
diff --git a/net-misc/ntp/files/man-pages/genmans.sh b/net-misc/ntp/files/man-pages/genmans.sh
new file mode 100755
index 000000000000..bae21e265f90
--- /dev/null
+++ b/net-misc/ntp/files/man-pages/genmans.sh
@@ -0,0 +1,75 @@
+#!/bin/bash
+#
+# ntpman.sh -- Create man pages for ntp
+#
+
+VERSION=$1
+if [[ -z ${VERSION} ]] ; then
+ VERSION=$(ls -1d ntp-*/ 2>/dev/null | LC_COLLATE=C sort | sed -n '${s:/::;p;Q}')
+ if [[ -z ${VERSION} ]] ; then
+ VERSION=$(ls "${0%/*}"/../../ntp-*.ebuild | LC_COLLATE=C sort | sed -n '${s:.*/::;s:_::;s:[.]ebuild::;p;Q}')
+ if [[ -z ${VERSION} ]] ; then
+ echo "Usage: $0 <version>"
+ exit 1
+ fi
+ fi
+fi
+[[ ${VERSION} != ntp-* ]] && VERSION="ntp-${VERSION}"
+
+SRCDIR=${0%/*}
+HTMLDIR=${SRCDIR}/${VERSION}/html
+DISTFILE=/usr/portage/distfiles/${VERSION}.tar.gz
+MANDIR=${SRCDIR}/man
+
+rm -rf ${SRCDIR}/${VERSION}
+if [[ ! -d ${HTMLDIR} ]] ; then
+ if [[ -f ${DISTFILE} ]] ; then
+ tar zxf ${DISTFILE} -C ${SRCDIR} || exit 1
+ else
+ echo "ERROR: $HTMLDIR / $DISTFILE does not exist"
+ exit 1
+ fi
+fi
+
+# Process a single HTML file
+processfile() {
+ HTMLFILE=$1
+ MANFILE=$2
+ echo -n "Processing $HTMLFILE ..."
+ sed -e "s:<csobj.*<:csobj>/:" $HTMLDIR/$HTMLFILE > .$HTMLFILE
+ xsltproc --html --stringparam version $VERSION ${SRCDIR}/ntp.xsl .$HTMLFILE > $MANDIR/$MANFILE || exit 1
+ rm -f .$HTMLFILE
+ echo "Done."
+}
+
+# Print information
+echo "Generates ntp man files from HTML documentation. Using:"
+echo "VERSION: $VERSION"
+echo "HTMLDIR: $HTMLDIR"
+echo "MANDIR: $MANDIR"
+echo "Press enter to continue, or Ctrl-C to cancel."
+read
+
+# Process HTML files
+rm -rf ${MANDIR}
+mkdir ${MANDIR}
+for f in ntp{date,dc,d,q,time,trace,dsim} keygen tickadj ; do
+ processfile ${f}.html ${f}.8
+done
+echo
+
+cp -vi /usr/local/src/freebsd/src/usr.sbin/ntp/doc/*.5 ${MANDIR}
+(
+d=${PWD}
+cd ${MANDIR}
+shopt -s nullglob
+for p in $d/*.5.patch ; do
+ patch -F0 -p0 < $p || exit 1
+done
+) || exit 1
+cp -vi ${SRCDIR}/*.patch ${SRCDIR}/genmans.sh ${SRCDIR}/ntp.xsl ${MANDIR}
+
+tar -jcf ${VERSION}-manpages.tar.bz2 -C ${MANDIR}/.. man
+du -b ${VERSION}-manpages.tar.bz2
+
+rm -rf ${MANDIR} ${SRCDIR}/${VERSION}
diff --git a/net-misc/ntp/files/man-pages/ntp.conf.5.patch b/net-misc/ntp/files/man-pages/ntp.conf.5.patch
new file mode 100644
index 000000000000..c3d812302297
--- /dev/null
+++ b/net-misc/ntp/files/man-pages/ntp.conf.5.patch
@@ -0,0 +1,27 @@
+--- ntp.conf.5
++++ ntp.conf.5
+@@ -24,16 +24,6 @@
+ .Fl c
+ command line option).
+ .Pp
+-The
+-.Pa /etc/rc.d/ntpdate
+-script reads this file to get a list of NTP servers to use if the
+-variable
+-.Dq Li ntpdate_hosts
+-was not declared.
+-Refer to the
+-.Xr rc.conf 5
+-man page for further info about this.
+-.Pp
+ The file format is similar to other
+ .Ux
+ configuration files.
+@@ -2686,7 +2676,6 @@
+ Diffie-Hellman agreement parameters
+ .El
+ .Sh SEE ALSO
+-.Xr rc.conf 5 ,
+ .Xr ntpd 8 ,
+ .Xr ntpdc 8 ,
+ .Xr ntpq 8
diff --git a/net-misc/ntp/files/man-pages/ntp.xsl b/net-misc/ntp/files/man-pages/ntp.xsl
new file mode 100644
index 000000000000..ed9c1f8b8e51
--- /dev/null
+++ b/net-misc/ntp/files/man-pages/ntp.xsl
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!--
+Description:
+ Stylesheet for converting the HTML documentation
+ for various ntp commands into proper manual pages
+ (in troff format).
+
+Author:
+ Per Cederberg, <per at percederberg dot net>
+-->
+
+<!DOCTYPE stylesheet [
+<!ENTITY newline "
+">
+]>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+ <!-- ### INPUT PARAMETERS ### -->
+ <xsl:param name="version" select="''" />
+
+
+ <!-- ### OUTPUT DECLARATION ### -->
+ <xsl:output method="text"
+ encoding="ISO-8859-1" />
+
+ <xsl:strip-space elements="html" />
+
+
+ <!-- ### TEMPLATES ### -->
+ <xsl:template match="/">
+ <xsl:text>.\" Automatically generated from HTML source. </xsl:text>
+ <xsl:text>DO NOT EDIT!&newline;</xsl:text>
+ <xsl:apply-templates />
+ </xsl:template>
+
+ <xsl:template match="head">
+ <xsl:text>.TH </xsl:text>
+ <xsl:value-of select="substring-before(title, ' ')" />
+ <xsl:text> 1 "" "ntp </xsl:text>
+ <xsl:value-of select="$version" />
+ <xsl:text>"</xsl:text>
+ <xsl:text>&newline;</xsl:text>
+ <xsl:text>.SH NAME</xsl:text>
+ <xsl:text>&newline;</xsl:text>
+ <xsl:value-of select="title" />
+ <xsl:text>&newline;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="body">
+ <xsl:apply-templates select="*[preceding-sibling::hr]" />
+ </xsl:template>
+
+ <xsl:template match="h3">
+ </xsl:template>
+
+ <xsl:template match="h4">
+ <xsl:variable name="text">
+ <xsl:call-template name="stringToUpper">
+ <xsl:with-param name="str" select="." />
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="name(preceding-sibling::*[1]) = 'tt'">
+ <xsl:text>&newline;</xsl:text>
+ </xsl:if>
+ <xsl:text>.SH </xsl:text>
+ <xsl:value-of select="$text" />
+ <xsl:text>&newline;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="address">
+ <xsl:text>.SH AUTHOR</xsl:text>
+ <xsl:text>&newline;</xsl:text>
+ <xsl:apply-templates />
+ </xsl:template>
+
+ <xsl:template match="p">
+ <xsl:variable name="text">
+ <xsl:apply-templates />
+ </xsl:variable>
+ <xsl:if test="starts-with($text, 'Disclaimer:')">
+ <xsl:text>&newline;</xsl:text>
+ </xsl:if>
+ <xsl:text>.P</xsl:text>
+ <xsl:text>&newline;</xsl:text>
+ <xsl:value-of select="$text" />
+ <xsl:text>&newline;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="dd/p">
+ <xsl:text>&newline;</xsl:text>
+ <xsl:text>&newline;</xsl:text>
+ <xsl:apply-templates />
+ </xsl:template>
+
+ <xsl:template match="hr">
+ </xsl:template>
+
+ <xsl:template match="pre">
+ <xsl:text>&newline;</xsl:text>
+ <xsl:text>.ft CW</xsl:text>
+ <xsl:text>&newline;</xsl:text>
+ <xsl:text>.nf</xsl:text>
+ <xsl:text>&newline;</xsl:text>
+ <xsl:call-template name="trim-newlines">
+ <xsl:with-param name="str" select="." />
+ </xsl:call-template>
+ <xsl:text>&newline;</xsl:text>
+ <xsl:text>.ft R</xsl:text>
+ <xsl:text>&newline;</xsl:text>
+ <xsl:text>.fi</xsl:text>
+ <xsl:text>&newline;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="ul">
+ </xsl:template>
+
+ <xsl:template match="nobr">
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates />
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="dl">
+ <xsl:apply-templates />
+ </xsl:template>
+
+ <xsl:template match="dt">
+ <xsl:text>.TP&newline;</xsl:text>
+ <xsl:text>.B </xsl:text>
+ <xsl:value-of select="normalize-space(.)" />
+ <xsl:text>&newline;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="dd">
+ <xsl:apply-templates />
+ <xsl:text>&newline;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="tr">
+ <xsl:if test="position() &gt; 1">
+ <xsl:apply-templates />
+ <xsl:text>&newline;</xsl:text>
+ <xsl:text>&newline;</xsl:text>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="tt">
+ <xsl:text>&newline;</xsl:text>
+ <xsl:text>\fB</xsl:text>
+ <xsl:apply-templates />
+ <xsl:text>\fR </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="i">
+ <xsl:text>&newline;</xsl:text>
+ <xsl:text>\fI</xsl:text>
+ <xsl:apply-templates />
+ <xsl:text>\fR </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="a">
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates />
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
+ <xsl:template match="br">
+ <xsl:text>&newline;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="text()">
+ <xsl:value-of select="normalize-space(.)" />
+ </xsl:template>
+
+
+ <!-- ### HELPER FUNCTIONS ### -->
+ <xsl:template name="stringToUpper">
+ <xsl:param name="str" />
+ <xsl:value-of select="translate($str,
+ 'abcdefghijklmnopqrstuvwxyz',
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')" />
+ </xsl:template>
+
+ <xsl:template name="trim-newlines">
+ <xsl:param name="str" />
+ <xsl:choose>
+ <xsl:when test="starts-with($str,'&newline;')">
+ <xsl:call-template name="trim-newlines">
+ <xsl:with-param name="str" select="substring($str, 2)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="trim-newlines-tail">
+ <xsl:with-param name="str" select="$str" />
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="trim-newlines-tail">
+ <xsl:param name="str" />
+ <xsl:variable name="len" select="string-length($str)" />
+ <xsl:choose>
+ <xsl:when test="substring($str,$len) = '&newline;'">
+ <xsl:call-template name="trim-newlines-tail">
+ <xsl:with-param name="str" select="substring($str, 1, $len - 1)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$str" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+</xsl:stylesheet>
diff --git a/net-misc/ntp/files/ntp-4.2.4_p5-adjtimex.patch b/net-misc/ntp/files/ntp-4.2.4_p5-adjtimex.patch
new file mode 100644
index 000000000000..40625fa18fb3
--- /dev/null
+++ b/net-misc/ntp/files/ntp-4.2.4_p5-adjtimex.patch
@@ -0,0 +1,33 @@
+https://support.ntp.org/bugs/show_bug.cgi?id=769
+http://bugs.gentoo.org/254030
+
+--- ntp/util/tickadj.c
++++ ntp/util/tickadj.c
+@@ -21,7 +21,8 @@
+ # include <unistd.h>
+ #endif /* HAVE_UNISTD_H */
+
+-#ifdef HAVE___ADJTIMEX /* Linux */
++/* proper handling here has been moved to upstream ntp bugzilla */
++#ifdef linux
+
+ #include <sys/timex.h>
+ struct timex txc;
+@@ -91,7 +92,7 @@
+ }
+
+ if (!errflg) {
+- if (__adjtimex(&txc) < 0)
++ if (adjtimex(&txc) < 0)
+ perror("adjtimex");
+ else if (!quiet)
+ printf("tick = %ld\ntick_adj = %d\n",
+@@ -146,7 +147,7 @@
+ #endif
+ }
+
+- if (__adjtimex(&txc) < 0)
++ if (adjtimex(&txc) < 0)
+ {
+ perror("adjtimex");
+ }
diff --git a/net-misc/ntp/files/ntp-4.2.4_p7-nano.patch b/net-misc/ntp/files/ntp-4.2.4_p7-nano.patch
new file mode 100644
index 000000000000..b31ea0adcb93
--- /dev/null
+++ b/net-misc/ntp/files/ntp-4.2.4_p7-nano.patch
@@ -0,0 +1,20 @@
+http://bugs.gentoo.org/270483
+
+ripped from fedora
+
+--- ntp-4.2.4p7/include/ntp_syscall.h
++++ ntp-4.2.4p7/include/ntp_syscall.h
+@@ -14,5 +14,13 @@
+ # include <sys/timex.h>
+ #endif
+
++#if defined(ADJ_NANO) && !defined(MOD_NANO)
++#define MOD_NANO ADJ_NANO
++#endif
++
++#if defined(ADJ_TAI) && !defined(MOD_TAI)
++#define MOD_TAI ADJ_TAI
++#endif
++
+ #ifndef NTP_SYSCALLS_LIBC
+ #ifdef NTP_SYSCALLS_STD
diff --git a/net-misc/ntp/files/ntp-4.2.8-ipc-caps.patch b/net-misc/ntp/files/ntp-4.2.8-ipc-caps.patch
new file mode 100644
index 000000000000..a1e558052dfa
--- /dev/null
+++ b/net-misc/ntp/files/ntp-4.2.8-ipc-caps.patch
@@ -0,0 +1,16 @@
+http://bugs.ntp.org/show_bug.cgi?id=2646
+https://bugs.gentoo.org/533966
+
+--- a/ntpd/ntpd.c
++++ a/ntpd/ntpd.c
+@@ -971,8 +971,8 @@ getgroup:
+ char *captext;
+
+ captext = (0 != interface_interval)
+- ? "cap_sys_time,cap_net_bind_service=pe"
+- : "cap_sys_time=pe";
++ ? "cap_ipc_lock,cap_sys_time,cap_net_bind_service=pe"
++ : "cap_ipc_lock,cap_sys_time=pe";
+ caps = cap_from_text(captext);
+ if (!caps) {
+ msyslog(LOG_ERR,
diff --git a/net-misc/ntp/files/ntp-4.2.8-ntp-keygen-no-openssl.patch b/net-misc/ntp/files/ntp-4.2.8-ntp-keygen-no-openssl.patch
new file mode 100644
index 000000000000..bfed86c3cb4d
--- /dev/null
+++ b/net-misc/ntp/files/ntp-4.2.8-ntp-keygen-no-openssl.patch
@@ -0,0 +1,164 @@
+Fix ntp-keygen build without OpenSSL
+
+Upstream commit:
+http://bk1.ntp.org/ntp-stable/?PAGE=patch&REV=5497b345z5MNTuNvJWuqPSje25NQTg
+Gentoo bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=533238
+
+Signed-off-by: Markos Chandras <hwoarang@gentoo.org>
+Index: ntp-4.2.8/Makefile.am
+===================================================================
+--- ntp-4.2.8.orig/Makefile.am
++++ ntp-4.2.8/Makefile.am
+@@ -2,7 +2,10 @@ ACLOCAL_AMFLAGS = -I sntp/m4 -I sntp/lib
+
+ NULL =
+
++# moved sntp first to get libtool and libevent built.
++
+ SUBDIRS = \
++ sntp \
+ scripts \
+ include \
+ libntp \
+@@ -17,7 +20,6 @@ SUBDIRS = \
+ clockstuff \
+ kernel \
+ util \
+- sntp \
+ tests \
+ $(NULL)
+
+@@ -64,7 +66,6 @@ BUILT_SOURCES = \
+ .gcc-warning \
+ libtool \
+ html/.datecheck \
+- sntp/built-sources-only \
+ $(srcdir)/COPYRIGHT \
+ $(srcdir)/.checkChangeLog \
+ $(NULL)
+Index: ntp-4.2.8/configure.ac
+===================================================================
+--- ntp-4.2.8.orig/configure.ac
++++ ntp-4.2.8/configure.ac
+@@ -102,7 +102,7 @@ esac
+ enable_nls=no
+ LIBOPTS_CHECK_NOBUILD([sntp/libopts])
+
+-NTP_ENABLE_LOCAL_LIBEVENT
++NTP_LIBEVENT_CHECK_NOBUILD([2], [sntp/libevent])
+
+ NTP_LIBNTP
+
+@@ -771,6 +771,10 @@ esac
+
+ ####
+
++AC_CHECK_FUNCS([arc4random_buf])
++
++####
++
+ saved_LIBS="$LIBS"
+ LIBS="$LIBS $LDADD_LIBNTP"
+ AC_CHECK_FUNCS([daemon])
+Index: ntp-4.2.8/libntp/ntp_crypto_rnd.c
+===================================================================
+--- ntp-4.2.8.orig/libntp/ntp_crypto_rnd.c
++++ ntp-4.2.8/libntp/ntp_crypto_rnd.c
+@@ -24,6 +24,21 @@
+ int crypto_rand_init = 0;
+ #endif
+
++#ifndef HAVE_ARC4RANDOM_BUF
++static void
++arc4random_buf(void *buf, size_t nbytes);
++
++void
++evutil_secure_rng_get_bytes(void *buf, size_t nbytes);
++
++static void
++arc4random_buf(void *buf, size_t nbytes)
++{
++ evutil_secure_rng_get_bytes(buf, nbytes);
++ return;
++}
++#endif
++
+ /*
+ * As of late 2014, here's how we plan to provide cryptographic-quality
+ * random numbers:
+Index: ntp-4.2.8/sntp/configure.ac
+===================================================================
+--- ntp-4.2.8.orig/sntp/configure.ac
++++ ntp-4.2.8/sntp/configure.ac
+@@ -97,11 +97,14 @@ esac
+ enable_nls=no
+ LIBOPTS_CHECK
+
+-AM_COND_IF(
+- [BUILD_SNTP],
+- [NTP_LIBEVENT_CHECK],
+- [NTP_LIBEVENT_CHECK_NOBUILD]
+-)
++# From when we only used libevent for sntp:
++#AM_COND_IF(
++# [BUILD_SNTP],
++# [NTP_LIBEVENT_CHECK],
++# [NTP_LIBEVENT_CHECK_NOBUILD]
++#)
++
++NTP_LIBEVENT_CHECK([2])
+
+ # Checks for libraries.
+
+Index: ntp-4.2.8/sntp/m4/ntp_libevent.m4
+===================================================================
+--- ntp-4.2.8.orig/sntp/m4/ntp_libevent.m4
++++ ntp-4.2.8/sntp/m4/ntp_libevent.m4
+@@ -1,4 +1,25 @@
+-dnl NTP_ENABLE_LOCAL_LIBEVENT -*- Autoconf -*-
++# SYNOPSIS -*- Autoconf -*-
++#
++# NTP_ENABLE_LOCAL_LIBEVENT
++# NTP_LIBEVENT_CHECK([MINVERSION [, DIR]])
++# NTP_LIBEVENT_CHECK_NOBUILD([MINVERSION [, DIR]])
++#
++# DESCRIPTION
++#
++# AUTHOR
++#
++# Harlan Stenn
++#
++# LICENSE
++#
++# This file is Copyright (c) 2014 Network Time Foundation
++#
++# Copying and distribution of this file, with or without modification, are
++# permitted in any medium without royalty provided the copyright notice,
++# author attribution and this notice are preserved. This file is offered
++# as-is, without any warranty.
++
++dnl NTP_ENABLE_LOCAL_LIBEVENT
+ dnl
+ dnl Provide only the --enable-local-libevent command-line option.
+ dnl
+@@ -29,7 +50,7 @@ dnl If NOBUILD is provided as the 3rd ar
+ dnl but DO NOT invoke DIR/configure if we are going to use our bundled
+ dnl version. This may be the case for nested packages.
+ dnl
+-dnl provide --enable-local-libevent .
++dnl provides --enable-local-libevent .
+ dnl
+ dnl Examples:
+ dnl
+Index: ntp-4.2.8/util/Makefile.am
+===================================================================
+--- ntp-4.2.8.orig/util/Makefile.am
++++ ntp-4.2.8/util/Makefile.am
+@@ -19,6 +19,7 @@ AM_LDFLAGS = $(LDFLAGS_NTP)
+ LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
+ tg2_LDADD= ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
+ ntp_keygen_LDADD = version.o $(LIBOPTS_LDADD) ../libntp/libntp.a
++ntp_keygen_LDADD += $(LDADD_LIBEVENT)
+ ntp_keygen_LDADD += $(LDADD_LIBNTP) $(PTHREAD_LIBS) $(LDADD_NTP) $(LIBM)
+ ntp_keygen_SOURCES = ntp-keygen.c ntp-keygen-opts.c ntp-keygen-opts.h
+
diff --git a/net-misc/ntp/files/ntp-client.confd b/net-misc/ntp/files/ntp-client.confd
new file mode 100644
index 000000000000..786004da83b7
--- /dev/null
+++ b/net-misc/ntp/files/ntp-client.confd
@@ -0,0 +1,21 @@
+# /etc/conf.d/ntp-client
+
+# Command to run to set the clock initially
+# Most people should just leave this line alone ...
+# however, if you know what you're doing, and you
+# want to use ntpd to set the clock, change this to 'ntpd'
+NTPCLIENT_CMD="ntpdate"
+
+# Options to pass to the above command
+# This default setting should work fine but you should
+# change the default 'pool.ntp.org' to something closer
+# to your machine. See http://www.pool.ntp.org/ or
+# try running `netselect -s 3 pool.ntp.org`.
+NTPCLIENT_OPTS="-s -b -u \
+ 0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org \
+ 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
+
+# If you use hostnames above, then you should depend on dns
+# being up & running before we try to run. Otherwise, you
+# can disable this.
+rc_use="dns"
diff --git a/net-misc/ntp/files/ntp-client.rc b/net-misc/ntp/files/ntp-client.rc
new file mode 100644
index 000000000000..451bb3ec7c15
--- /dev/null
+++ b/net-misc/ntp/files/ntp-client.rc
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ before cron portmap
+ after net
+ use dns logger
+}
+
+checkconfig() {
+ if ! type "${NTPCLIENT_CMD}" >/dev/null 2>&1 ; then
+ eerror "Please edit /etc/conf.d/ntp-client"
+ eerror "Unable to locate the client command ${NTPCLIENT_CMD}!"
+ return 1
+ fi
+ if [ -z "${NTPCLIENT_OPTS}" ] ; then
+ eerror "Please edit /etc/conf.d/ntp-client"
+ eerror "I need to know what server/options to use!"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Setting clock via the NTP client '${NTPCLIENT_CMD}'"
+ "${NTPCLIENT_CMD}" ${NTPCLIENT_OPTS}
+ eend $? "Failed to set clock"
+}
diff --git a/net-misc/ntp/files/ntp.conf b/net-misc/ntp/files/ntp.conf
new file mode 100644
index 000000000000..97bed8dd13cd
--- /dev/null
+++ b/net-misc/ntp/files/ntp.conf
@@ -0,0 +1,54 @@
+# NOTES:
+# DHCP clients can append or replace NTP configuration files.
+# You should consult your DHCP client documentation about its
+# default behaviour and how to change it.
+
+# Name of the servers ntpd should sync with
+# Please respect the access policy as stated by the responsible person.
+#server ntp.example.tld iburst
+
+# Common pool for random people
+#server pool.ntp.org
+
+# Pools for Gentoo users
+server 0.gentoo.pool.ntp.org
+server 1.gentoo.pool.ntp.org
+server 2.gentoo.pool.ntp.org
+server 3.gentoo.pool.ntp.org
+
+##
+# A list of available servers can be found here:
+# http://www.pool.ntp.org/
+# http://www.pool.ntp.org/#use
+# A good way to get servers for your machine is:
+# netselect -s 3 pool.ntp.org
+##
+
+# you should not need to modify the following paths
+driftfile /var/lib/ntp/ntp.drift
+
+#server ntplocal.example.com prefer
+#server timeserver.example.org
+
+# Warning: Using default NTP settings will leave your NTP
+# server accessible to all hosts on the Internet.
+
+# If you want to deny all machines (including your own)
+# from accessing the NTP server, uncomment:
+#restrict default ignore
+
+
+# Default configuration:
+# - Allow only time queries, at a limited rate, sending KoD when in excess.
+# - Allow all local queries (IPv4, IPv6)
+restrict default nomodify nopeer noquery limited kod
+restrict 127.0.0.1
+restrict [::1]
+
+
+# To allow machines within your network to synchronize
+# their clocks with your server, but ensure they are
+# not allowed to configure the server or used as peers
+# to synchronize against, uncomment this line.
+#
+#restrict 192.168.0.0 mask 255.255.255.0 nomodify nopeer notrap
diff --git a/net-misc/ntp/files/ntpd.confd b/net-misc/ntp/files/ntpd.confd
new file mode 100644
index 000000000000..2b74282c5775
--- /dev/null
+++ b/net-misc/ntp/files/ntpd.confd
@@ -0,0 +1,6 @@
+# /etc/conf.d/ntpd
+
+# Options to pass to the ntpd process
+# Most people should leave this line alone ...
+# however, if you know what you're doing, feel free to tweak
+NTPD_OPTS="-g -u ntp:ntp"
diff --git a/net-misc/ntp/files/ntpd.rc b/net-misc/ntp/files/ntpd.rc
new file mode 100644
index 000000000000..b1f5de6ab5d3
--- /dev/null
+++ b/net-misc/ntp/files/ntpd.rc
@@ -0,0 +1,36 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use net dns logger
+ after ntp-client
+}
+
+checkconfig() {
+ if [ ! -f /etc/ntp.conf ] ; then
+ eerror "Please create /etc/ntp.conf"
+ eerror "Sample conf: /usr/share/ntp/ntp.conf"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Starting ntpd"
+ start-stop-daemon --start --exec /usr/sbin/ntpd \
+ --pidfile /var/run/ntpd.pid \
+ -- -p /var/run/ntpd.pid ${NTPD_OPTS}
+ eend $? "Failed to start ntpd"
+}
+
+stop() {
+ ebegin "Stopping ntpd"
+ start-stop-daemon --stop \
+ --pidfile /var/run/ntpd.pid \
+ --exec /usr/sbin/ntpd
+ eend $? "Failed to stop ntpd"
+}
diff --git a/net-misc/ntp/files/ntpd.rc-r1 b/net-misc/ntp/files/ntpd.rc-r1
new file mode 100644
index 000000000000..f89bdd3c9354
--- /dev/null
+++ b/net-misc/ntp/files/ntpd.rc-r1
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="ntpd - the network time protocol daemon"
+pidfile="/var/run/ntpd.pid"
+command="/usr/sbin/ntpd"
+command_args="-p ${pidfile} ${NTPD_OPTS}"
+start_stop_daemon_args="--pidfile ${pidfile}"
+
+depend() {
+ use net dns logger
+ after ntp-client
+}
+
+start_pre() {
+ if [ ! -f /etc/ntp.conf ] ; then
+ eerror "Please create /etc/ntp.conf"
+ return 1
+ fi
+ return 0
+}
diff --git a/net-misc/ntp/files/ntpd.service-r1 b/net-misc/ntp/files/ntpd.service-r1
new file mode 100644
index 000000000000..0b6109037c42
--- /dev/null
+++ b/net-misc/ntp/files/ntpd.service-r1
@@ -0,0 +1,10 @@
+[Unit]
+Description=Network Time Service
+After=ntpdate.service sntp.service
+
+[Service]
+ExecStart=/usr/sbin/ntpd -g -n
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/ntp/files/ntpd.service-r2 b/net-misc/ntp/files/ntpd.service-r2
new file mode 100644
index 000000000000..5f11b27e9232
--- /dev/null
+++ b/net-misc/ntp/files/ntpd.service-r2
@@ -0,0 +1,11 @@
+[Unit]
+Description=Network Time Service
+After=ntpdate.service sntp.service
+Conflicts=systemd-timesyncd.service
+
+[Service]
+ExecStart=/usr/sbin/ntpd -g -n
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/ntp/files/ntpdate.service b/net-misc/ntp/files/ntpdate.service
new file mode 100644
index 000000000000..a6c75c9c14c0
--- /dev/null
+++ b/net-misc/ntp/files/ntpdate.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Set time via NTP using ntpdate
+After=network-online.target nss-lookup.target
+Before=time-sync.target
+Wants=time-sync.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/ntpdate -b -u $SERVER
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/ntp/files/ntpdate.service-r1 b/net-misc/ntp/files/ntpdate.service-r1
new file mode 100644
index 000000000000..f9bc9ddefc90
--- /dev/null
+++ b/net-misc/ntp/files/ntpdate.service-r1
@@ -0,0 +1,14 @@
+[Unit]
+Description=Set time via NTP using ntpdate
+After=network-online.target nss-lookup.target
+Before=time-sync.target
+Wants=time-sync.target
+Conflicts=systemd-timesyncd.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/sbin/ntpdate -b -u $SERVER
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/ntp/files/ntpdate.service.conf b/net-misc/ntp/files/ntpdate.service.conf
new file mode 100644
index 000000000000..75e4f41b4162
--- /dev/null
+++ b/net-misc/ntp/files/ntpdate.service.conf
@@ -0,0 +1,2 @@
+[Service]
+Environment="SERVER=0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
diff --git a/net-misc/ntp/files/sntp.confd b/net-misc/ntp/files/sntp.confd
new file mode 100644
index 000000000000..d11983a3fb7c
--- /dev/null
+++ b/net-misc/ntp/files/sntp.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/sntp
+
+# Options to pass to sntp
+SNTP_OPTS="-s 0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
diff --git a/net-misc/ntp/files/sntp.rc b/net-misc/ntp/files/sntp.rc
new file mode 100644
index 000000000000..b0261d9d57dc
--- /dev/null
+++ b/net-misc/ntp/files/sntp.rc
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ before cron portmap
+ after net
+ use dns logger
+}
+
+checkconfig() {
+ if [ -z "${SNTP_OPTS}" ] ; then
+ eerror "Please edit /etc/conf.d/sntp"
+ eerror "I need to know what server/options to use!"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Setting clock via SNTP"
+ /usr/bin/sntp ${SNTP_OPTS}
+ eend $? "Failed to set clock"
+}
diff --git a/net-misc/ntp/files/sntp.service-r1 b/net-misc/ntp/files/sntp.service-r1
new file mode 100644
index 000000000000..2686951f641d
--- /dev/null
+++ b/net-misc/ntp/files/sntp.service-r1
@@ -0,0 +1,13 @@
+[Unit]
+Description=Set time via SNTP
+After=network.target NetworkManager-wait-online.service nss-lookup.target
+Before=time-sync.target
+Wants=time-sync.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/sntp -s $SERVER
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/ntp/files/sntp.service-r2 b/net-misc/ntp/files/sntp.service-r2
new file mode 100644
index 000000000000..9bdd578ffbc7
--- /dev/null
+++ b/net-misc/ntp/files/sntp.service-r2
@@ -0,0 +1,14 @@
+[Unit]
+Description=Set time via SNTP
+After=network.target NetworkManager-wait-online.service nss-lookup.target
+Before=time-sync.target
+Wants=time-sync.target
+Conflicts=systemd-timesyncd.service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/sntp -s $SERVER
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/ntp/files/sntp.service.conf b/net-misc/ntp/files/sntp.service.conf
new file mode 100644
index 000000000000..75e4f41b4162
--- /dev/null
+++ b/net-misc/ntp/files/sntp.service.conf
@@ -0,0 +1,2 @@
+[Service]
+Environment="SERVER=0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
diff --git a/net-misc/ntp/metadata.xml b/net-misc/ntp/metadata.xml
new file mode 100644
index 000000000000..50f686d2f43f
--- /dev/null
+++ b/net-misc/ntp/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+ <longdescription>
+NTP is a protocol designed to synchronize the clocks of computers over a network. NTP
+version 3 is an internet draft standard, formalized in RFC 1305. NTP version 4 is a
+significant revision of the NTP standard, and is the current development version, but
+has not been formalized in an RFC. Simple NTP (SNTP) version 4 is described in RFC
+2030.
+</longdescription>
+ <use>
+ <flag name="openntpd">Allow ntp to be installed alongside openntpd</flag>
+ <flag name="parse-clocks">Add support for PARSE clocks</flag>
+ <flag name="samba">Provide support for Samba's signing daemon (needed for Active Directory domain controllers)</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:ntp:ntp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/ntp/ntp-4.2.6_p5-r10.ebuild b/net-misc/ntp/ntp-4.2.6_p5-r10.ebuild
new file mode 100644
index 000000000000..ed074463c8ae
--- /dev/null
+++ b/net-misc/ntp/ntp-4.2.6_p5-r10.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils toolchain-funcs flag-o-matic user systemd
+
+MY_P=${P/_p/p}
+DESCRIPTION="Network Time Protocol suite/programs"
+HOMEPAGE="http://www.ntp.org/"
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-manpages.tar.bz2"
+
+LICENSE="HPND BSD ISC"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint"
+IUSE="caps debug ipv6 openntpd parse-clocks samba selinux snmp ssl vim-syntax zeroconf"
+
+DEPEND=">=sys-libs/ncurses-5.2
+ >=sys-libs/readline-4.1
+ kernel_linux? ( caps? ( sys-libs/libcap ) )
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+ !openntpd? ( !net-misc/openntpd )
+ snmp? ( net-analyzer/net-snmp )
+ ssl? ( dev-libs/openssl )
+ parse-clocks? ( net-misc/pps-tools )"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-ntp )
+ vim-syntax? ( app-vim/ntp-syntax )"
+PDEPEND="openntpd? ( net-misc/openntpd )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup ntp 123
+ enewuser ntp 123 -1 /dev/null ntp
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.2.4_p5-adjtimex.patch #254030
+ epatch "${FILESDIR}"/${PN}-4.2.4_p7-nano.patch #270483
+ append-cppflags -D_GNU_SOURCE #264109
+}
+
+src_configure() {
+ # avoid libmd5/libelf
+ export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
+ export ac_cv_lib_elf_nlist=no
+ # blah, no real configure options #176333
+ export ac_cv_header_dns_sd_h=$(usex zeroconf)
+ export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
+ econf \
+ --with-lineeditlibs=readline,edit,editline \
+ $(use_enable caps linuxcaps) \
+ $(use_enable parse-clocks) \
+ $(use_enable ipv6) \
+ $(use_enable debug debugging) \
+ $(use_enable samba ntp-signd) \
+ $(use_with snmp ntpsnmpd) \
+ $(use_with ssl crypto)
+}
+
+src_install() {
+ default
+ # move ntpd/ntpdate to sbin #66671
+ dodir /usr/sbin
+ mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
+
+ dodoc INSTALL WHERE-TO-START
+ doman "${WORKDIR}"/man/*.[58]
+ dohtml -r html/*
+
+ insinto /usr/share/ntp
+ doins "${FILESDIR}"/ntp.conf
+ cp -r scripts/* "${ED}"/usr/share/ntp/ || die
+ use prefix || fperms -R go-w /usr/share/ntp
+ find "${ED}"/usr/share/ntp \
+ '(' \
+ -name '*.in' -o \
+ -name 'Makefile*' -o \
+ -name support \
+ ')' \
+ -exec rm -r {} \;
+
+ insinto /etc
+ doins "${FILESDIR}"/ntp.conf
+ newinitd "${FILESDIR}"/ntpd.rc ntpd
+ newconfd "${FILESDIR}"/ntpd.confd ntpd
+ newinitd "${FILESDIR}"/ntp-client.rc ntp-client
+ newconfd "${FILESDIR}"/ntp-client.confd ntp-client
+ newinitd "${FILESDIR}"/sntp.rc sntp
+ newconfd "${FILESDIR}"/sntp.confd sntp
+ if ! use caps ; then
+ sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die
+ fi
+ sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
+
+ keepdir /var/lib/ntp
+ use prefix || fowners ntp:ntp /var/lib/ntp
+
+ if use openntpd ; then
+ cd "${ED}"
+ rm usr/sbin/ntpd || die
+ rm -r var/lib
+ rm etc/{conf,init}.d/ntpd
+ rm usr/share/man/*/ntpd.8 || die
+ else
+ systemd_newunit "${FILESDIR}"/ntpd.service-r1 ntpd.service
+ use caps && sed -i '/ExecStart/ s|$| -u ntp:ntp|' "${ED}"/usr/lib/systemd/system/ntpd.service
+ systemd_enable_ntpunit 60-ntpd ntpd.service
+ fi
+
+ systemd_dounit "${FILESDIR}"/ntpdate.service
+ systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
+ systemd_newunit "${FILESDIR}"/sntp.service-r1 sntp.service
+ systemd_install_serviced "${FILESDIR}"/sntp.service.conf
+}
+
+pkg_postinst() {
+ ewarn "You can find an example /etc/ntp.conf in /usr/share/ntp/"
+ ewarn "Review /etc/ntp.conf to setup server info."
+ ewarn "Review /etc/conf.d/ntpd to setup init.d info."
+ echo
+ elog "The way ntp sets and maintains your system time has changed."
+ elog "Now you can use /etc/init.d/ntp-client to set your time at"
+ elog "boot while you can use /etc/init.d/ntpd to maintain your time"
+ elog "while your machine runs"
+ if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
+ echo
+ eerror "The notrust option was found in your /etc/ntp.conf!"
+ ewarn "If your ntpd starts sending out weird responses,"
+ ewarn "then make sure you have keys properly setup and see"
+ ewarn "http://bugs.gentoo.org/41827"
+ fi
+}
diff --git a/net-misc/ntp/ntp-4.2.6_p5-r11.ebuild b/net-misc/ntp/ntp-4.2.6_p5-r11.ebuild
new file mode 100644
index 000000000000..986c4c948604
--- /dev/null
+++ b/net-misc/ntp/ntp-4.2.6_p5-r11.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils toolchain-funcs flag-o-matic user systemd
+
+MY_P=${P/_p/p}
+DESCRIPTION="Network Time Protocol suite/programs"
+HOMEPAGE="http://www.ntp.org/"
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-manpages.tar.bz2"
+
+LICENSE="HPND BSD ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint"
+IUSE="caps debug ipv6 openntpd parse-clocks samba selinux snmp ssl vim-syntax zeroconf"
+
+DEPEND=">=sys-libs/ncurses-5.2
+ >=sys-libs/readline-4.1
+ kernel_linux? ( caps? ( sys-libs/libcap ) )
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+ !openntpd? ( !net-misc/openntpd )
+ snmp? ( net-analyzer/net-snmp )
+ ssl? ( dev-libs/openssl )
+ parse-clocks? ( net-misc/pps-tools )"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-ntp )
+ vim-syntax? ( app-vim/ntp-syntax )"
+PDEPEND="openntpd? ( net-misc/openntpd )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup ntp 123
+ enewuser ntp 123 -1 /dev/null ntp
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.2.4_p5-adjtimex.patch #254030
+ epatch "${FILESDIR}"/${PN}-4.2.4_p7-nano.patch #270483
+ append-cppflags -D_GNU_SOURCE #264109
+}
+
+src_configure() {
+ # avoid libmd5/libelf
+ export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
+ export ac_cv_lib_elf_nlist=no
+ # blah, no real configure options #176333
+ export ac_cv_header_dns_sd_h=$(usex zeroconf)
+ export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
+ econf \
+ --with-lineeditlibs=readline,edit,editline \
+ $(use_enable caps linuxcaps) \
+ $(use_enable parse-clocks) \
+ $(use_enable ipv6) \
+ $(use_enable debug debugging) \
+ $(use_enable samba ntp-signd) \
+ $(use_with snmp ntpsnmpd) \
+ $(use_with ssl crypto)
+}
+
+src_install() {
+ default
+ # move ntpd/ntpdate to sbin #66671
+ dodir /usr/sbin
+ mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
+
+ dodoc INSTALL WHERE-TO-START
+ doman "${WORKDIR}"/man/*.[58]
+ dohtml -r html/*
+
+ insinto /usr/share/ntp
+ doins "${FILESDIR}"/ntp.conf
+ cp -r scripts/* "${ED}"/usr/share/ntp/ || die
+ use prefix || fperms -R go-w /usr/share/ntp
+ find "${ED}"/usr/share/ntp \
+ '(' \
+ -name '*.in' -o \
+ -name 'Makefile*' -o \
+ -name support \
+ ')' \
+ -exec rm -r {} \;
+
+ insinto /etc
+ doins "${FILESDIR}"/ntp.conf
+ newinitd "${FILESDIR}"/ntpd.rc ntpd
+ newconfd "${FILESDIR}"/ntpd.confd ntpd
+ newinitd "${FILESDIR}"/ntp-client.rc ntp-client
+ newconfd "${FILESDIR}"/ntp-client.confd ntp-client
+ newinitd "${FILESDIR}"/sntp.rc sntp
+ newconfd "${FILESDIR}"/sntp.confd sntp
+ if ! use caps ; then
+ sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die
+ fi
+ sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
+
+ keepdir /var/lib/ntp
+ use prefix || fowners ntp:ntp /var/lib/ntp
+
+ if use openntpd ; then
+ cd "${ED}"
+ rm usr/sbin/ntpd || die
+ rm -r var/lib
+ rm etc/{conf,init}.d/ntpd
+ rm usr/share/man/*/ntpd.8 || die
+ else
+ systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
+ use caps && sed -i '/ExecStart/ s|$| -u ntp:ntp|' "${ED}"/usr/lib/systemd/system/ntpd.service
+ systemd_enable_ntpunit 60-ntpd ntpd.service
+ fi
+
+ systemd_newunit "${FILESDIR}"/ntpdate.service-r1 ntpdate.service
+ systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
+ systemd_newunit "${FILESDIR}"/sntp.service-r2 sntp.service
+ systemd_install_serviced "${FILESDIR}"/sntp.service.conf
+}
+
+pkg_postinst() {
+ ewarn "You can find an example /etc/ntp.conf in /usr/share/ntp/"
+ ewarn "Review /etc/ntp.conf to setup server info."
+ ewarn "Review /etc/conf.d/ntpd to setup init.d info."
+ echo
+ elog "The way ntp sets and maintains your system time has changed."
+ elog "Now you can use /etc/init.d/ntp-client to set your time at"
+ elog "boot while you can use /etc/init.d/ntpd to maintain your time"
+ elog "while your machine runs"
+ if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
+ echo
+ eerror "The notrust option was found in your /etc/ntp.conf!"
+ ewarn "If your ntpd starts sending out weird responses,"
+ ewarn "then make sure you have keys properly setup and see"
+ ewarn "http://bugs.gentoo.org/41827"
+ fi
+}
diff --git a/net-misc/ntp/ntp-4.2.8-r1.ebuild b/net-misc/ntp/ntp-4.2.8-r1.ebuild
new file mode 100644
index 000000000000..a526ad0f4c3d
--- /dev/null
+++ b/net-misc/ntp/ntp-4.2.8-r1.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils toolchain-funcs flag-o-matic user systemd
+
+MY_P=${P/_p/p}
+DESCRIPTION="Network Time Protocol suite/programs"
+HOMEPAGE="http://www.ntp.org/"
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-manpages.tar.bz2"
+
+LICENSE="HPND BSD ISC"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint"
+IUSE="caps debug ipv6 openntpd parse-clocks samba selinux snmp ssl vim-syntax zeroconf"
+
+CDEPEND=">=sys-libs/ncurses-5.2
+ >=sys-libs/readline-4.1
+ >=dev-libs/libevent-2.0.9
+ kernel_linux? ( caps? ( sys-libs/libcap ) )
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+ !openntpd? ( !net-misc/openntpd )
+ snmp? ( net-analyzer/net-snmp )
+ ssl? ( dev-libs/openssl )
+ parse-clocks? ( net-misc/pps-tools )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-ntp )
+ vim-syntax? ( app-vim/ntp-syntax )"
+PDEPEND="openntpd? ( net-misc/openntpd )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup ntp 123
+ enewuser ntp 123 -1 /dev/null ntp
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.2.4_p7-nano.patch #270483
+ epatch "${FILESDIR}"/${P}-ntp-keygen-no-openssl.patch #533238
+ append-cppflags -D_GNU_SOURCE #264109
+ eautoreconf
+}
+
+src_configure() {
+ # avoid libmd5/libelf
+ export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
+ export ac_cv_lib_elf_nlist=no
+ # blah, no real configure options #176333
+ export ac_cv_header_dns_sd_h=$(usex zeroconf)
+ export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
+ econf \
+ --with-lineeditlibs=readline,edit,editline \
+ --with-yielding-select \
+ --disable-local-libevent \
+ $(use_enable caps linuxcaps) \
+ $(use_enable parse-clocks) \
+ $(use_enable ipv6) \
+ $(use_enable debug debugging) \
+ $(use_enable samba ntp-signd) \
+ $(use_with snmp ntpsnmpd) \
+ $(use_with ssl crypto)
+}
+
+src_install() {
+ default
+ # move ntpd/ntpdate to sbin #66671
+ dodir /usr/sbin
+ mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
+
+ dodoc INSTALL WHERE-TO-START
+ doman "${WORKDIR}"/man/*.[58]
+ dohtml -r html/*
+
+ insinto /etc
+ doins "${FILESDIR}"/ntp.conf
+ newinitd "${FILESDIR}"/ntpd.rc-r1 ntpd
+ newconfd "${FILESDIR}"/ntpd.confd ntpd
+ newinitd "${FILESDIR}"/ntp-client.rc ntp-client
+ newconfd "${FILESDIR}"/ntp-client.confd ntp-client
+ newinitd "${FILESDIR}"/sntp.rc sntp
+ newconfd "${FILESDIR}"/sntp.confd sntp
+ if ! use caps ; then
+ sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die
+ fi
+ sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
+
+ keepdir /var/lib/ntp
+ use prefix || fowners ntp:ntp /var/lib/ntp
+
+ if use openntpd ; then
+ cd "${ED}"
+ rm usr/sbin/ntpd || die
+ rm -r var/lib
+ rm etc/{conf,init}.d/ntpd
+ rm usr/share/man/*/ntpd.8 || die
+ else
+ systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
+ use caps && sed -i '/ExecStart/ s|$| -u ntp:ntp|' "${ED}"/usr/lib/systemd/system/ntpd.service
+ systemd_enable_ntpunit 60-ntpd ntpd.service
+ fi
+
+ systemd_newunit "${FILESDIR}"/ntpdate.service-r1 ntpdate.service
+ systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
+ systemd_newunit "${FILESDIR}"/sntp.service-r2 sntp.service
+ systemd_install_serviced "${FILESDIR}"/sntp.service.conf
+}
+
+pkg_postinst() {
+ ewarn "Review /etc/ntp.conf to setup server info."
+ ewarn "Review /etc/conf.d/ntpd to setup init.d info."
+ echo
+ elog "The way ntp sets and maintains your system time has changed."
+ elog "Now you can use /etc/init.d/ntp-client to set your time at"
+ elog "boot while you can use /etc/init.d/ntpd to maintain your time"
+ elog "while your machine runs"
+ if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
+ echo
+ eerror "The notrust option was found in your /etc/ntp.conf!"
+ ewarn "If your ntpd starts sending out weird responses,"
+ ewarn "then make sure you have keys properly setup and see"
+ ewarn "http://bugs.gentoo.org/41827"
+ fi
+}
diff --git a/net-misc/ntp/ntp-4.2.8-r2.ebuild b/net-misc/ntp/ntp-4.2.8-r2.ebuild
new file mode 100644
index 000000000000..87266e58687e
--- /dev/null
+++ b/net-misc/ntp/ntp-4.2.8-r2.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils toolchain-funcs flag-o-matic user systemd
+
+MY_P=${P/_p/p}
+DESCRIPTION="Network Time Protocol suite/programs"
+HOMEPAGE="http://www.ntp.org/"
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-manpages.tar.bz2"
+
+LICENSE="HPND BSD ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint"
+IUSE="caps debug ipv6 openntpd parse-clocks samba selinux snmp ssl +threads vim-syntax zeroconf"
+
+CDEPEND=">=sys-libs/ncurses-5.2
+ >=sys-libs/readline-4.1
+ >=dev-libs/libevent-2.0.9[threads?]
+ kernel_linux? ( caps? ( sys-libs/libcap ) )
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+ !openntpd? ( !net-misc/openntpd )
+ snmp? ( net-analyzer/net-snmp )
+ ssl? ( dev-libs/openssl )
+ parse-clocks? ( net-misc/pps-tools )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-ntp )
+ vim-syntax? ( app-vim/ntp-syntax )"
+PDEPEND="openntpd? ( net-misc/openntpd )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup ntp 123
+ enewuser ntp 123 -1 /dev/null ntp
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.2.4_p7-nano.patch #270483
+ epatch "${FILESDIR}"/${P}-ntp-keygen-no-openssl.patch #533238
+ append-cppflags -D_GNU_SOURCE #264109
+ # Make sure every build uses the same install layout. #539092
+ find sntp/loc/ -type f '!' -name legacy -delete || die
+ # Disable pointless checks.
+ touch .checkChangeLog .gcc-warning FRC.html html/.datecheck
+ eautoreconf
+
+ # The autoreconf call above recursively ran in all subdirs, and then
+ # ran in the top level. But the libtool call there updated files in
+ # the subdir which broke timestamps causing autotools to re-run. #538270
+ find -type f -exec touch -r . {} +
+}
+
+src_configure() {
+ # avoid libmd5/libelf
+ export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
+ export ac_cv_lib_elf_nlist=no
+ # blah, no real configure options #176333
+ export ac_cv_header_dns_sd_h=$(usex zeroconf)
+ export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
+ econf \
+ --with-lineeditlibs=readline,edit,editline \
+ --with-yielding-select \
+ --disable-local-libevent \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
+ $(use_enable caps linuxcaps) \
+ $(use_enable parse-clocks) \
+ $(use_enable ipv6) \
+ $(use_enable debug debugging) \
+ $(use_enable samba ntp-signd) \
+ $(use_with snmp ntpsnmpd) \
+ $(use_with ssl crypto) \
+ $(use_enable threads thread-support)
+}
+
+src_install() {
+ default
+ # move ntpd/ntpdate to sbin #66671
+ dodir /usr/sbin
+ mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
+
+ dodoc INSTALL WHERE-TO-START
+ doman "${WORKDIR}"/man/*.[58]
+
+ insinto /etc
+ doins "${FILESDIR}"/ntp.conf
+ newinitd "${FILESDIR}"/ntpd.rc-r1 ntpd
+ newconfd "${FILESDIR}"/ntpd.confd ntpd
+ newinitd "${FILESDIR}"/ntp-client.rc ntp-client
+ newconfd "${FILESDIR}"/ntp-client.confd ntp-client
+ newinitd "${FILESDIR}"/sntp.rc sntp
+ newconfd "${FILESDIR}"/sntp.confd sntp
+ if ! use caps ; then
+ sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die
+ fi
+ sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
+
+ keepdir /var/lib/ntp
+ use prefix || fowners ntp:ntp /var/lib/ntp
+
+ if use openntpd ; then
+ cd "${ED}"
+ rm usr/sbin/ntpd || die
+ rm -r var/lib
+ rm etc/{conf,init}.d/ntpd
+ rm usr/share/man/*/ntpd.8 || die
+ else
+ systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
+ use caps && sed -i '/ExecStart/ s|$| -u ntp:ntp|' "${ED}"/usr/lib/systemd/system/ntpd.service
+ systemd_enable_ntpunit 60-ntpd ntpd.service
+ fi
+
+ systemd_newunit "${FILESDIR}"/ntpdate.service-r1 ntpdate.service
+ systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
+ systemd_newunit "${FILESDIR}"/sntp.service-r2 sntp.service
+ systemd_install_serviced "${FILESDIR}"/sntp.service.conf
+}
+
+pkg_postinst() {
+ ewarn "Review /etc/ntp.conf to setup server info."
+ ewarn "Review /etc/conf.d/ntpd to setup init.d info."
+ echo
+ elog "The way ntp sets and maintains your system time has changed."
+ elog "Now you can use /etc/init.d/ntp-client to set your time at"
+ elog "boot while you can use /etc/init.d/ntpd to maintain your time"
+ elog "while your machine runs"
+ if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
+ echo
+ eerror "The notrust option was found in your /etc/ntp.conf!"
+ ewarn "If your ntpd starts sending out weird responses,"
+ ewarn "then make sure you have keys properly setup and see"
+ ewarn "http://bugs.gentoo.org/41827"
+ fi
+}
diff --git a/net-misc/ntp/ntp-4.2.8-r3.ebuild b/net-misc/ntp/ntp-4.2.8-r3.ebuild
new file mode 100644
index 000000000000..a1d0e59eb43e
--- /dev/null
+++ b/net-misc/ntp/ntp-4.2.8-r3.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils toolchain-funcs flag-o-matic user systemd
+
+MY_P=${P/_p/p}
+DESCRIPTION="Network Time Protocol suite/programs"
+HOMEPAGE="http://www.ntp.org/"
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-manpages.tar.bz2"
+
+LICENSE="HPND BSD ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint"
+IUSE="caps debug ipv6 openntpd parse-clocks readline samba selinux snmp ssl +threads vim-syntax zeroconf"
+
+CDEPEND="readline? ( >=sys-libs/readline-4.1 )
+ >=dev-libs/libevent-2.0.9[threads?]
+ kernel_linux? ( caps? ( sys-libs/libcap ) )
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+ !openntpd? ( !net-misc/openntpd )
+ snmp? ( net-analyzer/net-snmp )
+ ssl? ( dev-libs/openssl )
+ parse-clocks? ( net-misc/pps-tools )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-ntp )
+ vim-syntax? ( app-vim/ntp-syntax )"
+PDEPEND="openntpd? ( net-misc/openntpd )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup ntp 123
+ enewuser ntp 123 -1 /dev/null ntp
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.2.4_p7-nano.patch #270483
+ epatch "${FILESDIR}"/${P}-ntp-keygen-no-openssl.patch #533238
+ append-cppflags -D_GNU_SOURCE #264109
+ # Make sure every build uses the same install layout. #539092
+ find sntp/loc/ -type f '!' -name legacy -delete || die
+ # Disable pointless checks.
+ touch .checkChangeLog .gcc-warning FRC.html html/.datecheck
+ eautoreconf
+
+ # The autoreconf call above recursively ran in all subdirs, and then
+ # ran in the top level. But the libtool call there updated files in
+ # the subdir which broke timestamps causing autotools to re-run. #538270
+ find -type f -exec touch -r . {} +
+
+ # We want to force a rebuild of this source file though as the shipped one
+ # is broken. #545546
+ rm libparse/info_trimble.c || die
+}
+
+src_configure() {
+ # avoid libmd5/libelf
+ export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
+ export ac_cv_lib_elf_nlist=no
+ # blah, no real configure options #176333
+ export ac_cv_header_dns_sd_h=$(usex zeroconf)
+ export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
+ econf \
+ --with-lineeditlibs=readline,edit,editline \
+ --with-yielding-select \
+ --disable-local-libevent \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --htmldir='$(docdir)/html' \
+ $(use_enable caps linuxcaps) \
+ $(use_enable parse-clocks) \
+ $(use_enable ipv6) \
+ $(use_enable debug debugging) \
+ $(use_with readline lineeditlibs readline) \
+ $(use_enable samba ntp-signd) \
+ $(use_with snmp ntpsnmpd) \
+ $(use_with ssl crypto) \
+ $(use_enable threads thread-support)
+}
+
+src_install() {
+ default
+ # move ntpd/ntpdate to sbin #66671
+ dodir /usr/sbin
+ mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
+
+ dodoc INSTALL WHERE-TO-START
+ doman "${WORKDIR}"/man/*.[58]
+
+ insinto /etc
+ doins "${FILESDIR}"/ntp.conf
+ newinitd "${FILESDIR}"/ntpd.rc-r1 ntpd
+ newconfd "${FILESDIR}"/ntpd.confd ntpd
+ newinitd "${FILESDIR}"/ntp-client.rc ntp-client
+ newconfd "${FILESDIR}"/ntp-client.confd ntp-client
+ newinitd "${FILESDIR}"/sntp.rc sntp
+ newconfd "${FILESDIR}"/sntp.confd sntp
+ if ! use caps ; then
+ sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die
+ fi
+ sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
+
+ keepdir /var/lib/ntp
+ use prefix || fowners ntp:ntp /var/lib/ntp
+
+ if use openntpd ; then
+ cd "${ED}"
+ rm usr/sbin/ntpd || die
+ rm -r var/lib
+ rm etc/{conf,init}.d/ntpd
+ rm usr/share/man/*/ntpd.8 || die
+ else
+ systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
+ use caps && sed -i '/ExecStart/ s|$| -u ntp:ntp|' "${ED}"/usr/lib/systemd/system/ntpd.service
+ systemd_enable_ntpunit 60-ntpd ntpd.service
+ fi
+
+ systemd_newunit "${FILESDIR}"/ntpdate.service-r1 ntpdate.service
+ systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
+ systemd_newunit "${FILESDIR}"/sntp.service-r2 sntp.service
+ systemd_install_serviced "${FILESDIR}"/sntp.service.conf
+}
+
+pkg_postinst() {
+ if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
+ eerror "The notrust option was found in your /etc/ntp.conf!"
+ ewarn "If your ntpd starts sending out weird responses,"
+ ewarn "then make sure you have keys properly setup and see"
+ ewarn "http://bugs.gentoo.org/41827"
+ fi
+}
diff --git a/net-misc/ntp/ntp-4.2.8_p2.ebuild b/net-misc/ntp/ntp-4.2.8_p2.ebuild
new file mode 100644
index 000000000000..e3b3099a8a20
--- /dev/null
+++ b/net-misc/ntp/ntp-4.2.8_p2.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils toolchain-funcs flag-o-matic user systemd
+
+MY_P=${P/_p/p}
+DESCRIPTION="Network Time Protocol suite/programs"
+HOMEPAGE="http://www.ntp.org/"
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-manpages.tar.bz2"
+
+LICENSE="HPND BSD ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint"
+IUSE="caps debug ipv6 openntpd parse-clocks readline samba selinux snmp ssl +threads vim-syntax zeroconf"
+
+CDEPEND="readline? ( >=sys-libs/readline-4.1 )
+ >=dev-libs/libevent-2.0.9[threads?]
+ kernel_linux? ( caps? ( sys-libs/libcap ) )
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+ !openntpd? ( !net-misc/openntpd )
+ snmp? ( net-analyzer/net-snmp )
+ ssl? ( dev-libs/openssl )
+ parse-clocks? ( net-misc/pps-tools )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-ntp )
+ vim-syntax? ( app-vim/ntp-syntax )"
+PDEPEND="openntpd? ( net-misc/openntpd )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup ntp 123
+ enewuser ntp 123 -1 /dev/null ntp
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966
+ append-cppflags -D_GNU_SOURCE #264109
+ # Make sure every build uses the same install layout. #539092
+ find sntp/loc/ -type f '!' -name legacy -delete || die
+ # Disable pointless checks.
+ touch .checkChangeLog .gcc-warning FRC.html html/.datecheck
+}
+
+src_configure() {
+ # avoid libmd5/libelf
+ export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
+ export ac_cv_lib_elf_nlist=no
+ # blah, no real configure options #176333
+ export ac_cv_header_dns_sd_h=$(usex zeroconf)
+ export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
+ # Increase the default memlimit from 32MiB to 128MiB. #533232
+ econf \
+ --with-lineeditlibs=readline,edit,editline \
+ --with-yielding-select \
+ --disable-local-libevent \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --htmldir='$(docdir)/html' \
+ --with-memlock=256 \
+ $(use_enable caps linuxcaps) \
+ $(use_enable parse-clocks) \
+ $(use_enable ipv6) \
+ $(use_enable debug debugging) \
+ $(use_with readline lineeditlibs readline) \
+ $(use_enable samba ntp-signd) \
+ $(use_with snmp ntpsnmpd) \
+ $(use_with ssl crypto) \
+ $(use_enable threads thread-support)
+}
+
+src_install() {
+ default
+ # move ntpd/ntpdate to sbin #66671
+ dodir /usr/sbin
+ mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
+
+ dodoc INSTALL WHERE-TO-START
+ doman "${WORKDIR}"/man/*.[58]
+
+ insinto /etc
+ doins "${FILESDIR}"/ntp.conf
+ use ipv6 || sed -i '/^restrict .*::1/d' "${ED}"/etc/ntp.conf #524726
+ newinitd "${FILESDIR}"/ntpd.rc-r1 ntpd
+ newconfd "${FILESDIR}"/ntpd.confd ntpd
+ newinitd "${FILESDIR}"/ntp-client.rc ntp-client
+ newconfd "${FILESDIR}"/ntp-client.confd ntp-client
+ newinitd "${FILESDIR}"/sntp.rc sntp
+ newconfd "${FILESDIR}"/sntp.confd sntp
+ if ! use caps ; then
+ sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die
+ fi
+ sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
+
+ keepdir /var/lib/ntp
+ use prefix || fowners ntp:ntp /var/lib/ntp
+
+ if use openntpd ; then
+ cd "${ED}"
+ rm usr/sbin/ntpd || die
+ rm -r var/lib
+ rm etc/{conf,init}.d/ntpd
+ rm usr/share/man/*/ntpd.8 || die
+ else
+ systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
+ use caps && sed -i '/ExecStart/ s|$| -u ntp:ntp|' "${ED}"/usr/lib/systemd/system/ntpd.service
+ systemd_enable_ntpunit 60-ntpd ntpd.service
+ fi
+
+ systemd_newunit "${FILESDIR}"/ntpdate.service-r1 ntpdate.service
+ systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
+ systemd_newunit "${FILESDIR}"/sntp.service-r2 sntp.service
+ systemd_install_serviced "${FILESDIR}"/sntp.service.conf
+}
+
+pkg_postinst() {
+ if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
+ eerror "The notrust option was found in your /etc/ntp.conf!"
+ ewarn "If your ntpd starts sending out weird responses,"
+ ewarn "then make sure you have keys properly setup and see"
+ ewarn "http://bugs.gentoo.org/41827"
+ fi
+}
diff --git a/net-misc/ntp/ntp-4.2.8_p3.ebuild b/net-misc/ntp/ntp-4.2.8_p3.ebuild
new file mode 100644
index 000000000000..818647d12d92
--- /dev/null
+++ b/net-misc/ntp/ntp-4.2.8_p3.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils toolchain-funcs flag-o-matic user systemd
+
+MY_P=${P/_p/p}
+DESCRIPTION="Network Time Protocol suite/programs"
+HOMEPAGE="http://www.ntp.org/"
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${PV:0:3}/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-manpages.tar.bz2"
+
+LICENSE="HPND BSD ISC"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~m68k-mint"
+IUSE="caps debug ipv6 openntpd parse-clocks readline samba selinux snmp ssl +threads vim-syntax zeroconf"
+
+CDEPEND="readline? ( >=sys-libs/readline-4.1:0= )
+ >=dev-libs/libevent-2.0.9[threads?]
+ kernel_linux? ( caps? ( sys-libs/libcap ) )
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
+ !openntpd? ( !net-misc/openntpd )
+ snmp? ( net-analyzer/net-snmp )
+ ssl? ( dev-libs/openssl:0= )
+ parse-clocks? ( net-misc/pps-tools )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-ntp )
+ vim-syntax? ( app-vim/ntp-syntax )"
+PDEPEND="openntpd? ( net-misc/openntpd )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup ntp 123
+ enewuser ntp 123 -1 /dev/null ntp
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.2.8-ipc-caps.patch #533966
+ append-cppflags -D_GNU_SOURCE #264109
+ # Make sure every build uses the same install layout. #539092
+ find sntp/loc/ -type f '!' -name legacy -delete || die
+ # Disable pointless checks.
+ touch .checkChangeLog .gcc-warning FRC.html html/.datecheck
+}
+
+src_configure() {
+ # avoid libmd5/libelf
+ export ac_cv_search_MD5Init=no ac_cv_header_md5_h=no
+ export ac_cv_lib_elf_nlist=no
+ # blah, no real configure options #176333
+ export ac_cv_header_dns_sd_h=$(usex zeroconf)
+ export ac_cv_lib_dns_sd_DNSServiceRegister=${ac_cv_header_dns_sd_h}
+ # Increase the default memlimit from 32MiB to 128MiB. #533232
+ econf \
+ --with-lineeditlibs=readline,edit,editline \
+ --with-yielding-select \
+ --disable-local-libevent \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --htmldir='$(docdir)/html' \
+ --with-memlock=256 \
+ $(use_enable caps linuxcaps) \
+ $(use_enable parse-clocks) \
+ $(use_enable ipv6) \
+ $(use_enable debug debugging) \
+ $(use_with readline lineeditlibs readline) \
+ $(use_enable samba ntp-signd) \
+ $(use_with snmp ntpsnmpd) \
+ $(use_with ssl crypto) \
+ $(use_enable threads thread-support)
+}
+
+src_install() {
+ default
+ # move ntpd/ntpdate to sbin #66671
+ dodir /usr/sbin
+ mv "${ED}"/usr/bin/{ntpd,ntpdate} "${ED}"/usr/sbin/ || die "move to sbin"
+
+ dodoc INSTALL WHERE-TO-START
+ doman "${WORKDIR}"/man/*.[58]
+
+ insinto /etc
+ doins "${FILESDIR}"/ntp.conf
+ use ipv6 || sed -i '/^restrict .*::1/d' "${ED}"/etc/ntp.conf #524726
+ newinitd "${FILESDIR}"/ntpd.rc-r1 ntpd
+ newconfd "${FILESDIR}"/ntpd.confd ntpd
+ newinitd "${FILESDIR}"/ntp-client.rc ntp-client
+ newconfd "${FILESDIR}"/ntp-client.confd ntp-client
+ newinitd "${FILESDIR}"/sntp.rc sntp
+ newconfd "${FILESDIR}"/sntp.confd sntp
+ if ! use caps ; then
+ sed -i "s|-u ntp:ntp||" "${ED}"/etc/conf.d/ntpd || die
+ fi
+ sed -i "s:/usr/bin:/usr/sbin:" "${ED}"/etc/init.d/ntpd || die
+
+ keepdir /var/lib/ntp
+ use prefix || fowners ntp:ntp /var/lib/ntp
+
+ if use openntpd ; then
+ cd "${ED}"
+ rm usr/sbin/ntpd || die
+ rm -r var/lib
+ rm etc/{conf,init}.d/ntpd
+ rm usr/share/man/*/ntpd.8 || die
+ else
+ systemd_newunit "${FILESDIR}"/ntpd.service-r2 ntpd.service
+ use caps && sed -i '/ExecStart/ s|$| -u ntp:ntp|' "${ED}"/usr/lib/systemd/system/ntpd.service
+ systemd_enable_ntpunit 60-ntpd ntpd.service
+ fi
+
+ systemd_newunit "${FILESDIR}"/ntpdate.service-r1 ntpdate.service
+ systemd_install_serviced "${FILESDIR}"/ntpdate.service.conf
+ systemd_newunit "${FILESDIR}"/sntp.service-r2 sntp.service
+ systemd_install_serviced "${FILESDIR}"/sntp.service.conf
+}
+
+pkg_postinst() {
+ if grep -qs '^[^#].*notrust' "${EROOT}"/etc/ntp.conf ; then
+ eerror "The notrust option was found in your /etc/ntp.conf!"
+ ewarn "If your ntpd starts sending out weird responses,"
+ ewarn "then make sure you have keys properly setup and see"
+ ewarn "http://bugs.gentoo.org/41827"
+ fi
+}
diff --git a/net-misc/ntpclient/Manifest b/net-misc/ntpclient/Manifest
new file mode 100644
index 000000000000..0c5b96593f61
--- /dev/null
+++ b/net-misc/ntpclient/Manifest
@@ -0,0 +1 @@
+DIST ntpclient_2010_365.tar.gz 30423 SHA256 9ad9b028385082fb804167f464e2db0a0b3d33780acd399327e64898b8fcfddd SHA512 74fd5e80dcf36c4e7aca6d97c5979b0dc4c51fed592279adfd04c0d329c117bfed819ee40d6400436c0d066f73ed3403e9fba8cb05846df55c991422ce434132 WHIRLPOOL 0eb27687cb9f90317e126be3830a9c812af216dd4be60a9d11bfcfcbf4fb16572de1bbbcf0207b47290e452172126bd2be38ab7ee49e097890bdcea6a63b259b
diff --git a/net-misc/ntpclient/metadata.xml b/net-misc/ntpclient/metadata.xml
new file mode 100644
index 000000000000..a40624fba8f0
--- /dev/null
+++ b/net-misc/ntpclient/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/ntpclient/ntpclient-2010.365.ebuild b/net-misc/ntpclient/ntpclient-2010.365.ebuild
new file mode 100644
index 000000000000..af5c6afa69bf
--- /dev/null
+++ b/net-misc/ntpclient/ntpclient-2010.365.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="A NTP (RFC-1305) client for unix-alike computers"
+HOMEPAGE="http://doolittle.icarus.com/ntpclient/"
+SRC_URI="http://doolittle.icarus.com/${PN}/${PN}_${PV/./_}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc x86"
+IUSE=""
+
+#S="${WORKDIR}/${PN}-2010"
+
+src_unpack() {
+ default
+ mv "${WORKDIR}"/${PN}* ${P} || die
+}
+
+src_prepare() {
+ sed -i -e 's/-O2//;s/LDFLAGS +=/LDLIBS +=/' Makefile || die
+ tc-export CC
+}
+
+src_install() {
+ dobin ntpclient
+ dodoc README HOWTO rate.awk rate2.awk
+}
diff --git a/net-misc/nut-monitor/Manifest b/net-misc/nut-monitor/Manifest
new file mode 100644
index 000000000000..6569ea6d70bc
--- /dev/null
+++ b/net-misc/nut-monitor/Manifest
@@ -0,0 +1 @@
+DIST nut-monitor-1.3.tar.gz 31338 RMD160 9142fbf3ba04c28dd68243d4e7accd83bc1d6e13 SHA1 53fb0926fa54f16da0555113f4da88b13e7a988e SHA256 a2e23b0372d170a9a67d55227ed4a0a6a9ae1505ad23b2004782ed9964567502
diff --git a/net-misc/nut-monitor/files/nut-monitor-1.3-paths.patch b/net-misc/nut-monitor/files/nut-monitor-1.3-paths.patch
new file mode 100644
index 000000000000..00fd0ded3d3f
--- /dev/null
+++ b/net-misc/nut-monitor/files/nut-monitor-1.3-paths.patch
@@ -0,0 +1,48 @@
+--- a/scripts/python/app/NUT-Monitor
++++ b/scripts/python/app/NUT-Monitor
+@@ -70,7 +70,7 @@
+ ( cmd_opts, args ) = opt_parser.parse_args()
+
+
+- self.__glade_file = os.path.join( os.path.dirname( sys.argv[0] ), "gui-1.3.glade" )
++ self.__glade_file = '/usr/share/nut-monitor/gui-1.3.glade'
+
+ self.__widgets["interface"] = gtk.glade.XML( self.__glade_file, "window1", APP )
+ self.__widgets["main_window"] = self.__widgets["interface"].get_widget("window1")
+@@ -103,11 +103,11 @@
+
+ # Create the tray icon and connect it to the show/hide method...
+ self.__widgets["status_icon"] = gtk.StatusIcon()
+- self.__widgets["status_icon"].set_from_file( os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "on_line.png" ) )
++ self.__widgets["status_icon"].set_from_file( "/usr/share/nut-monitor/pixmaps/on_line.png" )
+ self.__widgets["status_icon"].set_visible( True )
+ self.__widgets["status_icon"].connect( "activate", self.tray_activated )
+
+- self.__widgets["ups_status_image"].set_from_file( os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "on_line.png" ) )
++ self.__widgets["ups_status_image"].set_from_file( "/usr/share/nut-monitor/pixmaps/on_line.png" )
+
+ # Define interface callbacks actions
+ self.__callbacks = { "on_window1_destroy" : self.quit,
+@@ -265,8 +265,8 @@
+ #-------------------------------------------------------------------
+ # Change the status icon and tray icon
+ def change_status_icon( self, icon="on_line", blink=False ) :
+- self.__widgets["status_icon"].set_from_file( os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "%s.png" % icon ) )
+- self.__widgets["ups_status_image"].set_from_file( os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "%s.png" % icon ) )
++ self.__widgets["status_icon"].set_from_file( "/usr/share/nut-monitor/pixmaps/%s.png" % icon )
++ self.__widgets["ups_status_image"].set_from_file( "/usr/share/nut-monitor/pixmaps/%s.png" % icon )
+ self.__widgets["status_icon"].set_blinking( blink )
+
+ #-------------------------------------------------------------------
+@@ -719,9 +719,9 @@
+
+ for k,v in vars.iteritems() :
+ if ( rwvars.has_key( k ) ) :
+- icon_file = os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "var-rw.png" )
++ icon_file = "/usr/share/nut-monitor/pixmaps/var-rw.png"
+ else :
+- icon_file = os.path.join( os.path.dirname( sys.argv[0] ), "pixmaps", "var-ro.png" )
++ icon_file = "/usr/share/nut-monitor/pixmaps/var-ro.png"
+
+ icon = gtk.gdk.pixbuf_new_from_file( icon_file )
+ self.__widgets["ups_vars_tree_store"].append( [ icon, k, v ] )
diff --git a/net-misc/nut-monitor/files/nut-monitor-1.3-paths2.patch b/net-misc/nut-monitor/files/nut-monitor-1.3-paths2.patch
new file mode 100644
index 000000000000..92d6833ee1ff
--- /dev/null
+++ b/net-misc/nut-monitor/files/nut-monitor-1.3-paths2.patch
@@ -0,0 +1,11 @@
+--- NUT-Monitor~ 2012-04-03 12:04:09.000000000 +0200
++++ NUT-Monitor 2012-04-03 12:05:32.949730947 +0200
+@@ -888,7 +888,7 @@
+
+ # Init the localisation
+ APP = "NUT-Monitor"
+- DIR = "locale"
++ DIR = "/usr/share/locale"
+
+ gettext.bindtextdomain( APP, DIR )
+ gettext.textdomain( APP )
diff --git a/net-misc/nut-monitor/metadata.xml b/net-misc/nut-monitor/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/net-misc/nut-monitor/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/nut-monitor/nut-monitor-1.3-r2.ebuild b/net-misc/nut-monitor/nut-monitor-1.3-r2.ebuild
new file mode 100644
index 000000000000..2e430a9de4ca
--- /dev/null
+++ b/net-misc/nut-monitor/nut-monitor-1.3-r2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+PYTHON_DEPEND="2"
+
+inherit eutils python
+
+DESCRIPTION="A graphical application to monitor and manage UPSes connected to a NUT server"
+HOMEPAGE="http://www.lestat.st/informatique/projets/nut-monitor-en/"
+SRC_URI="http://www.lestat.st/_media/informatique/projets/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="linguas_fr"
+
+RDEPEND="dev-python/pygtk
+ dev-python/pynut"
+DEPEND=""
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-paths.patch
+ epatch "${FILESDIR}"/${P}-paths2.patch
+ python_convert_shebangs -r 2 .
+}
+
+src_install() {
+ dobin NUT-Monitor
+ dosym NUT-Monitor /usr/bin/${PN}
+
+ insinto /usr/share/nut-monitor
+ doins gui-${PV}.glade
+
+ dodir /usr/share/nut-monitor/pixmaps
+ insinto /usr/share/nut-monitor/pixmaps
+ doins pixmaps/*
+
+ doicon ${PN}.png
+ domenu ${PN}.desktop
+
+ dodoc README
+
+ if use linguas_fr; then
+ insinto /usr/share/locale/fr/LC_MESSAGES/
+ doins locale/fr/LC_MESSAGES/NUT-Monitor.mo
+ fi
+}
diff --git a/net-misc/nx/Manifest b/net-misc/nx/Manifest
new file mode 100644
index 000000000000..41c7275c9513
--- /dev/null
+++ b/net-misc/nx/Manifest
@@ -0,0 +1,4 @@
+DIST nx-libs-3.5.0.20-full.tar.gz 21875905 SHA256 ce53b1c1cc5115d1303b652099c7b7e1a50a996ff0f136853a6fd54bb5668da8 SHA512 0cecdde638c454e6bf48cb73037a0b6651eda4cf93c5953f678a122219df6c06cea70509b044482ea1b630ae413b26a701341b20d55347b57170517aa9709eef WHIRLPOOL a2d8e64db333d02ca22d0d0a8e9e2ea97199fb3315af8cb60ffd617a8e8a0b2851ce87d912d40c3cd00e7455a67a096ac48360a5a1df2ffb4c627ecd0dbed513
+DIST nx-libs-3.5.0.28-full.tar.gz 15589759 SHA256 c0448884f35280f92db639a91d3f3a35b3b57581949bd3a4b9da0ae685b57429 SHA512 1139e1f48f566fc9c5ef105ba5f674e6a3881f75b96fc0e1dbdc9e450b53bcf3a29d2422573b69e240840c2941cee67efc96f2024b24f69068c4abebee42660c WHIRLPOOL 4e062aea33fe2d2ac2ffa6baba29cab3a91c6d34cc3b35e95219de83f22ae1e77d55d4b77502a96ad3bd8dc0a3c500e839ec1dbae6b5c98f74baf70bd2ebfcce
+DIST nx-libs-3.5.0.30-full.tar.gz 6639925 SHA256 60bf86a41f6e7a04a17d5fb471f77a37045c11e06e5e0786b3dc959bb6a3fc5a SHA512 223c73de1b8988d17a555a7dd56c14ddc27855b7c1d9a9b28c053161a707520c1fcef697c3d9148222dae23e1465e72821455271477ac835d5cc63498b45e005 WHIRLPOOL eebd82ff2e7b434840c1f2a451edfdf454903a28b4d9861d1c568308443bff6a05082cd73a446049c840d75bb9b107aab16c6c85fa48529b445ee3b3ac77eb24
+DIST nx-libs-3.5.0.32-full.tar.gz 6801696 SHA256 be166390ed7c08b96bd62f1e93910d720d105c679481bc389e833003da2a226d SHA512 8b4a042993d45e1aee3e13e8b86f68cd5b2a8b52e9299de6129abd8e3bb89d73cf2b44b03d3c7fabbd8329abc06dc912ac95bbf936b6478b05fc202cc29a090f WHIRLPOOL 5d97b83ad66ee51b676e15102f0fade974a619840b1e180607062e6694e7eebddf3bceb85324bc59c976d468b283eaa4e99c0a609b707cdae03096d92fab81e5
diff --git a/net-misc/nx/files/1.5.0/nx-x11-1.5.0-tmp-exec.patch b/net-misc/nx/files/1.5.0/nx-x11-1.5.0-tmp-exec.patch
new file mode 100644
index 000000000000..ece22145c47f
--- /dev/null
+++ b/net-misc/nx/files/1.5.0/nx-x11-1.5.0-tmp-exec.patch
@@ -0,0 +1,11 @@
+--- nx-X11/config/imake/imake.c.orig 2006-11-05 00:10:49.000000000 +0000
++++ nx-X11/config/imake/imake.c 2006-11-05 00:11:49.000000000 +0000
+@@ -974,7 +974,7 @@
+ static void
+ get_libc_version(FILE *inFile)
+ {
+- char aout[] = "/tmp/imakeXXXXXX";
++ char aout[] = "./imakeXXXXXX";
+ FILE *fp;
+ const char *format = "%s -o %s -x c -";
+ char *cc;
diff --git a/net-misc/nx/files/1.5.0/nxcomp-1.5.0-pic.patch b/net-misc/nx/files/1.5.0/nxcomp-1.5.0-pic.patch
new file mode 100644
index 000000000000..2ccaf978dd09
--- /dev/null
+++ b/net-misc/nx/files/1.5.0/nxcomp-1.5.0-pic.patch
@@ -0,0 +1,20 @@
+--- nxcomp/Makefile.in.agriffis 2005-11-12 12:48:42.000000000 -0500
++++ nxcomp/Makefile.in 2005-12-15 12:24:46.000000000 -0500
+@@ -32,7 +32,7 @@
+
+ CXX = @CXX@
+ CXXFLAGS = @CXXFLAGS@ @X_CFLAGS@ @DEFS@ \
+- -Wall -Wpointer-arith
++ -Wall -Wpointer-arith -fPIC
+ CXXINCLUDES =
+ CXXDEFINES =
+
+@@ -42,7 +42,7 @@
+
+ CC = @CC@
+ CCFLAGS = @CFLAGS@ @X_CFLAGS@ @DEFS@ \
+- -Wall -Wpointer-arith
++ -Wall -Wpointer-arith -fPIC
+ CCINCLUDES =
+ CCDEFINES =
+
diff --git a/net-misc/nx/files/nx-3.2.0-nxproxy_read_from_stdin.patch b/net-misc/nx/files/nx-3.2.0-nxproxy_read_from_stdin.patch
new file mode 100644
index 000000000000..bce692d10a7a
--- /dev/null
+++ b/net-misc/nx/files/nx-3.2.0-nxproxy_read_from_stdin.patch
@@ -0,0 +1,68 @@
+--- Main.c.old 2007-07-18 17:39:13.000000000 +0200
++++ Main.c 2008-03-12 04:40:30.000000000 +0100
+@@ -36,28 +36,48 @@
+ int result = -1;
+
+ char *options = NULL;
+-
++
++ char *nx_commfd_str = NULL;
++
+ options = getenv("NX_DISPLAY");
+-
+- if (NXTransParseCommandLine(argc, argv) < 0)
++
++ if ((nx_commfd_str = getenv("NX_COMMFD")) != NULL)
+ {
+- NXTransCleanup();
+- }
++ int nx_commfd = atoi(nx_commfd_str);
+
+- if (NXTransParseEnvironment(options, 0) < 0)
+- {
+- NXTransCleanup();
++ if (result)
++ result = NXTransCreate(nx_commfd, NX_MODE_SERVER, options);
++
++ // go into endless loop
++
++ if (result)
++ {
++ while (NXTransRunning(NX_FD_ANY))
++ result = NXTransContinue(NULL);
++ }
+ }
++ else
++ {
++ if (NXTransParseCommandLine(argc, argv) < 0)
++ {
++ NXTransCleanup();
++ }
++
++ if (NXTransParseEnvironment(options, 0) < 0)
++ {
++ NXTransCleanup();
++ }
++
++ /*
++ * This should not return...
++ */
++
++ #ifdef TEST
++ fprintf(stderr, "Main: Yielding control to NX entry point.\n");
++ #endif
+
+- /*
+- * This should not return...
+- */
+-
+- #ifdef TEST
+- fprintf(stderr, "Main: Yielding control to NX entry point.\n");
+- #endif
+-
+- result = NXTransProxy(NX_FD_ANY, NX_MODE_ANY, NX_DISPLAY_ANY);
++ result = NXTransProxy(NX_FD_ANY, NX_MODE_ANY, NX_DISPLAY_ANY);
++ }
+
+ /*
+ * ...So these should not be called.
diff --git a/net-misc/nx/files/nx-3.3.0-cflags.patch b/net-misc/nx/files/nx-3.3.0-cflags.patch
new file mode 100644
index 000000000000..35562939c5b2
--- /dev/null
+++ b/net-misc/nx/files/nx-3.3.0-cflags.patch
@@ -0,0 +1,54 @@
+--- nxcomp/configure.in.orig 2008-12-18 15:48:09.000000000 +0100
++++ nxcomp/configure.in 2008-12-18 15:54:14.000000000 +0100
+@@ -7,8 +7,7 @@
+
+ dnl Set our default compilation flags.
+
+-CXXFLAGS="-O3 -fno-rtti -fno-exceptions"
+-CFLAGS="-O3"
++CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions"
+
+ dnl Reset default linking directives.
+
+--- nxcompext/configure.in.orig 2008-12-18 15:55:29.000000000 +0100
++++ nxcompext/configure.in 2008-12-18 15:55:51.000000000 +0100
+@@ -5,11 +5,6 @@
+ AC_INIT(NXlib.h)
+ AC_PREREQ(2.13)
+
+-dnl Reset default compilation flags.
+-
+-CXXFLAGS="-O3"
+-CFLAGS="-O3"
+-
+ dnl Reset default linking directives.
+
+ LIBSTATIC=""
+--- nxcompshad/configure.in.orig 2008-12-18 15:56:13.000000000 +0100
++++ nxcompshad/configure.in 2008-12-18 15:56:22.000000000 +0100
+@@ -5,11 +5,6 @@
+ AC_INIT(Shadow.h)
+ AC_PREREQ(2.13)
+
+-dnl Reset default compilation flags.
+-
+-CXXFLAGS="-O3"
+-CPPFLAGS="-O3"
+-
+ dnl Reset default linking directives.
+
+ LIBSTATIC=""
+--- nxproxy/configure.in.orig 2008-12-18 15:57:48.000000000 +0100
++++ nxproxy/configure.in 2008-12-18 15:57:55.000000000 +0100
+@@ -5,11 +5,6 @@
+ AC_INIT(Main.c)
+ AC_PREREQ(2.13)
+
+-dnl Reset default compilation flags.
+-
+-CXXFLAGS="-O3"
+-CPPFLAGS="-O3"
+-
+ dnl Prefer headers and libraries from nx-X11 if present.
+
+ if test -d "../nx-X11/exports/include" ; then
diff --git a/net-misc/nx/files/nx-3.5.0.17-cflags_ar_ranlib.patch b/net-misc/nx/files/nx-3.5.0.17-cflags_ar_ranlib.patch
new file mode 100644
index 000000000000..668a6bf4c310
--- /dev/null
+++ b/net-misc/nx/files/nx-3.5.0.17-cflags_ar_ranlib.patch
@@ -0,0 +1,100 @@
+diff -Naur nx-libs-3.5.0.17.orig/nxcomp/Makefile.in nx-libs-3.5.0.17/nxcomp/Makefile.in
+--- nx-libs-3.5.0.17.orig/nxcomp/Makefile.in 2013-01-09 15:03:33.152952758 +0100
++++ nx-libs-3.5.0.17/nxcomp/Makefile.in 2013-01-09 15:05:39.771898159 +0100
+@@ -243,8 +243,8 @@
+
+ $(LIBARCHIVE): $(CXXOBJ) $(COBJ)
+ rm -f $(LIBARCHIVE)
+- ar clq $(LIBARCHIVE) $(CXXOBJ) $(COBJ)
+- ranlib $(LIBARCHIVE)
++ $(AR) $(LIBARCHIVE) $(CXXOBJ) $(COBJ)
++ $(RANLIB) $(LIBARCHIVE)
+
+ $(LIBCYGSHARED): $(LIBARCHIVE)
+ $(CC) -shared -o $(LIBCYGSHARED) \
+diff -Naur nx-libs-3.5.0.17.orig/nxcomp/configure.in nx-libs-3.5.0.17/nxcomp/configure.in
+--- nx-libs-3.5.0.17.orig/nxcomp/configure.in 2013-01-09 15:03:33.151952758 +0100
++++ nx-libs-3.5.0.17/nxcomp/configure.in 2013-01-09 15:04:03.312940892 +0100
+@@ -7,8 +7,7 @@
+
+ dnl Set our default compilation flags.
+
+-CXXFLAGS="$CXXFLAGS -O3 -fno-rtti -fno-exceptions"
+-CFLAGS="$CFLAGS -O3"
++CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions"
+
+ dnl Reset default linking directives.
+
+diff -Naur nx-libs-3.5.0.17.orig/nxcompext/Makefile.in nx-libs-3.5.0.17/nxcompext/Makefile.in
+--- nx-libs-3.5.0.17.orig/nxcompext/Makefile.in 2013-01-09 15:03:33.164952753 +0100
++++ nx-libs-3.5.0.17/nxcompext/Makefile.in 2013-01-09 15:06:08.747879052 +0100
+@@ -125,8 +125,8 @@
+
+ $(LIBARCHIVE): $(CXXOBJ) $(COBJ)
+ rm -f $(LIBARCHIVE)
+- ar clq $(LIBARCHIVE) $(CXXOBJ) $(COBJ)
+- ranlib $(LIBARCHIVE)
++ $(AR) $(LIBARCHIVE) $(CXXOBJ) $(COBJ)
++ $(RANLIB) $(LIBARCHIVE)
+
+ $(LIBCYGSHARED): $(LIBARCHIVE)
+ $(CC) -shared -o $(LIBCYGSHARED) \
+diff -Naur nx-libs-3.5.0.17.orig/nxcompext/configure.in nx-libs-3.5.0.17/nxcompext/configure.in
+--- nx-libs-3.5.0.17.orig/nxcompext/configure.in 2013-01-09 15:03:33.164952753 +0100
++++ nx-libs-3.5.0.17/nxcompext/configure.in 2013-01-09 15:04:16.247935801 +0100
+@@ -5,11 +5,6 @@
+ AC_INIT(NXlib.h)
+ AC_PREREQ(2.13)
+
+-dnl Reset default compilation flags.
+-
+-CXXFLAGS="$CXXFLAGS -O3"
+-CFLAGS="$CFLAGS -O3"
+-
+ dnl Reset default linking directives.
+
+ LIBSTATIC=""
+diff -Naur nx-libs-3.5.0.17.orig/nxcompshad/Makefile.in nx-libs-3.5.0.17/nxcompshad/Makefile.in
+--- nx-libs-3.5.0.17.orig/nxcompshad/Makefile.in 2013-01-09 15:03:33.163952754 +0100
++++ nx-libs-3.5.0.17/nxcompshad/Makefile.in 2013-01-09 15:06:16.933873660 +0100
+@@ -158,8 +158,8 @@
+
+ $(LIBARCHIVE): $(CXXOBJ) $(COBJ)
+ rm -f $(LIBARCHIVE)
+- ar clq $(LIBARCHIVE) $(CXXOBJ) $(COBJ)
+- ranlib $(LIBARCHIVE)
++ $(AR) $(LIBARCHIVE) $(CXXOBJ) $(COBJ)
++ $(RANLIB) $(LIBARCHIVE)
+
+ $(LIBDLL): $(LIBARCHIVE)
+ $(CC) -o $@ \
+diff -Naur nx-libs-3.5.0.17.orig/nxcompshad/configure.in nx-libs-3.5.0.17/nxcompshad/configure.in
+--- nx-libs-3.5.0.17.orig/nxcompshad/configure.in 2013-01-09 15:03:33.163952754 +0100
++++ nx-libs-3.5.0.17/nxcompshad/configure.in 2013-01-09 15:04:20.073934295 +0100
+@@ -5,11 +5,6 @@
+ AC_INIT(Shadow.h)
+ AC_PREREQ(2.13)
+
+-dnl Reset default compilation flags.
+-
+-CXXFLAGS="$CXXFLAGS -O3"
+-CPPFLAGS="$CPPFLAGS -O3"
+-
+ dnl Reset default linking directives.
+
+ LIBSTATIC=""
+diff -Naur nx-libs-3.5.0.17.orig/nxproxy/configure.in nx-libs-3.5.0.17/nxproxy/configure.in
+--- nx-libs-3.5.0.17.orig/nxproxy/configure.in 2013-01-09 15:03:33.163952754 +0100
++++ nx-libs-3.5.0.17/nxproxy/configure.in 2013-01-09 15:04:24.842932418 +0100
+@@ -5,11 +5,6 @@
+ AC_INIT(Main.c)
+ AC_PREREQ(2.13)
+
+-dnl Reset default compilation flags.
+-
+-CXXFLAGS="$CXXFLAGS -O3"
+-CPPFLAGS="$CPPFLAGS -O3"
+-
+ dnl Prefer headers and libraries from nx-X11 if present.
+
+ if test -d "../nx-X11/exports/include" ; then
diff --git a/net-misc/nx/files/nx-3.5.0.30-fix_X11_underlinking.patch b/net-misc/nx/files/nx-3.5.0.30-fix_X11_underlinking.patch
new file mode 100644
index 000000000000..87d73c5a8d37
--- /dev/null
+++ b/net-misc/nx/files/nx-3.5.0.30-fix_X11_underlinking.patch
@@ -0,0 +1,11 @@
+--- nx-X11/lib/X11/Imakefile.orig 2015-04-24 15:24:36.171666957 +0200
++++ nx-X11/lib/X11/Imakefile 2015-04-24 15:25:17.516179627 +0200
+@@ -107,7 +107,7 @@
+ EXCLUDE_SYMBOL = -Wl,--exclude-symbol,XdmcpWrap:_XdmcpWrapperToOddParity
+ #endif
+
+-REQUIREDLIBS=$(REQUIREDX11LIBS) $(REQUIREDI18NLIBS) $(EXCLUDE_SYMBOL) $(NX_REQUIREDLIBS)
++REQUIREDLIBS=$(REQUIREDX11LIBS) $(REQUIREDI18NLIBS) $(EXCLUDE_SYMBOL) $(NX_REQUIREDLIBS) -ldl
+
+ #if defined(MacIIArchitecture) || defined(SequentArchitecture) || defined(i386ScoArchitecture)
+ XBSDLIB = /**/
diff --git a/net-misc/nx/metadata.xml b/net-misc/nx/metadata.xml
new file mode 100644
index 000000000000..1255cb0c9dc0
--- /dev/null
+++ b/net-misc/nx/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>nx</herd>
+<longdescription>Special versions of the X11 libraries to support NX compression</longdescription>
+</pkgmetadata>
diff --git a/net-misc/nx/nx-3.5.0.20.ebuild b/net-misc/nx/nx-3.5.0.20.ebuild
new file mode 100644
index 000000000000..013c10c10fbb
--- /dev/null
+++ b/net-misc/nx/nx-3.5.0.20.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils multilib
+
+DESCRIPTION="NX compression technology core libraries"
+HOMEPAGE="http://www.x2go.org/doku.php/wiki:libs:nx-libs"
+
+SRC_URI="http://code.x2go.org/releases/source/nx-libs/nx-libs-${PV}-full.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="elibc_glibc"
+
+RDEPEND=">=media-libs/libpng-1.2.8
+ >=sys-libs/zlib-1.2.3
+ virtual/jpeg"
+
+DEPEND="${RDEPEND}
+ x11-misc/gccmakedep
+ x11-misc/imake
+ x11-proto/inputproto"
+
+S=${WORKDIR}/nx-libs-${PV}
+
+src_prepare() {
+ # For nxcl/qtnx
+ cd "${S}"/nxproxy
+ epatch "${FILESDIR}"/${PN}-3.2.0-nxproxy_read_from_stdin.patch
+
+ cd "${S}"
+ # Fix sandbox violation
+ epatch "${FILESDIR}"/1.5.0/nx-x11-1.5.0-tmp-exec.patch
+ # -fPIC
+ epatch "${FILESDIR}"/1.5.0/nxcomp-1.5.0-pic.patch
+ # Drop force -O3, set AR/RANLIB and
+ # run autoreconf in all neeed folders
+ epatch "${FILESDIR}"/${PN}-3.5.0.17-cflags_ar_ranlib.patch
+ for i in nxcomp nxcompext nxcompshad nxproxy; do
+ cd "${S}"/${i}
+ eautoreconf ${i}
+ cd "${S}"
+ done
+
+ # From xorg-x11-6.9.0-r3.ebuild
+ cd "${S}/nx-X11"
+ HOSTCONF="config/cf/host.def"
+ echo "#define CcCmd $(tc-getCC)" >> ${HOSTCONF}
+ echo "#define OptimizedCDebugFlags ${CFLAGS} GccAliasingArgs" >> ${HOSTCONF}
+ echo "#define OptimizedCplusplusDebugFlags ${CXXFLAGS} GccAliasingArgs" >> ${HOSTCONF}
+ # Respect LDFLAGS
+ echo "#define ExtraLoadFlags ${LDFLAGS}" >> ${HOSTCONF}
+ echo "#define SharedLibraryLoadFlags -shared ${LDFLAGS}" >> ${HOSTCONF}
+}
+
+src_configure() {
+ cd "${S}"/nxproxy
+ econf
+}
+
+src_compile() {
+ cd "${S}/nx-X11"
+ FAST=1 emake World WORLDOPTS="" MAKE="make" \
+ AR="$(tc-getAR) clq" RANLIB="$(tc-getRANLIB)" \
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)"
+
+ cd "${S}"/nxproxy
+ emake
+}
+
+src_install() {
+ NX_ROOT=/usr/$(get_libdir)/NX
+
+ for x in nxagent nxauth nxproxy; do
+ make_wrapper $x ./$x ${NX_ROOT}/bin ${NX_ROOT}/$(get_libdir) ||
+ die " $x wrapper creation failed"
+ done
+
+ into ${NX_ROOT}
+ dobin "${S}"/nx-X11/programs/Xserver/nxagent
+ dobin "${S}"/nx-X11/programs/nxauth/nxauth
+ dobin "${S}"/nxproxy/nxproxy
+
+ for lib in X11 Xau Xcomposite Xdamage Xdmcp Xext Xfixes Xinerama Xpm Xrandr Xrender Xtst;
+ do
+ dolib.so "${S}"/nx-X11/lib/${lib}/libNX_${lib}.so*
+ done
+ dolib.so "${S}"/nx-X11/lib/freetype2/libNX_freetype.so*
+
+ dolib.so "${S}"/nxcomp/libXcomp.so*
+ dolib.so "${S}"/nxcompext/libXcompext.so*
+ dolib.so "${S}"/nxcompshad/libXcompshad.so*
+}
diff --git a/net-misc/nx/nx-3.5.0.28.ebuild b/net-misc/nx/nx-3.5.0.28.ebuild
new file mode 100644
index 000000000000..df7a2bf6d49e
--- /dev/null
+++ b/net-misc/nx/nx-3.5.0.28.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils multilib readme.gentoo
+
+DESCRIPTION="NX compression technology core libraries"
+HOMEPAGE="http://www.x2go.org/doku.php/wiki:libs:nx-libs"
+
+SRC_URI="http://code.x2go.org/releases/source/nx-libs/nx-libs-${PV}-full.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="elibc_glibc"
+
+RDEPEND="media-libs/freetype:2
+ >=media-libs/libpng-1.2.8:*
+ >=sys-libs/zlib-1.2.3
+ virtual/jpeg:*"
+
+DEPEND="${RDEPEND}
+ x11-libs/libfontenc
+ x11-misc/gccmakedep
+ x11-misc/imake
+ x11-proto/inputproto"
+
+S=${WORKDIR}/nx-libs-${PV}
+
+DOC_CONTENTS="If you get problems with rendering gtk+ apps, enable the xlib-xcb
+useflag on x11-libs/cairo."
+
+src_prepare() {
+ # For nxcl/qtnx
+ cd "${S}"/nxproxy
+ epatch "${FILESDIR}"/${PN}-3.2.0-nxproxy_read_from_stdin.patch
+
+ cd "${S}"
+ # -fPIC
+ epatch "${FILESDIR}"/1.5.0/nxcomp-1.5.0-pic.patch
+ # Drop force -O3, set AR/RANLIB and
+ # run autoreconf in all neeed folders
+ epatch "${FILESDIR}"/${PN}-3.5.0.17-cflags_ar_ranlib.patch
+ for i in nxcomp nxcompext nxcompshad nxproxy; do
+ cd "${S}"/${i}
+ eautoreconf ${i}
+ cd "${S}"
+ done
+
+ # From xorg-x11-6.9.0-r3.ebuild
+ cd "${S}/nx-X11"
+ HOSTCONF="config/cf/host.def"
+ echo "#define CcCmd $(tc-getCC)" >> ${HOSTCONF}
+ echo "#define OptimizedCDebugFlags ${CFLAGS} GccAliasingArgs" >> ${HOSTCONF}
+ echo "#define OptimizedCplusplusDebugFlags ${CXXFLAGS} GccAliasingArgs" >> ${HOSTCONF}
+ # Respect LDFLAGS
+ echo "#define ExtraLoadFlags ${LDFLAGS}" >> ${HOSTCONF}
+ echo "#define SharedLibraryLoadFlags -shared ${LDFLAGS}" >> ${HOSTCONF}
+}
+
+src_configure() {
+ cd "${S}"/nxproxy
+ econf
+}
+
+src_compile() {
+ cd "${S}/nx-X11"
+ FAST=1 emake World WORLDOPTS="" MAKE="make" \
+ AR="$(tc-getAR) clq" RANLIB="$(tc-getRANLIB)" \
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)"
+
+ cd "${S}"/nxproxy
+ emake
+}
+
+src_install() {
+ NX_ROOT=/usr/$(get_libdir)/NX
+
+ for x in nxagent nxauth nxproxy; do
+ make_wrapper $x ./$x ${NX_ROOT}/bin ${NX_ROOT}/$(get_libdir) ||
+ die " $x wrapper creation failed"
+ done
+
+ into ${NX_ROOT}
+ dobin "${S}"/nx-X11/programs/Xserver/nxagent
+ dobin "${S}"/nx-X11/programs/nxauth/nxauth
+ dobin "${S}"/nxproxy/nxproxy
+
+ for lib in X11 Xau Xcomposite Xdamage Xdmcp Xext Xfixes Xinerama Xpm Xrandr Xrender Xtst;
+ do
+ dolib.so "${S}"/nx-X11/lib/${lib}/libNX_${lib}.so*
+ done
+
+ dolib.so "${S}"/nxcomp/libXcomp.so*
+ dolib.so "${S}"/nxcompext/libXcompext.so*
+ dolib.so "${S}"/nxcompshad/libXcompshad.so*
+
+ insinto /etc/nxagent
+ newins etc/keystrokes.cfg keystroke.cfg
+ doicon nx-X11/programs/Xserver/hw/nxagent/x2go.xpm
+
+ readme.gentoo_create_doc
+}
diff --git a/net-misc/nx/nx-3.5.0.30.ebuild b/net-misc/nx/nx-3.5.0.30.ebuild
new file mode 100644
index 000000000000..81c2afd399cc
--- /dev/null
+++ b/net-misc/nx/nx-3.5.0.30.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils multilib readme.gentoo
+
+DESCRIPTION="NX compression technology core libraries"
+HOMEPAGE="http://www.x2go.org/doku.php/wiki:libs:nx-libs"
+
+SRC_URI="http://code.x2go.org/releases/source/nx-libs/nx-libs-${PV}-full.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="elibc_glibc"
+
+RDEPEND="media-libs/freetype:2
+ >=media-libs/libpng-1.2.8:*
+ >=sys-libs/zlib-1.2.3
+ virtual/jpeg:*"
+
+DEPEND="${RDEPEND}
+ x11-libs/libfontenc
+ x11-misc/gccmakedep
+ x11-misc/imake
+ x11-proto/inputproto"
+
+S=${WORKDIR}/nx-libs-${PV}
+
+DOC_CONTENTS="If you get problems with rendering gtk+ apps, enable the xlib-xcb
+useflag on x11-libs/cairo."
+
+src_prepare() {
+ # For nxcl/qtnx
+ cd "${S}"/nxproxy
+ epatch "${FILESDIR}"/${PN}-3.2.0-nxproxy_read_from_stdin.patch
+
+ cd "${S}"
+ # -fPIC
+ epatch "${FILESDIR}"/1.5.0/nxcomp-1.5.0-pic.patch
+ # Drop force -O3, set AR/RANLIB
+ epatch "${FILESDIR}"/${PN}-3.5.0.17-cflags_ar_ranlib.patch
+ # Fix libX11 underlinking, #546868
+ epatch "${FILESDIR}"/${P}-fix_X11_underlinking.patch
+
+ # run autoreconf in all neeed folders
+ for i in nxcomp nxcompext nxcompshad nxproxy; do
+ cd "${S}"/${i}
+ eautoreconf ${i}
+ cd "${S}"
+ done
+
+ # From xorg-x11-6.9.0-r3.ebuild
+ cd "${S}/nx-X11"
+ HOSTCONF="config/cf/host.def"
+ echo "#define CcCmd $(tc-getCC)" >> ${HOSTCONF}
+ echo "#define OptimizedCDebugFlags ${CFLAGS} GccAliasingArgs" >> ${HOSTCONF}
+ echo "#define OptimizedCplusplusDebugFlags ${CXXFLAGS} GccAliasingArgs" >> ${HOSTCONF}
+ # Respect LDFLAGS
+ echo "#define ExtraLoadFlags ${LDFLAGS}" >> ${HOSTCONF}
+ echo "#define SharedLibraryLoadFlags -shared ${LDFLAGS}" >> ${HOSTCONF}
+}
+
+src_configure() {
+ cd "${S}"/nxproxy
+ econf
+}
+
+src_compile() {
+ cd "${S}/nx-X11"
+ FAST=1 emake World WORLDOPTS="" MAKE="make" \
+ AR="$(tc-getAR) clq" RANLIB="$(tc-getRANLIB)" \
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)"
+
+ cd "${S}"/nxproxy
+ emake
+}
+
+src_install() {
+ NX_ROOT=/usr/$(get_libdir)/NX
+
+ for x in nxagent nxauth nxproxy; do
+ make_wrapper $x ./$x ${NX_ROOT}/bin ${NX_ROOT}/$(get_libdir) ||
+ die " $x wrapper creation failed"
+ done
+
+ into ${NX_ROOT}
+ dobin "${S}"/nx-X11/programs/Xserver/nxagent
+ dobin "${S}"/nx-X11/programs/nxauth/nxauth
+ dobin "${S}"/nxproxy/nxproxy
+
+ for lib in X11 Xau Xcomposite Xdamage Xdmcp Xext Xfixes Xinerama Xpm Xrandr Xrender Xtst;
+ do
+ dolib.so "${S}"/nx-X11/lib/${lib}/libNX_${lib}.so*
+ done
+
+ dolib.so "${S}"/nxcomp/libXcomp.so*
+ dolib.so "${S}"/nxcompext/libXcompext.so*
+ dolib.so "${S}"/nxcompshad/libXcompshad.so*
+
+ insinto /etc/nxagent
+ newins etc/keystrokes.cfg keystroke.cfg
+ doicon nx-X11/programs/Xserver/hw/nxagent/x2go.xpm
+
+ readme.gentoo_create_doc
+}
diff --git a/net-misc/nx/nx-3.5.0.32.ebuild b/net-misc/nx/nx-3.5.0.32.ebuild
new file mode 100644
index 000000000000..8b8d831417d8
--- /dev/null
+++ b/net-misc/nx/nx-3.5.0.32.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils multilib readme.gentoo
+
+DESCRIPTION="NX compression technology core libraries"
+HOMEPAGE="http://www.x2go.org/doku.php/wiki:libs:nx-libs"
+
+SRC_URI="http://code.x2go.org/releases/source/nx-libs/nx-libs-${PV}-full.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="elibc_glibc"
+
+RDEPEND="media-libs/freetype:2
+ >=media-libs/libpng-1.2.8:*
+ >=sys-libs/zlib-1.2.3
+ virtual/jpeg:*"
+
+DEPEND="${RDEPEND}
+ x11-libs/libfontenc
+ x11-misc/gccmakedep
+ x11-misc/imake
+ x11-proto/inputproto"
+
+S=${WORKDIR}/nx-libs-${PV}
+
+DOC_CONTENTS="If you get problems with rendering gtk+ apps, enable the xlib-xcb
+useflag on x11-libs/cairo."
+
+src_prepare() {
+ # For nxcl/qtnx
+ cd "${S}"/nxproxy
+ epatch "${FILESDIR}"/${PN}-3.2.0-nxproxy_read_from_stdin.patch
+
+ cd "${S}"
+ # -fPIC
+ epatch "${FILESDIR}"/1.5.0/nxcomp-1.5.0-pic.patch
+ # Drop force -O3, set AR/RANLIB
+ epatch "${FILESDIR}"/${PN}-3.5.0.17-cflags_ar_ranlib.patch
+
+ # run autoreconf in all neeed folders
+ for i in nxcomp nxcompext nxcompshad nxproxy; do
+ cd "${S}"/${i}
+ eautoreconf ${i}
+ cd "${S}"
+ done
+
+ # From xorg-x11-6.9.0-r3.ebuild
+ cd "${S}/nx-X11"
+ HOSTCONF="config/cf/host.def"
+ echo "#define CcCmd $(tc-getCC)" >> ${HOSTCONF}
+ echo "#define OptimizedCDebugFlags ${CFLAGS} GccAliasingArgs" >> ${HOSTCONF}
+ echo "#define OptimizedCplusplusDebugFlags ${CXXFLAGS} GccAliasingArgs" >> ${HOSTCONF}
+ # Respect LDFLAGS
+ echo "#define ExtraLoadFlags ${LDFLAGS}" >> ${HOSTCONF}
+ echo "#define SharedLibraryLoadFlags -shared ${LDFLAGS}" >> ${HOSTCONF}
+}
+
+src_configure() {
+ cd "${S}"/nxproxy
+ econf
+}
+
+src_compile() {
+ cd "${S}/nx-X11"
+ FAST=1 emake World WORLDOPTS="" MAKE="make" \
+ AR="$(tc-getAR) clq" RANLIB="$(tc-getRANLIB)" \
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)"
+
+ cd "${S}"/nxproxy
+ emake
+}
+
+src_install() {
+ NX_ROOT=/usr/$(get_libdir)/NX
+
+ for x in nxagent nxauth nxproxy; do
+ make_wrapper $x ./$x ${NX_ROOT}/bin ${NX_ROOT}/$(get_libdir) ||
+ die " $x wrapper creation failed"
+ done
+
+ into ${NX_ROOT}
+ dobin "${S}"/nx-X11/programs/Xserver/nxagent
+ dobin "${S}"/nx-X11/programs/nxauth/nxauth
+ dobin "${S}"/nxproxy/nxproxy
+
+ for lib in X11 Xau Xcomposite Xdamage Xdmcp Xext Xfixes Xinerama Xpm Xrandr Xrender Xtst;
+ do
+ dolib.so "${S}"/nx-X11/lib/${lib}/libNX_${lib}.so*
+ done
+
+ dolib.so "${S}"/nxcomp/libXcomp.so*
+ dolib.so "${S}"/nxcompext/libXcompext.so*
+ dolib.so "${S}"/nxcompshad/libXcompshad.so*
+
+ insinto /etc/nxagent
+ newins etc/keystrokes.cfg keystroke.cfg
+ doicon nx-X11/programs/Xserver/hw/nxagent/x2go.xpm
+
+ readme.gentoo_create_doc
+}
diff --git a/net-misc/nxplayer/Manifest b/net-misc/nxplayer/Manifest
new file mode 100644
index 000000000000..af34d689c355
--- /dev/null
+++ b/net-misc/nxplayer/Manifest
@@ -0,0 +1,4 @@
+DIST nomachine-enterprise-client_4.6.12_7_i686.tar.gz 45504 SHA256 066cab4676426c9631c281ab38111d41326592c63ce3c189b4e93d3f05c89073 SHA512 04bf0112688a969ec1a68c1a083bdc3f365fbf439a1d9555cb2b7edc9032981ee9c37d659893c0acc4548f892f2a18eba980f450ed44f581f7c532f485f31649 WHIRLPOOL a6513bd5b731d889ad311d77cc9af9e5ca3c727f9694c0fc7f8b03a111b63d9690f1981c9285bee25815da025d89a850943a38a008a301f23c8fd07d4deec1bd
+DIST nomachine-enterprise-client_4.6.12_7_x86_64.tar.gz 24170379 SHA256 2dc1ad80a2ad829346009ad4f8aa9d3d3b097b70d8f929100fb79e01fcb4b403 SHA512 fbbc9dac184b14a025807d82aa4d4e28654f2e1aed2f76adb83885719a4ebf0b91f68befb798662bf55e9dacbcf3db2e533d2901e5bce2e094f486dbb4df61e7 WHIRLPOOL 63449a1c130dce99936748048f6b84c14122000edb3f2da6f5daa46e67d555036341aa180c446af76363188490e3951e5d2d3bb63d3d7ce1e58a2db5548f5058
+DIST nomachine-enterprise-client_4.6.3_13_i686.tar.gz 45394 SHA256 f7b364e338c74a7d1f56c45d0f56d4f91f1e3639915a51d38a6bf322ccdf6ab8 SHA512 366f007270a13b12ad47c8d1333f29c9632dfa2cab9f50317657470457d7ea842eab650258f77f0d7b44953d4e6b8d54342d6ba1f459c4a06ed17d8b62dea4ef WHIRLPOOL 2e7d5265a2a687fe151f70197331bd9878b4a0cc5e32bd18f91258cf626c68320e63b7b4ae9ac3c924845b4b7a4c42ad2b436d735ea1d490259756054c1ba421
+DIST nomachine-enterprise-client_4.6.3_13_x86_64.tar.gz 24158842 SHA256 3b15e058bcdfa25459bb01be4b81fd84e48b94f07a3e5cb13b7b3a840903cf8e SHA512 2b11ed7c6a4bef0b9f8b549f61de7c79402a6e848ebd0dd3e7b6096f4ae3307779f0d3b2e1e114bddaba6d27f4c395ca7a523ac7e61aae8e99d0c582d45eb642 WHIRLPOOL 05fd422a2b9695c681f300372045ffd2374069b95ea9d7ac29b9279ed5322f37f49503a203f7470d5468f11e8b2f879e940d8cb105d4a45d59f128b9f1a67720
diff --git a/net-misc/nxplayer/metadata.xml b/net-misc/nxplayer/metadata.xml
new file mode 100644
index 000000000000..578fd5e78458
--- /dev/null
+++ b/net-misc/nxplayer/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>nx</herd>
+ <longdescription>Enterprise Client is a free easy-to-use connection interface to allow quick access to your remote host where you have installed one of the NoMachine products. It's available for those who prefer just a standalone client application, rather than the NoMachine server/client app, either because regulatory requirements dictate that thin clients must install \“client-side\” software only, or simply because a scaled-down client app is your personal preference.</longdescription>
+</pkgmetadata>
diff --git a/net-misc/nxplayer/nxplayer-4.6.12.7.ebuild b/net-misc/nxplayer/nxplayer-4.6.12.7.ebuild
new file mode 100644
index 000000000000..191d9bf9b35d
--- /dev/null
+++ b/net-misc/nxplayer/nxplayer-4.6.12.7.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 eutils versionator
+
+MY_P="nomachine-enterprise-client_$(get_version_component_range 1-3)_$(get_version_component_range 4)"
+
+DESCRIPTION="Client for NoMachine remote servers"
+HOMEPAGE="http://www.nomachine.com"
+SRC_URI="amd64? ( http://download.nomachine.com/download/$(get_version_component_range 1-2)/Linux/${MY_P}_x86_64.tar.gz )
+ x86? ( http://download.nomachine.com/download/$(get_version_component_range 1-2)/Linux/${MY_P}_i686.tar.gz )"
+LICENSE="nomachine"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+RESTRICT="strip"
+
+DEPEND=""
+RDEPEND="dev-libs/glib:2
+ dev-libs/openssl:0"
+
+S=${WORKDIR}/NX/etc/NX/player/packages
+
+QA_PREBUILT="*"
+
+src_install()
+{
+ local NXROOT=/opt/NX
+
+# dodir /etc/NX/localhost
+# echo 'PlayerRoot = "'"${NXROOT}"'"' > ${D}/etc/NX/localhost/player.cfg
+
+ dodir /opt
+ tar xozf nxclient.tar.gz -C "${D}"/opt
+ tar xozf nxplayer.tar.gz -C "${D}"/opt
+
+ make_wrapper nxplayer ${NXROOT}/bin/nxplayer ${NXROOT} ${NXROOT}/lib /opt/bin
+}
diff --git a/net-misc/nxplayer/nxplayer-4.6.3.13.ebuild b/net-misc/nxplayer/nxplayer-4.6.3.13.ebuild
new file mode 100644
index 000000000000..191d9bf9b35d
--- /dev/null
+++ b/net-misc/nxplayer/nxplayer-4.6.3.13.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 eutils versionator
+
+MY_P="nomachine-enterprise-client_$(get_version_component_range 1-3)_$(get_version_component_range 4)"
+
+DESCRIPTION="Client for NoMachine remote servers"
+HOMEPAGE="http://www.nomachine.com"
+SRC_URI="amd64? ( http://download.nomachine.com/download/$(get_version_component_range 1-2)/Linux/${MY_P}_x86_64.tar.gz )
+ x86? ( http://download.nomachine.com/download/$(get_version_component_range 1-2)/Linux/${MY_P}_i686.tar.gz )"
+LICENSE="nomachine"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+RESTRICT="strip"
+
+DEPEND=""
+RDEPEND="dev-libs/glib:2
+ dev-libs/openssl:0"
+
+S=${WORKDIR}/NX/etc/NX/player/packages
+
+QA_PREBUILT="*"
+
+src_install()
+{
+ local NXROOT=/opt/NX
+
+# dodir /etc/NX/localhost
+# echo 'PlayerRoot = "'"${NXROOT}"'"' > ${D}/etc/NX/localhost/player.cfg
+
+ dodir /opt
+ tar xozf nxclient.tar.gz -C "${D}"/opt
+ tar xozf nxplayer.tar.gz -C "${D}"/opt
+
+ make_wrapper nxplayer ${NXROOT}/bin/nxplayer ${NXROOT} ${NXROOT}/lib /opt/bin
+}
diff --git a/net-misc/ocsync/Manifest b/net-misc/ocsync/Manifest
new file mode 100644
index 000000000000..a6a19837c1d6
--- /dev/null
+++ b/net-misc/ocsync/Manifest
@@ -0,0 +1,2 @@
+DIST ocsync-0.90.4.tar.bz2 4630698 SHA256 f2146577c977dc82a24e0baf84f3970efc3b004f2730669aae3816f48ff15728 SHA512 74bf6b083ae4d4c09e3915d777d916a04ebb19aefb21a5a14a49e2079e02c5c60f1f274aa0cab5c227147883eaf1a5f91b6c0546b818c960cc3575cdcdd93d57 WHIRLPOOL d71ed0a1f6483be579225d577482795e4773d32ed8b5eee441125f0d34cd77a9a72664cb40a6fdc9e4674bb6e6327da0b4bf7fd8cea0d935c21151ba937661a1
+DIST ocsync-0.91.4.tar.bz2 6010999 SHA256 9ce5d04ff0475be4c3d3bfff43a554980d88277e95de4128a3f18611529b2cb6 SHA512 ec942ace1a215120cb8c764abe35b81ae48d979469c87feee8fcacb00740b35479095ed1a913f711736acd6fc8d83e148e4d597baff6d7a2de721981410ac896 WHIRLPOOL 7a8db0fa94ffa690863e51d3c58201f6d63803a6af00a2124c03c68ed4ece911bf5bf8862158c86c372caf02ee1bea7bbf4a2cfb3473a36f08e605a515ccde60
diff --git a/net-misc/ocsync/metadata.xml b/net-misc/ocsync/metadata.xml
new file mode 100644
index 000000000000..f713f2a74b47
--- /dev/null
+++ b/net-misc/ocsync/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>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+ <use>
+ <flag name="sftp">Enable sftp transfer support via <pkg>net-libs/libssh</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/ocsync/ocsync-0.90.4.ebuild b/net-misc/ocsync/ocsync-0.90.4.ebuild
new file mode 100644
index 000000000000..dc954daced3a
--- /dev/null
+++ b/net-misc/ocsync/ocsync-0.90.4.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="A file synchronizer especially designed for you, the normal user"
+HOMEPAGE="http://csync.org/"
+SRC_URI="http://download.owncloud.com/download/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc iconv samba +sftp test"
+
+RESTRICT="test"
+
+RDEPEND="
+ dev-db/sqlite:3
+ >=dev-libs/iniparser-3.1
+ net-libs/neon[ssl]
+ iconv? ( virtual/libiconv )
+ samba? ( net-fs/samba )
+ sftp? ( net-libs/libssh )
+ !net-misc/csync
+ !>=net-misc/owncloud-client-1.5.1
+"
+DEPEND="${DEPEND}
+ app-text/asciidoc
+ doc? ( app-doc/doxygen )
+ test? ( dev-libs/check dev-util/cmocka )
+"
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # proper docdir
+ sed -e "s:/doc/ocsync:/doc/${PF}:" \
+ -i doc/CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use test UNIT_TESTING)
+ $(cmake-utils_use_find_package doc Doxygen)
+ $(cmake-utils_use_find_package samba Libsmbclient)
+ $(cmake-utils_use_find_package sftp LibSSH)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ mv "${D}/usr/etc/ocsync" "${D}/etc/"
+ rm -r "${D}/usr/etc/"
+}
diff --git a/net-misc/ocsync/ocsync-0.91.4.ebuild b/net-misc/ocsync/ocsync-0.91.4.ebuild
new file mode 100644
index 000000000000..e6410a698f63
--- /dev/null
+++ b/net-misc/ocsync/ocsync-0.91.4.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="ownCloud fork of csync file synchronizer"
+HOMEPAGE="http://owncloud.org/"
+SRC_URI="http://download.owncloud.com/desktop/stable/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc +iconv samba +sftp test"
+
+# Tests only work with iconv
+REQUIRED_USE="test? ( iconv )"
+
+RDEPEND=">=dev-db/sqlite-3.4:3
+ net-libs/neon[ssl]
+ iconv? ( virtual/libiconv )
+ samba? ( >=net-fs/samba-3.5 )
+ sftp? ( >=net-libs/libssh-0.5 )
+ !net-misc/csync
+ !>=net-misc/owncloud-client-1.5.1"
+DEPEND="${DEPEND}
+ doc? (
+ app-doc/doxygen
+ app-text/asciidoc
+ )
+ test? ( dev-util/cmocka )"
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # proper docdir
+ sed -e "s:/doc/${PN}:/doc/${PF}:" \
+ -i doc/CMakeLists.txt || die
+ # Fix compilation with USE=-iconv, #500860
+ sed -e "s/_TCHAR/mbchar_t/" \
+ -i src/std/c_string.c || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DSYSCONF_INSTALL_DIR="${EPREFIX}"/etc
+ $(cmake-utils_use_with iconv ICONV)
+ $(cmake-utils_use test UNIT_TESTING)
+ $(cmake-utils_use_find_package doc Doxygen)
+ $(cmake-utils_use_find_package samba Libsmbclient)
+ $(cmake-utils_use_find_package sftp LibSSH)
+ )
+ cmake-utils_src_configure
+}
diff --git a/net-misc/ofono/Manifest b/net-misc/ofono/Manifest
new file mode 100644
index 000000000000..de9f81efa70d
--- /dev/null
+++ b/net-misc/ofono/Manifest
@@ -0,0 +1,3 @@
+DIST ofono-1.14.tar.bz2 947471 SHA256 46228f101a73d700f2b240b1e4b52b79dbae2201e6d18bb67572935e0f440dd9 SHA512 3e5725ef76f0952665e31165bda01d8d43e79cd576fd447564418bffc96217d532d2246e2976b6616498a434f06b148acd426583c3a281de90aeeddbda60371f WHIRLPOOL 49fd61077e21fce9b009b2f663fc8f793d592695751fca8708e70cd247b0049a529b77a7eecf243c8398e16641de95daed3678f89616a77ae06e2e4a6ec467c1
+DIST ofono-1.15.tar.xz 849268 SHA256 978807a05e8904eb4e57d6533ed71e75676a55fa3819a39fe2c878f45dbf7af6 SHA512 ed47bcdc9e903a4e841922e1f3dd2f649a005aa8c0c0a8900820c745c9386e8619412745d21361c3731c564d9d814080f3e7e385bb69bf9ec62a6321272f2c70 WHIRLPOOL 24a6cef324ccca12e025207c7b239789529788dd296c5cdf4cdac35a89c435da8a5c267d01936d9fea15073432d5e45b7bac48a2e0df3136606a312ad6c8c2e9
+DIST ofono-1.16.tar.xz 854296 SHA256 403b98dadece8bc804c0bd16b96d3db5a3bb0f84af64b3d67924da2d1a754b07 SHA512 21887e1bc3b8af18881f9456f950b97885b567164e28ebe2ab6fc5a3042c439891a20b5034a8fa0c7a78567286ac53c1b8a72122f428fbcf5da8bf139423b913 WHIRLPOOL b13aec1b3548b4959e68bd742efc239a0c6d928be2a0d70352d5bdcca3c551b6d2f4c09dd3eef4afcf3547547c47c488bbd49ebac1e468c2519846de3fe8e81a
diff --git a/net-misc/ofono/files/ofono-1.12-sys-types.patch b/net-misc/ofono/files/ofono-1.12-sys-types.patch
new file mode 100644
index 000000000000..15f94abe99a7
--- /dev/null
+++ b/net-misc/ofono/files/ofono-1.12-sys-types.patch
@@ -0,0 +1,21 @@
+commit e1d5dfe3aebcb0d2669ec1534cb6eba25f07dbb7
+Author: Lucas De Marchi <lucas.demarchi@profusion.mobi>
+Date: Wed Jan 16 19:11:24 2013 -0200
+
+ storage: Include sys/types.h for ssize_t
+
+ src/storage.h:32:1: error: unknown type name 'ssize_t'
+ src/storage.h:36:1: error: unknown type name 'ssize_t'
+
+diff --git a/src/storage.h b/src/storage.h
+index c455bae..70446ad 100644
+--- a/src/storage.h
++++ b/src/storage.h
+@@ -26,6 +26,7 @@
+ #endif
+
+ #include <fcntl.h>
++#include <sys/types.h>
+
+ int create_dirs(const char *filename, const mode_t mode);
+
diff --git a/net-misc/ofono/files/ofono.initd b/net-misc/ofono/files/ofono.initd
new file mode 100644
index 000000000000..644d372e079d
--- /dev/null
+++ b/net-misc/ofono/files/ofono.initd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Purpose License v2
+# $Id$
+
+depend() {
+ need dbus
+}
+
+start() {
+ ebegin "Starting oFono"
+ start-stop-daemon --start --quiet --exec /usr/sbin/ofonod
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping oFono"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/ofonod
+ eend $?
+}
+
+# vim: set ft=gentoo-init-d ts=3 sw=3 et:
diff --git a/net-misc/ofono/metadata.xml b/net-misc/ofono/metadata.xml
new file mode 100644
index 000000000000..e8ee0200c84a
--- /dev/null
+++ b/net-misc/ofono/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>dlan@gentoo.org</email>
+ <name>Yixun Lan</name>
+ </maintainer>
+ <use>
+ <flag name="atmodem">ETSI AT modem support.</flag>
+ <flag name="isimodem">Enable PhoNet/ISI modem support.</flag>
+ <flag name="cdmamodem">Enable CDMA modem support.</flag>
+ <flag name="datafiles">Enable install configuration and data files.</flag>
+ <flag name="dundee">Enable BlueTooth DUN deamon support.</flag>
+ <flag name="bluetooth">Enable Bluetooth modem support using <pkg>net-wireless/bluez</pkg>.</flag>
+ <flag name="phonesim">Enable phone Simulator support</flag>
+ <flag name="provision">Enable GPRS provisioning support</flag>
+ <flag name="qmimodem">Enable Qualcomm QMI modem support</flag>
+ <flag name="tools">Enable testing tools</flag>
+ </use>
+</pkgmetadata>
+
diff --git a/net-misc/ofono/ofono-1.14.ebuild b/net-misc/ofono/ofono-1.14.ebuild
new file mode 100644
index 000000000000..4b7451d5a404
--- /dev/null
+++ b/net-misc/ofono/ofono-1.14.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib systemd
+
+DESCRIPTION="Open Source mobile telephony (GSM/UMTS) daemon"
+HOMEPAGE="http://ofono.org/"
+SRC_URI="mirror://kernel/linux/network/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm x86"
+IUSE="+atmodem bluetooth +cdmamodem +datafiles doc dundee examples +isimodem +phonesim +provision +qmimodem threads tools +udev"
+
+REQUIRED_USE="dundee? ( bluetooth )"
+
+RDEPEND=">=sys-apps/dbus-1.4
+ >=dev-libs/glib-2.28
+ net-misc/mobile-broadband-provider-info
+ bluetooth? ( >=net-wireless/bluez-4.99 )
+ udev? ( virtual/udev )
+ examples? ( dev-python/dbus-python )
+ tools? ( virtual/libusb:1 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( ChangeLog AUTHORS )
+
+src_configure() {
+ econf \
+ $(use_enable threads) \
+ $(use_enable udev) \
+ $(use_enable isimodem) \
+ $(use_enable atmodem) \
+ $(use_enable cdmamodem) \
+ $(use_enable datafiles) \
+ $(use_enable dundee) \
+ $(use_enable bluetooth) \
+ $(use_enable phonesim) \
+ $(use_enable provision) \
+ $(use_enable qmimodem) \
+ $(use_enable tools) \
+ $(use_enable examples test) \
+ --disable-maintainer-mode \
+ --localstatedir=/var \
+ --with-systemdunitdir="$(systemd_get_unitdir)"
+}
+
+src_install() {
+ default
+
+ if use tools ; then
+ dobin tools/auto-enable \
+ tools/huawei-audio \
+ tools/lookup-provider-name \
+ tools/lookup-apn \
+ tools/get-location \
+ tools/qmi \
+ tools/tty-redirector
+ fi
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ use doc && dodoc doc/*.txt
+}
diff --git a/net-misc/ofono/ofono-1.15.ebuild b/net-misc/ofono/ofono-1.15.ebuild
new file mode 100644
index 000000000000..7939bb3ec86e
--- /dev/null
+++ b/net-misc/ofono/ofono-1.15.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib systemd
+
+DESCRIPTION="Open Source mobile telephony (GSM/UMTS) daemon"
+HOMEPAGE="http://ofono.org/"
+SRC_URI="mirror://kernel/linux/network/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="+atmodem bluetooth +cdmamodem +datafiles doc dundee examples +isimodem +phonesim +provision +qmimodem threads tools +udev"
+
+REQUIRED_USE="dundee? ( bluetooth )"
+
+RDEPEND=">=sys-apps/dbus-1.4
+ >=dev-libs/glib-2.28
+ net-misc/mobile-broadband-provider-info
+ bluetooth? ( >=net-wireless/bluez-4.99 )
+ udev? ( virtual/udev )
+ examples? ( dev-python/dbus-python )
+ tools? ( virtual/libusb:1 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( ChangeLog AUTHORS )
+
+src_configure() {
+ econf \
+ $(use_enable threads) \
+ $(use_enable udev) \
+ $(use_enable isimodem) \
+ $(use_enable atmodem) \
+ $(use_enable cdmamodem) \
+ $(use_enable datafiles) \
+ $(use_enable dundee) \
+ $(use_enable bluetooth) \
+ $(use_enable phonesim) \
+ $(use_enable provision) \
+ $(use_enable qmimodem) \
+ $(use_enable tools) \
+ $(use_enable examples test) \
+ --disable-maintainer-mode \
+ --localstatedir=/var \
+ --with-systemdunitdir="$(systemd_get_unitdir)"
+}
+
+src_install() {
+ default
+
+ if use tools ; then
+ dobin tools/auto-enable \
+ tools/huawei-audio \
+ tools/lookup-provider-name \
+ tools/lookup-apn \
+ tools/get-location \
+ tools/qmi \
+ tools/tty-redirector
+ fi
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ use doc && dodoc doc/*.txt
+}
diff --git a/net-misc/ofono/ofono-1.16.ebuild b/net-misc/ofono/ofono-1.16.ebuild
new file mode 100644
index 000000000000..4bb9fb6b6536
--- /dev/null
+++ b/net-misc/ofono/ofono-1.16.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib systemd
+
+DESCRIPTION="Open Source mobile telephony (GSM/UMTS) daemon"
+HOMEPAGE="http://ofono.org/"
+SRC_URI="mirror://kernel/linux/network/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ppc ppc64 sparc x86"
+IUSE="+atmodem bluetooth +cdmamodem +datafiles doc dundee examples +isimodem +phonesim +provision +qmimodem threads tools +udev"
+
+REQUIRED_USE="dundee? ( bluetooth )"
+
+RDEPEND=">=sys-apps/dbus-1.4
+ >=dev-libs/glib-2.28
+ net-misc/mobile-broadband-provider-info
+ bluetooth? ( >=net-wireless/bluez-4.99 )
+ udev? ( virtual/udev )
+ examples? ( dev-python/dbus-python )
+ tools? ( virtual/libusb:1 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( ChangeLog AUTHORS )
+
+src_configure() {
+ econf \
+ $(use_enable threads) \
+ $(use_enable udev) \
+ $(use_enable isimodem) \
+ $(use_enable atmodem) \
+ $(use_enable cdmamodem) \
+ $(use_enable datafiles) \
+ $(use_enable dundee) \
+ $(use_enable bluetooth) \
+ $(use_enable phonesim) \
+ $(use_enable provision) \
+ $(use_enable qmimodem) \
+ $(use_enable tools) \
+ $(use_enable examples test) \
+ --disable-maintainer-mode \
+ --localstatedir=/var \
+ --with-systemdunitdir="$(systemd_get_unitdir)"
+}
+
+src_install() {
+ default
+
+ if use tools ; then
+ dobin tools/auto-enable \
+ tools/huawei-audio \
+ tools/lookup-provider-name \
+ tools/lookup-apn \
+ tools/get-location \
+ tools/qmi \
+ tools/tty-redirector
+ fi
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ use doc && dodoc doc/*.txt
+}
diff --git a/net-misc/oidentd/Manifest b/net-misc/oidentd/Manifest
new file mode 100644
index 000000000000..903cc8abaa99
--- /dev/null
+++ b/net-misc/oidentd/Manifest
@@ -0,0 +1 @@
+DIST oidentd-2.0.8.tar.gz 212354 SHA256 a54cbed187281f8d5a301d1d8fd5cb0f30bfb13a5a8e9ab752ace76c1010fb6f SHA512 86229a4ef9892121c25a7140616e180f862ca34b73ea3ad9f0fbb008f657abb17e9f14c2c25ae14c14bfc14bf1ea10b50fd68318631a9c52227bbfd6e6d43288 WHIRLPOOL ac36130273ec6a4fc7f715a9518f99445c3f4af50b03e647846b152800940fd8f83222b78b7a12385a0c722a8d89b6bdbc557812d0b64e3253aa3231f95215cb
diff --git a/net-misc/oidentd/files/oidentd-2.0.7-confd b/net-misc/oidentd/files/oidentd-2.0.7-confd
new file mode 100644
index 000000000000..3116889e67e2
--- /dev/null
+++ b/net-misc/oidentd/files/oidentd-2.0.7-confd
@@ -0,0 +1,4 @@
+# oidentd start-up options
+USER="nobody"
+GROUP="nobody"
+OPTIONS=""
diff --git a/net-misc/oidentd/files/oidentd-2.0.7-init b/net-misc/oidentd/files/oidentd-2.0.7-init
new file mode 100644
index 000000000000..7d501b985df8
--- /dev/null
+++ b/net-misc/oidentd/files/oidentd-2.0.7-init
@@ -0,0 +1,41 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+check_config() {
+ if [ -z "${USER}" ]
+ then
+ eerror "Please set \$USER in /etc/conf.d/oidentd!"
+ return 1
+ fi
+ if [ -z "${GROUP}" ]
+ then
+ eerror "Please set \$GROUP in /etc/conf.d/oidentd!"
+ return 1
+ fi
+
+ if [ "$(sysctl -n security.bsd.see_other_uids 2>/dev/null)" = "0" ]; then
+ eerror "${SVCNAME} cannot work if the sysctl security.bsd.see_other_uids is 0"
+ return 1
+ fi
+}
+
+
+start() {
+ check_config || return 1
+ ebegin "Starting oidentd"
+ OPTIONS="${OPTIONS} -u ${USER} -g ${GROUP}"
+ start-stop-daemon --start --quiet --exec /usr/sbin/oidentd -- $OPTIONS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping oidentd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/oidentd
+ eend $?
+}
diff --git a/net-misc/oidentd/files/oidentd-2.0.8-bind-to-ipv6-too.patch b/net-misc/oidentd/files/oidentd-2.0.8-bind-to-ipv6-too.patch
new file mode 100644
index 000000000000..b3b0e5100337
--- /dev/null
+++ b/net-misc/oidentd/files/oidentd-2.0.8-bind-to-ipv6-too.patch
@@ -0,0 +1,17 @@
+Patch to bind to ipv6 socket as well
+Patch supplied by Fabian Knittel <fabian.knittel@avona.com>
+--- oidentd-2.0.8//src/oidentd_inet_util.c 2006-05-22 02:31:19.000000000 +0200
++++ oidentd-2.0.8.new//src/oidentd_inet_util.c 2010-03-01 20:26:11.000000000 +0100
+@@ -60,6 +60,12 @@
+ #ifdef WANT_IPV6
+ case AF_INET6:
+ SIN6(ai->ai_addr)->sin6_port = listen_port;
++
++ if (setsockopt(listenfd, IPPROTO_IPV6, IPV6_V6ONLY, &one,
++ sizeof(one)) != 0) {
++ debug("setsockopt IPV6_V6ONLY: %s", strerror(errno));
++ return (-1);
++ }
+ break;
+ #endif
+
diff --git a/net-misc/oidentd/files/oidentd-2.0.8-masquerading.patch b/net-misc/oidentd/files/oidentd-2.0.8-masquerading.patch
new file mode 100644
index 000000000000..191e9b95e64d
--- /dev/null
+++ b/net-misc/oidentd/files/oidentd-2.0.8-masquerading.patch
@@ -0,0 +1,43 @@
+--- oidentd.orig/src/kernel/linux.c 2006-05-22 06:58:53.000000000 +0300
++++ oidentd-2.0.8/src/kernel/linux.c 2007-07-11 21:28:56.000000000 +0300
+@@ -48,6 +48,7 @@
+ #define CFILE6 "/proc/net/tcp6"
+ #define MASQFILE "/proc/net/ip_masquerade"
+ #define CONNTRACK "/proc/net/ip_conntrack"
++#define NFCONNTRACK "/proc/net/nf_conntrack"
+
+ static int netlink_sock;
+ extern struct sockaddr_storage proxy;
+@@ -82,7 +83,15 @@
+ debug("fopen: %s: %s", CONNTRACK, strerror(errno));
+ return false;
+ }
+- masq_fp = fopen("/dev/null", "r");
++
++ masq_fp = fopen(NFCONNTRACK, "r");
++ if (masq_fp == NULL) {
++ if (errno != ENOENT) {
++ debug("fopen: %s: %s", NFCONNTRACK, strerror(errno));
++ return false;
++ }
++ masq_fp = fopen("/dev/null", "r");
++ }
+ }
+
+ netfilter = true;
+@@ -367,6 +376,15 @@
+ &nport_temp, &mport_temp);
+ }
+
++ if (ret != 21) {
++ ret = sscanf(buf,
++ "%*15s %*d %15s %*d %*d ESTABLISHED src=%d.%d.%d.%d dst=%d.%d.%d.%d sport=%d dport=%d packets=%*d bytes=%*d src=%d.%d.%d.%d dst=%d.%d.%d.%d sport=%d dport=%d",
++ proto, &l1, &l2, &l3, &l4, &r1, &r2, &r3, &r4,
++ &masq_lport_temp, &masq_fport_temp,
++ &nl1, &nl2, &nl3, &nl4, &nr1, &nr2, &nr3, &nr4,
++ &nport_temp, &mport_temp);
++ }
++
+ if (ret != 21)
+ continue;
+
diff --git a/net-misc/oidentd/files/oidentd.conf b/net-misc/oidentd/files/oidentd.conf
new file mode 100644
index 000000000000..03b28d827802
--- /dev/null
+++ b/net-misc/oidentd/files/oidentd.conf
@@ -0,0 +1,22 @@
+# Configuration for oidentd
+# see oidentd.conf(5)
+#
+default {
+ default {
+ deny spoof
+ deny spoof_all
+ deny spoof_privport
+ allow random
+ allow random_numeric
+ allow numeric
+ deny hide
+ }
+}
+
+# you may want to hide root connections
+#user "root" {
+# default {
+# force reply "UNKNOWN"
+# }
+#}
+
diff --git a/net-misc/oidentd/files/oidentd.service b/net-misc/oidentd/files/oidentd.service
new file mode 100644
index 000000000000..bf159d855b8d
--- /dev/null
+++ b/net-misc/oidentd/files/oidentd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=TCP/IP IDENT protocol server
+
+[Service]
+ExecStart=/usr/sbin/oidentd -i -S -u nobody -g nobody
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/oidentd/files/oidentd.socket b/net-misc/oidentd/files/oidentd.socket
new file mode 100644
index 000000000000..63df7036e543
--- /dev/null
+++ b/net-misc/oidentd/files/oidentd.socket
@@ -0,0 +1,10 @@
+[Unit]
+Description=Ident (RFC 1413) socket
+Conflicts=oidentd.service
+
+[Socket]
+ListenStream=113
+Accept=yes
+
+[Install]
+WantedBy=sockets.target
diff --git a/net-misc/oidentd/files/oidentd_at.service b/net-misc/oidentd/files/oidentd_at.service
new file mode 100644
index 000000000000..ac03a94d6c8a
--- /dev/null
+++ b/net-misc/oidentd/files/oidentd_at.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=Ident (RFC 1413) per-connection server
+
+[Service]
+ExecStart=/usr/sbin/oidentd -I -S -u nobody -g nobody
+ExecReload=/bin/kill -HUP $MAINPID
+StandardInput=socket
diff --git a/net-misc/oidentd/files/oidentd_masq.conf b/net-misc/oidentd/files/oidentd_masq.conf
new file mode 100644
index 000000000000..6811288ff4cf
--- /dev/null
+++ b/net-misc/oidentd/files/oidentd_masq.conf
@@ -0,0 +1,10 @@
+# oident masquarded connections configuration
+
+# use this file if your host is masquarading connections for several
+# hosts and you want to return a reply based on the hostname of
+# the originating machine
+# add "-f" to OIDENT_OPTIONS in /etc/conf.d/oidentd if you want
+# to forward ident requests to the real host
+
+# add hosts in the following format, see oidentd_masq.conf(5) for details:
+# <ip or host>[/mask] <username> <os>
diff --git a/net-misc/oidentd/metadata.xml b/net-misc/oidentd/metadata.xml
new file mode 100644
index 000000000000..aefe4c94ef4c
--- /dev/null
+++ b/net-misc/oidentd/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>angelos@gentoo.org</email>
+ <name>Christoph Mende</name>
+ </maintainer>
+ <use>
+ <flag name="masquerade">Enable support for masqueraded/NAT connections</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">ojnk</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/oidentd/oidentd-2.0.8-r5.ebuild b/net-misc/oidentd/oidentd-2.0.8-r5.ebuild
new file mode 100644
index 000000000000..0193766f640e
--- /dev/null
+++ b/net-misc/oidentd/oidentd-2.0.8-r5.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils systemd
+
+DESCRIPTION="Another (RFC1413 compliant) ident daemon"
+HOMEPAGE="http://ojnk.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ojnk/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ~s390 ~sh sparc x86 ~x86-fbsd"
+IUSE="debug ipv6 masquerade"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-masquerading.patch" \
+ "${FILESDIR}/${P}-bind-to-ipv6-too.patch"
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable ipv6) \
+ $(use_enable masquerade masq) \
+ $(use_enable masquerade nat)
+}
+
+src_install() {
+ default
+
+ dodoc AUTHORS ChangeLog README TODO NEWS \
+ "${FILESDIR}"/${PN}_masq.conf "${FILESDIR}"/${PN}.conf
+
+ newinitd "${FILESDIR}"/${PN}-2.0.7-init ${PN}
+ newconfd "${FILESDIR}"/${PN}-2.0.7-confd ${PN}
+
+ systemd_newunit "${FILESDIR}"/${PN}_at.service ${PN}@.service
+ systemd_dounit "${FILESDIR}"/${PN}.socket
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
+
+pkg_postinst() {
+ echo
+ elog "Example configuration files are in /usr/share/doc/${PF}"
+ echo
+}
diff --git a/net-misc/olsrd/Manifest b/net-misc/olsrd/Manifest
new file mode 100644
index 000000000000..e385a2203fbf
--- /dev/null
+++ b/net-misc/olsrd/Manifest
@@ -0,0 +1 @@
+DIST olsrd-0.6.4.tar.bz2 5469577 SHA256 f8ab1bbdf2e424573a5bff9f2bf6e308c1307556e95c1de72b011949db20945f SHA512 a64b27f6f8ab772e79402ea0ea9e90ea1f980f9bd1fdbb608b41c91f2f942a546757f3a17fd71bd6f4b3dba69d7e96b7b0e028e4b4dcd39c3c22cf0f802cdbcd WHIRLPOOL 0c42e12e7e89719b8e9f7a4b931a71e0aa797bf2ba8507fa1f4dd3b6ede9cbe34ef8f3b3d819646959e54cde8cd61f165daab6b4b6f1e29560899f4bd24f9967
diff --git a/net-misc/olsrd/files/olsrd b/net-misc/olsrd/files/olsrd
new file mode 100644
index 000000000000..5b0a68a8d9ac
--- /dev/null
+++ b/net-misc/olsrd/files/olsrd
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /etc/olsrd.conf ]; then
+ eerror "You need a /etc/olsrd.conf file to run olsrd"
+ eerror "There is sample file in /usr/share/doc/olsrd-version/"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting olsrd"
+ start-stop-daemon --start --quiet --background --exec /usr/sbin/olsrd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping olsrd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/olsrd
+ eend $?
+}
diff --git a/net-misc/olsrd/files/olsrd-0.6.1-build_fix.patch b/net-misc/olsrd/files/olsrd-0.6.1-build_fix.patch
new file mode 100644
index 000000000000..9a8683e9d3e8
--- /dev/null
+++ b/net-misc/olsrd/files/olsrd-0.6.1-build_fix.patch
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -71,8 +71,6 @@
+ switch:
+ $(MAKECMD) -C $(SWITCHDIR)
+
+-# generate it always
+-.PHONY: src/builddata.c
+ src/builddata.c:
+ @$(RM) "$@"
+ @echo "#include \"defs.h\"" >> "$@"
diff --git a/net-misc/olsrd/files/olsrd-0.6.3-make-gtk.patch b/net-misc/olsrd/files/olsrd-0.6.3-make-gtk.patch
new file mode 100644
index 000000000000..12e983daca41
--- /dev/null
+++ b/net-misc/olsrd/files/olsrd-0.6.3-make-gtk.patch
@@ -0,0 +1,22 @@
+--- a/gui/linux-gtk/Makefile
++++ b/gui/linux-gtk/Makefile
+@@ -1,8 +1,8 @@
+ CC ?= gcc
+
+-CFLAGS += -Wall `pkg-config --cflags gtk+-2.0`
++CFLAGS += -Wall $(shell pkg-config --cflags gdk-pixbuf-2.0 glib-2.0 gtk+-2.0)
+ LDFLAGS +=
+-LIBS := `pkg-config --libs gtk+-2.0` -lm
++LIBS := $(shell pkg-config --libs gdk-pixbuf-2.0 glib-2.0 gtk+-2.0) -lm
+
+ OBJS= src/main.o src/interface.o src/callbacks.o src/ipc.o \
+ src/packet.o src/nodes.o src/routes.o
+@@ -10,7 +10,7 @@
+ all: olsrd-gui
+
+ olsrd-gui: $(OBJS)
+- $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
+
+ clean:
+ rm -f $(OBJS) olsrd-gui
diff --git a/net-misc/olsrd/metadata.xml b/net-misc/olsrd/metadata.xml
new file mode 100644
index 000000000000..19e9f85b04fb
--- /dev/null
+++ b/net-misc/olsrd/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>maintainer-needed@gentoo.org</email>
+</maintainer>
+<longdescription>An implementation of the Optimized Link State Routing protocol</longdescription>
+</pkgmetadata>
diff --git a/net-misc/olsrd/olsrd-0.6.4-r1.ebuild b/net-misc/olsrd/olsrd-0.6.4-r1.ebuild
new file mode 100644
index 000000000000..e0363f19272c
--- /dev/null
+++ b/net-misc/olsrd/olsrd-0.6.4-r1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib toolchain-funcs versionator
+
+MY_PV="$(replace_version_separator 3 '-r')"
+DESCRIPTION="An implementation of the Optimized Link State Routing protocol"
+HOMEPAGE="http://www.olsr.org/"
+SRC_URI="http://www.olsr.org/releases/$(get_version_component_range 1-2)/${PN}-${MY_PV}.tar.bz2"
+
+SLOT="0"
+LICENSE="BSD LGPL-2.1"
+KEYWORDS="amd64 x86"
+IUSE="gtk"
+DEPEND="
+ gtk? (
+ dev-libs/glib:2
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:2
+ )
+"
+RDEPEND="${DEPEND}"
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${PN}-0.6.1-build_fix.patch" \
+ "${FILESDIR}/${PN}-0.6.3-make-gtk.patch"
+
+ # fix parallel make
+ # respect AR
+ # verbose build
+ # fix default prefix, bug #453440
+ sed -i \
+ -e '/@echo "\[/d' \
+ -e 's|$(MAKECMD)|$(MAKE)|g' \
+ -e 's|@$(CC)|$(CC)|g' \
+ -e 's|@ar |$(AR) |g' \
+ -e '/^prefix/s:/usr/local:/usr:' \
+ $( find . -name 'Makefile*' ) || die
+
+ # respect LDFLAGS
+ sed -i \
+ -e 's|$(CC)|& $(OLSRD_LDFLAGS)|g' \
+ lib/pud/nmealib/Makefile lib/pud/wireformat/Makefile || die
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ LIBDIR="/usr/$(get_libdir)/${PN}" \
+ OLSRD_LDFLAGS="${LDFLAGS}" \
+ OS=linux \
+ build_all
+ if use gtk; then
+ emake -C "${S}/gui/linux-gtk" LIBDIR="/usr/$(get_libdir)/${PN}" CC="$(tc-getCC)"
+ fi
+}
+
+src_install() {
+ emake OS=linux LIBDIR="${D}/usr/$(get_libdir)/${PN}" \
+ DESTDIR="${D}" STRIP=true install_all
+ if use gtk; then
+ emake -C "${S}/gui/linux-gtk" \
+ LIBDIR="${D}/usr/$(get_libdir)/${PN}" DESTDIR="${D}" install
+ fi
+
+ doinitd "${FILESDIR}/${PN}"
+
+ dodoc CHANGELOG \
+ valgrind-howto.txt files/olsrd.conf.default.rfc \
+ files/olsrd.conf.default.lq files/olsrd.conf.default.lq-fisheye \
+ lib/arprefresh/README_ARPREFRESH \
+ lib/bmf/README_BMF \
+ lib/dot_draw/README_DOT_DRAW \
+ lib/dyn_gw/README_DYN_GW \
+ lib/dyn_gw_plain/README_DYN_GW_PLAIN \
+ lib/httpinfo/README_HTTPINFO \
+ lib/mini/README_MINI \
+ lib/nameservice/README_NAMESERVICE \
+ lib/pgraph/README_PGRAPH \
+ lib/quagga/README_QUAGGA \
+ lib/secure/README_SECURE \
+ lib/txtinfo/README_TXTINFO \
+ lib/watchdog/README_WATCHDOG
+}
diff --git a/net-misc/omniORB/Manifest b/net-misc/omniORB/Manifest
new file mode 100644
index 000000000000..baac7e5ff483
--- /dev/null
+++ b/net-misc/omniORB/Manifest
@@ -0,0 +1 @@
+DIST omniORB-4.1.4.tar.gz 3093814 SHA256 84fb9790c25d6e46248c9773747e393b429573190da2150850d4a49debda4e8e SHA512 0ed989dd9a8c024a575ebbe1def137d11c4e52297727883d26cb1fdc87d2965e6d0152ee4b7b90097f2d97eb22501bb968eff0d070e88f80a9fef6b7439e1a1c WHIRLPOOL 16b12ade124e62b57d8401c73975a4a0861166f080b0f735e7ad363dca1a7387d807e5c8bf4ae9b90b70f41a03e9811109bcb917e78b833578e891b78c9da55f
diff --git a/net-misc/omniORB/files/ldflags.patch b/net-misc/omniORB/files/ldflags.patch
new file mode 100644
index 000000000000..471df27ae7f4
--- /dev/null
+++ b/net-misc/omniORB/files/ldflags.patch
@@ -0,0 +1,11 @@
+--- mk/beforeauto.mk.in.orig 2010-04-24 21:13:17.000000000 +0200
++++ mk/beforeauto.mk.in 2010-04-24 21:14:24.000000000 +0200
+@@ -541,7 +541,7 @@
+ SharedLibraryLibNameTemplate = lib$$1$$2.$(SHAREDLIB_SUFFIX)
+ SharedLibraryImplibNameTemplate = lib$$1$$2.a
+
+-SharedLibraryPlatformLinkFlagsTemplate = -shared -Wl,-soname,$$soname
++SharedLibraryPlatformLinkFlagsTemplate = -shared -Wl,-soname,$$soname @LDFLAGS@
+
+ define SharedLibraryFullName
+ fn() { \
diff --git a/net-misc/omniORB/files/omniNames b/net-misc/omniORB/files/omniNames
new file mode 100644
index 000000000000..4f480d15b1cd
--- /dev/null
+++ b/net-misc/omniORB/files/omniNames
@@ -0,0 +1,22 @@
+#!/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 omniNames"
+ start-stop-daemon --start --background --make-pidfile --pidfile /var/run/omniNames.pid \
+ --exec /usr/bin/omniNames -- -start -always -logdir /var/log/omniORB \
+ -errlog /var/log/omniORB/omniORB.errors
+ eend $? "Error starting omniNames."
+}
+
+stop() {
+ ebegin "Stopping omniNames"
+ start-stop-daemon --stop --pidfile /var/run/omniNames.pid
+ eend $? "Error stopping omniNames."
+}
diff --git a/net-misc/omniORB/files/omniORB-4.1.4-format-security.patch b/net-misc/omniORB/files/omniORB-4.1.4-format-security.patch
new file mode 100644
index 000000000000..2af8d21d308d
--- /dev/null
+++ b/net-misc/omniORB/files/omniORB-4.1.4-format-security.patch
@@ -0,0 +1,16 @@
+ src/tool/omniidl/cxx/cccp/cccp.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/tool/omniidl/cxx/cccp/cccp.c b/src/tool/omniidl/cxx/cccp/cccp.c
+index 0198b1a..64d80ae 100644
+--- a/src/tool/omniidl/cxx/cccp/cccp.c
++++ b/src/tool/omniidl/cxx/cccp/cccp.c
+@@ -8034,7 +8034,7 @@ macroexpand (hp, op)
+ else
+ parse_error = macarg (NULL_PTR, 0);
+ if (parse_error) {
+- error_with_line (line_for_error (start_line), parse_error);
++ error_with_line (line_for_error (start_line), "%s", parse_error);
+ break;
+ }
+ i++;
diff --git a/net-misc/omniORB/files/omniORB-4.1.4-openssl-1.patch b/net-misc/omniORB/files/omniORB-4.1.4-openssl-1.patch
new file mode 100644
index 000000000000..968013a25781
--- /dev/null
+++ b/net-misc/omniORB/files/omniORB-4.1.4-openssl-1.patch
@@ -0,0 +1,31 @@
+http://bugs.gentoo.org/326791
+
+--- include/omniORB4/sslContext.h
++++ include/omniORB4/sslContext.h
+@@ -111,7 +111,11 @@
+ virtual ~sslContext();
+
+ protected:
+- virtual SSL_METHOD* set_method();
++ #if OPENSSL_VERSION_NUMBER >= 0x10000000L
++ virtual const SSL_METHOD* set_method();
++ #else
++ virtual SSL_METHOD* set_method();
++ #endif
+ // Default to return SSLv23_method().
+
+ virtual void set_supported_versions();
+--- src/lib/omniORB/orbcore/ssl/sslContext.cc
++++ src/lib/omniORB/orbcore/ssl/sslContext.cc
+@@ -197,7 +197,11 @@
+ }
+
+ /////////////////////////////////////////////////////////////////////////
++#if OPENSSL_VERSION_NUMBER >= 0x10000000L
++const SSL_METHOD*
++#else
+ SSL_METHOD*
++#endif
+ sslContext::set_method() {
+ return SSLv23_method();
+ }
diff --git a/net-misc/omniORB/metadata.xml b/net-misc/omniORB/metadata.xml
new file mode 100644
index 000000000000..47c52c1154d4
--- /dev/null
+++ b/net-misc/omniORB/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>caster@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">omniorb</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/omniORB/omniORB-4.1.4-r2.ebuild b/net-misc/omniORB/omniORB-4.1.4-r2.ebuild
new file mode 100644
index 000000000000..929449b4714b
--- /dev/null
+++ b/net-misc/omniORB/omniORB-4.1.4-r2.ebuild
@@ -0,0 +1,91 @@
+# 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 multilib python-single-r1
+
+DESCRIPTION="A robust, high-performance CORBA 2 ORB"
+HOMEPAGE="http://omniorb.sourceforge.net/"
+SRC_URI="mirror://sourceforge/omniorb/${P}.tar.gz"
+
+LICENSE="LGPL-2 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 ~sparc x86"
+IUSE="doc ssl static-libs"
+
+RDEPEND="ssl? ( >=dev-libs/openssl-0.9.6b:0= )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ # respect ldflags, bug #284191
+ epatch \
+ "${FILESDIR}"/ldflags.patch \
+ "${FILESDIR}"/${P}-openssl-1.patch \
+ "${FILESDIR}"/${P}-format-security.patch
+
+ sed \
+ -e 's/^CXXDEBUGFLAGS.*/CXXDEBUGFLAGS = $(OPTCXXFLAGS)/' \
+ -e 's/^CDEBUGFLAGS.*/CDEBUGFLAGS = $(OPTCFLAGS)/' \
+ -i mk/beforeauto.mk.in mk/platforms/i586_linux_2.0*.mk || \
+ die "sed failed"
+}
+
+src_configure() {
+ mkdir build && cd build || die
+
+ local MY_CONF="--prefix=/usr --with-omniORB-config=/etc/omniorb/omniORB.cfg \
+ --with-omniNames-logdir=/var/log/omniORB --libdir=/usr/$(get_libdir)"
+
+ use ssl && MY_CONF="${MY_CONF} --with-openssl=/usr"
+
+ ECONF_SOURCE=".." econf ${MY_CONF} $(use_enable static-libs static)
+}
+
+src_compile() {
+ cd build || die
+ emake OPTCFLAGS="${CFLAGS}" OPTCXXFLAGS="${CXXFLAGS}"
+}
+
+src_install() {
+ cd build || die
+ default
+ # this looks redundant
+ rm "${ED}/usr/bin/omniidlrun.py" || die
+
+ cd "${S}" || die
+
+ if use doc; then
+ dohtml doc/*.html
+ dohtml -r doc/omniORB
+ docinto print
+ dodoc doc/*.pdf
+ fi
+
+ cat <<- EOF > "${T}/90omniORB"
+ PATH="/usr/share/omniORB/bin/scripts"
+ OMNIORB_CONFIG="/etc/omniorb/omniORB.cfg"
+ EOF
+ doenvd "${T}/90omniORB"
+ doinitd "${FILESDIR}"/omniNames
+
+ cp "sample.cfg" "${T}/omniORB.cfg" || die
+ cat <<- EOF >> "${T}/omniORB.cfg"
+ # resolve the omniNames running on localhost
+ InitRef = NameService=corbaname::localhost
+ EOF
+ insinto /etc/omniorb
+ doins "${T}"/omniORB.cfg
+
+ keepdir /var/log/omniORB
+
+ python_optimize
+ python_fix_shebang "${ED}"/usr/bin/omniidl
+}
+
+pkg_postinst() {
+ elog "Since 4.1.2, the omniORB init script has been renamed to omniNames for clarity."
+}
diff --git a/net-misc/openconnect/Manifest b/net-misc/openconnect/Manifest
new file mode 100644
index 000000000000..1d4ddc4661b1
--- /dev/null
+++ b/net-misc/openconnect/Manifest
@@ -0,0 +1,7 @@
+DIST openconnect-4.08.tar.gz 1214464 SHA256 114eef2b5a8087f26c7871db8700a293101e9626fc94fbef54ac6daef6ce1a77 SHA512 0731a2bb85f1f98c232a73c03962d8854e58b9aa9687a1521ed142e3aadbd9ba76e760a6fbc9fe3d61d5236fcb82af21aba0c50cb27b4c1a5b7f82f9bb9836a0 WHIRLPOOL fd4a52ceb804e2ef77939dcf8b111cf7dacf956dee6a1421b436b595961a14c038f3cf4bc3bb67e91b20a5b5a8473e27123d403c369864a78130ee9f5cd552ff
+DIST openconnect-6.00.tar.gz 1021981 SHA256 8a0c684dccac2447d204d544f6f466e41b21bce71e033ba58e2cb17b795ab81c SHA512 98c39fdbf6931bc20521de107752ffad1cd99381f4a221cc6ab3f43b6a779f5259ed082e05044c25d61bd32f7f3ade28adfdc3bc2535c2e6acb27375a9591e0c WHIRLPOOL dd3a037def1c192bb9c203b6a97185164f0a5f9ff224f64ab0b36482bd45d57ed4b83a79ac71186d93a29a6d4417c8fe0edd7fd08adf6df1f69f59cc807b6f2f
+DIST openconnect-7.02.tar.gz 1136137 SHA256 083626e6f2a87393dd13f379a222bf27b0d57fe1ca286d5f3731d4a444ee7169 SHA512 2452308913e5fabf6824dc46baee3ee8493153788b2f6ee0e2e2ab94fa0b00b1604e09140aba3f8a81e121addedd2ca20d3989509ac2d336b69e3c6a7b753757 WHIRLPOOL 0c10c572f0de0583dea746aff45d1ccab5e13623b854bdf665a55f60f74d135dcb2d94b98561985b0bac5fb923872e45f6fd1d3637209875390871cd7783e351
+DIST openconnect-7.06.tar.gz 1343870 SHA256 facf695368dc4537a6a30e2147be90b1d77ee3cb2d269eaef070b6d9ddab70f2 SHA512 d1af9efe4ac1f6671dc6b92db0df981e8cae3f2f50b8b4c35a112b42a76517b7c8ea9fd5da93352445dd61da3012bf34fdbcc3add9d8727cbaad7d311e516108 WHIRLPOOL b1b98bf8d900714eb7c7ab82bbd4371050f307b7872bd70b4b9c31f72bb15670842f41c381cbe31aad7e5e98bccbe0663e49b988d5c321c706719b8fa19a2654
+DIST openconnect-script-20121108205904.tar.gz 6380 SHA256 99fb6c72c13b5724766a952e392b75774771f220f59793e5d2576d7e3412555b SHA512 089650538f035875c205bed0190e44ed8176a138bbe2f635ac5335050c3b831fc85fbd61448ddaf7cb540c0a5d9b32f8f909e1fd5be188bfef07e721d4656545 WHIRLPOOL 3dc2b820afe49cc59c96d514f166d94fdbc3db9f3edbace69e41ae7e604263a834fff0a1fa7be806ff88c328a75de4306ec159e4022d43cd245addf34615efb2
+DIST openconnect-script-20140311.tar.xz 6240 SHA256 908c667507132ef0269b6d1511ee8b89ae22dfa272c9ffa7ea24c1fa1b31fceb SHA512 043443c615b076d61ea8c464a6b7b68ca526e636313488501459f6eca6974c276d3a60e165fb23f017858a18b255f9c9e1ad80736cb852756d7fe8f3bc5aa917 WHIRLPOOL ae5632be17d72bf7992814e0262cb862ee0bec48dbd119d33bc94b3647755087c2427418ea0064c7560be6e06dc83a2702587fab3403afccfc90d3df8acd0a9f
+DIST vpnc-scripts-20140806.tar.gz 20070 SHA256 1f61a6c5ec8a2dab7d5f12c9b438d931e41c6c1c258801ee978d5ed460f4d35f SHA512 bfa230d6eb2db0696a23228cef6e742dcf5e609c25de725c23e2c7bee96d00045ea656d6c7025cdf7785f70baeb8a8d79af6aec93d7285bcb3c029dc744e5380 WHIRLPOOL 78d0c5e23f408167904639a7804859a1d6b89668feab6834a589a3d9f7abf4f9d1da984553a8871b6a16af39a03e5a6f3f6506dd77f7f960c7fcdd56f0683e27
diff --git a/net-misc/openconnect/files/openconnect.conf.in b/net-misc/openconnect/files/openconnect.conf.in
new file mode 100644
index 000000000000..53b14e61378e
--- /dev/null
+++ b/net-misc/openconnect/files/openconnect.conf.in
@@ -0,0 +1,26 @@
+# Variables to configure vpn tunnels where "vpnname" is the name of your vpn tunnel:
+#
+# server_vpnname
+# password_vpnname
+# vpnopts_vpnname
+#
+# The tunnel will need to be started with a symbolic link to openconnect:
+#
+# ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpnname
+#
+# If you'd like to execute a script on preup, postup, predown and postdown of the vpn tunnel, you
+# need to create executable scripts in a directory with the same name as
+# the vpn tunnel (vpn0 can be replaced with the vpn name):
+#
+# mkdir /etc/openconnect/vpn0
+# cd /etc/openconnect/vpn0"
+# echo '#!/bin/sh' > preup.sh"
+# cp preup.sh predown.sh"
+# cp preup.sh postup.sh"
+# cp preup.sh postdown.sh"
+# chmod 755 /etc/openconnect/vpn0/*"
+
+server_vpn0="vpn.server.tld"
+password_vpn0="YOUR_PASSWORD"
+# Any OPENCONNECT options my go here (see openconnect --help)
+vpnopts_vpn0="-l --passwd-on-stdin --user=YOUR_USERNAME --script=/etc/openconnect/openconnect.sh"
diff --git a/net-misc/openconnect/files/openconnect.init.in b/net-misc/openconnect/files/openconnect.init.in
new file mode 100644
index 000000000000..939d02ffe8a5
--- /dev/null
+++ b/net-misc/openconnect/files/openconnect.init.in
@@ -0,0 +1,123 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+VPN="${RC_SVCNAME#*.}"
+VPNLOG="/var/log/openconnect/${VPN}"
+VPNLOGFILE="${VPNLOG}/openconnect.log"
+VPNERRFILE="${VPNLOG}/openconnect.err"
+VPNPID="/run/openconnect/${VPN}.pid"
+VPNDIR="/etc/openconnect/${VPN}"
+PREUPSCRIPT="${VPNDIR}/preup.sh"
+PREDOWNSCRIPT="${VPNDIR}/predown.sh"
+POSTUPSCRIPT="${VPNDIR}/postup.sh"
+POSTDOWNSCRIPT="${VPNDIR}/postdown.sh"
+SERVER="server_${VPN}"
+PASSWORD="password_${VPN}"
+VPNOPTS="vpnopts_${VPN}"
+
+depend() {
+ before netmount
+}
+
+checkconfig() {
+ if [ $VPN = "openconnect" ]; then
+ eerror "You cannot call openconnect directly. You must create a symbolic link to it with the vpn name:"
+ echo
+ eerror "ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0"
+ echo
+ eerror "And then call it instead:"
+ echo
+ eerror "/etc/init.d/openconnect.vpn0 start"
+ return 1
+ fi
+}
+
+checktuntap() {
+ if [ $(uname -s) = "Linux" ] ; then
+ if [ ! -e /dev/net/tun ]; then
+ if ! modprobe tun ; then
+ eerror "TUN/TAP support is not available in this kernel"
+ return 1
+ fi
+ fi
+ if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then
+ ebegin "Detected broken /dev/net/tun symlink, fixing..."
+ rm -f /dev/net/tun
+ ln -s /dev/misc/net/tun /dev/net/tun
+ eend $?
+ fi
+ fi
+}
+
+start() {
+ ebegin "Starting OpenConnect: ${VPN}"
+
+ checkconfig || return 1
+
+ checktuntap || return 1
+
+ if [ "${!SERVER}" == "vpn.server.tld" ]; then
+ eend 1 "${VPN} not configured"
+ return 1
+ fi
+
+ if [ ! -e "${VPNLOG}" ]; then
+ mkdir -p "${VPNLOG}"
+ fi
+
+ local piddir="${VPNPID%/*}"
+ if [ ! -d "$piddir" ] ; then
+ mkdir -p "$piddir"
+ if [ $? -ne 0 ]; then
+ eerror "Directory $piddir for pidfile does not exist and cannot be created"
+ return 1
+ fi
+ fi
+
+ if [ -x "${PREUPSCRIPT}" ] ; then
+ "${PREUPSCRIPT}"
+ fi
+
+ start-stop-daemon --start --make-pidfile --pidfile "${VPNPID}" --stderr "${VPNERRFILE}" --stdout "${VPNLOGFILE}" --background \
+ --exec /usr/sbin/openconnect \
+ -- --pid-file="${VPNPID}" ${!VPNOPTS} ${!SERVER} <<< ${!PASSWORD}
+
+ local retval=$?
+
+ if [ ! ${retval} -eq 0 ]; then
+ eend ${retval}
+ return ${retval}
+ fi
+
+ if [ -x "${POSTUPSCRIPT}" ] ; then
+ "${POSTUPSCRIPT}"
+ fi
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping OpenConnect: ${VPN}"
+
+ checkconfig || return 1
+
+ if [ -x "${PREDOWNSCRIPT}" ] ; then
+ "${PREDOWNSCRIPT}"
+ fi
+
+ start-stop-daemon --pidfile "${VPNPID}" --stop /usr/sbin/openconnect
+ local retval=$?
+
+ if [ ! ${retval} -eq 0 ]; then
+ eend ${retval}
+ return ${retval}
+ fi
+
+
+ if [ -x "${POSTDOWNSCRIPT}" ] ; then
+ "${POSTDOWNSCRIPT}"
+ fi
+ eend $?
+}
diff --git a/net-misc/openconnect/files/openconnect.init.in-r2 b/net-misc/openconnect/files/openconnect.init.in-r2
new file mode 100644
index 000000000000..a945a4b816ec
--- /dev/null
+++ b/net-misc/openconnect/files/openconnect.init.in-r2
@@ -0,0 +1,144 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+VPN="${RC_SVCNAME#*.}"
+VPNLOG="/var/log/openconnect/${VPN}"
+VPNLOGFILE="${VPNLOG}/openconnect.log"
+VPNERRFILE="${VPNLOG}/openconnect.err"
+VPNPID="/run/openconnect/${VPN}.pid"
+VPNDIR="/etc/openconnect/${VPN}"
+PREUPSCRIPT="${VPNDIR}/preup.sh"
+PREDOWNSCRIPT="${VPNDIR}/predown.sh"
+POSTUPSCRIPT="${VPNDIR}/postup.sh"
+POSTDOWNSCRIPT="${VPNDIR}/postdown.sh"
+SERVER="server_${VPN}"
+PASSWORD="password_${VPN}"
+VPNOPTS="vpnopts_${VPN}"
+
+depend() {
+ before netmount
+}
+
+checkconfig() {
+ if [ $VPN = "openconnect" ]; then
+ eerror "You cannot call openconnect directly. You must create a symbolic link to it with the vpn name:"
+ echo
+ eerror "ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0"
+ echo
+ eerror "And then call it instead:"
+ echo
+ eerror "/etc/init.d/openconnect.vpn0 start"
+ return 1
+ fi
+}
+
+checktuntap() {
+ if [ $(uname -s) = "Linux" ] ; then
+ if [ ! -e /dev/net/tun ]; then
+ if ! modprobe tun ; then
+ eerror "TUN/TAP support is not available in this kernel"
+ return 1
+ fi
+ fi
+ if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then
+ ebegin "Detected broken /dev/net/tun symlink, fixing..."
+ rm -f /dev/net/tun
+ ln -s /dev/misc/net/tun /dev/net/tun
+ eend $?
+ fi
+ fi
+}
+
+start() {
+ ebegin "Starting OpenConnect: ${VPN}"
+
+ local tmp_SERVER tmp_VPNOPTS tmp_PASSWORD
+ eval tmp_SERVER="\${${SERVER}}"
+ eval tmp_VPNOPTS="\${${VPNOPTS}}"
+ eval tmp_PASSWORD="\${${PASSWORD}}"
+
+ checkconfig || return 1
+
+ checktuntap || return 1
+
+ if [ "${tmp_SERVER}" = "vpn.server.tld" ]; then
+ eend 1 "${VPN} not configured"
+ return 1
+ fi
+
+ if [ ! -e "${VPNLOG}" ]; then
+ mkdir -p "${VPNLOG}"
+ fi
+
+ local piddir="${VPNPID%/*}"
+ if [ ! -d "$piddir" ] ; then
+ mkdir -p "$piddir"
+ if [ $? -ne 0 ]; then
+ eerror "Directory $piddir for pidfile does not exist and cannot be created"
+ return 1
+ fi
+ fi
+
+ if [ -x "${PREUPSCRIPT}" ] ; then
+ "${PREUPSCRIPT}"
+ fi
+
+ start-stop-daemon --start \
+ --make-pidfile \
+ --pidfile "${VPNPID}" \
+ --stderr "${VPNERRFILE}" \
+ --stdout "${VPNLOGFILE}" \
+ --background \
+ --exec /usr/sbin/openconnect -- \
+ --interface="${VPN}" \
+ --pid-file="${VPNPID}" \
+ ${tmp_VPNOPTS} \
+ ${tmp_SERVER} <<-E
+ ${tmp_PASSWORD}
+ E
+
+ local retval=$?
+
+ if [ ! ${retval} -eq 0 ]; then
+ eend ${retval}
+ return ${retval}
+ fi
+
+ if [ -x "${POSTUPSCRIPT}" ] ; then
+ # wait until the interface is up and an ip address is set before running postup
+ while true; do
+ if [ -n "$(ip addr show $VPN | grep inet)" ]; then
+ "${POSTUPSCRIPT}"
+ break
+ fi
+ done
+ fi
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping OpenConnect: ${VPN}"
+
+ checkconfig || return 1
+
+ if [ -x "${PREDOWNSCRIPT}" ] ; then
+ "${PREDOWNSCRIPT}"
+ fi
+
+ start-stop-daemon --pidfile "${VPNPID}" --stop /usr/sbin/openconnect
+ local retval=$?
+
+ if [ ! ${retval} -eq 0 ]; then
+ eend ${retval}
+ return ${retval}
+ fi
+
+
+ if [ -x "${POSTDOWNSCRIPT}" ] ; then
+ "${POSTDOWNSCRIPT}"
+ fi
+ eend $?
+}
diff --git a/net-misc/openconnect/files/openconnect.init.in-r3 b/net-misc/openconnect/files/openconnect.init.in-r3
new file mode 100644
index 000000000000..1f51fd47b18a
--- /dev/null
+++ b/net-misc/openconnect/files/openconnect.init.in-r3
@@ -0,0 +1,145 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+VPN="${RC_SVCNAME#*.}"
+VPNLOG="/var/log/openconnect/${VPN}"
+VPNLOGFILE="${VPNLOG}/openconnect.log"
+VPNERRFILE="${VPNLOG}/openconnect.err"
+VPNPID="/run/openconnect/${VPN}.pid"
+VPNDIR="/etc/openconnect/${VPN}"
+PREUPSCRIPT="${VPNDIR}/preup.sh"
+PREDOWNSCRIPT="${VPNDIR}/predown.sh"
+POSTUPSCRIPT="${VPNDIR}/postup.sh"
+POSTDOWNSCRIPT="${VPNDIR}/postdown.sh"
+SERVER="server_${VPN}"
+PASSWORD="password_${VPN}"
+VPNOPTS="vpnopts_${VPN}"
+
+depend() {
+ before netmount
+}
+
+checkconfig() {
+ if [ $VPN = "openconnect" ]; then
+ eerror "You cannot call openconnect directly. You must create a symbolic link to it with the vpn name:"
+ echo
+ eerror "ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0"
+ echo
+ eerror "And then call it instead:"
+ echo
+ eerror "/etc/init.d/openconnect.vpn0 start"
+ return 1
+ fi
+}
+
+checktuntap() {
+ if [ $(uname -s) = "Linux" ] ; then
+ if [ ! -e /dev/net/tun ]; then
+ if ! modprobe tun ; then
+ eerror "TUN/TAP support is not available in this kernel"
+ return 1
+ fi
+ fi
+ if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then
+ ebegin "Detected broken /dev/net/tun symlink, fixing..."
+ rm -f /dev/net/tun
+ ln -s /dev/misc/net/tun /dev/net/tun
+ eend $?
+ fi
+ fi
+}
+
+start() {
+ ebegin "Starting OpenConnect: ${VPN}"
+
+ local tmp_SERVER tmp_VPNOPTS tmp_PASSWORD
+ eval tmp_SERVER="\${${SERVER}}"
+ eval tmp_VPNOPTS="\${${VPNOPTS}}"
+ eval tmp_PASSWORD="\${${PASSWORD}}"
+
+ checkconfig || return 1
+
+ checktuntap || return 1
+
+ if [ "${tmp_SERVER}" = "vpn.server.tld" ]; then
+ eend 1 "${VPN} not configured"
+ return 1
+ fi
+
+ if [ ! -e "${VPNLOG}" ]; then
+ mkdir -p "${VPNLOG}"
+ fi
+
+ local piddir="${VPNPID%/*}"
+ if [ ! -d "$piddir" ] ; then
+ mkdir -p "$piddir"
+ if [ $? -ne 0 ]; then
+ eerror "Directory $piddir for pidfile does not exist and cannot be created"
+ return 1
+ fi
+ fi
+
+ if [ -x "${PREUPSCRIPT}" ] ; then
+ "${PREUPSCRIPT}"
+ fi
+
+ start-stop-daemon --start \
+ --make-pidfile \
+ --pidfile "${VPNPID}" \
+ --stderr "${VPNERRFILE}" \
+ --stdout "${VPNLOGFILE}" \
+ --background \
+ --exec /usr/sbin/openconnect -- \
+ --interface="${VPN}" \
+ --pid-file="${VPNPID}" \
+ ${tmp_VPNOPTS} \
+ ${tmp_SERVER} <<-E
+ ${tmp_PASSWORD}
+ E
+
+ local retval=$?
+
+ if [ ! ${retval} -eq 0 ]; then
+ eend ${retval}
+ return ${retval}
+ fi
+
+ if [ -x "${POSTUPSCRIPT}" ] ; then
+ # wait until the interface is up and an ip address is set before running postup
+ while true; do
+ sleep 0.5
+ if [ -n "$(ip addr show $VPN 2> /dev/null | grep inet)" ]; then
+ "${POSTUPSCRIPT}"
+ break
+ fi
+ done
+ fi
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping OpenConnect: ${VPN}"
+
+ checkconfig || return 1
+
+ if [ -x "${PREDOWNSCRIPT}" ] ; then
+ "${PREDOWNSCRIPT}"
+ fi
+
+ start-stop-daemon --pidfile "${VPNPID}" --stop /usr/sbin/openconnect
+ local retval=$?
+
+ if [ ! ${retval} -eq 0 ]; then
+ eend ${retval}
+ return ${retval}
+ fi
+
+
+ if [ -x "${POSTDOWNSCRIPT}" ] ; then
+ "${POSTDOWNSCRIPT}"
+ fi
+ eend $?
+}
diff --git a/net-misc/openconnect/files/openconnect.init.in-r4 b/net-misc/openconnect/files/openconnect.init.in-r4
new file mode 100644
index 000000000000..f1af83eae192
--- /dev/null
+++ b/net-misc/openconnect/files/openconnect.init.in-r4
@@ -0,0 +1,89 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+VPN="${RC_SVCNAME#*.}"
+VPNDIR="/etc/openconnect/${VPN}"
+VPNLOG="/var/log/openconnect/${VPN}"
+VPNLOGFILE="${VPNLOG}/openconnect.log"
+VPNERRFILE="${VPNLOG}/openconnect.err"
+
+command="/usr/sbin/openconnect"
+name="OpenConnect: ${VPN}"
+pidfile="/run/openconnect/${VPN}.pid"
+stopsig="SIGINT"
+
+depend() {
+ before netmount
+}
+
+checkconfig() {
+ if [ $VPN = "openconnect" ]; then
+ eerror "You cannot call openconnect directly. You must create a symbolic link to it with the vpn name:"
+ eerror
+ eerror "ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0"
+ eerror
+ eerror "And then call it instead:"
+ eerror
+ eerror "/etc/init.d/openconnect.vpn0 start"
+ return 1
+ fi
+}
+
+checktuntap() {
+ if [ "$RC_UNAME" = "Linux" -a ! -e /dev/net/tun ] ; then
+ if ! modprobe tun ; then
+ eerror "TUN/TAP support is not available in this kernel"
+ return 1
+ fi
+ fi
+}
+
+run_hook() {
+ if [ -x "$1" ]; then
+ "$@"
+ fi
+}
+
+start_pre() {
+ checkconfig || return
+ checktuntap || return
+ checkpath -d "${VPNLOG}" || return
+ checkpath -d /run/openconnect || return
+ run_hook "${VPNDIR}/preup.sh"
+}
+
+start() {
+ local server vpnopts password
+ eval server=\$server_${VPN}
+ eval vpnopts=\$vpnopts_${VPN}
+ eval password=\$password_${VPN}
+
+ ebegin "Starting ${name}"
+ start-stop-daemon --start --exec "${command}" -- \
+ --background \
+ --interface="${VPN}" \
+ --pid-file="${pidfile}" \
+ ${vpnopts} \
+ "${server}" \
+ >> "${VPNLOGFILE}" \
+ 2>> "${VPNERRFILE}" \
+ <<EOF
+${password}
+EOF
+ eend $?
+}
+
+start_post() {
+ run_hook "${VPNDIR}/postup.sh"
+}
+
+stop_pre() {
+ checkconfig || return
+ run_hook "${VPNDIR}/predown.sh"
+}
+
+stop_post() {
+ run_hook "${VPNDIR}/postdown.sh"
+}
diff --git a/net-misc/openconnect/files/openconnect.logrotate b/net-misc/openconnect/files/openconnect.logrotate
new file mode 100644
index 000000000000..0455e6845b28
--- /dev/null
+++ b/net-misc/openconnect/files/openconnect.logrotate
@@ -0,0 +1,8 @@
+# openconnect logrotate snipet for Gentoo Linux
+#
+/var/log/openconnect/*/* {
+ missingok
+ size 5M
+ notifempty
+}
+
diff --git a/net-misc/openconnect/metadata.xml b/net-misc/openconnect/metadata.xml
new file mode 100644
index 000000000000..00d9c55e8e37
--- /dev/null
+++ b/net-misc/openconnect/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mattsch@gmail.com</email>
+ <name>Matthew Schultz</name>
+ <description>Proxied maintainer. Assign bugs to him.</description>
+ </maintainer>
+ <maintainer>
+ <email>floppym@gentoo.org</email>
+ <name>Mike Gilbert</name>
+ </maintainer>
+ <herd>proxy-maintainers</herd>
+ <use>
+ <flag name='gssapi'>Build GSSAPI support.</flag>
+ <flag name='java'>Build JNI bindings using jni.h</flag>
+ <flag name='libproxy'>Enable proxy support.</flag>
+ </use>
+</pkgmetadata>
+
diff --git a/net-misc/openconnect/openconnect-4.08.ebuild b/net-misc/openconnect/openconnect-4.08.ebuild
new file mode 100644
index 000000000000..5925f16ed1a0
--- /dev/null
+++ b/net-misc/openconnect/openconnect-4.08.ebuild
@@ -0,0 +1,144 @@
+# 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 linux-info python-any-r1
+
+DESCRIPTION="Free client for Cisco AnyConnect SSL VPN software"
+HOMEPAGE="http://www.infradead.org/openconnect.html"
+# New versions of openconnect-script can be found here:
+# http://git.infradead.org/users/dwmw2/vpnc-scripts.git/history/HEAD:/vpnc-script
+SRC_URI="ftp://ftp.infradead.org/pub/${PN}/${P}.tar.gz
+ http://dev.gentoo.org/~hwoarang/distfiles/openconnect-script-20121108205904.tar.gz"
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0/2"
+KEYWORDS="amd64 ppc64 x86"
+IUSE="doc static-libs nls -gnutls"
+ILINGUAS="ar as ast bg bg_BG bn bn_IN bs ca ca@valencia cs da de el en_GB en_US eo es es_CR
+ es_MX et eu fa fi fr gd gl gu he hi hi_IN hu id it ja km kn ko ku lo lt lv ml mr
+ ms nb nl nn no or pa pl pt pt_BR pt_PT ro ru sk sl sq sr sr@latin sv ta te
+ tg th tl tr ug uk ur_PK vi vi_VN wa zh_CN zh_HK zh_TW"
+for lang in $ILINGUAS; do
+ IUSE="${IUSE} linguas_${lang}"
+done
+
+DEPEND="dev-libs/libxml2
+ net-libs/libproxy
+ sys-libs/zlib
+ !gnutls? ( dev-libs/openssl[static-libs?] )
+ gnutls? (
+ || (
+ ( >=net-libs/gnutls-3[static-libs?] dev-libs/nettle )
+ ( =net-libs/gnutls-2.12*[nettle,static-libs?] dev-libs/nettle )
+ ( =net-libs/gnutls-2.12*[-nettle,static-libs?] dev-libs/libgcrypt:0[static-libs?] )
+ )
+ app-misc/ca-certificates
+ )
+ doc? ( ${PYTHON_DEPS} )"
+
+RDEPEND="${DEPEND}
+ sys-apps/iproute2"
+
+tun_tap_check() {
+ ebegin "Checking for TUN/TAP support"
+ if { ! linux_chkconfig_present TUN; }; then
+ eerror "Please enable TUN/TAP support in your kernel config, found at:"
+ eerror
+ eerror " Device Drivers --->"
+ eerror " [*] Network device support --->"
+ eerror " <*> Universal TUN/TAP device driver support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "no CONFIG_TUN support detected!"
+ fi
+ eend $?
+}
+
+pkg_setup() {
+ if use doc; then
+ python-any-r1_pkg_setup
+ fi
+
+ if use kernel_linux; then
+ get_version
+ if linux_config_exists; then
+ tun_tap_check
+ else
+ ewarn "Was unable to determine your kernel .config"
+ ewarn "Please note that OpenConnect requires CONFIG_TUN to be set in your"
+ ewarn "kernel .config, Without it, it will not work correctly."
+ # We don't die here, so it's possible to compile this package without
+ # kernel sources available. Required for cross-compilation.
+ fi
+ fi
+}
+
+src_configure() {
+ strip-linguas $ILINGUAS
+ echo ${LINGUAS} > po/LINGUAS
+ # Override vpn-script test since the build system violates the sandbox and
+ # needs the path set to the real default path after it's installed
+ sed -e "s#-x \"\$with_vpnc_script\"#-n \"${WORKDIR}/openconnect-script\"#" \
+ -i configure || die
+ if ! use doc; then
+ # If the python cannot be found, the docs will not build
+ sed -e 's#"${ac_cv_path_PYTHON}"#""#' -i configure || die
+ fi
+ econf \
+ --with-vpnc-script=/etc/openconnect/openconnect.sh \
+ $(use_enable static-libs static) \
+ $(use_enable nls ) \
+ $(use_with !gnutls openssl) \
+ $(use_with gnutls )
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc AUTHORS TODO
+ newinitd "${FILESDIR}"/openconnect.init.in openconnect
+ dodir /etc/openconnect
+ insinto /etc/openconnect
+ newconfd "${FILESDIR}"/openconnect.conf.in openconnect
+ exeinto /etc/openconnect
+ newexe "${WORKDIR}"/openconnect-script openconnect.sh
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/openconnect.logrotate openconnect
+ keepdir /var/log/openconnect
+
+ # Remove useless .la files
+ find "${D}" -name '*.la' -delete || die "la file removal failed"
+}
+
+pkg_postinst() {
+ elog "The init script for openconnect has changed and now supports multiple vpn tunnels."
+ elog
+ elog "You need to create a symbolic link to /etc/init.d/openconnect in /etc/init.d"
+ elog "instead of calling it directly:"
+ elog
+ elog "ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0"
+ elog
+ elog "You can then start the vpn tunnel like this:"
+ elog
+ elog "/etc/init.d/openconnect.vpn0 start"
+ elog
+ elog "If you would like to run preup, postup, predown, and/or postdown scripts,"
+ elog "You need to create a directory in /etc/openconnect with the name of the vpn:"
+ elog
+ elog "mkdir /etc/openconnect/vpn0"
+ elog
+ elog "Then add executable shell files:"
+ elog
+ elog "mkdir /etc/openconnect/vpn0"
+ elog "cd /etc/openconnect/vpn0"
+ elog "echo '#!/bin/sh' > preup.sh"
+ elog "cp preup.sh predown.sh"
+ elog "cp preup.sh postup.sh"
+ elog "cp preup.sh postdown.sh"
+ elog "chmod 755 /etc/openconnect/vpn0/*"
+}
diff --git a/net-misc/openconnect/openconnect-6.00.ebuild b/net-misc/openconnect/openconnect-6.00.ebuild
new file mode 100644
index 000000000000..eaea25593759
--- /dev/null
+++ b/net-misc/openconnect/openconnect-6.00.ebuild
@@ -0,0 +1,153 @@
+# 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="xml"
+
+inherit eutils linux-info python-any-r1
+
+DESCRIPTION="Free client for Cisco AnyConnect SSL VPN software"
+HOMEPAGE="http://www.infradead.org/openconnect.html"
+# New versions of openconnect-script can be found here:
+# http://git.infradead.org/users/dwmw2/vpnc-scripts.git/history/HEAD:/vpnc-script
+SRC_URI="ftp://ftp.infradead.org/pub/${PN}/${P}.tar.gz
+ http://dev.gentoo.org/~hasufell/distfiles/openconnect-script-20140311.tar.xz"
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0/3"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE="doc +gnutls gssapi java libproxy nls static-libs"
+ILINGUAS="ar cs de el en_GB en_US es eu fi fr gl id lt nl pa pl pt pt_BR sk sl tg ug uk zh_CN zh_TW"
+for lang in $ILINGUAS; do
+ IUSE="${IUSE} linguas_${lang}"
+done
+
+DEPEND="dev-libs/libxml2
+ sys-libs/zlib
+ !gnutls? (
+ >=dev-libs/openssl-1.0.1h:0[static-libs?]
+ )
+ gnutls? (
+ >=net-libs/gnutls-3[static-libs?] dev-libs/nettle
+ app-misc/ca-certificates
+ )
+ gssapi? ( virtual/krb5 )
+ libproxy? ( net-libs/libproxy )
+ nls? ( virtual/libintl )"
+RDEPEND="${DEPEND}
+ sys-apps/iproute2
+ java? ( virtual/jre )"
+DEPEND="${DEPEND}
+ virtual/pkgconfig
+ doc? ( ${PYTHON_DEPS} sys-apps/groff )
+ java? ( virtual/jdk )
+ nls? ( sys-devel/gettext )"
+
+tun_tap_check() {
+ ebegin "Checking for TUN/TAP support"
+ if { ! linux_chkconfig_present TUN; }; then
+ eerror "Please enable TUN/TAP support in your kernel config, found at:"
+ eerror
+ eerror " Device Drivers --->"
+ eerror " [*] Network device support --->"
+ eerror " <*> Universal TUN/TAP device driver support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "no CONFIG_TUN support detected!"
+ fi
+ eend $?
+}
+
+pkg_setup() {
+ if use doc; then
+ python-any-r1_pkg_setup
+ fi
+
+ if use kernel_linux; then
+ get_version
+ if linux_config_exists; then
+ tun_tap_check
+ else
+ ewarn "Was unable to determine your kernel .config"
+ ewarn "Please note that OpenConnect requires CONFIG_TUN to be set in your"
+ ewarn "kernel .config, Without it, it will not work correctly."
+ # We don't die here, so it's possible to compile this package without
+ # kernel sources available. Required for cross-compilation.
+ fi
+ fi
+}
+
+src_configure() {
+ strip-linguas $ILINGUAS
+ echo ${LINGUAS} > po/LINGUAS
+ # Override vpn-script test since the build system violates the sandbox and
+ # needs the path set to the real default path after it's installed
+ sed -e "s#-x \"\$with_vpnc_script\"#-n \"${WORKDIR}/openconnect-script\"#" \
+ -i configure || die
+ if ! use doc; then
+ # If the python cannot be found, the docs will not build
+ sed -e 's#"${ac_cv_path_PYTHON}"#""#' -i configure || die
+ fi
+
+ # stoken and liboath not in portage
+ econf \
+ --with-vpnc-script=/etc/openconnect/openconnect.sh \
+ $(use_enable static-libs static) \
+ $(use_enable nls ) \
+ $(use_with !gnutls openssl) \
+ $(use_with gnutls ) \
+ $(use_with libproxy) \
+ --without-stoken \
+ --without-liboath \
+ $(use_with gssapi) \
+ $(use_with java)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc AUTHORS TODO
+ newinitd "${FILESDIR}"/openconnect.init.in-r2 openconnect
+ dodir /etc/openconnect
+ insinto /etc/openconnect
+ newconfd "${FILESDIR}"/openconnect.conf.in openconnect
+ exeinto /etc/openconnect
+ newexe "${WORKDIR}"/openconnect-script openconnect.sh
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/openconnect.logrotate openconnect
+ keepdir /var/log/openconnect
+
+ # Remove useless .la files
+ find "${D}" -name '*.la' -delete || die "la file removal failed"
+}
+
+pkg_postinst() {
+ elog "The init script for openconnect has changed and now supports multiple vpn tunnels."
+ elog
+ elog "You need to create a symbolic link to /etc/init.d/openconnect in /etc/init.d"
+ elog "instead of calling it directly:"
+ elog
+ elog "ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0"
+ elog
+ elog "You can then start the vpn tunnel like this:"
+ elog
+ elog "/etc/init.d/openconnect.vpn0 start"
+ elog
+ elog "If you would like to run preup, postup, predown, and/or postdown scripts,"
+ elog "You need to create a directory in /etc/openconnect with the name of the vpn:"
+ elog
+ elog "mkdir /etc/openconnect/vpn0"
+ elog
+ elog "Then add executable shell files:"
+ elog
+ elog "mkdir /etc/openconnect/vpn0"
+ elog "cd /etc/openconnect/vpn0"
+ elog "echo '#!/bin/sh' > preup.sh"
+ elog "cp preup.sh predown.sh"
+ elog "cp preup.sh postup.sh"
+ elog "cp preup.sh postdown.sh"
+ elog "chmod 755 /etc/openconnect/vpn0/*"
+}
diff --git a/net-misc/openconnect/openconnect-7.02.ebuild b/net-misc/openconnect/openconnect-7.02.ebuild
new file mode 100644
index 000000000000..b0ce96a44a9b
--- /dev/null
+++ b/net-misc/openconnect/openconnect-7.02.ebuild
@@ -0,0 +1,150 @@
+# 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="xml"
+
+inherit eutils linux-info python-any-r1
+
+DESCRIPTION="Free client for Cisco AnyConnect SSL VPN software"
+HOMEPAGE="http://www.infradead.org/openconnect.html"
+VPNC_VER=20140806
+SRC_URI="ftp://ftp.infradead.org/pub/${PN}/${P}.tar.gz
+ ftp://ftp.infradead.org/pub/vpnc-scripts/vpnc-scripts-${VPNC_VER}.tar.gz"
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0/5"
+KEYWORDS="~amd64 arm ~arm64 ~ppc64 ~x86"
+IUSE="doc +gnutls gssapi java libproxy nls static-libs"
+ILINGUAS="ar cs de el en_GB en_US es eu fi fr gl id lt nl pa pl pt pt_BR sk sl tg ug uk zh_CN zh_TW"
+for lang in $ILINGUAS; do
+ IUSE="${IUSE} linguas_${lang}"
+done
+
+DEPEND="dev-libs/libxml2
+ sys-libs/zlib
+ !gnutls? (
+ >=dev-libs/openssl-1.0.1h:0[static-libs?]
+ )
+ gnutls? (
+ >=net-libs/gnutls-3[static-libs?] dev-libs/nettle
+ app-misc/ca-certificates
+ )
+ gssapi? ( virtual/krb5 )
+ libproxy? ( net-libs/libproxy )
+ nls? ( virtual/libintl )"
+RDEPEND="${DEPEND}
+ sys-apps/iproute2
+ java? ( virtual/jre )"
+DEPEND="${DEPEND}
+ virtual/pkgconfig
+ doc? ( ${PYTHON_DEPS} sys-apps/groff )
+ java? ( virtual/jdk )
+ nls? ( sys-devel/gettext )"
+
+tun_tap_check() {
+ ebegin "Checking for TUN/TAP support"
+ if { ! linux_chkconfig_present TUN; }; then
+ eerror "Please enable TUN/TAP support in your kernel config, found at:"
+ eerror
+ eerror " Device Drivers --->"
+ eerror " [*] Network device support --->"
+ eerror " <*> Universal TUN/TAP device driver support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "no CONFIG_TUN support detected!"
+ fi
+ eend $?
+}
+
+pkg_setup() {
+ if use doc; then
+ python-any-r1_pkg_setup
+ fi
+
+ if use kernel_linux; then
+ get_version
+ if linux_config_exists; then
+ tun_tap_check
+ else
+ ewarn "Was unable to determine your kernel .config"
+ ewarn "Please note that OpenConnect requires CONFIG_TUN to be set in your"
+ ewarn "kernel .config, Without it, it will not work correctly."
+ # We don't die here, so it's possible to compile this package without
+ # kernel sources available. Required for cross-compilation.
+ fi
+ fi
+}
+
+src_configure() {
+ strip-linguas $ILINGUAS
+ echo ${LINGUAS} > po/LINGUAS
+ if ! use doc; then
+ # If the python cannot be found, the docs will not build
+ sed -e 's#"${ac_cv_path_PYTHON}"#""#' -i configure || die
+ fi
+
+ # stoken and liboath not in portage
+ econf \
+ --with-vpnc-script="${EPREFIX}/etc/openconnect/openconnect.sh" \
+ $(use_enable static-libs static) \
+ $(use_enable nls ) \
+ $(use_with !gnutls openssl) \
+ $(use_with gnutls ) \
+ $(use_with libproxy) \
+ --without-stoken \
+ --without-liboath \
+ $(use_with gssapi) \
+ $(use_with java)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc AUTHORS TODO
+ newinitd "${FILESDIR}"/openconnect.init.in-r3 openconnect
+ dodir /etc/openconnect
+ insinto /etc/openconnect
+ newconfd "${FILESDIR}"/openconnect.conf.in openconnect
+ exeinto /etc/openconnect
+ newexe "${WORKDIR}"/vpnc-scripts-${VPNC_VER}/vpnc-script openconnect.sh
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/openconnect.logrotate openconnect
+ keepdir /var/log/openconnect
+
+ # Remove useless .la files
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The init script for openconnect has changed and now supports multiple vpn tunnels."
+ elog
+ elog "You need to create a symbolic link to /etc/init.d/openconnect in /etc/init.d"
+ elog "instead of calling it directly:"
+ elog
+ elog "ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0"
+ elog
+ elog "You can then start the vpn tunnel like this:"
+ elog
+ elog "/etc/init.d/openconnect.vpn0 start"
+ elog
+ elog "If you would like to run preup, postup, predown, and/or postdown scripts,"
+ elog "You need to create a directory in /etc/openconnect with the name of the vpn:"
+ elog
+ elog "mkdir /etc/openconnect/vpn0"
+ elog
+ elog "Then add executable shell files:"
+ elog
+ elog "mkdir /etc/openconnect/vpn0"
+ elog "cd /etc/openconnect/vpn0"
+ elog "echo '#!/bin/sh' > preup.sh"
+ elog "cp preup.sh predown.sh"
+ elog "cp preup.sh postup.sh"
+ elog "cp preup.sh postdown.sh"
+ elog "chmod 755 /etc/openconnect/vpn0/*"
+ fi
+}
diff --git a/net-misc/openconnect/openconnect-7.06-r1.ebuild b/net-misc/openconnect/openconnect-7.06-r1.ebuild
new file mode 100644
index 000000000000..ab33ab3a05cb
--- /dev/null
+++ b/net-misc/openconnect/openconnect-7.06-r1.ebuild
@@ -0,0 +1,159 @@
+# 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="xml"
+
+inherit eutils java-pkg-opt-2 linux-info python-any-r1 readme.gentoo
+
+DESCRIPTION="Free client for Cisco AnyConnect SSL VPN software"
+HOMEPAGE="http://www.infradead.org/openconnect.html"
+VPNC_VER=20140806
+SRC_URI="ftp://ftp.infradead.org/pub/${PN}/${P}.tar.gz
+ ftp://ftp.infradead.org/pub/vpnc-scripts/vpnc-scripts-${VPNC_VER}.tar.gz"
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0/5"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="doc +gnutls gssapi java libproxy nls static-libs"
+ILINGUAS="ar cs de el en_GB en_US es eu fi fr gl id lt nl pa pl pt pt_BR sk sl tg ug uk zh_CN zh_TW"
+for lang in $ILINGUAS; do
+ IUSE="${IUSE} linguas_${lang}"
+done
+
+DEPEND="dev-libs/libxml2
+ sys-libs/zlib
+ !gnutls? (
+ >=dev-libs/openssl-1.0.1h:0[static-libs?]
+ )
+ gnutls? (
+ >=net-libs/gnutls-3[static-libs?] dev-libs/nettle
+ app-misc/ca-certificates
+ )
+ gssapi? ( virtual/krb5 )
+ libproxy? ( net-libs/libproxy )
+ nls? ( virtual/libintl )"
+RDEPEND="${DEPEND}
+ sys-apps/iproute2
+ !<sys-apps/openrc-0.13"
+DEPEND="${DEPEND}
+ virtual/pkgconfig
+ doc? ( ${PYTHON_DEPS} sys-apps/groff )
+ java? ( >=virtual/jdk-1.6 )
+ nls? ( sys-devel/gettext )"
+
+tun_tap_check() {
+ ebegin "Checking for TUN/TAP support"
+ if { ! linux_chkconfig_present TUN; }; then
+ eerror "Please enable TUN/TAP support in your kernel config, found at:"
+ eerror
+ eerror " Device Drivers --->"
+ eerror " [*] Network device support --->"
+ eerror " <*> Universal TUN/TAP device driver support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "no CONFIG_TUN support detected!"
+ fi
+ eend $?
+}
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+
+ if use doc; then
+ python-any-r1_pkg_setup
+ fi
+
+ if use kernel_linux; then
+ get_version
+ if linux_config_exists; then
+ tun_tap_check
+ else
+ ewarn "Was unable to determine your kernel .config"
+ ewarn "Please note that OpenConnect requires CONFIG_TUN to be set in your"
+ ewarn "kernel .config, Without it, it will not work correctly."
+ # We don't die here, so it's possible to compile this package without
+ # kernel sources available. Required for cross-compilation.
+ fi
+ fi
+}
+
+src_configure() {
+ strip-linguas $ILINGUAS
+ echo ${LINGUAS} > po/LINGUAS
+ if ! use doc; then
+ # If the python cannot be found, the docs will not build
+ sed -e 's#"${ac_cv_path_PYTHON}"#""#' -i configure || die
+ fi
+
+ # stoken and liboath not in portage
+ econf \
+ --with-vpnc-script="${EPREFIX}/etc/openconnect/openconnect.sh" \
+ $(use_enable static-libs static) \
+ $(use_enable nls ) \
+ $(use_with !gnutls openssl) \
+ $(use_with gnutls ) \
+ $(use_with libproxy) \
+ --without-stoken \
+ $(use_with gssapi) \
+ $(use_with java)
+}
+
+DOC_CONTENTS="The init script for openconnect supports multiple vpn tunnels.
+
+You need to create a symbolic link to /etc/init.d/openconnect in /etc/init.d
+instead of calling it directly:
+
+ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0
+
+You can then start the vpn tunnel like this:
+
+/etc/init.d/openconnect.vpn0 start
+
+If you would like to run preup, postup, predown, and/or postdown scripts,
+You need to create a directory in /etc/openconnect with the name of the vpn:
+
+mkdir /etc/openconnect/vpn0
+
+Then add executable shell files:
+
+mkdir /etc/openconnect/vpn0
+cd /etc/openconnect/vpn0
+echo '#!/bin/sh' > preup.sh
+cp preup.sh predown.sh
+cp preup.sh postup.sh
+cp preup.sh postdown.sh
+chmod 755 /etc/openconnect/vpn0/*
+"
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc AUTHORS TODO
+ newinitd "${FILESDIR}"/openconnect.init.in-r4 openconnect
+ dodir /etc/openconnect
+ insinto /etc/openconnect
+ newconfd "${FILESDIR}"/openconnect.conf.in openconnect
+ exeinto /etc/openconnect
+ newexe "${WORKDIR}"/vpnc-scripts-${VPNC_VER}/vpnc-script openconnect.sh
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/openconnect.logrotate openconnect
+ keepdir /var/log/openconnect
+
+ # Remove useless .la files
+ prune_libtool_files --all
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog
+ elog "You may want to consider installing the following optional packages."
+ optfeature "resolvconf support" net-dns/openresolv
+ fi
+}
diff --git a/net-misc/openconnect/openconnect-7.06.ebuild b/net-misc/openconnect/openconnect-7.06.ebuild
new file mode 100644
index 000000000000..50197d67df9a
--- /dev/null
+++ b/net-misc/openconnect/openconnect-7.06.ebuild
@@ -0,0 +1,158 @@
+# 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="xml"
+
+inherit eutils java-pkg-opt-2 linux-info python-any-r1 readme.gentoo
+
+DESCRIPTION="Free client for Cisco AnyConnect SSL VPN software"
+HOMEPAGE="http://www.infradead.org/openconnect.html"
+VPNC_VER=20140806
+SRC_URI="ftp://ftp.infradead.org/pub/${PN}/${P}.tar.gz
+ ftp://ftp.infradead.org/pub/vpnc-scripts/vpnc-scripts-${VPNC_VER}.tar.gz"
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0/5"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="doc +gnutls gssapi java libproxy nls static-libs"
+ILINGUAS="ar cs de el en_GB en_US es eu fi fr gl id lt nl pa pl pt pt_BR sk sl tg ug uk zh_CN zh_TW"
+for lang in $ILINGUAS; do
+ IUSE="${IUSE} linguas_${lang}"
+done
+
+DEPEND="dev-libs/libxml2
+ sys-libs/zlib
+ !gnutls? (
+ >=dev-libs/openssl-1.0.1h:0[static-libs?]
+ )
+ gnutls? (
+ >=net-libs/gnutls-3[static-libs?] dev-libs/nettle
+ app-misc/ca-certificates
+ )
+ gssapi? ( virtual/krb5 )
+ libproxy? ( net-libs/libproxy )
+ nls? ( virtual/libintl )"
+RDEPEND="${DEPEND}
+ sys-apps/iproute2"
+DEPEND="${DEPEND}
+ virtual/pkgconfig
+ doc? ( ${PYTHON_DEPS} sys-apps/groff )
+ java? ( >=virtual/jdk-1.6 )
+ nls? ( sys-devel/gettext )"
+
+tun_tap_check() {
+ ebegin "Checking for TUN/TAP support"
+ if { ! linux_chkconfig_present TUN; }; then
+ eerror "Please enable TUN/TAP support in your kernel config, found at:"
+ eerror
+ eerror " Device Drivers --->"
+ eerror " [*] Network device support --->"
+ eerror " <*> Universal TUN/TAP device driver support"
+ eerror
+ eerror "and recompile your kernel ..."
+ die "no CONFIG_TUN support detected!"
+ fi
+ eend $?
+}
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+
+ if use doc; then
+ python-any-r1_pkg_setup
+ fi
+
+ if use kernel_linux; then
+ get_version
+ if linux_config_exists; then
+ tun_tap_check
+ else
+ ewarn "Was unable to determine your kernel .config"
+ ewarn "Please note that OpenConnect requires CONFIG_TUN to be set in your"
+ ewarn "kernel .config, Without it, it will not work correctly."
+ # We don't die here, so it's possible to compile this package without
+ # kernel sources available. Required for cross-compilation.
+ fi
+ fi
+}
+
+src_configure() {
+ strip-linguas $ILINGUAS
+ echo ${LINGUAS} > po/LINGUAS
+ if ! use doc; then
+ # If the python cannot be found, the docs will not build
+ sed -e 's#"${ac_cv_path_PYTHON}"#""#' -i configure || die
+ fi
+
+ # stoken and liboath not in portage
+ econf \
+ --with-vpnc-script="${EPREFIX}/etc/openconnect/openconnect.sh" \
+ $(use_enable static-libs static) \
+ $(use_enable nls ) \
+ $(use_with !gnutls openssl) \
+ $(use_with gnutls ) \
+ $(use_with libproxy) \
+ --without-stoken \
+ $(use_with gssapi) \
+ $(use_with java)
+}
+
+DOC_CONTENTS="The init script for openconnect supports multiple vpn tunnels.
+
+You need to create a symbolic link to /etc/init.d/openconnect in /etc/init.d
+instead of calling it directly:
+
+ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0
+
+You can then start the vpn tunnel like this:
+
+/etc/init.d/openconnect.vpn0 start
+
+If you would like to run preup, postup, predown, and/or postdown scripts,
+You need to create a directory in /etc/openconnect with the name of the vpn:
+
+mkdir /etc/openconnect/vpn0
+
+Then add executable shell files:
+
+mkdir /etc/openconnect/vpn0
+cd /etc/openconnect/vpn0
+echo '#!/bin/sh' > preup.sh
+cp preup.sh predown.sh
+cp preup.sh postup.sh
+cp preup.sh postdown.sh
+chmod 755 /etc/openconnect/vpn0/*
+"
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc AUTHORS TODO
+ newinitd "${FILESDIR}"/openconnect.init.in-r3 openconnect
+ dodir /etc/openconnect
+ insinto /etc/openconnect
+ newconfd "${FILESDIR}"/openconnect.conf.in openconnect
+ exeinto /etc/openconnect
+ newexe "${WORKDIR}"/vpnc-scripts-${VPNC_VER}/vpnc-script openconnect.sh
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/openconnect.logrotate openconnect
+ keepdir /var/log/openconnect
+
+ # Remove useless .la files
+ prune_libtool_files --all
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog
+ elog "You may want to consider installing the following optional packages."
+ optfeature "resolvconf support" net-dns/openresolv
+ fi
+}
diff --git a/net-misc/openntpd/Manifest b/net-misc/openntpd/Manifest
new file mode 100644
index 000000000000..b610e7332681
--- /dev/null
+++ b/net-misc/openntpd/Manifest
@@ -0,0 +1,3 @@
+DIST openntpd-5.7p4.tar.gz 427900 SHA256 a993d95976e375acc0ab1a677fd268f55024477835633c8ae404895046bccb23 SHA512 2a185139c915482086069fa19dd3070884a415137d1688059559d2da892928afbbe2fa0a8ade70d474809710265dcc05906abaf261892d7894e70272e2e516ef WHIRLPOOL 9464941e0f055ecd1db19a03bb5264a1dce02c6c7c2be078d1e3a19b5bd0a3c4e19ee6768617c90ebed01dea32f3a63751f9ef0436f56e22b7e6bd673a065546
+DIST openntpd_20080406p-6.debian.tar.gz 11849 SHA256 6718ffb52b7f34c7c3e9532d245f31ee5c749bac2cc2c2d4594d8161925a3122 SHA512 f857fbc85e29035470af0855c8fc416c188f55586ba2e1d719159ecfa4a0274ba4dd526409dfd915056a1c15f5e44cb8c40196a7e03c3026c5d73851ebb5abc8 WHIRLPOOL 35bc0ab16d161c7878d438641eede8425238fbce4d32f6b56e347252e6ad561dc1a5795e3bc3cf133fa09dccb69520cb9837c7134bc0fe6cec9ea14be314ee51
+DIST openntpd_20080406p.orig.tar.gz 175923 SHA256 52f473dd8ea8864023ebcdce16a9a50571803af7ffc32a00212242c6a866c3b2 SHA512 9561788002b232786d1589f74bbe2f07a029e3407da4471d2ac9d5e20d8839dbb6e6e53493c78829058611ca23bf00560bbe7bcfe76204d206747752fd47f696 WHIRLPOOL 545125d0ee5ced7827df3d804ac63938d2614e9fb4a2bf3c6bbc17f6040175aa03c057d7a4d3da71ae944f4a556e2b66266d1c6d0463c1cad5d86de3ae896712
diff --git a/net-misc/openntpd/files/openntpd-20080406-dns-timeout.patch b/net-misc/openntpd/files/openntpd-20080406-dns-timeout.patch
new file mode 100644
index 000000000000..6026037331a7
--- /dev/null
+++ b/net-misc/openntpd/files/openntpd-20080406-dns-timeout.patch
@@ -0,0 +1,46 @@
+fix dns lookups timeout
+https://bugs.gentoo.org/show_bug.cgi?id=493358
+
+diff -u openntpd-20080406p-orig/ntpd.c openntpd-20080406p/ntpd.c
+--- openntpd-20080406p-orig/ntpd.c 2013-12-04 20:12:02.562857933 -0800
++++ openntpd-20080406p/ntpd.c 2013-12-04 20:22:55.617577783 -0800
+@@ -34,6 +34,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <time.h>
+ #include <unistd.h>
+
+ #include "ntpd.h"
+@@ -95,6 +96,7 @@
+ int ch, nfds, timeout = INFTIM;
+ int pipe_chld[2];
+ extern char *__progname;
++ time_t start_time;
+
+ __progname = _compat_get_progname(argv[0]);
+
+@@ -197,6 +199,8 @@
+ fatal(NULL);
+ imsg_init(ibuf, pipe_chld[0]);
+
++ start_time = getmonotime();
++
+ while (quit == 0) {
+ pfd[PFD_PIPE].fd = ibuf->fd;
+ pfd[PFD_PIPE].events = POLLIN;
+@@ -209,11 +213,12 @@
+ quit = 1;
+ }
+
+- if (nfds == 0 && lconf.settime) {
++ if (lconf.settime &&
++ (nfds == 0 || getmonotime() > start_time+SETTIME_TIMEOUT)) {
+ lconf.settime = 0;
+ timeout = INFTIM;
+ log_init(lconf.debug);
+- log_debug("no reply received in time, skipping initial "
++ log_warnx("no reply received in time, skipping initial "
+ "time setting");
+ if (!lconf.debug) {
+ if (daemon(1, 0))
diff --git a/net-misc/openntpd/files/openntpd-20080406-pidfile.patch b/net-misc/openntpd/files/openntpd-20080406-pidfile.patch
new file mode 100644
index 000000000000..d2ee38504c3e
--- /dev/null
+++ b/net-misc/openntpd/files/openntpd-20080406-pidfile.patch
@@ -0,0 +1,141 @@
+adding a -p option to openntpd to create a pidfile
+
+https://bugs.gentoo.org/show_bug.cgi?id=493082
+
+diff -u -r openntpd-20080406p.orig/ntpd.8 openntpd-20080406p/ntpd.8
+--- openntpd-20080406p.orig/ntpd.8 2013-12-01 12:49:49.773116316 -0800
++++ openntpd-20080406p/ntpd.8 2013-12-01 13:27:39.417324497 -0800
+@@ -25,6 +25,7 @@
+ .Bk -words
+ .Op Fl dnSsv
+ .Op Fl f Ar file
++.Op Fl p Ar file
+ .Ek
+ .Sh DESCRIPTION
+ The
+@@ -63,13 +64,16 @@
+ .Xr ntpd.conf 5 .
+ .Pp
+ The options are as follows:
+-.Bl -tag -width "-f fileXXX"
++.Bl -tag -width "-p fileXXX"
+ .It Fl d
+ Do not daemonize.
+ If this option is specified,
+ .Nm
+ will run in the foreground and log to
+ .Em stderr .
++.It Fl p Ar file
++Write pid to
++.Ar file
+ .It Fl f Ar file
+ Use
+ .Ar file
+diff -u -r openntpd-20080406p.orig/ntpd.c openntpd-20080406p/ntpd.c
+--- openntpd-20080406p.orig/ntpd.c 2013-12-01 12:49:49.774116176 -0800
++++ openntpd-20080406p/ntpd.c 2013-12-01 13:31:43.964616270 -0800
+@@ -78,7 +78,7 @@
+ {
+ extern char *__progname;
+
+- fprintf(stderr, "usage: %s [-dnSsv] [-f file]\n", __progname);
++ fprintf(stderr, "usage: %s [-dnSsv] [-f file] [-p file]\n", __progname);
+ exit(1);
+ }
+
+@@ -105,7 +105,7 @@
+ log_init(1); /* log to stderr until daemonized */
+ res_init(); /* XXX */
+
+- while ((ch = getopt(argc, argv, "df:nsSv")) != -1) {
++ while ((ch = getopt(argc, argv, "df:np:sSv")) != -1) {
+ switch (ch) {
+ case 'd':
+ lconf.debug = 1;
+@@ -116,6 +116,9 @@
+ case 'n':
+ lconf.noaction = 1;
+ break;
++ case 'p':
++ lconf.pid_file = optarg;
++ break;
+ case 's':
+ lconf.settime = 1;
+ break;
+@@ -157,9 +160,17 @@
+ reset_adjtime();
+ if (!lconf.settime) {
+ log_init(lconf.debug);
+- if (!lconf.debug)
++ if (!lconf.debug) {
+ if (daemon(1, 0))
+ fatal("daemon");
++ else if (lconf.pid_file != NULL) {
++ FILE *f = fopen(lconf.pid_file, "w");
++ if (f == NULL)
++ fatal("couldn't open pid file");
++ fprintf(f, "%ld\n", (long) getpid());
++ fclose(f);
++ }
++ }
+ } else
+ timeout = SETTIME_TIMEOUT * 1000;
+
+@@ -201,9 +212,17 @@
+ log_init(lconf.debug);
+ log_debug("no reply received in time, skipping initial "
+ "time setting");
+- if (!lconf.debug)
++ if (!lconf.debug) {
+ if (daemon(1, 0))
+ fatal("daemon");
++ else if (lconf.pid_file != NULL) {
++ FILE *f = fopen(lconf.pid_file, "w");
++ if (f == NULL)
++ fatal("couldn't open pid file");
++ fprintf(f, "%ld\n", (long) getpid());
++ fclose(f);
++ }
++ }
+ }
+
+ if (nfds > 0 && (pfd[PFD_PIPE].revents & POLLOUT))
+@@ -242,6 +261,8 @@
+ msgbuf_clear(&ibuf->w);
+ free(ibuf);
+ log_info("Terminating");
++ if (lconf.pid_file != NULL)
++ unlink(lconf.pid_file);
+ return (0);
+ }
+
+@@ -316,9 +337,17 @@
+ memcpy(&d, imsg.data, sizeof(d));
+ ntpd_settime(d);
+ /* daemonize now */
+- if (!lconf->debug)
++ if (!lconf->debug) {
+ if (daemon(1, 0))
+ fatal("daemon");
++ else if (lconf->pid_file != NULL) {
++ FILE *f = fopen(lconf->pid_file, "w");
++ if (f == NULL)
++ fatal("couldn't open pid file");
++ fprintf(f, "%ld\n", (long) getpid());
++ fclose(f);
++ }
++ }
+ lconf->settime = 0;
+ break;
+ case IMSG_HOST_DNS:
+diff -u -r openntpd-20080406p.orig/ntpd.h openntpd-20080406p/ntpd.h
+--- openntpd-20080406p.orig/ntpd.h 2013-12-01 12:49:49.773116316 -0800
++++ openntpd-20080406p/ntpd.h 2013-12-01 12:54:02.023313872 -0800
+@@ -178,6 +178,7 @@
+ u_int8_t debug;
+ u_int32_t scale;
+ u_int8_t noaction;
++ char *pid_file;
+ };
+
+ struct buf {
diff --git a/net-misc/openntpd/files/openntpd-20080406-signal.patch b/net-misc/openntpd/files/openntpd-20080406-signal.patch
new file mode 100644
index 000000000000..695beecb36c9
--- /dev/null
+++ b/net-misc/openntpd/files/openntpd-20080406-signal.patch
@@ -0,0 +1,57 @@
+allow SIGUSR1 as stand-in for SIGINFO (on e.g linux)
+https://bugs.gentoo.org/show_bug.cgi?id=493084
+
+diff -u openntpd-20080406p-orig/ntp.c openntpd-20080406p/ntp.c
+--- openntpd-20080406p-orig/ntp.c 2013-12-04 15:11:04.417274938 -0800
++++ openntpd-20080406p/ntp.c 2013-12-04 15:12:21.066006404 -0800
+@@ -67,9 +67,11 @@
+ break;
+ #ifdef HAVE_SIGINFO
+ case SIGINFO:
+- ntp_report = 1;
+- break;
++#else
++ case SIGUSR1:
+ #endif
++ ntp_report = 1;
++ break;
+ }
+ }
+
+@@ -158,6 +160,8 @@
+ signal(SIGINT, ntp_sighdlr);
+ #ifdef USE_SIGINFO
+ signal(SIGINFO, ntp_sighdlr);
++#else
++ signal(SIGUSR1, ntp_sighdlr);
+ #endif
+ signal(SIGPIPE, SIG_IGN);
+ signal(SIGHUP, SIG_IGN);
+diff -u openntpd-20080406p-orig/ntpd.8 openntpd-20080406p/ntpd.8
+--- openntpd-20080406p-orig/ntpd.8 2013-12-04 15:11:04.416274915 -0800
++++ openntpd-20080406p/ntpd.8 2013-12-04 15:12:21.066006404 -0800
+@@ -104,7 +104,11 @@
+ .Nm
+ receives a
+ .Dv SIGINFO
+-signal, it will write its peer and sensor status to syslog.
++signal (or a
++.Dv SIGUSR1
++signal on systems without
++.Dv SIGINFO
++), it will write its peer and sensor status to syslog.
+ .Sh FILES
+ .Bl -tag -width "/var/lib/openntpd/ntpd.driftXXX" -compact
+ .It Pa /etc/ntpd.conf
+diff -u openntpd-20080406p-orig/ntpd.c openntpd-20080406p/ntpd.c
+--- openntpd-20080406p-orig/ntpd.c 2013-12-04 15:11:04.416274915 -0800
++++ openntpd-20080406p/ntpd.c 2013-12-04 15:14:21.586728922 -0800
+@@ -187,6 +187,9 @@
+ signal(SIGTERM, sighdlr);
+ signal(SIGINT, sighdlr);
+ signal(SIGHUP, sighdlr);
++ #ifndef HAVE_SIGINFO
++ signal(SIGUSR1, SIG_IGN);
++ #endif
+
+ close(pipe_chld[1]);
diff --git a/net-misc/openntpd/files/openntpd-5.7_p4-nolibtls.patch b/net-misc/openntpd/files/openntpd-5.7_p4-nolibtls.patch
new file mode 100644
index 000000000000..85a7c72949f2
--- /dev/null
+++ b/net-misc/openntpd/files/openntpd-5.7_p4-nolibtls.patch
@@ -0,0 +1,49 @@
+diff -u -r openntpd-5.7p4-orig/src/config.c openntpd-5.7p4/src/config.c
+--- openntpd-5.7p4-orig/src/config.c 2015-03-24 18:18:56.000000000 -0700
++++ openntpd-5.7p4/src/config.c 2015-05-25 16:48:59.000000000 -0700
+@@ -218,6 +218,9 @@
+ fatal("new_constraint calloc");
+ p->id = ++constraint_maxid;
+
++#ifndef HAVE_LIBTLS
++ fatal("constraint configured without libtls support");
++#endif
+ return (p);
+ }
+
+diff -u -r openntpd-5.7p4-orig/src/ntp.c openntpd-5.7p4/src/ntp.c
+--- openntpd-5.7p4-orig/src/ntp.c 2015-03-11 19:15:36.000000000 -0700
++++ openntpd-5.7p4/src/ntp.c 2015-05-25 16:48:59.000000000 -0700
+@@ -110,12 +110,14 @@
+ return (pid);
+ }
+
++#ifdef HAVE_LIBTLS
+ tls_init();
+
+ /* Verification will be turned off if CA is not found */
+ if ((conf->ca = tls_load_file(CONSTRAINT_CA,
+ &conf->ca_len, NULL)) == NULL)
+ log_warnx("constraint certificate verification turned off");
++#endif
+
+ /* in this case the parent didn't init logging and didn't daemonize */
+ if (nconf->settime && !nconf->debug) {
+diff -u -r openntpd-5.7p4-orig/src/ntpd.conf.5 openntpd-5.7p4/src/ntpd.conf.5
+--- openntpd-5.7p4-orig/src/ntpd.conf.5 2015-03-24 18:18:56.000000000 -0700
++++ openntpd-5.7p4/src/ntpd.conf.5 2015-05-25 16:48:59.000000000 -0700
+@@ -192,8 +192,11 @@
+ .Sq Man-In-The-Middle
+ attacks.
+ Received NTP packets with time information falling outside of a range
+-near the constraint will be discarded and such NTP servers
+-will be marked as invalid.
++near the constraint will be discarded and such NTP servers will be marked as
++invalid. Contraints are only available if
++.Xr ntpd 8
++has been compiled with libtls support. Configuring a constraint without libtls
++support will result in a fatal error.
+ .Bl -tag -width Ds
+ .It Ic constraint from Ar url
+ Specify the URL, IP address or the hostname of an HTTPS server to
+Only in openntpd-5.7p4/src: ntpd.conf.5.orig
diff --git a/net-misc/openntpd/files/openntpd.conf.d-20080406-r6 b/net-misc/openntpd/files/openntpd.conf.d-20080406-r6
new file mode 100644
index 000000000000..ccd45459664c
--- /dev/null
+++ b/net-misc/openntpd/files/openntpd.conf.d-20080406-r6
@@ -0,0 +1,7 @@
+# /etc/conf.d/ntpd: config file for openntpd's ntpd
+
+# See ntpd(8) man page ... some popular options:
+# -s Set the time immediately at startup
+# (Note: may cause up to a 15 second startup delay
+# if ntp servers not reachable)
+NTPD_OPTS=""
diff --git a/net-misc/openntpd/files/openntpd.init.d-20080406-r6 b/net-misc/openntpd/files/openntpd.init.d-20080406-r6
new file mode 100644
index 000000000000..ca7e3c5f7cf9
--- /dev/null
+++ b/net-misc/openntpd/files/openntpd.init.d-20080406-r6
@@ -0,0 +1,15 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+name="OpenNTPD"
+command="/usr/sbin/ntpd"
+pidfile="/run/ntpd.pid"
+command_args="-p ${pidfile} ${NTPD_OPTS}"
+
+depend() {
+ need net
+ after ntp-client
+ use dns logger
+}
diff --git a/net-misc/openntpd/files/openntpd.service-20080406-r4 b/net-misc/openntpd/files/openntpd.service-20080406-r4
new file mode 100644
index 000000000000..2e1bbff8ff7f
--- /dev/null
+++ b/net-misc/openntpd/files/openntpd.service-20080406-r4
@@ -0,0 +1,11 @@
+[Unit]
+Description=OpenNTP Daemon
+After=network.target
+Conflicts=systemd-timesyncd.service
+
+[Service]
+Type=simple
+ExecStart=/usr/sbin/ntpd -s -d
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/openntpd/metadata.xml b/net-misc/openntpd/metadata.xml
new file mode 100644
index 000000000000..cfa796d87054
--- /dev/null
+++ b/net-misc/openntpd/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>henson@acm.org</email>
+ <name>Paul B. Henson</name>
+ </maintainer>
+ <maintainer>
+ <email>ottxor@gentoo.org</email>
+ <name>Christoph Junghans (proxy)</name>
+ </maintainer>
+ <longdescription lang="en">
+ OpenNTPD is a FREE, easy to use implementation of the Network Time
+ Protocol. It provides the ability to sync the local clock to remote
+ NTP servers and can act as NTP server itself, redistributing the
+ local clock.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/openntpd/openntpd-4.0_pre20080406.ebuild b/net-misc/openntpd/openntpd-4.0_pre20080406.ebuild
new file mode 100644
index 000000000000..e790857150b2
--- /dev/null
+++ b/net-misc/openntpd/openntpd-4.0_pre20080406.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils toolchain-funcs systemd user
+
+MY_PV=${PV##*pre}
+MY_P="${PN}_${MY_PV}p"
+DEB_VER="6"
+DESCRIPTION="Lightweight NTP server ported from OpenBSD"
+HOMEPAGE="http://www.openntpd.org/"
+SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${MY_P}.orig.tar.gz
+ mirror://debian/pool/main/${PN:0:1}/${PN}/${MY_P}-${DEB_VER}.debian.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
+IUSE="ssl selinux"
+
+CDEPEND="ssl? ( dev-libs/openssl )
+ !<=net-misc/ntp-4.2.0-r2
+ !net-misc/ntp[-openntpd]"
+DEPEND="${CDEPEND}
+ virtual/yacc"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-ntp )
+"
+
+S="${WORKDIR}/${MY_P/_/-}"
+
+pkg_setup() {
+ export NTP_HOME="${NTP_HOME:=/var/lib/openntpd/chroot}"
+ enewgroup ntp
+ enewuser ntp -1 -1 "${NTP_HOME}" ntp
+
+ # make sure user has correct HOME as flipng between
+ # the standard ntp pkg and this one was possible in
+ # the past
+ if [[ $(egethome ntp) != ${NTP_HOME} ]]; then
+ ewarn "From this version on, the homedir of the ntp user cannot be changed"
+ ewarn "dynamically after the installation. For homedir different from"
+ ewarn "/var/lib/openntpd/chroot set NTP_HOME in your make.conf and re-emerge."
+ esethome ntp "${NTP_HOME}"
+ fi
+}
+
+src_prepare() {
+ sed -i '/NTPD_USER/s:_ntp:ntp:' ntpd.h || die
+
+ epatch "${WORKDIR}"/debian/patches/*.patch
+ epatch "${FILESDIR}/${PN}-${MY_PV}-pidfile.patch"
+ epatch "${FILESDIR}/${PN}-${MY_PV}-signal.patch"
+ epatch "${FILESDIR}/${PN}-${MY_PV}-dns-timeout.patch"
+ sed -i 's:debian:gentoo:g' ntpd.conf || die
+ eautoreconf # deb patchset touches .ac files and such
+}
+
+src_configure() {
+ econf \
+ --disable-strip \
+ $(use_with !ssl builtin-arc4random) \
+ AR="$(type -p $(tc-getAR))"
+}
+
+src_install() {
+ default
+ rmdir "${ED}"/{var/empty,var}
+
+ newinitd "${FILESDIR}/${PN}.init.d-${MY_PV}-r6" ntpd
+ newconfd "${FILESDIR}/${PN}.conf.d-${MY_PV}-r6" ntpd
+
+ systemd_newunit "${FILESDIR}/${PN}.service-${MY_PV}-r4" ntpd.service
+}
+
+pkg_config() {
+ einfo "Setting up chroot for ntp in ${NTP_HOME}"
+ # remove localtime file from previous installations
+ rm -f "${EROOT%/}${NTP_HOME}"/etc/localtime
+ mkdir -p "${EROOT%/}${NTP_HOME}"/etc
+ if ! ln "${EROOT%/}"/etc/localtime "${EROOT%/}${NTP_HOME}"/etc/localtime ; then
+ cp "${EROOT%/}"/etc/localtime "${EROOT%/}${NTP_HOME}"/etc/localtime || die
+ einfo "We could not create a hardlink from /etc/localtime to ${NTP_HOME}/etc/localtime,"
+ einfo "so please run 'emerge --config =${CATEGORY}/${PF}' whenever you changed"
+ einfo "your timezone."
+ fi
+ chown -R root:root "${EROOT%/}${NTP_HOME}" || die
+}
+
+pkg_postinst() {
+ pkg_config
+
+ [[ -f ${EROOT}var/log/ntpd.log ]] && \
+ ewarn "There is an orphaned logfile '${EROOT}var/log/ntpd.log', please remove it!"
+
+ # bug #226491, remove <=openntpd-20080406-r7 trash
+ rm -f "${EROOT%/}${NTP_HOME}"etc/localtime
+ [-d "${EROOT%/}${NTP_HOME}"etc ] && rmdir "${EROOT%/}${NTP_HOME}"etc
+}
+
+pkg_postrm() {
+ # remove localtime file from previous installations
+ rm -f "${EROOT%/}${NTP_HOME}"/etc/localtime
+}
diff --git a/net-misc/openntpd/openntpd-5.7_p4-r1.ebuild b/net-misc/openntpd/openntpd-5.7_p4-r1.ebuild
new file mode 100644
index 000000000000..721bf80554e0
--- /dev/null
+++ b/net-misc/openntpd/openntpd-5.7_p4-r1.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 systemd user
+
+MY_P="${P/_p/p}"
+DESCRIPTION="Lightweight NTP server ported from OpenBSD"
+HOMEPAGE="http://www.openntpd.org/"
+SRC_URI="mirror://openbsd/OpenNTPD/${MY_P}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="selinux"
+
+DEPEND="!<=net-misc/ntp-4.2.0-r2
+ !net-misc/ntp[-openntpd]"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-ntp )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ export NTP_HOME="${NTP_HOME:=/var/lib/openntpd/chroot}"
+ enewgroup ntp
+ enewuser ntp -1 -1 "${NTP_HOME}" ntp
+
+ # make sure user has correct HOME as flipping between the standard ntp pkg
+ # and this one was possible in the past
+ if [[ $(egethome ntp) != ${NTP_HOME} ]]; then
+ ewarn "From this version on, the homedir of the ntp user cannot be changed"
+ ewarn "dynamically after the installation. For homedir different from"
+ ewarn "/var/lib/openntpd/chroot set NTP_HOME in your make.conf and re-emerge."
+ esethome ntp "${NTP_HOME}"
+ fi
+}
+
+src_prepare() {
+ # add fail constraints when no libtls patch (accepted upstream)
+ epatch "${FILESDIR}/${P}-nolibtls.patch"
+ # fix /run path
+ sed -i 's:/var/run/ntpd:/run/ntpd:g' src/ntpctl.8 src/ntpd.8 || die
+ sed -i 's:LOCALSTATEDIR "/run/ntpd:"/run/ntpd:' src/ntpd.h || die
+ # fix ntpd.drift path
+ sed -i 's:/var/db/ntpd.drift:/var/lib/openntpd/ntpd.drift:g' src/ntpd.8 || die
+ sed -i 's:"/db/ntpd.drift":"/openntpd/ntpd.drift":' src/ntpd.h || die
+ # fix default config to use gentoo pool
+ sed -i 's:servers pool.ntp.org:#servers pool.ntp.org:' ntpd.conf || die
+ printf "\n# Choose servers announced from Gentoo NTP Pool\nservers 0.gentoo.pool.ntp.org\nservers 1.gentoo.pool.ntp.org\nservers 2.gentoo.pool.ntp.org\nservers 3.gentoo.pool.ntp.org\n" >> ntpd.conf || die
+}
+
+src_configure() {
+ econf --with-privsep-user=ntp
+}
+
+src_install() {
+ default
+ rm -r "${ED}"/var
+
+ newinitd "${FILESDIR}/${PN}.init.d-20080406-r6" ntpd
+ newconfd "${FILESDIR}/${PN}.conf.d-20080406-r6" ntpd
+
+ systemd_newunit "${FILESDIR}/${PN}.service-20080406-r4" ntpd.service
+}
+
+pkg_postinst() {
+ # Clean up chroot localtime copy from older versions
+ if [ -d "${EROOT%/}${NTP_HOME}"/etc ] ; then
+ if [ -f "${EROOT%/}${NTP_HOME}"/etc/localtime ] ; then
+ rm -f "${EROOT%/}${NTP_HOME}"/etc/localtime
+ fi
+
+ rmdir "${EROOT%/}${NTP_HOME}"/etc ||
+ ewarn "Unable to remove legacy ${EROOT%/}${NTP_HOME}/etc directory"
+ fi
+
+ [[ -f ${EROOT}var/log/ntpd.log ]] && \
+ ewarn "Logfile '${EROOT}var/log/ntpd.log' might be orphaned, please remove it if not in use via syslog."
+
+ if [[ -f ${EROOT}var/lib/ntpd.drift ]] ; then
+ einfo "Moving ntpd.drift file to new location."
+ mv "${EROOT}var/lib/ntpd.drift" "${EROOT}var/lib/openntpd/ntpd.drift"
+ fi
+}
diff --git a/net-misc/openr2/Manifest b/net-misc/openr2/Manifest
new file mode 100644
index 000000000000..4d0c6f274560
--- /dev/null
+++ b/net-misc/openr2/Manifest
@@ -0,0 +1 @@
+DIST openr2-1.3.0.tar.gz 650048 SHA256 667b535bdee6d1ce5555821b58667d7d76a473325672c49a4f6bf9073df0a688
diff --git a/net-misc/openr2/files/1.3.0-respect-user-cflags.patch b/net-misc/openr2/files/1.3.0-respect-user-cflags.patch
new file mode 100644
index 000000000000..7a8f23f3f29c
--- /dev/null
+++ b/net-misc/openr2/files/1.3.0-respect-user-cflags.patch
@@ -0,0 +1,15 @@
+diff -uNr openr2-1.3.0.ORIG//configure.in openr2-1.3.0/configure.in
+--- openr2-1.3.0.ORIG//configure.in 2010-05-13 11:59:14.000000000 +0100
++++ openr2-1.3.0/configure.in 2010-05-13 11:59:35.000000000 +0100
+@@ -25,11 +25,6 @@
+ AC_CONFIG_HEADERS(config.h)
+ AM_INIT_AUTOMAKE
+
+-# let's default to compile with debugging information
+-# most users will not even care about it
+-CFLAGS='-ggdb3 -O0'
+-CXXFLAGS='-ggdb3 -O0'
+-
+ AC_PROG_CC
+ AC_PROG_LIBTOOL
+ AC_LANG([C])
diff --git a/net-misc/openr2/metadata.xml b/net-misc/openr2/metadata.xml
new file mode 100644
index 000000000000..19e0cdcbf26f
--- /dev/null
+++ b/net-misc/openr2/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>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">openr2</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/openr2/openr2-1.3.0.ebuild b/net-misc/openr2/openr2-1.3.0.ebuild
new file mode 100644
index 000000000000..d25b00dda4a3
--- /dev/null
+++ b/net-misc/openr2/openr2-1.3.0.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+inherit autotools base
+
+DESCRIPTION="An open implementation of the MFC/R2 telephony signaling protocol"
+HOMEPAGE="http://libopenr2.org/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="net-misc/dahdi"
+PATCHES=( "${FILESDIR}/${PV}-respect-user-cflags.patch" )
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+}
diff --git a/net-misc/openrdate/Manifest b/net-misc/openrdate/Manifest
new file mode 100644
index 000000000000..d79aaccd519f
--- /dev/null
+++ b/net-misc/openrdate/Manifest
@@ -0,0 +1 @@
+DIST openrdate-1.2.tar.gz 118030 SHA256 2921fc96d4ca676190d6ffd45fa80e107c1fe12291c0c4f64827c29639863332
diff --git a/net-misc/openrdate/files/openrdate-1.1.3-rename.patch b/net-misc/openrdate/files/openrdate-1.1.3-rename.patch
new file mode 100644
index 000000000000..5f4774c3be4e
--- /dev/null
+++ b/net-misc/openrdate/files/openrdate-1.1.3-rename.patch
@@ -0,0 +1,29 @@
+Name the binary 'openrdate' as so not to conflict with the pre-existing ancient
+rdate.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+diff -Nuar openrdate-1.1.3.orig/Makefile.am openrdate-1.1.3/Makefile.am
+--- openrdate-1.1.3.orig/Makefile.am 2007-11-10 21:15:31.000000000 -0800
++++ openrdate-1.1.3/Makefile.am 2008-06-18 14:27:40.001963783 -0700
+@@ -1,15 +1,15 @@
+ SUBDIRS = src
+
+-bin_PROGRAMS = rdate
++bin_PROGRAMS = openrdate
+
+-rdate_SOURCES= \
++openrdate_SOURCES= \
+ src/rdate.c
+
+-rdate_LDADD= \
++openrdate_LDADD= \
+ src/librdate.a
+
+ man_MANS= \
+- docs/rdate.8
++ docs/openrdate.8
+
+ EXTRA_DIST= \
+- docs/rdate.8
++ $(man_MANS)
diff --git a/net-misc/openrdate/files/openrdate-confd b/net-misc/openrdate/files/openrdate-confd
new file mode 100644
index 000000000000..0760ecb43ba8
--- /dev/null
+++ b/net-misc/openrdate/files/openrdate-confd
@@ -0,0 +1,13 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# the NTP or RFC868/time server to get the date from
+RDATE_SERVER="pool.ntp.org"
+
+# Options to pass to rdate
+# "-s" is mandatory to set the system time, and
+# is passed regardless of this variable.
+# "-n" says that we are using an NTP server instead of a RFC868/time server.
+# "-c" is for leap seconds, which is needed on NTP servers.
+OPENRDATE_OPTS="-n -c"
diff --git a/net-misc/openrdate/files/openrdate-initd b/net-misc/openrdate/files/openrdate-initd
new file mode 100644
index 000000000000..40a64ab802c0
--- /dev/null
+++ b/net-misc/openrdate/files/openrdate-initd
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ before cron
+ need net
+ use dns
+}
+
+checkconfig() {
+ if [ -z "${RDATE_SERVER}" ] ; then
+ eerror "Please edit /etc/conf.d/openrdate"
+ eerror "I need to know what server to use!"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Setting clock via openrdate"
+ /usr/bin/openrdate -s ${OPENRDATE_OPTS} ${RDATE_SERVER} > /dev/null
+ eend $? "Failed to set clock via openrdate"
+}
diff --git a/net-misc/openrdate/metadata.xml b/net-misc/openrdate/metadata.xml
new file mode 100644
index 000000000000..3aaf73907939
--- /dev/null
+++ b/net-misc/openrdate/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>robbat2@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">openrdate</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/openrdate/openrdate-1.2.ebuild b/net-misc/openrdate/openrdate-1.2.ebuild
new file mode 100644
index 000000000000..a59fe3f3f448
--- /dev/null
+++ b/net-misc/openrdate/openrdate-1.2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+WANT_AUTOMAKE=1.9
+
+inherit autotools eutils
+
+DESCRIPTION="use TCP or UDP to retrieve the current time of another machine"
+HOMEPAGE="http://sourceforge.net/projects/openrdate/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-1.1.3-rename.patch
+ eautomake
+ mv docs/{,open}rdate.8
+}
+
+src_install(){
+ emake -j1 DESTDIR="${D}" install || die "make install failed"
+ newinitd "${FILESDIR}"/openrdate-initd openrdate
+ newconfd "${FILESDIR}"/openrdate-confd openrdate
+}
diff --git a/net-misc/openssh-blacklist/Manifest b/net-misc/openssh-blacklist/Manifest
new file mode 100644
index 000000000000..4384bfdb3824
--- /dev/null
+++ b/net-misc/openssh-blacklist/Manifest
@@ -0,0 +1 @@
+DIST openssh-blacklist_0.4.1.tar.gz 7519666 RMD160 a3566915763f317524d078d71b56b68101cde95a SHA1 0170885d95764ebbb1bf8c34837c39e1367970b9 SHA256 5add49d4d2118a224c04c3b0c72c20b216e3d2035c1acc4cec39de2a804c2c09
diff --git a/net-misc/openssh-blacklist/files/blacklist-encode.c b/net-misc/openssh-blacklist/files/blacklist-encode.c
new file mode 100644
index 000000000000..717c3e6575ff
--- /dev/null
+++ b/net-misc/openssh-blacklist/files/blacklist-encode.c
@@ -0,0 +1,249 @@
+/*
+ * The blacklist encoder for RSA/DSA key blacklisting based on partial
+ * fingerprints,
+ * developed under Openwall Project for Owl - http://www.openwall.com/Owl/
+ *
+ * Copyright (c) 2008 Dmitry V. Levin <ldv at cvs.openwall.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * The blacklist encoding was designed by Solar Designer and Dmitry V. Levin.
+ * No intellectual property rights to the encoding scheme are claimed.
+ *
+ * This effort was supported by CivicActions - http://www.civicactions.com
+ *
+ * The file size to encode 294,903 of 48-bit fingerprints is just 1.3 MB,
+ * which corresponds to less than 4.5 bytes per fingerprint.
+ */
+
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+#include <string.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <errno.h>
+#include <error.h>
+#include <limits.h>
+
+static void *
+xmalloc(size_t size)
+{
+ void *r = malloc(size);
+
+ if (!r)
+ error(EXIT_FAILURE, errno, "malloc: allocating %lu bytes",
+ (unsigned long) size);
+ return r;
+}
+
+static void *
+xcalloc(size_t nmemb, size_t size)
+{
+ void *r = calloc(nmemb, size);
+
+ if (!r)
+ error(EXIT_FAILURE, errno, "calloc: allocating %lu*%lu bytes",
+ (unsigned long) nmemb, (unsigned long) size);
+ return r;
+}
+
+static void *
+xrealloc(void *ptr, size_t nmemb, size_t elem_size)
+{
+ if (nmemb && ULONG_MAX / nmemb < elem_size)
+ error(EXIT_FAILURE, 0, "realloc: nmemb*size > ULONG_MAX");
+
+ size_t size = nmemb * elem_size;
+ void *r = realloc(ptr, size);
+
+ if (!r)
+ error(EXIT_FAILURE, errno,
+ "realloc: allocating %lu*%lu bytes",
+ (unsigned long) nmemb, (unsigned long) elem_size);
+ return r;
+}
+
+static char *
+xstrdup(const char *s)
+{
+ size_t len = strlen(s);
+ char *r = xmalloc(len + 1);
+
+ memcpy(r, s, len + 1);
+ return r;
+}
+
+static unsigned
+c2u(uint8_t c)
+{
+ return (c >= 'a') ? (c - 'a' + 10) : (c - '0');
+}
+
+static char **records = NULL;
+static unsigned records_count = 0;
+
+static int
+comparator(const void *p1, const void *p2)
+{
+ return strcmp(*(char *const *) p1, *(char *const *) p2);
+}
+
+static void
+read_stream(FILE *fp, unsigned bytes)
+{
+ char *line = NULL;
+ unsigned size = 0, allocated = 0, len = bytes * 2;
+ int n;
+
+ while ((n = getline(&line, &size, fp)) >= 0)
+ {
+ if (n > 0 && line[n - 1] == '\n')
+ line[--n] = '\0';
+ if (n < len || strspn(line, "0123456789abcdef") < n)
+ continue; /* ignore short or invalid lines */
+ line[len] = '\0';
+
+ if (!records)
+ records = xcalloc(allocated = 1024, sizeof(*records));
+ if (records_count >= allocated)
+ records = xrealloc(records, allocated *= 2,
+ sizeof(*records));
+ records[records_count++] = xstrdup(line);
+ }
+ free(line);
+ records = xrealloc(records, records_count, sizeof(*records));
+ if (records_count >= (1U << 24))
+ error(EXIT_FAILURE, 0, "too many records: %u", records_count);
+
+ qsort(records, records_count, sizeof(*records), comparator);
+}
+
+static void
+print_uint8(FILE *fp, uint8_t v)
+{
+ fprintf(fp, "%c", v);
+}
+
+static void
+print_uint16(FILE *fp, uint16_t v)
+{
+ fprintf(fp, "%c%c", v >> 8, v & 0xff);
+}
+
+static void
+print_uint24(FILE *fp, uint32_t v)
+{
+ fprintf(fp, "%c%c%c", (v >> 16) & 0xff, (v >> 8) & 0xff, v & 0xff);
+}
+
+int
+main(int ac, const char **av)
+{
+ unsigned count, i, record_bytes, first_index = 0, prev_index = 0;
+ int min_offset, max_offset;
+ int *offsets;
+
+ if (ac < 2)
+ error(EXIT_FAILURE, 0, "insufficient arguments");
+ if (ac > 2)
+ error(EXIT_FAILURE, 0, "too many arguments");
+ record_bytes = atoi(av[1]);
+ if (record_bytes < 6 || record_bytes > 16)
+ error(EXIT_FAILURE, 0, "fingerprint size out of bounds");
+
+ read_stream(stdin, record_bytes);
+
+ /* initialize global records offset table */
+ offsets = xcalloc(65536, sizeof(*offsets));
+ for (count = 0; count < records_count; ++count, prev_index = i)
+ {
+ const char *r = records[count];
+
+ i = (((((c2u(r[0]) << 4) + c2u(r[1])) << 4) +
+ c2u(r[2])) << 4) + c2u(r[3]);
+ if (count == 0)
+ first_index = i;
+ else if (i == prev_index)
+ continue;
+ offsets[i] = count;
+ }
+
+ /* set offsets for indices without records */
+ if (offsets[65536 - 1] == 0)
+ offsets[65536 - 1] = records_count;
+ for (i = 65536 - 2; i > first_index; --i)
+ if (offsets[i] == 0)
+ offsets[i] = offsets[i + 1];
+
+ /* make global records offset table relative to
+ expected position assuming uniform distribution. */
+ for (i = 0, min_offset = 0, max_offset = 0; i < 65536; ++i)
+ {
+ offsets[i] -= (i * (unsigned long long) records_count) >> 16;
+ if (offsets[i] < min_offset)
+ min_offset = offsets[i];
+ if (offsets[i] > max_offset)
+ max_offset = offsets[i];
+ }
+ min_offset = -min_offset;
+ if (min_offset < 0)
+ error(EXIT_FAILURE, 0,
+ "invalid offset shift: %d", min_offset);
+ for (i = 0; i < 65536; ++i)
+ {
+ offsets[i] += min_offset;
+ if (offsets[i] < 0 || offsets[i] >= 65536)
+ error(EXIT_FAILURE, 0,
+ "offset overflow for index %#x: %d",
+ i, offsets[i]);
+ }
+ max_offset += min_offset;
+
+ /* Header, 16 bytes */
+
+ /* format version identifier */
+ printf("SSH-FP00");
+ /* index size, in bits */
+ print_uint8(stdout, 16);
+ /* offset size, in bits */
+ print_uint8(stdout, 16);
+ /* record size, in bits */
+ print_uint8(stdout, record_bytes * 8);
+ /* records count */
+ print_uint24(stdout, records_count);
+ /* offset shift */
+ print_uint16(stdout, min_offset);
+ fprintf(stderr, "records=%u, offset shift=%d, max offset=%d\n",
+ records_count, min_offset, max_offset);
+
+ /* Index, 65536 * 2 bytes */
+ for (i = 0; i < 65536; ++i)
+ print_uint16(stdout, offsets[i]);
+
+ /* Fingerprints, records_count * (record_bytes-2) bytes */
+ for (count = 0; count < records_count; ++count)
+ {
+ const char *r = records[count] + 4;
+
+ for (i = 0; i < record_bytes - 2; ++i)
+ print_uint8(stdout,
+ c2u(r[i * 2]) * 16 + c2u(r[i * 2 + 1]));
+ }
+
+ if (fclose(stdout))
+ error(EXIT_FAILURE, errno, "stdout");
+ return 0;
+}
diff --git a/net-misc/openssh-blacklist/metadata.xml b/net-misc/openssh-blacklist/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/net-misc/openssh-blacklist/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>base-system</herd>
+</pkgmetadata>
diff --git a/net-misc/openssh-blacklist/openssh-blacklist-0.4.1.ebuild b/net-misc/openssh-blacklist/openssh-blacklist-0.4.1.ebuild
new file mode 100644
index 000000000000..c8aac36f83a8
--- /dev/null
+++ b/net-misc/openssh-blacklist/openssh-blacklist-0.4.1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="Source files of vuln Debian keys"
+HOMEPAGE="http://packages.qa.debian.org/o/openssh-blacklist.html"
+SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 hppa x86"
+IUSE=""
+
+DEPEND=""
+
+maint_pkg_create() {
+ wget http://cvsweb.openwall.com/cgi/cvsweb.cgi/~checkout~/Owl/packages/openssh/blacklist-encode.c -O "${FILESDIR}"/blacklist-encode.c
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ cp "${FILESDIR}"/blacklist-encode.c . || die
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getBUILD_CC)" \
+ CFLAGS="${BUILD_CFLAGS}" \
+ CPPFLAGS="${BUILD_CPPFLAGS}" \
+ LDFLAGS="${BUILD_LDFLAGS}" \
+ blacklist-encode || die
+ cat [DR]SA-* | ./blacklist-encode 6 > blacklist
+}
+
+src_install() {
+ insinto /etc/ssh
+ doins blacklist || die
+}
diff --git a/net-misc/openssh/Manifest b/net-misc/openssh/Manifest
new file mode 100644
index 000000000000..7daff628968e
--- /dev/null
+++ b/net-misc/openssh/Manifest
@@ -0,0 +1,15 @@
+DIST openssh-6.7_p1-sctp.patch.xz 7408 SHA256 b33e82309195f2a3f21a9fb14e6da2080b096dcf0d6f1c36c93cdeac683fdd59 SHA512 35da5e58f857e8b24e63b4058e946b71fdf0fecc637cb7af0ba8913869e5aadf8317805838936c84dc24421f03c5c91e1670761bed152fdf325c5a509f1b5d04 WHIRLPOOL cc7bace4aa60d720914e3a6a4ff650b7543d9e4963deab12c19cb5d798547b4fe547690946ff8955e121339e9a3d0ebe06f3ff758cca4bb81a09ac43fc877f58
+DIST openssh-6.7p1+x509-8.2.diff.gz 241798 SHA256 85acfcd560b40d4533b82a4e3f443b7137b377868bab424dacdf00581c83240f SHA512 d33ece7ddf382235b032875cf961845b308dc5e4cd1888cb68fee11c95066bb90938f9043cb9410f372efb578b61dfd5d50341da95a92fab5a4c209ac54e1f5e WHIRLPOOL b1fe2b88f0e77312099171f5c83dc670abc4c40d215fdff1e43161e44f806de9e0537cfa3a0001e1c7bbc0d0aed555079455f88b8ff313b00d8e9a19dabcb7d8
+DIST openssh-6.7p1-hpnssh14v5.tar.xz 25652 SHA256 7284db65548b6b04142930da86972f96b1f5aa8ad3fc125134412f904f369d7e SHA512 21929805f40c79684ee3ecdb2b495d3204dca90b932aa633c4e0f6a093a417259cdeee10b3e49f3dff426febc6792f45ee23cc0688f05bf047630f3016e0926a WHIRLPOOL 5515cd4c745b061a3e92ac03e8121fb3ffc4b2ff116140625ca7ab2c0211c673b6345e5b08134df8b1743e03f9964017e789e1f0b9da99a0fd5970e14665e681
+DIST openssh-6.7p1.tar.gz 1351367 SHA256 b2f8394eae858dabbdef7dac10b99aec00c95462753e80342e530bbb6f725507 SHA512 2469dfcd289948374843311dd9e5f7e144ce1cebd4bfce0d387d0b75cb59f3e1af1b9ebf96bd4ab6407dfa77a013c5d25742971053e61cae2541054aeaca559d WHIRLPOOL ac8ce86d0f6c78c4cb3624b480f189f951d508db38b22d7a5550b7302d5277c1c7d18eaa713d52139abc0f77edacfdb03ced2603125e3ddf9bc09c69e6b70518
+DIST openssh-6.8_p1-sctp.patch.xz 7388 SHA256 2c74dd00aaae9f4de908d8e5685ae982779a5069996b98d55e8408eada739a19 SHA512 f93a1d27bc3e57a6d4fa717c9d5ece4f28196f8539cb2f2efc4285dce9a2e94a3f5a59d18fc01ea73a94e90630cee7621240455fce146f781cf7091a828f2db0 WHIRLPOOL 7fb3346c3444654988303ff2a941345c00412a8012d6d419c9e4f870ef4c3362f92a4020d7bff2dc5d1ff9e42cf7287c4346909f8db07154783d5359a73a7476
+DIST openssh-6.8_p1-x509-8.3.1-glue.patch.xz 141096 SHA256 1e8c911b1403e47a37c24d0ebbfa36d46204c06b38d93ed9ae6d2a0953d3bba6 SHA512 942f09f20d898b4865707b5b48012545d7f8171353427ddb773cffaf1b8c664f48375cb85292592ccba63da695e99def42d17c52a61bb93b89827f53cf3ad918 WHIRLPOOL 66ace7a191a562485ee144516912dee52c84fcfbe8b710b3429211cd9d849dc24d4419c5fa6fd3968f9ab250cf474a692db326c2ac3ef930081b8a5777875a73
+DIST openssh-6.8p1+x509-8.3.1.diff.gz 351502 SHA256 64d0b7cd428352a2d77d9decb02ec744eca4433bcb35288745859eb19ccf4fcf SHA512 6525b7ddae13752f145bda42fe6d65ec40a8c9d44766b749cf49ff904d6b1941e088e560c2a532a3dc0003ac1e29d56a28ea3ed1533ee5abcd696cd80ae88d8e WHIRLPOOL 32f45411d250b7c46f2408bfca6b12223e901fa15c27db449c06cd5b1ab7a0e853fffed5971ca635c5080d1796196a8661b8d1503bdcdb28d61e0d082f28590b
+DIST openssh-6.8p1-r5-hpnssh14v5.tar.xz 27240 SHA256 4fe25701ea8717e88bf2355a76fb5370819f927af99efba3e4f06fe3264fbf58 SHA512 29a2086c6bf868bb1c8d2601e1ac83a82de48ed9f9cf6a3762b3f899112d939507b563d0117b4bec87008dd0434e0735e4a4f8c779a64d719d3873224918d16c WHIRLPOOL a4f3e841530d08363c94dfb55911e79f130668e459dc2e1ebb477c14dcf7d3bd71ad63c55e0ff2ba80684e67a8f40867b0a9fd01aabe3fe1533ef604f84a76b3
+DIST openssh-6.8p1.tar.gz 1475953 SHA256 3ff64ce73ee124480b5bf767b9830d7d3c03bbcb6abe716b78f0192c37ce160e SHA512 7c4457e4525a56cdabb1164ffaf6bed1c094294ae7d06dd3484dcffcd87738fcffe7019b6cae0032c254b0389832644522d5a9f2603b50637ffeb9999b5fcede WHIRLPOOL 3ac9cc4fe0b11ca66c0220618d0ef0c5925e5605d4d3d55c9579b708c478cf8613b7575fe213aba57054d97d3290baac4eba26b7a630d22477ec947f22327a5a
+DIST openssh-6.9p1+x509-8.4.diff.gz 425687 SHA256 0ed8bfff0d2ecd9f3791ae1f168ca3270bb66d7ab7bc0a8ff2d61d2ab829c3fb SHA512 596cb65408db06fb299b92160147685b001dc23929ecf5c4bd11a8b0475d79695c7b4dbe8a878d7fbcd944155935fd62a14e35c79204b39e413f5eaa961ef76c WHIRLPOOL 771fa0f4f6a20ed49ba201605fcdcbfc41a0f094ef4a89ca2433ee51b7c8bf99cc266f26bd7877c61ff92e9a50c7d65119ba75ba64eaa029bd567bab3ee243c2
+DIST openssh-6.9p1-hpnssh14v5.tar.xz 25164 SHA256 67c0b043525c838522d17ba8ed3ffa81aa212ae0f43c3d989a3e649fd0a2ca48 SHA512 bef32f6dd97e949e0973d30248401b86233ca66ace750c5050158a748fe279db46c8ee59b6f3de2193f52bab3a1c19372296b86136d7d65a312769008d0acf3a WHIRLPOOL 65241de2409bfe452b0bcf6282f0571a2bbf6d02d4d5cb97db78bd42e8be439c47da8a54d33272a85d50d648e2e4af56b574bc8add56c65e2ff9ccd59b90f65c
+DIST openssh-6.9p1-r1-hpnssh14v5.tar.xz 21396 SHA256 84e9e28a1488ccf66e29a7c90442b3bc4833a6fa186260fb6853b5a1b19c0beb SHA512 476064dbdb3d82b86ad7c481a4a301ff0d46bd281fe7ca0c29f34ae50b0034028760997ae2c934a265499c154f4534d35ead647aa63d1a4545ed503a5364eada WHIRLPOOL 74eaf2fe0a6ecd0e2fa5078034628d4c76c75b121f3c813ff8a098ab28363daa3800d03936046aa3aebbfdab3afd31ef30a207399f5e305d7f71e5f3c7e4f4a7
+DIST openssh-6.9p1.tar.gz 1487617 SHA256 6e074df538f357d440be6cf93dc581a21f22d39e236f217fcd8eacbb6c896cfe SHA512 68fec9b4e512fe126a5d35b01e2cc656d810b75052ed8a36bc85cd0a05de7318b15ed287bc95cf9bcb3fa2f385029151d85aced55e07fbcc79e6c779bee6751d WHIRLPOOL 1dcb291383c9f934b512f61ce9f6e0319f22e112ce3f6eace2a868ca0f99c709c65bae14a9815e2ef237f8132fe72c583cffb7ea20bdfa2aaa77cf347967be7f
+DIST openssh-lpk-6.7p1-0.3.14.patch.xz 16920 SHA256 0203e6e44e41d58ec46d1611d7efc985134e662bbee51632c29f43ae809003f0 SHA512 344ccde4a04aeb1500400f779e64b2d8a5ad2970de3c4c343ca9605758e22d3812ef5453cd3221b18ad74a9762583c62417879107e4e1dda1398a6a65bcd04b2 WHIRLPOOL 5b6beeb743d04deea70c8b471a328b5f056fd4651e1370c7882e5d12f54fa2170486dcd6f97aa8c58e80af9a2d4012e2dfbcf53185317976d309783ca8d6cf73
+DIST openssh-lpk-6.8p1-0.3.14.patch.xz 16940 SHA256 d5f048dc7e9d3fca085c152fc31306f1d8fa793e524c538295915b075ec085b0 SHA512 2470b6b46f8c7ac985f82d14b788a3eb81a468a1d5013cb7f89257d9dd78b6037e24bf54ac57b757db8ed1df24332d659cf918c11ea73592fd24a69c25a54081 WHIRLPOOL b041ee9e0efdf370686f11df4131ab5e5ffb2f11cc66c386a8223bf563c5b78ab9443f06e4adc2e506e440cdec9dc5b20f5972cd8d691d786d2f903bb49b947b
diff --git a/net-misc/openssh/files/openssh-4.7_p1-GSSAPI-dns.patch b/net-misc/openssh/files/openssh-4.7_p1-GSSAPI-dns.patch
new file mode 100644
index 000000000000..c81ae5cb706d
--- /dev/null
+++ b/net-misc/openssh/files/openssh-4.7_p1-GSSAPI-dns.patch
@@ -0,0 +1,127 @@
+http://bugs.gentoo.org/165444
+https://bugzilla.mindrot.org/show_bug.cgi?id=1008
+
+Index: readconf.c
+===================================================================
+RCS file: /cvs/openssh/readconf.c,v
+retrieving revision 1.135
+diff -u -r1.135 readconf.c
+--- readconf.c 5 Aug 2006 02:39:40 -0000 1.135
++++ readconf.c 19 Aug 2006 11:59:52 -0000
+@@ -126,6 +126,7 @@
+ oClearAllForwardings, oNoHostAuthenticationForLocalhost,
+ oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
+ oAddressFamily, oGssAuthentication, oGssDelegateCreds,
++ oGssTrustDns,
+ oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly,
+ oSendEnv, oControlPath, oControlMaster, oHashKnownHosts,
+ oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand,
+@@ -163,9 +164,11 @@
+ #if defined(GSSAPI)
+ { "gssapiauthentication", oGssAuthentication },
+ { "gssapidelegatecredentials", oGssDelegateCreds },
++ { "gssapitrustdns", oGssTrustDns },
+ #else
+ { "gssapiauthentication", oUnsupported },
+ { "gssapidelegatecredentials", oUnsupported },
++ { "gssapitrustdns", oUnsupported },
+ #endif
+ { "fallbacktorsh", oDeprecated },
+ { "usersh", oDeprecated },
+@@ -444,6 +447,10 @@
+ intptr = &options->gss_deleg_creds;
+ goto parse_flag;
+
++ case oGssTrustDns:
++ intptr = &options->gss_trust_dns;
++ goto parse_flag;
++
+ case oBatchMode:
+ intptr = &options->batch_mode;
+ goto parse_flag;
+@@ -1010,6 +1017,7 @@
+ options->challenge_response_authentication = -1;
+ options->gss_authentication = -1;
+ options->gss_deleg_creds = -1;
++ options->gss_trust_dns = -1;
+ options->password_authentication = -1;
+ options->kbd_interactive_authentication = -1;
+ options->kbd_interactive_devices = NULL;
+@@ -1100,6 +1108,8 @@
+ options->gss_authentication = 0;
+ if (options->gss_deleg_creds == -1)
+ options->gss_deleg_creds = 0;
++ if (options->gss_trust_dns == -1)
++ options->gss_trust_dns = 0;
+ if (options->password_authentication == -1)
+ options->password_authentication = 1;
+ if (options->kbd_interactive_authentication == -1)
+Index: readconf.h
+===================================================================
+RCS file: /cvs/openssh/readconf.h,v
+retrieving revision 1.63
+diff -u -r1.63 readconf.h
+--- readconf.h 5 Aug 2006 02:39:40 -0000 1.63
++++ readconf.h 19 Aug 2006 11:59:52 -0000
+@@ -45,6 +45,7 @@
+ /* Try S/Key or TIS, authentication. */
+ int gss_authentication; /* Try GSS authentication */
+ int gss_deleg_creds; /* Delegate GSS credentials */
++ int gss_trust_dns; /* Trust DNS for GSS canonicalization */
+ int password_authentication; /* Try password
+ * authentication. */
+ int kbd_interactive_authentication; /* Try keyboard-interactive auth. */
+Index: ssh_config.5
+===================================================================
+RCS file: /cvs/openssh/ssh_config.5,v
+retrieving revision 1.97
+diff -u -r1.97 ssh_config.5
+--- ssh_config.5 5 Aug 2006 01:34:51 -0000 1.97
++++ ssh_config.5 19 Aug 2006 11:59:53 -0000
+@@ -483,7 +483,16 @@
+ Forward (delegate) credentials to the server.
+ The default is
+ .Dq no .
+-Note that this option applies to protocol version 2 only.
++Note that this option applies to protocol version 2 connections using GSSAPI.
++.It Cm GSSAPITrustDns
++Set to
++.Dq yes to indicate that the DNS is trusted to securely canonicalize
++the name of the host being connected to. If
++.Dq no, the hostname entered on the
++command line will be passed untouched to the GSSAPI library.
++The default is
++.Dq no .
++This option only applies to protocol version 2 connections using GSSAPI.
+ .It Cm HashKnownHosts
+ Indicates that
+ .Xr ssh 1
+Index: sshconnect2.c
+===================================================================
+RCS file: /cvs/openssh/sshconnect2.c,v
+retrieving revision 1.151
+diff -u -r1.151 sshconnect2.c
+--- sshconnect2.c 18 Aug 2006 14:33:34 -0000 1.151
++++ sshconnect2.c 19 Aug 2006 11:59:53 -0000
+@@ -499,6 +499,12 @@
+ static u_int mech = 0;
+ OM_uint32 min;
+ int ok = 0;
++ const char *gss_host;
++
++ if (options.gss_trust_dns)
++ gss_host = get_canonical_hostname(1);
++ else
++ gss_host = authctxt->host;
+
+ /* Try one GSSAPI method at a time, rather than sending them all at
+ * once. */
+@@ -511,7 +517,7 @@
+ /* My DER encoding requires length<128 */
+ if (gss_supported->elements[mech].length < 128 &&
+ ssh_gssapi_check_mechanism(&gssctxt,
+- &gss_supported->elements[mech], authctxt->host)) {
++ &gss_supported->elements[mech], gss_host)) {
+ ok = 1; /* Mechanism works */
+ } else {
+ mech++;
diff --git a/net-misc/openssh/files/openssh-6.3_p1-x509-hpn14v2-glue.patch b/net-misc/openssh/files/openssh-6.3_p1-x509-hpn14v2-glue.patch
new file mode 100644
index 000000000000..c3647d5aa232
--- /dev/null
+++ b/net-misc/openssh/files/openssh-6.3_p1-x509-hpn14v2-glue.patch
@@ -0,0 +1,51 @@
+--- openssh-6.3p1/Makefile.in
++++ openssh-6.3p1/Makefile.in
+@@ -45,7 +45,7 @@
+ CC=@CC@
+ LD=@LD@
+ CFLAGS=@CFLAGS@
+-CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ @LDAP_CPPFLAGS@ $(PATHS) @DEFS@
++CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
+ LIBS=@LIBS@
+ K5LIBS=@K5LIBS@
+ GSSLIBS=@GSSLIBS@
+@@ -53,6 +53,7 @@
+ SSHDLIBS=@SSHDLIBS@
+ LIBEDIT=@LIBEDIT@
+ LIBLDAP=@LDAP_LDFLAGS@ @LDAP_LIBS@
++CPPFLAGS+=@LDAP_CPPFLAGS@
+ AR=@AR@
+ AWK=@AWK@
+ RANLIB=@RANLIB@
+--- openssh-6.3p1/sshconnect.c
++++ openssh-6.3p1/sshconnect.c
+@@ -465,7 +465,7 @@
+ {
+ /* Send our own protocol version identification. */
+ if (compat20) {
+- xasprintf(&client_version_string, "SSH-%d.%d-%.100s PKIX\r\n",
++ xasprintf(&client_version_string, "SSH-%d.%d-%.100s\r\n",
+ PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION);
+ } else {
+ xasprintf(&client_version_string, "SSH-%d.%d-%.100s\n",
+--- openssh-6.3p1/sshd.c
++++ openssh-6.3p1/sshd.c
+@@ -472,8 +472,8 @@
+ comment = "";
+ }
+
+- xasprintf(&server_version_string, "SSH-%d.%d-%.100s%s%s%s%s",
+- major, minor, SSH_VERSION, comment,
++ xasprintf(&server_version_string, "SSH-%d.%d-%.100s%s%s%s",
++ major, minor, SSH_VERSION,
+ *options.version_addendum == '\0' ? "" : " ",
+ options.version_addendum, newline);
+
+--- openssh-6.3p1/version.h
++++ openssh-6.3p1/version.h
+@@ -3,4 +3,5 @@
+ #define SSH_VERSION "OpenSSH_6.3"
+
+ #define SSH_PORTABLE "p1"
++#define SSH_X509 " PKIX"
+ #define SSH_RELEASE SSH_VERSION SSH_PORTABLE
diff --git a/net-misc/openssh/files/openssh-6.6.1_p1-x509-glue.patch b/net-misc/openssh/files/openssh-6.6.1_p1-x509-glue.patch
new file mode 100644
index 000000000000..2a34ee96d55e
--- /dev/null
+++ b/net-misc/openssh/files/openssh-6.6.1_p1-x509-glue.patch
@@ -0,0 +1,17 @@
+Make x509 apply after openssh-5.9_p1-sshd-gssapi-multihomed.patch.
+
+--- openssh-6.6p1+x509-8.0.diff
++++ openssh-6.6p1+x509-8.0.diff
+@@ -16337,10 +16337,10 @@
+ .It Cm ChallengeResponseAuthentication
+ Specifies whether challenge-response authentication is allowed (e.g. via
+ PAM or though authentication styles supported in
+-@@ -499,6 +576,16 @@
++@@ -514,6 +591,16 @@
++ This facility is provided to assist with operation on multi homed machines.
+ The default is
+ .Dq yes .
+- Note that this option applies to protocol version 2 only.
+ +.It Cm HostbasedAlgorithms
+ +Specifies the protocol version 2 algorithms used in
+ +.Dq hostbased
diff --git a/net-misc/openssh/files/openssh-6.6.1_p1-x509-hpn14v5-glue.patch b/net-misc/openssh/files/openssh-6.6.1_p1-x509-hpn14v5-glue.patch
new file mode 100644
index 000000000000..beb22926aed0
--- /dev/null
+++ b/net-misc/openssh/files/openssh-6.6.1_p1-x509-hpn14v5-glue.patch
@@ -0,0 +1,26 @@
+make the hpn patch apply when the x509 patch has also been applied
+
+--- openssh-6.6.1p1-hpnssh14v5.diff
++++ openssh-6.6.1p1-hpnssh14v5.diff
+@@ -1742,18 +1742,14 @@
+ if (options->ip_qos_interactive == -1)
+ options->ip_qos_interactive = IPTOS_LOWDELAY;
+ if (options->ip_qos_bulk == -1)
+-@@ -345,9 +392,10 @@
++@@ -345,6 +392,7 @@
+ sUsePrivilegeSeparation, sAllowAgentForwarding,
+ sHostCertificate,
+ sRevokedKeys, sTrustedUserCAKeys, sAuthorizedPrincipalsFile,
+-+ sTcpRcvBufPoll, sHPNDisabled, sHPNBufferSize,
+++ sTcpRcvBufPoll, sHPNDisabled, sHPNBufferSize, sNoneEnabled,
+ sKexAlgorithms, sIPQoS, sVersionAddendum,
+ sAuthorizedKeysCommand, sAuthorizedKeysCommandUser,
+-- sAuthenticationMethods, sHostKeyAgent,
+-+ sAuthenticationMethods, sNoneEnabled, sHostKeyAgent,
+- sDeprecated, sUnsupported
+- } ServerOpCodes;
+-
++ sAuthenticationMethods, sHostKeyAgent,
+ @@ -468,6 +516,10 @@
+ { "revokedkeys", sRevokedKeys, SSHCFG_ALL },
+ { "trustedusercakeys", sTrustedUserCAKeys, SSHCFG_ALL },
diff --git a/net-misc/openssh/files/openssh-6.7_p1-openssl-ignore-status.patch b/net-misc/openssh/files/openssh-6.7_p1-openssl-ignore-status.patch
new file mode 100644
index 000000000000..fa33af39b6f8
--- /dev/null
+++ b/net-misc/openssh/files/openssh-6.7_p1-openssl-ignore-status.patch
@@ -0,0 +1,17 @@
+the last nibble of the openssl version represents the status. that is,
+whether it is a beta or release. when it comes to version checks in
+openssh, this component does not matter, so ignore it.
+
+https://bugzilla.mindrot.org/show_bug.cgi?id=2212
+
+--- a/openbsd-compat/openssl-compat.c
++++ b/openbsd-compat/openssl-compat.c
+@@ -58,7 +58,7 @@ ssh_compatible_openssl(long headerver, long libver)
+ * For versions >= 1.0.0, major,minor,status must match and library
+ * fix version must be equal to or newer than the header.
+ */
+- mask = 0xfff0000fL; /* major,minor,status */
++ mask = 0xfff00000L; /* major,minor,status */
+ hfix = (headerver & 0x000ff000) >> 12;
+ lfix = (libver & 0x000ff000) >> 12;
+ if ( (headerver & mask) == (libver & mask) && lfix >= hfix)
diff --git a/net-misc/openssh/files/openssh-6.7_p1-sctp-x509-glue.patch b/net-misc/openssh/files/openssh-6.7_p1-sctp-x509-glue.patch
new file mode 100644
index 000000000000..bd0b7ce12b66
--- /dev/null
+++ b/net-misc/openssh/files/openssh-6.7_p1-sctp-x509-glue.patch
@@ -0,0 +1,42 @@
+--- openssh-6.7_p1-sctp.patch.orig 2014-11-24 10:34:31.817538707 -0800
++++ openssh-6.7_p1-sctp.patch 2014-11-24 10:38:52.744990154 -0800
+@@ -195,14 +195,6 @@
+ .Op Fl c Ar cipher
+ .Op Fl F Ar ssh_config
+ .Op Fl i Ar identity_file
+-@@ -178,6 +178,7 @@ For full details of the options listed b
+- .It ServerAliveCountMax
+- .It StrictHostKeyChecking
+- .It TCPKeepAlive
+-+.It Transport
+- .It UsePrivilegedPort
+- .It User
+- .It UserKnownHostsFile
+ @@ -218,6 +219,8 @@ and
+ to print debugging messages about their progress.
+ This is helpful in
+@@ -482,14 +474,6 @@
+ .Op Fl b Ar bind_address
+ .Op Fl c Ar cipher_spec
+ .Op Fl D Oo Ar bind_address : Oc Ns Ar port
+-@@ -473,6 +473,7 @@ For full details of the options listed b
+- .It StreamLocalBindUnlink
+- .It StrictHostKeyChecking
+- .It TCPKeepAlive
+-+.It Transport
+- .It Tunnel
+- .It TunnelDevice
+- .It UsePrivilegedPort
+ @@ -665,6 +666,8 @@ Trusted X11 forwardings are not subjecte
+ controls.
+ .It Fl y
+@@ -527,7 +511,7 @@
+- again:
++
+ - while ((opt = getopt(ac, av, "1246ab:c:e:fgi:kl:m:no:p:qstvx"
+ + while ((opt = getopt(ac, av, "1246ab:c:e:fgi:kl:m:no:p:qstvx" SCTP_OPT
+- "ACD:E:F:I:KL:MNO:PQ:R:S:TVw:W:XYy")) != -1) {
++ "ACD:E:F:" ENGCONFIG "I:KL:MNO:PQ:R:S:TVw:W:XYy")) != -1) {
+ switch (opt) {
+ case '1':
+ @@ -732,6 +738,11 @@ main(int ac, char **av)
diff --git a/net-misc/openssh/files/openssh-6.7_p1-sshd-gssapi-multihomed.patch b/net-misc/openssh/files/openssh-6.7_p1-sshd-gssapi-multihomed.patch
new file mode 100644
index 000000000000..96818e42ec52
--- /dev/null
+++ b/net-misc/openssh/files/openssh-6.7_p1-sshd-gssapi-multihomed.patch
@@ -0,0 +1,162 @@
+https://bugs.gentoo.org/378361
+https://bugzilla.mindrot.org/show_bug.cgi?id=928
+
+--- a/gss-serv.c
++++ b/gss-serv.c
+@@ -41,9 +41,12 @@
+ #include "channels.h"
+ #include "session.h"
+ #include "misc.h"
++#include "servconf.h"
+
+ #include "ssh-gss.h"
+
++extern ServerOptions options;
++
+ static ssh_gssapi_client gssapi_client =
+ { GSS_C_EMPTY_BUFFER, GSS_C_EMPTY_BUFFER,
+ GSS_C_NO_CREDENTIAL, NULL, {NULL, NULL, NULL}};
+@@ -77,25 +80,32 @@ ssh_gssapi_acquire_cred(Gssctxt *ctx)
+ char lname[NI_MAXHOST];
+ gss_OID_set oidset;
+
+- gss_create_empty_oid_set(&status, &oidset);
+- gss_add_oid_set_member(&status, ctx->oid, &oidset);
+-
+- if (gethostname(lname, sizeof(lname))) {
+- gss_release_oid_set(&status, &oidset);
+- return (-1);
+- }
++ if (options.gss_strict_acceptor) {
++ gss_create_empty_oid_set(&status, &oidset);
++ gss_add_oid_set_member(&status, ctx->oid, &oidset);
++
++ if (gethostname(lname, MAXHOSTNAMELEN)) {
++ gss_release_oid_set(&status, &oidset);
++ return (-1);
++ }
++
++ if (GSS_ERROR(ssh_gssapi_import_name(ctx, lname))) {
++ gss_release_oid_set(&status, &oidset);
++ return (ctx->major);
++ }
++
++ if ((ctx->major = gss_acquire_cred(&ctx->minor,
++ ctx->name, 0, oidset, GSS_C_ACCEPT, &ctx->creds,
++ NULL, NULL)))
++ ssh_gssapi_error(ctx);
+
+- if (GSS_ERROR(ssh_gssapi_import_name(ctx, lname))) {
+ gss_release_oid_set(&status, &oidset);
+ return (ctx->major);
++ } else {
++ ctx->name = GSS_C_NO_NAME;
++ ctx->creds = GSS_C_NO_CREDENTIAL;
+ }
+-
+- if ((ctx->major = gss_acquire_cred(&ctx->minor,
+- ctx->name, 0, oidset, GSS_C_ACCEPT, &ctx->creds, NULL, NULL)))
+- ssh_gssapi_error(ctx);
+-
+- gss_release_oid_set(&status, &oidset);
+- return (ctx->major);
++ return GSS_S_COMPLETE;
+ }
+
+ /* Privileged */
+--- a/servconf.c
++++ b/servconf.c
+@@ -86,6 +86,7 @@ initialize_server_options(ServerOptions
+ options->kerberos_get_afs_token = -1;
+ options->gss_authentication=-1;
+ options->gss_cleanup_creds = -1;
++ options->gss_strict_acceptor = -1;
+ options->password_authentication = -1;
+ options->kbd_interactive_authentication = -1;
+ options->challenge_response_authentication = -1;
+@@ -200,6 +201,8 @@ fill_default_server_options(ServerOption
+ options->gss_authentication = 0;
+ if (options->gss_cleanup_creds == -1)
+ options->gss_cleanup_creds = 1;
++ if (options->gss_strict_acceptor == -1)
++ options->gss_strict_acceptor = 0;
+ if (options->password_authentication == -1)
+ options->password_authentication = 1;
+ if (options->kbd_interactive_authentication == -1)
+@@ -277,7 +280,8 @@ typedef enum {
+ sBanner, sUseDNS, sHostbasedAuthentication,
+ sHostbasedUsesNameFromPacketOnly, sClientAliveInterval,
+ sClientAliveCountMax, sAuthorizedKeysFile,
+- sGssAuthentication, sGssCleanupCreds, sAcceptEnv, sPermitTunnel,
++ sGssAuthentication, sGssCleanupCreds, sGssStrictAcceptor,
++ sAcceptEnv, sPermitTunnel,
+ sMatch, sPermitOpen, sForceCommand, sChrootDirectory,
+ sUsePrivilegeSeparation, sAllowAgentForwarding,
+ sZeroKnowledgePasswordAuthentication, sHostCertificate,
+@@ -327,9 +331,11 @@ static struct {
+ #ifdef GSSAPI
+ { "gssapiauthentication", sGssAuthentication, SSHCFG_ALL },
+ { "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL },
++ { "gssapistrictacceptorcheck", sGssStrictAcceptor, SSHCFG_GLOBAL },
+ #else
+ { "gssapiauthentication", sUnsupported, SSHCFG_ALL },
+ { "gssapicleanupcredentials", sUnsupported, SSHCFG_GLOBAL },
++ { "gssapistrictacceptorcheck", sUnsupported, SSHCFG_GLOBAL },
+ #endif
+ { "passwordauthentication", sPasswordAuthentication, SSHCFG_ALL },
+ { "kbdinteractiveauthentication", sKbdInteractiveAuthentication, SSHCFG_ALL },
+@@ -850,6 +856,10 @@ process_server_config_line(ServerOptions
+
+ case sGssCleanupCreds:
+ intptr = &options->gss_cleanup_creds;
++ goto parse_flag;
++
++ case sGssStrictAcceptor:
++ intptr = &options->gss_strict_acceptor;
+ goto parse_flag;
+
+ case sPasswordAuthentication:
+--- a/servconf.h
++++ b/servconf.h
+@@ -92,6 +92,7 @@ typedef struct {
+ * authenticated with Kerberos. */
+ int gss_authentication; /* If true, permit GSSAPI authentication */
+ int gss_cleanup_creds; /* If true, destroy cred cache on logout */
++ int gss_strict_acceptor; /* If true, restrict the GSSAPI acceptor name */
+ int password_authentication; /* If true, permit password
+ * authentication. */
+ int kbd_interactive_authentication; /* If true, permit */
+--- a/sshd_config
++++ b/sshd_config
+@@ -69,6 +69,7 @@
+ # GSSAPI options
+ #GSSAPIAuthentication no
+ #GSSAPICleanupCredentials yes
++#GSSAPIStrictAcceptorCheck yes
+
+ # Set this to 'yes' to enable PAM authentication, account processing,
+ # and session processing. If this is enabled, PAM authentication will
+--- a/sshd_config.5
++++ b/sshd_config.5
+@@ -386,6 +386,21 @@ on logout.
+ The default is
+ .Dq yes .
+ Note that this option applies to protocol version 2 only.
++.It Cm GSSAPIStrictAcceptorCheck
++Determines whether to be strict about the identity of the GSSAPI acceptor
++a client authenticates against.
++If set to
++.Dq yes
++then the client must authenticate against the
++.Pa host
++service on the current hostname.
++If set to
++.Dq no
++then the client may authenticate against any service key stored in the
++machine's default store.
++This facility is provided to assist with operation on multi homed machines.
++The default is
++.Dq yes .
+ .It Cm HostbasedAuthentication
+ Specifies whether rhosts or /etc/hosts.equiv authentication together
+ with successful public key client host authentication is allowed
diff --git a/net-misc/openssh/files/openssh-6.7_p1-x509-glue.patch b/net-misc/openssh/files/openssh-6.7_p1-x509-glue.patch
new file mode 100644
index 000000000000..71b9c517311f
--- /dev/null
+++ b/net-misc/openssh/files/openssh-6.7_p1-x509-glue.patch
@@ -0,0 +1,46 @@
+--- openssh-6.7p1.orig/sshd_config.5 2014-11-24 10:24:29.356244415 -0800
++++ openssh-6.7p1/sshd_config.5 2014-11-24 10:23:49.415029039 -0800
+@@ -610,21 +610,6 @@
+ The default is
+ .Dq yes .
+ Note that this option applies to protocol version 2 only.
+-.It Cm GSSAPIStrictAcceptorCheck
+-Determines whether to be strict about the identity of the GSSAPI acceptor
+-a client authenticates against.
+-If set to
+-.Dq yes
+-then the client must authenticate against the
+-.Pa host
+-service on the current hostname.
+-If set to
+-.Dq no
+-then the client may authenticate against any service key stored in the
+-machine's default store.
+-This facility is provided to assist with operation on multi homed machines.
+-The default is
+-.Dq yes .
+ .It Cm HostbasedAuthentication
+ Specifies whether rhosts or /etc/hosts.equiv authentication together
+ with successful public key client host authentication is allowed
+@@ -651,6 +636,21 @@
+ attempting to resolve the name from the TCP connection itself.
+ The default is
+ .Dq no .
++.It Cm GSSAPIStrictAcceptorCheck
++Determines whether to be strict about the identity of the GSSAPI acceptor
++a client authenticates against.
++If set to
++.Dq yes
++then the client must authenticate against the
++.Pa host
++service on the current hostname.
++If set to
++.Dq no
++then the client may authenticate against any service key stored in the
++machine's default store.
++This facility is provided to assist with operation on multi homed machines.
++The default is
++.Dq yes .
+ .It Cm HostCertificate
+ Specifies a file containing a public host certificate.
+ The certificate's public key must match a private host key already specified
diff --git a/net-misc/openssh/files/openssh-6.7_p1-xmalloc-include.patch b/net-misc/openssh/files/openssh-6.7_p1-xmalloc-include.patch
new file mode 100644
index 000000000000..170031daad36
--- /dev/null
+++ b/net-misc/openssh/files/openssh-6.7_p1-xmalloc-include.patch
@@ -0,0 +1,11 @@
+diff -ur openssh-6.7p1.orig/ssh-rsa.c openssh-6.7p1/ssh-rsa.c
+--- openssh-6.7p1.orig/ssh-rsa.c 2015-02-24 14:52:54.512197868 -0800
++++ openssh-6.7p1/ssh-rsa.c 2015-02-27 11:48:54.173951646 -0800
+@@ -34,6 +34,7 @@
+ #include "sshkey.h"
+ #include "digest.h"
+ #include "evp-compat.h"
++#include "xmalloc.h"
+
+ /*NOTE: Do not define USE_LEGACY_RSA_... if build
+ is with FIPS capable OpenSSL */
diff --git a/net-misc/openssh/files/openssh-6.8_p1-sctp-x509-glue.patch b/net-misc/openssh/files/openssh-6.8_p1-sctp-x509-glue.patch
new file mode 100644
index 000000000000..7b12e9a67cf0
--- /dev/null
+++ b/net-misc/openssh/files/openssh-6.8_p1-sctp-x509-glue.patch
@@ -0,0 +1,90 @@
+--- openssh-6.8_p1-sctp.patch.orig 2015-03-18 17:52:40.563506822 -0700
++++ openssh-6.8_p1-sctp.patch 2015-03-18 18:14:30.919753194 -0700
+@@ -184,34 +184,6 @@
+ int port; /* Port to connect. */
+ int address_family;
+ int connection_attempts; /* Max attempts (seconds) before
+---- a/scp.1
+-+++ b/scp.1
+-@@ -19,7 +19,7 @@
+- .Sh SYNOPSIS
+- .Nm scp
+- .Bk -words
+--.Op Fl 12346BCpqrv
+-+.Op Fl 12346BCpqrvz
+- .Op Fl c Ar cipher
+- .Op Fl F Ar ssh_config
+- .Op Fl i Ar identity_file
+-@@ -178,6 +178,7 @@ For full details of the options listed b
+- .It ServerAliveCountMax
+- .It StrictHostKeyChecking
+- .It TCPKeepAlive
+-+.It Transport
+- .It UpdateHostKeys
+- .It UsePrivilegedPort
+- .It User
+-@@ -218,6 +219,8 @@ and
+- to print debugging messages about their progress.
+- This is helpful in
+- debugging connection, authentication, and configuration problems.
+-+.It Fl z
+-+Use the SCTP protocol for connection instead of TCP which is the default.
+- .El
+- .Sh EXIT STATUS
+- .Ex -std scp
+ --- a/scp.c
+ +++ b/scp.c
+ @@ -395,7 +395,11 @@ main(int argc, char **argv)
+@@ -471,34 +443,6 @@
+ int protocol; /* Supported protocol versions. */
+ struct ForwardOptions fwd_opts; /* forwarding options */
+ SyslogFacility log_facility; /* Facility for system logging. */
+---- a/ssh.1
+-+++ b/ssh.1
+-@@ -43,7 +43,7 @@
+- .Sh SYNOPSIS
+- .Nm ssh
+- .Bk -words
+--.Op Fl 1246AaCfGgKkMNnqsTtVvXxYy
+-+.Op Fl 1246AaCfGgKkMNnqsTtVvXxYyz
+- .Op Fl b Ar bind_address
+- .Op Fl c Ar cipher_spec
+- .Op Fl D Oo Ar bind_address : Oc Ns Ar port
+-@@ -473,6 +473,7 @@ For full details of the options listed b
+- .It StreamLocalBindUnlink
+- .It StrictHostKeyChecking
+- .It TCPKeepAlive
+-+.It Transport
+- .It Tunnel
+- .It TunnelDevice
+- .It UsePrivilegedPort
+-@@ -665,6 +666,8 @@ Trusted X11 forwardings are not subjecte
+- controls.
+- .It Fl y
+- Send log information using the
+-+.It Fl z
+-+Use the SCTP protocol for connection instead of TCP which is the default.
+- .Xr syslog 3
+- system module.
+- By default this information is sent to stderr.
+ --- a/ssh.c
+ +++ b/ssh.c
+ @@ -194,12 +194,17 @@ extern int muxserver_sock;
+@@ -520,13 +464,11 @@
+ " [-D [bind_address:]port] [-E log_file] [-e escape_char]\n"
+ " [-F configfile] [-I pkcs11] [-i identity_file]\n"
+ " [-L [bind_address:]port:host:hostport] [-l login_name] [-m mac_spec]\n"
+-@@ -506,7 +512,7 @@ main(int ac, char **av)
+- argv0 = av[0];
++@@ -506,4 +512,4 @@ main(int ac, char **av)
+
+- again:
+-- while ((opt = getopt(ac, av, "1246ab:c:e:fgi:kl:m:no:p:qstvx"
+-+ while ((opt = getopt(ac, av, "1246ab:c:e:fgi:kl:m:no:p:qstvx" SCTP_OPT
+- "ACD:E:F:GI:KL:MNO:PQ:R:S:TVw:W:XYy")) != -1) {
++- while ((opt = getopt(ac, av, "1246ab:c:de:fgi:kl:m:no:p:qstvx"
+++ while ((opt = getopt(ac, av, "1246ab:c:de:fgi:kl:m:no:p:qstvx" SCTP_OPT
++ "ACD:E:F:" ENGCONFIG "I:KL:MNO:PQ:R:S:TVw:W:XYy")) != -1) {
+ switch (opt) {
+ case '1':
+ @@ -732,6 +738,11 @@ main(int ac, char **av)
diff --git a/net-misc/openssh/files/openssh-6.8_p1-ssh-keygen-no-ssh1.patch b/net-misc/openssh/files/openssh-6.8_p1-ssh-keygen-no-ssh1.patch
new file mode 100644
index 000000000000..e14a728f43a3
--- /dev/null
+++ b/net-misc/openssh/files/openssh-6.8_p1-ssh-keygen-no-ssh1.patch
@@ -0,0 +1,40 @@
+https://bugs.gentoo.org/544078
+https://bugzilla.mindrot.org/show_bug.cgi?id=2369
+
+From 117c961c8d1f0537973df5a6a937389b4b7b61b4 Mon Sep 17 00:00:00 2001
+From: "djm@openbsd.org" <djm@openbsd.org>
+Date: Mon, 23 Mar 2015 06:06:38 +0000
+Subject: [PATCH] upstream commit
+
+for ssh-keygen -A, don't try (and fail) to generate ssh
+ v.1 keys when compiled without SSH1 support RSA/DSA/ECDSA keys when compiled
+ without OpenSSL based on patch by Mike Frysinger; bz#2369
+---
+ ssh-keygen.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/ssh-keygen.c b/ssh-keygen.c
+index a3c2362..96dd8b4 100644
+--- a/ssh-keygen.c
++++ b/ssh-keygen.c
+@@ -948,12 +948,16 @@ do_gen_all_hostkeys(struct passwd *pw)
+ char *key_type_display;
+ char *path;
+ } key_types[] = {
++#ifdef WITH_OPENSSL
++#ifdef WITH_SSH1
+ { "rsa1", "RSA1", _PATH_HOST_KEY_FILE },
++#endif /* WITH_SSH1 */
+ { "rsa", "RSA" ,_PATH_HOST_RSA_KEY_FILE },
+ { "dsa", "DSA", _PATH_HOST_DSA_KEY_FILE },
+ #ifdef OPENSSL_HAS_ECC
+ { "ecdsa", "ECDSA",_PATH_HOST_ECDSA_KEY_FILE },
+-#endif
++#endif /* OPENSSL_HAS_ECC */
++#endif /* WITH_OPENSSL */
+ { "ed25519", "ED25519",_PATH_HOST_ED25519_KEY_FILE },
+ { NULL, NULL, NULL }
+ };
+--
+2.3.3
+
diff --git a/net-misc/openssh/files/openssh-6.8_p1-sshd-gssapi-multihomed.patch b/net-misc/openssh/files/openssh-6.8_p1-sshd-gssapi-multihomed.patch
new file mode 100644
index 000000000000..48fce1e2c294
--- /dev/null
+++ b/net-misc/openssh/files/openssh-6.8_p1-sshd-gssapi-multihomed.patch
@@ -0,0 +1,162 @@
+https://bugs.gentoo.org/378361
+https://bugzilla.mindrot.org/show_bug.cgi?id=928
+
+--- a/gss-serv.c
++++ b/gss-serv.c
+@@ -41,9 +41,12 @@
+ #include "channels.h"
+ #include "session.h"
+ #include "misc.h"
++#include "servconf.h"
+
+ #include "ssh-gss.h"
+
++extern ServerOptions options;
++
+ static ssh_gssapi_client gssapi_client =
+ { GSS_C_EMPTY_BUFFER, GSS_C_EMPTY_BUFFER,
+ GSS_C_NO_CREDENTIAL, NULL, {NULL, NULL, NULL, NULL}};
+@@ -77,25 +80,32 @@ ssh_gssapi_acquire_cred(Gssctxt *ctx)
+ char lname[NI_MAXHOST];
+ gss_OID_set oidset;
+
+- gss_create_empty_oid_set(&status, &oidset);
+- gss_add_oid_set_member(&status, ctx->oid, &oidset);
+-
+- if (gethostname(lname, sizeof(lname))) {
+- gss_release_oid_set(&status, &oidset);
+- return (-1);
+- }
++ if (options.gss_strict_acceptor) {
++ gss_create_empty_oid_set(&status, &oidset);
++ gss_add_oid_set_member(&status, ctx->oid, &oidset);
++
++ if (gethostname(lname, MAXHOSTNAMELEN)) {
++ gss_release_oid_set(&status, &oidset);
++ return (-1);
++ }
++
++ if (GSS_ERROR(ssh_gssapi_import_name(ctx, lname))) {
++ gss_release_oid_set(&status, &oidset);
++ return (ctx->major);
++ }
++
++ if ((ctx->major = gss_acquire_cred(&ctx->minor,
++ ctx->name, 0, oidset, GSS_C_ACCEPT, &ctx->creds,
++ NULL, NULL)))
++ ssh_gssapi_error(ctx);
+
+- if (GSS_ERROR(ssh_gssapi_import_name(ctx, lname))) {
+ gss_release_oid_set(&status, &oidset);
+ return (ctx->major);
++ } else {
++ ctx->name = GSS_C_NO_NAME;
++ ctx->creds = GSS_C_NO_CREDENTIAL;
+ }
+-
+- if ((ctx->major = gss_acquire_cred(&ctx->minor,
+- ctx->name, 0, oidset, GSS_C_ACCEPT, &ctx->creds, NULL, NULL)))
+- ssh_gssapi_error(ctx);
+-
+- gss_release_oid_set(&status, &oidset);
+- return (ctx->major);
++ return GSS_S_COMPLETE;
+ }
+
+ /* Privileged */
+--- a/servconf.c
++++ b/servconf.c
+@@ -86,6 +86,7 @@ initialize_server_options(ServerOptions
+ options->kerberos_get_afs_token = -1;
+ options->gss_authentication=-1;
+ options->gss_cleanup_creds = -1;
++ options->gss_strict_acceptor = -1;
+ options->password_authentication = -1;
+ options->kbd_interactive_authentication = -1;
+ options->challenge_response_authentication = -1;
+@@ -200,6 +201,8 @@ fill_default_server_options(ServerOption
+ options->gss_authentication = 0;
+ if (options->gss_cleanup_creds == -1)
+ options->gss_cleanup_creds = 1;
++ if (options->gss_strict_acceptor == -1)
++ options->gss_strict_acceptor = 0;
+ if (options->password_authentication == -1)
+ options->password_authentication = 1;
+ if (options->kbd_interactive_authentication == -1)
+@@ -277,7 +280,8 @@ typedef enum {
+ sBanner, sUseDNS, sHostbasedAuthentication,
+ sHostbasedUsesNameFromPacketOnly, sHostbasedAcceptedKeyTypes,
+ sClientAliveInterval, sClientAliveCountMax, sAuthorizedKeysFile,
+- sGssAuthentication, sGssCleanupCreds, sAcceptEnv, sPermitTunnel,
++ sGssAuthentication, sGssCleanupCreds, sGssStrictAcceptor,
++ sAcceptEnv, sPermitTunnel,
+ sMatch, sPermitOpen, sForceCommand, sChrootDirectory,
+ sUsePrivilegeSeparation, sAllowAgentForwarding,
+ sHostCertificate,
+@@ -327,9 +331,11 @@ static struct {
+ #ifdef GSSAPI
+ { "gssapiauthentication", sGssAuthentication, SSHCFG_ALL },
+ { "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL },
++ { "gssapistrictacceptorcheck", sGssStrictAcceptor, SSHCFG_GLOBAL },
+ #else
+ { "gssapiauthentication", sUnsupported, SSHCFG_ALL },
+ { "gssapicleanupcredentials", sUnsupported, SSHCFG_GLOBAL },
++ { "gssapistrictacceptorcheck", sUnsupported, SSHCFG_GLOBAL },
+ #endif
+ { "passwordauthentication", sPasswordAuthentication, SSHCFG_ALL },
+ { "kbdinteractiveauthentication", sKbdInteractiveAuthentication, SSHCFG_ALL },
+@@ -850,6 +856,10 @@ process_server_config_line(ServerOptions
+
+ case sGssCleanupCreds:
+ intptr = &options->gss_cleanup_creds;
++ goto parse_flag;
++
++ case sGssStrictAcceptor:
++ intptr = &options->gss_strict_acceptor;
+ goto parse_flag;
+
+ case sPasswordAuthentication:
+--- a/servconf.h
++++ b/servconf.h
+@@ -92,6 +92,7 @@ typedef struct {
+ * authenticated with Kerberos. */
+ int gss_authentication; /* If true, permit GSSAPI authentication */
+ int gss_cleanup_creds; /* If true, destroy cred cache on logout */
++ int gss_strict_acceptor; /* If true, restrict the GSSAPI acceptor name */
+ int password_authentication; /* If true, permit password
+ * authentication. */
+ int kbd_interactive_authentication; /* If true, permit */
+--- a/sshd_config
++++ b/sshd_config
+@@ -69,6 +69,7 @@
+ # GSSAPI options
+ #GSSAPIAuthentication no
+ #GSSAPICleanupCredentials yes
++#GSSAPIStrictAcceptorCheck yes
+
+ # Set this to 'yes' to enable PAM authentication, account processing,
+ # and session processing. If this is enabled, PAM authentication will
+--- a/sshd_config.5
++++ b/sshd_config.5
+@@ -386,6 +386,21 @@ on logout.
+ The default is
+ .Dq yes .
+ Note that this option applies to protocol version 2 only.
++.It Cm GSSAPIStrictAcceptorCheck
++Determines whether to be strict about the identity of the GSSAPI acceptor
++a client authenticates against.
++If set to
++.Dq yes
++then the client must authenticate against the
++.Pa host
++service on the current hostname.
++If set to
++.Dq no
++then the client may authenticate against any service key stored in the
++machine's default store.
++This facility is provided to assist with operation on multi homed machines.
++The default is
++.Dq yes .
+ .It Cm HostbasedAcceptedKeyTypes
+ Specifies the key types that will be accepted for hostbased authentication
+ as a comma-separated pattern list.
diff --git a/net-misc/openssh/files/openssh-6.8_p1-ssl-engine-configure.patch b/net-misc/openssh/files/openssh-6.8_p1-ssl-engine-configure.patch
new file mode 100644
index 000000000000..9fad386ccb6c
--- /dev/null
+++ b/net-misc/openssh/files/openssh-6.8_p1-ssl-engine-configure.patch
@@ -0,0 +1,31 @@
+From 003ed46d1bd94bac29c53b26ae70f6321ea11c80 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Wed, 18 Mar 2015 12:37:24 -0400
+Subject: [PATCH] do not abort when --without-ssl-engine --without-openssl is
+ set
+
+---
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index b4d6598..7806d20 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2276,10 +2276,10 @@ openssl_engine=no
+ AC_ARG_WITH([ssl-engine],
+ [ --with-ssl-engine Enable OpenSSL (hardware) ENGINE support ],
+ [
+- if test "x$openssl" = "xno" ; then
+- AC_MSG_ERROR([cannot use --with-ssl-engine when OpenSSL disabled])
+- fi
+ if test "x$withval" != "xno" ; then
++ if test "x$openssl" = "xno" ; then
++ AC_MSG_ERROR([cannot use --with-ssl-engine when OpenSSL disabled])
++ fi
+ openssl_engine=yes
+ fi
+ ]
+--
+2.3.2
+
diff --git a/net-misc/openssh/files/openssh-6.8_p1-teraterm-hpn-glue.patch b/net-misc/openssh/files/openssh-6.8_p1-teraterm-hpn-glue.patch
new file mode 100644
index 000000000000..e72b1e6bafaa
--- /dev/null
+++ b/net-misc/openssh/files/openssh-6.8_p1-teraterm-hpn-glue.patch
@@ -0,0 +1,15 @@
+--- a/0005-support-dynamically-sized-receive-buffers.patch
++++ b/0005-support-dynamically-sized-receive-buffers.patch
+@@ -411,10 +411,10 @@ index af2f007..41b782b 100644
+ --- a/compat.h
+ +++ b/compat.h
+ @@ -60,6 +60,7 @@
+- #define SSH_NEW_OPENSSH 0x04000000
+ #define SSH_BUG_DYNAMIC_RPORT 0x08000000
+ #define SSH_BUG_CURVE25519PAD 0x10000000
+-+#define SSH_BUG_LARGEWINDOW 0x20000000
++ #define SSH_BUG_HOSTKEYS 0x20000000
+++#define SSH_BUG_LARGEWINDOW 0x40000000
+
+ void enable_compat13(void);
+ void enable_compat20(void);
diff --git a/net-misc/openssh/files/openssh-6.8_p1-teraterm.patch b/net-misc/openssh/files/openssh-6.8_p1-teraterm.patch
new file mode 100644
index 000000000000..f99e92f29e33
--- /dev/null
+++ b/net-misc/openssh/files/openssh-6.8_p1-teraterm.patch
@@ -0,0 +1,69 @@
+https://bugs.gentoo.org/547944
+
+From d8f391caef62378463a0e6b36f940170dadfe605 Mon Sep 17 00:00:00 2001
+From: "dtucker@openbsd.org" <dtucker@openbsd.org>
+Date: Fri, 10 Apr 2015 05:16:50 +0000
+Subject: [PATCH] upstream commit
+
+Don't send hostkey advertisments
+ (hostkeys-00@openssh.com) to current versions of Tera Term as they can't
+ handle them. Newer versions should be OK. Patch from Bryan Drewery and
+ IWAMOTO Kouichi, ok djm@
+---
+ compat.c | 13 ++++++++++++-
+ compat.h | 3 ++-
+ sshd.c | 6 +++++-
+ 3 files changed, 19 insertions(+), 3 deletions(-)
+
+diff --git a/compat.c b/compat.c
+index 2498168..0934de9 100644
+--- a/compat.c
++++ b/compat.c
+@@ -167,6 +167,17 @@ compat_datafellows(const char *version)
+ SSH_BUG_SCANNER },
+ { "Probe-*",
+ SSH_BUG_PROBE },
++ { "TeraTerm SSH*,"
++ "TTSSH/1.5.*,"
++ "TTSSH/2.1*,"
++ "TTSSH/2.2*,"
++ "TTSSH/2.3*,"
++ "TTSSH/2.4*,"
++ "TTSSH/2.5*,"
++ "TTSSH/2.6*,"
++ "TTSSH/2.70*,"
++ "TTSSH/2.71*,"
++ "TTSSH/2.72*", SSH_BUG_HOSTKEYS },
+ { NULL, 0 }
+ };
+
+diff --git a/compat.h b/compat.h
+index af2f007..83507f0 100644
+--- a/compat.h
++++ b/compat.h
+@@ -60,6 +60,7 @@
+ #define SSH_NEW_OPENSSH 0x04000000
+ #define SSH_BUG_DYNAMIC_RPORT 0x08000000
+ #define SSH_BUG_CURVE25519PAD 0x10000000
++#define SSH_BUG_HOSTKEYS 0x20000000
+
+ void enable_compat13(void);
+ void enable_compat20(void);
+diff --git a/sshd.c b/sshd.c
+index 6aa17fa..60b0cd4 100644
+--- a/sshd.c
++++ b/sshd.c
+@@ -928,6 +928,10 @@ notify_hostkeys(struct ssh *ssh)
+ int i, nkeys, r;
+ char *fp;
+
++ /* Some clients cannot cope with the hostkeys message, skip those. */
++ if (datafellows & SSH_BUG_HOSTKEYS)
++ return;
++
+ if ((buf = sshbuf_new()) == NULL)
+ fatal("%s: sshbuf_new", __func__);
+ for (i = nkeys = 0; i < options.num_host_key_files; i++) {
+--
+2.3.6
+
diff --git a/net-misc/openssh/files/openssh-6.9_p1-x509-warnings.patch b/net-misc/openssh/files/openssh-6.9_p1-x509-warnings.patch
new file mode 100644
index 000000000000..9ce2967af425
--- /dev/null
+++ b/net-misc/openssh/files/openssh-6.9_p1-x509-warnings.patch
@@ -0,0 +1,24 @@
+diff -ur openssh-6.9p1.orig/sshconnect2.c openssh-6.9p1/sshconnect2.c
+--- openssh-6.9p1.orig/sshconnect2.c 2015-07-01 14:56:26.766316866 -0700
++++ openssh-6.9p1/sshconnect2.c 2015-07-01 14:59:22.828692366 -0700
+@@ -1404,7 +1404,7 @@
+ static int
+ get_allowed_keytype(Key *k) {
+ char *pattern;
+- char *alg;
++ const char *alg;
+
+ if (k->type == KEY_RSA1 || k->type == KEY_UNSPEC)
+ return KEY_UNSPEC;
+diff -ur openssh-6.9p1.orig/x509_nm_cmp.c openssh-6.9p1/x509_nm_cmp.c
+--- openssh-6.9p1.orig/x509_nm_cmp.c 2015-07-01 14:56:26.129311890 -0700
++++ openssh-6.9p1/x509_nm_cmp.c 2015-07-01 14:59:14.086624068 -0700
+@@ -133,7 +133,7 @@
+ tag = M_ASN1_STRING_type(in);
+ if (tag != V_ASN1_UTF8STRING) {
+ /*OpenSSL method surprisingly require non-const(!?) ASN1_STRING!*/
+- return(ASN1_STRING_to_UTF8(out, in));
++ return(ASN1_STRING_to_UTF8(out, (ASN1_STRING *) in));
+ }
+
+ l = M_ASN1_STRING_length(in);
diff --git a/net-misc/openssh/files/sshd.confd b/net-misc/openssh/files/sshd.confd
new file mode 100644
index 000000000000..28952b4a285a
--- /dev/null
+++ b/net-misc/openssh/files/sshd.confd
@@ -0,0 +1,21 @@
+# /etc/conf.d/sshd: config file for /etc/init.d/sshd
+
+# Where is your sshd_config file stored?
+
+SSHD_CONFDIR="/etc/ssh"
+
+
+# Any random options you want to pass to sshd.
+# See the sshd(8) manpage for more info.
+
+SSHD_OPTS=""
+
+
+# Pid file to use (needs to be absolute path).
+
+#SSHD_PIDFILE="/var/run/sshd.pid"
+
+
+# Path to the sshd binary (needs to be absolute path).
+
+#SSHD_BINARY="/usr/sbin/sshd"
diff --git a/net-misc/openssh/files/sshd.pam_include.2 b/net-misc/openssh/files/sshd.pam_include.2
new file mode 100644
index 000000000000..b801aaafa0f9
--- /dev/null
+++ b/net-misc/openssh/files/sshd.pam_include.2
@@ -0,0 +1,4 @@
+auth include system-remote-login
+account include system-remote-login
+password include system-remote-login
+session include system-remote-login
diff --git a/net-misc/openssh/files/sshd.rc6.4 b/net-misc/openssh/files/sshd.rc6.4
new file mode 100755
index 000000000000..34e19706de07
--- /dev/null
+++ b/net-misc/openssh/files/sshd.rc6.4
@@ -0,0 +1,85 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+: ${SSHD_CONFDIR:=/etc/ssh}
+: ${SSHD_CONFIG:=${SSHD_CONFDIR}/sshd_config}
+: ${SSHD_PIDFILE:=/var/run/${SVCNAME}.pid}
+: ${SSHD_BINARY:=/usr/sbin/sshd}
+
+depend() {
+ use logger dns
+ if [ "${rc_need+set}" = "set" ] ; then
+ : # Do nothing, the user has explicitly set rc_need
+ else
+ local x warn_addr
+ for x in $(awk '/^ListenAddress/{ print $2 }' "$SSHD_CONFIG" 2>/dev/null) ; do
+ case "${x}" in
+ 0.0.0.0|0.0.0.0:*) ;;
+ ::|\[::\]*) ;;
+ *) warn_addr="${warn_addr} ${x}" ;;
+ esac
+ done
+ if [ -n "${warn_addr}" ] ; then
+ need net
+ ewarn "You are binding an interface in ListenAddress statement in your sshd_config!"
+ ewarn "You must add rc_need=\"net.FOO\" to your /etc/conf.d/sshd"
+ ewarn "where FOO is the interface(s) providing the following address(es):"
+ ewarn "${warn_addr}"
+ fi
+ fi
+}
+
+checkconfig() {
+ if [ ! -d /var/empty ] ; then
+ mkdir -p /var/empty || return 1
+ fi
+
+ if [ ! -e "${SSHD_CONFIG}" ] ; then
+ eerror "You need an ${SSHD_CONFIG} file to run sshd"
+ eerror "There is a sample file in /usr/share/doc/openssh"
+ return 1
+ fi
+
+ ssh-keygen -A || return 1
+
+ [ "${SSHD_PIDFILE}" != "/var/run/sshd.pid" ] \
+ && SSHD_OPTS="${SSHD_OPTS} -o PidFile=${SSHD_PIDFILE}"
+ [ "${SSHD_CONFIG}" != "/etc/ssh/sshd_config" ] \
+ && SSHD_OPTS="${SSHD_OPTS} -f ${SSHD_CONFIG}"
+
+ "${SSHD_BINARY}" -t ${SSHD_OPTS} || return 1
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec "${SSHD_BINARY}" \
+ --pidfile "${SSHD_PIDFILE}" \
+ -- ${SSHD_OPTS}
+ eend $?
+}
+
+stop() {
+ if [ "${RC_CMD}" = "restart" ] ; then
+ checkconfig || return 1
+ fi
+
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec "${SSHD_BINARY}" \
+ --pidfile "${SSHD_PIDFILE}" --quiet
+ eend $?
+}
+
+reload() {
+ checkconfig || return 1
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --signal HUP \
+ --exec "${SSHD_BINARY}" --pidfile "${SSHD_PIDFILE}"
+ eend $?
+}
diff --git a/net-misc/openssh/files/sshd.service b/net-misc/openssh/files/sshd.service
new file mode 100644
index 000000000000..b5e96b3a251f
--- /dev/null
+++ b/net-misc/openssh/files/sshd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=OpenSSH server daemon
+After=syslog.target network.target auditd.service
+
+[Service]
+ExecStartPre=/usr/bin/ssh-keygen -A
+ExecStart=/usr/sbin/sshd -D -e
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/openssh/files/sshd.socket b/net-misc/openssh/files/sshd.socket
new file mode 100644
index 000000000000..94b9533180da
--- /dev/null
+++ b/net-misc/openssh/files/sshd.socket
@@ -0,0 +1,10 @@
+[Unit]
+Description=OpenSSH Server Socket
+Conflicts=sshd.service
+
+[Socket]
+ListenStream=22
+Accept=yes
+
+[Install]
+WantedBy=sockets.target
diff --git a/net-misc/openssh/files/sshd_at.service b/net-misc/openssh/files/sshd_at.service
new file mode 100644
index 000000000000..2645ad047cc6
--- /dev/null
+++ b/net-misc/openssh/files/sshd_at.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=OpenSSH per-connection server daemon
+After=syslog.target auditd.service
+
+[Service]
+ExecStart=-/usr/sbin/sshd -i -e
+StandardInput=socket
+StandardError=syslog
diff --git a/net-misc/openssh/metadata.xml b/net-misc/openssh/metadata.xml
new file mode 100644
index 000000000000..ec8bad168c76
--- /dev/null
+++ b/net-misc/openssh/metadata.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+ <maintainer restrict="net-misc/openssh[ldap]">
+ <email>robbat2@gentoo.org</email>
+ <description>LPK issues. Only assign if it's a direct LPK issue. Do not directly assign for anything else.</description>
+ </maintainer>
+ <longdescription>
+OpenSSH is a FREE version of the SSH protocol suite of network connectivity tools that
+increasing numbers of people on the Internet are coming to rely on. Many users of telnet,
+rlogin, ftp, and other such programs might not realize that their password is transmitted
+across the Internet unencrypted, but it is. OpenSSH encrypts all traffic (including passwords)
+to effectively eliminate eavesdropping, connection hijacking, and other network-level attacks.
+Additionally, OpenSSH provides a myriad of secure tunneling capabilities, as well as a variety
+of authentication methods.
+
+The OpenSSH suite includes the ssh program which replaces rlogin and telnet, scp which
+replaces rcp, and sftp which replaces ftp. Also included is sshd which is the server side of
+the package, and the other basic utilities like ssh-add, ssh-agent, ssh-keysign, ssh-keyscan,
+ssh-keygen and sftp-server. OpenSSH supports SSH protocol versions 1.3, 1.5, and 2.0.
+</longdescription>
+ <use>
+ <flag name="bindist">Disable EC/RC5 algorithms in OpenSSL for patent reasons.</flag>
+ <flag name="hpn">Enable high performance ssh</flag>
+ <flag name="ldap">Add support for storing SSH public keys in LDAP</flag>
+ <flag name="ldns">Use LDNS for DNSSEC/SSHFP validation.</flag>
+ <flag name="sctp">Support for Stream Control Transmission Protocol</flag>
+ <flag name="ssh1">Support the legacy/weak SSH1 protocol</flag>
+ <flag name="ssl">Enable additional crypto algorithms via OpenSSL</flag>
+ <flag name="X509">Adds support for X.509 certificate authentication</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:openssh:openssh</remote-id>
+ <remote-id type="sourceforge">hpnssh</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/openssh/openssh-6.7_p1-r4.ebuild b/net-misc/openssh/openssh-6.7_p1-r4.ebuild
new file mode 100644
index 000000000000..eebb41098df4
--- /dev/null
+++ b/net-misc/openssh/openssh-6.7_p1-r4.ebuild
@@ -0,0 +1,324 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit eutils user flag-o-matic multilib autotools pam systemd versionator
+
+# Make it more portable between straight releases
+# and _p? releases.
+PARCH=${P/_}
+
+HPN_PATCH="${PN}-6.7p1-hpnssh14v5.tar.xz"
+LDAP_PATCH="${PN}-lpk-6.7p1-0.3.14.patch.xz"
+X509_VER="8.2" X509_PATCH="${PARCH}+x509-${X509_VER}.diff.gz"
+
+DESCRIPTION="Port of OpenBSD's free SSH release"
+HOMEPAGE="http://www.openssh.org/"
+SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz
+ mirror://gentoo/${P}-sctp.patch.xz
+ ${HPN_PATCH:+hpn? (
+ mirror://gentoo/${HPN_PATCH}
+ http://dev.gentoo.org/~vapier/dist/${HPN_PATCH}
+ mirror://sourceforge/hpnssh/${HPN_PATCH}
+ )}
+ ${LDAP_PATCH:+ldap? ( mirror://gentoo/${LDAP_PATCH} )}
+ ${X509_PATCH:+X509? ( http://roumenpetrov.info/openssh/x509-${X509_VER}/${X509_PATCH} )}
+ "
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="bindist ${HPN_PATCH:++}hpn kerberos kernel_linux ldap ldns libedit pam +pie sctp selinux skey static X X509"
+REQUIRED_USE="pie? ( !static )"
+
+LIB_DEPEND="sctp? ( net-misc/lksctp-tools[static-libs(+)] )
+ selinux? ( >=sys-libs/libselinux-1.28[static-libs(+)] )
+ skey? ( >=sys-auth/skey-1.1.5-r1[static-libs(+)] )
+ libedit? ( dev-libs/libedit[static-libs(+)] )
+ >=dev-libs/openssl-0.9.6d:0[bindist=]
+ dev-libs/openssl[static-libs(+)]
+ >=sys-libs/zlib-1.2.3[static-libs(+)]"
+RDEPEND="
+ !static? (
+ ${LIB_DEPEND//\[static-libs(+)]}
+ ldns? (
+ !bindist? ( net-libs/ldns[ecdsa,ssl] )
+ bindist? ( net-libs/ldns[-ecdsa,ssl] )
+ )
+ )
+ pam? ( virtual/pam )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )"
+DEPEND="${RDEPEND}
+ static? (
+ ${LIB_DEPEND}
+ ldns? (
+ !bindist? ( net-libs/ldns[ecdsa,ssl,static-libs(+)] )
+ bindist? ( net-libs/ldns[-ecdsa,ssl,static-libs(+)] )
+ )
+ )
+ virtual/pkgconfig
+ virtual/os-headers
+ sys-devel/autoconf"
+RDEPEND="${RDEPEND}
+ pam? ( >=sys-auth/pambase-20081028 )
+ userland_GNU? ( virtual/shadow )
+ X? ( x11-apps/xauth )"
+
+S=${WORKDIR}/${PARCH}
+
+pkg_setup() {
+ # this sucks, but i'd rather have people unable to `emerge -u openssh`
+ # than not be able to log in to their server any more
+ maybe_fail() { [[ -z ${!2} ]] && echo "$1" ; }
+ local fail="
+ $(use X509 && maybe_fail X509 X509_PATCH)
+ $(use ldap && maybe_fail ldap LDAP_PATCH)
+ $(use hpn && maybe_fail hpn HPN_PATCH)
+ "
+ fail=$(echo ${fail})
+ if [[ -n ${fail} ]] ; then
+ eerror "Sorry, but this version does not yet support features"
+ eerror "that you requested: ${fail}"
+ eerror "Please mask ${PF} for now and check back later:"
+ eerror " # echo '=${CATEGORY}/${PF}' >> /etc/portage/package.mask"
+ die "booooo"
+ fi
+}
+
+save_version() {
+ # version.h patch conflict avoidence
+ mv version.h version.h.$1
+ cp -f version.h.pristine version.h
+}
+
+src_prepare() {
+ sed -i \
+ -e "/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:${EPREFIX}/usr/bin/xauth:" \
+ pathnames.h || die
+ # keep this as we need it to avoid the conflict between LPK and HPN changing
+ # this file.
+ cp version.h version.h.pristine
+
+ # don't break .ssh/authorized_keys2 for fun
+ sed -i '/^AuthorizedKeysFile/s:^:#:' sshd_config || die
+
+ epatch "${FILESDIR}"/${PN}-6.7_p1-sshd-gssapi-multihomed.patch #378361
+ if use X509 ; then
+ pushd .. >/dev/null
+ epatch "${FILESDIR}"/${P}-x509-glue.patch
+ epatch "${FILESDIR}"/${P}-sctp-x509-glue.patch
+ popd >/dev/null
+ epatch "${WORKDIR}"/${X509_PATCH%.*}
+ epatch "${FILESDIR}"/${PN}-6.3_p1-x509-hpn14v2-glue.patch
+ epatch "${FILESDIR}"/${PN}-6.7_p1-xmalloc-include.patch
+ save_version X509
+ fi
+ if ! use X509 ; then
+ if [[ -n ${LDAP_PATCH} ]] && use ldap ; then
+ epatch "${WORKDIR}"/${LDAP_PATCH%.*}
+ save_version LPK
+ fi
+ else
+ use ldap && ewarn "Sorry, X509 and LDAP conflict internally, disabling LDAP"
+ fi
+ epatch "${FILESDIR}"/${PN}-4.7_p1-GSSAPI-dns.patch #165444 integrated into gsskex
+ epatch "${FILESDIR}"/${PN}-6.7_p1-openssl-ignore-status.patch
+ epatch "${WORKDIR}"/${PN}-6.7_p1-sctp.patch
+ if [[ -n ${HPN_PATCH} ]] && use hpn; then
+ epatch "${WORKDIR}"/${HPN_PATCH%.*}/*
+ save_version HPN
+ fi
+
+ tc-export PKG_CONFIG
+ local sed_args=(
+ -e "s:-lcrypto:$(${PKG_CONFIG} --libs openssl):"
+ # Disable PATH reset, trust what portage gives us #254615
+ -e 's:^PATH=/:#PATH=/:'
+ # Disable fortify flags ... our gcc does this for us
+ -e 's:-D_FORTIFY_SOURCE=2::'
+ )
+ # The -ftrapv flag ICEs on hppa #505182
+ use hppa && sed_args+=(
+ -e '/CFLAGS/s:-ftrapv:-fdisable-this-test:'
+ -e '/OSSH_CHECK_CFLAG_LINK.*-ftrapv/d'
+ )
+ sed -i "${sed_args[@]}" configure{.ac,} || die
+
+ epatch_user #473004
+
+ # Now we can build a sane merged version.h
+ (
+ sed '/^#define SSH_RELEASE/d' version.h.* | sort -u
+ macros=()
+ for p in HPN LPK X509 ; do [ -e version.h.${p} ] && macros+=( SSH_${p} ) ; done
+ printf '#define SSH_RELEASE SSH_VERSION SSH_PORTABLE %s\n' "${macros}"
+ ) > version.h
+
+ eautoreconf
+}
+
+static_use_with() {
+ local flag=$1
+ if use static && use ${flag} ; then
+ ewarn "Disabling '${flag}' support because of USE='static'"
+ # rebuild args so that we invert the first one (USE flag)
+ # but otherwise leave everything else working so we can
+ # just leverage use_with
+ shift
+ [[ -z $1 ]] && flag="${flag} ${flag}"
+ set -- !${flag} "$@"
+ fi
+ use_with "$@"
+}
+
+src_configure() {
+ local myconf=()
+ addwrite /dev/ptmx
+ addpredict /etc/skey/skeykeys #skey configure code triggers this
+
+ use static && append-ldflags -static
+
+ # Special settings for Gentoo/FreeBSD 9.0 or later (see bug #391011)
+ if use elibc_FreeBSD && version_is_at_least 9.0 "$(uname -r|sed 's/\(.\..\).*/\1/')" ; then
+ myconf+=( --disable-utmp --disable-wtmp --disable-wtmpx )
+ append-ldflags -lutil
+ fi
+
+ econf \
+ --with-ldflags="${LDFLAGS}" \
+ --disable-strip \
+ --with-pid-dir="${EPREFIX}"$(usex kernel_linux '' '/var')/run \
+ --sysconfdir="${EPREFIX}"/etc/ssh \
+ --libexecdir="${EPREFIX}"/usr/$(get_libdir)/misc \
+ --datadir="${EPREFIX}"/usr/share/openssh \
+ --with-privsep-path="${EPREFIX}"/var/empty \
+ --with-privsep-user=sshd \
+ --with-md5-passwords \
+ --with-ssl-engine \
+ $(static_use_with pam) \
+ $(static_use_with kerberos kerberos5 "${EPREFIX}"/usr) \
+ ${LDAP_PATCH:+$(use X509 || ( use ldap && use_with ldap ))} \
+ $(use_with ldns) \
+ $(use_with libedit) \
+ $(use_with pie) \
+ $(use_with sctp) \
+ $(use_with selinux) \
+ $(use_with skey) \
+ "${myconf[@]}"
+}
+
+src_install() {
+ emake install-nokeys DESTDIR="${D}"
+ fperms 600 /etc/ssh/sshd_config
+ dobin contrib/ssh-copy-id
+ newinitd "${FILESDIR}"/sshd.rc6.4 sshd
+ newconfd "${FILESDIR}"/sshd.confd sshd
+ keepdir /var/empty
+
+ # not all openssl installs support ecc, or are functional #352645
+ if ! grep -q '#define OPENSSL_HAS_ECC 1' config.h ; then
+ elog "dev-libs/openssl was built with 'bindist' - disabling ecdsa support"
+ sed -i 's:&& gen_key ecdsa::' "${ED}"/etc/init.d/sshd || die
+ fi
+
+ newpamd "${FILESDIR}"/sshd.pam_include.2 sshd
+ if use pam ; then
+ sed -i \
+ -e "/^#UsePAM /s:.*:UsePAM yes:" \
+ -e "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" \
+ -e "/^#PrintMotd /s:.*:PrintMotd no:" \
+ -e "/^#PrintLastLog /s:.*:PrintLastLog no:" \
+ "${ED}"/etc/ssh/sshd_config || die "sed of configuration file failed"
+ fi
+
+ # Gentoo tweaks to default config files
+ cat <<-EOF >> "${ED}"/etc/ssh/sshd_config
+
+ # Allow client to pass locale environment variables #367017
+ AcceptEnv LANG LC_*
+ EOF
+ cat <<-EOF >> "${ED}"/etc/ssh/ssh_config
+
+ # Send locale environment variables #367017
+ SendEnv LANG LC_*
+ EOF
+
+ # This instruction is from the HPN webpage,
+ # Used for the server logging functionality
+ if [[ -n ${HPN_PATCH} ]] && use hpn ; then
+ keepdir /var/empty/dev
+ fi
+
+ if ! use X509 && [[ -n ${LDAP_PATCH} ]] && use ldap ; then
+ insinto /etc/openldap/schema/
+ newins openssh-lpk_openldap.schema openssh-lpk.schema
+ fi
+
+ doman contrib/ssh-copy-id.1
+ dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
+
+ diropts -m 0700
+ dodir /etc/skel/.ssh
+
+ systemd_dounit "${FILESDIR}"/sshd.{service,socket}
+ systemd_newunit "${FILESDIR}"/sshd_at.service 'sshd@.service'
+}
+
+src_test() {
+ local t tests skipped failed passed shell
+ tests="interop-tests compat-tests"
+ skipped=""
+ shell=$(egetshell ${UID})
+ if [[ ${shell} == */nologin ]] || [[ ${shell} == */false ]] ; then
+ elog "Running the full OpenSSH testsuite"
+ elog "requires a usable shell for the 'portage'"
+ elog "user, so we will run a subset only."
+ skipped="${skipped} tests"
+ else
+ tests="${tests} tests"
+ fi
+ # It will also attempt to write to the homedir .ssh
+ local sshhome=${T}/homedir
+ mkdir -p "${sshhome}"/.ssh
+ for t in ${tests} ; do
+ # Some tests read from stdin ...
+ HOMEDIR="${sshhome}" \
+ emake -k -j1 ${t} </dev/null \
+ && passed="${passed}${t} " \
+ || failed="${failed}${t} "
+ done
+ einfo "Passed tests: ${passed}"
+ ewarn "Skipped tests: ${skipped}"
+ if [[ -n ${failed} ]] ; then
+ ewarn "Failed tests: ${failed}"
+ die "Some tests failed: ${failed}"
+ else
+ einfo "Failed tests: ${failed}"
+ return 0
+ fi
+}
+
+pkg_preinst() {
+ enewgroup sshd 22
+ enewuser sshd 22 -1 /var/empty sshd
+}
+
+pkg_postinst() {
+ if has_version "<${CATEGORY}/${PN}-5.8_p1" ; then
+ elog "Starting with openssh-5.8p1, the server will default to a newer key"
+ elog "algorithm (ECDSA). You are encouraged to manually update your stored"
+ elog "keys list as servers update theirs. See ssh-keyscan(1) for more info."
+ fi
+ ewarn "Remember to merge your config files in /etc/ssh/ and then"
+ ewarn "reload sshd: '/etc/init.d/sshd reload'."
+ # This instruction is from the HPN webpage,
+ # Used for the server logging functionality
+ if [[ -n ${HPN_PATCH} ]] && use hpn ; then
+ einfo "For the HPN server logging patch, you must ensure that"
+ einfo "your syslog application also listens at /var/empty/dev/log."
+ fi
+ elog "Note: openssh-6.7 versions no longer support USE=tcpd as upstream has"
+ elog " dropped it. Make sure to update any configs that you might have."
+}
diff --git a/net-misc/openssh/openssh-6.7_p1.ebuild b/net-misc/openssh/openssh-6.7_p1.ebuild
new file mode 100644
index 000000000000..b6b44a3f1768
--- /dev/null
+++ b/net-misc/openssh/openssh-6.7_p1.ebuild
@@ -0,0 +1,323 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit eutils user flag-o-matic multilib autotools pam systemd versionator
+
+# Make it more portable between straight releases
+# and _p? releases.
+PARCH=${P/_}
+
+HPN_PATCH="${PN}-6.7p1-hpnssh14v5.tar.xz"
+LDAP_PATCH="${PN}-lpk-6.7p1-0.3.14.patch.xz"
+#X509_VER="8.1" X509_PATCH="${PARCH/6.7/6.6}+x509-${X509_VER}.diff.gz"
+
+DESCRIPTION="Port of OpenBSD's free SSH release"
+HOMEPAGE="http://www.openssh.org/"
+SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz
+ mirror://gentoo/${P}-sctp.patch.xz
+ ${HPN_PATCH:+hpn? (
+ mirror://gentoo/${HPN_PATCH}
+ http://dev.gentoo.org/~vapier/dist/${HPN_PATCH}
+ mirror://sourceforge/hpnssh/${HPN_PATCH}
+ )}
+ ${LDAP_PATCH:+ldap? ( mirror://gentoo/${LDAP_PATCH} )}
+ ${X509_PATCH:+X509? ( http://roumenpetrov.info/openssh/x509-${X509_VER}/${X509_PATCH} )}
+ "
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="bindist ${HPN_PATCH:++}hpn kerberos ldap ldns libedit pam +pie sctp selinux skey static X X509"
+REQUIRED_USE="pie? ( !static )"
+
+LIB_DEPEND="sctp? ( net-misc/lksctp-tools[static-libs(+)] )
+ selinux? ( >=sys-libs/libselinux-1.28[static-libs(+)] )
+ skey? ( >=sys-auth/skey-1.1.5-r1[static-libs(+)] )
+ libedit? ( dev-libs/libedit[static-libs(+)] )
+ >=dev-libs/openssl-0.9.6d:0[bindist=]
+ dev-libs/openssl[static-libs(+)]
+ >=sys-libs/zlib-1.2.3[static-libs(+)]"
+RDEPEND="
+ !static? (
+ ${LIB_DEPEND//\[static-libs(+)]}
+ ldns? (
+ !bindist? ( net-libs/ldns[ecdsa,ssl] )
+ bindist? ( net-libs/ldns[-ecdsa,ssl] )
+ )
+ )
+ pam? ( virtual/pam )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )"
+DEPEND="${RDEPEND}
+ static? (
+ ${LIB_DEPEND}
+ ldns? (
+ !bindist? ( net-libs/ldns[ecdsa,ssl,static-libs(+)] )
+ bindist? ( net-libs/ldns[-ecdsa,ssl,static-libs(+)] )
+ )
+ )
+ virtual/pkgconfig
+ virtual/os-headers
+ sys-devel/autoconf"
+RDEPEND="${RDEPEND}
+ pam? ( >=sys-auth/pambase-20081028 )
+ userland_GNU? ( virtual/shadow )
+ X? ( x11-apps/xauth )"
+
+S=${WORKDIR}/${PARCH}
+
+pkg_setup() {
+ # this sucks, but i'd rather have people unable to `emerge -u openssh`
+ # than not be able to log in to their server any more
+ maybe_fail() { [[ -z ${!2} ]] && echo "$1" ; }
+ local fail="
+ $(use X509 && maybe_fail X509 X509_PATCH)
+ $(use ldap && maybe_fail ldap LDAP_PATCH)
+ $(use hpn && maybe_fail hpn HPN_PATCH)
+ "
+ fail=$(echo ${fail})
+ if [[ -n ${fail} ]] ; then
+ eerror "Sorry, but this version does not yet support features"
+ eerror "that you requested: ${fail}"
+ eerror "Please mask ${PF} for now and check back later:"
+ eerror " # echo '=${CATEGORY}/${PF}' >> /etc/portage/package.mask"
+ die "booooo"
+ fi
+}
+
+save_version() {
+ # version.h patch conflict avoidence
+ mv version.h version.h.$1
+ cp -f version.h.pristine version.h
+}
+
+src_prepare() {
+ sed -i \
+ -e "/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:${EPREFIX}/usr/bin/xauth:" \
+ pathnames.h || die
+ # keep this as we need it to avoid the conflict between LPK and HPN changing
+ # this file.
+ cp version.h version.h.pristine
+
+ # don't break .ssh/authorized_keys2 for fun
+ sed -i '/^AuthorizedKeysFile/s:^:#:' sshd_config || die
+
+ epatch "${FILESDIR}"/${PN}-6.7_p1-sshd-gssapi-multihomed.patch #378361
+ if use X509 ; then
+ pushd .. >/dev/null
+ epatch "${FILESDIR}"/${PN}-6.6.1_p1-x509-glue.patch
+ use hpn && epatch "${FILESDIR}"/${PN}-6.6.1_p1-x509-hpn14v5-glue.patch
+ popd >/dev/null
+ epatch "${WORKDIR}"/${X509_PATCH%.*}
+ epatch "${FILESDIR}"/${PN}-6.3_p1-x509-hpn14v2-glue.patch
+ save_version X509
+ fi
+ if ! use X509 ; then
+ if [[ -n ${LDAP_PATCH} ]] && use ldap ; then
+ epatch "${WORKDIR}"/${LDAP_PATCH%.*}
+ save_version LPK
+ fi
+ else
+ use ldap && ewarn "Sorry, X509 and LDAP conflict internally, disabling LDAP"
+ fi
+ epatch "${FILESDIR}"/${PN}-4.7_p1-GSSAPI-dns.patch #165444 integrated into gsskex
+ epatch "${FILESDIR}"/${PN}-6.7_p1-openssl-ignore-status.patch
+ epatch "${WORKDIR}"/${PN}-6.7_p1-sctp.patch
+ if [[ -n ${HPN_PATCH} ]] && use hpn; then
+ epatch "${WORKDIR}"/${HPN_PATCH%.*}/*
+ save_version HPN
+ fi
+
+ tc-export PKG_CONFIG
+ local sed_args=(
+ -e "s:-lcrypto:$(${PKG_CONFIG} --libs openssl):"
+ # Disable PATH reset, trust what portage gives us #254615
+ -e 's:^PATH=/:#PATH=/:'
+ # Disable fortify flags ... our gcc does this for us
+ -e 's:-D_FORTIFY_SOURCE=2::'
+ )
+ # The -ftrapv flag ICEs on hppa #505182
+ use hppa && sed_args+=(
+ -e '/CFLAGS/s:-ftrapv:-fdisable-this-test:'
+ -e '/OSSH_CHECK_CFLAG_LINK.*-ftrapv/d'
+ )
+ sed -i "${sed_args[@]}" configure{.ac,} || die
+
+ epatch_user #473004
+
+ # Now we can build a sane merged version.h
+ (
+ sed '/^#define SSH_RELEASE/d' version.h.* | sort -u
+ macros=()
+ for p in HPN LPK X509 ; do [ -e version.h.${p} ] && macros+=( SSH_${p} ) ; done
+ printf '#define SSH_RELEASE SSH_VERSION SSH_PORTABLE %s\n' "${macros}"
+ ) > version.h
+
+ eautoreconf
+}
+
+static_use_with() {
+ local flag=$1
+ if use static && use ${flag} ; then
+ ewarn "Disabling '${flag}' support because of USE='static'"
+ # rebuild args so that we invert the first one (USE flag)
+ # but otherwise leave everything else working so we can
+ # just leverage use_with
+ shift
+ [[ -z $1 ]] && flag="${flag} ${flag}"
+ set -- !${flag} "$@"
+ fi
+ use_with "$@"
+}
+
+src_configure() {
+ local myconf=()
+ addwrite /dev/ptmx
+ addpredict /etc/skey/skeykeys #skey configure code triggers this
+
+ use static && append-ldflags -static
+
+ # Special settings for Gentoo/FreeBSD 9.0 or later (see bug #391011)
+ if use elibc_FreeBSD && version_is_at_least 9.0 "$(uname -r|sed 's/\(.\..\).*/\1/')" ; then
+ myconf+=( --disable-utmp --disable-wtmp --disable-wtmpx )
+ append-ldflags -lutil
+ fi
+
+ econf \
+ --with-ldflags="${LDFLAGS}" \
+ --disable-strip \
+ --with-pid-dir="${EPREFIX}"/var/run \
+ --sysconfdir="${EPREFIX}"/etc/ssh \
+ --libexecdir="${EPREFIX}"/usr/$(get_libdir)/misc \
+ --datadir="${EPREFIX}"/usr/share/openssh \
+ --with-privsep-path="${EPREFIX}"/var/empty \
+ --with-privsep-user=sshd \
+ --with-md5-passwords \
+ --with-ssl-engine \
+ $(static_use_with pam) \
+ $(static_use_with kerberos kerberos5 "${EPREFIX}"/usr) \
+ ${LDAP_PATCH:+$(use X509 || ( use ldap && use_with ldap ))} \
+ $(use_with ldns) \
+ $(use_with libedit) \
+ $(use_with pie) \
+ $(use_with sctp) \
+ $(use_with selinux) \
+ $(use_with skey) \
+ "${myconf[@]}"
+}
+
+src_install() {
+ emake install-nokeys DESTDIR="${D}"
+ fperms 600 /etc/ssh/sshd_config
+ dobin contrib/ssh-copy-id
+ newinitd "${FILESDIR}"/sshd.rc6.4 sshd
+ newconfd "${FILESDIR}"/sshd.confd sshd
+ keepdir /var/empty
+
+ # not all openssl installs support ecc, or are functional #352645
+ if ! grep -q '#define OPENSSL_HAS_ECC 1' config.h ; then
+ elog "dev-libs/openssl was built with 'bindist' - disabling ecdsa support"
+ sed -i 's:&& gen_key ecdsa::' "${ED}"/etc/init.d/sshd || die
+ fi
+
+ newpamd "${FILESDIR}"/sshd.pam_include.2 sshd
+ if use pam ; then
+ sed -i \
+ -e "/^#UsePAM /s:.*:UsePAM yes:" \
+ -e "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" \
+ -e "/^#PrintMotd /s:.*:PrintMotd no:" \
+ -e "/^#PrintLastLog /s:.*:PrintLastLog no:" \
+ "${ED}"/etc/ssh/sshd_config || die "sed of configuration file failed"
+ fi
+
+ # Gentoo tweaks to default config files
+ cat <<-EOF >> "${ED}"/etc/ssh/sshd_config
+
+ # Allow client to pass locale environment variables #367017
+ AcceptEnv LANG LC_*
+ EOF
+ cat <<-EOF >> "${ED}"/etc/ssh/ssh_config
+
+ # Send locale environment variables #367017
+ SendEnv LANG LC_*
+ EOF
+
+ # This instruction is from the HPN webpage,
+ # Used for the server logging functionality
+ if [[ -n ${HPN_PATCH} ]] && use hpn ; then
+ keepdir /var/empty/dev
+ fi
+
+ if ! use X509 && [[ -n ${LDAP_PATCH} ]] && use ldap ; then
+ insinto /etc/openldap/schema/
+ newins openssh-lpk_openldap.schema openssh-lpk.schema
+ fi
+
+ doman contrib/ssh-copy-id.1
+ dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
+
+ diropts -m 0700
+ dodir /etc/skel/.ssh
+
+ systemd_dounit "${FILESDIR}"/sshd.{service,socket}
+ systemd_newunit "${FILESDIR}"/sshd_at.service 'sshd@.service'
+}
+
+src_test() {
+ local t tests skipped failed passed shell
+ tests="interop-tests compat-tests"
+ skipped=""
+ shell=$(egetshell ${UID})
+ if [[ ${shell} == */nologin ]] || [[ ${shell} == */false ]] ; then
+ elog "Running the full OpenSSH testsuite"
+ elog "requires a usable shell for the 'portage'"
+ elog "user, so we will run a subset only."
+ skipped="${skipped} tests"
+ else
+ tests="${tests} tests"
+ fi
+ # It will also attempt to write to the homedir .ssh
+ local sshhome=${T}/homedir
+ mkdir -p "${sshhome}"/.ssh
+ for t in ${tests} ; do
+ # Some tests read from stdin ...
+ HOMEDIR="${sshhome}" \
+ emake -k -j1 ${t} </dev/null \
+ && passed="${passed}${t} " \
+ || failed="${failed}${t} "
+ done
+ einfo "Passed tests: ${passed}"
+ ewarn "Skipped tests: ${skipped}"
+ if [[ -n ${failed} ]] ; then
+ ewarn "Failed tests: ${failed}"
+ die "Some tests failed: ${failed}"
+ else
+ einfo "Failed tests: ${failed}"
+ return 0
+ fi
+}
+
+pkg_preinst() {
+ enewgroup sshd 22
+ enewuser sshd 22 -1 /var/empty sshd
+}
+
+pkg_postinst() {
+ if has_version "<${CATEGORY}/${PN}-5.8_p1" ; then
+ elog "Starting with openssh-5.8p1, the server will default to a newer key"
+ elog "algorithm (ECDSA). You are encouraged to manually update your stored"
+ elog "keys list as servers update theirs. See ssh-keyscan(1) for more info."
+ fi
+ ewarn "Remember to merge your config files in /etc/ssh/ and then"
+ ewarn "reload sshd: '/etc/init.d/sshd reload'."
+ # This instruction is from the HPN webpage,
+ # Used for the server logging functionality
+ if [[ -n ${HPN_PATCH} ]] && use hpn ; then
+ einfo "For the HPN server logging patch, you must ensure that"
+ einfo "your syslog application also listens at /var/empty/dev/log."
+ fi
+ elog "Note: openssh-6.7 versions no longer support USE=tcpd as upstream has"
+ elog " dropped it. Make sure to update any configs that you might have."
+}
diff --git a/net-misc/openssh/openssh-6.8_p1-r5.ebuild b/net-misc/openssh/openssh-6.8_p1-r5.ebuild
new file mode 100644
index 000000000000..532c18893e62
--- /dev/null
+++ b/net-misc/openssh/openssh-6.8_p1-r5.ebuild
@@ -0,0 +1,332 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit eutils user flag-o-matic multilib autotools pam systemd versionator
+
+# Make it more portable between straight releases
+# and _p? releases.
+PARCH=${P/_}
+
+HPN_PATCH="${PN}-6.8p1-r5-hpnssh14v5.tar.xz"
+LDAP_PATCH="${PN}-lpk-6.8p1-0.3.14.patch.xz"
+X509_VER="8.3.1" X509_PATCH="${PARCH}+x509-${X509_VER}.diff.gz"
+
+DESCRIPTION="Port of OpenBSD's free SSH release"
+HOMEPAGE="http://www.openssh.org/"
+SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz
+ mirror://gentoo/${P}-sctp.patch.xz
+ ${HPN_PATCH:+hpn? (
+ mirror://gentoo/${HPN_PATCH}
+ http://dev.gentoo.org/~vapier/dist/${HPN_PATCH}
+ mirror://sourceforge/hpnssh/${HPN_PATCH}
+ )}
+ ${LDAP_PATCH:+ldap? ( mirror://gentoo/${LDAP_PATCH} )}
+ ${X509_PATCH:+X509? (
+ http://roumenpetrov.info/openssh/x509-${X509_VER}/${X509_PATCH}
+ mirror://gentoo/${P}-x509-${X509_VER}-glue.patch.xz
+ )}
+ "
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+# Probably want to drop ssh1/ssl defaulting to on in a future version.
+IUSE="bindist debug ${HPN_PATCH:++}hpn kerberos kernel_linux ldap ldns libedit pam +pie sctp selinux skey +ssh1 +ssl static X X509"
+REQUIRED_USE="pie? ( !static )
+ ssh1? ( ssl )
+ static? ( !kerberos !pam )
+ X509? ( !ldap ssl )"
+
+LIB_DEPEND="sctp? ( net-misc/lksctp-tools[static-libs(+)] )
+ selinux? ( >=sys-libs/libselinux-1.28[static-libs(+)] )
+ skey? ( >=sys-auth/skey-1.1.5-r1[static-libs(+)] )
+ libedit? ( dev-libs/libedit[static-libs(+)] )
+ ssl? (
+ >=dev-libs/openssl-0.9.6d:0[bindist=]
+ dev-libs/openssl[static-libs(+)]
+ )
+ >=sys-libs/zlib-1.2.3[static-libs(+)]"
+RDEPEND="
+ !static? (
+ ${LIB_DEPEND//\[static-libs(+)]}
+ ldns? (
+ !bindist? ( net-libs/ldns[ecdsa,ssl] )
+ bindist? ( net-libs/ldns[-ecdsa,ssl] )
+ )
+ )
+ pam? ( virtual/pam )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )"
+DEPEND="${RDEPEND}
+ static? (
+ ${LIB_DEPEND}
+ ldns? (
+ !bindist? ( net-libs/ldns[ecdsa,ssl,static-libs(+)] )
+ bindist? ( net-libs/ldns[-ecdsa,ssl,static-libs(+)] )
+ )
+ )
+ virtual/pkgconfig
+ virtual/os-headers
+ sys-devel/autoconf"
+RDEPEND="${RDEPEND}
+ pam? ( >=sys-auth/pambase-20081028 )
+ userland_GNU? ( virtual/shadow )
+ X? ( x11-apps/xauth )"
+
+S=${WORKDIR}/${PARCH}
+
+pkg_setup() {
+ # this sucks, but i'd rather have people unable to `emerge -u openssh`
+ # than not be able to log in to their server any more
+ maybe_fail() { [[ -z ${!2} ]] && echo "$1" ; }
+ local fail="
+ $(use X509 && maybe_fail X509 X509_PATCH)
+ $(use ldap && maybe_fail ldap LDAP_PATCH)
+ $(use hpn && maybe_fail hpn HPN_PATCH)
+ "
+ fail=$(echo ${fail})
+ if [[ -n ${fail} ]] ; then
+ eerror "Sorry, but this version does not yet support features"
+ eerror "that you requested: ${fail}"
+ eerror "Please mask ${PF} for now and check back later:"
+ eerror " # echo '=${CATEGORY}/${PF}' >> /etc/portage/package.mask"
+ die "booooo"
+ fi
+
+ # Make sure people who are using tcp wrappers are notified of its removal. #531156
+ if grep -qs '^ *sshd *:' "${EROOT}"/etc/hosts.{allow,deny} ; then
+ eerror "Sorry, but openssh no longer supports tcp-wrappers, and it seems like"
+ eerror "you're trying to use it. Update your ${EROOT}etc/hosts.{allow,deny} please."
+ die "USE=tcpd no longer works"
+ fi
+}
+
+save_version() {
+ # version.h patch conflict avoidence
+ mv version.h version.h.$1
+ cp -f version.h.pristine version.h
+}
+
+src_prepare() {
+ sed -i \
+ -e "/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:${EPREFIX}/usr/bin/xauth:" \
+ pathnames.h || die
+ # keep this as we need it to avoid the conflict between LPK and HPN changing
+ # this file.
+ cp version.h version.h.pristine
+
+ # don't break .ssh/authorized_keys2 for fun
+ sed -i '/^AuthorizedKeysFile/s:^:#:' sshd_config || die
+
+ epatch "${FILESDIR}"/${PN}-6.8_p1-sshd-gssapi-multihomed.patch #378361
+ if use X509 ; then
+ pushd .. >/dev/null
+ epatch "${WORKDIR}"/${P}-x509-${X509_VER}-glue.patch
+ epatch "${FILESDIR}"/${P}-sctp-x509-glue.patch
+ popd >/dev/null
+ epatch "${WORKDIR}"/${X509_PATCH%.*}
+ epatch "${FILESDIR}"/${PN}-6.3_p1-x509-hpn14v2-glue.patch
+ save_version X509
+ fi
+ if use ldap ; then
+ epatch "${WORKDIR}"/${LDAP_PATCH%.*}
+ save_version LPK
+ fi
+ epatch "${FILESDIR}"/${PN}-4.7_p1-GSSAPI-dns.patch #165444 integrated into gsskex
+ epatch "${FILESDIR}"/${PN}-6.7_p1-openssl-ignore-status.patch
+ epatch "${FILESDIR}"/${PN}-6.8_p1-ssh-keygen-no-ssh1.patch #544078
+ epatch "${FILESDIR}"/${PN}-6.8_p1-teraterm.patch #547944
+ # The X509 patchset fixes this independently.
+ use X509 || epatch "${FILESDIR}"/${PN}-6.8_p1-ssl-engine-configure.patch
+ epatch "${WORKDIR}"/${P}-sctp.patch
+ if use hpn ; then
+ # The teraterm patch pulled in an upstream update.
+ pushd "${WORKDIR}"/${HPN_PATCH%.*.*} >/dev/null
+ epatch "${FILESDIR}"/${PN}-6.8_p1-teraterm-hpn-glue.patch
+ popd >/dev/null
+ EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
+ EPATCH_MULTI_MSG="Applying HPN patchset ..." \
+ epatch "${WORKDIR}"/${HPN_PATCH%.*.*}
+ save_version HPN
+ fi
+
+ tc-export PKG_CONFIG
+ local sed_args=(
+ -e "s:-lcrypto:$(${PKG_CONFIG} --libs openssl):"
+ # Disable PATH reset, trust what portage gives us #254615
+ -e 's:^PATH=/:#PATH=/:'
+ # Disable fortify flags ... our gcc does this for us
+ -e 's:-D_FORTIFY_SOURCE=2::'
+ )
+ # The -ftrapv flag ICEs on hppa #505182
+ use hppa && sed_args+=(
+ -e '/CFLAGS/s:-ftrapv:-fdisable-this-test:'
+ -e '/OSSH_CHECK_CFLAG_LINK.*-ftrapv/d'
+ )
+ sed -i "${sed_args[@]}" configure{.ac,} || die
+
+ epatch_user #473004
+
+ # Now we can build a sane merged version.h
+ (
+ sed '/^#define SSH_RELEASE/d' version.h.* | sort -u
+ macros=()
+ for p in HPN LPK X509 ; do [ -e version.h.${p} ] && macros+=( SSH_${p} ) ; done
+ printf '#define SSH_RELEASE SSH_VERSION SSH_PORTABLE %s\n' "${macros}"
+ ) > version.h
+
+ eautoreconf
+}
+
+src_configure() {
+ addwrite /dev/ptmx
+ addpredict /etc/skey/skeykeys # skey configure code triggers this
+
+ use debug && append-cppflags -DSANDBOX_SECCOMP_FILTER_DEBUG
+ use static && append-ldflags -static
+
+ local myconf=(
+ --with-ldflags="${LDFLAGS}"
+ --disable-strip
+ --with-pid-dir="${EPREFIX}"$(usex kernel_linux '' '/var')/run
+ --sysconfdir="${EPREFIX}"/etc/ssh
+ --libexecdir="${EPREFIX}"/usr/$(get_libdir)/misc
+ --datadir="${EPREFIX}"/usr/share/openssh
+ --with-privsep-path="${EPREFIX}"/var/empty
+ --with-privsep-user=sshd
+ $(use_with kerberos kerberos5 "${EPREFIX}"/usr)
+ # We apply the ldap patch conditionally, so can't pass --without-ldap
+ # unconditionally else we get unknown flag warnings.
+ $(use ldap && use_with ldap)
+ $(use_with ldns)
+ $(use_with libedit)
+ $(use_with pam)
+ $(use_with pie)
+ $(use_with sctp)
+ $(use_with selinux)
+ $(use_with skey)
+ $(use_with ssh1)
+ # The X509 patch deletes this option entirely.
+ $(use X509 || use_with ssl openssl)
+ $(use_with ssl md5-passwords)
+ $(use_with ssl ssl-engine)
+ )
+
+ # Special settings for Gentoo/FreeBSD 9.0 or later (see bug #391011)
+ if use elibc_FreeBSD && version_is_at_least 9.0 "$(uname -r|sed 's/\(.\..\).*/\1/')" ; then
+ myconf+=( --disable-utmp --disable-wtmp --disable-wtmpx )
+ append-ldflags -lutil
+ fi
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ emake install-nokeys DESTDIR="${D}"
+ fperms 600 /etc/ssh/sshd_config
+ dobin contrib/ssh-copy-id
+ newinitd "${FILESDIR}"/sshd.rc6.4 sshd
+ newconfd "${FILESDIR}"/sshd.confd sshd
+ keepdir /var/empty
+
+ newpamd "${FILESDIR}"/sshd.pam_include.2 sshd
+ if use pam ; then
+ sed -i \
+ -e "/^#UsePAM /s:.*:UsePAM yes:" \
+ -e "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" \
+ -e "/^#PrintMotd /s:.*:PrintMotd no:" \
+ -e "/^#PrintLastLog /s:.*:PrintLastLog no:" \
+ "${ED}"/etc/ssh/sshd_config || die
+ fi
+
+ # Gentoo tweaks to default config files
+ cat <<-EOF >> "${ED}"/etc/ssh/sshd_config
+
+ # Allow client to pass locale environment variables #367017
+ AcceptEnv LANG LC_*
+ EOF
+ cat <<-EOF >> "${ED}"/etc/ssh/ssh_config
+
+ # Send locale environment variables #367017
+ SendEnv LANG LC_*
+ EOF
+
+ # This instruction is from the HPN webpage,
+ # Used for the server logging functionality
+ if [[ -n ${HPN_PATCH} ]] && use hpn ; then
+ keepdir /var/empty/dev
+ fi
+
+ if ! use X509 && [[ -n ${LDAP_PATCH} ]] && use ldap ; then
+ insinto /etc/openldap/schema/
+ newins openssh-lpk_openldap.schema openssh-lpk.schema
+ fi
+
+ doman contrib/ssh-copy-id.1
+ dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
+
+ diropts -m 0700
+ dodir /etc/skel/.ssh
+
+ systemd_dounit "${FILESDIR}"/sshd.{service,socket}
+ systemd_newunit "${FILESDIR}"/sshd_at.service 'sshd@.service'
+}
+
+src_test() {
+ local t tests skipped failed passed shell
+ tests="interop-tests compat-tests"
+ skipped=""
+ shell=$(egetshell ${UID})
+ if [[ ${shell} == */nologin ]] || [[ ${shell} == */false ]] ; then
+ elog "Running the full OpenSSH testsuite"
+ elog "requires a usable shell for the 'portage'"
+ elog "user, so we will run a subset only."
+ skipped="${skipped} tests"
+ else
+ tests="${tests} tests"
+ fi
+ # It will also attempt to write to the homedir .ssh
+ local sshhome=${T}/homedir
+ mkdir -p "${sshhome}"/.ssh
+ for t in ${tests} ; do
+ # Some tests read from stdin ...
+ HOMEDIR="${sshhome}" \
+ emake -k -j1 ${t} </dev/null \
+ && passed="${passed}${t} " \
+ || failed="${failed}${t} "
+ done
+ einfo "Passed tests: ${passed}"
+ ewarn "Skipped tests: ${skipped}"
+ if [[ -n ${failed} ]] ; then
+ ewarn "Failed tests: ${failed}"
+ die "Some tests failed: ${failed}"
+ else
+ einfo "Failed tests: ${failed}"
+ return 0
+ fi
+}
+
+pkg_preinst() {
+ enewgroup sshd 22
+ enewuser sshd 22 -1 /var/empty sshd
+}
+
+pkg_postinst() {
+ if has_version "<${CATEGORY}/${PN}-5.8_p1" ; then
+ elog "Starting with openssh-5.8p1, the server will default to a newer key"
+ elog "algorithm (ECDSA). You are encouraged to manually update your stored"
+ elog "keys list as servers update theirs. See ssh-keyscan(1) for more info."
+ fi
+ ewarn "Remember to merge your config files in /etc/ssh/ and then"
+ ewarn "reload sshd: '/etc/init.d/sshd reload'."
+ # This instruction is from the HPN webpage,
+ # Used for the server logging functionality
+ if [[ -n ${HPN_PATCH} ]] && use hpn ; then
+ einfo "For the HPN server logging patch, you must ensure that"
+ einfo "your syslog application also listens at /var/empty/dev/log."
+ fi
+ elog "Note: openssh-6.7 versions no longer support USE=tcpd as upstream has"
+ elog " dropped it. Make sure to update any configs that you might have."
+}
diff --git a/net-misc/openssh/openssh-6.9_p1-r1.ebuild b/net-misc/openssh/openssh-6.9_p1-r1.ebuild
new file mode 100644
index 000000000000..99d258da53ee
--- /dev/null
+++ b/net-misc/openssh/openssh-6.9_p1-r1.ebuild
@@ -0,0 +1,323 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit eutils user flag-o-matic multilib autotools pam systemd versionator
+
+# Make it more portable between straight releases
+# and _p? releases.
+PARCH=${P/_}
+
+HPN_PATCH="${PN}-6.9p1-hpnssh14v5.tar.xz"
+LDAP_PATCH="${PN}-lpk-6.8p1-0.3.14.patch.xz"
+X509_VER="8.4" X509_PATCH="${PN}-6.9p1+x509-${X509_VER}.diff.gz"
+
+DESCRIPTION="Port of OpenBSD's free SSH release"
+HOMEPAGE="http://www.openssh.org/"
+SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz
+ mirror://gentoo/${PN}-6.8_p1-sctp.patch.xz
+ ${HPN_PATCH:+hpn? (
+ mirror://gentoo/${HPN_PATCH}
+ http://dev.gentoo.org/~polynomial-c/${HPN_PATCH}
+ mirror://sourceforge/hpnssh/${HPN_PATCH}
+ )}
+ ${LDAP_PATCH:+ldap? ( mirror://gentoo/${LDAP_PATCH} )}
+ ${X509_PATCH:+X509? ( http://roumenpetrov.info/openssh/x509-${X509_VER}/${X509_PATCH} )}
+ "
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+# Probably want to drop ssl defaulting to on in a future version.
+IUSE="bindist debug ${HPN_PATCH:++}hpn kerberos kernel_linux ldap ldns libedit pam +pie sctp selinux skey ssh1 +ssl static X X509"
+REQUIRED_USE="pie? ( !static )
+ ssh1? ( ssl )
+ static? ( !kerberos !pam )
+ X509? ( !ldap ssl )"
+
+LIB_DEPEND="sctp? ( net-misc/lksctp-tools[static-libs(+)] )
+ selinux? ( >=sys-libs/libselinux-1.28[static-libs(+)] )
+ skey? ( >=sys-auth/skey-1.1.5-r1[static-libs(+)] )
+ libedit? ( dev-libs/libedit[static-libs(+)] )
+ ssl? (
+ >=dev-libs/openssl-0.9.6d:0[bindist=]
+ dev-libs/openssl[static-libs(+)]
+ )
+ >=sys-libs/zlib-1.2.3[static-libs(+)]"
+RDEPEND="
+ !static? (
+ ${LIB_DEPEND//\[static-libs(+)]}
+ ldns? (
+ !bindist? ( net-libs/ldns[ecdsa,ssl] )
+ bindist? ( net-libs/ldns[-ecdsa,ssl] )
+ )
+ )
+ pam? ( virtual/pam )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )"
+DEPEND="${RDEPEND}
+ static? (
+ ${LIB_DEPEND}
+ ldns? (
+ !bindist? ( net-libs/ldns[ecdsa,ssl,static-libs(+)] )
+ bindist? ( net-libs/ldns[-ecdsa,ssl,static-libs(+)] )
+ )
+ )
+ virtual/pkgconfig
+ virtual/os-headers
+ sys-devel/autoconf"
+RDEPEND="${RDEPEND}
+ pam? ( >=sys-auth/pambase-20081028 )
+ userland_GNU? ( virtual/shadow )
+ X? ( x11-apps/xauth )"
+
+S=${WORKDIR}/${PARCH}
+
+pkg_setup() {
+ # this sucks, but i'd rather have people unable to `emerge -u openssh`
+ # than not be able to log in to their server any more
+ maybe_fail() { [[ -z ${!2} ]] && echo "$1" ; }
+ local fail="
+ $(use X509 && maybe_fail X509 X509_PATCH)
+ $(use ldap && maybe_fail ldap LDAP_PATCH)
+ $(use hpn && maybe_fail hpn HPN_PATCH)
+ "
+ fail=$(echo ${fail})
+ if [[ -n ${fail} ]] ; then
+ eerror "Sorry, but this version does not yet support features"
+ eerror "that you requested: ${fail}"
+ eerror "Please mask ${PF} for now and check back later:"
+ eerror " # echo '=${CATEGORY}/${PF}' >> /etc/portage/package.mask"
+ die "booooo"
+ fi
+
+ # Make sure people who are using tcp wrappers are notified of its removal. #531156
+ if grep -qs '^ *sshd *:' "${EROOT}"/etc/hosts.{allow,deny} ; then
+ eerror "Sorry, but openssh no longer supports tcp-wrappers, and it seems like"
+ eerror "you're trying to use it. Update your ${EROOT}etc/hosts.{allow,deny} please."
+ die "USE=tcpd no longer works"
+ fi
+}
+
+save_version() {
+ # version.h patch conflict avoidence
+ mv version.h version.h.$1
+ cp -f version.h.pristine version.h
+}
+
+src_prepare() {
+ sed -i \
+ -e "/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:${EPREFIX}/usr/bin/xauth:" \
+ pathnames.h || die
+ # keep this as we need it to avoid the conflict between LPK and HPN changing
+ # this file.
+ cp version.h version.h.pristine
+
+ # don't break .ssh/authorized_keys2 for fun
+ sed -i '/^AuthorizedKeysFile/s:^:#:' sshd_config || die
+
+ if use X509 ; then
+ pushd .. >/dev/null
+ #epatch "${WORKDIR}"/${PN}-6.8_p1-x509-${X509_VER}-glue.patch
+ epatch "${FILESDIR}"/${PN}-6.8_p1-sctp-x509-glue.patch
+ popd >/dev/null
+ epatch "${WORKDIR}"/${X509_PATCH%.*}
+ epatch "${FILESDIR}"/${PN}-6.3_p1-x509-hpn14v2-glue.patch
+ epatch "${FILESDIR}"/${PN}-6.9_p1-x509-warnings.patch
+ save_version X509
+ fi
+ if use ldap ; then
+ epatch "${WORKDIR}"/${LDAP_PATCH%.*}
+ save_version LPK
+ fi
+ epatch "${FILESDIR}"/${PN}-4.7_p1-GSSAPI-dns.patch #165444 integrated into gsskex
+ epatch "${FILESDIR}"/${PN}-6.7_p1-openssl-ignore-status.patch
+ # The X509 patchset fixes this independently.
+ use X509 || epatch "${FILESDIR}"/${PN}-6.8_p1-ssl-engine-configure.patch
+ epatch "${WORKDIR}"/${PN}-6.8_p1-sctp.patch
+ if use hpn ; then
+ EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
+ EPATCH_MULTI_MSG="Applying HPN patchset ..." \
+ epatch "${WORKDIR}"/${HPN_PATCH%.*.*}
+ save_version HPN
+ fi
+
+ tc-export PKG_CONFIG
+ local sed_args=(
+ -e "s:-lcrypto:$(${PKG_CONFIG} --libs openssl):"
+ # Disable PATH reset, trust what portage gives us #254615
+ -e 's:^PATH=/:#PATH=/:'
+ # Disable fortify flags ... our gcc does this for us
+ -e 's:-D_FORTIFY_SOURCE=2::'
+ )
+ # The -ftrapv flag ICEs on hppa #505182
+ use hppa && sed_args+=(
+ -e '/CFLAGS/s:-ftrapv:-fdisable-this-test:'
+ -e '/OSSH_CHECK_CFLAG_LINK.*-ftrapv/d'
+ )
+ sed -i "${sed_args[@]}" configure{.ac,} || die
+
+ epatch_user #473004
+
+ # Now we can build a sane merged version.h
+ (
+ sed '/^#define SSH_RELEASE/d' version.h.* | sort -u
+ macros=()
+ for p in HPN LPK X509 ; do [ -e version.h.${p} ] && macros+=( SSH_${p} ) ; done
+ printf '#define SSH_RELEASE SSH_VERSION SSH_PORTABLE %s\n' "${macros}"
+ ) > version.h
+
+ eautoreconf
+}
+
+src_configure() {
+ addwrite /dev/ptmx
+ addpredict /etc/skey/skeykeys # skey configure code triggers this
+
+ use debug && append-cppflags -DSANDBOX_SECCOMP_FILTER_DEBUG
+ use static && append-ldflags -static
+
+ local myconf=(
+ --with-ldflags="${LDFLAGS}"
+ --disable-strip
+ --with-pid-dir="${EPREFIX}"$(usex kernel_linux '' '/var')/run
+ --sysconfdir="${EPREFIX}"/etc/ssh
+ --libexecdir="${EPREFIX}"/usr/$(get_libdir)/misc
+ --datadir="${EPREFIX}"/usr/share/openssh
+ --with-privsep-path="${EPREFIX}"/var/empty
+ --with-privsep-user=sshd
+ $(use_with kerberos kerberos5 "${EPREFIX}"/usr)
+ # We apply the ldap patch conditionally, so can't pass --without-ldap
+ # unconditionally else we get unknown flag warnings.
+ $(use ldap && use_with ldap)
+ $(use_with ldns)
+ $(use_with libedit)
+ $(use_with pam)
+ $(use_with pie)
+ $(use_with sctp)
+ $(use_with selinux)
+ $(use_with skey)
+ $(use_with ssh1)
+ # The X509 patch deletes this option entirely.
+ $(use X509 || use_with ssl openssl)
+ $(use_with ssl md5-passwords)
+ $(use_with ssl ssl-engine)
+ )
+
+ # Special settings for Gentoo/FreeBSD 9.0 or later (see bug #391011)
+ if use elibc_FreeBSD && version_is_at_least 9.0 "$(uname -r|sed 's/\(.\..\).*/\1/')" ; then
+ myconf+=( --disable-utmp --disable-wtmp --disable-wtmpx )
+ append-ldflags -lutil
+ fi
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ emake install-nokeys DESTDIR="${D}"
+ fperms 600 /etc/ssh/sshd_config
+ dobin contrib/ssh-copy-id
+ newinitd "${FILESDIR}"/sshd.rc6.4 sshd
+ newconfd "${FILESDIR}"/sshd.confd sshd
+ keepdir /var/empty
+
+ newpamd "${FILESDIR}"/sshd.pam_include.2 sshd
+ if use pam ; then
+ sed -i \
+ -e "/^#UsePAM /s:.*:UsePAM yes:" \
+ -e "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" \
+ -e "/^#PrintMotd /s:.*:PrintMotd no:" \
+ -e "/^#PrintLastLog /s:.*:PrintLastLog no:" \
+ "${ED}"/etc/ssh/sshd_config || die
+ fi
+
+ # Gentoo tweaks to default config files
+ cat <<-EOF >> "${ED}"/etc/ssh/sshd_config
+
+ # Allow client to pass locale environment variables #367017
+ AcceptEnv LANG LC_*
+ EOF
+ cat <<-EOF >> "${ED}"/etc/ssh/ssh_config
+
+ # Send locale environment variables #367017
+ SendEnv LANG LC_*
+ EOF
+
+ # This instruction is from the HPN webpage,
+ # Used for the server logging functionality
+ if [[ -n ${HPN_PATCH} ]] && use hpn ; then
+ keepdir /var/empty/dev
+ fi
+
+ if ! use X509 && [[ -n ${LDAP_PATCH} ]] && use ldap ; then
+ insinto /etc/openldap/schema/
+ newins openssh-lpk_openldap.schema openssh-lpk.schema
+ fi
+
+ doman contrib/ssh-copy-id.1
+ dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
+
+ diropts -m 0700
+ dodir /etc/skel/.ssh
+
+ systemd_dounit "${FILESDIR}"/sshd.{service,socket}
+ systemd_newunit "${FILESDIR}"/sshd_at.service 'sshd@.service'
+}
+
+src_test() {
+ local t tests skipped failed passed shell
+ tests="interop-tests compat-tests"
+ skipped=""
+ shell=$(egetshell ${UID})
+ if [[ ${shell} == */nologin ]] || [[ ${shell} == */false ]] ; then
+ elog "Running the full OpenSSH testsuite"
+ elog "requires a usable shell for the 'portage'"
+ elog "user, so we will run a subset only."
+ skipped="${skipped} tests"
+ else
+ tests="${tests} tests"
+ fi
+ # It will also attempt to write to the homedir .ssh
+ local sshhome=${T}/homedir
+ mkdir -p "${sshhome}"/.ssh
+ for t in ${tests} ; do
+ # Some tests read from stdin ...
+ HOMEDIR="${sshhome}" \
+ emake -k -j1 ${t} </dev/null \
+ && passed="${passed}${t} " \
+ || failed="${failed}${t} "
+ done
+ einfo "Passed tests: ${passed}"
+ ewarn "Skipped tests: ${skipped}"
+ if [[ -n ${failed} ]] ; then
+ ewarn "Failed tests: ${failed}"
+ die "Some tests failed: ${failed}"
+ else
+ einfo "Failed tests: ${failed}"
+ return 0
+ fi
+}
+
+pkg_preinst() {
+ enewgroup sshd 22
+ enewuser sshd 22 -1 /var/empty sshd
+}
+
+pkg_postinst() {
+ if has_version "<${CATEGORY}/${PN}-5.8_p1" ; then
+ elog "Starting with openssh-5.8p1, the server will default to a newer key"
+ elog "algorithm (ECDSA). You are encouraged to manually update your stored"
+ elog "keys list as servers update theirs. See ssh-keyscan(1) for more info."
+ fi
+ ewarn "Remember to merge your config files in /etc/ssh/ and then"
+ ewarn "reload sshd: '/etc/init.d/sshd reload'."
+ # This instruction is from the HPN webpage,
+ # Used for the server logging functionality
+ if [[ -n ${HPN_PATCH} ]] && use hpn ; then
+ einfo "For the HPN server logging patch, you must ensure that"
+ einfo "your syslog application also listens at /var/empty/dev/log."
+ fi
+ elog "Note: openssh-6.7 versions no longer support USE=tcpd as upstream has"
+ elog " dropped it. Make sure to update any configs that you might have."
+}
diff --git a/net-misc/openssh/openssh-6.9_p1-r2.ebuild b/net-misc/openssh/openssh-6.9_p1-r2.ebuild
new file mode 100644
index 000000000000..fe41c28bf472
--- /dev/null
+++ b/net-misc/openssh/openssh-6.9_p1-r2.ebuild
@@ -0,0 +1,312 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit eutils user flag-o-matic multilib autotools pam systemd versionator
+
+# Make it more portable between straight releases
+# and _p? releases.
+PARCH=${P/_}
+
+HPN_PATCH="${PN}-6.9p1-r1-hpnssh14v5.tar.xz"
+LDAP_PATCH="${PN}-lpk-6.8p1-0.3.14.patch.xz"
+X509_VER="8.4" X509_PATCH="${PN}-6.9p1+x509-${X509_VER}.diff.gz"
+
+DESCRIPTION="Port of OpenBSD's free SSH release"
+HOMEPAGE="http://www.openssh.org/"
+SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz
+ mirror://gentoo/${PN}-6.8_p1-sctp.patch.xz
+ ${HPN_PATCH:+hpn? (
+ mirror://gentoo/${HPN_PATCH}
+ http://dev.gentoo.org/~polynomial-c/${HPN_PATCH}
+ mirror://sourceforge/hpnssh/${HPN_PATCH}
+ )}
+ ${LDAP_PATCH:+ldap? ( mirror://gentoo/${LDAP_PATCH} )}
+ ${X509_PATCH:+X509? ( http://roumenpetrov.info/openssh/x509-${X509_VER}/${X509_PATCH} )}
+ "
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+# Probably want to drop ssl defaulting to on in a future version.
+IUSE="bindist debug ${HPN_PATCH:++}hpn kerberos kernel_linux ldap ldns libedit pam +pie sctp selinux skey ssh1 +ssl static X X509"
+REQUIRED_USE="ldns? ( ssl )
+ pie? ( !static )
+ ssh1? ( ssl )
+ static? ( !kerberos !pam )
+ X509? ( !ldap ssl )"
+
+LIB_DEPEND="
+ ldns? (
+ net-libs/ldns[static-libs(+)]
+ !bindist? ( net-libs/ldns[ecdsa,ssl] )
+ bindist? ( net-libs/ldns[-ecdsa,ssl] )
+ )
+ libedit? ( dev-libs/libedit[static-libs(+)] )
+ sctp? ( net-misc/lksctp-tools[static-libs(+)] )
+ selinux? ( >=sys-libs/libselinux-1.28[static-libs(+)] )
+ skey? ( >=sys-auth/skey-1.1.5-r1[static-libs(+)] )
+ ssl? (
+ >=dev-libs/openssl-0.9.6d:0[bindist=]
+ dev-libs/openssl[static-libs(+)]
+ )
+ >=sys-libs/zlib-1.2.3[static-libs(+)]"
+RDEPEND="
+ !static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ pam? ( virtual/pam )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+ virtual/pkgconfig
+ virtual/os-headers
+ sys-devel/autoconf"
+RDEPEND="${RDEPEND}
+ pam? ( >=sys-auth/pambase-20081028 )
+ userland_GNU? ( virtual/shadow )
+ X? ( x11-apps/xauth )"
+
+S=${WORKDIR}/${PARCH}
+
+pkg_setup() {
+ # this sucks, but i'd rather have people unable to `emerge -u openssh`
+ # than not be able to log in to their server any more
+ maybe_fail() { [[ -z ${!2} ]] && echo "$1" ; }
+ local fail="
+ $(use X509 && maybe_fail X509 X509_PATCH)
+ $(use ldap && maybe_fail ldap LDAP_PATCH)
+ $(use hpn && maybe_fail hpn HPN_PATCH)
+ "
+ fail=$(echo ${fail})
+ if [[ -n ${fail} ]] ; then
+ eerror "Sorry, but this version does not yet support features"
+ eerror "that you requested: ${fail}"
+ eerror "Please mask ${PF} for now and check back later:"
+ eerror " # echo '=${CATEGORY}/${PF}' >> /etc/portage/package.mask"
+ die "booooo"
+ fi
+
+ # Make sure people who are using tcp wrappers are notified of its removal. #531156
+ if grep -qs '^ *sshd *:' "${EROOT}"/etc/hosts.{allow,deny} ; then
+ eerror "Sorry, but openssh no longer supports tcp-wrappers, and it seems like"
+ eerror "you're trying to use it. Update your ${EROOT}etc/hosts.{allow,deny} please."
+ die "USE=tcpd no longer works"
+ fi
+}
+
+save_version() {
+ # version.h patch conflict avoidence
+ mv version.h version.h.$1
+ cp -f version.h.pristine version.h
+}
+
+src_prepare() {
+ sed -i \
+ -e "/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:${EPREFIX}/usr/bin/xauth:" \
+ pathnames.h || die
+ # keep this as we need it to avoid the conflict between LPK and HPN changing
+ # this file.
+ cp version.h version.h.pristine
+
+ # don't break .ssh/authorized_keys2 for fun
+ sed -i '/^AuthorizedKeysFile/s:^:#:' sshd_config || die
+
+ if use X509 ; then
+ pushd .. >/dev/null
+ #epatch "${WORKDIR}"/${PN}-6.8_p1-x509-${X509_VER}-glue.patch
+ epatch "${FILESDIR}"/${PN}-6.8_p1-sctp-x509-glue.patch
+ popd >/dev/null
+ epatch "${WORKDIR}"/${X509_PATCH%.*}
+ epatch "${FILESDIR}"/${PN}-6.3_p1-x509-hpn14v2-glue.patch
+ epatch "${FILESDIR}"/${PN}-6.9_p1-x509-warnings.patch
+ save_version X509
+ fi
+ if use ldap ; then
+ epatch "${WORKDIR}"/${LDAP_PATCH%.*}
+ save_version LPK
+ fi
+ epatch "${FILESDIR}"/${PN}-4.7_p1-GSSAPI-dns.patch #165444 integrated into gsskex
+ epatch "${FILESDIR}"/${PN}-6.7_p1-openssl-ignore-status.patch
+ # The X509 patchset fixes this independently.
+ use X509 || epatch "${FILESDIR}"/${PN}-6.8_p1-ssl-engine-configure.patch
+ epatch "${WORKDIR}"/${PN}-6.8_p1-sctp.patch
+ if use hpn ; then
+ EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
+ EPATCH_MULTI_MSG="Applying HPN patchset ..." \
+ epatch "${WORKDIR}"/${HPN_PATCH%.*.*}
+ save_version HPN
+ fi
+
+ tc-export PKG_CONFIG
+ local sed_args=(
+ -e "s:-lcrypto:$(${PKG_CONFIG} --libs openssl):"
+ # Disable PATH reset, trust what portage gives us #254615
+ -e 's:^PATH=/:#PATH=/:'
+ # Disable fortify flags ... our gcc does this for us
+ -e 's:-D_FORTIFY_SOURCE=2::'
+ )
+ # The -ftrapv flag ICEs on hppa #505182
+ use hppa && sed_args+=(
+ -e '/CFLAGS/s:-ftrapv:-fdisable-this-test:'
+ -e '/OSSH_CHECK_CFLAG_LINK.*-ftrapv/d'
+ )
+ sed -i "${sed_args[@]}" configure{.ac,} || die
+
+ epatch_user #473004
+
+ # Now we can build a sane merged version.h
+ (
+ sed '/^#define SSH_RELEASE/d' version.h.* | sort -u
+ macros=()
+ for p in HPN LPK X509 ; do [ -e version.h.${p} ] && macros+=( SSH_${p} ) ; done
+ printf '#define SSH_RELEASE SSH_VERSION SSH_PORTABLE %s\n' "${macros}"
+ ) > version.h
+
+ eautoreconf
+}
+
+src_configure() {
+ addwrite /dev/ptmx
+ addpredict /etc/skey/skeykeys # skey configure code triggers this
+
+ use debug && append-cppflags -DSANDBOX_SECCOMP_FILTER_DEBUG
+ use static && append-ldflags -static
+
+ local myconf=(
+ --with-ldflags="${LDFLAGS}"
+ --disable-strip
+ --with-pid-dir="${EPREFIX}"$(usex kernel_linux '' '/var')/run
+ --sysconfdir="${EPREFIX}"/etc/ssh
+ --libexecdir="${EPREFIX}"/usr/$(get_libdir)/misc
+ --datadir="${EPREFIX}"/usr/share/openssh
+ --with-privsep-path="${EPREFIX}"/var/empty
+ --with-privsep-user=sshd
+ $(use_with kerberos kerberos5 "${EPREFIX}"/usr)
+ # We apply the ldap patch conditionally, so can't pass --without-ldap
+ # unconditionally else we get unknown flag warnings.
+ $(use ldap && use_with ldap)
+ $(use_with ldns)
+ $(use_with libedit)
+ $(use_with pam)
+ $(use_with pie)
+ $(use_with sctp)
+ $(use_with selinux)
+ $(use_with skey)
+ $(use_with ssh1)
+ # The X509 patch deletes this option entirely.
+ $(use X509 || use_with ssl openssl)
+ $(use_with ssl md5-passwords)
+ $(use_with ssl ssl-engine)
+ )
+
+ # The seccomp sandbox is broken on x32, so use the older method for now. #553748
+ use amd64 && [[ ${ABI} == "x32" ]] && myconf+=( --with-sandbox=rlimit )
+
+ # Special settings for Gentoo/FreeBSD 9.0 or later (see bug #391011)
+ if use elibc_FreeBSD && version_is_at_least 9.0 "$(uname -r|sed 's/\(.\..\).*/\1/')" ; then
+ myconf+=( --disable-utmp --disable-wtmp --disable-wtmpx )
+ append-ldflags -lutil
+ fi
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ emake install-nokeys DESTDIR="${D}"
+ fperms 600 /etc/ssh/sshd_config
+ dobin contrib/ssh-copy-id
+ newinitd "${FILESDIR}"/sshd.rc6.4 sshd
+ newconfd "${FILESDIR}"/sshd.confd sshd
+ keepdir /var/empty
+
+ newpamd "${FILESDIR}"/sshd.pam_include.2 sshd
+ if use pam ; then
+ sed -i \
+ -e "/^#UsePAM /s:.*:UsePAM yes:" \
+ -e "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" \
+ -e "/^#PrintMotd /s:.*:PrintMotd no:" \
+ -e "/^#PrintLastLog /s:.*:PrintLastLog no:" \
+ "${ED}"/etc/ssh/sshd_config || die
+ fi
+
+ # Gentoo tweaks to default config files
+ cat <<-EOF >> "${ED}"/etc/ssh/sshd_config
+
+ # Allow client to pass locale environment variables #367017
+ AcceptEnv LANG LC_*
+ EOF
+ cat <<-EOF >> "${ED}"/etc/ssh/ssh_config
+
+ # Send locale environment variables #367017
+ SendEnv LANG LC_*
+ EOF
+
+ if ! use X509 && [[ -n ${LDAP_PATCH} ]] && use ldap ; then
+ insinto /etc/openldap/schema/
+ newins openssh-lpk_openldap.schema openssh-lpk.schema
+ fi
+
+ doman contrib/ssh-copy-id.1
+ dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
+
+ diropts -m 0700
+ dodir /etc/skel/.ssh
+
+ systemd_dounit "${FILESDIR}"/sshd.{service,socket}
+ systemd_newunit "${FILESDIR}"/sshd_at.service 'sshd@.service'
+}
+
+src_test() {
+ local t tests skipped failed passed shell
+ tests="interop-tests compat-tests"
+ skipped=""
+ shell=$(egetshell ${UID})
+ if [[ ${shell} == */nologin ]] || [[ ${shell} == */false ]] ; then
+ elog "Running the full OpenSSH testsuite"
+ elog "requires a usable shell for the 'portage'"
+ elog "user, so we will run a subset only."
+ skipped="${skipped} tests"
+ else
+ tests="${tests} tests"
+ fi
+ # It will also attempt to write to the homedir .ssh
+ local sshhome=${T}/homedir
+ mkdir -p "${sshhome}"/.ssh
+ for t in ${tests} ; do
+ # Some tests read from stdin ...
+ HOMEDIR="${sshhome}" \
+ emake -k -j1 ${t} </dev/null \
+ && passed="${passed}${t} " \
+ || failed="${failed}${t} "
+ done
+ einfo "Passed tests: ${passed}"
+ ewarn "Skipped tests: ${skipped}"
+ if [[ -n ${failed} ]] ; then
+ ewarn "Failed tests: ${failed}"
+ die "Some tests failed: ${failed}"
+ else
+ einfo "Failed tests: ${failed}"
+ return 0
+ fi
+}
+
+pkg_preinst() {
+ enewgroup sshd 22
+ enewuser sshd 22 -1 /var/empty sshd
+}
+
+pkg_postinst() {
+ if has_version "<${CATEGORY}/${PN}-5.8_p1" ; then
+ elog "Starting with openssh-5.8p1, the server will default to a newer key"
+ elog "algorithm (ECDSA). You are encouraged to manually update your stored"
+ elog "keys list as servers update theirs. See ssh-keyscan(1) for more info."
+ fi
+ if has_version "<${CATEGORY}/${PN}-6.9_p1" ; then
+ elog "Starting with openssh-6.9p1, ssh1 support is disabled by default."
+ fi
+ ewarn "Remember to merge your config files in /etc/ssh/ and then"
+ ewarn "reload sshd: '/etc/init.d/sshd reload'."
+ elog "Note: openssh-6.7 versions no longer support USE=tcpd as upstream has"
+ elog " dropped it. Make sure to update any configs that you might have."
+}
diff --git a/net-misc/openvpn-auth-ldap/Manifest b/net-misc/openvpn-auth-ldap/Manifest
new file mode 100644
index 000000000000..3dde1de73488
--- /dev/null
+++ b/net-misc/openvpn-auth-ldap/Manifest
@@ -0,0 +1 @@
+DIST openvpn-auth-ldap-2.0.4_pre20131110.tar.bz2 170168 SHA256 4631b2a3cf344d188882f4ff9b87d5e27b21b7e24d094a6c5660a81132772dc2 SHA512 116422d9f1bee8f04f848438d4486acef262bc7a34e17c23a6b341b866c2361875092e40c1ac0e29458bca3a098cf6f00b94372d809e657819555badc7acab6c WHIRLPOOL f0aba5f972a02366cfc07c0a25e5104b78dcbbb1c7156b0e6d9d8ddb93b98e2c1734fbae5c187a169dc6ebe727d999e32836d7093df994145a6b878282882294
diff --git a/net-misc/openvpn-auth-ldap/files/2.0.4_pre20131110-gentoo.patch b/net-misc/openvpn-auth-ldap/files/2.0.4_pre20131110-gentoo.patch
new file mode 100644
index 000000000000..dbebe69ea41a
--- /dev/null
+++ b/net-misc/openvpn-auth-ldap/files/2.0.4_pre20131110-gentoo.patch
@@ -0,0 +1,47 @@
+ Mk/autoconf.mk.in | 4 ++--
+ src/Makefile.in | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Mk/autoconf.mk.in b/Mk/autoconf.mk.in
+index fdbbbfc..db04c70 100644
+--- a/Mk/autoconf.mk.in
++++ b/Mk/autoconf.mk.in
+@@ -13,7 +13,7 @@ OBJC_PTHREAD_LIBS = @OBJC_PTHREAD_LIBS@
+ OBJC_PTHREAD_CFLAGS = @OBJC_PTHREAD_CFLAGS@
+
+ PLUGIN_LD = @PLUGIN_LD@
+-PLUGIN_LD_FLAGS = @PLUGIN_LD_FLAGS@
++PLUGIN_LD_FLAGS = @PLUGIN_LD_FLAGS@ $(LDFLAGS)
+ PLUGIN_CFLAGS = @PLUGIN_CFLAGS@
+ PLUGIN_SUFFIX = @PLUGIN_SUFFIX@
+ PLUGIN_FILE = @PLUGIN_FILE@
+@@ -33,7 +33,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+
+ OPENVPN_CFLAGS = @OPENVPN_CFLAGS@
+
+-LDFLAGS = @LDFLAGS@
++LDFLAGS += @LDFLAGS@
+
+ AR = @AR@
+ RANLIB = @RANLIB@
+diff --git a/src/Makefile.in b/src/Makefile.in
+index b0eac7b..47c467b 100755
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -42,14 +42,14 @@ GEN_SRCS= TRConfigParser.m \
+
+ TEST_OBJS= testplugin.o
+
+-CFLAGS+= $(LDAP_CFLAGS) $(OPENVPN_CFLAGS)
++CFLAGS+= $(LDAP_CFLAGS) $(OPENVPN_CFLAGS) -fPIC
+ OBJCFLAGS+= $(LDAP_CFLAGS) $(OPENVPN_CFLAGS)
+ LIBS+= -L. -lauth-ldap \
+ $(LDAP_LIBS) \
+ $(OBJC_LIBS) \
+ $(FLEX_LIBS)
+
+-INSTALL_LIB= $(INSTALL) -m 755
++INSTALL_LIB= $(INSTALL) -m 755 -D
+ PLUGIN_INSTALL_DIR= $(DESTDIR)$(libdir)
+
+ all:: $(PLUGIN_FILE) $(AUTH_LIB) testplugin
diff --git a/net-misc/openvpn-auth-ldap/files/2.0.4_pre20131110-objc.patch b/net-misc/openvpn-auth-ldap/files/2.0.4_pre20131110-objc.patch
new file mode 100644
index 000000000000..0ddcb98167f4
--- /dev/null
+++ b/net-misc/openvpn-auth-ldap/files/2.0.4_pre20131110-objc.patch
@@ -0,0 +1,33 @@
+diff --git a/auth-ldap-2.0.4_pre20131110/aclocal.m4 b/auth-ldap-2.0.4_pre20131110/aclocal.m4
+index e509555..3b73520 100644
+--- a/auth-ldap-2.0.4_pre20131110/aclocal.m4
++++ b/auth-ldap-2.0.4_pre20131110/aclocal.m4
+@@ -130,7 +130,6 @@ AC_DEFUN([OD_OBJC_RUNTIME],[
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([
+ #include <objc/objc.h>
+- #include <objc/objc-api.h>
+ ], [
+ id class = objc_lookUpClass("Object");
+ id obj = @<:@class alloc@:>@;
+@@ -157,7 +156,6 @@ AC_DEFUN([OD_OBJC_RUNTIME],[
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([
+ #include <objc/objc.h>
+- #include <objc/objc-api.h>
+ ], [
+ id class = objc_lookup_class("Object");
+ id obj = @<:@class alloc@:>@;
+diff --git a/auth-ldap-2.0.4_pre20131110/src/TRString.h b/auth-ldap-2.0.4_pre20131110/src/TRString.h
+index 6755c63..77d139b 100644
+--- a/auth-ldap-2.0.4_pre20131110/src/TRString.h
++++ b/auth-ldap-2.0.4_pre20131110/src/TRString.h
+@@ -35,7 +35,7 @@
+ #endif
+
+ #import <stdlib.h>
+-
++#include <stdarg.h>
+ #import "TRObject.h"
+
+ @interface TRString : TRObject {
diff --git a/net-misc/openvpn-auth-ldap/metadata.xml b/net-misc/openvpn-auth-ldap/metadata.xml
new file mode 100644
index 000000000000..3e7867df9601
--- /dev/null
+++ b/net-misc/openvpn-auth-ldap/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>ercpe@gentoo.org</email>
+ <name>Johann Schmitz (ercpe)</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">openvpn-auth-ldap</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/openvpn-auth-ldap/openvpn-auth-ldap-2.0.4_pre20131110.ebuild b/net-misc/openvpn-auth-ldap/openvpn-auth-ldap-2.0.4_pre20131110.ebuild
new file mode 100644
index 000000000000..bcf6d90f8def
--- /dev/null
+++ b/net-misc/openvpn-auth-ldap/openvpn-auth-ldap-2.0.4_pre20131110.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools flag-o-matic
+
+DESCRIPTION="LDAP authentication and authorization plugin for OpenVPN 2.x"
+HOMEPAGE="https://code.google.com/p/openvpn-auth-ldap/"
+SRC_URI="http://dev.gentoo.org/~ercpe/distfiles/${CATEGORY}/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+RDEPEND="net-misc/openvpn
+ net-nds/openldap"
+DEPEND="dev-util/re2c
+ sys-devel/gcc[objc]
+ ${RDEPEND}"
+
+S="${WORKDIR}/${P}"
+
+src_prepare() {
+ sed \
+ -e '/test/d' \
+ -i Makefile.in || die
+ epatch \
+ "${FILESDIR}"/${PV}-objc.patch \
+ "${FILESDIR}"/${PV}-gentoo.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-openvpn="${EPREFIX}/usr/include" \
+ --with-openldap="${EPREFIX}/usr/include" \
+ --with-objc-runtime=GNU
+}
+
+src_compile() {
+ emake -C tools
+ emake -C src TRConfigParser.h
+ default
+}
+
+src_install() {
+ default
+ dodoc auth-ldap.conf
+}
diff --git a/net-misc/openvpn/Manifest b/net-misc/openvpn/Manifest
new file mode 100644
index 000000000000..64a2bbbc8dd1
--- /dev/null
+++ b/net-misc/openvpn/Manifest
@@ -0,0 +1,3 @@
+DIST openvpn-2.3.6.tar.gz 1213272 SHA256 7baed2ff39c12e1a1a289ec0b46fcc49ff094ca58b8d8d5f29b36ac649ee5b26 SHA512 70e0045ea41f6588769ab8b98d8f550b69148adbf7fedcdc36900e25950df43379950492652e243ec6e7965bf9c7dcc86a56ba5dfdc44523aaa81cfc508b1c6e WHIRLPOOL 737f2d1d69ee1c7700d5cd5a4e7d5d1b2f55d8b2229f7c2565fcb8c731ebb719ec8d6bad3b76f763f36e5c70c6e40a666db3508f3024f8e4637c0659061dba48
+DIST openvpn-2.3.7.tar.gz 1199706 SHA256 1f02a4cd6aeb6250ca9311560875b10ce8957a3c9101a8005bd1e17e5b03146e SHA512 35030eb432568e954d7d9543565c3c7d1268ff323e1a2da81047c497f3eeb6f4061d9cfc360aa98fe7c413282ee6d0eb70957d6d4a38d928348c706f20cb66df WHIRLPOOL 31b1cbdde3db8060f81b4b3fdc604dd357ad413ad18fcb7dae07c6bb4939f92d02271e6ecb677b5f3d80e305676c769232e9d114c667b85fab45125be10f49a4
+DIST openvpn-2.3.8.tar.gz 1214843 SHA256 532435eff61c14b44a583f27b72f93e7864e96c95fe51134ec0ad4b1b1107c51 SHA512 b619283d87eea2e47a2f0dfdbf0ffd1d10388fbdaadb33b43c7a2743748a4814f869fad6215d32fab156664d554ae94af456e7bf496890c68e6729b153d76db9 WHIRLPOOL 4868c735ca5e65b34f477457ea38eb6db45fae80563490d1e39ece9bf29b13976dd82d50d054da70c4ee146cb2e88e847bafc3f7ff47112d4494fa0f408d65d0
diff --git a/net-misc/openvpn/files/2.3.6-disable-compression.patch b/net-misc/openvpn/files/2.3.6-disable-compression.patch
new file mode 100644
index 000000000000..d9d1c764e908
--- /dev/null
+++ b/net-misc/openvpn/files/2.3.6-disable-compression.patch
@@ -0,0 +1,18 @@
+https://community.openvpn.net/openvpn/changeset/5d5233778868ddd568140c394adfcfc8e3453245/
+
+--- openvpn-2.3.6/src/openvpn/ssl_openssl.c.orig 2014-11-29 23:00:35.000000000 +0800
++++ openvpn-2.3.6/src/openvpn/ssl_openssl.c 2015-01-12 21:14:30.186993686 +0800
+@@ -238,6 +238,13 @@
+ if (tls_ver_min > TLS_VER_1_2 || tls_ver_max < TLS_VER_1_2)
+ sslopt |= SSL_OP_NO_TLSv1_2;
+ #endif
++
++#ifdef SSL_OP_NO_COMPRESSION
++ msg (M_WARN, "[Workaround] disable SSL compression");
++ sslopt |= SSL_OP_NO_COMPRESSION;
++#endif
++
++
+ SSL_CTX_set_options (ctx->ctx, sslopt);
+ }
+
diff --git a/net-misc/openvpn/files/2.3.6-null-cipher.patch b/net-misc/openvpn/files/2.3.6-null-cipher.patch
new file mode 100644
index 000000000000..1e831cfa213a
--- /dev/null
+++ b/net-misc/openvpn/files/2.3.6-null-cipher.patch
@@ -0,0 +1,46 @@
+The "really fix cipher none" patch has been merged to release/2.3 and master:
+
+commit 785838614afc20d362b64907b0212e9a779e2287 (release/2.3)
+commit 98156e90e1e83133a6a6a020db8e7333ada6156b (master)
+
+diff --git a/src/openvpn/crypto_backend.h b/src/openvpn/crypto_backend.h
+index 8749878..4e45df0 100644
+--- a/src/openvpn/crypto_backend.h
++++ b/src/openvpn/crypto_backend.h
+@@ -237,8 +237,7 @@ int cipher_kt_mode (const cipher_kt_t *cipher_kt);
+ *
+ * @return true iff the cipher is a CBC mode cipher.
+ */
+-bool cipher_kt_mode_cbc(const cipher_kt_t *cipher)
+- __attribute__((nonnull));
++bool cipher_kt_mode_cbc(const cipher_kt_t *cipher);
+
+ /**
+ * Check if the supplied cipher is a supported OFB or CFB mode cipher.
+@@ -247,8 +246,7 @@ bool cipher_kt_mode_cbc(const cipher_kt_t *cipher)
+ *
+ * @return true iff the cipher is a OFB or CFB mode cipher.
+ */
+-bool cipher_kt_mode_ofb_cfb(const cipher_kt_t *cipher)
+- __attribute__((nonnull));
++bool cipher_kt_mode_ofb_cfb(const cipher_kt_t *cipher);
+
+
+ /**
+diff --git a/tests/t_lpback.sh b/tests/t_lpback.sh
+index 8f88ad9..d7792cd 100755
+--- a/tests/t_lpback.sh
++++ b/tests/t_lpback.sh
+@@ -35,6 +35,9 @@ CIPHERS=$(${top_builddir}/src/openvpn/openvpn --show-ciphers | \
+ # GD, 2014-07-06 do not test RC5-* either (fails on NetBSD w/o libcrypto_rc5)
+ CIPHERS=$(echo "$CIPHERS" | egrep -v '^(DES-EDE3-CFB1|DES-CFB1|RC5-)' )
+
++# Also test cipher 'none'
++CIPHERS=${CIPHERS}$(printf "\nnone")
++
+ "${top_builddir}/src/openvpn/openvpn" --genkey --secret key.$$
+ set +e
+
+--
+1.9.1
+
diff --git a/net-misc/openvpn/files/65openvpn b/net-misc/openvpn/files/65openvpn
new file mode 100644
index 000000000000..4ddb03430302
--- /dev/null
+++ b/net-misc/openvpn/files/65openvpn
@@ -0,0 +1 @@
+CONFIG_PROTECT="/usr/share/openvpn/easy-rsa"
diff --git a/net-misc/openvpn/files/down.sh b/net-misc/openvpn/files/down.sh
new file mode 100755
index 000000000000..1c70db0ec653
--- /dev/null
+++ b/net-misc/openvpn/files/down.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+# Copyright (c) 2006-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# Contributed by Roy Marples (uberlord@gentoo.org)
+
+# If we have a service specific script, run this now
+if [ -x /etc/openvpn/"${SVCNAME}"-down.sh ] ; then
+ /etc/openvpn/"${SVCNAME}"-down.sh "$@"
+fi
+
+# Restore resolv.conf to how it was
+if [ "${PEER_DNS}" != "no" ]; then
+ if [ -x /sbin/resolvconf ] ; then
+ /sbin/resolvconf -d "${dev}"
+ elif [ -e /etc/resolv.conf-"${dev}".sv ] ; then
+ # Important that we copy instead of move incase resolv.conf is
+ # a symlink and not an actual file
+ cp /etc/resolv.conf-"${dev}".sv /etc/resolv.conf
+ rm -f /etc/resolv.conf-"${dev}".sv
+ fi
+fi
+
+if [ -n "${SVCNAME}" ]; then
+ # Re-enter the init script to start any dependant services
+ if /etc/init.d/"${SVCNAME}" --quiet status ; then
+ export IN_BACKGROUND=true
+ /etc/init.d/"${SVCNAME}" --quiet stop
+ fi
+fi
+
+exit 0
+
+# vim: ts=4 :
diff --git a/net-misc/openvpn/files/openvpn-2.1.conf b/net-misc/openvpn/files/openvpn-2.1.conf
new file mode 100644
index 000000000000..72510c34aed3
--- /dev/null
+++ b/net-misc/openvpn/files/openvpn-2.1.conf
@@ -0,0 +1,18 @@
+# OpenVPN automatically creates an /etc/resolv.conf (or sends it to
+# resolvconf) if given DNS information by the OpenVPN server.
+# Set PEER_DNS="no" to stop this.
+PEER_DNS="yes"
+
+# OpenVPN can run in many modes. Most people will want the init script
+# to automatically detect the mode and try and apply a good default
+# configuration and setup scripts. However, there are cases where the
+# OpenVPN configuration looks like a client, but it's really a peer or
+# something else. DETECT_CLIENT controls this behaviour.
+DETECT_CLIENT="yes"
+
+# If DETECT_CLIENT is no and you have your own scripts to re-enter the openvpn
+# init script (ie, it first becomes "inactive" and the script then starts the
+# script again to make it "started") then you can state this below.
+# In other words, unless you understand service dependencies and are a
+# competent shell scripter, don't set this.
+RE_ENTER="no"
diff --git a/net-misc/openvpn/files/openvpn-2.1.init b/net-misc/openvpn/files/openvpn-2.1.init
new file mode 100755
index 000000000000..d65e6f8bd7c4
--- /dev/null
+++ b/net-misc/openvpn/files/openvpn-2.1.init
@@ -0,0 +1,133 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+VPNDIR=${VPNDIR:-/etc/openvpn}
+VPN=${SVCNAME#*.}
+if [ -n "${VPN}" ] && [ ${SVCNAME} != "openvpn" ]; then
+ VPNPID="/var/run/openvpn.${VPN}.pid"
+else
+ VPNPID="/var/run/openvpn.pid"
+fi
+VPNCONF="${VPNDIR}/${VPN}.conf"
+
+depend() {
+ need localmount net
+ use dns
+ after bootmisc
+}
+
+checkconfig() {
+ # Linux has good dynamic tun/tap creation
+ if [ $(uname -s) = "Linux" ] ; then
+ if [ ! -e /dev/net/tun ]; then
+ if ! modprobe tun ; then
+ eerror "TUN/TAP support is not available" \
+ "in this kernel"
+ return 1
+ fi
+ fi
+ if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then
+ ebegin "Detected broken /dev/net/tun symlink, fixing..."
+ rm -f /dev/net/tun
+ ln -s /dev/misc/net/tun /dev/net/tun
+ eend $?
+ fi
+ return 0
+ fi
+
+ # Other OS's don't, so we rely on a pre-configured interface
+ # per vpn instance
+ local ifname=$(sed -n -e 's/[[:space:]]*dev[[:space:]][[:space:]]*\([^[:space:]]*\).*/\1/p' "${VPNCONF}")
+ if [ -z ${ifname} ] ; then
+ eerror "You need to specify the interface that this openvpn" \
+ "instance should use" \
+ "by using the dev option in ${VPNCONF}"
+ return 1
+ fi
+
+ if ! ifconfig "${ifname}" >/dev/null 2>/dev/null ; then
+ # Try and create it
+ echo > /dev/"${ifname}" >/dev/null
+ fi
+ if ! ifconfig "${ifname}" >/dev/null 2>/dev/null ; then
+ eerror "${VPNCONF} requires interface ${ifname}" \
+ "but that does not exist"
+ return 1
+ fi
+}
+
+start() {
+ # If we are re-called by the openvpn gentoo-up.sh script
+ # then we don't actually want to start openvpn
+ [ "${IN_BACKGROUND}" = "true" ] && return 0
+
+ ebegin "Starting ${SVCNAME}"
+
+ checkconfig || return 1
+
+ local args="" reenter=${RE_ENTER:-no}
+ # If the config file does not specify the cd option, we do
+ # But if we specify it, we override the config option which we do not want
+ if ! grep -q "^[ ]*cd[ ].*" "${VPNCONF}" ; then
+ args="${args} --cd ${VPNDIR}"
+ fi
+
+ # We mark the service as inactive and then start it.
+ # When we get an authenticated packet from the peer then we run our script
+ # which configures our DNS if any and marks us as up.
+ if [ "${DETECT_CLIENT:-yes}" = "yes" ] && \
+ grep -q "^[ ]*remote[ ].*" "${VPNCONF}" ; then
+ reenter="yes"
+ args="${args} --up-delay --up-restart"
+ args="${args} --script-security 2"
+ args="${args} --up /etc/openvpn/up.sh"
+ args="${args} --down-pre --down /etc/openvpn/down.sh"
+
+ # Warn about setting scripts as we override them
+ if grep -Eq "^[ ]*(up|down)[ ].*" "${VPNCONF}" ; then
+ ewarn "WARNING: You have defined your own up/down scripts"
+ ewarn "As you're running as a client, we now force Gentoo specific"
+ ewarn "scripts to be run for up and down events."
+ ewarn "These scripts will call /etc/openvpn/${SVCNAME}-{up,down}.sh"
+ ewarn "where you can put your own code."
+ fi
+
+ # Warn about the inability to change ip/route/dns information when
+ # dropping privs
+ if grep -q "^[ ]*user[ ].*" "${VPNCONF}" ; then
+ ewarn "WARNING: You are dropping root privileges!"
+ ewarn "As such openvpn may not be able to change ip, routing"
+ ewarn "or DNS configuration."
+ fi
+ else
+ # So we're a server. Run as openvpn unless otherwise specified
+ grep -q "^[ ]*user[ ].*" "${VPNCONF}" || args="${args} --user openvpn"
+ grep -q "^[ ]*group[ ].*" "${VPNCONF}" || args="${args} --group openvpn"
+ fi
+
+ # Ensure that our scripts get the PEER_DNS variable
+ [ -n "${PEER_DNS}" ] && args="${args} --setenv PEER_DNS ${PEER_DNS}"
+
+ [ "${reenter}" = "yes" ] && mark_service_inactive "${SVCNAME}"
+ start-stop-daemon --start --exec /usr/sbin/openvpn --pidfile "${VPNPID}" \
+ -- --config "${VPNCONF}" --writepid "${VPNPID}" --daemon \
+ --setenv SVCNAME "${SVCNAME}" ${args}
+ eend $? "Check your logs to see why startup failed"
+}
+
+stop() {
+ # If we are re-called by the openvpn gentoo-down.sh script
+ # then we don't actually want to stop openvpn
+ if [ "${IN_BACKGROUND}" = "true" ] ; then
+ mark_service_inactive "${SVCNAME}"
+ return 0
+ fi
+
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet \
+ --exec /usr/sbin/openvpn --pidfile "${VPNPID}"
+ eend $?
+}
+
+# vim: set ts=4 :
diff --git a/net-misc/openvpn/files/openvpn.init b/net-misc/openvpn/files/openvpn.init
new file mode 100644
index 000000000000..489ab497dce4
--- /dev/null
+++ b/net-misc/openvpn/files/openvpn.init
@@ -0,0 +1,63 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+VPNDIR="/etc/openvpn"
+VPN="${SVCNAME#*.}"
+if [ -n "${VPN}" ] && [ "${SVCNAME}" != "openvpn" ]; then
+ VPNPID="/var/run/openvpn.${VPN}.pid"
+else
+ VPNPID="/var/run/openvpn.pid"
+fi
+VPNCONF="${VPNDIR}/${VPN}.conf"
+
+depend() {
+ need localmount net
+ before netmount
+ after bootmisc
+}
+
+checktundevice() {
+ if [ ! -e /dev/net/tun ]; then
+ if ! modprobe tun ; then
+ eerror "TUN/TAP support is not available in this kernel"
+ return 1
+ fi
+ fi
+ if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then
+ ebegin "Detected broken /dev/net/tun symlink, fixing..."
+ rm -f /dev/net/tun
+ ln -s /dev/misc/net/tun /dev/net/tun
+ eend $?
+ fi
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+
+ checktundevice || return 1
+
+ if [ ! -e "${VPNCONF}" ]; then
+ eend 1 "${VPNCONF} does not exist"
+ return 1
+ fi
+
+ local args=""
+ # If the config file does not specify the cd option, we do
+ # But if we specify it, we override the config option which we do not want
+ if ! grep -q "^[ ]*cd[ ].*" "${VPNCONF}" ; then
+ args="${args} --cd ${VPNDIR}"
+ fi
+
+ start-stop-daemon --start --exec /usr/sbin/openvpn --pidfile "${VPNPID}" \
+ -- --config "${VPNCONF}" --writepid "${VPNPID}" --daemon ${args}
+ eend $? "Check your logs to see why startup failed"
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec /usr/sbin/openvpn --pidfile "${VPNPID}"
+ eend $?
+}
+
+# vim: ts=4
diff --git a/net-misc/openvpn/files/openvpn.service b/net-misc/openvpn/files/openvpn.service
new file mode 100644
index 000000000000..358dcb791a3c
--- /dev/null
+++ b/net-misc/openvpn/files/openvpn.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=OpenVPN Robust And Highly Flexible Tunneling Application On %I
+After=syslog.target network.target
+
+[Service]
+PrivateTmp=true
+Type=forking
+PIDFile=/var/run/openvpn/%i.pid
+ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/openvpn/files/openvpn.tmpfile b/net-misc/openvpn/files/openvpn.tmpfile
new file mode 100644
index 000000000000..d5fca71a00a0
--- /dev/null
+++ b/net-misc/openvpn/files/openvpn.tmpfile
@@ -0,0 +1 @@
+D /var/run/openvpn 0710 root openvpn -
diff --git a/net-misc/openvpn/files/up.sh b/net-misc/openvpn/files/up.sh
new file mode 100755
index 000000000000..6ce82d6113cd
--- /dev/null
+++ b/net-misc/openvpn/files/up.sh
@@ -0,0 +1,100 @@
+#!/bin/sh
+# Copyright (c) 2006-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# Contributed by Roy Marples (uberlord@gentoo.org)
+
+# Setup our resolv.conf
+# Vitally important that we use the domain entry in resolv.conf so we
+# can setup the nameservers are for the domain ONLY in resolvconf if
+# we're using a decent dns cache/forwarder like dnsmasq and NOT nscd/libc.
+# nscd/libc users will get the VPN nameservers before their other ones
+# and will use the first one that responds - maybe the LAN ones?
+# non resolvconf users just the the VPN resolv.conf
+
+# FIXME:- if we have >1 domain, then we have to use search :/
+# We need to add a flag to resolvconf to say
+# "these nameservers should only be used for the listed search domains
+# if other global nameservers are present on other interfaces"
+# This however, will break compatibility with Debians resolvconf
+# A possible workaround would be to just list multiple domain lines
+# and try and let resolvconf handle it
+
+min_route() {
+ local n=1
+ local m
+ local r
+
+ eval m="\$route_metric_$n"
+ while [ -n "${m}" ]; do
+ if [ -z "$r" ] || [ "$r" -gt "$m" ]; then
+ r="$m"
+ fi
+ n="$(($n+1))"
+ eval m="\$route_metric_$n"
+ done
+
+ echo "$r"
+}
+
+if [ "${PEER_DNS}" != "no" ]; then
+ NS=
+ DOMAIN=
+ SEARCH=
+ i=1
+ while true ; do
+ eval opt=\$foreign_option_${i}
+ [ -z "${opt}" ] && break
+ if [ "${opt}" != "${opt#dhcp-option DOMAIN *}" ] ; then
+ if [ -z "${DOMAIN}" ] ; then
+ DOMAIN="${opt#dhcp-option DOMAIN *}"
+ else
+ SEARCH="${SEARCH}${SEARCH:+ }${opt#dhcp-option DOMAIN *}"
+ fi
+ elif [ "${opt}" != "${opt#dhcp-option DNS *}" ] ; then
+ NS="${NS}nameserver ${opt#dhcp-option DNS *}\n"
+ fi
+ i=$((${i} + 1))
+ done
+
+ if [ -n "${NS}" ] ; then
+ DNS="# Generated by openvpn for interface ${dev}\n"
+ if [ -n "${SEARCH}" ] ; then
+ DNS="${DNS}search ${DOMAIN} ${SEARCH}\n"
+ elif [ -n "${DOMAIN}" ]; then
+ DNS="${DNS}domain ${DOMAIN}\n"
+ fi
+ DNS="${DNS}${NS}"
+ if [ -x /sbin/resolvconf ] ; then
+ metric="$(min_route)"
+ printf "${DNS}" | /sbin/resolvconf -a "${dev}" ${metric:+-m ${metric}}
+ else
+ # Preserve the existing resolv.conf
+ if [ -e /etc/resolv.conf ] ; then
+ cp /etc/resolv.conf /etc/resolv.conf-"${dev}".sv
+ fi
+ printf "${DNS}" > /etc/resolv.conf
+ chmod 644 /etc/resolv.conf
+ fi
+ fi
+fi
+
+# Below section is Gentoo specific
+# Quick summary - our init scripts are re-entrant and set the SVCNAME env var
+# as we could have >1 openvpn service
+
+if [ -n "${SVCNAME}" ]; then
+ # If we have a service specific script, run this now
+ if [ -x /etc/openvpn/"${SVCNAME}"-up.sh ] ; then
+ /etc/openvpn/"${SVCNAME}"-up.sh "$@"
+ fi
+
+ # Re-enter the init script to start any dependant services
+ if ! /etc/init.d/"${SVCNAME}" --quiet status ; then
+ export IN_BACKGROUND=true
+ /etc/init.d/${SVCNAME} --quiet start
+ fi
+fi
+
+exit 0
+
+# vim: ts=4 :
diff --git a/net-misc/openvpn/metadata.xml b/net-misc/openvpn/metadata.xml
new file mode 100644
index 000000000000..7f3d1f95164c
--- /dev/null
+++ b/net-misc/openvpn/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>djc@gentoo.org</email>
+ <name>Dirkjan Ochtman</name>
+ </maintainer>
+ <longdescription>OpenVPN is an easy-to-use, robust and highly
+configurable VPN daemon which can be used to securely link two or more
+networks using an encrypted tunnel.</longdescription>
+ <use>
+ <flag name="down-root">Enable the down-root plugin</flag>
+ <flag name="iproute2">Enabled iproute2 support instead of net-tools</flag>
+ <flag name="passwordsave">Enables openvpn to save passwords</flag>
+ <flag name="polarssl">Use PolarSSL instead of OpenSSL</flag>
+ <flag name="pkcs11">Enable PKCS#11 smartcard support</flag>
+ <flag name="plugins">Enable the OpenVPN plugin system</flag>
+ <flag name="socks">Enable socks support</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:openvpn:openvpn</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/openvpn/openvpn-2.3.6-r1.ebuild b/net-misc/openvpn/openvpn-2.3.6-r1.ebuild
new file mode 100644
index 000000000000..8ad5a7ba268b
--- /dev/null
+++ b/net-misc/openvpn/openvpn-2.3.6-r1.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit multilib autotools flag-o-matic user systemd
+
+DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes"
+SRC_URI="http://swupdate.openvpn.net/community/releases/${P}.tar.gz"
+HOMEPAGE="http://openvpn.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="examples down-root iproute2 pam passwordsave pkcs11 +plugins polarssl selinux +ssl systemd +lzo static userland_BSD"
+
+REQUIRED_USE="static? ( !plugins !pkcs11 )
+ polarssl? ( ssl )
+ pkcs11? ( ssl )
+ !plugins? ( !pam !down-root )"
+
+DEPEND="
+ kernel_linux? (
+ iproute2? ( sys-apps/iproute2[-minimal] ) !iproute2? ( sys-apps/net-tools )
+ )
+ pam? ( virtual/pam )
+ ssl? (
+ !polarssl? ( >=dev-libs/openssl-0.9.7 ) polarssl? ( >=net-libs/polarssl-1.2.10 )
+ )
+ lzo? ( >=dev-libs/lzo-1.07 )
+ pkcs11? ( >=dev-libs/pkcs11-helper-1.11 )"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-openvpn )
+"
+
+src_prepare() {
+ # Set correct pass to systemd-ask-password binary
+ sed -i "s:\(/bin/systemd-ask-password\):/usr\1:" ./src/openvpn/console.c || die
+ epatch "${FILESDIR}/2.3.6-null-cipher.patch" || die
+ eautoreconf
+}
+
+src_configure() {
+ use static && LDFLAGS="${LDFLAGS} -Xcompiler -static"
+ local myconf
+ use polarssl && myconf="--with-crypto-library=polarssl"
+ econf \
+ ${myconf} \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --with-plugindir="${ROOT}/usr/$(get_libdir)/$PN" \
+ $(use_enable passwordsave password-save) \
+ $(use_enable ssl) \
+ $(use_enable ssl crypto) \
+ $(use_enable lzo) \
+ $(use_enable pkcs11) \
+ $(use_enable plugins) \
+ $(use_enable iproute2) \
+ $(use_enable pam plugin-auth-pam) \
+ $(use_enable down-root plugin-down-root) \
+ $(use_enable systemd)
+}
+
+src_install() {
+ default
+ find "${ED}/usr" -name '*.la' -delete
+ # install documentation
+ dodoc AUTHORS ChangeLog PORTS README README.IPv6
+
+ # Install some helper scripts
+ keepdir /etc/openvpn
+ exeinto /etc/openvpn
+ doexe "${FILESDIR}/up.sh"
+ doexe "${FILESDIR}/down.sh"
+
+ # Install the init script and config file
+ newinitd "${FILESDIR}/${PN}-2.1.init" openvpn
+ newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn
+
+ # install examples, controlled by the respective useflag
+ if use examples ; then
+ # dodoc does not supportly support directory traversal, #15193
+ insinto /usr/share/doc/${PF}/examples
+ doins -r sample contrib
+ fi
+
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
+ systemd_newunit "${FILESDIR}"/${PN}.service 'openvpn@.service'
+}
+
+pkg_postinst() {
+ # Add openvpn user so openvpn servers can drop privs
+ # Clients should run as root so they can change ip addresses,
+ # dns information and other such things.
+ enewgroup openvpn
+ enewuser openvpn "" "" "" openvpn
+
+ if [ path_exists -o "${ROOT}/etc/openvpn/*/local.conf" ] ; then
+ ewarn "WARNING: The openvpn init script has changed"
+ ewarn ""
+ fi
+
+ elog "The openvpn init script expects to find the configuration file"
+ elog "openvpn.conf in /etc/openvpn along with any extra files it may need."
+ elog ""
+ elog "To create more VPNs, simply create a new .conf file for it and"
+ elog "then create a symlink to the openvpn init script from a link called"
+ elog "openvpn.newconfname - like so"
+ elog " cd /etc/openvpn"
+ elog " ${EDITOR##*/} foo.conf"
+ elog " cd /etc/init.d"
+ elog " ln -s openvpn openvpn.foo"
+ elog ""
+ elog "You can then treat openvpn.foo as any other service, so you can"
+ elog "stop one vpn and start another if you need to."
+
+ if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then
+ ewarn ""
+ ewarn "WARNING: If you use the remote keyword then you are deemed to be"
+ ewarn "a client by our init script and as such we force up,down scripts."
+ ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you"
+ ewarn "can move your scripts to."
+ fi
+
+ if use plugins ; then
+ einfo ""
+ einfo "plugins have been installed into /usr/$(get_libdir)/${PN}"
+ fi
+
+ einfo ""
+ einfo "OpenVPN 2.3.x no longer includes the easy-rsa suite of utilities."
+ einfo "They can now be emerged via app-crypt/easy-rsa."
+}
diff --git a/net-misc/openvpn/openvpn-2.3.6-r2.ebuild b/net-misc/openvpn/openvpn-2.3.6-r2.ebuild
new file mode 100644
index 000000000000..f72f09502a19
--- /dev/null
+++ b/net-misc/openvpn/openvpn-2.3.6-r2.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit multilib autotools flag-o-matic user systemd
+
+DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes"
+SRC_URI="http://swupdate.openvpn.net/community/releases/${P}.tar.gz"
+HOMEPAGE="http://openvpn.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="examples down-root iproute2 pam passwordsave pkcs11 +plugins polarssl selinux +ssl systemd +lzo static userland_BSD"
+
+REQUIRED_USE="static? ( !plugins !pkcs11 )
+ polarssl? ( ssl )
+ pkcs11? ( ssl )
+ !plugins? ( !pam !down-root )"
+
+DEPEND="
+ kernel_linux? (
+ iproute2? ( sys-apps/iproute2[-minimal] ) !iproute2? ( sys-apps/net-tools )
+ )
+ pam? ( virtual/pam )
+ ssl? (
+ !polarssl? ( >=dev-libs/openssl-0.9.7 ) polarssl? ( >=net-libs/polarssl-1.2.10 )
+ )
+ lzo? ( >=dev-libs/lzo-1.07 )
+ pkcs11? ( >=dev-libs/pkcs11-helper-1.11 )"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-openvpn )
+"
+
+src_prepare() {
+ # Set correct pass to systemd-ask-password binary
+ sed -i "s:\(/bin/systemd-ask-password\):/usr\1:" ./src/openvpn/console.c || die
+ epatch "${FILESDIR}/2.3.6-null-cipher.patch" || die
+ epatch "${FILESDIR}/2.3.6-disable-compression.patch" || die
+ eautoreconf
+}
+
+src_configure() {
+ use static && LDFLAGS="${LDFLAGS} -Xcompiler -static"
+ local myconf
+ use polarssl && myconf="--with-crypto-library=polarssl"
+ econf \
+ ${myconf} \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --with-plugindir="${ROOT}/usr/$(get_libdir)/$PN" \
+ $(use_enable passwordsave password-save) \
+ $(use_enable ssl) \
+ $(use_enable ssl crypto) \
+ $(use_enable lzo) \
+ $(use_enable pkcs11) \
+ $(use_enable plugins) \
+ $(use_enable iproute2) \
+ $(use_enable pam plugin-auth-pam) \
+ $(use_enable down-root plugin-down-root) \
+ $(use_enable systemd)
+}
+
+src_install() {
+ default
+ find "${ED}/usr" -name '*.la' -delete
+ # install documentation
+ dodoc AUTHORS ChangeLog PORTS README README.IPv6
+
+ # Install some helper scripts
+ keepdir /etc/openvpn
+ exeinto /etc/openvpn
+ doexe "${FILESDIR}/up.sh"
+ doexe "${FILESDIR}/down.sh"
+
+ # Install the init script and config file
+ newinitd "${FILESDIR}/${PN}-2.1.init" openvpn
+ newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn
+
+ # install examples, controlled by the respective useflag
+ if use examples ; then
+ # dodoc does not supportly support directory traversal, #15193
+ insinto /usr/share/doc/${PF}/examples
+ doins -r sample contrib
+ fi
+
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
+ systemd_newunit "${FILESDIR}"/${PN}.service 'openvpn@.service'
+}
+
+pkg_postinst() {
+ # Add openvpn user so openvpn servers can drop privs
+ # Clients should run as root so they can change ip addresses,
+ # dns information and other such things.
+ enewgroup openvpn
+ enewuser openvpn "" "" "" openvpn
+
+ if [ path_exists -o "${ROOT}/etc/openvpn/*/local.conf" ] ; then
+ ewarn "WARNING: The openvpn init script has changed"
+ ewarn ""
+ fi
+
+ elog "The openvpn init script expects to find the configuration file"
+ elog "openvpn.conf in /etc/openvpn along with any extra files it may need."
+ elog ""
+ elog "To create more VPNs, simply create a new .conf file for it and"
+ elog "then create a symlink to the openvpn init script from a link called"
+ elog "openvpn.newconfname - like so"
+ elog " cd /etc/openvpn"
+ elog " ${EDITOR##*/} foo.conf"
+ elog " cd /etc/init.d"
+ elog " ln -s openvpn openvpn.foo"
+ elog ""
+ elog "You can then treat openvpn.foo as any other service, so you can"
+ elog "stop one vpn and start another if you need to."
+
+ if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then
+ ewarn ""
+ ewarn "WARNING: If you use the remote keyword then you are deemed to be"
+ ewarn "a client by our init script and as such we force up,down scripts."
+ ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you"
+ ewarn "can move your scripts to."
+ fi
+
+ if use plugins ; then
+ einfo ""
+ einfo "plugins have been installed into /usr/$(get_libdir)/${PN}"
+ fi
+
+ einfo ""
+ einfo "OpenVPN 2.3.x no longer includes the easy-rsa suite of utilities."
+ einfo "They can now be emerged via app-crypt/easy-rsa."
+}
diff --git a/net-misc/openvpn/openvpn-2.3.6.ebuild b/net-misc/openvpn/openvpn-2.3.6.ebuild
new file mode 100644
index 000000000000..a18d0fd4a3ed
--- /dev/null
+++ b/net-misc/openvpn/openvpn-2.3.6.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit multilib autotools flag-o-matic user systemd
+
+DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes"
+SRC_URI="http://swupdate.openvpn.net/community/releases/${P}.tar.gz"
+HOMEPAGE="http://openvpn.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="examples down-root iproute2 pam passwordsave pkcs11 +plugins polarssl selinux +ssl systemd +lzo static userland_BSD"
+
+REQUIRED_USE="static? ( !plugins !pkcs11 )
+ polarssl? ( ssl )
+ pkcs11? ( ssl )
+ !plugins? ( !pam !down-root )"
+
+DEPEND="
+ kernel_linux? (
+ iproute2? ( sys-apps/iproute2[-minimal] ) !iproute2? ( sys-apps/net-tools )
+ )
+ pam? ( virtual/pam )
+ ssl? (
+ !polarssl? ( >=dev-libs/openssl-0.9.7 ) polarssl? ( >=net-libs/polarssl-1.2.10 )
+ )
+ lzo? ( >=dev-libs/lzo-1.07 )
+ pkcs11? ( >=dev-libs/pkcs11-helper-1.11 )"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-openvpn )
+"
+
+src_prepare() {
+ # Set correct pass to systemd-ask-password binary
+ sed -i "s:\(/bin/systemd-ask-password\):/usr\1:" ./src/openvpn/console.c || die
+ eautoreconf
+}
+
+src_configure() {
+ use static && LDFLAGS="${LDFLAGS} -Xcompiler -static"
+ local myconf
+ use polarssl && myconf="--with-crypto-library=polarssl"
+ econf \
+ ${myconf} \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --with-plugindir="${ROOT}/usr/$(get_libdir)/$PN" \
+ $(use_enable passwordsave password-save) \
+ $(use_enable ssl) \
+ $(use_enable ssl crypto) \
+ $(use_enable lzo) \
+ $(use_enable pkcs11) \
+ $(use_enable plugins) \
+ $(use_enable iproute2) \
+ $(use_enable pam plugin-auth-pam) \
+ $(use_enable down-root plugin-down-root) \
+ $(use_enable systemd)
+}
+
+src_install() {
+ default
+ find "${ED}/usr" -name '*.la' -delete
+ # install documentation
+ dodoc AUTHORS ChangeLog PORTS README README.IPv6
+
+ # Install some helper scripts
+ keepdir /etc/openvpn
+ exeinto /etc/openvpn
+ doexe "${FILESDIR}/up.sh"
+ doexe "${FILESDIR}/down.sh"
+
+ # Install the init script and config file
+ newinitd "${FILESDIR}/${PN}-2.1.init" openvpn
+ newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn
+
+ # install examples, controlled by the respective useflag
+ if use examples ; then
+ # dodoc does not supportly support directory traversal, #15193
+ insinto /usr/share/doc/${PF}/examples
+ doins -r sample contrib
+ fi
+
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
+ systemd_newunit "${FILESDIR}"/${PN}.service 'openvpn@.service'
+}
+
+pkg_postinst() {
+ # Add openvpn user so openvpn servers can drop privs
+ # Clients should run as root so they can change ip addresses,
+ # dns information and other such things.
+ enewgroup openvpn
+ enewuser openvpn "" "" "" openvpn
+
+ if [ path_exists -o "${ROOT}/etc/openvpn/*/local.conf" ] ; then
+ ewarn "WARNING: The openvpn init script has changed"
+ ewarn ""
+ fi
+
+ elog "The openvpn init script expects to find the configuration file"
+ elog "openvpn.conf in /etc/openvpn along with any extra files it may need."
+ elog ""
+ elog "To create more VPNs, simply create a new .conf file for it and"
+ elog "then create a symlink to the openvpn init script from a link called"
+ elog "openvpn.newconfname - like so"
+ elog " cd /etc/openvpn"
+ elog " ${EDITOR##*/} foo.conf"
+ elog " cd /etc/init.d"
+ elog " ln -s openvpn openvpn.foo"
+ elog ""
+ elog "You can then treat openvpn.foo as any other service, so you can"
+ elog "stop one vpn and start another if you need to."
+
+ if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then
+ ewarn ""
+ ewarn "WARNING: If you use the remote keyword then you are deemed to be"
+ ewarn "a client by our init script and as such we force up,down scripts."
+ ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you"
+ ewarn "can move your scripts to."
+ fi
+
+ if use plugins ; then
+ einfo ""
+ einfo "plugins have been installed into /usr/$(get_libdir)/${PN}"
+ fi
+
+ einfo ""
+ einfo "OpenVPN 2.3.x no longer includes the easy-rsa suite of utilities."
+ einfo "They can now be emerged via app-crypt/easy-rsa."
+}
diff --git a/net-misc/openvpn/openvpn-2.3.7.ebuild b/net-misc/openvpn/openvpn-2.3.7.ebuild
new file mode 100644
index 000000000000..03bdc5632b66
--- /dev/null
+++ b/net-misc/openvpn/openvpn-2.3.7.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit multilib flag-o-matic user systemd
+
+DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes"
+SRC_URI="http://swupdate.openvpn.net/community/releases/${P}.tar.gz"
+HOMEPAGE="http://openvpn.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="examples down-root iproute2 +lzo pam passwordsave pkcs11 +plugins polarssl selinux socks +ssl static systemd userland_BSD"
+
+REQUIRED_USE="static? ( !plugins !pkcs11 )
+ polarssl? ( ssl )
+ pkcs11? ( ssl )
+ !plugins? ( !pam !down-root )"
+
+DEPEND="
+ kernel_linux? (
+ iproute2? ( sys-apps/iproute2[-minimal] ) !iproute2? ( sys-apps/net-tools )
+ )
+ pam? ( virtual/pam )
+ ssl? (
+ !polarssl? ( >=dev-libs/openssl-0.9.7 ) polarssl? ( >=net-libs/polarssl-1.2.10 )
+ )
+ lzo? ( >=dev-libs/lzo-1.07 )
+ pkcs11? ( >=dev-libs/pkcs11-helper-1.11 )
+ systemd? ( sys-apps/systemd )"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-openvpn )
+"
+
+src_configure() {
+ use static && LDFLAGS="${LDFLAGS} -Xcompiler -static"
+ local myconf
+ use polarssl && myconf="--with-crypto-library=polarssl"
+ econf \
+ ${myconf} \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --with-plugindir="${ROOT}/usr/$(get_libdir)/$PN" \
+ $(use_enable passwordsave password-save) \
+ $(use_enable ssl) \
+ $(use_enable ssl crypto) \
+ $(use_enable lzo) \
+ $(use_enable pkcs11) \
+ $(use_enable plugins) \
+ $(use_enable iproute2) \
+ $(use_enable socks) \
+ $(use_enable pam plugin-auth-pam) \
+ $(use_enable down-root plugin-down-root) \
+ $(use_enable systemd)
+}
+
+src_install() {
+ default
+ find "${ED}/usr" -name '*.la' -delete
+ # install documentation
+ dodoc AUTHORS ChangeLog PORTS README README.IPv6
+
+ # Install some helper scripts
+ keepdir /etc/openvpn
+ exeinto /etc/openvpn
+ doexe "${FILESDIR}/up.sh"
+ doexe "${FILESDIR}/down.sh"
+
+ # Install the init script and config file
+ newinitd "${FILESDIR}/${PN}-2.1.init" openvpn
+ newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn
+
+ # install examples, controlled by the respective useflag
+ if use examples ; then
+ # dodoc does not supportly support directory traversal, #15193
+ insinto /usr/share/doc/${PF}/examples
+ doins -r sample contrib
+ fi
+
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
+ systemd_newunit distro/systemd/openvpn-client@.service openvpn-client@.service
+ systemd_newunit distro/systemd/openvpn-server@.service openvpn-server@.service
+}
+
+pkg_postinst() {
+ # Add openvpn user so openvpn servers can drop privs
+ # Clients should run as root so they can change ip addresses,
+ # dns information and other such things.
+ enewgroup openvpn
+ enewuser openvpn "" "" "" openvpn
+
+ if [ path_exists -o "${ROOT}/etc/openvpn/*/local.conf" ] ; then
+ ewarn "WARNING: The openvpn init script has changed"
+ ewarn ""
+ fi
+
+ elog "The openvpn init script expects to find the configuration file"
+ elog "openvpn.conf in /etc/openvpn along with any extra files it may need."
+ elog ""
+ elog "To create more VPNs, simply create a new .conf file for it and"
+ elog "then create a symlink to the openvpn init script from a link called"
+ elog "openvpn.newconfname - like so"
+ elog " cd /etc/openvpn"
+ elog " ${EDITOR##*/} foo.conf"
+ elog " cd /etc/init.d"
+ elog " ln -s openvpn openvpn.foo"
+ elog ""
+ elog "You can then treat openvpn.foo as any other service, so you can"
+ elog "stop one vpn and start another if you need to."
+
+ if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then
+ ewarn ""
+ ewarn "WARNING: If you use the remote keyword then you are deemed to be"
+ ewarn "a client by our init script and as such we force up,down scripts."
+ ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you"
+ ewarn "can move your scripts to."
+ fi
+
+ if use plugins ; then
+ einfo ""
+ einfo "plugins have been installed into /usr/$(get_libdir)/${PN}"
+ fi
+
+ einfo ""
+ einfo "OpenVPN 2.3.x no longer includes the easy-rsa suite of utilities."
+ einfo "They can now be emerged via app-crypt/easy-rsa."
+}
diff --git a/net-misc/openvpn/openvpn-2.3.8.ebuild b/net-misc/openvpn/openvpn-2.3.8.ebuild
new file mode 100644
index 000000000000..30418adf5994
--- /dev/null
+++ b/net-misc/openvpn/openvpn-2.3.8.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit multilib flag-o-matic user systemd
+
+DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes"
+SRC_URI="http://swupdate.openvpn.net/community/releases/${P}.tar.gz"
+HOMEPAGE="http://openvpn.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="examples down-root iproute2 +lzo pam passwordsave pkcs11 +plugins polarssl selinux socks +ssl static systemd userland_BSD"
+
+REQUIRED_USE="static? ( !plugins !pkcs11 )
+ polarssl? ( ssl )
+ pkcs11? ( ssl )
+ !plugins? ( !pam !down-root )"
+
+DEPEND="
+ kernel_linux? (
+ iproute2? ( sys-apps/iproute2[-minimal] ) !iproute2? ( sys-apps/net-tools )
+ )
+ pam? ( virtual/pam )
+ ssl? (
+ !polarssl? ( >=dev-libs/openssl-0.9.7 ) polarssl? ( >=net-libs/polarssl-1.2.10 )
+ )
+ lzo? ( >=dev-libs/lzo-1.07 )
+ pkcs11? ( >=dev-libs/pkcs11-helper-1.11 )
+ systemd? ( sys-apps/systemd )"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-openvpn )
+"
+
+src_configure() {
+ use static && LDFLAGS="${LDFLAGS} -Xcompiler -static"
+ local myconf
+ use polarssl && myconf="--with-crypto-library=polarssl"
+ econf \
+ ${myconf} \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --with-plugindir="${ROOT}/usr/$(get_libdir)/$PN" \
+ $(use_enable passwordsave password-save) \
+ $(use_enable ssl) \
+ $(use_enable ssl crypto) \
+ $(use_enable lzo) \
+ $(use_enable pkcs11) \
+ $(use_enable plugins) \
+ $(use_enable iproute2) \
+ $(use_enable socks) \
+ $(use_enable pam plugin-auth-pam) \
+ $(use_enable down-root plugin-down-root) \
+ $(use_enable systemd)
+}
+
+src_install() {
+ default
+ find "${ED}/usr" -name '*.la' -delete
+ # install documentation
+ dodoc AUTHORS ChangeLog PORTS README README.IPv6
+
+ # Install some helper scripts
+ keepdir /etc/openvpn
+ exeinto /etc/openvpn
+ doexe "${FILESDIR}/up.sh"
+ doexe "${FILESDIR}/down.sh"
+
+ # Install the init script and config file
+ newinitd "${FILESDIR}/${PN}-2.1.init" openvpn
+ newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn
+
+ # install examples, controlled by the respective useflag
+ if use examples ; then
+ # dodoc does not supportly support directory traversal, #15193
+ insinto /usr/share/doc/${PF}/examples
+ doins -r sample contrib
+ fi
+
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
+ systemd_newunit distro/systemd/openvpn-client@.service openvpn-client@.service
+ systemd_newunit distro/systemd/openvpn-server@.service openvpn-server@.service
+}
+
+pkg_postinst() {
+ # Add openvpn user so openvpn servers can drop privs
+ # Clients should run as root so they can change ip addresses,
+ # dns information and other such things.
+ enewgroup openvpn
+ enewuser openvpn "" "" "" openvpn
+
+ if [ path_exists -o "${ROOT}/etc/openvpn/*/local.conf" ] ; then
+ ewarn "WARNING: The openvpn init script has changed"
+ ewarn ""
+ fi
+
+ elog "The openvpn init script expects to find the configuration file"
+ elog "openvpn.conf in /etc/openvpn along with any extra files it may need."
+ elog ""
+ elog "To create more VPNs, simply create a new .conf file for it and"
+ elog "then create a symlink to the openvpn init script from a link called"
+ elog "openvpn.newconfname - like so"
+ elog " cd /etc/openvpn"
+ elog " ${EDITOR##*/} foo.conf"
+ elog " cd /etc/init.d"
+ elog " ln -s openvpn openvpn.foo"
+ elog ""
+ elog "You can then treat openvpn.foo as any other service, so you can"
+ elog "stop one vpn and start another if you need to."
+
+ if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then
+ ewarn ""
+ ewarn "WARNING: If you use the remote keyword then you are deemed to be"
+ ewarn "a client by our init script and as such we force up,down scripts."
+ ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you"
+ ewarn "can move your scripts to."
+ fi
+
+ if use plugins ; then
+ einfo ""
+ einfo "plugins have been installed into /usr/$(get_libdir)/${PN}"
+ fi
+
+ einfo ""
+ einfo "OpenVPN 2.3.x no longer includes the easy-rsa suite of utilities."
+ einfo "They can now be emerged via app-crypt/easy-rsa."
+}
diff --git a/net-misc/openvpn/openvpn-9999.ebuild b/net-misc/openvpn/openvpn-9999.ebuild
new file mode 100644
index 000000000000..bcfcb96158c6
--- /dev/null
+++ b/net-misc/openvpn/openvpn-9999.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit multilib autotools flag-o-matic user git-2
+
+DESCRIPTION="Robust and highly flexible tunneling application compatible with many OSes"
+EGIT_REPO_URI="https://github.com/OpenVPN/${PN}.git"
+HOMEPAGE="http://openvpn.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="examples down-root iproute2 +lzo pam passwordsave pkcs11 +plugins polarssl selinux socks +ssl static systemd userland_BSD"
+
+REQUIRED_USE="static? ( !plugins !pkcs11 )
+ polarssl? ( ssl )
+ !plugins? ( !pam !down-root )"
+
+DEPEND="
+ kernel_linux? (
+ iproute2? ( sys-apps/iproute2[-minimal] ) !iproute2? ( sys-apps/net-tools )
+ )
+ pam? ( virtual/pam )
+ ssl? (
+ !polarssl? ( >=dev-libs/openssl-0.9.7 ) polarssl? ( >=net-libs/polarssl-1.2.10 )
+ )
+ lzo? ( >=dev-libs/lzo-1.07 )
+ pkcs11? ( >=dev-libs/pkcs11-helper-1.11 )
+ systemd? ( sys-apps/systemd )"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-openvpn )
+"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ use static && LDFLAGS="${LDFLAGS} -Xcompiler -static"
+ local myconf
+ use polarssl && myconf="--with-crypto-library=polarssl"
+ econf \
+ ${myconf} \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --with-plugindir="${ROOT}/usr/$(get_libdir)/$PN" \
+ $(use_enable passwordsave password-save) \
+ $(use_enable ssl) \
+ $(use_enable ssl crypto) \
+ $(use_enable lzo) \
+ $(use_enable pkcs11) \
+ $(use_enable plugins) \
+ $(use_enable iproute2) \
+ $(use_enable socks) \
+ $(use_enable pam plugin-auth-pam) \
+ $(use_enable down-root plugin-down-root) \
+ $(use_enable systemd)
+}
+
+src_install() {
+ default
+ find "${ED}/usr" -name '*.la' -delete
+ # install documentation
+ dodoc AUTHORS ChangeLog PORTS README README.IPv6
+
+ # Install some helper scripts
+ keepdir /etc/openvpn
+ exeinto /etc/openvpn
+ doexe "${FILESDIR}/up.sh"
+ doexe "${FILESDIR}/down.sh"
+
+ # Install the init script and config file
+ newinitd "${FILESDIR}/${PN}-2.1.init" openvpn
+ newconfd "${FILESDIR}/${PN}-2.1.conf" openvpn
+
+ # install examples, controlled by the respective useflag
+ if use examples ; then
+ # dodoc does not supportly support directory traversal, #15193
+ insinto /usr/share/doc/${PF}/examples
+ doins -r sample contrib
+ fi
+
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfile ${PN}.conf
+ systemd_newunit distro/systemd/openvpn-client@.service openvpn-client@.service
+ systemd_newunit distro/systemd/openvpn-server@.service openvpn-server@.service
+}
+
+pkg_postinst() {
+ # Add openvpn user so openvpn servers can drop privs
+ # Clients should run as root so they can change ip addresses,
+ # dns information and other such things.
+ enewgroup openvpn
+ enewuser openvpn "" "" "" openvpn
+
+ if [ path_exists -o "${ROOT}/etc/openvpn/*/local.conf" ] ; then
+ ewarn "WARNING: The openvpn init script has changed"
+ ewarn ""
+ fi
+
+ elog "The openvpn init script expects to find the configuration file"
+ elog "openvpn.conf in /etc/openvpn along with any extra files it may need."
+ elog ""
+ elog "To create more VPNs, simply create a new .conf file for it and"
+ elog "then create a symlink to the openvpn init script from a link called"
+ elog "openvpn.newconfname - like so"
+ elog " cd /etc/openvpn"
+ elog " ${EDITOR##*/} foo.conf"
+ elog " cd /etc/init.d"
+ elog " ln -s openvpn openvpn.foo"
+ elog ""
+ elog "You can then treat openvpn.foo as any other service, so you can"
+ elog "stop one vpn and start another if you need to."
+
+ if grep -Eq "^[ \t]*(up|down)[ \t].*" "${ROOT}/etc/openvpn"/*.conf 2>/dev/null ; then
+ ewarn ""
+ ewarn "WARNING: If you use the remote keyword then you are deemed to be"
+ ewarn "a client by our init script and as such we force up,down scripts."
+ ewarn "These scripts call /etc/openvpn/\$SVCNAME-{up,down}.sh where you"
+ ewarn "can move your scripts to."
+ fi
+
+ if use plugins ; then
+ einfo ""
+ einfo "plugins have been installed into /usr/$(get_libdir)/${PN}"
+ fi
+
+ ewarn ""
+ ewarn "You are using a live ebuild building from the sources of openvpn"
+ ewarn "repository from http://openvpn.git.sourceforge.net. For reporting"
+ ewarn "bugs please contact: openvpn-devel@lists.sourceforge.net."
+}
diff --git a/net-misc/openvswitch/Manifest b/net-misc/openvswitch/Manifest
new file mode 100644
index 000000000000..b2eabd8f3763
--- /dev/null
+++ b/net-misc/openvswitch/Manifest
@@ -0,0 +1,6 @@
+DIST openvswitch-1.11.0.tar.gz 2551510 SHA256 007d7d3f2deabe5a3845d1045d23b6b1de174497a8e436091541221dd71833da SHA512 9c338a9e376c845ae5f273030263dbae52fa268350d943e65987d6840d9647194f715e36517c829be32200f1064e13a585bd5b2acb9fa2a7f32199bd4be31459 WHIRLPOOL fa7bc71f0f17f789ed0dc1dce953e1399f56c7529d13a10761f90a3b40a210e511722dda99a502fa2ef8f74ccc6ea5e8c3392c408bf00a85b5824bfa96fc7f24
+DIST openvswitch-2.0.0.tar.gz 2708774 SHA256 5060e2be69cce01c15f67b481482cb1a0eaa6ef5cbdbed592bac3c3ab2a390f8 SHA512 f6d36663b65d054d179e5a09a478cf45ae9510c8f3aa31bb2013aaee1b146ee21ce986bb8b9f63ac72036f94d0b415f30ab874451b661b855f46b44eaa42537d WHIRLPOOL be6ac428d5d01b751d8d6312e7e028a23160d44da62231cc84c21d42c19c8c5f6b9457c29c26e7b283db91b08a00d8b54368534a621e556c54e15c0682dad4a1
+DIST openvswitch-2.1.3.tar.gz 3080126 SHA256 43a2562fe5e8e48e997bfdb04691ffaaaefe73069b5699654538bf2f16ebfb1a SHA512 ede64d37f8bf4a475ab3e4a1e0cd83ae1f29df318f7834b804d9f334710ba43b25b9f562f8c7e91041e24f3121fd03e9e09fc789f398d352a2dceaa0576013dd WHIRLPOOL ddd6c1c733a7a139d58d0492ea8c0efa40065443f763faffd5964e5578acfe9b02ec1dd009c52843759d8a93027eb89412e768ca3e70d9ceeb0d030e791a9b7e
+DIST openvswitch-2.3.0.tar.gz 3259225 SHA256 011052645cd4c7afee2732e87d45e589a0540ac7b7523027d3be2d7c7db7c899 SHA512 f3a665bc84d8a6e282928db61ae648a826f273e44e34311a60e6f0e74a6ab10c8410cb374f0ce80abe7c58b9559a97388cdbfe2ef28ac4bedd2f5e52b3cd6ed1 WHIRLPOOL 0fc743b7d12c2ab9c6bea58ec3b80d7633f860c720acb2b61306ff5035d4f3bfeddf7b9bab44a21a1b7fb62c0c3828c2aaf7e9b9167a67ee2def065248ef329c
+DIST openvswitch-2.3.1.tar.gz 3266916 SHA256 21174901c311d54703b4a7f498be0c42e5d2cc68bdecb0090dbb555e2af4bcd2 SHA512 8ef4ca61b06a16b361436130bda3b119e4067e78837908fa1d509c3706bc0fe8cc8eb92c76fe439625aa6732a49cbbc6f26898f965b1bbb8b4062e21bcd2edf9 WHIRLPOOL 7556342957b8bb58667161fad37e544896a3b299384688f9edb8aa8675d7be613e6ea41bd0721f60736e52d157689a4f7e27efdd8d77e811073f6d0a9dc110b7
+DIST openvswitch-2.3.2.tar.gz 3277164 SHA256 386b11df94d06c68d391ee4091832360095bd3a14c72d454325fab284dad9887 SHA512 dfbd9d5b16aeecdc880efb910e0ec2e474dcc02515f0033b1e9466735387b39f2855bec49936a261aea66badb35e09598dbb9fc4b506e9a9e0c18d3441fea691 WHIRLPOOL ca3e767383ff4cc7527e037472ea3b98b7e36fcdc1b936919cc68c9d28b382264b6e485726e4ec266619656013c5b4e09d55a7808a8399f15246b67f264c5ff8
diff --git a/net-misc/openvswitch/files/atomic-test.patch b/net-misc/openvswitch/files/atomic-test.patch
new file mode 100644
index 000000000000..14de564de9cb
--- /dev/null
+++ b/net-misc/openvswitch/files/atomic-test.patch
@@ -0,0 +1,14 @@
+Description: Link atomic test with -latomic for powerpc.
+Author: Adam Conrad <adconrad@ubuntu.com>
+
+--- openvswitch-2.0.0.orig/tests/automake.mk
++++ openvswitch-2.0.0/tests/automake.mk
+@@ -181,7 +181,7 @@ tests_test_aes128_LDADD = lib/libopenvsw
+
+ noinst_PROGRAMS += tests/test-atomic
+ tests_test_atomic_SOURCES = tests/test-atomic.c
+-tests_test_atomic_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
++tests_test_atomic_LDADD = lib/libopenvswitch.a $(SSL_LIBS) -latomic
+
+ noinst_PROGRAMS += tests/test-bundle
+ tests_test_bundle_SOURCES = tests/test-bundle.c
diff --git a/net-misc/openvswitch/files/configure.patch b/net-misc/openvswitch/files/configure.patch
new file mode 100644
index 000000000000..47f5614d8eda
--- /dev/null
+++ b/net-misc/openvswitch/files/configure.patch
@@ -0,0 +1,15 @@
+--- configure.orig 2014-01-27 21:55:14.116272645 +0200
++++ configure 2014-01-27 21:55:40.687273108 +0200
+@@ -7949,10 +7949,10 @@
+ $as_echo "$kversion" >&6; }
+
+ if test "$version" -ge 3; then
+- if test "$version" = 3 && test "$patchlevel" -le 10; then
++ if test "$version" = 3 && test "$patchlevel" -le 12; then
+ : # Linux 3.x
+ else
+- as_fn_error $? "Linux kernel in $KBUILD is version $kversion, but version newer than 3.10.x is not supported" "$LINENO" 5
++ as_fn_error $? "Linux kernel in $KBUILD is version $kversion, but version newer than 3.12.x is not supported" "$LINENO" 5
+ fi
+ else
+ if test "$version" -le 1 || test "$patchlevel" -le 5 || test "$sublevel" -le 31; then
diff --git a/net-misc/openvswitch/files/kernel-3.11-support.patch b/net-misc/openvswitch/files/kernel-3.11-support.patch
new file mode 100644
index 000000000000..7ee53d83500f
--- /dev/null
+++ b/net-misc/openvswitch/files/kernel-3.11-support.patch
@@ -0,0 +1,68 @@
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -134,10 +134,10 @@ AC_DEFUN([OVS_CHECK_LINUX], [
+ AC_MSG_RESULT([$kversion])
+
+ if test "$version" -ge 3; then
+- if test "$version" = 3 && test "$patchlevel" -le 10; then
++ if test "$version" = 3 && test "$patchlevel" -le 11; then
+ : # Linux 3.x
+ else
+- AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 3.10.x is not supported])
++ AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 3.11.x is not supported])
+ fi
+ else
+ if test "$version" -le 1 || test "$patchlevel" -le 5 || test "$sublevel" -le 31; then
+--- a/datapath/dp_notify.c
++++ b/datapath/dp_notify.c
+@@ -79,7 +79,7 @@ static int dp_device_event(struct notifi
+ void *ptr)
+ {
+ struct ovs_net *ovs_net;
+- struct net_device *dev = ptr;
++ struct net_device *dev = netdev_notifier_info_to_dev(ptr);
+ struct vport *vport = NULL;
+
+ if (!ovs_is_internal_dev(dev))
+--- a/datapath/linux/compat/include/linux/netdevice.h
++++ b/datapath/linux/compat/include/linux/netdevice.h
+@@ -120,4 +120,11 @@ static inline void netdev_upper_dev_unli
+ }
+ #endif
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
++static inline struct net_device *netdev_notifier_info_to_dev(void *info)
++{
++ return info;
++}
++#endif
++
+ #endif
+--- a/datapath/linux/compat/include/net/gre.h
++++ b/datapath/linux/compat/include/net/gre.h
+@@ -74,12 +74,17 @@ static inline __be16 tnl_flags_to_gre_fl
+ #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) */
+
+ #define MAX_GRE_PROTO_PRIORITY 255
++#define gre_cisco_protocol rpl_gre_cisco_protocol
++
+ struct gre_cisco_protocol {
+ int (*handler)(struct sk_buff *skb, const struct tnl_ptk_info *tpi);
+ u8 priority;
+ };
+
++#define gre_cisco_register rpl_gre_cisco_register
+ int gre_cisco_register(struct gre_cisco_protocol *proto);
++
++#define gre_cisco_unregister rpl_gre_cisco_unregister
+ int gre_cisco_unregister(struct gre_cisco_protocol *proto);
+
+ #define gre_build_header rpl_gre_build_header
+@@ -89,6 +94,7 @@ void gre_build_header(struct sk_buff *sk
+ #define gre_handle_offloads rpl_gre_handle_offloads
+ struct sk_buff *gre_handle_offloads(struct sk_buff *skb, bool gre_csum);
+
++#define ip_gre_calc_hlen rpl_ip_gre_calc_hlen
+ static inline int ip_gre_calc_hlen(__be16 o_flags)
+ {
+ int addend = 4;
diff --git a/net-misc/openvswitch/files/kernel-3.12-support.patch b/net-misc/openvswitch/files/kernel-3.12-support.patch
new file mode 100644
index 000000000000..85f19ecc2ab2
--- /dev/null
+++ b/net-misc/openvswitch/files/kernel-3.12-support.patch
@@ -0,0 +1,19 @@
+Description: Enable support for 3.12 kernel
+Author: James Page <james.page@ubuntu.com>
+Forwarded: no
+
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -134,10 +134,10 @@ AC_DEFUN([OVS_CHECK_LINUX], [
+ AC_MSG_RESULT([$kversion])
+
+ if test "$version" -ge 3; then
+- if test "$version" = 3 && test "$patchlevel" -le 11; then
++ if test "$version" = 3 && test "$patchlevel" -le 12; then
+ : # Linux 3.x
+ else
+- AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 3.11.x is not supported])
++ AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 3.12.x is not supported])
+ fi
+ else
+ if test "$version" -le 1 || test "$patchlevel" -le 5 || test "$sublevel" -le 31; then
diff --git a/net-misc/openvswitch/files/openvswitch.tmpfiles b/net-misc/openvswitch/files/openvswitch.tmpfiles
new file mode 100644
index 000000000000..58c583ee4747
--- /dev/null
+++ b/net-misc/openvswitch/files/openvswitch.tmpfiles
@@ -0,0 +1 @@
+d /var/run/openvswitch 0770 root root -
diff --git a/net-misc/openvswitch/files/ovs-controller-r1 b/net-misc/openvswitch/files/ovs-controller-r1
new file mode 100644
index 000000000000..1fedaacf443d
--- /dev/null
+++ b/net-misc/openvswitch/files/ovs-controller-r1
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="Open vSwitch OpenFlow controller"
+
+command="/usr/bin/ovs-controller"
+command_args="
+ --pidfile
+ --detach
+ --monitor
+ ${OPTIONS} ${METHODS}"
+pidfile="/var/run/openvswitch/ovs-controller.pid"
+
+depend() {
+ need net
+ use logger
+}
+
+start_pre() {
+ checkpath -d "/var/run/openvswitch" -m 0750
+}
diff --git a/net-misc/openvswitch/files/ovs-controller.service b/net-misc/openvswitch/files/ovs-controller.service
new file mode 100644
index 000000000000..723c5caa1f6e
--- /dev/null
+++ b/net-misc/openvswitch/files/ovs-controller.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Open vSwitch OpenFlow controller
+Requires=network.target
+
+[Service]
+ExecStart=/usr/bin/ovs-controller --monitor ptcp:
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/openvswitch/files/ovs-controller_conf b/net-misc/openvswitch/files/ovs-controller_conf
new file mode 100644
index 000000000000..1756c9b98bc4
--- /dev/null
+++ b/net-misc/openvswitch/files/ovs-controller_conf
@@ -0,0 +1,7 @@
+
+# Space separated list of methods to listen for OpenFlow connections from switches
+# The default ist "ptcp:" which starts ovs-controller listening on port 6633 on all interfaces.
+METHODS="ptcp:"
+
+# Additional options
+# OPTIONS=""
diff --git a/net-misc/openvswitch/files/ovs-vswitchd-r1 b/net-misc/openvswitch/files/ovs-vswitchd-r1
new file mode 100644
index 000000000000..643d5fd0cc77
--- /dev/null
+++ b/net-misc/openvswitch/files/ovs-vswitchd-r1
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="Open vSwitch virtual switch"
+
+command="/usr/sbin/ovs-vswitchd"
+command_args="
+ --pidfile
+ --detach
+ --monitor
+ ${OPTIONS} ${DATABASE}"
+pidfile="/var/run/openvswitch/ovs-vswitchd.pid"
+
+depend() {
+ use ovsdb-server logger
+}
+
+start_pre() {
+ checkpath -d "/var/run/openvswitch" -m 0750
+}
diff --git a/net-misc/openvswitch/files/ovs-vswitchd.service b/net-misc/openvswitch/files/ovs-vswitchd.service
new file mode 100644
index 000000000000..266bb0ace884
--- /dev/null
+++ b/net-misc/openvswitch/files/ovs-vswitchd.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Open vSwitch Daemon
+Documentation=man:ovs-vswitchd
+Wants=network.target
+Before=network.target
+Requires=ovsdb-server.service
+After=ovsdb-server.service
+
+[Service]
+ExecStart=/usr/sbin/ovs-vswitchd --mlockall --monitor unix:/var/run/openvswitch/db.sock
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/openvswitch/files/ovs-vswitchd_conf b/net-misc/openvswitch/files/ovs-vswitchd_conf
new file mode 100644
index 000000000000..c9eadb41862b
--- /dev/null
+++ b/net-misc/openvswitch/files/ovs-vswitchd_conf
@@ -0,0 +1,6 @@
+
+# Connection string for the configuration database (usually a unix socket)
+DATABASE="unix:/var/run/openvswitch/db.sock"
+
+# Additional options
+OPTIONS="--mlockall"
diff --git a/net-misc/openvswitch/files/ovsdb-server-r1 b/net-misc/openvswitch/files/ovsdb-server-r1
new file mode 100644
index 000000000000..9a8ca016287d
--- /dev/null
+++ b/net-misc/openvswitch/files/ovsdb-server-r1
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="Open vSwitch database server"
+
+remote_punix=${DB_SOCKET:+"--remote=punix:${DB_SOCKET}"}
+remote_db=${REMOTE_DB:+"--remote=${REMOTE_DB}"}
+private_key=${PRIVATE_KEY:+"--private-key=${PRIVATE_KEY}"}
+certificate=${CERTIFICATE:+"--certificate=${CERTIFICATE}"}
+bootstrap_ca_cert=${BOOTSTRAP_CA_CERT:+"--bootstrap-ca-cert=${BOOTSTRAP_CA_CERT}"}
+
+command="/usr/sbin/ovsdb-server"
+command_args="
+ --pidfile
+ --detach
+ --monitor
+ ${remote_punix}
+ ${remote_db}
+ ${private_key}
+ ${certificate}
+ ${bootstrap_ca_cert}
+ ${DATABASE}
+ ${OPTIONS}"
+pidfile="/var/run/openvswitch/ovsdb-server.pid"
+
+depend() {
+ need localmount
+ use logger
+}
+
+start_pre() {
+ checkpath -d "/var/run/openvswitch" -m 0750
+}
diff --git a/net-misc/openvswitch/files/ovsdb-server.service b/net-misc/openvswitch/files/ovsdb-server.service
new file mode 100644
index 000000000000..9493c40755d8
--- /dev/null
+++ b/net-misc/openvswitch/files/ovsdb-server.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Open vSwitch Database Server
+Documentation=man:ovsdb-server
+
+[Service]
+# The file can be shared for this as this values are prone to change
+# and that way we don't need to update them in two different places
+EnvironmentFile=/etc/conf.d/ovsdb-server
+ExecStart=/usr/sbin/ovsdb-server --monitor \
+ --remote=punix:${DB_SOCKET} \
+ --remote=${REMOTE_DB} \
+ --private-key=${PRIVATE_KEY} \
+ --certificate=${CERTIFICATE} \
+ --bootstrap-ca-cert=${BOOTSTRAP_CA_CERT}
diff --git a/net-misc/openvswitch/files/ovsdb-server_conf b/net-misc/openvswitch/files/ovsdb-server_conf
new file mode 100644
index 000000000000..1299b820640c
--- /dev/null
+++ b/net-misc/openvswitch/files/ovsdb-server_conf
@@ -0,0 +1,16 @@
+# Socket for bringing the server up
+DB_SOCKET="/var/run/openvswitch/db.sock"
+
+# Remote sockets are defined in the database by default
+REMOTE_DB="db:Open_vSwitch,manager_options"
+
+# All certificates and keys are stored in the database (if any)
+PRIVATE_KEY="db:SSL,private_key"
+CERTIFICATE="db:SSL,certificate"
+BOOTSTRAP_CA_CERT="db:SSL,ca_cert"
+
+# Alternative path for the database (default is /etc/openvswitch/conf.db)
+# DATABASE="/etc/openvswitch/conf.db"
+
+# Additional options
+# OPTIONS=""
diff --git a/net-misc/openvswitch/files/ovsdb-server_conf2 b/net-misc/openvswitch/files/ovsdb-server_conf2
new file mode 100644
index 000000000000..97367b9717e7
--- /dev/null
+++ b/net-misc/openvswitch/files/ovsdb-server_conf2
@@ -0,0 +1,16 @@
+# Socket for bringing the server up
+DB_SOCKET="/var/run/openvswitch/db.sock"
+
+# Remote sockets are defined in the database by default
+REMOTE_DB="db:Open_vSwitch,Open_vSwitch,manager_options"
+
+# All certificates and keys are stored in the database (if any)
+PRIVATE_KEY="db:Open_vSwitch,SSL,private_key"
+CERTIFICATE="db:Open_vSwitch,SSL,certificate"
+BOOTSTRAP_CA_CERT="db:Open_vSwitch,SSL,ca_cert"
+
+# Alternative path for the database (default is /etc/openvswitch/conf.db)
+# DATABASE="/etc/openvswitch/conf.db"
+
+# Additional options
+# OPTIONS=""
diff --git a/net-misc/openvswitch/files/prevent-traceback.patch b/net-misc/openvswitch/files/prevent-traceback.patch
new file mode 100644
index 000000000000..858f24c2f595
--- /dev/null
+++ b/net-misc/openvswitch/files/prevent-traceback.patch
@@ -0,0 +1,107 @@
+commit d4d1107c3a49a4dadf6dc8ac55d6fefa25a8e06a
+Author: Alexei Starovoitov <ast@plumgrid.com>
+Date: Wed Oct 16 15:28:23 2013 -0700
+
+ cherry-pick 8e04c6e10c28e42c715eb9fef749554c123bddbc
+
+diff --git a/AUTHORS b/AUTHORS
+index 2d29e66..7a62704 100644
+--- a/AUTHORS
++++ b/AUTHORS
+@@ -2,6 +2,8 @@ The following people, in alphabetical order, have either authored or
+ signed off on commits in the Open vSwitch version control repository.
+
+ Aaron Rosen arosen@clemson.edu
++Alexandru Copot alex.mihai.c@gmail.com
++Alexei Starovoitov ast@plumgrid.com
+ Alexey I. Froloff raorn@altlinux.org
+ Alex Wang alexw@nicira.com
+ Andrew Evans aevans@nicira.com
+diff --git a/datapath/dp_notify.c b/datapath/dp_notify.c
+index 847f611..a973623 100644
+--- a/datapath/dp_notify.c
++++ b/datapath/dp_notify.c
+@@ -66,8 +66,7 @@ void ovs_dp_notify_wq(struct work_struct *work)
+ continue;
+
+ netdev_vport = netdev_vport_priv(vport);
+- if (netdev_vport->dev->reg_state == NETREG_UNREGISTERED ||
+- netdev_vport->dev->reg_state == NETREG_UNREGISTERING)
++ if (!(ovs_netdev_get_vport(netdev_vport->dev)))
+ dp_detach_port_notify(vport);
+ }
+ }
+@@ -89,6 +88,10 @@ static int dp_device_event(struct notifier_block *unused, unsigned long event,
+ return NOTIFY_DONE;
+
+ if (event == NETDEV_UNREGISTER) {
++ /* upper_dev_unlink and decrement promisc immediately */
++ ovs_netdev_detach_dev(vport);
++
++ /* schedule vport destroy, dev_put and genl notification */
+ ovs_net = net_generic(dev_net(dev), ovs_net_id);
+ queue_work(&ovs_net->dp_notify_work);
+ }
+diff --git a/datapath/linux/compat/include/linux/netdevice.h b/datapath/linux/compat/include/linux/netdevice.h
+index 4e2b7f5..908ed86 100644
+--- a/datapath/linux/compat/include/linux/netdevice.h
++++ b/datapath/linux/compat/include/linux/netdevice.h
+@@ -118,6 +118,11 @@ static inline void netdev_upper_dev_unlink(struct net_device *dev,
+ struct net_device *upper_dev)
+ {
+ }
++
++static inline struct net_device *netdev_master_upper_dev_get(struct net_device *dev)
++{
++ return NULL;
++}
+ #endif
+
+ #endif
+diff --git a/datapath/vport-netdev.c b/datapath/vport-netdev.c
+index 215a47e..0c9f603 100644
+--- a/datapath/vport-netdev.c
++++ b/datapath/vport-netdev.c
+@@ -201,16 +201,27 @@ static void free_port_rcu(struct rcu_head *rcu)
+ ovs_vport_free(vport_from_priv(netdev_vport));
+ }
+
+-static void netdev_destroy(struct vport *vport)
++void ovs_netdev_detach_dev(struct vport *vport)
+ {
+ struct netdev_vport *netdev_vport = netdev_vport_priv(vport);
+
+- netdev_exit();
+- rtnl_lock();
++ ASSERT_RTNL();
+ netdev_vport->dev->priv_flags &= ~IFF_OVS_DATAPATH;
+ netdev_rx_handler_unregister(netdev_vport->dev);
+- netdev_upper_dev_unlink(netdev_vport->dev, get_dpdev(vport->dp));
++ netdev_upper_dev_unlink(netdev_vport->dev,
++ netdev_master_upper_dev_get(netdev_vport->dev));
+ dev_set_promiscuity(netdev_vport->dev, -1);
++}
++
++static void netdev_destroy(struct vport *vport)
++{
++ struct netdev_vport *netdev_vport = netdev_vport_priv(vport);
++
++ netdev_exit();
++
++ rtnl_lock();
++ if (ovs_netdev_get_vport(netdev_vport->dev))
++ ovs_netdev_detach_dev(vport);
+ rtnl_unlock();
+
+ call_rcu(&netdev_vport->rcu, free_port_rcu);
+diff --git a/datapath/vport-netdev.h b/datapath/vport-netdev.h
+index dd298b5..8df01c1 100644
+--- a/datapath/vport-netdev.h
++++ b/datapath/vport-netdev.h
+@@ -39,5 +39,6 @@ netdev_vport_priv(const struct vport *vport)
+ }
+
+ const char *ovs_netdev_get_name(const struct vport *);
++void ovs_netdev_detach_dev(struct vport *);
+
+ #endif /* vport_netdev.h */
diff --git a/net-misc/openvswitch/files/xcp-interface-reconfigure-2.3.2.patch b/net-misc/openvswitch/files/xcp-interface-reconfigure-2.3.2.patch
new file mode 100644
index 000000000000..e5f813b6755a
--- /dev/null
+++ b/net-misc/openvswitch/files/xcp-interface-reconfigure-2.3.2.patch
@@ -0,0 +1,20 @@
+Description: Use xcp-xapi interface-reconfigure if found
+ Ubuntu/Debian provide the XCP interface-reconfigure hook in
+ a FHS compliant location; use this if found.
+Author: James Page <james.page@ubuntu.com>
+Ubuntu-Bug: https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/1195053
+Forwarded: no
+
+--- a/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update
++++ b/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update
+@@ -43,6 +43,10 @@ def delete_cacert():
+ def update(session, args):
+ # Refresh bridge network UUIDs in case this host joined or left a pool.
+ script = '/opt/xensource/libexec/interface-reconfigure'
++ # NOTE(jamespage): Override with distro xcp xapi locations
++ # if present
++ if os.path.exists('/usr/lib/xcp/lib/interface-reconfigure'):
++ script = '/usr/lib/xcp/lib/interface-reconfigure'
+ try:
+ retval = subprocess.call([script, 'rewrite'])
+ if retval != 0:
diff --git a/net-misc/openvswitch/files/xcp-interface-reconfigure.patch b/net-misc/openvswitch/files/xcp-interface-reconfigure.patch
new file mode 100644
index 000000000000..8f685b8157f5
--- /dev/null
+++ b/net-misc/openvswitch/files/xcp-interface-reconfigure.patch
@@ -0,0 +1,20 @@
+Description: Use xcp-xapi interface-reconfigure if found
+ Ubuntu/Debian provide the XCP interface-reconfigure hook in
+ a FHS compliant location; use this if found.
+Author: James Page <james.page@ubuntu.com>
+Ubuntu-Bug: https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/1195053
+Forwarded: no
+
+--- a/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update
++++ b/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update
+@@ -43,6 +43,10 @@ def delete_cacert():
+ def update(session, args):
+ # Refresh bridge network UUIDs in case this host joined or left a pool.
+ script = "/opt/xensource/libexec/interface-reconfigure"
++ # NOTE(jamespage): Override with distro xcp xapi locations
++ # if present
++ if os.path.exists('/usr/lib/xcp/lib/interface-reconfigure'):
++ script = '/usr/lib/xcp/lib/interface-reconfigure'
+ try:
+ retval = subprocess.call([script, "rewrite"])
+ if retval != 0:
diff --git a/net-misc/openvswitch/metadata.xml b/net-misc/openvswitch/metadata.xml
new file mode 100644
index 000000000000..5086e508e695
--- /dev/null
+++ b/net-misc/openvswitch/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>dev-zero@gentoo.org</email>
+</maintainer>
+<maintainer>
+<email>prometheanfire@gentoo.org</email>
+</maintainer>
+<herd>virtualization</herd>
+<use>
+ <flag name='monitor'>Build the Python and GUI dependent monitor applications</flag>
+ <flag name='pyside'>Use <pkg>dev-python/pyside</pkg> instead of <pkg>dev-python/PyQt4</pkg> for Python/Qt-bindings when building with USE=monitor.</flag>
+</use>
+</pkgmetadata>
diff --git a/net-misc/openvswitch/openvswitch-1.11.0.ebuild b/net-misc/openvswitch/openvswitch-1.11.0.ebuild
new file mode 100644
index 000000000000..ca4153cec5dd
--- /dev/null
+++ b/net-misc/openvswitch/openvswitch-1.11.0.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils linux-info linux-mod python-single-r1
+
+DESCRIPTION="Production quality, multilayer virtual switch"
+HOMEPAGE="http://openvswitch.org"
+SRC_URI="http://openvswitch.org/releases/${P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug modules monitor +pyside +ssl"
+
+RDEPEND=">=sys-apps/openrc-0.10.5
+ ssl? ( dev-libs/openssl )
+ monitor? (
+ ${PYTHON_DEPS}
+ dev-python/twisted-core[${PYTHON_USEDEP}]
+ dev-python/twisted-conch[${PYTHON_USEDEP}]
+ dev-python/twisted-web[${PYTHON_USEDEP}]
+ pyside? ( dev-python/pyside[${PYTHON_USEDEP}] )
+ !pyside? ( dev-python/PyQt4[${PYTHON_USEDEP}] )
+ dev-python/zope-interface[${PYTHON_USEDEP}] )
+ debug? ( dev-lang/perl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+CONFIG_CHECK="~NET_CLS_ACT ~NET_CLS_U32 ~NET_SCH_INGRESS ~NET_ACT_POLICE ~IPV6 ~TUN"
+MODULE_NAMES="openvswitch(net:${S}/datapath/linux)"
+BUILD_TARGETS="all"
+
+pkg_setup() {
+ if use modules ; then
+ CONFIG_CHECK+=" ~!OPENVSWITCH"
+ linux-mod_pkg_setup
+ kernel_is ge 2 6 18 || die "Linux >=2.6.18 and <3.2.9 required"
+ kernel_is lt 3 9 || die "Linux >=2.6.18 and <3.9 required"
+ else
+ CONFIG_CHECK+=" ~OPENVSWITCH"
+ linux-info_pkg_setup
+ fi
+ use monitor && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Never build kernelmodules, doing this manually
+ sed -i \
+ -e '/^SUBDIRS/d' \
+ datapath/Makefile.in || die "sed failed"
+}
+src_configure() {
+ set_arch_to_kernel
+ use monitor || export ovs_cv_python="no"
+ use pyside || export ovs_cv_pyuic4="no"
+
+ local linux_config
+ use modules && linux_config="--with-linux=${KERNEL_DIR}"
+
+ econf ${linux_config} \
+ --with-rundir=/var/run/openvswitch \
+ --with-logdir=/var/log/openvswitch \
+ --with-pkidir=/etc/ssl/openvswitch \
+ --with-dbdir=/var/lib/openvswitch \
+ $(use_enable ssl) \
+ $(use_enable !debug ndebug)
+}
+
+src_compile() {
+ default
+
+ use monitor && python_fix_shebang \
+ utilities/ovs-{pcap,tcpundump,test,vlan-test} \
+ utilities/bugtool/ovs-bugtool \
+ ovsdb/ovsdbmonitor/ovsdbmonitor
+
+ use modules && linux-mod_src_compile
+}
+
+src_install() {
+ default
+
+ if use monitor ; then
+ python_domodule "${ED}"/usr/share/openvswitch/python/*
+ rm -r "${ED}/usr/share/openvswitch/python"
+ python_optimize "${ED}/usr/share/ovsdbmonitor"
+ fi
+
+ keepdir /var/{lib,log}/openvswitch
+ keepdir /etc/ssl/openvswitch
+ fperms 0750 /etc/ssl/openvswitch
+
+ rm -rf "${ED}/var/run"
+ use monitor || rmdir "${ED}/usr/share/ovsdbmonitor"
+ use debug || rm "${ED}/usr/bin/ovs-parse-leaks"
+
+ newconfd "${FILESDIR}/ovsdb-server_conf" ovsdb-server
+ newconfd "${FILESDIR}/ovs-vswitchd_conf" ovs-vswitchd
+ newconfd "${FILESDIR}/ovs-controller_conf" ovs-controller
+ newinitd "${FILESDIR}/ovsdb-server-r1" ovsdb-server
+ newinitd "${FILESDIR}/ovs-vswitchd-r1" ovs-vswitchd
+ newinitd "${FILESDIR}/ovs-controller-r1" ovs-controller
+
+ insinto /etc/logrotate.d
+ newins rhel/etc_logrotate.d_openvswitch openvswitch
+
+ use modules && linux-mod_src_install
+}
+
+pkg_postinst() {
+ use modules && linux-mod_pkg_postinst
+
+ for pv in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.9.0 ${pv} ; then
+ ewarn "The configuration database for Open vSwitch got moved in version 1.9.0 from"
+ ewarn " /etc/openvswitch"
+ ewarn "to"
+ ewarn " /var/lib/openvswitch"
+ ewarn "Please copy/move the database manually before running the schema upgrade."
+ ewarn "The PKI files are now supposed to go to /etc/ssl/openvswitch"
+ fi
+ done
+
+ elog "Use the following command to create an initial database for ovsdb-server:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ elog "(will create a database in /var/lib/openvswitch/conf.db)"
+ elog "or to convert the database to the current schema after upgrading."
+}
+
+pkg_config() {
+ local db="${EPREFIX}/var/lib/openvswitch/conf.db"
+ if [ -e "${db}" ] ; then
+ einfo "Database '${db}' already exists, doing schema migration..."
+ einfo "(if the migration fails, make sure that ovsdb-server is not running)"
+ "${EPREFIX}/usr/bin/ovsdb-tool" convert "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "converting database failed"
+ else
+ einfo "Creating new database '${db}'..."
+ "${EPREFIX}/usr/bin/ovsdb-tool" create "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "creating database failed"
+ fi
+}
diff --git a/net-misc/openvswitch/openvswitch-2.0.0-r3.ebuild b/net-misc/openvswitch/openvswitch-2.0.0-r3.ebuild
new file mode 100644
index 000000000000..900ce4b536fe
--- /dev/null
+++ b/net-misc/openvswitch/openvswitch-2.0.0-r3.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils linux-info linux-mod python-single-r1 systemd autotools
+
+DESCRIPTION="Production quality, multilayer virtual switch"
+HOMEPAGE="http://openvswitch.org"
+SRC_URI="http://openvswitch.org/releases/${P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug modules monitor +ssl"
+
+RDEPEND=">=sys-apps/openrc-0.10.5
+ ssl? ( dev-libs/openssl )
+ monitor? (
+ ${PYTHON_DEPS}
+ dev-python/twisted-core
+ dev-python/twisted-conch
+ dev-python/twisted-web
+ dev-python/PyQt4[${PYTHON_USEDEP}]
+ dev-python/zope-interface[${PYTHON_USEDEP}] )
+ debug? ( dev-lang/perl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+CONFIG_CHECK="~NET_CLS_ACT ~NET_CLS_U32 ~NET_SCH_INGRESS ~NET_ACT_POLICE ~IPV6 ~TUN"
+MODULE_NAMES="openvswitch(net:${S}/datapath/linux)"
+BUILD_TARGETS="all"
+
+pkg_setup() {
+ if use modules ; then
+ CONFIG_CHECK+=" ~!OPENVSWITCH"
+ kernel_is ge 2 6 32 || die "Linux >=2.6.32 and <3.10 required"
+ kernel_is lt 3 14 || die "Linux >=2.6.18 and <3.14 required"
+ linux-mod_pkg_setup
+ else
+ CONFIG_CHECK+=" ~OPENVSWITCH"
+ linux-info_pkg_setup
+ fi
+ use monitor && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Never build kernelmodules, doing this manually
+ sed -i \
+ -e '/^SUBDIRS/d' \
+ datapath/Makefile.in || die "sed failed"
+ epatch "${FILESDIR}/prevent-traceback.patch"
+ epatch "${FILESDIR}/kernel-3.11-support.patch"
+ epatch "${FILESDIR}/xcp-interface-reconfigure.patch"
+# epatch "${FILESDIR}/atomic-test.patch"
+ epatch "${FILESDIR}/kernel-3.12-support.patch"
+ epatch "${FILESDIR}/configure.patch"
+ eautoreconf
+}
+src_configure() {
+ set_arch_to_kernel
+ use monitor || export ovs_cv_python="no"
+ #pyside is staticly disabled
+ export ovs_cv_pyuic4="no"
+
+ local linux_config
+ use modules && linux_config="--with-linux=${KV_OUT_DIR}"
+
+ econf ${linux_config} \
+ --with-rundir=/var/run/openvswitch \
+ --with-logdir=/var/log/openvswitch \
+ --with-pkidir=/etc/ssl/openvswitch \
+ --with-dbdir=/var/lib/openvswitch \
+ $(use_enable ssl) \
+ $(use_enable !debug ndebug)
+}
+
+src_compile() {
+ default
+
+ use monitor && python_fix_shebang \
+ utilities/ovs-{pcap,tcpundump,test,vlan-test} \
+ utilities/bugtool/ovs-bugtool \
+ ovsdb/ovsdbmonitor/ovsdbmonitor
+
+ use modules && linux-mod_src_compile
+}
+
+src_install() {
+ default
+
+ if use monitor ; then
+ python_domodule "${ED}"/usr/share/openvswitch/python/*
+ rm -r "${ED}/usr/share/openvswitch/python"
+ python_optimize "${ED}/usr/share/ovsdbmonitor"
+ fi
+ # not working without the brcompat_mod kernel module which did not get
+ # included in the kernel and we can't build it anymore
+ rm "${D}/usr/sbin/ovs-brcompatd" "${D}/usr/share/man/man8/ovs-brcompatd.8"
+
+ keepdir /var/{lib,log}/openvswitch
+ keepdir /etc/ssl/openvswitch
+ fperms 0750 /etc/ssl/openvswitch
+
+ rm -rf "${ED}/var/run"
+ use monitor || rmdir "${ED}/usr/share/ovsdbmonitor"
+ use debug || rm "${ED}/usr/bin/ovs-parse-leaks"
+
+ newconfd "${FILESDIR}/ovsdb-server_conf2" ovsdb-server
+ newconfd "${FILESDIR}/ovs-vswitchd_conf" ovs-vswitchd
+ newconfd "${FILESDIR}/ovs-controller_conf" ovs-controller
+ newinitd "${FILESDIR}/ovsdb-server-r1" ovsdb-server
+ newinitd "${FILESDIR}/ovs-vswitchd-r1" ovs-vswitchd
+ newinitd "${FILESDIR}/ovs-controller-r1" ovs-controller
+
+ systemd_dounit "${FILESDIR}/ovsdb-server.service"
+ systemd_dounit "${FILESDIR}/ovs-vswitchd.service"
+ systemd_dounit "${FILESDIR}/ovs-controller.service"
+ systemd_newtmpfilesd "${FILESDIR}/openvswitch.tmpfiles" openvswitch.conf
+
+ insinto /etc/logrotate.d
+ newins rhel/etc_logrotate.d_openvswitch openvswitch
+
+ use modules && linux-mod_src_install
+}
+
+pkg_postinst() {
+ use modules && linux-mod_pkg_postinst
+
+ for pv in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.9.0 ${pv} ; then
+ ewarn "The configuration database for Open vSwitch got moved in version 1.9.0 from"
+ ewarn " /etc/openvswitch"
+ ewarn "to"
+ ewarn " /var/lib/openvswitch"
+ ewarn "Please copy/move the database manually before running the schema upgrade."
+ ewarn "The PKI files are now supposed to go to /etc/ssl/openvswitch"
+ fi
+ done
+
+ elog "Use the following command to create an initial database for ovsdb-server:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ elog "(will create a database in /var/lib/openvswitch/conf.db)"
+ elog "or to convert the database to the current schema after upgrading."
+}
+
+pkg_config() {
+ local db="${EPREFIX}/var/lib/openvswitch/conf.db"
+ if [ -e "${db}" ] ; then
+ einfo "Database '${db}' already exists, doing schema migration..."
+ einfo "(if the migration fails, make sure that ovsdb-server is not running)"
+ "${EPREFIX}/usr/bin/ovsdb-tool" convert "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "converting database failed"
+ else
+ einfo "Creating new database '${db}'..."
+ "${EPREFIX}/usr/bin/ovsdb-tool" create "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "creating database failed"
+ fi
+}
diff --git a/net-misc/openvswitch/openvswitch-2.1.3.ebuild b/net-misc/openvswitch/openvswitch-2.1.3.ebuild
new file mode 100644
index 000000000000..e986257408bd
--- /dev/null
+++ b/net-misc/openvswitch/openvswitch-2.1.3.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils linux-info linux-mod python-single-r1 systemd autotools
+
+DESCRIPTION="Production quality, multilayer virtual switch"
+HOMEPAGE="http://openvswitch.org"
+SRC_URI="http://openvswitch.org/releases/${P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug modules monitor +ssl"
+
+RDEPEND=">=sys-apps/openrc-0.10.5
+ ssl? ( dev-libs/openssl )
+ monitor? (
+ ${PYTHON_DEPS}
+ dev-python/twisted-core
+ dev-python/twisted-conch
+ dev-python/twisted-web
+ dev-python/PyQt4[${PYTHON_USEDEP}]
+ dev-python/zope-interface[${PYTHON_USEDEP}] )
+ debug? ( dev-lang/perl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+CONFIG_CHECK="~NET_CLS_ACT ~NET_CLS_U32 ~NET_SCH_INGRESS ~NET_ACT_POLICE ~IPV6 ~TUN"
+MODULE_NAMES="openvswitch(net:${S}/datapath/linux)"
+BUILD_TARGETS="all"
+
+pkg_setup() {
+ if use modules ; then
+ CONFIG_CHECK+=" ~!OPENVSWITCH"
+ kernel_is ge 2 6 32 || die "Linux >= 2.6.32 and <= 3.12 required for userspace modules"
+ kernel_is lt 3 12 || die "Linux >= 2.6.32 and <= 3.12 required for userspace modules"
+ linux-mod_pkg_setup
+ else
+ CONFIG_CHECK+=" ~OPENVSWITCH"
+ linux-info_pkg_setup
+ fi
+ use monitor && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Never build kernelmodules, doing this manually
+ sed -i \
+ -e '/^SUBDIRS/d' \
+ datapath/Makefile.in || die "sed failed"
+ epatch "${FILESDIR}/xcp-interface-reconfigure.patch"
+ epatch "${FILESDIR}/kernel-3.12-support.patch"
+ eautoreconf
+}
+src_configure() {
+ set_arch_to_kernel
+ use monitor || export ovs_cv_python="no"
+ #pyside is staticly disabled
+ export ovs_cv_pyuic4="no"
+
+ local linux_config
+ use modules && linux_config="--with-linux=${KV_OUT_DIR}"
+
+ econf ${linux_config} \
+ --with-rundir=/var/run/openvswitch \
+ --with-logdir=/var/log/openvswitch \
+ --with-pkidir=/etc/ssl/openvswitch \
+ --with-dbdir=/var/lib/openvswitch \
+ $(use_enable ssl) \
+ $(use_enable !debug ndebug)
+}
+
+src_compile() {
+ default
+
+ use monitor && python_fix_shebang \
+ utilities/ovs-{pcap,tcpundump,test,vlan-test} \
+ utilities/bugtool/ovs-bugtool
+
+ use modules && linux-mod_src_compile
+}
+
+src_install() {
+ default
+
+ if use monitor ; then
+ python_domodule "${ED}"/usr/share/openvswitch/python/*
+ rm -r "${ED}/usr/share/openvswitch/python"
+ python_optimize "${ED}/usr/share/ovsdbmonitor"
+ fi
+ # not working without the brcompat_mod kernel module which did not get
+ # included in the kernel and we can't build it anymore
+ rm "${D}/usr/sbin/ovs-brcompatd" "${D}/usr/share/man/man8/ovs-brcompatd.8"
+
+ keepdir /var/{lib,log}/openvswitch
+ keepdir /etc/ssl/openvswitch
+ fperms 0750 /etc/ssl/openvswitch
+
+ rm -rf "${ED}/var/run"
+ use monitor || rmdir "${ED}/usr/share/ovsdbmonitor"
+ use debug || rm "${ED}/usr/bin/ovs-parse-leaks"
+
+ newconfd "${FILESDIR}/ovsdb-server_conf2" ovsdb-server
+ newconfd "${FILESDIR}/ovs-vswitchd_conf" ovs-vswitchd
+ newinitd "${FILESDIR}/ovsdb-server-r1" ovsdb-server
+ newinitd "${FILESDIR}/ovs-vswitchd-r1" ovs-vswitchd
+
+ systemd_dounit "${FILESDIR}/ovsdb-server.service"
+ systemd_dounit "${FILESDIR}/ovs-vswitchd.service"
+ systemd_newtmpfilesd "${FILESDIR}/openvswitch.tmpfiles" openvswitch.conf
+
+ insinto /etc/logrotate.d
+ newins rhel/etc_logrotate.d_openvswitch openvswitch
+
+ use modules && linux-mod_src_install
+}
+
+pkg_postinst() {
+ use modules && linux-mod_pkg_postinst
+
+ for pv in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.9.0 ${pv} ; then
+ ewarn "The configuration database for Open vSwitch got moved in version 1.9.0 from"
+ ewarn " /etc/openvswitch"
+ ewarn "to"
+ ewarn " /var/lib/openvswitch"
+ ewarn "Please copy/move the database manually before running the schema upgrade."
+ ewarn "The PKI files are now supposed to go to /etc/ssl/openvswitch"
+ fi
+ done
+
+ elog "Use the following command to create an initial database for ovsdb-server:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ elog "(will create a database in /var/lib/openvswitch/conf.db)"
+ elog "or to convert the database to the current schema after upgrading."
+}
+
+pkg_config() {
+ local db="${EPREFIX}/var/lib/openvswitch/conf.db"
+ if [ -e "${db}" ] ; then
+ einfo "Database '${db}' already exists, doing schema migration..."
+ einfo "(if the migration fails, make sure that ovsdb-server is not running)"
+ "${EPREFIX}/usr/bin/ovsdb-tool" convert "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "converting database failed"
+ else
+ einfo "Creating new database '${db}'..."
+ "${EPREFIX}/usr/bin/ovsdb-tool" create "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "creating database failed"
+ fi
+}
diff --git a/net-misc/openvswitch/openvswitch-2.3.0.ebuild b/net-misc/openvswitch/openvswitch-2.3.0.ebuild
new file mode 100644
index 000000000000..676a80771d49
--- /dev/null
+++ b/net-misc/openvswitch/openvswitch-2.3.0.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils linux-info linux-mod python-single-r1 systemd autotools
+
+DESCRIPTION="Production quality, multilayer virtual switch"
+HOMEPAGE="http://openvswitch.org"
+SRC_URI="http://openvswitch.org/releases/${P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug modules monitor +ssl"
+
+RDEPEND=">=sys-apps/openrc-0.10.5
+ ssl? ( dev-libs/openssl )
+ monitor? (
+ ${PYTHON_DEPS}
+ dev-python/twisted-core
+ dev-python/twisted-conch
+ dev-python/twisted-web
+ dev-python/PyQt4[${PYTHON_USEDEP}]
+ dev-python/zope-interface[${PYTHON_USEDEP}] )
+ debug? ( dev-lang/perl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+CONFIG_CHECK="~NET_CLS_ACT ~NET_CLS_U32 ~NET_SCH_INGRESS ~NET_ACT_POLICE ~IPV6 ~TUN"
+MODULE_NAMES="openvswitch(net:${S}/datapath/linux)"
+BUILD_TARGETS="all"
+
+pkg_setup() {
+ if use modules ; then
+ CONFIG_CHECK+=" ~!OPENVSWITCH"
+ kernel_is ge 2 6 32 || die "Linux >= 2.6.32 and <= 3.14 required for userspace modules"
+ kernel_is lt 3 14 || die "Linux >= 2.6.32 and <= 3.14 required for userspace modules"
+ linux-mod_pkg_setup
+ else
+ CONFIG_CHECK+=" ~OPENVSWITCH"
+ linux-info_pkg_setup
+ fi
+ use monitor && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Never build kernelmodules, doing this manually
+ sed -i \
+ -e '/^SUBDIRS/d' \
+ datapath/Makefile.in || die "sed failed"
+ epatch "${FILESDIR}/xcp-interface-reconfigure.patch"
+ eautoreconf
+}
+src_configure() {
+ set_arch_to_kernel
+ use monitor || export ovs_cv_python="no"
+ #pyside is staticly disabled
+ export ovs_cv_pyuic4="no"
+
+ local linux_config
+ use modules && linux_config="--with-linux=${KV_OUT_DIR}"
+
+ PYTHON=python2.7 econf ${linux_config} \
+ --with-rundir=/var/run/openvswitch \
+ --with-logdir=/var/log/openvswitch \
+ --with-pkidir=/etc/ssl/openvswitch \
+ --with-dbdir=/var/lib/openvswitch \
+ $(use_enable ssl) \
+ $(use_enable !debug ndebug)
+}
+
+src_compile() {
+ default
+
+ use monitor && python_fix_shebang \
+ utilities/ovs-{pcap,tcpundump,test,vlan-test} \
+ utilities/bugtool/ovs-bugtool
+
+ use modules && linux-mod_src_compile
+}
+
+src_install() {
+ default
+
+ if use monitor ; then
+ python_domodule "${ED}"/usr/share/openvswitch/python/*
+ rm -r "${ED}/usr/share/openvswitch/python"
+ python_optimize "${ED}/usr/share/ovsdbmonitor"
+ fi
+ # not working without the brcompat_mod kernel module which did not get
+ # included in the kernel and we can't build it anymore
+ rm "${D}/usr/sbin/ovs-brcompatd" "${D}/usr/share/man/man8/ovs-brcompatd.8"
+
+ keepdir /var/{lib,log}/openvswitch
+ keepdir /etc/ssl/openvswitch
+ fperms 0750 /etc/ssl/openvswitch
+
+ rm -rf "${ED}/var/run"
+ use monitor || rmdir "${ED}/usr/share/ovsdbmonitor"
+ use debug || rm "${ED}/usr/bin/ovs-parse-leaks"
+
+ newconfd "${FILESDIR}/ovsdb-server_conf2" ovsdb-server
+ newconfd "${FILESDIR}/ovs-vswitchd_conf" ovs-vswitchd
+ newinitd "${FILESDIR}/ovsdb-server-r1" ovsdb-server
+ newinitd "${FILESDIR}/ovs-vswitchd-r1" ovs-vswitchd
+
+ systemd_dounit "${FILESDIR}/ovsdb-server.service"
+ systemd_dounit "${FILESDIR}/ovs-vswitchd.service"
+ systemd_newtmpfilesd "${FILESDIR}/openvswitch.tmpfiles" openvswitch.conf
+
+ insinto /etc/logrotate.d
+ newins rhel/etc_logrotate.d_openvswitch openvswitch
+
+ use modules && linux-mod_src_install
+}
+
+pkg_postinst() {
+ use modules && linux-mod_pkg_postinst
+
+ for pv in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.9.0 ${pv} ; then
+ ewarn "The configuration database for Open vSwitch got moved in version 1.9.0 from"
+ ewarn " /etc/openvswitch"
+ ewarn "to"
+ ewarn " /var/lib/openvswitch"
+ ewarn "Please copy/move the database manually before running the schema upgrade."
+ ewarn "The PKI files are now supposed to go to /etc/ssl/openvswitch"
+ fi
+ done
+
+ elog "Use the following command to create an initial database for ovsdb-server:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ elog "(will create a database in /var/lib/openvswitch/conf.db)"
+ elog "or to convert the database to the current schema after upgrading."
+}
+
+pkg_config() {
+ local db="${EPREFIX}/var/lib/openvswitch/conf.db"
+ if [ -e "${db}" ] ; then
+ einfo "Database '${db}' already exists, doing schema migration..."
+ einfo "(if the migration fails, make sure that ovsdb-server is not running)"
+ "${EPREFIX}/usr/bin/ovsdb-tool" convert "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "converting database failed"
+ else
+ einfo "Creating new database '${db}'..."
+ "${EPREFIX}/usr/bin/ovsdb-tool" create "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "creating database failed"
+ fi
+}
diff --git a/net-misc/openvswitch/openvswitch-2.3.1.ebuild b/net-misc/openvswitch/openvswitch-2.3.1.ebuild
new file mode 100644
index 000000000000..59fd3e5b09d6
--- /dev/null
+++ b/net-misc/openvswitch/openvswitch-2.3.1.ebuild
@@ -0,0 +1,157 @@
+# 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 linux-info linux-mod python-single-r1 systemd autotools
+
+DESCRIPTION="Production quality, multilayer virtual switch"
+HOMEPAGE="http://openvswitch.org"
+SRC_URI="http://openvswitch.org/releases/${P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug modules monitor +ssl"
+
+RDEPEND=">=sys-apps/openrc-0.10.5
+ ssl? ( dev-libs/openssl )
+ monitor? (
+ ${PYTHON_DEPS}
+ dev-python/twisted-core
+ dev-python/twisted-conch
+ dev-python/twisted-web
+ dev-python/PyQt4[${PYTHON_USEDEP}]
+ dev-python/zope-interface[${PYTHON_USEDEP}] )
+ debug? ( dev-lang/perl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+CONFIG_CHECK="~NET_CLS_ACT ~NET_CLS_U32 ~NET_SCH_INGRESS ~NET_ACT_POLICE ~IPV6 ~TUN"
+MODULE_NAMES="openvswitch(net:${S}/datapath/linux)"
+BUILD_TARGETS="all"
+
+pkg_setup() {
+ if use modules ; then
+ CONFIG_CHECK+=" ~!OPENVSWITCH"
+ kernel_is ge 2 6 32 || die "Linux >= 2.6.32 and <= 3.14 required for userspace modules"
+ kernel_is le 3 14 || die "Linux >= 2.6.32 and <= 3.14 required for userspace modules"
+ linux-mod_pkg_setup
+ else
+ CONFIG_CHECK+=" ~OPENVSWITCH"
+ linux-info_pkg_setup
+ fi
+ use monitor && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Never build kernelmodules, doing this manually
+ sed -i \
+ -e '/^SUBDIRS/d' \
+ datapath/Makefile.in || die "sed failed"
+ epatch "${FILESDIR}/xcp-interface-reconfigure.patch"
+ eautoreconf
+}
+src_configure() {
+ set_arch_to_kernel
+ use monitor || export ovs_cv_python="no"
+ #pyside is staticly disabled
+ export ovs_cv_pyuic4="no"
+
+ local linux_config
+ use modules && linux_config="--with-linux=${KV_OUT_DIR}"
+
+ PYTHON=python2.7 econf ${linux_config} \
+ --with-rundir=/var/run/openvswitch \
+ --with-logdir=/var/log/openvswitch \
+ --with-pkidir=/etc/ssl/openvswitch \
+ --with-dbdir=/var/lib/openvswitch \
+ $(use_enable ssl) \
+ $(use_enable !debug ndebug)
+}
+
+src_compile() {
+ default
+
+# use monitor && python_fix_shebang \
+# utilities/ovs-{pcap,tcpundump,test,vlan-test} \
+# utilities/bugtool/ovs-bugtool
+ if use monitor; then
+ sed -i \
+ 's/^#\!\ python2\.7/#\!\/usr\/bin\/env\ python2\.7/' \
+ utilities/ovs-{pcap,parse-backtrace,dpctl-top,l3ping,tcpundump,test,vlan-test} \
+ utilities/bugtool/ovs-bugtool || die "sed died :("
+ fi
+
+ use modules && linux-mod_src_compile
+}
+
+src_install() {
+ default
+
+ if use monitor ; then
+ python_domodule "${ED}"/usr/share/openvswitch/python/*
+ rm -r "${ED}/usr/share/openvswitch/python"
+ python_optimize "${ED}/usr/share/ovsdbmonitor"
+ fi
+ # not working without the brcompat_mod kernel module which did not get
+ # included in the kernel and we can't build it anymore
+ rm "${D}/usr/sbin/ovs-brcompatd" "${D}/usr/share/man/man8/ovs-brcompatd.8"
+
+ keepdir /var/{lib,log}/openvswitch
+ keepdir /etc/ssl/openvswitch
+ fperms 0750 /etc/ssl/openvswitch
+
+ rm -rf "${ED}/var/run"
+ use monitor || rmdir "${ED}/usr/share/ovsdbmonitor"
+ use debug || rm "${ED}/usr/bin/ovs-parse-leaks"
+
+ newconfd "${FILESDIR}/ovsdb-server_conf2" ovsdb-server
+ newconfd "${FILESDIR}/ovs-vswitchd_conf" ovs-vswitchd
+ newinitd "${FILESDIR}/ovsdb-server-r1" ovsdb-server
+ newinitd "${FILESDIR}/ovs-vswitchd-r1" ovs-vswitchd
+
+ systemd_dounit "${FILESDIR}/ovsdb-server.service"
+ systemd_dounit "${FILESDIR}/ovs-vswitchd.service"
+ systemd_newtmpfilesd "${FILESDIR}/openvswitch.tmpfiles" openvswitch.conf
+
+ insinto /etc/logrotate.d
+ newins rhel/etc_logrotate.d_openvswitch openvswitch
+
+ use modules && linux-mod_src_install
+}
+
+pkg_postinst() {
+ use modules && linux-mod_pkg_postinst
+
+ for pv in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.9.0 ${pv} ; then
+ ewarn "The configuration database for Open vSwitch got moved in version 1.9.0 from"
+ ewarn " /etc/openvswitch"
+ ewarn "to"
+ ewarn " /var/lib/openvswitch"
+ ewarn "Please copy/move the database manually before running the schema upgrade."
+ ewarn "The PKI files are now supposed to go to /etc/ssl/openvswitch"
+ fi
+ done
+
+ elog "Use the following command to create an initial database for ovsdb-server:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ elog "(will create a database in /var/lib/openvswitch/conf.db)"
+ elog "or to convert the database to the current schema after upgrading."
+}
+
+pkg_config() {
+ local db="${EPREFIX}/var/lib/openvswitch/conf.db"
+ if [ -e "${db}" ] ; then
+ einfo "Database '${db}' already exists, doing schema migration..."
+ einfo "(if the migration fails, make sure that ovsdb-server is not running)"
+ "${EPREFIX}/usr/bin/ovsdb-tool" convert "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "converting database failed"
+ else
+ einfo "Creating new database '${db}'..."
+ "${EPREFIX}/usr/bin/ovsdb-tool" create "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "creating database failed"
+ fi
+}
diff --git a/net-misc/openvswitch/openvswitch-2.3.2.ebuild b/net-misc/openvswitch/openvswitch-2.3.2.ebuild
new file mode 100644
index 000000000000..4c57c5ce7c57
--- /dev/null
+++ b/net-misc/openvswitch/openvswitch-2.3.2.ebuild
@@ -0,0 +1,157 @@
+# 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 linux-info linux-mod python-single-r1 systemd autotools
+
+DESCRIPTION="Production quality, multilayer virtual switch"
+HOMEPAGE="http://openvswitch.org"
+SRC_URI="http://openvswitch.org/releases/${P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug modules monitor +ssl"
+
+RDEPEND=">=sys-apps/openrc-0.10.5
+ ssl? ( dev-libs/openssl:= )
+ monitor? (
+ ${PYTHON_DEPS}
+ dev-python/twisted-core
+ dev-python/twisted-conch
+ dev-python/twisted-web
+ dev-python/PyQt4[${PYTHON_USEDEP}]
+ dev-python/zope-interface[${PYTHON_USEDEP}] )
+ debug? ( dev-lang/perl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+CONFIG_CHECK="~NET_CLS_ACT ~NET_CLS_U32 ~NET_SCH_INGRESS ~NET_ACT_POLICE ~IPV6 ~TUN"
+MODULE_NAMES="openvswitch(net:${S}/datapath/linux)"
+BUILD_TARGETS="all"
+
+pkg_setup() {
+ if use modules ; then
+ CONFIG_CHECK+=" ~!OPENVSWITCH"
+ kernel_is ge 2 6 32 || die "Linux >= 2.6.32 and <= 3.14 required for userspace modules"
+ kernel_is le 3 14 || die "Linux >= 2.6.32 and <= 3.14 required for userspace modules"
+ linux-mod_pkg_setup
+ else
+ CONFIG_CHECK+=" ~OPENVSWITCH"
+ linux-info_pkg_setup
+ fi
+ use monitor && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Never build kernelmodules, doing this manually
+ sed -i \
+ -e '/^SUBDIRS/d' \
+ datapath/Makefile.in || die "sed failed"
+ epatch "${FILESDIR}/xcp-interface-reconfigure-2.3.2.patch"
+ eautoreconf
+}
+src_configure() {
+ set_arch_to_kernel
+ use monitor || export ovs_cv_python="no"
+ #pyside is staticly disabled
+ export ovs_cv_pyuic4="no"
+
+ local linux_config
+ use modules && linux_config="--with-linux=${KV_OUT_DIR}"
+
+ PYTHON=python2.7 econf ${linux_config} \
+ --with-rundir=/var/run/openvswitch \
+ --with-logdir=/var/log/openvswitch \
+ --with-pkidir=/etc/ssl/openvswitch \
+ --with-dbdir=/var/lib/openvswitch \
+ $(use_enable ssl) \
+ $(use_enable !debug ndebug)
+}
+
+src_compile() {
+ default
+
+# use monitor && python_fix_shebang \
+# utilities/ovs-{pcap,tcpundump,test,vlan-test} \
+# utilities/bugtool/ovs-bugtool
+ if use monitor; then
+ sed -i \
+ 's/^#\!\ python2\.7/#\!\/usr\/bin\/env\ python2\.7/' \
+ utilities/ovs-{pcap,parse-backtrace,dpctl-top,l3ping,tcpundump,test,vlan-test} \
+ utilities/bugtool/ovs-bugtool || die "sed died :("
+ fi
+
+ use modules && linux-mod_src_compile
+}
+
+src_install() {
+ default
+
+ if use monitor ; then
+ python_domodule "${ED}"/usr/share/openvswitch/python/*
+ rm -r "${ED}/usr/share/openvswitch/python"
+ python_optimize "${ED}/usr/share/ovsdbmonitor"
+ fi
+ # not working without the brcompat_mod kernel module which did not get
+ # included in the kernel and we can't build it anymore
+ rm "${D}/usr/sbin/ovs-brcompatd" "${D}/usr/share/man/man8/ovs-brcompatd.8"
+
+ keepdir /var/{lib,log}/openvswitch
+ keepdir /etc/ssl/openvswitch
+ fperms 0750 /etc/ssl/openvswitch
+
+ rm -rf "${ED}/var/run"
+ use monitor || rmdir "${ED}/usr/share/ovsdbmonitor"
+ use debug || rm "${ED}/usr/bin/ovs-parse-leaks"
+
+ newconfd "${FILESDIR}/ovsdb-server_conf2" ovsdb-server
+ newconfd "${FILESDIR}/ovs-vswitchd_conf" ovs-vswitchd
+ newinitd "${FILESDIR}/ovsdb-server-r1" ovsdb-server
+ newinitd "${FILESDIR}/ovs-vswitchd-r1" ovs-vswitchd
+
+ systemd_dounit "${FILESDIR}/ovsdb-server.service"
+ systemd_dounit "${FILESDIR}/ovs-vswitchd.service"
+ systemd_newtmpfilesd "${FILESDIR}/openvswitch.tmpfiles" openvswitch.conf
+
+ insinto /etc/logrotate.d
+ newins rhel/etc_logrotate.d_openvswitch openvswitch
+
+ use modules && linux-mod_src_install
+}
+
+pkg_postinst() {
+ use modules && linux-mod_pkg_postinst
+
+ for pv in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 1.9.0 ${pv} ; then
+ ewarn "The configuration database for Open vSwitch got moved in version 1.9.0 from"
+ ewarn " /etc/openvswitch"
+ ewarn "to"
+ ewarn " /var/lib/openvswitch"
+ ewarn "Please copy/move the database manually before running the schema upgrade."
+ ewarn "The PKI files are now supposed to go to /etc/ssl/openvswitch"
+ fi
+ done
+
+ elog "Use the following command to create an initial database for ovsdb-server:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ elog "(will create a database in /var/lib/openvswitch/conf.db)"
+ elog "or to convert the database to the current schema after upgrading."
+}
+
+pkg_config() {
+ local db="${EPREFIX}/var/lib/openvswitch/conf.db"
+ if [ -e "${db}" ] ; then
+ einfo "Database '${db}' already exists, doing schema migration..."
+ einfo "(if the migration fails, make sure that ovsdb-server is not running)"
+ "${EPREFIX}/usr/bin/ovsdb-tool" convert "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "converting database failed"
+ else
+ einfo "Creating new database '${db}'..."
+ "${EPREFIX}/usr/bin/ovsdb-tool" create "${db}" "${EPREFIX}/usr/share/openvswitch/vswitch.ovsschema" || die "creating database failed"
+ fi
+}
diff --git a/net-misc/orbited/Manifest b/net-misc/orbited/Manifest
new file mode 100644
index 000000000000..c4fbcc995e06
--- /dev/null
+++ b/net-misc/orbited/Manifest
@@ -0,0 +1 @@
+DIST orbited-0.7.10.tar.gz 168647 SHA256 71e7627a485fbb6184bb0b4c894ee4dcc74cc970d04888f908d0ca2dec69332d SHA512 6783bbe687a5191f773e723f068651a6cd55baa39a825dfa16e27b3c51a39f32dcef04f61b2b58756514ee99e39c1cbe450ae24e5d3835e95ace9b59403b9376 WHIRLPOOL 588ede0193a2e6f04453568974a6ec59216f2b6fbd625dc3e7c134131c10ec2e5901f5136f20ea6d683504593c2e6ce432501953714f82b8533f7708ff1434d5
diff --git a/net-misc/orbited/files/orbited.cfg b/net-misc/orbited/files/orbited.cfg
new file mode 100644
index 000000000000..5379c47999e0
--- /dev/null
+++ b/net-misc/orbited/files/orbited.cfg
@@ -0,0 +1,42 @@
+# Example Orbited Configuration file
+
+[global]
+reactor=select
+# reactor=kqueue
+# reactor=epoll
+session.ping_interval = 40
+session.ping_timeout = 30
+# once the sockets are open, orbited will drop its privileges to this user.
+user=orbited
+
+[listen]
+http://:8000
+#stomp://:61613
+# uncomment to enable SSL on port 8043 using given .key and .crt files
+#https://:8043
+#
+#[ssl]
+#key=orbited.key
+#crt=orbited.crt
+
+[static]
+
+[access]
+localhost:8000 -> irc.freenode.net:6667
+* -> localhost:4747
+#* -> localhost:61613
+
+[logging]
+debug=STDERR,debug.log
+info=STDERR,info.log
+access=STDERR,info.log
+warn=STDERR,error.log
+error=STDERR,error.log
+
+#Don't enable debug by default
+enabled.default=info,access,warn,error
+
+# Turn debug on for the "Proxy" logger
+[loggers]
+#Proxy=debug,info,access,warn,error
+
diff --git a/net-misc/orbited/files/orbited.init b/net-misc/orbited/files/orbited.init
new file mode 100644
index 000000000000..28a9a6c03aed
--- /dev/null
+++ b/net-misc/orbited/files/orbited.init
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+ use dns
+}
+
+checkconfig() {
+ if [ ! -f "/etc/orbited.cfg" ] ; then
+ eerror "No /etc/orbited.cfg file exists!"
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting orbited..."
+ /usr/bin/orbited --config=/etc/orbited.cfg >/dev/null 2>&1 &
+ pid=$!
+ echo $pid > /var/run/orbited.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping orbited..."
+ start-stop-daemon --stop --quiet --pidfile=/var/run/orbited.pid --retry 20
+ eend $?
+}
+
diff --git a/net-misc/orbited/metadata.xml b/net-misc/orbited/metadata.xml
new file mode 100644
index 000000000000..45dda01a91ea
--- /dev/null
+++ b/net-misc/orbited/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">orbited</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/orbited/orbited-0.7.10-r1.ebuild b/net-misc/orbited/orbited-0.7.10-r1.ebuild
new file mode 100644
index 000000000000..26ca05dc1e3c
--- /dev/null
+++ b/net-misc/orbited/orbited-0.7.10-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+PYTHON_DEPEND="2"
+
+inherit distutils
+
+DESCRIPTION="Real-time communication for the browser"
+HOMEPAGE="http://orbited.org"
+SRC_URI="mirror://pypi/o/${PN}/${P}.tar.gz"
+
+LICENSE="MIT GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="dev-python/demjson
+ >=dev-python/morbid-0.8.4
+ dev-python/stomper
+ dev-python/twisted-core
+ dev-python/twisted-web"
+DEPEND="${RDEPEND}
+ dev-python/setuptools"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_install() {
+ distutils_src_install
+ insinto /etc
+ doins "${FILESDIR}/orbited.cfg" || die
+ newinitd "${FILESDIR}/orbited.init" orbited || die
+}
diff --git a/net-misc/orbited/orbited-0.7.10-r2.ebuild b/net-misc/orbited/orbited-0.7.10-r2.ebuild
new file mode 100644
index 000000000000..89c57c034ce7
--- /dev/null
+++ b/net-misc/orbited/orbited-0.7.10-r2.ebuild
@@ -0,0 +1,37 @@
+# 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="Real-time communication for the browser."
+HOMEPAGE="http://orbited.org"
+SRC_URI="mirror://pypi/o/${PN}/${P}.tar.gz"
+
+LICENSE="MIT GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-python/demjson[${PYTHON_USEDEP}]
+ >=dev-python/morbid-0.8.4[${PYTHON_USEDEP}]
+ dev-python/stomper[${PYTHON_USEDEP}]
+ dev-python/twisted-core[${PYTHON_USEDEP}]
+ dev-python/twisted-web[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]"
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_install() {
+ distutils-r1_src_install
+ insinto /etc
+ doins "${FILESDIR}/orbited.cfg" || die
+ newinitd "${FILESDIR}/orbited.init" orbited || die
+}
diff --git a/net-misc/owncloud-client/Manifest b/net-misc/owncloud-client/Manifest
new file mode 100644
index 000000000000..58f0e0929e94
--- /dev/null
+++ b/net-misc/owncloud-client/Manifest
@@ -0,0 +1,4 @@
+DIST owncloudclient-1.8.0.tar.bz2 13556481 SHA256 192bec5fe4b60c40d3a5d60abe224a1029af653ce445515290f3f1bb7967b0bd SHA512 d25bd0ef28991c727c99bda6e5b6c44de70eca78c4dededb85784c56c63665ec613c469b1f16d1e6e84f552b5f9a3ae996bd6dffc456765d32bef0208a5875e6 WHIRLPOOL 559ee0046256282ca3f3218ad50b89924b62b9756dd51ebfa64e3fa71296c03045f6d2df8c644995af431091bfe41994ed74400936a1d80f88f28f3b3cc27b68
+DIST owncloudclient-1.8.1.tar.xz 11343868 SHA256 8b9bb4fea2a4b80938a3477813839ac325ac1ed39a85a8f1e0cd3ebb0e430ea3 SHA512 171e378f283ecf51439f9e897bd0111bc5f7bdfdf8b2ae4e6b016a566e3848724419187887a542772f0f5aa6d96ff287b7d3ee45b085bb34771a7db0597138da WHIRLPOOL 5f43592ec59b642dc5ba83511f7d2e9a1e57a3254cd6582618e0c93cd7e3fb539af9a7d5b5524581300528a0e2b8dbf2ec23072fcf13740d4e422907b54094d9
+DIST owncloudclient-1.8.3.tar.xz 11372576 SHA256 8cc4f8f6c146ff163f76d1b149ec92f3f98c07e3ea19c251d99d6a99affd0dde SHA512 e1dc54c99f04b4365af648f0d9a69249cdb7254728827bdf210dd336fc10571a431a9695f063f9abb306430059a6a63ed23ed588a035611725934ccdb1c57f90 WHIRLPOOL f7533d07913ce81a9a07f39eb892229646ccb8e4332159a80c08998c9f95901d57fcf01cca20ebbcb0a2f50e2009996a6659fd94e9e32da9d33cff7f97b3eb42
+DIST owncloudclient-1.8.4.tar.xz 11371640 SHA256 ebe5ec7e33de6f2072bcadcd2b316a09b9d583d7d41eb1caf467a48896d81cdb SHA512 00aab07f92a2ea9e74af1321d466159abf152dd4899defd635595410258569e74a06071acc67a82371f8e150a4025ca76d1ad0eca5259af7ee7ce0fd3091b76f WHIRLPOOL 5a57c83334ea13eff473bca89970937929442719df7c5f50d35af0101f772adf658796e9fd4eaddb5c40b4c70b8727371baffedce38f4bb39658251eb7ccf26b
diff --git a/net-misc/owncloud-client/metadata.xml b/net-misc/owncloud-client/metadata.xml
new file mode 100644
index 000000000000..0242106b0192
--- /dev/null
+++ b/net-misc/owncloud-client/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+ <use>
+ <flag name="nautilus">Install the <pkg>gnome-base/nautilus</pkg> extension</flag>
+ <flag name="sftp">Enable sftp transfer support via <pkg>net-libs/libssh</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/owncloud-client/owncloud-client-1.8.0.ebuild b/net-misc/owncloud-client/owncloud-client-1.8.0.ebuild
new file mode 100644
index 000000000000..de56b145d323
--- /dev/null
+++ b/net-misc/owncloud-client/owncloud-client-1.8.0.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="Synchronize files from ownCloud Server with your computer"
+HOMEPAGE="http://owncloud.org/"
+SRC_URI="http://download.owncloud.com/desktop/stable/${P/-}.tar.bz2"
+
+LICENSE="CC-BY-3.0 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc nautilus samba +sftp test qt4 +qt5"
+
+REQUIRED_USE="^^ ( qt4 qt5 )"
+
+RDEPEND=">=dev-db/sqlite-3.4:3
+ sys-fs/inotify-tools
+ virtual/libiconv
+ nautilus? ( dev-python/nautilus-python )
+ qt4? (
+ dev-libs/qtkeychain[qt4]
+ dev-qt/qtcore:4
+ dev-qt/qtdbus:4
+ dev-qt/qtgui:4
+ dev-qt/qtsql:4
+ dev-qt/qtwebkit:4
+ net-libs/neon[ssl]
+ )
+ qt5? (
+ dev-libs/qtkeychain[qt5]
+ dev-qt/linguist-tools:5
+ dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ >=dev-qt/qtnetwork-5.4:5
+ dev-qt/qtgui:5
+ dev-qt/qtquickcontrols:5
+ dev-qt/qtsql:5
+ dev-qt/qtwebkit:5[printsupport]
+ )
+ samba? ( >=net-fs/samba-3.5 )
+ sftp? ( >=net-libs/libssh-0.5 )
+ !net-misc/ocsync"
+DEPEND="${RDEPEND}
+ doc? (
+ dev-python/sphinx
+ dev-texlive/texlive-latexextra
+ virtual/latex-base
+ )
+ test? (
+ dev-util/cmocka
+ qt4? ( dev-qt/qttest:4 )
+ qt5? ( dev-qt/qttest:5 )
+ )"
+
+S=${WORKDIR}/${P/-}
+
+src_prepare() {
+ # Keep tests in ${T}
+ sed -i -e "s#\"/tmp#\"${T}#g" test/test*.h || die "sed failed"
+
+ use nautilus || sed -i -e "s/add_subdirectory(nautilus)//" \
+ shell_integration/CMakeLists.txt || die "sed failed"
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DSYSCONF_INSTALL_DIR="${EPREFIX}"/etc
+ -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PF}
+ -DWITH_ICONV=ON
+ $(cmake-utils_use_with doc DOC)
+ $(cmake-utils_use test UNIT_TESTING)
+ $(cmake-utils_use_find_package samba Libsmbclient)
+ $(cmake-utils_use_find_package sftp LibSSH)
+ $(cmake-utils_use_build qt4 WITH_QT4)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ # 1 test needs an existing ${HOME}/.config directory
+ mkdir "${T}"/.config
+ export HOME="${T}"
+ cmake-utils_src_test
+}
+
+pkg_postinst() {
+ if ! use doc ; then
+ elog "Documentation and man pages not installed"
+ elog "Enable doc USE-flag to generate them"
+ fi
+}
diff --git a/net-misc/owncloud-client/owncloud-client-1.8.1.ebuild b/net-misc/owncloud-client/owncloud-client-1.8.1.ebuild
new file mode 100644
index 000000000000..2adf30886486
--- /dev/null
+++ b/net-misc/owncloud-client/owncloud-client-1.8.1.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="Synchronize files from ownCloud Server with your computer"
+HOMEPAGE="http://owncloud.org/"
+SRC_URI="http://download.owncloud.com/desktop/stable/${P/-}.tar.xz"
+
+LICENSE="CC-BY-3.0 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc nautilus samba +sftp test qt4 +qt5"
+
+REQUIRED_USE="^^ ( qt4 qt5 )"
+
+RDEPEND=">=dev-db/sqlite-3.4:3
+ sys-fs/inotify-tools
+ virtual/libiconv
+ nautilus? ( dev-python/nautilus-python )
+ qt4? (
+ dev-libs/qtkeychain[qt4]
+ dev-qt/qtcore:4
+ dev-qt/qtdbus:4
+ dev-qt/qtgui:4
+ dev-qt/qtsql:4
+ dev-qt/qtwebkit:4
+ net-libs/neon[ssl]
+ )
+ qt5? (
+ dev-libs/qtkeychain[qt5]
+ dev-qt/linguist-tools:5
+ dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ >=dev-qt/qtnetwork-5.4:5
+ dev-qt/qtgui:5
+ dev-qt/qtquickcontrols:5
+ dev-qt/qtsql:5
+ dev-qt/qtwebkit:5[printsupport]
+ )
+ samba? ( >=net-fs/samba-3.5 )
+ sftp? ( >=net-libs/libssh-0.5 )
+ !net-misc/ocsync"
+DEPEND="${RDEPEND}
+ doc? (
+ dev-python/sphinx
+ dev-texlive/texlive-latexextra
+ virtual/latex-base
+ )
+ test? (
+ dev-util/cmocka
+ qt4? ( dev-qt/qttest:4 )
+ qt5? ( dev-qt/qttest:5 )
+ )"
+
+S=${WORKDIR}/${P/-}
+
+src_prepare() {
+ # Keep tests in ${T}
+ sed -i -e "s#\"/tmp#\"${T}#g" test/test*.h || die "sed failed"
+
+ use nautilus || sed -i -e "s/add_subdirectory(nautilus)//" \
+ shell_integration/CMakeLists.txt || die "sed failed"
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DSYSCONF_INSTALL_DIR="${EPREFIX}"/etc
+ -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PF}
+ -DWITH_ICONV=ON
+ $(cmake-utils_use_with doc DOC)
+ $(cmake-utils_use test UNIT_TESTING)
+ $(cmake-utils_use_find_package samba Libsmbclient)
+ $(cmake-utils_use_find_package sftp LibSSH)
+ $(cmake-utils_use_build qt4 WITH_QT4)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ # 1 test needs an existing ${HOME}/.config directory
+ mkdir "${T}"/.config
+ export HOME="${T}"
+ cmake-utils_src_test
+}
+
+pkg_postinst() {
+ if ! use doc ; then
+ elog "Documentation and man pages not installed"
+ elog "Enable doc USE-flag to generate them"
+ fi
+}
diff --git a/net-misc/owncloud-client/owncloud-client-1.8.3.ebuild b/net-misc/owncloud-client/owncloud-client-1.8.3.ebuild
new file mode 100644
index 000000000000..a5c29bcc98f0
--- /dev/null
+++ b/net-misc/owncloud-client/owncloud-client-1.8.3.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 cmake-utils
+
+DESCRIPTION="Synchronize files from ownCloud Server with your computer"
+HOMEPAGE="http://owncloud.org/"
+SRC_URI="http://download.owncloud.com/desktop/stable/${P/-}.tar.xz"
+
+LICENSE="CC-BY-3.0 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc nautilus samba +sftp test qt4 +qt5"
+
+REQUIRED_USE="^^ ( qt4 qt5 )"
+
+RDEPEND=">=dev-db/sqlite-3.4:3
+ sys-fs/inotify-tools
+ virtual/libiconv
+ nautilus? ( dev-python/nautilus-python )
+ qt4? (
+ dev-libs/qtkeychain[qt4]
+ dev-qt/qtcore:4
+ dev-qt/qtdbus:4
+ dev-qt/qtgui:4
+ dev-qt/qtsql:4
+ dev-qt/qtwebkit:4
+ net-libs/neon[ssl]
+ )
+ qt5? (
+ dev-libs/qtkeychain[qt5]
+ dev-qt/linguist-tools:5
+ dev-qt/qtconcurrent:5
+ dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ >=dev-qt/qtnetwork-5.4:5
+ dev-qt/qtgui:5
+ dev-qt/qtquickcontrols:5
+ dev-qt/qtsql:5
+ dev-qt/qtwebkit:5[printsupport]
+ )
+ samba? ( >=net-fs/samba-3.5 )
+ sftp? ( >=net-libs/libssh-0.5 )
+ !net-misc/ocsync"
+DEPEND="${RDEPEND}
+ doc? (
+ dev-python/sphinx
+ dev-texlive/texlive-latexextra
+ virtual/latex-base
+ )
+ test? (
+ dev-util/cmocka
+ qt4? ( dev-qt/qttest:4 )
+ qt5? ( dev-qt/qttest:5 )
+ )"
+
+S=${WORKDIR}/${P/-}
+
+src_prepare() {
+ # Keep tests in ${T}
+ sed -i -e "s#\"/tmp#\"${T}#g" test/test*.h || die "sed failed"
+
+ use nautilus || sed -i -e "s/add_subdirectory(nautilus)//" \
+ shell_integration/CMakeLists.txt || die "sed failed"
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DSYSCONF_INSTALL_DIR="${EPREFIX}"/etc
+ -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PF}
+ -DWITH_ICONV=ON
+ $(cmake-utils_use_with doc DOC)
+ $(cmake-utils_use test UNIT_TESTING)
+ $(cmake-utils_use_find_package samba Libsmbclient)
+ $(cmake-utils_use_find_package sftp LibSSH)
+ $(cmake-utils_use_build qt4 WITH_QT4)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ # 1 test needs an existing ${HOME}/.config directory
+ mkdir "${T}"/.config
+ export HOME="${T}"
+ cmake-utils_src_test
+}
+
+pkg_postinst() {
+ if ! use doc ; then
+ elog "Documentation and man pages not installed"
+ elog "Enable doc USE-flag to generate them"
+ fi
+}
diff --git a/net-misc/owncloud-client/owncloud-client-1.8.4.ebuild b/net-misc/owncloud-client/owncloud-client-1.8.4.ebuild
new file mode 100644
index 000000000000..a5c29bcc98f0
--- /dev/null
+++ b/net-misc/owncloud-client/owncloud-client-1.8.4.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 cmake-utils
+
+DESCRIPTION="Synchronize files from ownCloud Server with your computer"
+HOMEPAGE="http://owncloud.org/"
+SRC_URI="http://download.owncloud.com/desktop/stable/${P/-}.tar.xz"
+
+LICENSE="CC-BY-3.0 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc nautilus samba +sftp test qt4 +qt5"
+
+REQUIRED_USE="^^ ( qt4 qt5 )"
+
+RDEPEND=">=dev-db/sqlite-3.4:3
+ sys-fs/inotify-tools
+ virtual/libiconv
+ nautilus? ( dev-python/nautilus-python )
+ qt4? (
+ dev-libs/qtkeychain[qt4]
+ dev-qt/qtcore:4
+ dev-qt/qtdbus:4
+ dev-qt/qtgui:4
+ dev-qt/qtsql:4
+ dev-qt/qtwebkit:4
+ net-libs/neon[ssl]
+ )
+ qt5? (
+ dev-libs/qtkeychain[qt5]
+ dev-qt/linguist-tools:5
+ dev-qt/qtconcurrent:5
+ dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ >=dev-qt/qtnetwork-5.4:5
+ dev-qt/qtgui:5
+ dev-qt/qtquickcontrols:5
+ dev-qt/qtsql:5
+ dev-qt/qtwebkit:5[printsupport]
+ )
+ samba? ( >=net-fs/samba-3.5 )
+ sftp? ( >=net-libs/libssh-0.5 )
+ !net-misc/ocsync"
+DEPEND="${RDEPEND}
+ doc? (
+ dev-python/sphinx
+ dev-texlive/texlive-latexextra
+ virtual/latex-base
+ )
+ test? (
+ dev-util/cmocka
+ qt4? ( dev-qt/qttest:4 )
+ qt5? ( dev-qt/qttest:5 )
+ )"
+
+S=${WORKDIR}/${P/-}
+
+src_prepare() {
+ # Keep tests in ${T}
+ sed -i -e "s#\"/tmp#\"${T}#g" test/test*.h || die "sed failed"
+
+ use nautilus || sed -i -e "s/add_subdirectory(nautilus)//" \
+ shell_integration/CMakeLists.txt || die "sed failed"
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DSYSCONF_INSTALL_DIR="${EPREFIX}"/etc
+ -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PF}
+ -DWITH_ICONV=ON
+ $(cmake-utils_use_with doc DOC)
+ $(cmake-utils_use test UNIT_TESTING)
+ $(cmake-utils_use_find_package samba Libsmbclient)
+ $(cmake-utils_use_find_package sftp LibSSH)
+ $(cmake-utils_use_build qt4 WITH_QT4)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ # 1 test needs an existing ${HOME}/.config directory
+ mkdir "${T}"/.config
+ export HOME="${T}"
+ cmake-utils_src_test
+}
+
+pkg_postinst() {
+ if ! use doc ; then
+ elog "Documentation and man pages not installed"
+ elog "Enable doc USE-flag to generate them"
+ fi
+}
diff --git a/net-misc/packETH/Manifest b/net-misc/packETH/Manifest
new file mode 100644
index 000000000000..3101b8025bcb
--- /dev/null
+++ b/net-misc/packETH/Manifest
@@ -0,0 +1,3 @@
+DIST packETH-1.7.2.tar.bz2 403655 SHA256 3bccfcc2fad3c68ae1489f73944421f438635c152c43b968dd0c20899351207e SHA512 110f66ea130a20491648df603bf83f54bd216c55f71bfa19e8e5d7c77fdc616a731cc5d540dd9b5c5ac6e762956bf4cff08d75d3b848a3714011162079a3ca78 WHIRLPOOL da05c1a2de0cd551c2268124b6a41eb06e4b8c83a10d5a1a38c21cab082a53638338955211e680e7920dca3f4f1c5643701f10e1db7c0661dfec7f8e284d0842
+DIST packETH-1.7.3.tar.gz 395666 SHA256 47c37918abc6d507aa4599e92ccd913d07cf8d73c44f247b661a1891188c29e6 SHA512 349fd579bbbbbbbe2ca96374c8083ecf047a1c5f51626341bd7f98b4c8a29b74342311e45950a3f2628ba53dba250135c3802556b6aa5c49181e72313a7256d5 WHIRLPOOL 8342cfd373217b400c9f1f59020dfcb4ad9ad3fc34a71d7080847242baeeefa1a77562ad25878c0634956d6a5e7fc76299042d7d18b98f6ab1d1b724ab216a55
+DIST packETH-1.8.tar.bz 305580 SHA256 0b9333640bf7c0f31190c6fa348224864bc4603519a441438085177ae4d1116e SHA512 37df839186b7982a34f328256dcc23e100f28cf071586b2b55204c5c6b6e8a3fd3803e230d4e9bc6492f51f45bf17d1ea4716043914f649320f2d37f3280cf52 WHIRLPOOL 56914c1fa7aca1aad1e45743dbc6f09902e0e2636d2c852c8a3d4c2496e34a051f7a8b4b2928d81a31f89dc4f2a693aa5313f7516071723ebec36035c856e517
diff --git a/net-misc/packETH/files/packETH-1.7.3-libs-and-flags.patch b/net-misc/packETH/files/packETH-1.7.3-libs-and-flags.patch
new file mode 100644
index 000000000000..fc0efb7e309a
--- /dev/null
+++ b/net-misc/packETH/files/packETH-1.7.3-libs-and-flags.patch
@@ -0,0 +1,15 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -30,11 +30,9 @@
+ DEFS= \
+ -DPKGDATADIR=\"$(pkgdatadir)/\"
+
+-LIBS=$(DEPS_LIBS)
++LIBS+=$(DEPS_LIBS)
+
+ AM_CPPFLAGS = \
+- -g \
+- -O2 \
+ -Wall \
+ -Wmissing-prototypes \
+ -Wmissing-declarations \
diff --git a/net-misc/packETH/metadata.xml b/net-misc/packETH/metadata.xml
new file mode 100644
index 000000000000..c5d8c73e53a3
--- /dev/null
+++ b/net-misc/packETH/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>netmon</herd>
+ <upstream>
+ <remote-id type="sourceforge">packeth</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/packETH/packETH-1.7.2.ebuild b/net-misc/packETH/packETH-1.7.2.ebuild
new file mode 100644
index 000000000000..6a3e1662e58d
--- /dev/null
+++ b/net-misc/packETH/packETH-1.7.2.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools
+
+DESCRIPTION="Packet generator tool for ethernet"
+HOMEPAGE="http://packeth.sourceforge.net/"
+SRC_URI="mirror://sourceforge/packeth/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="
+ dev-libs/glib:2
+ x11-libs/gdk-pixbuf
+ x11-libs/gtk+:2
+"
+DEPEND="
+ virtual/pkgconfig
+ ${RDEPEND}
+"
+DOCS=( AUTHORS README )
+
+src_prepare() {
+ sed -i Makefile.am -e '/^ -g/d;/^ -O2/d' || die
+ eautomake
+}
diff --git a/net-misc/packETH/packETH-1.7.3.ebuild b/net-misc/packETH/packETH-1.7.3.ebuild
new file mode 100644
index 000000000000..522484707aab
--- /dev/null
+++ b/net-misc/packETH/packETH-1.7.3.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Packet generator tool for ethernet"
+HOMEPAGE="http://packeth.sourceforge.net/"
+SRC_URI="mirror://sourceforge/packeth/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+RDEPEND="
+ dev-libs/glib:2
+ x11-libs/gdk-pixbuf
+ x11-libs/gtk+:2
+"
+DEPEND="
+ virtual/pkgconfig
+ ${RDEPEND}
+"
+DOCS=( AUTHORS CHANGELOG README TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libs-and-flags.patch
+ eautoreconf
+}
diff --git a/net-misc/packETH/packETH-1.8.ebuild b/net-misc/packETH/packETH-1.8.ebuild
new file mode 100644
index 000000000000..3b53a6338ac4
--- /dev/null
+++ b/net-misc/packETH/packETH-1.8.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Packet generator tool for ethernet"
+HOMEPAGE="http://packeth.sourceforge.net/"
+SRC_URI="mirror://sourceforge/packeth/${P}.tar.bz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-libs/glib:2
+ x11-libs/gdk-pixbuf
+ x11-libs/gtk+:2
+"
+DEPEND="
+ virtual/pkgconfig
+ ${RDEPEND}
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.7.3-libs-and-flags.patch
+ eautoreconf
+}
+
+DOCS=( AUTHORS CHANGELOG README )
diff --git a/net-misc/pavuk/Manifest b/net-misc/pavuk/Manifest
new file mode 100644
index 000000000000..68d46aa2b61e
--- /dev/null
+++ b/net-misc/pavuk/Manifest
@@ -0,0 +1 @@
+DIST pavuk-0.9.36_pre20120215.tar.xz 810516 SHA256 522e07e3163b835f26157f091ad43bd6fa6e2ddb5d46c2176f10e81c6429ff1e SHA512 d7393abb72e328d3c3e8c005282a8b0ec793eee94e5de00c4518aa1a27403da535372679cf3b803a574e6d0dea8c53ccdbb3aa68d9f0c85da5128dba86b65a4f WHIRLPOOL f04b55a5b6efd634e1ec7b448b9c443d137ae15e0361a45584b72c636aa016a2a95b59b22fee9bb54652a5762eac3e5f524d4c45ad4d226a982960f257ec4afb
diff --git a/net-misc/pavuk/files/pavuk-0.9.36_pre20120215-fix-gtkmulticol-segfault.patch b/net-misc/pavuk/files/pavuk-0.9.36_pre20120215-fix-gtkmulticol-segfault.patch
new file mode 100644
index 000000000000..6ce18c1ed3e2
--- /dev/null
+++ b/net-misc/pavuk/files/pavuk-0.9.36_pre20120215-fix-gtkmulticol-segfault.patch
@@ -0,0 +1,26 @@
+--- src/gtkmulticol.c 2009-01-21 16:37:39.000000000 +0800
++++ src/gtkmulticol.c 2012-02-21 09:47:21.680512626 +0800
+@@ -45,9 +45,9 @@
+ static void gtk_multicol_size_request(GtkWidget *widget, GtkRequisition *requisition);
+ static void gtk_multicol_size_allocate(GtkWidget *widget, GtkAllocation *allocation);
+
+-guint gtk_multicol_get_type(void)
++GType gtk_multicol_get_type(void)
+ {
+- static guint multicol_type = 0;
++ static GType multicol_type = 0;
+
+ if (!multicol_type)
+ {
+
+--- src/gtkmulticol.h 2009-01-21 16:37:40.000000000 +0800
++++ src/gtkmulticol.h 2012-02-21 09:47:42.880514545 +0800
+@@ -41,7 +41,7 @@
+ GtkBoxClass parent_class;
+ };
+
+-guint gtk_multicol_get_type(void);
++GType gtk_multicol_get_type(void);
+ GtkWidget *gtk_multicol_new(gint nrows);
+ void gtk_multicol_set_number_of_rows(GtkMultiCol *multicol, gint nrows);
+ void gtk_multicol_set_spacing(GtkMultiCol *multicol, gint hspacing, gint vspacing);
diff --git a/net-misc/pavuk/files/pavuk-0.9.36_pre20120215-fix-underlinking.patch b/net-misc/pavuk/files/pavuk-0.9.36_pre20120215-fix-underlinking.patch
new file mode 100644
index 000000000000..25338460bd4c
--- /dev/null
+++ b/net-misc/pavuk/files/pavuk-0.9.36_pre20120215-fix-underlinking.patch
@@ -0,0 +1,10 @@
+--- configure.in~ 2011-03-02 10:44:45.000000000 +0800
++++ configure.in 2012-02-23 09:55:28.073709216 +0800
+@@ -1749,6 +1749,7 @@
+
+ if test -n "$GTK_LIBS" ; then
+ if test -n "$GTK_LIBS"; then
++ AX_ADD_OPTION([LIBS], [$X_LIBS])
+ AX_ADD_OPTION([LIBS], [$GTK_LIBS])
+ AX_ADD_OPTION([CPPFLAGS], [$GTK_CFLAGS])
+ AC_DEFINE_UNQUOTED(GTK_FACE, [$GTK_VERSION], [with GTK+ GUI])
diff --git a/net-misc/pavuk/files/pavuk-0.9.36_pre20120215-pcre-fix.patch b/net-misc/pavuk/files/pavuk-0.9.36_pre20120215-pcre-fix.patch
new file mode 100644
index 000000000000..3d92fdd4b8b6
--- /dev/null
+++ b/net-misc/pavuk/files/pavuk-0.9.36_pre20120215-pcre-fix.patch
@@ -0,0 +1,12 @@
+--- src/re.c~ 2009-01-21 16:37:40.000000000 +0800
++++ src/re.c 2012-02-18 13:46:30.986959223 +0800
+@@ -193,8 +193,7 @@ int re_subexpr_info(re_entry *ree, int *
+ {
+ if (nr)
+ {
+- pcre_fullinfo(ree->preg, ree->preg_extra, PCRE_INFO_CAPTURECOUNT, &pmatch_nr);
+- *nr = pmatch_nr;
++ pcre_fullinfo(ree->preg, ree->preg_extra, PCRE_INFO_CAPTURECOUNT, nr);
+ }
+ }
+ #endif
diff --git a/net-misc/pavuk/files/pavuk-0.9.36_pre20120215-tl_selectr-overflow-fix.patch b/net-misc/pavuk/files/pavuk-0.9.36_pre20120215-tl_selectr-overflow-fix.patch
new file mode 100644
index 000000000000..ec3655f1468c
--- /dev/null
+++ b/net-misc/pavuk/files/pavuk-0.9.36_pre20120215-tl_selectr-overflow-fix.patch
@@ -0,0 +1,13 @@
+diff --git a/src/absio.orig.c b/src/absio.c
+index 7be9255..e19d7cd 100644
+--- a/src/absio.orig.c
++++ b/src/absio.c
+@@ -181,7 +181,7 @@ int tl_selectr(int sock, long int timeout)
+ {
+ if ((rv == 0) && !cfg.stop && !cfg.rbreak && !FD_ISSET(sock, &readfds))
+ {
+- char buf[32];
++ char buf[64];
+ int r;
+ char buf2[64];
+
diff --git a/net-misc/pavuk/metadata.xml b/net-misc/pavuk/metadata.xml
new file mode 100644
index 000000000000..3fcf9314ee9c
--- /dev/null
+++ b/net-misc/pavuk/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>proxy-maintainers</herd>
+<maintainer>
+ <email>pyxlcy@gmail.com</email>
+ <description>Please assign bugs</description>
+</maintainer>
+<maintainer>
+ <email>pacho@gentoo.org</email>
+ <description>proxy-maintainer, please CC on bugs</description>
+</maintainer>
+<use>
+<flag name="hammer">Turn on chunky/hammer mode (DoS) in pavuk: when
+ specified, pavuk will include features to stress test web sites using an
+ ultrahigh performancereplay mechanism</flag>
+</use>
+</pkgmetadata>
diff --git a/net-misc/pavuk/pavuk-0.9.36_pre20120215-r2.ebuild b/net-misc/pavuk/pavuk-0.9.36_pre20120215-r2.ebuild
new file mode 100644
index 000000000000..57b86b076a5a
--- /dev/null
+++ b/net-misc/pavuk/pavuk-0.9.36_pre20120215-r2.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+S="${WORKDIR}/${PN}"
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+inherit eutils autotools-utils
+
+DESCRIPTION="Web spider and website mirroring tool"
+HOMEPAGE="http://www.pavuk.org/"
+SRC_URI="http://dev.gentoo.org/~pacho/maintainer-needed/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="debug gtk hammer ipv6 nls pcre profile ssl"
+
+RDEPEND="virtual/libintl:=
+ gtk? ( x11-libs/gtk+:2 )
+ pcre? ( dev-libs/libpcre:= )
+ ssl? ( dev-libs/openssl:= )"
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4
+ sys-devel/gettext"
+
+PATCHES=(
+ # Fixes a bug in re.c for PCRE support
+ "${FILESDIR}/${P}-pcre-fix.patch"
+
+ # Fixes underlinking, bug #405337
+ "${FILESDIR}/${P}-fix-underlinking.patch"
+
+ # Fixes a segfault in the GTK+2 interface on amd64, bug #262504#c40
+ "${FILESDIR}/${P}-fix-gtkmulticol-segfault.patch"
+
+ # Fixed overflow, bug #450990
+ "${FILESDIR}/${P}-tl_selectr-overflow-fix.patch"
+)
+
+DOCS=( README CREDITS NEWS AUTHORS BUGS TODO MAILINGLIST wget-pavuk.HOWTO
+ ChangeLog wget-pavuk.HOWTO pavuk_authinfo.sample pavukrc.sample )
+
+src_prepare() {
+ # Fixes a bug in Makefile.am that causes aclocal to fail
+ sed -i 's/^\(ACLOCAL_AMFLAGS[[:space:]]*=[[:space:]]*-I[[:space:]]*\)\$(top_srcdir)\//\1/' "${S}/Makefile.am" || die
+
+ # Fixes a bug in configure.in that breaks non-debug builds
+ sed -i 's/\([[:space:]]C\(PP\)*FLAGS=`\)/true; # \1/' "${S}/configure.in" || die
+
+ # Fix for building with ~dev-lang/spidermonkey-1.8.5
+ # sed -i 's/mozjs/mozjs185/g' "${S}/configure.in" || die
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local regex="auto"
+ use pcre && regex="pcre"
+
+ local myeconfargs=(
+ --enable-threads
+ --enable-socks
+ --enable-utf-8
+ --disable-js
+ "--with-regex=${regex}"
+ $(use_enable gtk)
+ $(use_enable gtk gtk2)
+ $(use_enable gtk gnome)
+ $(use_with gtk x)
+ $(use_enable debug debugging)
+ $(use_enable debug debug-build)
+ # $(use_enable debug debug-features)
+ $(use_enable ssl)
+ $(use_enable nls)
+ $(use_enable ipv6)
+ # $(use_enable javascript js)
+ $(use_enable profile profiling)
+ )
+
+ # JavaScript bindings: Broken!
+ # ============================
+ # Currently could pass configure phase with ~dev-lang/spidermonkey-1.8.5
+ # yet apparently incompatible with recent versions of spidermonkey
+
+ # if use javascript; then
+ # local jspkg='mozjs185'
+ # local jsinclude=$(pkg-config --cflags "$jspkg")
+ # local jslibs='/dev/null '$(pkg-config --libs-only-l "$jspkg")
+ # myeconfargs+=(
+ # "--with-js-include=${jsinclude}"
+ # "--with-js-libraries=${jslibs}"
+ # )
+ # fi
+
+ autotools-utils_src_configure
+}
+
+src_install() {
+ if use gtk; then
+ newicon src/pavuk_logo.xpm pavuk.xpm
+ domenu pavuk.desktop
+ fi
+
+ doman "${S}/doc/pavuk.1"
+
+ autotools-utils_src_install
+}
diff --git a/net-misc/pcapfix/Manifest b/net-misc/pcapfix/Manifest
new file mode 100644
index 000000000000..fbf7d0d44c6e
--- /dev/null
+++ b/net-misc/pcapfix/Manifest
@@ -0,0 +1 @@
+DIST pcapfix-0.7.tar.gz 25753 SHA256 246f44427c9fb0b82c469c6fc9406ca44520b96cc87f407cc65c90c8c5ee8332 SHA512 254eb5803bbcff4249f20af4cd1afa5b300eefb3448e3650899fa94329f38e298e4e7b1033836aa04434b1eadc67611204e3f67d41917c761d5cba424d789298 WHIRLPOOL 2ef59d5c12a34429818cc8d0e4dc0bf644196ec1ba477f96b5f3358fb32bd1b1b46b780de907ec92523577fb1486eea259c454517c7baef1d9b223ea12bc07e9
diff --git a/net-misc/pcapfix/metadata.xml b/net-misc/pcapfix/metadata.xml
new file mode 100644
index 000000000000..c6d862855eb5
--- /dev/null
+++ b/net-misc/pcapfix/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-misc/pcapfix/pcapfix-0.7.ebuild b/net-misc/pcapfix/pcapfix-0.7.ebuild
new file mode 100644
index 000000000000..ebb80d133f76
--- /dev/null
+++ b/net-misc/pcapfix/pcapfix-0.7.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Repair and fix broken pcap files"
+HOMEPAGE="http://f00l.de/pcapfix/"
+SRC_URI="http://f00l.de/pcapfix/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -e 's/gcc/$(CC) $(CFLAGS)/g' -i Makefile
+}
+
+src_install() {
+ doman pcapfix.1
+ dobin pcapfix
+ dodoc README TODO Changelog
+}
diff --git a/net-misc/pedro/Manifest b/net-misc/pedro/Manifest
new file mode 100644
index 000000000000..263ec1542953
--- /dev/null
+++ b/net-misc/pedro/Manifest
@@ -0,0 +1,2 @@
+DIST pedro-1.6.tgz 711856 RMD160 7978b894bfb4f807a1411d79388d215e236baee1 SHA1 1f71817c692c3f20a91c5345de88a82476b6f41b SHA256 bc13b0d9020e46c2f374d0e3c078fcec5ceafd75894e8b65d2c2985ae356225c
+DIST pedro-manual-1.6.tar.gz 222863 RMD160 b481345af93288742d489382e38b20a26fd923d2 SHA1 7b47e6dfafe7b28804fe6515f6e97b1831870ff5 SHA256 2cc10c5c4de00a344a8f2cd58b293bcda9b4629f4fa5567fb6fb507b7e83d5e4
diff --git a/net-misc/pedro/files/pedro-1.5-portage.patch b/net-misc/pedro/files/pedro-1.5-portage.patch
new file mode 100644
index 000000000000..a5639eac38b2
--- /dev/null
+++ b/net-misc/pedro/files/pedro-1.5-portage.patch
@@ -0,0 +1,20 @@
+--- pedro-1.5.orig/configure 2010-06-15 15:59:50.000000000 +1200
++++ pedro-1.5/configure 2010-07-03 15:29:06.000000000 +1200
+@@ -11292,7 +11292,7 @@
+ ac_config_headers="$ac_config_headers config.h"
+
+ #AC_CONFIG_MACRO_DIR([m4])
+-CPPFLAGS="-O2 -g `pkg-config --cflags glib-2.0`"
++CPPFLAGS="`pkg-config --cflags glib-2.0`"
+ case "${host}" in
+ i[3456789]86-*-mingw32*)
+ WIN32="yes"
+@@ -11300,7 +11300,7 @@
+ ;;
+ *)
+ WIN32="no"
+- LDFLAGS="-L../lib -lpedro `pkg-config --libs glib-2.0` -lm"
++ LDFLAGS="$LDFLAGS -L../lib -lpedro `pkg-config --libs glib-2.0` -lm"
+ ;;
+ esac
+ ac_config_files="$ac_config_files Makefile src/Makefile src/server/Makefile src/lib/Makefile src/examples/Makefile doc/Makefile"
diff --git a/net-misc/pedro/files/pedro-1.6-portage.patch b/net-misc/pedro/files/pedro-1.6-portage.patch
new file mode 100644
index 000000000000..be1f9d3b2136
--- /dev/null
+++ b/net-misc/pedro/files/pedro-1.6-portage.patch
@@ -0,0 +1,20 @@
+--- pedro-1.6.orig/configure 2011-08-23 11:01:21.000000000 +1200
++++ pedro-1.6/configure 2011-11-19 21:28:47.000000000 +1300
+@@ -10478,7 +10478,7 @@
+ ac_config_headers="$ac_config_headers config.h"
+
+ #AC_CONFIG_MACRO_DIR([m4])
+-CPPFLAGS="-O2 -g `pkg-config --cflags glib-2.0`"
++CPPFLAGS="`pkg-config --cflags glib-2.0`"
+ case "${host}" in
+ i[3456789]86-*-mingw32*)
+ WIN32="yes"
+@@ -10486,7 +10486,7 @@
+ ;;
+ *)
+ WIN32="no"
+- LDFLAGS="-L../lib -lpedro `pkg-config --libs glib-2.0` -lm"
++ LDFLAGS="$LDFLAGS -L../lib -lpedro `pkg-config --libs glib-2.0` -lm"
+ ;;
+ esac
+ ac_config_files="$ac_config_files Makefile src/Makefile src/server/Makefile src/lib/Makefile src/examples/Makefile doc/Makefile"
diff --git a/net-misc/pedro/metadata.xml b/net-misc/pedro/metadata.xml
new file mode 100644
index 000000000000..f21843862263
--- /dev/null
+++ b/net-misc/pedro/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>keri@gentoo.org</email>
+ <name>Keri Harris</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-misc/pedro/pedro-1.6.ebuild b/net-misc/pedro/pedro-1.6.ebuild
new file mode 100644
index 000000000000..fc77a0e1965d
--- /dev/null
+++ b/net-misc/pedro/pedro-1.6.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils
+
+DESCRIPTION="Pedro is a subscription/notification communications system"
+HOMEPAGE="http://www.itee.uq.edu.au/~pjr/HomePages/PedroHome.html"
+SRC_URI="http://www.itee.uq.edu.au/~pjr/HomePages/PedroFiles/${P}.tgz
+ doc? ( mirror://gentoo/${PN}-manual-${PV}.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="doc examples"
+
+RDEPEND="dev-libs/glib:2"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/${P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-portage.patch
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ dodoc AUTHORS README || die
+
+ if use doc ; then
+ dodoc "${WORKDIR}"/${PN}.pdf || die
+ fi
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins src/examples/*.{c,tcl} || die
+ insinto /usr/share/doc/${PF}/examples/java_api
+ doins src/java_api/*.java || die
+ insinto /usr/share/doc/${PF}/examples/python_api
+ doins src/python_api/*.py || die
+ fi
+}
diff --git a/net-misc/pen/Manifest b/net-misc/pen/Manifest
new file mode 100644
index 000000000000..b45f27f6e17d
--- /dev/null
+++ b/net-misc/pen/Manifest
@@ -0,0 +1 @@
+DIST pen-0.25.1.tar.gz 150231 SHA256 2dd9ca3b2f8057b9e59ddf07000a34649835ad23b45e6d34e8b9422d3dcb5270 SHA512 712c5899eb0ab20df1c91653328a63fe1715f0412e434aa08229555ff725bd54eb4732be1176f2cea02761db37a5ae241a4f790ca803fc1002be2bf65bc6269b WHIRLPOOL 22fb7c8c88415e303158e6a3fe203dd9a664be13f9cf8bdafe20502c07e2f06205d12000ed4b65a3fbaf4ee61d0a015b0e4d1b72a592b66814fb8114932f78bd
diff --git a/net-misc/pen/metadata.xml b/net-misc/pen/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/net-misc/pen/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/pen/pen-0.25.1.ebuild b/net-misc/pen/pen-0.25.1.ebuild
new file mode 100644
index 000000000000..04a756fc6b7f
--- /dev/null
+++ b/net-misc/pen/pen-0.25.1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="TCP Load Balancing Port Forwarder"
+HOMEPAGE="http://siag.nu/pen/"
+SRC_URI="http://siag.nu/pub/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="geoip ssl"
+
+DEPEND="geoip? ( dev-libs/geoip )
+ ssl? ( dev-libs/openssl )"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ econf --with-docdir=/usr/share/doc/${PF} \
+ $(use_with geoip) \
+ $(use_with ssl)
+}
diff --git a/net-misc/pimpd/Manifest b/net-misc/pimpd/Manifest
new file mode 100644
index 000000000000..db80a02f792a
--- /dev/null
+++ b/net-misc/pimpd/Manifest
@@ -0,0 +1 @@
+DIST pimpd_0.8.tar.gz 6763 SHA256 a76ec3a7c5344399e5dae89afa352c0efc07788b91e8b9fb606e7dca251bbfec SHA512 cb9a60386d5071e21feacf991bb1b2d3d0cb681561a04dc3b9e830336b9d63b4c7026e0a1e43d5276895c733cc0c7d9e072ce1e13ae4b26e83543c53c8147dbe WHIRLPOOL ddb54d11af5dc5df39dc7dcaba30ddbadde5454e091d0ed3b2c319df796f93797900260df72459fc77bc3d0f2b55c34d1a1e79bce2ee4f159e9cd35b7e026de6
diff --git a/net-misc/pimpd/metadata.xml b/net-misc/pimpd/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/net-misc/pimpd/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/pimpd/pimpd-0.8.ebuild b/net-misc/pimpd/pimpd-0.8.ebuild
new file mode 100644
index 000000000000..1cd88bdcd815
--- /dev/null
+++ b/net-misc/pimpd/pimpd-0.8.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="RFC1413-compliant identd server supporting masqueraded connections"
+HOMEPAGE="http://gentoo.org"
+SRC_URI="http://cats.meow.at/~peter/pimpd_${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ppc sparc x86"
+IUSE=""
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dosbin pimpd
+ dodoc README
+}
diff --git a/net-misc/pipes/Manifest b/net-misc/pipes/Manifest
new file mode 100644
index 000000000000..15c3f96fc40c
--- /dev/null
+++ b/net-misc/pipes/Manifest
@@ -0,0 +1,2 @@
+DIST pipes-1.16.1.tar.bz2 21642 SHA256 d7bb02f7e10ee91174a4d0d74ce61e1328d08be68d1ab3c235e63d2f34ada62c SHA512 ff8f6cf7934149c3d8a6e0443a06840863313acccd31791913fa25b086173e834d8f357212811e5e1ddb62148d3e687858e8956065734f11d7fc729f2a64b0a3 WHIRLPOOL 6ab87a0228451ad98746e5f9346922fcf6246c87b57e09a709781af478a546e49c521bd4b2bc0a7824776cf1dfd230bc7e61b3f1f12c41e19c87f09e2059a831
+DIST pipes-1.16.tar.bz2 21441 SHA256 cd5366d8e1ee9a9135e61b976eafc4b2e36938cda81aaed6c281b0b438335150
diff --git a/net-misc/pipes/metadata.xml b/net-misc/pipes/metadata.xml
new file mode 100644
index 000000000000..bd1cbeb8e1f9
--- /dev/null
+++ b/net-misc/pipes/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>netmon</herd>
+<longdescription>
+I just noticed that netpipes doesn't support bidirectional pipes.
+So I made my own version.
+Now I can say in computer A that "plis 12345 -io ohjelma" and in computer B that "pcon A 12345 -io ohjelma2",
+and they communicate together then.
+My example utilization was that I can send the picture of SNES-emulator to another
+computer via network, and grab the keyboard input there, so get two consoles to
+the same game.
+My friend wanted to watch when I play FF6, but didn't want to sit next to my monitor,
+and asked if he could get the picture to his monitor.
+And he got it.
+Then he asked if he could play it from his computer at the same time as me...
+And now it works too.
+Other ways of use can everybody invent theirselves.
+It's really easy to make simple server software with this.
+For example, do "plis 79 -io finger" and then you have a finger-service.
+Or "plis 5555 -o 'cat signature'" and then port 5555 gives your signature.
+</longdescription>
+</pkgmetadata>
diff --git a/net-misc/pipes/pipes-1.16.1.ebuild b/net-misc/pipes/pipes-1.16.1.ebuild
new file mode 100644
index 000000000000..b812b80db096
--- /dev/null
+++ b/net-misc/pipes/pipes-1.16.1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Very versatile TCP pipes"
+HOMEPAGE="http://bisqwit.iki.fi/source/pipes.html"
+SRC_URI="http://bisqwit.iki.fi/src/arch/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ppc ~s390 ~x86"
+
+src_prepare() {
+ # Prevent the build system from looking for dependencies
+ touch .depend || die
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) OPTIM="${CFLAGS}" LDFLAGS="${CFLAGS} ${LDFLAGS}"
+}
+
+src_install() {
+ dobin plis
+ dosym /usr/bin/plis /usr/bin/pcon
+ dodoc Examples ChangeLog
+ dohtml README.html
+}
diff --git a/net-misc/pipes/pipes-1.16.ebuild b/net-misc/pipes/pipes-1.16.ebuild
new file mode 100644
index 000000000000..16d245bf5b15
--- /dev/null
+++ b/net-misc/pipes/pipes-1.16.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Very versatile TCP pipes"
+HOMEPAGE="http://bisqwit.iki.fi/source/pipes.html"
+SRC_URI="http://bisqwit.iki.fi/src/arch/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86 s390 ~ppc"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ sed -i \
+ -e "s:-O2:${CFLAGS}:" Makefile || \
+ die "sed Makefile failed"
+ touch .depend
+}
+
+src_compile() {
+ emake || die "emake failed"
+}
+
+src_install() {
+ dobin plis || die "dobin failed"
+ dohard /usr/bin/plis /usr/bin/pcon || die "dohard failed"
+ dodoc Examples ChangeLog
+ dohtml README.html
+}
diff --git a/net-misc/plowshare/Manifest b/net-misc/plowshare/Manifest
new file mode 100644
index 000000000000..7411988813f1
--- /dev/null
+++ b/net-misc/plowshare/Manifest
@@ -0,0 +1,5 @@
+DIST plowshare-1.2.0.tar.gz 253572 SHA256 0f1ff5d2986334209389857d6c6f3f63162d661b28687747ae1a8612f3e5d678 SHA512 5fd8eeef5a4d6a42d03a858b451fa2ac121e0dbdcdb2f2981cef6660b0972e44396e3b8b3d9eb5b36ca8ce0aacda7df8f193ba4e5464c1f96a4c8ff2c104ff9a WHIRLPOOL 0009dc91d9a0fc15083c781fa6a73f46f966af673d20cf8897bb786f2337a36a75a0dae55dd2109f88d4e1a57578824763b1f79ae7949d497e9a9136ad2d2632
+DIST plowshare-2.0.1.tar.gz 80167 SHA256 89a9d8af78e026a09979f11ec3c2d5ba4922977874c6e62afd28295dfb82d1b9 SHA512 4ed6ac9f1b3d7893af22dd529debfd589e564d4e24bcaaaa0e2d542edad883d5dd98c2e8cd9621e6f2c88800f58b683e1d5be4d31f6b8d9386a9c9371d9fc7cc WHIRLPOOL 683a7cfcf323bf07f3d50d146e4e37a8f26b02e5a262ed41e5e19d7e934bb57fbe5313b70bf9e3208b0595de5b82b3e58f7bc3bdf7dd51f2daef6cc056843ccc
+DIST plowshare-2.1.0.tar.gz 89800 SHA256 762482dd11c1e1af08b940c613856a2f51e998b25c11ba14f6a7a734eb94de16 SHA512 7c4b9a4aae92fc9baf34133706a664c0c20547c1c83e68430bf9eb64a393d47c187d3c197c2f2a0e75a15b36d4522293ea93ff4b07cebc47f220ccf2dd1ef4a3 WHIRLPOOL e745eef81c4b2d3431d2a306915d035b94e94aa77c5c6eca521d6f2b9f90db7399f028ae37bc5df7e43e738dab28d9bd5f7cfd27d23d64e896f9b5722198f1b2
+DIST plowshare-2.1.1.tar.gz 90653 SHA256 96b3acd1dba1b14f3009334520969af4c00c8f4b7f5d924a26decc4b4a817e53 SHA512 4aae7c64ce8123301b241d31a0f25ffe414295d5d8b354423530f47cbe3dd91a4bbe57a686a6c56015dab37c6b463334b4f9165b570a2c0314c25ee94bc255fc WHIRLPOOL cde48f76136901c4c009611556beda92aa3b4e5ed9fc5d94487ed69d5f11745995dca7ba7bbd2dabe516161efe9e705a7bfbdd21423d96f506aae4079b847a34
+DIST plowshare-modules-2ededde1f34e78dcbacf02e900a2ce8cad2e148d.tar.gz 186296 SHA256 4b1f109120d8e8e0642971b4d7209a0d1a4c1952c13a7fdb80c5a52646158ad5 SHA512 a80a0d53e084f03b93b7466ae401733d9538cd398f8521bf7285cd475f4dbb9495a9d9a69606122f1f3e43b175db77c7eb0aa99526bb9af1debeba2941b23e4d WHIRLPOOL 75ad9cb5378e7f71bfce06f8d7f5082c774bb378e141abddeae13803fb374c0b1ce893deea7881ad24e1a3be3e55cccc5aa183cba71636f8ed78280c9806ee68
diff --git a/net-misc/plowshare/files/plowshare-2.1.0-fix_git_invocation.patch b/net-misc/plowshare/files/plowshare-2.1.0-fix_git_invocation.patch
new file mode 100644
index 000000000000..f73fbcd3d900
--- /dev/null
+++ b/net-misc/plowshare/files/plowshare-2.1.0-fix_git_invocation.patch
@@ -0,0 +1,56 @@
+diff --git a/src/core.sh b/src/core.sh
+index bccdafc..0f38473 100644
+--- a/src/core.sh
++++ b/src/core.sh
+@@ -2883,7 +2883,7 @@ process_configfile_module_options() {
+ # $1: absolute path to plowshare's libdir
+ log_report_info() {
+ local -r LIBDIR1=$1
+- local G GIT_DIR LIBDIR2
++ local G LIBDIR2
+
+ if test $VERBOSE -ge 4; then
+ log_report '=== SYSTEM INFO BEGIN ==='
+@@ -2908,10 +2908,9 @@ log_report_info() {
+ fi
+ done
+
+- GIT_DIR=$(git --work-tree "$LIBDIR" rev-parse --quiet --git-dir) || true
+- if [ -d "$GIT_DIR" ]; then
+- local -r GIT_BRANCH=$(git --git-dir=$GIT_DIR rev-parse --quiet --abbrev-ref HEAD)
+- local -r GIT_REV=$(git --git-dir=$GIT_DIR describe --tags --always 2>/dev/null)
++ if git -C "$LIBDIR" rev-parse --is-inside-work-tree &>/dev/null; then
++ local -r GIT_BRANCH=$(git -C "$LIBDIR" rev-parse --quiet --abbrev-ref HEAD)
++ local -r GIT_REV=$(git -C "$LIBDIR" describe --tags --always 2>/dev/null)
+ log_report "[git ] $GIT_REV ($GIT_BRANCH branch)"
+ fi
+
+diff --git a/src/mod.sh b/src/mod.sh
+index 42795a8..b4c6475 100755
+--- a/src/mod.sh
++++ b/src/mod.sh
+@@ -98,10 +98,9 @@ mod_install() {
+ log_notice "- installing new directory: $L"
+
+ if [ -d "$L" -a -n "$HAVE_GIT" ]; then
+- GIT_DIR=$(git --work-tree "$L" rev-parse --quiet --git-dir) || true
+- if [ -d "$GIT_DIR" ]; then
++ if git -C "$L" rev-parse --is-inside-work-tree &>/dev/null; then
+ log_notice 'WARNING: directory already exists! Do a git pull.'
+- git pull --quiet
++ git -C "$L" pull --quiet
+ else
+ log_error 'ERROR: directory exists but it does not appear to be a git repository, abort'
+ RET=$ERR_FATAL
+@@ -124,9 +123,8 @@ mod_update() {
+
+ if [ -d "$L" ]; then
+ if [ -n "$HAVE_GIT" ]; then
+- GIT_DIR=$(git --work-tree "$L" rev-parse --quiet --git-dir) || true
+- if [ -d "$GIT_DIR" ]; then
+- git pull --quiet
++ if git -C "$L" rev-parse --is-inside-work-tree &>/dev/null; then
++ git -C "$L" pull --quiet
+ else
+ log_error 'ERROR: directory exists but it does not appear to be a git repository, abort!'
+ RET=$ERR_FATAL
diff --git a/net-misc/plowshare/metadata.xml b/net-misc/plowshare/metadata.xml
new file mode 100644
index 000000000000..17fd8a33d3cd
--- /dev/null
+++ b/net-misc/plowshare/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>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+ <use>
+ <flag name="modules">Install a system-wide set of modules</flag>
+ <flag name="view-captcha">View captcha with aview</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">mcrapet/plowshare</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/plowshare/plowshare-1.2.0.ebuild b/net-misc/plowshare/plowshare-1.2.0.ebuild
new file mode 100644
index 000000000000..57e2a188ccbc
--- /dev/null
+++ b/net-misc/plowshare/plowshare-1.2.0.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit bash-completion-r1
+
+DESCRIPTION="Command-line downloader and uploader for file-sharing websites"
+HOMEPAGE="http://code.google.com/p/plowshare/"
+# Fetched from http://${PN}.googlecode.com/archive/v${PV}.tar.gz
+SRC_URI="http://dev.gentoo.org/~voyageur/distfiles/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE="bash-completion +javascript view-captcha"
+
+RDEPEND="
+ >=app-shells/bash-4
+ || ( app-text/recode ( dev-lang/perl dev-perl/HTML-Parser ) )
+ || ( media-gfx/imagemagick[tiff] media-gfx/graphicsmagick[imagemagick,tiff] )
+ net-misc/curl
+ sys-apps/util-linux
+ javascript? ( || ( dev-lang/spidermonkey:0 dev-java/rhino ) )
+ view-captcha? ( || ( media-gfx/aview media-libs/libcaca ) )"
+DEPEND=""
+
+# NOTES:
+# javascript dep should be any javascript interpreter using /usr/bin/js
+
+# Modules using detect_javascript
+JS_MODULES="flashx letitbit nowdownload_co oboom rapidgator yourvideohost zalaa zippyshare"
+
+src_prepare() {
+ if ! use javascript; then
+ for module in ${JS_MODULES}; do
+ sed -i -e "s:^${module}.*::" src/modules/config || die "${module} sed failed"
+ rm src/modules/${module}.sh || die "${module} rm failed"
+ done
+ fi
+
+ # Fix doc install path
+ sed -i -e "/^DOCDIR/s|plowshare4|${P}|" Makefile || die "sed failed"
+
+ if ! use bash-completion
+ then
+ sed -i -e \ "/^install:/s/install_bash_completion//" \
+ Makefile || die "sed failed"
+ fi
+}
+
+src_compile() {
+ # There is a Makefile but it's not compiling anything, let's not try.
+ :
+}
+
+src_test() {
+ # Disable tests because all of them need a working Internet connection.
+ :
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="/usr" \
+ PLOWSHARE_FORCE_VERSION="${PV}" install
+}
+
+pkg_postinst() {
+ if ! use javascript; then
+ ewarn "Without javascript you will not be able to use:"
+ ewarn " ${JS_MODULES}"
+ fi
+}
diff --git a/net-misc/plowshare/plowshare-2.0.1.ebuild b/net-misc/plowshare/plowshare-2.0.1.ebuild
new file mode 100644
index 000000000000..d6da579fe839
--- /dev/null
+++ b/net-misc/plowshare/plowshare-2.0.1.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit bash-completion-r1
+
+DESCRIPTION="Command-line downloader and uploader for file-sharing websites"
+HOMEPAGE="http://code.google.com/p/plowshare/"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE="bash-completion +javascript +modules view-captcha"
+
+MOD_PV="2ededde1f34e78dcbacf02e900a2ce8cad2e148d"
+SRC_URI="http://dev.gentoo.org/~voyageur/distfiles/${P}.tar.gz
+ modules? ( http://dev.gentoo.org/~voyageur/distfiles/${PN}-modules-${MOD_PV}.tar.gz )"
+
+RDEPEND="
+ >=app-shells/bash-4
+ || ( app-text/recode ( dev-lang/perl dev-perl/HTML-Parser ) )
+ || ( media-gfx/imagemagick[tiff] media-gfx/graphicsmagick[imagemagick,tiff] )
+ net-misc/curl
+ sys-apps/util-linux
+ javascript? ( || ( dev-lang/spidermonkey:0 dev-java/rhino ) )
+ view-captcha? ( || ( media-gfx/aview media-libs/libcaca ) )"
+DEPEND=""
+
+# NOTES:
+# javascript dep should be any javascript interpreter using /usr/bin/js
+
+# Modules using detect_javascript
+JS_MODULES="flashx letitbit nowdownload_co oboom rapidgator yourvideohost zalaa zippyshare"
+
+src_unpack() {
+ default
+ if use modules; then
+ rm -r "${S}"/src/modules
+ mv ${PN}-modules-${MOD_PV} "${S}"/src/modules
+ fi
+}
+
+src_prepare() {
+ if use modules && ! use javascript; then
+ for module in ${JS_MODULES}; do
+ sed -i -e "s:^${module}.*::" src/modules/config || die "${module} sed failed"
+ rm src/modules/${module}.sh || die "${module} rm failed"
+ done
+ fi
+
+ # Fix doc install path
+ sed -i -e "/^DOCDIR/s|plowshare4|${P}|" Makefile || die "sed failed"
+
+ if ! use bash-completion
+ then
+ sed -i -e \ "/^install:/s/install_bash_completion//" \
+ Makefile || die "sed failed"
+ fi
+}
+
+src_compile() {
+ # There is a Makefile but it's not compiling anything, let's not try.
+ :
+}
+
+src_test() {
+ # Disable tests because all of them need a working Internet connection.
+ :
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="/usr" \
+ PLOWSHARE_FORCE_VERSION="${PV}" install
+}
+
+pkg_postinst() {
+ if use modules; then
+ elog "System-wide modules can break between releases, install per-user versions"
+ elog "in ~/.config/plowshare/modules if needed"
+ if ! use javascript; then
+ ewarn "Without javascript you will not be able to use:"
+ ewarn " ${JS_MODULES}"
+ fi
+ else
+ elog "plowshare is not delivered with modules by default anymore"
+ elog "Per-user modules should be installed as described at:"
+ elog "https://code.google.com/p/plowshare/wiki/Readme#Installation_of_modules"
+ elog "USE=modules will install a system-wide set occasionally updated"
+ fi
+}
diff --git a/net-misc/plowshare/plowshare-2.1.0-r1.ebuild b/net-misc/plowshare/plowshare-2.1.0-r1.ebuild
new file mode 100644
index 000000000000..77f66e46c634
--- /dev/null
+++ b/net-misc/plowshare/plowshare-2.1.0-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit bash-completion-r1 eutils
+
+DESCRIPTION="Command-line downloader and uploader for file-sharing websites"
+HOMEPAGE="https://github.com/mcrapet/plowshare"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE="bash-completion +javascript view-captcha"
+
+SRC_URI="https://github.com/mcrapet/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+RDEPEND="
+ >=app-shells/bash-4
+ || ( app-text/recode ( dev-lang/perl dev-perl/HTML-Parser ) )
+ dev-vcs/git
+ || ( media-gfx/imagemagick[tiff] media-gfx/graphicsmagick[imagemagick,tiff] )
+ net-misc/curl
+ sys-apps/util-linux
+ javascript? ( || ( dev-lang/spidermonkey:0 dev-java/rhino ) )
+ view-captcha? ( || ( media-gfx/aview media-libs/libcaca ) )"
+DEPEND=""
+
+# NOTES:
+# javascript dep should be any javascript interpreter using /usr/bin/js
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-fix_git_invocation.patch
+
+ # Fix doc install path
+ sed -i -e "/^DOCDIR/s|plowshare|${PF}|" Makefile || die "sed failed"
+
+ if ! use bash-completion
+ then
+ sed -i -e \ "/^install:/s/install_bash_completion//" \
+ Makefile || die "sed failed"
+ fi
+}
+
+src_compile() {
+ # There is a Makefile but it's not compiling anything, let's not try.
+ :
+}
+
+src_test() {
+ # Disable tests because all of them need a working Internet connection.
+ :
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="/usr" \
+ PLOWSHARE_FORCE_VERSION="${PV}" install
+}
+
+pkg_postinst() {
+ elog "plowshare is not delivered with modules by default anymore"
+ elog "Per-user modules can be installed/updated with the plowmod command"
+ if ! use javascript; then
+ ewarn "Without javascript you will not be able to use modules"
+ ewarn "requering a Javascript shell (/usr/bin/js)"
+ fi
+}
diff --git a/net-misc/plowshare/plowshare-2.1.1.ebuild b/net-misc/plowshare/plowshare-2.1.1.ebuild
new file mode 100644
index 000000000000..beacec48f311
--- /dev/null
+++ b/net-misc/plowshare/plowshare-2.1.1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit bash-completion-r1
+
+DESCRIPTION="Command-line downloader and uploader for file-sharing websites"
+HOMEPAGE="https://github.com/mcrapet/plowshare"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE="bash-completion +javascript view-captcha"
+
+SRC_URI="https://github.com/mcrapet/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+RDEPEND="
+ >=app-shells/bash-4
+ || ( app-text/recode ( dev-lang/perl dev-perl/HTML-Parser ) )
+ dev-vcs/git
+ || ( media-gfx/imagemagick[tiff] media-gfx/graphicsmagick[imagemagick,tiff] )
+ net-misc/curl
+ sys-apps/util-linux
+ javascript? ( || ( dev-lang/spidermonkey:0 dev-java/rhino ) )
+ view-captcha? ( || ( media-gfx/aview media-libs/libcaca ) )"
+DEPEND=""
+
+# NOTES:
+# javascript dep should be any javascript interpreter using /usr/bin/js
+
+src_prepare() {
+ # Fix doc install path
+ sed -i -e "/^DOCDIR/s|plowshare|${PF}|" Makefile || die "sed failed"
+
+ if ! use bash-completion
+ then
+ sed -i -e \ "/^install:/s/install_bash_completion//" \
+ Makefile || die "sed failed"
+ fi
+}
+
+src_compile() {
+ # There is a Makefile but it's not compiling anything, let's not try.
+ :
+}
+
+src_test() {
+ # Disable tests because all of them need a working Internet connection.
+ :
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="/usr" \
+ PLOWSHARE_FORCE_VERSION="${PV}" install
+}
+
+pkg_postinst() {
+ elog "plowshare is not delivered with modules by default anymore"
+ elog "Per-user modules can be installed/updated with the plowmod command"
+ if ! use javascript; then
+ ewarn "Without javascript you will not be able to use modules"
+ ewarn "requering a Javascript shell (/usr/bin/js)"
+ fi
+}
diff --git a/net-misc/pmsvn/Manifest b/net-misc/pmsvn/Manifest
new file mode 100644
index 000000000000..20495dec3a2e
--- /dev/null
+++ b/net-misc/pmsvn/Manifest
@@ -0,0 +1,3 @@
+DIST pmsvn-1.0.5.tgz 5867 SHA256 f97b2c43eded8948fabf203a8e91dd6b70c52fc9875bc211804b32ee023c6b8c SHA512 0fc9d06a2911d361d004e7f809bce7292f4fb1ba79152defcede426a15a7792d70c05d527d7b1627c4094bcb3e180d77684e9c55aea7df5e4e1e821d943d0221 WHIRLPOOL 10d8466046aff0e6f8af9353d6f43ba1e091296b30db747df6a0e23efa6c536449b4c08baee735bf72c7849d38ac7f00f35040040c4ee2ca5b8556b7ba564228
+DIST pmsvn-1.0.6.tgz 22021 SHA256 6cd8498b6d80e1b2d6aa10adb3e765fde03d219e9e1149898393b542fee95c89 SHA512 e06ee3f43468a0fd71799b08ba3f1dc8dd26cfb1ea8d1409674418bfa27db0f095edb2b60f61ad6aeb68a9a3f76e987b52fb9b0c3d9d54d82c790668af68b541 WHIRLPOOL e2fc1ad5756a0b8f98bb8e0fc87fc4d8fb6ad79a812ce6835b92c21cfbad7521bd0e0dbc9f1294f7e1d16c003fba27ee33018e6b15294a1af3971c743453e324
+DIST pmsvn-1.0.7.tgz 7565 SHA256 945dc86b1276719af5e009fd9d38ac3a555fc9e466f98b189a16f20b0d954028 SHA512 1bf205ec142c6ea018b9f606a67fb97c87aaefa56e0dbd848db6c09f6ce6115856b94c2b75cc4e923be8d66b322ffd8adeca88bfe1d3cdcc72377adfed3976d4 WHIRLPOOL a4f295e63d9ae0932514b932e19bacc58c34ced52e0019bb82e58be27b95b32f57033a0fecdf5ce2b64f06ffb108731c638d99aee8e1d2093c3a124010795964
diff --git a/net-misc/pmsvn/metadata.xml b/net-misc/pmsvn/metadata.xml
new file mode 100644
index 000000000000..b85ed6c47c45
--- /dev/null
+++ b/net-misc/pmsvn/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>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">pmsvn</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/pmsvn/pmsvn-1.0.5.ebuild b/net-misc/pmsvn/pmsvn-1.0.5.ebuild
new file mode 100644
index 000000000000..4f1c3317adfd
--- /dev/null
+++ b/net-misc/pmsvn/pmsvn-1.0.5.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Server's configuration management and monitoring tool"
+HOMEPAGE="http://sourceforge.net/projects/pmsvn/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="net-analyzer/nrpe
+ >=app-shells/bash-4.0_p37
+ >=sys-apps/sed-4.2
+ >=dev-vcs/subversion-1.6.9"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ # move configuration file from /etc/${PN}.conf to /etc/${PN}/${PN}.conf
+ sed -i "/etc\/${PN}.conf/s:etc/${PN}.conf:etc/${PN}/${PN}.conf:" ${PN} \
+ || die "failed to fix path for configuration file"
+}
+
+src_install() {
+ dosbin "${PN}"
+ dodoc README
+ insinto /etc/${PN}/
+ doins pmsvn.conf.sample
+}
+
+pkg_postinst(){
+ elog
+ elog "A configuration file sample is located at /etc/pmsvn/pmsvn.conf.sample."
+ elog
+}
diff --git a/net-misc/pmsvn/pmsvn-1.0.6.ebuild b/net-misc/pmsvn/pmsvn-1.0.6.ebuild
new file mode 100644
index 000000000000..5c83f62dac10
--- /dev/null
+++ b/net-misc/pmsvn/pmsvn-1.0.6.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Server's configuration management and monitoring tool"
+HOMEPAGE="http://sourceforge.net/projects/pmsvn/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="net-analyzer/nrpe
+ >=app-shells/bash-4.0_p37
+ >=sys-apps/sed-4.2
+ >=dev-vcs/subversion-1.6.9"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ # move configuration file from /etc/${PN}.conf to /etc/${PN}/${PN}.conf
+ sed -i "/etc\/${PN}.conf/s:etc/${PN}.conf:etc/${PN}/${PN}.conf:" ${PN} \
+ || die "failed to fix path for configuration file"
+}
+
+src_install() {
+ dosbin "${PN}"
+ dodoc README
+ # No sample file anymore. Autogenerated on first execution
+ # insinto /etc/${PN}/
+ # doins pmsvn.conf.sample
+}
diff --git a/net-misc/pmsvn/pmsvn-1.0.7.ebuild b/net-misc/pmsvn/pmsvn-1.0.7.ebuild
new file mode 100644
index 000000000000..6f308319eaa7
--- /dev/null
+++ b/net-misc/pmsvn/pmsvn-1.0.7.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Server's configuration management and monitoring tool"
+HOMEPAGE="http://sourceforge.net/projects/pmsvn/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="net-analyzer/nrpe
+ >=app-shells/bash-4.0_p37
+ >=sys-apps/sed-4.2
+ >=dev-vcs/subversion-1.6.9"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ # move configuration file from /etc/${PN}.conf to /etc/${PN}/${PN}.conf
+ sed -i "/etc\/${PN}.conf/s:etc/${PN}.conf:etc/${PN}/${PN}.conf:" ${PN} \
+ || die "failed to fix path for configuration file"
+}
+
+src_install() {
+ dosbin "${PN}"
+ dodoc README
+ insinto /etc/${PN}/
+ doins pmsvn.conf.sample
+}
diff --git a/net-misc/polly/Manifest b/net-misc/polly/Manifest
new file mode 100644
index 000000000000..02767fd8187b
--- /dev/null
+++ b/net-misc/polly/Manifest
@@ -0,0 +1,2 @@
+DIST Polly-0.93.12.tar.gz 573637 SHA256 376ae60067b192bc5d5147203f9116e207599f73929dfb8b6343be9f250ba410 SHA512 71cef70d6ed8ade018a880a81c9ec83f9d32f2dde3c5fb192655f56d39e6cc17ac164e746085434caca863af08a075a3a7f05b9010a263956b92294fa4b4f370 WHIRLPOOL ffc852531b8350f28c0c0e191373db5525aab42bf1d974d2a9f94f395af1118b5d0d80cec5e3285630c38c9da470cd5e0115e6210a06e1245ec61ece8902b8f1
+DIST polly-0.93.11.tar.gz 575357 SHA256 c1e4c2d2c419626da484870e53866afdfbf14156bc2929f510c7f1142b457416 SHA512 75ded540371f63202cf84f685f5fbd9a6be0766bb03089ae2afc6b8056dbd28213ed1dda235fe53b285677e0fe9fdf3b3fd7b744d61824de607eb89c55cc299f WHIRLPOOL c9ec57320b5f552235409bd041f9c0242da9067c3b55fd8e3623ffa32170e4f7e8dd72f02b94df6830fdd28afb2b7912e185a79c9f08f74dad0be253960874fa
diff --git a/net-misc/polly/metadata.xml b/net-misc/polly/metadata.xml
new file mode 100644
index 000000000000..14d2eabbeacb
--- /dev/null
+++ b/net-misc/polly/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>python</herd>
+ <maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="launchpad">polly</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/polly/polly-0.93.11.ebuild b/net-misc/polly/polly-0.93.11.ebuild
new file mode 100644
index 000000000000..70a222f09344
--- /dev/null
+++ b/net-misc/polly/polly-0.93.11.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 )
+PYTON_REQ_USE=( gdbm )
+DISTUTILS_NO_PARALLEL_BUILD=1
+
+inherit distutils-r1 gnome2-utils vcs-snapshot
+
+DESCRIPTION="twitter client designed for multiple columns of multiple accounts"
+HOMEPAGE="https://launchpad.net/polly"
+SRC_URI="https://launchpad.net/${PN}/1.0/pre-alpha-2/+download/Polly-${PV}%20%28pre-alpha%203.11%29.tar.gz -> ${P}.tar.gz"
+
+LICENSE="CC-BY-NC-SA-3.0 GPL-2 GPL-3+ MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="${PYTHON_DEPS}
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/gconf-python[${PYTHON_USEDEP}]
+ dev-python/gtkspell-python[${PYTHON_USEDEP}]
+ dev-python/httplib2[${PYTHON_USEDEP}]
+ dev-python/keyring[${PYTHON_USEDEP}]
+ dev-python/notify-python[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/oauth2[${PYTHON_USEDEP}]
+ dev-python/pycurl[${PYTHON_USEDEP}]
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ dev-python/socksipy[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}"
+
+python_prepare_all() {
+ rm -rf external/keyring || die
+ distutils-r1_python_prepare_all
+}
+
+pkg_preinst() {
+ gnome2_gconf_savelist
+}
+
+pkg_postinst() {
+ gnome2_gconf_install
+}
+
+pkg_postrm() {
+ gnome2_gconf_uninstall
+}
diff --git a/net-misc/polly/polly-0.93.12.ebuild b/net-misc/polly/polly-0.93.12.ebuild
new file mode 100644
index 000000000000..cc0b29b9b4d0
--- /dev/null
+++ b/net-misc/polly/polly-0.93.12.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTON_REQ_USE=( gdbm )
+DISTUTILS_NO_PARALLEL_BUILD=1
+
+inherit distutils-r1 gnome2-utils vcs-snapshot
+
+DESCRIPTION="twitter client designed for multiple columns of multiple accounts"
+HOMEPAGE="https://launchpad.net/polly"
+SRC_URI="https://launchpad.net/${PN}/1.0/pre-alpha-2/+download/Polly-${PV}.tar.gz"
+
+LICENSE="CC-BY-NC-SA-3.0 GPL-2 GPL-3+ MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="${PYTHON_DEPS}
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/gconf-python[${PYTHON_USEDEP}]
+ dev-python/gtkspell-python[${PYTHON_USEDEP}]
+ dev-python/httplib2[${PYTHON_USEDEP}]
+ dev-python/keyring[${PYTHON_USEDEP}]
+ dev-python/notify-python[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/oauth2[${PYTHON_USEDEP}]
+ dev-python/pycurl[${PYTHON_USEDEP}]
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ dev-python/socksipy[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/Polly-${PV}
+
+python_prepare_all() {
+ rm -rf external/keyring || die
+ distutils-r1_python_prepare_all
+}
+
+pkg_preinst() {
+ gnome2_gconf_savelist
+}
+
+pkg_postinst() {
+ gnome2_gconf_install
+}
+
+pkg_postrm() {
+ gnome2_gconf_uninstall
+}
diff --git a/net-misc/portfwd/Manifest b/net-misc/portfwd/Manifest
new file mode 100644
index 000000000000..f048c43fe58c
--- /dev/null
+++ b/net-misc/portfwd/Manifest
@@ -0,0 +1 @@
+DIST portfwd-0.29.tar.gz 168318 SHA256 a880cf57ae00224c470c387cf2de8abbb53c4d761b4d67be5b0c9e15c3484066 SHA512 790d30afb42eb5e03846534e5098c7d1cb4241758df77fd56fc3f4fdbb05dae88ef84e16b27434035dd39a7c82beb77d490f64741181c38efc3b3928face51d1 WHIRLPOOL a83de6db3feab5fc03f3115013eebd650bb795be91e0b674ae102c9c59d260fd7faa5b8a738e5eb9ad891103bac0c91e3626b7ac6cabf6f565e936403d8dbc17
diff --git a/net-misc/portfwd/files/portfwd-0.28-64bit.patch b/net-misc/portfwd/files/portfwd-0.28-64bit.patch
new file mode 100644
index 000000000000..8bd1494642a1
--- /dev/null
+++ b/net-misc/portfwd/files/portfwd-0.28-64bit.patch
@@ -0,0 +1,30 @@
+--- src/proto_map.cc 28 Jan 2004 19:14:10 -0000 1.4
++++ src/proto_map.cc 1 Feb 2007 06:21:03 -0000
+@@ -16,11 +16,11 @@
+ map_list = map_l;
+ fragile = 0; /* false */
+
+- ftp_actv = (int) actv;
++ ftp_actv = actv != NULL;
+ if (ftp_actv)
+ actv_ip = *actv;
+
+- ftp_pasv = (int) pasv;
++ ftp_pasv = pasv != NULL;
+ if (ftp_pasv)
+ pasv_ip = *pasv;
+
+--- src/proto_map.hpp 28 Jan 2004 19:14:10 -0000 1.3
++++ src/proto_map.hpp 1 Feb 2007 06:21:03 -0000
+@@ -16,8 +16,8 @@
+ private:
+ vector<int> *port_list;
+ vector<host_map*> *map_list;
+- int ftp_actv;
+- int ftp_pasv;
++ bool ftp_actv;
++ bool ftp_pasv;
+ struct ip_addr actv_ip;
+ struct ip_addr pasv_ip;
+ int uid;
+
diff --git a/net-misc/portfwd/files/portfwd.confd b/net-misc/portfwd/files/portfwd.confd
new file mode 100644
index 000000000000..7e1ac3b3fb4f
--- /dev/null
+++ b/net-misc/portfwd/files/portfwd.confd
@@ -0,0 +1,3 @@
+# See `man portfwd` for options.
+
+PORTFWD_OPTS="-f -t"
diff --git a/net-misc/portfwd/files/portfwd.init b/net-misc/portfwd/files/portfwd.init
new file mode 100644
index 000000000000..a73b7961c48a
--- /dev/null
+++ b/net-misc/portfwd/files/portfwd.init
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# $Id$
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /etc/portfwd.cfg ] ; then
+ eerror "You need an /etc/portfwd.cfg file first"
+ eerror "There are samples in the documentation directory"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting portfwd"
+ start-stop-daemon --start --quiet --pidfile /var/run/portfwd.pid --exec /usr/sbin/portfwd -- ${PORTFWD_OPTS}
+
+ _pid="`ps -C portfwd -o pid= | head -n 1`"
+ if [ -n "$_pid" ] ; then
+ echo "${_pid/ /}" > /var/run/portfwd.pid
+ eend 0
+ else
+ eend 1
+ fi
+}
+
+stop() {
+ ebegin "Stopping portfwd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/portfwd.pid
+
+ if [ $? -eq 0 ]; then
+ rm -f /var/run/portfwd.pid
+ fi
+
+ eend $?
+}
diff --git a/net-misc/portfwd/files/portfwd.service b/net-misc/portfwd/files/portfwd.service
new file mode 100644
index 000000000000..77f6cd3663b7
--- /dev/null
+++ b/net-misc/portfwd/files/portfwd.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Port Forwarding Daemon
+
+[Service]
+ExecStart=/usr/sbin/portfwd -g -f -t
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/portfwd/metadata.xml b/net-misc/portfwd/metadata.xml
new file mode 100644
index 000000000000..ff96ba5a06b1
--- /dev/null
+++ b/net-misc/portfwd/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>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+ <longdescription lang="en">
+ Portfwd stands for port forwarding daemon. It's a small C++ utility
+ which forwards incoming TCP connections and/or UDP packets to remote
+ hosts.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">portfwd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/portfwd/portfwd-0.29.ebuild b/net-misc/portfwd/portfwd-0.29.ebuild
new file mode 100644
index 000000000000..155dc8686e22
--- /dev/null
+++ b/net-misc/portfwd/portfwd-0.29.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils systemd
+
+DESCRIPTION="Port Forwarding Daemon"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+HOMEPAGE="http://portfwd.sourceforge.net"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="amd64 ia64 ~ppc ~sparc x86"
+IUSE=""
+
+DEPEND=">=sys-apps/sed-4"
+RDEPEND=""
+
+src_prepare() {
+ cd src
+ sed -iorig \
+ -e "s:^CFLAGS =.*:CFLAGS = @CFLAGS@ -Wall -DPORTFWD_CONF=\\\\\"\$(sysconfdir)/portfwd.cfg\\\\\":" \
+ -e "s:^CXXFLAGS =.*:CPPFLAGS = @CXXFLAGS@ -Wall -DPORTFWD_CONF=\\\\\"\$(sysconfdir)/portfwd.cfg\\\\\":" \
+ Makefile.am || die
+ cd ../tools
+ sed -iorig \
+ -e "s:^CXXFLAGS =.*:CPPFLAGS = @CXXFLAGS@ -Wall -DPORTFWD_CONF=\\\\\"\$(sysconfdir)/portfwd.cfg\\\\\":" \
+ Makefile.am || die
+ cd ../getopt
+ sed -iorig -e "s:$.CC.:\$(CC) @CFLAGS@:g" Makefile.am || die
+ cd ../doc
+ sed -iorig -e "s:/doc/portfwd:/share/doc/$P:" Makefile.am || die
+ cd ..
+ sed -iorig -e "s:/doc/portfwd:/share/doc/$P:" Makefile.am || die
+
+ eautoreconf
+}
+
+src_install() {
+ default
+
+ dodoc cfg/*
+
+ newinitd "${FILESDIR}"/${PN}.init ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
diff --git a/net-misc/portspoof/Manifest b/net-misc/portspoof/Manifest
new file mode 100644
index 000000000000..0f4adc5eb658
--- /dev/null
+++ b/net-misc/portspoof/Manifest
@@ -0,0 +1,2 @@
+DIST portspoof-1.1.tar.gz 399119 SHA256 84e07ac328d741c1ccea3847d413d01185a6a2393f8637e67178f984703ef613 SHA512 ff78058d66aa142e34f70c6759bf04bfd69c5149e294803c41837276646fad21eea2d20b9eb1ba897e2fbd5f57f65b3a86fecb8ebbc25cdec7d31a2f7997f91b WHIRLPOOL c736160d3643fe96bf50e392953a8e78f2bb792211b16f16313ddc8d21906fb4afd02079a9d45ca22e32b550819357bcfa7413b99cb1510588ddc20e6d00080a
+DIST portspoof-1.3.tar.gz 401187 SHA256 56287536b9baf71d8a9f8009f9ce1fafcae85587e881da1ce86f7f46bc8afc8f SHA512 8d537ecf2ae5de8388c2b9b7210a2d38fe614e525a2ba286321fcf3b237f0888e59bb79a80056e49cf7f850be8ef274e87f04597a50dc1b86350bbc094e8be6e WHIRLPOOL 683f4cb89f2ba9d4ba3323161e9847638c6d6ac7a3a22ccd5b2c61784f9a43590863484aa7cbd5004a24b6d143b001fa50c27e351bb1df23f9a8e94d30123cde
diff --git a/net-misc/portspoof/metadata.xml b/net-misc/portspoof/metadata.xml
new file mode 100644
index 000000000000..adaca1811357
--- /dev/null
+++ b/net-misc/portspoof/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>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+ </maintainer>
+ <longdescription lang="en">
+</longdescription>
+ <upstream>
+ <remote-id type="github">drk1wi/portspoof</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/portspoof/portspoof-1.1.ebuild b/net-misc/portspoof/portspoof-1.1.ebuild
new file mode 100644
index 000000000000..cedb2e10fc20
--- /dev/null
+++ b/net-misc/portspoof/portspoof-1.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="return SYN+ACK for every port connection attempt"
+HOMEPAGE="http://portspoof.org/"
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-r3 autotools
+ EGIT_REPO_URI="https://github.com/drk1wi/${PN}.git"
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/drk1wi/portspoof/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ eautoreconf
+ fi
+}
diff --git a/net-misc/portspoof/portspoof-1.3.ebuild b/net-misc/portspoof/portspoof-1.3.ebuild
new file mode 100644
index 000000000000..030a83813d34
--- /dev/null
+++ b/net-misc/portspoof/portspoof-1.3.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="return SYN+ACK for every port connection attempt"
+HOMEPAGE="http://portspoof.org/"
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-r3 autotools
+ EGIT_REPO_URI="https://github.com/drk1wi/${PN}.git"
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/drk1wi/portspoof/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ eautoreconf
+ fi
+ sed -i \
+ 's#/usr/local/bin/portspoof -D -c /usr/local/etc/portspoof.conf -s /usr/local/etc/portspoof_signatures#/usr/bin/portspoof -D -c /etc/portspoof.conf -s /etc/portspoof_signatures#'\
+ system_files/init.d/portspoof.sh
+}
+
+src_install() {
+ default_src_install
+ newsbin system_files/init.d/portspoof.sh portspoof-runner
+}
diff --git a/net-misc/portspoof/portspoof-9999.ebuild b/net-misc/portspoof/portspoof-9999.ebuild
new file mode 100644
index 000000000000..030a83813d34
--- /dev/null
+++ b/net-misc/portspoof/portspoof-9999.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="return SYN+ACK for every port connection attempt"
+HOMEPAGE="http://portspoof.org/"
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit git-r3 autotools
+ EGIT_REPO_URI="https://github.com/drk1wi/${PN}.git"
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/drk1wi/portspoof/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ eautoreconf
+ fi
+ sed -i \
+ 's#/usr/local/bin/portspoof -D -c /usr/local/etc/portspoof.conf -s /usr/local/etc/portspoof_signatures#/usr/bin/portspoof -D -c /etc/portspoof.conf -s /etc/portspoof_signatures#'\
+ system_files/init.d/portspoof.sh
+}
+
+src_install() {
+ default_src_install
+ newsbin system_files/init.d/portspoof.sh portspoof-runner
+}
diff --git a/net-misc/pps-tools/Manifest b/net-misc/pps-tools/Manifest
new file mode 100644
index 000000000000..361c374bc764
--- /dev/null
+++ b/net-misc/pps-tools/Manifest
@@ -0,0 +1,2 @@
+DIST pps-tools-git-0.0.20110710.tgz 6590 SHA256 1557da95e77684997bb46f3a30eafd665b409c507b3df1c3aa5e1200c2db7215
+DIST pps-tools-git-0.0.20120407.tar.gz 13619 SHA256 eb020d40a3938546620889bb6ecdeead2c188e87ffd43c3ae04a41e5998e7997 SHA512 d2014262b0594959f337c25df859591d0737994decec663389392d3c7e53376ded2485713f6364c4833d8d7c40b4b0c3b88865ab85e481bcc2e81e35931d84de WHIRLPOOL 03ff250da63ff2ca2f9111b8207608e0e989c376a5af51b919d4fb8889936e00db2b15d14309dda68e92e13c7478f81e5a2d72544eefa73eb93287dd0396fc14
diff --git a/net-misc/pps-tools/files/pps-tools-0.0.20120407-build.patch b/net-misc/pps-tools/files/pps-tools-0.0.20120407-build.patch
new file mode 100644
index 000000000000..5a27bb65184b
--- /dev/null
+++ b/net-misc/pps-tools/files/pps-tools-0.0.20120407-build.patch
@@ -0,0 +1,53 @@
+From f4133df52856adfe9ffa2152f0e449f2f8adb49d Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 18 Aug 2012 17:04:43 -0400
+Subject: [PATCH] fix up makefile
+
+Make sure we respect CFLAGS/CPPFLAGS properly.
+
+Also fix up the depend include so we get reproducible behavior --
+the depend file is generated & included first, and we don't get
+weird behavior when we run:
+ git clean -x -d
+ make
+ make
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Makefile | 13 +++++--------
+ 1 file changed, 5 insertions(+), 8 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 0fb84b4..a07156f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,9 +1,8 @@
+ TARGETS = ppstest ppsctl ppswatch
+
+-CFLAGS += -Wall -O2 -D_GNU_SOURCE
+-CFLAGS += -I .
+-CFLAGS += -ggdb
+-CFLAGS += -D__N_PPS=18
++CFLAGS ?= -O2 -ggdb
++CFLAGS += -Wall
++CPPFLAGS += -D_GNU_SOURCE -I. -D__N_PPS=18
+
+ # -- Actions section --
+
+@@ -12,11 +11,9 @@ CFLAGS += -D__N_PPS=18
+ all : .depend $(TARGETS)
+
+ .depend depend dep :
+- $(CC) $(CFLAGS) -M $(TARGETS:=.c) > .depend
++ $(CC) $(CPPFLAGS) $(CFLAGS) -M $(TARGETS:=.c) > .depend
+
+-ifeq (.depend,$(wildcard .depend))
+-include .depend
+-endif
++-include .depend
+
+ install : all
+ install -m 755 -t $(DESTDIR)/usr/bin ppsfind $(TARGETS)
+--
+1.7.9.7
+
diff --git a/net-misc/pps-tools/files/pps-tools-0.0.20120407-install.patch b/net-misc/pps-tools/files/pps-tools-0.0.20120407-install.patch
new file mode 100644
index 000000000000..e268d6622a94
--- /dev/null
+++ b/net-misc/pps-tools/files/pps-tools-0.0.20120407-install.patch
@@ -0,0 +1,28 @@
+From 0b3a849153ffb42fb22fe42dc2b9e59ca23cec8c Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 18 Aug 2012 17:15:19 -0400
+Subject: [PATCH] fix DESTDIR installs
+
+Make sure the dirs we install into exist first:
+ make install DESTDIR=$PWD/foo
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile b/Makefile
+index a07156f..bebcce7 100644
+--- a/Makefile
++++ b/Makefile
+@@ -16,6 +16,7 @@ all : .depend $(TARGETS)
+ -include .depend
+
+ install : all
++ mkdir -p -m 755 $(DESTDIR)/usr/bin $(DESTDIR)/usr/include/sys
+ install -m 755 -t $(DESTDIR)/usr/bin ppsfind $(TARGETS)
+ install -m 644 -t $(DESTDIR)/usr/include/sys timepps.h
+
+--
+1.7.9.7
+
diff --git a/net-misc/pps-tools/metadata.xml b/net-misc/pps-tools/metadata.xml
new file mode 100644
index 000000000000..f493acd58653
--- /dev/null
+++ b/net-misc/pps-tools/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>base-system</herd>
+ <upstream>
+ <remote-id type="github">ago/pps-tools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/pps-tools/pps-tools-0.0.20110710.ebuild b/net-misc/pps-tools/pps-tools-0.0.20110710.ebuild
new file mode 100644
index 000000000000..384b01ded271
--- /dev/null
+++ b/net-misc/pps-tools/pps-tools-0.0.20110710.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit eutils
+
+GITHUB_USER="ago"
+PV_COMMIT="74c32c318f63bca5b5db"
+
+DESCRIPTION="User-space tools for LinuxPPS"
+HOMEPAGE="http://wiki.enneenne.com/index.php/LinuxPPS_installation"
+SRC_URI="http://github.com/${GITHUB_USER}/${PN}/tarball/${PV_COMMIT} -> ${PN}-git-${PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${GITHUB_USER}-${PN}-${PV_COMMIT:0:7}"
+
+src_prepare() {
+ sed -i \
+ -e '/^CFLAGS.*ggdb/d' \
+ -e '/^CFLAGS.*O2/s,-O2,,g' \
+ -e '/^\.PHONY:/s,all,,g' \
+ Makefile
+}
+
+src_compile() {
+ emake depend
+ emake all
+}
+
+src_install() {
+ dodir /usr/bin /usr/include
+ emake install DESTDIR="${D}"
+}
diff --git a/net-misc/pps-tools/pps-tools-0.0.20120407.ebuild b/net-misc/pps-tools/pps-tools-0.0.20120407.ebuild
new file mode 100644
index 000000000000..3e89eec50a9c
--- /dev/null
+++ b/net-misc/pps-tools/pps-tools-0.0.20120407.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils
+
+GITHUB_USER="ago"
+PV_COMMIT='0deb9c7e135e9380a6d09e9d2e938a146bb698c8'
+
+DESCRIPTION="User-space tools for LinuxPPS"
+HOMEPAGE="http://wiki.enneenne.com/index.php/LinuxPPS_installation"
+SRC_URI="http://github.com/${GITHUB_USER}/${PN}/tarball/${PV_COMMIT} -> ${PN}-git-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+S="${WORKDIR}/${GITHUB_USER}-${PN}-${PV_COMMIT:0:7}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-build.patch
+ epatch "${FILESDIR}"/${P}-install.patch
+ tc-export CC
+}
diff --git a/net-misc/proxychains/Manifest b/net-misc/proxychains/Manifest
new file mode 100644
index 000000000000..537c3dd6f125
--- /dev/null
+++ b/net-misc/proxychains/Manifest
@@ -0,0 +1,2 @@
+DIST proxychains-ng-4.10.tar.gz 33266 SHA256 0b828f3b1138879a14d54342738dbe943a89db1c467cdb25e676eb953ad8cd5e SHA512 4a51d1d279f213e4431253296ba5b7bd2bf05cbe7d92f49db43f9ac272c62a1bd7fa36e4a40bbc11e599b3f01ae97db245baec3fa013a50741a0719011e6ae82 WHIRLPOOL 463f101974425e3666c2c2274a40c8bffa898d2f048807355793111e166e99c036fd50defd1bec023d0a5e1fe4305223979e0c287a451c6af27d62f8ce26aa5f
+DIST proxychains-ng-4.8.1.tar.gz 32701 SHA256 7b0680e7f60637e674f7142433e23ccb3cec1b478378a22a335c074784bab4b2 SHA512 1e6917d2aaa69d6d1d1bb33267a72b2efeed6216b06f203082b055650b506dade654bbf36a3dc2c52729e64265880a39d9af8a5a1e5cbfd27e8f52488a9a051e WHIRLPOOL 8cb009beb8e709a78a70b234dc37eafabed83cea904536ef879ab5f2d1d3eea7b2a33c247d51f8e4197aacb2116d2c273774be47dc5cc9e03f63a99898a5c2ae
diff --git a/net-misc/proxychains/files/proxychains-4.10-makefile.patch b/net-misc/proxychains/files/proxychains-4.10-makefile.patch
new file mode 100644
index 000000000000..5a3a2e1a6e8b
--- /dev/null
+++ b/net-misc/proxychains/files/proxychains-4.10-makefile.patch
@@ -0,0 +1,45 @@
+--- proxychains-ng-4.10.orig/Makefile
++++ proxychains-ng-4.10/Makefile
+@@ -22,11 +22,9 @@
+
+ GENH = src/version.h
+
+-CFLAGS += -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe
+-NO_AS_NEEDED = -Wl,--no-as-needed
+-LIBDL = -ldl
+-LDFLAGS = -shared -fPIC $(NO_AS_NEEDED) $(LIBDL) -lpthread
+-INC =
++CFLAGS = -Wall -std=c99 -D_GNU_SOURCE
++LIBS = -ldl -lpthread
++INC =
+ PIC = -fPIC
+ AR = $(CROSS_COMPILE)ar
+ RANLIB = $(CROSS_COMPILE)ranlib
+@@ -35,11 +33,11 @@
+ LD_SET_SONAME = -Wl,-soname=
+ INSTALL = ./tools/install.sh
+
+-LDSO_PATHNAME = libproxychains4.$(LDSO_SUFFIX)
++LDSO_PATHNAME = libproxychains.$(LDSO_SUFFIX)
+
+ SHARED_LIBS = $(LDSO_PATHNAME)
+ ALL_LIBS = $(SHARED_LIBS)
+-PXCHAINS = proxychains4
++PXCHAINS = proxychains
+ ALL_TOOLS = $(PXCHAINS)
+ ALL_CONFIGS = src/proxychains.conf
+
+@@ -81,11 +79,10 @@
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_MAIN) $(INC) $(PIC) -c -o $@ $<
+
+ $(LDSO_PATHNAME): $(LOBJS)
+- $(CC) $(LDFLAGS) $(LD_SET_SONAME)$(LDSO_PATHNAME) $(USER_LDFLAGS) \
+- -o $@ $(LOBJS)
++ $(CC) $(LDFLAGS) -shared $(PIC) $(LD_SET_SONAME)$(LDSO_PATHNAME) -o $@ $(LOBJS) $(LIBS)
+
+ $(ALL_TOOLS): $(OBJS)
+- $(CC) src/main.o src/common.o $(USER_LDFLAGS) -o $(PXCHAINS)
++ $(CC) $(LDFLAGS) src/main.o src/common.o -o $(PXCHAINS) $(LIBS)
+
+
+ .PHONY: all clean install install-config install-libs install-tools
diff --git a/net-misc/proxychains/files/proxychains-4.8.1-makefile.patch b/net-misc/proxychains/files/proxychains-4.8.1-makefile.patch
new file mode 100644
index 000000000000..0658838bbb03
--- /dev/null
+++ b/net-misc/proxychains/files/proxychains-4.8.1-makefile.patch
@@ -0,0 +1,42 @@
+--- proxychains-ng-4.8.1/Makefile
++++ proxychains-ng-4.8.1/Makefile
+@@ -22,10 +22,8 @@
+
+ GENH = src/version.h
+
+-CFLAGS += -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe
+-NO_AS_NEEDED = -Wl,--no-as-needed
+-LIBDL = -ldl
+-LDFLAGS = -shared -fPIC $(NO_AS_NEEDED) $(LIBDL) -lpthread
++CFLAGS = -Wall -std=c99 -D_GNU_SOURCE
++LIBS = -ldl -lpthread
+ INC =
+ PIC = -fPIC
+ AR = $(CROSS_COMPILE)ar
+@@ -35,11 +33,11 @@
+ LD_SET_SONAME = -Wl,-soname=
+ INSTALL = ./tools/install.sh
+
+-LDSO_PATHNAME = libproxychains4.$(LDSO_SUFFIX)
++LDSO_PATHNAME = libproxychains.$(LDSO_SUFFIX)
+
+ SHARED_LIBS = $(LDSO_PATHNAME)
+ ALL_LIBS = $(SHARED_LIBS)
+-PXCHAINS = proxychains4
++PXCHAINS = proxychains
+ ALL_TOOLS = $(PXCHAINS)
+ ALL_CONFIGS = src/proxychains.conf
+
+@@ -81,10 +79,10 @@
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_MAIN) $(INC) $(PIC) -c -o $@ $<
+
+ $(LDSO_PATHNAME): $(LOBJS)
+- $(CC) $(LDFLAGS) $(LD_SET_SONAME)$(LDSO_PATHNAME) -o $@ $(LOBJS)
++ $(CC) $(LDFLAGS) -shared $(PIC) $(LD_SET_SONAME)$(LDSO_PATHNAME) -o $@ $(LOBJS) $(LIBS)
+
+ $(ALL_TOOLS): $(OBJS)
+- $(CC) src/main.o src/common.o -o $(PXCHAINS)
++ $(CC) $(LDFLAGS) src/main.o src/common.o -o $(PXCHAINS) $(LIBS)
+
+
+ .PHONY: all clean install install-config install-libs install-tools
diff --git a/net-misc/proxychains/metadata.xml b/net-misc/proxychains/metadata.xml
new file mode 100644
index 000000000000..a22e34547027
--- /dev/null
+++ b/net-misc/proxychains/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>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">rofl0r/proxychains-ng</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/proxychains/proxychains-4.10.ebuild b/net-misc/proxychains/proxychains-4.10.ebuild
new file mode 100644
index 000000000000..0ed40ddd788f
--- /dev/null
+++ b/net-misc/proxychains/proxychains-4.10.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs eutils multilib
+
+MY_PN=${PN}-ng
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="force any tcp connections to flow through a proxy (or proxy chain)"
+HOMEPAGE="https://github.com/rofl0r/proxychains-ng/"
+SRC_URI="https://github.com/rofl0r/${MY_PN}/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ~sparc x86"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-makefile.patch
+ sed -i "s/^\(LDSO_SUFFIX\).*/\1 = so.${PV}/" Makefile || die
+ tc-export CC
+}
+
+src_configure() {
+ # not autotools
+ ./configure \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --sysconfdir="${EPREFIX}"/etc \
+ || die
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc AUTHORS README TODO
+
+ dolib.so lib${PN}.so.${PV}
+ dosym lib${PN}.so.${PV} /usr/$(get_libdir)/lib${PN}.so.${PV:0:1}
+ dosym lib${PN}.so.${PV} /usr/$(get_libdir)/lib${PN}.so
+
+ insinto /etc
+ doins src/${PN}.conf
+}
diff --git a/net-misc/proxychains/proxychains-4.8.1.ebuild b/net-misc/proxychains/proxychains-4.8.1.ebuild
new file mode 100644
index 000000000000..0ed40ddd788f
--- /dev/null
+++ b/net-misc/proxychains/proxychains-4.8.1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs eutils multilib
+
+MY_PN=${PN}-ng
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="force any tcp connections to flow through a proxy (or proxy chain)"
+HOMEPAGE="https://github.com/rofl0r/proxychains-ng/"
+SRC_URI="https://github.com/rofl0r/${MY_PN}/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ~sparc x86"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-makefile.patch
+ sed -i "s/^\(LDSO_SUFFIX\).*/\1 = so.${PV}/" Makefile || die
+ tc-export CC
+}
+
+src_configure() {
+ # not autotools
+ ./configure \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --sysconfdir="${EPREFIX}"/etc \
+ || die
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc AUTHORS README TODO
+
+ dolib.so lib${PN}.so.${PV}
+ dosym lib${PN}.so.${PV} /usr/$(get_libdir)/lib${PN}.so.${PV:0:1}
+ dosym lib${PN}.so.${PV} /usr/$(get_libdir)/lib${PN}.so
+
+ insinto /etc
+ doins src/${PN}.conf
+}
diff --git a/net-misc/proxyper/Manifest b/net-misc/proxyper/Manifest
new file mode 100644
index 000000000000..a9e4dbfbfe69
--- /dev/null
+++ b/net-misc/proxyper/Manifest
@@ -0,0 +1,2 @@
+DIST proxyper341a-linux-x86-uclibc.tar.gz 183522 SHA256 cbfa67d8b46270306e4dedcf2f58a9d8023a09495c9533302c6ac3bf558f600d
+DIST proxyper347a-linux-x86-uclibc.tar.gz 180907 SHA256 a473a87d27c21d67412e3e47233837f308a23635b8050b3a14485523b19b713e SHA512 fb8ea1b3104fa9fa77ec116cec925ee066c6b2454e3378a510be2a1af73814e1f5e6e191818a4fdd50c3aa0a7eb66dd1767bb62f3f4f3757b4249ab30a9e5a79 WHIRLPOOL 9fcbbd49a69adb24264da4e3a38d413e45d47ade920bef3e4fc452bd237da6ab1cce6308709f3435244dca8cc650268c5bc9fd01c96a4e46b85074b75fdd9a15
diff --git a/net-misc/proxyper/files/proxyper.init b/net-misc/proxyper/files/proxyper.init
new file mode 100644
index 000000000000..6dea049631aa
--- /dev/null
+++ b/net-misc/proxyper/files/proxyper.init
@@ -0,0 +1,20 @@
+#!/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 distributed.net personal proxy"
+ start-stop-daemon --start --quiet --pidfile /opt/proxyper/rc5desproxy.pid --exec /opt/proxyper/proxyper -- -detach
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping distributed.net personal proxy"
+ start-stop-daemon --stop --quiet --pidfile /opt/proxyper/rc5desproxy.pid
+ eend $?
+}
diff --git a/net-misc/proxyper/metadata.xml b/net-misc/proxyper/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/net-misc/proxyper/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/proxyper/proxyper-341a.ebuild b/net-misc/proxyper/proxyper-341a.ebuild
new file mode 100644
index 000000000000..f01d3a4653d1
--- /dev/null
+++ b/net-misc/proxyper/proxyper-341a.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="distributed.net personal proxy"
+HOMEPAGE="http://www.distributed.net"
+SRC_URI="http://http.distributed.net/pub/dcti/${PN}/${PN}${PV}-linux-x86-uclibc.tar.gz"
+LICENSE="distributed.net GPL-2"
+SLOT="0"
+KEYWORDS="-alpha -ppc -sparc x86"
+IUSE=""
+DEPEND=""
+RDEPEND="net-dns/host"
+
+S=${WORKDIR}/${PN}${PV}-linux-x86-uclibc
+
+RESTRICT="mirror"
+
+QA_PRESTRIPPED="opt/proxyper/proxyper"
+
+src_install() {
+ local DESTDIR=/opt/proxyper
+ exeinto ${DESTDIR}
+ doexe proxyper || die
+
+ # don't clobber an already existing ini file!
+ insinto ${DESTDIR}
+ if [ ! -f ${DESTDIR}/proxyper.ini ]
+ then
+ doins proxyper.ini || die
+ else
+ newins ${DESTDIR}/proxyper.ini proxyper.ini || die
+ fi
+
+ dodoc ChangeLog.txt
+ dohtml manual.html
+
+ newinitd "${FILESDIR}"/proxyper.init proxyper
+}
+
+pkg_postinst() {
+ einfo "Don't forget to modify the config file"
+ einfo "located in /opt/proxyper/proxyper.ini"
+ einfo "It's recommend to reading the manual first :-)"
+}
+
+pkg_postrm() {
+ local DESTDIR="/opt/proxyper"
+ if [ -d ${DESTDIR} ]; then
+ einfo "All files have not been removed from ${DESTDIR}"
+ fi
+}
diff --git a/net-misc/proxyper/proxyper-347a.ebuild b/net-misc/proxyper/proxyper-347a.ebuild
new file mode 100644
index 000000000000..9776b112df59
--- /dev/null
+++ b/net-misc/proxyper/proxyper-347a.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DESCRIPTION="distributed.net personal proxy"
+HOMEPAGE="http://www.distributed.net"
+SRC_URI="http://http.distributed.net/pub/dcti/${PN}/${PN}${PV}-linux-x86-uclibc.tar.gz"
+
+LICENSE="distributed.net GPL-2"
+SLOT="0"
+KEYWORDS="-alpha -ppc -sparc ~x86"
+
+RDEPEND="net-dns/host"
+
+S=${WORKDIR}/${PN}${PV}-linux-x86-uclibc
+
+RESTRICT="mirror"
+
+QA_PRESTRIPPED="opt/proxyper/proxyper"
+
+src_install() {
+ local DESTDIR=/opt/proxyper
+ exeinto ${DESTDIR}
+ doexe proxyper
+
+ # don't clobber an already existing ini file!
+ insinto ${DESTDIR}
+ if [ ! -f ${DESTDIR}/proxyper.ini ]
+ then
+ doins proxyper.ini
+ else
+ newins ${DESTDIR}/proxyper.ini proxyper.ini
+ fi
+
+ dodoc ChangeLog.txt
+ dohtml manual.html
+
+ newinitd "${FILESDIR}"/proxyper.init proxyper
+}
+
+pkg_postinst() {
+ einfo "Don't forget to modify the config file"
+ einfo "located in /opt/proxyper/proxyper.ini"
+ einfo "It's recommend to reading the manual first :-)"
+}
+
+pkg_postrm() {
+ local DESTDIR="/opt/proxyper"
+ if [ -d ${DESTDIR} ]; then
+ einfo "All files have not been removed from ${DESTDIR}"
+ fi
+}
diff --git a/net-misc/proxytunnel/Manifest b/net-misc/proxytunnel/Manifest
new file mode 100644
index 000000000000..7fd7fdcb539a
--- /dev/null
+++ b/net-misc/proxytunnel/Manifest
@@ -0,0 +1 @@
+DIST proxytunnel-1.9.1.tar.gz 48025 SHA256 4a68d2c33bf53c290346b0a76e2c3d25556e954ba346be68cf65ae8f73ae8007 SHA512 819dd11bc13fc279d2d475b89909c0eea414ff71d772d4bfed742dd8d425669dc502f2c22d983bb8c58e426a2bc7209526cb21492ca5f8e92ea1b9ea961fcfdc WHIRLPOOL 5ec64622c062c45bf21275efc785ccb91bd9f61ff13b2cf40b45ea3d73edd06ef6f1b569f5e80ccd3db51a64b38601462edfe2adebf3cdf18ae34b88184a0940
diff --git a/net-misc/proxytunnel/files/proxytunnel-allowTLS.patch b/net-misc/proxytunnel/files/proxytunnel-allowTLS.patch
new file mode 100644
index 000000000000..b6865a73fc5f
--- /dev/null
+++ b/net-misc/proxytunnel/files/proxytunnel-allowTLS.patch
@@ -0,0 +1,22 @@
+From 2a26224b5ff103d2b8e2ff7be56e616d1ecde1f4 Mon Sep 17 00:00:00 2001
+From: wicher <wicher@gavagai.eu>
+Date: Sun, 26 Apr 2015 13:07:13 +0200
+Subject: [PATCH] Allow TLS
+
+---
+ ptstream.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ptstream.c b/ptstream.c
+index 4c87c80..6d55137 100644
+--- a/ptstream.c
++++ b/ptstream.c
+@@ -151,7 +151,7 @@ int stream_enable_ssl(PTSTREAM *pts) {
+
+ /* Initialise the connection */
+ SSLeay_add_ssl_algorithms();
+- meth = SSLv3_client_method();
++ meth = SSLv23_client_method();
+ SSL_load_error_strings();
+
+ ctx = SSL_CTX_new (meth);
diff --git a/net-misc/proxytunnel/metadata.xml b/net-misc/proxytunnel/metadata.xml
new file mode 100644
index 000000000000..5fdea15e5773
--- /dev/null
+++ b/net-misc/proxytunnel/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>vikraman@gentoo.org</email>
+ <name>Vikraman Choudhury</name>
+ </maintainer>
+ <longdescription lang="en">
+ ProxyTunnel is a program that connects stdin and stdout to a server
+ somewhere on the network, through a standard HTTPS proxy. We mostly use
+ it to tunnel SSH sessions through HTTP(S) proxies, allowing us to do
+ many things that wouldn't be possible without ProxyTunnel.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">proxytunnel/proxytunnel</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/proxytunnel/proxytunnel-1.9.1-r1.ebuild b/net-misc/proxytunnel/proxytunnel-1.9.1-r1.ebuild
new file mode 100644
index 000000000000..d6d546ccf2f4
--- /dev/null
+++ b/net-misc/proxytunnel/proxytunnel-1.9.1-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Connect stdin and stdout to a server somewhere on the network, through a standard HTTPS proxy"
+HOMEPAGE="https://github.com/proxytunnel/proxytunnel/ http://proxytunnel.sourceforge.net/"
+SRC_URI="https://github.com/proxytunnel/proxytunnel/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="static"
+
+RDEPEND="dev-libs/openssl:="
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ app-text/asciidoc
+ app-text/xmlto
+ "
+
+src_prepare() {
+ sed -i -e 's/libssl/libssl libcrypto/' Makefile || die "Sed failed!"
+ epatch "${FILESDIR}"/${PN}-allowTLS.patch
+}
+
+src_compile() {
+ use static && append-ldflags -static
+ emake CC="$(tc-getCC)" || die
+}
+
+src_install() {
+ emake install prefix="${EPREFIX}"/usr DESTDIR="${D}" || die
+ dodoc CHANGES CREDITS INSTALL KNOWN_ISSUES LICENSE.txt README RELNOTES TODO
+}
diff --git a/net-misc/ps3mediaserver/Manifest b/net-misc/ps3mediaserver/Manifest
new file mode 100644
index 000000000000..933f09361df7
--- /dev/null
+++ b/net-misc/ps3mediaserver/Manifest
@@ -0,0 +1,3 @@
+DIST pms-1.90.0-generic-linux-unix.tar.gz 15789068 SHA256 5dc4d3e9607acf797c0f1c2e99c9cfbc1bb4c9e279ed153cc606f2d81e727800 SHA512 5ccf1f1cd6fd684808236910506b08187241e78d507dc2b83dbf928c7527b746a0f0a399e218cffc9328438a379293350e152c2c2936655bcb49757a8f7702ba WHIRLPOOL 147802fd3784a9c769be92759fbdc9b65be51f3d30d2cbdec97b51dfe39c18c3861f070c41ad75f67089e03620a715b50cbf090154fb450a15845e618bf756e0
+DIST pms-1.90.1-generic-linux-unix.tar.gz 15789602 SHA256 e90b20e548f66514c66524634f8458d9d133846fa1fc2fcabdbab19907047311 SHA512 af5748989dff1b106ba44a952fc68b43d11a929dec56440cf11ffd6f0a0c561febce54557855bf1afc2614cfb904b5997265f0bdf4ecf45535e12bbabc0fd11f WHIRLPOOL 27d84d5c115b76a5e60c5a5ed8a2a39bb67d92e0a7cb59ce73037668deb03522c8a5a5de490893e23e3cd8e57aee50bd6e85e33ee8d3dbec2b5bc1dacf1d5b51
+DIST pms-generic-linux-unix-1.82.0.tgz 15093724 SHA256 9bb5f4ffc2add70c4810aeb17e766cab1bf839ea2589bd7fea9d8c020a3d46c3 SHA512 fe8b2f60aa650940d8d720d8d32120fa4b0694c0d2947eef49858c7b81736e90a3df9b24e27f0368938c3bcdfa1e01bdc0a307861124bbd55e2ca54deab43813 WHIRLPOOL 40c30f4ddca06732c8eaa185427d0aad7a958bbaec9ef7608c1dc684f90714a1d47cd512ea205013a60409e6f50cba1f5d40a292744d49a9e35df41963d73f5f
diff --git a/net-misc/ps3mediaserver/files/ps3mediaserver.confd b/net-misc/ps3mediaserver/files/ps3mediaserver.confd
new file mode 100644
index 000000000000..7f12ebcf63b9
--- /dev/null
+++ b/net-misc/ps3mediaserver/files/ps3mediaserver.confd
@@ -0,0 +1,7 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+PMS_USER=
+PMS_GROUP=
+PMS_PIDFILE=/var/run/ps3mediaserver.pid
diff --git a/net-misc/ps3mediaserver/files/ps3mediaserver.initd b/net-misc/ps3mediaserver/files/ps3mediaserver.initd
new file mode 100644
index 000000000000..1b3ba65c9d23
--- /dev/null
+++ b/net-misc/ps3mediaserver/files/ps3mediaserver.initd
@@ -0,0 +1,19 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+command="/usr/bin/ps3mediaserver"
+command_args="console"
+pidfile="${PMS_PIDFILE:-/var/run/ps3mediaserver.pid}"
+retry="10"
+start_stop_daemon_args="
+ --background
+ --make-pidfile
+ ${PMS_USER:+--user} ${PMS_USER}
+ ${PMS_GROUP:+--group} ${PMS_GROUP}
+"
+
+depend() {
+ need net
+}
diff --git a/net-misc/ps3mediaserver/metadata.xml b/net-misc/ps3mediaserver/metadata.xml
new file mode 100644
index 000000000000..b4d63de760df
--- /dev/null
+++ b/net-misc/ps3mediaserver/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>floppym@gentoo.org</email>
+ <name>Mike Gilbert</name>
+ </maintainer>
+ <maintainer>
+ <email>vapier@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="multiuser">Allow renderer customization per-user.</flag>
+ <flag name="transcode">Install optional dependencies for transcoding support via media-video/mplayer</flag>
+ <flag name="tsmuxer">Install optional dependencies for transcoding support via media-video/tsmuxer</flag>
+ </use>
+ <upstream>
+ <remote-id type="google-code">ps3mediaserver</remote-id>
+ <remote-id type="sourceforge">ps3mediaserver</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/ps3mediaserver/ps3mediaserver-1.82.0.ebuild b/net-misc/ps3mediaserver/ps3mediaserver-1.82.0.ebuild
new file mode 100644
index 000000000000..f6a7f209c635
--- /dev/null
+++ b/net-misc/ps3mediaserver/ps3mediaserver-1.82.0.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils
+
+DESCRIPTION="DLNA compliant UPNP server for streaming media to Playstation 3"
+HOMEPAGE="http://code.google.com/p/ps3mediaserver"
+SRC_URI="http://ps3mediaserver.googlecode.com/files/pms-generic-linux-unix-${PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="multiuser +transcode tsmuxer"
+
+DEPEND="app-arch/unzip"
+RDEPEND=">=virtual/jre-1.6.0
+ media-libs/libmediainfo
+ media-libs/libzen
+ tsmuxer? ( media-video/tsmuxer )
+ transcode? ( media-video/mplayer[encode] )"
+
+S=${WORKDIR}/pms-${PV}
+PMS_HOME=/opt/${PN}
+
+src_prepare() {
+ if use multiuser; then
+ cat > ${PN} <<-EOF
+ #!/bin/sh
+ if [ ! -e ~/.${PN} ]; then
+ echo "Copying ${PMS_HOME} to ~/.${PN}"
+ cp -pPR "${PMS_HOME}" ~/.${PN}
+ fi
+ export PMS_HOME=\${HOME}/.${PN}
+ exec "\${PMS_HOME}/PMS.sh" "\$@"
+ EOF
+ else
+ cat > ${PN} <<-EOF
+ #!/bin/sh
+ export PMS_HOME=${PMS_HOME}
+ exec "\${PMS_HOME}/PMS.sh" "\$@"
+ EOF
+ fi
+
+ cat > ${PN}.desktop <<-EOF
+ [Desktop Entry]
+ Name=PS3 Media Server
+ GenericName=Media Server
+ Exec=${PN}
+ Icon=${PN}
+ Type=Application
+ Categories=Network;
+ EOF
+
+ unzip -j pms.jar resources/images/icon-{32,256}.png || die
+}
+
+src_install() {
+ dobin ${PN}
+
+ exeinto ${PMS_HOME}
+ doexe PMS.sh
+
+ insinto ${PMS_HOME}
+ doins -r pms.jar *.conf documentation plugins renderers *.xml
+ use tsmuxer && dosym /opt/tsmuxer/bin/tsMuxeR ${PMS_HOME}/linux/tsMuxeR
+ dodoc CHANGELOG.txt README.md
+
+ newicon -s 32 icon-32.png ${PN}.png
+ newicon -s 256 icon-256.png ${PN}.png
+
+ domenu ${PN}.desktop
+
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+}
+
+pkg_postinst() {
+ ewarn "Don't forget to disable transcoding engines for software"
+ ewarn "that you don't have installed (such as having the VLC"
+ ewarn "transcoding engine enabled when you only have mencoder)."
+ if use multiuser; then
+ echo
+ ewarn "Make sure to refresh the .${PN} in your home directory if you are"
+ ewarn "upgrading from a previous version."
+ fi
+}
diff --git a/net-misc/ps3mediaserver/ps3mediaserver-1.90.0.ebuild b/net-misc/ps3mediaserver/ps3mediaserver-1.90.0.ebuild
new file mode 100644
index 000000000000..4ef99732eae5
--- /dev/null
+++ b/net-misc/ps3mediaserver/ps3mediaserver-1.90.0.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils
+
+DESCRIPTION="DLNA compliant UPNP server for streaming media to Playstation 3"
+HOMEPAGE="http://code.google.com/p/ps3mediaserver"
+SRC_URI="mirror://sourceforge/project/ps3mediaserver/pms-${PV}-generic-linux-unix.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="multiuser +transcode tsmuxer"
+
+DEPEND="app-arch/unzip"
+RDEPEND=">=virtual/jre-1.6.0
+ media-libs/libmediainfo
+ media-libs/libzen
+ tsmuxer? ( media-video/tsmuxer )
+ transcode? ( media-video/mplayer[encode] )"
+
+S=${WORKDIR}/pms-${PV}
+PMS_HOME=/opt/${PN}
+
+src_prepare() {
+ if use multiuser; then
+ cat > ${PN} <<-EOF
+ #!/bin/sh
+ if [ ! -e ~/.${PN} ]; then
+ echo "Copying ${PMS_HOME} to ~/.${PN}"
+ cp -pPR "${PMS_HOME}" ~/.${PN}
+ fi
+ export PMS_HOME=\${HOME}/.${PN}
+ exec "\${PMS_HOME}/PMS.sh" "\$@"
+ EOF
+ else
+ cat > ${PN} <<-EOF
+ #!/bin/sh
+ export PMS_HOME=${PMS_HOME}
+ exec "\${PMS_HOME}/PMS.sh" "\$@"
+ EOF
+ fi
+
+ cat > ${PN}.desktop <<-EOF
+ [Desktop Entry]
+ Name=PS3 Media Server
+ GenericName=Media Server
+ Exec=${PN}
+ Icon=${PN}
+ Type=Application
+ Categories=Network;
+ EOF
+
+ unzip -j pms.jar resources/images/icon-{32,256}.png || die
+}
+
+src_install() {
+ dobin ${PN}
+
+ exeinto ${PMS_HOME}
+ doexe PMS.sh
+
+ insinto ${PMS_HOME}
+ doins -r pms.jar *.conf documentation plugins renderers *.xml
+ use tsmuxer && dosym /opt/tsmuxer/bin/tsMuxeR ${PMS_HOME}/linux/tsMuxeR
+ dodoc CHANGELOG.txt README.md
+
+ newicon -s 32 icon-32.png ${PN}.png
+ newicon -s 256 icon-256.png ${PN}.png
+
+ domenu ${PN}.desktop
+
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ ewarn "Don't forget to disable transcoding engines for software"
+ ewarn "that you don't have installed (such as having the VLC"
+ ewarn "transcoding engine enabled when you only have mencoder)."
+ elif use multiuser; then
+ ewarn "Remember to refresh the files in ~/.ps3mediaserver/"
+ fi
+}
diff --git a/net-misc/ps3mediaserver/ps3mediaserver-1.90.1.ebuild b/net-misc/ps3mediaserver/ps3mediaserver-1.90.1.ebuild
new file mode 100644
index 000000000000..ec9c6b2cb509
--- /dev/null
+++ b/net-misc/ps3mediaserver/ps3mediaserver-1.90.1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils
+
+DESCRIPTION="DLNA compliant UPNP server for streaming media to Playstation 3"
+HOMEPAGE="http://code.google.com/p/ps3mediaserver"
+SRC_URI="mirror://sourceforge/project/ps3mediaserver/pms-${PV}-generic-linux-unix.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="multiuser +transcode tsmuxer"
+
+DEPEND="app-arch/unzip"
+RDEPEND=">=virtual/jre-1.6.0
+ media-libs/libmediainfo
+ media-libs/libzen
+ tsmuxer? ( media-video/tsmuxer )
+ transcode? ( media-video/mplayer[encode] )"
+
+S=${WORKDIR}/pms-${PV}
+PMS_HOME=/opt/${PN}
+
+src_prepare() {
+ if use multiuser; then
+ cat > ${PN} <<-EOF
+ #!/bin/sh
+ if [ ! -e ~/.${PN} ]; then
+ echo "Copying ${PMS_HOME} to ~/.${PN}"
+ cp -pPR "${PMS_HOME}" ~/.${PN}
+ fi
+ export PMS_HOME=\${HOME}/.${PN}
+ exec "\${PMS_HOME}/PMS.sh" "\$@"
+ EOF
+ else
+ cat > ${PN} <<-EOF
+ #!/bin/sh
+ export PMS_HOME=${PMS_HOME}
+ exec "\${PMS_HOME}/PMS.sh" "\$@"
+ EOF
+ fi
+
+ cat > ${PN}.desktop <<-EOF
+ [Desktop Entry]
+ Name=PS3 Media Server
+ GenericName=Media Server
+ Exec=${PN}
+ Icon=${PN}
+ Type=Application
+ Categories=Network;
+ EOF
+
+ unzip -j pms.jar resources/images/icon-{32,256}.png || die
+}
+
+src_install() {
+ dobin ${PN}
+
+ exeinto ${PMS_HOME}
+ doexe PMS.sh
+
+ insinto ${PMS_HOME}
+ doins -r pms.jar *.conf documentation plugins renderers *.xml
+ use tsmuxer && dosym /opt/tsmuxer/bin/tsMuxeR ${PMS_HOME}/linux/tsMuxeR
+ dodoc CHANGELOG.txt README.md
+
+ newicon -s 32 icon-32.png ${PN}.png
+ newicon -s 256 icon-256.png ${PN}.png
+
+ domenu ${PN}.desktop
+
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ ewarn "Don't forget to disable transcoding engines for software"
+ ewarn "that you don't have installed (such as having the VLC"
+ ewarn "transcoding engine enabled when you only have mencoder)."
+ elif use multiuser; then
+ ewarn "Remember to refresh the files in ~/.ps3mediaserver/"
+ fi
+}
diff --git a/net-misc/pssh/Manifest b/net-misc/pssh/Manifest
new file mode 100644
index 000000000000..d86affd83b9d
--- /dev/null
+++ b/net-misc/pssh/Manifest
@@ -0,0 +1 @@
+DIST pssh-2.3.1.tar.gz 23427 SHA256 539f8d8363b722712310f3296f189d1ae8c690898eca93627fc89a9cb311f6b4 SHA512 c39e1c2b0a3bc2bd736f1e7d2f402db6a128e81d6a80ce7e97f39e7fae93f7a20037b43b5725bed5ba911f54e36a9b65c509d858a53c696989b76b1322e7680f WHIRLPOOL ff5eb7c2d11b47d74793f44acc9091cc3f0707b7a70a1d0d4074d2d19a4d0cebe381b30d211a140ff9ebfa90f1cee566f0b9c42a354fef9a4f2099e5c1aee7c7
diff --git a/net-misc/pssh/metadata.xml b/net-misc/pssh/metadata.xml
new file mode 100644
index 000000000000..2eadaf8a7e2f
--- /dev/null
+++ b/net-misc/pssh/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>cluster</herd>
+ <upstream>
+ <remote-id type="google-code">parallel-ssh</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/pssh/pssh-2.3.1-r1.ebuild b/net-misc/pssh/pssh-2.3.1-r1.ebuild
new file mode 100644
index 000000000000..494a9ff9880f
--- /dev/null
+++ b/net-misc/pssh/pssh-2.3.1-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
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=1
+
+inherit distutils-r1
+
+DESCRIPTION="PSSH provides parallel versions of OpenSSH and related tools"
+HOMEPAGE="http://code.google.com/p/parallel-ssh/"
+SRC_URI="http://parallel-ssh.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~x86-interix ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="net-misc/openssh
+ !net-misc/putty"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]"
+
+# Requires ssh access to run.
+RESTRICT="test"
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+python_prepare_all() {
+ sed -i -e "s|man/man1'|share/&|g" setup.py || die
+ distutils-r1_python_prepare_all
+}
diff --git a/net-misc/ptpd/Manifest b/net-misc/ptpd/Manifest
new file mode 100644
index 000000000000..cc9ef1e47828
--- /dev/null
+++ b/net-misc/ptpd/Manifest
@@ -0,0 +1 @@
+DIST ptpd-2.3.1.tar.gz 1196180 SHA256 0dbf54dd2c178bd9fe62481d2c37513ee36636d8bf137cfdad96891490cdbf93 SHA512 c0e9eecfd87769b8cdbac624bf40f28634911e92d2169f4b91d59b76466eb4bf2143037dab3c601190ceaa13c8ab857c7875789448a46ab560bf0d0b8d321963 WHIRLPOOL e81b43eded2891a8eec2e880a837e6da5d94b64f363979af64eabdc341b75aae79605c00a7790a842e77b9d00ec69cf9bf97d7ff92498549db31825835cd6128
diff --git a/net-misc/ptpd/files/ptpd2.confd b/net-misc/ptpd/files/ptpd2.confd
new file mode 100644
index 000000000000..22fe2d49285f
--- /dev/null
+++ b/net-misc/ptpd/files/ptpd2.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/ptpd2
+
+# Options to pass to ptpd2
+PTPD_OPTS=""
diff --git a/net-misc/ptpd/files/ptpd2.rc b/net-misc/ptpd/files/ptpd2.rc
new file mode 100644
index 000000000000..604672966a72
--- /dev/null
+++ b/net-misc/ptpd/files/ptpd2.rc
@@ -0,0 +1,57 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+PTPD_CONFIGFILE=${PTPD_CONFIGFILE:-/etc/${RC_SVCNAME}.conf}
+PTPD_STATEFILE_DIR=${PTPD_STATEFILE_DIR:-/var/run}
+PTPD_STATEFILE=${PTPD_STATEFILE:-${PTPD_STATEFILE_DIR}/${RC_SVCNAME}.status}
+PTPD_PIDFILE_DIR=${PTPD_PIDFILE_DIR:-/var/run}
+PTPD_PIDFILE=${PTPD_PIDFILE:-${PTPD_PIDFILE_DIR}/${RC_SVCNAME}.pid}
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+command="/usr/sbin/ptpd2"
+command_args="--global:lock_file=$PTPD_PIDFILE --global:status_file=$PTPD_STATEFILE -c $PTPD_CONFIGFILE $PTPD_OPTS"
+pidfile="${PTPD_PIDFILE}"
+description="Precise Time Protocol daemon"
+
+
+depend() {
+ use net dns logger
+}
+
+checkconfig() {
+ ebegin "Checking ${SVCNAME} configuration"
+ msgout="$($command -k $command_args 2>&1)"
+ RETVAL=$?
+
+ # colorize output
+ echo "$msgout" | while read ln; do
+ if [[ "$ln" == *ignored* ]]; then
+ ewarn "$ln"
+ elif [[ "$ln" != "Configuration OK" ]]; then
+ eerror "$ln"
+ fi
+ done
+
+ eend $RETVAL
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec ${command} \
+ --pidfile ${pidfile} \
+ -- ${command_args}
+ eend $?
+}
+
+reload() {
+ checkconfig || return 1
+
+ ebegin "Reloading ${SVCNAME} configuration"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}
diff --git a/net-misc/ptpd/files/ptpd2.service b/net-misc/ptpd/files/ptpd2.service
new file mode 100644
index 000000000000..35fb34fd6897
--- /dev/null
+++ b/net-misc/ptpd/files/ptpd2.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Precise Time Protocol daemon
+Documentation=man:ptpd2(8)
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/ptpd2 -C -c /etc/ptpd2.conf
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/ptpd/metadata.xml b/net-misc/ptpd/metadata.xml
new file mode 100644
index 000000000000..a07e1da46b1a
--- /dev/null
+++ b/net-misc/ptpd/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>jan.breuer@jaybee.cz</email>
+ <name>Jan Breuer</name>
+ </maintainer>
+ <use>
+ <flag name="debug">Enable debugging informations</flag>
+ <flag name="experimental">Enable experimental features</flag>
+ <flag name="ntp">Enable NTPD cooperation</flag>
+ <flag name="snmp">Require <pkg>net-analyzer/net-snmp</pkg> to enable SNMP configuration</flag>
+ <flag name="statistics">Enable compution of statistics</flag>
+ <flag name="pcap">Require <pkg>net-libs/libpcap</pkg> to allow layer 2 (raw Ethernet) transport</flag>
+ <flag name="slave-only">Enable slave only operation (remove master mode functionality)</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">ptpd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/ptpd/ptpd-2.3.1.ebuild b/net-misc/ptpd/ptpd-2.3.1.ebuild
new file mode 100644
index 000000000000..ce4ef8fdc487
--- /dev/null
+++ b/net-misc/ptpd/ptpd-2.3.1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic systemd
+
+DESCRIPTION="Precision Time Protocol daemon"
+HOMEPAGE="http://ptpd.sf.net"
+
+SRC_URI="mirror://sourceforge/ptpd/${PV}/${P}.tar.gz"
+KEYWORDS="~amd64 ~arm ~x86"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="debug experimental ntp +pcap snmp slave-only +statistics"
+RDEPEND="
+ pcap? ( net-libs/libpcap )
+ snmp? ( net-analyzer/net-snmp )"
+DEPEND="${RDEPEND}"
+RDEPEND="${RDEPEND}
+ ntp? ( net-misc/ntp )"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ econf \
+ --enable-daemon \
+ $(use_enable snmp) \
+ $(use_enable experimental experimental-options) \
+ $(use_enable statistics) \
+ $(use_enable debug runtime-debug) \
+ $(use_enable pcap) \
+ $(use_enable slave-only)
+}
+
+src_install() {
+ emake install DESTDIR="${D}"
+
+ insinto /etc
+ newins "src/ptpd2.conf.minimal" ptpd2.conf
+
+ newinitd "${FILESDIR}/ptpd2.rc" ptpd2
+ newconfd "${FILESDIR}/ptpd2.confd" ptpd2
+
+ systemd_dounit "${FILESDIR}/ptpd2.service"
+}
+
+pkg_postinst() {
+ elog "Do not forget to setup correct network interface."
+ elog "Change the config file /etc/ptpd2.conf to suit your needs."
+}
diff --git a/net-misc/puf/Manifest b/net-misc/puf/Manifest
new file mode 100644
index 000000000000..f5fbd4a18e30
--- /dev/null
+++ b/net-misc/puf/Manifest
@@ -0,0 +1 @@
+DIST puf-1.0.0.tar.gz 153540 SHA256 3f1602057dc47debeb54effc2db9eadcffae266834389bdbf5ab14fc611eeaf0 SHA512 c26a9c2dc0ae12ea20478cd4328891c88d32c0217e215bff1ee817463445a748e4d0893ac0af1fd47b8822e5bfed6a44c7cc2d22c915a825bf943b159d61e135 WHIRLPOOL 6e9a6df3a79c09ec178a4eb6adb125a78bf4fab4581cb6ad5782a388f4d34af1eacd1a4a6aea35d8f91aac6384d769c946280da84997f7ce879e2bad43a2acf7
diff --git a/net-misc/puf/metadata.xml b/net-misc/puf/metadata.xml
new file mode 100644
index 000000000000..2862fda6e080
--- /dev/null
+++ b/net-misc/puf/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">puf</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/puf/puf-1.0.0.ebuild b/net-misc/puf/puf-1.0.0.ebuild
new file mode 100644
index 000000000000..4d9e72652de8
--- /dev/null
+++ b/net-misc/puf/puf-1.0.0.ebuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A download tool for UNIX-like systems"
+HOMEPAGE="http://puf.sourceforge.net/"
+SRC_URI="mirror://sourceforge/puf/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+DOCS=( AUTHORS NEWS README TODO )
diff --git a/net-misc/pump/Manifest b/net-misc/pump/Manifest
new file mode 100644
index 000000000000..0bc78e0ecf79
--- /dev/null
+++ b/net-misc/pump/Manifest
@@ -0,0 +1,2 @@
+DIST pump_0.8.24-7.diff.gz 29280 SHA256 2bc790e57a6476693395075ae2e64791afb269a3a5b79029a3915d2ecae6cc64 SHA512 8d70bb31f9d56d79b4cb74def6d3df2a3115b62672190d8c38b7fa628ad35481ad637dd4854e8331a4c5a649fa573c58c9b867b014bbaad7fe6c8c870a02eae2 WHIRLPOOL cda44ce5c5e8f7404aaf23fcc0525930bd5bc5d4963c7d7f383c15c1f2771467351c6f2a3234edcd0bd0bfbaac09b3f9ebbf1fd44ee9c942e301807fa89e5908
+DIST pump_0.8.24.orig.tar.gz 79790 SHA256 cbb423942a4295a07a23b76a02d645b76b4ac0b58c3a30076ad42c2ab80c2dba SHA512 b6956f0ab2a5fbcda2320efd454d21aee651816a13a55622e21dc3a29919aef7db7c9a8d71c3b37b1969f29cff37c67d313f763a17404652fb962bc54eabcb34 WHIRLPOOL e007ca89139f16afcd42585299e97c960c7136b192499c3b042083f832fd2f3347b814c94a40ea65515db243f26e7ad81deee923d2eb632af7e428f9e6a013d2
diff --git a/net-misc/pump/metadata.xml b/net-misc/pump/metadata.xml
new file mode 100644
index 000000000000..b1f88f3afd88
--- /dev/null
+++ b/net-misc/pump/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ A DHCP/BOOTP client
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/pump/pump-0.8.24-r4.ebuild b/net-misc/pump/pump-0.8.24-r4.ebuild
new file mode 100644
index 000000000000..339780cf2bf9
--- /dev/null
+++ b/net-misc/pump/pump-0.8.24-r4.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+PATCHLEVEL="7"
+
+DESCRIPTION="This is the DHCP/BOOTP client written by RedHat"
+HOMEPAGE="http://ftp.debian.org/debian/pool/main/p/pump/"
+SRC_URI="mirror://debian/pool/main/p/${PN}/${PN}_${PV}.orig.tar.gz
+ mirror://debian/pool/main/p/${PN}/${PN}_${PV}-${PATCHLEVEL}.diff.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ia64 ppc sparc x86"
+IUSE=""
+
+DEPEND=">=dev-libs/popt-1.5"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # Fix Debian patch to fit epatch logic
+ sed -i \
+ -e 's:/debian::g' \
+ -e '/^---/s:pump-0.8.24.orig/::' \
+ -e '/^+++/s:pump-0.8.24/::' \
+ "${WORKDIR}/${PN}_${PV}-${PATCHLEVEL}.diff" || die "sed on ${PN}_${PV}-${PATCHLEVEL}.diff failed"
+
+ # Apply Debians pump patchset - they fix things good :)
+ # Debian patchset 7 include gentoo patchset too
+ epatch "${WORKDIR}/${PN}_${PV}-${PATCHLEVEL}.diff"
+ # Add LC_ALL workaround to make sure that patches are applied in right order(bug 471666)
+ LC_ALL=C EPATCH_FORCE="yes" EPATCH_SOURCE="patches" EPATCH_SUFFIX="patch" epatch
+
+ # respect AR, wrt bug #458482
+ tc-export AR
+
+ epatch_user
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" DEB_CFLAGS="-fPIC ${CFLAGS}" pump
+}
+
+src_install() {
+ exeinto /sbin
+ doexe pump
+
+ doman pump.8
+ dodoc changelog CREDITS
+
+ dolib.a libpump.a
+ doheader pump.h
+}
diff --git a/net-misc/putty/Manifest b/net-misc/putty/Manifest
new file mode 100644
index 000000000000..f0849803ab23
--- /dev/null
+++ b/net-misc/putty/Manifest
@@ -0,0 +1,3 @@
+DIST putty-0.64.tar.gz 1977448 SHA256 2a46c97a184144e3ec2392aca9acc64d062317a3a38b9a5f623a147eda5f3821 SHA512 ba4d4086b8edcb6388924bf3d9b018841be36a9dbf298271c9d2ed063aae9854093e9ff6808bd1f65669d78369548639eb3c95fdec5e3f0daee4b1c7bb603051 WHIRLPOOL 9f91dd80e9fa92e6c7957b5797158d8f5ff8162ef04f76c26e044ff4a421444c30ca1089111a448f307dc9f060c80bfb1b5616abf9ca88dd16808680ce86d253
+DIST putty-0.65.tar.gz 1937861 SHA256 d543c1fd4944ea51d46d4abf31bfb8cde9bd1c65cb36dc6b83e51ce875660ca0 SHA512 cfb3e5437a920aa11bccedf1bd43a538a51ec3777a6d1dba9e9714c3b3699eaf1f4eb027a8f5fd6425f9909564a28b607f465b1f2b2e1250059b04b9a9d40569 WHIRLPOOL 15eff58a0cec37516daf67cef56772602f5bcbcb39ba09d3d8fdba31fadb77734c404a9d85e674e17c17e53db8c0deaad906b56b3bce302ec08adc9a44850c2b
+DIST putty-icons.tar.bz2 4878 SHA256 960b189069dbfb20a1f49e378ab88bed716c6457593815e414d51ad7a3fa93a7 SHA512 4e419a71e26770e159221f6b516e7210d29272917b4b9a9e0b67c72e73508b97278e56c82111b02e106c5d513c2561fec6da372b4b18246f29372ae618ff5f71 WHIRLPOOL ec96fe682582bfa58ce73c3e5cb7bb61d2363b7a5e9d3259dfd11cd6396512b5b9ed954f6a431baab36b1f17963714b30c239cdf4c08191d27b5abb858f54a57
diff --git a/net-misc/putty/metadata.xml b/net-misc/putty/metadata.xml
new file mode 100644
index 000000000000..2f19caa65b47
--- /dev/null
+++ b/net-misc/putty/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>jer@gentoo.org</email>
+ <name>Jeroen Roovers</name>
+ </maintainer>
+ <longdescription lang="en">
+ PuTTY is a free implementation of Telnet and SSH for Windows and Unix
+ platforms, along with an xterm terminal emulator. It supports flexible
+ terminal setup, mid-session reconfiguration using Ctrl-rightclick,
+ multiple X11 authentication protocols, and various other interesting
+ things not provided by ssh in an xterm.
+ </longdescription>
+ <use>
+ <flag name='gtk'>Build the PuTTY client which requires <pkg>x11-libs/gtk+:2</pkg>. Otherwise only the CLI tools puttygen, plink, pscp and psftp will be built.</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/putty/putty-0.64.ebuild b/net-misc/putty/putty-0.64.ebuild
new file mode 100644
index 000000000000..3859b9bcb258
--- /dev/null
+++ b/net-misc/putty/putty-0.64.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils gnome2-utils toolchain-funcs
+
+DESCRIPTION="A Free Telnet/SSH Client"
+HOMEPAGE="http://www.chiark.greenend.org.uk/~sgtatham/putty/"
+LICENSE="MIT"
+
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc ~ppc64 sparc x86"
+IUSE="doc +gtk ipv6 kerberos"
+SRC_URI="
+ http://dev.gentoo.org/~jer/${PN}-icons.tar.bz2
+ http://the.earth.li/~sgtatham/${PN}/latest/${P}.tar.gz
+"
+
+RDEPEND="
+ !net-misc/pssh
+ gtk? (
+ dev-libs/glib:2
+ x11-libs/gdk-pixbuf
+ x11-libs/gtk+:2
+ x11-libs/libX11
+ x11-libs/pango
+ )
+ kerberos? ( virtual/krb5 )
+"
+DEPEND="
+ ${RDEPEND}
+ dev-lang/perl
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ sed -i \
+ -e '/AM_PATH_GTK(/d' \
+ -e 's|-Werror||g' \
+ configure.ac || die
+
+ eautoreconf
+}
+
+src_configure() {
+ cd "${S}"/unix || die
+ econf \
+ $(use_with kerberos gssapi) \
+ $(use_with gtk)
+}
+
+src_compile() {
+ cd "${S}"/unix || die
+ emake AR=$(tc-getAR) $(usex ipv6 '' COMPAT=-DNO_IPV6)
+}
+
+src_install() {
+ dodoc doc/puttydoc.txt
+
+ if use doc; then
+ dohtml doc/*.html
+ fi
+
+ cd "${S}"/unix || die
+ default
+
+ if use gtk ; then
+ for i in 16 22 24 32 48 64 128 256; do
+ newicon -s ${i} "${WORKDIR}"/${PN}-icons/${PN}-${i}.png ${PN}.png
+ done
+
+ # install desktop file provided by Gustav Schaffter in #49577
+ make_desktop_entry ${PN} PuTTY ${PN} Network
+ fi
+}
+
+pkg_preinst() {
+ use gtk && gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ use gtk && gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ use gtk && gnome2_icon_cache_update
+}
diff --git a/net-misc/putty/putty-0.65.ebuild b/net-misc/putty/putty-0.65.ebuild
new file mode 100644
index 000000000000..6ce739dc520b
--- /dev/null
+++ b/net-misc/putty/putty-0.65.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils gnome2-utils toolchain-funcs
+
+DESCRIPTION="A Free Telnet/SSH Client"
+HOMEPAGE="http://www.chiark.greenend.org.uk/~sgtatham/putty/"
+LICENSE="MIT"
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc +gtk ipv6 kerberos"
+SRC_URI="
+ http://dev.gentoo.org/~jer/${PN}-icons.tar.bz2
+ http://the.earth.li/~sgtatham/${PN}/latest/${P}.tar.gz
+"
+
+RDEPEND="
+ !net-misc/pssh
+ gtk? (
+ dev-libs/glib:2
+ x11-libs/gdk-pixbuf
+ x11-libs/gtk+:2
+ x11-libs/libX11
+ x11-libs/pango
+ )
+ kerberos? ( virtual/krb5 )
+"
+DEPEND="
+ ${RDEPEND}
+ dev-lang/perl
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ sed -i \
+ -e '/AM_PATH_GTK(/d' \
+ -e 's|-Werror||g' \
+ configure.ac || die
+
+ eautoreconf
+}
+
+src_configure() {
+ cd "${S}"/unix || die
+ econf \
+ $(use_with kerberos gssapi) \
+ $(use_with gtk)
+}
+
+src_compile() {
+ cd "${S}"/unix || die
+ emake AR=$(tc-getAR) $(usex ipv6 '' COMPAT=-DNO_IPV6)
+}
+
+src_install() {
+ dodoc doc/puttydoc.txt
+
+ if use doc; then
+ dohtml doc/*.html
+ fi
+
+ cd "${S}"/unix || die
+ default
+
+ if use gtk ; then
+ for i in 16 22 24 32 48 64 128 256; do
+ newicon -s ${i} "${WORKDIR}"/${PN}-icons/${PN}-${i}.png ${PN}.png
+ done
+
+ # install desktop file provided by Gustav Schaffter in #49577
+ make_desktop_entry ${PN} PuTTY ${PN} Network
+ fi
+}
+
+pkg_preinst() {
+ use gtk && gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ use gtk && gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ use gtk && gnome2_icon_cache_update
+}
diff --git a/net-misc/putty/putty-9999.ebuild b/net-misc/putty/putty-9999.ebuild
new file mode 100644
index 000000000000..87489c31ad0e
--- /dev/null
+++ b/net-misc/putty/putty-9999.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils gnome2-utils git-r3 toolchain-funcs
+
+DESCRIPTION="A Free Telnet/SSH Client"
+HOMEPAGE="http://www.chiark.greenend.org.uk/~sgtatham/putty/"
+EGIT_REPO_URI="git://git.tartarus.org/simon/putty.git"
+SRC_URI="http://dev.gentoo.org/~jer/${PN}-icons.tar.bz2"
+LICENSE="MIT"
+
+SLOT="0"
+KEYWORDS=""
+IUSE="doc +gtk ipv6 kerberos"
+
+RDEPEND="
+ !net-misc/pssh
+ gtk? (
+ dev-libs/glib:2
+ x11-libs/gdk-pixbuf
+ x11-libs/gtk+:2
+ x11-libs/libX11
+ x11-libs/pango
+ )
+ kerberos? ( virtual/krb5 )
+"
+DEPEND="
+ ${RDEPEND}
+ app-doc/halibut
+ dev-lang/perl
+ virtual/pkgconfig
+"
+
+src_unpack() {
+ git-r3_src_unpack
+ default
+}
+
+src_prepare() {
+ sed -i \
+ -e '/AM_PATH_GTK(/d' \
+ -e 's|-Werror||g' \
+ configure.ac || die
+
+ ./mkfiles.pl || die
+
+ eautoreconf
+}
+
+src_configure() {
+ cd "${S}"/unix || die
+ econf \
+ $(use_with kerberos gssapi) \
+ $(use_with gtk)
+}
+
+src_compile() {
+ emake -C "${S}"/doc
+ emake -C "${S}"/unix AR=$(tc-getAR) $(usex ipv6 '' COMPAT=-DNO_IPV6)
+}
+
+src_install() {
+ dodoc doc/puttydoc.txt
+
+ if use doc; then
+ dohtml doc/*.html
+ fi
+
+ cd "${S}"/unix || die
+ default
+
+ if use gtk ; then
+ for i in 16 22 24 32 48 64 128 256; do
+ newicon -s ${i} "${WORKDIR}"/${PN}-icons/${PN}-${i}.png ${PN}.png
+ done
+
+ # install desktop file provided by Gustav Schaffter in #49577
+ make_desktop_entry ${PN} PuTTY ${PN} Network
+ fi
+}
+
+pkg_preinst() {
+ use gtk && gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ use gtk && gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ use gtk && gnome2_icon_cache_update
+}
diff --git a/net-misc/pycnb/Manifest b/net-misc/pycnb/Manifest
new file mode 100644
index 000000000000..c3daf7f9484c
--- /dev/null
+++ b/net-misc/pycnb/Manifest
@@ -0,0 +1 @@
+DIST pycnb-0.0.4.tar.gz 2991 SHA256 11cbb9dff1dc79daba1dde2a5d2f5db9283614a00166bc505cae41006a87bd3d SHA512 e127525bffdd479a5717230f520602cd1dd587000a1adc398739399530fbb3e06d7bbf3e4f7b24c7bd145f2424427ddb6fc86d6bc597d2cab3cdfc6d554cecf9 WHIRLPOOL 2f11c9020b6c3e2f2a00835e8b0307fd7292879a104f37f0b38e77022eb504211626f51584b1560a81a97ed7cb5ab65e847228667f79d0395753ff179679f6a1
diff --git a/net-misc/pycnb/metadata.xml b/net-misc/pycnb/metadata.xml
new file mode 100644
index 000000000000..d26da4036070
--- /dev/null
+++ b/net-misc/pycnb/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>python</herd>
+ <maintainer>
+ <email>yac@gentoo.org</email>
+ <name>Jan Matejka</name>
+ </maintainer>
+ <longdescription lang="en">
+ </longdescription>
+ <upstream>
+ <remote-id type="pypi">pycnb</remote-id>
+ <remote-id type="github">yaccz/pycnb</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/pycnb/pycnb-0.0.4.ebuild b/net-misc/pycnb/pycnb-0.0.4.ebuild
new file mode 100644
index 000000000000..f363f1ae810a
--- /dev/null
+++ b/net-misc/pycnb/pycnb-0.0.4.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="Access cnb.cz daily rates with the comfort of your command line"
+HOMEPAGE="https://github.com/yaccz/pycnb"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+DEPEND="dev-python/cement[${PYTHON_USEDEP}]
+ dev-python/twisted-web
+ dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}"
diff --git a/net-misc/pyhoca-cli/Manifest b/net-misc/pyhoca-cli/Manifest
new file mode 100644
index 000000000000..51cc8f787830
--- /dev/null
+++ b/net-misc/pyhoca-cli/Manifest
@@ -0,0 +1 @@
+DIST pyhoca-cli-0.5.0.2.tar.gz 32084 SHA256 8261fedff24553217eba269a3c57e30b9953b37f58b09038f487637d83203d5e SHA512 46569c786014629d07d4a92e9ca31a8cf8a13cab43ba518213bf212b4391d038d169da931f536f8a088d26978b46428acb6ef8d46c7bc3737afc7086263a3a01 WHIRLPOOL fbfcd99887574a09849a2959811e7c5403499aa94184bc0cc2e7f14a23bfa35d6bfc03afa746827f53cce632e4dc25002377e07bf30243a08be7511af45a1d17
diff --git a/net-misc/pyhoca-cli/metadata.xml b/net-misc/pyhoca-cli/metadata.xml
new file mode 100644
index 000000000000..424f8b70442c
--- /dev/null
+++ b/net-misc/pyhoca-cli/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>nx</herd>
+ <longdescription>
+PyHoca-CLI is a client implementation for X2Go using the project's Python API (Python module). PyHoca-CLI can be operated completely from the command line and the goal is to reflect the full functionality spectrum of Python X2Go.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/pyhoca-cli/pyhoca-cli-0.5.0.2-r1.ebuild b/net-misc/pyhoca-cli/pyhoca-cli-0.5.0.2-r1.ebuild
new file mode 100644
index 000000000000..fc82f0413326
--- /dev/null
+++ b/net-misc/pyhoca-cli/pyhoca-cli-0.5.0.2-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit distutils-r1
+
+DESCRIPTION="X2Go command line client"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-python/setproctitle[${PYTHON_USEDEP}]
+ >=net-misc/python-x2go-0.5.0.0[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}"
+
+python_install() {
+ distutils-r1_python_install
+ python_doscript ${PN}
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ doman man/man1/*
+}
diff --git a/net-misc/pyhoca-gui/Manifest b/net-misc/pyhoca-gui/Manifest
new file mode 100644
index 000000000000..edd8bf29c6e8
--- /dev/null
+++ b/net-misc/pyhoca-gui/Manifest
@@ -0,0 +1 @@
+DIST pyhoca-gui-0.5.0.4.tar.gz 1331234 SHA256 72fd2a7904cc8b74d8fef937b6923ac45d1071f48445e42b2f2df088648403b9 SHA512 a39db02604437ef64de63ef4f5ac70652e9d0b21f94dfd1916adc127fc691b4919af5146baeecabc5f4c821981c0a11f903c0ed41160ef50bc07cfb0706653d6 WHIRLPOOL 4416934c9b7379f140159757f60ed840de00b4bc9ff74c8be03568b09e4c31d4d746ff4186e4c323de8d2ae7b9ee59fc69ef77ac87f048822209a128b35cc688
diff --git a/net-misc/pyhoca-gui/metadata.xml b/net-misc/pyhoca-gui/metadata.xml
new file mode 100644
index 000000000000..1edb00b503c0
--- /dev/null
+++ b/net-misc/pyhoca-gui/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>nx</herd>
+ <longdescription>
+PyHoca-GUI is a client implementation for X2Go using the project's Python X2Go client API (a Python module). PyHoca-GUI uses wxPython for rendering graphical desktop elements (menus, dialog boxes etc.).
+
+PyHoca-GUI is designed as a very minimal GUI that behaves very similar to GNOME's network manager applet (nm-applet). It appears as a small Phoca icon (a little seal) that docks to your systray panel (also called notification area) and allows you to manage multiple X2go sessions simultaneously.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/pyhoca-gui/pyhoca-gui-0.5.0.4-r1.ebuild b/net-misc/pyhoca-gui/pyhoca-gui-0.5.0.4-r1.ebuild
new file mode 100644
index 000000000000..e60f43a27c12
--- /dev/null
+++ b/net-misc/pyhoca-gui/pyhoca-gui-0.5.0.4-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit distutils-r1
+
+DESCRIPTION="X2Go graphical client applet"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-python/notify-python[${PYTHON_USEDEP}]
+ dev-python/pycups[${PYTHON_USEDEP}]
+ dev-python/setproctitle[${PYTHON_USEDEP}]
+ dev-python/wxpython[${PYTHON_USEDEP}]
+ >=net-misc/python-x2go-0.5.0.0[${PYTHON_USEDEP}]"
+DEPEND="${DEPEND}
+ dev-python/python-distutils-extra[${PYTHON_USEDEP}]"
+
+python_install() {
+ distutils-r1_python_install
+ python_doscript ${PN}
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ doman man/man1/*
+}
diff --git a/net-misc/pymazon/Manifest b/net-misc/pymazon/Manifest
new file mode 100644
index 000000000000..6af6a526f446
--- /dev/null
+++ b/net-misc/pymazon/Manifest
@@ -0,0 +1,2 @@
+DIST Pymazon-0.9.1.tar.gz 286720 SHA256 c9ccd6e7f5aad1a8434fb9fec70552d397eb2aa2b01629e35fec3e75039bce2d
+DIST Pymazon-0.9.tar.gz 58435 SHA256 1f064ee8aa9882406d463244d8c0584e0348bbb91afa7ccb8352f6a8d142656c
diff --git a/net-misc/pymazon/files/amz.xml b/net-misc/pymazon/files/amz.xml
new file mode 100644
index 000000000000..8fd3a61d69ae
--- /dev/null
+++ b/net-misc/pymazon/files/amz.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
+ <mime-type type="audio/x-amzxml">
+ <sub-class-of type="text/plain"/>
+ <comment>AmazonMP3 Download Queue</comment>
+ <glob pattern="*.amz"/>
+ <magic>
+ <match type="string" offset="0" value="gtBcZ7b78K" />
+ </magic>
+ </mime-type>
+</mime-info>
diff --git a/net-misc/pymazon/metadata.xml b/net-misc/pymazon/metadata.xml
new file mode 100644
index 000000000000..4f200ad3b95b
--- /dev/null
+++ b/net-misc/pymazon/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>desktop-misc</herd>
+ <upstream>
+ <remote-id type="google-code">pymazon</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/pymazon/pymazon-0.9-r1.ebuild b/net-misc/pymazon/pymazon-0.9-r1.ebuild
new file mode 100644
index 000000000000..76513e370923
--- /dev/null
+++ b/net-misc/pymazon/pymazon-0.9-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+PYTHON_DEPEND="2"
+inherit eutils distutils fdo-mime
+
+MY_P="Pymazon-${PV}"
+DESCRIPTION="Downloader for the Amazon.com MP3 music store"
+HOMEPAGE="http://code.google.com/p/pymazon/"
+SRC_URI="http://pymazon.googlecode.com/files/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+gtk +qt4"
+
+DEPEND="gtk? ( dev-python/pygtk )
+ qt4? ( dev-python/PyQt4 )"
+RDEPEND="${DEPEND}
+ dev-python/pycrypto"
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_install() {
+ distutils_src_install
+
+ insinto /usr/share/pixmaps
+ newins pymazon/resource/icons/download.png pymazon.png
+
+ if ! use gtk && ! use qt4; then
+ EXTRA_FIELDS="\nTerminal=true\nNoDisplay=true"
+ DEFAULTARGS=" -c"
+ fi
+ make_desktop_entry "pymazon${DEFAULTARGS}" "Pymazon MP3 Downloader" \
+ pymazon "Network;FileTransfer" \
+ "MimeType=audio/x-amzxml;${EXTRA_FIELDS}"
+
+ insinto /usr/share/mime/packages
+ doins "${FILESDIR}/amz.xml"
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ einfo "To link pymazon with your amazon.com account, visit:"
+ einfo " http://www.amazon.com/gp/dmusic/after_download_manager_install.html"
+}
+
+pkg_postrm() {
+ distutils_pkg_postrm
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/net-misc/pymazon/pymazon-0.9.1.ebuild b/net-misc/pymazon/pymazon-0.9.1.ebuild
new file mode 100644
index 000000000000..f2e7dcb50fef
--- /dev/null
+++ b/net-misc/pymazon/pymazon-0.9.1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+PYTHON_DEPEND="2"
+inherit eutils distutils fdo-mime
+
+MY_P="Pymazon-${PV}"
+DESCRIPTION="Downloader for the Amazon.com MP3 music store"
+HOMEPAGE="http://code.google.com/p/pymazon/"
+SRC_URI="http://pymazon.googlecode.com/files/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+gtk +qt4"
+
+DEPEND="gtk? ( dev-python/pygtk )
+ qt4? ( dev-python/PyQt4 )"
+RDEPEND="${DEPEND}
+ dev-python/pycrypto"
+S="${WORKDIR}/pymazon"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_install() {
+ distutils_src_install
+
+ insinto /usr/share/pixmaps
+ newins pymazon/resource/icons/download.png pymazon.png
+
+ if ! use gtk && ! use qt4; then
+ EXTRA_FIELDS="\nTerminal=true\nNoDisplay=true"
+ DEFAULTARGS=" -c"
+ fi
+ make_desktop_entry "pymazon${DEFAULTARGS}" "Pymazon MP3 Downloader" \
+ pymazon "Network;FileTransfer" \
+ "MimeType=audio/x-amzxml;${EXTRA_FIELDS}"
+
+ insinto /usr/share/mime/packages
+ doins "${FILESDIR}/amz.xml"
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ einfo "To link pymazon with your amazon.com account, visit:"
+ einfo " http://www.amazon.com/gp/dmusic/after_download_manager_install.html"
+}
+
+pkg_postrm() {
+ distutils_pkg_postrm
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/net-misc/python-x2go/Manifest b/net-misc/python-x2go/Manifest
new file mode 100644
index 000000000000..8424be062ea1
--- /dev/null
+++ b/net-misc/python-x2go/Manifest
@@ -0,0 +1,2 @@
+DIST python-x2go-0.5.0.3.tar.gz 197897 SHA256 b6bd8fe2944b285b393accfd270c6c963a3fe21cead5f81c1983573d339c194e SHA512 cb826bfe064fa22d3dd3be2176e54ca6ff3e7e4c49271f4f33072c491222ce2e5164d5000da0cca02f1a612c1f61adc1d61e5702e11ef6d4e5a5454f61f48a86 WHIRLPOOL 0775ec1edcbeb514ed2cf0fd5fee687c9b8c1656d4ac52e7ae789edb1c3fbfd6981778410270ab3fbed75ef2f4ae907e63a271a660123bf88a1d3fd868828bb2
+DIST python-x2go-0.5.0.4.tar.gz 198280 SHA256 db971e96cc32d10782fdfbce04f1f8316c63510872d03cae99842bf96e2ab6c9 SHA512 d643f681da6c8c108ea2368a6f27c20d91f6175530182c057b660a54e4ea33b7fbf1a829777dd6d6984f61fc7dfe6a1b544b868a5d2f664e4621e22da7b981a9 WHIRLPOOL 0d183531aff77bdadba9c1072408af6c21ab727afcbbfefc63c030642b73eba205e7714ce8c14b67ff2d171ec71a92767d3d9afb8400034625b763174b8a7fe0
diff --git a/net-misc/python-x2go/metadata.xml b/net-misc/python-x2go/metadata.xml
new file mode 100644
index 000000000000..710937bd9d58
--- /dev/null
+++ b/net-misc/python-x2go/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>nx</herd>
+ <longdescription>
+The Python X2Go module integrates X2Go client support into your python programmes.
+Python X2Go is used in the headless X2Go client "pyhoca-cli" and by the tiny systray GUI applet "pyhoca-gui"
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/python-x2go/python-x2go-0.5.0.3.ebuild b/net-misc/python-x2go/python-x2go-0.5.0.3.ebuild
new file mode 100644
index 000000000000..d6010aff42b5
--- /dev/null
+++ b/net-misc/python-x2go/python-x2go-0.5.0.3.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit distutils-r1
+
+DESCRIPTION="X2Go client-side Python API"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# TODO: minimal USE flag in net-misc/nx, we only need nxproxy/nxcomp
+DEPEND="dev-python/gevent[${PYTHON_USEDEP}]
+ dev-python/paramiko[${PYTHON_USEDEP}]
+ dev-python/python-xlib[${PYTHON_USEDEP}]
+ net-misc/nx"
+RDEPEND="${DEPEND}"
diff --git a/net-misc/python-x2go/python-x2go-0.5.0.4.ebuild b/net-misc/python-x2go/python-x2go-0.5.0.4.ebuild
new file mode 100644
index 000000000000..d6010aff42b5
--- /dev/null
+++ b/net-misc/python-x2go/python-x2go-0.5.0.4.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit distutils-r1
+
+DESCRIPTION="X2Go client-side Python API"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# TODO: minimal USE flag in net-misc/nx, we only need nxproxy/nxcomp
+DEPEND="dev-python/gevent[${PYTHON_USEDEP}]
+ dev-python/paramiko[${PYTHON_USEDEP}]
+ dev-python/python-xlib[${PYTHON_USEDEP}]
+ net-misc/nx"
+RDEPEND="${DEPEND}"
diff --git a/net-misc/pytvshows/Manifest b/net-misc/pytvshows/Manifest
new file mode 100644
index 000000000000..1063144c131d
--- /dev/null
+++ b/net-misc/pytvshows/Manifest
@@ -0,0 +1 @@
+DIST pytvshows-0.2.tar.gz 14156 SHA256 f5714373bedf466313f99ac8bc184c27d824160e0b8ba359c5b7aaa6d2a735d3 SHA512 c4acd9b968dba7af1c787f9a3f5db4986ffbc52bfc43a4b7101070f8e91e80e78be0e59c4a4fbd873e64a6c4862e64abed2396c7140e9165d72e7d3cea267d5f WHIRLPOOL cfa80afa8d0963283b6b2bc054fe95e07e6ae5704f2a137262b3e27c412037d0500728c8f696cb5b609bae3a9a73a69ec57039e544e725f45a381686e747b5f3
diff --git a/net-misc/pytvshows/files/pytvshows-0.2-ezrss.it.patch b/net-misc/pytvshows/files/pytvshows-0.2-ezrss.it.patch
new file mode 100644
index 000000000000..d72a35ffa152
--- /dev/null
+++ b/net-misc/pytvshows/files/pytvshows-0.2-ezrss.it.patch
@@ -0,0 +1,30 @@
+This patch simply alters the feed site since txrss.net was closed/shut down.
+Luckily, ezrss.it expects the same arguments and should generally work. You can
+find similar details at:
+http://sourceforge.net/projects/pytvshows/forums/forum/726961/topic/3309243?message=7544190
+
+Yes, this could have been accomplished via the --feed paramater, but this is
+more user friendly.
+
+--- pytvshows.orig 2009-09-15 22:36:34.575002779 -0500
++++ pytvshows 2009-09-15 22:43:18.283754081 -0500
+@@ -59,7 +59,7 @@
+ -cFILE, --config FILE
+ Path to config file. Default: ~/.pytvshows.cfg
+ -fFEED, --feed=FEED
+- Override the tvrss.net feed. %%s is replaced with the
++ Override the ezrss.it feed. %%s is replaced with the
+ exact show name.
+ -h, --help This help message
+ -oDIR, --output_dir=DIR
+@@ -77,8 +77,8 @@
+ commands = ['update', 'subscribe', 'unsubscribe', 'run']
+ config = {
+ 'config_file': os.path.expanduser("~/.pytvshows.cfg"),
+- 'feed': "http://tvrss.net/search/index.php?show_name=%s&show_name_exact" \
+- "=true&mode=rss",
++ 'feed': "http://www.ezrss.it/search/index.php?show_name=%s" \
++ "&show_name_exact=true&mode=rss",
+ 'output_dir': os.path.expanduser("~/"),
+ 'output_dir2': None,
+ 'quality_matches': {
diff --git a/net-misc/pytvshows/files/pytvshows-0.2-feedurl.patch b/net-misc/pytvshows/files/pytvshows-0.2-feedurl.patch
new file mode 100644
index 000000000000..db01c5193258
--- /dev/null
+++ b/net-misc/pytvshows/files/pytvshows-0.2-feedurl.patch
@@ -0,0 +1,279 @@
+David Reitz writes:
+
+I created this so that I could specify a feedurl parameter in the config file,
+which allows me to use the public RSS feeds at showRSS (http://showrss.karmorra.info/).
+This patch will ONLY work for seasonepisode. I made no modifications for other types.
+
+Simply apply this patch and then modify your config like so:
+
+[Weeds]
+feedurl = http://showrss.karmorra.info/feeds/68.rss
+episode = 4
+season = 5
+show_type = seasonepisode
+human_name = Weeds
+
+http://sourceforge.net/tracker/index.php?func=detail&aid=2818315&group_id=203642&atid=986413
+
+--- pytvshows.orig 2009-06-20 15:46:23.000000000 -0400
++++ pytvshows 2009-07-07 20:41:39.000000000 -0400
+@@ -83,11 +83,14 @@ config = {
+ 'output_dir2': None,
+ 'quality_matches': {
+ "[HD": 1,
++ "HDTV": 1,
+ "[DSRIP": 1,
+ "[TVRIP": 1,
+ "[PDTV": 1,
+ "[DVD": 1,
+ "[HR": 2,
++ "720p": 3,
++ "720P": 3,
+ "[720p": 3,
+ "[720P": 3,
+ },
+@@ -189,6 +192,7 @@ class Show(object):
+ self.show_type = args['show_type']
+ self.season = args['season']
+ self.episode = args['episode']
++ self.feedurl = args['feedurl']
+ #YYYY-MM-DD HH:MM:SS
+ if args['date']:
+ self.date = datetime.datetime(*(time.strptime(
+@@ -290,7 +294,10 @@ class Show(object):
+
+ def _get_rss_feed(self):
+ """Gets the feedparser object."""
+- url = config['feed'] % self.exact_name
++ if self.feedurl:
++ url = self.feedurl
++ else:
++ url = config['feed'] % self.exact_name
+ if config['verbose']:
+ print "Downloading and processing %s..." % url
+ r = feedparser.parse(url)
+@@ -335,50 +342,21 @@ class Show(object):
+ if not self.rss:
+ return False
+ episodes = {}
+- for episode in self.rss['entries']:
+- if self.show_type == 'seasonepisode':
+- r = re.compile('Season\s*: ([0-9]*?);')
+- season_match = r.search(episode.description)
+- r = re.compile('Episode\s*:\ ([0-9]*?)$')
+- episode_match = r.search(episode.description)
+- if not season_match or not episode_match:
+- # This might be a special with a title
+- r = re.compile('Show\s*Title\s*:\s*(.*?);')
+- title_match = r.search(episode.description)
+- if title_match and title_match.group(1) != 'n/a' \
+- and title_match.group(1) != '':
+- title = title_match.group(1)
+- if config["verbose"]:
+- print "Found episode with title %s and no " \
+- "season or episode in seasonepisode show." % title
+- quality = 0
+- for key, value in config["quality_matches"].items():
+- if key in episode.title:
+- quality = value
+- break
+- date = datetime.datetime(* episode.updated_parsed[:6])
+- obj = EpisodeWithTitle(
+- self,
+- episode.link,
+- date,
+- title,
+- quality)
+- last_key = 0
+- for key in episodes.keys():
+- if key[0] == 0 and key[1] > last_key:
+- last_key = key[1]
+- episodes[0, last_key] = [obj]
+- elif not self.ignoremissingdetails:
+- print >> warn, 'W: Could not match season and/or ' \
+- 'episode in %s' % episode.description
+- else:
++ # we've defined a feedurl in the config file...
++ if self.feedurl:
++ for episode in self.rss['entries']:
++ if self.show_type == 'seasonepisode':
++ r = re.compile('S([0-9]+)E([0-9]+)')
++ match = r.search( episode.title )
++ season_num = int(match.group(1))
++ episode_num = int(match.group(2))
++ if config["verbose"]:
++ print "Found Show: Season %i, Episode %i" % (season_num, episode_num)
+ quality = 0
+ for key, value in config["quality_matches"].items():
+ if key in episode.title:
+ quality = value
+ break
+- season_num = int(season_match.group(1))
+- episode_num = int(episode_match.group(1))
+ if season_num != 0 and episode_num != 0:
+ obj = EpisodeWithSeasonAndEpisode(
+ self,
+@@ -394,57 +372,117 @@ class Show(object):
+ elif config['verbose']:
+ print 'Season or episode number is 0 in %s' \
+ % episode.description
+- elif self.show_type == 'date':
+- r = re.compile('Episode\s*Date:\s*([0-9\-]+)$')
+- date_match = r.search(episode.description)
+- if not date_match:
+- if not self.ignoremissingdetails:
+- print >>warn, 'W: Could not match date in %s' % \
+- episode.description
+- else:
++ else:
++ for episode in self.rss['entries']:
++ if self.show_type == 'seasonepisode':
++ r = re.compile('Season\s*: ([0-9]*?);')
++ season_match = r.search(episode.description)
++ r = re.compile('Episode\s*:\ ([0-9]*?)$')
++ episode_match = r.search(episode.description)
++ if not season_match or not episode_match:
++ # This might be a special with a title
++ r = re.compile('Show\s*Title\s*:\s*(.*?);')
++ title_match = r.search(episode.description)
++ if title_match and title_match.group(1) != 'n/a' \
++ and title_match.group(1) != '':
++ title = title_match.group(1)
++ if config["verbose"]:
++ print "Found episode with title %s and no " \
++ "season or episode in seasonepisode show." % title
++ quality = 0
++ for key, value in config["quality_matches"].items():
++ if key in episode.title:
++ quality = value
++ break
++ date = datetime.datetime(* episode.updated_parsed[:6])
++ obj = EpisodeWithTitle(
++ self,
++ episode.link,
++ date,
++ title,
++ quality)
++ last_key = 0
++ for key in episodes.keys():
++ if key[0] == 0 and key[1] > last_key:
++ last_key = key[1]
++ episodes[0, last_key] = [obj]
++ elif not self.ignoremissingdetails:
++ print >> warn, 'W: Could not match season and/or ' \
++ 'episode in %s' % episode.description
++ else:
++ quality = 0
++ for key, value in config["quality_matches"].items():
++ if key in episode.title:
++ quality = value
++ break
++ season_num = int(season_match.group(1))
++ episode_num = int(episode_match.group(1))
++ if season_num != 0 and episode_num != 0:
++ obj = EpisodeWithSeasonAndEpisode(
++ self,
++ episode.link,
++ datetime.datetime(* episode.updated_parsed[:6]),
++ season_num,
++ episode_num,
++ quality)
++ try:
++ episodes[season_num, episode_num].append(obj)
++ except KeyError:
++ episodes[season_num, episode_num] = [obj]
++ elif config['verbose']:
++ print 'Season or episode number is 0 in %s' \
++ % episode.description
++ elif self.show_type == 'date':
++ r = re.compile('Episode\s*Date:\s*([0-9\-]+)$')
++ date_match = r.search(episode.description)
++ if not date_match:
++ if not self.ignoremissingdetails:
++ print >>warn, 'W: Could not match date in %s' % \
++ episode.description
++ else:
++ quality = 0
++ for key, value in config["quality_matches"].items():
++ if key in episode.title:
++ quality = value
++ break
++ date = datetime.datetime(*(time.strptime(
++ date_match.group(1), "%Y-%m-%d")[0:6])).date()
++ obj = EpisodeWithDate(
++ self,
++ episode.link,
++ datetime.datetime(* episode.updated_parsed[:6]),
++ date,
++ quality)
++ try:
++ episodes[date].append(obj)
++ except KeyError:
++ episodes[date] = [obj]
++ elif self.show_type == 'time':
++ r = re.compile('Show\s*Title\s*:\s*(.*?);')
++ title_match = r.search(episode.description)
++ if not title_match:
++ if not self.ignoremissingdetails:
++ print >>warn, 'W: Could not match title in %s' % \
++ episode.description
++ title = ""
++ else:
++ title = title_match.group(1)
+ quality = 0
+ for key, value in config["quality_matches"].items():
+ if key in episode.title:
+ quality = value
+ break
+- date = datetime.datetime(*(time.strptime(
+- date_match.group(1), "%Y-%m-%d")[0:6])).date()
+- obj = EpisodeWithDate(
++ date = datetime.datetime(* episode.updated_parsed[:6])
++ obj = EpisodeWithTitle(
+ self,
+ episode.link,
+- datetime.datetime(* episode.updated_parsed[:6]),
+ date,
++ title,
+ quality)
+ try:
+ episodes[date].append(obj)
+ except KeyError:
+ episodes[date] = [obj]
+- elif self.show_type == 'time':
+- r = re.compile('Show\s*Title\s*:\s*(.*?);')
+- title_match = r.search(episode.description)
+- if not title_match:
+- if not self.ignoremissingdetails:
+- print >>warn, 'W: Could not match title in %s' % \
+- episode.description
+- title = ""
+- else:
+- title = title_match.group(1)
+- quality = 0
+- for key, value in config["quality_matches"].items():
+- if key in episode.title:
+- quality = value
+- break
+- date = datetime.datetime(* episode.updated_parsed[:6])
+- obj = EpisodeWithTitle(
+- self,
+- episode.link,
+- date,
+- title,
+- quality)
+- try:
+- episodes[date].append(obj)
+- except KeyError:
+- episodes[date] = [obj]
+ self.episodes = episodes
+ return episodes
+
+@@ -597,6 +635,7 @@ def main(argv=None):
+ 'date': None,
+ 'time': None,
+ 'ignoremissingdetails': False,
++ 'feedurl': None,
+ }
+ for key in args.keys():
+ if f.has_option(exact_name, key):
diff --git a/net-misc/pytvshows/files/pytvshows-0.2-improved-re.patch b/net-misc/pytvshows/files/pytvshows-0.2-improved-re.patch
new file mode 100644
index 000000000000..fbd316a5c3c2
--- /dev/null
+++ b/net-misc/pytvshows/files/pytvshows-0.2-improved-re.patch
@@ -0,0 +1,15 @@
+Improved regular expression for matching season and episode; see
+http://sourceforge.net/tracker/index.php?func=detail&aid=2818315&group_id=203642&atid=986413
+
+--- pytvshows.orig 2011-08-17 23:20:16.000000000 +0200
++++ pytvshows 2011-08-17 23:22:30.000000000 +0200
+@@ -346,7 +346,8 @@
+ if self.feedurl:
+ for episode in self.rss['entries']:
+ if self.show_type == 'seasonepisode':
+- r = re.compile('S([0-9]+)E([0-9]+)')
++ #r = re.compile('S([0-9]+)E([0-9]+)')
++ r = re.compile(r'\bS?([0-9]{1,2})\s*(?:E|x)?\s*([0-9]{1,2})\b')
+ match = r.search( episode.title )
+ season_num = int(match.group(1))
+ episode_num = int(match.group(2))
diff --git a/net-misc/pytvshows/metadata.xml b/net-misc/pytvshows/metadata.xml
new file mode 100644
index 000000000000..67f1fb4b8163
--- /dev/null
+++ b/net-misc/pytvshows/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">pytvshows</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/pytvshows/pytvshows-0.2-r1.ebuild b/net-misc/pytvshows/pytvshows-0.2-r1.ebuild
new file mode 100644
index 000000000000..a21136afced6
--- /dev/null
+++ b/net-misc/pytvshows/pytvshows-0.2-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+PYTHON_DEPEND="2"
+
+inherit distutils eutils
+
+DESCRIPTION="downloads torrents for TV shows from RSS feeds provided by ezrss.it"
+HOMEPAGE="http://sourceforge.net/projects/pytvshows/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="dev-python/feedparser"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ distutils_src_prepare
+ epatch "${FILESDIR}/${P}-ezrss.it.patch"
+ epatch "${FILESDIR}/${P}-feedurl.patch"
+ epatch "${FILESDIR}/${P}-improved-re.patch"
+ python_convert_shebangs -r 2 .
+}
diff --git a/net-misc/pytvshows/pytvshows-0.2-r2.ebuild b/net-misc/pytvshows/pytvshows-0.2-r2.ebuild
new file mode 100644
index 000000000000..7f86545d0ba2
--- /dev/null
+++ b/net-misc/pytvshows/pytvshows-0.2-r2.ebuild
@@ -0,0 +1,30 @@
+# 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="downloads torrents for TV shows from RSS feeds provided by ezrss.it"
+HOMEPAGE="http://sourceforge.net/projects/pytvshows/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="dev-python/feedparser[${PYTHON_USEDEP}]"
+
+PATCHES=( "${FILESDIR}/${P}-ezrss.it.patch"
+ "${FILESDIR}/${P}-feedurl.patch"
+ "${FILESDIR}/${P}-improved-re.patch" )
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
diff --git a/net-misc/qtm/Manifest b/net-misc/qtm/Manifest
new file mode 100644
index 000000000000..e777a912beb3
--- /dev/null
+++ b/net-misc/qtm/Manifest
@@ -0,0 +1 @@
+DIST qtm-1.3.17.tar.bz2 185310 SHA256 c5cab3e1386e1f7b49cc6711252b1e311a0872e1888b8bdfebaeecf61b52cc85 SHA512 b01568cec8e1550caf06958f196c1d3558511b6dbb32209ae83c4aa401f55fbeff093431103b52aa7ffba903afebd32906008c0c021565df478c2281010d921a WHIRLPOOL a95f1a37df357360594fb19b603ded8654ed086b4b8b65649fb3f739c4dc96079c7b88e31f8a053d722448574cddc11f32626afc8d4e7f7e7460512cb42ca291
diff --git a/net-misc/qtm/metadata.xml b/net-misc/qtm/metadata.xml
new file mode 100644
index 000000000000..a796a4ea0f0e
--- /dev/null
+++ b/net-misc/qtm/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>qt</herd>
+ <maintainer>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">catkin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/qtm/qtm-1.3.17.ebuild b/net-misc/qtm/qtm-1.3.17.ebuild
new file mode 100644
index 000000000000..5794a4934822
--- /dev/null
+++ b/net-misc/qtm/qtm-1.3.17.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+CMAKE_IN_SOURCE_BUILD="1"
+inherit cmake-utils
+
+DESCRIPTION="Qt4 blogging client"
+HOMEPAGE="http://qtm.blogistan.co.uk"
+SRC_URI="mirror://sourceforge/catkin/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="dbus debug ssl"
+RESTRICT="strip"
+
+RDEPEND="dev-qt/qtgui:4
+ dbus? ( dev-qt/qtdbus:4 )
+ x11-proto/xproto
+ dev-lang/perl
+ virtual/perl-Digest-MD5"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( Changelog README )
+
+src_prepare() {
+ # bug 463810
+ sed -i -e '/Categories/s/Application;//' qtm-desktop.sh || die 'sed on qtm-desktop.sh failed'
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs="-DDONT_USE_PTE=FALSE -DINSTALL_MARKDOWN=TRUE
+ $(cmake-utils_use debug QDEBUG)
+ $(cmake-utils_use ssl)"
+ ! use dbus && mycmakeargs="${mycmakeargs} -DDONT_USE_DBUS=TRUE"
+ cmake-utils_src_configure
+}
diff --git a/net-misc/quagga/Manifest b/net-misc/quagga/Manifest
new file mode 100644
index 000000000000..72daf29431ba
--- /dev/null
+++ b/net-misc/quagga/Manifest
@@ -0,0 +1,3 @@
+DIST ht-20040304-classless-bgp.patch 1581 SHA256 39993890f9e31d662ed0564c732fb22392a901beb45b64261ffeadd9edf27887 SHA512 3df102d8ab88aaee1f109a2310602d6f734f2268252e5e42df752df7db7abeac526e969289481c4abfe905dcd41c35dee65196c48ac320fe9d083305451476e8 WHIRLPOOL cef99d64d52ab8c28bd672fb93dfbd8d716a31c76a5403496a6d104a5ff39531d6085134124d41fe4ff7adf895fa001cbe77b6e42846d849d6c108c81583d04e
+DIST quagga-0.99.23.1.tar.xz 1682104 SHA256 202e8b7fbec810f28a84e3fbb6aafdaf08a3b51527c258807abc8a74ed617eb8 SHA512 7a222d4a5aa41deeb233f2e9ce922e5c29787c2f74c1b99177089e3183b69d3c0e4db5846676485a1990b728e007e687070ba4cecab67aa61f8be6c0851581cc WHIRLPOOL 90e37fcb1b87ec1ea618d42c19a1350f84ffe87f2cd4e6e4629a9e7edef1ba792a8f287b3367b31eb6f2d387e6c287da47a69c5cacf0a76be8099c1f79878888
+DIST quagga-0.99.24.1.tar.xz 1779120 SHA256 6fd6baadb136a801c29c1dd72d0fe69da9f19ae498e87bff7057778361e43b14 SHA512 71c340ce0f4e52c69892d8fed82d30956161b09b029fb0a82ba774664aa2303b493068664ea057870bec3c7c2a1ffea0a68fba0c400d6868efef691d7b055d2a WHIRLPOOL e7b4fd86561513b08244a5217821cc7d911b077eccd4c798484a4b13b4acabba133c664a463a7b2261e6e5e1bf3e2d37de9d2b6005a18e004e526f741a22bd9a
diff --git a/net-misc/quagga/files/quagga-0.99.22.4-ipctl-forwarding.patch b/net-misc/quagga/files/quagga-0.99.22.4-ipctl-forwarding.patch
new file mode 100644
index 000000000000..f6b726b591f7
--- /dev/null
+++ b/net-misc/quagga/files/quagga-0.99.22.4-ipctl-forwarding.patch
@@ -0,0 +1,22 @@
+Fix for missing definitions on some Hardened configurations
+Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=437292
+
+diff -Naur quagga-0.99.16.orig/zebra/ipforward_sysctl.c quagga-0.99.16/zebra/ipforward_sysctl.c
+--- quagga-0.99.16.orig/zebra/ipforward_sysctl.c 2010-03-11 12:11:32.000000000 -0500
++++ quagga-0.99.16/zebra/ipforward_sysctl.c 2010-03-11 12:11:39.000000000 -0500
+@@ -31,6 +31,15 @@
+
+ #define MIB_SIZ 4
+
++/* Fix for recent (2.6.14) kernel headers */
++#ifndef IPCTL_FORWARDING
++ #define IPCTL_FORWARDING NET_IPV4_FORWARD
++#endif
++
++#ifndef IP6CTL_FORWARDING
++ #define IP6CTL_FORWARDING NET_IPV6_FORWARDING
++#endif
++
+ extern struct zebra_privs_t zserv_privs;
+
+ /* IPv4 forwarding control MIB. */
diff --git a/net-misc/quagga/files/quagga-services.init.3 b/net-misc/quagga/files/quagga-services.init.3
new file mode 100644
index 000000000000..88255a5e99f1
--- /dev/null
+++ b/net-misc/quagga/files/quagga-services.init.3
@@ -0,0 +1,44 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+: ${CFGFILE:=/etc/quagga/${SVCNAME}.conf}
+
+pidfile=/run/quagga/${SVCNAME}.pid
+
+command=/usr/sbin/${SVCNAME}
+command_args="-d -f ${CFGFILE} ${EXTRA_OPTS} --pid_file ${pidfile}"
+
+get_service_config() {
+ [ -e "$CFGFILE" ] || return
+
+ awk '$1 == "'$1'" { s=$2 } END { print s }' "$CFGFILE"
+}
+
+depend() {
+ config "$CFGFILE"
+
+ [ ${SVCNAME} = "zebra" ] && need net || need zebra
+
+ [ "$(get_service_config log)" = "syslog" ] && \
+ use logger
+}
+
+start_pre() {
+ if [ ! -e "${CFGFILE}" ] ; then
+ eerror "Before starting ${SVCNAME} you have to configure it, by creating"
+ eerror "a ${CFGFILE} file."
+ eerror ""
+ eerror "A sample file has been installed in `echo /usr/share/doc/quagga-*/samples/${SVCNAME}.conf.sample*`"
+ return 1
+ fi
+
+ checkpath -d -m 0750 -o quagga:quagga /run/quagga
+
+ if [ ${SVCNAME} = "zebra" ]; then
+ ebegin "Cleaning up stale zebra routes..."
+ ip route flush proto zebra
+ eend $?
+ fi
+}
diff --git a/net-misc/quagga/files/quagga.pam b/net-misc/quagga/files/quagga.pam
new file mode 100644
index 000000000000..9a91ad852fbd
--- /dev/null
+++ b/net-misc/quagga/files/quagga.pam
@@ -0,0 +1,26 @@
+#%PAM-1.0
+#
+
+##### if running quagga as root:
+# Only allow root (and possibly wheel) to use this because enable access
+# is unrestricted.
+auth sufficient pam_rootok.so
+
+# Uncomment the following line to implicitly trust users in the "wheel" group.
+#auth sufficient pam_wheel.so trust use_uid
+# Uncomment the following line to require a user to be in the "wheel" group.
+#auth required pam_wheel.so use_uid
+###########################################################
+
+# If using quagga privileges and with a seperate group for vty access, then
+# access can be controlled via the vty access group, and pam can simply
+# check for valid user/password, eg:
+#
+# only allow local users.
+#auth required pam_securetty.so
+#auth include system-auth
+#auth required pam_nologin.so
+#account include system-auth
+#password include system-auth
+#session include system-auth
+#session optional pam_console.so
diff --git a/net-misc/quagga/files/systemd/babeld.service b/net-misc/quagga/files/systemd/babeld.service
new file mode 100644
index 000000000000..aa107afcacc1
--- /dev/null
+++ b/net-misc/quagga/files/systemd/babeld.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Babel routing daemon
+Documentation=man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/babeld.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/babeld.pid
+ExecStart=/usr/sbin/babeld -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/quagga/files/systemd/bgpd.service b/net-misc/quagga/files/systemd/bgpd.service
new file mode 100644
index 000000000000..aae58be2c95e
--- /dev/null
+++ b/net-misc/quagga/files/systemd/bgpd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=BGP routing daemon
+Documentation=man:bgpd(8) man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/bgpd.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/bgpd.pid
+ExecStart=/usr/sbin/bgpd -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/quagga/files/systemd/isisd.service b/net-misc/quagga/files/systemd/isisd.service
new file mode 100644
index 000000000000..fa5a716e8331
--- /dev/null
+++ b/net-misc/quagga/files/systemd/isisd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=IS-IS routing daemon
+Documentation=man:isis(8) man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/isisd.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/isisd.pid
+ExecStart=/usr/sbin/isisd -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/quagga/files/systemd/ospf6d.service b/net-misc/quagga/files/systemd/ospf6d.service
new file mode 100644
index 000000000000..eacb89159406
--- /dev/null
+++ b/net-misc/quagga/files/systemd/ospf6d.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=OSPF routing daemon for IPv6
+Documentation=man:ospfd(8) man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/ospf6d.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/ospf6d.pid
+ExecStart=/usr/sbin/ospf6d -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/quagga/files/systemd/ospfd.service b/net-misc/quagga/files/systemd/ospfd.service
new file mode 100644
index 000000000000..57a946f8e0c1
--- /dev/null
+++ b/net-misc/quagga/files/systemd/ospfd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=OSPF routing daemon
+Documentation=man:ospfd(8) man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/ospfd.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/ospfd.pid
+ExecStart=/usr/sbin/ospfd -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/quagga/files/systemd/pimd.service b/net-misc/quagga/files/systemd/pimd.service
new file mode 100644
index 000000000000..65ef1bf2dd42
--- /dev/null
+++ b/net-misc/quagga/files/systemd/pimd.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=PIM-SSM routing daemon
+Documentation=man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/pimd.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/pimd.pid
+ExecStart=/usr/sbin/pimd -d
+ExecReload=/bin/kill -HUP $MAINPID
+SuccessExitStatus=1
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/quagga/files/systemd/quagga.conf b/net-misc/quagga/files/systemd/quagga.conf
new file mode 100644
index 000000000000..296083753e0a
--- /dev/null
+++ b/net-misc/quagga/files/systemd/quagga.conf
@@ -0,0 +1 @@
+d /run/quagga 0750 quagga quagga
diff --git a/net-misc/quagga/files/systemd/ripd.service b/net-misc/quagga/files/systemd/ripd.service
new file mode 100644
index 000000000000..bf7c5ac6fe20
--- /dev/null
+++ b/net-misc/quagga/files/systemd/ripd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=RIP routing daemon
+Documentation=man:ripd(8) man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/ripd.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/ripd.pid
+ExecStart=/usr/sbin/ripd -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/quagga/files/systemd/ripngd.service b/net-misc/quagga/files/systemd/ripngd.service
new file mode 100644
index 000000000000..465263ba33ff
--- /dev/null
+++ b/net-misc/quagga/files/systemd/ripngd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=RIP routing daemon for IPv6
+Documentation=man:ripngd(8) man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/ripngd.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/ripngd.pid
+ExecStart=/usr/sbin/ripngd -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/quagga/files/systemd/zebra.service b/net-misc/quagga/files/systemd/zebra.service
new file mode 100644
index 000000000000..d2374411b459
--- /dev/null
+++ b/net-misc/quagga/files/systemd/zebra.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=GNU Zebra routing manager
+Documentation=man:zebra(8)
+After=network.target
+ConditionPathExists=/etc/quagga/zebra.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/zebra.pid
+ExecStartPre=/bin/ip route flush proto zebra
+ExecStart=/usr/sbin/zebra -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/quagga/metadata.xml b/net-misc/quagga/metadata.xml
new file mode 100644
index 000000000000..8a4fab8dcb40
--- /dev/null
+++ b/net-misc/quagga/metadata.xml
@@ -0,0 +1,44 @@
+<?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>
+ Quagga is a modern fork of Zebra. Quagga is a routing software package that provides TCP/IP
+ based routing services with routing protocols support such as RIPv1, RIPv2, RIPng, OSPFv2,
+ OSPFv3, BGP-4, and BGP-4+. Quagga also supports special BGP Route Reflector and Route Server
+ behavior. In addition to traditional IPv4 routing protocols, Quagga also supports IPv6 routing
+ protocols. With SNMP daemon which supports SMUX protocol, Quagga provides routing protocol
+ MIBs. Furthermore Quagga supports OSPFAPI, a API interface to the OSPF LSDB. It supports
+ inspection as well as injection of normal and opaque OSPF LSAs. Applications like SRRD - The
+ Service Rounting Redundancy Daemon - can make use of OSPFAPI to inject opaque data into the OSPF
+ routing domain. SRRD, for example, implements a cluster server by using the OSPFAPI to flood
+ service state information into the routing domain
+ </longdescription>
+ <use>
+ <flag name="bgpclassless">
+ Apply unofficial patch to enable classless prefixes for BGP. Patch and information to be found
+ at http://hasso.linux.ee/doku.php/english:network:quagga
+ </flag>
+ <flag name="multipath">
+ Enable multipath routes support for any number of routes
+ </flag>
+ <flag name="ospfapi">
+ Enable OSPFAPI support for client applications accessing the OSPF link state database
+ </flag>
+ <flag name="tcp-zebra">
+ Enable TCP zserv interface on port 2600 for Zebra/protocol-daemon communication. Unix domain
+ sockets are chosen otherwise
+ </flag>
+ <flag name="readline">
+ Enable support for <pkg>sys-libs/readline</pkg> to provide the Quagga Virtual Terminal
+ Interface Shell (vtysh)
+ </flag>
+ <flag name="pam">
+ Add support for PAM (via <pkg>sys-libs/pam</pkg>) to the Quagga Virtual Terminal Interface
+ Shell (vtysh); if the readline USE flag is disabled, this flag is ignored
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/quagga/quagga-0.99.23.1.ebuild b/net-misc/quagga/quagga-0.99.23.1.ebuild
new file mode 100644
index 000000000000..278ca25d99bb
--- /dev/null
+++ b/net-misc/quagga/quagga-0.99.23.1.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+CLASSLESS_BGP_PATCH=ht-20040304-classless-bgp.patch
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils eutils flag-o-matic multilib pam readme.gentoo user
+
+DESCRIPTION="A free routing daemon replacing Zebra supporting RIP, OSPF and BGP"
+HOMEPAGE="http://quagga.net/"
+SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz
+ bgpclassless? ( http://hasso.linux.ee/stuff/patches/quagga/${CLASSLESS_BGP_PATCH} )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ppc ~s390 sparc x86"
+IUSE="bgpclassless caps doc elibc_glibc ipv6 multipath ospfapi pam +readline snmp tcp-zebra"
+
+COMMON_DEPEND="
+ caps? ( sys-libs/libcap )
+ snmp? ( net-analyzer/net-snmp )
+ readline? (
+ sys-libs/readline
+ pam? ( sys-libs/pam )
+ )
+ !elibc_glibc? ( dev-libs/libpcre )"
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ sys-apps/gawk
+ sys-devel/libtool:2"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/iproute2"
+
+PATCHES=( "${FILESDIR}/${PN}-0.99.22.4-ipctl-forwarding.patch" )
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="Sample configuration files can be found in /usr/share/doc/${PF}/samples
+You have to create config files in /etc/quagga before
+starting one of the daemons.
+
+You can pass additional options to the daemon by setting the EXTRA_OPTS
+variable in their respective file in /etc/conf.d"
+
+pkg_setup() {
+ enewgroup quagga
+ enewuser quagga -1 -1 /var/empty quagga
+}
+
+src_prepare() {
+ # Classless prefixes for BGP
+ # http://hasso.linux.ee/doku.php/english:network:quagga
+ use bgpclassless && epatch "${DISTDIR}/${CLASSLESS_BGP_PATCH}"
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+
+ # do not build PDF docs
+ export ac_cv_prog_PDFLATEX=no
+ export ac_cv_prog_LATEXMK=no
+
+ local myeconfargs=(
+ --enable-exampledir=/usr/share/doc/${PF}/samples
+ --enable-isisd --enable-isis-topology
+ --enable-user=quagga
+ --enable-group=quagga
+ --enable-vty-group=quagga
+ --with-cflags="${CFLAGS}"
+ --with-pkg-extra-version="-gentoo"
+ --sysconfdir=/etc/quagga
+ --localstatedir=/run/quagga
+ --disable-static
+ --disable-pie
+ $(use_enable caps capabilities)
+ $(usex snmp '--enable-snmp' '' '' '')
+ $(use_enable !elibc_glibc pcreposix)
+ $(use_enable tcp-zebra)
+ $(use_enable doc)
+ $(usex multipath $(use_enable multipath) '' '=0' '')
+ $(usex ospfapi '--enable-opaque-lsa --enable-ospf-te --enable-ospfclient' '' '' '')
+ $(use_enable readline vtysh)
+ $(use_with pam libpam)
+ $(use_enable ipv6)
+ $(use_enable ipv6 babeld) # babeld does not build properly with USE="-ipv6", bug #446289
+ $(use_enable ipv6 ripngd)
+ $(use_enable ipv6 ospf6d)
+ $(use_enable ipv6 rtadv)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+ readme.gentoo_create_doc
+
+ keepdir /etc/quagga
+ fowners root:quagga /etc/quagga
+ fperms 0770 /etc/quagga
+
+ # install zebra as a file, symlink the rest
+ newinitd "${FILESDIR}"/quagga-services.init.3 zebra
+
+ for service in isisd ripd ospfd bgpd $(use ipv6 && echo babeld ospf6d ripngd); do
+ dosym zebra /etc/init.d/${service}
+ done
+
+ use readline && use pam && newpamd "${FILESDIR}/quagga.pam" quagga
+
+ insinto /etc/logrotate.d
+ newins redhat/quagga.logrotate quagga
+}
diff --git a/net-misc/quagga/quagga-0.99.24.1.ebuild b/net-misc/quagga/quagga-0.99.24.1.ebuild
new file mode 100644
index 000000000000..57e23b3d4c2a
--- /dev/null
+++ b/net-misc/quagga/quagga-0.99.24.1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+CLASSLESS_BGP_PATCH=ht-20040304-classless-bgp.patch
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils eutils flag-o-matic multilib pam readme.gentoo systemd user
+
+DESCRIPTION="A free routing daemon replacing Zebra supporting RIP, OSPF and BGP"
+HOMEPAGE="http://quagga.net/"
+SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz
+ bgpclassless? ( http://hasso.linux.ee/stuff/patches/quagga/${CLASSLESS_BGP_PATCH} )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~s390 ~sparc ~x86"
+IUSE="bgpclassless caps doc elibc_glibc ipv6 multipath ospfapi pam +readline snmp tcp-zebra"
+
+COMMON_DEPEND="
+ caps? ( sys-libs/libcap )
+ snmp? ( net-analyzer/net-snmp )
+ readline? (
+ sys-libs/readline:0
+ pam? ( sys-libs/pam )
+ )
+ !elibc_glibc? ( dev-libs/libpcre )"
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ sys-apps/gawk
+ sys-devel/libtool:2"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/iproute2"
+
+PATCHES=( "${FILESDIR}/${PN}-0.99.22.4-ipctl-forwarding.patch" )
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="Sample configuration files can be found in /usr/share/doc/${PF}/samples
+You have to create config files in /etc/quagga before
+starting one of the daemons.
+
+You can pass additional options to the daemon by setting the EXTRA_OPTS
+variable in their respective file in /etc/conf.d"
+
+pkg_setup() {
+ enewgroup quagga
+ enewuser quagga -1 -1 /var/empty quagga
+}
+
+src_prepare() {
+ # Classless prefixes for BGP
+ # http://hasso.linux.ee/doku.php/english:network:quagga
+ use bgpclassless && epatch "${DISTDIR}/${CLASSLESS_BGP_PATCH}"
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+
+ # do not build PDF docs
+ export ac_cv_prog_PDFLATEX=no
+ export ac_cv_prog_LATEXMK=no
+
+ local myeconfargs=(
+ --enable-exampledir=/usr/share/doc/${PF}/samples
+ --enable-irdp
+ --enable-isisd --enable-isis-topology
+ --enable-pimd
+ --enable-user=quagga
+ --enable-group=quagga
+ --enable-vty-group=quagga
+ --with-cflags="${CFLAGS}"
+ --with-pkg-extra-version="-gentoo"
+ --sysconfdir=/etc/quagga
+ --localstatedir=/run/quagga
+ --disable-static
+ --disable-pie
+ $(use_enable caps capabilities)
+ $(usex snmp '--enable-snmp' '' '' '')
+ $(use_enable !elibc_glibc pcreposix)
+ $(use_enable tcp-zebra)
+ $(use_enable doc)
+ $(usex multipath $(use_enable multipath) '' '=0' '')
+ $(usex ospfapi '--enable-opaque-lsa --enable-ospf-te --enable-ospfclient' '' '' '')
+ $(use_enable readline vtysh)
+ $(use_with pam libpam)
+ $(use_enable ipv6 babeld) # babeld does not build properly with USE="-ipv6", bug #446289
+ $(use_enable ipv6 ripngd)
+ $(use_enable ipv6 ospf6d)
+ $(use_enable ipv6 rtadv)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+ readme.gentoo_create_doc
+
+ keepdir /etc/quagga
+ fowners root:quagga /etc/quagga
+ fperms 0770 /etc/quagga
+
+ # Install systemd-related stuff, bug #553136
+ systemd_dotmpfilesd "${FILESDIR}/systemd/quagga.conf"
+ systemd_dounit "${FILESDIR}/systemd/zebra.service"
+
+ # install zebra as a file, symlink the rest
+ newinitd "${FILESDIR}"/quagga-services.init.3 zebra
+
+ for service in bgpd isisd ospfd pimd ripd $(use ipv6 && echo babeld ospf6d ripngd); do
+ dosym zebra /etc/init.d/${service}
+ systemd_dounit "${FILESDIR}/systemd/${service}.service"
+ done
+
+ use readline && use pam && newpamd "${FILESDIR}/quagga.pam" quagga
+
+ insinto /etc/logrotate.d
+ newins redhat/quagga.logrotate quagga
+}
diff --git a/net-misc/quickshare/Manifest b/net-misc/quickshare/Manifest
new file mode 100644
index 000000000000..0e21fd53803e
--- /dev/null
+++ b/net-misc/quickshare/Manifest
@@ -0,0 +1 @@
+DIST quickshare-1.0-src.tar.gz 53371 RMD160 7df28faad0e8e113398ccedfaa30d7643b9ec96a SHA1 d1b77ad4fa08c9081e8ddbf917f0ccec0736c33c SHA256 67b8dbefdf764f381ec97e82727a511445db419c54304111dba19f440ce59238
diff --git a/net-misc/quickshare/metadata.xml b/net-misc/quickshare/metadata.xml
new file mode 100644
index 000000000000..1baa46d82420
--- /dev/null
+++ b/net-misc/quickshare/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>jdhore@gentoo.org</email>
+ <name>Jeff Horelick</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/quickshare/quickshare-1.0.ebuild b/net-misc/quickshare/quickshare-1.0.ebuild
new file mode 100644
index 000000000000..24759ce9ba44
--- /dev/null
+++ b/net-misc/quickshare/quickshare-1.0.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A simple HTTP server with a GUI which allows for easy sharing of files"
+HOMEPAGE="http://houbysoft.com/qs/"
+SRC_URI="http://houbysoft.com/download/${P}-src.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="net-libs/libmicrohttpd
+ x11-libs/gtk+:2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${P}-src
+
+src_prepare() {
+ sed -i \
+ -e 's:gcc ${LOPT}:$(CC) $(LDFLAGS):' \
+ -e 's:-o $@:-o $@ ${LOPT}:' \
+ -e 's:gcc:$(CC):' \
+ Makefile || die
+}
+
+src_compile() {
+ tc-export CC
+ emake COPT="${CFLAGS}"
+}
+
+src_install() {
+ dobin qs
+ dodoc README
+ insinto /usr/share/quickshare
+ doins {on,off}.png
+ make_desktop_entry qs QuickShare
+}
diff --git a/net-misc/r8168/Manifest b/net-misc/r8168/Manifest
new file mode 100644
index 000000000000..12270582f57b
--- /dev/null
+++ b/net-misc/r8168/Manifest
@@ -0,0 +1 @@
+DIST r8168-8.040.00.tar.bz2 87770 SHA256 da0444fcd7aabb7762310cdf2047fd0aeb7a9ed97a3d6b80d62a0fc71e0730bf SHA512 58ec8c1ff8742ad1ee0e2a0fa1141a8ace26cac954542b16325c0d9eba6113a2baaf4de2c61025a6fc6532eb17aa2e7645daee0fef539b219f863355c731d6d8 WHIRLPOOL 80ca19d49e03ca6d1b9524710511a3b632a13ec8045515c3264663a73394cede1e04d4cad2f8f1ea5d7a8b3ab9554c1bfaec7ae356bcdf397ba6d045123d314c
diff --git a/net-misc/r8168/metadata.xml b/net-misc/r8168/metadata.xml
new file mode 100644
index 000000000000..04c256fd0ebc
--- /dev/null
+++ b/net-misc/r8168/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>chewi@gentoo.org</email>
+ <name>James Le Cuirot</name>
+ </maintainer>
+ <longdescription>Official Realtek r8168 linux driver. The following cards are currently supported:
+RTL8111B RTL8168B RTL8111 RTL8168 RTL8111C RTL8111CP RTL8111D(L) RTL8168C
+RTL8111DP RTL8111E RTL8168E RTL8111F RTL8411</longdescription>
+</pkgmetadata>
diff --git a/net-misc/r8168/r8168-8.040.00.ebuild b/net-misc/r8168/r8168-8.040.00.ebuild
new file mode 100644
index 000000000000..8c60d0510d9f
--- /dev/null
+++ b/net-misc/r8168/r8168-8.040.00.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit linux-mod eutils
+
+DESCRIPTION="r8168 driver for Realtek 8111/8168 PCI-E NICs"
+HOMEPAGE="http://www.realtek.com.tw"
+SRC_URI="http://12244.wpc.azureedge.net/8012244/drivers/rtdrivers/cn/nic/0002-${P}.tar.bz2 -> ${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+KEYWORDS="amd64 x86"
+
+MODULE_NAMES="r8168(net:${S}/src)"
+BUILD_TARGETS="modules"
+CONFIG_CHECK="!R8169"
+
+ERROR_R8169="${P} requires Realtek 8169 PCI Gigabit Ethernet adapter (CONFIG_R8169) to be DISABLED"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+ BUILD_PARAMS="KERNELDIR=${KV_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+ dodoc README
+}
diff --git a/net-misc/rabbitmq-server/Manifest b/net-misc/rabbitmq-server/Manifest
new file mode 100644
index 000000000000..adee75b02ca5
--- /dev/null
+++ b/net-misc/rabbitmq-server/Manifest
@@ -0,0 +1,4 @@
+DIST rabbitmq-server-3.2.4.tar.gz 3588097 SHA256 a930f92b362df2f292ec5f0281aa2011eb0c668faf6e24c4653a9fc53ec43b9f SHA512 573fc9fa2956061f91dc093664d98b569157e4f6cfb0d772731d1de6b1f84dd713169b515e28ede3383ac3baabfb912679cd7f021786316d487afc8305cb3457 WHIRLPOOL abecf0a7aaf3ab6d39475ec7f032a4ddbb078f98bf68c5996816fe1bc4bb40fa2052396e782ea8d450b1268b0f1187c5638dcd71aa859b6578025a930a2cca73
+DIST rabbitmq-server-3.3.4.tar.gz 3499481 SHA256 741005b566178de0c0bb9782f6bbc5aa115cfb652b994538fa95904586d5d68e SHA512 c0b76b239fd4e1a80a2646c1d222f6155480a40bb04eaf1b78c1367a5953a36ec626e300399e2ab9478167dab464b1826ec5490167f2cbc14767fccdc4002015 WHIRLPOOL 18793c2dee1a82ba142bddac44d3c9b744d8faccd60c129730e1ec6dfa59b793a76b6508ee63073b89e7904ca74b0130a04e1778d96f373aa7d7a0d290278901
+DIST rabbitmq-server-3.5.1.tar.gz 3723354 SHA256 bda603b37ba933eab2b7fd9cdb9b138b793ad030cd5cb7824bc794754b76ca0d SHA512 866a6b6cb379ccbb958f758316d5c6b5139078bb061a3397b9ba29b9f306a795b158b0b8421d5c05d51add2188af9b5d8459b6218de4d44289d720b0c8bd28e2 WHIRLPOOL 826086270215dd284996b6cc65e6d756455809881a4e3c761fcd4dcad963b3bd0236062e8d10d34cad97daf249e9d7262f462d75e5a484ffee7dcd60f63e5f0c
+DIST rabbitmq-server-3.5.3.tar.gz 3727143 SHA256 45c797ac4f7a9d2ece54eafa537da05dc3e66e43d45b4825509fe47113844363 SHA512 fa6c92256286753eba5d0ad07d70eb99d416b8626f07e832972c61cc02066aa3856f7242f83c37bea20726e339e1cb859a88084bf246bb1e0e468e8e76c543e2 WHIRLPOOL 5bb2762bd1ad7ed2e241911b8f85c009e7b851ea4f678c3e644542c6af14243526d6fb0d8b0b00242cf89599de7c5a64a824a98556aaf651bd77b5cf1abddef3
diff --git a/net-misc/rabbitmq-server/files/rabbitmq-script-wrapper b/net-misc/rabbitmq-server/files/rabbitmq-script-wrapper
new file mode 100644
index 000000000000..23f3d75a42cf
--- /dev/null
+++ b/net-misc/rabbitmq-server/files/rabbitmq-script-wrapper
@@ -0,0 +1,54 @@
+#!/bin/sh
+## The contents of this file are subject to the Mozilla Public License
+## Version 1.1 (the "License"); you may not use this file except in
+## compliance with the License. You may obtain a copy of the License at
+## http://www.mozilla.org/MPL/
+##
+## Software distributed under the License is distributed on an "AS IS"
+## basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+## License for the specific language governing rights and limitations
+## under the License.
+##
+## The Original Code is RabbitMQ.
+##
+## The Initial Developers of the Original Code are LShift Ltd,
+## Cohesive Financial Technologies LLC, and Rabbit Technologies Ltd.
+##
+## Portions created before 22-Nov-2008 00:00:00 GMT by LShift Ltd,
+## Cohesive Financial Technologies LLC, or Rabbit Technologies Ltd
+## are Copyright (C) 2007-2008 LShift Ltd, Cohesive Financial
+## Technologies LLC, and Rabbit Technologies Ltd.
+##
+## Portions created by LShift Ltd are Copyright (C) 2007-2009 LShift
+## Ltd. Portions created by Cohesive Financial Technologies LLC are
+## Copyright (C) 2007-2009 Cohesive Financial Technologies
+## LLC. Portions created by Rabbit Technologies Ltd are Copyright
+## (C) 2007-2009 Rabbit Technologies Ltd.
+##
+## All Rights Reserved.
+##
+## Contributor(s): ______________________________________.
+##
+
+# Escape spaces and quotes, because shell is revolting.
+CMDLINE=""
+for arg in "$@" ; do
+ # Escape quotes in parameters, so that they're passed through cleanly.
+ arg=$(sed -e 's/"/\\"/g' <<-END
+ $arg
+ END
+ )
+ CMDLINE="${CMDLINE} \"${arg}\""
+done
+
+cd /var/lib/rabbitmq
+
+SCRIPT=`basename $0`
+
+if [ `id -u` = 0 ] ; then
+ su rabbitmq -s /bin/sh -c "/usr/libexec/rabbitmq/${SCRIPT} ${CMDLINE}"
+else
+ /usr/libexec/rabbitmq/${SCRIPT}
+ echo -e "\nOnly root should run ${SCRIPT}\n"
+ exit 1
+fi
diff --git a/net-misc/rabbitmq-server/files/rabbitmq-server.init-r3 b/net-misc/rabbitmq-server/files/rabbitmq-server.init-r3
new file mode 100755
index 000000000000..9e8c1c4873c2
--- /dev/null
+++ b/net-misc/rabbitmq-server/files/rabbitmq-server.init-r3
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+ use dns epmd
+}
+
+start() {
+ ebegin "Starting RabbitMQ"
+ /usr/sbin/rabbitmq-server -detached >> /var/log/rabbitmq/startup.log 2>> /var/log/rabbitmq/startup.err
+ /usr/sbin/rabbitmqctl status | sed -n 's/[^p]*pid,\([0-9]*\)[^0-9]*/\1/p' > /var/run/rabbitmq.pid
+ /usr/sbin/rabbitmqctl -q wait /var/run/rabbitmq.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping RabbitMQ"
+ /usr/sbin/rabbitmqctl stop /var/run/rabbitmq.pid >> /var/log/rabbitmq/shutdown.log 2>> /var/log/rabbitmq/shutdown.err
+ eend $?
+}
diff --git a/net-misc/rabbitmq-server/files/rabbitmq.service b/net-misc/rabbitmq-server/files/rabbitmq.service
new file mode 100644
index 000000000000..9264b406713f
--- /dev/null
+++ b/net-misc/rabbitmq-server/files/rabbitmq.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=RabbitMQ daemon
+
+[Service]
+Type=simple
+ExecStart=/usr/libexec/rabbitmq/rabbitmq-server
+ExecStop=/usr/libexec/rabbitmq/rabbitmqctl stop
+WorkingDirectory=/var/lib/rabbitmq
+User=rabbitmq
+Group=rabbitmq
+StandardOutput=syslog
+StandardError=syslog
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/rabbitmq-server/metadata.xml b/net-misc/rabbitmq-server/metadata.xml
new file mode 100644
index 000000000000..323870c05113
--- /dev/null
+++ b/net-misc/rabbitmq-server/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>ultrabug@gentoo.org</email>
+ <name>Ultrabug</name>
+ </maintainer>
+</pkgmetadata>
+
diff --git a/net-misc/rabbitmq-server/rabbitmq-server-3.2.4.ebuild b/net-misc/rabbitmq-server/rabbitmq-server-3.2.4.ebuild
new file mode 100644
index 000000000000..965a8ce4bbf2
--- /dev/null
+++ b/net-misc/rabbitmq-server/rabbitmq-server-3.2.4.ebuild
@@ -0,0 +1,95 @@
+# 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-single-r1 systemd user
+
+DESCRIPTION="RabbitMQ is a high-performance AMQP-compliant message broker written in Erlang"
+HOMEPAGE="http://www.rabbitmq.com/"
+SRC_URI="http://www.rabbitmq.com/releases/rabbitmq-server/v${PV}/rabbitmq-server-${PV}.tar.gz"
+
+LICENSE="GPL-2 MPL-1.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="dev-lang/erlang"
+DEPEND="${RDEPEND}
+ app-arch/zip
+ app-arch/unzip
+ app-text/docbook-xml-dtd:4.5
+ app-text/xmlto
+ dev-libs/libxslt
+ dev-python/simplejson
+"
+
+pkg_setup() {
+ enewgroup rabbitmq
+ enewuser rabbitmq -1 -1 /var/lib/rabbitmq rabbitmq
+ python-single-r1_pkg_setup
+}
+
+src_compile() {
+ emake all docs_all
+ gunzip docs/*.gz
+}
+
+src_install() {
+ # erlang module
+ local targetdir="/usr/$(get_libdir)/erlang/lib/rabbitmq_server-${PV}"
+
+ einfo "Setting correct RABBITMQ_HOME in scripts"
+ sed -e "s:^RABBITMQ_HOME=.*:RABBITMQ_HOME=\"${targetdir}\":g" \
+ -i scripts/rabbitmq-env
+
+ einfo "Installing Erlang modules to ${targetdir}"
+ insinto "${targetdir}"
+ doins -r ebin include plugins
+
+ einfo "Installing server scripts to /usr/sbin"
+ for script in rabbitmq-env rabbitmq-server rabbitmqctl rabbitmq-defaults rabbitmq-plugins; do
+ exeinto /usr/libexec/rabbitmq
+ doexe scripts/${script}
+ newsbin "${FILESDIR}"/rabbitmq-script-wrapper ${script}
+ done
+
+ # install the init script
+ newinitd "${FILESDIR}"/rabbitmq-server.init-r3 rabbitmq
+ systemd_dounit "${FILESDIR}/rabbitmq.service"
+
+ # install documentation
+ doman docs/*.[15]
+ dodoc README
+
+ # create the directory where our log file will go.
+ diropts -m 0770 -o rabbitmq -g rabbitmq
+ keepdir /var/log/rabbitmq /etc/rabbitmq
+
+ # create the mnesia directory
+ diropts -m 0770 -o rabbitmq -g rabbitmq
+ dodir /var/lib/rabbitmq{,/mnesia}
+}
+
+pkg_preinst() {
+ if has_version "<=net-misc/rabbitmq-server-1.8.0"; then
+ elog "IMPORTANT UPGRADE NOTICE:"
+ elog
+ elog "RabbitMQ is now running as an unprivileged user instead of root."
+ elog "Therefore you need to fix the permissions for RabbitMQs Mnesia database."
+ elog "Please run the following commands as root:"
+ elog
+ elog " usermod -d /var/lib/rabbitmq rabbitmq"
+ elog " chown rabbitmq:rabbitmq -R /var/lib/rabbitmq"
+ elog
+ elif has_version "<net-misc/rabbitmq-server-2.1.1"; then
+ elog "IMPORTANT UPGRADE NOTICE:"
+ elog
+ elog "Please read release notes before upgrading:"
+ elog
+ elog "http://www.rabbitmq.com/release-notes/README-3.0.0.txt"
+ fi
+}
diff --git a/net-misc/rabbitmq-server/rabbitmq-server-3.3.4.ebuild b/net-misc/rabbitmq-server/rabbitmq-server-3.3.4.ebuild
new file mode 100644
index 000000000000..c44133415f7d
--- /dev/null
+++ b/net-misc/rabbitmq-server/rabbitmq-server-3.3.4.ebuild
@@ -0,0 +1,101 @@
+# 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-any-r1 systemd user
+
+DESCRIPTION="RabbitMQ is a high-performance AMQP-compliant message broker written in Erlang"
+HOMEPAGE="http://www.rabbitmq.com/"
+SRC_URI="http://www.rabbitmq.com/releases/rabbitmq-server/v${PV}/rabbitmq-server-${PV}.tar.gz"
+
+LICENSE="GPL-2 MPL-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/erlang"
+DEPEND="${RDEPEND}
+ app-arch/zip
+ app-arch/unzip
+ app-text/docbook-xml-dtd:4.5
+ app-text/xmlto
+ dev-libs/libxslt
+ $(python_gen_any_dep 'dev-python/simplejson[${PYTHON_USEDEP}]')
+"
+
+pkg_setup() {
+ enewgroup rabbitmq
+ enewuser rabbitmq -1 -1 /var/lib/rabbitmq rabbitmq
+ python-any-r1_pkg_setup
+}
+
+src_compile() {
+ emake all docs_all
+ gunzip docs/*.gz
+}
+
+src_install() {
+ # erlang module
+ local targetdir="/usr/$(get_libdir)/erlang/lib/rabbitmq_server-${PV}"
+
+ einfo "Setting correct RABBITMQ_HOME in scripts"
+ sed -e "s:^RABBITMQ_HOME=.*:RABBITMQ_HOME=\"${targetdir}\":g" \
+ -i scripts/rabbitmq-env || die
+
+ einfo "Installing Erlang modules to ${targetdir}"
+ insinto "${targetdir}"
+ doins -r ebin include plugins
+
+ einfo "Installing server scripts to /usr/sbin"
+ for script in rabbitmq-env rabbitmq-server rabbitmqctl rabbitmq-defaults rabbitmq-plugins; do
+ exeinto /usr/libexec/rabbitmq
+ doexe scripts/${script}
+ newsbin "${FILESDIR}"/rabbitmq-script-wrapper ${script}
+ done
+
+ # install the init script
+ newinitd "${FILESDIR}"/rabbitmq-server.init-r3 rabbitmq
+ systemd_dounit "${FILESDIR}/rabbitmq.service"
+
+ # install documentation
+ doman docs/*.[15]
+ dodoc README
+
+ # create the directory where our log file will go.
+ diropts -m 0770 -o rabbitmq -g rabbitmq
+ keepdir /var/log/rabbitmq /etc/rabbitmq
+
+ # create the mnesia directory
+ diropts -m 0770 -o rabbitmq -g rabbitmq
+ dodir /var/lib/rabbitmq{,/mnesia}
+}
+
+pkg_preinst() {
+ if has_version "<=net-misc/rabbitmq-server-1.8.0"; then
+ elog "IMPORTANT UPGRADE NOTICE:"
+ elog
+ elog "RabbitMQ is now running as an unprivileged user instead of root."
+ elog "Therefore you need to fix the permissions for RabbitMQs Mnesia database."
+ elog "Please run the following commands as root:"
+ elog
+ elog " usermod -d /var/lib/rabbitmq rabbitmq"
+ elog " chown rabbitmq:rabbitmq -R /var/lib/rabbitmq"
+ elog
+ elif has_version "<net-misc/rabbitmq-server-2.1.1"; then
+ elog "IMPORTANT UPGRADE NOTICE:"
+ elog
+ elog "Please read release notes before upgrading:"
+ elog
+ elog "http://www.rabbitmq.com/release-notes/README-3.0.0.txt"
+ fi
+ if has_version "<net-misc/rabbitmq-server-3.3.0"; then
+ elog
+ elog "This release changes the behaviour of the default guest user:"
+ elog
+ elog "http://www.rabbitmq.com/access-control.html"
+ fi
+}
diff --git a/net-misc/rabbitmq-server/rabbitmq-server-3.5.1.ebuild b/net-misc/rabbitmq-server/rabbitmq-server-3.5.1.ebuild
new file mode 100644
index 000000000000..c44133415f7d
--- /dev/null
+++ b/net-misc/rabbitmq-server/rabbitmq-server-3.5.1.ebuild
@@ -0,0 +1,101 @@
+# 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-any-r1 systemd user
+
+DESCRIPTION="RabbitMQ is a high-performance AMQP-compliant message broker written in Erlang"
+HOMEPAGE="http://www.rabbitmq.com/"
+SRC_URI="http://www.rabbitmq.com/releases/rabbitmq-server/v${PV}/rabbitmq-server-${PV}.tar.gz"
+
+LICENSE="GPL-2 MPL-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/erlang"
+DEPEND="${RDEPEND}
+ app-arch/zip
+ app-arch/unzip
+ app-text/docbook-xml-dtd:4.5
+ app-text/xmlto
+ dev-libs/libxslt
+ $(python_gen_any_dep 'dev-python/simplejson[${PYTHON_USEDEP}]')
+"
+
+pkg_setup() {
+ enewgroup rabbitmq
+ enewuser rabbitmq -1 -1 /var/lib/rabbitmq rabbitmq
+ python-any-r1_pkg_setup
+}
+
+src_compile() {
+ emake all docs_all
+ gunzip docs/*.gz
+}
+
+src_install() {
+ # erlang module
+ local targetdir="/usr/$(get_libdir)/erlang/lib/rabbitmq_server-${PV}"
+
+ einfo "Setting correct RABBITMQ_HOME in scripts"
+ sed -e "s:^RABBITMQ_HOME=.*:RABBITMQ_HOME=\"${targetdir}\":g" \
+ -i scripts/rabbitmq-env || die
+
+ einfo "Installing Erlang modules to ${targetdir}"
+ insinto "${targetdir}"
+ doins -r ebin include plugins
+
+ einfo "Installing server scripts to /usr/sbin"
+ for script in rabbitmq-env rabbitmq-server rabbitmqctl rabbitmq-defaults rabbitmq-plugins; do
+ exeinto /usr/libexec/rabbitmq
+ doexe scripts/${script}
+ newsbin "${FILESDIR}"/rabbitmq-script-wrapper ${script}
+ done
+
+ # install the init script
+ newinitd "${FILESDIR}"/rabbitmq-server.init-r3 rabbitmq
+ systemd_dounit "${FILESDIR}/rabbitmq.service"
+
+ # install documentation
+ doman docs/*.[15]
+ dodoc README
+
+ # create the directory where our log file will go.
+ diropts -m 0770 -o rabbitmq -g rabbitmq
+ keepdir /var/log/rabbitmq /etc/rabbitmq
+
+ # create the mnesia directory
+ diropts -m 0770 -o rabbitmq -g rabbitmq
+ dodir /var/lib/rabbitmq{,/mnesia}
+}
+
+pkg_preinst() {
+ if has_version "<=net-misc/rabbitmq-server-1.8.0"; then
+ elog "IMPORTANT UPGRADE NOTICE:"
+ elog
+ elog "RabbitMQ is now running as an unprivileged user instead of root."
+ elog "Therefore you need to fix the permissions for RabbitMQs Mnesia database."
+ elog "Please run the following commands as root:"
+ elog
+ elog " usermod -d /var/lib/rabbitmq rabbitmq"
+ elog " chown rabbitmq:rabbitmq -R /var/lib/rabbitmq"
+ elog
+ elif has_version "<net-misc/rabbitmq-server-2.1.1"; then
+ elog "IMPORTANT UPGRADE NOTICE:"
+ elog
+ elog "Please read release notes before upgrading:"
+ elog
+ elog "http://www.rabbitmq.com/release-notes/README-3.0.0.txt"
+ fi
+ if has_version "<net-misc/rabbitmq-server-3.3.0"; then
+ elog
+ elog "This release changes the behaviour of the default guest user:"
+ elog
+ elog "http://www.rabbitmq.com/access-control.html"
+ fi
+}
diff --git a/net-misc/rabbitmq-server/rabbitmq-server-3.5.3.ebuild b/net-misc/rabbitmq-server/rabbitmq-server-3.5.3.ebuild
new file mode 100644
index 000000000000..c44133415f7d
--- /dev/null
+++ b/net-misc/rabbitmq-server/rabbitmq-server-3.5.3.ebuild
@@ -0,0 +1,101 @@
+# 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-any-r1 systemd user
+
+DESCRIPTION="RabbitMQ is a high-performance AMQP-compliant message broker written in Erlang"
+HOMEPAGE="http://www.rabbitmq.com/"
+SRC_URI="http://www.rabbitmq.com/releases/rabbitmq-server/v${PV}/rabbitmq-server-${PV}.tar.gz"
+
+LICENSE="GPL-2 MPL-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/erlang"
+DEPEND="${RDEPEND}
+ app-arch/zip
+ app-arch/unzip
+ app-text/docbook-xml-dtd:4.5
+ app-text/xmlto
+ dev-libs/libxslt
+ $(python_gen_any_dep 'dev-python/simplejson[${PYTHON_USEDEP}]')
+"
+
+pkg_setup() {
+ enewgroup rabbitmq
+ enewuser rabbitmq -1 -1 /var/lib/rabbitmq rabbitmq
+ python-any-r1_pkg_setup
+}
+
+src_compile() {
+ emake all docs_all
+ gunzip docs/*.gz
+}
+
+src_install() {
+ # erlang module
+ local targetdir="/usr/$(get_libdir)/erlang/lib/rabbitmq_server-${PV}"
+
+ einfo "Setting correct RABBITMQ_HOME in scripts"
+ sed -e "s:^RABBITMQ_HOME=.*:RABBITMQ_HOME=\"${targetdir}\":g" \
+ -i scripts/rabbitmq-env || die
+
+ einfo "Installing Erlang modules to ${targetdir}"
+ insinto "${targetdir}"
+ doins -r ebin include plugins
+
+ einfo "Installing server scripts to /usr/sbin"
+ for script in rabbitmq-env rabbitmq-server rabbitmqctl rabbitmq-defaults rabbitmq-plugins; do
+ exeinto /usr/libexec/rabbitmq
+ doexe scripts/${script}
+ newsbin "${FILESDIR}"/rabbitmq-script-wrapper ${script}
+ done
+
+ # install the init script
+ newinitd "${FILESDIR}"/rabbitmq-server.init-r3 rabbitmq
+ systemd_dounit "${FILESDIR}/rabbitmq.service"
+
+ # install documentation
+ doman docs/*.[15]
+ dodoc README
+
+ # create the directory where our log file will go.
+ diropts -m 0770 -o rabbitmq -g rabbitmq
+ keepdir /var/log/rabbitmq /etc/rabbitmq
+
+ # create the mnesia directory
+ diropts -m 0770 -o rabbitmq -g rabbitmq
+ dodir /var/lib/rabbitmq{,/mnesia}
+}
+
+pkg_preinst() {
+ if has_version "<=net-misc/rabbitmq-server-1.8.0"; then
+ elog "IMPORTANT UPGRADE NOTICE:"
+ elog
+ elog "RabbitMQ is now running as an unprivileged user instead of root."
+ elog "Therefore you need to fix the permissions for RabbitMQs Mnesia database."
+ elog "Please run the following commands as root:"
+ elog
+ elog " usermod -d /var/lib/rabbitmq rabbitmq"
+ elog " chown rabbitmq:rabbitmq -R /var/lib/rabbitmq"
+ elog
+ elif has_version "<net-misc/rabbitmq-server-2.1.1"; then
+ elog "IMPORTANT UPGRADE NOTICE:"
+ elog
+ elog "Please read release notes before upgrading:"
+ elog
+ elog "http://www.rabbitmq.com/release-notes/README-3.0.0.txt"
+ fi
+ if has_version "<net-misc/rabbitmq-server-3.3.0"; then
+ elog
+ elog "This release changes the behaviour of the default guest user:"
+ elog
+ elog "http://www.rabbitmq.com/access-control.html"
+ fi
+}
diff --git a/net-misc/raccess/Manifest b/net-misc/raccess/Manifest
new file mode 100644
index 000000000000..09aeee846c0b
--- /dev/null
+++ b/net-misc/raccess/Manifest
@@ -0,0 +1 @@
+DIST raccess-0.7.tar.gz 228067 SHA256 df48138333e674aea7b76f00ca67fccae74af9972ddd421c1c959ea2aaa34a50 SHA512 610c0d4cebf5130eb2de4b64e76ff55210645331ce8a24b6a3e6975f456b6f447e737a59634a052e5bacf74cb300b6ef02d95a5ab133d2af5f7e239ee006675d WHIRLPOOL e0b95536c2204fedfc6a2b73ef2fb4c496487ba7f96c4f58e269d4218f8b746e7f36bc01d8dcfb2397e5b38402d29015fa293df316786cbe2646e42cb6c1ba18
diff --git a/net-misc/raccess/files/raccess-0.7-asneeded.patch b/net-misc/raccess/files/raccess-0.7-asneeded.patch
new file mode 100644
index 000000000000..3db6945bcc0a
--- /dev/null
+++ b/net-misc/raccess/files/raccess-0.7-asneeded.patch
@@ -0,0 +1,11 @@
+--- src/Makefile.in.orig 2009-01-05 19:23:26.671861574 +0100
++++ src/Makefile.in 2009-01-05 19:23:37.603959062 +0100
+@@ -83,7 +83,7 @@
+ detectos.o remote_attack_module.o lookfor.o
+ raccess_LDADD = $(LDADD)
+ raccess_DEPENDENCIES =
+-raccess_LDFLAGS = -lm
++raccess_LDADD = -lm
+ BINFILES = -DLOCATION_BIN_FILES=\"/usr/lib/raccess\"
+ CFGFILES = -DLOCATION_CONFIG_FILES=\"@sysconfdir@\"
+ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(BINFILES) $(CFGFILES)
diff --git a/net-misc/raccess/files/raccess-0.7-glibc210.patch b/net-misc/raccess/files/raccess-0.7-glibc210.patch
new file mode 100644
index 000000000000..2ffb5660ed2e
--- /dev/null
+++ b/net-misc/raccess/files/raccess-0.7-glibc210.patch
@@ -0,0 +1,585 @@
+diff -NrU5 raccess-0.7.original/exploits/wu2.5.0a.c raccess-0.7/exploits/wu2.5.0a.c
+--- raccess-0.7.original/exploits/wu2.5.0a.c 2009-07-08 17:55:35.000000000 +0000
++++ raccess-0.7/exploits/wu2.5.0a.c 2009-07-08 18:09:23.000000000 +0000
+@@ -104,11 +104,11 @@
+ int xconnect (int sockfd, struct sockaddr *serv_addr, int addrlen);
+ void sighandler (int signal);
+ struct hostent *xgethostbyname (const char *name);
+ struct hostent *xgethostbyaddr (const char *addr, int len, int type);
+ void putserv (const char *fmt, ...);
+-char *getline (void);
++char *get_line (void);
+ char *getmsg (const char *msg);
+ int wuftpd_250_sploitit (void);
+ dirptr newdir (char *name);
+ char *getdir (char *stat);
+ char *int2char (int addr);
+@@ -759,16 +759,16 @@
+ }
+
+ #define LINEBUFLEN 8192
+ char linebuf[LINEBUFLEN]; /* saves us free()ing trouble. */
+
+-/* getline
++/* get_line
+ *
+ * get next line from server or local buffer
+ */
+ char *
+-getline (void)
++get_line (void)
+ {
+ char y[2];
+ int i = 0;
+
+ memset (linebuf, '\0', sizeof (linebuf));
+@@ -776,11 +776,11 @@
+
+ while (strncmp (y, "\n", 1) != 0)
+ {
+ if (i > (sizeof (linebuf) + 2))
+ {
+- err (0, "getline() buffer full");
++ err (0, "get_line() buffer full");
+ }
+ i += xread (fd, y, 1);
+ strcat (linebuf, y);
+ }
+
+@@ -835,11 +835,11 @@
+ char *line;
+ int i = strlen (msg);
+
+ do
+ {
+- line = getline ();
++ line = get_line ();
+ }
+ while (strncmp (line, msg, i) != 0 && strncmp (line, "5", 1) != 0);
+
+ return (line);
+ }
+@@ -919,11 +919,11 @@
+ nostat = 0;
+ putserv ("STAT .\n");
+
+ while (strncmp (line, "213 ", 4) != 0)
+ {
+- line = getline ();
++ line = get_line ();
+ tmp = getdir (line);
+
+ if (tmp == NULL)
+ continue;
+ if (dirroot == NULL)
+@@ -1279,14 +1279,14 @@
+ break;
+ }
+
+ string[tesopt.dirlen] = 0;
+ putserv ("MKD %s\n", string);
+- getline ();
++ get_line ();
+
+ putserv ("CWD %s\n", string);
+- getline ();
++ get_line ();
+ }
+
+ getpwd ();
+ disp = 1;
+
+@@ -1318,11 +1318,11 @@
+
+ if (strlen (string) < 20)
+ err (0, "cwd string too short.. check for 0x0's.\n");
+
+ putserv ("CWD %s\n", string);
+- getline ();
++ get_line ();
+
+ /************ jmpbuf ***********/
+
+ if (debug > 0)
+ printf ("Sending jmpbuf\n");
+@@ -1334,11 +1334,11 @@
+ if (strlen (string) != 32)
+ err (0, "jmpbuf string too short.. check for 0x0's.\n");
+
+ putserv ("%s\n", string);
+
+- getline ();
++ get_line ();
+
+ return (1);
+ }
+
+ /* shell
+diff -NrU5 raccess-0.7.original/exploits/wu2.5.0b.c raccess-0.7/exploits/wu2.5.0b.c
+--- raccess-0.7.original/exploits/wu2.5.0b.c 2009-07-08 17:55:35.000000000 +0000
++++ raccess-0.7/exploits/wu2.5.0b.c 2009-07-08 18:12:44.000000000 +0000
+@@ -104,11 +104,11 @@
+ int xconnect (int sockfd, struct sockaddr *serv_addr, int addrlen);
+ void sighandler (int signal);
+ struct hostent *xgethostbyname (const char *name);
+ struct hostent *xgethostbyaddr (const char *addr, int len, int type);
+ void putserv (const char *fmt, ...);
+-char *getline (void);
++char *get_line (void);
+ char *getmsg (const char *msg);
+ int wuftpd_250_sploitit (void);
+ dirptr newdir (char *name);
+ char *getdir (char *stat);
+ char *int2char (int addr);
+@@ -759,16 +759,16 @@
+ }
+
+ #define LINEBUFLEN 8192
+ char linebuf[LINEBUFLEN]; /* saves us free()ing trouble. */
+
+-/* getline
++/* get_line
+ *
+ * get next line from server or local buffer
+ */
+ char *
+-getline (void)
++get_line (void)
+ {
+ char y[2];
+ int i = 0;
+
+ memset (linebuf, '\0', sizeof (linebuf));
+@@ -776,11 +776,11 @@
+
+ while (strncmp (y, "\n", 1) != 0)
+ {
+ if (i > (sizeof (linebuf) + 2))
+ {
+- err (0, "getline() buffer full");
++ err (0, "get_line() buffer full");
+ }
+ i += xread (fd, y, 1);
+ strcat (linebuf, y);
+ }
+
+@@ -835,11 +835,11 @@
+ char *line;
+ int i = strlen (msg);
+
+ do
+ {
+- line = getline ();
++ line = get_line ();
+ }
+ while (strncmp (line, msg, i) != 0 && strncmp (line, "5", 1) != 0);
+
+ return (line);
+ }
+@@ -919,11 +919,11 @@
+ nostat = 0;
+ putserv ("STAT .\n");
+
+ while (strncmp (line, "213 ", 4) != 0)
+ {
+- line = getline ();
++ line = get_line ();
+ tmp = getdir (line);
+
+ if (tmp == NULL)
+ continue;
+ if (dirroot == NULL)
+@@ -1279,14 +1279,14 @@
+ break;
+ }
+
+ string[tesopt.dirlen] = 0;
+ putserv ("MKD %s\n", string);
+- getline ();
++ get_line ();
+
+ putserv ("CWD %s\n", string);
+- getline ();
++ get_line ();
+ }
+
+ getpwd ();
+ disp = 1;
+
+@@ -1318,11 +1318,11 @@
+
+ if (strlen (string) < 20)
+ err (0, "cwd string too short.. check for 0x0's.\n");
+
+ putserv ("CWD %s\n", string);
+- getline ();
++ get_line ();
+
+ /************ jmpbuf ***********/
+
+ if (debug > 0)
+ printf ("Sending jmpbuf\n");
+@@ -1334,11 +1334,11 @@
+ if (strlen (string) != 32)
+ err (0, "jmpbuf string too short.. check for 0x0's.\n");
+
+ putserv ("%s\n", string);
+
+- getline ();
++ get_line ();
+
+ return (1);
+ }
+
+ /* shell
+diff -NrU5 raccess-0.7.original/exploits/wu2.5.0c.c raccess-0.7/exploits/wu2.5.0c.c
+--- raccess-0.7.original/exploits/wu2.5.0c.c 2009-07-08 17:55:35.000000000 +0000
++++ raccess-0.7/exploits/wu2.5.0c.c 2009-07-08 18:14:14.000000000 +0000
+@@ -104,11 +104,11 @@
+ int xconnect (int sockfd, struct sockaddr *serv_addr, int addrlen);
+ void sighandler (int signal);
+ struct hostent *xgethostbyname (const char *name);
+ struct hostent *xgethostbyaddr (const char *addr, int len, int type);
+ void putserv (const char *fmt, ...);
+-char *getline (void);
++char *get_line (void);
+ char *getmsg (const char *msg);
+ int wuftpd_250_sploitit (void);
+ dirptr newdir (char *name);
+ char *getdir (char *stat);
+ char *int2char (int addr);
+@@ -759,16 +759,16 @@
+ }
+
+ #define LINEBUFLEN 8192
+ char linebuf[LINEBUFLEN]; /* saves us free()ing trouble. */
+
+-/* getline
++/* get_line
+ *
+ * get next line from server or local buffer
+ */
+ char *
+-getline (void)
++get_line (void)
+ {
+ char y[2];
+ int i = 0;
+
+ memset (linebuf, '\0', sizeof (linebuf));
+@@ -776,11 +776,11 @@
+
+ while (strncmp (y, "\n", 1) != 0)
+ {
+ if (i > (sizeof (linebuf) + 2))
+ {
+- err (0, "getline() buffer full");
++ err (0, "get_line() buffer full");
+ }
+ i += xread (fd, y, 1);
+ strcat (linebuf, y);
+ }
+
+@@ -835,11 +835,11 @@
+ char *line;
+ int i = strlen (msg);
+
+ do
+ {
+- line = getline ();
++ line = get_line ();
+ }
+ while (strncmp (line, msg, i) != 0 && strncmp (line, "5", 1) != 0);
+
+ return (line);
+ }
+@@ -919,11 +919,11 @@
+ nostat = 0;
+ putserv ("STAT .\n");
+
+ while (strncmp (line, "213 ", 4) != 0)
+ {
+- line = getline ();
++ line = get_line ();
+ tmp = getdir (line);
+
+ if (tmp == NULL)
+ continue;
+ if (dirroot == NULL)
+@@ -1279,14 +1279,14 @@
+ break;
+ }
+
+ string[tesopt.dirlen] = 0;
+ putserv ("MKD %s\n", string);
+- getline ();
++ get_line ();
+
+ putserv ("CWD %s\n", string);
+- getline ();
++ get_line ();
+ }
+
+ getpwd ();
+ disp = 1;
+
+@@ -1318,11 +1318,11 @@
+
+ if (strlen (string) < 20)
+ err (0, "cwd string too short.. check for 0x0's.\n");
+
+ putserv ("CWD %s\n", string);
+- getline ();
++ get_line ();
+
+ /************ jmpbuf ***********/
+
+ if (debug > 0)
+ printf ("Sending jmpbuf\n");
+@@ -1334,11 +1334,11 @@
+ if (strlen (string) != 32)
+ err (0, "jmpbuf string too short.. check for 0x0's.\n");
+
+ putserv ("%s\n", string);
+
+- getline ();
++ get_line ();
+
+ return (1);
+ }
+
+ /* shell
+diff -NrU5 raccess-0.7.original/exploits/wu2.5.0d.c raccess-0.7/exploits/wu2.5.0d.c
+--- raccess-0.7.original/exploits/wu2.5.0d.c 2009-07-08 17:55:35.000000000 +0000
++++ raccess-0.7/exploits/wu2.5.0d.c 2009-07-08 18:06:24.000000000 +0000
+@@ -104,11 +104,11 @@
+ int xconnect (int sockfd, struct sockaddr *serv_addr, int addrlen);
+ void sighandler (int signal);
+ struct hostent *xgethostbyname (const char *name);
+ struct hostent *xgethostbyaddr (const char *addr, int len, int type);
+ void putserv (const char *fmt, ...);
+-char *getline (void);
++char *get_line (void);
+ char *getmsg (const char *msg);
+ int wuftpd_250_sploitit (void);
+ dirptr newdir (char *name);
+ char *getdir (char *stat);
+ char *int2char (int addr);
+@@ -759,16 +759,16 @@
+ }
+
+ #define LINEBUFLEN 8192
+ char linebuf[LINEBUFLEN]; /* saves us free()ing trouble. */
+
+-/* getline
++/* get_line
+ *
+ * get next line from server or local buffer
+ */
+ char *
+-getline (void)
++get_line (void)
+ {
+ char y[2];
+ int i = 0;
+
+ memset (linebuf, '\0', sizeof (linebuf));
+@@ -776,11 +776,11 @@
+
+ while (strncmp (y, "\n", 1) != 0)
+ {
+ if (i > (sizeof (linebuf) + 2))
+ {
+- err (0, "getline() buffer full");
++ err (0, "get_line() buffer full");
+ }
+ i += xread (fd, y, 1);
+ strcat (linebuf, y);
+ }
+
+@@ -835,11 +835,11 @@
+ char *line;
+ int i = strlen (msg);
+
+ do
+ {
+- line = getline ();
++ line = get_line ();
+ }
+ while (strncmp (line, msg, i) != 0 && strncmp (line, "5", 1) != 0);
+
+ return (line);
+ }
+@@ -919,11 +919,11 @@
+ nostat = 0;
+ putserv ("STAT .\n");
+
+ while (strncmp (line, "213 ", 4) != 0)
+ {
+- line = getline ();
++ line = get_line ();
+ tmp = getdir (line);
+
+ if (tmp == NULL)
+ continue;
+ if (dirroot == NULL)
+@@ -1279,14 +1279,14 @@
+ break;
+ }
+
+ string[tesopt.dirlen] = 0;
+ putserv ("MKD %s\n", string);
+- getline ();
++ get_line ();
+
+ putserv ("CWD %s\n", string);
+- getline ();
++ get_line ();
+ }
+
+ getpwd ();
+ disp = 1;
+
+@@ -1318,11 +1318,11 @@
+
+ if (strlen (string) < 20)
+ err (0, "cwd string too short.. check for 0x0's.\n");
+
+ putserv ("CWD %s\n", string);
+- getline ();
++ get_line ();
+
+ /************ jmpbuf ***********/
+
+ if (debug > 0)
+ printf ("Sending jmpbuf\n");
+@@ -1334,11 +1334,11 @@
+ if (strlen (string) != 32)
+ err (0, "jmpbuf string too short.. check for 0x0's.\n");
+
+ putserv ("%s\n", string);
+
+- getline ();
++ get_line ();
+
+ return (1);
+ }
+
+ /* shell
+diff -NrU5 raccess-0.7.original/exploits/wu2.5.0e.c raccess-0.7/exploits/wu2.5.0e.c
+--- raccess-0.7.original/exploits/wu2.5.0e.c 2009-07-08 17:55:35.000000000 +0000
++++ raccess-0.7/exploits/wu2.5.0e.c 2009-07-08 18:07:19.000000000 +0000
+@@ -104,11 +104,11 @@
+ int xconnect (int sockfd, struct sockaddr *serv_addr, int addrlen);
+ void sighandler (int signal);
+ struct hostent *xgethostbyname (const char *name);
+ struct hostent *xgethostbyaddr (const char *addr, int len, int type);
+ void putserv (const char *fmt, ...);
+-char *getline (void);
++char *get_line (void);
+ char *getmsg (const char *msg);
+ int wuftpd_250_sploitit (void);
+ dirptr newdir (char *name);
+ char *getdir (char *stat);
+ char *int2char (int addr);
+@@ -759,16 +759,16 @@
+ }
+
+ #define LINEBUFLEN 8192
+ char linebuf[LINEBUFLEN]; /* saves us free()ing trouble. */
+
+-/* getline
++/* get_line
+ *
+ * get next line from server or local buffer
+ */
+ char *
+-getline (void)
++get_line (void)
+ {
+ char y[2];
+ int i = 0;
+
+ memset (linebuf, '\0', sizeof (linebuf));
+@@ -776,11 +776,11 @@
+
+ while (strncmp (y, "\n", 1) != 0)
+ {
+ if (i > (sizeof (linebuf) + 2))
+ {
+- err (0, "getline() buffer full");
++ err (0, "get_line() buffer full");
+ }
+ i += xread (fd, y, 1);
+ strcat (linebuf, y);
+ }
+
+@@ -835,11 +835,11 @@
+ char *line;
+ int i = strlen (msg);
+
+ do
+ {
+- line = getline ();
++ line = get_line ();
+ }
+ while (strncmp (line, msg, i) != 0 && strncmp (line, "5", 1) != 0);
+
+ return (line);
+ }
+@@ -919,11 +919,11 @@
+ nostat = 0;
+ putserv ("STAT .\n");
+
+ while (strncmp (line, "213 ", 4) != 0)
+ {
+- line = getline ();
++ line = get_line ();
+ tmp = getdir (line);
+
+ if (tmp == NULL)
+ continue;
+ if (dirroot == NULL)
+@@ -1279,14 +1279,14 @@
+ break;
+ }
+
+ string[tesopt.dirlen] = 0;
+ putserv ("MKD %s\n", string);
+- getline ();
++ get_line ();
+
+ putserv ("CWD %s\n", string);
+- getline ();
++ get_line ();
+ }
+
+ getpwd ();
+ disp = 1;
+
+@@ -1318,11 +1318,11 @@
+
+ if (strlen (string) < 20)
+ err (0, "cwd string too short.. check for 0x0's.\n");
+
+ putserv ("CWD %s\n", string);
+- getline ();
++ get_line ();
+
+ /************ jmpbuf ***********/
+
+ if (debug > 0)
+ printf ("Sending jmpbuf\n");
+@@ -1334,11 +1334,11 @@
+ if (strlen (string) != 32)
+ err (0, "jmpbuf string too short.. check for 0x0's.\n");
+
+ putserv ("%s\n", string);
+
+- getline ();
++ get_line ();
+
+ return (1);
+ }
+
+ /* shell
diff --git a/net-misc/raccess/files/raccess-0.7-r1-asneeded.patch b/net-misc/raccess/files/raccess-0.7-r1-asneeded.patch
new file mode 100644
index 000000000000..47ed0e1aa35b
--- /dev/null
+++ b/net-misc/raccess/files/raccess-0.7-r1-asneeded.patch
@@ -0,0 +1,11 @@
+--- src/Makefile.in.orig 2009-01-05 19:23:26.671861574 +0100
++++ src/Makefile.in 2009-01-05 19:23:37.603959062 +0100
+@@ -83,7 +83,7 @@
+ detectos.o remote_attack_module.o lookfor.o
+ raccess_LDADD = $(LDADD)
+ raccess_DEPENDENCIES =
+-raccess_LDFLAGS = -lm
++raccess_LDADD = -lm
+ BINFILES = -DLOCATION_BIN_FILES=\"@bindir@\"
+ CFGFILES = -DLOCATION_CONFIG_FILES=\"@sysconfdir@\"
+ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(BINFILES) $(CFGFILES)
diff --git a/net-misc/raccess/metadata.xml b/net-misc/raccess/metadata.xml
new file mode 100644
index 000000000000..f9d50da18d39
--- /dev/null
+++ b/net-misc/raccess/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>maintainer-needed@gentoo.org</email>
+ <description>This package lacks a primary herd or maintainer.</description>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/raccess/raccess-0.7.ebuild b/net-misc/raccess/raccess-0.7.ebuild
new file mode 100644
index 000000000000..82f90fad20f6
--- /dev/null
+++ b/net-misc/raccess/raccess-0.7.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs multilib
+
+DESCRIPTION="Remote Access Session is an systems security analyzer"
+HOMEPAGE="http://salix.org/raccess/"
+SRC_URI="http://salix.org/raccess/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86 sparc ~ppc ~amd64"
+IUSE=""
+
+DEPEND="net-libs/libpcap"
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-r1-asneeded.patch
+ epatch "${FILESDIR}"/${P}-glibc210.patch
+ sed -i '/^BINFILES/s:@bindir@:/usr/$(get_libdir)/raccess:' src/Makefile.in
+ sed -i '/^bindir/s:@bindir@/exploits:/usr/$(get_libdir)/raccess:' exploits/Makefile.in
+}
+
+src_compile() {
+ econf --sysconfdir=/etc/raccess
+ emake CC="$(tc-getCC)" || die "emake failed"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "emake install failed"
+ dodoc AUTHORS ChangeLog NEWS PROJECT_PLANNING README
+}
diff --git a/net-misc/radvd/Manifest b/net-misc/radvd/Manifest
new file mode 100644
index 000000000000..55d6795be93d
--- /dev/null
+++ b/net-misc/radvd/Manifest
@@ -0,0 +1,4 @@
+DIST radvd-1.15.tar.gz 185528 SHA256 ba2e16bf0b2ac0030aacb0927304603f7ebbd317fdf30a24ee6f9ba06428391d SHA512 39d7ad22b25b36ab8079e9a48f50f69ea2be8a02d2e76638940c5eb769bf9291f28d275d7799296009e3c61bcb106c276bc5c60c9090951ea9f2dc7e00945ba7 WHIRLPOOL 3620518e71a243335cf8e064b4f3c45d80ec2e2d94748caa8ccaf3e0f317ffb3244ae719f07008abd65763f3ebc0110e2d5d5f570f1569b8377f70e0a9dfecc4
+DIST radvd-1.9.8.tar.gz 176288 SHA256 645ccf1c9b16e769ff4179813712e580e2c8786d64a888d8afa1e296c057c1c1 SHA512 25ffa2fe1289ee826432ade3846aa5008e34ff9f0cbe954bf44ebae22198de59b40b7b4a70d19c74117b3280a7ca6a4bf740536f4a08e0bf169e760748548971 WHIRLPOOL 228182cb6fdc6065a728f679ee6d93286c48f186b209b6ff8d553f06317d0e799687c5abf0179cda5c42d2ca72ca32bdacbc31e0a14a06d18316a6538eb09017
+DIST radvd-2.10.tar.gz 202426 SHA256 b41867c5b0375f786bebbd3fc88776d41927aa392eeba954e4b88f8ec7e8f13e SHA512 cfc34ad414bd07e22519982f8c3fa75cb27eab54131d0af09d6dd5fbb69da3de26fda776593e1a4e2735b63fc7cc2224663665854895d8be459f43ba4012fa26 WHIRLPOOL 5689d137313e75e30f370637bc92f4e242f2a4e2675b0ee34f1824a66e7efcf4ad683e121375623b62f015dd59a664511f2dbcff229c70a9d55c083dc7fef98f
+DIST radvd-2.11.tar.gz 202596 SHA256 80ad60b15689e9591a5af393a57a1d93304deeff2e46482f0fd98046c00622f8 SHA512 35fc641b81cc76de677c8e55a61c8b28d9167d8f40a3fa7adf2a254293ca2d7856ca2c8f6d3bdba391bf873345d3019c0f572ee166eaba011ae874b176c85d4b WHIRLPOOL 058ecf265881963e44267945349e56f1b5bb402b8e4605bd852a8e3ced00419e0028eee70028819433bbc7d596f938d94fef1145ea615c66a975feb9fe4aa56c
diff --git a/net-misc/radvd/files/radvd-1.9.1.init b/net-misc/radvd/files/radvd-1.9.1.init
new file mode 100644
index 000000000000..779233326aa9
--- /dev/null
+++ b/net-misc/radvd/files/radvd-1.9.1.init
@@ -0,0 +1,71 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+CONFIGFILE=/etc/radvd.conf
+PIDFILE=/var/run/radvd/radvd.pid
+SYSCTL_FORWARD=net.ipv6.conf.all.forwarding
+
+extra_started_commands="reload"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -f "${CONFIGFILE}" ]; then
+ eerror "Configuration file ${CONFIGFILE} not found"
+ return 1
+ fi
+
+ if ! /usr/sbin/radvd -c -C "${CONFIGFILE}" ; then
+ eerror "Configuration file ${CONFIGFILE} failed test"
+ return 1
+ fi
+
+ checkpath -d -o radvd:radvd ${PIDFILE%/*}
+}
+
+start() {
+ if [ "${FORWARD}" != "no" ]; then
+ ebegin "Enabling IPv6 forwarding"
+ sysctl -w "${SYSCTL_FORWARD}=1" >/dev/null
+ eend $?
+ fi
+
+ checkconfig || return 1
+
+ ebegin "Starting IPv6 Router Advertisement Daemon"
+ start-stop-daemon --start --exec /usr/sbin/radvd \
+ --pidfile "${PIDFILE}" \
+ -- -C "${CONFIGFILE}" -p "${PIDFILE}" -u radvd ${OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping IPv6 Router Advertisement Daemon"
+ start-stop-daemon --stop --exec /usr/sbin/radvd --pidfile "${PIDFILE}"
+ eend $?
+
+ if [ "${FORWARD}" != "no" ]; then
+ ebegin "Disabling IPv6 forwarding"
+ sysctl -w "${SYSCTL_FORWARD}=0" > /dev/null
+ eend $?
+ fi
+}
+
+reload() {
+ if [ "${FORWARD}" != "no" ]; then
+ ebegin "Enabling IPv6 forwarding"
+ sysctl -w "${SYSCTL_FORWARD}=1" >/dev/null
+ eend $?
+ fi
+
+ checkconfig || return 1
+
+ ebegin "Reloading IPv6 Router Advertisement Daemon"
+ start-stop-daemon --signal HUP \
+ --exec /usr/sbin/radvd --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/net-misc/radvd/files/radvd-2.10-musl-libc-fix.patch b/net-misc/radvd/files/radvd-2.10-musl-libc-fix.patch
new file mode 100644
index 000000000000..c44f28437be4
--- /dev/null
+++ b/net-misc/radvd/files/radvd-2.10-musl-libc-fix.patch
@@ -0,0 +1,87 @@
+From 1d8973e13d89802eee0b648451e2b97ac65cf9e0 Mon Sep 17 00:00:00 2001
+From: Reuben Hawkins <reubenhwk@gmail.com>
+Date: Sat, 16 May 2015 09:27:38 -0700
+Subject: [PATCH] device-linux.c: IEEE 802.15.4 musl libc fix
+
+The ARPHRD_IEEE802154 macro's definition and name have been recently
+moved around from kernel header to glibc headers. Include linux/if_arp.h
+if available and then use either ARPHRD_IEEE802154_MONITOR or ARPHRD_IEEE802154_PHY,
+whichever comes first.
+---
+ configure.ac | 1 +
+ device-linux.c | 8 ++++++++
+ includes.h | 6 ++++++
+ 3 files changed, 15 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 0c1efd6..4bd4c9d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -156,6 +156,7 @@ AC_HEADER_STDC
+ AC_CHECK_HEADERS( \
+ getopt.h \
+ ifaddrs.h \
++ linux/if_arp.h \
+ machine/limits.h \
+ machine/param.h \
+ net/if_arp.h \
+diff --git a/device-linux.c b/device-linux.c
+index fa7d978..de83f2e 100644
+--- a/device-linux.c
++++ b/device-linux.c
+@@ -79,10 +79,12 @@ int update_device_info(int sock, struct Interface *iface)
+ iface->sllao.if_maxmtu = -1;
+ break;
+ #endif /* ARPHDR_ARCNET */
++#ifdef ARPHRD_IEEE802154
+ case ARPHRD_IEEE802154:
+ iface->sllao.if_hwaddr_len = 64;
+ iface->sllao.if_prefix_len = 64;
+ break;
++#endif
+ default:
+ iface->sllao.if_hwaddr_len = -1;
+ iface->sllao.if_prefix_len = -1;
+@@ -371,9 +373,15 @@ static char const *hwstr(unsigned short sa_family)
+ case ARPHRD_IEEE802154:
+ rc = "ARPHRD_IEEE802154";
+ break;
++#if ARPHRD_IEEE802154_MONITOR
++ case ARPHRD_IEEE802154_MONITOR:
++ rc = "ARPHRD_IEEE802154_MONITOR";
++ break;
++#elif ARPHRD_IEEE802154_PHY
+ case ARPHRD_IEEE802154_PHY:
+ rc = "ARPHRD_IEEE802154_PHY";
+ break;
++#endif
+ case ARPHRD_VOID:
+ rc = "ARPHRD_VOID";
+ break;
+diff --git a/includes.h b/includes.h
+index 39a36d2..d2449c4 100644
+--- a/includes.h
++++ b/includes.h
+@@ -81,9 +81,11 @@
+ #ifdef HAVE_NET_IF_DL_H
+ #include <net/if_dl.h>
+ #endif
++
+ #ifdef HAVE_NET_IF_TYPES_H
+ #include <net/if_types.h>
+ #endif
++
+ #if defined(HAVE_NET_IF_ARP_H) && !defined(ARPHRD_ETHER)
+ #include <net/if_arp.h>
+ #endif /* defined(HAVE_NET_IF_ARP_H) && !defined(ARPHRD_ETHER) */
+@@ -100,3 +102,7 @@
+ #include <ifaddrs.h>
+ #endif
+
++#ifdef HAVE_LINUX_IF_ARP_H
++#include <linux/if_arp.h>
++#endif
++
+--
+2.3.6
+
diff --git a/net-misc/radvd/files/radvd.conf b/net-misc/radvd/files/radvd.conf
new file mode 100644
index 000000000000..d1a95b8dea20
--- /dev/null
+++ b/net-misc/radvd/files/radvd.conf
@@ -0,0 +1,11 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Extra options to pass to radvd
+OPTIONS=""
+
+# Set this to "no" to tell the init script NOT to set up IPv6 forwarding
+# using /proc/sys/net/ipv6/conf/all/forwarding
+# Only change this if you know what you're doing!
+FORWARD="yes"
diff --git a/net-misc/radvd/files/radvd.service b/net-misc/radvd/files/radvd.service
new file mode 100644
index 000000000000..d9095f625a9c
--- /dev/null
+++ b/net-misc/radvd/files/radvd.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Router advertisement daemon for IPv6
+Documentation=man:radvd(8)
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/radvd --username radvd --logmethod stderr --debug 0
+ExecReload=/usr/sbin/radvd --configtest ; \
+ /bin/kill -HUP $MAINPID
+CPUSchedulingPolicy=idle
+PIDFile=/run/radvd/radvd.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/radvd/files/radvd.tmpfilesd b/net-misc/radvd/files/radvd.tmpfilesd
new file mode 100644
index 000000000000..26f203d1aaa7
--- /dev/null
+++ b/net-misc/radvd/files/radvd.tmpfilesd
@@ -0,0 +1 @@
+d /run/radvd 0755 radvd radvd
diff --git a/net-misc/radvd/metadata.xml b/net-misc/radvd/metadata.xml
new file mode 100644
index 000000000000..74f40b3dcdab
--- /dev/null
+++ b/net-misc/radvd/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <maintainer>
+ <email>prometheanfire@gentoo.org</email>
+ <name>Matthew Thode</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/radvd/radvd-1.15.ebuild b/net-misc/radvd/radvd-1.15.ebuild
new file mode 100644
index 000000000000..371d27df623d
--- /dev/null
+++ b/net-misc/radvd/radvd-1.15.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit systemd user eutils
+
+DESCRIPTION="Linux IPv6 Router Advertisement Daemon"
+HOMEPAGE="http://v6web.litech.org/radvd/"
+SRC_URI="http://v6web.litech.org/radvd/dist/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sparc ~x86 ~x86-fbsd"
+IUSE="kernel_FreeBSD selinux"
+
+CDEPEND="dev-libs/libdaemon"
+DEPEND="${CDEPEND}
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-radvd )
+"
+
+DOCS=( CHANGES-1 README TODO radvd.conf.example )
+
+pkg_setup() {
+ enewgroup radvd
+ enewuser radvd -1 -1 /dev/null radvd
+
+ # force ownership of radvd user and group (bug #19647)
+ [[ -d ${ROOT}/var/run/radvd ]] && chown radvd:radvd "${ROOT}"/var/run/radvd
+}
+
+src_configure() {
+ econf --with-pidfile=/var/run/radvd/radvd.pid \
+ --disable-silent-rules
+}
+
+src_install() {
+ default
+
+ dohtml INTRO.html
+
+ newinitd "${FILESDIR}"/${PN}-1.9.1.init ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf ${PN}
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+
+ if use kernel_FreeBSD ; then
+ sed -i -e \
+ 's/^SYSCTL_FORWARD=.*$/SYSCTL_FORWARD=net.inet6.ip6.forwarding/g' \
+ "${D}"/etc/init.d/${PN} || die
+ fi
+}
+
+pkg_postinst() {
+ einfo
+ elog "Please create a configuratoion ${ROOT}etc/radvd.conf."
+ elog "See ${ROOT}usr/share/doc/${PF} for an example."
+ einfo
+ elog "grsecurity users should allow a specific group to read /proc"
+ elog "and add the radvd user to that group, otherwise radvd may"
+ elog "segfault on startup."
+}
diff --git a/net-misc/radvd/radvd-1.9.8.ebuild b/net-misc/radvd/radvd-1.9.8.ebuild
new file mode 100644
index 000000000000..2012bc2c67d8
--- /dev/null
+++ b/net-misc/radvd/radvd-1.9.8.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit systemd user eutils
+
+DESCRIPTION="Linux IPv6 Router Advertisement Daemon"
+HOMEPAGE="http://v6web.litech.org/radvd/"
+SRC_URI="http://v6web.litech.org/radvd/dist/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ppc sparc x86 ~x86-fbsd"
+IUSE="kernel_FreeBSD selinux"
+
+CDEPEND="dev-libs/libdaemon"
+DEPEND="${CDEPEND}
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-radvd )"
+DOCS=( CHANGES README TODO radvd.conf.example )
+
+pkg_setup() {
+ enewgroup radvd
+ enewuser radvd -1 -1 /dev/null radvd
+
+ # force ownership of radvd user and group (bug #19647)
+ [[ -d ${ROOT}/var/run/radvd ]] && chown radvd:radvd "${ROOT}"/var/run/radvd
+}
+
+src_configure() {
+ econf --with-pidfile=/var/run/radvd/radvd.pid
+}
+
+src_install() {
+ default
+
+ dohtml INTRO.html
+
+ newinitd "${FILESDIR}"/${PN}-1.9.1.init ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf ${PN}
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+
+ if use kernel_FreeBSD ; then
+ sed -i -e \
+ 's/^SYSCTL_FORWARD=.*$/SYSCTL_FORWARD=net.inet6.ip6.forwarding/g' \
+ "${D}"/etc/init.d/${PN} || die
+ fi
+}
+
+pkg_postinst() {
+ einfo
+ elog "Please create a configuratoion ${ROOT}etc/radvd.conf."
+ elog "See ${ROOT}usr/share/doc/${PF} for an example."
+ einfo
+ elog "grsecurity users should allow a specific group to read /proc"
+ elog "and add the radvd user to that group, otherwise radvd may"
+ elog "segfault on startup."
+}
diff --git a/net-misc/radvd/radvd-2.10.ebuild b/net-misc/radvd/radvd-2.10.ebuild
new file mode 100644
index 000000000000..5fd09726c641
--- /dev/null
+++ b/net-misc/radvd/radvd-2.10.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit systemd user eutils readme.gentoo
+
+DESCRIPTION="Linux IPv6 Router Advertisement Daemon"
+HOMEPAGE="http://v6web.litech.org/radvd/"
+SRC_URI="http://v6web.litech.org/radvd/dist/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ppc sparc x86 ~x86-fbsd"
+IUSE="kernel_FreeBSD selinux"
+
+CDEPEND="dev-libs/libdaemon"
+DEPEND="${CDEPEND}
+ dev-libs/check
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-radvd )
+"
+DOCS=( CHANGES README TODO radvd.conf.example )
+
+pkg_setup() {
+ enewgroup radvd
+ enewuser radvd -1 -1 /dev/null radvd
+
+ # force ownership of radvd user and group (bug #19647)
+ [[ -d ${ROOT}/var/run/radvd ]] && chown radvd:radvd "${ROOT}"/var/run/radvd
+}
+
+src_configure() {
+ econf --with-pidfile=/var/run/radvd/radvd.pid \
+ --disable-silent-rules
+}
+
+src_install() {
+ default
+
+ dohtml INTRO.html
+
+ newinitd "${FILESDIR}"/${PN}-1.9.1.init ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf ${PN}
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}.conf
+
+ if use kernel_FreeBSD ; then
+ sed -i -e \
+ 's/^SYSCTL_FORWARD=.*$/SYSCTL_FORWARD=net.inet6.ip6.forwarding/g' \
+ "${D}"/etc/init.d/${PN} || die
+ fi
+
+ readme.gentoo_create_doc
+}
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="Please create a configuratoion ${ROOT}etc/radvd.conf.
+See ${ROOT}usr/share/doc/${PF} for an example.
+
+grsecurity users should allow a specific group to read /proc
+and add the radvd user to that group, otherwise radvd may
+segfault on startup."
diff --git a/net-misc/radvd/radvd-2.11-r1.ebuild b/net-misc/radvd/radvd-2.11-r1.ebuild
new file mode 100644
index 000000000000..d7e194998fd8
--- /dev/null
+++ b/net-misc/radvd/radvd-2.11-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit systemd user eutils readme.gentoo
+
+DESCRIPTION="Linux IPv6 Router Advertisement Daemon"
+HOMEPAGE="http://v6web.litech.org/radvd/"
+SRC_URI="http://v6web.litech.org/radvd/dist/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sparc ~x86 ~x86-fbsd"
+IUSE="kernel_FreeBSD selinux test"
+
+CDEPEND="dev-libs/libdaemon"
+DEPEND="${CDEPEND}
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+ test? ( dev-libs/check )"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-radvd )
+"
+DOCS=( CHANGES README TODO radvd.conf.example )
+
+pkg_setup() {
+ enewgroup radvd
+ enewuser radvd -1 -1 /dev/null radvd
+
+ # force ownership of radvd user and group (bug #19647)
+ [[ -d ${ROOT}/var/run/radvd ]] && chown radvd:radvd "${ROOT}"/var/run/radvd
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.10-musl-libc-fix.patch
+}
+
+src_configure() {
+ econf --with-pidfile=/var/run/radvd/radvd.pid \
+ --disable-silent-rules \
+ $(use_with test check)
+}
+
+src_install() {
+ default
+
+ dohtml INTRO.html
+
+ newinitd "${FILESDIR}"/${PN}-1.9.1.init ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf ${PN}
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}.conf
+
+ if use kernel_FreeBSD ; then
+ sed -i -e \
+ 's/^SYSCTL_FORWARD=.*$/SYSCTL_FORWARD=net.inet6.ip6.forwarding/g' \
+ "${D}"/etc/init.d/${PN} || die
+ fi
+
+ readme.gentoo_create_doc
+}
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="Please create a configuratoion ${ROOT}etc/radvd.conf.
+See ${ROOT}usr/share/doc/${PF} for an example.
+
+grsecurity users should allow a specific group to read /proc
+and add the radvd user to that group, otherwise radvd may
+segfault on startup."
diff --git a/net-misc/radvd/radvd-2.11.ebuild b/net-misc/radvd/radvd-2.11.ebuild
new file mode 100644
index 000000000000..9da97dbf3ada
--- /dev/null
+++ b/net-misc/radvd/radvd-2.11.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit systemd user eutils readme.gentoo
+
+DESCRIPTION="Linux IPv6 Router Advertisement Daemon"
+HOMEPAGE="http://v6web.litech.org/radvd/"
+SRC_URI="http://v6web.litech.org/radvd/dist/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sparc ~x86 ~x86-fbsd"
+IUSE="kernel_FreeBSD selinux test"
+
+CDEPEND="dev-libs/libdaemon"
+DEPEND="${CDEPEND}
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+ test? ( dev-libs/check )"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-radvd )
+"
+DOCS=( CHANGES README TODO radvd.conf.example )
+
+pkg_setup() {
+ enewgroup radvd
+ enewuser radvd -1 -1 /dev/null radvd
+
+ # force ownership of radvd user and group (bug #19647)
+ [[ -d ${ROOT}/var/run/radvd ]] && chown radvd:radvd "${ROOT}"/var/run/radvd
+}
+
+src_configure() {
+ econf --with-pidfile=/var/run/radvd/radvd.pid \
+ --disable-silent-rules \
+ $(use_with test check)
+}
+
+src_install() {
+ default
+
+ dohtml INTRO.html
+
+ newinitd "${FILESDIR}"/${PN}-1.9.1.init ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf ${PN}
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}.conf
+
+ if use kernel_FreeBSD ; then
+ sed -i -e \
+ 's/^SYSCTL_FORWARD=.*$/SYSCTL_FORWARD=net.inet6.ip6.forwarding/g' \
+ "${D}"/etc/init.d/${PN} || die
+ fi
+
+ readme.gentoo_create_doc
+}
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="Please create a configuratoion ${ROOT}etc/radvd.conf.
+See ${ROOT}usr/share/doc/${PF} for an example.
+
+grsecurity users should allow a specific group to read /proc
+and add the radvd user to that group, otherwise radvd may
+segfault on startup."
diff --git a/net-misc/rancid-git/Manifest b/net-misc/rancid-git/Manifest
new file mode 100644
index 000000000000..71132941fcba
--- /dev/null
+++ b/net-misc/rancid-git/Manifest
@@ -0,0 +1 @@
+DIST rancid-git-2.3.8.tar.gz 388121 SHA256 c90c80fb25354c6d7a8ae7c4137ca96625338a8cbe6ad5756b073e0d4f257b31 SHA512 14a4fa097a31e2772d83e72cdcfb5488bf3e1c69e8065286c52eb554a392eb4257a0dc38fad5d79819fb417e699fb4e2c265ef5cfbf018418d9550eb653fa551 WHIRLPOOL 513c5f4ee27fd84ce12dff145652802350a00e9c9f9d3e5b5fb906a3f03d617cc73459dd658586dd5f81e21e7eca3220ba77890a59c4b06fc928fae3f0b6c123
diff --git a/net-misc/rancid-git/files/rancid-2.3.8-buildsystem.patch b/net-misc/rancid-git/files/rancid-2.3.8-buildsystem.patch
new file mode 100644
index 000000000000..4a06b5c63723
--- /dev/null
+++ b/net-misc/rancid-git/files/rancid-2.3.8-buildsystem.patch
@@ -0,0 +1,64 @@
+--- rancid-2.3.8/configure.in
++++ rancid-2.3.8/configure.in
+@@ -17,7 +17,7 @@
+ dnl default install location
+ AC_PREFIX_DEFAULT(/usr/local/rancid)
+
+-dnl AM_MAINTAINER_MODE()
++AM_MAINTAINER_MODE()
+
+ dnl AC_CONFIG_SUBDIRS(util)
+
+@@ -35,7 +35,6 @@
+
+ # compiler specifics
+ AC_PROG_CC
+-AM_C_PROTOTYPES
+ AC_PROG_CPP
+ AC_C_CONST
+ AC_C_INLINE
+@@ -212,7 +212,7 @@
+ # is good enough -- if we can't find GNU tar, we don't really care.
+ AC_CHECK_PROGS(TAR, gnutar gtar tar)
+
+-AC_CHECK_PROGS(AUTOMAKE, automake)
++dnl AC_CHECK_PROGS(AUTOMAKE, automake)
+
+ dnl locate perl 5 and expect.
+ AC_PROG_INSTALL
+--- rancid-2.3.8/Makefile.am
++++ rancid-2.3.8/Makefile.am
+@@ -24,7 +24,7 @@
+
+ @SET_MAKE@
+
+-pkgdata_DATA = COPYING CHANGES FAQ README README.lg UPGRADING cloginrc.sample
++dist_doc_DATA = COPYING CHANGES FAQ README README.lg UPGRADING cloginrc.sample
+ EXTRA_DIST = BUGS Todo configure install-sh \
+ mkinstalldirs Makefile.in Todo $(pkgdata_DATA)
+ #DIST_COMMON =
+--- rancid-2.3.8/share/Makefile.am
++++ rancid-2.3.8/share/Makefile.am
+@@ -50,8 +50,9 @@
+
+ pkgdata_SCRIPTS= rancid-cvspurge rtrfilter downreport
+ dist_pkgdata_SCRIPTS=getipacctg
+-dist_pkgdata_DATA=README.misc cisco-load.exp cisco-reload.exp \
+- index.html lgnotes.html
++dist_pkgdata_DATA=cisco-load.exp cisco-reload.exp
++dist_doc_DATA=README.misc
++dist_html_DATA=index.html lgnotes.html
+
+ EXTRA_DIST = rancid-cvspurge.in rancid.spec rtrfilter.in downreport.in
+
+--- rancid-2.3.8/etc/Makefile.am
++++ rancid-2.3.8/etc/Makefile.am
+@@ -48,7 +48,7 @@
+ #AUTOMAKE_OPTIONS=foreign no-dependencies
+ AUTOMAKE_OPTIONS=foreign
+
+-pkgdata_DATA= lg.conf.sample rancid.conf.sample
++dist_doc_DATA= lg.conf.sample rancid.conf.sample
+ EXTRA_DIST= $(pkgdata_DATA:%=%.in)
+
+ CLEANFILES= $(pkgdata_DATA)
diff --git a/net-misc/rancid-git/files/rancid-2.3.8-config.patch b/net-misc/rancid-git/files/rancid-2.3.8-config.patch
new file mode 100644
index 000000000000..f39f28382da8
--- /dev/null
+++ b/net-misc/rancid-git/files/rancid-2.3.8-config.patch
@@ -0,0 +1,33 @@
+--- etc/rancid.conf.sample.in
++++ etc/rancid.conf.sample.in
+@@ -42,7 +42,10 @@
+ RCSSYS=@RCSSYS@; export RCSSYS
+ #
+ # if ACLSORT is NO, access-lists will NOT be sorted.
+-#ACLSORT=YES; export ACLSORT
++#
++#Gentoo - changing default to NO because access-list order matters in most instances
++#and many people expect to use rancid as a backup system
++ACLSORT=NO; export ACLSORT
+ #
+ # if NOPIPE is set, temp files will be used instead of a cmd pipe during
+ # collection from the router(s).
+@@ -50,10 +53,16 @@
+ #
+ # FILTER_PWDS determines which passwords are filtered from configs by the
+ # value set (NO | YES | ALL). see rancid.conf(5).
+-#FILTER_PWDS=YES; export FILTER_PWDS
++#
++#Gentoo - changing default to ALL; diffs are emailed and even the most secure
++#password hashes on most routers are easily brute-forceable with modern systems
++FILTER_PWDS=ALL; export FILTER_PWDS
+ #
+ # if NOCOMMSTR is set, snmp community strings will be stripped from the configs
+-#NOCOMMSTR=YES; export NOCOMMSTR
++#
++#Gentoo - changing default to YES; diffs are emailed and SNMP communities
++#can be just as dangerous as passwords
++NOCOMMSTR=YES; export NOCOMMSTR
+ #
+ # How many times failed collections are retried (for each run) before
+ # giving up. Minimum: 1
diff --git a/net-misc/rancid-git/files/rancid-2.3.8-mailprefix.patch b/net-misc/rancid-git/files/rancid-2.3.8-mailprefix.patch
new file mode 100644
index 000000000000..171a380679dc
--- /dev/null
+++ b/net-misc/rancid-git/files/rancid-2.3.8-mailprefix.patch
@@ -0,0 +1,178 @@
+--- rancid-2.3.8/bin/Makefile.am
++++ rancid-2.3.8/bin/Makefile.am
+@@ -96,8 +96,6 @@
+ -e 's,@PERLV\@,$(PERLV),g' \
+ -e 's,@PERLV_PATH\@,$(PERLV_PATH),g' \
+ -e 's,@LG_PING_CMD\@,$(LG_PING_CMD),g' \
+- -e 's,@ADMINMAILPLUS\@,$(ADMINMAILPLUS),g' \
+- -e 's,@MAILPLUS\@,$(MAILPLUS),g' \
+ -e 's,@PACKAGE\@,$(PACKAGE),g' \
+ -e 's,@SVN_FSTYPE\@,$(SVN_FSTYPE),g' \
+ -e 's,@VERSION\@,$(VERSION),g' \
+--- rancid-2.3.8/bin/control_rancid.in
++++ rancid-2.3.8/bin/control_rancid.in
+@@ -118,8 +118,8 @@
+ fi
+
+ # the receipient(s) of diffs & mail options
+-mailrcpt=${mailrcpt:-"@MAILPLUS@${GROUP}${MAILDOMAIN}"}; export mailrcpt
+-adminmailrcpt=${adminmailrcpt:-"@ADMINMAILPLUS@${GROUP}${MAILDOMAIN}"};
++mailrcpt=${mailrcpt:-"${MAILPREFIX}${GROUP}${MAILDOMAIN}"}; export mailrcpt
++adminmailrcpt=${adminmailrcpt:-"${ADMINMAILPREFIX}${GROUP}${MAILDOMAIN}"};
+ export adminmailrcpt
+ set | grep MAILHEADERS= > /dev/null 2>&1
+ if [ $? -ne 0 ] ; then
+--- rancid-2.3.8/bin/rancid-run.in
++++ rancid-2.3.8/bin/rancid-run.in
+@@ -147,7 +147,7 @@
+ if [ -s $TMPDIR/.$GROUP.old ]
+ then
+ (
+- echo "To: @ADMINMAILPLUS@${GROUP}${MAILDOMAIN}"
++ echo "To: ${ADMINMAILPREFIX}${GROUP}${MAILDOMAIN}"
+ echo "Subject: rancid hung - $GROUP"
+ echo "Precedence: bulk"
+ echo ""
+--- rancid-2.3.8/configure.in
++++ rancid-2.3.8/configure.in
+@@ -163,46 +163,6 @@
+ AC_SUBST(SVN_FSTYPE)
+ rd_cv_RCSSYS=$RCSSYS
+
+-# Check for a preference for using mail addresses like rancid+group
+-# instead of the standard rancid-group
+-AC_MSG_CHECKING([whether mail addresses should be in the rancid+ form])
+-AC_ARG_ENABLE(mail-plus,
+- AS_HELP_STRING([--enable-mail-plus], [enable mail to rancid+ addresses, instead of rancid-]),
+-[if test "$enable_mail_plus" = yes; then
+- AC_MSG_RESULT(yes)
+- MAILPLUS="rancid+"
+- AC_SUBST(MAILPLUS)
+-else
+- AC_MSG_RESULT(no)
+- MAILPLUS="rancid-"
+- AC_SUBST(MAILPLUS)
+-fi],
+-[AC_MSG_RESULT(no)
+- MAILPLUS="rancid-"
+- AC_SUBST(MAILPLUS)
+-])
+-rd_cv_MAILPLUS=$MAILPLUS
+-
+-# Check for a preference for using mail addresses like rancid+admin-group
+-# instead of the standard rancid-admin-group
+-AC_MSG_CHECKING([whether admin mail addresses should be in the rancid-admin+ form])
+-AC_ARG_ENABLE(adminmail-plus,
+- AS_HELP_STRING([--enable-adminmail-plus], [enable mail to rancid-admin+ addresses, instead of rancid-admin-]),
+-[if test "$enable_adminmail_plus" = yes; then
+- AC_MSG_RESULT([rancid-admin+])
+- ADMINMAILPLUS="rancid-admin+"
+- AC_SUBST(ADMINMAILPLUS)
+-else
+- AC_MSG_RESULT([${MAILPLUS}admin-])
+- ADMINMAILPLUS="${MAILPLUS}admin-"
+- AC_SUBST(ADMINMAILPLUS)
+-fi],
+-[AC_MSG_RESULT([${MAILPLUS}admin-])
+- ADMINMAILPLUS="${MAILPLUS}admin-"
+- AC_SUBST(ADMINMAILPLUS)
+-])
+-rd_cv_ADMINMAILPLUS=$ADMINMAILPLUS
+-
+ AC_PATH_PROG(DIRNAME,dirname,no)
+
+ # locate GNU diff (one supporting the -u option)
+--- rancid-2.3.8/etc/rancid.conf.sample.in
++++ rancid-2.3.8/etc/rancid.conf.sample.in
+@@ -71,6 +71,21 @@
+ # The number of devices to collect simultaneously.
+ #PAR_COUNT=5; export PAR_COUNT
+ #
++# Define the prefixes for regular and administrative email groups
++# configuration diffs will be emailed to {MAILPREFIX}{GROUPNAME}
++# eg. rancid-routers
++# problems/errors will be emailed to {ADMINMAILPREFIX}{GROUPNAME}
++# eg. rancid-admin-routers
++#
++MAILPREFIX="rancid-"; export MAILPREFIX
++ADMINMAILPREFIX="rancid-admin-"; export ADMINMAILPREFIX
++#
++# To use a delimiter-based system instead of email aliases,
++# comment the above 2 lines and uncomment the following two lines:
++#MAILPREFIX="rancid+"; export MAILPREFIX
++#ADMINMAILPREFIX="rancid-admin+"; export ADMINMAILPREFIX
++#
++#
+ # list of rancid groups
+ #LIST_OF_GROUPS="sl joebobisp"
+ # more groups...
+--- rancid-2.3.8/man/Makefile.am
++++ rancid-2.3.8/man/Makefile.am
+@@ -79,9 +79,7 @@
+ -e 's,@bindir\@,$(bindir),g' \
+ -e 's,@localstatedir\@,$(localstatedir),g' \
+ -e 's,@sysconfdir\@,$(sysconfdir),g' \
+- -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
+- -e 's,@ADMINMAILPLUS\@,$(ADMINMAILPLUS),g' \
+- -e 's,@MAILPLUS\@,$(MAILPLUS),g'
++ -e 's,@pkgdatadir\@,$(pkgdatadir),g'
+
+ lg.conf.5: Makefile $(srcdir)/lg.conf.5.in
+ rm -f lg.conf.5 lg.conf.5.tmp; \
+--- rancid-2.3.8/man/rancid.conf.5.in
++++ rancid-2.3.8/man/rancid.conf.5.in
+@@ -81,6 +81,19 @@
+ are always filtered (e.g.: Alteon passwords).
+ .\"
+ .TP
++.B MAILPREFIX
++Sets the mail prefix that is used to generate group emails. Configuration
++diffs are emailed to an address of the form {MAILPREFIX}{GROUPNAME}
++eg. rancid-routers
++.sp
++Default: rancid-
++.B ADMINMAILPREFIX
++Sets the mail prefix that is used to generate admin group emails.
++problems/errors are emailed to an address of the form
++{ADMINMAILPREFIX}{GROUPNAME}
++eg. rancid-admin-routers
++.sp
++Default: rancid-admin-
+ .B LIST_OF_GROUPS
+ Defines a list of group names of routers separated by white-space. These
+ names become the directory names in $BASEDIR which contain the data
+@@ -104,10 +117,10 @@
+ .sp
+ .in +1i
+ .nf
+-@MAILPLUS@uofo: frank
+-@ADMINMAILPLUS@uofo: joe,bob
+-@MAILPLUS@usfs: frank
+-@ADMINMAILPLUS@usfs: joe,bob
++rancid-uofo: frank
++rancid-admin-uofo: joe,bob
++randid-usfs: frank
++rancid-admin-usfs: joe,bob
+ .fi
+ .sp
+ .in -1i
+@@ -129,7 +142,7 @@
+ .B MAILDOMAIN
+ Define the domain part of addresses for administrative and diff e-mail.
+ The value of this variable is simply appended to the normal mail addresses.
+-For example @MAILPLUS@usfs@example.com, if
++For example rancid-usfs@example.com, if
+ .B MAILDOMAIN
+ had been set to "@example.com".
+ .\"
+--- rancid-2.3.8/share/downreport.in
++++ rancid-2.3.8/share/downreport.in
+@@ -73,7 +73,7 @@
+
+ for GROUP in $LIST_OF_GROUPS; do
+ (
+- echo "To: @MAILPLUS@admin-$GROUP"
++ echo "To: ${ADMINMAILPREFIX}$GROUP"
+ echo "Subject: Down router report - $GROUP"
+ echo "$MAILHEADERS" | awk '{gsub(/\\n/,"\n");print;}'
+ echo ""
diff --git a/net-misc/rancid-git/metadata.xml b/net-misc/rancid-git/metadata.xml
new file mode 100644
index 000000000000..175f3d5aa56a
--- /dev/null
+++ b/net-misc/rancid-git/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>proxy-maintainers</herd>
+ <maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <use>
+ <flag name="git">Enable git (version control system) support</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">dotwaffle/rancid-git</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/rancid-git/rancid-git-2.3.8.ebuild b/net-misc/rancid-git/rancid-git-2.3.8.ebuild
new file mode 100644
index 000000000000..36e80302d9a6
--- /dev/null
+++ b/net-misc/rancid-git/rancid-git-2.3.8.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils readme.gentoo user
+
+DESCRIPTION="Really Awesome New Cisco confIg Differ with git extensions and support for colorized emails!"
+HOMEPAGE="http://dotwaffle.github.com/rancid-git"
+#SRC_URI="ftp://ftp.shrubbery.net/pub/${PN}/${P}.tar.gz"
+SRC_URI="https://github.com/dotwaffle/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="BSD-4"
+
+SLOT="0"
+RESTRICT="mirror"
+KEYWORDS="~amd64 ~x86"
+IUSE="+git cvs subversion"
+REQUIRED_USE="^^ ( git cvs subversion )"
+
+# app-arch/par is blocker, due to bug #455838
+DEPEND="!app-arch/par
+ dev-lang/perl
+ dev-lang/tcl:0=
+ dev-tcltk/expect
+ sys-apps/diffutils
+ git? ( dev-vcs/git )
+ cvs? ( dev-vcs/cvs )
+ subversion? ( dev-vcs/subversion )
+ || (
+ net-misc/netkit-telnetd
+ net-misc/telnet-bsd
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P/-git}-mailprefix.patch
+ epatch "${FILESDIR}"/${P/-git}-config.patch
+ epatch "${FILESDIR}"/${P/-git}-buildsystem.patch
+
+ # respect CFLAGS, bug #455840
+ sed -i -e '/^CFLAGS/d' bin/Makefile.am || die 'sed on bin/Makefile.am failed'
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --localstatedir="${EPREFIX}"/var/${PN} \
+ --enable-conf-install \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ $(use_with subversion svn fsfs) \
+ $(use_with git)
+}
+
+src_install() {
+ default
+
+ if use subversion ; then
+ sed -e 's/^RCSSYS=cvs/RCSSYS=svn/' \
+ -i "${D}"/etc/rancid.conf || die
+ fi
+
+ echo "CONFIG_PROTECT=\"${EPREFIX}/var/rancid/.cloginrc\"" > "${T}"/99${PN}
+ doenvd "${T}"/99${PN}
+
+ readme.gentoo_src_install
+}
+
+pkg_preinst() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 /bin/bash "${EPREFIX}"/var/rancid ${PN}
+
+ keepdir /var/${PN}{,/logs}
+ touch "${ED}"/var/${PN}/.cloginrc
+
+ fperms ug=rwX,o= /var/${PN}/{,logs,.cloginrc}
+ fowners ${PN}:${PN} /var/${PN}/{,logs,.cloginrc}
+}
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="Micro-HOWTO on how to get running:
+
+1) Modify MAILPREFIX, ADMINMAILPREFIX, and LIST_OF_GROUPS
+in /etc/rancid.conf:
+MAILPREFIX=\"rancid-\"
+ADMINMAILPREFIX=\"rancid-admin-\"
+LIST_OF_GROUPS=\"routers switches\"
+
+2) Setup email aliases for rancid:
+you will need to define mail aliases for {MAILPREFIX}{GROUP}
+and {ADMINMAILPREFIX}{GROUP} for each group you defined above
+How to do this depends on your mailserver
+
+3) Run rancid-cvs as the rancid user to initialise directories and
+repositories; eg. su -c /usr/bin/rancid-cvs - rancid
+Note the command is the same even if you are using subversion
+
+4) Populate /var/rancid/{GROUPNAME}/router.db with nodes
+see man 5 router.db for detailed formatting information
+
+5) Populate /var/rancid/.cloginrc with credentials
+see /usr/share/rancid/cloginrc.sample for an example
+
+6) Test clogin access with: clogin -f /var/rancid/.clogin hostname
+
+7) Add a cronjob for the rancid user to regularly call rancid-run
+eg: run crontab -u rancid -e and add the lines below
+# run rancid once an hour
+0 * * * * /usr/bin/rancid-run
+# cleanup old logfiles generated by rancid once a day
+50 23 * * * /usr/bin/find /var/rancid/logs -type f -mtime +2 -exec rm {} \;
+"
diff --git a/net-misc/rancid/Manifest b/net-misc/rancid/Manifest
new file mode 100644
index 000000000000..cec899da6286
--- /dev/null
+++ b/net-misc/rancid/Manifest
@@ -0,0 +1 @@
+DIST rancid-2.3.8.tar.gz 379908 SHA256 44e44c87a22968d5229c01d60aa46960da023a24846eef43f9e3c8d70fd5b3fb SHA512 cd071670e160f2e8268e676ae92b0d982719a2bc306aef3ef8fdbbaae398854178613eee2a139f206e799eba6c0b49dce2094db69ea57ef938e5d0c2c294a3cc WHIRLPOOL 69fbc3eef603888cfafcb5ddd445da68da4d1ca15509b1f8938de09379f9f613063487fd836f18abeffcba7d6b83b5bc2dde74825e7a263b3109dabb36f3d045
diff --git a/net-misc/rancid/files/rancid-2.3.8-buildsystem.patch b/net-misc/rancid/files/rancid-2.3.8-buildsystem.patch
new file mode 100644
index 000000000000..4a06b5c63723
--- /dev/null
+++ b/net-misc/rancid/files/rancid-2.3.8-buildsystem.patch
@@ -0,0 +1,64 @@
+--- rancid-2.3.8/configure.in
++++ rancid-2.3.8/configure.in
+@@ -17,7 +17,7 @@
+ dnl default install location
+ AC_PREFIX_DEFAULT(/usr/local/rancid)
+
+-dnl AM_MAINTAINER_MODE()
++AM_MAINTAINER_MODE()
+
+ dnl AC_CONFIG_SUBDIRS(util)
+
+@@ -35,7 +35,6 @@
+
+ # compiler specifics
+ AC_PROG_CC
+-AM_C_PROTOTYPES
+ AC_PROG_CPP
+ AC_C_CONST
+ AC_C_INLINE
+@@ -212,7 +212,7 @@
+ # is good enough -- if we can't find GNU tar, we don't really care.
+ AC_CHECK_PROGS(TAR, gnutar gtar tar)
+
+-AC_CHECK_PROGS(AUTOMAKE, automake)
++dnl AC_CHECK_PROGS(AUTOMAKE, automake)
+
+ dnl locate perl 5 and expect.
+ AC_PROG_INSTALL
+--- rancid-2.3.8/Makefile.am
++++ rancid-2.3.8/Makefile.am
+@@ -24,7 +24,7 @@
+
+ @SET_MAKE@
+
+-pkgdata_DATA = COPYING CHANGES FAQ README README.lg UPGRADING cloginrc.sample
++dist_doc_DATA = COPYING CHANGES FAQ README README.lg UPGRADING cloginrc.sample
+ EXTRA_DIST = BUGS Todo configure install-sh \
+ mkinstalldirs Makefile.in Todo $(pkgdata_DATA)
+ #DIST_COMMON =
+--- rancid-2.3.8/share/Makefile.am
++++ rancid-2.3.8/share/Makefile.am
+@@ -50,8 +50,9 @@
+
+ pkgdata_SCRIPTS= rancid-cvspurge rtrfilter downreport
+ dist_pkgdata_SCRIPTS=getipacctg
+-dist_pkgdata_DATA=README.misc cisco-load.exp cisco-reload.exp \
+- index.html lgnotes.html
++dist_pkgdata_DATA=cisco-load.exp cisco-reload.exp
++dist_doc_DATA=README.misc
++dist_html_DATA=index.html lgnotes.html
+
+ EXTRA_DIST = rancid-cvspurge.in rancid.spec rtrfilter.in downreport.in
+
+--- rancid-2.3.8/etc/Makefile.am
++++ rancid-2.3.8/etc/Makefile.am
+@@ -48,7 +48,7 @@
+ #AUTOMAKE_OPTIONS=foreign no-dependencies
+ AUTOMAKE_OPTIONS=foreign
+
+-pkgdata_DATA= lg.conf.sample rancid.conf.sample
++dist_doc_DATA= lg.conf.sample rancid.conf.sample
+ EXTRA_DIST= $(pkgdata_DATA:%=%.in)
+
+ CLEANFILES= $(pkgdata_DATA)
diff --git a/net-misc/rancid/files/rancid-2.3.8-config.patch b/net-misc/rancid/files/rancid-2.3.8-config.patch
new file mode 100644
index 000000000000..f39f28382da8
--- /dev/null
+++ b/net-misc/rancid/files/rancid-2.3.8-config.patch
@@ -0,0 +1,33 @@
+--- etc/rancid.conf.sample.in
++++ etc/rancid.conf.sample.in
+@@ -42,7 +42,10 @@
+ RCSSYS=@RCSSYS@; export RCSSYS
+ #
+ # if ACLSORT is NO, access-lists will NOT be sorted.
+-#ACLSORT=YES; export ACLSORT
++#
++#Gentoo - changing default to NO because access-list order matters in most instances
++#and many people expect to use rancid as a backup system
++ACLSORT=NO; export ACLSORT
+ #
+ # if NOPIPE is set, temp files will be used instead of a cmd pipe during
+ # collection from the router(s).
+@@ -50,10 +53,16 @@
+ #
+ # FILTER_PWDS determines which passwords are filtered from configs by the
+ # value set (NO | YES | ALL). see rancid.conf(5).
+-#FILTER_PWDS=YES; export FILTER_PWDS
++#
++#Gentoo - changing default to ALL; diffs are emailed and even the most secure
++#password hashes on most routers are easily brute-forceable with modern systems
++FILTER_PWDS=ALL; export FILTER_PWDS
+ #
+ # if NOCOMMSTR is set, snmp community strings will be stripped from the configs
+-#NOCOMMSTR=YES; export NOCOMMSTR
++#
++#Gentoo - changing default to YES; diffs are emailed and SNMP communities
++#can be just as dangerous as passwords
++NOCOMMSTR=YES; export NOCOMMSTR
+ #
+ # How many times failed collections are retried (for each run) before
+ # giving up. Minimum: 1
diff --git a/net-misc/rancid/files/rancid-2.3.8-mailprefix.patch b/net-misc/rancid/files/rancid-2.3.8-mailprefix.patch
new file mode 100644
index 000000000000..171a380679dc
--- /dev/null
+++ b/net-misc/rancid/files/rancid-2.3.8-mailprefix.patch
@@ -0,0 +1,178 @@
+--- rancid-2.3.8/bin/Makefile.am
++++ rancid-2.3.8/bin/Makefile.am
+@@ -96,8 +96,6 @@
+ -e 's,@PERLV\@,$(PERLV),g' \
+ -e 's,@PERLV_PATH\@,$(PERLV_PATH),g' \
+ -e 's,@LG_PING_CMD\@,$(LG_PING_CMD),g' \
+- -e 's,@ADMINMAILPLUS\@,$(ADMINMAILPLUS),g' \
+- -e 's,@MAILPLUS\@,$(MAILPLUS),g' \
+ -e 's,@PACKAGE\@,$(PACKAGE),g' \
+ -e 's,@SVN_FSTYPE\@,$(SVN_FSTYPE),g' \
+ -e 's,@VERSION\@,$(VERSION),g' \
+--- rancid-2.3.8/bin/control_rancid.in
++++ rancid-2.3.8/bin/control_rancid.in
+@@ -118,8 +118,8 @@
+ fi
+
+ # the receipient(s) of diffs & mail options
+-mailrcpt=${mailrcpt:-"@MAILPLUS@${GROUP}${MAILDOMAIN}"}; export mailrcpt
+-adminmailrcpt=${adminmailrcpt:-"@ADMINMAILPLUS@${GROUP}${MAILDOMAIN}"};
++mailrcpt=${mailrcpt:-"${MAILPREFIX}${GROUP}${MAILDOMAIN}"}; export mailrcpt
++adminmailrcpt=${adminmailrcpt:-"${ADMINMAILPREFIX}${GROUP}${MAILDOMAIN}"};
+ export adminmailrcpt
+ set | grep MAILHEADERS= > /dev/null 2>&1
+ if [ $? -ne 0 ] ; then
+--- rancid-2.3.8/bin/rancid-run.in
++++ rancid-2.3.8/bin/rancid-run.in
+@@ -147,7 +147,7 @@
+ if [ -s $TMPDIR/.$GROUP.old ]
+ then
+ (
+- echo "To: @ADMINMAILPLUS@${GROUP}${MAILDOMAIN}"
++ echo "To: ${ADMINMAILPREFIX}${GROUP}${MAILDOMAIN}"
+ echo "Subject: rancid hung - $GROUP"
+ echo "Precedence: bulk"
+ echo ""
+--- rancid-2.3.8/configure.in
++++ rancid-2.3.8/configure.in
+@@ -163,46 +163,6 @@
+ AC_SUBST(SVN_FSTYPE)
+ rd_cv_RCSSYS=$RCSSYS
+
+-# Check for a preference for using mail addresses like rancid+group
+-# instead of the standard rancid-group
+-AC_MSG_CHECKING([whether mail addresses should be in the rancid+ form])
+-AC_ARG_ENABLE(mail-plus,
+- AS_HELP_STRING([--enable-mail-plus], [enable mail to rancid+ addresses, instead of rancid-]),
+-[if test "$enable_mail_plus" = yes; then
+- AC_MSG_RESULT(yes)
+- MAILPLUS="rancid+"
+- AC_SUBST(MAILPLUS)
+-else
+- AC_MSG_RESULT(no)
+- MAILPLUS="rancid-"
+- AC_SUBST(MAILPLUS)
+-fi],
+-[AC_MSG_RESULT(no)
+- MAILPLUS="rancid-"
+- AC_SUBST(MAILPLUS)
+-])
+-rd_cv_MAILPLUS=$MAILPLUS
+-
+-# Check for a preference for using mail addresses like rancid+admin-group
+-# instead of the standard rancid-admin-group
+-AC_MSG_CHECKING([whether admin mail addresses should be in the rancid-admin+ form])
+-AC_ARG_ENABLE(adminmail-plus,
+- AS_HELP_STRING([--enable-adminmail-plus], [enable mail to rancid-admin+ addresses, instead of rancid-admin-]),
+-[if test "$enable_adminmail_plus" = yes; then
+- AC_MSG_RESULT([rancid-admin+])
+- ADMINMAILPLUS="rancid-admin+"
+- AC_SUBST(ADMINMAILPLUS)
+-else
+- AC_MSG_RESULT([${MAILPLUS}admin-])
+- ADMINMAILPLUS="${MAILPLUS}admin-"
+- AC_SUBST(ADMINMAILPLUS)
+-fi],
+-[AC_MSG_RESULT([${MAILPLUS}admin-])
+- ADMINMAILPLUS="${MAILPLUS}admin-"
+- AC_SUBST(ADMINMAILPLUS)
+-])
+-rd_cv_ADMINMAILPLUS=$ADMINMAILPLUS
+-
+ AC_PATH_PROG(DIRNAME,dirname,no)
+
+ # locate GNU diff (one supporting the -u option)
+--- rancid-2.3.8/etc/rancid.conf.sample.in
++++ rancid-2.3.8/etc/rancid.conf.sample.in
+@@ -71,6 +71,21 @@
+ # The number of devices to collect simultaneously.
+ #PAR_COUNT=5; export PAR_COUNT
+ #
++# Define the prefixes for regular and administrative email groups
++# configuration diffs will be emailed to {MAILPREFIX}{GROUPNAME}
++# eg. rancid-routers
++# problems/errors will be emailed to {ADMINMAILPREFIX}{GROUPNAME}
++# eg. rancid-admin-routers
++#
++MAILPREFIX="rancid-"; export MAILPREFIX
++ADMINMAILPREFIX="rancid-admin-"; export ADMINMAILPREFIX
++#
++# To use a delimiter-based system instead of email aliases,
++# comment the above 2 lines and uncomment the following two lines:
++#MAILPREFIX="rancid+"; export MAILPREFIX
++#ADMINMAILPREFIX="rancid-admin+"; export ADMINMAILPREFIX
++#
++#
+ # list of rancid groups
+ #LIST_OF_GROUPS="sl joebobisp"
+ # more groups...
+--- rancid-2.3.8/man/Makefile.am
++++ rancid-2.3.8/man/Makefile.am
+@@ -79,9 +79,7 @@
+ -e 's,@bindir\@,$(bindir),g' \
+ -e 's,@localstatedir\@,$(localstatedir),g' \
+ -e 's,@sysconfdir\@,$(sysconfdir),g' \
+- -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
+- -e 's,@ADMINMAILPLUS\@,$(ADMINMAILPLUS),g' \
+- -e 's,@MAILPLUS\@,$(MAILPLUS),g'
++ -e 's,@pkgdatadir\@,$(pkgdatadir),g'
+
+ lg.conf.5: Makefile $(srcdir)/lg.conf.5.in
+ rm -f lg.conf.5 lg.conf.5.tmp; \
+--- rancid-2.3.8/man/rancid.conf.5.in
++++ rancid-2.3.8/man/rancid.conf.5.in
+@@ -81,6 +81,19 @@
+ are always filtered (e.g.: Alteon passwords).
+ .\"
+ .TP
++.B MAILPREFIX
++Sets the mail prefix that is used to generate group emails. Configuration
++diffs are emailed to an address of the form {MAILPREFIX}{GROUPNAME}
++eg. rancid-routers
++.sp
++Default: rancid-
++.B ADMINMAILPREFIX
++Sets the mail prefix that is used to generate admin group emails.
++problems/errors are emailed to an address of the form
++{ADMINMAILPREFIX}{GROUPNAME}
++eg. rancid-admin-routers
++.sp
++Default: rancid-admin-
+ .B LIST_OF_GROUPS
+ Defines a list of group names of routers separated by white-space. These
+ names become the directory names in $BASEDIR which contain the data
+@@ -104,10 +117,10 @@
+ .sp
+ .in +1i
+ .nf
+-@MAILPLUS@uofo: frank
+-@ADMINMAILPLUS@uofo: joe,bob
+-@MAILPLUS@usfs: frank
+-@ADMINMAILPLUS@usfs: joe,bob
++rancid-uofo: frank
++rancid-admin-uofo: joe,bob
++randid-usfs: frank
++rancid-admin-usfs: joe,bob
+ .fi
+ .sp
+ .in -1i
+@@ -129,7 +142,7 @@
+ .B MAILDOMAIN
+ Define the domain part of addresses for administrative and diff e-mail.
+ The value of this variable is simply appended to the normal mail addresses.
+-For example @MAILPLUS@usfs@example.com, if
++For example rancid-usfs@example.com, if
+ .B MAILDOMAIN
+ had been set to "@example.com".
+ .\"
+--- rancid-2.3.8/share/downreport.in
++++ rancid-2.3.8/share/downreport.in
+@@ -73,7 +73,7 @@
+
+ for GROUP in $LIST_OF_GROUPS; do
+ (
+- echo "To: @MAILPLUS@admin-$GROUP"
++ echo "To: ${ADMINMAILPREFIX}$GROUP"
+ echo "Subject: Down router report - $GROUP"
+ echo "$MAILHEADERS" | awk '{gsub(/\\n/,"\n");print;}'
+ echo ""
diff --git a/net-misc/rancid/metadata.xml b/net-misc/rancid/metadata.xml
new file mode 100644
index 000000000000..6d26af1b96cb
--- /dev/null
+++ b/net-misc/rancid/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>andrew@ahamilto.net</email>
+<name>Andrew Hamilton</name>
+</maintainer>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+<herd>proxy-maintainers</herd>
+<longdescription lang="en">
+</longdescription>
+</pkgmetadata>
+
diff --git a/net-misc/rancid/rancid-2.3.8.ebuild b/net-misc/rancid/rancid-2.3.8.ebuild
new file mode 100644
index 000000000000..7008aacb0ed3
--- /dev/null
+++ b/net-misc/rancid/rancid-2.3.8.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils readme.gentoo user
+
+DESCRIPTION="Really Awesome New Cisco confIg Differ"
+HOMEPAGE="http://www.shrubbery.net/rancid/"
+SRC_URI="ftp://ftp.shrubbery.net/pub/${PN}/${P}.tar.gz"
+LICENSE="BSD-4"
+
+SLOT="0"
+RESTRICT="mirror"
+KEYWORDS="~amd64 ~x86"
+IUSE="+cvs subversion"
+
+REQUIRED_USE="^^ ( cvs subversion )"
+
+# app-arch/par is blocker, due to bug #455838
+DEPEND="
+ !app-arch/par
+ dev-lang/perl
+ dev-lang/tcl:0=
+ dev-tcltk/expect
+ sys-apps/diffutils
+ cvs? ( dev-vcs/cvs )
+ subversion? ( dev-vcs/subversion )
+ || (
+ net-misc/netkit-telnetd
+ net-misc/telnet-bsd
+ )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-mailprefix.patch
+ epatch "${FILESDIR}"/${P}-config.patch
+ epatch "${FILESDIR}"/${P}-buildsystem.patch
+
+ # respect CFLAGS, bug #455840
+ sed -i -e '/^CFLAGS/d' bin/Makefile.am || die 'sed on bin/Makefile.am failed'
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --localstatedir="${EPREFIX}"/var/${PN} \
+ --enable-conf-install \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ $(use subversion && echo "--with-svn=fsfs")
+}
+
+src_install() {
+ default
+
+ if use subversion ; then
+ sed -e 's/^RCSSYS=cvs/RCSSYS=svn/' \
+ -i "${D}"/etc/rancid.conf || die
+ fi
+
+ echo "CONFIG_PROTECT=\"${EPREFIX}/var/rancid/.cloginrc\"" > "${T}"/99${PN}
+ doenvd "${T}"/99${PN}
+
+ readme.gentoo_src_install
+}
+
+pkg_preinst() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 /bin/bash "${EPREFIX}"/var/rancid ${PN}
+
+ keepdir /var/${PN}{,/logs}
+ touch "${ED}"/var/${PN}/.cloginrc
+
+ fperms ug=rwX,o= /var/${PN}/{,logs,.cloginrc}
+ fowners ${PN}:${PN} /var/${PN}/{,logs,.cloginrc}
+}
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="Micro-HOWTO on how to get running:
+
+1) Modify MAILPREFIX, ADMINMAILPREFIX, and LIST_OF_GROUPS
+in /etc/rancid.conf:
+MAILPREFIX=\"rancid-\"
+ADMINMAILPREFIX=\"rancid-admin-\"
+LIST_OF_GROUPS=\"routers switches\"
+
+2) Setup email aliases for rancid:
+you will need to define mail aliases for {MAILPREFIX}{GROUP}
+and {ADMINMAILPREFIX}{GROUP} for each group you defined above
+How to do this depends on your mailserver
+
+3) Run rancid-cvs as the rancid user to initialise directories and
+repositories; eg. su -c /usr/bin/rancid-cvs - rancid
+Note the command is the same even if you are using subversion
+
+4) Populate /var/rancid/{GROUPNAME}/router.db with nodes
+see man 5 router.db for detailed formatting information
+
+5) Populate /var/rancid/.cloginrc with credentials
+see /usr/share/rancid/cloginrc.sample for an example
+
+6) Test clogin access with: clogin -f /var/rancid/.clogin hostname
+
+7) Add a cronjob for the rancid user to regularly call rancid-run
+eg: run crontab -u rancid -e and add the lines below
+# run rancid once an hour
+0 * * * * /usr/bin/rancid-run
+# cleanup old logfiles generated by rancid once a day
+50 23 * * * /usr/bin/find /var/rancid/logs -type f -mtime +2 -exec rm {} \;
+"
diff --git a/net-misc/rdate/Manifest b/net-misc/rdate/Manifest
new file mode 100644
index 000000000000..b763d1509562
--- /dev/null
+++ b/net-misc/rdate/Manifest
@@ -0,0 +1 @@
+DIST rdate-1.4.tar.gz 11500 SHA256 c8b4a026fa13f22bffe96fe0800b6ac67de72e9f62dfe5b74f1910a9179da4ee SHA512 ea9d62af3aa58fb7bb2bdce257cc23758f103ac056e4d6a8b44be0e41c44dff49e78bdb03789e3bf2957e74997c2f1c0376fdc659b4f39d89e43ef139a51f996 WHIRLPOOL 31f048ebaeabde6776beae972d44e2454b1903563939e8a233f5ceb8d9c04f082bae01d390854b060a52cfa19bc82d9caa93bf5c79b9343b7f9283806ac7e8bd
diff --git a/net-misc/rdate/files/rdate-confd b/net-misc/rdate/files/rdate-confd
new file mode 100644
index 000000000000..fba3d73ba6af
--- /dev/null
+++ b/net-misc/rdate/files/rdate-confd
@@ -0,0 +1,17 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# the NTP server to get the date from
+RDATE_SERVER="pool.ntp.org"
+
+# Options to pass to rdate
+# "-s" is mandatory to set the system time, and
+# is passed regardless of this variable.
+RDATE_OPTS="-u"
+
+# How long to wait (in seconds) before giving up.
+# Useful for when you boot and DNS/internet isn't
+# really available but you have your net interface
+# come up with say a static IP.
+RDATE_TIMEOUT=10
diff --git a/net-misc/rdate/files/rdate-initd-1.4-r3 b/net-misc/rdate/files/rdate-initd-1.4-r3
new file mode 100644
index 000000000000..efb6edbfa62d
--- /dev/null
+++ b/net-misc/rdate/files/rdate-initd-1.4-r3
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ before cron
+ need net
+ use dns
+}
+
+checkconfig() {
+ if [ -z "${RDATE_SERVER}" ] ; then
+ eerror "Please edit /etc/conf.d/rdate"
+ eerror "I need to know what server to use!"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Setting clock via rdate"
+ /usr/bin/rdate -s ${RDATE_OPTS} -t ${RDATE_TIMEOUT} ${RDATE_SERVER} > /dev/null
+ eend $? "Failed to set clock"
+}
diff --git a/net-misc/rdate/metadata.xml b/net-misc/rdate/metadata.xml
new file mode 100644
index 000000000000..c6d862855eb5
--- /dev/null
+++ b/net-misc/rdate/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-misc/rdate/rdate-1.4-r3.ebuild b/net-misc/rdate/rdate-1.4-r3.ebuild
new file mode 100644
index 000000000000..6abfaba47762
--- /dev/null
+++ b/net-misc/rdate/rdate-1.4-r3.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="use TCP or UDP to retrieve the current time of another machine"
+HOMEPAGE="http://www.apps.ietf.org/rfc/rfc868.html"
+SRC_URI="ftp://people.redhat.com/sopwith/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86"
+IUSE="ipv6"
+
+DEPEND=""
+
+src_compile() {
+ use ipv6 && append-cppflags "-DINET6"
+ emake RCFLAGS="${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" CC="$(tc-getCC)" || die
+}
+
+src_install(){
+ emake -j1 prefix="${D}/usr" install || die "make install failed"
+ newinitd "${FILESDIR}"/rdate-initd-1.4-r3 rdate
+ newconfd "${FILESDIR}"/rdate-confd rdate
+}
diff --git a/net-misc/rdate/rdate-1.4-r4.ebuild b/net-misc/rdate/rdate-1.4-r4.ebuild
new file mode 100644
index 000000000000..98836d018399
--- /dev/null
+++ b/net-misc/rdate/rdate-1.4-r4.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit flag-o-matic
+
+DESCRIPTION="use TCP or UDP to retrieve the current time of another machine"
+HOMEPAGE="http://www.apps.ietf.org/rfc/rfc868.html"
+SRC_URI="ftp://people.redhat.com/sopwith/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86"
+IUSE="ipv6"
+
+DEPEND=""
+
+src_prepare() {
+ sed -i \
+ -e '/^CFLAGS=/d' \
+ -e '/^rdate: /,+1d' \
+ -e '/\tinstall/s:\([^ ]\+\)$:$(DESTDIR)&:' \
+ Makefile || die "Sed failed!"
+}
+
+src_compile() {
+ use ipv6 && append-cppflags "-DINET6"
+ tc-export CC
+ emake
+}
+
+src_install(){
+ emake DESTDIR="${D}" install
+ newinitd "${FILESDIR}"/rdate-initd-1.4-r3 rdate
+ newconfd "${FILESDIR}"/rdate-confd rdate
+}
diff --git a/net-misc/rdesktop/Manifest b/net-misc/rdesktop/Manifest
new file mode 100644
index 000000000000..0b465ef39525
--- /dev/null
+++ b/net-misc/rdesktop/Manifest
@@ -0,0 +1,4 @@
+DIST rdesktop-1.7.1.tar.gz 298808 SHA256 d1ea43adeb23ef1ba425983670372a87cd7560baf8c94ba34215105ed2ef8479 SHA512 aaefbcda77a333ec065e42aa20e5335e48c51858dab860495528b399696c0ed6594ab9c5234716682e7ebef81d36cc6d157eedae700e0df209da9034d04887fc WHIRLPOOL a186bbf3200af87ef6e111210e3dbf9d71f2a495c44dca583673466ccc9f67606a9a9c2bf3c801addd7c3b1af26a0a03e4e63b15bb72a52d7cfb4e4f381596ae
+DIST rdesktop-1.8.1.tar.gz 314198 SHA256 76cc834b89c34d8332f3cb3889483b2ae4d4e8118eeb45a8967c77dd18228246 SHA512 31f13bf644ef16939a8c6c12709b89f59b0de276cc113c5e43ba505c5a352f515fdd1302c32f3095caca66796c9a15d574374391b4a67745fa505512499ed071 WHIRLPOOL f4df2b07c3e157c0fdd38a6477008bd0f4aa256f423a6a4d8bb53538028ff484776b74b171343d19ea4f508ae84e1dc758b26a5810052f94978d0fca9b4e3190
+DIST rdesktop-1.8.2.tar.gz 318270 SHA256 fbbf23d49d34c215c5a59b2d91c008b61ead4c9fbe1ccb7223973aed24061a78 SHA512 45b3e3220bcb2584cdfa3139c5b38775d55ab3c6c4cb6e46e4032965f5dc546682a733b5764760f20b7b6f40bb412ef0f67509f1344e69b342bbf9e9aca45bcf WHIRLPOOL 284b0746aaf9334992f1b485e4db25daeacfe5c5ade3403d94f1bf8b939ae45d22166a8a58014c51f4ebcc3e6211da44b6bacda4d89f0e9879e43c1a81ca3794
+DIST rdesktop-1.8.3.tar.gz 320212 SHA256 88b20156b34eff5f1b453f7c724e0a3ff9370a599e69c01dc2bf0b5e650eece4 SHA512 06b94ad3b09430b05e424ef31a3e6f2388190b4920e348603cb66a414244896e0dc8906b9f12920e9406cf153ffa7f6507b23bf6713c3a675c0540a8ef57902d WHIRLPOOL 24d12882ab04fe535fea6e59b78df2e8c23634703ab13bb385446a6e8c49703ca7344053cf1f6bbc4fecc04ce21354a9e5d3a0261b3d3c015289c2ec3b8af8c3
diff --git a/net-misc/rdesktop/files/rdesktop-1.6.0-smartcard_configure.patch b/net-misc/rdesktop/files/rdesktop-1.6.0-smartcard_configure.patch
new file mode 100644
index 000000000000..a23796694429
--- /dev/null
+++ b/net-misc/rdesktop/files/rdesktop-1.6.0-smartcard_configure.patch
@@ -0,0 +1,22 @@
+--- configure.ac.orig 2009-07-05 16:13:23.000000000 +0200
++++ configure.ac 2009-07-05 16:19:39.000000000 +0200
+@@ -108,7 +108,10 @@
+ AC_ARG_ENABLE(smartcard,
+ [ --enable-smartcard Enables smart-card support.
+ ],
+- [
++ [
++ if test "$enableval" = no; then
++ WITH_SCARD=0
++ else
+ case "$OSTYPE" in
+ darwin*)
+ AC_CHECK_HEADER(PCSC/pcsclite.h, [WITH_SCARD=1], [WITH_SCARD=0])
+@@ -143,6 +146,7 @@
+ [AC_MSG_RESULT(yes) AC_DEFINE(WITH_PCSC120, 1, [old version of PCSC])],
+ [AC_MSG_RESULT(no)]
+ )
++ fi
+ ])
+
+ AC_SUBST(SCARDOBJ)
diff --git a/net-misc/rdesktop/files/rdesktop-1.6.0-sound_configure.patch b/net-misc/rdesktop/files/rdesktop-1.6.0-sound_configure.patch
new file mode 100644
index 000000000000..8e64ba8b48cb
--- /dev/null
+++ b/net-misc/rdesktop/files/rdesktop-1.6.0-sound_configure.patch
@@ -0,0 +1,15 @@
+--- configure.ac.orig 2009-06-30 10:35:14.000000000 +0200
++++ configure.ac 2009-06-30 11:35:10.000000000 +0200
+@@ -228,7 +228,11 @@
+ if test -n "$PKG_CONFIG"; then
+ PKG_CHECK_MODULES(LIBAO, ao, [HAVE_LIBAO=1], [HAVE_LIBAO=0])
+ PKG_CHECK_MODULES(ALSA, alsa, [HAVE_ALSA=1], [HAVE_ALSA=0])
+- PKG_CHECK_MODULES(LIBSAMPLERATE, samplerate, [HAVE_LIBSAMPLERATE=1], [HAVE_LIBSAMPLERATE=0])
++ AC_ARG_WITH(libsamplerate,
++ [ --without-libsamplerate disable libsamplerate support])
++ if test "x$with_libsamplerate" != "xno"; then
++ PKG_CHECK_MODULES(LIBSAMPLERATE, samplerate, [HAVE_LIBSAMPLERATE=1], [HAVE_LIBSAMPLERATE=0])
++ fi
+ if test x"$HAVE_LIBSAMPLERATE" = "x1"; then
+ AC_DEFINE(HAVE_LIBSAMPLERATE)
+ if test x"$static_libsamplerate" = "xyes"; then
diff --git a/net-misc/rdesktop/files/rdesktop-1.7.0-libao_crash.patch b/net-misc/rdesktop/files/rdesktop-1.7.0-libao_crash.patch
new file mode 100644
index 000000000000..3afb9b2b0f23
--- /dev/null
+++ b/net-misc/rdesktop/files/rdesktop-1.7.0-libao_crash.patch
@@ -0,0 +1,18 @@
+--- rdpsnd_libao.c.orig 2010-11-29 14:55:31.124907038 +0100
++++ rdpsnd_libao.c 2010-11-29 14:55:51.708464083 +0100
+@@ -76,6 +76,7 @@
+ format.channels = 2;
+ format.rate = 44100;
+ format.byte_format = AO_FMT_NATIVE;
++ format.matrix = NULL;
+
+
+ o_device = ao_open_live(default_driver, &format, NULL);
+@@ -115,6 +116,7 @@
+ format.channels = pwfx->nChannels;
+ format.rate = 44100;
+ format.byte_format = AO_FMT_NATIVE;
++ format.matrix = NULL;
+
+ if (o_device != NULL)
+ ao_close(o_device);
diff --git a/net-misc/rdesktop/files/rdesktop-keymap-additional b/net-misc/rdesktop/files/rdesktop-keymap-additional
new file mode 100644
index 000000000000..04a03a54dcee
--- /dev/null
+++ b/net-misc/rdesktop/files/rdesktop-keymap-additional
@@ -0,0 +1,64 @@
+#Additional sequences
+#2007-05-28 by Jaroslav Jiricka <giahra@atlas.cz>
+
+sequence ecaron dead_caron e
+sequence Ecaron dead_caron E
+sequence eogonek dead_ogonek e
+sequence Eogonek dead_ogonek E
+
+sequence rcaron dead_caron r
+sequence Rcaron dead_caron R
+sequence racute dead_acute r
+sequence Racute dead_acute R
+
+sequence tcaron dead_caron t
+sequence Tcaron dead_caron T
+sequence tcedilla dead_cedilla t
+sequence Tcedilla dead_cedilla T
+
+sequence zcaron dead_caron z
+sequence Zcaron dead_caron Z
+sequence zacute dead_acute z
+sequence Zacute dead_acute Z
+sequence zabovedot dead_abovedot z
+sequence Zabovedot dead_abovedot Z
+
+sequence uring dead_abovering u
+sequence Uring dead_abovering U
+sequence udoubleacute dead_doubleacute u
+sequence Udoubleacute dead_doubleacute U
+
+sequence odoubleacute dead_doubleacute o
+sequence Odoubleacute dead_doubleacute O
+
+sequence aogonek dead_ogonek a
+sequence Aogonek dead_ogonek A
+sequence abreve dead_breve a
+sequence Abreve dead_breve A
+
+sequence scaron dead_caron s
+sequence Scaron dead_caron S
+sequence sacute dead_acute s
+sequence Sacute dead_acute S
+sequence scedilla dead_cedilla s
+sequence Scedilla dead_cedilla S
+
+sequence dcaron dead_caron d
+sequence Dcaron dead_caron D
+
+sequence gbreve dead_breve g
+sequence Gbreve dead_breve G
+
+sequence lcaron dead_caron l
+sequence Lcaron dead_caron L
+sequence lacute dead_acute l
+sequence Lacute dead_acute L
+
+sequence ccaron dead_caron c
+sequence Ccaron dead_caron C
+
+sequence ncaron dead_caron n
+sequence Ncaron dead_caron N
+sequence nacute dead_acute n
+sequence Nacute dead_acute N
+
diff --git a/net-misc/rdesktop/files/rdesktop-keymap-cs b/net-misc/rdesktop/files/rdesktop-keymap-cs
new file mode 100644
index 000000000000..046762833dbd
--- /dev/null
+++ b/net-misc/rdesktop/files/rdesktop-keymap-cs
@@ -0,0 +1,122 @@
+#Czech keymap
+#2007-05-28 by Jaroslav Jiricka <giahra@atlas.cz>
+include common
+include additional
+map 0x405
+
+semicolon 0x29
+dead_abovering 0x29 shift
+
+plus 0x02
+1 0x02 shift
+dead_tilde 0x02 altgr
+asciitilde 0x02 altgr
+
+ecaron 0x03
+2 0x03 shift
+dead_caron 0x03 altgr
+
+scaron 0x04
+3 0x04 shift
+dead_circumflex 0x04 altgr
+
+ccaron 0x05
+4 0x05 shift
+dead_breve 0x05 altgr
+
+rcaron 0x06
+5 0x06 shift
+dead_abovering 0x06 altgr
+
+zcaron 0x07
+6 0x07 shift
+dead_ogonek 0x07 altgr
+
+yacute 0x08
+7 0x08 shift
+dead_grave 0x08 altgr
+
+aacute 0x09
+8 0x09 shift
+dead_abovedot 0x08 altgr
+
+iacute 0x0a
+9 0x0a shift
+dead_acute 0x08 altgr
+
+eacute 0x0b
+0 0x0b shift
+dead_doubleacute 0x0b altgr
+
+equal 0x0c
+percent 0x0c shift
+dead_macron 0x0c altgr
+
+dead_acute 0x0d
+dead_caron 0x0d shift
+dead_cedilla 0x0d altgr
+
+backslash 0x10 altgr
+
+bar 0x11 altgr
+
+EuroSign 0x12 altgr
+
+z 0x15 addupper
+
+uacute 0x1a
+slash 0x1a shift
+division 0x1a altgr
+
+parenright 0x1b
+parenleft 0x1b shift
+multiply 0x1b altgr
+
+dead_diaeresis 0x2b
+apostrophe 0x2b shift
+currency 0x2b altgr
+
+dstroke 0x1f altgr
+
+Dstroke 0x20 altgr
+
+bracketleft 0x21 altgr
+
+bracketright 0x22 altgr
+
+lstroke 0x25 altgr
+
+Lstroke 0x26 altgr
+
+uring 0x27
+quotedbl 0x27 shift
+dollar 0x27 altgr
+
+section 0x28
+exclam 0x28 shift
+ssharp 0x28 altgr
+
+y 0x2c addupper
+
+numbersign 0x2d altgr
+
+ampersand 0x2e altgr
+
+at 0x2f altgr
+
+braceleft 0x30 altgr
+
+braceright 0x31 altgr
+
+comma 0x33
+question 0x33 shift
+less 0x33 altgr
+
+period 0x34
+colon 0x34 shift
+greater 0x34 altgr
+
+minus 0x35
+underscore 0x35 shift
+asterisk 0x35 altgr
+
diff --git a/net-misc/rdesktop/files/rdesktop-keymap-sk b/net-misc/rdesktop/files/rdesktop-keymap-sk
new file mode 100644
index 000000000000..afa1a3bb035d
--- /dev/null
+++ b/net-misc/rdesktop/files/rdesktop-keymap-sk
@@ -0,0 +1,124 @@
+#Slovak keymap
+#2007-05-28 by Jaroslav Jiricka <giahra@atlas.cz>
+include common
+include additional
+map 0x41B
+
+semicolon 0x29
+dead_abovering 0x29 shift
+
+plus 0x02
+1 0x02 shift
+dead_tilde 0x02 altgr
+asciitilde 0x02 altgr
+
+lcaron 0x03
+2 0x03 shift
+dead_caron 0x03 altgr
+
+scaron 0x04
+3 0x04 shift
+dead_circumflex 0x04 altgr
+
+ccaron 0x05
+4 0x05 shift
+dead_breve 0x05 altgr
+
+tcaron 0x06
+5 0x06 shift
+dead_abovering 0x06 altgr
+
+zcaron 0x07
+6 0x07 shift
+dead_ogonek 0x07 altgr
+
+yacute 0x08
+7 0x08 shift
+dead_grave 0x08 altgr
+
+aacute 0x09
+8 0x09 shift
+dead_abovedot 0x08 altgr
+
+iacute 0x0a
+9 0x0a shift
+dead_acute 0x08 altgr
+
+eacute 0x0b
+0 0x0b shift
+dead_doubleacute 0x0b altgr
+
+equal 0x0c
+percent 0x0c shift
+dead_diaeresis 0x0c altgr
+
+dead_acute 0x0d
+dead_caron 0x0d shift
+dead_cedilla 0x0d altgr
+
+backslash 0x10 altgr
+
+bar 0x11 altgr
+
+EuroSign 0x12 altgr
+
+z 0x15 addupper
+
+apostrophe 0x19 altgr
+
+uacute 0x1a
+slash 0x1a shift
+division 0x1a altgr
+
+adiaeresis 0x1b
+parenleft 0x1b shift
+multiply 0x1b altgr
+
+ncaron 0x2b
+parenright 0x2b shift
+currency 0x2b altgr
+
+dstroke 0x1f altgr
+
+Dstroke 0x20 altgr
+
+bracketleft 0x21 altgr
+
+bracketright 0x22 altgr
+
+lstroke 0x25 altgr
+
+Lstroke 0x26 altgr
+
+ocircumflex 0x27
+quotedbl 0x27 shift
+dollar 0x27 altgr
+
+section 0x28
+exclam 0x28 shift
+ssharp 0x28 altgr
+
+y 0x2c addupper
+
+numbersign 0x2d altgr
+
+ampersand 0x2e altgr
+
+at 0x2f altgr
+
+braceleft 0x30 altgr
+
+braceright 0x31 altgr
+
+comma 0x33
+question 0x33 shift
+less 0x33 altgr
+
+period 0x34
+colon 0x34 shift
+greater 0x34 altgr
+
+minus 0x35
+underscore 0x35 shift
+asterisk 0x35 altgr
+
diff --git a/net-misc/rdesktop/metadata.xml b/net-misc/rdesktop/metadata.xml
new file mode 100644
index 000000000000..cbeac8797d75
--- /dev/null
+++ b/net-misc/rdesktop/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>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+ <longdescription>
+An open source client for Windows NT Terminal Server and Windows 2000/2003 Terminal Services, capable of natively speaking Remote Desktop Protocol (RDP) in order to present the user's NT desktop. Unlike Citrix ICA, no server extensions are required.
+</longdescription>
+ <use>
+ <flag name="kerberos">Enable CredSPP support + Kerberos authentication with <pkg>net-libs/libgssglue</pkg></flag>
+ <flag name="pcsc-lite">Enable smartcard support with <pkg>sys-apps/pcsc-lite</pkg> driver</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">rdesktop</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/rdesktop/rdesktop-1.7.1.ebuild b/net-misc/rdesktop/rdesktop-1.7.1.ebuild
new file mode 100644
index 000000000000..b6f492ad07cc
--- /dev/null
+++ b/net-misc/rdesktop/rdesktop-1.7.1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools eutils
+
+MY_PV=${PV/_/-}
+
+DESCRIPTION="A Remote Desktop Protocol Client"
+HOMEPAGE="http://rdesktop.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="alsa ao debug ipv6 libsamplerate oss pcsc-lite"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+RDEPEND=">=dev-libs/openssl-0.9.6b
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ alsa? ( media-libs/alsa-lib )
+ ao? ( >=media-libs/libao-0.8.6 )
+ libsamplerate? ( media-libs/libsamplerate )
+ pcsc-lite? ( >=sys-apps/pcsc-lite-1.6.6 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ x11-libs/libXt"
+
+src_prepare() {
+ # Prevent automatic stripping
+ local strip="$(echo '$(STRIP) $(DESTDIR)$(bindir)/rdesktop')"
+ sed -i -e "s:${strip}::" Makefile.in \
+ || die "sed failed in Makefile.in"
+
+ # Automagic dependency on libsamplerate
+ epatch "${FILESDIR}"/${PN}-1.6.0-sound_configure.patch
+ # Fix --enable-smartcard logic
+ epatch "${FILESDIR}"/${PN}-1.6.0-smartcard_configure.patch
+ # bug #280923
+ epatch "${FILESDIR}"/${PN}-1.7.0-libao_crash.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ if use ao; then
+ sound_conf=$(use_with ao sound libao)
+ else if use alsa; then
+ sound_conf=$(use_with alsa sound alsa)
+ else
+ sound_conf=$(use_with oss sound oss)
+ fi
+ fi
+
+ econf \
+ --with-openssl="${EPREFIX}"/usr \
+ $(use_with debug) \
+ $(use_with ipv6) \
+ $(use_with libsamplerate) \
+ $(use_enable pcsc-lite smartcard) \
+ ${sound_conf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc doc/HACKING doc/TODO doc/keymapping.txt
+
+ # For #180313 - applies to versions >= 1.5.0
+ # Fixes sf.net bug
+ # http://sourceforge.net/tracker/index.php?func=detail&aid=1725634&group_id=24366&atid=381349
+ # check for next version to see if this needs to be removed
+ insinto /usr/share/rdesktop/keymaps
+ newins "${FILESDIR}/rdesktop-keymap-additional" additional
+ newins "${FILESDIR}/rdesktop-keymap-cs" cs
+ newins "${FILESDIR}/rdesktop-keymap-sk" sk
+}
diff --git a/net-misc/rdesktop/rdesktop-1.8.1.ebuild b/net-misc/rdesktop/rdesktop-1.8.1.ebuild
new file mode 100644
index 000000000000..97628de23f97
--- /dev/null
+++ b/net-misc/rdesktop/rdesktop-1.8.1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+MY_PV=${PV/_/-}
+
+DESCRIPTION="A Remote Desktop Protocol Client"
+HOMEPAGE="http://rdesktop.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="alsa ao debug ipv6 kerberos libsamplerate oss pcsc-lite"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+RDEPEND=">=dev-libs/openssl-0.9.6b
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ alsa? ( media-libs/alsa-lib )
+ ao? ( >=media-libs/libao-0.8.6 )
+ kerberos? ( net-libs/libgssglue )
+ libsamplerate? ( media-libs/libsamplerate )
+ pcsc-lite? ( >=sys-apps/pcsc-lite-1.6.6 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ x11-libs/libXt"
+
+src_prepare() {
+ # Prevent automatic stripping
+ local strip="$(echo '$(STRIP) $(DESTDIR)$(bindir)/rdesktop')"
+ sed -i -e "s:${strip}::" Makefile.in \
+ || die "sed failed in Makefile.in"
+
+ # Automagic dependency on libsamplerate
+ epatch "${FILESDIR}"/${PN}-1.6.0-sound_configure.patch
+ # bug #280923
+ epatch "${FILESDIR}"/${PN}-1.7.0-libao_crash.patch
+
+ epatch_user
+
+ eautoreconf
+}
+
+src_configure() {
+ if use ao; then
+ sound_conf=$(use_with ao sound libao)
+ else if use alsa; then
+ sound_conf=$(use_with alsa sound alsa)
+ else
+ sound_conf=$(use_with oss sound oss)
+ fi
+ fi
+
+ econf \
+ --with-openssl="${EPREFIX}"/usr \
+ $(use_with debug) \
+ $(use_with ipv6) \
+ $(use_with libsamplerate) \
+ $(use_enable kerberos credssp) \
+ $(use_enable pcsc-lite smartcard) \
+ ${sound_conf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc doc/HACKING doc/TODO doc/keymapping.txt
+
+ # For #180313 - applies to versions >= 1.5.0
+ # Fixes sf.net bug
+ # http://sourceforge.net/tracker/index.php?func=detail&aid=1725634&group_id=24366&atid=381349
+ # check for next version to see if this needs to be removed
+ insinto /usr/share/rdesktop/keymaps
+ newins "${FILESDIR}/rdesktop-keymap-additional" additional
+ newins "${FILESDIR}/rdesktop-keymap-cs" cs
+ newins "${FILESDIR}/rdesktop-keymap-sk" sk
+}
diff --git a/net-misc/rdesktop/rdesktop-1.8.2.ebuild b/net-misc/rdesktop/rdesktop-1.8.2.ebuild
new file mode 100644
index 000000000000..97628de23f97
--- /dev/null
+++ b/net-misc/rdesktop/rdesktop-1.8.2.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+MY_PV=${PV/_/-}
+
+DESCRIPTION="A Remote Desktop Protocol Client"
+HOMEPAGE="http://rdesktop.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="alsa ao debug ipv6 kerberos libsamplerate oss pcsc-lite"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+RDEPEND=">=dev-libs/openssl-0.9.6b
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ alsa? ( media-libs/alsa-lib )
+ ao? ( >=media-libs/libao-0.8.6 )
+ kerberos? ( net-libs/libgssglue )
+ libsamplerate? ( media-libs/libsamplerate )
+ pcsc-lite? ( >=sys-apps/pcsc-lite-1.6.6 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ x11-libs/libXt"
+
+src_prepare() {
+ # Prevent automatic stripping
+ local strip="$(echo '$(STRIP) $(DESTDIR)$(bindir)/rdesktop')"
+ sed -i -e "s:${strip}::" Makefile.in \
+ || die "sed failed in Makefile.in"
+
+ # Automagic dependency on libsamplerate
+ epatch "${FILESDIR}"/${PN}-1.6.0-sound_configure.patch
+ # bug #280923
+ epatch "${FILESDIR}"/${PN}-1.7.0-libao_crash.patch
+
+ epatch_user
+
+ eautoreconf
+}
+
+src_configure() {
+ if use ao; then
+ sound_conf=$(use_with ao sound libao)
+ else if use alsa; then
+ sound_conf=$(use_with alsa sound alsa)
+ else
+ sound_conf=$(use_with oss sound oss)
+ fi
+ fi
+
+ econf \
+ --with-openssl="${EPREFIX}"/usr \
+ $(use_with debug) \
+ $(use_with ipv6) \
+ $(use_with libsamplerate) \
+ $(use_enable kerberos credssp) \
+ $(use_enable pcsc-lite smartcard) \
+ ${sound_conf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc doc/HACKING doc/TODO doc/keymapping.txt
+
+ # For #180313 - applies to versions >= 1.5.0
+ # Fixes sf.net bug
+ # http://sourceforge.net/tracker/index.php?func=detail&aid=1725634&group_id=24366&atid=381349
+ # check for next version to see if this needs to be removed
+ insinto /usr/share/rdesktop/keymaps
+ newins "${FILESDIR}/rdesktop-keymap-additional" additional
+ newins "${FILESDIR}/rdesktop-keymap-cs" cs
+ newins "${FILESDIR}/rdesktop-keymap-sk" sk
+}
diff --git a/net-misc/rdesktop/rdesktop-1.8.3.ebuild b/net-misc/rdesktop/rdesktop-1.8.3.ebuild
new file mode 100644
index 000000000000..282327a0cc19
--- /dev/null
+++ b/net-misc/rdesktop/rdesktop-1.8.3.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 autotools eutils
+
+MY_PV=${PV/_/-}
+
+DESCRIPTION="A Remote Desktop Protocol Client"
+HOMEPAGE="http://rdesktop.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="alsa ao debug ipv6 kerberos libsamplerate oss pcsc-lite"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+RDEPEND=">=dev-libs/openssl-0.9.6b
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ alsa? ( media-libs/alsa-lib )
+ ao? ( >=media-libs/libao-0.8.6 )
+ kerberos? ( net-libs/libgssglue )
+ libsamplerate? ( media-libs/libsamplerate )
+ pcsc-lite? ( >=sys-apps/pcsc-lite-1.6.6 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ x11-libs/libXt"
+
+src_prepare() {
+ # Prevent automatic stripping
+ local strip="$(echo '$(STRIP) $(DESTDIR)$(bindir)/rdesktop')"
+ sed -i -e "s:${strip}::" Makefile.in \
+ || die "sed failed in Makefile.in"
+
+ # Automagic dependency on libsamplerate
+ epatch "${FILESDIR}"/${PN}-1.6.0-sound_configure.patch
+ # bug #280923
+ epatch "${FILESDIR}"/${PN}-1.7.0-libao_crash.patch
+
+ epatch_user
+
+ eautoreconf
+}
+
+src_configure() {
+ if use ao; then
+ sound_conf=$(use_with ao sound libao)
+ else if use alsa; then
+ sound_conf=$(use_with alsa sound alsa)
+ else
+ sound_conf=$(use_with oss sound oss)
+ fi
+ fi
+
+ econf \
+ --with-openssl="${EPREFIX}"/usr \
+ $(use_with debug) \
+ $(use_with ipv6) \
+ $(use_with libsamplerate) \
+ $(use_enable kerberos credssp) \
+ $(use_enable pcsc-lite smartcard) \
+ ${sound_conf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc doc/HACKING doc/TODO doc/keymapping.txt
+}
diff --git a/net-misc/redir/Manifest b/net-misc/redir/Manifest
new file mode 100644
index 000000000000..c54b65c648f9
--- /dev/null
+++ b/net-misc/redir/Manifest
@@ -0,0 +1 @@
+DIST redir-2.2.1.tar.gz 42247 SHA256 7ea504f835338e448f674ca8637512f511bf74538418ad43ab39039017090e6c
diff --git a/net-misc/redir/files/redir-2.2.1-include.patch b/net-misc/redir/files/redir-2.2.1-include.patch
new file mode 100644
index 000000000000..5fea475d31a0
--- /dev/null
+++ b/net-misc/redir/files/redir-2.2.1-include.patch
@@ -0,0 +1,10 @@
+--- redir-2.2.1/redir.c.orig 1999-12-26 21:50:06.000000000 +0100
++++ redir-2.2.1/redir.c 2009-10-23 15:01:26.000000000 +0200
+@@ -78,6 +78,7 @@
+ #include <arpa/inet.h>
+ #include <netdb.h>
+ #include <errno.h>
++#include <time.h>
+
+ #ifdef USE_TCP_WRAPPERS
+ #include <tcpd.h>
diff --git a/net-misc/redir/metadata.xml b/net-misc/redir/metadata.xml
new file mode 100644
index 000000000000..59e2b8f78cb5
--- /dev/null
+++ b/net-misc/redir/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>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/redir/redir-2.2.1.ebuild b/net-misc/redir/redir-2.2.1.ebuild
new file mode 100644
index 000000000000..da395778fd15
--- /dev/null
+++ b/net-misc/redir/redir-2.2.1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Redir is a port redirector"
+HOMEPAGE="http://sammy.net/~sammy/hacks/"
+SRC_URI="http://sammy.net/~sammy/hacks/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha ~amd64 ~hppa ~mips sparc x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_configure() {
+ epatch "${FILESDIR}/${P}-include.patch"
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" || \
+ die "emake failed"
+}
+
+src_install() {
+ dobin redir || die "dobin failed"
+ newman redir.man redir.1 || die "doman failed"
+ dodoc CHANGES README transproxy.txt || die "dodoc failed"
+}
diff --git a/net-misc/remmina/Manifest b/net-misc/remmina/Manifest
new file mode 100644
index 000000000000..98ea96b82c18
--- /dev/null
+++ b/net-misc/remmina/Manifest
@@ -0,0 +1,4 @@
+DIST remmina-1.0.0_p20130723.tar.gz 387023 SHA256 675c59ae7df75bbe2661d84655559379f5864b7b273c74111b4c0a889c5efbf5 SHA512 065a585f2c630dbc2cecc4bc52c545ad7c9b66e616cabb9e32f7d3464fcb80b51f52b4707f71e129553bd0d1e9d19fa44d7cdfe749ca9dcb6ac3148630d1f4ea WHIRLPOOL 798ad3c6644719763e2e0a20e02dfcf391f7e6aac77342f167e6f62d11fb98ffc4733d6156137a402e56e87d8ca740a649cca8125047adb04e937f56755d4562
+DIST remmina-1.1.1.tar.gz 797163 SHA256 c96485a919848d9c1602c38075359b10417f4285659588b115b75d2cd5a4e884 SHA512 09bacd725522e0a57a1e387db778fe735d0f0d4ce62a63ad4f02799e225296509d075c56fb0c81d6b0c16ab2242889104271e1ecd508417e0aaeed7a35eea594 WHIRLPOOL 97c8961327cc6c11fa365ca4f2ca6e312b01bf7e0e3fc23e5c23b010b26488696984be4f93130ca8b0266f4dad7d038acfc824ac1d822a822d132a45b7b9158e
+DIST remmina-1.1.2.tar.gz 796691 SHA256 214eb82e616f3158304f689692d467b45c537e295e6aed1c6d291b2d7d2e601e SHA512 4f6a38ec99acdfe53343e7c72e773f71a505eaacca6c6b078a17496556df0827f15aa84af7a8903e8c12caad2fc9737d8414aa923605e06e30e4a7d2c67add48 WHIRLPOOL 3aa08e9f907e8067886ac92b52711d7f5bdbfbfbc4c6808d8c0cea02a119a706afa86b070188e0c7c5da48aacdead6b489ec5609166239fbb1f1d2f12fc64409
+DIST remmina-1.2.0_rc3.tar.gz 791812 SHA256 bfe352cd87b031585d867d519c3a36ee117cca9cc79efb7c11cd11d0f9697208 SHA512 e740cbeda40bfca96c846c77140120ff92803f1bf5fff15c3eb3ba90e7ebe9ccbfa04825ad3fca96c09a5440f496934711141dedc665572965bf0d9c32e053da WHIRLPOOL 1686a4e029a9cd3019b2dc0b59c715cc67b66d6c75337c7032a72ee0228e1df7d7dfd8dc7fb7f51d6298a1c886b29d45b7352bf7a9e025ecb1cd184b08d385ed
diff --git a/net-misc/remmina/files/remmina-1.0.0_p20121004-avahi.patch b/net-misc/remmina/files/remmina-1.0.0_p20121004-avahi.patch
new file mode 100644
index 000000000000..abb058a0ab67
--- /dev/null
+++ b/net-misc/remmina/files/remmina-1.0.0_p20121004-avahi.patch
@@ -0,0 +1,68 @@
+https://bugs.gentoo.org/show_bug.cgi?id=438060
+https://github.com/FreeRDP/Remmina/issues/120
+
+diff --git a/cmake/FindAVAHI.cmake b/cmake/FindAVAHI.cmake
+index 0a5cc21..91878dc 100644
+--- a/cmake/FindAVAHI.cmake
++++ b/cmake/FindAVAHI.cmake
+@@ -17,29 +17,42 @@
+ # Foundation, Inc., 59 Temple Place, Suite 330,
+ # Boston, MA 02111-1307, USA.
+
+-if(GTK3_FOUND)
+- set(_AVAHI_LIB_NAME avahi-ui-gtk3)
+- set(_AVAHI_PKG_NAME avahi-ui-gtk3>=0.6.30 avahi-client>=0.6.30)
+-else()
+- set(_AVAHI_LIB_NAME avahi-ui)
+- set(_AVAHI_PKG_NAME avahi-ui>=0.6.30 avahi-client>=0.6.30)
++include(FindPkgConfig)
++
++if(PKG_CONFIG_FOUND)
++ pkg_check_modules(PC_AVAHI_CLIENT avahi-client)
++ if(GTK3_FOUND)
++ set(_AVAHI_UI_LIB_NAME avahi-ui-gtk3)
++ set(_AVAHI_UI_PKG_NAME avahi-ui-gtk3>=0.6.30 avahi-client>=0.6.30)
++ else()
++ set(_AVAHI_UI_LIB_NAME avahi-ui)
++ set(_AVAHI_UI_PKG_NAME avahi-ui>=0.6.30 avahi-client>=0.6.30)
++ endif()
++ pkg_check_modules(PC_AVAHI_UI ${_AVAHI_UI_PKG_NAME})
+ endif()
+
+-find_package(PkgConfig)
+-pkg_check_modules(PC_AVAHI ${_AVAHI_PKG_NAME})
+
+-find_path(AVAHI_INCLUDE_DIR avahi-ui/avahi-ui.h
+- HINTS ${PC_AVAHI_INCLUDEDIR} ${PC_AVAHI_INCLUDE_DIRS})
+-
+-find_library(AVAHI_LIBRARY NAMES ${_AVAHI_LIB_NAME}
+- HINTS ${PC_AVAHI_LIBDIR} ${PC_AVAHI_LIBRARY_DIRS})
++find_library(AVAHI_COMMON_LIBRARY NAMES avahi-common PATHS ${PC_AVAHI_CLIENT_LIBRARY_DIRS})
++if(AVAHI_COMMON_LIBRARY)
++ set(AVAHI_COMMON_FOUND TRUE)
++endif()
+
+-include(FindPackageHandleStandardArgs)
++find_library(AVAHI_CLIENT_LIBRARY NAMES avahi-client PATHS ${PC_AVAHI_CLIENT_LIBRARY_DIRS})
++if(AVAHI_CLIENT_LIBRARY)
++ set(AVAHI_CLIENT_FOUND TRUE)
++endif()
+
+-find_package_handle_standard_args(AVAHI DEFAULT_MSG AVAHI_LIBRARY AVAHI_INCLUDE_DIR)
++find_path(AVAHI_UI_INCLUDE_DIR avahi-ui/avahi-ui.h PATHS ${PC_AVAHI_UI_INCLUDE_DIRS})
++find_library(AVAHI_UI_LIBRARY NAMES ${_AVAHI_UI_LIB_NAME} PATHS ${PC_AVAHI_UI_LIBRARY_DIRS})
++if(AVAHI_UI_INCLUDE_DIR AND AVAHI_UI_LIBRARY)
++ set(AVAHI_UI_FOUND TRUE)
++endif()
+
+-set(AVAHI_LIBRARIES ${AVAHI_LIBRARY})
+-set(AVAHI_INCLUDE_DIRS ${AVAHI_INCLUDE_DIR})
++FIND_PACKAGE_HANDLE_STANDARD_ARGS(AVAHI DEFAULT_MSG AVAHI_COMMON_FOUND AVAHI_CLIENT_FOUND AVAHI_UI_FOUND)
+
+-mark_as_advanced(AVAHI_INCLUDE_DIR AVAHI_LIBRARY)
++if (AVAHI_FOUND)
++ set(AVAHI_INCLUDE_DIRS ${AVAHI_UI_INCLUDE_DIR})
++ set(AVAHI_LIBRARIES ${AVAHI_COMMON_LIBRARY} ${AVAHI_CLIENT_LIBRARY} ${AVAHI_UI_LIBRARY})
++endif()
+
++mark_as_advanced(AVAHI_INCLUDE_DIRS AVAHI_LIBRARIES)
diff --git a/net-misc/remmina/files/remmina-external_tools.patch b/net-misc/remmina/files/remmina-external_tools.patch
new file mode 100644
index 000000000000..9680b517890d
--- /dev/null
+++ b/net-misc/remmina/files/remmina-external_tools.patch
@@ -0,0 +1,11 @@
+https://github.com/FreeRDP/Remmina/issues/171
+--- a/remmina/CMakeLists.txt
++++ b/remmina/CMakeLists.txt
+@@ -148,7 +148,6 @@ if(WITH_TRANSLATIONS)
+ endif()
+ add_subdirectory(icons)
+ add_subdirectory(desktop)
+-add_subdirectory(external_tools)
+
+ install(TARGETS remmina DESTINATION ${CMAKE_INSTALL_BINDIR})
+
diff --git a/net-misc/remmina/metadata.xml b/net-misc/remmina/metadata.xml
new file mode 100644
index 000000000000..d332d42c9d18
--- /dev/null
+++ b/net-misc/remmina/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>tristan@gentoo.org</email>
+ <name>Tristan Heaven</name>
+ </maintainer>
+ <use>
+ <flag name="freerdp">Add support for the net-misc/freerdp application</flag>
+ <flag name="ssh">Enable support for SSH/SFTP protocol; see also 'vte'</flag>
+ <flag name="telepathy">Enable telepathy support</flag>
+ <flag name="vte">Enable virtual terminal support (for SSH sessions)</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">FreeRDP/Remmina</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/remmina/remmina-1.0.0_p20130723.ebuild b/net-misc/remmina/remmina-1.0.0_p20130723.ebuild
new file mode 100644
index 000000000000..3903b9bbe060
--- /dev/null
+++ b/net-misc/remmina/remmina-1.0.0_p20130723.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit gnome2-utils cmake-utils
+
+if [[ ${PV} != 9999 ]]; then
+ inherit vcs-snapshot
+ COMMIT="b6a55ae6f4633d55f8f03e7ce2eeb5899514a8fc"
+ SRC_URI="https://github.com/FreeRDP/Remmina/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+else
+ inherit git-2
+ SRC_URI=""
+ EGIT_REPO_URI="git://github.com/FreeRDP/Remmina.git
+ https://github.com/FreeRDP/Remmina.git"
+ KEYWORDS=""
+fi
+
+DESCRIPTION="A GTK+ RDP, VNC, XDMCP and SSH client"
+HOMEPAGE="http://remmina.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="ayatana avahi crypt debug freerdp gnome-keyring nls ssh telepathy vte"
+
+RDEPEND="
+ x11-libs/gtk+:3
+ >=dev-libs/glib-2.31.18:2
+ >=net-libs/libvncserver-0.9.8.2
+ x11-libs/libxkbfile
+ x11-themes/gnome-icon-theme
+ avahi? ( net-dns/avahi[gtk3] )
+ ayatana? ( dev-libs/libappindicator )
+ crypt? ( dev-libs/libgcrypt:0 )
+ freerdp? ( >=net-misc/freerdp-1.1.0_beta1_p20130710 )
+ gnome-keyring? ( gnome-base/libgnome-keyring )
+ ssh? ( net-libs/libssh[sftp] )
+ telepathy? ( net-libs/telepathy-glib )
+ vte? ( x11-libs/vte:2.90 )
+"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+"
+RDEPEND+="
+ !net-misc/remmina-plugins
+"
+
+DOCS=( README )
+PATCHES=( "${FILESDIR}/remmina-external_tools.patch" )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_with ayatana APPINDICATOR)
+ $(cmake-utils_use_with avahi AVAHI)
+ $(cmake-utils_use_with crypt GCRYPT)
+ $(cmake-utils_use_with freerdp FREERDP)
+ $(cmake-utils_use_with gnome-keyring GNOMEKEYRING)
+ $(cmake-utils_use_with nls GETTEXT)
+ $(cmake-utils_use_with nls TRANSLATIONS)
+ $(cmake-utils_use_with ssh LIBSSH)
+ $(cmake-utils_use_with telepathy TELEPATHY)
+ $(cmake-utils_use_with vte VTE)
+ -DGTK_VERSION=3
+ -DHAVE_PTHREAD=ON
+ )
+ cmake-utils_src_configure
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-misc/remmina/remmina-1.1.1.ebuild b/net-misc/remmina/remmina-1.1.1.ebuild
new file mode 100644
index 000000000000..d95355d34727
--- /dev/null
+++ b/net-misc/remmina/remmina-1.1.1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit gnome2-utils cmake-utils
+
+if [[ ${PV} != 9999 ]]; then
+ SRC_URI="https://github.com/FreeRDP/Remmina/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+else
+ inherit git-2
+ SRC_URI=""
+ EGIT_REPO_URI="git://github.com/FreeRDP/Remmina.git
+ https://github.com/FreeRDP/Remmina.git"
+ KEYWORDS=""
+fi
+
+DESCRIPTION="A GTK+ RDP, VNC, XDMCP and SSH client"
+HOMEPAGE="http://remmina.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="ayatana avahi crypt debug freerdp gnome-keyring nls ssh telepathy vte"
+
+RDEPEND="
+ x11-libs/gtk+:3
+ >=dev-libs/glib-2.31.18:2
+ >=net-libs/libvncserver-0.9.8.2
+ x11-libs/libxkbfile
+ x11-themes/gnome-icon-theme
+ avahi? ( net-dns/avahi[gtk3] )
+ ayatana? ( dev-libs/libappindicator )
+ crypt? ( dev-libs/libgcrypt:0 )
+ freerdp? (
+ >=net-misc/freerdp-1.1.0_beta1_p20130710
+ <net-misc/freerdp-1.2
+ )
+ gnome-keyring? ( gnome-base/libgnome-keyring )
+ ssh? ( net-libs/libssh[sftp] )
+ telepathy? ( net-libs/telepathy-glib )
+ vte? ( x11-libs/vte:2.90 )
+"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+"
+RDEPEND+="
+ !net-misc/remmina-plugins
+"
+
+DOCS=( README )
+PATCHES=( "${FILESDIR}/remmina-external_tools.patch" )
+
+S="${WORKDIR}/Remmina-${PV}"
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_with ayatana APPINDICATOR)
+ $(cmake-utils_use_with avahi AVAHI)
+ $(cmake-utils_use_with crypt GCRYPT)
+ $(cmake-utils_use_with freerdp FREERDP)
+ $(cmake-utils_use_with gnome-keyring GNOMEKEYRING)
+ $(cmake-utils_use_with nls GETTEXT)
+ $(cmake-utils_use_with nls TRANSLATIONS)
+ $(cmake-utils_use_with ssh LIBSSH)
+ $(cmake-utils_use_with telepathy TELEPATHY)
+ $(cmake-utils_use_with vte VTE)
+ -DGTK_VERSION=3
+ -DHAVE_PTHREAD=ON
+ )
+ cmake-utils_src_configure
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-misc/remmina/remmina-1.1.2.ebuild b/net-misc/remmina/remmina-1.1.2.ebuild
new file mode 100644
index 000000000000..5a696a3c0c2c
--- /dev/null
+++ b/net-misc/remmina/remmina-1.1.2.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit gnome2-utils cmake-utils
+
+if [[ ${PV} != 9999 ]]; then
+ SRC_URI="https://github.com/FreeRDP/Remmina/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+else
+ inherit git-2
+ SRC_URI=""
+ EGIT_REPO_URI="git://github.com/FreeRDP/Remmina.git
+ https://github.com/FreeRDP/Remmina.git"
+ KEYWORDS=""
+fi
+
+DESCRIPTION="A GTK+ RDP, VNC, XDMCP and SSH client"
+HOMEPAGE="http://freerdp.github.io/Remmina/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="ayatana avahi crypt debug freerdp gnome-keyring nls ssh telepathy vte"
+
+RDEPEND="
+ x11-libs/gtk+:3
+ >=dev-libs/glib-2.31.18:2
+ >=net-libs/libvncserver-0.9.8.2
+ x11-libs/libxkbfile
+ x11-themes/gnome-icon-theme
+ x11-libs/gdk-pixbuf
+ x11-libs/libX11
+ avahi? ( net-dns/avahi[gtk3] )
+ ayatana? ( dev-libs/libappindicator )
+ crypt? ( dev-libs/libgcrypt:0 )
+ freerdp? (
+ >=net-misc/freerdp-1.1.0_beta1_p20130710
+ <net-misc/freerdp-1.2
+ )
+ gnome-keyring? ( gnome-base/libgnome-keyring )
+ ssh? ( net-libs/libssh[sftp] )
+ telepathy? ( net-libs/telepathy-glib )
+ vte? ( x11-libs/vte:2.90 )
+"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+"
+RDEPEND+="
+ !net-misc/remmina-plugins
+"
+
+DOCS=( README )
+PATCHES=( "${FILESDIR}/remmina-external_tools.patch" )
+
+S="${WORKDIR}/Remmina-${PV}"
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_with ayatana APPINDICATOR)
+ $(cmake-utils_use_with avahi AVAHI)
+ $(cmake-utils_use_with crypt GCRYPT)
+ $(cmake-utils_use_with freerdp FREERDP)
+ $(cmake-utils_use_with gnome-keyring GNOMEKEYRING)
+ $(cmake-utils_use_with nls GETTEXT)
+ $(cmake-utils_use_with nls TRANSLATIONS)
+ $(cmake-utils_use_with ssh LIBSSH)
+ $(cmake-utils_use_with telepathy TELEPATHY)
+ $(cmake-utils_use_with vte VTE)
+ -DGTK_VERSION=3
+ -DHAVE_PTHREAD=ON
+ )
+ cmake-utils_src_configure
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-misc/remmina/remmina-1.2.0_rc3.ebuild b/net-misc/remmina/remmina-1.2.0_rc3.ebuild
new file mode 100644
index 000000000000..fab4fb55573b
--- /dev/null
+++ b/net-misc/remmina/remmina-1.2.0_rc3.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit versionator gnome2-utils cmake-utils
+
+MY_PV_MAIN=$(get_version_component_range 1-3)
+MY_PV_RC=$(get_version_component_range 4)
+MY_PV="${MY_PV_MAIN}-${MY_PV_RC//rc/rcgit.}"
+
+if [[ ${PV} != 9999 ]]; then
+ SRC_URI="https://github.com/FreeRDP/Remmina/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="amd64 ~x86"
+else
+ inherit git-2
+ SRC_URI=""
+ EGIT_REPO_URI="git://github.com/FreeRDP/Remmina.git
+ https://github.com/FreeRDP/Remmina.git"
+ KEYWORDS=""
+fi
+
+DESCRIPTION="A GTK+ RDP, VNC, XDMCP and SSH client"
+HOMEPAGE="http://freerdp.github.io/Remmina/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="ayatana avahi crypt debug freerdp gnome-keyring nls ssh telepathy vte"
+
+RDEPEND="
+ x11-libs/gtk+:3
+ >=dev-libs/glib-2.31.18:2
+ >=net-libs/libvncserver-0.9.8.2
+ x11-libs/libxkbfile
+ x11-themes/gnome-icon-theme
+ x11-libs/gdk-pixbuf
+ x11-libs/libX11
+ avahi? ( net-dns/avahi[gtk3] )
+ ayatana? ( dev-libs/libappindicator )
+ crypt? ( dev-libs/libgcrypt:0 )
+ freerdp? (
+ >=net-misc/freerdp-1.2
+ )
+ gnome-keyring? ( gnome-base/libgnome-keyring )
+ ssh? ( net-libs/libssh[sftp] )
+ telepathy? ( net-libs/telepathy-glib )
+ vte? ( x11-libs/vte:2.90 )
+"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+"
+RDEPEND+="
+ !net-misc/remmina-plugins
+"
+
+DOCS=( README )
+
+S="${WORKDIR}/Remmina-${MY_PV}"
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_with ayatana APPINDICATOR)
+ $(cmake-utils_use_with avahi AVAHI)
+ $(cmake-utils_use_with crypt GCRYPT)
+ $(cmake-utils_use_with freerdp FREERDP)
+ $(cmake-utils_use_with gnome-keyring GNOMEKEYRING)
+ $(cmake-utils_use_with nls GETTEXT)
+ $(cmake-utils_use_with nls TRANSLATIONS)
+ $(cmake-utils_use_with ssh LIBSSH)
+ $(cmake-utils_use_with telepathy TELEPATHY)
+ $(cmake-utils_use_with vte VTE)
+ -DGTK_VERSION=3
+ )
+ cmake-utils_src_configure
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-misc/remmina/remmina-9999.ebuild b/net-misc/remmina/remmina-9999.ebuild
new file mode 100644
index 000000000000..d95355d34727
--- /dev/null
+++ b/net-misc/remmina/remmina-9999.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit gnome2-utils cmake-utils
+
+if [[ ${PV} != 9999 ]]; then
+ SRC_URI="https://github.com/FreeRDP/Remmina/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+else
+ inherit git-2
+ SRC_URI=""
+ EGIT_REPO_URI="git://github.com/FreeRDP/Remmina.git
+ https://github.com/FreeRDP/Remmina.git"
+ KEYWORDS=""
+fi
+
+DESCRIPTION="A GTK+ RDP, VNC, XDMCP and SSH client"
+HOMEPAGE="http://remmina.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="ayatana avahi crypt debug freerdp gnome-keyring nls ssh telepathy vte"
+
+RDEPEND="
+ x11-libs/gtk+:3
+ >=dev-libs/glib-2.31.18:2
+ >=net-libs/libvncserver-0.9.8.2
+ x11-libs/libxkbfile
+ x11-themes/gnome-icon-theme
+ avahi? ( net-dns/avahi[gtk3] )
+ ayatana? ( dev-libs/libappindicator )
+ crypt? ( dev-libs/libgcrypt:0 )
+ freerdp? (
+ >=net-misc/freerdp-1.1.0_beta1_p20130710
+ <net-misc/freerdp-1.2
+ )
+ gnome-keyring? ( gnome-base/libgnome-keyring )
+ ssh? ( net-libs/libssh[sftp] )
+ telepathy? ( net-libs/telepathy-glib )
+ vte? ( x11-libs/vte:2.90 )
+"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+"
+RDEPEND+="
+ !net-misc/remmina-plugins
+"
+
+DOCS=( README )
+PATCHES=( "${FILESDIR}/remmina-external_tools.patch" )
+
+S="${WORKDIR}/Remmina-${PV}"
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_with ayatana APPINDICATOR)
+ $(cmake-utils_use_with avahi AVAHI)
+ $(cmake-utils_use_with crypt GCRYPT)
+ $(cmake-utils_use_with freerdp FREERDP)
+ $(cmake-utils_use_with gnome-keyring GNOMEKEYRING)
+ $(cmake-utils_use_with nls GETTEXT)
+ $(cmake-utils_use_with nls TRANSLATIONS)
+ $(cmake-utils_use_with ssh LIBSSH)
+ $(cmake-utils_use_with telepathy TELEPATHY)
+ $(cmake-utils_use_with vte VTE)
+ -DGTK_VERSION=3
+ -DHAVE_PTHREAD=ON
+ )
+ cmake-utils_src_configure
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-misc/rinetd/Manifest b/net-misc/rinetd/Manifest
new file mode 100644
index 000000000000..e260e9f021d7
--- /dev/null
+++ b/net-misc/rinetd/Manifest
@@ -0,0 +1 @@
+DIST rinetd.tar.gz 115541 SHA256 0c68d27c5bd4b16ce4f58a6db514dd6ff37b2604a88b02c1dfcdc00fc1059898
diff --git a/net-misc/rinetd/files/rinetd.rc b/net-misc/rinetd/files/rinetd.rc
new file mode 100644
index 000000000000..9fe4d41e92cf
--- /dev/null
+++ b/net-misc/rinetd/files/rinetd.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() {
+ use net
+}
+
+start() {
+ ebegin "Starting rinetd"
+ /usr/sbin/rinetd
+ eend $?
+}
+
+stop() {
+ local ret
+ ebegin "Stopping rinetd"
+ start-stop-daemon --stop --pidfile /var/run/rinetd.pid
+ ret=$?
+ rm -f /var/run/rinetd.pid
+ eend ${ret}
+}
diff --git a/net-misc/rinetd/metadata.xml b/net-misc/rinetd/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/net-misc/rinetd/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/rinetd/rinetd-0.62-r1.ebuild b/net-misc/rinetd/rinetd-0.62-r1.ebuild
new file mode 100644
index 000000000000..911007719253
--- /dev/null
+++ b/net-misc/rinetd/rinetd-0.62-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit toolchain-funcs
+
+DESCRIPTION="redirects TCP connections from one IP address and port to another"
+HOMEPAGE="http://www.boutell.com/rinetd/"
+SRC_URI="http://www.boutell.com/rinetd/http/rinetd.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ sed -i -e "s:gcc:$(tc-getCC) \$(CFLAGS) \$(LDFLAGS):" Makefile
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS} -DLINUX" LDFLAGS="${LDFLAGS}" || die
+}
+
+src_install() {
+ dosbin rinetd || die
+ newinitd "${FILESDIR}"/rinetd.rc rinetd
+ doman rinetd.8
+ dodoc CHANGES README
+ dohtml index.html
+}
diff --git a/net-misc/ris-linux/Manifest b/net-misc/ris-linux/Manifest
new file mode 100644
index 000000000000..eb7b6e504ae0
--- /dev/null
+++ b/net-misc/ris-linux/Manifest
@@ -0,0 +1 @@
+DIST ris-linux-0.4.tar.gz 21634 SHA256 196c7441f498154d1ae41ef4f1e5107296b7de39f345c763ccce2e913432ae19 SHA512 e9eea14b45c060844e22dc3baa9cd15e7d202bcb3cb8b069b084115b05c0700bd563ed6322d675eee9baf72e8d530429d0c3137386377b6785ebc9007dbfd040 WHIRLPOOL 4607b013c46c4e657f3cac8c4a3bace495b3a7810059af2e5dda3cde04c984444cfe5074a1f86cfce48bd6546c6db79251c74f0bd97fe69744e041fbfea36989
diff --git a/net-misc/ris-linux/files/binlsrv.confd b/net-misc/ris-linux/files/binlsrv.confd
new file mode 100644
index 000000000000..2e6ed9f9090f
--- /dev/null
+++ b/net-misc/ris-linux/files/binlsrv.confd
@@ -0,0 +1,2 @@
+#Specify here path to directory with 'devlist.cache' file
+INFILE_PATH="/var/lib/ris/binl"
diff --git a/net-misc/ris-linux/files/binlsrv.initd b/net-misc/ris-linux/files/binlsrv.initd
new file mode 100644
index 000000000000..7e04b8bbe25d
--- /dev/null
+++ b/net-misc/ris-linux/files/binlsrv.initd
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting binlsrv"
+ if [ -z "$INFILE_PATH" ]; then
+ eerror "Path to devlist.cache not set, please set \$INFILE_PATH in /etc/conf.d/binlsrv"
+ return 1
+ fi
+ if [ ! -e "$INFILE_PATH/devlist.cache" ]; then
+ eerror "devlist.cache not generated, please make it with infparser.py"
+ fi
+
+ start-stop-daemon --start -i --exec /usr/bin/binlsrv.py --background \
+ --make-pidfile --pidfile /var/run/binlsrv.pid --chdir "$INFILE_PATH" \
+ --stdout /var/log/binlsrv.log
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping binlsrv"
+ start-stop-daemon --stop -i --exec /usr/bin/binlsrv.py --pidfile /var/run/binlsrv.pid
+ eend $?
+} \ No newline at end of file
diff --git a/net-misc/ris-linux/files/setup.py b/net-misc/ris-linux/files/setup.py
new file mode 100644
index 000000000000..0873f2512c99
--- /dev/null
+++ b/net-misc/ris-linux/files/setup.py
@@ -0,0 +1,9 @@
+#!/usr/bin/env python
+
+from distutils.core import setup
+
+setup(
+ name = 'ris-linux',
+ version = 'VERSION',
+ scripts = [ 'binlsrv.py', 'decode.py', 'infparser.py', 'fixloader.py', 'modldr.py' ]
+)
diff --git a/net-misc/ris-linux/metadata.xml b/net-misc/ris-linux/metadata.xml
new file mode 100644
index 000000000000..9e11bad60c03
--- /dev/null
+++ b/net-misc/ris-linux/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maksbotan@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-misc/ris-linux/ris-linux-0.4-r1.ebuild b/net-misc/ris-linux/ris-linux-0.4-r1.ebuild
new file mode 100644
index 000000000000..063729ef424e
--- /dev/null
+++ b/net-misc/ris-linux/ris-linux-0.4-r1.ebuild
@@ -0,0 +1,38 @@
+# 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="BINL server to doing Windows(r) RIS"
+HOMEPAGE="http://oss.netfarm.it/guides/pxe.php"
+SRC_URI="http://oss.netfarm.it/guides/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ || ( net-ftp/atftp net-ftp/tftp-hpa )
+ net-misc/dhcp
+ net-fs/samba
+ sys-boot/syslinux"
+
+python_prepare_all(){
+ sed "s:VERSION:${PV}:" "${FILESDIR}"/setup.py > "${S}"/setup.py
+ distutils-r1_python_prepare_all
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ newinitd "${FILESDIR}"/binlsrv.initd binlsrv
+ newconfd "${FILESDIR}"/binlsrv.confd binlsrv
+}
diff --git a/net-misc/rsync/Manifest b/net-misc/rsync/Manifest
new file mode 100644
index 000000000000..0be31d07f180
--- /dev/null
+++ b/net-misc/rsync/Manifest
@@ -0,0 +1,3 @@
+DIST rsync-3.0.9.tar.gz 792725 SHA256 30f10f8dd5490d28240d4271bb652b1da7a60b22ed2b9ae28090668de9247c05 SHA512 b08f9525d7af981b6010e99cc1fa2e39fea94db317a5078ad687adf2716160b0f67b9fad6d9e5b7db63749f031c925fe3b47599379a14a5565c71be85987d5ff WHIRLPOOL 0b1c6c6a310f813a0628b7bac36bc8bdbfffff4b641b93f5da0c6fd9f482958da40486c16ae9694af5382c63aa8e2ee733d79d7baef6e8e9b591cfb83617dcea
+DIST rsync-3.1.0.tar.gz 883901 SHA256 81ca23f77fc9b957eb9845a6024f41af0ff0c619b7f38576887c63fa38e2394e SHA512 bc8dfc90cac1a83cbb34e33cea805bfaa9597694a285fb69d55224fc52987c0199415b380f83a6ac55d17548e6888d1ab0d7bb5951ae4c3a3412c4e3ccf932f3 WHIRLPOOL 3b45271e9cd17eb42c7f06c2b516dc1e4a9333c03e6b5c3c80563ad8121870abdb92db401075a54ae7abe60e875938a4b5e4780eea8e3f30ca1ff75f95a6d00e
+DIST rsync-3.1.1.tar.gz 890124 SHA256 7de4364fcf5fe42f3bdb514417f1c40d10bbca896abe7e7f2c581c6ea08a2621 SHA512 ec0e46ff532a09a711282aaa822f5f1c133593ee6c1c474acd67284619236e6a202f0f369d3e67a95ceb3a3b1c39ea7fb609d6d6fb950f3be6e0f6372e903e21 WHIRLPOOL 0622646c10a0b4553fddbc0c3c48e6a87f78eaa56dc0cc0f0db86ed45e2c6572d23e4c379fae50ced012c2c0e75a364cae55f7c49f88918a9d62fb9ae17805b9
diff --git a/net-misc/rsync/files/rsync-3.1.1_pre1-avoid_infinite_wait_reading_secrets_file.patch b/net-misc/rsync/files/rsync-3.1.1_pre1-avoid_infinite_wait_reading_secrets_file.patch
new file mode 100644
index 000000000000..a3469a14a686
--- /dev/null
+++ b/net-misc/rsync/files/rsync-3.1.1_pre1-avoid_infinite_wait_reading_secrets_file.patch
@@ -0,0 +1,79 @@
+From: Wayne Davison <wayned@samba.org>
+Date: Sun, 13 Apr 2014 20:44:58 +0000 (-0700)
+Subject: Avoid infinite wait reading secrets file.
+X-Git-Url: https://git.samba.org/?p=rsync.git;a=commitdiff_plain;h=0dedfbce2c1b851684ba658861fe9d620636c56a
+
+Avoid infinite wait reading secrets file.
+---
+
+diff --git a/authenticate.c b/authenticate.c
+index 3381b8c..c92746c 100644
+--- a/authenticate.c
++++ b/authenticate.c
+@@ -102,15 +102,16 @@ static const char *check_secret(int module, const char *user, const char *group,
+ char pass2[MAX_DIGEST_LEN*2];
+ const char *fname = lp_secrets_file(module);
+ STRUCT_STAT st;
+- int fd, ok = 1;
++ int ok = 1;
+ int user_len = strlen(user);
+ int group_len = group ? strlen(group) : 0;
+ char *err;
++ FILE *fh;
+
+- if (!fname || !*fname || (fd = open(fname, O_RDONLY)) < 0)
++ if (!fname || !*fname || (fh = fopen(fname, "r")) == NULL)
+ return "no secrets file";
+
+- if (do_fstat(fd, &st) == -1) {
++ if (do_fstat(fileno(fh), &st) == -1) {
+ rsyserr(FLOG, errno, "fstat(%s)", fname);
+ ok = 0;
+ } else if (lp_strict_modes(module)) {
+@@ -123,29 +124,30 @@ static const char *check_secret(int module, const char *user, const char *group,
+ }
+ }
+ if (!ok) {
+- close(fd);
++ fclose(fh);
+ return "ignoring secrets file";
+ }
+
+ if (*user == '#') {
+ /* Reject attempt to match a comment. */
+- close(fd);
++ fclose(fh);
+ return "invalid username";
+ }
+
+ /* Try to find a line that starts with the user (or @group) name and a ':'. */
+ err = "secret not found";
+- while ((user || group) && read_line_old(fd, line, sizeof line, 1)) {
+- const char **ptr, *s;
++ while ((user || group) && fgets(line, sizeof line, fh) != NULL) {
++ const char **ptr, *s = strtok(line, "\n\r");
+ int len;
+- if (*line == '@') {
++ if (!s)
++ continue;
++ if (*s == '@') {
+ ptr = &group;
+ len = group_len;
+- s = line+1;
++ s++;
+ } else {
+ ptr = &user;
+ len = user_len;
+- s = line;
+ }
+ if (!*ptr || strncmp(s, *ptr, len) != 0 || s[len] != ':')
+ continue;
+@@ -158,7 +160,7 @@ static const char *check_secret(int module, const char *user, const char *group,
+ *ptr = NULL; /* Don't look for name again. */
+ }
+
+- close(fd);
++ fclose(fh);
+
+ memset(line, 0, sizeof line);
+ memset(pass2, 0, sizeof pass2);
diff --git a/net-misc/rsync/files/rsyncd.conf-3.0.9-r1 b/net-misc/rsync/files/rsyncd.conf-3.0.9-r1
new file mode 100644
index 000000000000..20dcf3afdc15
--- /dev/null
+++ b/net-misc/rsync/files/rsyncd.conf-3.0.9-r1
@@ -0,0 +1,15 @@
+# /etc/rsyncd.conf
+
+# Minimal configuration file for rsync daemon
+# See rsync(1) and rsyncd.conf(5) man pages for help
+
+# This line is required by the /etc/init.d/rsyncd script
+pid file = @GENTOO_PORTAGE_EPREFIX@/run/rsyncd.pid
+use chroot = yes
+read only = yes
+
+# Simple example for enabling your own local rsync server
+#[gentoo-portage]
+# path = @GENTOO_PORTAGE_EPREFIX@/usr/portage
+# comment = Gentoo Portage tree
+# exclude = /distfiles /packages
diff --git a/net-misc/rsync/files/rsyncd.conf.d b/net-misc/rsync/files/rsyncd.conf.d
new file mode 100644
index 000000000000..c3d897ed2f2e
--- /dev/null
+++ b/net-misc/rsync/files/rsyncd.conf.d
@@ -0,0 +1,5 @@
+# /etc/conf.d/rsyncd: config file for /etc/init.d/rsyncd
+
+# see man pages for rsync or run `rsync --help`
+# for valid cmdline options
+#RSYNC_OPTS=""
diff --git a/net-misc/rsync/files/rsyncd.init.d-r1 b/net-misc/rsync/files/rsyncd.init.d-r1
new file mode 100644
index 000000000000..a2acfb6a587a
--- /dev/null
+++ b/net-misc/rsync/files/rsyncd.init.d-r1
@@ -0,0 +1,12 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+command="/usr/bin/rsync"
+command_args="--daemon ${RSYNC_OPTS}"
+pidfile="/var/run/${SVCNAME}.pid"
+
+depend() {
+ use net
+}
diff --git a/net-misc/rsync/files/rsyncd.logrotate b/net-misc/rsync/files/rsyncd.logrotate
new file mode 100644
index 000000000000..34bcf72d210c
--- /dev/null
+++ b/net-misc/rsync/files/rsyncd.logrotate
@@ -0,0 +1,9 @@
+/var/log/rsync.log {
+ compress
+ maxage 365
+ rotate 7
+ size=+1024k
+ notifempty
+ missingok
+ copytruncate
+}
diff --git a/net-misc/rsync/files/rsyncd.service b/net-misc/rsync/files/rsyncd.service
new file mode 100644
index 000000000000..a2c1de0add1f
--- /dev/null
+++ b/net-misc/rsync/files/rsyncd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=rsync daemon
+After=networking.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/rsync --daemon --no-detach
+StandardOutput=syslog
+StandardError=syslog
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/rsync/files/rsyncd.xinetd-3.0.9-r1 b/net-misc/rsync/files/rsyncd.xinetd-3.0.9-r1
new file mode 100644
index 000000000000..90d07f0710ba
--- /dev/null
+++ b/net-misc/rsync/files/rsyncd.xinetd-3.0.9-r1
@@ -0,0 +1,10 @@
+service rsync
+{
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ user = root
+ server = @GENTOO_PORTAGE_EPREFIX@/usr/bin/rsync
+ server_args = --daemon
+ disable = yes
+}
diff --git a/net-misc/rsync/metadata.xml b/net-misc/rsync/metadata.xml
new file mode 100644
index 000000000000..6ed850525265
--- /dev/null
+++ b/net-misc/rsync/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>base-system</herd>
+<upstream>
+ <remote-id type="cpe">cpe:/a:samba:rsync</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/net-misc/rsync/rsync-3.0.9-r3.ebuild b/net-misc/rsync/rsync-3.0.9-r3.ebuild
new file mode 100644
index 000000000000..700bdc00993d
--- /dev/null
+++ b/net-misc/rsync/rsync-3.0.9-r3.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils flag-o-matic prefix systemd
+
+DESCRIPTION="File transfer program to keep remote files into sync"
+HOMEPAGE="http://rsync.samba.org/"
+SRC_URI="http://rsync.samba.org/ftp/rsync/src/${P/_/}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="acl iconv ipv6 static xattr"
+
+LIB_DEPEND="acl? ( virtual/acl[static-libs(+)] )
+ xattr? ( kernel_linux? ( sys-apps/attr[static-libs(+)] ) )
+ >=dev-libs/popt-1.5[static-libs(+)]"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ iconv? ( virtual/libiconv )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+
+S=${WORKDIR}/${P/_/}
+
+src_prepare() {
+ epatch_user
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ econf \
+ --without-included-popt \
+ $(use_enable acl acl-support) \
+ $(use_enable xattr xattr-support) \
+ $(use_enable ipv6) \
+ $(use_enable iconv) \
+ --with-rsyncd-conf="${EPREFIX}"/etc/rsyncd.conf
+ touch proto.h-tstamp #421625
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ newconfd "${FILESDIR}"/rsyncd.conf.d rsyncd
+ newinitd "${FILESDIR}"/rsyncd.init.d-r1 rsyncd
+ dodoc NEWS OLDNEWS README TODO tech_report.tex
+ insinto /etc
+ newins "${FILESDIR}"/rsyncd.conf-3.0.9-r1 rsyncd.conf
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/rsyncd.logrotate rsyncd
+
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/rsyncd.xinetd-3.0.9-r1 rsyncd
+
+ # Install the useful contrib scripts
+ exeinto /usr/share/rsync
+ doexe support/*
+ rm -f "${ED}"/usr/share/rsync/{Makefile*,*.c}
+
+ eprefixify "${ED}"/etc/{,xinetd.d}/rsyncd*
+
+ systemd_dounit "${FILESDIR}/rsyncd.service"
+}
+
+pkg_postinst() {
+ if egrep -qis '^[[:space:]]use chroot[[:space:]]*=[[:space:]]*(no|0|false)' \
+ "${EROOT}"/etc/rsyncd.conf "${EROOT}"/etc/rsync/rsyncd.conf ; then
+ ewarn "You have disabled chroot support in your rsyncd.conf. This"
+ ewarn "is a security risk which you should fix. Please check your"
+ ewarn "/etc/rsyncd.conf file and fix the setting 'use chroot'."
+ fi
+}
diff --git a/net-misc/rsync/rsync-3.1.0-r1.ebuild b/net-misc/rsync/rsync-3.1.0-r1.ebuild
new file mode 100644
index 000000000000..f1f7e843037a
--- /dev/null
+++ b/net-misc/rsync/rsync-3.1.0-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils flag-o-matic prefix systemd
+
+DESCRIPTION="File transfer program to keep remote files into sync"
+HOMEPAGE="http://rsync.samba.org/"
+SRC_URI="http://rsync.samba.org/ftp/rsync/src/${P/_/}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="acl iconv ipv6 static xattr"
+
+LIB_DEPEND="acl? ( virtual/acl[static-libs(+)] )
+ xattr? ( kernel_linux? ( sys-apps/attr[static-libs(+)] ) )
+ >=dev-libs/popt-1.5[static-libs(+)]"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ iconv? ( virtual/libiconv )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+
+S=${WORKDIR}/${P/_/}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.1.1_pre1-avoid_infinite_wait_reading_secrets_file.patch
+ epatch_user
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ econf \
+ --without-included-popt \
+ $(use_enable acl acl-support) \
+ $(use_enable xattr xattr-support) \
+ $(use_enable ipv6) \
+ $(use_enable iconv) \
+ --with-rsyncd-conf="${EPREFIX}"/etc/rsyncd.conf
+ touch proto.h-tstamp #421625
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ newconfd "${FILESDIR}"/rsyncd.conf.d rsyncd
+ newinitd "${FILESDIR}"/rsyncd.init.d-r1 rsyncd
+ dodoc NEWS OLDNEWS README TODO tech_report.tex
+ insinto /etc
+ newins "${FILESDIR}"/rsyncd.conf-3.0.9-r1 rsyncd.conf
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/rsyncd.logrotate rsyncd
+
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/rsyncd.xinetd-3.0.9-r1 rsyncd
+
+ # Install the useful contrib scripts
+ exeinto /usr/share/rsync
+ doexe support/*
+ rm -f "${ED}"/usr/share/rsync/{Makefile*,*.c}
+
+ eprefixify "${ED}"/etc/{,xinetd.d}/rsyncd*
+
+ systemd_dounit "${FILESDIR}/rsyncd.service"
+}
+
+pkg_postinst() {
+ if egrep -qis '^[[:space:]]use chroot[[:space:]]*=[[:space:]]*(no|0|false)' \
+ "${EROOT}"/etc/rsyncd.conf "${EROOT}"/etc/rsync/rsyncd.conf ; then
+ ewarn "You have disabled chroot support in your rsyncd.conf. This"
+ ewarn "is a security risk which you should fix. Please check your"
+ ewarn "/etc/rsyncd.conf file and fix the setting 'use chroot'."
+ fi
+}
diff --git a/net-misc/rsync/rsync-3.1.1.ebuild b/net-misc/rsync/rsync-3.1.1.ebuild
new file mode 100644
index 000000000000..15206a010a7a
--- /dev/null
+++ b/net-misc/rsync/rsync-3.1.1.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 eutils flag-o-matic prefix systemd
+
+DESCRIPTION="File transfer program to keep remote files into sync"
+HOMEPAGE="http://rsync.samba.org/"
+SRC_URI="http://rsync.samba.org/ftp/rsync/src/${P/_/}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="acl iconv ipv6 static xattr"
+
+LIB_DEPEND="acl? ( virtual/acl[static-libs(+)] )
+ xattr? ( kernel_linux? ( sys-apps/attr[static-libs(+)] ) )
+ >=dev-libs/popt-1.5[static-libs(+)]"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ iconv? ( virtual/libiconv )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+
+S=${WORKDIR}/${P/_/}
+
+src_prepare() {
+ epatch_user
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ econf \
+ --without-included-popt \
+ $(use_enable acl acl-support) \
+ $(use_enable xattr xattr-support) \
+ $(use_enable ipv6) \
+ $(use_enable iconv) \
+ --with-rsyncd-conf="${EPREFIX}"/etc/rsyncd.conf
+ touch proto.h-tstamp #421625
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ newconfd "${FILESDIR}"/rsyncd.conf.d rsyncd
+ newinitd "${FILESDIR}"/rsyncd.init.d-r1 rsyncd
+ dodoc NEWS OLDNEWS README TODO tech_report.tex
+ insinto /etc
+ newins "${FILESDIR}"/rsyncd.conf-3.0.9-r1 rsyncd.conf
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/rsyncd.logrotate rsyncd
+
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/rsyncd.xinetd-3.0.9-r1 rsyncd
+
+ # Install the useful contrib scripts
+ exeinto /usr/share/rsync
+ doexe support/*
+ rm -f "${ED}"/usr/share/rsync/{Makefile*,*.c}
+
+ eprefixify "${ED}"/etc/{,xinetd.d}/rsyncd*
+
+ systemd_dounit "${FILESDIR}/rsyncd.service"
+}
+
+pkg_postinst() {
+ if egrep -qis '^[[:space:]]use chroot[[:space:]]*=[[:space:]]*(no|0|false)' \
+ "${EROOT}"/etc/rsyncd.conf "${EROOT}"/etc/rsync/rsyncd.conf ; then
+ ewarn "You have disabled chroot support in your rsyncd.conf. This"
+ ewarn "is a security risk which you should fix. Please check your"
+ ewarn "/etc/rsyncd.conf file and fix the setting 'use chroot'."
+ fi
+}
diff --git a/net-misc/rwbs/Manifest b/net-misc/rwbs/Manifest
new file mode 100644
index 000000000000..5889710aa4a3
--- /dev/null
+++ b/net-misc/rwbs/Manifest
@@ -0,0 +1 @@
+DIST rwbs_Linux_0_27.tar.gz 365489 SHA256 dcf1568c6d5ce3f49f3b1f92fc67f0f9a4abb3905a3b13fb0a818b2c091d3ab0 SHA512 131aa275015fe032462d2848fbefc9b1949fccb605663203c2d7b4cf32ed0351f10368e5458af7d54e8b251ae8539febd3bd57c7b5df146770161aba3ba90959 WHIRLPOOL 61b9489547498d3c8c862120d76fc37c300b502a834c192ca9677d6b89a709bafb3cf76a5959320402d6fc60c9171304015fe85074074fda014d3eca687d50d5
diff --git a/net-misc/rwbs/files/rwbs.conf b/net-misc/rwbs/files/rwbs.conf
new file mode 100644
index 000000000000..09541e48f14c
--- /dev/null
+++ b/net-misc/rwbs/files/rwbs.conf
@@ -0,0 +1,21 @@
+# Roger Wilco base station configuration
+#
+# $ rwbs --help reads:
+# usage: ./rwbs [-b(ackwardcompat)] [-t(est)] [-s(tatic)] [-p <passwd>] [-u <udpport>] [-x <connectspeed>] [$
+# connectspeed is an integer measuring the allocated broadcast
+# capacity for the channel host. The recommended value is 1.
+# Higher values will cause the RWBS to use its additional broadcast capacity
+# to help relay transmissions, at the expense of scalability.
+# the b(ackwardcompat) option tells RWBS to appear as a "user" on the
+# channel. Mark I users will prefer this, but not Mark Ia users.
+# The s(tatic) option indicates that a client asking to join a
+# non-existent named channel should be turned away with an error.
+# rather than being hosted on a dynamically-created channel.
+# hostname is what your station's name will be in the Roger Wilco Channel Tab.
+# For instance, if you used -n "Clan Hurt", Roger Wilco users will see
+# an entry in the Channel window named "Clan Hurt Base"
+# If the -t(est) flag is used, the base station echoes transmissions
+# when there is just one other party on the channel.
+
+# Specify whatever options you want on this line
+RWBS_OPTS='-n "Gentoo Linux"'
diff --git a/net-misc/rwbs/files/rwbs.rc b/net-misc/rwbs/files/rwbs.rc
new file mode 100644
index 000000000000..88528a7fa7cf
--- /dev/null
+++ b/net-misc/rwbs/files/rwbs.rc
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting Roger Wilco base station"
+ start-stop-daemon --start --quiet --exec /opt/bin/rwbs -b \
+ -- \${RWBS_OPTS} >>/var/log/rwbs 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Roger Wilco base station"
+ start-stop-daemon --stop --quiet --exec /opt/bin/rwbs > /dev/null 2>&1
+ eend $?
+}
diff --git a/net-misc/rwbs/metadata.xml b/net-misc/rwbs/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/net-misc/rwbs/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/rwbs/rwbs-0.27-r1.ebuild b/net-misc/rwbs/rwbs-0.27-r1.ebuild
new file mode 100644
index 000000000000..94b40927c68f
--- /dev/null
+++ b/net-misc/rwbs/rwbs-0.27-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Roger Wilco base station"
+HOMEPAGE="http://rogerwilco.gamespy.com/"
+SRC_URI="http://games.gci.net/pub/VoiceOverIP/RogerWilco/rwbs_Linux_0_27.tar.gz"
+
+SLOT="0"
+LICENSE="Resounding GPL-2"
+KEYWORDS="~amd64 x86"
+IUSE=""
+
+# Everything is statically linked
+DEPEND=""
+
+S="${WORKDIR}"
+
+QA_PREBUILT="opt/bin/rwbs"
+
+src_install() {
+ dodoc README.TXT CHANGES.TXT
+ exeinto /opt/bin
+ doexe rwbs run_rwbs
+
+ # Put distribution into /usr/share/rwbs
+ insinto /usr/share/rwbs/
+ doins "${S}"/anotherpersonjoined "${S}"/helloandwelcome \
+ "${S}"/ifucanhearthis "${S}"/invitetestxmit "${S}"/join?.rwc \
+ "${S}"/plsstartagame "${S}"/thisisatestmsg
+
+ newconfd "${FILESDIR}"/rwbs.conf rwbs
+ newinitd "${FILESDIR}"/rwbs.rc rwbs
+}
diff --git a/net-misc/rwhoisd/Manifest b/net-misc/rwhoisd/Manifest
new file mode 100644
index 000000000000..ed0fd3317eee
--- /dev/null
+++ b/net-misc/rwhoisd/Manifest
@@ -0,0 +1 @@
+DIST rwhoisd-1.5.9.5.tar.gz 491600 SHA256 832da8faff58070fcc8685c67375dcced3b6bb225ffbe3542dd6052add61cf92 SHA512 d9227cd700cb14e0c83003c7a8dff43f859eba58390f4ba74b03c58fe629bcc9e8a39f2aaf7ce9b55aa4f17f43fc54fed9ba05a29bcbe1df5fc1340202d7b04c WHIRLPOOL ba6f7741462468d8f9e933c69f576c2204ede70b0315486df1885afa2a45755c32b7e4170df7792c2aa6516f51c39eb01495ba8cec453f676265817fff8cecb2
diff --git a/net-misc/rwhoisd/files/rwhoisd b/net-misc/rwhoisd/files/rwhoisd
new file mode 100644
index 000000000000..8e02214c8d07
--- /dev/null
+++ b/net-misc/rwhoisd/files/rwhoisd
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+
+depend() {
+ use logger
+}
+
+start() {
+ ebegin "Starting rwhoisd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/rwhoisd -- ${RWHOISD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping rwhoisd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/rwhoisd
+ eend $?
+}
diff --git a/net-misc/rwhoisd/files/rwhoisd-destdir-1.5.9.5.patch b/net-misc/rwhoisd/files/rwhoisd-destdir-1.5.9.5.patch
new file mode 100644
index 000000000000..6cd6b28f2e51
--- /dev/null
+++ b/net-misc/rwhoisd/files/rwhoisd-destdir-1.5.9.5.patch
@@ -0,0 +1,39 @@
+--- a/tools/rwhois_repack/Makefile.in
++++ b/tools/rwhois_repack/Makefile.in
+@@ -52,9 +52,9 @@
+ # procedural
+
+ install:
+- if [ ! -d $(exec_prefix) ]; then mkdir $(exec_prefix); fi
+- if [ ! -d $(bindir) ]; then mkdir $(bindir); fi
+- $(INSTALL) rwhois_repack $(bindir)
++ if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir $(DESTDIR)$(exec_prefix); fi
++ if [ ! -d $(DESTDIR)$(bindir) ]; then mkdir $(DESTDIR)$(bindir); fi
++ $(INSTALL) rwhois_repack $(DESTDIR)$(bindir)
+
+ uninstall:
+ $(RM) $(bindir)/rwhois_repack
+
+--- a/sample.data/Makefile.in
++++ b/sample.data/Makefile.in
+@@ -10,7 +10,7 @@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ bindir = $(exec_prefix)/bin
+-etcdir = $(exec_prefix)/etc
++etcdir = /etc
+
+ srcdir = @srcdir@
+ VPATH = @srcdir@
+
+--- a/sample.data/Makefile.in
++++ b/sample.data/Makefile.in
+@@ -17,7 +17,7 @@
+
+ DESTDIR =
+
+-RWHOIS_ROOT_DIR = $(DESTDIR)$(etcdir)/rwhoisd/samples
++RWHOIS_ROOT_DIR = $(DESTDIR)/var/rwhoisd/samples
+
+ FILES = \
+ a.com \
diff --git a/net-misc/rwhoisd/files/rwhoisd.conf b/net-misc/rwhoisd/files/rwhoisd.conf
new file mode 100644
index 000000000000..eb32d26d55ed
--- /dev/null
+++ b/net-misc/rwhoisd/files/rwhoisd.conf
@@ -0,0 +1,7 @@
+# configuration file for /etc/init.d/rwhoisd
+
+OPTS="-c /etc/rwhoisd/rwhoisd.conf"
+
+# Pass any additional options to rwhoisd here.
+
+RWHOISD_OPTS="${OPTS}"
diff --git a/net-misc/rwhoisd/metadata.xml b/net-misc/rwhoisd/metadata.xml
new file mode 100644
index 000000000000..4ef356922b64
--- /dev/null
+++ b/net-misc/rwhoisd/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>maintainer-needed@gentoo.org</email>
+</maintainer>
+<longdescription>rwhois server from ARIN</longdescription>
+</pkgmetadata>
diff --git a/net-misc/rwhoisd/rwhoisd-1.5.9.5-r2.ebuild b/net-misc/rwhoisd/rwhoisd-1.5.9.5-r2.ebuild
new file mode 100644
index 000000000000..2deb2360d574
--- /dev/null
+++ b/net-misc/rwhoisd/rwhoisd-1.5.9.5-r2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic user
+
+DESCRIPTION="ARIN rwhois daemon"
+HOMEPAGE="http://projects.arin.net/rwhois/"
+SRC_URI="http://projects.arin.net/rwhois/ftp/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+ sys-devel/flex
+ virtual/yacc
+"
+
+pkg_setup() {
+ enewgroup rwhoisd
+ enewuser rwhoisd -1 -1 /var/rwhoisd rwhoisd
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-destdir-${PV}.patch
+ append-cflags -DNEW_STYLE_BIN_SORT
+}
+
+src_compile() {
+ emake -C common
+ emake -C regexp
+ emake -C mkdb
+ default
+}
+
+src_install () {
+ default
+ doinitd "${FILESDIR}"/rwhoisd
+ newconfd "${FILESDIR}"/rwhoisd.conf rwhoisd
+}
+
+pkg_postinst () {
+ einfo "Please make sure to set the userid in rwhoisd.conf to rwhoisd."
+ einfo "It is highly inadvisable to run rwhoisd as root."
+}
diff --git a/net-misc/rygel/Manifest b/net-misc/rygel/Manifest
new file mode 100644
index 000000000000..f5738e45bdc4
--- /dev/null
+++ b/net-misc/rygel/Manifest
@@ -0,0 +1,2 @@
+DIST rygel-0.24.4.tar.xz 3198880 SHA256 de7872ccb66aebd397dc664ad617a278e6c9eb3d6f6e706ddacfbbce89434d4c SHA512 f44de9afed85f26bc9d54976ecbc3aca6cc246bba9c86be9302df499fce4850a394c786d15e862ed6dab8a6a2e6ddb4c65ea6e970beb508172f2385fb39d511b WHIRLPOOL aacf3e995820cb57d688167b33e8eeea0d2c61d839e29f0a47975269139fd6414af2668bb351d28aabeea83d254b352a9c477a839984c5b1d02bf29036939593
+DIST rygel-0.26.1.tar.xz 2191348 SHA256 390740609e34399b886ddb9a8f7eca25055ad72048dfdd869edf02999b1e1d8f SHA512 3b0c168a9c974a8900a1e8ab9de764e24ed1b8b11df8f24ee0522ccd85cffce6477b36e4d83a7e278f7e9198865d800c35673ed0819e800bc406279a59d16fc8 WHIRLPOOL 54416b603a8a72695cfe59fd559006a12878ab0c51d6e21e3867b5fd36be6b2d33c144275ea9f05e3cfa822e0023fbc28dd9b0e1ae62f2e880718ca5e5235805
diff --git a/net-misc/rygel/metadata.xml b/net-misc/rygel/metadata.xml
new file mode 100644
index 000000000000..49d68040ba4c
--- /dev/null
+++ b/net-misc/rygel/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>gnome</herd>
+ <use>
+ <flag name="tracker">Install dependencies for the tracker plugin</flag>
+ <flag name="transcode">Install dependencies for transcoding support</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/rygel/rygel-0.24.4.ebuild b/net-misc/rygel/rygel-0.24.4.ebuild
new file mode 100644
index 000000000000..82f05ffb669f
--- /dev/null
+++ b/net-misc/rygel/rygel-0.24.4.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GNOME2_LA_PUNT="yes"
+GCONF_DEBUG="no"
+
+inherit gnome2 virtualx
+
+DESCRIPTION="Rygel is an open source UPnP/DLNA MediaServer"
+HOMEPAGE="https://wiki.gnome.org/Projects/Rygel"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="X +introspection +sqlite tracker test transcode"
+
+# The deps for tracker? and transcode? are just the earliest available
+# version at the time of writing this ebuild
+RDEPEND="
+ >=dev-libs/glib-2.34:2
+ >=dev-libs/libgee-0.8:0.8
+ >=dev-libs/libxml2-2.7:2
+ >=media-libs/gupnp-dlna-0.9.4:2.0
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ >=media-libs/libmediaart-0.5:1.0
+ media-plugins/gst-plugins-soup:1.0
+ >=net-libs/gssdp-0.13
+ >=net-libs/gupnp-0.19
+ >=net-libs/gupnp-av-0.12.4
+ >=net-libs/libsoup-2.44:2.4
+ >=sys-apps/util-linux-2.20
+ x11-misc/shared-mime-info
+ introspection? ( >=dev-libs/gobject-introspection-1.33.4:= )
+ sqlite? (
+ >=dev-db/sqlite-3.5:3
+ dev-libs/libunistring
+ )
+ tracker? ( >=app-misc/tracker-0.16:= )
+ transcode? (
+ media-libs/gst-plugins-bad:1.0
+ media-plugins/gst-plugins-twolame:1.0
+ media-plugins/gst-plugins-libav:1.0
+ )
+ X? ( >=x11-libs/gtk+-3:3 )
+"
+DEPEND="${RDEPEND}
+ dev-util/gtk-doc-am
+ >=dev-util/intltool-0.40
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+# Maintainer only
+# >=dev-lang/vala-0.22
+# dev-libs/libxslt
+
+src_prepare() {
+ # runs gst-plugins-scanner on run with triggers sandbox violation
+ # trying to open dri
+ sed -e 's/rygel-media-engine-test$(EXEEXT)//' \
+ -e 's/rygel-playbin-renderer-test$(EXEEXT)//' \
+ -i tests/Makefile.in || die
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ # We defined xsltproc because man pages are provided by upstream
+ # and we do not want to regenerate them automagically.
+ gnome2_src_configure \
+ XSLTPROC=$(type -P false) \
+ --enable-gst-launch-plugin \
+ --enable-mediathek-plugin \
+ --with-media-engine=gstreamer \
+ --enable-nls \
+ $(use_enable introspection) \
+ $(use_enable sqlite media-export-plugin) \
+ $(use_enable test tests) \
+ $(use_enable tracker tracker-plugin) \
+ $(use_with X ui)
+}
+
+src_install() {
+ gnome2_src_install
+ # Autostart file is not placed correctly, bug #402745
+ insinto /etc/xdg/autostart
+ doins "${D}"/usr/share/applications/rygel.desktop
+ rm "${D}"/usr/share/applications/rygel.desktop
+}
diff --git a/net-misc/rygel/rygel-0.26.1.ebuild b/net-misc/rygel/rygel-0.26.1.ebuild
new file mode 100644
index 000000000000..9ec428c5da96
--- /dev/null
+++ b/net-misc/rygel/rygel-0.26.1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+
+inherit gnome2 virtualx
+
+DESCRIPTION="Rygel is an open source UPnP/DLNA MediaServer"
+HOMEPAGE="https://wiki.gnome.org/Projects/Rygel"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X +introspection +sqlite tracker test transcode"
+
+# The deps for tracker? and transcode? are just the earliest available
+# version at the time of writing this ebuild
+RDEPEND="
+ >=dev-libs/glib-2.34:2
+ >=dev-libs/libgee-0.8:0.8
+ >=dev-libs/libxml2-2.7:2
+ >=media-libs/gupnp-dlna-0.9.4:2.0
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0
+ >=media-libs/libmediaart-0.7:2.0
+ media-plugins/gst-plugins-soup:1.0
+ >=net-libs/gssdp-0.13
+ >=net-libs/gupnp-0.19
+ >=net-libs/gupnp-av-0.12.4
+ >=net-libs/libsoup-2.44:2.4
+ >=sys-apps/util-linux-2.20
+ x11-misc/shared-mime-info
+ introspection? ( >=dev-libs/gobject-introspection-1.33.4 )
+ sqlite? (
+ >=dev-db/sqlite-3.5:3
+ dev-libs/libunistring:=
+ )
+ tracker? ( >=app-misc/tracker-0.16:= )
+ transcode? (
+ media-libs/gst-plugins-bad:1.0
+ media-plugins/gst-plugins-twolame:1.0
+ media-plugins/gst-plugins-libav:1.0
+ )
+ X? ( >=x11-libs/gtk+-3:3 )
+"
+DEPEND="${RDEPEND}
+ dev-util/gtk-doc-am
+ >=dev-util/intltool-0.40
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+# Maintainer only
+# >=dev-lang/vala-0.22
+# dev-libs/libxslt
+
+src_configure() {
+ # We defined xsltproc because man pages are provided by upstream
+ # and we do not want to regenerate them automagically.
+ gnome2_src_configure \
+ XSLTPROC=$(type -P false) \
+ --enable-gst-launch-plugin \
+ --enable-mediathek-plugin \
+ --with-media-engine=gstreamer \
+ --enable-nls \
+ $(use_enable introspection) \
+ $(use_enable sqlite media-export-plugin) \
+ $(use_enable test tests) \
+ $(use_enable tracker tracker-plugin) \
+ $(use_with X ui)
+}
+
+src_install() {
+ gnome2_src_install
+ # Autostart file is not placed correctly, bug #402745
+ insinto /etc/xdg/autostart
+ doins "${D}"/usr/share/applications/rygel.desktop
+ rm "${D}"/usr/share/applications/rygel.desktop
+}
diff --git a/net-misc/s3cmd/Manifest b/net-misc/s3cmd/Manifest
new file mode 100644
index 000000000000..6350b8a97a42
--- /dev/null
+++ b/net-misc/s3cmd/Manifest
@@ -0,0 +1,2 @@
+DIST s3cmd-1.0.1.tar.gz 57594 SHA256 d76826ea9c5a4789044424f1a50abe83523ba5d12a9185c7a6b7f4c86984bdce SHA512 daddb6c49a22cb2c9196d69116abddc639ab117b8a21413068e33e76f67dff5a21d6dca9a9d385113651fa996ace2359684709b2a3be33f4404ad79ed3d44814 WHIRLPOOL d151d9581359fd8dcc23550bc45fc972ab349153e7488d8d9e28c18857e5d550e834ae16274029797a4d2a096aa988e780ad82756f4f1b2a936002667ac96186
+DIST s3cmd-1.5.2.tar.gz 94760 SHA256 ff8a6764e8bdd7ed48a93e51b08222bea33469d248a90b8d25315b023717b42d SHA512 6493d1c2739c79611ab986882842c4c161a466fdd91a6d48b68ddfa14d7743a9b5dde77902efae336bd632827497ab83962d5835c89135e8f9109d45e14b1e9a WHIRLPOOL ec5fec5e803a87b75689f4bba3f5913c8854d6035b34f5267e4da80a47c86925fdcd053eab24f4bf35b8b1ee2bccd41f7882b6c9fb3b6fdb0257c5ca492dc805
diff --git a/net-misc/s3cmd/metadata.xml b/net-misc/s3cmd/metadata.xml
new file mode 100644
index 000000000000..06966dc83fc3
--- /dev/null
+++ b/net-misc/s3cmd/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>igor@itesten.com</email>
+ <name>Igor Testen</name>
+ <description>Proxy maintainer, assign bugs</description>
+ </maintainer>
+ <maintainer>
+ <email>titanofold@gentoo.org</email>
+ <name>Aaron W. Swenson</name>
+ </maintainer>
+ <longdescription>
+ Command line client for Amazon S3.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">s3tools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/s3cmd/s3cmd-1.0.1.ebuild b/net-misc/s3cmd/s3cmd-1.0.1.ebuild
new file mode 100644
index 000000000000..88128f58129a
--- /dev/null
+++ b/net-misc/s3cmd/s3cmd-1.0.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+PYTHON_DEPEND="2"
+PYTHON_USE_WITH="xml"
+
+inherit distutils
+
+KEYWORDS="amd64 x86"
+DESCRIPTION="Command line client for Amazon S3"
+HOMEPAGE="http://s3tools.org/s3cmd"
+SRC_URI="mirror://sourceforge/s3tools/${P}.tar.gz"
+LICENSE="GPL-2"
+
+IUSE=""
+SLOT="0"
+
+DEPEND=""
+RDEPEND=""
+
+PYTHON_MODNAME="S3"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_install() {
+ S3CMD_INSTPATH_DOC=/usr/share/doc/${PF} distutils_src_install
+ rm -rf "${D}"/usr/share/doc/${PF}/${PN} || die 'rm failed'
+}
diff --git a/net-misc/s3cmd/s3cmd-1.5.2-r1.ebuild b/net-misc/s3cmd/s3cmd-1.5.2-r1.ebuild
new file mode 100644
index 000000000000..562e2fa8de2a
--- /dev/null
+++ b/net-misc/s3cmd/s3cmd-1.5.2-r1.ebuild
@@ -0,0 +1,31 @@
+# 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="xml"
+
+inherit distutils-r1
+
+DESCRIPTION="Command line client for Amazon S3"
+HOMEPAGE="http://s3tools.org/s3cmd"
+SRC_URI="mirror://sourceforge/s3tools/${P/_/-}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86 ~x64-macos"
+IUSE=""
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND="dev-python/python-dateutil[${PYTHON_USEDEP}]
+ dev-python/python-magic[${PYTHON_USEDEP}]"
+
+S="$WORKDIR/${P/_/-}"
+
+python_install_all() {
+ # setup/py doesn't intereact well with the eclass
+ distutils-r1_python_install_all
+# rm -rf "${D}"usr/share/doc/packages || die
+}
diff --git a/net-misc/samplicator/Manifest b/net-misc/samplicator/Manifest
new file mode 100644
index 000000000000..840d73714604
--- /dev/null
+++ b/net-misc/samplicator/Manifest
@@ -0,0 +1,2 @@
+DIST samplicator-1.3.6.tar.gz 87901 SHA256 d5af47be6fc6cdbd9b5d116c65a92c6b9fd546df1c9cd61c831b5b85eb1f2742 SHA512 a4023344ec911d3dc6992ddce139e6f1c86a67bd9948a3f92a995dc26aeda1753becea4b0f5d9ad45a06d628029bffc0a77c28fbd277da9faf42100c01d55f31 WHIRLPOOL c499abfe21ed1d8062ab8fad1b6ae87a45217a797f8997588bf6aa8acd2b743dac4e9d5df965208ffd999dd7fa59e7e413956a2ddb5f86cdbac77de854ff9737
+DIST samplicator-1.3.7-beta6.tar.gz 95603 SHA256 8f1da80f2b32ef0e41a720fe1c98905f6e4cb1acb2949dbdddbb665a09655faf SHA512 fbb22dbe37afe5d1a855866da0ca0b1c8a8165bf366a45ca25648c9e30448adc959143a2571661cc1ae59332557a58d0fa3c87b405fca6c8543bed38cf12e622 WHIRLPOOL 9a0685793774c985bea33a0cbb4fffd40f8a1e38a03a9243008188b8e725574e3a34519a616ff8262cd081afcf59d87635aae8ce192f1fdc7088d0149a90ee86
diff --git a/net-misc/samplicator/files/samplicator.8 b/net-misc/samplicator/files/samplicator.8
new file mode 100644
index 000000000000..1ddef2407238
--- /dev/null
+++ b/net-misc/samplicator/files/samplicator.8
@@ -0,0 +1,86 @@
+.TH samplicator 8 "February 25, 2013" "" "samplicator"
+.SH NAME
+.B samplicator
+\- UDP packets forwarder and duplicator
+.SH SYNOPSIS
+.B samplicator
+.RB [ \-p
+.IR port ]
+.RB [ \-s
+.IR address ]
+.RB [ \-d
+.IR level ]
+.RB [ \-b
+.IR size ]
+.RB [ \-n ]
+.RB [ \-S ]
+.RB [ \-x
+.IR delay ]
+.RB [ \-c
+.IR config ]
+.RB [ \-f ]
+.RB [ \-h ]
+.RB A.B.C.D[/\fIport\fP[/\fIfreq\fP][,\fIttl\fP]]
+.SH DESCRIPTION
+.B samplicator
+is simple program listens for UDP datagrams (NetFlow, sFlow, SNMP Trap, Syslog)
+on a network port, and sends copies of these datagrams on to a set of destinations.
+Optionally, it can perform sampling, i.e. rather than forwarding every packet,
+forward only 1 in N. Another option is that it can "spoof" the IP source address,
+so that the copies appear to come from the original source, rather than the relay.
+.SH OPTIONS
+The following command-line options are accepted by the server:
+.IP "\-p \fIport\fP"
+UDP port to accept flows on. Default \- 2000.
+.IP "\-s \fIaddress\fP"
+interface address to accept flows on. Default \- any.
+.IP "\-d \fIlevel\fP"
+debug level
+.IP "\-b \fIsize\fP"
+set socket buffer size. Default \- 65536.
+.IP \-n
+don't compute UDP checksum (leave at 0)
+.IP \-S
+maintain (spoof) source addresses
+.IP "\-x \fIdelay\fP"
+transmit delay in microseconds
+.IP "\-c \fIconfig\fP"
+specify a config file to read
+.IP \-f
+fork program into background
+.IP \-h
+print this usage message and exit
+.IP A.B.C.D
+is the receiver's IP address
+.IP "\fIport\fP"
+is the UDP port to send to. Default \- 2000.
+.IP "\fIfreq\fP"
+is the sampling rate. Default \- 1.
+.IP "\fIttl\fP"
+is the sending packets TTL value. Default \- 64.
+.SH CONFIG
+A.B.C.D[/E.F.G.H]: receiver
+.IP A.B.C.D
+is the senders IP address
+.IP E.F.G.H
+is a mask to apply to the sender. Default \- 255.255.255.255.
+.IP receiver
+is the IP address of receiver
+.SH NOTES
+.B samplicator
+currently only supports IPv4.
+.PP
+Receivers specified on the command line will get all packets, those specified in the
+.IR config
+will get only packets with a matching source.
+
+.SH FILES
+.B
+/usr/sbin/samplicate
+
+.SH AUTHOR
+.B samplicator
+was originally written by Simon Leinen <simon.einen@gmail.com>.
+.PP
+This manual page was written by Vladimir Pavljuchenkov <spiderx@spiderx.dp.ua>
+for Gentoo Linux (and may be used by others) \ No newline at end of file
diff --git a/net-misc/samplicator/files/samplicator.conf b/net-misc/samplicator/files/samplicator.conf
new file mode 100644
index 000000000000..3f38ccc9887b
--- /dev/null
+++ b/net-misc/samplicator/files/samplicator.conf
@@ -0,0 +1,8 @@
+# Config file for /etc/init.d/samplicator
+
+# Various options.
+# run `samplicator -h` for valid cmdline options
+OPTS="-f -S -p 2000"
+
+# Receiver config file
+#CONFIG="-c /etc/samplicator/receiver.conf" \ No newline at end of file
diff --git a/net-misc/samplicator/files/samplicator.initd b/net-misc/samplicator/files/samplicator.initd
new file mode 100644
index 000000000000..8e516d680419
--- /dev/null
+++ b/net-misc/samplicator/files/samplicator.initd
@@ -0,0 +1,40 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+NAME=${SVCNAME##*.}
+if [ -n "${NAME}" -a "${SVCNAME}" != "samplicator" ]; then
+ PID="/run/samplicator.${NAME}.pid"
+ PNAME=$(echo ${RC_SVCNAME} | sed 's/\..*//g')
+ CONF_DEFAULT="/etc/conf.d/samplicator.${NAME}"
+else
+ PID="/run/samplicator.pid"
+ PNAME=${RC_SVCNAME}
+ CONF_DEFAULT="/etc/conf.d/samplicator"
+fi
+CONF=${CONF:-${CONF_DEFAULT}}
+EXEC=${EXEC:-/usr/bin/samplicate}
+
+depend() {
+ need net
+ provide samplicator
+}
+
+start() {
+ ebegin "Starting samplicator"
+ start-stop-daemon --start --quiet --background --make-pidfile --pidfile ${PID} --exec ${EXEC} -- ${OPTS} ${CONFIG}
+ eend $?
+}
+
+start_post() {
+ pgrep -n $(echo ${PNAME} | sed 's/or/e/') > ${PID}
+}
+
+stop() {
+ ebegin "Stopping samplicator"
+ start-stop-daemon --stop --quiet --pidfile ${PID}
+ rm -f ${PID}
+ eend $?
+}
+
diff --git a/net-misc/samplicator/metadata.xml b/net-misc/samplicator/metadata.xml
new file mode 100644
index 000000000000..e2cc8bc8bd09
--- /dev/null
+++ b/net-misc/samplicator/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>spiderx@spiderx.dp.ua</email>
+ <name>Vladimir Pavljuchenkov</name>
+ <description>Primary maintainer.</description>
+ </maintainer>
+ <herd>proxy-maintainers</herd>
+ <longdescription>
+ This small program receives UDP datagrams on a given port, and resends
+ those datagrams to a specified set of receivers. In addition, a
+ sampling divisor N may be specified individually for each receiver,
+ which will then only receive one in N of the received packets.
+ </longdescription>
+ <upstream>
+ <changelog>https://code.google.com/p/samplicator/source/browse/trunk/ChangeLog</changelog>
+ <doc>https://code.google.com/p/samplicator/source/browse/trunk/README</doc>
+ <bugs-to>mailto:simon.leinen@gmail.com</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/samplicator/samplicator-1.3.6.ebuild b/net-misc/samplicator/samplicator-1.3.6.ebuild
new file mode 100644
index 000000000000..e8ac460e1944
--- /dev/null
+++ b/net-misc/samplicator/samplicator-1.3.6.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils user
+
+DESCRIPTION="UDP packets forwarder and duplicator"
+HOMEPAGE="http://${PN}.googlecode.com/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="Artistic GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+pkg_setup() {
+ # Add samplicator group and user to system
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /etc/${PN} ${PN}
+}
+
+src_install() {
+ # Install and copy documentation
+ default
+
+ # Install Gentoo init script and its config
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf ${PN}
+
+ # Install manual page
+ doman "${FILESDIR}"/${PN}.8
+}
+
+pkg_postinst() {
+ ewarn ""
+ ewarn "Don't specify the receiver on the command line, because it will get all packets."
+ ewarn "Instead of this, specify it in a config file; defined in such way it will only get packets with a matching source."
+ ewarn ""
+
+ einfo "For every receiver type create a file in directory /etc/${PN} (see example below)"
+ einfo "and specify the path to it in variable CONFIG of the corresponding initscript config file in /etc/conf.d/"
+ einfo ""
+ einfo "Receiver config examples: "
+ einfo ""
+ einfo " /etc/${PN}/netflow:"
+ einfo " 10.0.0.0/255.0.0.0:1.1.1.1/9996 2.2.2.2/9996 3.3.3.3/9996"
+ einfo ""
+ einfo " /etc/${PN}/syslog:"
+ einfo " 10.0.0.0/255.255.0.0:2.2.2.2/514 3.3.3.3/514"
+ einfo ""
+ einfo " /etc/${PN}/snmp:"
+ einfo " 10.0.0.0/255.255.255.255:3.3.3.3/162"
+}
diff --git a/net-misc/samplicator/samplicator-1.3.7_beta6.ebuild b/net-misc/samplicator/samplicator-1.3.7_beta6.ebuild
new file mode 100644
index 000000000000..053fb58dd949
--- /dev/null
+++ b/net-misc/samplicator/samplicator-1.3.7_beta6.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils user
+
+DESCRIPTION="UDP packets forwarder and duplicator"
+HOMEPAGE="http://${PN}.googlecode.com/"
+MY_P=${P/_/-}
+SRC_URI="http://${PN}.googlecode.com/files/${MY_P}.tar.gz"
+
+LICENSE="Artistic GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ # Add samplicator group and user to system
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /etc/${PN} ${PN}
+}
+
+src_install() {
+ # Install and copy documentation
+ default
+
+ # Install Gentoo init script and its config
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.conf ${PN}
+
+ # Install manual page
+ doman "${FILESDIR}"/${PN}.8
+}
+
+pkg_postinst() {
+ ewarn ""
+ ewarn "Don't specify the receiver on the command line, because it will get all packets."
+ ewarn "Instead of this, specify it in a config file; defined in such way it will only get packets with a matching source."
+ ewarn ""
+
+ einfo "For every receiver type create a file in directory /etc/${PN} (see example below)"
+ einfo "and specify the path to it in variable CONFIG of the corresponding initscript config file in /etc/conf.d/"
+ einfo ""
+ einfo "Receiver config examples: "
+ einfo ""
+ einfo " /etc/${PN}/netflow:"
+ einfo " 10.0.0.0/255.0.0.0:1.1.1.1/9996 2.2.2.2/9996 3.3.3.3/9996"
+ einfo ""
+ einfo " /etc/${PN}/syslog:"
+ einfo " 10.0.0.0/255.255.0.0:2.2.2.2/514 3.3.3.3/514"
+ einfo ""
+ einfo " /etc/${PN}/snmp:"
+ einfo " 10.0.0.0/255.255.255.255:3.3.3.3/162"
+}
diff --git a/net-misc/scponly/Manifest b/net-misc/scponly/Manifest
new file mode 100644
index 000000000000..38d1c303bef7
--- /dev/null
+++ b/net-misc/scponly/Manifest
@@ -0,0 +1 @@
+DIST scponly-4.8.tgz 101687 SHA256 1693dd678355749c5d9e48ecdd4628dbfe71d82955afde950ee8d88b5adc01cf SHA512 134c008a7377cef7b8e0be483df8413e162a515967147f561d23b72bdef3dfbe70a8313811dfff6372b88f15c1ac8a4385831fcf329261276993c64d5040f29b WHIRLPOOL 31ed4fda62484dbaa6eb678635a916db3e191ab98bb7ed0e7f6e794ef7d0dac0251e51bf7e627d48c00b17d550ce6dc0ed196fdfa3c2379ca7feec5544b200ba
diff --git a/net-misc/scponly/files/scponly-4.8-gcc4.4.0.patch b/net-misc/scponly/files/scponly-4.8-gcc4.4.0.patch
new file mode 100644
index 000000000000..d08ce28b93b5
--- /dev/null
+++ b/net-misc/scponly/files/scponly-4.8-gcc4.4.0.patch
@@ -0,0 +1,15 @@
+--- helper.c.orig 2009-05-11 00:33:08.000000000 -0600
++++ helper.c 2009-05-11 00:39:59.000000000 -0600
+@@ -259,11 +259,11 @@
+ PROG_RSYNC, logstamp());
+ return 1;
+ }
+ #endif /* RSYNC_COMPAT */
+
+-#elif /* HAVE_GETOPT */
++#else /* HAVE_GETOPT */
+ /*
+ * make sure that processing doesn't continue if we can't validate a rsync check
+ * and if the getopt flag is set.
+ */
+ syslog(LOG_ERR, "a getopt() argument check could not be performed for %s, recompile scponly without support for %s or rebuild scponly with getopt", av[0], av[0]);
diff --git a/net-misc/scponly/files/scponly-4.8-rsync.patch b/net-misc/scponly/files/scponly-4.8-rsync.patch
new file mode 100644
index 000000000000..40ca5e44f215
--- /dev/null
+++ b/net-misc/scponly/files/scponly-4.8-rsync.patch
@@ -0,0 +1,212 @@
+diff -Naur scponly-4.8.orig/CHANGELOG scponly-4.8/CHANGELOG
+--- scponly-4.8.orig/CHANGELOG 2008-01-15 15:26:13.000000000 +0900
++++ scponly-4.8/CHANGELOG 2009-03-18 21:29:48.000000000 +0900
+@@ -1,3 +1,9 @@
++CVS
++ Update the SECURITY document to include a reference to /etc/popt and ~/.popt as
++ they relate to rsync.
++ Fix for rsync-3.0 which now uses a short -e option, with an optional argument as
++ a server side option indicating protocol compatibility.
++
+ scponly v4.8 - jan 14 2008
+ fix support for quota and passwd when running within the chroot (exec pre-chroot)
+ disallow rsync and svnserve from being run as daemons that listen on a port
+diff -Naur scponly-4.8.orig/SECURITY scponly-4.8/SECURITY
+--- scponly-4.8.orig/SECURITY 2008-01-15 15:26:13.000000000 +0900
++++ scponly-4.8/SECURITY 2009-03-18 21:29:48.000000000 +0900
+@@ -28,6 +28,10 @@
+
+ svn, svnserve, rsync, and unison
+
++ Note specifically that rsync uses popt for parsing command line arguments
++ and popt explicitly checks /etc/popt and $HOME/.popt for aliases. Thus,
++ users can likely bypass argument checking for rsync.
++
+ 4) Make sure that all files required for the chroot have the IMMUTABLE and
+ UNDELETABLE bits set. Other bits might also be prudent. See: man 1 chattr.
+
+@@ -39,13 +43,16 @@
+ ~/.ssh, ~/.unison, ~/.subversion
+
+ NOTE: depending on file permissions in the above, ssh, unison, and
+- subversion may not work correctly.
++ subversion may not work correctly. Also note that the location of the
++ above directories is sometimes system dependent, so please check the
++ documentation specific to your system.
+
+ 7) Make sure that every directory the users have write permissions to are
+ on a filesystem that is mounted NODEV, NOEXEC. Eg. Make sure that they
+ cannot execute files that they have permissions to upload. They should
+ also not need permissions to create any devices. If the user can't execute
+- any files that he has access to upload, then you need not worry about the
++ any files that he has access to upload and the executable files on the
++ system are not considered harmful, then you need not worry about the
+ security problems referencing svn/svnserve above!
+
+ 8) Monitor your logs! If you start to see something funny, odd, or strange in
+diff -Naur scponly-4.8.orig/helper.c scponly-4.8/helper.c
+--- scponly-4.8.orig/helper.c 2008-01-15 15:26:13.000000000 +0900
++++ scponly-4.8/helper.c 2009-03-18 21:29:48.000000000 +0900
+@@ -6,17 +6,15 @@
+ #include <sys/types.h> /* for stat, getpwuid */
+ #include <sys/stat.h> /* for stat */
+ #include <unistd.h> /* for exit, access, getpwuid, execve, getopt */
+-#ifdef HAVE_GETOPT_H
+-#include <getopt.h> /* for getopt */
+-#endif
+ #include <errno.h> /* for debugging */
+ #include <pwd.h> /* to get username for config parsing */
+ #include <time.h> /* time */
+ #include <libgen.h> /* basename */
+ #include <stdlib.h> /* realloc */
+ #include <syslog.h>
+-#include "scponly.h"
++
+ #include "config.h"
++#include "scponly.h" /* includes getopt */
+
+ #ifdef HAVE_GLOB
+ #include <glob.h> /* for glob() */
+@@ -26,6 +24,11 @@
+ #endif
+ #endif
+
++#ifdef RSYNC_COMPAT
++#define RSYNC_ARG_SERVER 0x01
++#define RSYNC_ARG_EXECUTE 0x02
++#endif
++
+ #define MAX(x,y) ( ( x > y ) ? x : y )
+ #define MIN(x,y) ( ( x < y ) ? x : y )
+
+@@ -164,6 +167,13 @@
+ int ch;
+ int ac=0;
+ int longopt_index = 0;
++#ifdef RSYNC_COMPAT
++ /*
++ * bitwise flag: 0x01 = server, 0x02 = -e.
++ * Thus 0x03 is allowed and 0x01 is allowed, but 0x02 is not allowed
++ */
++ int rsync_flags = 0;
++#endif /* RSYNC_COMPAT */
+
+ while (cmdarg != NULL)
+ {
+@@ -207,7 +217,7 @@
+ * otherwise, try a glibc-style reset of the global getopt vars
+ */
+ optind=0;
+-#endif
++#endif /* HAVE_OPTRESET */
+ /*
+ * tell getopt to only be strict if the 'opts' is well defined
+ */
+@@ -216,28 +226,49 @@
+
+ debug(LOG_DEBUG, "getopt processing returned '%c' (%s)", ch, logstamp());
+
++#ifdef RSYNC_COMPAT
++ if (exact_match(cmdarg->name, PROG_RSYNC) && (ch == 's' || ch == 'e')) {
++ if (ch == 's')
++ rsync_flags |= RSYNC_ARG_SERVER;
++ else
++ /* -e */
++ rsync_flags |= RSYNC_ARG_EXECUTE;
++ debug(LOG_DEBUG, "rsync_flags are now set to: %0x", rsync_flags);
++ }
++ else
++#endif /* RSYNC_COMPAT */
++
+ /* if the character is found in badarg, then it's not a permitted option */
+ if (cmdarg->badarg != NULL && (strchr(cmdarg->badarg, ch) != NULL))
+ {
+ syslog(LOG_ERR, "option '%c' or a related long option is not permitted for use with %s (arg was %s) (%s))",
+- ch, cmdarg->name, optarg, logstamp());
++ ch, cmdarg->name, (optarg!=NULL ? optarg : "<NULL>"), logstamp());
+ return 1;
+ }
+ else if (cmdarg->strict && ch == '?')
+ {
+ syslog(LOG_ERR, "an unrecognized option was encountered while processing cmd %s (arg was %s) (%s))",
+- cmdarg->name, optarg, logstamp());
++ cmdarg->name, (optarg!=NULL ? optarg : "<NULL>"), logstamp());
+ return 1;
+ }
+ }
+-#elif
++#ifdef RSYNC_COMPAT
++ /* it's not safe if the execute flag was set and server was not set */
++ if ((rsync_flags & RSYNC_ARG_EXECUTE) != 0 && (rsync_flags & RSYNC_ARG_SERVER) == 0) {
++ syslog(LOG_ERR, "option 'e' is not allowed unless '--server' is also set with cmd %s (%s)",
++ PROG_RSYNC, logstamp());
++ return 1;
++ }
++#endif /* RSYNC_COMPAT */
++
++#elif /* HAVE_GETOPT */
+ /*
+ * make sure that processing doesn't continue if we can't validate a rsync check
+ * and if the getopt flag is set.
+ */
+ syslog(LOG_ERR, "a getopt() argument check could not be performed for %s, recompile scponly without support for %s or rebuild scponly with getopt", av[0], av[0]);
+ return 1;
+-#endif
++#endif /* HAVE_GETOPT */
+ }
+ else
+ /*
+diff -Naur scponly-4.8.orig/scponly.c scponly-4.8/scponly.c
+--- scponly-4.8.orig/scponly.c 2008-01-15 15:28:24.000000000 +0900
++++ scponly-4.8/scponly.c 2009-03-18 21:29:48.000000000 +0900
+@@ -91,16 +91,18 @@
+
+ #ifdef RSYNC_COMPAT
+ struct option rsync_longopts[] = {
++ /* options we need to know about that are safe */
++ {"server", 0, 0, (int)'s'},
+ /* I use 'e' for val here because that's what's listed in cmd_arg_t->badarg */
+- {"rsh", 1, 0, (int)'e'},
++ {"rsh", 1, 0, (int)'r'},
+ /* the following are disabled because they use daemon mode */
+- {"daemon", 0, 0, (int)'e'},
+- {"rsync-path", 1, 0, (int)'e'},
+- {"address", 1, 0, (int)'e'},
+- {"port", 1, 0, (int)'e'},
+- {"sockopts", 1, 0, (int)'e'},
+- {"config", 1, 0, (int)'e'},
+- {"no-detach", 0, 0, (int)'e'},
++ {"daemon", 0, 0, (int)'d'},
++ {"rsync-path", 1, 0, (int)'d'},
++ {"address", 1, 0, (int)'d'},
++ {"port", 1, 0, (int)'d'},
++ {"sockopts", 1, 0, (int)'d'},
++ {"config", 1, 0, (int)'d'},
++ {"no-detach", 0, 0, (int)'d'},
+ { NULL, 0, NULL, 0 },
+ };
+ #endif
+@@ -157,7 +159,7 @@
+ { PROG_SCP, 1, 1, "SoF", "dfl:prtvBCc:i:P:q1246S:o:F:", empty_longopts },
+ #endif
+ #ifdef RSYNC_COMPAT
+- { PROG_RSYNC, 1, 0, "e", "e:", rsync_longopts },
++ { PROG_RSYNC, 1, 0, "rde", "e::", rsync_longopts },
+ #endif
+ #ifdef UNISON_COMPAT
+ { PROG_UNISON, 0, 0, "-rshcmd", NULL, empty_longopts },
+diff -Naur scponly-4.8.orig/scponly.h scponly-4.8/scponly.h
+--- scponly-4.8.orig/scponly.h 2008-01-15 15:26:13.000000000 +0900
++++ scponly-4.8/scponly.h 2009-03-18 21:29:48.000000000 +0900
+@@ -1,6 +1,9 @@
+ #include <stdio.h> /* FILENAME_MAX */
+-#include <getopt.h> /* struct option */
+-#include "config.h"
++#include "config.h" /* include before most other files */
++
++#ifdef HAVE_GETOPT_H
++#include <getopt.h> /* for struct option for getopt */
++#endif
+
+ #define MAX_USERNAME 32
+ #define MAX_REQUEST (1024) /* any request exceeding this is truncated */
diff --git a/net-misc/scponly/metadata.xml b/net-misc/scponly/metadata.xml
new file mode 100644
index 000000000000..0237ba9cc5f0
--- /dev/null
+++ b/net-misc/scponly/metadata.xml
@@ -0,0 +1,30 @@
+<?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">
+ scponly is an alternative 'shell' (of sorts) for system administrators
+ who would like to provide access to remote users to both read and write
+ local files without providing any remote execution priviledges.
+ Functionally, it is best described as a wrapper to the tried and true
+ ssh suite of applications.
+ </longdescription>
+ <use>
+ <flag name="rsync">Enables rsync compatibility with potential security risks</flag>
+ <flag name="unison">Enables Unison compatibility with potential security risks</flag>
+ <flag name="subversion">Enables Subversion compatibility with potential security risks</flag>
+ <flag name="winscp">Enables WinSCP 2.0 compatibility with potential security risks</flag>
+ <flag name="scp">Enables scp compatibility with potential security risks</flag>
+ <flag name="sftp">Enables SFTP compatibility</flag>
+ <flag name="gftp">Enables gFTP compatibility</flag>
+ <flag name="quota">Enables quota compatibility</flag>
+ <flag name="passwd">Enables passwd compatibility</flag>
+ <flag name="logging">Enables SFTP logging compatibility</flag>
+ <flag name="wildcards">Enables wildcard processing with potential security risks</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">scponly</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/scponly/scponly-4.8-r5.ebuild b/net-misc/scponly/scponly-4.8-r5.ebuild
new file mode 100644
index 000000000000..a39e354d2af1
--- /dev/null
+++ b/net-misc/scponly/scponly-4.8-r5.ebuild
@@ -0,0 +1,249 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib readme.gentoo toolchain-funcs user
+
+DESCRIPTION="A tiny pseudoshell which only permits scp and sftp"
+HOMEPAGE="http://www.sublimation.org/scponly/"
+SRC_URI="mirror://sourceforge/scponly/${P}.tgz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="amd64 ppc sparc x86"
+IUSE="+sftp scp winscp gftp rsync unison subversion wildcards quota passwd logging"
+REQUIRED_USE="
+ || ( sftp scp winscp rsync unison subversion )
+"
+
+RDEPEND="
+ sys-apps/sed
+ net-misc/openssh
+ quota? ( sys-fs/quota )
+ rsync? ( net-misc/rsync )
+ subversion? ( dev-vcs/subversion )
+"
+DEPEND="${RDEPEND}"
+
+myuser="scponly"
+myhome="/home/${myuser}"
+mysubdir="/pub"
+
+DOC_CONTENTS="
+ You might want to run\n
+ emerge --config =${CATEGORY}/${PF}\n
+ \nto setup the chroot. Otherwise you will have to setup chroot manually
+ Please read the docs in /usr/share/doc/${PF} for more informations, also
+ the SECURITY file.
+"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-rsync.patch"
+ # bug #269242
+ epatch "${FILESDIR}/${P}-gcc4.4.0.patch"
+}
+
+src_configure() {
+ CFLAGS="${CFLAGS} ${LDFLAGS}" econf \
+ --with-sftp-server="/usr/$(get_libdir)/misc/sftp-server" \
+ --disable-restrictive-names \
+ --enable-chrooted-binary \
+ --enable-chroot-checkdir \
+ $(use_enable winscp winscp-compat) \
+ $(use_enable gftp gftp-compat) \
+ $(use_enable scp scp-compat) \
+ $(use_enable sftp sftp) \
+ $(use_enable quota quota-compat) \
+ $(use_enable passwd passwd-compat) \
+ $(use_enable rsync rsync-compat) \
+ $(use_enable unison unison-compat) \
+ $(use_enable subversion svn-compat) \
+ $(use_enable subversion svnserv-compat) \
+ $(use_enable logging sftp-logging-compat) \
+ $(use_enable wildcards wildcards)
+}
+
+src_compile() {
+ emake CC=$(tc-getCC)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc AUTHOR BUILDING-JAILS.TXT CHANGELOG CONTRIB README SECURITY TODO
+
+ # don't compress setup-script, so it is usable if necessary
+ insinto /usr/share/doc/${PF}/chroot
+ doins setup_chroot.sh config.h
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ # two slashes ('//') are used by scponlyc to determine the chroot point.
+ enewgroup "${myuser}"
+ enewuser "${myuser}" -1 /usr/sbin/scponlyc "${myhome}//" "${myuser}"
+
+ readme.gentoo_print_elog
+}
+
+pkg_config() {
+ # pkg_postinst is based on ${S}/setup_chroot.sh.
+
+ einfo "Collecting binaries and libraries..."
+
+ # Binaries launched in sftp compat mode
+ if has_version "=${CATEGORY}/${PF}[sftp]" ; then
+ BINARIES="/usr/$(get_libdir)/misc/sftp-server"
+ fi
+
+ # Binaries launched by vanilla- and WinSCP modes
+ if has_version "=${CATEGORY}/${PF}[scp]" || \
+ has_version "=${CATEGORY}/${PF}[winscp]" ; then
+ BINARIES="${BINARIES} /usr/bin/scp /bin/ls /bin/rm /bin/ln /bin/mv"
+ BINARIES="${BINARIES} /bin/chmod /bin/chown /bin/chgrp /bin/mkdir /bin/rmdir"
+ fi
+
+ # Binaries launched in WinSCP compatibility mode
+ if has_version "=${CATEGORY}/${PF}[winscp]" ; then
+ BINARIES="${BINARIES} /bin/pwd /bin/groups /usr/bin/id /bin/echo"
+ fi
+
+ # Rsync compatability mode
+ if has_version "=${CATEGORY}/${PF}[rsync]" ; then
+ BINARIES="${BINARIES} /usr/bin/rsync"
+ fi
+
+ # Unison compatability mode
+ if has_version "=${CATEGORY}/${PF}[unison]" ; then
+ BINARIES="${BINARIES} /usr/bin/unison"
+ fi
+
+ # subversion cli/svnserv compatibility
+ if has_version "=${CATEGORY}/${PF}[subversion]" ; then
+ BINARIES="${BINARIES} /usr/bin/svn /usr/bin/svnserve"
+ fi
+
+ # passwd compatibility
+ if has_version "=${CATEGORY}/${PF}[passwd]" ; then
+ BINARIES="${BINARIES} /bin/passwd"
+ fi
+
+ # quota compatibility
+ if has_version "=${CATEGORY}/${PF}[quota]" ; then
+ BINARIES="${BINARIES} /usr/bin/quota"
+ fi
+
+ # build lib dependencies
+ LIB_LIST=$(ldd ${BINARIES} | sed -n 's:.* => \(/[^ ]\+\).*:\1:p' | sort -u)
+
+ # search and add ld*.so
+ for LIB in /$(get_libdir)/ld.so /libexec/ld-elf.so /libexec/ld-elf.so.1 \
+ /usr/libexec/ld.so /$(get_libdir)/ld-linux*.so.2 /usr/libexec/ld-elf.so.1; do
+ [ -f "${LIB}" ] && LIB_LIST="${LIB_LIST} ${LIB}"
+ done
+
+ # search and add libnss_*.so
+ for LIB in /$(get_libdir)/libnss_{compat,files}*.so.*; do
+ [ -f "${LIB}" ] && LIB_LIST="${LIB_LIST} ${LIB}"
+ done
+
+ # create base dirs
+ if [ ! -d "${myhome}" ]; then
+ einfo "Creating ${myhome}"
+ install -o0 -g0 -m0755 -d "${myhome}"
+ else
+ einfo "Setting owner for ${myhome}"
+ chown 0:0 "${myhome}"
+ fi
+
+ if [ ! -d "${myhome}/etc" ]; then
+ einfo "Creating ${myhome}/etc"
+ install -o0 -g0 -m0755 -d "${myhome}/etc"
+ fi
+
+ if [ ! -d "${myhome}/$(get_libdir)" ]; then
+ einfo "Creating ${myhome}/$(get_libdir)"
+ install -o0 -g0 -m0755 -d "${myhome}/$(get_libdir)"
+ fi
+
+ if [ ! -e "${myhome}/lib" ]; then
+ einfo "Creating ${myhome}/lib"
+ ln -snf $(get_libdir) "${myhome}/lib"
+ fi
+
+ if [ ! -d "${myhome}/usr/$(get_libdir)" ]; then
+ einfo "Creating ${myhome}/usr/$(get_libdir)"
+ install -o0 -g0 -m0755 -d "${myhome}/usr/$(get_libdir)"
+ fi
+
+ if [ ! -e "${myhome}/usr/lib" ]; then
+ einfo "Creating ${myhome}/usr/lib"
+ ln -snf $(get_libdir) "${myhome}/usr/lib"
+ fi
+
+ if [ ! -d "${myhome}${mysubdir}" ]; then
+ einfo "Creating ${myhome}${mysubdir} directory for uploading files"
+ install -o${myuser} -g${myuser} -m0755 -d "${myhome}${mysubdir}"
+ fi
+
+ # create /dev/null (Bug 135505)
+ if [ ! -e "${myhome}/dev/null" ]; then
+ install -o0 -g0 -m0755 -d "${myhome}/dev"
+ mknod -m0777 "${myhome}/dev/null" c 1 3
+ fi
+
+ # install binaries
+ for BIN in ${BINARIES}; do
+ einfo "Install ${BIN}"
+ install -o0 -g0 -m0755 -d "${myhome}$(dirname ${BIN})"
+ if [ "${BIN}" = "/bin/passwd" ]; then # needs suid
+ install -p -o0 -g0 -m04711 "${BIN}" "${myhome}/${BIN}"
+ else
+ install -p -o0 -g0 -m0755 "${BIN}" "${myhome}/${BIN}"
+ fi
+ done
+
+ # install libs
+ for LIB in ${LIB_LIST}; do
+ einfo "Install ${LIB}"
+ install -o0 -g0 -m0755 -d "${myhome}$(dirname ${LIB})"
+ install -p -o0 -g0 -m0755 "${LIB}" "${myhome}/${LIB}"
+ done
+
+ # create ld.so.conf
+ einfo "Creating /etc/ld.so.conf"
+ for LIB in ${LIB_LIST}; do
+ dirname ${LIB}
+ done | sort -u | while read DIR; do
+ if ! grep 2>/dev/null -q "^${DIR}$" "${myhome}/etc/ld.so.conf"; then
+ echo "${DIR}" >> "${myhome}/etc/ld.so.conf"
+ fi
+ done
+ ldconfig -r "${myhome}"
+
+ # update shells
+ einfo "Updating /etc/shells"
+ grep 2>/dev/null -q "^/usr/bin/scponly$" /etc/shells \
+ || echo "/usr/bin/scponly" >> /etc/shells
+
+ grep 2>/dev/null -q "^/usr/sbin/scponlyc$" /etc/shells \
+ || echo "/usr/sbin/scponlyc" >> /etc/shells
+
+ # create /etc/passwd
+ if [ ! -e "${myhome}/etc/passwd" ]; then
+ (
+ echo "root:x:0:0:root:/:/bin/sh"
+ sed -n "s|^\(${myuser}:[^:]*:[^:]*:[^:]*:[^:]*:\).*|\1${mysubdir}:/bin/sh|p" /etc/passwd
+ ) > "${myhome}/etc/passwd"
+ fi
+
+ # create /etc/group
+ if [ ! -e "${myhome}/etc/group" ]; then
+ (
+ echo "root:x:0:"
+ sed -n "s|^\(${myuser}:[^:]*:[^:]*:\).*|\1|p" /etc/group
+ ) > "${myhome}/etc/group"
+ fi
+}
diff --git a/net-misc/secpanel/Manifest b/net-misc/secpanel/Manifest
new file mode 100644
index 000000000000..5eefe89491c4
--- /dev/null
+++ b/net-misc/secpanel/Manifest
@@ -0,0 +1 @@
+DIST secpanel-0.6.1.tgz 51417 SHA256 d70a0e7fe3f0d64b4fd6e9d9bd726999e72b367705e28a2980d94a5d45e1bbb7
diff --git a/net-misc/secpanel/metadata.xml b/net-misc/secpanel/metadata.xml
new file mode 100644
index 000000000000..5506ac77eb9a
--- /dev/null
+++ b/net-misc/secpanel/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>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <longdescription lang="en">
+ SecPanel serves as a graphical user interface for managing and running
+ SSH (Secure Shell) and SCP (Secure Copy) connections.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">secpanel</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/secpanel/secpanel-0.6.1.ebuild b/net-misc/secpanel/secpanel-0.6.1.ebuild
new file mode 100644
index 000000000000..1125bcb886ce
--- /dev/null
+++ b/net-misc/secpanel/secpanel-0.6.1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="Graphical frontend for managing and running SSH and SCP connections"
+HOMEPAGE="http://themediahost.de/secpanel/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 sparc x86"
+IUSE="gif"
+
+DEPEND="!gif? ( || ( media-gfx/imagemagick media-gfx/graphicsmagick[imagemagick] ) )"
+
+RDEPEND="virtual/ssh dev-lang/tk"
+
+S=${WORKDIR}/usr/local
+
+src_prepare() {
+ # install arch indep stuff in /usr/share instead of /usr/lib*
+ sed -i -e '/set libdir/s:../lib:../share:' bin/secpanel || die
+
+ # fix the version
+ sed -i -e "/set spversion/s:0.6.0:${PV}:" bin/secpanel || die
+
+ # optionally remove gifs...
+ if ! use gif; then
+ einfo "Setting secpanel to use PPM images"
+ sed -i -e 's/\.gif/\.ppm/g' bin/secpanel || die
+
+ einfo "Converting all GIF images to PPM format..."
+ for i in $(find lib/secpanel/images -name "*.gif") ; do
+ einfo "convert ${i} => ${i//.gif/.ppm}"
+ convert "${i}" "ppm:${i//.gif/.ppm}" || die
+ rm -v "${i}" || die
+ done
+ fi
+}
+
+src_install() {
+ dobin bin/secpanel || die
+
+ insinto /usr/share/secpanel
+ doins -r lib/secpanel/{*.{tcl,config,profile,wait,txt,sh},images,spdistkey} || die
+}
diff --git a/net-misc/selfdhcp/Manifest b/net-misc/selfdhcp/Manifest
new file mode 100644
index 000000000000..9ee2079eec0c
--- /dev/null
+++ b/net-misc/selfdhcp/Manifest
@@ -0,0 +1 @@
+DIST selfdhcp-0.2a.tar.bz2 162803 SHA256 b60d37b288eee05dcaf6b14b1bba184726ec2e3af6dddfdad78f0627878ec8b6 SHA512 3ffb8a6115502c201b37a6c4179f498d4847d469f5d271dd9408d7fe5714d1ebe10428c890d8ab943a6753f3fbc650730139a78b1f71c9972739ea4b886a53bf WHIRLPOOL 830e040d3fb7c0650ed1052cb768e243b7568489f312941fb28fb743f0fbac134b003e83c10358d88202e48deb4b8a318f3efa2442575c8951640491b1164bb6
diff --git a/net-misc/selfdhcp/files/selfdhcp-0.2a-buffer-overflow.patch b/net-misc/selfdhcp/files/selfdhcp-0.2a-buffer-overflow.patch
new file mode 100644
index 000000000000..6f99f7dea895
--- /dev/null
+++ b/net-misc/selfdhcp/files/selfdhcp-0.2a-buffer-overflow.patch
@@ -0,0 +1,11 @@
+--- selfdhcp-0.2a.orig/src/selfdhcp_profiles.c 2004-08-02 18:10:36.000000000 -0400
++++ selfdhcp-0.2a/src/selfdhcp_profiles.c 2011-01-29 11:54:29.132199679 -0500
+@@ -345,7 +345,7 @@
+ {
+ key = xmlNodeListGetString (doc, cur->xmlChildrenNode, 1);
+ err_msg (DBG_PROG, "xml element \"%s\"", (char *) key);
+- strncpy (netconf_buff.domainname, (char *) key, 49);
++ strncpy (netconf_buff.domainname, (char *) key, sizeof(netconf_buff.domainname)-1);
+ netconf_buff.what_is_set &= NETADDR;
+ err_msg (DBG_INFO, "read domain name \"%s\"",
+ netconf_buff.domainname);
diff --git a/net-misc/selfdhcp/metadata.xml b/net-misc/selfdhcp/metadata.xml
new file mode 100644
index 000000000000..e36ea64d1158
--- /dev/null
+++ b/net-misc/selfdhcp/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>maintainer-needed@gentoo.org</email>
+ <description>This package lacks a primary herd or maintainer.</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">selfdhcp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/selfdhcp/selfdhcp-0.2a-r1.ebuild b/net-misc/selfdhcp/selfdhcp-0.2a-r1.ebuild
new file mode 100644
index 000000000000..f0f6bf0b8ec1
--- /dev/null
+++ b/net-misc/selfdhcp/selfdhcp-0.2a-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils
+
+DESCRIPTION="a small stealth network autoconfigure software"
+HOMEPAGE="http://selfdhcp.sourceforge.net"
+SRC_URI="mirror://sourceforge/selfdhcp/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND="dev-libs/popt
+ dev-libs/libxml2
+ >=net-libs/libnet-1.0.2
+ net-libs/libpcap"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-buffer-overflow.patch"
+}
+
+src_configure() {
+ econf --sysconfdir=/etc --sbindir=/sbin
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS ChangeLog README TODO
+}
diff --git a/net-misc/sendfile/Manifest b/net-misc/sendfile/Manifest
new file mode 100644
index 000000000000..c7c3d4ab09e4
--- /dev/null
+++ b/net-misc/sendfile/Manifest
@@ -0,0 +1 @@
+DIST sendfile-2.1b.tar.gz 342757 RMD160 4bc23f4bc7ec26c5ff3625e0dec6f369d0203a00 SHA1 4c4842ae1c44bfbfe4c8d1b3646ebb4b29bcd341 SHA256 f16aefa718a6201933d1f2cf6947b91db838cfd4e7fce885fa9f0d4ac997b9de
diff --git a/net-misc/sendfile/files/sendfiled b/net-misc/sendfile/files/sendfiled
new file mode 100644
index 000000000000..335887c4b9c8
--- /dev/null
+++ b/net-misc/sendfile/files/sendfiled
@@ -0,0 +1,11 @@
+service saft
+{
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ user = root
+ server = /usr/sbin/sendfiled
+ #the following is required, even for local host communications.
+ #only_from = 127.0.0.1
+ disable = yes #change this to actually run sendfiled
+}
diff --git a/net-misc/sendfile/metadata.xml b/net-misc/sendfile/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/net-misc/sendfile/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/sendfile/sendfile-2.1b-r1.ebuild b/net-misc/sendfile/sendfile-2.1b-r1.ebuild
new file mode 100644
index 000000000000..2aef3e0d2089
--- /dev/null
+++ b/net-misc/sendfile/sendfile-2.1b-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="SAFT implementation for UNIX and serves as a tool for asynchronous sending of files in the Internet"
+HOMEPAGE="http://fex.rus.uni-stuttgart.de/saft/sendfile.html"
+SRC_URI="http://fex.rus.uni-stuttgart.de/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+RDEPEND="virtual/inetd"
+
+src_compile() {
+ ./makeconfig \
+ "CFLAGS=\"${CFLAGS}\" \
+ CC=$(tc-getCC) \
+ LDFLAGS=\"${LDFLAGS}\" \
+ BINDIR=/usr/bin \
+ MANDIR=/usr/share/man \
+ CONFIG=/etc/sendfile \
+ SERVERDIR=/usr/sbin" || die "./makeconfig failed"
+
+ make all || die "make all failed"
+}
+
+src_install() {
+ into /usr
+ dosbin src/sendfiled
+ dobin etc/check_sendfile src/sendfile src/sendmsg src/receive src/fetchfile
+ dobin src/utf7encode src/wlock etc/sfconf etc/sfdconf
+ dosym /usr/bin/utf7encode /usr/bin/utf7decode
+
+ dodir /etc/sendfile
+ dodir /var/spool/sendfile
+ dodir /var/spool/sendfile/LOG
+ dodir /var/spool/sendfile/OUTGOING
+ fperms 0700 /var/spool/sendfile/LOG
+ fperms 1777 /var/spool/sendfile/OUTGOING
+
+ insinto /etc/sendfile
+ doins etc/sendfile.deny etc/sendfile.cf
+
+ insinto /etc/xinetd.d
+ doins "${FILESDIR}/sendfiled" || die
+
+ doman doc/sendmsg.1 doc/sendfile.1 doc/receive.1 doc/fetchfile.1
+
+ dodoc doc/AUTHORS doc/ChangeLog doc/README* doc/THANKS
+}
+
+pkg_postinst() {
+ einfo "To start the sendfile daemon you have to start xinetd"
+}
diff --git a/net-misc/ser/Manifest b/net-misc/ser/Manifest
new file mode 100644
index 000000000000..0c8d54f2ae04
--- /dev/null
+++ b/net-misc/ser/Manifest
@@ -0,0 +1,5 @@
+DIST ethz-1.0-ser-0.9.0.tar.gz 5266 SHA256 0d019caf9e19a51387f95dd511c1930ca8b521a8e9df4fdc042caa8678c371ea SHA512 d232b806c35f61e6336d855209d8fc306713910e18d768512267f557f8973e20e5042aa255b5650b7cd5de8a88aaf0e6c9277bf8cfc4a7b36febf67538ca4262 WHIRLPOOL baa7e9ec378182cdc7f15b711fe9b5e9fd078e9eaa58f0eea1d8a3d721b2e1c6b23f3374366b2988824403568a5f3ab12ba773a8d72fb8536c156131a3aa74e3
+DIST ldap-1.0-ser-0.9.0.tar.gz 5069 SHA256 244817715cf26411820a45c5197346fe4d39407f64b2d05d81bfcf4117ca02b2 SHA512 898abee7480da1bf9edaa616312e00cfab2068ec2498e61b12daf95088f47eb97f67eddbc999b3021c7b557a0c7088d9cb30a3da09125153a0a253f26d0e16ab WHIRLPOOL fb5d682880af1a0fa7cf7b6d7004698a4b30a82d8db1d1cb0ec7ff93afabc5e6a0fb67c93ce96f4a183b759dedf9e851b9461b31dc9049adc4af0750435a0d53
+DIST ldaps-1.0-ser-0.9.0.tar.gz 5051 SHA256 83e8e54423969dc72a71c71a22c59d4a1e4fe29aa1b886e68acf98d45a8c5126 SHA512 a5bcfcf293b4301afd5ab6f4f9fd4c030dbc4e2c496fda83bdb1851c6ad737b81d825729e0faf82005551e04ccb691aeea6ef7d683d125dd154b4496142efcb0 WHIRLPOOL b7e6de57fe0dd7c66fffadfb2ddb1f5eae73bad4cf7ac39bdd776a9065982420143ac0771b61a338dc468399b0db426f33530a95ee7a443f0be51a113f19747b
+DIST ser-0.9.7_src.tar.gz 1888122 SHA256 0fbbfd70d3e4b48665f7ae3ca0045a1421d3e1255ef8fc04b8fbe8168fb4e56f SHA512 45c084987c00722ca63a6eef1fe5c9051bff751123494d1add4003aab46c470be1ff31a7d3c420acf5d9868e69a0d94e13abdd145d75488ed41aa70d1c7d895f WHIRLPOOL e6e9d26a77d9434816161bb9c57963b8a4a8fdb740d60bb4f392468376390788738c04b5ccc280dfec06e244ab6909032ba35d1363396e0d15a0df0b4f4622eb
+DIST silomail-1.0-ser-0.9.0.tar.gz 4762 SHA256 18d60d987246d4b188e8c2b78d721a43e61eb8c50402b19352edada2d2f98826 SHA512 e23a71b0bcfe6be541b51ec92cdcd446cc32a281924f41041762ff6851001379dbd9b948a0370f3d855dfeb64adc2d14348012f9dbc6790831b9b4eb2c8110ac WHIRLPOOL 8a42bdc307c9110f606ea605ada56065b71ff488944e6db57831440ad3f8fa9542835c02087cac6c544f1f8492b046d90f605222d6e5c23e5e121bf11d426cdb
diff --git a/net-misc/ser/files/ethz-1.0-ser-0.9.0.diff b/net-misc/ser/files/ethz-1.0-ser-0.9.0.diff
new file mode 100644
index 000000000000..239a37a34ac1
--- /dev/null
+++ b/net-misc/ser/files/ethz-1.0-ser-0.9.0.diff
@@ -0,0 +1,14 @@
+--- Makefile.orig 2005-06-12 04:07:56.000000000 +0200
++++ Makefile 2005-06-12 04:08:02.000000000 +0200
+@@ -12,11 +12,3 @@
+ CFLAGS=-Wall
+
+ include ../../Makefile.modules
+-
+-
+-install:
+- -serctl stop
+- -mv /usr/local/lib/ser/modules/ethz.so /usr/local/lib/ser/modules/ethz.so.OLD
+- rm -f /usr/local/lib/ser/modules/ethz.so
+- cp ethz.so /usr/local/lib/ser/modules
+- -serctl start
diff --git a/net-misc/ser/files/ldap-1.0-ser-0.9.0.diff b/net-misc/ser/files/ldap-1.0-ser-0.9.0.diff
new file mode 100644
index 000000000000..cec03d2991b6
--- /dev/null
+++ b/net-misc/ser/files/ldap-1.0-ser-0.9.0.diff
@@ -0,0 +1,13 @@
+--- Makefile.orig 2005-06-12 04:06:33.000000000 +0200
++++ Makefile 2005-06-12 04:06:39.000000000 +0200
+@@ -12,10 +12,3 @@
+ CFLAGS=-Wall -g
+
+ include ../../Makefile.modules
+-
+-
+-install:
+- -serctl stop
+- rm -f /usr/local/lib/ser/modules/ldap.so
+- cp ldap.so /usr/local/lib/ser/modules
+- -serctl start
diff --git a/net-misc/ser/files/ldaps-1.0-ser-0.9.0.diff b/net-misc/ser/files/ldaps-1.0-ser-0.9.0.diff
new file mode 100644
index 000000000000..a8d00839465e
--- /dev/null
+++ b/net-misc/ser/files/ldaps-1.0-ser-0.9.0.diff
@@ -0,0 +1,17 @@
+--- Makefile.orig 2005-06-12 04:07:28.000000000 +0200
++++ Makefile 2005-06-12 04:07:35.000000000 +0200
+@@ -12,14 +12,3 @@
+ CFLAGS=-Wall
+
+ include ../../Makefile.modules
+-
+-
+-install:
+- -serctl stop
+- rm -f /usr/local/lib/ser/modules/ldaps.so
+- cp ldaps.so /usr/local/lib/ser/modules
+- -serctl start
+-
+-clean:
+- rm -f *.c~ *.o *.d ldaps.so
+-
diff --git a/net-misc/ser/files/ser-0.9.7-extmod-ldap.diff b/net-misc/ser/files/ser-0.9.7-extmod-ldap.diff
new file mode 100644
index 000000000000..1fb76cadd2b4
--- /dev/null
+++ b/net-misc/ser/files/ser-0.9.7-extmod-ldap.diff
@@ -0,0 +1,11 @@
+--- ser-0.9.7/modules/ldap/Makefile.orig 2008-01-09 00:52:06.000000000 +0100
++++ ser-0.9.7/modules/ldap/Makefile 2008-01-09 00:52:13.000000000 +0100
+@@ -8,7 +8,7 @@
+ include ../../Makefile.defs
+ auto_gen=
+ NAME=ldap.so
+-LIBS=-lssl -lsasl -lcrypto -lcrypt -lldap -llber
++LIBS=-lssl -lsasl2 -lcrypto -lcrypt -lldap -llber
+ CFLAGS=-Wall -g
+
+ include ../../Makefile.modules
diff --git a/net-misc/ser/files/ser-0.9.7-extmod-ldaps.diff b/net-misc/ser/files/ser-0.9.7-extmod-ldaps.diff
new file mode 100644
index 000000000000..7e13d54fb0c4
--- /dev/null
+++ b/net-misc/ser/files/ser-0.9.7-extmod-ldaps.diff
@@ -0,0 +1,11 @@
+--- ser-0.9.7/modules/ldaps/Makefile.orig 2008-01-09 00:52:18.000000000 +0100
++++ ser-0.9.7/modules/ldaps/Makefile 2008-01-09 00:52:24.000000000 +0100
+@@ -8,7 +8,7 @@
+ include ../../Makefile.defs
+ auto_gen=
+ NAME=ldaps.so
+-LIBS=-lssl -lsasl -lcrypto -lcrypt -lldap -llber
++LIBS=-lssl -lsasl2 -lcrypto -lcrypt -lldap -llber
+ CFLAGS=-Wall
+
+ include ../../Makefile.modules
diff --git a/net-misc/ser/files/ser-0.9.7-mysql.diff b/net-misc/ser/files/ser-0.9.7-mysql.diff
new file mode 100644
index 000000000000..fb725f72d251
--- /dev/null
+++ b/net-misc/ser/files/ser-0.9.7-mysql.diff
@@ -0,0 +1,11 @@
+--- modules/acc/Makefile.orig 2007-07-02 01:42:09.000000000 +0200
++++ modules/acc/Makefile 2005-09-07 18:23:00.000000000 +0200
+@@ -13,7 +13,7 @@
+ LIBS=
+
+ # uncomment the next line if you wish to enable SQL accounting
+-#DEFS+=-DSQL_ACC
++DEFS+=-DSQL_ACC
+
+ # uncomment the next two lines if you wish to enable RADIUS accounting
+ #DEFS+=-DRAD_ACC
diff --git a/net-misc/ser/files/ser-0.9.7-radius.diff b/net-misc/ser/files/ser-0.9.7-radius.diff
new file mode 100644
index 000000000000..f0e2ce582676
--- /dev/null
+++ b/net-misc/ser/files/ser-0.9.7-radius.diff
@@ -0,0 +1,13 @@
+--- modules/acc/Makefile.orig 2007-07-02 01:42:31.000000000 +0200
++++ modules/acc/Makefile 2005-09-07 18:23:00.000000000 +0200
+@@ -16,8 +16,8 @@
+ #DEFS+=-DSQL_ACC
+
+ # uncomment the next two lines if you wish to enable RADIUS accounting
+-#DEFS+=-DRAD_ACC
+-#include ../../Makefile.radius
++DEFS+=-DRAD_ACC
++include ../../Makefile.radius
+
+ # uncomment the next two lines if you wish to enable DIAMETER accounting
+ #DEFS+=-DDIAM_ACC
diff --git a/net-misc/ser/files/ser.confd b/net-misc/ser/files/ser.confd
new file mode 100644
index 000000000000..73648294ed9c
--- /dev/null
+++ b/net-misc/ser/files/ser.confd
@@ -0,0 +1,11 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Additional options to start SER with
+#
+# see "ser -h" for a list of options
+#
+# default: run SER as user:group = ser:ser
+#
+SER_OPTS="-u ser -g ser -f /etc/ser/ser.cfg"
diff --git a/net-misc/ser/files/ser.rc6 b/net-misc/ser/files/ser.rc6
new file mode 100755
index 000000000000..dfe74b0409cf
--- /dev/null
+++ b/net-misc/ser/files/ser.rc6
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 2002 Frauenhofer Gesellschaft FOKUS, Germany.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting ser"
+ start-stop-daemon --start --quiet --pidfile /var/run/ser.pid \
+ --exec /usr/sbin/ser -- ${SER_OPTS} -P /var/run/ser.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ser"
+ start-stop-daemon --stop --quiet --pidfile /var/run/ser.pid
+ eend $?
+}
+
diff --git a/net-misc/ser/files/silomail-1.0-ser-0.9.0.diff b/net-misc/ser/files/silomail-1.0-ser-0.9.0.diff
new file mode 100644
index 000000000000..1aec0e0e1f42
--- /dev/null
+++ b/net-misc/ser/files/silomail-1.0-ser-0.9.0.diff
@@ -0,0 +1,13 @@
+--- Makefile.orig 2005-06-12 04:08:24.000000000 +0200
++++ Makefile 2005-06-12 04:08:29.000000000 +0200
+@@ -12,10 +12,3 @@
+ CFLAGS=-Wall -g
+
+ include ../../Makefile.modules
+-
+-
+-install:
+- -serctl stop
+- rm -f /usr/local/lib/ser/modules/silomail.so
+- cp silomail.so /usr/local/lib/ser/modules
+- -serctl start
diff --git a/net-misc/ser/metadata.xml b/net-misc/ser/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/net-misc/ser/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/net-misc/ser/ser-0.9.7-r1.ebuild b/net-misc/ser/ser-0.9.7-r1.ebuild
new file mode 100644
index 000000000000..13538c493886
--- /dev/null
+++ b/net-misc/ser/ser-0.9.7-r1.ebuild
@@ -0,0 +1,178 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic multilib toolchain-funcs user
+
+ETHZ_PV="1.0"
+LDAP_PV="1.0"
+LDAPS_PV="1.0"
+SILOMAIL_PV="1.0"
+MODULES_PV="0.9.0"
+
+DESCRIPTION="SIP Express Router"
+HOMEPAGE="http://www.iptel.org/ser"
+SRC_URI="
+ http://ftp.iptel.org/pub/ser/${PV}/src/${P}_src.tar.gz
+ mirror://gentoo/silomail-${SILOMAIL_PV}-${PN}-${MODULES_PV}.tar.gz
+ mirror://gentoo/ethz-${ETHZ_PV}-${PN}-${MODULES_PV}.tar.gz
+ ldap? (
+ mirror://gentoo/ldap-${LDAP_PV}-${PN}-${MODULES_PV}.tar.gz
+ mirror://gentoo/ldaps-${LDAPS_PV}-${PN}-${MODULES_PV}.tar.gz
+ )"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~sparc x86"
+IUSE="ipv6 mysql radius postgres xmpp ldap ssl"
+
+RDEPEND="
+ mysql? ( virtual/mysql )
+ radius? ( >=net-dialup/radiusclient-ng-0.5.0 )
+ postgres? ( dev-db/postgresql:=[server] )
+ xmpp? ( dev-libs/expat )
+ ldap? (
+ net-nds/openldap
+ ssl? ( dev-libs/openssl:0= )
+ )"
+
+DEPEND="${RDEPEND}
+ >=sys-devel/bison-1.35
+ >=sys-devel/flex-2.5.4a"
+
+pkg_setup() {
+ enewgroup ser
+ enewuser ser -1 -1 /dev/null ser
+}
+
+src_prepare() {
+ local modules extmodules MY_A MY_PATCH_A x
+ use ipv6 || \
+ sed -i -e "s/-DUSE_IPV6//g" Makefile.defs || die
+ sed -i -e 's/\(CFLAGS+=-mcpu=ultrasparc\) -minline-all-stringops/\1/g' \
+ Makefile.defs || die #157109
+
+ # external modules
+ extmodules="silomail ethz"
+
+ if use mysql; then
+ modules="${modules} mysql"
+ epatch "${FILESDIR}/${P}-mysql.diff"
+ fi
+
+ if use radius; then
+ modules="${modules} auth_radius group_radius uri_radius avp_radius"
+ epatch "${FILESDIR}/${P}-radius.diff"
+ fi
+
+ use xmpp && \
+ modules="${modules} jabber"
+
+ use postgres && \
+ modules="${modules} postgres"
+
+ use ldap && \
+ extmodules="${extmodules} ldap"
+
+ use ldap && use ssl && \
+ extmodules="${extmodules} ldaps"
+
+ # put list of modules into Makefile, we need the list
+ # during compile and install phase...
+ sed -i -e "s:^\(include_modules.*\):\1 ${modules} ${extmodules}:" \
+ Makefile || die
+
+ # fix ser.cfg
+ sed -i -e "/force_send_socket(smaug:5080);/ d" \
+ etc/ser.cfg || die
+
+ # unpack external modules
+ # ugly i know...
+ for x in ${extmodules}; do
+ MY_A=$(eval echo ${x}-\${$(echo ${x} | tr "[:lower:]" "[:upper:]")_PV}-${PN}-${MODULES_PV})
+ MY_PATCH_A="${P}-extmod-${x}"
+ mkdir -p "${S}"/modules/${x} || die
+ cd "${S}"/modules/${x} || die
+ unpack ${MY_A}.tar.gz
+ # fix makefiles
+ if [[ -f "${FILESDIR}"/${MY_A}.diff ]]; then
+ epatch "${FILESDIR}"/${MY_A}.diff
+ fi
+
+ # additional patches
+ if [[ -f "${FILESDIR}"/${MY_PATCH_A}.diff ]]; then
+ epatch "${FILESDIR}"/${MY_PATCH_A}.diff
+ fi
+ done
+
+ # remove sasl if openldap hasn't been built with it
+ if use ldap && ! built_with_use net-nds/openldap sasl; then
+ sed -i -e "s:-lsasl::g" \
+ "${S}"/modules/ldap/Makefile || die
+
+ if use ssl; then
+ sed -i -e "s:-lsasl::g" \
+ "${S}"/modules/ldaps/Makefile || die
+ fi
+ fi
+}
+
+src_compile() {
+ # add -fPIC
+ append-flags -fPIC
+
+ emake all \
+ CC="`tc-getCC`" \
+ CFLAGS="${CFLAGS}" \
+ cfg-prefix=/ \
+ cfg-target=/etc/ser/
+}
+
+src_install () {
+ emake install \
+ prefix="" \
+ bin-prefix="${D}"/usr/sbin \
+ bin-dir="" \
+ cfg-prefix="${D}"/etc \
+ cfg-dir=ser/ \
+ cfg-target=/etc/ser/ \
+ modules-prefix="${D}"/usr/$(get_libdir)/ser \
+ modules-dir=modules \
+ modules-target=/usr/$(get_libdir)/ser/modules/ \
+ man-prefix="${D}"/usr/share/man \
+ man-dir="" \
+ doc-prefix="${D}"/usr/share/doc \
+ doc-dir="${P}"
+
+ newinitd "${FILESDIR}"/ser.rc6 ser
+ newconfd "${FILESDIR}"/ser.confd ser
+ newsbin scripts/harv_ser.sh harv_ser.sh
+ newsbin scripts/sc serctl
+ newsbin scripts/ser_mysql.sh ser_mysql.sh
+
+ chown -R root:ser "${D}"/etc/ser || die
+ chmod 750 "${D}"/etc/ser || die
+ chmod 640 "${D}"/etc/ser/* || die
+
+ # fix manpages
+ sed -i -e "s:^.B /ser-${PV}AUTHORS:.B /usr/share/doc/${PF}/AUTHORS:" \
+ -e "s:^.B /ser:.B /usr/sbin/ser:" \
+ "${D}"/usr/share/man/*/* || die
+}
+
+pkg_preinst() {
+ has_version "${CATEGORY}/${PN}"
+ previous_installed_version=$?
+}
+
+pkg_postinst() {
+ if [[ $previous_installed_version = 0 ]] ; then
+ einfo "Changing permissions on ${ROOT}etc/ser"
+
+ chown -R root:ser "${ROOT}"/etc/ser
+ chmod 750 "${ROOT}"/etc/ser
+ chmod 640 "${ROOT}"/etc/ser/*
+ fi
+}
diff --git a/net-misc/ser2net/Manifest b/net-misc/ser2net/Manifest
new file mode 100644
index 000000000000..40c53ce3d0a0
--- /dev/null
+++ b/net-misc/ser2net/Manifest
@@ -0,0 +1,3 @@
+DIST ser2net-2.10.0.tar.gz 364322 SHA256 98f6193225338e25f35302fef5e1f16688693ed43e7b3c3e9e09187eb54547ac SHA512 dd3e37619b10d8bf20d738e90c253bc2d109e0a57ee9f3a8b2a85a69399afa5a8459a4602b2856f0b655427023a36c78330851bf7f8d8da0f28d1fe22c1d5e10 WHIRLPOOL 34ed707308c71d5969e653e01f61e047f17669d34e15807675af11f4356cb77fe18d4f4d9041a449c3c2686c2d1dde0f928ea73e3936967a2db5d91838b41ecc
+DIST ser2net-2.7.tar.gz 355064 SHA256 620265d5d4a59714dbb8645d1698a34135077c735e018ef040d57e7d3a621088 SHA512 39ee99031fad45ea8eeeb9e8bec343e8d6bd58c818f56ec01a05c50ef6d8ed845c6521a6d4a306671ed26959bd2df5c0b29a6b4399103815923cf958c1891c16 WHIRLPOOL 1bb875c7603aaf6ef811dfe6404797a1e9ec152d7b1fa70c26c84e341ad7ade11674bf6e0d0edd978a43189c2f0a5757a7809b4a33d0bd0fd1d5e143452ecac5
+DIST ser2net-2.9.1.tar.gz 357820 SHA256 fdee1e69903cf409bdc6f32403a566cbc6006aa9e2a4d6f8f12b90dfd5ca0d0e SHA512 9fd0efc853993b70c0c632a7059df7a04c832f85491194c49dd8b384e1bb1a576ed9cfe28088cc181a2f7084c88dc6ef6dabbc4ead5ad9339a7becebaa6fb8e7 WHIRLPOOL 0601f3d7d15abbbe25dd3970d3e78f289efd399ba8723b53589e956ed1d8a3a7c9dec9197b26527331e7ad5ffbb8042852d1d4fb36fb500d93ccf736cd25acbf
diff --git a/net-misc/ser2net/files/ser2net-2.7-b230400.diff b/net-misc/ser2net/files/ser2net-2.7-b230400.diff
new file mode 100644
index 000000000000..5e567c118eac
--- /dev/null
+++ b/net-misc/ser2net/files/ser2net-2.7-b230400.diff
@@ -0,0 +1,20 @@
+--- ser2net-2.7.orig/devcfg.c 2009-10-23 14:23:25.000000000 +0200
++++ ser2net-2.7/devcfg.c 2012-07-17 21:03:49.708603108 +0200
+@@ -113,6 +113,9 @@
+ } else if (strcmp(pos, "115200") == 0) {
+ cfsetospeed(termctl, B115200);
+ cfsetispeed(termctl, B115200);
++ } else if (strcmp(pos, "230400") == 0) {
++ cfsetospeed(termctl, B230400);
++ cfsetispeed(termctl, B230400);
+ } else if (strcmp(pos, "1STOPBIT") == 0) {
+ termctl->c_cflag &= ~(CSTOPB);
+ } else if (strcmp(pos, "2STOPBITS") == 0) {
+@@ -190,6 +193,7 @@
+ case B38400: str = "38400"; break;
+ case B57600: str = "57600"; break;
+ case B115200: str = "115200"; break;
++ case B230400: str = "230400"; break;
+ default: str = "unknown speed";
+ }
+ return str;
diff --git a/net-misc/ser2net/files/ser2net.confd b/net-misc/ser2net/files/ser2net.confd
new file mode 100644
index 000000000000..c66685159348
--- /dev/null
+++ b/net-misc/ser2net/files/ser2net.confd
@@ -0,0 +1,27 @@
+# Config file for /etc/init.d/ser2net
+
+# Set the configuration file to one other than the default of /etc/ser2net.conf
+#
+#CONFIG_FILE="/etc/ser2net.conf"
+
+# Enables the control port and sets the TCP port to listen to for the control port.
+# A port number may be of the form [host,]port, such as 127.0.0.1,2000 or localhost,2000.
+# If this is specified, it will only bind to the IP address specified for the port.
+# Otherwise, it will bind to all the addresses on the machine.
+#
+#CONTROL_PORT=""
+
+# Cisco IOS uses a different mechanism for specifying the baud rates than the mechanism
+# described in RFC2217. This option sets the IOS version of setting the baud rates.
+# The default is RFC2217s.
+#
+#CISCO_IOS="yes"
+
+# Enable or disable UUCP locking (default=yes)
+#
+#UUCP_LOCKS="no"
+
+# see the ser2net(8) manual page for additional options you can configure here
+#
+#EXTRA_OPTS=""
+
diff --git a/net-misc/ser2net/files/ser2net.initd b/net-misc/ser2net/files/ser2net.initd
new file mode 100644
index 000000000000..c3010b90446c
--- /dev/null
+++ b/net-misc/ser2net/files/ser2net.initd
@@ -0,0 +1,55 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="Serial to network proxy (${RC_SVCNAME#*.})"
+pidfile="/var/run/${RC_SVCNAME}.pid"
+command="/usr/sbin/ser2net"
+name="${RC_SVCNAME}"
+
+extra_started_commands="reload"
+description_reload="Reread configuration file and make the appropriate changes"
+start_stop_daemon_args="--quiet --exec ${command} --name ${name} --pidfile ${pidfile}"
+
+depend() {
+ use logger
+ need net
+}
+
+config_check() {
+ command_args="${EXTRA_OPTS}"
+ CONFIG_FILE_DEFAULT="/etc/ser2net.conf"
+
+ yesno "${CISCO_IOS:-no}" && command_args="${SER2NET_OPTS} -b"
+ yesno "${UUCP_LOCKS:-yes}" || command_args="${command_args} -u"
+ [ -z "${CONFIG_FILE}" ] && CONFIG_FILE="${CONFIG_FILE_DEFAULT}"
+ [ -n "${CONTROL_PORT}" ] && command_args="${command_args} -p ${CONTROL_PORT}"
+ [ "${CONFIG_FILE}" != "${CONFIG_FILE_DEFAULT}" ] && command_args="${command_args} -c ${CONFIG_FILE}"
+
+ if [ ! -f "${CONFIG_FILE}" ]; then
+ eerror "Please create ${CONFIG_FILE}"
+ eerror "Sample conf: ${CONFIG_FILE_DEFAULT}.dist"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ config_check || return ${?}
+ ebegin "Starting ${description}"
+ start-stop-daemon --start ${start_stop_daemon_args} -- ${command_args} -P "${pidfile}"
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping ${description}"
+ start-stop-daemon --stop ${start_stop_daemon_args}
+ eend ${?}
+}
+
+reload() {
+ ebegin "Reloading ${description}"
+ start-stop-daemon --signal HUP ${start_stop_daemon_args}
+ eend ${?}
+}
diff --git a/net-misc/ser2net/metadata.xml b/net-misc/ser2net/metadata.xml
new file mode 100644
index 000000000000..fa93e6debbf7
--- /dev/null
+++ b/net-misc/ser2net/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>proxy-maintainers</herd>
+ <maintainer>
+ <email>brendan@horan.hk</email>
+ <name>Brendan Horan</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">ser2net</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/ser2net/ser2net-2.10.0.ebuild b/net-misc/ser2net/ser2net-2.10.0.ebuild
new file mode 100644
index 000000000000..d7f9b2350694
--- /dev/null
+++ b/net-misc/ser2net/ser2net-2.10.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
+
+DESCRIPTION="Serial To Network Proxy"
+SRC_URI="mirror://sourceforge/ser2net/${P}.tar.gz"
+HOMEPAGE="http://sourceforge.net/projects/ser2net"
+
+KEYWORDS="~amd64 ~ppc ~x86"
+SLOT="0"
+LICENSE="GPL-2"
+
+DEPEND="tcpd? ( sys-apps/tcp-wrappers )"
+RDEPEND="${DEPEND}"
+
+IUSE="tcpd"
+
+src_configure() {
+ econf $(use_with tcpd tcp-wrappers) --with-uucp-locking
+}
+
+src_install () {
+ default
+
+ insinto /etc
+ newins ${PN}.conf ${PN}.conf.dist
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+}
diff --git a/net-misc/ser2net/ser2net-2.7-r1.ebuild b/net-misc/ser2net/ser2net-2.7-r1.ebuild
new file mode 100644
index 000000000000..a9b8ccba3429
--- /dev/null
+++ b/net-misc/ser2net/ser2net-2.7-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit base autotools
+
+DESCRIPTION="Serial To Network Proxy"
+SRC_URI="mirror://sourceforge/ser2net/${P}.tar.gz"
+HOMEPAGE="http://sourceforge.net/projects/ser2net"
+
+KEYWORDS="~amd64 ppc x86"
+SLOT="0"
+LICENSE="GPL-2"
+
+DEPEND="tcpd? ( sys-apps/tcp-wrappers )"
+RDEPEND="${DEPEND}"
+
+IUSE="tcpd"
+
+PATCHES=( "${FILESDIR}/${P}-b230400.diff" )
+DOCS=( "AUTHORS" "NEWS" "README" "ChangeLog" )
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ local myopts="$(use_with tcpd tcp-wrappers) --with-uucp-locking"
+ econf ${myopts} || die "econf failed"
+}
+
+src_install () {
+ base_src_install
+ insinto /etc
+ newins ${PN}.conf ${PN}.conf.dist
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+}
diff --git a/net-misc/ser2net/ser2net-2.9.1.ebuild b/net-misc/ser2net/ser2net-2.9.1.ebuild
new file mode 100644
index 000000000000..5c6a6a91cba9
--- /dev/null
+++ b/net-misc/ser2net/ser2net-2.9.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Serial To Network Proxy"
+SRC_URI="mirror://sourceforge/ser2net/${P}.tar.gz"
+HOMEPAGE="http://sourceforge.net/projects/ser2net"
+
+KEYWORDS="~amd64 ppc x86"
+SLOT="0"
+LICENSE="GPL-2"
+
+DEPEND="tcpd? ( sys-apps/tcp-wrappers )"
+RDEPEND="${DEPEND}"
+
+IUSE="tcpd"
+
+src_configure() {
+ econf $(use_with tcpd tcp-wrappers) --with-uucp-locking
+}
+
+src_install () {
+ default
+
+ insinto /etc
+ newins ${PN}.conf ${PN}.conf.dist
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+}
diff --git a/net-misc/sgopherd/Manifest b/net-misc/sgopherd/Manifest
new file mode 100644
index 000000000000..6b1c6f588b66
--- /dev/null
+++ b/net-misc/sgopherd/Manifest
@@ -0,0 +1 @@
+DIST sgopherd-13.01.tar.gz 10524 SHA256 8a115d48fd0b78b9c3f069f2c827aacac439cfbf3d2face22f173e2920554693 SHA512 8f2864ddb263e8a437d37718a3108fee2fd7fdc1ce8e3fdb5a8db019b2dde5a52d12f574e3f32a6fe80e1ab1ca2687d87a310e6d12580f6e5d588ba13d4a5165 WHIRLPOOL af0bd9444e68191284fa50c6582f0ef84275e9e3de2d0851f2dbffb35dde1571d490fb444ff2534fbaf5d9a8da9c77d56497ce9efa01b53f14258dfaaf6559ac
diff --git a/net-misc/sgopherd/metadata.xml b/net-misc/sgopherd/metadata.xml
new file mode 100644
index 000000000000..3b9f77da53a3
--- /dev/null
+++ b/net-misc/sgopherd/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>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">vain/sgopherd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/sgopherd/sgopherd-13.01.ebuild b/net-misc/sgopherd/sgopherd-13.01.ebuild
new file mode 100644
index 000000000000..f190b33a1517
--- /dev/null
+++ b/net-misc/sgopherd/sgopherd-13.01.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Small Gopher Server written in GNU Bash"
+HOMEPAGE="https://github.com/vain/sgopherd"
+SRC_URI="https://github.com/vain/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="PIZZA-WARE"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND=""
+RDEPEND="app-shells/bash
+ sys-apps/sed
+ sys-apps/xinetd"
+
+src_prepare() {
+ # Set default user to run sgopherd
+ sed -i -e '/user/s/http/nobody/' xinetd/xinetd-example.conf || die 'sed failed'
+
+ epatch_user
+}
+
+src_install() {
+ dodoc README
+ doman man8/"${PN}".8
+ dobin "${PN}"
+ insinto /etc/xinetd.d
+ newins xinetd/xinetd-example.conf "${PN}"
+ # TODO: add installation of systemd-related files
+}
+
+pkg_postinst() {
+ elog "${PN} can be launched through xinetd"
+ elog "Configuration options are in /etc/xinetd.d/${PN}"
+}
diff --git a/net-misc/shigofumi/Manifest b/net-misc/shigofumi/Manifest
new file mode 100644
index 000000000000..ecd24888cec4
--- /dev/null
+++ b/net-misc/shigofumi/Manifest
@@ -0,0 +1 @@
+DIST shigofumi-0.3.tar.bz2 312184 SHA256 e6d8e4bc68ef512a73238a49342d00e44ab72649b436d5658d4e1fa0237f70ec SHA512 ef7b2894cfa217b713865c4fe24cc985b4ff963df4a5005bda06f03b3c7f358b318e68a136328787fe2dfbb8b1623fe2b2ceb9fbbd20be7f243fa79ace1b0210 WHIRLPOOL 6a64c14035deba56fba30494ae22778ec4131db4c07ec8c206137bd1d25b0691a6b6aca325d875a1d22869e855fe2cbbc564a370d235c73d3c929061cfd908d3
diff --git a/net-misc/shigofumi/metadata.xml b/net-misc/shigofumi/metadata.xml
new file mode 100644
index 000000000000..b1eba2b98a8c
--- /dev/null
+++ b/net-misc/shigofumi/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<longdescription>
+ This is command line oriented client for ISDS (Informační systém datových
+ schránek / Data Box Information System) based on libisds library.
+</longdescription>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-misc/shigofumi/shigofumi-0.3.ebuild b/net-misc/shigofumi/shigofumi-0.3.ebuild
new file mode 100644
index 000000000000..3881cc7400e8
--- /dev/null
+++ b/net-misc/shigofumi/shigofumi-0.3.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI='git://repo.or.cz/shigofumi.git'
+WANT_AUTOMAKE="1.11"
+inherit base
+[[ ${PV} = 9999* ]] && inherit git-2 autotools
+
+DESCRIPTION="Command line client for ISDS"
+HOMEPAGE="http://xpisar.wz.cz/shigofumi/"
+if [[ ${PV} = 9999* ]]; then
+ SRC_URI=""
+ KEYWORDS=""
+else
+ SRC_URI="http://xpisar.wz.cz/${PN}/dist/${P}.tar.bz2"
+ KEYWORDS="~amd64 ~mips ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="debug doc nls xattr"
+
+RDEPEND="dev-libs/confuse
+ dev-libs/libxml2
+ sys-libs/readline
+ >=net-libs/libisds-0.7"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? (
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ )
+ nls? ( sys-devel/gettext )"
+
+DOCS=( NEWS README AUTHORS ChangeLog )
+
+src_prepare() {
+ [[ ${PV} = 9999* ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-fatalwarnings \
+ $(use_enable debug) \
+ $(use_enable doc) \
+ $(use_enable nls) \
+ $(use_enable xattr)
+}
diff --git a/net-misc/shigofumi/shigofumi-9999.ebuild b/net-misc/shigofumi/shigofumi-9999.ebuild
new file mode 100644
index 000000000000..3881cc7400e8
--- /dev/null
+++ b/net-misc/shigofumi/shigofumi-9999.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_REPO_URI='git://repo.or.cz/shigofumi.git'
+WANT_AUTOMAKE="1.11"
+inherit base
+[[ ${PV} = 9999* ]] && inherit git-2 autotools
+
+DESCRIPTION="Command line client for ISDS"
+HOMEPAGE="http://xpisar.wz.cz/shigofumi/"
+if [[ ${PV} = 9999* ]]; then
+ SRC_URI=""
+ KEYWORDS=""
+else
+ SRC_URI="http://xpisar.wz.cz/${PN}/dist/${P}.tar.bz2"
+ KEYWORDS="~amd64 ~mips ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="debug doc nls xattr"
+
+RDEPEND="dev-libs/confuse
+ dev-libs/libxml2
+ sys-libs/readline
+ >=net-libs/libisds-0.7"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? (
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ )
+ nls? ( sys-devel/gettext )"
+
+DOCS=( NEWS README AUTHORS ChangeLog )
+
+src_prepare() {
+ [[ ${PV} = 9999* ]] && eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-fatalwarnings \
+ $(use_enable debug) \
+ $(use_enable doc) \
+ $(use_enable nls) \
+ $(use_enable xattr)
+}
diff --git a/net-misc/shmux/Manifest b/net-misc/shmux/Manifest
new file mode 100644
index 000000000000..0bf4c3ea4074
--- /dev/null
+++ b/net-misc/shmux/Manifest
@@ -0,0 +1,2 @@
+DIST shmux-1.0.2.tgz 110473 SHA256 0886aaca4936926d526988d85df403fa1679a60c355f1be8432bb4bc1e36580f SHA512 d114678827d4fc203f0d18b4a4e02f8b56efdf490df0aef32756a020c755b387468a88fea7266249445a862d7ed9374640432e5807fa57bca5a7d559d7e67a8a WHIRLPOOL 1159c35470e131c4001bde349bc0f31bd533e787ab9d5c6f50904139e80696cba5b32ab02cc5486ea7f10c71495f3e9ee55175fc6384c3c5c919cc6526bd6f1b
+DIST shmux-1.0.tgz 81096 SHA256 d97b2d7f01b32a4a92a87df4320249228da55d9ff0ae8c0e6319c131a0404782
diff --git a/net-misc/shmux/files/shmux-1.0.2-tinfo.patch b/net-misc/shmux/files/shmux-1.0.2-tinfo.patch
new file mode 100644
index 000000000000..802d5973bdc7
--- /dev/null
+++ b/net-misc/shmux/files/shmux-1.0.2-tinfo.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -27,7 +27,7 @@
+ fi
+
+ # Checks for libraries.
+-AC_SEARCH_LIBS([tgetent], [termcap curses ncurses])
++AC_SEARCH_LIBS([tgetent], [termcap tinfo curses ncurses])
+ AC_SEARCH_LIBS([basename], [gen])
+ if test "x$with_pcre" != "xno"; then
+ AC_SEARCH_LIBS([pcre_compile], [pcre], ,
diff --git a/net-misc/shmux/metadata.xml b/net-misc/shmux/metadata.xml
new file mode 100644
index 000000000000..c514a998b805
--- /dev/null
+++ b/net-misc/shmux/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>alicef@gentoo.org</email>
+ <name>Alice Ferrazzi</name>
+</maintainer>
+<longdescription>
+shmux is program for executing the same command on many hosts in parallel.
+For each target, a child process is spawned by shmux, and a shell on the
+target obtained one of the supported methods: rsh, ssh, or sh. The output
+produced by the children is received by shmux and either (optionally)
+output in turn to the user, and/or written to files for later processing.
+The list of targets may either be specified on the command line or be read
+from the standard input.
+</longdescription>
+</pkgmetadata>
diff --git a/net-misc/shmux/shmux-1.0.2.ebuild b/net-misc/shmux/shmux-1.0.2.ebuild
new file mode 100644
index 000000000000..fe9bbf44014f
--- /dev/null
+++ b/net-misc/shmux/shmux-1.0.2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit autotools eutils
+
+DESCRIPTION="Program for executing the same command on many hosts in parallel"
+HOMEPAGE="http://web.taranis.org/shmux/"
+SRC_URI="http://web.taranis.org/${PN}/dist/${P}.tgz"
+
+LICENSE="shmux"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="pcre"
+RESTRICT="test"
+
+RDEPEND="
+ pcre? ( dev-libs/libpcre )
+ sys-libs/ncurses
+"
+DEPEND="${RDEPEND}
+ virtual/awk"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-tinfo.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_with pcre)
+}
+
+src_install() {
+ dobin src/shmux
+ doman shmux.1
+ dodoc CHANGES
+}
diff --git a/net-misc/shmux/shmux-1.0.ebuild b/net-misc/shmux/shmux-1.0.ebuild
new file mode 100644
index 000000000000..6e68100e59a8
--- /dev/null
+++ b/net-misc/shmux/shmux-1.0.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Program for executing the same command on many hosts in parallel"
+HOMEPAGE="http://web.taranis.org/shmux/"
+SRC_URI="http://web.taranis.org/${PN}/dist/${P}.tgz"
+
+LICENSE="shmux"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="pcre"
+RESTRICT="test"
+
+RDEPEND="
+ pcre? ( dev-libs/libpcre )
+ sys-libs/ncurses
+"
+DEPEND="${RDEPEND}
+ virtual/awk"
+
+src_compile() {
+ econf $(use_with pcre) || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ dobin src/shmux || die "dobin failed"
+ doman shmux.1 || die "doman failed"
+ dodoc CHANGES || die "dodoc failed"
+}
diff --git a/net-misc/shout/Manifest b/net-misc/shout/Manifest
new file mode 100644
index 000000000000..1c757b483abf
--- /dev/null
+++ b/net-misc/shout/Manifest
@@ -0,0 +1 @@
+DIST shout-0.8.0.tar.gz 66394 RMD160 3fd2173eff61954b183f0f80191808bdfdea7ae4 SHA1 6df3755e7292daa3133e6fff7ba74711ec06bf16 SHA256 7b36712730c370f7d25271ca93291f9055bb90ee3052e7aec33b5dae205d8227
diff --git a/net-misc/shout/files/implicitdecls.patch b/net-misc/shout/files/implicitdecls.patch
new file mode 100644
index 000000000000..b7a6999f121e
--- /dev/null
+++ b/net-misc/shout/files/implicitdecls.patch
@@ -0,0 +1,12 @@
+Index: shout-0.8.0/sock.c
+===================================================================
+--- shout-0.8.0.orig/sock.c
++++ shout-0.8.0/sock.c
+@@ -25,6 +25,7 @@
+ #include <arpa/inet.h>
+ #include <sys/time.h>
+ #include <unistd.h>
++#include <string.h>
+ #endif /* !win32 */
+
+ #include "sock.h"
diff --git a/net-misc/shout/files/ldflags.patch b/net-misc/shout/files/ldflags.patch
new file mode 100644
index 000000000000..3d049d98d318
--- /dev/null
+++ b/net-misc/shout/files/ldflags.patch
@@ -0,0 +1,21 @@
+Index: shout-0.8.0/Makefile.in
+===================================================================
+--- shout-0.8.0.orig/Makefile.in
++++ shout-0.8.0/Makefile.in
+@@ -2,7 +2,6 @@
+
+ CC = @CC@
+ CFLAGS = @CFLAGS@
+-LDFLAGS = @LIBS@
+
+ SHELL=/bin/sh
+
+@@ -26,7 +25,7 @@ COMPILE_CFLAGS=$(CFLAGS) $(DEFS)
+ all: shout
+
+ shout: shout.c rand.o mpeg.o configfile.o sock.o util.o
+- $(CC) $(COMPILE_CFLAGS) -o shout shout.c rand.o mpeg.o configfile.o sock.o util.o $(LDFLAGS)
++ $(CC) $(COMPILE_CFLAGS) $(LDFLAGS) -o shout shout.c rand.o mpeg.o configfile.o sock.o util.o @LIBS@
+
+ configfile.o: configfile.c
+ $(CC) $(COMPILE_CFLAGS) -c -o configfile.o configfile.c
diff --git a/net-misc/shout/files/shout-0.8.0-overflow.patch b/net-misc/shout/files/shout-0.8.0-overflow.patch
new file mode 100644
index 000000000000..a1292423ce4b
--- /dev/null
+++ b/net-misc/shout/files/shout-0.8.0-overflow.patch
@@ -0,0 +1,26 @@
+diff --git a/shout.c b/shout.c
+index 0a1bded..00bae8d 100644
+--- a/shout.c
++++ b/shout.c
+@@ -441,7 +441,7 @@ post_config ()
+ perror ("fopen");
+ px_shutdown (44);
+ }
+- my_snprintf (pid, BUFSIZE, "%d\n", (int) getpid ());
++ my_snprintf (pid, 30, "%d\n", (int) getpid ());
+ fputs (pid, fp);
+ fclose (fp);
+ }
+diff --git a/sock.c b/sock.c
+index 4a67c00..3b4e539 100644
+--- a/sock.c
++++ b/sock.c
+@@ -81,7 +81,7 @@ sock_connect (char *hostname, int port)
+ sock_close (sockfd);
+ return -1;
+ }
+- memcpy (&server.sin_addr, &sin.sin_addr, sizeof (sin));
++ memcpy (&server.sin_addr, &sin.sin_addr, sizeof (sin.sin_addr));
+ } else {
+ host = gethostbyname (hostname);
+ if (host == NULL) {
diff --git a/net-misc/shout/files/variables.diff b/net-misc/shout/files/variables.diff
new file mode 100644
index 000000000000..afaefbcb2cad
--- /dev/null
+++ b/net-misc/shout/files/variables.diff
@@ -0,0 +1,45 @@
+diff -urN shout-0.8.0/Makefile.in shout-0.8.0-modified/Makefile.in
+--- shout-0.8.0/Makefile.in Thu Apr 20 02:31:50 2000
++++ shout-0.8.0-modified/Makefile.in Tue Jul 23 19:14:36 2002
+@@ -9,11 +9,11 @@
+ srcdir = @srcdir@
+ VPATH = @srcdir@
+
+-prefix = @prefix@/icecast
+-exec_prefix = @prefix@
+-bindir = @BINDIR@
+-etcdir = @ETCDIR@
+-logdir = @LOGDIR@
++prefix = /usr
++exec_prefix = /usr
++bindir = /usr/bin
++etcdir = /etc/shout
++logdir = /var/log/shout
+
+ DEFS = -I. @DEFS@
+
+--- shout-0.8.0/configure 2000-04-20 09:41:45.000000000 +0200
++++ shout-0.8.0/configure 2004-07-17 17:17:40.000000000 +0200
+@@ -532,20 +532,10 @@
+ prefix=$prefix
+ fi
+
+-if test "x$enable_fsstd" = "xyes"; then
+ echo "FSSTD ENABLED"
+ BINDIR="/usr/bin"
+- ETCDIR="/etc/icecast"
+- LOGDIR="/var/log/icecast"
+-else
+- echo "FSSTD DISABLED"
+- BINDIR="${prefix}/icecast/bin"
+- ETCDIR="${prefix}/icecast/etc"
+- LOGDIR="${prefix}/icecast/log"
+-fi
+-
+-
+-
++ ETCDIR="/etc/shout"
++ LOGDIR="/var/log/shout"
+
+ # Extract the first word of "gcc", so it can be a program name with args.
+ set dummy gcc; ac_word=$2
diff --git a/net-misc/shout/metadata.xml b/net-misc/shout/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/net-misc/shout/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>sound</herd>
+</pkgmetadata>
diff --git a/net-misc/shout/shout-0.8.0-r2.ebuild b/net-misc/shout/shout-0.8.0-r2.ebuild
new file mode 100644
index 000000000000..a08514e2105e
--- /dev/null
+++ b/net-misc/shout/shout-0.8.0-r2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Shout is a program for creating mp3 stream for use with icecast or shoutcast"
+HOMEPAGE="http://www.icecast.org"
+SRC_URI="http://icecast.org/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha ~ppc sparc x86"
+IUSE=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/variables.diff \
+ "${FILESDIR}"/ldflags.patch \
+ "${FILESDIR}"/implicitdecls.patch \
+ "${FILESDIR}"/${P}-overflow.patch
+ rm -f sock.o
+ sed -i -e "s/-ansi//" configure
+}
+
+src_compile() {
+ tc-export CC
+ econf --sysconfdir=/etc/shout \
+ --localstatedir=/var
+ emake || die "emake failed."
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ keepdir /var/log/shout
+ fowners root:audio /var/log/shout
+ fperms 775 /var/log/shout
+ fperms 755 /etc/shout
+ fperms 644 /etc/shout/shout.conf.dist
+ dodoc BUGS CREDITS README.shout TODO
+}
diff --git a/net-misc/sipcalc/Manifest b/net-misc/sipcalc/Manifest
new file mode 100644
index 000000000000..4a61a1b304f7
--- /dev/null
+++ b/net-misc/sipcalc/Manifest
@@ -0,0 +1 @@
+DIST sipcalc-1.1.6.tar.gz 117628 SHA256 cfd476c667f7a119e49eb5fe8adcfb9d2339bc2e0d4d01a1d64b7c229be56357 SHA512 9d2047a6fb6ef177d455f44abea19bab7d0131b16eb2444b2b074e94e776854fa74084ab625d2be9b64d136979ede71722c2e24dca12ff54e4a5bb02f947570e WHIRLPOOL 3b3e144b428031bdef15294dbc4dbc293ff27e96675f9bad530c422cdab815f0435fb48ce0d1482ebddee92172d9eb0f7031db8d2a5000c2cce0e7fa7c13a46e
diff --git a/net-misc/sipcalc/metadata.xml b/net-misc/sipcalc/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/net-misc/sipcalc/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/sipcalc/sipcalc-1.1.6.ebuild b/net-misc/sipcalc/sipcalc-1.1.6.ebuild
new file mode 100644
index 000000000000..e2277d096d7d
--- /dev/null
+++ b/net-misc/sipcalc/sipcalc-1.1.6.ebuild
@@ -0,0 +1,13 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Sipcalc is an advanced console-based IP subnet calculator"
+HOMEPAGE="http://www.routemeister.net/projects/sipcalc/"
+SRC_URI="http://www.routemeister.net/projects/${PN}/files/${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 sparc x86 ~amd64-linux ~x86-linux"
+IUSE=""
diff --git a/net-misc/siproxd/Manifest b/net-misc/siproxd/Manifest
new file mode 100644
index 000000000000..4bf6943ecc30
--- /dev/null
+++ b/net-misc/siproxd/Manifest
@@ -0,0 +1,2 @@
+DIST siproxd-0.8.0.tar.gz 824404 SHA256 1a0306dbf5dd65f2c6d779bd449cbabba8c1a4cc79ca034e9cc83836c60f8542 SHA512 eb14a6f7a893e3347d316feedca89c1700e2977b9671da7d77c475993137b049e5caad5254e19dc00f5cb4f0f0c767188cdfb02bb16238dd7b56473886063440 WHIRLPOOL a9e618d14b5a5cd9ed954baf121f905c8024ecd069b95db730d4bff0c19590fbc8928b8d4fe51f37959d9ce506136662aaea50590038e01de96d844f41280554
+DIST siproxd-0.8.1.tar.gz 833170 SHA256 df2df04faf5bdb4980cbdfd5516a47898fc47ca1ebc2c628aa48305b20a09dad SHA512 b47c7b74b4d3adeb4fd9536f82c014a123a6fcbe508a4982c9e77e53a8c68b05bc32799f57cf749e860b3e1f19f6502dbea561a410975f9f095754748515964f WHIRLPOOL e70e79113af3fa0e0a00154c474ca89b7587202ef806c31df5fa9d79d2a813ba6fa3fa006fe8971bac5fed54b85540ae44116a8eb0c262a6bb29e5dcc3a4c612
diff --git a/net-misc/siproxd/files/siproxd-0.8.1-amd64_static_build.patch b/net-misc/siproxd/files/siproxd-0.8.1-amd64_static_build.patch
new file mode 100644
index 000000000000..af491c167da1
--- /dev/null
+++ b/net-misc/siproxd/files/siproxd-0.8.1-amd64_static_build.patch
@@ -0,0 +1,26 @@
+--- siproxd-0.8.1/configure.in
++++ siproxd-0.8.1/configure.in
+@@ -361,8 +361,9 @@
+ dnl link statically to this lib
+ dnl (this probably only will work on linux yet...)
+ AC_MSG_CHECKING("where I can find libosip2.a")
+- libosip_static=`find $extra_libs $libosip_prefix_dir/lib /lib \
+- /usr/lib /usr/local/lib \
++ libosip_static=`find $extra_libs $libosip_prefix_dir/lib64 \
++ $libosip_prefix_dir/lib /lib64 /lib /usr/lib64 \
++ /usr/lib /usr/local/lib64 /usr/local/lib \
+ -name libosip2.a 2>/dev/null|head -1`
+ if test "x$libosip_static" != "x"; then
+ LIBS="$libosip_static $LIBS"
+@@ -371,8 +372,9 @@
+ echo "*** ERROR: a static libosip library is required!";exit 1;
+ fi
+ AC_MSG_CHECKING("where I can find libosipparser2.a")
+- libosip_static=`find $extra_libs $libosip_prefix_dir/lib /lib \
+- /usr/lib /usr/local/lib \
++ libosip_static=`find $extra_libs $libosip_prefix_dir/lib64 \
++ $libosip_prefix_dir/lib /lib64 /lib /usr/lib64 \
++ /usr/lib /ur/local/lib64 /usr/local/lib \
+ -name libosipparser2.a 2>/dev/null|head -1`
+ if test "x$libosip_static" != "x"; then
+ LIBS="$libosip_static $LIBS"
diff --git a/net-misc/siproxd/files/siproxd-libtool-2.4.patch b/net-misc/siproxd/files/siproxd-libtool-2.4.patch
new file mode 100644
index 000000000000..189b32090f7b
--- /dev/null
+++ b/net-misc/siproxd/files/siproxd-libtool-2.4.patch
@@ -0,0 +1,13 @@
+diff -r -U 2 a/src/plugins.h b/src/plugins.h
+--- a/src/plugins.h 2010-01-07 12:44:38.000000000 +0100
++++ b/src/plugins.h 2010-06-19 13:56:30.960679284 +0200
+@@ -25,4 +25,8 @@
+
+
++#ifndef lt__PROGRAM__LTX_preloaded_symbols
++#define lt__PROGRAM__LTX_preloaded_symbols lt_libltdl_LTX_preloaded_symbols
++extern const void *lt_preloaded_symbols[];
++#endif
+
+ /* Plugins must return STS_SUCCESS / SUCCESS_FAILURE */
+
diff --git a/net-misc/siproxd/files/siproxd.rc6 b/net-misc/siproxd/files/siproxd.rc6
new file mode 100755
index 000000000000..9d7fae75808b
--- /dev/null
+++ b/net-misc/siproxd/files/siproxd.rc6
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+check_config() {
+ if [[ ! -f /etc/siproxd.conf ]]; then
+ eerror "Please create /etc/siproxd.conf first!"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ check_config || return 1
+
+ ebegin "Starting siproxd"
+ start-stop-daemon --start --exec /usr/sbin/siproxd -- \
+ -p /var/run/siproxd/siproxd.pid -c /etc/siproxd.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping siproxd"
+ start-stop-daemon --stop --pidfile /var/run/siproxd/siproxd.pid
+ eend $?
+}
diff --git a/net-misc/siproxd/files/siproxd.rc7 b/net-misc/siproxd/files/siproxd.rc7
new file mode 100755
index 000000000000..88ba0331f466
--- /dev/null
+++ b/net-misc/siproxd/files/siproxd.rc7
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+check_config() {
+ if [[ ! -f /etc/siproxd.conf ]]; then
+ eerror "Please create /etc/siproxd.conf first!"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ check_config || return 1
+ checkpath -q -d /var/run/siproxd -o siproxd:siproxd
+ ebegin "Starting siproxd"
+ start-stop-daemon --start --exec /usr/sbin/siproxd -- \
+ -p /var/run/siproxd/siproxd.pid -c /etc/siproxd.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping siproxd"
+ start-stop-daemon --stop --pidfile /var/run/siproxd/siproxd.pid
+ eend $?
+}
diff --git a/net-misc/siproxd/files/siproxd.rc8 b/net-misc/siproxd/files/siproxd.rc8
new file mode 100644
index 000000000000..d85b32f22d33
--- /dev/null
+++ b/net-misc/siproxd/files/siproxd.rc8
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+config_file="/etc/siproxd.conf"
+
+pidfile="/var/run/siproxd/siproxd.pid"
+command="/usr/sbin/siproxd"
+command_args="-p ${pidfile} -c ${config_file}"
+
+depend() {
+ need net
+}
+
+start_pre() {
+ if [ ! -f "${config_file}" ] ; then
+ eerror "Please create ${config_file} first!"
+ return 1
+ fi
+ checkpath -q -d ${pidfile%/*} -o siproxd:siproxd
+}
diff --git a/net-misc/siproxd/metadata.xml b/net-misc/siproxd/metadata.xml
new file mode 100644
index 000000000000..d2e9ec4e9775
--- /dev/null
+++ b/net-misc/siproxd/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">siproxd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/siproxd/siproxd-0.8.0-r2.ebuild b/net-misc/siproxd/siproxd-0.8.0-r2.ebuild
new file mode 100644
index 000000000000..3d507c8213c8
--- /dev/null
+++ b/net-misc/siproxd/siproxd-0.8.0-r2.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils autotools user
+
+DESCRIPTION="A proxy/masquerading daemon for the SIP protocol"
+HOMEPAGE="http://siproxd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="examples doc static"
+# TODO: debug can be used but dmalloc is breaking the build
+# upstream has been contacted, see bug 2649238 in their bugtracker
+
+RDEPEND=">=net-libs/libosip-3.0.0
+ <net-libs/libosip-4.0.0"
+# debug? ( dev-libs/dmalloc[threads] )"
+DEPEND="${RDEPEND}
+ >=sys-devel/libtool-2.4
+ doc? ( app-text/docbook-sgml-utils
+ app-text/docbook-sgml-dtd:4.2 )"
+# docbook-sgml-utils is for building doc
+# docbook-sgml-dtd is for the doc dtd even if docbook-sgml-utils depends on it
+
+pkg_setup() {
+ enewgroup siproxd
+ enewuser siproxd -1 -1 /dev/null siproxd
+}
+
+src_prepare() {
+ # make the daemon run as user 'siproxd' by default
+ sed -i -e "s:nobody:siproxd:" doc/siproxd.conf.example \
+ || die "patching doc/siproxd.conf.example failed"
+ # do not fail when building with external libltdl
+ sed -i 's/libltdl //' Makefile.am || die "patching Makefile failed"
+ epatch "${FILESDIR}/${PN}-libtool-2.4.patch"
+ # do not crash when building with external libltdl, bug 308495
+ sed -i 's|"../libltdl/ltdl.h"|<ltdl.h>|' src/plugins.h || die "patching plugins.h failed"
+
+ eautoreconf
+}
+
+src_configure() {
+ # static-libosip2 make it link statically against libosip2
+ # static build static version of plugins, forced to true
+ econf \
+ $(use_enable doc) \
+ $(use_enable static static-libosip2) \
+ --enable-static
+ #$(use debug && use_enable debug dmalloc) \
+
+ # statically linked plugins to libosip2 causes a shared lib linking with
+ # static lib (gcc seems not to like it : portable issue it says).
+ # there was also DT_TEXREL issue and stripping of static plugins failed
+ # so shared lib has to be used for plugins
+ # upstream has been contacted, see bug 2649351 in their bugtracker
+ if use static; then
+ sed -i -r -e \
+ "s:LIBS =(.*)( \/[^ ]*libosip[^ ]*\.a)( \/[^ ]*libosip[^ ]*\.a)(.*):LIBS_STATIC =\1\2\3\4\nLIBS = \1\4 -losip2 -losipparser2:" \
+ src/Makefile || die "patching src/Makefile failed"
+ sed -i -e \
+ "s:\$(siproxd_LDADD) \$(LIBS):\$(siproxd_LDADD) \$(LIBS_STATIC):" \
+ src/Makefile || die "patching src/Makefile failed"
+ fi
+}
+
+src_install() {
+ einstall || die "einstall failed"
+
+ newinitd "${FILESDIR}"/${PN}.rc6 ${PN} || die "newinitd failed"
+
+ dodoc AUTHORS ChangeLog NEWS README RELNOTES TODO \
+ doc/FAQ doc/FLI4L_HOWTO.txt doc/KNOWN_BUGS \
+ || die "dodoc failed"
+
+ if use doc; then
+ dodoc doc/RFC3261_compliance.txt || die "dodoc failed"
+ # auto-generated doc is not auto-installed
+ # upstream has been contacted, see bug 2649333 in their bugtracker
+ dohtml -r doc/html/ || die "dohtml failed"
+ # pdf is not build all the time
+ if has_version app-text/docbook-sgml-utils[jadetex]; then
+ dodoc doc/pdf/*.pdf || die "dodoc failed"
+ fi
+ fi
+
+ if use examples; then
+ docinto examples
+ dodoc doc/sample_*.txt || die "dodoc failed"
+ fi
+
+ # set up siproxd directories
+ keepdir /var/{lib,run}/${PN} || die "keepdir failed"
+ fowners siproxd:siproxd /var/{lib,run}/${PN} || die "fowners failed"
+}
+
+pkg_postinst() {
+ if use static; then
+ elog "static USE flag does not build a _fully_ statically linked binary"
+ elog "only libosip2 and libosipparser2 are statically linked"
+ elog "In addition, plugins are dynamically linked with those libs"
+ fi
+}
diff --git a/net-misc/siproxd/siproxd-0.8.1-r1.ebuild b/net-misc/siproxd/siproxd-0.8.1-r1.ebuild
new file mode 100644
index 000000000000..80f74e528b7e
--- /dev/null
+++ b/net-misc/siproxd/siproxd-0.8.1-r1.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools user
+
+DESCRIPTION="A proxy/masquerading daemon for the SIP protocol"
+HOMEPAGE="http://siproxd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples doc static"
+# TODO: debug can be used but dmalloc is breaking the build
+# upstream has been contacted, see bug 2649238 in their bugtracker
+
+RDEPEND=">=net-libs/libosip-3.0.0
+ <net-libs/libosip-4.0.0"
+# debug? ( dev-libs/dmalloc[threads] )"
+DEPEND="${RDEPEND}
+ >=sys-devel/libtool-2.4
+ doc? ( app-text/docbook-sgml-utils
+ app-text/docbook-sgml-dtd:4.2 )"
+# docbook-sgml-utils is for building doc
+# docbook-sgml-dtd is for the doc dtd even if docbook-sgml-utils depends on it
+
+pkg_setup() {
+ enewgroup siproxd
+ enewuser siproxd -1 -1 /dev/null siproxd
+}
+
+src_prepare() {
+ # make the daemon run as user 'siproxd' by default
+ sed -i -e "s:nobody:siproxd:" doc/siproxd.conf.example \
+ || die "patching doc/siproxd.conf.example failed"
+ # do not fail when building with external libltdl
+ sed -i 's/libltdl //' Makefile.am || die "patching Makefile failed"
+ epatch "${FILESDIR}/${PN}-libtool-2.4.patch"
+ # do not crash when building with external libltdl, bug 308495
+ sed -i 's|"../libltdl/ltdl.h"|<ltdl.h>|' src/plugins.h || die "patching plugins.h failed"
+
+ epatch "${FILESDIR}/${PN}-0.8.1-amd64_static_build.patch" #380835
+
+ eautoreconf
+}
+
+src_configure() {
+ # static-libosip2 make it link statically against libosip2
+ # static build static version of plugins, forced to true
+ econf \
+ $(use_enable doc) \
+ $(use_enable static static-libosip2) \
+ $(use_enable !static shared) \
+ --enable-static
+ #$(use debug && use_enable debug dmalloc) \
+
+ # statically linked plugins to libosip2 causes a shared lib linking with
+ # static lib (gcc seems not to like it : portable issue it says).
+ # there was also DT_TEXREL issue and stripping of static plugins failed
+ # so shared lib has to be used for plugins
+ # upstream has been contacted, see bug 2649351 in their bugtracker
+ if use static; then
+ sed -i -r -e \
+ "s:LIBS =(.*)( \/[^ ]*libosip[^ ]*\.a)( \/[^ ]*libosip[^ ]*\.a)(.*):LIBS_STATIC =\1\2\3\4\nLIBS = \1\4 -losip2 -losipparser2:" \
+ src/Makefile || die "patching src/Makefile failed"
+ sed -i -e \
+ "s:\$(siproxd_LDADD) \$(LIBS):\$(siproxd_LDADD) \$(LIBS_STATIC):" \
+ src/Makefile || die "patching src/Makefile failed"
+ fi
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/${PN}.rc8 ${PN}
+
+ dodoc AUTHORS ChangeLog NEWS README RELNOTES TODO \
+ doc/FAQ doc/FLI4L_HOWTO.txt doc/KNOWN_BUGS
+
+ if use doc; then
+ dodoc doc/RFC3261_compliance.txt
+ # auto-generated doc is not auto-installed
+ # upstream has been contacted, see bug 2649333 in their bugtracker
+ dohtml -r doc/html/
+ # pdf is not build all the time
+ if has_version 'app-text/docbook-sgml-utils[jadetex]' ; then
+ dodoc doc/pdf/*.pdf
+ fi
+ fi
+
+ if use examples; then
+ docinto examples
+ dodoc doc/sample_*.txt
+ fi
+
+ # set up siproxd directories
+ keepdir /var/lib/${PN}
+ fowners siproxd:siproxd /var/lib/${PN}
+}
+
+pkg_postinst() {
+ if use static; then
+ elog "static USE flag does not build a _fully_ statically linked binary"
+ elog "only libosip2 and libosipparser2 are statically linked"
+ elog "In addition, plugins are dynamically linked with those libs"
+ fi
+}
diff --git a/net-misc/sipsak/Manifest b/net-misc/sipsak/Manifest
new file mode 100644
index 000000000000..2aa07a19964d
--- /dev/null
+++ b/net-misc/sipsak/Manifest
@@ -0,0 +1 @@
+DIST sipsak-0.9.6-1.tar.gz 158776 SHA256 5064c56d482a080b6a4aea71821b78c21b59d44f6d1aa14c27429441917911a9 SHA512 c2d62ddaf2ecc9616941cf002a0494d2f9c43747e6b527f8b1542e9b5ae143fc69b18fc140bd3f255896b0e8eb02f7d198cc1799a4041e2d0c95d90b653591fe WHIRLPOOL 40c5f38c429703c0d3063c2c1bee8f0195b3fb0e1377b29350ef1b566c55960679292f245720d77203948111df8e3914b9cb82d4c6f4a74581d29f0403c02cb6
diff --git a/net-misc/sipsak/files/0.9.6_p1-callback.patch b/net-misc/sipsak/files/0.9.6_p1-callback.patch
new file mode 100644
index 000000000000..37dc486d3174
--- /dev/null
+++ b/net-misc/sipsak/files/0.9.6_p1-callback.patch
@@ -0,0 +1,12 @@
+diff -uNr sipsak-0.9.6.ORIG/helper.c sipsak-0.9.6/helper.c
+--- sipsak-0.9.6.ORIG/helper.c 2015-01-27 14:14:12.208729426 +0000
++++ sipsak-0.9.6/helper.c 2015-01-27 14:14:55.406728851 +0000
+@@ -250,7 +250,7 @@
+ return aptr;
+ }
+
+-static void cares_callback(void *arg, int status, unsigned char *abuf, int alen) {
++static void cares_callback(void *arg, int status, int timeouts, unsigned char *abuf, int alen) {
+ int i;
+ unsigned int ancount, nscount, arcount;
+ const unsigned char *aptr;
diff --git a/net-misc/sipsak/metadata.xml b/net-misc/sipsak/metadata.xml
new file mode 100644
index 000000000000..7e6b8b37f4a9
--- /dev/null
+++ b/net-misc/sipsak/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>chainsaw@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">sipsak.berlios</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/sipsak/sipsak-0.9.6_p1-r1.ebuild b/net-misc/sipsak/sipsak-0.9.6_p1-r1.ebuild
new file mode 100644
index 000000000000..b0952f9ef018
--- /dev/null
+++ b/net-misc/sipsak/sipsak-0.9.6_p1-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 eutils
+
+DESCRIPTION="small command line tool for testing SIP applications and devices"
+HOMEPAGE="http://sourceforge.net/projects/sipsak.berlios/"
+SRC_URI="mirror://sourceforge/sipsak.berlios/${P/_p/-}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-fbsd"
+IUSE="gnutls"
+
+RDEPEND="gnutls? ( net-libs/gnutls )
+ net-dns/c-ares"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${P/_p1}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PV}-callback.patch"
+}
+
+src_configure() {
+ econf \
+ $(use_enable gnutls)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README TODO
+}
diff --git a/net-misc/sipsak/sipsak-0.9.6_p1.ebuild b/net-misc/sipsak/sipsak-0.9.6_p1.ebuild
new file mode 100644
index 000000000000..f1ebfd14cfbd
--- /dev/null
+++ b/net-misc/sipsak/sipsak-0.9.6_p1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="small command line tool for testing SIP applications and devices"
+HOMEPAGE="http://sipsak.org/"
+SRC_URI="mirror://berlios/sipsak/${P/_p/-}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc x86 ~x86-fbsd"
+IUSE="gnutls"
+
+RDEPEND="gnutls? ( net-libs/gnutls )
+ net-dns/c-ares"
+# ares? ( net-dns/c-ares )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${P/_p1}
+
+src_configure() {
+ econf \
+ $(use_enable gnutls)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README TODO
+}
diff --git a/net-misc/sitecopy/Manifest b/net-misc/sitecopy/Manifest
new file mode 100644
index 000000000000..e607df2f3dc4
--- /dev/null
+++ b/net-misc/sitecopy/Manifest
@@ -0,0 +1,2 @@
+DIST sitecopy-0.16.6-04-manpages-addition-fixes.patch 46803 SHA256 09a8e30ca37ec86e7bbdc59b1b59789a6a3172d423a71382774732f19d0e9173 SHA512 4d50eee14111dd817e9b484ecad22fe2b5af234d719a732133114fcff47f2dd12557f53f8e65a4e275bf52e4f9709f78e672174ef5195bcb4f9ca9c91976b965 WHIRLPOOL 0ca06284a408ba9fe6ff5b2aac0b2f8808226812b80403a9cf45b575a9b15320a03391882eb42b5e000a3c475cc5fbc531b657ca01434a7e9061b2bc49405534
+DIST sitecopy-0.16.6.tar.gz 1022265 SHA256 e06fdda007e54ddc6fae90a4e79768e5bfb7770c1139bcaac2e10d841d7458af SHA512 9dee1d499d8faf4a3cd91c9e3d47e3b2777f5deac26bb5e8a1d3e988391a1e7188d52338ef2bddbb4e194f50a328ab5c7b54b4964fcaea9d467c924ef9c71734 WHIRLPOOL 7f9e40649e20720bcb3dcfd397c1df6525bc8de5d08779770fe094cc7d2ce9c750d74bad6dbf8e307ee4a2bf8d1e1df21a4616becec3f03fbb6e0e604df5585f
diff --git a/net-misc/sitecopy/files/sitecopy-0.16.6-01-remote-dynamic-rc.patch b/net-misc/sitecopy/files/sitecopy-0.16.6-01-remote-dynamic-rc.patch
new file mode 100644
index 000000000000..803dc50b0423
--- /dev/null
+++ b/net-misc/sitecopy/files/sitecopy-0.16.6-01-remote-dynamic-rc.patch
@@ -0,0 +1,134 @@
+From: Jesus Climent <jesus dot climent at hispalinux dot es>
+Subject: A patch for generating dynamic rc files
+
+diff -u sitecopy-0.16.3-orig/src/console_fe.c sitecopy-0.16.3/src/console_fe.c
+--- sitecopy-0.16.3-orig/src/console_fe.c 2006-10-27 18:55:19.000000000 +0530
++++ sitecopy-0.16.3/src/console_fe.c 2006-10-27 18:39:06.000000000 +0530
+@@ -155,7 +155,8 @@
+ show_progress, /* Do they want the %-complete messages */
+ prompting, /* Did they say --prompting? */
+ keepgoing, /* Did they say --keep-going? */
+- dry_run; /* Did they say --dry-run? */
++ dry_run, /* Did they say --dry-run? */
++ createremoteroot=false; /* Did they say --create-remote? */
+
+ /* Functions prototypes */
+ static void init(int, char **);
+@@ -222,9 +223,9 @@
+ exit(-1);
+ }
+
+- for (current=all_sites; current!=NULL; current=current->next) {
++ for (current=all_sites; current!=NULL; current=current->next) {
+
+- if (current->use_this || allsites) {
++ if (current->use_this || allsites) {
+ if (!listflat && quiet == 0) {
+ /* Display the banner line */
+ const char *str_action = _(actions[action].doing);
+@@ -507,6 +508,9 @@
+ }
+ } break;
+ #endif
++ case 'x':
++ createremoteroot = true;
++ break;
+ case 'y':
+ prompting = true;
+ break;
+@@ -1210,7 +1214,8 @@
+ int ret = 0, verify_removed;
+
+ /* Set the options */
+- site->keep_going = keepgoing;
++ site->keep_going = keepgoing;
++ site->create_remote_root = createremoteroot;
+
+ switch (act) {
+ case action_update:
+@@ -1354,6 +1359,7 @@
+ " -p, --storepath=PATH Use alternate site storage directory\n"
+ " -y, --prompting Request confirmation before making each update\n"
+ " -a, --allsites Perform the operation on ALL defined sites\n"
++" -x, --create-remote Create root for remote site\n"
+ " -k, --keep-going Carry on an update regardless of errors\n"
+ " -o, --show-progress Display total percentage file transfer complete\n"
+ " -q, --quiet Be quiet while performing the operation\n"
+diff -u sitecopy-0.16.3-orig/src/sites.c sitecopy-0.16.3/src/sites.c
+--- sitecopy-0.16.3-orig/src/sites.c 2006-03-02 01:08:21.000000000 +0530
++++ sitecopy-0.16.3/src/sites.c 2006-10-27 19:12:30.000000000 +0530
+@@ -94,7 +94,6 @@
+ struct site_file *current;
+ char *full_local;
+ int ret;
+-
+ ret = 0;
+
+ for_each_file(current, site) {
+@@ -312,11 +311,52 @@
+ free(full_remote);
+ }
+
++static int create_remote_root_dirs(struct site *site, void *session)
++{
++ char *buffer;
++ int i,j=0,ret=1,flag=1;
++
++ buffer = (char *) calloc(strlen(site->remote_root)+1,sizeof(char));
++
++ buffer[j++] = '/';
++
++ for( i=1 ; site->remote_root[i] != '\0' ; i++ )
++ {
++ if (site->remote_root[i] == '/')
++ flag = 0;
++
++ if (flag)
++ buffer[j++] = site->remote_root[i];
++ else
++ if (j > 0)
++ {
++ buffer[j] = '\0';
++ ret = CALL(dir_create)(session, buffer);
++
++ if (ret != SITE_OK)
++ ret = 0;
++
++ buffer[j++] = '/';
++ flag=1;
++ }
++ }
++
++ return ret;
++}
++
+ /* Create new directories and change permissions on existing directories. */
+ static int update_create_directories(struct site *site, void *session)
+ {
+ struct site_file *current;
+- int ret = 0;
++ int ret = 0, ret_root_dir;
++
++ if (site->create_remote_root) /* We create remote init struct before updating the whole stuff */
++ {
++ ret_root_dir = create_remote_root_dirs(site,session);
++
++ if (!ret_root_dir)
++ fe_warning (_("I couldn't create some dir. already exists?"),NULL,NULL);
++ }
+
+ for_each_file(current, site) {
+ if ((current->type == file_dir)
+diff -u sitecopy-0.16.3-orig/src/sites.h sitecopy-0.16.3/src/sites.h
+--- sitecopy-0.16.3-orig/src/sites.h 2006-02-04 17:46:36.000000000 +0530
++++ sitecopy-0.16.3/src/sites.h 2006-10-27 18:39:06.000000000 +0530
+@@ -381,6 +381,8 @@
+ char *rsh_cmd;
+ char *rcp_cmd;
+
++ unsigned int create_remote_root:1; /* to create remote root in case it doesn't exist */
++
+ unsigned int nodelete; /* whether to delete any files remotely */
+ unsigned int checkmoved; /* whether to check for moved files */
+ unsigned int checkrenames; /* whether to check for renamed files */
+
diff --git a/net-misc/sitecopy/files/sitecopy-0.16.6-02-french-po-fix.patch b/net-misc/sitecopy/files/sitecopy-0.16.6-02-french-po-fix.patch
new file mode 100644
index 000000000000..8dda2589eb01
--- /dev/null
+++ b/net-misc/sitecopy/files/sitecopy-0.16.6-02-french-po-fix.patch
@@ -0,0 +1,22 @@
+From: Ludovic Rousseau <rousseau@debian.org>
+Subject: Fixed the french translation issue
+
+--- sitecopy-0.16.3.orig/po/fr.po 2006-03-12 11:07:42.000000000 +0100
++++ sitecopy-0.16.3/po/fr.po 2007-05-05 10:14:08.000000000 +0200
+@@ -2,7 +2,6 @@
+ # Copyright (C) YEAR Free Software Foundation, Inc.
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+ #
+-#, fuzzy
+ msgid ""
+ msgstr ""
+ "Project-Id-Version: sitecopy 0.9.3\n"
+@@ -12,7 +11,7 @@
+ "Last-Translator: Sylvain Glaize <mokona@puupuu.org>\n"
+ "Language-Team: fr\n"
+ "MIME-Version: 1.0\n"
+-"Content-Type: text/plain; charset=latin-1\n"
++"Content-Type: text/plain; charset=ISO-8859-1\n"
+ "Content-Transfer-Encoding: 8bit\n"
+
+ #: src/console_fe.c:119
diff --git a/net-misc/sitecopy/files/sitecopy-0.16.6-03-wrong-memory-397155.patch b/net-misc/sitecopy/files/sitecopy-0.16.6-03-wrong-memory-397155.patch
new file mode 100644
index 000000000000..5b397c01b05b
--- /dev/null
+++ b/net-misc/sitecopy/files/sitecopy-0.16.6-03-wrong-memory-397155.patch
@@ -0,0 +1,15 @@
+From: Ludovic Rousseau <rousseau at debian dot org>
+Subject: A patch for fixing wrong memory intialization
+
+diff -u sitecopy-0.16.3-orig/src/rcfile.c sitecopy-0.16.3/src/rcfile.c
+--- sitecopy-0.16.3-orig/src/rcfile.c 2006-02-04 17:46:36.000000000 +0530
++++ sitecopy-0.16.3/src/rcfile.c 2006-11-08 22:24:51.000000000 +0530
+@@ -260,7 +260,7 @@
+ if (this_site != &default_site)
+ last_site = this_site;
+ /* Allocate new item */
+- this_site = ne_malloc(sizeof(struct site));
++ this_site = ne_calloc(sizeof(struct site));
+ /* Copy over the defaults */
+ memcpy(this_site, &default_site, sizeof(struct site));
+ /* Deep-copy the string lists */
diff --git a/net-misc/sitecopy/files/sitecopy-0.16.6-06-sftpdriver.c-fix-for-new-openssh.patch b/net-misc/sitecopy/files/sitecopy-0.16.6-06-sftpdriver.c-fix-for-new-openssh.patch
new file mode 100644
index 000000000000..ef9f83621e19
--- /dev/null
+++ b/net-misc/sitecopy/files/sitecopy-0.16.6-06-sftpdriver.c-fix-for-new-openssh.patch
@@ -0,0 +1,13 @@
+From: Agustin Martin Domingo <agmartin@debian.org>
+Subject: Patch for sftp protocol doesn't work with >= 1:4.2p1-1
+
+diff -urNad sitecopy-0.16.3~/src/sftpdriver.c sitecopy-0.16.3/src/sftpdriver.c
+--- sitecopy-0.16.3~/src/sftpdriver.c 2005-06-29 11:44:47.000000000 +0200
++++ sitecopy-0.16.3/src/sftpdriver.c 2007-10-22 14:58:51.000000000 +0200
+@@ -140,7 +140,6 @@
+ }
+ close(c_in);
+ close(c_out);
+- read_sftp(sess); /* wait for prompt */
+ return SITE_OK;
+ }
diff --git a/net-misc/sitecopy/files/sitecopy-0.16.6-10-bts410703-preserve-storage-files-sigint.patch b/net-misc/sitecopy/files/sitecopy-0.16.6-10-bts410703-preserve-storage-files-sigint.patch
new file mode 100644
index 000000000000..5902282357c5
--- /dev/null
+++ b/net-misc/sitecopy/files/sitecopy-0.16.6-10-bts410703-preserve-storage-files-sigint.patch
@@ -0,0 +1,52 @@
+From: Andreas Henriksson <andreas@fatal.se>
+Subject: Preserve storage files it SIGINT (Ctrl+C) is sent
+
+--- sitecopy-0.16.3/src/sitestore.c 2006-02-04 11:18:08.000000000 +0100
++++ sitecopy-0.16.3-pending/src/sitestore.c 2008-06-08 21:56:23.000000000 +0200
+@@ -60,17 +60,42 @@
+ /* Opens the storage file for writing */
+ FILE *site_open_storage_file(struct site *site)
+ {
++ char filebuf[PATH_MAX];
++
++ /* open a temporary "pending" file, to not corrupt the site file in case
++ * the program aborts while we are updating it.
++ * The site_close_storage_file() function will rename it to it's proper
++ * name.
++ * FIXME: something should clean up old *.pending files,
++ * which never got properly closed.
++ */
++ snprintf(filebuf, sizeof(filebuf), "%s.pending", site->infofile);
++
+ if (site->storage_file == NULL) {
+- site->storage_file = fopen(site->infofile, "w" FOPEN_BINARY_FLAGS);
++ site->storage_file = fopen(filebuf, "w" FOPEN_BINARY_FLAGS);
+ }
+ return site->storage_file;
+ }
+
+ int site_close_storage_file(struct site *site)
+ {
+- int ret = fclose(site->storage_file);
++ char filebuf[PATH_MAX];
++ int err;
++
++ /* close filehandle */
++ err = fclose(site->storage_file);
+ site->storage_file = NULL;
+- return ret;
++ if (err) {
++ perror("fclose");
++ return err;
++ }
++
++ /* rename pending file to real filename (overwriting existing file). */
++ snprintf(filebuf, sizeof(filebuf), "%s.pending", site->infofile);
++ err = rename(filebuf, site->infofile);
++ if (err)
++ perror("rename");
++ return err;
+ }
+
+ /* Return escaped form of 'filename'; any XML-unsafe characters are
+
diff --git a/net-misc/sitecopy/files/sitecopy-0.16.6-20-bts549721-add-compatibility-for-neon-0.29.0.patch b/net-misc/sitecopy/files/sitecopy-0.16.6-20-bts549721-add-compatibility-for-neon-0.29.0.patch
new file mode 100644
index 000000000000..0b53e2e4e395
--- /dev/null
+++ b/net-misc/sitecopy/files/sitecopy-0.16.6-20-bts549721-add-compatibility-for-neon-0.29.0.patch
@@ -0,0 +1,17 @@
+From: Sandro Tosi <morph@debian.org>
+Subject: Add support for libneon 0.29.0 and 0.30.0
+
+diff -urNad sitecopy~/configure.in sitecopy/configure.in
+--- sitecopy~/configure.in 2008-07-20 18:21:15.000000000 +0200
++++ sitecopy/configure.in 2009-10-05 23:44:00.764858219 +0200
+@@ -112,8 +112,8 @@
+ AC_LIBOBJ(lib/fnmatch)
+ fi
+
+-# Support neon 0.24 through 0.28
+-NE_REQUIRE_VERSIONS([0], [24 25 26 27 28])
++# Support neon 0.24 through 0.30
++NE_REQUIRE_VERSIONS([0], [24 25 26 27 28 29 30])
+
+ dnl But we don't use zlib or ACL support
+ NEON_WITHOUT_ZLIB
diff --git a/net-misc/sitecopy/files/sitecopy-0.16.6-30-bts320586-manpage-document-sftp.patch b/net-misc/sitecopy/files/sitecopy-0.16.6-30-bts320586-manpage-document-sftp.patch
new file mode 100644
index 000000000000..cc4e4c754171
--- /dev/null
+++ b/net-misc/sitecopy/files/sitecopy-0.16.6-30-bts320586-manpage-document-sftp.patch
@@ -0,0 +1,59 @@
+From: Christian Kujau <lists@nerdbynature.de>
+Subject: Document SFTP sitecopy functionality
+
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg'
+'--exclude=_darcs' '--exclude=.bzr' sitecopy~/doc/sitecopy.1 sitecopy/doc/sitecopy.1
+--- sitecopy~/doc/sitecopy.1 2011-01-03 00:03:07.596559823 +0100
++++ sitecopy/doc/sitecopy.1 2011-01-03 00:03:07.852560823 +0100
+@@ -16,7 +16,7 @@
+ files using an FTP client. sitecopy will also optionally try to spot
+ files you move locally, and move them remotely.
+
+-FTP, WebDAV and other HTTP-based authoring servers (for instance,
++FTP, SFTP, WebDAV and other HTTP-based authoring servers (for instance,
+ AOLserver and Netscape Enterprise) are supported.
+
+ .SH GETTING STARTED
+@@ -229,6 +229,8 @@
+ .br
+ ftp FTP driver
+ .br
++ sftp SFTP driver
++.br
+ xml XML parsing information
+ .br
+ xmlparse Low-level XML parsing information
+@@ -297,7 +299,7 @@
+ .BR "url " "siteURL ]"
+ .br
+ [
+-.BR "protocol " "{ ftp | webdav } ]"
++.BR "protocol " "{ ftp | sftp | webdav } ]"
+ .br
+ [
+ .BR ftp " nopasv ]"
+@@ -353,12 +355,12 @@
+ to the default port for the protocol used, or that given by the
+ .B port
+ key.
+-sitecopy supports the WebDAV or FTP protocols - the
++sitecopy supports the WebDAV or (S)FTP protocols - the
+ .B protocol
+ key specifies which to use, taking the value of either
+ .B webdav
+ or
+-.B ftp
++.B ftp/sftp
+ respectively. By default, FTP will be used.
+
+ The
+@@ -769,7 +771,7 @@
+ be a useful resource for others.
+
+ .SH SEE ALSO
+-rsync(1), ftp(1), mirror(1)
++rsync(1), ftp(1), sftp(1), mirror(1)
+
+ .SH STANDARDS
+
+
diff --git a/net-misc/sitecopy/metadata.xml b/net-misc/sitecopy/metadata.xml
new file mode 100644
index 000000000000..06dbd3e5c3f6
--- /dev/null
+++ b/net-misc/sitecopy/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>proxy-maintainers</herd>
+ <maintainer>
+ <email>rogerx.oss@gmail.com</email>
+ <name>Roger Zauner</name>
+ <description>Maintainer. Assign bugs to him</description>
+ </maintainer>
+ <use>
+ <flag name="rsh">This allows the use of rsh (remote shell) and rcp (remote copy) for authoring websites. sftp is a much more secure protocol and is preferred.</flag>
+ <flag name="webdav">Enable WebDav (Web-based Distributed Authoring and Versioning) support. This system allows users to collaborate on websites using a web based interface. See the ebuild for an FAQ page. Enables neon as well to handle webdav support.</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/sitecopy/sitecopy-0.16.6-r1.ebuild b/net-misc/sitecopy/sitecopy-0.16.6-r1.ebuild
new file mode 100644
index 000000000000..afbefbad54f1
--- /dev/null
+++ b/net-misc/sitecopy/sitecopy-0.16.6-r1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Maintain remote web sites with ease"
+SRC_URI="http://www.manyfish.co.uk/sitecopy/${P}.tar.gz
+ http://dev.gentoo.org/~idella4/sitecopy-0.16.6-04-manpages-addition-fixes.patch"
+HOMEPAGE=" http://www.manyfish.co.uk/sitecopy/"
+# Removed all Debian related stuff. If you want more patches, they can be ported from
+# http://ftp.debian.org/debian/pool/main/s/sitecopy/
+# The sitecopy_0.16.6-5.debian.tar.gz contains their build scripts and patches.
+# This SiteCopy now builds using the original sources.
+KEYWORDS="amd64 x86"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="expat nls rsh ssl webdav xml zlib"
+
+# TODO: Depends copied over from old ebuild file, ensure they're still correct!
+DEPEND="rsh? ( net-misc/netkit-rsh )
+ >=net-libs/neon-0.24.6[zlib?,ssl?,expat?]
+ <=net-libs/neon-0.30.9999[zlib?,ssl?,expat?]
+ xml? ( >=net-libs/neon-0.24.6[-expat] )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # NOTE: Insert patches here.
+ # SiteCopy patches are being currently pulled & ported from
+ # http://ftp.debian.org/debian/pool/main/s/sitecopy/
+ # Consider SiteCopy to be more or less being actively maintained by
+ # Debian maintainers, but GPL patches ported into Gentoo.
+
+ # NOTE: epatch is provided by 'inherit eutils'
+ # Patch File Naming Format
+ # files/package_name - package_version - patch_order - patch_description
+
+ epatch "${FILESDIR}/sitecopy-0.16.6-01-remote-dynamic-rc.patch" \
+ "${FILESDIR}/sitecopy-0.16.6-02-french-po-fix.patch" \
+ "${FILESDIR}/sitecopy-0.16.6-03-wrong-memory-397155.patch" \
+ "${FILESDIR}/sitecopy-0.16.6-06-sftpdriver.c-fix-for-new-openssh.patch" \
+ "${FILESDIR}/sitecopy-0.16.6-10-bts410703-preserve-storage-files-sigint.patch" \
+ "${FILESDIR}/sitecopy-0.16.6-20-bts549721-add-compatibility-for-neon-0.29.0.patch" \
+ "${FILESDIR}/sitecopy-0.16.6-30-bts320586-manpage-document-sftp.patch" \
+ "${DISTDIR}/sitecopy-0.16.6-04-manpages-addition-fixes.patch"
+
+ # Source package uses incorrect '/usr/doc' for the doc folder. So use
+ # sed to correct this error.
+ sed -i -e "s:docdir \= .*:docdir \= \$\(prefix\)\/share/doc\/${PF}:" \
+ Makefile.in || die "Documentation directory patching failed"
+
+ # NOTE: eautoconf/eautomake is provided by 'inherit autotools'
+ # Need to recreate the source package provided configure script,
+ # because the package provided configure script only supports
+ # <neon-0.30.0 support. A patch above patches the configure.in
+ # providing neon-0.30.0 support, and we then recreate the configure
+ # script based upon configure.in using autotools.
+
+ # First move configure.in to configure.ac, required by newer >autoconf-2.13
+ # per Bug #426262 automake-1.14 compatibility
+ # Should check first, autoconf-2.13 is still in the tree requiring configure.in!
+ # mv configure.in configure.ac || die
+
+ eautoconf
+ eautomake
+}
+
+src_configure() {
+ # TODO: USE functions copied over from old ebuild file, ensure they're still correct!
+ econf $(use_with ssl ssl openssl) \
+ $(use_enable webdav) \
+ $(use_enable nls) \
+ $(use_enable rsh) \
+ $(use_with expat) \
+ $(use_with xml libxml2 ) \
+ --with-neon \
+ || die "econf failed"
+}
+
+src_compile() {
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+}
diff --git a/net-misc/sjphone/Manifest b/net-misc/sjphone/Manifest
new file mode 100644
index 000000000000..9a865c15094c
--- /dev/null
+++ b/net-misc/sjphone/Manifest
@@ -0,0 +1 @@
+DIST SJphoneLnx-1.60.2235.tar.gz 4390024 SHA256 1d308fdee9b56fef0152833f7b9cf2a54a3391e5d4d353a094a300b722d5dff0
diff --git a/net-misc/sjphone/metadata.xml b/net-misc/sjphone/metadata.xml
new file mode 100644
index 000000000000..4538a68724a6
--- /dev/null
+++ b/net-misc/sjphone/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer><email>maintainer-needed@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/net-misc/sjphone/sjphone-1.60.2235.ebuild b/net-misc/sjphone/sjphone-1.60.2235.ebuild
new file mode 100644
index 000000000000..e4f20473d9d6
--- /dev/null
+++ b/net-misc/sjphone/sjphone-1.60.2235.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+MY_P="SJphoneLnx-${PV}"
+DESCRIPTION=" VOIP softphone supports both SIP and H.323 standards "
+HOMEPAGE="http://www.sjlabs.com/sjp.html"
+SRC_URI="http://www.sjlabs.com/preview/linux/${MY_P}.tar.gz"
+
+LICENSE="SJ-Labs IJG libpng ZLIB RSA W3C BSD"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+RDEPEND="x11-libs/libSM
+ x11-libs/libICE
+ x11-libs/libXext
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp"
+S=${WORKDIR}/${MY_P}
+
+RESTRICT="strip"
+
+src_install() {
+ insinto /opt/sjphone
+ doins -r lib/*
+ fperms a+x /opt/sjphone/sjphone
+
+ sed -i -e 's:$(dirname "$0"):/opt/sjphone:' \
+ -e 's:$WD/lib:$WD:' sjphone
+ dobin sjphone
+ dodoc README
+ doicon lib/sjphone.png
+ make_desktop_entry sjphone
+}
diff --git a/net-misc/sks/Manifest b/net-misc/sks/Manifest
new file mode 100644
index 000000000000..d751a70d1851
--- /dev/null
+++ b/net-misc/sks/Manifest
@@ -0,0 +1 @@
+DIST sks-1.1.5.tgz 362941 SHA256 92a7f113f0ba7a28d51d7ced60a984d042d8524c651dc3fcafe9d11cc32981a0 SHA512 1fc1248281b4eb6bd0bafad7f3d1600ee86905614ee5c644d532059f972040c2673bee780a414e50e9287fc74fd140ac85db9629d502cff989981904acd3710c WHIRLPOOL 4281b40d72e7370b7c848d683beff2f4bd705a06139a25b27efe5be8a521df9fb870bdeeea97ac3617d542b64fd9c539f90d8f695cea1fec2bdcf267a2d3dc1f
diff --git a/net-misc/sks/files/sks-1.1.5-disable-warn-error-a.patch b/net-misc/sks/files/sks-1.1.5-disable-warn-error-a.patch
new file mode 100644
index 000000000000..18af6c524a22
--- /dev/null
+++ b/net-misc/sks/files/sks-1.1.5-disable-warn-error-a.patch
@@ -0,0 +1,29 @@
+From 5142992b465e87181a4674ac614bf7d2fd7110c4 Mon Sep 17 00:00:00 2001
+From: Kristian Fiskerstrand <kristian.fiskerstrand@sumptuouscapital.com>
+Date: Sun, 26 Jul 2015 21:25:53 +0200
+Subject: [PATCH] (Makefile) Disable warn-error A
+
+warn-error A is set for development versions (tagged with +) upstream,
+however it is not intended to actually be fatal errors for released
+versions. We want to keep EdDSA support, i.e it is actually one
+commit past 1.1.5, so just disabling making warnings fatal.
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 543c531..d4a1222 100644
+--- a/Makefile
++++ b/Makefile
+@@ -49,7 +49,7 @@ SKSVS=$(shell grep 'version_suffix = "+"' common.ml)
+ ifeq ($(strip $(SKSVS)),)
+ WARNERR=
+ else
+-WARNERR=-warn-error A
++WARNERR=
+ endif
+
+ CAMLP4=-pp $(CAMLP4O)
+--
+2.3.6
+
diff --git a/net-misc/sks/files/sks-1.1.5-eddsa.patch b/net-misc/sks/files/sks-1.1.5-eddsa.patch
new file mode 100644
index 000000000000..36359f233c49
--- /dev/null
+++ b/net-misc/sks/files/sks-1.1.5-eddsa.patch
@@ -0,0 +1,84 @@
+diff -r 4d5e4fd7c1c2 CHANGELOG
+--- a/CHANGELOG Mon Aug 11 20:56:45 2014 -0500
++++ b/CHANGELOG Tue Feb 03 00:01:20 2015 +0100
+@@ -1,3 +1,7 @@
++Development:
++ - Add support for EdDSA key using Ed25519 signature scheme
++ (http://www.ietf.org/id/draft-koch-eddsa-for-openpgp-00.txt)
++
+ 1.1.5
+ - Fixes for machine-readable indices. Key expiration times are now read
+ from self-signatures on the key's UIDs. In addition, instead of 8-digit
+diff -r 4d5e4fd7c1c2 common.ml
+--- a/common.ml Mon Aug 11 20:56:45 2014 -0500
++++ b/common.ml Tue Feb 03 00:01:20 2015 +0100
+@@ -47,7 +47,7 @@
+ (* for Release versions, COMMONCAMLFLAGS in Makefile should include *)
+ (* '-warn-error a'. Development work should use '-warn-error A' for stricter *)
+ (* language checking. This affects the Ocaml compiler beginning with v4.01.0 *)
+-let version_suffix = "" (* + for development branch *)
++let version_suffix = "+" (* + for development branch *)
+ let compatible_version_tuple = (0,1,5)
+ let version =
+ let (maj_version,min_version,release) = version_tuple in
+diff -r 4d5e4fd7c1c2 packet.ml
+--- a/packet.ml Mon Aug 11 20:56:45 2014 -0500
++++ b/packet.ml Tue Feb 03 00:01:20 2015 +0100
+@@ -163,6 +163,7 @@
+ | 19 -> "ECDSA (ECC)" (* RFC 6637 *)
+ | 20 -> "Elgamal (Encrypt or Sign)"
+ | 21 -> "Reserved for Diffie-Hellman (X9.42) as defined for IETF-S/MIME"
++ | 22 -> "EdDSA"
+ | x when x >= 100 && x <= 110 -> "Private/Experimental algorithm."
+ | _ -> "Unknown Public Key Algorithm"
+
+@@ -252,10 +253,11 @@
+ | 2 -> "r" (* RSA encrypt *)
+ | 3 -> "s" (* RSA sign *)
+ | 16 -> "g" (* ElGamal encrypt *)
+- | 20 -> "G" (* ElGamal sign and encrypt *)
+ | 17 -> "D" (* DSA *)
+ | 18 -> "e" (* ECDH *)
+ | 19 -> "E" (* ECDSA *)
++ | 20 -> "G" (* ElGamal sign and encrypt *)
++ | 22 -> "E" (* EdDSA *)
+ | _ -> "?" (* NoClue *)
+
+ (** writes out packet, using old-style packets when possible *)
+diff -r 4d5e4fd7c1c2 parsePGP.ml
+--- a/parsePGP.ml Mon Aug 11 20:56:45 2014 -0500
++++ b/parsePGP.ml Tue Feb 03 00:01:20 2015 +0100
+@@ -150,6 +150,7 @@
+ | "\x2b\x24\x03\x03\x02\x08\x01\x01\x0b" -> 384 (* brainpoolP384r1 *)
+ | "\x2b\x24\x03\x03\x02\x08\x01\x01\x0d" -> 512 (* brainpoolP512r1 *)
+ | "\x2b\x81\x04\x00\x0a" -> 256 (* secp256k1 *)
++ | "\x2b\x06\x01\x04\x01\xda\x47\x0f\x01" -> 256 (* Ed25519 *)
+ | _ -> failwith "Unknown OID"
+ in
+ psize
+@@ -168,6 +169,7 @@
+ in
+ (mpi, psize)
+
++ (* Algorithm specific fields for ECDSA and EdDSA *)
+ let parse_ecdsa_pubkey cin =
+ let length = cin#read_int_size 1 in
+ let oid = cin#read_string length in
+@@ -185,7 +187,7 @@
+ let algorithm = cin#read_byte in
+ let (tmpmpi, tmpsize) = match algorithm with
+ | 18 -> parse_ecdh_pubkey cin
+- | 19 -> ( {mpi_bits = 0; mpi_data = ""}, (parse_ecdsa_pubkey cin))
++ | 19 | 22 -> ( {mpi_bits = 0; mpi_data = ""}, (parse_ecdsa_pubkey cin))
+ | _ -> ( {mpi_bits = 0; mpi_data = ""} , -1 )
+ in
+ let mpis = match algorithm with
+@@ -205,7 +207,7 @@
+ pk_ctime = creation_time;
+ pk_expiration = (match expiration with Some 0 -> None | x -> x);
+ pk_alg = algorithm;
+- pk_keylen = (match algorithm with |18|19 -> psize | _ -> mpi.mpi_bits);
++ pk_keylen = (match algorithm with |18|19|22 -> psize | _ -> mpi.mpi_bits);
+ }
+
+ (********************************************************)
diff --git a/net-misc/sks/files/sks-db.initd b/net-misc/sks/files/sks-db.initd
new file mode 100644
index 000000000000..93f1561d7eb1
--- /dev/null
+++ b/net-misc/sks/files/sks-db.initd
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+source /etc/conf.d/sks
+
+command=/usr/bin/sks
+command_args="db ${SKS_ARGS}"
+command_background=1
+description="SKS database thread"
+name="SKS db"
+pidfile="/var/run/sks-db.pid"
+required_files="${SKS_DIR}/sksconf"
+start_stop_daemon_args="--chdir ${SKS_DIR} --user sks"
+
+
+depend()
+{
+ use net
+}
+
+start_pre()
+{
+ checkpath --owner sks:sks --directory \
+ ${SKS_DIR} ${SKS_DIR}/KDB ${SKS_DIR}/PTree
+ checkpath --owner sks:sks --file \
+ ${SKS_DIR}/*.log ${SKS_DIR}/KDB/* ${SKS_DIR}/PTree/*
+}
diff --git a/net-misc/sks/files/sks-db.service b/net-misc/sks/files/sks-db.service
new file mode 100644
index 000000000000..bbc3ba7e2b2d
--- /dev/null
+++ b/net-misc/sks/files/sks-db.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=SKS database thread
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/sks db
+User=sks
+WorkingDirectory=/var/lib/sks
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/sks/files/sks-recon.initd b/net-misc/sks/files/sks-recon.initd
new file mode 100644
index 000000000000..be44cb7e3cf7
--- /dev/null
+++ b/net-misc/sks/files/sks-recon.initd
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+source /etc/conf.d/sks
+
+command=/usr/bin/sks
+command_args="recon ${SKS_ARGS}"
+command_background=1
+description="Reconnoiters SKS peers for keys"
+name="SKS recon"
+pidfile="/var/run/sks-recon.pid"
+required_files="${SKS_DIR}/sksconf ${SKS_DIR}/membership"
+start_stop_daemon_args="--chdir ${SKS_DIR} --user sks"
+
+
+depend()
+{
+ after sks-db
+ use net
+}
+
+start_pre()
+{
+ checkpath --owner sks:sks --directory \
+ ${SKS_DIR} ${SKS_DIR}/KDB ${SKS_DIR}/PTree
+ checkpath --owner sks:sks --file \
+ ${SKS_DIR}/*.log ${SKS_DIR}/KDB/* ${SKS_DIR}/PTree/*
+}
diff --git a/net-misc/sks/files/sks-recon.service b/net-misc/sks/files/sks-recon.service
new file mode 100644
index 000000000000..97ee52ffc0ed
--- /dev/null
+++ b/net-misc/sks/files/sks-recon.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=SKS key reconnaissance thread
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/sks recon
+User=sks
+WorkingDirectory=/var/lib/sks
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/sks/files/sks.confd b/net-misc/sks/files/sks.confd
new file mode 100644
index 000000000000..64eef24ecc52
--- /dev/null
+++ b/net-misc/sks/files/sks.confd
@@ -0,0 +1,4 @@
+SKS_DIR="/var/lib/sks"
+
+# Set common options for sks db and sks recon here.
+SKS_ARGS="" \ No newline at end of file
diff --git a/net-misc/sks/metadata.xml b/net-misc/sks/metadata.xml
new file mode 100644
index 000000000000..5b619cd7fdab
--- /dev/null
+++ b/net-misc/sks/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>k_f@gentoo.org</email>
+ <name>Kristian Fiskerstrand</name>
+ <description>Maintainer</description>
+ </maintainer>
+ <use>
+ <flag name="optimize">Enables bytecode optimization</flag>
+ </use>
+ <upstream>
+ <remote-id type="bitbucket">skskeyserver/sks-keyserver</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/sks/sks-1.1.5-r1.ebuild b/net-misc/sks/sks-1.1.5-r1.ebuild
new file mode 100644
index 000000000000..7ccf67f6817a
--- /dev/null
+++ b/net-misc/sks/sks-1.1.5-r1.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib user readme.gentoo systemd
+
+DESCRIPTION="An OpenPGP keyserver which is decentralized and provides highly reliable synchronization"
+HOMEPAGE="https://bitbucket.org/skskeyserver/sks-keyserver"
+SRC_URI="http://bitbucket.org/skskeyserver/sks-keyserver/downloads/${P}.tgz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="optimize test"
+DOC_CONTENTS="To get sks running, first build the database,
+start the databse, import atleast one key, then
+run a cleandb. See the sks man page for more information
+Typical DB_CONFIG file and sksconf has been installed
+in /var/lib/sks and can be used as templates by renaming
+to remove the .typical extension. The DB_CONFIG file has
+to be in place before doing the database build, or the BDB
+environment has to be manually cleared from both KDB and PTree.
+The same applies if you are upgrading to this version with an existing KDB/Ptree,
+using another version of BDB than 4.8; you need to clear the environment
+using e.g. db4.6_recover -h . and db4.6_checkpoint -1h . in both KDB and PTree
+Additionally a sample web interface has been installed as
+web.typical in /var/lib/sks that can be used by renaming it to web
+Important: It is strongly recommended to set up SKS behind a
+reverse proxy. Instructions on properly configuring SKS can be
+found at https://bitbucket.org/skskeyserver/sks-keyserver/wiki/Peering"
+
+DEPEND="dev-lang/ocaml
+ dev-ml/cryptokit
+ sys-libs/db:4.8"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ ebegin "Creating named group and user"
+ enewgroup sks
+ enewuser sks -1 -1 /var/lib/sks sks
+}
+
+src_prepare() {
+ cp Makefile.local.unused Makefile.local || die
+ sed -i \
+ -e "s:^BDBLIB=.*$:BDBLIB=-L/usr/$(get_libdir):g" \
+ -e "s:^BDBINCLUDE=.*$:BDBINCLUDE=-I/usr/include/db4.8/:g" \
+ -e "s:^LIBDB=.*$:LIBDB=-ldb-4.8:g" \
+ -e "s:^PREFIX=.*$:PREFIX=${D}/usr:g" \
+ -e "s:^MANDIR=.*$:MANDIR=${D}/usr/share/man:g" \
+ Makefile.local || die
+ sed -i \
+ -e 's:^CAMLINCLUDE= -I lib -I bdb$:CAMLINCLUDE= -I lib -I bdb -I +cryptokit:g' \
+ -e 's:-Werror-implicit-function-declaration::g' \
+ Makefile bdb/Makefile || die
+ sed -i \
+ -e 's:/usr/sbin/sks:/usr/bin/sks:g' \
+ sks_build.sh || die
+
+ epatch "${FILESDIR}/${P}-eddsa.patch"
+ epatch "${FILESDIR}/${P}-disable-warn-error-a.patch"
+}
+
+src_compile() {
+ emake dep
+ # sks build fails with paralell build in module Bdb
+ emake -j1 all
+ if use optimize; then
+ emake all.bc
+ fi
+}
+
+src_test() {
+ ./sks unit_test || die
+}
+
+src_install() {
+ if use optimize; then
+ emake install.bc
+ dosym /usr/bin/sks.bc usr/bin/sks
+ dosym /usr/bin/sks_add_mail.bc usr/bin/sks_add_mail
+ else
+ emake install
+ fi
+
+ dodoc README.md
+
+ newinitd "${FILESDIR}/sks-db.initd" sks-db
+ newinitd "${FILESDIR}/sks-recon.initd" sks-recon
+ newconfd "${FILESDIR}/sks.confd" sks
+ systemd_dounit "${FILESDIR}"/sks-db.service
+ systemd_dounit "${FILESDIR}"/sks-recon.service
+
+ dodir "/var/lib/sks/web.typical"
+ insinto /var/lib/sks
+ newins sampleConfig/DB_CONFIG DB_CONFIG.typical
+ newins sampleConfig/sksconf.typical sksconf.typical
+ insinto /var/lib/sks/web.typical
+ doins sampleWeb/HTML5/*
+
+ keepdir /var/lib/sks
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+
+ if [[ -n ${REPLACING_VERSIONS} ]]; then
+ einfo "Note when upgrading from versions of SKS earlier than 1.1.4"
+ einfo "The default values for pagesize settings have changed. To continue"
+ einfo "using an existing DB without rebuilding, explicit settings have to be"
+ einfo "added to the sksconf file."
+ einfo "pagesize: 4"
+ einfo "ptree_pagesize: 1"
+ fi;
+}
diff --git a/net-misc/sks/sks-1.1.5.ebuild b/net-misc/sks/sks-1.1.5.ebuild
new file mode 100644
index 000000000000..11762a72a862
--- /dev/null
+++ b/net-misc/sks/sks-1.1.5.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib user readme.gentoo systemd
+
+DESCRIPTION="An OpenPGP keyserver which is decentralized and provides highly reliable synchronization"
+HOMEPAGE="https://bitbucket.org/skskeyserver/sks-keyserver"
+SRC_URI="http://bitbucket.org/skskeyserver/sks-keyserver/downloads/${P}.tgz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="optimize test"
+DOC_CONTENTS="To get sks running, first build the database,
+start the databse, import atleast one key, then
+run a cleandb. See the sks man page for more information
+Typical DB_CONFIG file and sksconf has been installed
+in /var/lib/sks and can be used as templates by renaming
+to remove the .typical extension. The DB_CONFIG file has
+to be in place before doing the database build, or the BDB
+environment has to be manually cleared from both KDB and PTree.
+The same applies if you are upgrading to this version with an existing KDB/Ptree,
+using another version of BDB than 4.8; you need to clear the environment
+using e.g. db4.6_recover -h . and db4.6_checkpoint -1h . in both KDB and PTree
+Additionally a sample web interface has been installed as
+web.typical in /var/lib/sks that can be used by renaming it to web
+Important: It is strongly recommended to set up SKS behind a
+reverse proxy. Instructions on properly configuring SKS can be
+found at https://bitbucket.org/skskeyserver/sks-keyserver/wiki/Peering"
+
+DEPEND="dev-lang/ocaml
+ dev-ml/cryptokit
+ sys-libs/db:4.8"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ ebegin "Creating named group and user"
+ enewgroup sks
+ enewuser sks -1 -1 /var/lib/sks sks
+}
+
+src_prepare() {
+ cp Makefile.local.unused Makefile.local || die
+ sed -i \
+ -e "s:^BDBLIB=.*$:BDBLIB=-L/usr/$(get_libdir):g" \
+ -e "s:^BDBINCLUDE=.*$:BDBINCLUDE=-I/usr/include/db4.8/:g" \
+ -e "s:^LIBDB=.*$:LIBDB=-ldb-4.8:g" \
+ -e "s:^PREFIX=.*$:PREFIX=${D}/usr:g" \
+ -e "s:^MANDIR=.*$:MANDIR=${D}/usr/share/man:g" \
+ Makefile.local || die
+ sed -i \
+ -e 's:^CAMLINCLUDE= -I lib -I bdb$:CAMLINCLUDE= -I lib -I bdb -I +cryptokit:g' \
+ -e 's:-Werror-implicit-function-declaration::g' \
+ Makefile bdb/Makefile || die
+ sed -i \
+ -e 's:/usr/sbin/sks:/usr/bin/sks:g' \
+ sks_build.sh || die
+}
+
+src_compile() {
+ emake dep
+ # sks build fails with paralell build in module Bdb
+ emake -j1 all
+ if use optimize; then
+ emake all.bc
+ fi
+}
+
+src_test() {
+ ./sks unit_test || die
+}
+
+src_install() {
+ if use optimize; then
+ emake install.bc
+ dosym /usr/bin/sks.bc usr/bin/sks
+ dosym /usr/bin/sks_add_mail.bc usr/bin/sks_add_mail
+ else
+ emake install
+ fi
+
+ dodoc README.md
+
+ newinitd "${FILESDIR}/sks-db.initd" sks-db
+ newinitd "${FILESDIR}/sks-recon.initd" sks-recon
+ newconfd "${FILESDIR}/sks.confd" sks
+ systemd_dounit "${FILESDIR}"/sks-db.service
+ systemd_dounit "${FILESDIR}"/sks-recon.service
+
+ dodir "/var/lib/sks/web.typical"
+ insinto /var/lib/sks
+ newins sampleConfig/DB_CONFIG DB_CONFIG.typical
+ newins sampleConfig/sksconf.typical sksconf.typical
+ insinto /var/lib/sks/web.typical
+ doins sampleWeb/HTML5/*
+
+ keepdir /var/lib/sks
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+
+ if [[ -n ${REPLACING_VERSIONS} ]]; then
+ einfo "Note when upgrading from versions of SKS earlier than 1.1.4"
+ einfo "The default values for pagesize settings have changed. To continue"
+ einfo "using an existing DB without rebuilding, explicit settings have to be"
+ einfo "added to the sksconf file."
+ einfo "pagesize: 4"
+ einfo "ptree_pagesize: 1"
+ fi;
+}
diff --git a/net-misc/slimrat/metadata.xml b/net-misc/slimrat/metadata.xml
new file mode 100644
index 000000000000..0084f03532c9
--- /dev/null
+++ b/net-misc/slimrat/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>proxy-maintainers</herd>
+ <maintainer>
+ <email>premek@vohnout.cz</email>
+ <name>Premysl Vohnout</name>
+ </maintainer>
+ <use>
+ <flag name='X'>Install also GUI client</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/slimrat/slimrat-9999.ebuild b/net-misc/slimrat/slimrat-9999.ebuild
new file mode 100644
index 000000000000..494f78cffd32
--- /dev/null
+++ b/net-misc/slimrat/slimrat-9999.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils subversion
+
+DESCRIPTION="Linux Rapidshare downloader"
+HOMEPAGE="http://code.google.com/p/slimrat/"
+SRC_URI=""
+ESVN_REPO_URI="http://${PN}.googlecode.com/svn/trunk/"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+IUSE="X"
+
+DEPEND="
+ >=dev-lang/perl-5.10.1[ithreads]
+ dev-perl/JSON
+ >=dev-perl/WWW-Mechanize-1.52
+ virtual/perl-Getopt-Long
+ virtual/perl-Term-ANSIColor
+ X? (
+ dev-perl/gtk2-gladexml
+ dev-perl/Spiffy
+ x11-misc/xclip
+ )
+"
+# aview: displaying captcha
+RDEPEND="${DEPEND}
+ media-gfx/aview
+ X? ( x11-terms/xterm )
+"
+
+src_prepare() {
+ esvn_clean
+}
+
+src_install() {
+ # install binaries
+
+ exeinto "/usr/share/${PN}"
+
+ doexe "src/${PN}"
+ dosym "/usr/share/${PN}/${PN}" "${ROOT}usr/bin/${PN}"
+
+ if use X; then
+ doexe "src/${PN}-gui"
+ dosym "/usr/share/${PN}/${PN}-gui" "/usr/bin/${PN}-gui"
+ fi
+
+ # install data
+ insinto /etc
+ newins "${S}/slimrat.conf" slimrat.conf
+
+ insinto "/usr/share/${PN}"
+ doins -r "src/"*.pm "src/plugins/" "src/${PN}.glade"
+}
diff --git a/net-misc/smb4k/Manifest b/net-misc/smb4k/Manifest
new file mode 100644
index 000000000000..bfac8ea17e0c
--- /dev/null
+++ b/net-misc/smb4k/Manifest
@@ -0,0 +1 @@
+DIST smb4k-1.2.0.tar.xz 3911380 SHA256 42b32a7f5c534e17e5130cb8a69ee1f38d82e8c5932091a20e9faf0b16c4fd2f SHA512 3256c24328246a86f19b943c7d10bed7a5979ef5940be1381a07be93c91a80adcf42e5bbfb791dc62edc1d9ece38a5e86c33974706ed23a4db399e4b869acf58 WHIRLPOOL 1b24526acb042c3f06a05b3c1f7516f0a1fe21667abb5bb1330868c48bd7731f4c6aacc307b1befbd9e2407665ba8b1ac1b43478013c671c9fd15e4fff79949d
diff --git a/net-misc/smb4k/metadata.xml b/net-misc/smb4k/metadata.xml
new file mode 100644
index 000000000000..353711a0c96e
--- /dev/null
+++ b/net-misc/smb4k/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>kde</herd>
+ <upstream>
+ <remote-id type="sourceforge">smb4k</remote-id>
+ <bugs-to>http://sourceforge.net/p/smb4k/tickets/</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/smb4k/smb4k-1.2.0.ebuild b/net-misc/smb4k/smb4k-1.2.0.ebuild
new file mode 100644
index 000000000000..ca3c207dd650
--- /dev/null
+++ b/net-misc/smb4k/smb4k-1.2.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+CMAKE_IN_SOURCE_BUILD="true"
+DECLARATIVE_REQUIRED="always"
+KDE_LINGUAS="bg bs ca ca@valencia cs da de en_GB eo es et fi fr ga gl hu is it
+ja ko lt mai mr nb nds nl pl pt pt_BR ro ru sk sv tr ug uk zh_CN zh_TW"
+KDE_HANDBOOK="optional"
+KDE_DOC_DIRS="doc doc-translations/%lingua_${PN}"
+inherit kde4-base
+
+DESCRIPTION="The advanced network neighborhood browser for KDE"
+HOMEPAGE="http://sourceforge.net/projects/smb4k/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="4"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="debug"
+
+RDEPEND=">=net-fs/samba-3.4.2[cups]"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+"
+
+DOCS=( AUTHORS BUGS ChangeLog README )
diff --git a/net-misc/smbc/Manifest b/net-misc/smbc/Manifest
new file mode 100644
index 000000000000..16b285859a79
--- /dev/null
+++ b/net-misc/smbc/Manifest
@@ -0,0 +1 @@
+DIST smbc-1.2.2.tgz 977908 SHA256 1059216f727bb3284eaee3daea5f868e1158b0db63f29ad4a392501c5e3f3f25 SHA512 4625ba6bb6b3ffe818826d4af4da0fcb2e516e1ed62ee15ace4cf04d5176d238c5107d349f595809048bafc38d571448e1f1f170ed061dfc8f698836b52e2b84 WHIRLPOOL a2ee73214a68ae02f5abcf842701ba88b4d80c0d8d67b12bd9d6f412b3ba6e345b83a82b7ebd0343411b6a17439bb65a3582621e4c3f5f20740897a0578cfaf6
diff --git a/net-misc/smbc/files/smbc-1.2.2-cflags.patch b/net-misc/smbc/files/smbc-1.2.2-cflags.patch
new file mode 100644
index 000000000000..0b7baf59c75a
--- /dev/null
+++ b/net-misc/smbc/files/smbc-1.2.2-cflags.patch
@@ -0,0 +1,13 @@
+Do not define CFLAGS
+
+--- a/src/Makefile.am 2005-06-29 14:14:02.000000000 +0200
++++ b/src/Makefile.am 2009-04-28 18:18:26.000000000 +0200
+@@ -18,7 +18,7 @@
+ smb-ext.c smb-ext.h
+
+ smbc_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wall
+-CFLAGS = -O3
++#CFLAGS = -O3
+
+ if GDB
+ smbc_CFLAGS += -ggdb -g
diff --git a/net-misc/smbc/files/smbc-1.2.2-size_t.patch b/net-misc/smbc/files/smbc-1.2.2-size_t.patch
new file mode 100644
index 000000000000..cafaf4a1b713
--- /dev/null
+++ b/net-misc/smbc/files/smbc-1.2.2-size_t.patch
@@ -0,0 +1,16 @@
+Patch to enable running on amd64 (borrowed from http://bugs.debian.org/366580)
+
+--- a/src/convert.c
++++ b/src/convert.c
+@@ -98,8 +98,9 @@
+
+ char *inbuf = (char*) src;
+ char *outbuf = param->dst;
+- int inbytesleft = src_len - 1;
+- int outbytesleft = param->dst_len - 1;
++ /* iconv requires size_t and not int ! */
++ size_t inbytesleft = src_len - 1;
++ size_t outbytesleft = param->dst_len - 1;
+ bzero(param->dst, param->dst_len);
+ // Need some error handling here
+ iconv(param->cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
diff --git a/net-misc/smbc/metadata.xml b/net-misc/smbc/metadata.xml
new file mode 100644
index 000000000000..b5da052d4760
--- /dev/null
+++ b/net-misc/smbc/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>samba</herd>
+ <longdescription>
+Samba Commander is a text mode SMB network commander. In SMBC, you can browse the local network or you can use the search function to find the files. You can also download/upload files and directories or create them both locally and remotely. SMBC has a resume function and supports UTF-8 characters.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">smbc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/smbc/smbc-1.2.2-r2.ebuild b/net-misc/smbc/smbc-1.2.2-r2.ebuild
new file mode 100644
index 000000000000..daf8f0fb9ba1
--- /dev/null
+++ b/net-misc/smbc/smbc-1.2.2-r2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit autotools eutils
+
+DESCRIPTION="A text mode (ncurses) SMB network commander. Features: resume and UTF-8"
+HOMEPAGE="http://sourceforge.net/projects/smbc/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=" ~ppc ~x86"
+IUSE="nls debug"
+
+DEPEND="net-fs/samba
+ sys-libs/ncurses
+ dev-libs/popt
+ nls? ( sys-devel/gettext )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cflags.patch
+ epatch "${FILESDIR}"/${P}-size_t.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ $(use_with debug) \
+ || die "econf failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ mkdir -p "${D}/usr/share/doc"
+ mv -v "${D}/usr/share/"{${PN},doc/${PF}}
+}
diff --git a/net-misc/snarf/Manifest b/net-misc/snarf/Manifest
new file mode 100644
index 000000000000..fbb108bd3cea
--- /dev/null
+++ b/net-misc/snarf/Manifest
@@ -0,0 +1 @@
+DIST snarf-7.0.tar.gz 64495 SHA256 85a0846d452b02eaff225bf68fb36e68dfc55be5a58fda38dcb3602dcc300a89
diff --git a/net-misc/snarf/files/snarf-basename-patch.diff b/net-misc/snarf/files/snarf-basename-patch.diff
new file mode 100644
index 000000000000..85cafb527d68
--- /dev/null
+++ b/net-misc/snarf/files/snarf-basename-patch.diff
@@ -0,0 +1,147 @@
+diff -ruN snarf-7.0.orig/http.c snarf-7.0/http.c
+--- snarf-7.0.orig/http.c 2000-08-09 01:33:30.000000000 +0100
++++ snarf-7.0/http.c 2003-07-28 12:19:08.000000000 +0100
+@@ -14,8 +14,6 @@
+ #include "util.h"
+ #include "llist.h"
+
+-extern int default_opts;
+-
+ int redirect_count = 0;
+ #define REDIRECT_MAX 10
+
+diff -ruN snarf-7.0.orig/options.c snarf-7.0/options.c
+--- snarf-7.0.orig/options.c 1999-07-27 20:42:51.000000000 +0100
++++ snarf-7.0/options.c 2003-07-28 11:59:05.000000000 +0100
+@@ -8,8 +8,8 @@
+ int default_opts;
+ extern int debug_enabled;
+
+-unsigned char
+-set_options(unsigned char opts, char *optstring)
++unsigned int
++set_options(unsigned int opts, char *optstring)
+ {
+ int i;
+
+@@ -78,6 +78,15 @@
+ case 'd':
+ debug_enabled = !debug_enabled;
+ break;
++
++ case 'b':
++ opts |= OPT_BASENAME;
++ break;
++
++ case 'B':
++ default_opts |= OPT_BASENAME;
++ break;
++
+ default:
+ report(WARN, "unknown option `%c', ignoring", optstring[i]);
+ }
+diff -ruN snarf-7.0.orig/options.h snarf-7.0/options.h
+--- snarf-7.0.orig/options.h 1999-07-27 20:42:51.000000000 +0100
++++ snarf-7.0/options.h 2003-07-28 12:20:47.000000000 +0100
+@@ -12,12 +12,13 @@
+ #define OPT_PROGRESS (1 << 5) /* for python aka markus fleck */
+ #define OPT_BE_MOZILLA (1 << 6) /* To act like Mozilla */
+ #define OPT_BE_MSIE (1 << 7) /* To act like MSIE */
++#define OPT_BASENAME (1 << 8) /* Only show basename() of output */
+
+ /* Funcs */
+
+ #ifdef PROTOTYPES
+
+-unsigned char set_options(unsigned char, char *);
++unsigned int set_options(unsigned int, char *);
+
+ #endif /* PROTOTYPES */
+
+diff -ruN snarf-7.0.orig/snarf.1 snarf-7.0/snarf.1
+--- snarf-7.0.orig/snarf.1 2000-01-17 14:26:13.000000000 +0000
++++ snarf-7.0/snarf.1 2003-07-28 12:45:26.000000000 +0100
+@@ -90,6 +90,9 @@
+ .I "\-m"
+ Send a user-agent string similar to what Microsoft Internet Explorer
+ uses.
++.TP
++.I "\-b"
++Only print the basename of output file with the progress bars.
+ .PP
+ Each option only affects the URL that immediately follows it. To have
+ an option affect all URLs that follow it, use an uppercase letter for
+diff -ruN snarf-7.0.orig/snarf.c snarf-7.0/snarf.c
+--- snarf-7.0.orig/snarf.c 2000-08-09 01:34:45.000000000 +0100
++++ snarf-7.0/snarf.c 2003-07-28 12:43:29.000000000 +0100
+@@ -50,6 +50,7 @@
+ " -n Ignore '-r' and transfer file in its entirety\n"
+ " -m Spoof MSIE user-agent string\n"
+ " -z Spoof Navigator user-agent string\n"
++ " -b Only print basename of output file\n"
+ "\n"
+ "Lowercase option letters only affect the URLs that "
+ "immediately follow them.\n"
+diff -ruN snarf-7.0.orig/url.h snarf-7.0/url.h
+--- snarf-7.0.orig/url.h 1999-07-27 20:42:51.000000000 +0100
++++ snarf-7.0/url.h 2003-07-28 12:00:03.000000000 +0100
+@@ -28,7 +28,7 @@
+ char *proxy;
+ char *proxy_username;
+ char *proxy_password;
+- unsigned char options;
++ unsigned int options;
+ off_t outfile_size;
+ off_t outfile_offset;
+ };
+diff -ruN snarf-7.0.orig/util.c snarf-7.0/util.c
+--- snarf-7.0.orig/util.c 2000-08-09 01:12:39.000000000 +0100
++++ snarf-7.0/util.c 2003-07-28 13:29:46.000000000 +0100
+@@ -32,6 +32,7 @@
+ #include <ctype.h>
+ #include <errno.h>
+ #include <time.h>
++#include <libgen.h>
+ #include "url.h"
+ #include "options.h"
+
+@@ -292,6 +293,10 @@
+
+ filename = strdup(rsrc->outfile);
+
++ if( rsrc->options & OPT_BASENAME ){
++ filename = basename(filename);
++ }
++
+ if( strlen(filename) > 24 )
+ filename[24] = '\0';
+
+@@ -312,6 +317,7 @@
+ progress_update(Progress * p,
+ long int increment)
+ {
++ char *filename = NULL;
+ unsigned int units;
+ char *anim = "-\\|/";
+
+@@ -320,12 +326,16 @@
+
+ p->current += increment;
+
+- if (strlen(p->rsrc->outfile) > 24) {
+- p->rsrc->outfile[24] = '\0';
+- }
++ if( p->rsrc->options & OPT_BASENAME ){
++ filename = basename(strdup(p->rsrc->outfile));
++ } else
++ filename = strdup(p->rsrc->outfile);
+
++ if (strlen(filename) > 24)
++ filename[24] = '\0';
++
+ fprintf(stderr, "\r");
+- fprintf(stderr, "%-25s [", p->rsrc->outfile);
++ fprintf(stderr, "%-25s [", filename);
+
+
+ if( p->length ) {
diff --git a/net-misc/snarf/files/snarf-fix-off-by-ones.diff b/net-misc/snarf/files/snarf-fix-off-by-ones.diff
new file mode 100644
index 000000000000..c0556b3ed851
--- /dev/null
+++ b/net-misc/snarf/files/snarf-fix-off-by-ones.diff
@@ -0,0 +1,45 @@
+diff -ruNp snarf-7.0.orig/ftp.c snarf-7.0/ftp.c
+--- snarf-7.0.orig/ftp.c 2000-08-09 00:27:24.000000000 +0100
++++ snarf-7.0/ftp.c 2007-03-30 20:47:46.046783664 +0100
+@@ -89,7 +89,7 @@ get_line(UrlResource *rsrc, int control)
+ char *end;
+ char buf[BUFSIZE+1];
+
+- while( (bytes_read = read(control, buf, BUFSIZE)) ) {
++ while( (bytes_read = read(control, buf, BUFSIZE)) > 0 ) {
+ if( rsrc->options & OPT_VERBOSE )
+ fwrite(buf, 1, bytes_read, stderr);
+
+diff -ruNp snarf-7.0.orig/http.c snarf-7.0/http.c
+--- snarf-7.0.orig/http.c 2007-03-30 20:46:21.176685880 +0100
++++ snarf-7.0/http.c 2007-03-30 20:47:46.205759496 +0100
+@@ -365,7 +365,7 @@ http_transfer(UrlResource *rsrc)
+
+ bytes_read = read(sock, buf, 8);
+
+- if( bytes_read == 0 ) {
++ if( bytes_read <= 0 ) {
+ close(sock);
+ return 0;
+ }
+diff -ruNp snarf-7.0.orig/url.c snarf-7.0/url.c
+--- snarf-7.0.orig/url.c 1998-11-16 01:29:44.000000000 +0000
++++ snarf-7.0/url.c 2007-03-30 20:47:46.205759496 +0100
+@@ -96,7 +96,7 @@ get_username(char *string, Url *u)
+ return string;
+ }
+
+- username = malloc(i);
++ username = malloc(i+1);
+ memcpy(username, string, i + 1);
+
+ username[i] = '\0';
+@@ -135,7 +135,7 @@ get_password(char *string, Url *u)
+
+ for(i = 0 ; string[i] != '@'; i++);
+
+- password = malloc(i);
++ password = malloc(i+1);
+
+ /* and finally, get the password portion */
+ memcpy(password, string, i);
diff --git a/net-misc/snarf/files/snarf-unlink-empty.diff b/net-misc/snarf/files/snarf-unlink-empty.diff
new file mode 100644
index 000000000000..66f3089b0b63
--- /dev/null
+++ b/net-misc/snarf/files/snarf-unlink-empty.diff
@@ -0,0 +1,37 @@
+diff -urN snarf-7.0.orig/http.c snarf-7.0/http.c
+--- snarf-7.0.orig/http.c 2003-08-01 14:46:26.000000000 +0100
++++ snarf-7.0/http.c 2003-08-01 14:44:02.000000000 +0100
+@@ -447,6 +447,10 @@
+ cleanup:
+ free_http_header(header);
+ close(sock); fclose(out);
++ if ((rsrc->open_created) && (rsrc->outfile_size == 0)
++ && (retval == 0))
++ if (unlink(rsrc->outfile))
++ report(ERR, "unlink %s: %s", rsrc->outfile, strerror(errno));
+ return retval;
+
+ }
+diff -urN snarf-7.0.orig/url.h snarf-7.0/url.h
+--- snarf-7.0.orig/url.h 2003-08-01 14:46:26.000000000 +0100
++++ snarf-7.0/url.h 2003-08-01 13:27:22.000000000 +0100
+@@ -25,6 +25,7 @@
+ struct _UrlResource {
+ Url *url;
+ char *outfile;
++ unsigned int open_created;
+ char *proxy;
+ char *proxy_username;
+ char *proxy_password;
+diff -urN snarf-7.0.orig/util.h snarf-7.0/util.h
+--- snarf-7.0.orig/util.h 2000-08-09 01:12:25.000000000 +0100
++++ snarf-7.0/util.h 2003-08-01 14:53:54.000000000 +0100
+@@ -53,7 +53,7 @@
+ extern int debug_enabled;
+
+ #define open_outfile(x) (((x)->outfile[0] == '-') ? stdout : real_open_outfile(x))
+-#define real_open_outfile(x) (((x)->options & OPT_RESUME && !((x)->options & OPT_NORESUME)) ? (fopen((x)->outfile, "a")) : (fopen((x)->outfile, "w")))
++#define real_open_outfile(x) (((x)->open_created = (access ((x)->outfile, F_OK)) ? 1 : 0 ),((x)->options & OPT_RESUME && !((x)->options & OPT_NORESUME)) ? (fopen((x)->outfile, "a")) : (fopen((x)->outfile, "w")))
+
+ #define safe_free(x) if(x) free(x)
+ #define safe_strdup(x) ( (x) ? strdup(x) : NULL )
diff --git a/net-misc/snarf/metadata.xml b/net-misc/snarf/metadata.xml
new file mode 100644
index 000000000000..5b3bf5b24045
--- /dev/null
+++ b/net-misc/snarf/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ snarf is a command line resource grabber. It can transfer files through
+ the http, gopher, finger, and ftp protocols without user interaction.
+ It is small and fast.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/snarf/snarf-7.0-r3.ebuild b/net-misc/snarf/snarf-7.0-r3.ebuild
new file mode 100644
index 000000000000..f3fa8939a8ea
--- /dev/null
+++ b/net-misc/snarf/snarf-7.0-r3.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+IUSE=""
+DESCRIPTION="Small and fast CLI resource grabber with support for http, gopher, finger, and ftp protocols"
+SRC_URI="http://www.xach.com/snarf/${P}.tar.gz"
+HOMEPAGE="http://www.xach.com/snarf/"
+KEYWORDS="alpha amd64 ppc sparc x86"
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ epatch "${FILESDIR}"/snarf-basename-patch.diff
+ epatch "${FILESDIR}"/snarf-unlink-empty.diff
+ epatch "${FILESDIR}"/snarf-fix-off-by-ones.diff
+}
+
+src_install() {
+ dobin snarf
+ doman snarf.1
+ dodoc ChangeLog README TODO
+}
+
+pkg_postinst() {
+ elog 'To use snarf with portage, try these settings in your make.conf'
+ elog
+ elog ' FETCHCOMMAND="/usr/bin/snarf -b \${URI} \${DISTDIR}/\${FILE}"'
+ elog ' RESUMECOMMAND="/usr/bin/snarf -rb \${URI} \${DISTDIR}/\${FILE}"'
+}
diff --git a/net-misc/sobby/Manifest b/net-misc/sobby/Manifest
new file mode 100644
index 000000000000..eebb120e4bae
--- /dev/null
+++ b/net-misc/sobby/Manifest
@@ -0,0 +1 @@
+DIST sobby-0.4.8.tar.gz 134766 SHA256 a711762c0722e9e7e01934c115dbffc7a233c033d66dbc5d58025af438516f48 SHA512 b946fc5c15257f74213fd6418933f8f4970ca58213a4c5bb33e1110f85964ce137eb5a9fdd0a601d8838310315241b9c29065493f4c9b33a8dbe09e77cc25492 WHIRLPOOL b2f6fd56725e6ef97df28b36090e63019b262fdd96e3d4ac04c05d2e41adc0e637f528cafec5c6f90344d67b5a92e84a2f043cba36e7532812fcf87c26099561
diff --git a/net-misc/sobby/files/sobby-conf-0.4.7 b/net-misc/sobby/files/sobby-conf-0.4.7
new file mode 100644
index 000000000000..b60192c99616
--- /dev/null
+++ b/net-misc/sobby/files/sobby-conf-0.4.7
@@ -0,0 +1,7 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SOBBY_OPTS="-c /etc/sobby/sobby.xml"
+SOBBY_USER="sobby"
+SOBBY_GROUP="sobby"
diff --git a/net-misc/sobby/files/sobby-init-0.4.7 b/net-misc/sobby/files/sobby-init-0.4.7
new file mode 100755
index 000000000000..a5ab6eecb0e6
--- /dev/null
+++ b/net-misc/sobby/files/sobby-init-0.4.7
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use avahi
+}
+
+start() {
+ ebegin "Starting obby dedicated server"
+ start-stop-daemon -b --quiet --start --make-pidfile \
+ --pidfile /var/run/sobby.pid -u ${SOBBY_USER} -g ${SOBBY_GROUP} \
+ --exec /usr/bin/sobby -- ${SOBBY_OPTS}
+ eend $? "Failed to start sobby"
+}
+
+stop() {
+ ebegin "Stopping obby dedicated server"
+ start-stop-daemon --stop --quiet --pidfile /var/run/sobby.pid
+ eend $? "Failed to stop sobby"
+}
diff --git a/net-misc/sobby/files/sobby.xml b/net-misc/sobby/files/sobby.xml
new file mode 100644
index 000000000000..b61a89f211e5
--- /dev/null
+++ b/net-misc/sobby/files/sobby.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sobby_config>
+ <settings>
+ <autosave_directory>/var/lib/sobby</autosave_directory>
+ <autosave_file>autosave.obby</autosave_file>
+ <autosave_interval>0</autosave_interval>
+ <command_directory></command_directory>
+ <name>Standalone obby server</name>
+ <password>secret</password>
+ <port>6522</port>
+ <post_save_hook></post_save_hook>
+ <session></session>
+ </settings>
+</sobby_config>
diff --git a/net-misc/sobby/metadata.xml b/net-misc/sobby/metadata.xml
new file mode 100644
index 000000000000..46ff3c52314f
--- /dev/null
+++ b/net-misc/sobby/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>dev-zero@gentoo.org</email>
+ <name>Tiziano Müller</name>
+ </maintainer>
+ <longdescription>Stand alone server for the obby colaborative editor</longdescription>
+</pkgmetadata>
diff --git a/net-misc/sobby/sobby-0.4.8.ebuild b/net-misc/sobby/sobby-0.4.8.ebuild
new file mode 100644
index 000000000000..f8bf7b87526f
--- /dev/null
+++ b/net-misc/sobby/sobby-0.4.8.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils user
+
+DESCRIPTION="Standalone Obby server"
+HOMEPAGE="http://gobby.0x539.de/"
+SRC_URI="http://releases.0x539.de/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc x86"
+IUSE="avahi"
+
+RDEPEND=">=dev-cpp/glibmm-2.6
+ >=dev-libs/libsigc++-2.0
+ >=dev-libs/gmp-4.1.4
+ >=dev-cpp/libxmlpp-2.6
+ >=net-libs/net6-1.3.12
+ >=net-libs/obby-0.4.6[avahi=]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+pkg_setup() {
+ enewgroup sobby
+ enewuser sobby -1 -1 /var/lib/sobby sobby
+}
+
+src_configure() {
+ econf $(use_enable avahi zeroconf)
+}
+
+src_install() {
+ default
+
+ newconfd "${FILESDIR}/${PN}-conf-0.4.7" sobby
+ newinitd "${FILESDIR}/${PN}-init-0.4.7" sobby
+
+ insinto /etc/sobby
+ doins "${FILESDIR}/sobby.xml"
+
+ keepdir /var/lib/sobby
+
+ fperms -R 0700 /var/lib/sobby
+ fperms -R 0700 /etc/sobby
+
+ fowners sobby:sobby /var/lib/sobby
+ fowners -R sobby:sobby /etc/sobby
+}
+
+pkg_postinst() {
+ elog "To start sobby, you can use the init script:"
+ elog " /etc/init.d/sobby start"
+ elog ""
+ elog "Please check the configuration in /etc/sobby/sobby.xml"
+ elog "before you start sobby"
+}
diff --git a/net-misc/socat/Manifest b/net-misc/socat/Manifest
new file mode 100644
index 000000000000..ea769eeaa7ff
--- /dev/null
+++ b/net-misc/socat/Manifest
@@ -0,0 +1,2 @@
+DIST socat-1.7.3.0.tar.bz2 474633 SHA256 0767e850c0329b9fdf711c6cd468565cbbb28786ba1a8a1cbd5531d4016b3e04 SHA512 e567efd6cd31a517ffb1622983640396c6c1db93e8cc4be01b6047ac00b2fbd8474ffb9f96d2af33d24939cddb36ee4b71deb87a5a0101b1f1fb959fa436baad WHIRLPOOL 0ea897879e4d21d678e87c03d11c084a418b5ce179021f0f175db2f5877f250b6d56e42e38f6b9dbcdff7ce0d81970573d41b30a77b1768e659785792e5ae03f
+DIST socat-2.0.0-b8.tar.bz2 502766 SHA256 c804579db998fb697431c82829ae03e6a50f342bd41b8810332a5d0661d893ea SHA512 f996e39d20363b307ab5d85116553e3face1911ed4ec33c28c204abcf1b5fe7083487e4d4d742da5b3ac9996ae7745f047eb2e7f430cd56938864cce43b3cf97 WHIRLPOOL 1fa968eff762af8d443a8bcd2986c8189618dc3d059285b736627b59aa5e78f8328d9482ff26e7aacad6c547a28532d217040170093fa9707cbdaf4906ca3282
diff --git a/net-misc/socat/files/socat-1.7.2.1-long-long.patch b/net-misc/socat/files/socat-1.7.2.1-long-long.patch
new file mode 100644
index 000000000000..45a73dccb2c5
--- /dev/null
+++ b/net-misc/socat/files/socat-1.7.2.1-long-long.patch
@@ -0,0 +1,64 @@
+https://bugs.gentoo.org/436164
+
+From cbb59d88e2d83ded78bd4b85a0c1a4f37be60589 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Thu, 25 Oct 2012 22:34:12 -0400
+Subject: [PATCH] support long long sizes with more basic types
+
+Some newer ABIs (like x32) use 64bit sizes with basic types.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ compat.h | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/compat.h b/compat.h
+index d581fad..ecff2ee 100644
+--- a/compat.h
++++ b/compat.h
+@@ -232,6 +232,10 @@
+ #define F_time "%ld"
+ # elif HAVE_BASIC_TIME_T==6
+ #define F_time "%lu"
++# elif HAVE_BASIC_TIME_T==7
++#define F_time "%Ld"
++# elif HAVE_BASIC_TIME_T==8
++#define F_time "%Lu"
+ # else
+ #error "HAVE_BASIC_TIME_T is out of range:" HAVE_BASIC_TIME_T
+ # endif
+@@ -256,6 +260,10 @@
+ #define F_socklen "%ld"
+ # elif HAVE_BASIC_SOCKLEN_T==6
+ #define F_socklen "%lu"
++# elif HAVE_BASIC_SOCKLEN_T==7
++#define F_socklen "%Ld"
++# elif HAVE_BASIC_SOCKLEN_T==8
++#define F_socklen "%Lu"
+ # else
+ #error "HAVE_BASIC_SOCKLEN_T is out of range:" HAVE_BASIC_SOCKLEN_T
+ # endif
+@@ -404,6 +412,10 @@
+ #define F_st_nlink "%ld"
+ # elif HAVE_TYPEOF_ST_NLINK==6
+ #define F_st_nlink "%lu"
++# elif HAVE_TYPEOF_ST_NLINK==7
++#define F_st_nlink "%Ld"
++# elif HAVE_TYPEOF_ST_NLINK==8
++#define F_st_nlink "%Lu"
+ # else
+ #error "HAVE_TYPEOF_ST_NLINK is out of range:" HAVE_TYPEOF_ST_NLINK
+ # endif
+@@ -481,6 +493,10 @@
+ #define F_st_blksize "%ld"
+ # elif HAVE_TYPEOF_ST_BLKSIZE==6
+ #define F_st_blksize "%lu"
++# elif HAVE_TYPEOF_ST_BLKSIZE==7
++#define F_st_blksize "%Ld"
++# elif HAVE_TYPEOF_ST_BLKSIZE==8
++#define F_st_blksize "%Lu"
+ # else
+ #error "HAVE_TYPEOF_ST_BLKSIZE is out of range:" HAVE_TYPEOF_ST_BLKSIZE
+ # endif
+--
+1.7.12
diff --git a/net-misc/socat/files/socat-1.7.2.4-linux-3.17.patch b/net-misc/socat/files/socat-1.7.2.4-linux-3.17.patch
new file mode 100644
index 000000000000..6bf990a9b610
--- /dev/null
+++ b/net-misc/socat/files/socat-1.7.2.4-linux-3.17.patch
@@ -0,0 +1,14 @@
+--- a/configure.in
++++ b/configure.in
+@@ -80,7 +80,10 @@
+ AC_CHECK_HEADERS(termios.h linux/if_tun.h)
+ AC_CHECK_HEADERS(net/if_dl.h)
+ AC_CHECK_HEADERS(linux/types.h)
+-AC_CHECK_HEADER(linux/errqueue.h, AC_DEFINE(HAVE_LINUX_ERRQUEUE_H), [], [#include <linux/types.h>])
++AC_CHECK_HEADER(linux/errqueue.h, AC_DEFINE(HAVE_LINUX_ERRQUEUE_H), [], [AC_INCLUDES_DEFAULT
++ #if HAVE_LINUX_TYPES_H
++ #include <linux/types.h>
++ #endif])
+ AC_CHECK_HEADERS(sys/utsname.h sys/select.h sys/file.h)
+ AC_CHECK_HEADERS(util.h bsd/libutil.h libutil.h sys/stropts.h regex.h)
+ AC_CHECK_HEADERS(linux/fs.h linux/ext2_fs.h)
diff --git a/net-misc/socat/files/socat-1.7.3.0-filan-build.patch b/net-misc/socat/files/socat-1.7.3.0-filan-build.patch
new file mode 100644
index 000000000000..861c673ad91d
--- /dev/null
+++ b/net-misc/socat/files/socat-1.7.3.0-filan-build.patch
@@ -0,0 +1,30 @@
+From aae2ea107b543fa908956f2fdcdf6db684e4a2e6 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@chromium.org>
+Date: Fri, 24 Apr 2015 23:06:37 -0400
+Subject: [PATCH] filan: fix depend list
+
+The link line contains more objects than the depend line; sync them like
+procan does. Otherwise, parallel builds randomly fail.
+---
+ Makefile.in | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index f2a6edb..0c00459 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -118,8 +118,9 @@ PROCAN_OBJS=procan_main.o procan.o procan-cdefs.o hostan.o error.o sycls.o sysut
+ procan: $(PROCAN_OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(PROCAN_OBJS) $(CLIBS)
+
+-filan: filan_main.o filan.o fdname.o error.o sycls.o sysutils.o utils.o
+- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ filan_main.o filan.o fdname.o error.o sycls.o sysutils.o utils.o vsnprintf_r.o snprinterr.o $(CLIBS)
++FILAN_OBJS=filan_main.o filan.o fdname.o error.o sycls.o sysutils.o utils.o vsnprintf_r.o snprinterr.o
++filan: $(FILAN_OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(FILAN_OBJS) $(CLIBS)
+
+ libxio.a: $(XIOOBJS) $(UTLOBJS)
+ $(AR) r $@ $(XIOOBJS) $(UTLOBJS)
+--
+2.3.5
+
diff --git a/net-misc/socat/metadata.xml b/net-misc/socat/metadata.xml
new file mode 100644
index 000000000000..78692635ad22
--- /dev/null
+++ b/net-misc/socat/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>netmon</herd>
+</pkgmetadata>
diff --git a/net-misc/socat/socat-1.7.3.0.ebuild b/net-misc/socat/socat-1.7.3.0.ebuild
new file mode 100644
index 000000000000..9ae11f6b0a65
--- /dev/null
+++ b/net-misc/socat/socat-1.7.3.0.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 eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Multipurpose relay (SOcket CAT)"
+HOMEPAGE="http://www.dest-unreach.org/socat/"
+MY_P=${P/_beta/-b}
+S="${WORKDIR}/${MY_P}"
+SRC_URI="http://www.dest-unreach.org/socat/download/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="ssl readline ipv6 tcpd"
+
+DEPEND="
+ ssl? ( >=dev-libs/openssl-0.9.6 )
+ readline? ( >=sys-libs/readline-4.1 )
+ tcpd? ( sys-apps/tcp-wrappers )
+"
+RDEPEND="${DEPEND}"
+
+RESTRICT="test"
+
+DOCS=(
+ BUGREPORTS CHANGES DEVELOPMENT EXAMPLES FAQ FILES PORTING README SECURITY
+)
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-filan-build.patch
+}
+
+src_configure() {
+ filter-flags '-Wno-error*' #293324
+ tc-export AR
+ econf \
+ $(use_enable ssl openssl) \
+ $(use_enable readline) \
+ $(use_enable ipv6 ip6) \
+ $(use_enable tcpd libwrap)
+}
+
+src_install() {
+ default
+
+ dohtml doc/*.html doc/*.css
+}
diff --git a/net-misc/socat/socat-2.0.0_beta8.ebuild b/net-misc/socat/socat-2.0.0_beta8.ebuild
new file mode 100644
index 000000000000..eb6735580dcb
--- /dev/null
+++ b/net-misc/socat/socat-2.0.0_beta8.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Multipurpose relay (SOcket CAT)"
+HOMEPAGE="http://www.dest-unreach.org/socat/"
+MY_P=${P/_beta/-b}
+S="${WORKDIR}/${MY_P}"
+SRC_URI="http://www.dest-unreach.org/socat/download/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="ssl readline ipv6 tcpd"
+
+DEPEND="
+ ssl? ( >=dev-libs/openssl-0.9.6 )
+ readline? ( >=sys-libs/readline-4.1 )
+ tcpd? ( sys-apps/tcp-wrappers )
+"
+RDEPEND="${DEPEND}"
+
+RESTRICT="test"
+
+DOCS=(
+ BUGREPORTS CHANGES DEVELOPMENT EXAMPLES FAQ FILES PORTING README SECURITY
+)
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.7.3.0-filan-build.patch
+ touch doc/${PN}.1 || die
+}
+
+src_configure() {
+ filter-flags -Wall '-Wno-error*' #293324
+ tc-export AR
+ econf \
+ $(use_enable ssl openssl) \
+ $(use_enable readline) \
+ $(use_enable ipv6 ip6) \
+ $(use_enable tcpd libwrap)
+}
+
+src_install() {
+ default
+
+ dohtml doc/*.html doc/*.css
+}
diff --git a/net-misc/socat/socat-9999.ebuild b/net-misc/socat/socat-9999.ebuild
new file mode 100644
index 000000000000..e931a19da141
--- /dev/null
+++ b/net-misc/socat/socat-9999.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils flag-o-matic git-r3 toolchain-funcs
+
+DESCRIPTION="Multipurpose relay (SOcket CAT)"
+HOMEPAGE="http://www.dest-unreach.org/socat/"
+MY_P=${P/_beta/-b}
+S="${WORKDIR}/${MY_P}"
+EGIT_REPO_URI="git://repo.or.cz/${PN}.git"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="ssl readline ipv6 tcpd"
+
+RDEPEND="
+ ssl? ( >=dev-libs/openssl-0.9.6 )
+ readline? ( >=sys-libs/readline-4.1 )
+ tcpd? ( sys-apps/tcp-wrappers )
+"
+DEPEND="
+ ${RDEPEND}
+ app-text/yodl
+"
+
+RESTRICT="test"
+
+DOCS=(
+ BUGREPORTS CHANGES DEVELOPMENT EXAMPLES FAQ FILES PORTING README SECURITY
+)
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ filter-flags '-Wno-error*' #293324
+ tc-export AR
+ econf \
+ $(use_enable ssl openssl) \
+ $(use_enable readline) \
+ $(use_enable ipv6 ip6) \
+ $(use_enable tcpd libwrap)
+}
+
+src_install() {
+ default
+
+ dohtml doc/*.html doc/*.css
+}
diff --git a/net-misc/sock/Manifest b/net-misc/sock/Manifest
new file mode 100644
index 000000000000..9ae8b87eea34
--- /dev/null
+++ b/net-misc/sock/Manifest
@@ -0,0 +1 @@
+DIST sock-1.1.tar.gz 21951 RMD160 ec21287238cb581951391bdc54f4896757ea19e2 SHA1 fc83a16e7ddc2521db6597ac0572cd4dd23ff719 SHA256 92292d80317f1cf2a6697e468352f34fa4d8fad7be2e5db51d5035140e227d85
diff --git a/net-misc/sock/metadata.xml b/net-misc/sock/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/net-misc/sock/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/sock/sock-1.1.ebuild b/net-misc/sock/sock-1.1.ebuild
new file mode 100644
index 000000000000..fddc382dbeca
--- /dev/null
+++ b/net-misc/sock/sock-1.1.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="A shell interface to network sockets"
+SRC_URI="ftp://atrey.karlin.mff.cuni.cz/pub/local/mj/net/${P}.tar.gz"
+HOMEPAGE="http://atrey.karlin.mff.cuni.cz/~mj/linux.shtml"
+KEYWORDS="amd64 sparc x86"
+IUSE=""
+LICENSE="GPL-2"
+SLOT="0"
+
+DEPEND=""
+RDEPEND=""
+
+src_install () {
+ dobin sock
+ doman sock.1
+ dodoc README ChangeLog
+}
diff --git a/net-misc/socket/Manifest b/net-misc/socket/Manifest
new file mode 100644
index 000000000000..8126e5bc5dca
--- /dev/null
+++ b/net-misc/socket/Manifest
@@ -0,0 +1 @@
+DIST socket-1.5.tar.gz 22002 SHA256 fa36abdc29e1b8a48156061f8a16779ee3446770197071802efbdb01051024a7 SHA512 9503139087a65a63462571788b6710c486c7a00532bc027b87d9f4bd0c92a7e90befe8a3ec86c622bc02ff51beaec05cacfcaffb06d7c983a73c38a18bca315d WHIRLPOOL a220486af2c6cb9c95c6518c630ebc2fc11f6d250e5e02d532d50744eb29271318d3d0c2bf8bc09fc828071aca989cdad78cf18854735eaec874346a5c07ba44
diff --git a/net-misc/socket/files/socket-1.5-makefile.patch b/net-misc/socket/files/socket-1.5-makefile.patch
new file mode 100644
index 000000000000..7dc3e7c1f5c3
--- /dev/null
+++ b/net-misc/socket/files/socket-1.5-makefile.patch
@@ -0,0 +1,14 @@
+--- Makefile.orig 2008-06-27 13:57:47.000000000 +0400
++++ Makefile 2013-02-05 00:42:25.241748516 +0400
+@@ -38,9 +38,8 @@
+ INSTALLMANPATH = $(INSTALLBASE)/man
+ INSTALLMANMODE = 444
+ GCCOPTS = -Wall -Wstrict-prototypes
+-CC = cc
+-CFLAGS = $(SWITCHES) -g
+-LDFLAGS = $(SWITCHES) # -s
++CC ?= cc
++CFLAGS += $(SWITCHES)
+ # To use an architecture-specific compile directory (inside of the
+ # source directory):
+ ARCHDIR = .
diff --git a/net-misc/socket/metadata.xml b/net-misc/socket/metadata.xml
new file mode 100644
index 000000000000..b6b8956cde34
--- /dev/null
+++ b/net-misc/socket/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>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/socket/socket-1.5.ebuild b/net-misc/socket/socket-1.5.ebuild
new file mode 100644
index 000000000000..46528c1242f1
--- /dev/null
+++ b/net-misc/socket/socket-1.5.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base toolchain-funcs
+
+DESCRIPTION="A shell-level interface to TCP sockets"
+HOMEPAGE="http://www.jnickelsen.de/socket/"
+SRC_URI="http://www.jnickelsen.de/${PN}/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+
+IUSE="examples"
+
+PATCHES=( "${FILESDIR}/${P}-makefile.patch" )
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dobin socket
+ doman socket.1
+ dodoc BLURB CHANGES README
+ if use examples; then
+ docinto examples
+ dodoc scripts/*
+ fi
+}
diff --git a/net-misc/sparkleshare/Manifest b/net-misc/sparkleshare/Manifest
new file mode 100644
index 000000000000..f7a395c13882
--- /dev/null
+++ b/net-misc/sparkleshare/Manifest
@@ -0,0 +1 @@
+DIST sparkleshare-1.1.0.tar.gz 662567 SHA256 766d264d242e0e2af4255fe75e6918f66b0fa874afab4097010f0d8b55902137 SHA512 9ff8f199d3117301c2fbc10084a3a100bec7124f97374a6608c92de02770b0e9c9ffd4c19a18f688a37ca775fedac7d683dd40e8737c6d651afcb5808ac6e29e WHIRLPOOL 570d9eef95616f5cf6ff2dbfdba941a3eb734699812a20ee84fd97fbe7c955111753c4a105e7f351406e5fded3ed06b22bd9855e3b707800a4a14026e51b0fab
diff --git a/net-misc/sparkleshare/metadata.xml b/net-misc/sparkleshare/metadata.xml
new file mode 100644
index 000000000000..da6fd63d0085
--- /dev/null
+++ b/net-misc/sparkleshare/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>gnome</herd>
+</pkgmetadata>
diff --git a/net-misc/sparkleshare/sparkleshare-1.1.0.ebuild b/net-misc/sparkleshare/sparkleshare-1.1.0.ebuild
new file mode 100644
index 000000000000..58d15ef61435
--- /dev/null
+++ b/net-misc/sparkleshare/sparkleshare-1.1.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG="no" # --enable-debug does not do anything
+
+inherit gnome2 mono-env
+
+DESCRIPTION="Git-based collaboration and file sharing tool"
+HOMEPAGE="http://www.sparkleshare.org"
+SRC_URI="https://bitbucket.org/hbons/sparkleshare/downloads/sparkleshare-linux-${PV}-tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+KEYWORDS="amd64 x86"
+SLOT="0"
+IUSE="" # ayatana
+
+COMMON_DEPEND=">=dev-lang/mono-2.8
+ >=dev-dotnet/glib-sharp-2.12.7
+ >=dev-dotnet/gtk-sharp-2.12.10
+ dev-dotnet/notify-sharp
+ dev-dotnet/webkit-sharp
+"
+RDEPEND="${COMMON_DEPEND}
+ >=dev-vcs/git-1.7.12
+ gnome-base/gvfs
+ net-misc/curl[ssl]
+ net-misc/openssh
+"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+"
+
+src_configure() {
+ DOCS="News.txt legal/Authors.txt README.md"
+ gnome2_src_configure --disable-appindicator
+ # $(use_enable ayatana appindicator)
+ # requires >=appindicator-sharp-0.0.7
+}
diff --git a/net-misc/spice-gtk/Manifest b/net-misc/spice-gtk/Manifest
new file mode 100644
index 000000000000..a20f392993fe
--- /dev/null
+++ b/net-misc/spice-gtk/Manifest
@@ -0,0 +1,4 @@
+DIST spice-gtk-0.20.tar.bz2 1210694 SHA256 b1355823b0ceb2e118c1f9a9a602ccab78e1e2edf2d93f71fa42d3bc85ca75df SHA512 db07d05d93bf5639c193f374b6eb3fe9f6bb198f0146e64f8e6e6c03d12e931c1f18a353aed123fe28535a95eb8448ef8a8babc66bdd283f951b8433839d6b9e WHIRLPOOL 82ea2e7a1ebec0155c6aadd03143456498db332e64f4a2c5cb15beb47e0371790ee5fc29b7ff1b40dba34c63dd021cecf6f27cd1aaa1c58c465f9bb2d22ca50e
+DIST spice-gtk-0.21.tar.bz2 1191082 SHA256 73d418ffa97d6cf5edb1920d46f1d51fc40d14a8d4edfab3be6041e25062c564 SHA512 970c5de33c5f2117c4c4c0864da4d3796226771be54fdcc5393d17eefecb297cdc0767003699afa03db7e72a9810de4d157217e40de62013e410b90c8c759151 WHIRLPOOL caabfcc4654077dce70d9f82d7ccd77bd390d365c23f6c82c906b5490c1dd135c82c48e2aab486b699470829b24b3253dcb39c22921c13132dc16a03369d62f9
+DIST spice-gtk-0.25.tar.bz2 1242457 SHA256 0730c6a80ad9f5012f65927d443377019f300573f7ccc93db84eadec462ad087 SHA512 5d44ffa784af3c94492e80129b7350065f4d108c8e3bc42be673fc1f42b47023757d0b8131d047432b7c59c03662db0652759cb4bdf677062a6d1e0508d02bd9 WHIRLPOOL 63002ec6d309c949d296e70ff5e22a7cf9e8300e7001e37a4a5b2de6ccb833915d884798347e04a06c60ea4508f85f265b3d4b4dc1c00a3a8e036ddf21e003f8
+DIST spice-gtk-0.28.tar.bz2 1274095 SHA256 15aeeb63422cb3bfaa2edbf4602ed2025baa4455abfd1677f631245a0d0f81c4 SHA512 a183ab3d9a463de13acc3333d6927fbaba00f184b40f4346d1fd4de94a3394a6cdfeb51b02666be9154d9f65184d1499560f2aa5a387a526915671e951e1493f WHIRLPOOL 96e25ec39b060136b9e6b1cbb5c38c06f319aeb582742acc2741abb29ea45853fe2fe5f2c2da5a0c61176bdd68e37a7be1f64d0b02b1e8db6754514a2a20bfe5
diff --git a/net-misc/spice-gtk/files/0.12-parallel-install.patch b/net-misc/spice-gtk/files/0.12-parallel-install.patch
new file mode 100644
index 000000000000..04a22bdf066d
--- /dev/null
+++ b/net-misc/spice-gtk/files/0.12-parallel-install.patch
@@ -0,0 +1,16 @@
+diff --git a/gtk/Makefile.am b/gtk/Makefile.am
+index 7b29e61..86b3939 100644
+--- a/gtk/Makefile.am
++++ b/gtk/Makefile.am
+@@ -505,6 +505,11 @@ vncdisplaykeymap_win322xtkbd.c:
+ if WITH_PYTHON
+ pyexec_LTLIBRARIES = SpiceClientGtk.la
+
++# workaround for broken parallel install support in automake with LTLIBRARIES
++# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7328
++install_pyexecLTLIBRARIES = install-pyexecLTLIBRARIES
++$(install_pyexecLTLIBRARIES): install-libLTLIBRARIES
++
+ SpiceClientGtk_la_LIBADD = libspice-client-gtk-2.0.la libspice-client-glib-2.0.la $(PYGTK_LIBS)
+ SpiceClientGtk_la_CFLAGS = $(GTK_CFLAGS) $(PYTHON_INCLUDES) $(PYGTK_CFLAGS) $(WARN_PYFLAGS)
+ SpiceClientGtk_la_LDFLAGS = -module -avoid-version -fPIC
diff --git a/net-misc/spice-gtk/files/0.14-Deal-with-libusbredirparser.pc-rename-to-libusbredir.patch b/net-misc/spice-gtk/files/0.14-Deal-with-libusbredirparser.pc-rename-to-libusbredir.patch
new file mode 100644
index 000000000000..046794531803
--- /dev/null
+++ b/net-misc/spice-gtk/files/0.14-Deal-with-libusbredirparser.pc-rename-to-libusbredir.patch
@@ -0,0 +1,57 @@
+From a8a6ac1d0f4893860efad48833ce6168f684054a Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Tue, 25 Sep 2012 12:59:13 +0200
+Subject: [PATCH 01/21] Deal with libusbredirparser.pc rename to
+ libusbredirparser-0.5.pc
+
+The usbredir 0.5 release introduced the new API for 64 bit packet ids, but
+it kept the libusbredirparser.pc name as is, meaning that older versions of
+qemu will still have their pkg-config check for usbredirparser fulfilled,
+and build with the usb-redir device. Due to the API change there will be
+some compiler warnings, but the build will succeed, however the usb-redir
+device will be broken on 32 bit machines.
+
+To solve this, the usbredir-0.5.2 release renames the libusbredirparser.pc
+file to libusbredirparser-0.5.pc, so that it will no longer fulfill the
+pkg-config check of the qemu-1.2 and older releases, stopping the (silent)
+breakage.
+
+spice-gtk does not use the changed parts of the API, but does
+use libusbredirparser for the usbredirfilter* functions. This patch adapts
+spice-gtk's configure to accept both the libusbredirparser-0.5 and the
+libusbredirparser pkg-config names.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+---
+ configure.ac | 15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c7367cc..7c59575 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -349,10 +349,17 @@ AC_ARG_ENABLE([usbredir],
+ if test "x$enable_usbredir" = "xno"; then
+ have_usbredir="no"
+ else
+- PKG_CHECK_MODULES([USBREDIR],
+- [libusb-1.0 >= 1.0.9 libusbredirhost >= 0.4.2 libusbredirparser >= 0.4],
+- [have_usbredir=yes],
+- [have_usbredir=no])
++ if ${PKG_CONFIG} libusbredirparser-0.5; then
++ PKG_CHECK_MODULES([USBREDIR],
++ [libusb-1.0 >= 1.0.9 libusbredirhost libusbredirparser-0.5],
++ [have_usbredir=yes],
++ [have_usbredir=no])
++ else
++ PKG_CHECK_MODULES([USBREDIR],
++ [libusb-1.0 >= 1.0.9 libusbredirhost >= 0.4.2 libusbredirparser >= 0.4],
++ [have_usbredir=yes],
++ [have_usbredir=no])
++ fi
+ if test "x$have_usbredir" = "xno" && test "x$enable_usbredir" = "xyes"; then
+ AC_MSG_ERROR([usbredir support explicitly requested, but some required packages are not available])
+ fi
+--
+1.7.12.1
+
diff --git a/net-misc/spice-gtk/files/0001-build-sys-fix-out-of-tree-build-with-vala.patch b/net-misc/spice-gtk/files/0001-build-sys-fix-out-of-tree-build-with-vala.patch
new file mode 100644
index 000000000000..92be8ccc5aa4
--- /dev/null
+++ b/net-misc/spice-gtk/files/0001-build-sys-fix-out-of-tree-build-with-vala.patch
@@ -0,0 +1,35 @@
+From 6d454e4100a01499c13d55057fdd9307437a5f87 Mon Sep 17 00:00:00 2001
+From: Andrew Hughes <gnu.andrew@redhat.com>
+Date: Wed, 16 Jan 2013 22:47:18 +0000
+Subject: build-sys: fix out-of-tree build with vala
+
+---
+diff --git a/gtk/controller/Makefile.am b/gtk/controller/Makefile.am
+index f2abf93..00552e8 100644
+--- a/gtk/controller/Makefile.am
++++ b/gtk/controller/Makefile.am
+@@ -76,14 +76,16 @@ spice_controller_dump_SOURCES = dump.c
+ spice_controller_dump_LDADD = libspice-controller.la
+
+ controller.vala.stamp: $(libspice_controller_la_VALASOURCES) custom.vapi
+- @if test -z "$(VALAC)"; then \
+- echo "" ; \
+- echo " *** Error: missing valac!" ; \
++ @if test -z "$(VALAC)"; then \
++ echo "" ; \
++ echo " *** Error: missing valac!" ; \
+ echo " *** You must run autogen.sh or configure --enable-vala" ; \
+- echo "" ; \
+- exit 1 ; \
++ echo "" ; \
++ exit 1 ; \
+ fi
+- $(VALA_V)$(VALAC) $(VALAFLAGS) $(AM_VALAFLAGS) $(libspice_controller_la_VALASOURCES) -H spice-controller.h
++ $(VALA_V)$(VALAC) $(VALAFLAGS) $(AM_VALAFLAGS) \
++ $(addprefix $(srcdir)/,$(libspice_controller_la_VALASOURCES)) \
++ -H spice-controller.h
+ @touch $@
+
+ $(libspice_controller_la_BUILT_SOURCES): controller.vala.stamp
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/net-misc/spice-gtk/files/spice-gtk-0.20-add-spice-channel-string-to-type.patch b/net-misc/spice-gtk/files/spice-gtk-0.20-add-spice-channel-string-to-type.patch
new file mode 100644
index 000000000000..3375d801ab2d
--- /dev/null
+++ b/net-misc/spice-gtk/files/spice-gtk-0.20-add-spice-channel-string-to-type.patch
@@ -0,0 +1,84 @@
+From b85ca792af72d5f1e10aa6af9515eb96a044fc5c Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Wed, 26 Jun 2013 15:39:39 +0000
+Subject: Add spice_channel_string_to_type to map files
+
+And document both spice_channel_string_to_type and
+spice_channel_type_to_string.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+---
+diff --git a/doc/reference/spice-gtk-sections.txt b/doc/reference/spice-gtk-sections.txt
+index e1e2833..8d61aa9 100644
+--- a/doc/reference/spice-gtk-sections.txt
++++ b/doc/reference/spice-gtk-sections.txt
+@@ -98,6 +98,7 @@ spice_channel_disconnect
+ spice_channel_test_capability
+ spice_channel_test_common_capability
+ spice_channel_type_to_string
++spice_channel_string_to_type
+ spice_channel_set_capability
+ spice_channel_flush_async
+ spice_channel_flush_finish
+diff --git a/gtk/map-file b/gtk/map-file
+index a0b7330..a69eb40 100644
+--- a/gtk/map-file
++++ b/gtk/map-file
+@@ -11,6 +11,7 @@ spice_channel_get_type;
+ spice_channel_new;
+ spice_channel_open_fd;
+ spice_channel_set_capability;
++spice_channel_string_to_type;
+ spice_channel_test_capability;
+ spice_channel_test_common_capability;
+ spice_channel_type_to_string;
+diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
+index 0a32d6c..093b292 100644
+--- a/gtk/spice-channel.c
++++ b/gtk/spice-channel.c
+@@ -1884,6 +1884,15 @@ static const char *to_string[] = {
+ [ SPICE_CHANNEL_PORT ] = "port",
+ };
+
++/**
++ * spice_channel_type_to_string:
++ * @type: a channel-type property value
++ *
++ * Convert a channel-type property value to a string.
++ *
++ * Returns: string representation of @type.
++ * Since: 0.20
++ **/
+ const gchar* spice_channel_type_to_string(gint type)
+ {
+ const char *str = NULL;
+@@ -1895,6 +1904,15 @@ const gchar* spice_channel_type_to_string(gint type)
+ return str ? str : "unknown channel type";
+ }
+
++/**
++ * spice_channel_string_to_type:
++ * @str: a string representation of the channel-type property
++ *
++ * Convert a channel-type property value to a string.
++ *
++ * Returns: the channel-type property value for a @str channel
++ * Since: 0.21
++ **/
+ gint spice_channel_string_to_type(const gchar *str)
+ {
+ int i;
+diff --git a/gtk/spice-glib-sym-file b/gtk/spice-glib-sym-file
+index 2b172d0..8540307 100644
+--- a/gtk/spice-glib-sym-file
++++ b/gtk/spice-glib-sym-file
+@@ -14,6 +14,7 @@ spice_channel_set_capability
+ spice_channel_test_capability
+ spice_channel_test_common_capability
+ spice_channel_type_to_string
++spice_channel_string_to_type
+ spice_client_error_quark
+ spice_cursor_channel_get_type
+ spice_display_channel_get_type
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/net-misc/spice-gtk/files/spice-gtk-0.21-fix-g-clear-pointer-on-old-glib.patch b/net-misc/spice-gtk/files/spice-gtk-0.21-fix-g-clear-pointer-on-old-glib.patch
new file mode 100644
index 000000000000..83e51db67d8b
--- /dev/null
+++ b/net-misc/spice-gtk/files/spice-gtk-0.21-fix-g-clear-pointer-on-old-glib.patch
@@ -0,0 +1,22 @@
+From f31bc2a9a6700bebc258130e802f40180af77d8e Mon Sep 17 00:00:00 2001
+From: Marc-André Lureau <marcandre.lureau@redhat.com>
+Date: Fri, 20 Sep 2013 15:54:58 +0000
+Subject: build-sys: fix g_clear_pointer usage on old glib
+
+As pointed out and verified on the ML after 0.21 release by Klaus
+Hochlehnert.
+---
+diff --git a/gtk/channel-cursor.c b/gtk/channel-cursor.c
+index 0443b9f..bbfb3c9 100644
+--- a/gtk/channel-cursor.c
++++ b/gtk/channel-cursor.c
+@@ -15,6 +15,7 @@
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
++#include "glib-compat.h"
+ #include "spice-client.h"
+ #include "spice-common.h"
+
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/net-misc/spice-gtk/files/spice-gtk-0.25-Do-not-depend-on-libsoup-directly.patch b/net-misc/spice-gtk/files/spice-gtk-0.25-Do-not-depend-on-libsoup-directly.patch
new file mode 100644
index 000000000000..fe24734ed0d5
--- /dev/null
+++ b/net-misc/spice-gtk/files/spice-gtk-0.25-Do-not-depend-on-libsoup-directly.patch
@@ -0,0 +1,29 @@
+From 1dcf7acb4288a27f125458bfa86cf614437657d5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tiziano.mueller@stepping-stone.ch>
+Date: Tue, 20 May 2014 18:49:28 +0200
+Subject: [PATCH 2/2] Do not depend on libsoup directly
+
+The libsoup-dependency is not directly used but comes in as a dependency
+of phodav and phodav has libsoup correctly recorded in its pkg-config
+file.
+---
+ configure.ac | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 70ab75c..f47ee20 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -267,9 +267,6 @@ PKG_CHECK_MODULES(GTHREAD, gthread-2.0 > 2.0.0)
+ AC_SUBST(GTHREAD_CFLAGS)
+ AC_SUBST(GTHREAD_LIBS)
+
+-PKG_CHECK_MODULES(SOUP, libsoup-2.4)
+-AC_SUBST(SOUP_CFLAGS)
+-AC_SUBST(SOUP_LIBS)
+ AC_ARG_ENABLE([webdav],
+ AS_HELP_STRING([--enable-webdav=@<:@auto/yes/no@:>@],
+ [Enable webdav support @<:@default=auto@:>@]),
+--
+1.9.2
+
diff --git a/net-misc/spice-gtk/files/spice-gtk-0.25-Introduce-enable-disable-webdav-option.patch b/net-misc/spice-gtk/files/spice-gtk-0.25-Introduce-enable-disable-webdav-option.patch
new file mode 100644
index 000000000000..817a9b0a6d0a
--- /dev/null
+++ b/net-misc/spice-gtk/files/spice-gtk-0.25-Introduce-enable-disable-webdav-option.patch
@@ -0,0 +1,54 @@
+From f25626a68a2fb83b02ee7a13dd4887d1305bc068 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <tiziano.mueller@stepping-stone.ch>
+Date: Tue, 20 May 2014 18:48:05 +0200
+Subject: [PATCH 1/2] Introduce --enable/disable-webdav option
+
+This makes the phodav dependency configureable.
+And name it after the corresponding channel.
+---
+ configure.ac | 21 +++++++++++++++++----
+ 1 file changed, 17 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index d89bd6f..70ab75c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -270,10 +270,23 @@ AC_SUBST(GTHREAD_LIBS)
+ PKG_CHECK_MODULES(SOUP, libsoup-2.4)
+ AC_SUBST(SOUP_CFLAGS)
+ AC_SUBST(SOUP_LIBS)
++AC_ARG_ENABLE([webdav],
++ AS_HELP_STRING([--enable-webdav=@<:@auto/yes/no@:>@],
++ [Enable webdav support @<:@default=auto@:>@]),
++ [],
++ [enable_webdav="auto"])
++
++if test "x$enable_webdav" = "xno"; then
++ have_phodav="no"
++else
++ PKG_CHECK_MODULES(PHODAV, [libphodav-1.0], [have_phodav=yes], [have_phodav=no])
++ AC_SUBST(PHODAV_CFLAGS)
++ AC_SUBST(PHODAV_LIBS)
+
+-PKG_CHECK_MODULES(PHODAV, [libphodav-1.0], [have_phodav=yes], [have_phodav=no])
+-AC_SUBST(PHODAV_CFLAGS)
+-AC_SUBST(PHODAV_LIBS)
++ if test "x$have_phodav" = "xno" && test "x$enable_webdav" = "xyes"; then
++ AC_MSG_ERROR([webdav support explicitly requested, but some required packages are not available])
++ fi
++fi
+ AS_IF([test "x$have_phodav" = "xyes"],
+ AC_DEFINE(USE_PHODAV, [1], [Define if supporting phodav]))
+
+@@ -754,7 +767,7 @@ AC_MSG_NOTICE([
+ Smartcard support: ${have_smartcard}
+ USB redirection support: ${have_usbredir} ${with_usbredir_hotplug}
+ DBus: ${have_dbus}
+- PhoDAV: ${have_phodav}
++ WebDAV support: ${have_phodav}
+
+ Now type 'make' to build $PACKAGE
+
+--
+1.9.2
+
diff --git a/net-misc/spice-gtk/files/spice-gtk-0.25-missing_gio_libs.patch b/net-misc/spice-gtk/files/spice-gtk-0.25-missing_gio_libs.patch
new file mode 100644
index 000000000000..8429afd50609
--- /dev/null
+++ b/net-misc/spice-gtk/files/spice-gtk-0.25-missing_gio_libs.patch
@@ -0,0 +1,12 @@
+diff --git a/gtk/Makefile.am b/gtk/Makefile.am
+index 8da1a11..6332db9 100644
+--- a/gtk/Makefile.am
++++ b/gtk/Makefile.am
+@@ -189,6 +189,7 @@ libspice_client_glib_2_0_la_LIBADD = \
+ $(top_builddir)/spice-common/common/libspice-common-client.la \
+ $(GLIB2_LIBS) \
+ $(SOUP_LIBS) \
++ $(GIO_LIBS) \
+ $(GOBJECT2_LIBS) \
+ $(CELT051_LIBS) \
+ $(OPUS_LIBS) \
diff --git a/net-misc/spice-gtk/files/spice.protocol b/net-misc/spice-gtk/files/spice.protocol
new file mode 100644
index 000000000000..348247f8ca12
--- /dev/null
+++ b/net-misc/spice-gtk/files/spice.protocol
@@ -0,0 +1,12 @@
+[Protocol]
+exec=/usr/bin/spicy --uri="%u"
+protocol=spice
+input=none
+output=none
+helper=true
+listing=
+reading=false
+writing=false
+makedir=false
+deleting=false
+
diff --git a/net-misc/spice-gtk/files/spice.schemas b/net-misc/spice-gtk/files/spice.schemas
new file mode 100644
index 000000000000..43b12171c847
--- /dev/null
+++ b/net-misc/spice-gtk/files/spice.schemas
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<gconfschemafile>
+<schemalist>
+<schema>
+ <key>/schemas/desktop/gnome/url-handlers/spice/enabled</key>
+ <applyto>/desktop/gnome/url-handlers/spice/enabled</applyto>
+ <owner>spice</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>How to handle spice URLs</short>
+ <long>Set to true to have a program specified in command handle spice URLs</long>
+ </locale>
+</schema>
+
+ <schema>
+ <key>/schemas/desktop/gnome/url-handlers/spice/command</key>
+ <applyto>/desktop/gnome/url-handlers/spice/command</applyto>
+ <owner>spice</owner>
+ <type>string</type>
+ <default>/usr/bin/spicy --uri="%s"</default>
+ <locale name="C">
+ <short>URL handler for spice URIs</short>
+ <long>URL handler for spice URIs</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/desktop/gnome/url-handlers/spice/need-terminal</key>
+ <applyto>/desktop/gnome/url-handlers/spice/need-terminal</applyto>
+ <owner>spice</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Run program in terminal</short>
+ <long>True if the program to handle this URL should be run in a terminal</long>
+ </locale>
+ </schema>
+</schemalist>
+</gconfschemafile>
+
diff --git a/net-misc/spice-gtk/metadata.xml b/net-misc/spice-gtk/metadata.xml
new file mode 100644
index 000000000000..ef05c1f54b7e
--- /dev/null
+++ b/net-misc/spice-gtk/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>virtualization</herd>
+ <maintainer>
+ <email>dev-zero@gentoo.org</email>
+ <name>Tiziano Müller</name>
+ </maintainer>
+ <use>
+ <flag name="dbus">Support for desktop integration such as
+ automounting and other APIs exposed by your DE via D-Bus</flag>
+ <flag name="gtk3">Link against <pkg>x11-libs/gtk+:3</pkg> instead of
+ <pkg>x11-libs/gtk+:2</pkg></flag>
+ <flag name="lz4">Enable support for LZ4 compression using <pkg>app-arch/lz4</pkg></flag>
+ <flag name="policykit">Enable <pkg>sys-auth/polkit</pkg> support for the
+ usbredir acl helper</flag>
+ <flag name="usbredir">Use <pkg>sys-apps/usbredir</pkg> to redirect USB
+ devices to another machine over TCP</flag>
+ <flag name="vala">Generate <pkg>dev-lang/vala</pkg> bindings using
+ vapigen and regenerate .vala files using valac</flag>
+ <flag name="webdav">Support for folder-sharing between guest and client
+ using <pkg>net-libs/phodav</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="gitorious">spice-gtk</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/spice-gtk/spice-gtk-0.20-r1.ebuild b/net-misc/spice-gtk/spice-gtk-0.20-r1.ebuild
new file mode 100644
index 000000000000..e447d1bddce0
--- /dev/null
+++ b/net-misc/spice-gtk/spice-gtk-0.20-r1.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG="no"
+WANT_AUTOMAKE="1.12"
+VALA_MIN_API_VERSION="0.14"
+VALA_USE_DEPEND="vapigen"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils python-single-r1 vala
+
+DESCRIPTION="Set of GObject and Gtk objects for connecting to Spice servers and a client GUI"
+HOMEPAGE="http://spice-space.org http://gitorious.org/spice-gtk"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+SRC_URI="http://spice-space.org/download/gtk/${P}.tar.bz2"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86"
+IUSE="dbus doc gstreamer gtk3 +introspection policykit pulseaudio
+python sasl smartcard static-libs usbredir vala"
+
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ ?? ( pulseaudio gstreamer )"
+
+# TODO:
+# * check if sys-freebsd/freebsd-lib (from virtual/acl) provides acl/libacl.h
+# * use external pnp.ids as soon as that means not pulling in gnome-desktop
+RDEPEND="${PYTHON_DEPS}
+ pulseaudio? ( media-sound/pulseaudio[glib] )
+ gstreamer? (
+ media-libs/gstreamer:0.10
+ media-libs/gst-plugins-base:0.10 )
+ >=x11-libs/pixman-0.17.7
+ >=media-libs/celt-0.5.1.1:0.5.1
+ dev-libs/openssl
+ gtk3? ( x11-libs/gtk+:3[introspection?] )
+ x11-libs/gtk+:2[introspection?]
+ >=dev-libs/glib-2.26:2
+ >=x11-libs/cairo-1.2
+ virtual/jpeg
+ sys-libs/zlib
+ dbus? ( dev-libs/dbus-glib )
+ introspection? ( dev-libs/gobject-introspection )
+ python? ( dev-python/pygtk:2 )
+ sasl? ( dev-libs/cyrus-sasl )
+ smartcard? ( app-emulation/libcacard )
+ usbredir? (
+ sys-apps/hwids
+ >=sys-apps/usbredir-0.4.2
+ virtual/libusb:1
+ virtual/libgudev:=
+ policykit? (
+ sys-apps/acl
+ >=sys-auth/polkit-0.101 )
+ )"
+DEPEND="${RDEPEND}
+ dev-lang/python
+ dev-python/pyparsing
+ dev-perl/Text-CSV
+ >=dev-util/intltool-0.40.0
+ >=sys-devel/gettext-0.17
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )"
+
+# Hard-deps while building from git:
+# dev-lang/vala:0.14
+# dev-lang/perl
+
+GTK2_BUILDDIR="${WORKDIR}/${P}_gtk2"
+GTK3_BUILDDIR="${WORKDIR}/${P}_gtk3"
+
+src_prepare() {
+ use vala && vala_src_prepare
+ mkdir ${GTK2_BUILDDIR} ${GTK3_BUILDDIR} || die
+
+ epatch "${FILESDIR}"/${P}-add-spice-channel-string-to-type.patch
+}
+
+src_configure() {
+ local myconf
+ local audio="no"
+
+ use gstreamer && audio="gstreamer"
+ use pulseaudio && audio="pulse"
+
+ if use vala ; then
+ # force vala regen for MinGW, etc
+ rm -fv gtk/controller/controller.{c,vala.stamp} gtk/controller/menu.c
+ fi
+
+ myconf="
+ $(use_enable static-libs static) \
+ $(use_enable introspection) \
+ --with-audio=${audio} \
+ $(use_with python) \
+ $(use_with sasl) \
+ $(use_enable smartcard) \
+ $(use_enable usbredir) \
+ $(use_with usbredir usb-ids-path /usr/share/misc/usb.ids) \
+ $(use_with usbredir usb-acl-helper-dir /usr/libexec) \
+ $(use_enable policykit polkit) \
+ $(use_enable vala) \
+ $(use_enable dbus) \
+ $(use_enable doc gtk-doc) \
+ --disable-werror \
+ --enable-pie"
+
+ cd ${GTK2_BUILDDIR}
+ echo "Running configure in ${GTK2_BUILDDIR}"
+ ECONF_SOURCE="${S}" econf --disable-maintainer-mode \
+ --with-gtk=2.0 \
+ ${myconf}
+
+ if use gtk3; then
+ cd ${GTK3_BUILDDIR}
+ echo "Running configure in ${GTK3_BUILDDIR}"
+ ECONF_SOURCE="${S}" econf --disable-maintainer-mode \
+ --with-gtk=3.0 \
+ ${myconf}
+ fi
+}
+
+src_compile() {
+ cd ${GTK2_BUILDDIR}
+ einfo "Running make in ${GTK2_BUILDDIR}"
+ default
+
+ if use gtk3; then
+ cd ${GTK3_BUILDDIR}
+ einfo "Running make in ${GTK3_BUILDDIR}"
+ default
+ fi
+}
+
+src_test() {
+ cd ${GTK2_BUILDDIR}
+ einfo "Running make check in ${GTK2_BUILDDIR}"
+ default
+
+ if use gtk3; then
+ cd ${GTK3_BUILDDIR}
+ einfo "Running make check in ${GTK3_BUILDDIR}"
+ default
+ fi
+}
+
+src_install() {
+ dodoc AUTHORS ChangeLog NEWS README THANKS TODO
+
+ cd ${GTK2_BUILDDIR}
+ einfo "Running make check in ${GTK2_BUILDDIR}"
+ default
+
+ if use gtk3; then
+ cd ${GTK3_BUILDDIR}
+ einfo "Running make install in ${GTK3_BUILDDIR}"
+ default
+ fi
+
+ # Remove .la files if they're not needed
+ use static-libs || prune_libtool_files
+
+ use python && rm -rf "${ED}"/usr/lib*/python*/site-packages/*.la
+
+ make_desktop_entry spicy Spicy "utilities-terminal" "Network;RemoteAccess;"
+}
diff --git a/net-misc/spice-gtk/spice-gtk-0.21.ebuild b/net-misc/spice-gtk/spice-gtk-0.21.ebuild
new file mode 100644
index 000000000000..efdc40452655
--- /dev/null
+++ b/net-misc/spice-gtk/spice-gtk-0.21.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG="no"
+WANT_AUTOMAKE="1.12"
+VALA_MIN_API_VERSION="0.14"
+VALA_USE_DEPEND="vapigen"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils python-single-r1 vala
+
+DESCRIPTION="Set of GObject and Gtk objects for connecting to Spice servers and a client GUI"
+HOMEPAGE="http://spice-space.org http://gitorious.org/spice-gtk"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+SRC_URI="http://spice-space.org/download/gtk/${P}.tar.bz2"
+KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86"
+IUSE="dbus doc gstreamer gtk3 +introspection policykit pulseaudio
+python sasl smartcard static-libs usbredir vala"
+
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ ?? ( pulseaudio gstreamer )"
+
+# TODO:
+# * check if sys-freebsd/freebsd-lib (from virtual/acl) provides acl/libacl.h
+# * use external pnp.ids as soon as that means not pulling in gnome-desktop
+RDEPEND="${PYTHON_DEPS}
+ pulseaudio? ( media-sound/pulseaudio[glib] )
+ gstreamer? (
+ media-libs/gstreamer:0.10
+ media-libs/gst-plugins-base:0.10 )
+ >=x11-libs/pixman-0.17.7
+ >=media-libs/celt-0.5.1.1:0.5.1
+ dev-libs/openssl
+ gtk3? ( x11-libs/gtk+:3[introspection?] )
+ x11-libs/gtk+:2[introspection?]
+ >=dev-libs/glib-2.26:2
+ >=x11-libs/cairo-1.2
+ virtual/jpeg
+ sys-libs/zlib
+ dbus? ( dev-libs/dbus-glib )
+ introspection? ( dev-libs/gobject-introspection )
+ python? ( dev-python/pygtk:2 )
+ sasl? ( dev-libs/cyrus-sasl )
+ smartcard? ( app-emulation/libcacard )
+ usbredir? (
+ sys-apps/hwids
+ >=sys-apps/usbredir-0.4.2
+ virtual/libusb:1
+ virtual/libgudev:=
+ policykit? (
+ sys-apps/acl
+ >=sys-auth/polkit-0.110-r1
+ !~sys-auth/polkit-0.111 )
+ )"
+DEPEND="${RDEPEND}
+ dev-lang/python
+ dev-python/pyparsing
+ dev-perl/Text-CSV
+ >=dev-util/intltool-0.40.0
+ >=sys-devel/gettext-0.17
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )"
+
+# Hard-deps while building from git:
+# dev-lang/vala:0.14
+# dev-lang/perl
+
+GTK2_BUILDDIR="${WORKDIR}/${P}_gtk2"
+GTK3_BUILDDIR="${WORKDIR}/${P}_gtk3"
+
+src_prepare() {
+
+ epatch "${FILESDIR}"/spice-gtk-0.21-fix-g-clear-pointer-on-old-glib.patch
+
+ epatch_user
+
+ use vala && vala_src_prepare
+ mkdir ${GTK2_BUILDDIR} ${GTK3_BUILDDIR} || die
+}
+
+src_configure() {
+ local myconf
+ local audio="no"
+
+ use gstreamer && audio="gstreamer"
+ use pulseaudio && audio="pulse"
+
+ if use vala ; then
+ # force vala regen for MinGW, etc
+ rm -fv gtk/controller/controller.{c,vala.stamp} gtk/controller/menu.c
+ fi
+
+ myconf="
+ $(use_enable static-libs static) \
+ $(use_enable introspection) \
+ --with-audio=${audio} \
+ $(use_with python) \
+ $(use_with sasl) \
+ $(use_enable smartcard) \
+ $(use_enable usbredir) \
+ $(use_with usbredir usb-ids-path /usr/share/misc/usb.ids) \
+ $(use_with usbredir usb-acl-helper-dir /usr/libexec) \
+ $(use_enable policykit polkit) \
+ $(use_enable vala) \
+ $(use_enable dbus) \
+ $(use_enable doc gtk-doc) \
+ --disable-werror \
+ --enable-pie"
+
+ cd ${GTK2_BUILDDIR}
+ echo "Running configure in ${GTK2_BUILDDIR}"
+ ECONF_SOURCE="${S}" econf --disable-maintainer-mode \
+ --with-gtk=2.0 \
+ ${myconf}
+
+ if use gtk3; then
+ cd ${GTK3_BUILDDIR}
+ echo "Running configure in ${GTK3_BUILDDIR}"
+ ECONF_SOURCE="${S}" econf --disable-maintainer-mode \
+ --with-gtk=3.0 \
+ ${myconf}
+ fi
+}
+
+src_compile() {
+ cd ${GTK2_BUILDDIR}
+ einfo "Running make in ${GTK2_BUILDDIR}"
+ default
+
+ if use gtk3; then
+ cd ${GTK3_BUILDDIR}
+ einfo "Running make in ${GTK3_BUILDDIR}"
+ default
+ fi
+}
+
+src_test() {
+ cd ${GTK2_BUILDDIR}
+ einfo "Running make check in ${GTK2_BUILDDIR}"
+ default
+
+ if use gtk3; then
+ cd ${GTK3_BUILDDIR}
+ einfo "Running make check in ${GTK3_BUILDDIR}"
+ default
+ fi
+}
+
+src_install() {
+ dodoc AUTHORS ChangeLog NEWS README THANKS TODO
+
+ cd ${GTK2_BUILDDIR}
+ einfo "Running make check in ${GTK2_BUILDDIR}"
+ default
+
+ if use gtk3; then
+ cd ${GTK3_BUILDDIR}
+ einfo "Running make install in ${GTK3_BUILDDIR}"
+ default
+ fi
+
+ # Remove .la files if they're not needed
+ use static-libs || prune_libtool_files
+
+ use python && rm -rf "${ED}"/usr/lib*/python*/site-packages/*.la
+
+ make_desktop_entry spicy Spicy "utilities-terminal" "Network;RemoteAccess;"
+}
diff --git a/net-misc/spice-gtk/spice-gtk-0.25-r1.ebuild b/net-misc/spice-gtk/spice-gtk-0.25-r1.ebuild
new file mode 100644
index 000000000000..5ddbfec96193
--- /dev/null
+++ b/net-misc/spice-gtk/spice-gtk-0.25-r1.ebuild
@@ -0,0 +1,180 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG="no"
+WANT_AUTOMAKE="1.12"
+VALA_MIN_API_VERSION="0.14"
+VALA_USE_DEPEND="vapigen"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils python-single-r1 vala
+
+DESCRIPTION="Set of GObject and Gtk objects for connecting to Spice servers and a client GUI"
+HOMEPAGE="http://spice-space.org http://gitorious.org/spice-gtk"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+SRC_URI="http://spice-space.org/download/gtk/${P}.tar.bz2"
+KEYWORDS="alpha amd64 arm ppc ppc64 sparc ~x86"
+IUSE="dbus doc gstreamer gtk3 +introspection policykit pulseaudio
+python sasl smartcard static-libs usbredir vala webdav"
+
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ ?? ( pulseaudio gstreamer )"
+
+# TODO:
+# * check if sys-freebsd/freebsd-lib (from virtual/acl) provides acl/libacl.h
+# * use external pnp.ids as soon as that means not pulling in gnome-desktop
+RDEPEND="${PYTHON_DEPS}
+ pulseaudio? ( media-sound/pulseaudio[glib] )
+ gstreamer? (
+ media-libs/gstreamer:0.10
+ media-libs/gst-plugins-base:0.10 )
+ >=x11-libs/pixman-0.17.7
+ >=media-libs/celt-0.5.1.1:0.5.1
+ media-libs/opus
+ dev-libs/openssl
+ gtk3? ( x11-libs/gtk+:3[introspection?] )
+ x11-libs/gtk+:2[introspection?]
+ >=dev-libs/glib-2.26:2
+ >=x11-libs/cairo-1.2
+ virtual/jpeg
+ sys-libs/zlib
+ dbus? ( dev-libs/dbus-glib )
+ introspection? ( dev-libs/gobject-introspection )
+ python? ( dev-python/pygtk:2 )
+ sasl? ( dev-libs/cyrus-sasl )
+ smartcard? ( app-emulation/qemu[smartcard] )
+ usbredir? (
+ sys-apps/hwids
+ >=sys-apps/usbredir-0.4.2
+ virtual/libusb:1
+ virtual/libgudev:=
+ policykit? (
+ sys-apps/acl
+ >=sys-auth/polkit-0.110-r1
+ !~sys-auth/polkit-0.111 )
+ )
+ webdav? ( net-libs/phodav:1.0 )"
+DEPEND="${RDEPEND}
+ dev-lang/python
+ dev-python/pyparsing
+ dev-perl/Text-CSV
+ >=dev-util/intltool-0.40.0
+ >=sys-devel/gettext-0.17
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )"
+
+# Hard-deps while building from git:
+# dev-lang/vala:0.14
+# dev-lang/perl
+
+GTK2_BUILDDIR="${WORKDIR}/${P}_gtk2"
+GTK3_BUILDDIR="${WORKDIR}/${P}_gtk3"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-Introduce-enable-disable-webdav-option.patch" \
+ "${FILESDIR}/${P}-Do-not-depend-on-libsoup-directly.patch" \
+ "${FILESDIR}/${P}-missing_gio_libs.patch"
+ epatch_user
+
+ AT_NO_RECURSIVE="yes" eautoreconf
+
+ use vala && vala_src_prepare
+ mkdir ${GTK2_BUILDDIR} ${GTK3_BUILDDIR} || die
+}
+
+src_configure() {
+ local myconf
+ local audio="no"
+
+ use gstreamer && audio="gstreamer"
+ use pulseaudio && audio="pulse"
+
+ if use vala ; then
+ # force vala regen for MinGW, etc
+ rm -fv gtk/controller/controller.{c,vala.stamp} gtk/controller/menu.c
+ fi
+
+ myconf="
+ $(use_enable static-libs static) \
+ $(use_enable introspection) \
+ --with-audio=${audio} \
+ $(use_with python) \
+ $(use_with sasl) \
+ $(use_enable smartcard) \
+ $(use_enable usbredir) \
+ $(use_with usbredir usb-ids-path /usr/share/misc/usb.ids) \
+ $(use_with usbredir usb-acl-helper-dir /usr/libexec) \
+ $(use_enable policykit polkit) \
+ $(use_enable vala) \
+ $(use_enable webdav) \
+ $(use_enable dbus) \
+ $(use_enable doc gtk-doc) \
+ --disable-werror \
+ --enable-pie"
+
+ cd ${GTK2_BUILDDIR}
+ echo "Running configure in ${GTK2_BUILDDIR}"
+ ECONF_SOURCE="${S}" econf --disable-maintainer-mode \
+ --with-gtk=2.0 \
+ ${myconf}
+
+ if use gtk3; then
+ cd ${GTK3_BUILDDIR}
+ echo "Running configure in ${GTK3_BUILDDIR}"
+ ECONF_SOURCE="${S}" econf --disable-maintainer-mode \
+ --with-gtk=3.0 \
+ ${myconf}
+ fi
+}
+
+src_compile() {
+ cd ${GTK2_BUILDDIR}
+ einfo "Running make in ${GTK2_BUILDDIR}"
+ default
+
+ if use gtk3; then
+ cd ${GTK3_BUILDDIR}
+ einfo "Running make in ${GTK3_BUILDDIR}"
+ default
+ fi
+}
+
+src_test() {
+ cd ${GTK2_BUILDDIR}
+ einfo "Running make check in ${GTK2_BUILDDIR}"
+ default
+
+ if use gtk3; then
+ cd ${GTK3_BUILDDIR}
+ einfo "Running make check in ${GTK3_BUILDDIR}"
+ default
+ fi
+}
+
+src_install() {
+ dodoc AUTHORS ChangeLog NEWS README THANKS TODO
+
+ cd ${GTK2_BUILDDIR}
+ einfo "Running make check in ${GTK2_BUILDDIR}"
+ default
+
+ if use gtk3; then
+ cd ${GTK3_BUILDDIR}
+ einfo "Running make install in ${GTK3_BUILDDIR}"
+ default
+ fi
+
+ # Remove .la files if they're not needed
+ use static-libs || prune_libtool_files
+
+ use python && rm -rf "${ED}"/usr/lib*/python*/site-packages/*.la
+
+ make_desktop_entry spicy Spicy "utilities-terminal" "Network;RemoteAccess;"
+}
diff --git a/net-misc/spice-gtk/spice-gtk-0.28.ebuild b/net-misc/spice-gtk/spice-gtk-0.28.ebuild
new file mode 100644
index 000000000000..33656b080ca0
--- /dev/null
+++ b/net-misc/spice-gtk/spice-gtk-0.28.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG="no"
+WANT_AUTOMAKE="1.12"
+VALA_MIN_API_VERSION="0.14"
+VALA_USE_DEPEND="vapigen"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils multibuild python-single-r1 vala
+
+DESCRIPTION="Set of GObject and Gtk objects for connecting to Spice servers and a client GUI"
+HOMEPAGE="http://spice-space.org http://gitorious.org/spice-gtk"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+SRC_URI="http://spice-space.org/download/gtk/${P}.tar.bz2"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="dbus gstreamer gtk3 +introspection lz4 policykit pulseaudio python sasl smartcard static-libs usbredir vala webdav"
+
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+ ?? ( pulseaudio gstreamer )
+"
+
+# TODO:
+# * check if sys-freebsd/freebsd-lib (from virtual/acl) provides acl/libacl.h
+# * use external pnp.ids as soon as that means not pulling in gnome-desktop
+RDEPEND="
+ ${PYTHON_DEPS}
+ pulseaudio? ( media-sound/pulseaudio[glib] )
+ gstreamer? (
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0 )
+ >=x11-libs/pixman-0.17.7
+ >=media-libs/celt-0.5.1.1:0.5.1
+ media-libs/opus
+ dev-libs/openssl:=
+ gtk3? ( x11-libs/gtk+:3[introspection?] )
+ x11-libs/gtk+:2[introspection?]
+ >=dev-libs/glib-2.28:2
+ >=x11-libs/cairo-1.2
+ virtual/jpeg:=
+ sys-libs/zlib
+ introspection? ( dev-libs/gobject-introspection )
+ lz4? ( app-arch/lz4 )
+ python? ( dev-python/pygtk:2 )
+ sasl? ( dev-libs/cyrus-sasl )
+ smartcard? ( app-emulation/qemu[smartcard] )
+ usbredir? (
+ sys-apps/hwids
+ >=sys-apps/usbredir-0.4.2
+ virtual/libusb:1
+ virtual/libgudev:=
+ policykit? (
+ sys-apps/acl
+ >=sys-auth/polkit-0.110-r1
+ !~sys-auth/polkit-0.111 )
+ )
+ webdav? (
+ net-libs/phodav:2.0
+ >=dev-libs/glib-2.43.90:2
+ >=net-libs/libsoup-2.49.91 )
+"
+DEPEND="${RDEPEND}
+ dev-lang/python
+ dev-python/pyparsing
+ dev-perl/Text-CSV
+ >=dev-util/gtk-doc-am-1.14
+ >=dev-util/intltool-0.40.0
+ >=sys-devel/gettext-0.17
+ virtual/pkgconfig
+ vala? ( $(vala_depend) )
+"
+
+# Hard-deps while building from git:
+# dev-lang/vala:0.14
+# dev-lang/perl
+
+src_prepare() {
+ epatch_user
+
+ AT_NO_RECURSIVE="yes" eautoreconf
+
+ use vala && vala_src_prepare
+}
+
+src_configure() {
+ local myconf
+ local audio="no"
+
+ use gstreamer && audio="gstreamer"
+ use pulseaudio && audio="pulse"
+
+ if use vala ; then
+ # force vala regen for MinGW, etc
+ rm -fv gtk/controller/controller.{c,vala.stamp} gtk/controller/menu.c
+ fi
+
+ myconf="
+ --disable-maintainer-mode \
+ $(use_enable static-libs static) \
+ $(use_enable introspection) \
+ --with-audio=${audio} \
+ $(use_with sasl) \
+ $(use_enable smartcard) \
+ $(use_enable usbredir) \
+ $(use_with usbredir usb-ids-path /usr/share/misc/usb.ids) \
+ $(use_with usbredir usb-acl-helper-dir /usr/libexec) \
+ $(use_enable policykit polkit) \
+ $(use_enable vala) \
+ $(use_enable webdav) \
+ $(use_enable dbus) \
+ --disable-gtk-doc \
+ --disable-werror \
+ --enable-pie"
+
+ # Parameter of --with-gtk
+ MULTIBUILD_VARIANTS=( 2.0 )
+ use gtk3 && MULTIBUILD_VARIANTS+=( 3.0 )
+
+ configure() {
+ local myconf=()
+ myconf+=( --with-gtk=${MULTIBUILD_VARIANT} )
+
+ if [[ ${MULTIBUILD_ID} =~ "2.0" ]] ; then
+ myconf+=( $(use_with python) )
+ else
+ myconf+=( --without-python )
+ fi
+
+ ECONF_SOURCE="${S}" econf $@ ${myconf[@]}
+ }
+ multibuild_foreach_variant run_in_build_dir configure ${myconf}
+}
+
+src_compile() {
+ multibuild_foreach_variant run_in_build_dir default
+}
+
+src_test() {
+ multibuild_foreach_variant run_in_build_dir default
+}
+
+src_install() {
+ dodoc AUTHORS ChangeLog NEWS README THANKS TODO
+
+ multibuild_foreach_variant run_in_build_dir default
+
+ # Remove .la files if they're not needed
+ use static-libs || prune_libtool_files
+
+ use python && rm -rf "${ED}"/usr/lib*/python*/site-packages/*.la
+
+ make_desktop_entry spicy Spicy "utilities-terminal" "Network;RemoteAccess;"
+}
diff --git a/net-misc/spiped/Manifest b/net-misc/spiped/Manifest
new file mode 100644
index 000000000000..cee6d4cfcbc2
--- /dev/null
+++ b/net-misc/spiped/Manifest
@@ -0,0 +1 @@
+DIST spiped-1.5.0.tgz 68813 SHA256 b2f74b34fb62fd37d6e2bfc969a209c039b88847e853a49e91768dec625facd7 SHA512 55e9f18fc82415d28f44af538c6dd8c222798f6ac719a9ad43772357c0f05f281a883cf1189552deeb4b646abe3d060089d66b5f2ba66b5a2a82627dc62513cc WHIRLPOOL be07cfd67a21dfafc37a1d514193c3f45f9f9cb41a3009d50ad564f39fdde1342d2b716baca2b67040b0a75a9b3d469f372c6cc861c3376117d31d7ec4e4b0b3
diff --git a/net-misc/spiped/files/spiped.confd b/net-misc/spiped/files/spiped.confd
new file mode 100644
index 000000000000..117be90309c3
--- /dev/null
+++ b/net-misc/spiped/files/spiped.confd
@@ -0,0 +1,21 @@
+# /etc/conf.d/spiped
+
+# Once you're happy with your settings,
+# set IS_CONFIGURED to "yes".
+IS_CONFIGURED="no"
+
+# spiped is shipped with plenty of options.
+# Please see the man page for the complete list.
+# -e : encrypt communication
+# -d : decrypt communication
+OPTS="-e"
+
+# Address and port on which spiped should listen for incoming connections.
+# If you want it to listen on the loopback interface, do not specify "localhost"
+# but the localhost IP address instead. spiped won't start if you do so.
+SRCHOST="127.0.0.1"
+SRCPORT="12345"
+
+# Address and port to which spiped should connect
+TARGETHOST="some.domain.tld"
+TARGETPORT="1337"
diff --git a/net-misc/spiped/files/spiped.initd b/net-misc/spiped/files/spiped.initd
new file mode 100644
index 000000000000..1fe07b5e0350
--- /dev/null
+++ b/net-misc/spiped/files/spiped.initd
@@ -0,0 +1,46 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+KEYFILE=${KEYFILE:="/etc/spiped/keyfile"}
+SPIPED_USER=${SPIPED_USER:="nobody"}
+PIDFILE="/run/spiped/spiped.pid"
+
+command="spiped"
+command_args="${OPTS} -s [${SRCHOST}]:${SRCPORT} -t ${TARGETHOST}:${TARGETPORT} -k ${KEYFILE} -p ${PIDFILE}"
+
+depend() {
+ use net
+ before logger
+}
+
+checkconfig() {
+ if [[ ! "$IS_CONFIGURED" == "yes" ]]; then
+ eerror "You need to setup /etc/conf.d/spiped first!"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting ${SVCNAME}"
+ checkpath -d -o "${SPIPED_USER}" -m750 "$(dirname "${PIDFILE}")"
+
+ start-stop-daemon --start \
+ --user ${SPIPED_USER} \
+ --pidfile ${PIDFILE} \
+ --exec $command -- $command_args
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+
+ start-stop-daemon --stop \
+ --pidfile ${PIDFILE}
+
+ eend $?
+}
diff --git a/net-misc/spiped/metadata.xml b/net-misc/spiped/metadata.xml
new file mode 100644
index 000000000000..1b2d73180213
--- /dev/null
+++ b/net-misc/spiped/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>monsieurp@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ Spiped (pronounced "ess-pipe-dee") is a utility for creating symmetrically
+ encrypted and authenticated pipes between socket addresses, so that one may
+ connect to one address (e.g., a UNIX socket on localhost) and transparently
+ have a connection established to another address (e.g., a UNIX socket on a
+ different system). This is similar to 'ssh -L' functionality, but does not
+ use SSH and requires a pre-shared symmetric key.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/spiped/spiped-1.5.0.ebuild b/net-misc/spiped/spiped-1.5.0.ebuild
new file mode 100644
index 000000000000..9a62bf2bb7e1
--- /dev/null
+++ b/net-misc/spiped/spiped-1.5.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="secure pipe daemon"
+HOMEPAGE="http://www.tarsnap.com/spiped.html"
+SRC_URI="http://www.tarsnap.com/${PN}/${P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="dev-libs/openssl:*"
+RDEPEND="${DEPEND}"
+
+src_install() {
+ dobin spipe/spipe
+ dosbin spiped/spiped
+
+ doman spipe/spipe.1 spiped/spiped.1
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+
+ dodir etc/spiped
+}
+
+pkg_postinst() {
+ elog
+ elog "You will need to configure spiped via its"
+ elog "configuration file located in /etc/conf.d/."
+ elog
+ elog "Please have a look at this file prior to starting up spiped!"
+ elog
+}
diff --git a/net-misc/spread/Manifest b/net-misc/spread/Manifest
new file mode 100644
index 000000000000..f6b96051e1b6
--- /dev/null
+++ b/net-misc/spread/Manifest
@@ -0,0 +1,2 @@
+DIST spread-src-4.1.0.tar.gz 641060 SHA256 764d84ecf06877802c805efc1e84bbb362f14c791829e88d62fcba9951a68cdd SHA512 6db3cf9760d483685bd23d32760f52b9af667fcf98341fad198b0831cc41cc839998dee59dee04426bf4db15700656fe90f4f457e2a3c6e449eb51b07fc18a6d WHIRLPOOL 39304f2341e410fca42314195d022b333fb9b1a3874ed1a32f8e8bc4f45e4cd436c50eb08180c3d5c562c7c79c6700e3d918b58696465396faa2710ce3fa8fec
+DIST spread-src-4.3.0.tar.gz 745113 SHA256 1f8f7709842c90fd486eb286f6a92631767ccd9704e530043c488f73902fa305 SHA512 7eb87e896a623accfe3f36c44ba55f8258d078ff9cdc141509456af4a069802f087edaeafcd356791337dbfb4d4f67b808a482ea54ac58aef8fb980cdbc6fea6 WHIRLPOOL 467025306728aefae22c94930d304efb89a0a946da505faa532b998815a5b2085429b4f111ff68a9fa237446d8442b04b620488ea3fc2f7ae1b9e3d59dd95ddb
diff --git a/net-misc/spread/files/spread.init.d b/net-misc/spread/files/spread.init.d
new file mode 100644
index 000000000000..b62ec6e33a79
--- /dev/null
+++ b/net-misc/spread/files/spread.init.d
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+# $Id$
+
+depend() {
+ need net
+}
+
+mkdir_spreadirs() {
+ [ -d /var/run/spread ] || mkdir -p /var/run/spread
+}
+
+start() {
+ ebegin "Starting Spread Daemon"
+ mkdir_spreadirs
+ start-stop-daemon --start --quiet --background --make-pidfile --pidfile /var/run/spread.pid --exec /usr/sbin/spread &
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Spread"
+ start-stop-daemon --stop --pidfile /var/run/spread.pid
+ eend $?
+}
diff --git a/net-misc/spread/metadata.xml b/net-misc/spread/metadata.xml
new file mode 100644
index 000000000000..a40624fba8f0
--- /dev/null
+++ b/net-misc/spread/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/spread/spread-4.1.0.ebuild b/net-misc/spread/spread-4.1.0.ebuild
new file mode 100644
index 000000000000..b40b89d5e1b1
--- /dev/null
+++ b/net-misc/spread/spread-4.1.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit eutils user
+
+MY_PN="spread-src"
+
+DESCRIPTION="Distributed network messaging system"
+HOMEPAGE="http://www.spread.org"
+SRC_URI="mirror://gentoo/${MY_PN}-${PV}.tar.gz"
+
+LICENSE="Spread-1.0 GPL-2"
+SLOT="0"
+KEYWORDS="x86 amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+pkg_setup() {
+ enewuser spread
+ enewgroup spread
+}
+
+src_prepare() {
+ # don't strip binaries
+ sed -i -e 's/0755 -s/0755/g' daemon/Makefile.in examples/Makefile.in
+}
+
+src_install() {
+ emake DESTDIR="${D}" docdir="/usr/share/doc/${PF}" install
+ newinitd "${FILESDIR}"/spread.init.d spread
+ dodir /var/run/spread
+}
diff --git a/net-misc/spread/spread-4.3.0.ebuild b/net-misc/spread/spread-4.3.0.ebuild
new file mode 100644
index 000000000000..16128268988b
--- /dev/null
+++ b/net-misc/spread/spread-4.3.0.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit eutils user
+
+MY_PN="spread-src"
+
+DESCRIPTION="Distributed network messaging system"
+HOMEPAGE="http://www.spread.org"
+SRC_URI="mirror://gentoo/${MY_PN}-${PV}.tar.gz"
+
+LICENSE="Spread-1.0 GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+pkg_setup() {
+ enewuser spread
+ enewgroup spread
+}
+
+src_prepare() {
+ # don't strip binaries
+ sed -i -e 's/0755 -s/0755/g' daemon/Makefile.in examples/Makefile.in
+}
+
+src_install() {
+ emake DESTDIR="${D}" docdir="/usr/share/doc/${PF}" install
+ newinitd "${FILESDIR}"/spread.init.d spread
+}
diff --git a/net-misc/ssh-askpass-fullscreen/Manifest b/net-misc/ssh-askpass-fullscreen/Manifest
new file mode 100644
index 000000000000..3e7ab19d6189
--- /dev/null
+++ b/net-misc/ssh-askpass-fullscreen/Manifest
@@ -0,0 +1 @@
+DIST ssh-askpass-fullscreen-1.0.tar.bz2 69301 SHA256 5843f3c580964be64aa40bf20a03d4d7de326fe8957aae213b38c405c5d10b9a SHA512 272b7d8bcbfb997530afcb6c619180b625e6753e1dc86cba30f30fa594cd71ec8bfc522b0fb8aee5842cb7a4532a00fc1e0954def9ac81a1b521360d7140f52b WHIRLPOOL 029b152835dea0f67636f3781cdaf550aa1a3cfb905af233be80a7333606a90a6c635220dc7baf598acd4f4a6b4a66aa07ec4627633c9a0a7ec194a72ef8d2ba
diff --git a/net-misc/ssh-askpass-fullscreen/files/99ssh_askpass b/net-misc/ssh-askpass-fullscreen/files/99ssh_askpass
new file mode 100644
index 000000000000..8aa186304cd4
--- /dev/null
+++ b/net-misc/ssh-askpass-fullscreen/files/99ssh_askpass
@@ -0,0 +1,2 @@
+SSH_ASKPASS=/usr/bin/ssh-askpass-fullscreen
+SUDO_ASKPASS=${SSH_ASKPASS}
diff --git a/net-misc/ssh-askpass-fullscreen/files/ssh-askpass-fullscreen-0.4-fix-grab.patch b/net-misc/ssh-askpass-fullscreen/files/ssh-askpass-fullscreen-0.4-fix-grab.patch
new file mode 100644
index 000000000000..ca31e5c0ce3c
--- /dev/null
+++ b/net-misc/ssh-askpass-fullscreen/files/ssh-askpass-fullscreen-0.4-fix-grab.patch
@@ -0,0 +1,23 @@
+http://bugs.gentoo.org/260308
+
+--- ssh-askpass-fullscreen-0.4/ssh-askpass-fullscreen.c.orig 2009-02-26 16:48:43.094005225 -0600
++++ ssh-askpass-fullscreen-0.4/ssh-askpass-fullscreen.c 2009-02-26 16:49:59.804007638 -0600
+@@ -44,7 +44,7 @@
+ #include <gtk/gtk.h>
+
+ /* XPM */
+-static char *ocean_stripes[] = {
++static const char *ocean_stripes[] = {
+ /* columns rows colors chars-per-pixel */
+ "64 64 3 1",
+ " c #A0A9C1",
+@@ -247,7 +247,7 @@
+ GdkColor color;
+ gchar *str;
+ GdkGrabStatus status;
+- int grab_tries;
++ int grab_tries = 0;
+ const char *failed;
+
+ grab_server = (getenv("GNOME_SSH_ASKPASS_GRAB_SERVER") != NULL);
+
diff --git a/net-misc/ssh-askpass-fullscreen/files/ssh-askpass-fullscreen-1.0-libX11.patch b/net-misc/ssh-askpass-fullscreen/files/ssh-askpass-fullscreen-1.0-libX11.patch
new file mode 100644
index 000000000000..eadf2639b7a2
--- /dev/null
+++ b/net-misc/ssh-askpass-fullscreen/files/ssh-askpass-fullscreen-1.0-libX11.patch
@@ -0,0 +1,27 @@
+From 313871922aefef489115967d634f991edfaad39c Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Fri, 12 Oct 2012 17:10:02 -0400
+Subject: [PATCH] Explicitly link to libX11 for XUngrabServer()
+
+Prevents underlinking failure when using recent ld.gold and recent
+versions of gtk+; see https://bugs.gentoo.org/show_bug.cgi?id=370019
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 8f46279..01e36dd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -8,7 +8,7 @@ AC_PROG_CC
+ AC_CHECK_HEADERS([stdio.h stdlib.h string.h unistd.h])
+ AC_CHECK_FUNCS([memset])
+
+-PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.10.0],,
++PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.10.0 x11],,
+ AC_MSG_ERROR([>=GTK+-2.10 is required to compile ${PACKAGE_NAME}]
+ ))
+
+--
+1.7.12.3
+
diff --git a/net-misc/ssh-askpass-fullscreen/files/ssh-askpass-fullscreen.1 b/net-misc/ssh-askpass-fullscreen/files/ssh-askpass-fullscreen.1
new file mode 100644
index 000000000000..86f97cde03cd
--- /dev/null
+++ b/net-misc/ssh-askpass-fullscreen/files/ssh-askpass-fullscreen.1
@@ -0,0 +1,79 @@
+.\" Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH SSH-ASKPASS-FULLSCREEN 1 "May 8 , 2004"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh disable hyphenation
+.\" .hy enable hyphenation
+.\" .ad l left justify
+.\" .ad b justify to both left and right margins
+.\" .nf disable filling
+.\" .fi enable filling
+.\" .br insert line break
+.\" .sp <n> insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+ssh-askpass-fullscreen \- A simple replacement for ssh-askpass written with gtk2
+.SH SYNOPSIS
+.B ssh-askpass-fullscreen
+
+.SH DESCRIPTION
+This manual page was written for the Debian distribution
+because the original program does not have a manual page.
+.PP
+
+.B gnome-ssh-askpass
+is a GNOME-based passphrase dialog for use with OpenSSH. It is
+intended to be called by the
+.B ssh-add(1)
+program and not invoked directly. It allows
+.B ssh-add(1)
+to obtain a passphrase from a user, even if not connected to a terminal
+(assuming that an X display is available). This happens auto-matically
+in the case where
+.B ssh-add
+is invoked from one's
+.B ~/.xsession or as one of the GNOME startup programs, for example.
+
+In order to be called automatically by
+.B ssh-add,
+.B ssh-askpass-fullscreen
+should be installed as /usr/bin/ssh-askpass
+
+
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
+.\" respectively.
+\fBssh-askpass-fullscreen\fP is a program that...
+.SH ENVIRONMENT VARIABLES
+The following environment variables are recognized:
+
+.TP
+.IR "GNOME_SSH_ASKPASS_GRAB_SERVER"
+ Causes gnome-ssh-askpass to grab the X server before
+asking for a passphrase.
+
+.TP
+.IR "GNOME_SSH_ASKPASS_GRAB_POINTER"
+ Causes gnome-ssh-askpass to grab the mouse pointer will be
+grabbed too.
+
+.PP
+These may have some benefit to security if you don't trust your X
+server. Keyboard is always grabbed.
+
+.TP
+
+.SH SEE ALSO
+.BR ssh-add (1),
+.BR ssh-askpass (1).
+.br
+
+.SH AUTHOR
+This manual page was written by Marco Presi (Zufus) <zufus@debian.org>,
+for the Debian GNU/Linux system (but may be used by others) and it is
+based on that for x11-ssh-askpass by Philip Hands and the one for
+gnome-ssh-askpass by Colin Watson <cjwatson@debian.org>
diff --git a/net-misc/ssh-askpass-fullscreen/metadata.xml b/net-misc/ssh-askpass-fullscreen/metadata.xml
new file mode 100644
index 000000000000..9724727cb6fe
--- /dev/null
+++ b/net-misc/ssh-askpass-fullscreen/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>gnome</herd>
+ <upstream>
+ <remote-id type="github">atj/ssh-askpass-fullscreen</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/ssh-askpass-fullscreen/ssh-askpass-fullscreen-1.0-r1.ebuild b/net-misc/ssh-askpass-fullscreen/ssh-askpass-fullscreen-1.0-r1.ebuild
new file mode 100644
index 000000000000..55cb600f2a6d
--- /dev/null
+++ b/net-misc/ssh-askpass-fullscreen/ssh-askpass-fullscreen-1.0-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools eutils
+
+DESCRIPTION="A small SSH Askpass replacement written with GTK2"
+HOMEPAGE="https://github.com/atj/ssh-askpass-fullscreen"
+SRC_URI="mirror://github/atj/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="alpha amd64 ia64 ppc sparc x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND=">=x11-libs/gtk+-2.10.0:2
+ x11-libs/libX11"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ # https://github.com/atj/ssh-askpass-fullscreen/pull/1
+ epatch "${FILESDIR}/${P}-libX11.patch"
+
+ # automake-1.13 fix, bug #468764
+ sed -i -e 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g' configure.ac || die
+
+ eautoreconf
+}
+
+src_install() {
+ default
+ # Automatically display the passphrase dialog - see bug #437764
+ echo "SSH_ASKPASS='${EPREFIX}/usr/bin/ssh-askpass-fullscreen'" >> "${T}/99ssh_askpass" \
+ || die "envd file creation failed"
+ doenvd "${T}"/99ssh_askpass || die "doenvd failed"
+}
diff --git a/net-misc/ssh-chain/Manifest b/net-misc/ssh-chain/Manifest
new file mode 100644
index 000000000000..53fdfcdcd41b
--- /dev/null
+++ b/net-misc/ssh-chain/Manifest
@@ -0,0 +1 @@
+DIST ssh-chain-20131217.tar.gz 3956 SHA256 da84435531a6e22d167fe94c64b193fe8424ac35f40923f81fdb6650dec93f3a SHA512 7d9faa9bbce44a50ca56d65fd778d35f79c7ece982e2bb0e424471c866f9cc584390484dbed73447473016fe5de4564e22883d3dda4aa54e167853a3e0ce2975 WHIRLPOOL 5cc066e31372fe61b3b72c72786f1e6351247e13c643598c78e875715e64cfee4254b28c21d1facd33556241a26614c92670cd5832714e798b69d4db4a6c0819
diff --git a/net-misc/ssh-chain/metadata.xml b/net-misc/ssh-chain/metadata.xml
new file mode 100644
index 000000000000..36555e712fd3
--- /dev/null
+++ b/net-misc/ssh-chain/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>ottxor@gentoo.org</email>
+ <name>Christoph Junghans</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ryancdotorg/ssh-chain</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/ssh-chain/ssh-chain-20131217.ebuild b/net-misc/ssh-chain/ssh-chain-20131217.ebuild
new file mode 100644
index 000000000000..7e38ddf0d7a7
--- /dev/null
+++ b/net-misc/ssh-chain/ssh-chain-20131217.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit vcs-snapshot
+
+COMMIT="c1bd9d82d750bf001d12a9cd41b9b24a3fd84f81"
+DESCRIPTION="ssh via a chain of intermediary hosts"
+HOMEPAGE="https://github.com/ryancdotorg/ssh-chain"
+SRC_URI="${HOMEPAGE}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND="dev-lang/perl
+ virtual/ssh"
+
+src_install() {
+ dobin "${PN}"
+ dodoc README
+ if [[ -f "${EROOT}"/etc/ssh/ssh_config ]] && ! grep -q "^Host \*^\*" "${EROOT}"/etc/ssh/ssh_config; then
+ cp "${EROOT}"/etc/ssh/ssh_config "${T}/ssh_config"
+ cat >> "${T}/ssh_config" <<EOF
+
+#for ${PN}
+Host *^*
+ ProxyCommand ssh-chain %h %p
+
+EOF
+ insinto /etc/ssh
+ doins "${T}/ssh_config"
+ fi
+}
diff --git a/net-misc/sshpass/Manifest b/net-misc/sshpass/Manifest
new file mode 100644
index 000000000000..1235192253c6
--- /dev/null
+++ b/net-misc/sshpass/Manifest
@@ -0,0 +1 @@
+DIST sshpass-1.05.tar.gz 98362 SHA256 c3f78752a68a0c3f62efb3332cceea0c8a1f04f7cf6b46e00ec0c3000bc8483e SHA512 92ff3428a3cbc2b517e8ee0a6676b409bac3ec0900bfb370cf3882ccc62017edb695ce00e025f73680e9718e1b0213b2ac1bbd2a2558fe43f0f5a7b0d690c810 WHIRLPOOL 15c951f1c7e66a3967d5ed2c541862b95056faab108976206d6e81e76d6234ff116e7f490925305482238b5c86098a6783a691c8f436d8911ffea159df275ff0
diff --git a/net-misc/sshpass/files/sshpass-1.04-ssh5.6.patch b/net-misc/sshpass/files/sshpass-1.04-ssh5.6.patch
new file mode 100644
index 000000000000..2d02c4ef4bf3
--- /dev/null
+++ b/net-misc/sshpass/files/sshpass-1.04-ssh5.6.patch
@@ -0,0 +1,16 @@
+--- main.c.orig 2011-02-01 10:00:45.571260395 +0000
++++ main.c 2011-02-01 11:14:48.571421997 +0000
+@@ -311,6 +311,11 @@
+
+ int numread=read(fd, buffer, sizeof(buffer) );
+
++ // New versions of ssh probably set the terminal to non-blocking, so we get lots of unused or empty responses.
++ if( numread<0 && errno ==5 ) {
++ return 0;
++ }
++
+ if( numread<0 ) {
+ // Comment no. 3.1416
+ // Select is doing a horrid job of waking us up at the right time - it wakes up with "read ready" when the slave
+
+
diff --git a/net-misc/sshpass/metadata.xml b/net-misc/sshpass/metadata.xml
new file mode 100644
index 000000000000..2461dd9ed7ef
--- /dev/null
+++ b/net-misc/sshpass/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ <description>Proxy maintainer. CC him on bugs</description>
+ </maintainer>
+ <maintainer>
+ <email>jingcheng01@gmail.com</email>
+ <name> Jing, Cheng</name>
+ <description>Maintainer. Assign bugs to him</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">sshpass</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/sshpass/sshpass-1.05.ebuild b/net-misc/sshpass/sshpass-1.05.ebuild
new file mode 100644
index 000000000000..fe069cc0341c
--- /dev/null
+++ b/net-misc/sshpass/sshpass-1.05.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="Tool for noninteractively performing password authentication with ssh"
+HOMEPAGE="http://sshpass.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="amd64 ~arm x86 ~x64-macos"
+IUSE=""
+
+RDEPEND="net-misc/openssh"
+DEPEND=""
diff --git a/net-misc/sslh/Manifest b/net-misc/sslh/Manifest
new file mode 100644
index 000000000000..5e31f1a05aad
--- /dev/null
+++ b/net-misc/sslh/Manifest
@@ -0,0 +1,3 @@
+DIST sslh-1.15.tar.gz 33241 SHA256 fc854cc5d95be2c50293e655b7427032ece74ebef1f7f0119c0fc3e207109ccd SHA512 947c3b1c6020202d2c66376b6c252ecc7baf1cb1ddbc3ba107a8bc757f284a009831f025762f3c5950bbbf76b909b0429e3edd6d5803e243fac09a8d896d12a6 WHIRLPOOL 1debd2c70b33c7defbcc447f2622fdd59563297f396c87c80c12966387f68dee98a417e5b41257a2c1f656ecc6297fb18b801e87ecb99f316b0441c394026a36
+DIST sslh-v1.16.tar.gz 36483 SHA256 e97b3be9f010bc763a7f11c94e54d8ead33cab3f0c93a52bb9a7f708212e5902 SHA512 0a959396b2dcc6d0458be2e6114c063c1a4600999b8a7c2b02236585a989af2aec832ff8a11b62dd7d03c6b1e05263317ba6adb2993fb3887be3e1ba0733a2c7 WHIRLPOOL 03ac58f03bbbef3d2bf2a06429f23e4468c094075548ab81fe75683e08f57bbc4bb329477a2505fa2eb15fcc58ef07c5f7ca6b19fbde0b895826570c71a6552f
+DIST sslh-v1.17.tar.gz 45447 SHA256 4f3589ed36d8a21581268d53055240eee5e5adf02894a2ca7a6c9022f24b582a SHA512 13e9980f4af4111d1b7c695cc61f6a99dca0dbe6be6391a735ebcd15944094526761dbee1ee52d0a94bff689bd9eeefabe930fc0a515f2389bf0f44e0823a431 WHIRLPOOL ec535e0932ba9debe2a19d6bef81b7a1498c658720bbf2a4a472b7858b7db3062299de605c264bf7dcaad3e912028491f5380c64b8c379ff693243a0a1f9a39a
diff --git a/net-misc/sslh/files/sslh.conf.d-2 b/net-misc/sslh/files/sslh.conf.d-2
new file mode 100644
index 000000000000..719be7b8dd15
--- /dev/null
+++ b/net-misc/sslh/files/sslh.conf.d-2
@@ -0,0 +1,8 @@
+# /etc/conf.d/sslh
+
+# Options to sslh itself. See the sslh(1) man page.
+#OPTIONS=""
+
+# Multiplexing example
+# Port 44 can be used for ssh, http, and https. Drop privileges after starting.
+#OPTIONS="-p localhost:44 --ssh 127.0.0.1:22 --http 127.0.0.1:80 --ssl 127.0.0.1:443 --user nobody"
diff --git a/net-misc/sslh/files/sslh.init.d-2 b/net-misc/sslh/files/sslh.init.d-2
new file mode 100755
index 000000000000..bda8c32e87de
--- /dev/null
+++ b/net-misc/sslh/files/sslh.init.d-2
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start \
+ --pidfile /var/run/${SVCNAME}.pid \
+ --exec /usr/sbin/sslh -- \
+ ${OPTIONS} \
+ --pidfile /var/run/${SVCNAME}.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --retry 20 \
+ --pidfile /var/run/${SVCNAME}.pid
+ eend $?
+}
diff --git a/net-misc/sslh/metadata.xml b/net-misc/sslh/metadata.xml
new file mode 100644
index 000000000000..07339f6f0ce8
--- /dev/null
+++ b/net-misc/sslh/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>kensington@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/sslh/sslh-1.15.ebuild b/net-misc/sslh/sslh-1.15.ebuild
new file mode 100644
index 000000000000..0cbdf35b5cfc
--- /dev/null
+++ b/net-misc/sslh/sslh-1.15.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Port multiplexer - accept both HTTPS and SSH connections on the same port"
+HOMEPAGE="http://www.rutschle.net/tech/sslh.shtml"
+SRC_URI="http://www.rutschle.net/tech/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="tcpd"
+
+RDEPEND="tcpd? ( sys-apps/tcp-wrappers )
+ dev-libs/libconfig"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+RESTRICT="test"
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ USELIBWRAP=$(usev tcpd)
+}
+
+src_install() {
+ dosbin sslh-{fork,select}
+ dosym sslh-fork /usr/sbin/sslh
+ doman sslh.8.gz
+ dodoc ChangeLog README
+
+ newinitd "${FILESDIR}"/sslh.init.d-2 sslh
+ newconfd "${FILESDIR}"/sslh.conf.d-2 sslh
+}
diff --git a/net-misc/sslh/sslh-1.16.ebuild b/net-misc/sslh/sslh-1.16.ebuild
new file mode 100644
index 000000000000..b6a43ec6f9df
--- /dev/null
+++ b/net-misc/sslh/sslh-1.16.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_P="${PN}-v${PV}"
+inherit toolchain-funcs
+
+DESCRIPTION="Port multiplexer - accept both HTTPS and SSH connections on the same port"
+HOMEPAGE="http://www.rutschle.net/tech/sslh.shtml"
+SRC_URI="http://www.rutschle.net/tech/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="caps tcpd"
+
+RDEPEND="caps? ( sys-libs/libcap )
+ tcpd? ( sys-apps/tcp-wrappers )
+ dev-libs/libconfig"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+RESTRICT="test"
+
+S=${WORKDIR}/${MY_P}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ USELIBCAP=$(usev caps) \
+ USELIBWRAP=$(usev tcpd)
+}
+
+src_install() {
+ dosbin sslh-{fork,select}
+ dosym sslh-fork /usr/sbin/sslh
+ doman sslh.8.gz
+ dodoc ChangeLog README.md
+
+ newinitd "${FILESDIR}"/sslh.init.d-2 sslh
+ newconfd "${FILESDIR}"/sslh.conf.d-2 sslh
+}
diff --git a/net-misc/sslh/sslh-1.17.ebuild b/net-misc/sslh/sslh-1.17.ebuild
new file mode 100644
index 000000000000..01046ac36852
--- /dev/null
+++ b/net-misc/sslh/sslh-1.17.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_P="${PN}-v${PV}"
+inherit toolchain-funcs
+
+DESCRIPTION="Port multiplexer - accept both HTTPS and SSH connections on the same port"
+HOMEPAGE="http://www.rutschle.net/tech/sslh.shtml"
+SRC_URI="http://www.rutschle.net/tech/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~m68k ~mips ~s390 ~sh ~x86"
+IUSE="caps tcpd"
+
+RDEPEND="caps? ( sys-libs/libcap )
+ tcpd? ( sys-apps/tcp-wrappers )
+ dev-libs/libconfig"
+DEPEND="${RDEPEND}"
+
+RESTRICT="test"
+
+S=${WORKDIR}/${MY_P}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ USELIBCAP=$(usev caps) \
+ USELIBWRAP=$(usev tcpd)
+}
+
+src_install() {
+ dosbin sslh-{fork,select}
+ dosym sslh-fork /usr/sbin/sslh
+ doman sslh.8.gz
+ dodoc ChangeLog README.md
+
+ newinitd "${FILESDIR}"/sslh.init.d-2 sslh
+ newconfd "${FILESDIR}"/sslh.conf.d-2 sslh
+}
diff --git a/net-misc/sslwrap/Manifest b/net-misc/sslwrap/Manifest
new file mode 100644
index 000000000000..ba90fd976a41
--- /dev/null
+++ b/net-misc/sslwrap/Manifest
@@ -0,0 +1 @@
+DIST sslwrap-2.0.6.tar.gz 21170 SHA256 596a1bf61a457662e754b9fcfec6b3df7fb2f6c88498bd76ef8027f08c3af336 SHA512 627c25bdf45245f9b3e8d03272fc46a0ef8d1c356e2b7990898b07267c2bbb28efd13d5ca97d330ce7369eedd2d20b5fa781f2e1a00ac732407e06d0b3a8890d WHIRLPOOL 8d3c6843413d8a77830a3533aa972cc676bf2aa934cb259b3b04a485aedc052551914668efbcff071fcd50fd0f21ea9cd57c702f95d803f06315d92e79fafc89
diff --git a/net-misc/sslwrap/files/sslwrap-2.0.6-build.patch b/net-misc/sslwrap/files/sslwrap-2.0.6-build.patch
new file mode 100644
index 000000000000..a797c00b152c
--- /dev/null
+++ b/net-misc/sslwrap/files/sslwrap-2.0.6-build.patch
@@ -0,0 +1,147 @@
+http://bugs.gentoo.org/34151
+http://bugs.gentoo.org/146828
+http://bugs.gentoo.org/335001
+
+--- apps.h
++++ apps.h
+@@ -65,9 +65,9 @@
+ #include "../e_os.h"
+ #endif
+
+-#include OPENSSL"buffer.h"
+-#include OPENSSL"bio.h"
+-#include OPENSSL"crypto.h"
++#include "openssl/buffer.h"
++#include "openssl/bio.h"
++#include "openssl/crypto.h"
+ /*#include "progs.h"*/
+
+ #ifdef WIN16
+--- Makefile
++++ Makefile
+@@ -1,28 +1,9 @@
+-
+ SRC = s_server.c s_socket.c s_cb.c
+-
+-# For Solaris2.6
+-#EXTLIBS = -lxnet
+-
+-# Debug/Optimizations
+-#OPT = -g
+-OPT = -O2
+-
+-# Define
++LIBS = `pkg-config --libs openssl`
+ OPENSSL="\"openssl/\""
+-#OPENSSL=""
+
+-all :
+- gcc -o sslwrap ${SRC} ${OPT} -DFLAT_INC -DOPENSSL=${OPENSSL} \
+- -L/usr/local/ssl/lib -lssl -lcrypto \
+- -I/usr/local/ssl/include \
+- ${EXTLIBS}
++all:
++ $(CC) $(LDFLAGS) $(CFLAGS) -o sslwrap ${SRC} -DFLAT_INC -DOPENSSL=${OPENSSL} ${LIBS}
+
+ clean:
+ rm -f sslwrap *.o *~
+-
+-
+-
+-
+-
+-
+--- s_cb.c
++++ s_cb.c
+@@ -63,9 +63,9 @@
+ #include "apps.h"
+ #undef NON_MAIN
+ #undef USE_SOCKETS
+-#include OPENSSL"err.h"
+-#include OPENSSL"x509.h"
+-#include OPENSSL"ssl.h"
++#include "openssl/err.h"
++#include "openssl/x509.h"
++#include "openssl/ssl.h"
+ #include "s_apps.h"
+
+ int verify_depth=0;
+--- s_server.c
++++ s_server.c
+@@ -121,14 +117,14 @@
+ #ifdef WIN16
+ #define APPS_WIN16
+ #endif
+-#include OPENSSL"lhash.h"
+-#include OPENSSL"bn.h"
++#include "openssl/lhash.h"
++#include "openssl/bn.h"
+ #define USE_SOCKETS
+ #include "apps.h"
+-#include OPENSSL"err.h"
+-#include OPENSSL"pem.h"
+-#include OPENSSL"x509.h"
+-#include OPENSSL"ssl.h"
++#include "err.h"
++#include "openssl/pem.h"
++#include "openssl/x509.h"
++#include "openssl/ssl.h"
+ #include "s_apps.h"
+
+ #ifndef NOPROTO
+@@ -468,7 +464,7 @@
+
+ if (bugs) SSL_CTX_set_options(ctx,SSL_OP_ALL);
+ if (hack) SSL_CTX_set_options(ctx,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG);
+- if (hack) SSL_CTX_set_options(ctx,SSL_OP_NON_EXPORT_FIRST);
++ if (hack) SSL_CTX_set_options(ctx,SSL_OP_CIPHER_SERVER_PREFERENCE);
+
+ if (state) SSL_CTX_set_info_callback(ctx,apps_ssl_info_callback);
+
+@@ -622,7 +618,7 @@
+ #endif /*NO_EXEC*/
+ }
+
+- if ((buf=malloc(BUFSIZZ)) == NULL)
++ if ((buf=CRYPTO_malloc(BUFSIZZ,__FILE__,__LINE__)) == NULL)
+ {
+ BIO_printf(bio_err,"out of memory\n");
+ goto err;
+@@ -729,7 +725,7 @@
+ if (buf != NULL)
+ {
+ memset(buf,0,BUFSIZZ);
+- free(buf);
++ CRYPTO_free(buf);
+ }
+
+ return(ret);
+--- s_socket.c
++++ s_socket.c
+@@ -67,7 +67,7 @@
+ #undef USE_SOCKETS
+ #undef NON_MAIN
+ #include "s_apps.h"
+-#include OPENSSL"ssl.h"
++#include "openssl/ssl.h"
+
+ #ifndef NOPROTO
+ static struct hostent *GetHostByName(char *name);
+@@ -305,7 +305,7 @@
+ return(0);
+ }
+ i=(*cb)(name,sock, sock);
+- if (name != NULL) free(name);
++ if (name != NULL) CRYPTO_free(name);
+ SHUTDOWN(sock);
+ if (i < 0)
+ {
+@@ -410,7 +410,7 @@
+ }
+ else
+ {
+- if ((*host=(char *)malloc(strlen(h1->h_name)+1)) == NULL)
++ if ((*host=(char *)CRYPTO_malloc(strlen(h1->h_name)+1,__FILE__,__LINE__)) == NULL)
+ {
+ perror("Malloc");
+ return(0);
diff --git a/net-misc/sslwrap/metadata.xml b/net-misc/sslwrap/metadata.xml
new file mode 100644
index 000000000000..1470e032181b
--- /dev/null
+++ b/net-misc/sslwrap/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/sslwrap/sslwrap-2.0.6-r2.ebuild b/net-misc/sslwrap/sslwrap-2.0.6-r2.ebuild
new file mode 100644
index 000000000000..2adcb3755657
--- /dev/null
+++ b/net-misc/sslwrap/sslwrap-2.0.6-r2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="TSL/SSL - Port Wrapper"
+HOMEPAGE="http://www.rickk.com/sslwrap/index.htm"
+SRC_URI="http://www.rickk.com/${PN}/${PN}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="SSLeay"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE=""
+
+RDEPEND="dev-libs/openssl:0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${PN}${PV//.}
+
+pkg_setup() {
+ tc-export CC
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-build.patch
+}
+
+src_install() {
+ dosbin ${PN}
+ dodoc README
+ dohtml -r .
+}
diff --git a/net-misc/sstp-client/Manifest b/net-misc/sstp-client/Manifest
new file mode 100644
index 000000000000..f2516f8de39d
--- /dev/null
+++ b/net-misc/sstp-client/Manifest
@@ -0,0 +1 @@
+DIST sstp-client-1.0.9.tar.gz 3243308 SHA256 d3d8a26485b2cf0b24e148301b94b3ab9cdb17700ecd7c408b8fd6ad16f7fc4e SHA512 28144552b4ae36ff56c202f0f7118628035d6583863597744a670fc769c4a022f30649348ff8e1e4ceb5b68712916f14e220a8bd6e8a8bab36567998f2e087c4 WHIRLPOOL cfe6476d558954083daf9ece8e4efb6df7be60e38fbf62bcfd44e012fcad03f157e976c1c9218b7cc448e0f18e10be1895ec1823a98e7858dca0d68292f4e5f9
diff --git a/net-misc/sstp-client/metadata.xml b/net-misc/sstp-client/metadata.xml
new file mode 100644
index 000000000000..470760d0de82
--- /dev/null
+++ b/net-misc/sstp-client/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>andreis.vinogradovs@gmail.com</email>
+ <name>Andreis Vinogradovs</name>
+ </maintainer>
+ <maintainer>
+ <email>maksbotan@gentoo.org</email>
+ <name>Maxim Koltsov</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">sstp-client</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/sstp-client/sstp-client-1.0.9-r1.ebuild b/net-misc/sstp-client/sstp-client-1.0.9-r1.ebuild
new file mode 100644
index 000000000000..2bcb06222371
--- /dev/null
+++ b/net-misc/sstp-client/sstp-client-1.0.9-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils linux-info multilib user
+
+DESCRIPTION="A client implementation of Secure Socket Tunneling Protocol (SSTP)"
+HOMEPAGE="http://sstp-client.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sstp-client/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static"
+
+RDEPEND=">=dev-libs/libevent-2.0.10
+ dev-libs/openssl:0
+ net-dialup/ppp:="
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+CONFIG_CHECK="~NETFILTER_NETLINK"
+DOCS=( AUTHORS ChangeLog DEVELOPERS INSTALL NEWS README TODO USING )
+
+pkg_setup() {
+ enewgroup sstpc
+ enewuser sstpc -1 -1 -1 sstpc
+}
+
+src_prepare() {
+ # set proper examples dir, --docdir overriding is src_configure does not work
+ sed -i -e "/^docdir/s:@PACKAGE@:${PF}/examples:" Makefile.in || die 'sed on Makefile.in failed'
+
+ epatch_user
+}
+
+src_configure() {
+ local PPPD_VER="$(best_version net-dialup/ppp)"
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+ PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
+ econf \
+ --enable-ppp-plugin \
+ --enable-group=sstpc \
+ --enable-user=sstpc \
+ --with-pppd-plugin-dir="/usr/$(get_libdir)/pppd/${PPPD_VER}" \
+ $(use_enable static)
+}
+
+src_install() {
+ default
+ prune_libtool_files --modules
+}
diff --git a/net-misc/ssvnc/Manifest b/net-misc/ssvnc/Manifest
new file mode 100644
index 000000000000..917ea6853bc7
--- /dev/null
+++ b/net-misc/ssvnc/Manifest
@@ -0,0 +1,2 @@
+DIST ssvnc-1.0.28.src.tar.gz 542796 SHA256 a4244e81f3e3f2778af1e04d8953576133bb66607d6f3c1457a07594b94c1de1
+DIST ssvnc-1.0.29.src.tar.gz 552796 SHA256 74df32eb8eaa68b07c9693a232ebe42154617c7f3cbe1d4e68d3fe7c557d618d SHA512 ea94f8114ee7e44d788ae698dd85ee8633f0dc8e9b86e17062c733e70b4f7c7c45bf68d0ea8d3e6156395777a41e3fbf63cc9425f45db6f6fda940ae2abcd092 WHIRLPOOL 087a570c73dccc93e8c9c149c3be003b2859961518669bfb1cf9017f9c0e71d946d1a78257ea2ad2929197d7f19c3d0d8dbe81983bb667fcd1e4bfb3e6225e0e
diff --git a/net-misc/ssvnc/files/Makefile.libvncauth b/net-misc/ssvnc/files/Makefile.libvncauth
new file mode 100644
index 000000000000..c24ce4663d5d
--- /dev/null
+++ b/net-misc/ssvnc/files/Makefile.libvncauth
@@ -0,0 +1,7 @@
+AR ?= ar
+CPPFLAGS += -I. -I../include -D_GNU_SOURCE
+srcs = $(wildcard *.c)
+libvncauth.a: $(srcs:.c=.o)
+ $(AR) rc $@ $^
+clean:
+ rm -f *.[oa]
diff --git a/net-misc/ssvnc/files/Makefile.vncviewer b/net-misc/ssvnc/files/Makefile.vncviewer
new file mode 100644
index 000000000000..60879b9461a5
--- /dev/null
+++ b/net-misc/ssvnc/files/Makefile.vncviewer
@@ -0,0 +1,8 @@
+CFLAGS += -fno-strength-reduce -fno-strict-aliasing
+CPPFLAGS += -I. -I../include -D_GNU_SOURCE -DMITSHM
+LDLIBS += ../libvncauth/libvncauth.a -lz -ljpeg -lXaw -lXmu -lXt -lSM -lICE -lXpm -lXp -lXext -lX11
+include Makefile.in
+all: vncviewer
+vncviewer: $(SRCS:.c=.o)
+clean:
+ rm -f *.[oa] vncviewer
diff --git a/net-misc/ssvnc/files/ssvnc-1.0.27-build.patch b/net-misc/ssvnc/files/ssvnc-1.0.27-build.patch
new file mode 100644
index 000000000000..dc433ac2d145
--- /dev/null
+++ b/net-misc/ssvnc/files/ssvnc-1.0.27-build.patch
@@ -0,0 +1,56 @@
+https://sourceforge.net/tracker/?func=detail&aid=3031380&group_id=243486&atid=1122548
+
+--- a/vnc_unixsrc/vncviewer/sockets.c
++++ b/vnc_unixsrc/vncviewer/sockets.c
+@@ -32,6 +32,7 @@
+ #include <netdb.h>
+ #include <fcntl.h>
+ #include <assert.h>
++#include <ctype.h>
+ #include <vncviewer.h>
+
+ #ifndef SOL_IPV6
+--- a/Makefile
++++ b/Makefile
+@@ -21,11 +21,11 @@
+
+ # N.B. ?= is gnu make specific. Some of the subdir Makefiles are too.
+ #
+-PREFIX ?= /usr/local
+-ROOT ?=
++PREFIX = /usr
++ROOT = $(DESTDIR)
+ BIN = bin
+ LIB = lib/ssvnc
+ MAN = man
+-MANDIR ?= $(MAN)
++MANDIR = share/$(MAN)
+ APPS ?= share/applications
+ BINNAME ?= ssvncviewer
+@@ -66,7 +66,6 @@
+
+ install: all
+ mkdir -p $(ROOT)$(PREFIX)/$(BIN) $(ROOT)$(PREFIX)/$(LIB) $(ROOT)$(PREFIX)/$(MANDIR)/man1
+- strip $(VIEWER)
+ cp -p $(VIEWER) $(ROOT)$(PREFIX)/$(LIB)
+ cp -p $(VNCSPW) $(ROOT)$(PREFIX)/$(LIB)
+ cp -p $(UNWRAP) $(ROOT)$(PREFIX)/$(LIB)
+--- a/vncstorepw/Makefile
++++ b/vncstorepw/Makefile
+@@ -14,7 +14,6 @@
+
+ $(CMD): vncauth.o vncstorepw.o d3des.o
+ PATH=$$PATH:$(EPATH) $(CC) -o $(CMD) vncstorepw.o vncauth.o d3des.o
+- PATH=$$PATH:$(EPATH) strip $(CMD)
+ @ls -l $(CMD)
+
+ $(UNWRAP): unwrap.c
+@@ -41,7 +40,6 @@
+ else \
+ PATH=$$PATH:$(EPATH) $(CC) -o $(ULTDSM) $(CPP_SSL) ultravnc_dsm_helper.c $(LD_SSL) -lcrypto; \
+ fi
+- PATH=$$PATH:$(EPATH) strip $(ULTDSM)
+ @ls -l $(ULTDSM)
+
+ test: $(CMD)
+
diff --git a/net-misc/ssvnc/files/ssvnc-1.0.29-build.patch b/net-misc/ssvnc/files/ssvnc-1.0.29-build.patch
new file mode 100644
index 000000000000..8d2db6f5cc7f
--- /dev/null
+++ b/net-misc/ssvnc/files/ssvnc-1.0.29-build.patch
@@ -0,0 +1,44 @@
+--- a/Makefile
++++ b/Makefile
+@@ -21,11 +21,11 @@
+
+ # N.B. ?= is gnu make specific. Some of the subdir Makefiles are too.
+ #
+-PREFIX ?= /usr/local
+-ROOT ?=
++PREFIX = /usr
++ROOT = $(DESTDIR)
+ BIN = bin
+ LIB = lib/ssvnc
+ MAN = man
+-MANDIR ?= $(MAN)
++MANDIR = share/$(MAN)
+ APPS ?= share/applications
+ BINNAME ?= ssvncviewer
+@@ -66,7 +66,6 @@
+
+ install: all
+ mkdir -p $(ROOT)$(PREFIX)/$(BIN) $(ROOT)$(PREFIX)/$(LIB) $(ROOT)$(PREFIX)/$(MANDIR)/man1
+- strip $(VIEWER)
+ cp -p $(VIEWER) $(ROOT)$(PREFIX)/$(LIB)
+ cp -p $(VNCSPW) $(ROOT)$(PREFIX)/$(LIB)
+ cp -p $(UNWRAP) $(ROOT)$(PREFIX)/$(LIB)
+--- a/vncstorepw/Makefile
++++ b/vncstorepw/Makefile
+@@ -14,7 +14,6 @@
+
+ $(CMD): vncauth.o vncstorepw.o d3des.o
+ PATH=$$PATH:$(EPATH) $(CC) -o $(CMD) vncstorepw.o vncauth.o d3des.o
+- PATH=$$PATH:$(EPATH) strip $(CMD)
+ @ls -l $(CMD)
+
+ $(UNWRAP): unwrap.c
+@@ -41,7 +40,6 @@
+ else \
+ PATH=$$PATH:$(EPATH) $(CC) -o $(ULTDSM) $(CPP_SSL) ultravnc_dsm_helper.c $(LD_SSL) -lcrypto; \
+ fi
+- PATH=$$PATH:$(EPATH) strip $(ULTDSM)
+ @ls -l $(ULTDSM)
+
+ test: $(CMD)
+
diff --git a/net-misc/ssvnc/metadata.xml b/net-misc/ssvnc/metadata.xml
new file mode 100644
index 000000000000..5bd7c8a2a1ab
--- /dev/null
+++ b/net-misc/ssvnc/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>vapier@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">ssvnc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/ssvnc/ssvnc-1.0.28.ebuild b/net-misc/ssvnc/ssvnc-1.0.28.ebuild
new file mode 100644
index 000000000000..2b7a1f9b321a
--- /dev/null
+++ b/net-misc/ssvnc/ssvnc-1.0.28.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="VNC viewer that adds encryption security to VNC connections"
+HOMEPAGE="http://www.karlrunge.com/x11vnc/ssvnc.html"
+SRC_URI="mirror://sourceforge/ssvnc/${P}.src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~x86-linux"
+IUSE="java"
+
+RDEPEND="sys-libs/zlib
+ virtual/jpeg
+ dev-libs/openssl
+ dev-lang/tk
+ net-misc/stunnel
+ java? ( virtual/jre )
+ x11-terms/xterm
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXaw
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXp
+ x11-libs/libXpm
+ x11-libs/libXt"
+DEPEND="${RDEPEND}
+ java? ( virtual/jdk )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0.27-build.patch
+
+ sed -i \
+ -e "/^LIB/s:lib/:$(get_libdir)/:" \
+ -e "$(use java || echo '/^JSRC/s:=.*:=:')" \
+ Makefile
+ sed -i \
+ -e '/^CC/s:=.*:+= $(CFLAGS) $(CPPFLAGS) $(LDFLAGS):' \
+ vncstorepw/Makefile
+
+ cp "${FILESDIR}"/Makefile.libvncauth vnc_unixsrc/libvncauth/Makefile
+ cd "${S}"/vnc_unixsrc/vncviewer
+ sed -n '/^SRCS/,/^$/p' Imakefile > Makefile.in
+ cp "${FILESDIR}"/Makefile.vncviewer Makefile
+}
+
+src_compile() {
+ tc-export AR CC CXX RANLIB
+ emake all || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install || \
+ die "make install failed"
+ dodoc README
+}
diff --git a/net-misc/ssvnc/ssvnc-1.0.29.ebuild b/net-misc/ssvnc/ssvnc-1.0.29.ebuild
new file mode 100644
index 000000000000..211441e19117
--- /dev/null
+++ b/net-misc/ssvnc/ssvnc-1.0.29.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="VNC viewer that adds encryption security to VNC connections"
+HOMEPAGE="http://www.karlrunge.com/x11vnc/ssvnc.html"
+SRC_URI="mirror://sourceforge/ssvnc/${P}.src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="java"
+
+RDEPEND="sys-libs/zlib
+ virtual/jpeg
+ dev-libs/openssl
+ dev-lang/tk
+ net-misc/stunnel
+ java? ( virtual/jre )
+ x11-terms/xterm
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXaw
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXp
+ x11-libs/libXpm
+ x11-libs/libXt"
+DEPEND="${RDEPEND}
+ java? ( virtual/jdk )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0.29-build.patch
+
+ sed -i \
+ -e "/^LIB/s:lib/:$(get_libdir)/:" \
+ -e "$(use java || echo '/^JSRC/s:=.*:=:')" \
+ Makefile
+ sed -i \
+ -e '/^CC/s:=.*:+= $(CFLAGS) $(CPPFLAGS) $(LDFLAGS):' \
+ vncstorepw/Makefile
+
+ cp "${FILESDIR}"/Makefile.libvncauth vnc_unixsrc/libvncauth/Makefile
+ cd "${S}"/vnc_unixsrc/vncviewer
+ sed -n '/^SRCS/,/^$/p' Imakefile > Makefile.in
+ cp "${FILESDIR}"/Makefile.vncviewer Makefile
+}
+
+src_compile() {
+ tc-export AR CC CXX RANLIB
+ emake all || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install || die
+ dodoc README
+}
diff --git a/net-misc/stargazer/Manifest b/net-misc/stargazer/Manifest
new file mode 100644
index 000000000000..8efb8bffeb51
--- /dev/null
+++ b/net-misc/stargazer/Manifest
@@ -0,0 +1 @@
+DIST stg-2.408.tar.gz 5100291 SHA256 f2de88cba1a07b10dba266df262ba719cdeb8efc169ce52711519d81b3c36fc1 SHA512 200e08cfd629dbacda31ffd3134c2908a1ad58604421cc288ad0ec1bdcd60fe021d51fed50fdc2517bb7c2b61ef23b0b9c71a606babd09bc7804cb899e0b7f75 WHIRLPOOL 3701d0bf16e06dc61474a772566a570a21d04fcf5ac5c28fb61b454f21c1471adc6f45645c3929b3ed15bb33eee10425a942b25f83ea7b3ea94eb15b80df7dad
diff --git a/net-misc/stargazer/files/logrotate b/net-misc/stargazer/files/logrotate
new file mode 100644
index 000000000000..ffa9c23f3012
--- /dev/null
+++ b/net-misc/stargazer/files/logrotate
@@ -0,0 +1,9 @@
+/var/log/stargazer/*.log {
+ daily
+ rotate 31
+ compress
+ missingok
+ notifempty
+ copytruncate
+ sharedscripts
+}
diff --git a/net-misc/stargazer/files/mans/rscriptd.8 b/net-misc/stargazer/files/mans/rscriptd.8
new file mode 100644
index 000000000000..440f7b0267b1
--- /dev/null
+++ b/net-misc/stargazer/files/mans/rscriptd.8
@@ -0,0 +1,51 @@
+.TH rscriptd 8 "December 31, 2012" "" "rscriptd"
+
+.SH NAME
+rscriptd \- a remote script execute daemon for Stargazer
+
+.SH SYNOPSIS
+.B rscriptd
+.RI [ config-file ]
+.br
+
+.SH DESCRIPTION
+The
+.B rscriptd
+daemon typically runs on a last-wire router before users and
+manages firewall rules to allow/disallow users get their services.
+.B rscriptd
+communicates with
+.B Stargazer
+main daemon by UDP protocol.
+
+.SH OPTIONS
+.TP
+.I config-file
+Path to rscriptd configuration file. Default is
+.B
+/etc/rscriptd/rscriptd.conf
+
+.SH FILES
+.B
+/usr/sbin/rsriptd
+.br
+.B
+/etc/stargazer/rscriptd.conf
+.br
+.B
+/var/log/stargazer/rscriptd.log
+
+.SH SEE ALSO
+.BR sgconf (1),
+.BR sgconf_xml (1),
+.BR sgconv (1),
+.BR sgauth (8),
+.BR stargazer (8).
+
+.SH AUTHOR
+rscriptd was originally written by Boris Mikhailenko <stg34@stargazer.dp.ua> and
+Maxim Mamontov <faust@stargazer.dp.ua>.
+.PP
+This manual page was written by Alexey Osipov <simba@lerlan.ru>,
+for the Debian project (and may be used by others), and was modified by
+Vladimir Pavljuchenkov <spiderx@spiderx.dp.ua> for Gentoo Linux \ No newline at end of file
diff --git a/net-misc/stargazer/files/mans/sgauth.8 b/net-misc/stargazer/files/mans/sgauth.8
new file mode 100644
index 000000000000..24c872761f7e
--- /dev/null
+++ b/net-misc/stargazer/files/mans/sgauth.8
@@ -0,0 +1,54 @@
+.TH sgauth 1 "December 31, 2012" "" "sgauth"
+
+.SH NAME
+sgauth \- a command-line utility for authorization in Stargazer
+
+.SH SYNOPSIS
+.B sgauth
+.RI [ config-file ]
+.br
+
+.SH DESCRIPTION
+.B sgauth
+allow user to become authorized in
+.B Stargazer
+billing system.
+.PP
+.B sgauth
+reads the
+.IR config-file ,
+connects to
+.B Stargazer
+server and authentificates on it using data supplied in
+.IR config-file .
+In addition, it runs a simple http-server on port 5580, capable of
+monitoring and controlling the connection (if specified in
+.IR config-file ")."
+
+.SH OPTIONS
+.TP
+.I config-file
+Path to file containing user login, password and other configuration data. Default is
+.B
+/etc/sgauth.conf
+
+.SH FILES
+.B
+/usr/sbin/sgauth
+.br
+.B
+/etc/stargazer/sgauth.conf
+
+.SH SEE ALSO
+.BR sgconf (1),
+.BR sgconf_xml (1),
+.BR sgconv (1),
+.BR stargazer (8),
+.BR rscriptd (8).
+
+.SH AUTHOR
+sgauth was initially written by Boris Mikhailenko <stg34@stargazer.dp.ua>.
+.PP
+This manual page was written by Alexey Osipov <simba@lerlan.ru>,
+for the Debian project (and may be used by others), and was modified by
+Vladimir Pavljuchenkov <spiderx@spiderx.dp.ua> for Gentoo Linux \ No newline at end of file
diff --git a/net-misc/stargazer/files/mans/sgconf.1 b/net-misc/stargazer/files/mans/sgconf.1
new file mode 100644
index 000000000000..4017d9e59648
--- /dev/null
+++ b/net-misc/stargazer/files/mans/sgconf.1
@@ -0,0 +1,160 @@
+.TH sgconf 1 "December 31, 2012" "" "sgconf"
+
+.SH NAME
+sgconf \- a command-line utility for configuring Stargazer
+
+.SH SYNOPSIS
+.B sgconf
+(
+.I get
+|
+.I set
+)
+.BI \-s " server"
+.BI \-p " port"
+.BI \-a " admin"
+.BI \-w " admin-pass"
+.BI \-u " user"
+.I special-options
+.br
+
+.SH DESCRIPTION
+.B sgconf
+allows
+.B Stargazer
+system administrators to configure users.
+.PP
+.B sgconf
+support two subset of commands -
+.I get
+and
+.IR set .
+.I get
+commands are for reading actual values from
+.B Stargazer
+and
+.I set
+commands are for writing new values to
+.BR Stargazer .
+
+.SH OPTIONS
+.TP
+.BI \-s " server"
+IP or hostname where
+.B Stargazer
+server run.
+.TP
+.BI \-p " port"
+Port, which
+.B Stargazer
+listen for configuration connections (typically 5555).
+.TP
+.BI \-a " admin"
+Administrator login.
+.TP
+.BI \-w " admin-pass"
+Administrator password.
+.TP
+.TP
+.IR special-options " are following:"
+(Use without argument for
+.IR get ")"
+.TP
+.BI \-c " add_cash[:log message]"
+Get user's balance or add money to user's balance with optional log message.
+.TP
+.BI \-v " set_cash[:log message]"
+Set user's balance with optional log message.
+.TP
+.BI \-t " tariff:now|delayed"
+Get/set user's tariff. If
+.I now
+specified, the change is immediate. If
+.I delayed
+specified, the change will happen at end of the month.
+.TP
+.BI \-r " credit"
+Get/set user's maximum credit.
+.TP
+.BI \-o " password"
+Get/set user's password.
+.TP
+.BI \-e " prepaid"
+Get/set amount of user's prepaid traffic.
+.TP
+.BI \-I " *|ip_addr[,ip_addr...]"
+Get/set user's allowed IP addresses. Asterisk mark means "any address".
+.TP
+.BI \-A " name"
+Get/set user's name.
+.TP
+.BI \-N " note"
+Get/set user's note.
+.TP
+.BI \-D " address"
+Get/set user's street address.
+.TP
+.BI \-L " email"
+Get/set user's email.
+.TP
+.BI \-P " phone"
+Get/set user's phone.
+.TP
+.BI \-G " group"
+Get/set group, user belongs to.
+.TP
+.BI \-d " 0|1"
+Get/set user's "down" ("disabled") flag.
+.TP
+.BI \-i " 0|1"
+Get/set user's "passive" ("frozen") flag.
+.TP
+.BI \-\-disable\-stat " 0|1"
+Get/set user's "disableDetailStat" flag.
+.TP
+.BI \-\-always\-online " 0|1"
+Get/set user's "alwaysOnline" flag.
+.TP
+.BI \-\-u "X traffic"
+Get/set user's upload traffic for
+.I X
+service (direction).
+.TP
+.BI \-\-d "X traffic"
+Get/set user's download traffic for
+.I X
+service (direction).
+.TP
+.BI \-\-ud "X userdata"
+Get/set user's
+.I X
+custom data.
+.TP
+.BI \-m " message"
+Send
+.I message
+to user.
+.TP
+.B \-n
+Create new user.
+.TP
+.B \-l
+Delete user.
+
+.SH FILES
+.B
+/usr/bin/sgconf
+
+.SH SEE ALSO
+.BR sgauth (8),
+.BR sgconf_xml (1),
+.BR sgconv (1),
+.BR stargazer (8),
+.BR rscriptd (8).
+
+.SH AUTHOR
+sgconf was initially written by Boris Mikhailenko <stg34@stargazer.dp.ua>.
+.PP
+This manual page was written by Alexey Osipov <simba@lerlan.ru>,
+for the Debian project (and may be used by others), and was modified by
+Vladimir Pavljuchenkov <spiderx@spiderx.dp.ua> for Gentoo Linux \ No newline at end of file
diff --git a/net-misc/stargazer/files/mans/sgconf_xml.1 b/net-misc/stargazer/files/mans/sgconf_xml.1
new file mode 100644
index 000000000000..428fadfd5b18
--- /dev/null
+++ b/net-misc/stargazer/files/mans/sgconf_xml.1
@@ -0,0 +1,79 @@
+.TH sgconf_xml 1 "December 31, 2012" "" "sgconf_xml"
+
+.SH NAME
+sgconf_xml \- a command-line xml-based utility for configuring Stargazer
+
+.SH SYNOPSIS
+.B sgconf_xml
+.BI \-s " server"
+.BI \-p " port"
+.BI \-a " admin"
+.BI \-w " admin-pass"
+(
+.BI \-r " request-string"
+|
+.BI \-f " request-file"
+)
+
+.SH DESCRIPTION
+.B sgconf_xml
+allows system administrators to configure
+.BR Stargazer .
+.PP
+.B sgconf_xml
+uses XML for requests and responses. You can specify a
+file containing XML request by using
+.B \-f
+option, or you can specify XML request directly as a
+string by using
+.B \-r
+option.
+
+.SH OPTIONS
+.TP
+.BI \-s " server"
+IP or hostname where
+.B Stargazer
+server run.
+.TP
+.BI \-p " port"
+Port, which
+.B Stargazer
+listen for configuration connections (typically 5555).
+.TP
+.BI \-a " admin"
+Administrator login.
+.TP
+.BI \-w " admin-pass"
+Administrator password.
+.TP
+.BI \-r " request-string"
+The request in form of XML.
+.TP
+.BI \-f " request-file"
+File containing request in form of XML.
+
+.SH REQUEST SYNTAX
+TODO.
+.br
+As for now you can check an example by running
+.B sgconf_xml
+without arguments.
+
+.SH FILES
+.B
+/usr/bin/sgconf_xml
+
+.SH SEE ALSO
+.BR sgauth (8),
+.BR sgconf (1),
+.BR sgconv (1),
+.BR stargazer (8),
+.BR rscriptd (8).
+
+.SH AUTHOR
+sgconf_xml was initially written by Boris Mikhailenko <stg34@stargazer.dp.ua>.
+.PP
+This manual page was written by Alexey Osipov <simba@lerlan.ru>,
+for the Debian project (and may be used by others), and was modified by
+Vladimir Pavljuchenkov <spiderx@spiderx.dp.ua> for Gentoo Linux \ No newline at end of file
diff --git a/net-misc/stargazer/files/mans/sgconv.1 b/net-misc/stargazer/files/mans/sgconv.1
new file mode 100644
index 000000000000..b5fb225ab064
--- /dev/null
+++ b/net-misc/stargazer/files/mans/sgconv.1
@@ -0,0 +1,42 @@
+.TH sgconv 1 "December 31, 2012" "" "sgconv"
+
+.SH NAME
+sgconv \- an utility to convert Stargazer data between storage backends
+
+.SH SYNOPSIS
+.B sgconv
+.RI [ config-file ]
+
+.SH DESCRIPTION
+.B sgconv
+allows system administrators to copy and merge
+.B Stargazer
+data from one storage backend to another.
+
+.SH OPTIONS
+.TP
+.I config-file
+A path to config file containing convertion parameters. Default is
+.B sgconv.conf
+in current directory.
+
+.SH FILES
+.B
+/usr/bin/sgconv
+.br
+.B
+/etc/stargazer/sgconv.conf
+
+.SH SEE ALSO
+.BR sgauth (8),
+.BR sgconf (1),
+.BR sgconf_xml (1),
+.BR stargazer (8),
+.BR rscriptd (8).
+
+.SH AUTHOR
+sgconv was initially written by Maxim Mamontov <faust@stargazer.dp.ua>.
+.PP
+This manual page was written by Alexey Osipov <simba@lerlan.ru>,
+for the Debian project (and may be used by others), and was modified by
+Vladimir Pavljuchenkov <spiderx@spiderx.dp.ua> for Gentoo Linux \ No newline at end of file
diff --git a/net-misc/stargazer/files/mans/stargazer.8 b/net-misc/stargazer/files/mans/stargazer.8
new file mode 100644
index 000000000000..a1860c5d97b9
--- /dev/null
+++ b/net-misc/stargazer/files/mans/stargazer.8
@@ -0,0 +1,64 @@
+.TH stargazer 8 "December 31, 2012" "" "stargazer"
+
+.SH NAME
+stargazer \- a powerfull billing system daemon
+
+.SH SYNOPSIS
+.B stargazer
+.RI [ config-directory ]
+.br
+
+.SH DESCRIPTION
+This manual page explains the
+.B stargazer
+daemon. This daemon address ISP user accounting and billing problems.
+.PP
+.B Stargazer
+is capable of:
+.PP
+- manage user accounts using several kinds of stores (plain files, MySQL, Firebird,
+PostgreSQL)
+.br
+- gather traffic flow information using several methods (Netflow protocol, rawsocket
+ethernet packets capture, netfilter IPQ capture)
+.br
+- bill user accounts according to rate rules and traffic classification
+.br
+- authentificate and authorize users to get access to the internet
+
+.SH OPTIONS
+.TP
+.I config-directory
+Path to directory containing stargazer configuration files. Default is
+.B
+/etc/stargazer
+
+.SH FILES
+.B
+/usr/sbin/stargazer
+.br
+.B
+/etc/stargazer/
+.br
+.B
+/var/lib/stargazer/
+.br
+.B
+/var/log/stargazer/stargazer.log
+.br
+.B
+/var/log/stargazer/xmlrpc.log
+
+.SH SEE ALSO
+.BR sgconf (1),
+.BR sgconf_xml (1),
+.BR sgconv (1),
+.BR sgauth (8),
+.BR rscriptd (8).
+
+.SH AUTHOR
+stargazer was initially written by Boris Mikhailenko <stg34@stargazer.dp.ua>.
+.PP
+This manual page was written by Alexey Osipov <simba@lerlan.ru>,
+for the Debian project (and may be used by others), and was modified by
+Vladimir Pavljuchenkov <spiderx@spiderx.dp.ua> for Gentoo Linux \ No newline at end of file
diff --git a/net-misc/stargazer/files/patches/stg-2.408-build-upstream.patch b/net-misc/stargazer/files/patches/stg-2.408-build-upstream.patch
new file mode 100644
index 000000000000..c8b73d85a63a
--- /dev/null
+++ b/net-misc/stargazer/files/patches/stg-2.408-build-upstream.patch
@@ -0,0 +1,214 @@
+--- projects/rlm_stg/build.org 2013-01-15 15:25:59.000000000 +0200
++++ projects/rlm_stg/build 2013-01-15 19:48:13.000000000 +0200
+@@ -16,21 +16,15 @@
+ DIR_MODE=0755
+ OWNER=root
+
+-if [ -z $1 ]
+-then
+- MAKEOPTS="-j1"
+- DEBUG="no"
++if [ "$1" = "debug" ]
++then
++ DEFS="$DEFS -DDEBUG"
++ MAKEOPTS="$MAKEOPTS -j1"
++ CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall -Wextra"
++ DEBUG="yes"
+ else
+- if [ "$1" = "debug" ]
+- then
+- DEFS="-DDEBUG"
+- MAKEOPTS="-j1"
+- CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
+- DEBUG="yes"
+- else
+- MAKEOPTS="-j1"
+- DEBUG="no"
+- fi
++ DEFS="$DEFS -DNDEBUG"
++ DEBUG="no"
+ fi
+
+ CXXFLAGS="$CXXFLAGS -I/usr/local/include"
+--- projects/rscriptd/build.org 2013-01-15 18:28:32.000000000 +0200
++++ projects/rscriptd/build 2013-01-15 18:38:13.000000000 +0200
+@@ -16,21 +16,15 @@
+ DIR_MODE=0755
+ OWNER=root
+
+-if [ -z $1 ]
++if [ "$1" = "debug" ]
+ then
+- MAKEOPTS="-j1"
+- DEBUG="no"
++ DEFS="$DEFS -DDEBUG"
++ MAKEOPTS="$MAKEOPTS -j1"
++ CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall -Wextra"
++ DEBUG="yes"
+ else
+- if [ "$1" = "debug" ]
+- then
+- DEFS="-DDEBUG"
+- MAKEOPTS="-j1"
+- CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
+- DEBUG="yes"
+- else
+- MAKEOPTS="-j1"
+- DEBUG="no"
+- fi
++ DEFS="$DEFS -DNDEBUG"
++ DEBUG="no"
+ fi
+
+ CXXFLAGS="$CXXFLAGS -I/usr/local/include"
+--- projects/sgauth/build.org 2013-01-15 18:29:20.000000000 +0200
++++ projects/sgauth/build 2013-01-15 18:36:33.000000000 +0200
+@@ -16,21 +16,15 @@
+ DIR_MODE=0755
+ OWNER=root
+
+-if [ -z $1 ]
++if [ "$1" = "debug" ]
+ then
+- MAKEOPTS="-j1"
+- DEBUG="no"
++ DEFS="$DEFS -DDEBUG"
++ MAKEOPTS="$MAKEOPTS -j1"
++ CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall -Wextra"
++ DEBUG="yes"
+ else
+- if [ "$1" = "debug" ]
+- then
+- DEFS="-DDEBUG"
+- MAKEOPTS="-j1"
+- CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
+- DEBUG="yes"
+- else
+- MAKEOPTS="-j1"
+- DEBUG="no"
+- fi
++ DEFS="$DEFS -DNDEBUG"
++ DEBUG="no"
+ fi
+
+ CXXFLAGS="$CXXFLAGS -I/usr/local/include"
+--- projects/sgconf/build.org 2013-01-15 18:29:59.000000000 +0200
++++ projects/sgconf/build 2013-01-15 18:35:41.000000000 +0200
+@@ -16,21 +16,15 @@
+ DIR_MODE=0755
+ OWNER=root
+
+-if [ -z $1 ]
++if [ "$1" = "debug" ]
+ then
+- MAKEOPTS="-j1"
+- DEBUG="no"
++ DEFS="$DEFS -DDEBUG"
++ MAKEOPTS="$MAKEOPTS -j1"
++ CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall -Wextra"
++ DEBUG="yes"
+ else
+- if [ "$1" = "debug" ]
+- then
+- DEFS="-DDEBUG"
+- MAKEOPTS="-j1"
+- CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
+- DEBUG="yes"
+- else
+- MAKEOPTS="-j1"
+- DEBUG="no"
+- fi
++ DEFS="$DEFS -DNDEBUG"
++ DEBUG="no"
+ fi
+
+ CXXFLAGS="$CXXFLAGS -I/usr/local/include"
+--- projects/sgconf_xml/build.org 2013-01-15 18:30:26.000000000 +0200
++++ projects/sgconf_xml/build 2013-01-15 18:34:53.000000000 +0200
+@@ -16,21 +16,15 @@
+ DIR_MODE=0755
+ OWNER=root
+
+-if [ -z $1 ]
++if [ "$1" = "debug" ]
+ then
+- MAKEOPTS="-j1"
+- DEBUG="no"
++ DEFS="$DEFS -DDEBUG"
++ MAKEOPTS="$MAKEOPTS -j1"
++ CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall -Wextra"
++ DEBUG="yes"
+ else
+- if [ "$1" = "debug" ]
+- then
+- DEFS="-DDEBUG"
+- MAKEOPTS="-j1"
+- CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
+- DEBUG="yes"
+- else
+- MAKEOPTS="-j1"
+- DEBUG="no"
+- fi
++ DEFS="$DEFS -DNDEBUG"
++ DEBUG="no"
+ fi
+
+ CXXFLAGS="$CXXFLAGS -I/usr/local/include"
+--- projects/sgconv/build.org 2013-01-15 18:31:01.000000000 +0200
++++ projects/sgconv/build 2013-01-15 18:32:46.000000000 +0200
+@@ -16,11 +16,20 @@
+ DIR_MODE=0755
+ OWNER=root
+ VAR_DIR="./inst/var/stargazer"
+-DEFS="-DDEBUG"
+-MAKEOPTS="-j1"
++
++if [ "$1" = "debug" ]
++then
++ DEFS="$DEFS -DDEBUG"
++ MAKEOPTS="$MAKEOPTS -j1"
++ CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall -Wextra"
++ DEBUG="yes"
++else
++ DEFS="$DEFS -DNDEBUG"
++ DEBUG="no"
++fi
++
+ CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall -I/usr/local/include"
+ LDFLAGS="$LDFLAGS -L/usr/local/lib"
+-DEBUG="yes"
+
+ if [ "$sys" = "Linux" ]
+ then
+--- projects/stargazer/build.org 2013-01-15 19:48:54.000000000 +0200
++++ projects/stargazer/build 2013-01-15 19:51:13.000000000 +0200
+@@ -35,23 +35,15 @@
+ XMLRPC_FEATURES="c++2 abyss-server"
+
+
+-if [ -z "$1" ]
++if [ "$1" = "debug" ]
+ then
++ DEFS="$DEFS -DDEBUG"
++ MAKEOPTS="$MAKEOPTS -j1"
++ CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
++ DEBUG="yes"
++else
+ DEFS="$DEFS -DNDEBUG"
+- MAKEOPTS="-j1"
+ DEBUG="no"
+-else
+- if [ "$1" = "debug" ]
+- then
+- DEFS="$DEFS -DDEBUG"
+- MAKEOPTS="-j1"
+- CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
+- DEBUG="yes"
+- else
+- DEFS="$DEFS -DNDEBUG"
+- MAKEOPTS="-j1"
+- DEBUG="no"
+- fi
+ fi
+
+ CXXFLAGS="$CXXFLAGS -I/usr/local/include"
diff --git a/net-misc/stargazer/files/patches/stg-2.408-build.patch b/net-misc/stargazer/files/patches/stg-2.408-build.patch
new file mode 100644
index 000000000000..380b4cbe91f2
--- /dev/null
+++ b/net-misc/stargazer/files/patches/stg-2.408-build.patch
@@ -0,0 +1,179 @@
+--- projects/rlm_stg/configure.org 2013-01-18 18:06:17.000000000 +0200
++++ projects/rlm_stg/configure 2013-01-18 18:07:18.000000000 +0200
+@@ -34,6 +34,7 @@
+ then
+ OS=linux
+ release=""
++ ETC_DIR="./inst/linux/etc/stargazer"
+ MAKE="make"
+ fi
+
+@@ -48,6 +49,7 @@
+ 9) OS=bsd7;;
+ *) OS=unknown;;
+ esac
++ ETC_DIR="./inst/freebsd/etc/stargazer"
+ MAKE="gmake"
+ fi
+
+@@ -163,5 +165,4 @@
+ echo "DATA_MODE=$DATA_MODE" >> $CONFFILE
+ echo "DIR_MODE=$DIR_MODE" >> $CONFFILE
+ echo "OWNER=$OWNER" >> $CONFFILE
+-$MAKE $MAKEOPTS
+-
++echo "ETC_DIR=$ETC_DIR" >> $CONFFILE
+\ No newline at end of file
+--- projects/rscriptd/configure.org 2013-01-18 18:07:28.000000000 +0200
++++ projects/rscriptd/configure 2013-01-18 18:08:02.000000000 +0200
+@@ -34,6 +34,7 @@
+ then
+ OS=linux
+ release=""
++ ETC_DIR="./inst/linux/etc/stargazer"
+ MAKE="make"
+ fi
+
+@@ -48,6 +49,7 @@
+ 9) OS=bsd7;;
+ *) OS=unknown;;
+ esac
++ ETC_DIR="./inst/freebsd/etc/stargazer"
+ MAKE="gmake"
+ fi
+
+@@ -169,6 +171,4 @@
+ echo "DATA_MODE=$DATA_MODE" >> $CONFFILE
+ echo "DIR_MODE=$DIR_MODE" >> $CONFFILE
+ echo "OWNER=$OWNER" >> $CONFFILE
+-
+-$MAKE $MAKEOPTS
+-
++echo "ETC_DIR=$ETC_DIR" >> $CONFFILE
+\ No newline at end of file
+--- projects/sgauth/configure.org 2013-01-18 18:08:10.000000000 +0200
++++ projects/sgauth/configure 2013-01-18 18:08:38.000000000 +0200
+@@ -34,6 +34,7 @@
+ then
+ OS=linux
+ release=""
++ ETC_DIR="./inst/linux/etc/stargazer"
+ MAKE="make"
+ fi
+
+@@ -48,6 +49,7 @@
+ 9) OS=bsd7;;
+ *) OS=unknown;;
+ esac
++ ETC_DIR="./inst/freebsd/etc/stargazer"
+ MAKE="gmake"
+ fi
+
+@@ -167,5 +169,4 @@
+ echo "DATA_MODE=$DATA_MODE" >> $CONFFILE
+ echo "DIR_MODE=$DIR_MODE" >> $CONFFILE
+ echo "OWNER=$OWNER" >> $CONFFILE
+-$MAKE $MAKEOPTS
+-
++echo "ETC_DIR=$ETC_DIR" >> $CONFFILE
+\ No newline at end of file
+--- projects/sgconf/configure.org 2013-01-18 18:08:46.000000000 +0200
++++ projects/sgconf/configure 2013-01-18 18:09:44.000000000 +0200
+@@ -34,6 +34,7 @@
+ then
+ OS=linux
+ release=""
++ ETC_DIR="./inst/linux/etc/stargazer"
+ MAKE="make"
+ fi
+
+@@ -48,6 +49,7 @@
+ 9) OS=bsd7;;
+ *) OS=unknown;;
+ esac
++ ETC_DIR="./inst/freebsd/etc/stargazer"
+ MAKE="gmake"
+ fi
+
+@@ -186,6 +188,4 @@
+ echo "DATA_MODE=$DATA_MODE" >> $CONFFILE
+ echo "DIR_MODE=$DIR_MODE" >> $CONFFILE
+ echo "OWNER=$OWNER" >> $CONFFILE
+-
+-$MAKE $MAKEOPTS
+-
++echo "ETC_DIR=$ETC_DIR" >> $CONFFILE
+\ No newline at end of file
+--- projects/sgconf_xml/configure.org 2013-01-18 18:09:54.000000000 +0200
++++ projects/sgconf_xml/configure 2013-01-18 18:10:23.000000000 +0200
+@@ -34,6 +34,7 @@
+ then
+ OS=linux
+ release=""
++ ETC_DIR="./inst/linux/etc/stargazer"
+ MAKE="make"
+ fi
+
+@@ -48,6 +49,7 @@
+ 9) OS=bsd7;;
+ *) OS=unknown;;
+ esac
++ ETC_DIR="./inst/freebsd/etc/stargazer"
+ MAKE="gmake"
+ fi
+
+@@ -186,6 +188,4 @@
+ echo "DATA_MODE=$DATA_MODE" >> $CONFFILE
+ echo "DIR_MODE=$DIR_MODE" >> $CONFFILE
+ echo "OWNER=$OWNER" >> $CONFFILE
+-
+-$MAKE $MAKEOPTS
+-
++echo "ETC_DIR=$ETC_DIR" >> $CONFFILE
+\ No newline at end of file
+--- projects/sgconv/configure.org 2013-01-18 18:10:30.000000000 +0200
++++ projects/sgconv/configure 2013-01-18 18:11:09.000000000 +0200
+@@ -35,6 +35,7 @@
+ then
+ OS=linux
+ release=""
++ ETC_DIR="./inst/linux/etc/stargazer"
+ MAKE="make"
+ fi
+
+@@ -49,6 +50,7 @@
+ 9) OS=bsd7;;
+ *) OS=unknown;;
+ esac
++ ETC_DIR="./inst/freebsd/etc/stargazer"
+ MAKE="gmake"
+ fi
+
+@@ -293,8 +295,6 @@
+ echo "DIR_MODE=$DIR_MODE" >> $CONFFILE
+ echo "OWNER=$OWNER" >> $CONFFILE
+ echo "VAR_DIR=$VAR_DIR" >> $CONFFILE
++echo "ETC_DIR=$ETC_DIR" >> $CONFFILE
+
+-mkdir -p ../stargazer/modules
+-
+-$MAKE $MAKEOPTS
+-
++mkdir -p ../stargazer/modules
+\ No newline at end of file
+--- projects/stargazer/configure.org 2013-01-18 18:11:15.000000000 +0200
++++ projects/stargazer/configure 2013-01-18 18:11:40.000000000 +0200
+@@ -404,11 +404,4 @@
+ echo "VAR_DIR=$VAR_DIR" >> $CONFFILE
+ echo "ETC_DIR=$ETC_DIR" >> $CONFFILE
+
+-mkdir -p modules
+-
+-if [ "$1" != "debug" ]
+-then
+- $MAKE $MAKEOPTS
+-else
+- echo -e "\n\n\nDebug build. Type $MAKE explicitly"
+-fi
++mkdir -p modules
+\ No newline at end of file
diff --git a/net-misc/stargazer/files/patches/stg-2.408-correct-paths.patch b/net-misc/stargazer/files/patches/stg-2.408-correct-paths.patch
new file mode 100644
index 000000000000..82698af5b6f7
--- /dev/null
+++ b/net-misc/stargazer/files/patches/stg-2.408-correct-paths.patch
@@ -0,0 +1,186 @@
+--- projects/rscriptd/rscriptd.conf.org 2013-01-08 18:19:34.000000000 +0200
++++ projects/rscriptd/rscriptd.conf 2013-01-08 18:20:52.000000000 +0200
+@@ -6,7 +6,7 @@
+ # Parameter: optional
+ # Value: file path
+ # Default: /var/log/rscriptd.log
+-LogFileName = /var/log/rscriptd.log
++LogFileName = /var/log/stargazer/rscriptd.log
+
+ # Amount of rscriptd-exec processes.
+ # These processes are responsible for the execution of scripts
+@@ -22,7 +22,7 @@
+ # Parameter: optional
+ # Value: directory path
+ # Default: /etc/rscriptd
+-ConfigDir = /etc/rscriptd
++ConfigDir = /etc/stargazer
+
+ # Defines password for the encryption exchange between
+ # Stargazer server and rscriptd.
+@@ -49,12 +49,12 @@
+ # Parameter: optional
+ # Value: file path
+ # Default: /etc/rscriptd/OnConnect
+-ScriptOnConnect = /etc/rscriptd/OnConnect
++ScriptOnConnect = /etc/stargazer/OnConnect
+
+ # Defines file which runs when user loses access
+ # Parameter: optional
+ # Value: file path
+ # Default: /etc/rscriptd/OnDisconnect
+-ScriptOnDisconnect = /etc/rscriptd/OnDisconnect
++ScriptOnDisconnect = /etc/stargazer/OnDisconnect
+
+ ################################################################################
+\ No newline at end of file
+--- projects/sgconv/sgconv.conf.org 2012-12-18 21:56:33.578221904 +0200
++++ projects/sgconv/sgconv.conf 2012-12-18 21:58:22.355217059 +0200
+@@ -18,27 +18,27 @@
+ # Working server directory, provides data on tariffs, users, administrators.
+ # Parameter: required
+ # Value: directory path
+- WorkDir = /var/stargazer
++ WorkDir = /var/lib/stargazer
+
+ # Owner, group and permissions of the files of user statistics (stat)
+ # Parameter: required
+ # Values: any, supported by OS
+- ConfOwner = root
+- ConfGroup = root
++ ConfOwner = stg
++ ConfGroup = stg
+ ConfMode = 600
+
+ # Owner, group and permissions on user configuration files (conf)
+ # Parameter: required
+ # Values: any, supported by OS
+- StatOwner = root
+- StatGroup = root
++ StatOwner = stg
++ StatGroup = stg
+ StatMode = 640
+
+ # Owner, group and permissions for user log files (log)
+ # Parameter: required
+ # Values: any, supported by OS
+- UserLogOwner = root
+- UserLogGroup = root
++ UserLogOwner = stg
++ UserLogGroup = stg
+ UserLogMode = 640
+
+ </SourceStoreModule>
+@@ -54,7 +54,7 @@
+ # Parameter: required
+ # Value: file path
+ # Default: /var/stg/stargazer.fdb
+- # database = /var/stg/stargazer.fdb
++ # database = /var/lib/stargazer/stargazer.fdb
+
+ # Database username
+ # Parameter: required
+--- projects/stargazer/inst/linux/etc/stargazer/stargazer.conf.org 2012-12-30 14:35:22.000000000 +0200
++++ projects/stargazer/inst/linux/etc/stargazer/stargazer.conf 2012-12-30 14:36:37.000000000 +0200
+@@ -6,7 +6,7 @@
+ # Parameter: required
+ # Value: file path
+ # Default: /var/log/stargazer.log
+-LogFile = /var/log/stargazer.log
++LogFile = /var/log/stargazer/stargazer.log
+
+ # PID file name
+ # Parameter: optional
+@@ -147,7 +147,7 @@
+ # Parameter: optional
+ # Value: file path
+ # Default: /var/stargazer/monitor
+-#MonitorDir=/var/stargazer/monitor
++#MonitorDir=/var/lib/stargazer/monitor
+
+ # Defines message maximum lifetime
+ # Note: 0 - unlimited
+--- projects/stargazer/inst/linux/etc/stargazer/conf-available.d/mod_remote_script.conf.org 2012-12-25 14:03:49.000000000 +0200
++++ projects/stargazer/inst/linux/etc/stargazer/conf-available.d/mod_remote_script.conf 2012-12-25 14:04:00.000000000 +0200
+@@ -16,7 +16,7 @@
+ # Parametr: required
+ # Values: filename
+ # Default: subnets
+- SubnetFile = subnets
++ SubnetFile = /etc/stargazer/subnets
+
+ # The password to encrypt packets between the stg-server and remote server
+ # Parameter: required
+--- projects/stargazer/inst/linux/etc/stargazer/conf-available.d/store_files.conf.org 2012-12-25 13:31:01.000000000 +0200
++++ projects/stargazer/inst/linux/etc/stargazer/conf-available.d/store_files.conf 2012-12-25 13:31:43.000000000 +0200
+@@ -5,27 +5,27 @@
+ # Working server directory, provides data on tariffs, users, administrators.
+ # Parameter: required
+ # Value: directory path
+- WorkDir = /var/stargazer
++ WorkDir = /var/lib/stargazer
+
+ # Owner, group and permissions of the files of user statistics (stat)
+ # Parameter: required
+ # Values: any, supported by OS
+- ConfOwner = root
+- ConfGroup = root
++ ConfOwner = stg
++ ConfGroup = stg
+ ConfMode = 640
+
+ # Owner, group and permissions on user configuration files (conf)
+ # Parameter: required
+ # Values: any, supported by OS
+- StatOwner = root
+- StatGroup = root
++ StatOwner = stg
++ StatGroup = stg
+ StatMode = 640
+
+ # Owner, group and permissions for user log files (log)
+ # Parameter: required
+ # Values: any, supported by OS
+- UserLogOwner = root
+- UserLogGroup = root
++ UserLogOwner = stg
++ UserLogGroup = stg
+ UserLogMode = 640
+
+ </StoreModule>
+--- projects/stargazer/inst/linux/etc/stargazer/conf-available.d/store_firebird.conf.org 2012-12-25 13:39:00.000000000 +0200
++++ projects/stargazer/inst/linux/etc/stargazer/conf-available.d/store_firebird.conf 2012-12-25 13:39:28.000000000 +0200
+@@ -9,7 +9,7 @@
+ # Parameter: required
+ # Value: file path
+ # Default: /var/stg/stargazer.fdb
+- Database = /var/stg/stargazer.fdb
++ Database = /var/lib/stargazer/stargazer.fdb
+
+ # Database username
+ # Parameter: required
+--- projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp.org 2012-12-31 11:08:26.000000000 +0200
++++ projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp 2012-12-31 11:08:41.000000000 +0200
+@@ -169,7 +169,7 @@
+ rpcServer = new xmlrpc_c::serverAbyss(
+ xmlrpc_c::serverAbyss::constrOpt()
+ .registryP(&rpcRegistry)
+- .logFileName("/var/log/stargazer_rpc.log")
++ .logFileName("/var/log/stargazer/xmlrpc.log")
+ .socketFd(fd)
+ );
+
+--- projects/stargazer/inst/var/00-base-00.sql.org 2013-01-02 16:22:28.000000000 +0200
++++ projects/stargazer/inst/var/00-base-00.sql 2013-01-02 16:22:52.000000000 +0200
+@@ -50,9 +50,9 @@
+ /*
+ * CONNECT 'localhost:/var/stg/stargazer.fdb' USER 'stg' PASSWORD '123456';
+ * DROP DATABASE;
+- *
+- * CREATE DATABASE 'localhost:/var/stg/stargazer.fdb' USER 'stg' PASSWORD '123456' DEFAULT CHARACTER SET UTF8;
+ */
++ CREATE DATABASE 'localhost:/var/lib/stargazer/stargazer.fdb' USER 'stg' PASSWORD '123456' DEFAULT CHARACTER SET UTF8;
++
+
+
+
diff --git a/net-misc/stargazer/files/patches/stg-2.408-fix-crash-on-stop.patch b/net-misc/stargazer/files/patches/stg-2.408-fix-crash-on-stop.patch
new file mode 100644
index 000000000000..367c91209be7
--- /dev/null
+++ b/net-misc/stargazer/files/patches/stg-2.408-fix-crash-on-stop.patch
@@ -0,0 +1,190 @@
+diff -Naur stg-2.408/projects/rscriptd/listener.cpp stg-2.408-patched/projects/rscriptd/listener.cpp
+--- stg-2.408/projects/rscriptd/listener.cpp 2012-02-09 12:26:59.000000000 +0200
++++ stg-2.408-patched/projects/rscriptd/listener.cpp 2013-02-11 09:04:32.000000000 +0200
+@@ -49,6 +49,8 @@
+ receiverStopped(true),
+ processorStopped(true),
+ userTimeout(0),
++ receiverThread(0),
++ processorThread(0),
+ listenSocket(0)
+ {
+ version = "rscriptd listener v.1.2";
+@@ -149,8 +151,10 @@
+ }
+ }
+
+-pthread_join(receiverThread, NULL);
+-pthread_join(processorThread, NULL);
++if (receiverThread != 0)
++ pthread_join(receiverThread, NULL);
++if (processorThread != 0)
++ pthread_join(processorThread, NULL);
+
+ pthread_mutex_destroy(&mutex);
+
+diff -Naur stg-2.408/projects/stargazer/eventloop.cpp stg-2.408-patched/projects/stargazer/eventloop.cpp
+--- stg-2.408/projects/stargazer/eventloop.cpp 2012-02-09 12:27:06.000000000 +0200
++++ stg-2.408-patched/projects/stargazer/eventloop.cpp 2013-02-11 09:03:11.000000000 +0200
+@@ -10,7 +10,7 @@
+ : ACTIONS_LIST(),
+ _running(false),
+ _stopped(true),
+- _tid(),
++ _tid(0),
+ _mutex(),
+ _condition()
+ {
+@@ -41,7 +41,8 @@
+ // Wake up thread
+ pthread_cond_signal(&_condition);
+ // Wait until thread exit
+-pthread_join(_tid, NULL);
++if (_tid != 0)
++ pthread_join(_tid, NULL);
+ return false;
+ }
+
+diff -Naur stg-2.408/projects/stargazer/plugins/capture/cap_nf/cap_nf.cpp stg-2.408-patched/projects/stargazer/plugins/capture/cap_nf/cap_nf.cpp
+--- stg-2.408/projects/stargazer/plugins/capture/cap_nf/cap_nf.cpp 2012-02-09 12:27:14.000000000 +0200
++++ stg-2.408-patched/projects/stargazer/plugins/capture/cap_nf/cap_nf.cpp 2013-02-11 09:01:34.000000000 +0200
+@@ -55,8 +55,8 @@
+ NF_CAP::NF_CAP()
+ : traffCnt(NULL),
+ settings(),
+- tidTCP(),
+- tidUDP(),
++ tidTCP(0),
++ tidUDP(0),
+ runningTCP(false),
+ runningUDP(false),
+ stoppedTCP(true),
+@@ -153,7 +153,8 @@
+ }
+ if (stoppedUDP)
+ {
+- pthread_join(tidUDP, NULL);
++ if (tidUDP != 0)
++ pthread_join(tidUDP, NULL);
+ }
+ else
+ {
+@@ -176,7 +177,8 @@
+ }
+ if (stoppedTCP)
+ {
+- pthread_join(tidTCP, NULL);
++ if (tidTCP != 0)
++ pthread_join(tidTCP, NULL);
+ }
+ else
+ {
+diff -Naur stg-2.408/projects/stargazer/plugins/capture/ether_linux/ether_cap.cpp stg-2.408-patched/projects/stargazer/plugins/capture/ether_linux/ether_cap.cpp
+--- stg-2.408/projects/stargazer/plugins/capture/ether_linux/ether_cap.cpp 2012-02-09 12:27:15.000000000 +0200
++++ stg-2.408-patched/projects/stargazer/plugins/capture/ether_linux/ether_cap.cpp 2013-02-11 09:02:05.000000000 +0200
+@@ -74,7 +74,7 @@
+ //-----------------------------------------------------------------------------
+ ETHER_CAP::ETHER_CAP()
+ : errorStr(),
+- thread(),
++ thread(0),
+ nonstop(false),
+ isRunning(false),
+ capSock(-1),
+@@ -140,7 +140,8 @@
+ }
+ else
+ {
+- pthread_join(thread, NULL);
++ if (thread != 0)
++ pthread_join(thread, NULL);
+ }
+ }
+
+diff -Naur stg-2.408/projects/stargazer/plugins/capture/ipq_linux/ipq_cap.cpp stg-2.408-patched/projects/stargazer/plugins/capture/ipq_linux/ipq_cap.cpp
+--- stg-2.408/projects/stargazer/plugins/capture/ipq_linux/ipq_cap.cpp 2012-02-09 12:27:15.000000000 +0200
++++ stg-2.408-patched/projects/stargazer/plugins/capture/ipq_linux/ipq_cap.cpp 2013-02-11 09:02:37.000000000 +0200
+@@ -58,7 +58,7 @@
+ IPQ_CAP::IPQ_CAP()
+ : ipq_h(NULL),
+ errorStr(),
+- thread(),
++ thread(0),
+ nonstop(false),
+ isRunning(false),
+ capSock(-1),
+@@ -120,7 +120,8 @@
+ }
+ else
+ {
+- pthread_join(thread, NULL);
++ if (thread != 0)
++ pthread_join(thread, NULL);
+ }
+ }
+ IPQCapClose();
+diff -Naur stg-2.408/projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp stg-2.408-patched/projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp
+--- stg-2.408/projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp 2012-02-09 12:27:16.000000000 +0200
++++ stg-2.408-patched/projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp 2013-02-11 09:00:33.000000000 +0200
+@@ -93,7 +93,7 @@
+ rpcServer(NULL),
+ running(false),
+ stopped(true),
+- tid(),
++ tid(0),
+ cookies(),
+ dayFee(0),
+ dirNames()
+@@ -201,7 +201,8 @@
+ }
+ else
+ {
+- pthread_join(tid, NULL);
++ if (tid != 0)
++ pthread_join(tid, NULL);
+ }
+
+ close(fd);
+diff -Naur stg-2.408/projects/stargazer/plugins/other/smux/smux.cpp stg-2.408-patched/projects/stargazer/plugins/other/smux/smux.cpp
+--- stg-2.408/projects/stargazer/plugins/other/smux/smux.cpp 2012-02-09 12:27:24.000000000 +0200
++++ stg-2.408-patched/projects/stargazer/plugins/other/smux/smux.cpp 2013-02-11 09:07:54.000000000 +0200
+@@ -99,7 +99,7 @@
+ errorStr(),
+ smuxSettings(),
+ settings(),
+- thread(),
++ thread(0),
+ mutex(),
+ running(false),
+ stopped(true),
+@@ -227,7 +227,7 @@
+ }
+ }
+
+-if (stopped)
++if (stopped && thread != 0)
+ pthread_join(thread, NULL);
+
+ ResetNotifiers();
+diff -Naur stg-2.408/projects/stargazer/stg_timer.cpp stg-2.408-patched/projects/stargazer/stg_timer.cpp
+--- stg-2.408/projects/stargazer/stg_timer.cpp 2012-02-09 12:27:30.000000000 +0200
++++ stg-2.408-patched/projects/stargazer/stg_timer.cpp 2013-02-11 08:58:55.000000000 +0200
+@@ -7,7 +7,7 @@
+ #include "stg/common.h"
+
+ static int nonstop;
+-static pthread_t thrStgTimer;
++static pthread_t thrStgTimer(0);
+ static bool isTimerRunning = false;
+ volatile time_t stgTime;
+
+@@ -101,7 +101,8 @@
+ void StopStgTimer()
+ {
+ nonstop = 0;
+-pthread_join(thrStgTimer, NULL); // Cleanup thread resources
++if (thrStgTimer != 0)
++ pthread_join(thrStgTimer, NULL); // Cleanup thread resources
+ printfd(__FILE__, "STG_TIMER stopped\n");
+ }
+ //-----------------------------------------------------------------------------
diff --git a/net-misc/stargazer/files/patches/stg-2.408-makefile-build-upstream.patch b/net-misc/stargazer/files/patches/stg-2.408-makefile-build-upstream.patch
new file mode 100644
index 000000000000..51d0f1f04ea6
--- /dev/null
+++ b/net-misc/stargazer/files/patches/stg-2.408-makefile-build-upstream.patch
@@ -0,0 +1,386 @@
+diff --git a/projects/convertor/Makefile b/projects/convertor/Makefile
+index efacbb6..04c00cc 100644
+--- a/projects/sgconv/Makefile
++++ b/projects/sgconv/Makefile
+@@ -58,6 +58,21 @@ clean:
+ distclean: clean
+ rm -f ../../Makefile.conf
+
++install: install-bin
++
++install-bin:
++ifeq ($(DEBUG), yes)
++ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG)
++else
++ install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG)
++endif
++ $(MAKE) -C $(DIR_PLUGINS) install
++
++uninstall: uninstall-bin
++
++uninstall-bin:
++ rm -f $(PREFIX)/usr/bin/$(PROG)
++
+ ifneq ($(MAKECMDGOALS),distclean)
+ ifneq ($(MAKECMDGOALS),clean)
+ ifneq ($(MAKECMDGOALS),uninstall)
+diff --git a/projects/convertor/build b/projects/convertor/build
+index 0144b0f..471ee62 100755
+--- a/projects/sgconv/build
++++ b/projects/sgconv/build
+@@ -20,6 +20,7 @@ DEFS="-DDEBUG"
+ MAKEOPTS="-j1"
+ CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall -I/usr/local/include"
+ LDFLAGS="$LDFLAGS -L/usr/local/lib"
++DEBUG="yes"
+
+ if [ "$sys" = "Linux" ]
+ then
+@@ -251,6 +252,7 @@ fi
+
+ echo "OS=$OS" > $CONFFILE
+ echo "STG_TIME=yes" >> $CONFFILE
++echo "DEBUG=$DEBUG" >> $CONFFILE
+ echo "DIR_BUILD=$BUILD_DIR" >> $CONFFILE
+ echo "DIR_LIB=\$(DIR_BUILD)/../../lib" >> $CONFFILE
+ echo "DIR_LIBSRC=\$(DIR_BUILD)/../../stglibs" >> $CONFFILE
+diff --git a/projects/rlm_stg/Makefile b/projects/rlm_stg/Makefile
+index 98f5f2d..6190491 100644
+--- a/projects/rlm_stg/Makefile
++++ b/projects/rlm_stg/Makefile
+@@ -57,13 +57,17 @@ distclean: clean
+ install: install-bin
+
+ install-bin:
+- install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/$(PROG)
++ifeq ($(DEBUG), yes)
++ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/freeradius/$(PROG)
++else
++ install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/freeradius/$(PROG)
++endif
+ $(MAKE) -C $(DIR_LIBSRC) install
+
+ uninstall: uninstall-bin
+
+ uninstall-bin:
+- rm -f $(PREFIX)/usr/lib/$(PROG)
++ rm -f $(PREFIX)/usr/lib/freeradius/$(PROG)
+
+ ifneq ($(MAKECMDGOALS),distclean)
+ ifneq ($(MAKECMDGOALS),clean)
+diff --git a/projects/rlm_stg/build b/projects/rlm_stg/build
+index 0145d03..3781d1b 100755
+--- a/projects/rlm_stg/build
++++ b/projects/rlm_stg/build
+@@ -19,14 +19,17 @@ OWNER=root
+ if [ -z $1 ]
+ then
+ MAKEOPTS="-j1"
++ DEBUG="no"
+ else
+ if [ "$1" = "debug" ]
+ then
+ DEFS="-DDEBUG"
+ MAKEOPTS="-j1"
+ CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
++ DEBUG="yes"
+ else
+ MAKEOPTS="-j1"
++ DEBUG="no"
+ fi
+ fi
+
+@@ -144,6 +147,7 @@ rm -f fake
+
+ echo "OS=$OS" > $CONFFILE
+ echo "STG_TIME=yes" >> $CONFFILE
++echo "DEBUG=$DEBUG" >> $CONFFILE
+ echo "DIR_BUILD=$BUILD_DIR" >> $CONFFILE
+ echo "DIR_LIB=\$(DIR_BUILD)/../../lib" >> $CONFFILE
+ echo "DIR_LIBSRC=\$(DIR_BUILD)/../../stglibs" >> $CONFFILE
+diff --git a/projects/rscriptd/Makefile b/projects/rscriptd/Makefile
+index 0912be0..da06b50 100644
+--- a/projects/rscriptd/Makefile
++++ b/projects/rscriptd/Makefile
+@@ -57,7 +57,11 @@ distclean: clean
+ install: install-bin install-data
+
+ install-bin:
+- install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
++ifeq ($(DEBUG), yes)
++ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/sbin/$(PROG)
++else
++ install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
++endif
+ $(MAKE) -C $(DIR_LIBSRC) install
+
+ install-data:
+diff --git a/projects/rscriptd/build b/projects/rscriptd/build
+index 885eef7..6a7c77f 100755
+--- a/projects/rscriptd/build
++++ b/projects/rscriptd/build
+@@ -19,14 +19,17 @@ OWNER=root
+ if [ -z $1 ]
+ then
+ MAKEOPTS="-j1"
++ DEBUG="no"
+ else
+ if [ "$1" = "debug" ]
+ then
+ DEFS="-DDEBUG"
+ MAKEOPTS="-j1"
+ CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
++ DEBUG="yes"
+ else
+ MAKEOPTS="-j1"
++ DEBUG="no"
+ fi
+ fi
+
+@@ -150,6 +153,7 @@ rm -f build_check.c
+
+ echo "OS=$OS" > $CONFFILE
+ echo "STG_TIME=yes" >> $CONFFILE
++echo "DEBUG=$DEBUG" >> $CONFFILE
+ echo "DIR_BUILD=$BUILD_DIR" >> $CONFFILE
+ echo "DIR_LIB=\$(DIR_BUILD)/../../lib" >> $CONFFILE
+ echo "DIR_LIBSRC=\$(DIR_BUILD)/../../stglibs" >> $CONFFILE
+diff --git a/projects/sgauth/Makefile b/projects/sgauth/Makefile
+index 99cd0e4..a59371c 100644
+--- a/projects/sgauth/Makefile
++++ b/projects/sgauth/Makefile
+@@ -58,7 +58,11 @@ distclean: clean
+ install: install-bin install-data
+
+ install-bin:
+- install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
++ifeq ($(DEBUG), yes)
++ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/sbin/$(PROG)
++else
++ install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
++endif
+ $(MAKE) -C $(DIR_LIBSRC) install
+
+ install-data:
+diff --git a/projects/sgauth/build b/projects/sgauth/build
+index ec747e2..e3ad87f 100755
+--- a/projects/sgauth/build
++++ b/projects/sgauth/build
+@@ -19,14 +19,17 @@ OWNER=root
+ if [ -z $1 ]
+ then
+ MAKEOPTS="-j1"
++ DEBUG="no"
+ else
+ if [ "$1" = "debug" ]
+ then
+ DEFS="-DDEBUG"
+ MAKEOPTS="-j1"
+ CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
++ DEBUG="yes"
+ else
+ MAKEOPTS="-j1"
++ DEBUG="no"
+ fi
+ fi
+
+@@ -148,6 +151,7 @@ rm -f build_check.c
+
+ echo "OS=$OS" > $CONFFILE
+ echo "STG_TIME=yes" >> $CONFFILE
++echo "DEBUG=$DEBUG" >> $CONFFILE
+ echo "DIR_BUILD=$BUILD_DIR" >> $CONFFILE
+ echo "DIR_LIB=\$(DIR_BUILD)/../../lib" >> $CONFFILE
+ echo "DIR_LIBSRC=\$(DIR_BUILD)/../../stglibs" >> $CONFFILE
+diff --git a/projects/sgconf/Makefile b/projects/sgconf/Makefile
+index 4d62bb5..297d3e2 100644
+--- a/projects/sgconf/Makefile
++++ b/projects/sgconf/Makefile
+@@ -66,7 +66,11 @@ distclean: clean
+ install: install-bin
+
+ install-bin:
+- install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
++ifeq ($(DEBUG), yes)
++ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG)
++else
++ install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG)
++endif
+ $(MAKE) -C $(DIR_LIBSRC) install
+
+ uninstall: uninstall-bin
+diff --git a/projects/sgconf/build b/projects/sgconf/build
+index 1f6c0a0..da81773 100755
+--- a/projects/sgconf/build
++++ b/projects/sgconf/build
+@@ -19,14 +19,17 @@ OWNER=root
+ if [ -z $1 ]
+ then
+ MAKEOPTS="-j1"
++ DEBUG="no"
+ else
+ if [ "$1" = "debug" ]
+ then
+ DEFS="-DDEBUG"
+ MAKEOPTS="-j1"
+ CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
++ DEBUG="yes"
+ else
+ MAKEOPTS="-j1"
++ DEBUG="no"
+ fi
+ fi
+
+@@ -166,6 +169,7 @@ fi
+
+ echo "OS=$OS" > $CONFFILE
+ echo "STG_TIME=yes" >> $CONFFILE
++echo "DEBUG=$DEBUG" >> $CONFFILE
+ echo "DIR_BUILD=$BUILD_DIR" >> $CONFFILE
+ echo "DIR_LIB=\$(DIR_BUILD)/../../lib" >> $CONFFILE
+ echo "DIR_LIBSRC=\$(DIR_BUILD)/../../stglibs" >> $CONFFILE
+diff --git a/projects/sgconf_xml/Makefile b/projects/sgconf_xml/Makefile
+index b7ebca0..32384e6 100644
+--- a/projects/sgconf_xml/Makefile
++++ b/projects/sgconf_xml/Makefile
+@@ -66,7 +66,11 @@ distclean: clean
+ install: install-bin install-data
+
+ install-bin:
+- install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
++ifeq ($(DEBUG), yes)
++ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG)
++else
++ install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG)
++endif
+ $(MAKE) -C $(DIR_LIBSRC) install
+
+ uninstall: uninstall-bin uninstall-data
+diff --git a/projects/sgconf_xml/build b/projects/sgconf_xml/build
+index f78e6f7..9797075 100755
+--- a/projects/sgconf_xml/build
++++ b/projects/sgconf_xml/build
+@@ -19,14 +19,17 @@ OWNER=root
+ if [ -z $1 ]
+ then
+ MAKEOPTS="-j1"
++ DEBUG="no"
+ else
+ if [ "$1" = "debug" ]
+ then
+ DEFS="-DDEBUG"
+ MAKEOPTS="-j1"
+ CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
++ DEBUG="yes"
+ else
+ MAKEOPTS="-j1"
++ DEBUG="no"
+ fi
+ fi
+
+@@ -166,6 +169,7 @@ fi
+
+ echo "OS=$OS" > $CONFFILE
+ echo "STG_TIME=yes" >> $CONFFILE
++echo "DEBUG=$DEBUG" >> $CONFFILE
+ echo "DIR_BUILD=$BUILD_DIR" >> $CONFFILE
+ echo "DIR_LIB=\$(DIR_BUILD)/../../lib" >> $CONFFILE
+ echo "DIR_LIBSRC=\$(DIR_BUILD)/../../stglibs" >> $CONFFILE
+diff --git a/projects/stargazer/Makefile b/projects/stargazer/Makefile
+index 44ae35e..9dfc0b5 100644
+--- a/projects/stargazer/Makefile
++++ b/projects/stargazer/Makefile
+@@ -77,7 +77,11 @@ distclean: clean
+ install: install-bin install-data
+
+ install-bin: $(PROG)
+- install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
++ifeq ($(DEBUG), yes)
++ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/sbin/$(PROG)
++else
++ install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
++endif
+ $(MAKE) -C $(DIR_INCLUDE) install
+ $(MAKE) -C $(DIR_LIBSRC) install
+ $(MAKE) -C $(DIR_PLUGINS) install
+diff --git a/projects/stargazer/build b/projects/stargazer/build
+index c58b969..8a34c4f 100755
+--- a/projects/stargazer/build
++++ b/projects/stargazer/build
+@@ -39,15 +39,18 @@ if [ -z "$1" ]
+ then
+ DEFS="$DEFS -DNDEBUG"
+ MAKEOPTS="-j1"
++ DEBUG="no"
+ else
+ if [ "$1" = "debug" ]
+ then
+ DEFS="$DEFS -DDEBUG"
+ MAKEOPTS="-j1"
+ CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
++ DEBUG="yes"
+ else
+ DEFS="$DEFS -DNDEBUG"
+ MAKEOPTS="-j1"
++ DEBUG="no"
+ fi
+ fi
+
+@@ -391,6 +394,7 @@ fi
+
+ echo "OS=$OS" > $CONFFILE
+ echo "STG_TIME=yes" >> $CONFFILE
++echo "DEBUG=$DEBUG" >> $CONFFILE
+ echo "DIR_BUILD=$BUILD_DIR" >> $CONFFILE
+ echo "DIR_LIB=\$(DIR_BUILD)/../../lib" >> $CONFFILE
+ echo "DIR_LIBSRC=\$(DIR_BUILD)/../../stglibs" >> $CONFFILE
+diff --git a/projects/stargazer/plugins/Makefile.in b/projects/stargazer/plugins/Makefile.in
+index 17e10ac..70954a2 100644
+--- a/projects/stargazer/plugins/Makefile.in
++++ b/projects/stargazer/plugins/Makefile.in
+@@ -15,12 +15,12 @@ LIBS += $(addprefix -lstg,$(STGLIBS))
+
+ CXXFLAGS += -fPIC $(STGLIBS_INCS)
+ CFLAGS += -fPIC $(STGLIBS_INCS)
+-LDFLAGS += -shared -Wl,-rpath,$(PREFIX)/usr/lib/stg $(STGLIBS_LIBS)
++LDFLAGS += -shared -Wl,-rpath,$(PREFIX)/usr/lib/stg
+
+ all: $(PROG)
+
+ $(PROG): $(OBJS)
+- $(CXX) $^ $(LDFLAGS) $(LIBS) -o $(PROG)
++ $(CXX) $^ $(STGLIBS_LIBS) $(LIBS) $(LDFLAGS) -o $(PROG)
+ $(LN) -fs "`pwd`/$(PROG)" $(DIR_MOD)/$(PROG)
+
+ clean:
+@@ -28,7 +28,11 @@ clean:
+
+ install: $(PROG)
+ mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/stg
+- install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
++ifeq ($(DEBUG), yes)
++ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
++else
++ install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
++endif
+
+ uninstall:
+ rm -f $(PREFIX)/usr/lib/stg/$(PROG)
+diff --git a/stglibs/Makefile.in b/stglibs/Makefile.in
+index a318497..b5d1195 100644
+--- a/stglibs/Makefile.in
++++ b/stglibs/Makefile.in
+@@ -35,8 +35,11 @@ clean:
+ rm -f deps $(PROG) *.o *.a *.so tags *.*~
+
+ install: $(PROG)
+- mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/stg
+- install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
++ifeq ($(DEBUG), yes)
++ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
++else
++ install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
++endif
+ mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/include/stg
+ install -m $(DATA_MODE) -o $(OWNER) $(addprefix include/stg/,$(INCS)) $(PREFIX)/usr/include/stg/
+
diff --git a/net-misc/stargazer/files/patches/stg-2.408-makefile-firebird-upstream.patch b/net-misc/stargazer/files/patches/stg-2.408-makefile-firebird-upstream.patch
new file mode 100644
index 000000000000..81f46f4a3bfe
--- /dev/null
+++ b/net-misc/stargazer/files/patches/stg-2.408-makefile-firebird-upstream.patch
@@ -0,0 +1,13 @@
+--- projects/stargazer/plugins/store/firebird/Makefile.org 2013-01-04 22:50:13.000000000 +0200
++++ projects/stargazer/plugins/store/firebird/Makefile 2013-01-04 22:50:56.000000000 +0200
+@@ -22,5 +22,11 @@
+ locker \
+ crypto
+
++FB_CFLAGS = $(shell fb_config --cflags)
++FB_LDFLAGS = $(shell fb_config --libs)
++
++CXXFLAGS += $(FB_CFLAGS)
++LDFLAGS += $(FB_LDFLAGS)
++
+ include ../../Makefile.in
diff --git a/net-misc/stargazer/files/patches/stg-2.408-makefile.patch b/net-misc/stargazer/files/patches/stg-2.408-makefile.patch
new file mode 100644
index 000000000000..81772d6641fe
--- /dev/null
+++ b/net-misc/stargazer/files/patches/stg-2.408-makefile.patch
@@ -0,0 +1,203 @@
+--- projects/sgauth/Makefile.org 2013-01-05 23:47:38.000000000 +0200
++++ projects/sgauth/Makefile 2013-01-05 23:48:34.000000000 +0200
+@@ -67,8 +67,8 @@
+
+ install-data:
+ # Install etc
+- mkdir -m $(DIR_MODE) -p $(PREFIX)/etc
+- install -m $(DATA_MODE) -o $(OWNER) ./sgauth.conf $(PREFIX)/etc/sgauth.conf
++ mkdir -m $(DIR_MODE) -p $(PREFIX)/etc/stargazer
++ install -m $(DATA_MODE) -o $(OWNER) ./sgauth.conf $(PREFIX)/etc/stargazer/sgauth.conf
+
+ uninstall: uninstall-bin uninstall-data
+
+--- projects/stargazer/Makefile.org 2013-01-05 22:53:26.000000000 +0200
++++ projects/stargazer/Makefile 2013-01-05 22:54:52.000000000 +0200
+@@ -92,30 +92,8 @@
+ mkdir -m $(DIR_MODE) -p $(PREFIX)/etc/stargazer/conf-available.d
+ mkdir -m $(DIR_MODE) -p $(PREFIX)/etc/stargazer/conf-enabled.d
+ install -m $(DATA_MODE) -o $(OWNER) $(ETC_DIR)/stargazer.conf $(PREFIX)/etc/stargazer/stargazer.conf
+- install -m $(DATA_MODE) -o $(OWNER) $(ETC_DIR)/conf-available.d/*.conf $(PREFIX)/etc/stargazer/conf-available.d
+- ln -sf ../conf-available.d/mod_ao.conf $(PREFIX)/etc/stargazer/conf-enabled.d/mod_ao.conf
+- ln -sf ../conf-available.d/mod_ia.conf $(PREFIX)/etc/stargazer/conf-enabled.d/mod_ia.conf
+- ln -sf ../conf-available.d/mod_ping.conf $(PREFIX)/etc/stargazer/conf-enabled.d/mod_ping.conf
+- ln -sf ../conf-available.d/mod_sg.conf $(PREFIX)/etc/stargazer/conf-enabled.d/mod_sg.conf
+- ln -sf ../conf-available.d/store_files.conf $(PREFIX)/etc/stargazer/conf-enabled.d/store_files.conf
+-
+-ifeq ($(OS),linux)
+- ln -sf ../conf-available.d/mod_cap_ether.conf $(PREFIX)/etc/stargazer/conf-enabled.d/mod_cap_ether.conf
+-else
+- ln -sf ../conf-available.d/mod_cap_bpf.conf $(PREFIX)/etc/stargazer/conf-enabled.d/mod_cap_bpf.conf
+-endif
+-
+ install -m $(DATA_MODE) -o $(OWNER) $(ETC_DIR)/rules $(PREFIX)/etc/stargazer/rules
+ install -m $(BIN_MODE) -o $(OWNER) $(ETC_DIR)/On* $(PREFIX)/etc/stargazer/
+-
+- # Install file db
+- mkdir -m $(DIR_MODE) -p $(PREFIX)/var/stargazer/admins
+- mkdir -m $(DIR_MODE) -p $(PREFIX)/var/stargazer/tariffs
+- mkdir -m $(DIR_MODE) -p $(PREFIX)/var/stargazer/users/test
+- install -m $(DATA_MODE) -o $(OWNER) $(VAR_DIR)/admins/admin.adm $(PREFIX)/var/stargazer/admins/admin.adm
+- install -m $(DATA_MODE) -o $(OWNER) $(VAR_DIR)/tariffs/tariff.tf $(PREFIX)/var/stargazer/tariffs/tariff.tf
+- install -m $(DATA_MODE) -o $(OWNER) $(VAR_DIR)/users/test/conf $(PREFIX)/var/stargazer/users/test/conf
+- install -m $(DATA_MODE) -o $(OWNER) $(VAR_DIR)/users/test/stat $(PREFIX)/var/stargazer/users/test/stat
+
+ uninstall: uninstall-bin uninstall-data
+
+--- projects/rscriptd/Makefile.org 2013-01-19 17:03:42.000000000 +0200
++++ projects/rscriptd/Makefile 2013-01-19 17:04:25.000000000 +0200
+@@ -65,15 +65,13 @@
+ $(MAKE) -C $(DIR_LIBSRC) install
+
+ install-data:
+- # Install etc
+- mkdir -m $(DIR_MODE) -p $(PREFIX)/etc/rscriptd
+- install -m $(DATA_MODE) -o $(OWNER) ./rscriptd.conf $(PREFIX)/etc/rscriptd/rscriptd.conf
++ install -D -m $(DATA_MODE) -o $(OWNER) ./rscriptd.conf $(PREFIX)/etc/stargazer/rscriptd.conf
+ ifeq ($(OS), linux)
+- install -D -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/linux/etc/stargazer/OnConnect $(PREFIX)/etc/rscriptd/
+- install -D -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/linux/etc/stargazer/OnDisconnect $(PREFIX)/etc/rscriptd/
++ install -D -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/linux/etc/stargazer/OnConnect $(PREFIX)/etc/stargazer/
++ install -D -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/linux/etc/stargazer/OnDisconnect $(PREFIX)/etc/stargazer/
+ else
+- install -D -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/freebsd/etc/stargazer/OnConnect $(PREFIX)/etc/rscriptd/
+- install -D -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/freebsd/etc/stargazer/OnDisconnect $(PREFIX)/etc/rscriptd/
++ install -D -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/freebsd/etc/stargazer/OnConnect $(PREFIX)/etc/stargazer/
++ install -D -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/freebsd/etc/stargazer/OnDisconnect $(PREFIX)/etc/stargazer/
+ endif
+
+ uninstall: uninstall-bin uninstall-data
+--- projects/rlm_stg/Makefile.org 2013-02-03 14:02:58.000000000 +0200
++++ projects/rlm_stg/Makefile 2013-02-03 14:05:43.000000000 +0200
+@@ -56,19 +56,11 @@
+ install: install-bin
+
+ install-bin:
+-ifeq ($(DEBUG), yes)
+ ifeq ($(OS), linux)
+ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/freeradius/$(PROG)
+ else
+ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/$(PROG)
+ endif
+-else
+-ifeq ($(OS), linux)
+- install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/freeradius/$(PROG)
+-else
+- install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/$(PROG)
+-endif
+-endif
+ $(MAKE) -C $(DIR_LIBSRC) install
+
+ uninstall: uninstall-bin
+--- projects/rscriptd/Makefile.org 2013-02-03 14:17:01.000000000 +0200
++++ projects/rscriptd/Makefile 2013-02-03 14:17:32.000000000 +0200
+@@ -57,11 +57,7 @@
+ install: install-bin install-data
+
+ install-bin:
+-ifeq ($(DEBUG), yes)
+ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/sbin/$(PROG)
+-else
+- install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
+-endif
+ $(MAKE) -C $(DIR_LIBSRC) install
+
+ install-data:
+--- projects/sgauth/Makefile.org 2013-02-03 14:18:37.000000000 +0200
++++ projects/sgauth/Makefile 2013-02-03 14:18:48.000000000 +0200
+@@ -58,11 +58,7 @@
+ install: install-bin install-data
+
+ install-bin:
+-ifeq ($(DEBUG), yes)
+ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/sbin/$(PROG)
+-else
+- install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
+-endif
+ $(MAKE) -C $(DIR_LIBSRC) install
+
+ install-data:
+--- projects/sgconf/Makefile.org 2013-02-03 14:19:18.000000000 +0200
++++ projects/sgconf/Makefile 2013-02-03 14:19:28.000000000 +0200
+@@ -66,11 +66,7 @@
+ install: install-bin
+
+ install-bin:
+-ifeq ($(DEBUG), yes)
+ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG)
+-else
+- install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG)
+-endif
+ $(MAKE) -C $(DIR_LIBSRC) install
+
+ uninstall: uninstall-bin
+--- projects/sgconf_xml/Makefile.org 2013-02-03 14:19:53.000000000 +0200
++++ projects/sgconf_xml/Makefile 2013-02-03 14:19:59.000000000 +0200
+@@ -66,11 +66,7 @@
+ install: install-bin install-data
+
+ install-bin:
+-ifeq ($(DEBUG), yes)
+ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG)
+-else
+- install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG)
+-endif
+ $(MAKE) -C $(DIR_LIBSRC) install
+
+ uninstall: uninstall-bin uninstall-data
+--- projects/sgconv/Makefile.org 2013-02-03 14:20:24.000000000 +0200
++++ projects/sgconv/Makefile 2013-02-03 14:20:33.000000000 +0200
+@@ -61,11 +61,7 @@
+ install: install-bin
+
+ install-bin:
+-ifeq ($(DEBUG), yes)
+ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG)
+-else
+- install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG)
+-endif
+ $(MAKE) -C $(DIR_PLUGINS) install
+
+ uninstall: uninstall-bin
+--- projects/stargazer/Makefile.org 2013-02-03 14:20:56.000000000 +0200
++++ projects/stargazer/Makefile 2013-02-03 14:21:30.000000000 +0200
+@@ -77,11 +77,7 @@
+ install: install-bin install-data
+
+ install-bin: $(PROG)
+-ifeq ($(DEBUG), yes)
+ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/sbin/$(PROG)
+-else
+- install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
+-endif
+ $(MAKE) -C $(DIR_INCLUDE) install
+ $(MAKE) -C $(DIR_LIBSRC) install
+ $(MAKE) -C $(DIR_PLUGINS) install
+--- stglibs/Makefile.in.org 2013-02-03 14:53:02.000000000 +0200
++++ stglibs/Makefile.in 2013-02-03 14:53:11.000000000 +0200
+@@ -35,11 +35,7 @@
+ rm -f deps $(PROG) *.o *.a *.so tags *.*~
+
+ install: $(PROG)
+-ifeq ($(DEBUG), yes)
+ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
+-else
+- install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
+-endif
+ mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/include/stg
+ install -m $(DATA_MODE) -o $(OWNER) $(addprefix include/stg/,$(INCS)) $(PREFIX)/usr/include/stg/
+
+--- projects/stargazer/plugins/Makefile.in.org 2013-02-03 15:38:41.000000000 +0200
++++ projects/stargazer/plugins/Makefile.in 2013-02-03 15:38:51.000000000 +0200
+@@ -28,11 +28,7 @@
+
+ install: $(PROG)
+ mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/stg
+-ifeq ($(DEBUG), yes)
+ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
+-else
+- install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
+-endif
+
+ uninstall:
+ rm -f $(PREFIX)/usr/lib/stg/$(PROG)
diff --git a/net-misc/stargazer/files/patches/stg-2.408-on-upstream.patch b/net-misc/stargazer/files/patches/stg-2.408-on-upstream.patch
new file mode 100644
index 000000000000..4afbb0340253
--- /dev/null
+++ b/net-misc/stargazer/files/patches/stg-2.408-on-upstream.patch
@@ -0,0 +1,151 @@
+--- projects/stargazer/inst/linux/etc/stargazer/OnChange.org 2013-01-09 14:30:32.000000000 +0200
++++ projects/stargazer/inst/linux/etc/stargazer/OnChange 2013-01-09 15:50:01.000000000 +0200
+@@ -1,8 +1,20 @@
+ #! /bin/sh
+
+-login=$1
+-param=$2
+-oldValue=$3
+-newValue=$4
++# About: This script is called when user account is changed.
++# Common Task: Notify about various events.
++# Priority: optional
+
+-#echo "User: '$login'. Parameter $param changed from '$oldValue' to '$newValue'" >> /var/stargazer/users.chg.log
+\ No newline at end of file
++# User login
++LOGIN=$1
++
++# User parameter
++PARAMETER=$2
++
++# User parameter old value
++OLDVALUE=$3
++
++# User parameter new value
++NEWVALUE=$4
++
++# Usage examples:
++#echo "User: '$LOGIN'. Parameter $PARAMETER changed from '$OLDVALUE' to '$NEWVALUE'" >> /var/stargazer/user.change.log
+\ No newline at end of file
+--- projects/stargazer/inst/linux/etc/stargazer/OnConnect.org 2013-01-09 14:39:51.000000000 +0200
++++ projects/stargazer/inst/linux/etc/stargazer/OnConnect 2013-01-09 15:11:49.000000000 +0200
+@@ -1,24 +1,23 @@
+ #! /bin/sh
+
+-#Этот скрипт вызывается в момент, когда пользователь
+-#успешно прошел авторизацию на сервере. Задача скрипта - перестроить
+-#файрвол так, что бы пользователь получил доступ в интернет
++# About: This script is called when the user successfully authenticated on the server.
++# Common Task: Rebuild firewall to allow user to access the Internet.
++# Priority: required
+
+-# Login
++# User login
+ LOGIN=$1
+
+-#user IP
++# User IP
+ IP=$2
+
+-#cash
++# User cash
+ CASH=$3
+
+-#user ID
++# User ID
+ ID=$4
+
+-#Selected dirs to connect
++# Selected DIRs (from rules file) to connect
+ DIRS=$5
+
+-
+-#echo "C `date +%Y.%m.%d-%H.%M.%S` $IP $CASH" >> /var/stargazer/users/$LOGIN/connect.log
+-
++# Usage examples:
++#echo "Connected `date +%Y.%m.%d-%H.%M.%S` $IP $CASH" >> /var/stargazer/users/$LOGIN/connect.log
+\ No newline at end of file
+--- projects/stargazer/inst/linux/etc/stargazer/OnDisconnect.org 2013-01-09 14:54:36.000000000 +0200
++++ projects/stargazer/inst/linux/etc/stargazer/OnDisconnect 2013-01-09 15:11:33.000000000 +0200
+@@ -1,24 +1,23 @@
+ #! /bin/sh
+
+-# Этот скрипт вызывается в момент, когда пользователь
+-# желает отключится от интернета или вышел таймаут у пользователя
+-# и сервер сам отключает пользователя
+-# Задача скрипта подобна задаче скрипта OnConnect - перестроить
+-# файрвол так, что бы пользователю закрыть доступ в интернет
++# About: This script is called when the user wants to disconnect or authorization timeout has passed.
++# Common task: Rebuild firewall to disallow user to access to the Internet.
++# Priority: required
+
+-# Login
++# User login
+ LOGIN=$1
+
+-#user IP
++# User IP
+ IP=$2
+
+-#cash
++# User cash
+ CASH=$3
+
+-#user ID
++# User ID
+ ID=$4
+
+-#Selected dirs to disconnect
++# Selected DIRs (from rules file) to disconnect
+ DIRS=$5
+
+-#echo "D `date +%Y.%m.%d-%H.%M.%S` $IP $CASH" >> /var/stargazer/users/$LOGIN/connect.log
++# Usage examples:
++#echo "Disconnected `date +%Y.%m.%d-%H.%M.%S` $IP $CASH" >> /var/stargazer/users/$LOGIN/connect.log
+\ No newline at end of file
+--- projects/stargazer/inst/linux/etc/stargazer/OnUserAdd.org 2013-01-09 15:01:57.000000000 +0200
++++ projects/stargazer/inst/linux/etc/stargazer/OnUserAdd 2013-01-09 15:10:55.000000000 +0200
+@@ -1,14 +1,12 @@
+ #! /bin/sh
+
+-# Использование (неиспользование) этого скрипта дело вкуса.
+-# Он не выполняет критических функций. Его задача автматизировать
+-# действия характерные при добавлении пользователя сети, например добавлекние
+-# пользователю почты
+-
+-# Login
+-login=$1
+-
+-#echo "added user $login" >> /var/stargazer/add_del.log
+-
++# About: This script is called when the user is added to the Stargazer.
++# Common task: Automate typical actions on adding user to the network,
++# such as creating email or IM account.
++# Priority: optional
+
++# User login
++LOGIN=$1
+
++# Usage examples:
++#echo "Added user $login" >> /var/stargazer/add_del.log
+\ No newline at end of file
+--- projects/stargazer/inst/linux/etc/stargazer/OnUserDel.org 2013-01-09 15:12:32.000000000 +0200
++++ projects/stargazer/inst/linux/etc/stargazer/OnUserDel 2013-01-09 15:14:10.000000000 +0200
+@@ -1,7 +1,13 @@
+ #! /bin/sh
+
+-# Login
+-login=$1
++# About: This script is called when the user is removed from the Stargazer.
++# Common task: Automate typical actions on removing user from the network,
++# such as removing email or IM account.
++# Priority: optional
+
+-#echo "deleted user $login" >> /var/stargazer/add_del.log
++# User login
++LOGIN=$1
++
++# Usage examples:
++#echo "Deleted user $LOGIN" >> /var/stargazer/add_del.log
+
diff --git a/net-misc/stargazer/files/patches/stg-2.408-radius-upstream.patch b/net-misc/stargazer/files/patches/stg-2.408-radius-upstream.patch
new file mode 100644
index 000000000000..790cc3a91e1e
--- /dev/null
+++ b/net-misc/stargazer/files/patches/stg-2.408-radius-upstream.patch
@@ -0,0 +1,31 @@
+--- projects/rlm_stg/Makefile.org 2013-01-18 16:17:18.000000000 +0200
++++ projects/rlm_stg/Makefile 2013-01-18 16:19:13.000000000 +0200
+@@ -57,16 +57,28 @@
+
+ install-bin:
+ ifeq ($(DEBUG), yes)
++ifeq ($(OS), linux)
+ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/freeradius/$(PROG)
+ else
++ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/$(PROG)
++endif
++else
++ifeq ($(OS), linux)
+ install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/freeradius/$(PROG)
++else
++ install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/$(PROG)
++endif
+ endif
+ $(MAKE) -C $(DIR_LIBSRC) install
+
+ uninstall: uninstall-bin
+
+ uninstall-bin:
++ifeq ($(OS), linux)
+ rm -f $(PREFIX)/usr/lib/freeradius/$(PROG)
++else
++ rm -f $(PREFIX)/usr/lib/$(PROG)
++endif
+
+ ifneq ($(MAKECMDGOALS),distclean)
+ ifneq ($(MAKECMDGOALS),clean)
diff --git a/net-misc/stargazer/files/patches/stg-2.408-rscriptd-upstream.patch b/net-misc/stargazer/files/patches/stg-2.408-rscriptd-upstream.patch
new file mode 100644
index 000000000000..4e97da2f80e3
--- /dev/null
+++ b/net-misc/stargazer/files/patches/stg-2.408-rscriptd-upstream.patch
@@ -0,0 +1,26 @@
+--- projects/rscriptd/Makefile.org 2013-01-18 16:22:46.000000000 +0200
++++ projects/rscriptd/Makefile 2013-01-18 16:25:08.000000000 +0200
+@@ -68,6 +68,13 @@
+ # Install etc
+ mkdir -m $(DIR_MODE) -p $(PREFIX)/etc/rscriptd
+ install -m $(DATA_MODE) -o $(OWNER) ./rscriptd.conf $(PREFIX)/etc/rscriptd/rscriptd.conf
++ifeq ($(OS), linux)
++ install -D -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/linux/etc/stargazer/OnConnect $(PREFIX)/etc/rscriptd/
++ install -D -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/linux/etc/stargazer/OnDisconnect $(PREFIX)/etc/rscriptd/
++else
++ install -D -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/freebsd/etc/stargazer/OnConnect $(PREFIX)/etc/rscriptd/
++ install -D -m $(BIN_MODE) -o $(OWNER) ../stargazer/inst/freebsd/etc/stargazer/OnDisconnect $(PREFIX)/etc/rscriptd/
++endif
+
+ uninstall: uninstall-bin uninstall-data
+
+@@ -77,7 +84,8 @@
+ uninstall-data:
+ # Uninstall etc
+ rm -f $(PREFIX)/etc/rscriptd/rscriptd.conf
+-
++ rm -f $(PREFIX)/etc/rscriptd/OnConnect
++ rm -f $(PREFIX)/etc/rscriptd/OnDisconnect
+
+ ifneq ($(MAKECMDGOALS),distclean)
+ ifneq ($(MAKECMDGOALS),clean)
diff --git a/net-misc/stargazer/files/patches/stg-2.408-rscriptd.conf-upstream.patch b/net-misc/stargazer/files/patches/stg-2.408-rscriptd.conf-upstream.patch
new file mode 100644
index 000000000000..21746e59e8d1
--- /dev/null
+++ b/net-misc/stargazer/files/patches/stg-2.408-rscriptd.conf-upstream.patch
@@ -0,0 +1,80 @@
+--- projects/rscriptd/rscriptd.conf.org 2013-01-12 15:44:46.000000000 +0200
++++ projects/rscriptd/rscriptd.conf 2013-01-12 15:45:44.000000000 +0200
+@@ -1,8 +1,68 @@
+-LogFileName=/var/log/rscriptd.log
+-ExecutersNum=1
+-ConfigDir=/etc/rscriptd
+-Password=123456
+-Port=9999
+-UserTimeout=60
+-ScriptOnConnect=/etc/stargazer/OnConnect
+-ScriptOnDisconnect=/etc/stargazer/OnDisconnect
++################################################################################
++# Rscriptd Configuration file #
++################################################################################
++
++# LOG file name
++# Parameter: optional
++# Value: file path
++# Default: /var/log/rscriptd.log
++LogFileName = /var/log/rscriptd.log
++
++# Amount of rscriptd-exec processes.
++# These processes are responsible for the execution of scripts
++# OnConnect and OnDisconnect.
++# Amount of processes means how many scripts can be executed simultaneously.
++# Recommend to leave 1 to avoid errors when executing scripts
++# Parameter: optional
++# Value: 1 ... 1024
++# Default: 1
++ExecutersNum = 1
++
++# Message queue identifier for the script executer.
++# It may be changed if there're a needs to run multiple copies of rscriptd.
++# Warning: If you do not understand it, do not touch this setting!
++# Parameter: optional
++# Value: 0 ... 2 ^ 32
++# Default: 5555
++# ExecMsgKey = 5555
++
++# The path to directory where config files are
++# Parameter: optional
++# Value: directory path
++# Default: /etc/rscriptd
++ConfigDir = /etc/rscriptd
++
++# Defines password for the encryption exchange between
++# Stargazer server and rscriptd.
++# Parameter: optional
++# Value: any
++# Default: 123456
++Password = 123456
++
++# Defines port number for communication between
++# Stargazer server and rscriptd.
++# Parameter: optional
++# Value: 1 ... 65535
++# Default: 9999
++Port = 9999
++
++# User timeout. If Stargazer does not respond during this time,
++# the user will be disconnected.
++# Parameter: optional
++# Values: 5 ... 600
++# Default: 60
++UserTimeout = 60
++
++# Defines file which runs when user gets access
++# Parameter: optional
++# Value: file path
++# Default: /etc/rscriptd/OnConnect
++ScriptOnConnect = /etc/rscriptd/OnConnect
++
++# Defines file which runs when user loses access
++# Parameter: optional
++# Value: file path
++# Default: /etc/rscriptd/OnDisconnect
++ScriptOnDisconnect = /etc/rscriptd/OnDisconnect
++
++################################################################################
+\ No newline at end of file
diff --git a/net-misc/stargazer/files/patches/stg-2.408-sgauth.conf-upstream.patch b/net-misc/stargazer/files/patches/stg-2.408-sgauth.conf-upstream.patch
new file mode 100644
index 000000000000..213d35fd2db7
--- /dev/null
+++ b/net-misc/stargazer/files/patches/stg-2.408-sgauth.conf-upstream.patch
@@ -0,0 +1,112 @@
+--- projects/sgauth/sgauth.conf.org 2013-01-08 15:43:09.000000000 +0200
++++ projects/sgauth/sgauth.conf 2013-01-09 13:41:53.000000000 +0200
+@@ -1,37 +1,72 @@
+-#Stargazer server ip
+-ServerName=192.168.1.2
++################################################################################
++# Sgauth Configuration file #
++################################################################################
++
++# Stargazer server
++# Parameter: required
++# Values: IP address or DNS name
++# Default:
++ServerName = 192.168.1.2
++
++# Port on which Stargazer interacts with sgauth
++# Parameter: optional
++# Value: 1 ... 65535
++# Default: 5555
++ServerPort = 5555
++
++# User's login in Stargazer
++# Parameter: required
++# Value: any
++# Default:
++Login = test
++
++# Port on which sgauth interacts with Stargazer
++# Parameter: optional
++# Value: 1 ... 65535
++# Default: 0
++LocalPort = 12345
++
++# User's password in Stargazer
++# Parameter: required
++# Value: any
++# Default:
++Password = 123456
++
++# Defines should sgauth try to reestablish connection to Stargazer
++# if it was lost
++# Parameter: optional
++# Value: yes, no
++# Default: yes
++Reconnect = yes
++
++# Defines should sgauth run as daemon
++# Parameter: optional
++# Value: yes, no
++# Default: yes
++Daemon = yes
++
++# Web-page refresh period in built-in webserver
++# Parameter: optional
++# Value: any numeric (minutes)
++# Default: 10
++RefreshPeriod = 10
++
++# Defines should sgauth use built-in webserver
++# Parameter: optional
++# Value: yes, no
++# Default: no
++DisableWeb = no
++
++# Defines address on which sgauth's built-in webserver will listen
++# Parameter: optional
++# Value: IP address or DNS name
++# Default: 127.0.0.1
++ListenWebIP = 127.0.0.1
++
++# Defines should sgauth show it process ID in process list
++# Parameter: optional
++# Value: yes, no
++# Default: no
++ShowPid = no
+
+-#Stargazer server port
+-#Default value 5555
+-ServerPort=5555
+-
+-#User's login
+-Login=test
+-
+-#
+-#
+-LocalPort=12345
+-
+-#User's password
+-Password=1234567
+-
+-#
+-#Default value yes
+-#Reconnect=no
+-
+-#
+-#Default value yes
+-#Daemon=yes
+-
+-#Refresh web page period
+-#Default value 10
+-#RefreshPeriod=10
+-
+-#
+-#Default value 127.0.0.1
+-ListenWebIP=127.0.0.1
+-
+-#Default value no
+-DisableWeb=no
+-
+-#ShowPid=no
++################################################################################
+\ No newline at end of file
diff --git a/net-misc/stargazer/files/patches/stg-2.408-sgconv-upstream.patch b/net-misc/stargazer/files/patches/stg-2.408-sgconv-upstream.patch
new file mode 100644
index 000000000000..cfce675b1287
--- /dev/null
+++ b/net-misc/stargazer/files/patches/stg-2.408-sgconv-upstream.patch
@@ -0,0 +1,40 @@
+--- projects/sgconv/Makefile.org 2013-01-08 12:07:06.000000000 +0200
++++ projects/sgconv/Makefile 2013-01-08 12:07:11.000000000 +0200
+@@ -4,7 +4,7 @@
+
+ include ../../Makefile.conf
+
+-PROG = convertor
++PROG = sgconv
+
+ SRCS = ./main.cpp \
+ ./settings_impl.cpp
+--- projects/sgconv/build.org 2012-02-09 12:26:57.000000000 +0200
++++ projects/sgconv/build 2013-01-08 12:10:02.000000000 +0200
+@@ -45,13 +45,13 @@
+ if [ "$OS" = "unknown" ]
+ then
+ echo "#############################################################################"
+- echo "# Sorry, but convertor currently supported by Linux, FreeBSD 4.x, 5.x, 6.x #"
++ echo "# Sorry, but sgconv currently supported by Linux, FreeBSD 4.x, 5.x, 6.x #"
+ echo "#############################################################################"
+ exit 1
+ fi
+
+ echo "#############################################################################"
+-echo " Building convertor for $sys $release"
++echo " Building sgconv for $sys $release"
+ echo "#############################################################################"
+
+ STG_LIBS="logger.lib
+--- projects/sgconv/settings_impl.h.org 2013-01-08 12:11:53.000000000 +0200
++++ projects/sgconv/settings_impl.h 2013-01-08 12:11:58.000000000 +0200
+@@ -38,7 +38,7 @@
+
+ class SETTINGS_IMPL {
+ public:
+- SETTINGS_IMPL() : confFile("./convertor.conf") {}
++ SETTINGS_IMPL() : confFile("./sgconv.conf") {}
+ SETTINGS_IMPL(const std::string & cf) : confFile(cf) {}
+ ~SETTINGS_IMPL() {}
+ int ReadSettings();
diff --git a/net-misc/stargazer/files/patches/stg-2.408-static-libs.patch b/net-misc/stargazer/files/patches/stg-2.408-static-libs.patch
new file mode 100644
index 000000000000..723d177ac79a
--- /dev/null
+++ b/net-misc/stargazer/files/patches/stg-2.408-static-libs.patch
@@ -0,0 +1,10 @@
+--- stglibs/Makefile.org 2013-01-19 18:21:57.000000000 +0200
++++ stglibs/Makefile 2013-01-19 18:24:25.000000000 +0200
+@@ -15,6 +15,6 @@
+
+ clean: all
+
+-install: all
++install:
+
+ uninstall: all
diff --git a/net-misc/stargazer/files/rscriptd b/net-misc/stargazer/files/rscriptd
new file mode 100644
index 000000000000..7092a0e5bc18
--- /dev/null
+++ b/net-misc/stargazer/files/rscriptd
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+
+DAEMON=/usr/sbin/rscriptd
+RSCRIPTD_OPTS="/etc/stargazer/rscriptd.conf"
+PIDFILE="/run/rscriptd.pid"
+
+depend() {
+ need net
+ provide rscriptd
+}
+
+start() {
+ ebegin "Starting rscriptd"
+ start-stop-daemon --start --quiet --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} -- ${RSCRIPTD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping rscriptd"
+ start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
+ rm -f ${PIDFILE}
+ eend $?
+} \ No newline at end of file
diff --git a/net-misc/stargazer/files/sgauth b/net-misc/stargazer/files/sgauth
new file mode 100644
index 000000000000..130b525935d3
--- /dev/null
+++ b/net-misc/stargazer/files/sgauth
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+
+DAEMON=/usr/sbin/sgauth
+SGAUTH_OPTS="/etc/stargazer/sgauth.conf"
+PIDFILE="/run/sgauth.pid"
+
+depend() {
+ need net
+ provide sgauth
+}
+
+start() {
+ ebegin "Starting sgauth"
+ start-stop-daemon --start --quiet --pidfile ${PIDFILE} --exec ${DAEMON} -- ${SGAUTH_OPTS}
+ eend $?
+}
+
+start_post() {
+ pgrep -n $RC_SVCNAME > ${PIDFILE}
+}
+
+stop() {
+ ebegin "Stopping sgauth"
+ start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
+ rm -f ${PIDFILE}
+ eend $?
+} \ No newline at end of file
diff --git a/net-misc/stargazer/metadata.xml b/net-misc/stargazer/metadata.xml
new file mode 100644
index 000000000000..f4e2ab0eb5b6
--- /dev/null
+++ b/net-misc/stargazer/metadata.xml
@@ -0,0 +1,51 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>spiderx@spiderx.dp.ua</email>
+ <name>Vladimir Pavljuchenkov</name>
+ <description>Primary maintainer.</description>
+ </maintainer>
+ <herd>proxy-maintainers</herd>
+ <longdescription>
+ Stargazer is a powerful (inter)net billing system, capable of gathering
+ traffic statistics from many sources (such as NetFlow protocol,
+ ethernet packets capture, or IPQ subsystem), managing and billing user
+ accounts according to specified fees and rules (including time-based rules,
+ traffic source/destination rules and a payoff system).
+ This ebuild allows you to compile it yourself depending of your needs.
+ </longdescription>
+ <use>
+ <flag name="sgconv">Enable build of utility to convert Stargazer data between storage backends.</flag>
+ <flag name="radius">Enable build of FreeRADIUS module for data access via Stargazer.</flag>
+ <flag name="rscriptd">Enable build of remote script execute daemon for Stargazer, which run scripts when receive special signal from Stargazer.</flag>
+ <flag name="sgauth">Enable build of command-line utility for authorization in Stargazer.</flag>
+ <flag name="sgconf">Enable build of command-line utility for configuring Stargazer.</flag>
+ <flag name="sgconf_xml">Enable build of command-line xml-based utility for configuring Stargazer.</flag>
+ <flag name="stargazer">Enable build of Stargazer billing system.</flag>
+ <flag name="debug">Enable extra debug codepaths, like asserts and extra output.</flag>
+ <flag name="doc">Adds extra documentation (API, doc, etc).</flag>
+ <flag name="examples">Install examples, usually source code.</flag>
+ <flag name="static-libs">Install static libraries.</flag>
+ <flag name="module_auth_always_online">Enable build of "Always Online" authentication module for Stargazer.</flag>
+ <flag name="module_auth_internet_access">Enable build of "InetAccess" authentication module for Stargazer. InetAccess is a Stargazer specific authentication protocol.</flag>
+ <flag name="module_auth_freeradius">Enable build of "Radius" authentication module for Stargazer. This module capable of using RADIUS procotol for user authentication.</flag>
+ <flag name="module_capture_ether">Enable build of "Ethernet" traffic capture module for Stargazer. This module uses RAW sockets to capture traffic.</flag>
+ <flag name="module_capture_ipq">Enable build of "IPQ" traffic capture module for Stargazer. This module uses IPQ subsystem to capture traffic.</flag>
+ <flag name="module_capture_netflow">Enable build of "NetFlow" traffic capture module for Stargazer. This module capable of receiving traffic data by NetFlow protocol.</flag>
+ <flag name="module_config_rpcconfig">Enable build of "XMLRPC" configuration module for Stargazer. This module uses XML-RPC protocol for configuring Stargazer.</flag>
+ <flag name="module_config_sgconfig">Enable build of "SGConf" configuration module for Stargazer. This module uses Stargazer specific protocol for configuring Stargazer.</flag>
+ <flag name="module_other_ping">Enable build of "Ping" module for Stargazer. This module pings connected users from time to time to ensure they are alive.</flag>
+ <flag name="module_other_remote_script">Enable build of "Remote Script" module for Stargazer. This module control rscriptd daemon over the net and makes it execute scripts in reaction to different Stargazer events.</flag>
+ <flag name="module_other_smux">Enable build of SMUX module for Stargazer. This module uses SMUX protocol to provide various information about Stargazer.</flag>
+ <flag name="module_store_files">Enable build of storage plugin for Stargazer based on plain files.</flag>
+ <flag name="module_store_firebird">Enable build of storage plugin for Stargazer, which uses Firebird database for storage.</flag>
+ <flag name="module_store_mysql">Enable build of storage plugin for Stargazer, which uses MySQL for storage.</flag>
+ <flag name="module_store_postgres">Enable build of storage plugin for Stargazer, which uses PostgreSQL for storage.</flag>
+ </use>
+ <upstream>
+ <changelog>http://stg.dp.ua/server_dl.php</changelog>
+ <doc>http://stg.dp.ua/doc.php</doc>
+ <bugs-to>mailto:faust@stg.dp.ua</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/stargazer/stargazer-2.408.ebuild b/net-misc/stargazer/stargazer-2.408.ebuild
new file mode 100644
index 000000000000..a0d2ba8b5788
--- /dev/null
+++ b/net-misc/stargazer/stargazer-2.408.ebuild
@@ -0,0 +1,559 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils linux-info multilib user
+
+DESCRIPTION="Billing system for small home and office networks"
+HOMEPAGE="http://stg.dp.ua/"
+LICENSE="GPL-2"
+
+MY_P="stg-${PV}"
+SRC_URI="http://stg.dp.ua/download/server/${PV}/${MY_P}.tar.gz"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="stargazer? ( ^^ ( module_store_files module_store_firebird module_store_mysql module_store_postgres ) )"
+
+RDEPEND="module_config_rpcconfig? ( dev-libs/xmlrpc-c[abyss] sys-libs/zlib )
+ module_config_sgconfig? ( dev-libs/expat )
+ module_store_firebird? ( >=dev-db/firebird-2.0.3.12981.0-r6 )
+ module_store_mysql? ( virtual/mysql )
+ module_store_postgres? ( dev-db/postgresql dev-libs/openssl sys-libs/zlib )
+ sgconf? ( dev-libs/expat )
+ sgconf_xml? ( dev-libs/expat )"
+
+DEPEND="${RDEPEND}
+ doc? ( dev-libs/libxslt )"
+
+PROJECTS="sgconv rlm_stg rscriptd sgauth sgconf sgconf_xml stargazer"
+
+STG_MODULES_AUTH="always_online internet_access freeradius"
+STG_MODULES_CAPTURE="ipq ether netflow"
+STG_MODULES_CONFIG="sgconfig rpcconfig"
+STG_MODULES_OTHER="ping smux remote_script"
+STG_MODULES_STORE="files firebird mysql postgres"
+
+declare -A MODULES
+MODULES=( [module_auth_always_online]="authorization\/ao:mod_ao"
+ [module_auth_internet_access]="authorization\/inetaccess:mod_ia"
+ [module_auth_freeradius]="other\/radius:mod_radius"
+ [module_capture_ipq]="capture\/ipq_linux:mod_cap_ipq"
+ [module_capture_ether]="capture\/ether_linux:mod_cap_ether"
+ [module_capture_netflow]="capture\/cap_nf:mod_cap_nf"
+ [module_config_sgconfig]="configuration\/sgconfig:mod_sg"
+ [module_config_rpcconfig]="configuration\/rpcconfig:mod_rpc"
+ [module_other_ping]="other\/ping:mod_ping"
+ [module_other_smux]="other\/smux:mod_smux"
+ [module_other_remote_script]="other\/rscript:mod_remote_script"
+ [module_store_files]="store\/files:store_files"
+ [module_store_firebird]="store\/firebird:store_firebird"
+ [module_store_mysql]="store\/mysql:store_mysql"
+ [module_store_postgres]="store\/postgresql:store_postgresql"
+)
+
+IUSE="sgconv radius rscriptd sgauth sgconf sgconf_xml stargazer debug doc examples static-libs"
+
+for module in ${STG_MODULES_AUTH} ; do IUSE="${IUSE} module_auth_${module}" ; done
+for module in ${STG_MODULES_CAPTURE} ; do IUSE="${IUSE} module_capture_${module}" ; done
+for module in ${STG_MODULES_CONFIG} ; do IUSE="${IUSE} module_config_${module}" ; done
+for module in ${STG_MODULES_OTHER} ; do IUSE="${IUSE} module_other_${module}" ; done
+for module in ${STG_MODULES_STORE} ; do IUSE="${IUSE} module_store_${module}" ; done
+
+IUSE=${IUSE/stargazer/+stargazer}
+IUSE=${IUSE/module_store_files/+module_store_files}
+
+src_prepare() {
+ # Patches already in upstream's trunk
+ # Rename convertor to sgconv to avoid possible file name collisions
+ mv "${S}"/projects/convertor/ "${S}"/projects/sgconv/ || die "Couldn't move convertor folder"
+ mv "${S}"/projects/sgconv/convertor.conf "${S}"/projects/sgconv/sgconv.conf || die "Couldn't move convertor config"
+ epatch "${FILESDIR}"/patches/stg-2.408-sgconv-upstream.patch
+
+ # Fix dependency on fbclient for module_store_firebird
+ epatch "${FILESDIR}"/patches/stg-2.408-makefile-firebird-upstream.patch
+
+ # Debug support. Install radius lib to /usr/lib/freeradius
+ epatch "${FILESDIR}"/patches/stg-2.408-makefile-build-upstream.patch
+
+ # Don't compile sgconv always with debug. Remove MAKEOPTS=-j1
+ epatch "${FILESDIR}"/patches/stg-2.408-build-upstream.patch
+
+ # Rewrite config for rscriptd
+ epatch "${FILESDIR}"/patches/stg-2.408-rscriptd.conf-upstream.patch
+
+ # Rewrite config for sgauth
+ epatch "${FILESDIR}"/patches/stg-2.408-sgauth.conf-upstream.patch
+
+ # Standardization of 'On-scripts'
+ epatch "${FILESDIR}"/patches/stg-2.408-on-upstream.patch
+
+ # FreeBSD install directory
+ epatch "${FILESDIR}"/patches/stg-2.408-radius-upstream.patch
+
+ # Install demo scripts for rscriptd
+ epatch "${FILESDIR}"/patches/stg-2.408-rscriptd-upstream.patch
+
+ # Fix crush on stop
+ epatch "${FILESDIR}"/patches/stg-2.408-fix-crash-on-stop.patch
+
+ for project in ${PROJECTS} ; do
+ # Rename build script to configure for further econf launch in every projects
+ mv "${S}"/projects/${project}/build "${S}"/projects/${project}/configure || die "Couldn't move build folder for ${project}"
+
+ # Change check for debug build
+ sed -i 's/if \[ "$1" = "debug" \]/if \[ "${10}" = "--enable-debug" \]/' "${S}"/projects/${project}/configure || die "sed for debug check failed"
+ done
+
+ # Correct working directory, user and group for sgconv.conf, store_files.conf
+ # Correct paths for rscriptd.conf, store_firebird.conf, mod_remote_scriptd.conf, stargazer.conf, rpcconfig.cpp, 00-base-00.sql
+ epatch "${FILESDIR}"/patches/stg-2.408-correct-paths.patch
+
+ # Correct target install-data for stargazer, rscriptd, sgauth, remove debug symbols stripping
+ epatch "${FILESDIR}"/patches/stg-2.408-makefile.patch
+
+ # Remove make from script (for keeping symbols), always add variable to Makefile.conf for all projects
+ epatch "${FILESDIR}"/patches/stg-2.408-build.patch
+
+ # Remove static-libs if not needed
+ use static-libs || epatch "${FILESDIR}"/patches/stg-2.408-static-libs.patch
+
+ # Define which module to compile
+ for module in ${!MODULES[@]} ; do
+ if ! use $module ; then
+ sed -i "s/${MODULES[$module]%:*}//" "${S}"/projects/stargazer/configure || die "sed for module configure failed"
+ fi
+ done
+
+ # Correct Gentoo init script provided by upstream (TODO: Remove in further releases, already fixed in upstream's trunk)
+ if use stargazer ; then
+ sed -i 's/opts/extra_commands/' "${S}"/projects/stargazer/inst/linux/etc/init.d/stargazer.gentoo || die "sed for stargazer failed"
+ fi
+
+ # Correct Gentoo init script dependencies
+ if use module_store_files ; then
+ sed -i '11d' "${S}"/projects/stargazer/inst/linux/etc/init.d/stargazer.gentoo || die "sed for module_store_files failed"
+ fi
+
+ if use module_store_firebird ; then
+ sed -i '11d;s/need net/need net firebird/' "${S}"/projects/stargazer/inst/linux/etc/init.d/stargazer.gentoo || die "sed for module_store_firebird failed"
+ fi
+
+ if use module_store_mysql ; then
+ sed -i '11d;s/need net/need net mysql/' "${S}"/projects/stargazer/inst/linux/etc/init.d/stargazer.gentoo || die "sed for module_store_mysql failed"
+ fi
+
+ if use module_store_postgres ; then
+ sed -i '11d;s/need net/need net postgresql/' "${S}"/projects/stargazer/inst/linux/etc/init.d/stargazer.gentoo || die "sed for module_store_postgres failed"
+ fi
+
+ # Check for IPQ subsystem availability
+ ( use module_capture_ipq && kernel_is ge 3 5 ) && die "IPQ subsystem is gone since Linux kernel 3.5. You can't compile module_capture_ipq with your current kernel."
+
+ epatch_user
+}
+
+src_configure() {
+ # Define local variables, strip '+' symbol for used by default USE flags
+ local USEFLAGS=(${IUSE//+})
+ local PROJECTS=($PROJECTS)
+
+ for (( i = 0 ; i < ${#PROJECTS[@]} ; i++ )) ; do
+ if use ${USEFLAGS[$i]} ; then
+ cd "${S}"/projects/${PROJECTS[$i]} || die "cd to ${PROJECTS[$i]} failed"
+ econf $(use_enable debug)
+ fi
+ done
+}
+
+src_compile() {
+ # Define local variables, strip '+' symbol for used by default USE flags
+ local USEFLAGS=(${IUSE//+})
+ local PROJECTS=($PROJECTS)
+
+ # Set jobs to 1 for debug build
+ use debug && MAKEOPTS="-j1"
+
+ # Build necessary libraries first
+ touch "${S}"/Makefile.conf
+ cd "${S}"/stglibs || die "cd to stglibs failed"
+ emake STG_LIBS="ia.lib srvconf.lib"
+
+ for (( i = 0 ; i < ${#PROJECTS[@]} ; i++ )) ; do
+ if use ${USEFLAGS[$i]} ; then
+ cd "${S}"/projects/${PROJECTS[$i]} || die "cd to ${PROJECTS[$i]} failed"
+ emake
+ fi
+ done
+
+ if use doc ; then
+ cd "${S}"/doc/xmlrpc || die "cd to doc/xmlrpc failed"
+ emake
+ fi
+}
+
+src_install() {
+ dodoc ChangeLog
+
+ if use rscriptd || use stargazer ; then
+ # Install config file for logrotate
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/logrotate stargazer
+
+ # Keeping logs directory
+ diropts -m 755 -o stg -g stg
+ keepdir /var/log/stargazer
+ if use stargazer ; then
+ diropts -m 775 -o stg -g stg
+ keepdir /var/lib/stargazer
+ fi
+ fi
+
+ if use doc ; then
+ # Install files into docs directory
+ dodoc "${S}"/projects/stargazer/inst/var/base.dia
+ dodoc "${S}"/doc/proto_client.gif
+ dodoc "${S}"/doc/proto_server.gif
+
+ # Install html documentation
+ docinto html/xmlrpc
+ dohtml -r "${S}"/doc/xmlrpc/book/
+ fi
+
+ if use examples ; then
+ # Install files into specified directory
+ insinto /usr/share/stargazer
+ doins -r "${S}"/projects/stargazer/scripts
+ doins "${S}"/doc/xmlrpc.php
+ fi
+
+ if use sgconv ; then
+ cd "${S}"/projects/sgconv || die "cd to sgconv project failed"
+
+ emake DESTDIR="${D}" PREFIX="${D}" install
+
+ # Install files into specified directory
+ insinto /etc/stargazer
+ doins "${S}"/projects/sgconv/sgconv.conf
+
+ # Install manual page
+ doman "${FILESDIR}"/mans/sgconv.1
+ fi
+
+ if use radius ; then
+ cd "${S}"/projects/rlm_stg || die "cd to rlm_stg project failed"
+
+ emake DESTDIR="${D}" PREFIX="${D}" install
+ fi
+
+ if use rscriptd ; then
+ cd "${S}"/projects/rscriptd || die "cd to rscriptd project failed"
+
+ emake DESTDIR="${D}" PREFIX="${D}" install
+
+ # Install Gentoo init script
+ doinitd "${FILESDIR}"/rscriptd
+
+ # Correct permissions for file
+ fperms 0640 /etc/stargazer/rscriptd.conf
+
+ # Install manual page
+ doman "${FILESDIR}"/mans/rscriptd.8
+ fi
+
+ if use sgauth ; then
+ cd "${S}"/projects/sgauth || die "cd to sgauth project failed"
+
+ emake DESTDIR="${D}" PREFIX="${D}" install
+
+ # Correct permissions for file
+ fperms 0640 /etc/stargazer/sgauth.conf
+
+ # Install manual page
+ doman "${FILESDIR}"/mans/sgauth.8
+ fi
+
+ if use sgconf ; then
+ cd "${S}"/projects/sgconf || die "cd to sgconf project failed"
+
+ emake DESTDIR="${D}" PREFIX="${D}" install
+
+ # Install manual page
+ doman "${FILESDIR}"/mans/sgconf.1
+ fi
+
+ if use sgconf_xml ; then
+ cd "${S}"/projects/sgconf_xml || die "cd to sgconf_xml project failed"
+
+ emake DESTDIR="${D}" PREFIX="${D}" install
+
+ # Install manual page
+ doman "${FILESDIR}"/mans/sgconf_xml.1
+ fi
+
+ if use stargazer ; then
+ cd "${S}"/projects/stargazer || die "cd to stargazer project failed"
+
+ emake DESTDIR="${D}" PREFIX="${D}" install
+
+ # Install docs
+ dodoc BUGS CHANGES README TODO
+
+ # Install and rename Gentoo init script
+ newinitd "${S}"/projects/stargazer/inst/linux/etc/init.d/stargazer.gentoo stargazer
+
+ # Install manual page
+ doman "${FILESDIR}"/mans/stargazer.8
+
+ # Install files needed for module_store_files
+ if use module_store_files ; then
+ # Install files into specified directory
+ insinto /var/lib
+ doins -r "${S}"/projects/stargazer/inst/var/stargazer
+
+ # Correct user and group for files and directories
+ fowners -R stg:stg /var/lib/stargazer
+ fi
+
+ if use module_store_firebird ; then
+ # Install files into specified directory
+ insinto /usr/share/stargazer/db/firebird
+ doins \
+ "${S}"/projects/stargazer/inst/var/00-base-00.sql \
+ "${S}"/projects/stargazer/inst/var/00-alter-01.sql
+ fi
+
+ if use module_store_mysql ; then
+ # Install file into specified directory
+ insinto /usr/share/stargazer/db/mysql
+ doins "${S}"/projects/stargazer/inst/var/00-mysql-01.sql
+ fi
+
+ if use module_store_postgres ; then
+ # Install files into specified directory
+ insinto /usr/share/stargazer/db/postgresql
+ doins \
+ "${S}"/projects/stargazer/inst/var/00-base-00.postgresql.sql \
+ "${S}"/projects/stargazer/inst/var/00-alter-01.postgresql.sql
+ fi
+
+ if use module_other_smux ; then
+ # Install files into specified directory
+ insinto /usr/share/snmp/mibs
+ doins "${S}"/projects/stargazer/plugins/other/smux/STG-MIB.mib
+ fi
+
+ if use module_other_remote_script ; then
+ # Create subnets file based on example from mod_remote_script.conf
+ grep 192 "${S}"/projects/stargazer/inst/linux/etc/stargazer/conf-available.d/mod_remote_script.conf | sed 's/# //' > "${D}"/etc/stargazer/subnets
+
+ # Correct permissions for file
+ fperms 0640 /etc/stargazer/subnets
+ fi
+
+ # Correct permissions for files
+ fperms 0640 \
+ /etc/stargazer/rules \
+ /etc/stargazer/stargazer.conf
+
+ # Install files into specified directory for selected modules
+ insinto /etc/stargazer/conf-available.d
+ insopts -m 0640
+
+ for module in ${!MODULES[@]} ; do
+ use $module && doins "${S}"/projects/stargazer/inst/linux/etc/stargazer/conf-available.d/${MODULES[$module]#*:}.conf
+ done
+
+ # Create symlinks of configs for selected modules
+ for module in ${!MODULES[@]} ; do
+ use $module && dosym /etc/stargazer/conf-available.d/${MODULES[$module]#*:}.conf /etc/stargazer/conf-enabled.d/${MODULES[$module]#*:}.conf
+ done
+ fi
+
+ # Correct user and group for files and directories
+ ( use sgconv || use rscriptd || use sgauth || use stargazer ) && fowners -R stg:stg /etc/stargazer
+
+ # Put the files in the right folder to support multilib
+ if [ ! -e "${ED}"/usr/$(get_libdir) ] ; then
+ mv "${ED}"/usr/lib/ "${ED}"/usr/$(get_libdir) || die "Failed to move library directory for multilib support"
+ fi
+}
+
+pkg_setup() {
+ # Add user and group to system only when necessary
+ if use sgconv || use rscriptd || use sgauth || use stargazer ; then
+ enewgroup stg
+
+ # Add stg user to system (no home directory specified, because otherwise it will be result in stg:root ownership on it)
+ enewuser stg -1 -1 -1 stg
+ fi
+}
+
+pkg_postinst() {
+ if use sgconv ; then
+ einfo "\nSgconv:"
+ einfo "----------"
+ einfo " For further use of sgconv please edit /etc/stargazer/sgconv.conf depending on your needs."
+ fi
+
+ if use radius ; then
+ einfo "\nRadius:"
+ einfo "-------"
+ einfo " For further use of radius, emerge net-dialup/freeradius.\n"
+
+ einfo " Example config:\n"
+
+ einfo " stg {"
+ einfo " local_port = 6667"
+ einfo " server = localhost"
+ einfo " port = 6666"
+ einfo " password = 123456"
+ einfo " }\n"
+
+ einfo " You should place 'stg' into section Instantiate, Authorize."
+ einfo " In section Authentificate 'stg' should go in sub-section Auth-Type before other authentifications modules:\n"
+
+ einfo " Auth-Type PAP {"
+ einfo " stg"
+ einfo " pap"
+ einfo " }\n"
+
+ einfo " It also may be used in section Accounting and Post-Auth."
+
+ use module_auth_freeradius || einfo "\n For use RADIUS data processing you should also enable USE-flag module_auth_freeradius."
+ fi
+
+ if use rscriptd ; then
+ einfo "\nRemote Script Executer:"
+ einfo "-----------------------"
+ einfo " For further use of rscriptd please edit /etc/stargazer/rscriptd.conf depending on your needs."
+ einfo " You have to change 'Password' field at least."
+ fi
+
+ if use sgauth ; then
+ einfo "\nSgauth:"
+ einfo "-------"
+ einfo " For further use of sgauth please edit /etc/stargazer/sgauth.conf depending on your needs."
+ einfo " You have to change 'ServerName', 'Login', 'Password' fields at least."
+ fi
+
+ if use sgconf ; then
+ einfo "\nSgconf:"
+ einfo "-------"
+ use module_config_sgconfig || einfo " For further use of sgconf utility you should also enable USE-flag module_config_sgconfig."
+ fi
+
+ if use sgconf_xml ; then
+ einfo "\nSgconf_xml:"
+ einfo "-----------"
+ use module_config_rpcconfig || einfo " For further use of sgconf_xml utility you should also enable USE-flag module_config_rpcconfig."
+ fi
+
+ if use stargazer ; then
+ einfo "\nStargazer:"
+ einfo "----------"
+ einfo " Modules availability:\n"
+
+ if use module_auth_always_online ; then
+ einfo " * module_auth_always_online available."
+ fi
+
+ if use module_auth_internet_access ; then
+ einfo " * module_auth_internet_access available."
+ fi
+
+ if use module_auth_freeradius ; then
+ einfo " * module_auth_freeradius available.\n"
+ einfo " For further use of module, emerge net-dialup/freeradius.\n"
+ use radius || einfo "\n For use RADIUS data processing you should also enable use USE-flag radius."
+ fi
+
+ if use module_capture_ipq ; then
+ einfo " * module_capture_ipq available."
+ fi
+
+ if use module_capture_ether ; then
+ einfo " * module_capture_ether available."
+ fi
+
+ if use module_capture_netflow ; then
+ einfo " * module_capture_netflow available.\n"
+ einfo " For further use of module, emerge net-firewall/ipt_netflow or net-analyzer/softflowd.\n"
+ fi
+
+ if use module_config_sgconfig ; then
+ einfo " * module_config_sgconfig available."
+ fi
+
+ if use module_config_rpcconfig ; then
+ einfo " * module_config_rpcconfig available.\n"
+ einfo " KNOWN BUG: Sometimes you can't configure Stargazer through xml-based configurator,"
+ einfo " because module is not responding."
+ einfo " This bug is introduced by xmlrpc-c library. This bug proceeds very rare, but it still exists.\n"
+ fi
+
+ if use module_other_ping ; then
+ einfo " * module_other_ping available."
+ fi
+
+ if use module_other_smux ; then
+ einfo " * module_other_smux available.\n"
+ einfo " For further use of module emerge net-analyzer/net-snmp.\n"
+ fi
+
+ if use module_other_remote_script ; then
+ einfo " * module_other_remote_script available.\n"
+ einfo " Don't forget to edit /etc/stargazer/subnets file depending on your needs."
+ fi
+
+ if use module_store_files ; then
+ einfo " * module_store_files available.\n"
+ einfo " Necessary and sufficient rights to the directory /var/lib/stargazer for this backend is 0755."
+ einfo " You may fix it if needed.\n"
+ fi
+
+ if use module_store_firebird ; then
+ einfo " * module_store_firebird available.\n"
+ einfo " Necessary and sufficient rights to the directory /var/lib/stargazer for this backend is 0775."
+ einfo " Check that it was so, and fix it if needed."
+ einfo " You should add 'firebird' user to stg group:\n"
+ einfo " # usermod -a -G stg firebird\n"
+ einfo " and restart firebird:\n"
+ einfo " # /etc/init.d/firebird restart\n"
+ einfo " Stargazer DB schema for Firebird is here: /usr/share/stargazer/db/firebird"
+ einfo " For new setup you should execute 00-base-00.sql:\n"
+ einfo " # fbsql -q -i /usr/share/stargazer/db/firebird/00-base-00.sql\n"
+ einfo " For upgrade from version 2.406 you should execute 00-alter-01.sql:\n"
+ einfo " # fbsql -q -u <username> -p <password> -d <database> -i /usr/share/stargazer/db/firebird/00-alter-01.sql\n"
+ fi
+
+ if use module_store_mysql ; then
+ einfo " * module_store_mysql available.\n"
+ einfo " For upgrade from version 2.406 you should execute 00-mysql-01.sql:\n"
+ einfo " # mysql -h <hostname> -P <port> -u <username> -p <password> <database> < /usr/share/stargazer/db/mysql/00-mysql-01.sql\n"
+ fi
+
+ if use module_store_postgres ; then
+ einfo " * module_store_postgres available.\n"
+ einfo " Stargazer DB schema for PostgresSQL is here: /usr/share/stargazer/db/postgresql"
+ einfo " For new setup you should execute 00-base-00.postgresql.sql:\n"
+ einfo " # psql -h <hostname> -p <port> -U <username> -d <database> -W -f /usr/share/stargazer/db/postgresql/00-base-00.postgresql.sql\n"
+ einfo " For upgrade from version 2.406 you should execute 00-alter-01.sql:\n"
+ einfo " # psql -h <hostname> -p <port> -U <username> -d <database> -W -f /usr/share/stargazer/db/postgresql/00-alter-01.sql\n"
+ fi
+
+ einfo "\n For all storage backends:\n"
+ einfo " * Default admin login - admin, default admin password - 123456."
+ einfo " * Default subscriber login - test, default subscriber password - 123456.\n"
+ einfo "Don't run newer versions without reading their ChangeLog first,"
+ einfo "it can be found in /usr/share/doc/${PF}"
+ fi
+
+ if use debug ; then
+ ewarn "\nThis is a debug build. You should avoid to use it in production.\n"
+ fi
+}
diff --git a/net-misc/stone/Manifest b/net-misc/stone/Manifest
new file mode 100644
index 000000000000..c68c8389fa10
--- /dev/null
+++ b/net-misc/stone/Manifest
@@ -0,0 +1 @@
+DIST stone-2.3e.tar.gz 92587 SHA256 b2b664ee6771847672e078e7870e56b886be70d9ff3d7b20d0b3d26ee950c670 SHA512 a0cccc123222c4fb4c1b2f031fc4d039f39e77691adc9f1df367d99bef8524738265350d1056c926c5f216236d2db25f31d14e9bec297b1bb4ea17e217c4983b WHIRLPOOL f73f5dd7d91f0d0e68065b0dd20adf50865c5081f1628154d9bf4b5c8c11fe9aa2355e7cc4dc6409f241325f509af4e5f1dd7eaf690eecca794c191dfa72028a
diff --git a/net-misc/stone/files/stone-2.3e-makefile.patch b/net-misc/stone/files/stone-2.3e-makefile.patch
new file mode 100644
index 000000000000..5df2b6868a24
--- /dev/null
+++ b/net-misc/stone/files/stone-2.3e-makefile.patch
@@ -0,0 +1,20 @@
+--- Makefile.orig 2013-02-20 17:45:36.000000000 +0400
++++ Makefile 2013-02-20 17:47:19.323650328 +0400
+@@ -19,8 +19,6 @@
+ # -DWINDOWS Windows95/98/NT
+ # -DNT_SERVICE WindowsNT/2000 native service
+
+-CFLAGS= # -g
+-
+ SSL= /usr/local/ssl
+ SSL_FLAGS= -DUSE_SSL
+ SSL_LIBS= -lssl -lcrypto
+@@ -60,7 +58,7 @@
+ @echo "*** md5c.c is contained in RFC1321"
+
+ stone: stone.c
+- $(CC) $(CFLAGS) $(FLAGS) -o $@ $? $(LIBS)
++ $(CC) $(CFLAGS) $(FLAGS) ${LDFLAGS} -o $@ $? $(LIBS)
+
+ pop_stone: $(POP_LIBS)
+ $(MAKE) FLAGS="$(POP_FLAGS)" LIBS="$(POP_LIBS)" $(TARGET)
diff --git a/net-misc/stone/files/stone.man b/net-misc/stone/files/stone.man
new file mode 100644
index 000000000000..fa10c6eef18f
--- /dev/null
+++ b/net-misc/stone/files/stone.man
@@ -0,0 +1,464 @@
+.\" Roff format skeleton provided by Taketo Kabe <kabe@sra-tohoku.co.jp>
+.TH stone 1 "version 2.3"
+.
+.SH NAME
+stone \- Simple Repeater
+.
+.SH SYNOPSIS
+.B "stone [-C \fIfile\fP] [-P \fIcommand\fP] [-Q \fIoptions\fP] [-N] [-d] [-p] [-n]"
+.br
+.B " [-u \fImax\fP] [-f \fIn\fP] [-l] [-L \fIfile\fP] [-a \fIfile\fP] [-i \fIfile\fP]"
+.br
+.B " [-X \fIn\fP] [-T \fIn\fP] [-r]"
+.br
+.B " [-x \fIport\fP[,\fIport\fP][-\fIport\fP]... \fIxhost\fP... --]"
+.br
+.B " [-s \fIsend\fP \fIexpect\fP... --]"
+.br
+.B " [-b [\fIvar\fP=\fIval\fP]... \fIn\fP \fImaster\fP:\fIport\fP \fIbackup\fP:\fIport\fP]"
+.br
+.B " [-B \fIhost\fP:\fIport\fP \fIhost1\fP:\fIport1\fP... --]"
+.br
+.B " [-I \fIhost\fP]"
+.br
+.B " [-o \fIn\fP] [-g \fIn\fP] [-t \fIdir\fP] [-D] [-c \fIdir\fP]"
+.br
+.B " [-q \fISSL\fP] [-z \fISSL\fP]"
+.br
+.B " [-M install \fIname\fP] [-M remove \fIname\fP]"
+.br
+.B " \fIst\fP [-- \fIst\fP]..."
+.
+.SH DESCRIPTION
+\fBStone\fP is a TCP & UDP repeater in the application layer. It repeats TCP
+and UDP from inside to outside of a firewall, or from outside to inside.
+.P
+\fBStone\fP has following features:
+.
+.TP
+.B 1. Stone supports Win32.
+Formerly, UNIX machines are used as firewalls, but recently
+WindowsNT machines are used, too. You can easily run \fBstone\fP on
+WindowsNT and Windows95. Of course, available on Linux,
+FreeBSD, BSD/OS, SunOS, Solaris, HP-UX and so on.
+.
+.TP
+.B 2. Simple.
+\fBStone\fP's source code is only 8000 lines long (written in C
+language), so you can minimize the risk of security
+holes.
+.
+.TP
+.B 3. Stone supports SSL.
+Using OpenSSL (\fIhttp://www.openssl.org/\fP), \fBstone\fP can
+encrypt/decrypt. Client verifications, and server verifications
+are also supported. \fBStone\fP can send a substring of the subject
+of the certificate to the destination.
+.
+.TP
+.B 4. Stone is a http proxy.
+\fBStone\fP can also be a tiny http proxy.
+.
+.TP
+.B 5. POP -> APOP conversion.
+With \fBstone\fP and a mailer that does not support APOP, you can
+access to an APOP server.
+.
+.TP
+.B 6. Stone supports IPv6.
+\fBStone\fP can convert IP and IPv6 each other. With \fBstone\fP, you can
+use IP-only software on IPv6 network.
+.
+.SH OPTIONS
+If the \fB-C\fP \fIfile\fP flag is used, the program read these
+options and \fIst\fPs from the configuration file \fIfile\fP.
+If the \fB-P\fP \fIcommand\fP flag is used, the program executes
+specified pre-processor to read the configuration file. \fB-Q\fP \fIoptions\fP
+can be used to pass options to the pre-processor. If the \fB-N\fP
+flag is used, \fBstone\fP will terminate after parsing options
+and configuration file without opening the ports.
+.P
+If the \fB-d\fP flag is used, then increase the debug level. If
+the \fB-p\fP flag is used, data repeated by \fBstone\fP are dumped. If
+the \fB-n\fP is used, IP addresses and service port numbers are
+shown instead of host names and service names.
+.P
+If the \fB-u\fP \fImax\fP flag (\fImax\fP is integer) is used, the
+program memorize \fImax\fP UDP sources simultaneously. The default value
+is 100. If the
+\fB-f\fP \fIn\fP flag (\fIn\fP is integer) is used, the program spawn
+\fIn\fP child processes. The default behavior is not to spawn any child processes.
+.P
+If the \fB-l\fP flag is used, the program sends error messages to
+the syslog instead of stderr. If the \fB-L\fP \fIfile\fP (\fIfile\fP
+is a file name) flag is used, the program writes error messages
+to the file. If the \fB-a\fP \fIfile\fP flag is used, the program
+writes accounting to the file. If the \fB-i\fP \fIfile\fP flag is
+used, the program writes its process ID to the file.
+.P
+The \fB-X\fP \fIn\fP flag alters the buffer size of the repeater.
+The default value is 1000 bytes. If
+the \fB-T\fP \fIn\fP is used, the timeout of TCP sessions can be
+specified to \fIn\fP sec. Default: 600 (10 min). The \fB-r\fP flag is
+used, SO_REUSEADDR is set on the socket of \fIst\fP .
+.P
+Using the \fB-x\fP \fIport\fP[,\fIport\fP][-\fIport\fP]... \fIxhost\fP... \fB--\FP flag,
+the http proxy (described later) can only connect to
+\fIxhost\fP:\fIport\fP. If more than one \fB-x\fP ... \fB--\fI flags are
+designated, the posterior one whose \fIport\fP list matches the
+connecting port. If the \fB-x\fP \fB--\fP is used, prior \fB-x\fP flags
+are ignored.
+.P
+The \fB-b\fP \fIn\fP \fImaster\fP:\fIport\fP \fIbackup\fP:\fIport\fP flag designates
+the backup destination for \fImaster\fP:\fIport\fP. The program checks
+every \fIn\fP seconds whether \fImaster\fP:\fIport\fP is connectable, using
+the health check script defined by \fB-s\fP flag described below.
+If not, the backup is used instead. Alternative \fIhost\fP can be
+checked, using host=\fIhost\fP and alternative \fIport\fP, using
+port=\fIport\fP.
+.P
+The \fB-s\fP \fIsend\fP \fIexpect\fP... \fB--\fP flag defines the health check
+script. Sending \fIsend\fP, then checks whether the response match
+the regular expression \fIexpect\fP.
+.P
+The \fB-B\fP \fIhost\fP:\fIport\fP \fIhost1\fP:\fIport1\fP... \fB--\fP is for the
+destination group. If the destination of \fIst\fP is \fIhost\fP:\fIport\fP,
+the program chooses a destination randomly from the group. The
+destination \fIhost\fP:\fIport\fP that is designated by \fB-b\fP flag and
+turned out unhealthy, is excluded from the group.
+.P
+The \fB-I\fP \fIhost\fP designates the interface used as the source
+address of the connection to the desctination.
+.P
+If the \fB-o\fP \fIn\fP or \fB-g\fP \fIn\fP flag is used, the program set
+its uid or gid to \fIn\fP respectively. If the \fB-t\fP \fIdir\fP
+flag (\fIdir\fP is a directory) is used, the program change its
+root to the directory. If the \fB-D\fP flas is used, \fBstone\fP runs
+as a daemon. The \fB-c\fP \fIdir\fP flag designates the
+directory for core dump.
+.P
+The \fB-M\fP install \fIname\fP and the \fB-M\fP remove \fIname\fP flags are
+for NT service. \fIname\fP is the service name. Start the
+service using the command: net start \fIname\fP. To install \fBstone\fP
+service as the name \fIrepeater\fP, for example:
+.P
+.RS
+C:\\>\fBstone -M install \fIrepeater\fB -C \fIC:\\stone.cfg\fR
+.br
+C:\\>\fBnet start \fIrepeater\fR
+.RE
+.P
+The \fB-q\fP \FISSL\FP and the \fB-z\fP \FISSL\FP flags are for SSL
+encryption. The \fB-q\fP \FISSL\FP is for the client mode, that is,
+when \fBstone\fP connects to the other SSL server as a SSL client.
+The \fB-z\fP \FISSL\FP if for the server mode, that is, when other SSL
+clients connect to the \fBstone\fP.
+.P
+\FISSL\FP is one of the following.
+.P
+.PD 0
+.IP default 15
+reset SSL options to the default.
+Using multiple \fIst\fP, different SSL options can
+be designated for each \fIst\fP.
+.IP verbose
+verbose mode.
+.IP verify
+require SSL certificate to the peer.
+.IP verify,once
+request a client certificate on the initial TLS/SSL
+handshake. (\fB-z\fP only)
+.IP verify,ifany
+The certificate returned (if any) is checked. (\fB-z\fP only)
+.IP verify,none
+never request SSL certificate to the peer.
+.IP crl_check
+lookup CRLs.
+.IP crl_check_all
+lookup CRLs for whole chain.
+.IP uniq
+if the serial number of peer's SSL certificate
+is different from the previous session, deny it.
+.IP re\fIn\fP=\fIregex\fP
+The certificate of the peer must satisfy the
+\fIregex\fP. \fIn\fP is the depth. re0 means the subject
+of the certificate, and re1 means the issure.
+The maximum of \fIn\fP is 9.
+.IP depth=\fIn\fP
+The maximum of the certificate chain.
+If the peer's certificate exceeds \fIn\fP, the
+verification fails. The maximum of \fIn\fP is 9.
+.IP tls1
+Just use TLSv1 protocol.
+.IP ssl3
+Just use SSLv3 protocol.
+.IP ssl2
+Just use SSLv2 protocol.
+.IP no_tls1
+Turn off TLSv1 protocol.
+.IP no_ssl3
+Turn off SSLv3 protocol.
+.IP no_ssl2
+Turn off SSLv2 protocol.
+.IP bugs
+Switch on all SSL implementation bug workarounds.
+.IP serverpref
+Use server's cipher preferences (only SSLv2).
+.IP sid_ctx=\fIstr\fP
+Set session ID context.
+.IP passfile=\fIfile\fP
+The filename of the file containing password of the key
+.IP key=\fIfile\fP
+The filename of the secret key of the certificate.
+.IP cert=\fIfile\fP
+The filename of the certificate.
+.IP CAfile=\fIfile\fP
+The filename of the certificate of the CA.
+.IP CApath=\fIdir\fP
+The directory of the certificate files.
+.IP pfx=\fIfile\fP
+The filename of the PKCS#12 bag.
+.IP cipher=\fIlist\fP
+The list of ciphers.
+.IP lb\fIn\fP=\fIm\fP
+change the destination according to the
+certificate of the peer. The number calculated
+from the matched string to the \fIn\fPth ( ... ) in
+the ``regex'' of SSL options (mod \fIm\fP) is used
+to select the destination from the destination
+group defined by \fB-B\fP flag.
+.PD
+.P
+\fIst\fP is one of the following. Multiple \fIst\fP can be
+designated, separated by \fB--\fP.
+.P
+.PD 0
+.IP (1)
+\fIhost\fP:\fIport\fP \fIsport\fP [\fIxhost\fP...]
+.IP (2)
+\fIhost\fP:\fIport\fP \fIshost\fP:\fIsport\fP [\fIxhost\fP...]
+.IP (3)
+proxy \fIsport\fP [\fIxhost\fP...]
+.IP (4)
+\fIhost\fP:\fIport\fP/http \fIrequest\fP [\fIxhost\fP...]
+.IP (5)
+\fIhost\fP:\fIport\fP/proxy \fIheader\fP [\fIxhost\fP...]
+.IP (6)
+health \fIsport\fP [\fIxhost\fP...]
+.PD
+.P
+The program repeats the connection on port \fIsport\fP to the
+other machine \fIhost\fP port \fIport\fP. If the machine, on
+which the program runs, has two or more interfaces, type (2) can
+be used to repeat the connection on the specified interface
+\fIshost\fP. You can also specify path name that begins with
+``/'' or ``./'', instead of \fIhost\fP:\fIport\fP so that the
+program handles a unix domain socket.
+.P
+Type (3) is a http proxy. Specify the machine, on which the
+program runs, and port \fIsport\fP in the http proxy settings of
+your WWW browser.
+Extentions can be added to the ``proxy'' like \fIxhost\fP/\fIext\fP.
+\fIext\fP is:
+.P
+.IP v4only
+limit the destination within IP addresses.
+.IP v6only
+limit the destination within IPv6 addresses.
+.P
+Type (4) relays stream over http request. \fIrequest\fP is the
+request specified in HTTP 1.0. In the \fIrequest\fP, \ is
+the escape character, and the following substitution occurs.
+.PP
+.RS 8
+.PD 0
+.IP \\\\n 8
+newline (0x0A)
+.IP \\\\r
+return (0x0D)
+.IP \\\\t
+tab (0x09)
+.IP \\\\\\\\
+\ itself (0x5C)
+.IP \\\\a
+the IP address of the client connecting to the \fBstone\fP.
+.IP \\\\A
+\fIIP address of the client\fP:\fIport number\fP
+.IP \\\\0
+the serial number of peer's SSL certificate.
+.IP "\\\\1 - \\\\9"
+the matched string in the ``regex'' of SSL options.
+.IP \\\\?1\fIthen\fP\\\\:\fIelse\fP\\\\/
+if \1 (\2 - \9 in a similar way) is not null,
+\fIthen\fP, otherwise \fIelse\fP.
+.PD
+.RE
+.P
+Type (5) repeats http request with \fIheader\fP in the top of
+request headers. The above escapes can be also used.
+.P
+Type (6) designates the port that other programs can check
+whether the \fBstone\fP runs `healthy' or not. Following commands are
+available to check the \fBstone\fP.
+.P
+.RS 8
+.PD 0
+.IP "HELO \fIany string\fP" 24
+returns the status of the \fBstone\fP
+.IP "LIMIT \fIvar\fP \fIn\fP"
+check the value of \fIvar\fP is
+less than \fIn\fP
+.PD
+.RE
+.P
+\fIvar\fP is one of the following:
+.P
+.RS 8
+.PD 0
+.IP PAIR 16
+the number of ``pair''
+.IP CONN
+the number of ``conn''
+.IP ESTABLISHED
+seconds passed since the last conn established
+.IP READWRITE
+seconds passed since the last read/write
+.IP ASYNC
+the number of threads
+.PD
+.RE
+.P
+The response of the \fBstone\fP is 2xx when normal, or 5xx when
+abnormal on the top of line.
+.P
+If the \fIxhost\fP are used, only machines or its IP addresses
+listed in \fIxhost\fP separated by space character can
+connect to the program and to be repeated.
+.P
+Extentions can be added to the \fIxhost\fP like
+\fIxhost\fP/\fIex\fP,\fIex\fP.... \fIex\fP is:
+.IP \fIm\fP
+You can designate the length of prefix bits of the
+netmask, so that only machines on specified. In the
+case of class C network 192.168.1.0, for example, use
+``192.168.1.0/24''.
+.IP v4
+\fIxhost\fP is resolved as the IP address.
+.IP v6
+\fIxhost\fP is resolved as the IPv6 address.
+.IP p\fIm\fP
+the data repeated by the program are dumped, only if it
+was connected by the machines specified by \fIxhost\fP. \fIm\fP
+is the dump mode, equivalent to the number of \fB-p\fP
+options.
+.P
+Use ``!'' instead of ``\fIxhost\fP'', to deny machines by following
+\fIxhost\fP.
+.P
+Extentions can be added to the \fIport\fP like
+\fIport\fP/\fIext\fP,\fIext\fP.... \fIext\fP is:
+.IP udp
+repeats UDP instead of TCP.
+.IP ssl
+forwards with encryption.
+.IP v6
+connects to the destination using IPv6.
+.IP base
+forwards with MIME base64 encoding.
+.P
+Extentions can be added to the \fIsport\fP like
+\fIsport\fP/\fIext\fP,\fIext\fP.... \fIext\fP is:
+.IP udp
+repeats UDP instead of TCP.
+.IP apop
+converts POP to APOP. The conversion is derived from
+the RSA Data Security, Inc. MD5 Message-Digest Algorithm.
+.IP ssl
+forwards with decryption.
+.IP v6
+accepts connection using IPv6. If \fIshost\fP is omitted
+like (1), IP is also acceptable.
+.IP v6only
+accepts connection using IPv6 only. Even if \fIshost\fP is
+omitted like (1), IP is not acceptable.
+.IP base
+forwards with MIME base64 decoding.
+.IP http
+relays stream over http.
+.IP ident
+identifies the owner of the incoming connection
+on the peer using ident protocol (RFC1413).
+.SH EXAMPLES
+.PD 0
+.IP \fIouter\fP\^:
+a machine in the outside of the firewall
+.IP \fIinner\fP\^:
+a machine in the inside of the firewall
+.IP \fIfwall\fP\^:
+the firewall on which the \fBstone\fP is executed
+.PD
+.TP
+\fBstone \fIouter\fB:telnet 10023\fR
+Repeats the telnet protocol to \fIouter\fP.
+Run telnet fwall 10023 on \fIinner\fR.
+.TP
+\fBstone \fIouter\fB:domain/udp domain/udp\fR
+Repeats the DNS query to \fIouter\fP.
+Run \fBnslookup -\fP \fIfwall\fP on \fIinner\fP.
+.TP
+\fBstone \fIouter\fB:ntp/udp ntp/udp\fR
+Repeats the NTP to \fIouter\fP.
+Run \fBntpdate \fIfwall\fR on \fIinner\fP.
+.TP
+\fBstone localhost:http 443/ssl\fR
+Make WWW server that supports https.
+Access \fBhttps://\fIfwall\fB/\fR using a WWW browser.
+.TP
+\fBstone localhost:telnet 10023/ssl\fR
+Make telnet server that supports SSL.
+Run \fBSSLtelnet -z ssl \fIfwall\fB 10023\fR on \fIinner\fP.
+.TP
+\fBstone proxy 8080\fR
+http proxy
+.TP
+\fBstone\fP \fIouter\fB:110/apop 110\fR
+connect to \fIinner\fP:pop using a mailer that does not
+support APOP.
+.PP
+Where \fIfwall\fP is a http proxy (port 8080):
+.TP
+\fBstone \fIfwall\fB:8080/http 10023 'POST http://\fIouter\fB:8023 HTTP/1.0'\fR
+.br
+.ns
+.TP
+\fBstone localhost:telnet 8023/http
+.nf
+Run \fBstone\fPs on \fIinner\fP and \fIouter\fP respectively.
+Relays stream over http.
+.TP
+\fBstone \fIfwall\fB:8080/proxy 9080 \'Proxy-Authorization: Basic \fIc2VuZ29rdTpoaXJvYWtp\fB\'\fR
+for browser that does not support proxy authorization.
+.fi
+.
+.SH HOMEPAGE
+The official homepage of \fBstone\fP is:
+.br
+\fIhttp://www.gcd.org/sengoku/stone/\fP
+.
+.SH COPYRIGHT
+All rights about this program \fBstone\fP are reserved by the
+original author, Hiroaki Sengoku. The program is free software;
+you can redistribute it and/or modify it under the terms of the
+\fIGNU IGeneral Public License (GPL)\fP. Furthermore you can link it
+with openssl.
+.
+.SH NO WARRANTY
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY.
+.
+.SH AUTHOR
+.nf
+Hiroaki Sengoku
+sengoku@gcd.org
+http://www.gcd.org/sengoku/
+.fi
diff --git a/net-misc/stone/metadata.xml b/net-misc/stone/metadata.xml
new file mode 100644
index 000000000000..a335687d5a3e
--- /dev/null
+++ b/net-misc/stone/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>maintainer-needed@gentoo.org</email>
+</maintainer>
+<longdescription>Stone is a TCP/IP packet repeater in the application layer. It repeats TCP and UDP packets from inside to outside of a firewall, or from outside to inside.</longdescription>
+</pkgmetadata>
diff --git a/net-misc/stone/stone-2.3e-r1.ebuild b/net-misc/stone/stone-2.3e-r1.ebuild
new file mode 100644
index 000000000000..27d02fce8bcc
--- /dev/null
+++ b/net-misc/stone/stone-2.3e-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="A simple TCP/IP packet repeater"
+HOMEPAGE="http://www.gcd.org/sengoku/stone/"
+SRC_URI="http://www.gcd.org/sengoku/stone/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ~sparc x86"
+IUSE="ssl"
+
+DEPEND="ssl? ( dev-libs/openssl )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}-2.3d-2.3.2.7"
+
+PATCHES=( "${FILESDIR}/${P}-makefile.patch" ) # bug #337879
+
+src_prepare() {
+ tc-export CC
+ append-cflags "-D_GNU_SOURCE"
+
+ epatch ${PATCHES[@]}
+ epatch_user
+}
+
+src_compile() {
+ local myargs
+ if use ssl ; then
+ myargs="SSL=/usr linux-ssl"
+ else
+ myargs="linux"
+ fi
+ emake ${myargs}
+}
+
+src_install() {
+ dobin stone
+ newman "${FILESDIR}/${PN}.man" "${PN}.1"
+ dodoc README*
+}
diff --git a/net-misc/streamtuner/Manifest b/net-misc/streamtuner/Manifest
new file mode 100644
index 000000000000..99c0542df118
--- /dev/null
+++ b/net-misc/streamtuner/Manifest
@@ -0,0 +1,2 @@
+DIST streamtuner-0.99.99-pygtk-2.6.diff 437 SHA256 8629df3b297f57b94afddf479c405b3922a74447318fbb8075cbdd0b91bac7ec SHA512 2471df9ba05d06b44f0f859d61799c92388bbe4ec78d334c1bb33f6f290b7991b4d4e8c53ecbed9052b3f1aa0cdac71f7bc6a1c183dd37e4f31918e50f17b7f7 WHIRLPOOL 5903121cb16a580fa869ef1e4c6c45910ef6d88518d02273e5a7ea4ac22b1ae8fae412a730d7a9e13858a43fa4aa2d71b6b9098e95d47d3e50f1b6d86e31941e
+DIST streamtuner-0.99.99.tar.gz 948075 SHA256 5c223a5e8dab9e504617bd221914e97bd2f0ae5f6ed8fe78b8ea8b427fee9123 SHA512 a0b185847e2c7b70f8e9c393c28379cac889b6508ace0d3db2ddf86afa4f705d1faebccc90c053123d139813730f25c033eac5c0545e9eb9a8ae4b70031cf7ef WHIRLPOOL 0efba3233b240e9868c936b5b793364693a7af3b764c95b1e19061ad13c1ef444dd94a046e40d67d50ae85c25c0ee8bbbd82b6d06fbd88ed577fd6475c0ca1b9
diff --git a/net-misc/streamtuner/files/streamtuner-0.99.99-audacious.patch b/net-misc/streamtuner/files/streamtuner-0.99.99-audacious.patch
new file mode 100644
index 000000000000..75eb2738e6b0
--- /dev/null
+++ b/net-misc/streamtuner/files/streamtuner-0.99.99-audacious.patch
@@ -0,0 +1,60 @@
+diff -ur streamtuner-0.99.99.orig/src/plugins/live365/live365.c streamtuner-0.99.99/src/plugins/live365/live365.c
+--- streamtuner-0.99.99.orig/src/plugins/live365/live365.c 2004-12-19 12:27:03.000000000 +0200
++++ streamtuner-0.99.99/src/plugins/live365/live365.c 2009-01-18 20:03:35.000000000 +0200
+@@ -1411,7 +1411,7 @@
+
+ st_action_register("record-stream", _("Record a stream"), "xterm -e streamripper %q");
+ st_action_register("view-web", _("Open a web page"), "epiphany %q");
+- st_action_register("play-stream", _("Listen to a stream"), "xmms %q");
++ st_action_register("play-stream", _("Listen to a stream"), "audacious2 %q");
+
+ return TRUE;
+ }
+diff -ur streamtuner-0.99.99.orig/src/plugins/local/local.c streamtuner-0.99.99/src/plugins/local/local.c
+--- streamtuner-0.99.99.orig/src/plugins/local/local.c 2004-12-13 09:39:29.000000000 +0200
++++ streamtuner-0.99.99/src/plugins/local/local.c 2009-01-18 20:03:49.000000000 +0200
+@@ -1057,7 +1057,7 @@
+
+ init_handler();
+
+- st_action_register("play-m3u", _("Listen to a .m3u file"), "xmms %q");
++ st_action_register("play-m3u", _("Listen to a .m3u file"), "audacious2 %q");
+ st_action_register("view-web", _("Open a web page"), "epiphany %q");
+
+ return TRUE;
+diff -ur streamtuner-0.99.99.orig/src/plugins/shoutcast/shoutcast.c streamtuner-0.99.99/src/plugins/shoutcast/shoutcast.c
+--- streamtuner-0.99.99.orig/src/plugins/shoutcast/shoutcast.c 2004-12-19 17:21:00.000000000 +0200
++++ streamtuner-0.99.99/src/plugins/shoutcast/shoutcast.c 2009-01-18 20:03:42.000000000 +0200
+@@ -959,7 +959,7 @@
+
+ init_handler();
+
+- st_action_register("play-m3u", _("Listen to a .m3u file"), "xmms %q");
++ st_action_register("play-m3u", _("Listen to a .m3u file"), "audacious2 %q");
+ st_action_register("record-stream", _("Record a stream"), "xterm -e streamripper %q");
+ st_action_register("view-web", _("Open a web page"), "epiphany %q");
+
+diff -ur streamtuner-0.99.99.orig/src/plugins/xiph/xiph.c streamtuner-0.99.99/src/plugins/xiph/xiph.c
+--- streamtuner-0.99.99.orig/src/plugins/xiph/xiph.c 2004-12-13 11:57:33.000000000 +0200
++++ streamtuner-0.99.99/src/plugins/xiph/xiph.c 2009-01-18 20:04:17.000000000 +0200
+@@ -957,7 +957,7 @@
+ init_handler();
+
+ st_action_register("record-stream", _("Record a stream"), "xterm -e streamripper %q");
+- st_action_register("play-stream", _("Listen to a stream"), "xmms %q");
++ st_action_register("play-stream", _("Listen to a stream"), "audacious2 %q");
+
+ return TRUE;
+ }
+diff -ur streamtuner-0.99.99.orig/src/streamtuner/st-preselections.c streamtuner-0.99.99/src/streamtuner/st-preselections.c
+--- streamtuner-0.99.99.orig/src/streamtuner/st-preselections.c 2004-12-13 11:57:52.000000000 +0200
++++ streamtuner-0.99.99/src/streamtuner/st-preselections.c 2009-01-18 20:04:02.000000000 +0200
+@@ -390,7 +390,7 @@
+ {
+ st_preselections_init_handler();
+
+- st_action_register("play-stream", _("Listen to a stream"), "xmms %q");
++ st_action_register("play-stream", _("Listen to a stream"), "audacious2 %q");
+ st_action_register("record-stream", _("Record a stream"), "xterm -e streamripper %q");
+ st_action_register("view-web", _("Open a web page"), "epiphany %q");
+ }
diff --git a/net-misc/streamtuner/files/streamtuner-0.99.99-gentoo.patch b/net-misc/streamtuner/files/streamtuner-0.99.99-gentoo.patch
new file mode 100644
index 000000000000..2e5d843420da
--- /dev/null
+++ b/net-misc/streamtuner/files/streamtuner-0.99.99-gentoo.patch
@@ -0,0 +1,181 @@
+diff -ur streamtuner-0.99.99.orig/data/streamtuner.pc.in streamtuner-0.99.99/data/streamtuner.pc.in
+--- streamtuner-0.99.99.orig/data/streamtuner.pc.in 2004-12-11 04:03:20.000000000 +0200
++++ streamtuner-0.99.99/data/streamtuner.pc.in 2007-07-29 09:40:44.000000000 +0300
+@@ -1,9 +1,8 @@
+ prefix=@prefix@
+ includedir=@includedir@/streamtuner
+-oldincludedir=@includedir@
+
+ Name: @PACKAGE@
+ Description: A stream directory browser
+ Version: @VERSION@
+ Requires: gmodule-2.0 gtk+-2.0
+-Cflags: -I${includedir} -I${oldincludedir}
++Cflags: -I${includedir}
+diff -ur streamtuner-0.99.99.orig/docs/reference/Makefile.in streamtuner-0.99.99/docs/reference/Makefile.in
+--- streamtuner-0.99.99.orig/docs/reference/Makefile.in 2004-12-21 17:31:18.000000000 +0200
++++ streamtuner-0.99.99/docs/reference/Makefile.in 2007-07-29 09:41:15.000000000 +0300
+@@ -517,7 +517,7 @@
+ @ENABLE_GTK_DOC_TRUE@ rm -rf $(srcdir)/html
+ @ENABLE_GTK_DOC_TRUE@ mkdir $(srcdir)/html
+ @ENABLE_GTK_DOC_TRUE@ cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+-@ENABLE_GTK_DOC_TRUE@ sed -i "" -e \
++@ENABLE_GTK_DOC_TRUE@ sed -i -e \
+ @ENABLE_GTK_DOC_TRUE@ 's/background: #ffeeee/background: #daffd1/g; \
+ @ENABLE_GTK_DOC_TRUE@ s/border: solid 1px #ffaaaa/border: solid 1px #74ff54/g; \
+ @ENABLE_GTK_DOC_TRUE@ s/background: #eeeeff/background: #feffde/g; \
+diff -ur streamtuner-0.99.99.orig/help/omf.make streamtuner-0.99.99/help/omf.make
+--- streamtuner-0.99.99.orig/help/omf.make 2004-03-23 18:17:10.000000000 +0200
++++ streamtuner-0.99.99/help/omf.make 2007-07-29 09:42:50.000000000 +0300
+@@ -42,7 +42,9 @@
+ for file in $(omffile); do \
+ $(INSTALL_DATA) $(srcdir)/$$file.out $(DESTDIR)$(omf_dest_dir)/$$file; \
+ done
+- -scrollkeeper-update -p $(scrollkeeper_localstate_dir) -o $(DESTDIR)$(omf_dest_dir)
++ if test -z "$(DESTDIR)"; then \
++ scrollkeeper-update -p $(DESTDIR)$(scrollkeeper_localstate_dir) -o $(DESTDIR)$(omf_dest_dir); \
++ fi
+
+ uninstall-local-omf:
+ -for file in $(srcdir)/*.omf; do \
+diff -ur streamtuner-0.99.99.orig/src/streamtuner/st-category-store.c streamtuner-0.99.99/src/streamtuner/st-category-store.c
+--- streamtuner-0.99.99.orig/src/streamtuner/st-category-store.c 2004-12-18 11:17:32.000000000 +0200
++++ streamtuner-0.99.99/src/streamtuner/st-category-store.c 2007-07-29 09:41:46.000000000 +0300
+@@ -356,7 +356,6 @@
+ {
+ STCategoryBag **bag = data;
+ STCategoryBag *this_bag;
+- gboolean status;
+
+ gtk_tree_model_get(model, iter, ST_CATEGORY_STORE_COLUMN_BAG, &this_bag, -1);
+ if (! ST_CATEGORY_BAG_IS_STOCK(this_bag)
+@@ -376,8 +375,6 @@
+ g_object_unref(this_bag);
+ return FALSE; /* continue */
+ }
+-
+- return status;
+ }
+
+ static gboolean
+diff -ur streamtuner-0.99.99.orig/src/streamtuner/st-network-preferences-page.c streamtuner-0.99.99/src/streamtuner/st-network-preferences-page.c
+--- streamtuner-0.99.99.orig/src/streamtuner/st-network-preferences-page.c 2004-12-16 15:05:07.000000000 +0200
++++ streamtuner-0.99.99/src/streamtuner/st-network-preferences-page.c 2007-07-29 09:43:21.000000000 +0300
+@@ -183,10 +183,10 @@
+ st_preferences_bind_boolean(GTK_TOGGLE_BUTTON(page->priv->proxy_check),
+ &st_settings.proxy_enabled);
+ st_preferences_bind_int_radio(GTK_RADIO_BUTTON(page->priv->http_radio),
+- (int *) &st_settings.proxy_type,
++ &st_settings.proxy_type,
+ ST_TRANSFER_PROXY_HTTP);
+ st_preferences_bind_int_radio(GTK_RADIO_BUTTON(page->priv->socks5_radio),
+- (int *) &st_settings.proxy_type,
++ &st_settings.proxy_type,
+ ST_TRANSFER_PROXY_SOCKS5);
+ st_preferences_bind_string(GTK_ENTRY(page->priv->server_entry),
+ &st_settings.proxy_server);
+diff -ur streamtuner-0.99.99.orig/src/streamtuner/st-preferences.c streamtuner-0.99.99/src/streamtuner/st-preferences.c
+--- streamtuner-0.99.99.orig/src/streamtuner/st-preferences.c 2004-10-17 20:43:18.000000000 +0300
++++ streamtuner-0.99.99/src/streamtuner/st-preferences.c 2007-07-29 09:43:21.000000000 +0300
+@@ -140,13 +140,13 @@
+ }
+
+ void
+-st_preferences_bind_int_radio (GtkRadioButton *radio, int *ptr, int value)
++st_preferences_bind_int_radio (GtkRadioButton *radio, void *ptr, int value)
+ {
+ g_return_if_fail(GTK_IS_RADIO_BUTTON(radio));
+ g_return_if_fail(ptr != NULL);
+
+ g_object_set_data(G_OBJECT(radio), "value", GINT_TO_POINTER(value));
+- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio), value == *ptr);
++ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio), value == *(int *)ptr);
+ g_signal_connect(radio, "toggled", G_CALLBACK(st_preferences_radio_toggled_h), ptr);
+ }
+
+diff -ur streamtuner-0.99.99.orig/src/streamtuner/st-preferences.h streamtuner-0.99.99/src/streamtuner/st-preferences.h
+--- streamtuner-0.99.99.orig/src/streamtuner/st-preferences.h 2004-10-17 20:42:06.000000000 +0300
++++ streamtuner-0.99.99/src/streamtuner/st-preferences.h 2007-07-29 09:43:21.000000000 +0300
+@@ -42,7 +42,7 @@
+ void st_preferences_bind_int_spin (GtkSpinButton *spin,
+ int *ptr);
+ void st_preferences_bind_int_radio (GtkRadioButton *radio,
+- int *ptr,
++ void *ptr,
+ int value);
+
+ #endif /* _ST_PREFERENCES_H */
+diff -ur streamtuner-0.99.99.orig/src/streamtuner/st-shell.c streamtuner-0.99.99/src/streamtuner/st-shell.c
+--- streamtuner-0.99.99.orig/src/streamtuner/st-shell.c 2004-12-20 18:09:03.000000000 +0200
++++ streamtuner-0.99.99/src/streamtuner/st-shell.c 2007-07-29 09:43:21.000000000 +0300
+@@ -465,8 +465,10 @@
+ static void
+ st_shell_make_window (STShell *shell)
+ {
++ union { GtkWidget **wpp; gpointer *gpp; }pun = { &shell->priv->window };
++
+ shell->priv->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+- g_object_add_weak_pointer(G_OBJECT(shell->priv->window), (gpointer *) &shell->priv->window);
++ g_object_add_weak_pointer(G_OBJECT(shell->priv->window), pun.gpp);
+
+ shell->priv->accel_group = gtk_accel_group_new();
+ gtk_window_add_accel_group(GTK_WINDOW(shell->priv->window), shell->priv->accel_group);
+@@ -1786,8 +1788,10 @@
+ gtk_window_present(GTK_WINDOW(shell->priv->find));
+ else
+ {
++ union { GtkWidget **wpp; gpointer *gpp; }pun = { &shell->priv->find };
++
+ shell->priv->find = sgtk_find_dialog_new(GTK_WINDOW(shell->priv->window));
+- g_object_add_weak_pointer(G_OBJECT(shell->priv->find), (gpointer *) &shell->priv->find);
++ g_object_add_weak_pointer(G_OBJECT(shell->priv->find), pun.gpp);
+
+ sgtk_find_dialog_set_token(SGTK_FIND_DIALOG(shell->priv->find), st_settings.find_token ? st_settings.find_token : "");
+ sgtk_find_dialog_set_history(SGTK_FIND_DIALOG(shell->priv->find), st_settings.find_history);
+@@ -2101,8 +2105,9 @@
+ gtk_window_present(GTK_WINDOW(shell->priv->stream_properties));
+ else
+ {
++ union { GtkWidget **wpp; gpointer *gpp; }pun = { &shell->priv->stream_properties };
+ shell->priv->stream_properties = st_stream_properties_dialog_new(GTK_WINDOW(shell->priv->window));
+- g_object_add_weak_pointer(G_OBJECT(shell->priv->stream_properties), (gpointer *) &shell->priv->stream_properties);
++ g_object_add_weak_pointer(G_OBJECT(shell->priv->stream_properties), pun.gpp);
+
+ g_signal_connect(shell->priv->stream_properties,
+ "response",
+@@ -2161,9 +2166,10 @@
+ else
+ {
+ STBrowserTab *selected_tab;
++ union { GtkWidget **wpp; gpointer *gpp; }pun = { &shell->priv->stream_columns };
+
+ shell->priv->stream_columns = st_stream_columns_dialog_new(GTK_WINDOW(shell->priv->window));
+- g_object_add_weak_pointer(G_OBJECT(shell->priv->stream_columns), (gpointer *) &shell->priv->stream_columns);
++ g_object_add_weak_pointer(G_OBJECT(shell->priv->stream_columns), pun.gpp);
+
+ selected_tab = st_shell_get_selected_tab(shell);
+ if (selected_tab)
+@@ -2195,8 +2201,10 @@
+ gtk_window_present(GTK_WINDOW(shell->priv->about));
+ else
+ {
++ union { GtkWidget **wpp; gpointer *gpp; }pun = { &shell->priv->about };
++
+ shell->priv->about = st_about_dialog_new(GTK_WINDOW(shell->priv->window));
+- g_object_add_weak_pointer(G_OBJECT(shell->priv->about), (gpointer *) &shell->priv->about);
++ g_object_add_weak_pointer(G_OBJECT(shell->priv->about), pun.gpp);
+
+ g_signal_connect(shell->priv->about,
+ "response",
+@@ -2244,8 +2252,10 @@
+
+ if (! shell->priv->preferences)
+ {
++ union { GtkWidget **wpp; gpointer *gpp; }pun = { &shell->priv->preferences };
++
+ shell->priv->preferences = st_preferences_dialog_new(GTK_WINDOW(shell->priv->window));
+- g_object_add_weak_pointer(G_OBJECT(shell->priv->preferences), (gpointer *) &shell->priv->preferences);
++ g_object_add_weak_pointer(G_OBJECT(shell->priv->preferences), pun.gpp);
+ }
+
+ if (handler)
diff --git a/net-misc/streamtuner/files/streamtuner-0.99.99-shoutcast-2.patch b/net-misc/streamtuner/files/streamtuner-0.99.99-shoutcast-2.patch
new file mode 100644
index 000000000000..e62df03d0434
--- /dev/null
+++ b/net-misc/streamtuner/files/streamtuner-0.99.99-shoutcast-2.patch
@@ -0,0 +1,5 @@
+--- src/plugins/shoutcast/shoutcast.c
++++ src/plugins/shoutcast/shoutcast.c
+@@ -40,1 +40,1 @@
+-#define SHOUTCAST_ROOT "http://www.shoutcast.com/"
++#define SHOUTCAST_ROOT "http://classic.shoutcast.com/"
diff --git a/net-misc/streamtuner/files/streamtuner-0.99.99-shoutcast.patch b/net-misc/streamtuner/files/streamtuner-0.99.99-shoutcast.patch
new file mode 100644
index 000000000000..b7db78b20b76
--- /dev/null
+++ b/net-misc/streamtuner/files/streamtuner-0.99.99-shoutcast.patch
@@ -0,0 +1,40 @@
+--- src/plugins/shoutcast/shoutcast.c.orig 2004-12-19 15:21:00.000000000 +0000
++++ src/plugins/shoutcast/shoutcast.c 2008-03-16 10:39:24.000000000 +0000
+@@ -94,6 +94,8 @@
+
+ GNode *parent_node;
+ SHOUTcastStream *stream;
++
++ int parse_genres;
+ } ReloadInfo;
+
+ /*** variable declarations ***************************************************/
+@@ -518,6 +520,7 @@
+ info.npages = 0;
+ info.parent_node = NULL;
+ info.stream = NULL;
++ info.parse_genres = 0;
+
+ status = st_transfer_session_get_by_line(session,
+ url,
+@@ -565,10 +568,16 @@
+ info->stream = stream_new_cb(NULL);
+ info->stream->url_postfix = st_sgml_ref_expand_len(s1, s2 - s1);
+ }
+- else if (info->page < 2
+- && (((s1 = st_str_has_prefix_span(line, "\t<OPTION VALUE=\""))
+- || (s1 = st_str_has_prefix_span(line, "\t\t<OPTION VALUE=\"")))
+- && (s2 = strstr(s1, "\">"))))
++ else if (info->page < 2 && (s1 = st_strstr_span(line, "<OPTION VALUE=\"TopTen\">")))
++ {
++ info->parse_genres = 1;
++ }
++ else if (info->page < 2 && info->parse_genres == 1 && (s1 = st_strstr_span(line, "</SELECT>")))
++ {
++ info->parse_genres = 0;
++ }
++ else if (info->page < 2 && info->parse_genres == 1
++ && ((s1 = st_strstr_span(line, "<OPTION VALUE=\"")) && (s2 = strstr(s1, "\">"))))
+ {
+ STCategory *category;
+ GNode *node;
diff --git a/net-misc/streamtuner/files/streamtuner-0.99.99-stack_increase.patch b/net-misc/streamtuner/files/streamtuner-0.99.99-stack_increase.patch
new file mode 100644
index 000000000000..0b64aa72b098
--- /dev/null
+++ b/net-misc/streamtuner/files/streamtuner-0.99.99-stack_increase.patch
@@ -0,0 +1,5 @@
+--- src/streamtuner/st-thread.c
++++ src/streamtuner/st-thread.c
+@@ -108,1 +108,1 @@
+- 0x18000, /* 96k, big enough for libcurl */
++ 0x40000, /* change from 96k to 256k */
diff --git a/net-misc/streamtuner/metadata.xml b/net-misc/streamtuner/metadata.xml
new file mode 100644
index 000000000000..1c466c63d014
--- /dev/null
+++ b/net-misc/streamtuner/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>sound</herd>
+ <use>
+ <flag name="shout">Enable shoutcast plug-in.</flag>
+ <flag name="xiph">Enable xiph.org plug-in.</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/streamtuner/streamtuner-0.99.99-r5.ebuild b/net-misc/streamtuner/streamtuner-0.99.99-r5.ebuild
new file mode 100644
index 000000000000..3ea7e4a828a9
--- /dev/null
+++ b/net-misc/streamtuner/streamtuner-0.99.99-r5.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG=no
+inherit eutils gnome2
+
+DESCRIPTION="Stream directory browser for browsing internet radio streams"
+HOMEPAGE="http://www.nongnu.org/streamtuner"
+SRC_URI="http://savannah.nongnu.org/download/${PN}/${P}.tar.gz
+ http://savannah.nongnu.org/download/${PN}/${P}-pygtk-2.6.diff"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~sparc x86"
+IUSE="python +shout +xiph"
+
+RDEPEND="
+ >=x11-libs/gtk+-2.4:2
+ net-misc/curl
+ app-text/scrollkeeper
+ xiph? ( dev-libs/libxml2:2 )
+ >=media-libs/taglib-1.2
+ python? ( dev-python/pygtk:2 )
+ x11-misc/xdg-utils
+"
+DEPEND="${RDEPEND}
+ dev-util/gtk-doc-am
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-shoutcast.patch \
+ "${FILESDIR}"/${P}-shoutcast-2.patch \
+ "${FILESDIR}"/${P}-audacious.patch \
+ "${DISTDIR}"/${P}-pygtk-2.6.diff \
+ "${FILESDIR}"/${P}-stack_increase.patch
+
+ # Fix .desktop file
+ sed -i \
+ -e 's/streamtuner.png/streamtuner/' \
+ -e 's/Categories=Application;/Categories=/' \
+ data/streamtuner.desktop.in || die
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ # live365 causes parse errors at connect time
+ # The right value for compile-warning for this is 'yes' (#481124)
+ gnome2_src_configure \
+ --enable-compile-warnings=yes \
+ --disable-live365 \
+ $(use_enable python) \
+ $(use_enable shout shoutcast) \
+ $(use_enable xiph)
+}
diff --git a/net-misc/strongswan/Manifest b/net-misc/strongswan/Manifest
new file mode 100644
index 000000000000..2edf21e4dc65
--- /dev/null
+++ b/net-misc/strongswan/Manifest
@@ -0,0 +1 @@
+DIST strongswan-5.3.2.tar.bz2 4320601 SHA256 a4a9bc8c4e42bdc4366a87a05a02bf9f425169a7ab0c6f4482d347e44acbf225 SHA512 60b17645c00769d497f4cea2229b41a217c29fe1109b58be256a0d4a6ccf4765348b9eb89466539c2528756344c2fa969f25ea1cd8856d56c5d55aa78e632e68 WHIRLPOOL e5ca686e25daf2ca9c42ab8a2fcb62635c7ef2c164313dc01265bb7718d9522d478b9be5ef63d52df27dc44654d455b7dc0a41c86312e0a4c2b25aa279f3a21e
diff --git a/net-misc/strongswan/files/ipsec b/net-misc/strongswan/files/ipsec
new file mode 100644
index 000000000000..d8892f30b631
--- /dev/null
+++ b/net-misc/strongswan/files/ipsec
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+ use logger
+}
+
+start() {
+ ebegin "Starting ${IPSECD}"
+ ipsec start
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${IPSECD}"
+ ipsec stop
+ eend $?
+}
+
+restart() {
+ ebegin "Restarting ${IPSECD}"
+ svc_stop
+ sleep 2
+ svc_start
+ eend $?
+}
+
+status() {
+ ebegin "${IPSECD} Status (verbose):"
+ ipsec statusall
+ eend $?
+}
diff --git a/net-misc/strongswan/metadata.xml b/net-misc/strongswan/metadata.xml
new file mode 100644
index 000000000000..3cad53d6d299
--- /dev/null
+++ b/net-misc/strongswan/metadata.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <maintainer>
+ <email>gurligebis@gentoo.org</email>
+ <name>Bjarke Istrup Pedersen</name>
+ </maintainer>
+ <longdescription lang="en">
+ StrongSwan is direct descendant of the discontinued FreeS/WAN project.
+ As an IPsec based VPN solution which is focused on security and ease of
+ use, it fully implements the IKEv1/IKEv2 protocols, MOBIKE, NAT-Traversal
+ via UDP encapsulation (incl. port floating) and Dead Peer Detection. It
+ also fully supports the Linux 2.6 IPsec stack, IPv6, certificates/keys on
+ Smartcards and virtual IP address pools.
+ </longdescription>
+ <use>
+ <flag name="constraints">
+ Enable advanced X.509 constraint checking plugin.
+ </flag>
+ <flag name="dhcp">
+ Enable server support for querying virtual IP addresses for clients
+ from a DHCP server. (IKEv2 only)
+ </flag>
+ <flag name="eap">
+ Enable support for the different EAP modules that is supported.
+ </flag>
+ <flag name="farp">
+ Enable faking of ARP responses for virtual IP addresses assigned to
+ clients. (IKEv2 only)
+ </flag>
+ <flag name="gcrypt">
+ Enable <pkg>dev-libs/libgcrypt</pkg> plugin which provides 3DES, AES,
+ Blowfish, Camellia, CAST, DES, Serpent and Twofish ciphers along with
+ MD4, MD5 and SHA1/2 hash algorithms, RSA and DH groups 1,2,5,14-18 and
+ 22-24(4.4+). Also includes a software random number generator.
+ </flag>
+ <flag name="non-root">
+ Force IKEv1/IKEv2 daemons to normal user privileges. This might impose
+ some restrictions mainly to the IKEv1 daemon. Disable only if you really
+ require superuser privileges.
+ </flag>
+ <flag name="openssl">
+ Enable <pkg>dev-libs/openssl</pkg> plugin which is required for Elliptic
+ Curve Cryptography (DH groups 19-21,25,26) and ECDSA. Also provides 3DES,
+ AES, Blowfish, Camellia, CAST, DES, IDEA and RC5 ciphers along with MD2,
+ MD4, MD5 and SHA1/2 hash algorithms, RSA and DH groups 1,2,5,14-18 and
+ 22-24(4.4+)
+ <pkg>dev-libs/openssl</pkg> has to be compiled with USE="-bindist".
+ </flag>
+ <flag name="pkcs11">
+ Enable pkcs11 support.
+ </flag>
+ <flag name="strongswan_plugins_led">
+ Enable support for the led plugin.
+ </flag>
+ <flag name="strongswan_plugins_lookip">
+ Enable support for the lookip plugin.
+ </flag>
+ <flag name="strongswan_plugins_systime-fix">
+ Enable support for the systime-fix plugin.
+ </flag>
+ <flag name="strongswan_plugins_unity">
+ Enable support for the unity plugin.
+ </flag>
+ <flag name="strongswan_plugins_vici">
+ Enable support for the vici plugin.
+ </flag>
+ <flag name="strongswan_plugins_blowfish">
+ Enable support for the blowfish plugin.
+ </flag>
+ <flag name="strongswan_plugins_ccm">
+ Enable support for the ccm plugin.
+ </flag>
+ <flag name="strongswan_plugins_ctr">
+ Enable support for the ctr plugin.
+ </flag>
+ <flag name="strongswan_plugins_gcm">
+ Enable support for the gcm plugin.
+ </flag>
+ <flag name="strongswan_plugins_ha">
+ Enable support for the ha plugin.
+ </flag>
+ <flag name="strongswan_plugins_ipseckey">
+ Enable support for the ipseckey plugin.
+ </flag>
+ <flag name="strongswan_plugins_ntru">
+ Enable support for the ntru plugin.
+ </flag>
+ <flag name="strongswan_plugins_padlock">
+ Enable support for the padlock plugin.
+ </flag>
+ <flag name="strongswan_plugins_rdrand">
+ Enable support for the rdrand plugin.
+ </flag>
+ <flag name="strongswan_plugins_unbound">
+ Enable support for the unbound plugin.
+ </flag>
+ <flag name="strongswan_plugins_whitelist">
+ Enable support for the whitelist plugin.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:strongswan:strongswan</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/strongswan/strongswan-5.3.2.ebuild b/net-misc/strongswan/strongswan-5.3.2.ebuild
new file mode 100644
index 000000000000..2b2527786805
--- /dev/null
+++ b/net-misc/strongswan/strongswan-5.3.2.ebuild
@@ -0,0 +1,302 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils linux-info systemd user
+
+DESCRIPTION="IPsec-based VPN solution focused on security and ease of use, supporting IKEv1/IKEv2 and MOBIKE"
+HOMEPAGE="http://www.strongswan.org/"
+SRC_URI="http://download.strongswan.org/${P}.tar.bz2"
+
+LICENSE="GPL-2 RSA DES"
+SLOT="0"
+KEYWORDS="amd64 arm ppc ~ppc64 x86"
+IUSE="+caps curl +constraints debug dhcp eap farp gcrypt +gmp ldap mysql networkmanager +non-root +openssl sqlite pam pkcs11"
+
+STRONGSWAN_PLUGINS_STD="led lookip systime-fix unity vici"
+STRONGSWAN_PLUGINS_OPT="blowfish ccm ctr gcm ha ipseckey ntru padlock rdrand unbound whitelist"
+for mod in $STRONGSWAN_PLUGINS_STD; do
+ IUSE="${IUSE} +strongswan_plugins_${mod}"
+done
+
+for mod in $STRONGSWAN_PLUGINS_OPT; do
+ IUSE="${IUSE} strongswan_plugins_${mod}"
+done
+
+COMMON_DEPEND="!net-misc/openswan
+ gmp? ( >=dev-libs/gmp-4.1.5 )
+ gcrypt? ( dev-libs/libgcrypt:0 )
+ caps? ( sys-libs/libcap )
+ curl? ( net-misc/curl )
+ ldap? ( net-nds/openldap )
+ openssl? ( >=dev-libs/openssl-0.9.8[-bindist] )
+ mysql? ( virtual/mysql )
+ sqlite? ( >=dev-db/sqlite-3.3.1 )
+ networkmanager? ( net-misc/networkmanager )
+ pam? ( sys-libs/pam )
+ strongswan_plugins_unbound? ( net-dns/unbound )"
+DEPEND="${COMMON_DEPEND}
+ virtual/linux-sources
+ sys-kernel/linux-headers"
+RDEPEND="${COMMON_DEPEND}
+ virtual/logger
+ sys-apps/iproute2
+ !net-misc/libreswan"
+
+UGID="ipsec"
+
+pkg_setup() {
+ linux-info_pkg_setup
+ elog "Linux kernel version: ${KV_FULL}"
+
+ if ! kernel_is -ge 2 6 16; then
+ eerror
+ eerror "This ebuild currently only supports ${PN} with the"
+ eerror "native Linux 2.6 IPsec stack on kernels >= 2.6.16."
+ eerror
+ fi
+
+ if kernel_is -lt 2 6 34; then
+ ewarn
+ ewarn "IMPORTANT KERNEL NOTES: Please read carefully..."
+ ewarn
+
+ if kernel_is -lt 2 6 29; then
+ ewarn "[ < 2.6.29 ] Due to a missing kernel feature, you have to"
+ ewarn "include all required IPv6 modules even if you just intend"
+ ewarn "to run on IPv4 only."
+ ewarn
+ ewarn "This has been fixed with kernels >= 2.6.29."
+ ewarn
+ fi
+
+ if kernel_is -lt 2 6 33; then
+ ewarn "[ < 2.6.33 ] Kernels prior to 2.6.33 include a non-standards"
+ ewarn "compliant implementation for SHA-2 HMAC support in ESP and"
+ ewarn "miss SHA384 and SHA512 HMAC support altogether."
+ ewarn
+ ewarn "If you need any of those features, please use kernel >= 2.6.33."
+ ewarn
+ fi
+
+ if kernel_is -lt 2 6 34; then
+ ewarn "[ < 2.6.34 ] Support for the AES-GMAC authentification-only"
+ ewarn "ESP cipher is only included in kernels >= 2.6.34."
+ ewarn
+ ewarn "If you need it, please use kernel >= 2.6.34."
+ ewarn
+ fi
+ fi
+
+ if use non-root; then
+ enewgroup ${UGID}
+ enewuser ${UGID} -1 -1 -1 ${UGID}
+ fi
+}
+
+src_prepare() {
+ epatch_user
+}
+
+src_configure() {
+ local myconf=""
+
+ if use non-root; then
+ myconf="${myconf} --with-user=${UGID} --with-group=${UGID}"
+ fi
+
+ # If a user has already enabled db support, those plugins will
+ # most likely be desired as well. Besides they don't impose new
+ # dependencies and come at no cost (except for space).
+ if use mysql || use sqlite; then
+ myconf="${myconf} --enable-attr-sql --enable-sql"
+ fi
+
+ # strongSwan builds and installs static libs by default which are
+ # useless to the user (and to strongSwan for that matter) because no
+ # header files or alike get installed... so disabling them is safe.
+ if use pam && use eap; then
+ myconf="${myconf} --enable-eap-gtc"
+ else
+ myconf="${myconf} --disable-eap-gtc"
+ fi
+
+ for mod in $STRONGSWAN_PLUGINS_STD; do
+ if use strongswan_plugins_${mod}; then
+ myconf+=" --enable-${mod}"
+ fi
+ done
+
+ for mod in $STRONGSWAN_PLUGINS_OPT; do
+ if use strongswan_plugins_${mod}; then
+ myconf+=" --enable-${mod}"
+ fi
+ done
+
+ econf \
+ --disable-static \
+ --enable-ikev1 \
+ --enable-ikev2 \
+ --enable-swanctl \
+ --enable-socket-dynamic \
+ $(use_with caps capabilities libcap) \
+ $(use_enable curl) \
+ $(use_enable constraints) \
+ $(use_enable ldap) \
+ $(use_enable debug leak-detective) \
+ $(use_enable dhcp) \
+ $(use_enable eap eap-sim) \
+ $(use_enable eap eap-sim-file) \
+ $(use_enable eap eap-simaka-sql) \
+ $(use_enable eap eap-simaka-pseudonym) \
+ $(use_enable eap eap-simaka-reauth) \
+ $(use_enable eap eap-identity) \
+ $(use_enable eap eap-md5) \
+ $(use_enable eap eap-aka) \
+ $(use_enable eap eap-aka-3gpp2) \
+ $(use_enable eap md4) \
+ $(use_enable eap eap-mschapv2) \
+ $(use_enable eap eap-radius) \
+ $(use_enable eap eap-tls) \
+ $(use_enable eap xauth-eap) \
+ $(use_enable farp) \
+ $(use_enable gmp) \
+ $(use_enable gcrypt) \
+ $(use_enable mysql) \
+ $(use_enable networkmanager nm) \
+ $(use_enable openssl) \
+ $(use_enable pam xauth-pam) \
+ $(use_enable pkcs11) \
+ $(use_enable sqlite) \
+ "$(systemd_with_unitdir)" \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ doinitd "${FILESDIR}"/ipsec
+
+ local dir_ugid
+ if use non-root; then
+ fowners ${UGID}:${UGID} \
+ /etc/ipsec.conf \
+ /etc/strongswan.conf
+
+ dir_ugid="${UGID}"
+ else
+ dir_ugid="root"
+ fi
+
+ diropts -m 0750 -o ${dir_ugid} -g ${dir_ugid}
+ dodir /etc/ipsec.d \
+ /etc/ipsec.d/aacerts \
+ /etc/ipsec.d/acerts \
+ /etc/ipsec.d/cacerts \
+ /etc/ipsec.d/certs \
+ /etc/ipsec.d/crls \
+ /etc/ipsec.d/ocspcerts \
+ /etc/ipsec.d/private \
+ /etc/ipsec.d/reqs
+
+ dodoc NEWS README TODO || die
+
+ # shared libs are used only internally and there are no static libs,
+ # so it's safe to get rid of the .la files
+ find "${D}" -name '*.la' -delete || die "Failed to remove .la files."
+}
+
+pkg_preinst() {
+ has_version "<net-misc/strongswan-4.3.6-r1"
+ upgrade_from_leq_4_3_6=$(( !$? ))
+
+ has_version "<net-misc/strongswan-4.3.6-r1[-caps]"
+ previous_4_3_6_with_caps=$(( !$? ))
+}
+
+pkg_postinst() {
+ if ! use openssl && ! use gcrypt; then
+ elog
+ elog "${PN} has been compiled without both OpenSSL and libgcrypt support."
+ elog "Please note that this might effect availability and speed of some"
+ elog "cryptographic features. You are advised to enable the OpenSSL plugin."
+ elif ! use openssl; then
+ elog
+ elog "${PN} has been compiled without the OpenSSL plugin. This might effect"
+ elog "availability and speed of some cryptographic features. There will be"
+ elog "no support for Elliptic Curve Cryptography (Diffie-Hellman groups 19-21,"
+ elog "25, 26) and ECDSA."
+ fi
+
+ if [[ $upgrade_from_leq_4_3_6 == 1 ]]; then
+ chmod 0750 "${ROOT}"/etc/ipsec.d \
+ "${ROOT}"/etc/ipsec.d/aacerts \
+ "${ROOT}"/etc/ipsec.d/acerts \
+ "${ROOT}"/etc/ipsec.d/cacerts \
+ "${ROOT}"/etc/ipsec.d/certs \
+ "${ROOT}"/etc/ipsec.d/crls \
+ "${ROOT}"/etc/ipsec.d/ocspcerts \
+ "${ROOT}"/etc/ipsec.d/private \
+ "${ROOT}"/etc/ipsec.d/reqs
+
+ ewarn
+ ewarn "The default permissions for /etc/ipsec.d/* have been tightened for"
+ ewarn "security reasons. Your system installed directories have been"
+ ewarn "updated accordingly. Please check if necessary."
+ ewarn
+
+ if [[ $previous_4_3_6_with_caps == 1 ]]; then
+ if ! use non-root; then
+ ewarn
+ ewarn "IMPORTANT: You previously had ${PN} installed without root"
+ ewarn "privileges because it was implied by the 'caps' USE flag."
+ ewarn "This has been changed. If you want ${PN} with user privileges,"
+ ewarn "you have to re-emerge it with the 'non-root' USE flag enabled."
+ ewarn
+ fi
+ fi
+ fi
+ if ! use caps && ! use non-root; then
+ ewarn
+ ewarn "You have decided to run ${PN} with root privileges and built it"
+ ewarn "without support for POSIX capability dropping. It is generally"
+ ewarn "strongly suggested that you reconsider- especially if you intend"
+ ewarn "to run ${PN} as server with a public ip address."
+ ewarn
+ ewarn "You should re-emerge ${PN} with at least the 'caps' USE flag enabled."
+ ewarn
+ fi
+ if use non-root; then
+ elog
+ elog "${PN} has been installed without superuser privileges (USE=non-root)."
+ elog "This imposes several limitations mainly to the IKEv1 daemon 'pluto'"
+ elog "but also a few to the IKEv2 daemon 'charon'."
+ elog
+ elog "Please carefully read: http://wiki.strongswan.org/wiki/nonRoot"
+ elog
+ elog "pluto uses a helper script by default to insert/remove routing and"
+ elog "policy rules upon connection start/stop which requires superuser"
+ elog "privileges. charon in contrast does this internally and can do so"
+ elog "even with reduced (user) privileges."
+ elog
+ elog "Thus if you require IKEv1 (pluto) or need to specify a custom updown"
+ elog "script to pluto or charon which requires superuser privileges, you"
+ elog "can work around this limitation by using sudo to grant the"
+ elog "user \"ipsec\" the appropriate rights."
+ elog "For example (the default case):"
+ elog "/etc/sudoers:"
+ elog " ipsec ALL=(ALL) NOPASSWD: SETENV: /usr/sbin/ipsec"
+ elog "Under the specific connection block in /etc/ipsec.conf:"
+ elog " leftupdown=\"sudo -E ipsec _updown iptables\""
+ elog
+ fi
+ elog
+ elog "Make sure you have _all_ required kernel modules available including"
+ elog "the appropriate cryptographic algorithms. A list is available at:"
+ elog " http://wiki.strongswan.org/projects/strongswan/wiki/KernelModules"
+ elog
+ elog "The up-to-date manual is available online at:"
+ elog " http://wiki.strongswan.org/"
+ elog
+}
diff --git a/net-misc/stunnel/Manifest b/net-misc/stunnel/Manifest
new file mode 100644
index 000000000000..c67f0238393b
--- /dev/null
+++ b/net-misc/stunnel/Manifest
@@ -0,0 +1,6 @@
+DIST stunnel-5.14.tar.gz 608366 SHA256 2197b4fc1db82eba69c8baf1fac30f0767af26e9f8c7e9e1d5a4a8fbb264695a SHA512 f0d074f5c525036d98565c9c315f1761920c2e7cd7687a9a0f0441e7caf5cf3930b14c078f4f158806c557ba8ea0698aa3b23d5e7e03c076ee3b6667140148c8 WHIRLPOOL af8d018ffb74aafafef7bc90c63c2a5c1e4dbe164f71eb7aea7cf5388f60c9f49c19ce4dcbf2e55c2c166ee1be98ff5ef72171d750949e668391a7afeca78224
+DIST stunnel-5.17.tar.gz 613840 SHA256 c3e79e582621a0827125e35e1c00450190104fc02dc3c5274cb02b05859fd472 SHA512 07064bda6978d94f783fd1c125485f46eadcba0e4a419366149e91cf88333b875eeb86f63848b5dd774f9f01d41206f93905fa5a51a08ade915b4b0bce777419 WHIRLPOOL 832b3cef06ec945d2dae33d3bdba048d93ca85757f149f705d6ff5bf03440dd3d3857a73f1167ae792aedceefcb7df4ea6c31164fa5d7ee8857f5e589b08e257
+DIST stunnel-5.18.tar.gz 624660 SHA256 0532c0a2f8de3da1ab625e384146501ce5936fac63d01561c3a9bf652b692317 SHA512 292d5ef96c6d84c248b75f9e0e9b344c79177ec72f96097281bb37a12e52f4b5e44d363b1c164ee86536dbc492c8e9f899e17a1842c85453c2ef113a5d1862ec WHIRLPOOL 2cea6cc70350fa750e46d09ad28621fe4c0334442829e42d2157344424e6a2437b2642c5219bf4d5be1588f8c91671c805423c13c06b24b73d56686dabb4b412
+DIST stunnel-5.19.tar.gz 620810 SHA256 0b543242cf26649acfdd9f00de564c3e8de7ac2237d53935ffdc7eb24f4d556d SHA512 93b1b6f62873610dada98b7d555aafa8495f9d34fd2a9b92e2bc6420edbc087f428ca6d6d47560055b36809fad08ec7eb41e71bc0abe97c84277125484866574 WHIRLPOOL 5fbab7761a7284766b65bac177bd997ac506141627992bc7f8642250a99d6dd7dc09a2a609934aa66ad99ba7faa2cf886edb2d0b1b942d672671aff57cbf3d48
+DIST stunnel-5.20.tar.gz 625091 SHA256 4a36a3729a7287d9d82c4b38bf72c4d3496346cb969b86129c5deac22b20292b SHA512 59262aacf866cac25bac707b94c5a6185aa868b5fdfab38a9ef03a00b80f106d92e2872c0b0fecbc5d13adb7bdea7f922768fb78f38355dbf67eb34a148441e4 WHIRLPOOL fc890dff4ddeb00df9e8ea84fae8f0f23609d1356c91d4cdeade55f164bad322a8a2df72955b710e46e1f74a33bbc7f5c8d734efc190d0835056926d7c902b26
+DIST stunnel-5.22.tar.gz 627014 SHA256 8ad628a6948153cdb2044283f6988384a30585ea7e14778c2ee616a6678cb83f SHA512 edf48fda7d431eee79feb72b6901c02d667ae25f85db9850e12776b57cc68ccacdf069deb3858106939b5c3c53b682a785083f5e7241221a350e06f4307e74f5 WHIRLPOOL f467f91976100e2941ac9809199ce229655daaaee2ebd83eebe525499cb670b1577ddb7b3a65ae2a15d36c925a4747db402d969b9589c698a5d0d52508705f44
diff --git a/net-misc/stunnel/files/stunnel b/net-misc/stunnel/files/stunnel
new file mode 100644
index 000000000000..6ca77a3dbdbe
--- /dev/null
+++ b/net-misc/stunnel/files/stunnel
@@ -0,0 +1,43 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+SERVICENAME=${SVCNAME#*.}
+SERVICENAME=${SERVICENAME:-stunnel}
+STUNNEL_CONFIGFILE=${STUNNEL_CONFIGFILE:-/etc/stunnel/${SERVICENAME}.conf}
+
+depend() {
+ need net
+ before logger
+}
+
+get_config() {
+ if [ ! -e ${STUNNEL_CONFIGFILE} ] ; then
+ eerror "You need to create ${STUNNEL_CONFIGFILE} first."
+ return 1
+ fi
+ CHROOT=$(grep "^chroot" ${STUNNEL_CONFIGFILE} | sed "s;.*= *;;")
+ [ -n "${CHROOT}" ] && CHROOT="--chroot ${CHROOT}"
+ PIDFILE=$(grep "^pid" ${STUNNEL_CONFIGFILE} | sed "s;.*= *;;")
+ PIDFILE=${PIDFILE:-/run/stunnel/${SERVICENAME}.pid}
+}
+
+start() {
+ get_config || return 1
+ checkpath -d -m 0775 -o root:stunnel /run/stunnel
+ if [ "$(dirname ${PIDFILE})" != "/run" ]; then
+ checkpath -d -m 0755 -o stunnel:stunnel -q $(dirname ${PIDFILE})
+ fi
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --pidfile "${PIDFILE}" ${CHROOT} \
+ --exec /usr/bin/stunnel -- ${STUNNEL_CONFIGFILE} ${STUNNEL_OPTIONS}
+ eend $? "Failed to start ${SVCNAME}"
+}
+
+stop() {
+ get_config || return 1
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
+ eend $? "Failed to stop ${SVCNAME}"
+}
diff --git a/net-misc/stunnel/files/stunnel.conf b/net-misc/stunnel/files/stunnel.conf
new file mode 100644
index 000000000000..547ee963e4d1
--- /dev/null
+++ b/net-misc/stunnel/files/stunnel.conf
@@ -0,0 +1,61 @@
+# Sample stunnel configuration file by Michal Trojnara 2002-2005
+# Some options used here may not be adequate for your particular configuration
+# Please make sure you understand them (especially the effect of chroot jail)
+
+# Certificate/key is needed in server mode and optional in client mode
+# cert = /etc/stunnel/stunnel.pem
+# key = /etc/stunnel/stunnel.pem
+
+# Some security enhancements for UNIX systems - comment them out on Win32
+# chroot = /chroot/stunnel/
+setuid = stunnel
+setgid = stunnel
+# PID is created inside chroot jail
+pid = /run/stunnel/stunnel.pid
+
+# Some performance tunings
+socket = l:TCP_NODELAY=1
+socket = r:TCP_NODELAY=1
+#compression = rle
+
+# Workaround for Eudora bug
+#options = DONT_INSERT_EMPTY_FRAGMENTS
+
+# Authentication stuff
+#verify = 2
+# Don't forget to c_rehash CApath
+# CApath is located inside chroot jail:
+#CApath = /certs
+# It's often easier to use CAfile:
+#CAfile = /etc/stunnel/certs.pem
+# Don't forget to c_rehash CRLpath
+# CRLpath is located inside chroot jail:
+#CRLpath = /crls
+# Alternatively you can use CRLfile:
+#CRLfile = /etc/stunnel/crls.pem
+
+# Some debugging stuff useful for troubleshooting
+#debug = 7
+#output = stunnel.log
+
+# Use it for client mode
+#client = yes
+
+# Service-level configuration
+
+#[pop3s]
+#accept = 995
+#connect = 110
+
+#[imaps]
+#accept = 993
+#connect = 143
+
+#[ssmtp]
+#accept = 465
+#connect = 25
+
+#[https]
+#accept = 443
+#connect = 80
+#TIMEOUTclose = 0
diff --git a/net-misc/stunnel/files/stunnel.tmpfiles.conf b/net-misc/stunnel/files/stunnel.tmpfiles.conf
new file mode 100644
index 000000000000..4433c8a75664
--- /dev/null
+++ b/net-misc/stunnel/files/stunnel.tmpfiles.conf
@@ -0,0 +1 @@
+d /run/stunnel 0770 stunnel stunnel -
diff --git a/net-misc/stunnel/metadata.xml b/net-misc/stunnel/metadata.xml
new file mode 100644
index 000000000000..6cfb65b3f5ca
--- /dev/null
+++ b/net-misc/stunnel/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>
+ <use>
+ <flag name="stunnel3">Install the stunnel3 wrapper.</flag>
+ </use>
+ <longdescription lang="en">
+ Stunnel is a program that allows you to encrypt arbitrary TCP
+ connections inside SSL (Secure Sockets Layer) available on both Unix and
+ Windows. Stunnel can allow you to secure non-SSL aware daemons and
+ protocols (like POP, IMAP, LDAP, etc) by having Stunnel provide the
+ encryption, requiring no changes to the daemon's code.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/stunnel/stunnel-5.14.ebuild b/net-misc/stunnel/stunnel-5.14.ebuild
new file mode 100644
index 000000000000..eb29582faefa
--- /dev/null
+++ b/net-misc/stunnel/stunnel-5.14.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit ssl-cert eutils systemd user
+
+DESCRIPTION="TLS/SSL - Port Wrapper"
+HOMEPAGE="http://www.stunnel.org/index.html"
+SRC_URI="ftp://ftp.stunnel.org/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://www.usenix.org.uk/mirrors/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://ftp.nluug.nl/pub/networking/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://www.namesdir.com/mirrors/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://stunnel.cybermirror.org/archive/${PV%%.*}.x/${P}.tar.gz
+ http://mirrors.zerg.biz/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ ftp://mirrors.go-parts.com/stunnel/archive/${PV%%.*}.x/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ppc ppc64 ~s390 sparc x86 ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="ipv6 selinux tcpd"
+
+DEPEND="tcpd? ( sys-apps/tcp-wrappers )
+ dev-libs/openssl"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-stunnel )"
+
+pkg_setup() {
+ enewgroup stunnel
+ enewuser stunnel -1 -1 -1 stunnel
+}
+
+src_prepare() {
+ # Hack away generation of certificate
+ sed -i -e "s/^install-data-local:/do-not-run-this:/" \
+ tools/Makefile.in || die "sed failed"
+}
+
+src_configure() {
+ econf \
+ $(use_enable ipv6) \
+ $(use_enable tcpd libwrap) \
+ --with-ssl="${EPREFIX}"/usr \
+ --disable-fips
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ rm -rf "${ED}"/usr/share/doc/${PN}
+ rm -f "${ED}"/etc/stunnel/stunnel.conf-sample "${ED}"/usr/bin/stunnel3 \
+ "${ED}"/usr/share/man/man8/stunnel.{fr,pl}.8
+
+ # The binary was moved to /usr/bin with 4.21,
+ # symlink for backwards compatibility
+ dosym ../bin/stunnel /usr/sbin/stunnel
+
+ dodoc AUTHORS BUGS CREDITS PORTS README TODO ChangeLog
+ dohtml doc/stunnel.html doc/en/VNC_StunnelHOWTO.html tools/ca.html \
+ tools/importCA.html
+
+ insinto /etc/stunnel
+ doins "${FILESDIR}"/stunnel.conf
+ doinitd "${FILESDIR}"/stunnel
+
+ systemd_dounit "${S}/tools/stunnel.service"
+ systemd_newtmpfilesd "${FILESDIR}"/stunnel.tmpfiles.conf stunnel.conf
+}
+
+pkg_postinst() {
+ if [ ! -f "${EROOT}"/etc/stunnel/stunnel.key ]; then
+ install_cert /etc/stunnel/stunnel
+ chown stunnel:stunnel "${EROOT}"/etc/stunnel/stunnel.{crt,csr,key,pem}
+ chmod 0640 "${EROOT}"/etc/stunnel/stunnel.{crt,csr,key,pem}
+ fi
+
+ einfo "If you want to run multiple instances of stunnel, create a new config"
+ einfo "file ending with .conf in /etc/stunnel/. **Make sure** you change "
+ einfo "\'pid= \' with a unique filename."
+}
diff --git a/net-misc/stunnel/stunnel-5.17.ebuild b/net-misc/stunnel/stunnel-5.17.ebuild
new file mode 100644
index 000000000000..de6ba6f046d8
--- /dev/null
+++ b/net-misc/stunnel/stunnel-5.17.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit ssl-cert eutils multilib systemd user
+
+DESCRIPTION="TLS/SSL - Port Wrapper"
+HOMEPAGE="http://www.stunnel.org/index.html"
+SRC_URI="ftp://ftp.stunnel.org/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://www.usenix.org.uk/mirrors/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://ftp.nluug.nl/pub/networking/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://www.namesdir.com/mirrors/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://stunnel.cybermirror.org/archive/${PV%%.*}.x/${P}.tar.gz
+ http://mirrors.zerg.biz/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ ftp://mirrors.go-parts.com/stunnel/archive/${PV%%.*}.x/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 sparc x86 ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="ipv6 selinux tcpd"
+
+DEPEND="tcpd? ( sys-apps/tcp-wrappers )
+ dev-libs/openssl:="
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-stunnel )"
+
+pkg_setup() {
+ enewgroup stunnel
+ enewuser stunnel -1 -1 -1 stunnel
+}
+
+src_prepare() {
+ # Hack away generation of certificate
+ sed -i -e "s/^install-data-local:/do-not-run-this:/" \
+ tools/Makefile.in || die "sed failed"
+
+ echo "CONFIG_PROTECT=\"/etc/stunnel/stunnel.conf\"" > "${T}"/20stunnel
+}
+
+src_configure() {
+ econf \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ $(use_enable ipv6) \
+ $(use_enable tcpd libwrap) \
+ --with-ssl="${EPREFIX}"/usr \
+ --disable-fips
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ rm -rf "${ED}"/usr/share/doc/${PN}
+ rm -f "${ED}"/etc/stunnel/stunnel.conf-sample "${ED}"/usr/bin/stunnel3 \
+ "${ED}"/usr/share/man/man8/stunnel.{fr,pl}.8
+
+ # The binary was moved to /usr/bin with 4.21,
+ # symlink for backwards compatibility
+ dosym ../bin/stunnel /usr/sbin/stunnel
+
+ dodoc AUTHORS BUGS CREDITS PORTS README TODO ChangeLog
+ dohtml doc/stunnel.html doc/en/VNC_StunnelHOWTO.html tools/ca.html \
+ tools/importCA.html
+
+ insinto /etc/stunnel
+ doins "${FILESDIR}"/stunnel.conf
+ doinitd "${FILESDIR}"/stunnel
+
+ doenvd "${T}"/20stunnel
+
+ systemd_dounit "${S}/tools/stunnel.service"
+ systemd_newtmpfilesd "${FILESDIR}"/stunnel.tmpfiles.conf stunnel.conf
+}
+
+pkg_postinst() {
+ if [ ! -f "${EROOT}"/etc/stunnel/stunnel.key ]; then
+ install_cert /etc/stunnel/stunnel
+ chown stunnel:stunnel "${EROOT}"/etc/stunnel/stunnel.{crt,csr,key,pem}
+ chmod 0640 "${EROOT}"/etc/stunnel/stunnel.{crt,csr,key,pem}
+ fi
+
+ einfo "If you want to run multiple instances of stunnel, create a new config"
+ einfo "file ending with .conf in /etc/stunnel/. **Make sure** you change "
+ einfo "\'pid= \' with a unique filename."
+}
diff --git a/net-misc/stunnel/stunnel-5.18.ebuild b/net-misc/stunnel/stunnel-5.18.ebuild
new file mode 100644
index 000000000000..e50c72d12fe6
--- /dev/null
+++ b/net-misc/stunnel/stunnel-5.18.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit ssl-cert eutils multilib systemd user
+
+DESCRIPTION="TLS/SSL - Port Wrapper"
+HOMEPAGE="http://www.stunnel.org/index.html"
+SRC_URI="ftp://ftp.stunnel.org/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://www.usenix.org.uk/mirrors/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://ftp.nluug.nl/pub/networking/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://www.namesdir.com/mirrors/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://stunnel.cybermirror.org/archive/${PV%%.*}.x/${P}.tar.gz
+ http://mirrors.zerg.biz/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ ftp://mirrors.go-parts.com/stunnel/archive/${PV%%.*}.x/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="ipv6 selinux stunnel3 tcpd"
+
+DEPEND="tcpd? ( sys-apps/tcp-wrappers )
+ dev-libs/openssl:="
+RDEPEND="${DEPEND}
+ stunnel3? ( dev-lang/perl )
+ selinux? ( sec-policy/selinux-stunnel )"
+
+pkg_setup() {
+ enewgroup stunnel
+ enewuser stunnel -1 -1 -1 stunnel
+}
+
+src_prepare() {
+ # Hack away generation of certificate
+ sed -i -e "s/^install-data-local:/do-not-run-this:/" \
+ tools/Makefile.in || die "sed failed"
+
+ echo "CONFIG_PROTECT=\"/etc/stunnel/stunnel.conf\"" > "${T}"/20stunnel
+}
+
+src_configure() {
+ econf \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ $(use_enable ipv6) \
+ $(use_enable tcpd libwrap) \
+ --with-ssl="${EPREFIX}"/usr \
+ --disable-fips
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ rm -rf "${ED}"/usr/share/doc/${PN}
+ rm -f "${ED}"/etc/stunnel/stunnel.conf-sample \
+ "${ED}"/usr/share/man/man8/stunnel.{fr,pl}.8
+ use stunnel3 || rm -f "${ED}"/usr/bin/stunnel3
+
+ # The binary was moved to /usr/bin with 4.21,
+ # symlink for backwards compatibility
+ dosym ../bin/stunnel /usr/sbin/stunnel
+
+ dodoc AUTHORS BUGS CREDITS PORTS README TODO ChangeLog
+ dohtml doc/stunnel.html doc/en/VNC_StunnelHOWTO.html tools/ca.html \
+ tools/importCA.html
+
+ insinto /etc/stunnel
+ doins "${FILESDIR}"/stunnel.conf
+ doinitd "${FILESDIR}"/stunnel
+
+ doenvd "${T}"/20stunnel
+
+ systemd_dounit "${S}/tools/stunnel.service"
+ systemd_newtmpfilesd "${FILESDIR}"/stunnel.tmpfiles.conf stunnel.conf
+}
+
+pkg_postinst() {
+ if [ ! -f "${EROOT}"/etc/stunnel/stunnel.key ]; then
+ install_cert /etc/stunnel/stunnel
+ chown stunnel:stunnel "${EROOT}"/etc/stunnel/stunnel.{crt,csr,key,pem}
+ chmod 0640 "${EROOT}"/etc/stunnel/stunnel.{crt,csr,key,pem}
+ fi
+
+ einfo "If you want to run multiple instances of stunnel, create a new config"
+ einfo "file ending with .conf in /etc/stunnel/. **Make sure** you change "
+ einfo "\'pid= \' with a unique filename."
+}
diff --git a/net-misc/stunnel/stunnel-5.19.ebuild b/net-misc/stunnel/stunnel-5.19.ebuild
new file mode 100644
index 000000000000..0993abbac51f
--- /dev/null
+++ b/net-misc/stunnel/stunnel-5.19.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit ssl-cert eutils multilib systemd user
+
+DESCRIPTION="TLS/SSL - Port Wrapper"
+HOMEPAGE="http://www.stunnel.org/index.html"
+SRC_URI="ftp://ftp.stunnel.org/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://www.usenix.org.uk/mirrors/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://ftp.nluug.nl/pub/networking/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://www.namesdir.com/mirrors/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://stunnel.cybermirror.org/archive/${PV%%.*}.x/${P}.tar.gz
+ http://mirrors.zerg.biz/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ ftp://mirrors.go-parts.com/stunnel/archive/${PV%%.*}.x/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="ipv6 selinux stunnel3 tcpd"
+
+DEPEND="tcpd? ( sys-apps/tcp-wrappers )
+ dev-libs/openssl:="
+RDEPEND="${DEPEND}
+ stunnel3? ( dev-lang/perl )
+ selinux? ( sec-policy/selinux-stunnel )"
+
+pkg_setup() {
+ enewgroup stunnel
+ enewuser stunnel -1 -1 -1 stunnel
+}
+
+src_prepare() {
+ # Hack away generation of certificate
+ sed -i -e "s/^install-data-local:/do-not-run-this:/" \
+ tools/Makefile.in || die "sed failed"
+
+ echo "CONFIG_PROTECT=\"/etc/stunnel/stunnel.conf\"" > "${T}"/20stunnel
+}
+
+src_configure() {
+ econf \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ $(use_enable ipv6) \
+ $(use_enable tcpd libwrap) \
+ --with-ssl="${EPREFIX}"/usr \
+ --disable-fips
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ rm -rf "${ED}"/usr/share/doc/${PN}
+ rm -f "${ED}"/etc/stunnel/stunnel.conf-sample \
+ "${ED}"/usr/share/man/man8/stunnel.{fr,pl}.8
+ use stunnel3 || rm -f "${ED}"/usr/bin/stunnel3
+
+ # The binary was moved to /usr/bin with 4.21,
+ # symlink for backwards compatibility
+ dosym ../bin/stunnel /usr/sbin/stunnel
+
+ dodoc AUTHORS BUGS CREDITS PORTS README TODO ChangeLog
+ dohtml doc/stunnel.html doc/en/VNC_StunnelHOWTO.html tools/ca.html \
+ tools/importCA.html
+
+ insinto /etc/stunnel
+ doins "${FILESDIR}"/stunnel.conf
+ doinitd "${FILESDIR}"/stunnel
+
+ doenvd "${T}"/20stunnel
+
+ systemd_dounit "${S}/tools/stunnel.service"
+ systemd_newtmpfilesd "${FILESDIR}"/stunnel.tmpfiles.conf stunnel.conf
+}
+
+pkg_postinst() {
+ if [ ! -f "${EROOT}"/etc/stunnel/stunnel.key ]; then
+ install_cert /etc/stunnel/stunnel
+ chown stunnel:stunnel "${EROOT}"/etc/stunnel/stunnel.{crt,csr,key,pem}
+ chmod 0640 "${EROOT}"/etc/stunnel/stunnel.{crt,csr,key,pem}
+ fi
+
+ einfo "If you want to run multiple instances of stunnel, create a new config"
+ einfo "file ending with .conf in /etc/stunnel/. **Make sure** you change "
+ einfo "\'pid= \' with a unique filename."
+}
diff --git a/net-misc/stunnel/stunnel-5.20.ebuild b/net-misc/stunnel/stunnel-5.20.ebuild
new file mode 100644
index 000000000000..7dbd010efe27
--- /dev/null
+++ b/net-misc/stunnel/stunnel-5.20.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit ssl-cert eutils multilib systemd user
+
+DESCRIPTION="TLS/SSL - Port Wrapper"
+HOMEPAGE="http://www.stunnel.org/index.html"
+SRC_URI="ftp://ftp.stunnel.org/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://www.usenix.org.uk/mirrors/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://ftp.nluug.nl/pub/networking/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://www.namesdir.com/mirrors/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://stunnel.cybermirror.org/archive/${PV%%.*}.x/${P}.tar.gz
+ http://mirrors.zerg.biz/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ ftp://mirrors.go-parts.com/stunnel/archive/${PV%%.*}.x/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="ipv6 selinux stunnel3 tcpd"
+
+DEPEND="tcpd? ( sys-apps/tcp-wrappers )
+ dev-libs/openssl:="
+RDEPEND="${DEPEND}
+ stunnel3? ( dev-lang/perl )
+ selinux? ( sec-policy/selinux-stunnel )"
+
+RESTRICT="test"
+
+pkg_setup() {
+ enewgroup stunnel
+ enewuser stunnel -1 -1 -1 stunnel
+}
+
+src_prepare() {
+ # Hack away generation of certificate
+ sed -i -e "s/^install-data-local:/do-not-run-this:/" \
+ tools/Makefile.in || die "sed failed"
+
+ echo "CONFIG_PROTECT=\"/etc/stunnel/stunnel.conf\"" > "${T}"/20stunnel
+}
+
+src_configure() {
+ econf \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ $(use_enable ipv6) \
+ $(use_enable tcpd libwrap) \
+ --with-ssl="${EPREFIX}"/usr \
+ --disable-fips
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ rm -rf "${ED}"/usr/share/doc/${PN}
+ rm -f "${ED}"/etc/stunnel/stunnel.conf-sample \
+ "${ED}"/usr/share/man/man8/stunnel.{fr,pl}.8
+ use stunnel3 || rm -f "${ED}"/usr/bin/stunnel3
+
+ # The binary was moved to /usr/bin with 4.21,
+ # symlink for backwards compatibility
+ dosym ../bin/stunnel /usr/sbin/stunnel
+
+ dodoc AUTHORS BUGS CREDITS PORTS README TODO ChangeLog
+ dohtml doc/stunnel.html doc/en/VNC_StunnelHOWTO.html tools/ca.html \
+ tools/importCA.html
+
+ insinto /etc/stunnel
+ doins "${FILESDIR}"/stunnel.conf
+ doinitd "${FILESDIR}"/stunnel
+
+ doenvd "${T}"/20stunnel
+
+ systemd_dounit "${S}/tools/stunnel.service"
+ systemd_newtmpfilesd "${FILESDIR}"/stunnel.tmpfiles.conf stunnel.conf
+}
+
+pkg_postinst() {
+ if [ ! -f "${EROOT}"/etc/stunnel/stunnel.key ]; then
+ install_cert /etc/stunnel/stunnel
+ chown stunnel:stunnel "${EROOT}"/etc/stunnel/stunnel.{crt,csr,key,pem}
+ chmod 0640 "${EROOT}"/etc/stunnel/stunnel.{crt,csr,key,pem}
+ fi
+
+ einfo "If you want to run multiple instances of stunnel, create a new config"
+ einfo "file ending with .conf in /etc/stunnel/. **Make sure** you change "
+ einfo "\'pid= \' with a unique filename."
+}
diff --git a/net-misc/stunnel/stunnel-5.22.ebuild b/net-misc/stunnel/stunnel-5.22.ebuild
new file mode 100644
index 000000000000..29080ccb350c
--- /dev/null
+++ b/net-misc/stunnel/stunnel-5.22.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit ssl-cert eutils multilib systemd user
+
+DESCRIPTION="TLS/SSL - Port Wrapper"
+HOMEPAGE="http://www.stunnel.org/index.html"
+SRC_URI="ftp://ftp.stunnel.org/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://www.usenix.org.uk/mirrors/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://ftp.nluug.nl/pub/networking/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://www.namesdir.com/mirrors/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ http://stunnel.cybermirror.org/archive/${PV%%.*}.x/${P}.tar.gz
+ http://mirrors.zerg.biz/stunnel/archive/${PV%%.*}.x/${P}.tar.gz
+ ftp://mirrors.go-parts.com/stunnel/archive/${PV%%.*}.x/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="ipv6 selinux stunnel3 tcpd"
+
+DEPEND="tcpd? ( sys-apps/tcp-wrappers )
+ dev-libs/openssl:="
+RDEPEND="${DEPEND}
+ stunnel3? ( dev-lang/perl )
+ selinux? ( sec-policy/selinux-stunnel )"
+
+RESTRICT="test"
+
+pkg_setup() {
+ enewgroup stunnel
+ enewuser stunnel -1 -1 -1 stunnel
+}
+
+src_prepare() {
+ # Hack away generation of certificate
+ sed -i -e "s/^install-data-local:/do-not-run-this:/" \
+ tools/Makefile.in || die "sed failed"
+
+ echo "CONFIG_PROTECT=\"/etc/stunnel/stunnel.conf\"" > "${T}"/20stunnel
+}
+
+src_configure() {
+ econf \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ $(use_enable ipv6) \
+ $(use_enable tcpd libwrap) \
+ --with-ssl="${EPREFIX}"/usr \
+ --disable-fips
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ rm -rf "${ED}"/usr/share/doc/${PN}
+ rm -f "${ED}"/etc/stunnel/stunnel.conf-sample \
+ "${ED}"/usr/share/man/man8/stunnel.{fr,pl}.8
+ use stunnel3 || rm -f "${ED}"/usr/bin/stunnel3
+
+ # The binary was moved to /usr/bin with 4.21,
+ # symlink for backwards compatibility
+ dosym ../bin/stunnel /usr/sbin/stunnel
+
+ dodoc AUTHORS BUGS CREDITS PORTS README TODO ChangeLog
+ dohtml doc/stunnel.html doc/en/VNC_StunnelHOWTO.html tools/ca.html \
+ tools/importCA.html
+
+ insinto /etc/stunnel
+ doins "${FILESDIR}"/stunnel.conf
+ doinitd "${FILESDIR}"/stunnel
+
+ doenvd "${T}"/20stunnel
+
+ systemd_dounit "${S}/tools/stunnel.service"
+ systemd_newtmpfilesd "${FILESDIR}"/stunnel.tmpfiles.conf stunnel.conf
+}
+
+pkg_postinst() {
+ if [ ! -f "${EROOT}"/etc/stunnel/stunnel.key ]; then
+ install_cert /etc/stunnel/stunnel
+ chown stunnel:stunnel "${EROOT}"/etc/stunnel/stunnel.{crt,csr,key,pem}
+ chmod 0640 "${EROOT}"/etc/stunnel/stunnel.{crt,csr,key,pem}
+ fi
+
+ einfo "If you want to run multiple instances of stunnel, create a new config"
+ einfo "file ending with .conf in /etc/stunnel/. **Make sure** you change "
+ einfo "\'pid= \' with a unique filename."
+}
diff --git a/net-misc/stuntman/Manifest b/net-misc/stuntman/Manifest
new file mode 100644
index 000000000000..ee5634421574
--- /dev/null
+++ b/net-misc/stuntman/Manifest
@@ -0,0 +1,2 @@
+DIST stunserver-1.2.6.tgz 116056 SHA256 6d88792f6bba4be4a21227e1dbb58e5fad5bb36ce826352187d35451d9c6f58f SHA512 1d5f74d851308cf455795f9fcc80cdec687b4b1f6fa44477f13b7085c41a1c2eb8ab94578c71f9f00e4c830f3775d5d56f320247fd6b7d227a45e679ba784ef4 WHIRLPOOL 226c9520547102b6a49f227f97e00899d7f5d2c4775c32c8bea3dfa52659281fe97c41d6c384bd2adb102c64600391c20227c4698157223adc8b992a299d607b
+DIST stunserver-1.2.7.tgz 113853 SHA256 51415bf83339f059c6a65bbece9b758e3f198cb86063a0f1b4f12d825c87640e SHA512 b6adc1b237e8717f296201bf865bea39c759b978db954cc15e37c3be7c2e109607273d96bb88c42654d0b843ca1a557874d02ab58e16506534db30f52d7e6f51 WHIRLPOOL 67b19195b6f64420d9283241e7f51442b347020a55e46f405c3e875a6c59eca382bc680b3b17874a77df76ba8e64d1ecfa40367ef1713e83e96c25c4c6f441d1
diff --git a/net-misc/stuntman/files/initd.v1 b/net-misc/stuntman/files/initd.v1
new file mode 100644
index 000000000000..154d43e863b8
--- /dev/null
+++ b/net-misc/stuntman/files/initd.v1
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting STUNTMAN"
+ start-stop-daemon --start --quiet --exec /usr/sbin/stunserver \
+ --make-pidfile --pidfile=/run/stunserver.pid --background
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping STUNTMAN"
+ start-stop-daemon --stop --quiet --pidfile=/run/stunserver.pid
+ eend $?
+}
diff --git a/net-misc/stuntman/files/stuntman.confd b/net-misc/stuntman/files/stuntman.confd
new file mode 100644
index 000000000000..a49d512843e8
--- /dev/null
+++ b/net-misc/stuntman/files/stuntman.confd
@@ -0,0 +1,7 @@
+# Stuntman's stunserver normally starts in simple mode.
+# It's recommended to run stunserver in full mode, there are
+# basically two options, bind it to two separate interfaces,
+# or more conveniently, to IP addresses. There are numerous
+# other options for stunserver, just run stunserver --help
+# for more information.
+#STUNTMAN_PARAMS="--mode full --primaryinterface 1.2.3.4 --altinterface 1.2.3.5"
diff --git a/net-misc/stuntman/files/stuntman.initd b/net-misc/stuntman/files/stuntman.initd
new file mode 100644
index 000000000000..884f3d289b6e
--- /dev/null
+++ b/net-misc/stuntman/files/stuntman.initd
@@ -0,0 +1,13 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pidfile="/run/stunserver.pid"
+command="/usr/sbin/stunserver"
+command_args="${STUNTMAN_PARAMS}"
+command_background="true"
+
+depend() {
+ need net
+}
diff --git a/net-misc/stuntman/metadata.xml b/net-misc/stuntman/metadata.xml
new file mode 100644
index 000000000000..3ed4669f55a4
--- /dev/null
+++ b/net-misc/stuntman/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>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/stuntman/stuntman-1.2.6-r1.ebuild b/net-misc/stuntman/stuntman-1.2.6-r1.ebuild
new file mode 100644
index 000000000000..2629dc7b6c4a
--- /dev/null
+++ b/net-misc/stuntman/stuntman-1.2.6-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="STUNTMAN is an open source implementation of the STUN protocol"
+HOMEPAGE="http://www.stunprotocol.org"
+SRC_URI="http://www.stunprotocol.org/stunserver-${PV}.tgz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-libs/boost
+ dev-libs/openssl"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/stunserver"
+
+src_compile() {
+ emake T=""
+}
+
+src_install() {
+ dobin stunclient
+ dosbin stunserver
+ dodoc HISTORY README
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+}
+
+src_test() {
+ ./stuntestcode
+}
diff --git a/net-misc/stuntman/stuntman-1.2.6.ebuild b/net-misc/stuntman/stuntman-1.2.6.ebuild
new file mode 100644
index 000000000000..8edb1947cfdf
--- /dev/null
+++ b/net-misc/stuntman/stuntman-1.2.6.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="STUNTMAN is an open source implementation of the STUN protocol"
+HOMEPAGE="http://www.stunprotocol.org"
+SRC_URI="http://www.stunprotocol.org/stunserver-${PV}.tgz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-libs/boost
+ dev-libs/openssl"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/stunserver"
+
+src_compile()
+{
+ emake T=""
+}
+
+src_install()
+{
+ dobin stunclient
+ dosbin stunserver
+ dodoc HISTORY README
+ newinitd "${FILESDIR}/initd.v1" stuntman
+}
+
+src_test()
+{
+ ./stuntestcode
+}
diff --git a/net-misc/stuntman/stuntman-1.2.7.ebuild b/net-misc/stuntman/stuntman-1.2.7.ebuild
new file mode 100644
index 000000000000..7bb599de234f
--- /dev/null
+++ b/net-misc/stuntman/stuntman-1.2.7.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="STUNTMAN is an open source implementation of the STUN protocol"
+HOMEPAGE="http://www.stunprotocol.org"
+SRC_URI="http://www.stunprotocol.org/stunserver-${PV}.tgz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-libs/boost
+ dev-libs/openssl:0"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/stunserver"
+
+src_compile() {
+ emake T=""
+}
+
+src_install() {
+ dobin stunclient
+ dosbin stunserver
+ dodoc HISTORY README
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+}
+
+src_test() {
+ ./stuntestcode
+}
diff --git a/net-misc/suite3270/Manifest b/net-misc/suite3270/Manifest
new file mode 100644
index 000000000000..bbef6c282f0b
--- /dev/null
+++ b/net-misc/suite3270/Manifest
@@ -0,0 +1,20 @@
+DIST suite3270-3.3.10ga3-src.tgz 6419282 SHA256 c94cd13e82f6f335461f1de7a816e627fa7e55f68852a5f513194067bccc4408 SHA512 c30af38bff1517a96250365bc6beec19f8ae4c8b6cae7b68c2279749796b370d1ecaf4a4dc3abc25780bd67bbdf9ef00bc9f8d6bb332c642e672ba24f623e6ab WHIRLPOOL e69cb4f7a7174050e35edecaf461385ccef13b7f396625e735ac7455aae6a7f90c7aee9c2a12fef6ec7cd163b2a84c7f33653d3b002a73dcda86cf14ee75f48d
+DIST suite3270-3.3.12ga10-src.tgz 6670311 SHA256 f93a51c19a6f13a97e895343f79ce867b53ca6e672b8fa5a491f2e2fed7294d6 SHA512 8c6e31dfcfb40ee81e1984648cff64d96f7cfadb45a221cb59b5e234ee1a5dd25b7d0ccccf04e11b740eb4237d8228f61186d1107b3d7bfa6405e7cc95b8d32f WHIRLPOOL 4958e0d07cf8ff5ef91862fe8fda0cb559a89e69be91914bd5c12c8afeea5b94ff6523faeeaa748a1bb86d6df19c70564ded116c4ec9cf6eceb07e9e418c6823
+DIST suite3270-3.3.12ga12-src.tgz 6695998 SHA256 2b7ca0614a7b0d97507753f933f4be04aa16a4bc255ad80b2c14a9dfebbcb8b8 SHA512 61b5bc1682af6844609356b25eec5b1c27a057a060e88e51787c8b8bc73123a01e344a02e9104c78b037e46d15d6f6824caa85a5902e51115aac468eb0b3b250 WHIRLPOOL 03582957daa9362594a589094edfc0e724ad3d6f2f9fa796865aad94697592b492a67d6ccfd4588ee19c8837413e44ac7bb7be0dacf19b621ea93659ff7845bf
+DIST suite3270-3.3.13ga7-src.tgz 6824013 SHA256 ab5cde5eb19dcb4ed7d10f47734fca1a6d9a889515772e5bfa9ba00f34f19645 SHA512 d1a8aebea57284bb161922ef1603b2c1d65838a1e0c271e34c467e48a40e855303a4440ba6519ce52c54a373d5d1ec5ba6cf8470c66454b8f931744aab6a0bcb WHIRLPOOL 31712644f771870903e12cb09064d58b757cc10c5111388eb86f7979852ddbfc6af181e243ccbf64abed405862fdd6b8ef5d09cbb612b86d4936cac24d81fb73
+DIST suite3270-3.3.14ga11-src.tgz 6902551 SHA256 80f0a21e0a298297e4156d1ba413f6a3fd60a6850e05733a8c7dbd30323d2b00 SHA512 1f4b735b1baa0c813809324989becd1b62807bf05033f0415a9cd7523af04728bc2511213a091e8c4377163a4c26635168633c12d331da3f0a683f736c041bca WHIRLPOOL 34cd41f5bda9609edaaaec88df2fe535fc16790d34905c65ea67a0df94e9532e268dcb5a62b97a344621919dae05fbfbaaf37f02ceaede3faf98f492f999d190
+DIST suite3270-3.3.14ga6-src.tgz 6884651 SHA256 1d13b16ad2363988c5340938ebb409c22eecf33cf7b7be7dc07ce408b55ce088 SHA512 2bb48d4eafee24b4042d02a099a263a6e2dff3974ededc031eabfbb4a0046650e6c034d7194766d3a88635f25c66e8a3bfe039b0ad928dbd0ad659b822d0c1ef WHIRLPOOL e32ac5603750769ef89eff00c85e37870120b68e5ce23ffe0f343a725f046906148de94c22b0ea262e8ba2d81833b6eb061dd07298164772b759d10c98e89324
+DIST suite3270-3.3.14ga7-src.tgz 6888964 SHA256 f0fc2ec78402e02c28cebe924dfa9ddc49a850c1dd1165ec55774f92785c9695 SHA512 1756cac734d01271c89a647f92c2fe4c180787e98da45b4aa18347b5a62af8d0dbba411fa406b53badff59e59f36d36c3ba95c43e83d99d421680d08f5b36639 WHIRLPOOL 2c45ec90c2f3757b86442fa4ee7f08180e01d4b57ffe08ffb88545037fa16b6416d1ba34f4a639129b436d16e4ad08df2720faf03e2a1d34c97787e17873c555
+DIST suite3270-3.3.14ga9-src.tgz 6901961 SHA256 e4924f11bce7544c5ae15f1261827fb35507723b80417efbc3211f9e7a05959c SHA512 607415d40746c287e4f38ac573a2be04028527395ab0dbe78d265e17fe0581b41337b75219d8ef60fe9fb1efd5effc4451c8e529b255d4151a85b194d1844f56 WHIRLPOOL f13acd1167f349d88bf388c6b189cf07e4abb06d6c99b194d9d6e036554bbb2031889ed518ed9f2449213bc5b15b42483fad461efec38d53ba826795c582267d
+DIST suite3270-3.3.15ga4-src.tgz 6957941 SHA256 96d9433910efc440bfc605eda549e252dff3ebad0112d0143871c604272bbefe SHA512 8eed672772b4fd3683ba8ce3039b9929f4ab7470fd085e86455478ee8e8830fa2d524a16c1d438796e096ddf4839ee190a9186700ad2cc8bfe86617eb41ad65f WHIRLPOOL 9230e65cef83c60ffdb048a132332509446607ad2eb2204278d92877957f9f266d0bfb675e4c5d180c3b60d759fac3b7615f81169b2ee0d21ce45a2114c722aa
+DIST suite3270-3.3.15ga7-src.tgz 6957724 SHA256 1d354fc23f62d9a65b08889bd4a51b05dcb81998fcdf0d403088c00aa9898ede SHA512 9d4fd69a55330b8ad6bab546e4352020a5df3644ac23f4b41de1e4161fca0ae4312c4fd50489d7acd6d637942b640dc22088aae30e589159bc69e04fd4902edc WHIRLPOOL c0c10c9f6da24937c518cc6d3c87e6800bf55f321220c40b34e40fc9c53b21f9808357476540d942674f014cea309a2d62b62072b70ae405a3f1e8aa06e4ebcc
+DIST suite3270-3.3.15ga9-src.tgz 6960911 SHA256 e22f40360170acf70b6de521173c633072582315b4879aef276fb8c97102e848 SHA512 dd6ad0b42f935a9a25170d3ef765e8d31746b7c6a7d9c6f31630da77cc4fd2bde9f4861c86fb237211dd17e60423c4e1627871c8a710467076b99166e7774ccb WHIRLPOOL 79b5691995dd98e6821130df3df8fed2af04abb7ebce642a12d82fa67045c3a1e491d32b8dd43b574b35e80cf0c734f8ab007ece18130e7c373175fa672a8e46
+DIST suite3270-3.3.5p8.tgz 3244414 SHA256 c33acfecab9b720d9fbc342d2c53c4c3ff999f67b6f2e387dd27b97f2c49eeed SHA512 60daec899106adfed604cb00fb3085ff700d3ee554f7a0cafe4dd524c19cfc0d186489d088ddfd41aa15c2366b8d9eadc77ef1e8549ed31c1b289d7c368f15b5 WHIRLPOOL 491475567d4a6ec3a4a46c4ba9eaf4b982b61571b5f2767481b5ebc2b8c22fbb436a9434913057f52ed27632622b92ce39e123ab7fe2996e236d77ac41ebd182
+DIST suite3270-3.3.6.tgz 3315214 SHA256 189f0f639186060b7bbb3093fce60bfb7f35fa147e051a24753236358f609b5e SHA512 0b59c231a5cb4447fb5d2263cf3be0812773450ab2bfb14923ffdc05e5554bcaa63f15d28bdd3fde3d4c0fe31efb284a4e4fd43b448b1adb8d1cf52e3c5b5957 WHIRLPOOL a4d95cc2b399dbfdb1a4b00c804f1bfc036bc8eb0ec463275a256caaef03348b33b60c4bd46eb3e8a7168e2bed1c2b9a9d488ddefc6c1267381de390041161ba
+DIST suite3270-3.3.7.tgz 3357492 SHA256 5b5c3b57cdc3a8e4c2fdd9fa59ef198a5a2ca73f4ad49a42869b709c47318444 SHA512 69779666b3f88c1c8291df56298ced3a64d3f12f7b7dc191f288fd62b4beaa387fc15f418526ab3d0091837de9bd9e3fd6412e1b6fa25347d5fcaea16be34e79 WHIRLPOOL 33a296e491b1907c0a61c39036d0af7a36440b9ae3e98f54020a737ed3ca4f8239f8a3cdb038caf8995e359a3c24f7626415d88df5586183548f839f4db5ac0a
+DIST suite3270-3.3.7p5.tgz 3357564 SHA256 ac1250eef285dbc9b511228d83e9b6c0db8c7ead3586ec82ff36a4ab8ca1067e SHA512 81262e086b6f6d2e87a8b91429df1366aad7a82551c1d0645a13dd8f57366fc2866d4306135d2e0defe1a6515786fca28f81ec950f6715429730dbe1f4b55bfe WHIRLPOOL 6dd8fa75dc225182ba6b9e2ed655979b9bda1b1f96ad17e9863e96607df270dbb460eaf63982102b31d345923a058ac0770dd18878aa9692647fbfc3cf18f293
+DIST suite3270-3.3.7p8.tgz 3362264 SHA256 44fc1b167188c9c5b592c266f7dda391628a72bfbab7b1815bf511f7569ffa4b SHA512 3e7307de562308572f682e4a281997471a758dd455a0fcc52a4ccb1df3d1e557d0ccd3294e0aefc84db3513b344ebdfce738164bce3ca4dd28db9d20b40bcf23 WHIRLPOOL add5bac8d14181baeebffcb9a211ae1f5db5c563cce7b3442341379c6e054e21b887b017ba70ac406c527e87df13e6c30784e1b8e0e084a06d9ea5586f2e3e94
+DIST suite3270-3.3.8.tgz 3958021 SHA256 e37fde24e4b9eec494b58be54b9c3e06d518d66201ece718fcd6259d051dfe93 SHA512 474c7db1ab577205203f98ece4d2118da082803a4b406a1df65127d7d2a0ad28f2fba8c4df49f62cf07e864fe46e5efdb829d8bd6d4272e608af5894037efbb7 WHIRLPOOL 2cb662f4b52c993c7f094d6061925bfa995a55f888c5ac529460bf39cc3de4a24ef2ee6eb702471584abc1e6941a4d6e8e22305d2ba44e30e3746b3d084008c2
+DIST suite3270-3.3.9ga12.tgz 6305237 SHA256 256b3e3e51cdde716173bc99cbc08958369bc3b993f0b1aafc50e20d8f17ad2c
+DIST suite3270-3.4ga4-src.tgz 3395525 SHA256 7b367beb68d3af02b9dc65543f7f38c988f221e585aa72610814a9e60d4dddec SHA512 b01f82aa6d46e7766d1197daaaed0bd68adfda4e3d835beda63e03c7a11e3c91fccb1f7bda31a7f146f54cf63503dae4ab690bffe4ac2ed253a6af409f47ee66 WHIRLPOOL 8c5b8015d95b716e7c6a19838e9b771beb369408521ec22e8b05ff67e343d84ed24fce0594274a8c51dad37ab3ea7cf665a0ce5a21f5900027d5326b70a66376
+DIST suite3270-3.4ga5-src.tgz 3398700 SHA256 01ef94341326e797c090be813bf096b240adfbca44334545ad3433f684a9dcba SHA512 b2b43a7b09d98dccbd6cb7782ff32c6d314084cde2d0b958c21798931faa6cb3979aed4b46db0cb571fed171505936049ecdd2980f2ad2f04f1e4908ea880fb3 WHIRLPOOL f69f86d7c847ec781cff522ea115a11fd14cfffb2cfd5717929db5f9b5a3c5fc259c4b211170cdbeef8ecb6c99c25f09515aac4d906a27c6a44240251f960184
diff --git a/net-misc/suite3270/files/Makefile.in b/net-misc/suite3270/files/Makefile.in
new file mode 100644
index 000000000000..154b470de801
--- /dev/null
+++ b/net-misc/suite3270/files/Makefile.in
@@ -0,0 +1,10 @@
+# DO NOT STARE AT THE SUN
+VER = @VER@
+_SUBDIRS = @SUBDIRS@
+SUBDIRS = $(_SUBDIRS:=-$(VER))
+all:
+%:; $(MAKE) `printf '%s_$@_ ' $(SUBDIRS)`
+_words = $(subst _, ,$1)
+_dir = $(firstword $(call _words,$@))
+_targ = $(lastword $(call _words,$@))
+%_:; $(MAKE) -C $(_dir) $(_targ) $(EXTRA_TARGETS)
diff --git a/net-misc/suite3270/files/configure-3.3.5.patch b/net-misc/suite3270/files/configure-3.3.5.patch
new file mode 100644
index 000000000000..e255ec68cfe8
--- /dev/null
+++ b/net-misc/suite3270/files/configure-3.3.5.patch
@@ -0,0 +1,72 @@
+From: Jesse Farinacci <jieryn@gmail.com>
+Date: 11 May 2007
+Gentoo-bug: 177042
+
+The configure scripts that build ICU need to include stdio.h.
+
+diff -Naur pr3287-3.3/configure pr3287-3.3/configure
+--- pr3287-3.3/configure 2007-05-11 12:22:27.622502551 -0400
++++ pr3287-3.3/configure 2007-05-11 12:24:16.842559358 -0400
+@@ -3134,6 +3134,7 @@
+ then echo "$as_me:$LINENO: checking for ICU version strings" >&5
+ echo $ECHO_N "checking for ICU version strings... $ECHO_C" >&6
+ cat >/tmp/icutst$$.c <<EOF
++#include <stdio.h>
+ #include "unicode/ucnv.h"
+ #define xstr(s) str(s)
+ #define str(s) #s
+diff -Naur pr3287-3.3/configure.in pr3287-3.3/configure.in
+--- pr3287-3.3/configure.in 2007-05-11 12:22:27.622502551 -0400
++++ pr3287-3.3/configure.in 2007-05-11 12:24:00.080240453 -0400
+@@ -146,6 +146,7 @@
+ if test "$enable_dbcs" != no
+ then AC_MSG_CHECKING([for ICU version strings])
+ cat >/tmp/icutst$$.c <<EOF
++#include <stdio.h>
+ #include "unicode/ucnv.h"
+ #define xstr(s) str(s)
+ #define str(s) #s
+diff -Naur s3270-3.3/configure s3270-3.3/configure
+--- s3270-3.3/configure 2007-05-11 12:22:27.619169419 -0400
++++ s3270-3.3/configure 2007-05-11 12:24:16.895889464 -0400
+@@ -3608,6 +3608,7 @@
+ then echo "$as_me:$LINENO: checking for ICU version strings" >&5
+ echo $ECHO_N "checking for ICU version strings... $ECHO_C" >&6
+ cat >/tmp/icutst$$.c <<EOF
++#include <stdio.h>
+ #include "unicode/ucnv.h"
+ #define xstr(s) str(s)
+ #define str(s) #s
+diff -Naur s3270-3.3/configure.in s3270-3.3/configure.in
+--- s3270-3.3/configure.in 2007-05-11 12:22:27.619169419 -0400
++++ s3270-3.3/configure.in 2007-05-11 12:24:00.080240453 -0400
+@@ -120,6 +120,7 @@
+ if test "$enable_dbcs" != no
+ then AC_MSG_CHECKING([for ICU version strings])
+ cat >/tmp/icutst$$.c <<EOF
++#include <stdio.h>
+ #include "unicode/ucnv.h"
+ #define xstr(s) str(s)
+ #define str(s) #s
+diff -Naur tcl3270-3.3/configure tcl3270-3.3/configure
+--- tcl3270-3.3/configure 2007-05-11 12:22:27.609170024 -0400
++++ tcl3270-3.3/configure 2007-05-11 12:24:16.902555727 -0400
+@@ -4234,6 +4234,7 @@
+ then echo "$as_me:$LINENO: checking for ICU version strings" >&5
+ echo $ECHO_N "checking for ICU version strings... $ECHO_C" >&6
+ cat >/tmp/icutst$$.c <<EOF
++#include <stdio.h>
+ #include "unicode/ucnv.h"
+ #define xstr(s) str(s)
+ #define str(s) #s
+diff -Naur tcl3270-3.3/configure.in tcl3270-3.3/configure.in
+--- tcl3270-3.3/configure.in 2007-05-11 12:22:27.605836893 -0400
++++ tcl3270-3.3/configure.in 2007-05-11 12:24:00.080240453 -0400
+@@ -149,6 +149,7 @@
+ if test "$enable_dbcs" != no
+ then AC_MSG_CHECKING([for ICU version strings])
+ cat >/tmp/icutst$$.c <<EOF
++#include <stdio.h>
+ #include "unicode/ucnv.h"
+ #define xstr(s) str(s)
+ #define str(s) #s
diff --git a/net-misc/suite3270/files/makeconv-3.3.5.patch b/net-misc/suite3270/files/makeconv-3.3.5.patch
new file mode 100644
index 000000000000..5076a1eeaae3
--- /dev/null
+++ b/net-misc/suite3270/files/makeconv-3.3.5.patch
@@ -0,0 +1,79 @@
+From: Jesse Farinacci <jieryn@gmail.com>
+Date: 11 May 2007
+Gentoo-bug: 177042
+
+Gentoo's makeconv does not have the -p PREFIX support, so do some mv work
+instead.
+
+--- c3270-3.3/Makefile.in 2007-02-25 10:53:17.566179262 +0100
++++ c3270-3.3/Makefile.in 2007-02-25 10:56:11.983434901 +0100
+@@ -67,13 +67,17 @@
+
+ @CNV@all:: $(ICU_CNV)
+ @CNV@$(IDP)_ibm-837_P100-2000.cnv: ibm-837_P100-2000.ucm
+-@CNV@ makeconv -d . -p $(IDP) ibm-837_P100-2000.ucm
++@CNV@ makeconv -d . ibm-837_P100-2000.ucm
++@CNV@ mv ibm-837_P100-2000.cnv $(IDP)_ibm-837_P100-2000.cnv
+ @CNV@$(IDP)_ibm-300_P110-1997.cnv: ibm-300_P110-1997.ucm
+-@CNV@ makeconv -d . -p $(IDP) ibm-300_P110-1997.ucm
++@CNV@ makeconv -d . ibm-300_P110-1997.ucm
++@CNV@ mv ibm-300_P110-1997.cnv $(IDP)_ibm-300_P110-1997.cnv
+ @CNV@$(IDP)_ibm-1027_P100-1995.cnv: ibm-1027_P100-1995.ucm
+-@CNV@ makeconv -d . -p $(IDP) ibm-1027_P100-1995.ucm
++@CNV@ makeconv -d . ibm-1027_P100-1995.ucm
++@CNV@ mv ibm-1027_P100-1995.cnv $(IDP)_ibm-1027_P100-1995.cnv
+ @CNV@$(IDP)_ibm-1385_P100-1997.cnv: ibm-1385_P100-1997.ucm
+-@CNV@ makeconv -d . -p $(IDP) ibm-1385_P100-1997.ucm
++@CNV@ makeconv -d . ibm-1385_P100-1997.ucm
++@CNV@ mv ibm-1385_P100-1997.cnv $(IDP)_ibm-1385_P100-1997.cnv
+
+ install:: c3270 x3270if
+ [ -d $(DESTDIR)$(BINDIR) ] || \
+--- s3270-3.3/Makefile.in 2007-02-25 11:19:35.987347863 +0100
++++ s3270-3.3/Makefile.in 2007-02-25 11:20:43.391134616 +0100
+@@ -64,13 +64,17 @@
+
+ @CNV@all:: $(ICU_CNV)
+ @CNV@$(IDP)_ibm-837_P100-2000.cnv: ibm-837_P100-2000.ucm
+-@CNV@ makeconv -d . -p $(IDP) ibm-837_P100-2000.ucm
++@CNV@ makeconv -d . ibm-837_P100-2000.ucm
++@CNV@ mv ibm-837_P100-2000.cnv $(IDP)_ibm-837_P100-2000.cnv
+ @CNV@$(IDP)_ibm-300_P110-1997.cnv: ibm-300_P110-1997.ucm
+-@CNV@ makeconv -d . -p $(IDP) ibm-300_P110-1997.ucm
++@CNV@ makeconv -d . ibm-300_P110-1997.ucm
++@CNV@ mv ibm-300_P110-1997.cnv $(IDP)_ibm-300_P110-1997.cnv
+ @CNV@$(IDP)_ibm-1027_P100-1995.cnv: ibm-1027_P100-1995.ucm
+-@CNV@ makeconv -d . -p $(IDP) ibm-1027_P100-1995.ucm
++@CNV@ makeconv -d . ibm-1027_P100-1995.ucm
++@CNV@ mv ibm-1027_P100-1995.cnv $(IDP)_ibm-1027_P100-1995.cnv
+ @CNV@$(IDP)_ibm-1385_P100-1997.cnv: ibm-1385_P100-1997.ucm
+-@CNV@ makeconv -d . -p $(IDP) ibm-1385_P100-1997.ucm
++@CNV@ makeconv -d . ibm-1385_P100-1997.ucm
++@CNV@ mv ibm-1385_P100-1997.cnv $(IDP)_ibm-1385_P100-1997.cnv
+
+ install:: s3270 x3270if
+ [ -d $(DESTDIR)$(BINDIR) ] || \
+--- tcl3270-3.3/Makefile.in 2007-02-25 11:21:30.416799814 +0100
++++ tcl3270-3.3/Makefile.in 2007-02-25 11:22:46.829756107 +0100
+@@ -63,13 +63,17 @@
+
+ @CNV@all:: $(ICU_CNV)
+ @CNV@$(IDP)_ibm-837_P100-2000.cnv: ibm-837_P100-2000.ucm
+-@CNV@ makeconv -d . -p $(IDP) ibm-837_P100-2000.ucm
++@CNV@ makeconv -d . ibm-837_P100-2000.ucm
++@CNV@ mv ibm-837_P100-2000.cnv $(IDP)_ibm-837_P100-2000.cnv
+ @CNV@$(IDP)_ibm-300_P110-1997.cnv: ibm-300_P110-1997.ucm
+-@CNV@ makeconv -d . -p $(IDP) ibm-300_P110-1997.ucm
++@CNV@ makeconv -d . ibm-300_P110-1997.ucm
++@CNV@ mv ibm-300_P110-1997.cnv $(IDP)_ibm-300_P110-1997.cnv
+ @CNV@$(IDP)_ibm-1027_P100-1995.cnv: ibm-1027_P100-1995.ucm
+-@CNV@ makeconv -d . -p $(IDP) ibm-1027_P100-1995.ucm
++@CNV@ makeconv -d . ibm-1027_P100-1995.ucm
++@CNV@ mv ibm-1027_P100-1995.cnv $(IDP)_ibm-1027_P100-1995.cnv
+ @CNV@$(IDP)_ibm-1385_P100-1997.cnv: ibm-1385_P100-1997.ucm
+-@CNV@ makeconv -d . -p $(IDP) ibm-1385_P100-1997.ucm
++@CNV@ makeconv -d . ibm-1385_P100-1997.ucm
++@CNV@ mv ibm-1385_P100-1997.cnv $(IDP)_ibm-1385_P100-1997.cnv
+
+ install:: tcl3270
+ [ -d $(DESTDIR)$(BINDIR) ] || \
diff --git a/net-misc/suite3270/files/suite3270-3.3.10_p3-fix-x3270-dbcs.patch b/net-misc/suite3270/files/suite3270-3.3.10_p3-fix-x3270-dbcs.patch
new file mode 100644
index 000000000000..cfdc2778e98b
--- /dev/null
+++ b/net-misc/suite3270/files/suite3270-3.3.10_p3-fix-x3270-dbcs.patch
@@ -0,0 +1,20 @@
+# Patches were sent upstream to maintainer
+# as of 23 September 2009, by Jesse Farinacci <jieryn@gmail.com>
+
+--- x3270-3.3/screen.c
++++ x3270-3.3/screen.c
+@@ -2322,12 +2322,14 @@
+ void
+ screen_flip(void)
+ {
++#if defined(X3270_DBCS) /*[*/
+ /* Flip mode is broken in the DBCS version. */
+ if (!dbcs) {
+ flipped = !flipped;
+
+ action_internal(PA_Expose_action, IA_REDRAW, CN, CN);
+ }
++#endif /*]*/
+ }
+
+ /*
diff --git a/net-misc/suite3270/metadata.xml b/net-misc/suite3270/metadata.xml
new file mode 100644
index 000000000000..82aa620760f7
--- /dev/null
+++ b/net-misc/suite3270/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>s390</herd>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ <description>Maintainer</description>
+ </maintainer>
+ <maintainer>
+ <email>jieryn@gmail.com</email>
+ <name>Jesse Farinacci</name>
+ <description>Maintainer by proxy, please CC on all bugs.</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">x3270</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/suite3270/suite3270-3.3.10_p3-r1.ebuild b/net-misc/suite3270/suite3270-3.3.10_p3-r1.ebuild
new file mode 100644
index 000000000000..00bed83913f0
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.3.10_p3-r1.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+MY_PV=${PV/_p/ga}
+MY_P=${PN}-${MY_PV}
+SUB_PV=${PV:0:3}
+
+S=${WORKDIR}
+
+# only the x3270 package installs fonts
+FONT_PN="x3270"
+FONT_S=${WORKDIR}/${FONT_PN}-${SUB_PV}
+
+inherit eutils font
+
+DESCRIPTION="Complete 3270 access package"
+HOMEPAGE="http://x3270.bgp.nu/"
+SRC_URI="mirror://sourceforge/x3270/${MY_P}-src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc s390 sparc x86"
+IUSE="cjk doc ncurses ssl tcl X"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
+ ncurses? ( sys-libs/ncurses sys-libs/readline )
+ tcl? ( dev-lang/tcl )"
+DEPEND="${RDEPEND}
+ X? (
+ x11-misc/imake
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf
+ )"
+
+suite3270_makelist() {
+ echo pr3287 s3270
+ use ncurses && echo c3270
+ use tcl && echo tcl3270
+ use X && echo x3270
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ use X && ! use cjk && epatch "${FILESDIR}"/${P}-fix-x3270-dbcs.patch
+}
+
+src_compile() {
+ local p
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ econf \
+ --cache-file="${S}"/config.cache \
+ $(use_enable cjk dbcs) \
+ $(use_enable ssl) \
+ $(use_with X x) \
+ $(use_with X fontdir "${FONTDIR}") \
+ || die
+ emake || die
+ done
+}
+
+src_install() {
+ use X && dodir "${FONTDIR}"
+ local p
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ emake DESTDIR="${D}" install install.man || die
+ docinto ${p}
+ local d=$(echo README*)
+ [[ -n ${d} ]] && dodoc ${d}
+ use doc && dohtml html/*
+ done
+ chmod a-x "${D}"/usr/share/man/*/*
+
+ use X && font_src_install
+}
+
+pkg_postinst() { use X && font_pkg_postinst ; }
+pkg_postrm() { use X && font_pkg_postrm ; }
diff --git a/net-misc/suite3270/suite3270-3.3.10_p3.ebuild b/net-misc/suite3270/suite3270-3.3.10_p3.ebuild
new file mode 100644
index 000000000000..a9517a5ba5a9
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.3.10_p3.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+IUSE="cjk doc ncurses ssl tcl X"
+
+MY_PV="${PV/_p/ga}"
+MY_P="${PN}-${MY_PV}"
+
+S="${WORKDIR}"
+DESCRIPTION="Complete 3270 access package"
+SRC_URI="mirror://sourceforge/x3270/${MY_P}-src.tgz"
+HOMEPAGE="http://x3270.bgp.nu/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~s390 ~sparc ~x86"
+
+RDEPEND="X? ( x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt )
+ ncurses? ( sys-libs/ncurses
+ sys-libs/readline )
+ ssl? ( dev-libs/openssl )
+ tcl? ( dev-lang/tcl )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-misc/imake
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf )"
+
+SUB_PV="3.3"
+MY_FONTDIR="/usr/share/fonts/x3270"
+
+suite3270_makelist() {
+ MY_PLIST="pr3287 s3270"
+ use ncurses && MY_PLIST="${MY_PLIST} c3270"
+ use tcl && MY_PLIST="${MY_PLIST} tcl3270"
+ use X && MY_PLIST="${MY_PLIST} x3270"
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ # Patches were sent upstream to maintainer
+ # as of 23 September 2009, by Jesse Farinacci <jieryn@gmail.com>
+ use X && ! use cjk && epatch "${FILESDIR}/$P-fix-x3270-dbcs.patch"
+ return 0
+}
+
+src_compile() {
+ local myconf
+
+ myconf="--without-pr3287"
+ myconf="${myconf} --cache-file=${S}/config.cache"
+ myconf="${myconf} $(use_enable cjk dbcs)"
+ myconf="${myconf} $(use_enable ssl)"
+ myconf="${myconf} $(use_with X x)"
+ myconf="${myconf} $(use_with X fontdir ${MY_FONTDIR})"
+
+ suite3270_makelist
+ for p in ${MY_PLIST} ; do
+ cd "${S}/${p}-${SUB_PV}"
+ econf ${myconf} || die "econf failed on ${p}"
+ emake || die "emake faild on ${p}"
+ done
+}
+
+src_install () {
+ suite3270_makelist
+ use X && dodir ${MY_FONTDIR}
+ for p in ${MY_PLIST} ; do
+ cd "${S}/${p}-${SUB_PV}"
+ emake DESTDIR="${D}" install install.man \
+ || die "emake failed on ${p}"
+ use doc && docinto ${p} && dohtml html/*
+ done
+
+ use X && rm -f "${D}/${MY_FONTDIR}/fonts.dir"
+ return 0
+}
+
+pkg_postinst() {
+ if use X ; then
+ einfo "Running mkfontdir on ${MY_FONTDIR}"
+ mkfontdir ${MY_FONTDIR}
+ fi
+}
diff --git a/net-misc/suite3270/suite3270-3.3.12_p10.ebuild b/net-misc/suite3270/suite3270-3.3.12_p10.ebuild
new file mode 100644
index 000000000000..b5261cdd204b
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.3.12_p10.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+MY_PV=${PV/_p/ga}
+MY_P=${PN}-${MY_PV}
+SUB_PV=${PV:0:3}
+
+S=${WORKDIR}
+
+# only the x3270 package installs fonts
+FONT_PN="x3270"
+FONT_S=${WORKDIR}/${FONT_PN}-${SUB_PV}
+
+inherit eutils font multiprocessing
+
+DESCRIPTION="Complete 3270 access package"
+HOMEPAGE="http://x3270.bgp.nu/"
+SRC_URI="mirror://sourceforge/x3270/${MY_P}-src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~s390 ~sparc ~x86"
+IUSE="cjk doc ncurses ssl tcl X"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
+ ncurses? ( sys-libs/ncurses sys-libs/readline )
+ tcl? ( dev-lang/tcl:0 )"
+DEPEND="${RDEPEND}
+ X? (
+ x11-misc/imake
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf
+ )"
+
+suite3270_makelist() {
+ echo pr3287 s3270 \
+ $(usex ncurses c3270 '') \
+ $(usex tcl tcl3270 '') \
+ $(usex X x3270 '')
+}
+
+src_configure() {
+ local p myconf
+ # Run configures in parallel!
+ multijob_init
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ if [[ ${p} == "x3270" ]] ; then
+ myconf=(
+ $(use_with X x)
+ $(use_with X fontdir "${FONTDIR}")
+ )
+ else
+ myconf=()
+ fi
+ multijob_child_init econf \
+ --cache-file="${S}"/config.cache \
+ $(use_enable cjk dbcs) \
+ $(use_enable ssl) \
+ "${myconf[@]}"
+ done
+ multijob_finish
+}
+
+src_compile() {
+ local p
+ for p in $(suite3270_makelist) ; do
+ emake -C "${S}/${p}-${SUB_PV}"
+ done
+}
+
+src_install() {
+ use X && dodir "${FONTDIR}"
+ local p
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ emake DESTDIR="${D}" install install.man
+ docinto ${p}
+ local d=$(echo README*)
+ [[ -n ${d} ]] && dodoc ${d}
+ use doc && dohtml html/*
+ done
+ chmod a-x "${D}"/usr/share/man/*/*
+
+ use X && font_src_install
+}
+
+pkg_postinst() { use X && font_pkg_postinst ; }
+pkg_postrm() { use X && font_pkg_postrm ; }
diff --git a/net-misc/suite3270/suite3270-3.3.12_p12.ebuild b/net-misc/suite3270/suite3270-3.3.12_p12.ebuild
new file mode 100644
index 000000000000..b1b2043d615c
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.3.12_p12.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+MY_PV=${PV/_p/ga}
+MY_P=${PN}-${MY_PV}
+SUB_PV=${PV:0:3}
+
+S=${WORKDIR}
+
+# only the x3270 package installs fonts
+FONT_PN="x3270"
+FONT_S=${WORKDIR}/${FONT_PN}-${SUB_PV}
+
+inherit eutils font multiprocessing
+
+DESCRIPTION="Complete 3270 access package"
+HOMEPAGE="http://x3270.bgp.nu/"
+SRC_URI="mirror://sourceforge/x3270/${MY_P}-src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc s390 sparc x86"
+IUSE="cjk doc ncurses ssl tcl X"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
+ ncurses? ( sys-libs/ncurses sys-libs/readline )
+ tcl? ( dev-lang/tcl:0 )"
+DEPEND="${RDEPEND}
+ X? (
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf
+ )"
+
+suite3270_makelist() {
+ echo pr3287 s3270 \
+ $(usex ncurses c3270 '') \
+ $(usex tcl tcl3270 '') \
+ $(usex X x3270 '')
+}
+
+src_prepare() {
+ # Some subdirs (like c3270/x3270/s3270) install the same set of data files
+ # (they have the same contents). Wrap that in a retry to avoid errors.
+ cat <<-EOF > _install
+ #!/bin/sh
+ for n in {1..5}; do
+ install "\$@" && exit
+ echo "retrying ..."
+ done
+ EOF
+ chmod a+rx _install
+ sed -i \
+ -e "s:@INSTALL@:${S}/_install:" \
+ */Makefile.in
+}
+
+src_configure() {
+ local p myconf
+ # Run configures in parallel!
+ multijob_init
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ if [[ ${p} == "x3270" ]] ; then
+ myconf=(
+ --without-xmkmf
+ $(use_with X x)
+ $(use_with X fontdir "${FONTDIR}")
+ )
+ else
+ myconf=()
+ fi
+ multijob_child_init econf \
+ --cache-file="${S}"/config.cache \
+ $(use_enable cjk dbcs) \
+ $(use_enable ssl) \
+ "${myconf[@]}"
+ done
+ sed \
+ -e "s:@SUBDIRS@:$(suite3270_makelist):" \
+ -e "s:@VER@:${SUB_PV}:" \
+ "${FILESDIR}"/Makefile.in > "${S}"/Makefile || die
+ multijob_finish
+}
+
+src_install() {
+ use X && dodir "${FONTDIR}"
+ EXTRA_TARGETS='install.man' default
+ local p
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ docinto ${p}
+ local d=$(echo README*)
+ [[ -n ${d} ]] && dodoc ${d}
+ use doc && dohtml html/*
+ done
+ find "${ED}"/usr/share/man/ -type f -exec chmod a-x {} +
+
+ use X && font_src_install
+}
+
+pkg_postinst() { use X && font_pkg_postinst ; }
+pkg_postrm() { use X && font_pkg_postrm ; }
diff --git a/net-misc/suite3270/suite3270-3.3.13_p7.ebuild b/net-misc/suite3270/suite3270-3.3.13_p7.ebuild
new file mode 100644
index 000000000000..9c4ee86d5b40
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.3.13_p7.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+MY_PV=${PV/_p/ga}
+MY_P=${PN}-${MY_PV}
+SUB_PV=${PV:0:3}
+
+S=${WORKDIR}
+
+# only the x3270 package installs fonts
+FONT_PN="x3270"
+FONT_S=${WORKDIR}/${FONT_PN}-${SUB_PV}
+
+inherit eutils font multiprocessing
+
+DESCRIPTION="Complete 3270 access package"
+HOMEPAGE="http://x3270.bgp.nu/"
+SRC_URI="mirror://sourceforge/x3270/${MY_P}-src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~s390 ~sparc ~x86"
+IUSE="cjk doc ncurses ssl tcl X"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
+ ncurses? ( sys-libs/ncurses sys-libs/readline )
+ tcl? ( dev-lang/tcl:0 )"
+DEPEND="${RDEPEND}
+ X? (
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf
+ )"
+
+suite3270_makelist() {
+ echo pr3287 s3270 \
+ $(usex ncurses c3270 '') \
+ $(usex tcl tcl3270 '') \
+ $(usex X x3270 '')
+}
+
+src_prepare() {
+ # Some subdirs (like c3270/x3270/s3270) install the same set of data files
+ # (they have the same contents). Wrap that in a retry to avoid errors.
+ cat <<-EOF > _install
+ #!/bin/sh
+ for n in {1..5}; do
+ install "\$@" && exit
+ echo "retrying ..."
+ done
+ EOF
+ chmod a+rx _install
+ sed -i \
+ -e "s:@INSTALL@:${S}/_install:" \
+ */Makefile.in
+}
+
+src_configure() {
+ local p myconf
+ # Run configures in parallel!
+ multijob_init
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ if [[ ${p} == "x3270" ]] ; then
+ myconf=(
+ --without-xmkmf
+ $(use_with X x)
+ $(use_with X fontdir "${FONTDIR}")
+ )
+ else
+ myconf=()
+ fi
+ multijob_child_init econf \
+ --cache-file="${S}"/config.cache \
+ $(use_enable cjk dbcs) \
+ $(use_enable ssl) \
+ "${myconf[@]}"
+ done
+ sed \
+ -e "s:@SUBDIRS@:$(suite3270_makelist):" \
+ -e "s:@VER@:${SUB_PV}:" \
+ "${FILESDIR}"/Makefile.in > "${S}"/Makefile || die
+ multijob_finish
+}
+
+src_install() {
+ use X && dodir "${FONTDIR}"
+ EXTRA_TARGETS='install.man' default
+ local p
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ docinto ${p}
+ local d=$(echo README*)
+ [[ -n ${d} ]] && dodoc ${d}
+ use doc && dohtml html/*
+ done
+ find "${ED}"/usr/share/man/ -type f -exec chmod a-x {} +
+
+ use X && font_src_install
+}
+
+pkg_postinst() { use X && font_pkg_postinst ; }
+pkg_postrm() { use X && font_pkg_postrm ; }
diff --git a/net-misc/suite3270/suite3270-3.3.14_p11.ebuild b/net-misc/suite3270/suite3270-3.3.14_p11.ebuild
new file mode 100644
index 000000000000..f248d1c47295
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.3.14_p11.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+MY_PV=${PV/_p/ga}
+MY_P=${PN}-${MY_PV}
+SUB_PV=${PV:0:3}
+
+S=${WORKDIR}
+
+# only the x3270 package installs fonts
+FONT_PN="x3270"
+FONT_S=${WORKDIR}/${FONT_PN}-${SUB_PV}
+
+inherit eutils font multiprocessing
+
+DESCRIPTION="Complete 3270 access package"
+HOMEPAGE="http://x3270.bgp.nu/"
+SRC_URI="mirror://sourceforge/x3270/${MY_P}-src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc s390 sparc x86"
+IUSE="cjk doc ncurses ssl tcl X"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
+ ncurses? ( sys-libs/ncurses sys-libs/readline )
+ tcl? ( dev-lang/tcl:0 )"
+DEPEND="${RDEPEND}
+ X? (
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf
+ )"
+
+suite3270_makelist() {
+ echo pr3287 s3270 \
+ $(usex ncurses c3270 '') \
+ $(usex tcl tcl3270 '') \
+ $(usex X x3270 '')
+}
+
+src_prepare() {
+ # Some subdirs (like c3270/x3270/s3270) install the same set of data files
+ # (they have the same contents). Wrap that in a retry to avoid errors.
+ cat <<-EOF > _install
+ #!/bin/sh
+ for n in {1..5}; do
+ install "\$@" && exit
+ echo "retrying ..."
+ done
+ EOF
+ chmod a+rx _install
+ sed -i \
+ -e "s:@INSTALL@:${S}/_install:" \
+ */Makefile.in
+
+ sed -i \
+ -e 's:CPPFunction:rl_completion_func_t:' \
+ c3270-*/c3270.c || die #503364
+}
+
+src_configure() {
+ local p myconf
+ # Run configures in parallel!
+ multijob_init
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ if [[ ${p} == "x3270" ]] ; then
+ myconf=(
+ --without-xmkmf
+ $(use_with X x)
+ $(use_with X fontdir "${FONTDIR}")
+ )
+ else
+ myconf=()
+ fi
+ multijob_child_init econf \
+ --cache-file="${S}"/config.cache \
+ $(use_enable cjk dbcs) \
+ $(use_enable ssl) \
+ "${myconf[@]}"
+ done
+ sed \
+ -e "s:@SUBDIRS@:$(suite3270_makelist):" \
+ -e "s:@VER@:${SUB_PV}:" \
+ "${FILESDIR}"/Makefile.in > "${S}"/Makefile || die
+ multijob_finish
+}
+
+src_install() {
+ use X && dodir "${FONTDIR}"
+ EXTRA_TARGETS='install.man' default
+ local p
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ docinto ${p}
+ local d=$(echo README*)
+ [[ -n ${d} ]] && dodoc ${d}
+ use doc && dohtml html/*
+ done
+ find "${ED}"/usr/share/man/ -type f -perm /1 -exec chmod a-x {} +
+
+ use X && font_src_install
+}
+
+pkg_postinst() { use X && font_pkg_postinst ; }
+pkg_postrm() { use X && font_pkg_postrm ; }
diff --git a/net-misc/suite3270/suite3270-3.3.14_p6.ebuild b/net-misc/suite3270/suite3270-3.3.14_p6.ebuild
new file mode 100644
index 000000000000..f248d1c47295
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.3.14_p6.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+MY_PV=${PV/_p/ga}
+MY_P=${PN}-${MY_PV}
+SUB_PV=${PV:0:3}
+
+S=${WORKDIR}
+
+# only the x3270 package installs fonts
+FONT_PN="x3270"
+FONT_S=${WORKDIR}/${FONT_PN}-${SUB_PV}
+
+inherit eutils font multiprocessing
+
+DESCRIPTION="Complete 3270 access package"
+HOMEPAGE="http://x3270.bgp.nu/"
+SRC_URI="mirror://sourceforge/x3270/${MY_P}-src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc s390 sparc x86"
+IUSE="cjk doc ncurses ssl tcl X"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
+ ncurses? ( sys-libs/ncurses sys-libs/readline )
+ tcl? ( dev-lang/tcl:0 )"
+DEPEND="${RDEPEND}
+ X? (
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf
+ )"
+
+suite3270_makelist() {
+ echo pr3287 s3270 \
+ $(usex ncurses c3270 '') \
+ $(usex tcl tcl3270 '') \
+ $(usex X x3270 '')
+}
+
+src_prepare() {
+ # Some subdirs (like c3270/x3270/s3270) install the same set of data files
+ # (they have the same contents). Wrap that in a retry to avoid errors.
+ cat <<-EOF > _install
+ #!/bin/sh
+ for n in {1..5}; do
+ install "\$@" && exit
+ echo "retrying ..."
+ done
+ EOF
+ chmod a+rx _install
+ sed -i \
+ -e "s:@INSTALL@:${S}/_install:" \
+ */Makefile.in
+
+ sed -i \
+ -e 's:CPPFunction:rl_completion_func_t:' \
+ c3270-*/c3270.c || die #503364
+}
+
+src_configure() {
+ local p myconf
+ # Run configures in parallel!
+ multijob_init
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ if [[ ${p} == "x3270" ]] ; then
+ myconf=(
+ --without-xmkmf
+ $(use_with X x)
+ $(use_with X fontdir "${FONTDIR}")
+ )
+ else
+ myconf=()
+ fi
+ multijob_child_init econf \
+ --cache-file="${S}"/config.cache \
+ $(use_enable cjk dbcs) \
+ $(use_enable ssl) \
+ "${myconf[@]}"
+ done
+ sed \
+ -e "s:@SUBDIRS@:$(suite3270_makelist):" \
+ -e "s:@VER@:${SUB_PV}:" \
+ "${FILESDIR}"/Makefile.in > "${S}"/Makefile || die
+ multijob_finish
+}
+
+src_install() {
+ use X && dodir "${FONTDIR}"
+ EXTRA_TARGETS='install.man' default
+ local p
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ docinto ${p}
+ local d=$(echo README*)
+ [[ -n ${d} ]] && dodoc ${d}
+ use doc && dohtml html/*
+ done
+ find "${ED}"/usr/share/man/ -type f -perm /1 -exec chmod a-x {} +
+
+ use X && font_src_install
+}
+
+pkg_postinst() { use X && font_pkg_postinst ; }
+pkg_postrm() { use X && font_pkg_postrm ; }
diff --git a/net-misc/suite3270/suite3270-3.3.14_p7.ebuild b/net-misc/suite3270/suite3270-3.3.14_p7.ebuild
new file mode 100644
index 000000000000..861819d35669
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.3.14_p7.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+MY_PV=${PV/_p/ga}
+MY_P=${PN}-${MY_PV}
+SUB_PV=${PV:0:3}
+
+S=${WORKDIR}
+
+# only the x3270 package installs fonts
+FONT_PN="x3270"
+FONT_S=${WORKDIR}/${FONT_PN}-${SUB_PV}
+
+inherit eutils font multiprocessing
+
+DESCRIPTION="Complete 3270 access package"
+HOMEPAGE="http://x3270.bgp.nu/"
+SRC_URI="mirror://sourceforge/x3270/${MY_P}-src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ~s390 sparc x86"
+IUSE="cjk doc ncurses ssl tcl X"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
+ ncurses? ( sys-libs/ncurses sys-libs/readline )
+ tcl? ( dev-lang/tcl:0 )"
+DEPEND="${RDEPEND}
+ X? (
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf
+ )"
+
+suite3270_makelist() {
+ echo pr3287 s3270 \
+ $(usex ncurses c3270 '') \
+ $(usex tcl tcl3270 '') \
+ $(usex X x3270 '')
+}
+
+src_prepare() {
+ # Some subdirs (like c3270/x3270/s3270) install the same set of data files
+ # (they have the same contents). Wrap that in a retry to avoid errors.
+ cat <<-EOF > _install
+ #!/bin/sh
+ for n in {1..5}; do
+ install "\$@" && exit
+ echo "retrying ..."
+ done
+ EOF
+ chmod a+rx _install
+ sed -i \
+ -e "s:@INSTALL@:${S}/_install:" \
+ */Makefile.in
+
+ sed -i \
+ -e 's:CPPFunction:rl_completion_func_t:' \
+ c3270-*/c3270.c || die #503364
+}
+
+src_configure() {
+ local p myconf
+ # Run configures in parallel!
+ multijob_init
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ if [[ ${p} == "x3270" ]] ; then
+ myconf=(
+ --without-xmkmf
+ $(use_with X x)
+ $(use_with X fontdir "${FONTDIR}")
+ )
+ else
+ myconf=()
+ fi
+ multijob_child_init econf \
+ --cache-file="${S}"/config.cache \
+ $(use_enable cjk dbcs) \
+ $(use_enable ssl) \
+ "${myconf[@]}"
+ done
+ sed \
+ -e "s:@SUBDIRS@:$(suite3270_makelist):" \
+ -e "s:@VER@:${SUB_PV}:" \
+ "${FILESDIR}"/Makefile.in > "${S}"/Makefile || die
+ multijob_finish
+}
+
+src_install() {
+ use X && dodir "${FONTDIR}"
+ EXTRA_TARGETS='install.man' default
+ local p
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ docinto ${p}
+ local d=$(echo README*)
+ [[ -n ${d} ]] && dodoc ${d}
+ use doc && dohtml html/*
+ done
+ find "${ED}"/usr/share/man/ -type f -perm /1 -exec chmod a-x {} +
+
+ use X && font_src_install
+}
+
+pkg_postinst() { use X && font_pkg_postinst ; }
+pkg_postrm() { use X && font_pkg_postrm ; }
diff --git a/net-misc/suite3270/suite3270-3.3.14_p9.ebuild b/net-misc/suite3270/suite3270-3.3.14_p9.ebuild
new file mode 100644
index 000000000000..3e26b40c403e
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.3.14_p9.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+MY_PV=${PV/_p/ga}
+MY_P=${PN}-${MY_PV}
+SUB_PV=${PV:0:3}
+
+S=${WORKDIR}
+
+# only the x3270 package installs fonts
+FONT_PN="x3270"
+FONT_S=${WORKDIR}/${FONT_PN}-${SUB_PV}
+
+inherit eutils font multiprocessing
+
+DESCRIPTION="Complete 3270 access package"
+HOMEPAGE="http://x3270.bgp.nu/"
+SRC_URI="mirror://sourceforge/x3270/${MY_P}-src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~s390 ~sparc ~x86"
+IUSE="cjk doc ncurses ssl tcl X"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
+ ncurses? ( sys-libs/ncurses sys-libs/readline )
+ tcl? ( dev-lang/tcl:0 )"
+DEPEND="${RDEPEND}
+ X? (
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf
+ )"
+
+suite3270_makelist() {
+ echo pr3287 s3270 \
+ $(usex ncurses c3270 '') \
+ $(usex tcl tcl3270 '') \
+ $(usex X x3270 '')
+}
+
+src_prepare() {
+ # Some subdirs (like c3270/x3270/s3270) install the same set of data files
+ # (they have the same contents). Wrap that in a retry to avoid errors.
+ cat <<-EOF > _install
+ #!/bin/sh
+ for n in {1..5}; do
+ install "\$@" && exit
+ echo "retrying ..."
+ done
+ EOF
+ chmod a+rx _install
+ sed -i \
+ -e "s:@INSTALL@:${S}/_install:" \
+ */Makefile.in
+
+ sed -i \
+ -e 's:CPPFunction:rl_completion_func_t:' \
+ c3270-*/c3270.c || die #503364
+}
+
+src_configure() {
+ local p myconf
+ # Run configures in parallel!
+ multijob_init
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ if [[ ${p} == "x3270" ]] ; then
+ myconf=(
+ --without-xmkmf
+ $(use_with X x)
+ $(use_with X fontdir "${FONTDIR}")
+ )
+ else
+ myconf=()
+ fi
+ multijob_child_init econf \
+ --cache-file="${S}"/config.cache \
+ $(use_enable cjk dbcs) \
+ $(use_enable ssl) \
+ "${myconf[@]}"
+ done
+ sed \
+ -e "s:@SUBDIRS@:$(suite3270_makelist):" \
+ -e "s:@VER@:${SUB_PV}:" \
+ "${FILESDIR}"/Makefile.in > "${S}"/Makefile || die
+ multijob_finish
+}
+
+src_install() {
+ use X && dodir "${FONTDIR}"
+ EXTRA_TARGETS='install.man' default
+ local p
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ docinto ${p}
+ local d=$(echo README*)
+ [[ -n ${d} ]] && dodoc ${d}
+ use doc && dohtml html/*
+ done
+ find "${ED}"/usr/share/man/ -type f -perm /1 -exec chmod a-x {} +
+
+ use X && font_src_install
+}
+
+pkg_postinst() { use X && font_pkg_postinst ; }
+pkg_postrm() { use X && font_pkg_postrm ; }
diff --git a/net-misc/suite3270/suite3270-3.3.15_p4.ebuild b/net-misc/suite3270/suite3270-3.3.15_p4.ebuild
new file mode 100644
index 000000000000..3e26b40c403e
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.3.15_p4.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+MY_PV=${PV/_p/ga}
+MY_P=${PN}-${MY_PV}
+SUB_PV=${PV:0:3}
+
+S=${WORKDIR}
+
+# only the x3270 package installs fonts
+FONT_PN="x3270"
+FONT_S=${WORKDIR}/${FONT_PN}-${SUB_PV}
+
+inherit eutils font multiprocessing
+
+DESCRIPTION="Complete 3270 access package"
+HOMEPAGE="http://x3270.bgp.nu/"
+SRC_URI="mirror://sourceforge/x3270/${MY_P}-src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~s390 ~sparc ~x86"
+IUSE="cjk doc ncurses ssl tcl X"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
+ ncurses? ( sys-libs/ncurses sys-libs/readline )
+ tcl? ( dev-lang/tcl:0 )"
+DEPEND="${RDEPEND}
+ X? (
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf
+ )"
+
+suite3270_makelist() {
+ echo pr3287 s3270 \
+ $(usex ncurses c3270 '') \
+ $(usex tcl tcl3270 '') \
+ $(usex X x3270 '')
+}
+
+src_prepare() {
+ # Some subdirs (like c3270/x3270/s3270) install the same set of data files
+ # (they have the same contents). Wrap that in a retry to avoid errors.
+ cat <<-EOF > _install
+ #!/bin/sh
+ for n in {1..5}; do
+ install "\$@" && exit
+ echo "retrying ..."
+ done
+ EOF
+ chmod a+rx _install
+ sed -i \
+ -e "s:@INSTALL@:${S}/_install:" \
+ */Makefile.in
+
+ sed -i \
+ -e 's:CPPFunction:rl_completion_func_t:' \
+ c3270-*/c3270.c || die #503364
+}
+
+src_configure() {
+ local p myconf
+ # Run configures in parallel!
+ multijob_init
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ if [[ ${p} == "x3270" ]] ; then
+ myconf=(
+ --without-xmkmf
+ $(use_with X x)
+ $(use_with X fontdir "${FONTDIR}")
+ )
+ else
+ myconf=()
+ fi
+ multijob_child_init econf \
+ --cache-file="${S}"/config.cache \
+ $(use_enable cjk dbcs) \
+ $(use_enable ssl) \
+ "${myconf[@]}"
+ done
+ sed \
+ -e "s:@SUBDIRS@:$(suite3270_makelist):" \
+ -e "s:@VER@:${SUB_PV}:" \
+ "${FILESDIR}"/Makefile.in > "${S}"/Makefile || die
+ multijob_finish
+}
+
+src_install() {
+ use X && dodir "${FONTDIR}"
+ EXTRA_TARGETS='install.man' default
+ local p
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ docinto ${p}
+ local d=$(echo README*)
+ [[ -n ${d} ]] && dodoc ${d}
+ use doc && dohtml html/*
+ done
+ find "${ED}"/usr/share/man/ -type f -perm /1 -exec chmod a-x {} +
+
+ use X && font_src_install
+}
+
+pkg_postinst() { use X && font_pkg_postinst ; }
+pkg_postrm() { use X && font_pkg_postrm ; }
diff --git a/net-misc/suite3270/suite3270-3.3.15_p7.ebuild b/net-misc/suite3270/suite3270-3.3.15_p7.ebuild
new file mode 100644
index 000000000000..3e26b40c403e
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.3.15_p7.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+MY_PV=${PV/_p/ga}
+MY_P=${PN}-${MY_PV}
+SUB_PV=${PV:0:3}
+
+S=${WORKDIR}
+
+# only the x3270 package installs fonts
+FONT_PN="x3270"
+FONT_S=${WORKDIR}/${FONT_PN}-${SUB_PV}
+
+inherit eutils font multiprocessing
+
+DESCRIPTION="Complete 3270 access package"
+HOMEPAGE="http://x3270.bgp.nu/"
+SRC_URI="mirror://sourceforge/x3270/${MY_P}-src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~s390 ~sparc ~x86"
+IUSE="cjk doc ncurses ssl tcl X"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
+ ncurses? ( sys-libs/ncurses sys-libs/readline )
+ tcl? ( dev-lang/tcl:0 )"
+DEPEND="${RDEPEND}
+ X? (
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf
+ )"
+
+suite3270_makelist() {
+ echo pr3287 s3270 \
+ $(usex ncurses c3270 '') \
+ $(usex tcl tcl3270 '') \
+ $(usex X x3270 '')
+}
+
+src_prepare() {
+ # Some subdirs (like c3270/x3270/s3270) install the same set of data files
+ # (they have the same contents). Wrap that in a retry to avoid errors.
+ cat <<-EOF > _install
+ #!/bin/sh
+ for n in {1..5}; do
+ install "\$@" && exit
+ echo "retrying ..."
+ done
+ EOF
+ chmod a+rx _install
+ sed -i \
+ -e "s:@INSTALL@:${S}/_install:" \
+ */Makefile.in
+
+ sed -i \
+ -e 's:CPPFunction:rl_completion_func_t:' \
+ c3270-*/c3270.c || die #503364
+}
+
+src_configure() {
+ local p myconf
+ # Run configures in parallel!
+ multijob_init
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ if [[ ${p} == "x3270" ]] ; then
+ myconf=(
+ --without-xmkmf
+ $(use_with X x)
+ $(use_with X fontdir "${FONTDIR}")
+ )
+ else
+ myconf=()
+ fi
+ multijob_child_init econf \
+ --cache-file="${S}"/config.cache \
+ $(use_enable cjk dbcs) \
+ $(use_enable ssl) \
+ "${myconf[@]}"
+ done
+ sed \
+ -e "s:@SUBDIRS@:$(suite3270_makelist):" \
+ -e "s:@VER@:${SUB_PV}:" \
+ "${FILESDIR}"/Makefile.in > "${S}"/Makefile || die
+ multijob_finish
+}
+
+src_install() {
+ use X && dodir "${FONTDIR}"
+ EXTRA_TARGETS='install.man' default
+ local p
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ docinto ${p}
+ local d=$(echo README*)
+ [[ -n ${d} ]] && dodoc ${d}
+ use doc && dohtml html/*
+ done
+ find "${ED}"/usr/share/man/ -type f -perm /1 -exec chmod a-x {} +
+
+ use X && font_src_install
+}
+
+pkg_postinst() { use X && font_pkg_postinst ; }
+pkg_postrm() { use X && font_pkg_postrm ; }
diff --git a/net-misc/suite3270/suite3270-3.3.15_p9.ebuild b/net-misc/suite3270/suite3270-3.3.15_p9.ebuild
new file mode 100644
index 000000000000..3e26b40c403e
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.3.15_p9.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+MY_PV=${PV/_p/ga}
+MY_P=${PN}-${MY_PV}
+SUB_PV=${PV:0:3}
+
+S=${WORKDIR}
+
+# only the x3270 package installs fonts
+FONT_PN="x3270"
+FONT_S=${WORKDIR}/${FONT_PN}-${SUB_PV}
+
+inherit eutils font multiprocessing
+
+DESCRIPTION="Complete 3270 access package"
+HOMEPAGE="http://x3270.bgp.nu/"
+SRC_URI="mirror://sourceforge/x3270/${MY_P}-src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~s390 ~sparc ~x86"
+IUSE="cjk doc ncurses ssl tcl X"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
+ ncurses? ( sys-libs/ncurses sys-libs/readline )
+ tcl? ( dev-lang/tcl:0 )"
+DEPEND="${RDEPEND}
+ X? (
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf
+ )"
+
+suite3270_makelist() {
+ echo pr3287 s3270 \
+ $(usex ncurses c3270 '') \
+ $(usex tcl tcl3270 '') \
+ $(usex X x3270 '')
+}
+
+src_prepare() {
+ # Some subdirs (like c3270/x3270/s3270) install the same set of data files
+ # (they have the same contents). Wrap that in a retry to avoid errors.
+ cat <<-EOF > _install
+ #!/bin/sh
+ for n in {1..5}; do
+ install "\$@" && exit
+ echo "retrying ..."
+ done
+ EOF
+ chmod a+rx _install
+ sed -i \
+ -e "s:@INSTALL@:${S}/_install:" \
+ */Makefile.in
+
+ sed -i \
+ -e 's:CPPFunction:rl_completion_func_t:' \
+ c3270-*/c3270.c || die #503364
+}
+
+src_configure() {
+ local p myconf
+ # Run configures in parallel!
+ multijob_init
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ if [[ ${p} == "x3270" ]] ; then
+ myconf=(
+ --without-xmkmf
+ $(use_with X x)
+ $(use_with X fontdir "${FONTDIR}")
+ )
+ else
+ myconf=()
+ fi
+ multijob_child_init econf \
+ --cache-file="${S}"/config.cache \
+ $(use_enable cjk dbcs) \
+ $(use_enable ssl) \
+ "${myconf[@]}"
+ done
+ sed \
+ -e "s:@SUBDIRS@:$(suite3270_makelist):" \
+ -e "s:@VER@:${SUB_PV}:" \
+ "${FILESDIR}"/Makefile.in > "${S}"/Makefile || die
+ multijob_finish
+}
+
+src_install() {
+ use X && dodir "${FONTDIR}"
+ EXTRA_TARGETS='install.man' default
+ local p
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}-${SUB_PV}"
+ docinto ${p}
+ local d=$(echo README*)
+ [[ -n ${d} ]] && dodoc ${d}
+ use doc && dohtml html/*
+ done
+ find "${ED}"/usr/share/man/ -type f -perm /1 -exec chmod a-x {} +
+
+ use X && font_src_install
+}
+
+pkg_postinst() { use X && font_pkg_postinst ; }
+pkg_postrm() { use X && font_pkg_postrm ; }
diff --git a/net-misc/suite3270/suite3270-3.3.5_p8.ebuild b/net-misc/suite3270/suite3270-3.3.5_p8.ebuild
new file mode 100644
index 000000000000..38f88d9f00a7
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.3.5_p8.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+IUSE="cjk doc ncurses ssl tcl X"
+
+S="${WORKDIR}"
+DESCRIPTION="Complete 3270 access package"
+SRC_URI="mirror://gentoo/${PN}-${PV/_/}.tgz"
+HOMEPAGE="http://x3270.bgp.nu/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc s390 sparc x86"
+
+RDEPEND="X? ( x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt )
+ cjk? ( dev-libs/icu )
+ ncurses? ( sys-libs/ncurses
+ sys-libs/readline )
+ ssl? ( dev-libs/openssl )
+ tcl? ( dev-lang/tcl )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-misc/imake
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf )"
+
+SUB_PV="3.3"
+MY_FONTDIR="/usr/share/fonts/x3270"
+
+suite3270_makelist() {
+ MY_PLIST="pr3287 s3270"
+ use ncurses && MY_PLIST="${MY_PLIST} c3270"
+ use tcl && MY_PLIST="${MY_PLIST} tcl3270"
+ use X && MY_PLIST="${MY_PLIST} x3270"
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ # Patches were sent upstream to maintainer
+ # as of 11 May 2007, by Jesse Farinacci <jieryn@gmail.com>
+ epatch "${FILESDIR}"/configure-3.3.5.patch
+ use cjk && epatch "${FILESDIR}"/makeconv-3.3.5.patch
+ return 0
+}
+
+src_compile() {
+ local myconf
+
+ myconf="--without-pr3287"
+ myconf="${myconf} --cache-file=${S}/config.cache"
+ myconf="${myconf} $(use_enable cjk dbcs)"
+ myconf="${myconf} $(use_enable ssl)"
+ myconf="${myconf} $(use_with X x)"
+ myconf="${myconf} $(use_with X fontdir ${MY_FONTDIR})"
+
+ suite3270_makelist
+ for p in ${MY_PLIST} ; do
+ cd "${S}/${p}-${SUB_PV}"
+ econf ${myconf} || die "econf failed on ${p}"
+ emake || die "emake faild on ${p}"
+ done
+}
+
+src_install () {
+ suite3270_makelist
+ use X && dodir ${MY_FONTDIR}
+ for p in ${MY_PLIST} ; do
+ cd "${S}/${p}-${SUB_PV}"
+ emake -j1 DESTDIR="${D}" install install.man \
+ || die "emake failed on ${p}"
+ use doc && docinto ${p} && dohtml html/*
+ done
+
+ use X && rm -f "${D}/${MY_FONTDIR}/fonts.dir"
+ return 0
+}
+
+pkg_postinst() {
+ if use X ; then
+ einfo "Running mkfontdir on ${MY_FONTDIR}"
+ mkfontdir ${MY_FONTDIR}
+ fi
+}
diff --git a/net-misc/suite3270/suite3270-3.3.6.ebuild b/net-misc/suite3270/suite3270-3.3.6.ebuild
new file mode 100644
index 000000000000..c1fc154339b9
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.3.6.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+IUSE="cjk doc ncurses ssl tcl X"
+
+S="${WORKDIR}"
+DESCRIPTION="Complete 3270 access package"
+SRC_URI="mirror://gentoo/${PN}-${PV/_/}.tgz"
+HOMEPAGE="http://x3270.bgp.nu/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~s390 ~sparc ~x86"
+
+RDEPEND="X? ( x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt )
+ cjk? ( dev-libs/icu )
+ ncurses? ( sys-libs/ncurses
+ sys-libs/readline )
+ ssl? ( dev-libs/openssl )
+ tcl? ( dev-lang/tcl )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-misc/imake
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf )"
+
+SUB_PV="3.3"
+MY_FONTDIR="/usr/share/fonts/x3270"
+
+suite3270_makelist() {
+ MY_PLIST="pr3287 s3270"
+ use ncurses && MY_PLIST="${MY_PLIST} c3270"
+ use tcl && MY_PLIST="${MY_PLIST} tcl3270"
+ use X && MY_PLIST="${MY_PLIST} x3270"
+}
+
+src_compile() {
+ local myconf
+
+ myconf="--without-pr3287"
+ myconf="${myconf} --cache-file=${S}/config.cache"
+ myconf="${myconf} $(use_enable cjk dbcs)"
+ myconf="${myconf} $(use_enable ssl)"
+ myconf="${myconf} $(use_with X x)"
+ myconf="${myconf} $(use_with X fontdir ${MY_FONTDIR})"
+
+ suite3270_makelist
+ for p in ${MY_PLIST} ; do
+ cd "${S}/${p}-${SUB_PV}"
+ econf ${myconf} || die "econf failed on ${p}"
+ emake || die "emake faild on ${p}"
+ done
+}
+
+src_install () {
+ suite3270_makelist
+ use X && dodir ${MY_FONTDIR}
+ for p in ${MY_PLIST} ; do
+ cd "${S}/${p}-${SUB_PV}"
+ emake -j1 DESTDIR="${D}" install install.man \
+ || die "emake failed on ${p}"
+ use doc && docinto ${p} && dohtml html/*
+ done
+
+ use X && rm -f "${D}/${MY_FONTDIR}/fonts.dir"
+ return 0
+}
+
+pkg_postinst() {
+ if use X ; then
+ einfo "Running mkfontdir on ${MY_FONTDIR}"
+ mkfontdir ${MY_FONTDIR}
+ fi
+}
diff --git a/net-misc/suite3270/suite3270-3.3.7.ebuild b/net-misc/suite3270/suite3270-3.3.7.ebuild
new file mode 100644
index 000000000000..373ece463ab6
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.3.7.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+IUSE="cjk doc ncurses ssl tcl X"
+
+S="${WORKDIR}"
+DESCRIPTION="Complete 3270 access package"
+SRC_URI="mirror://gentoo/${PN}-${PV/_/}.tgz"
+HOMEPAGE="http://x3270.bgp.nu/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~s390 ~sparc ~x86"
+
+RDEPEND="X? ( x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt )
+ cjk? ( dev-libs/icu )
+ ncurses? ( sys-libs/ncurses
+ sys-libs/readline )
+ ssl? ( dev-libs/openssl )
+ tcl? ( dev-lang/tcl )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-misc/imake
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf )"
+
+SUB_PV="3.3"
+MY_FONTDIR="/usr/share/fonts/x3270"
+
+suite3270_makelist() {
+ MY_PLIST="pr3287 s3270"
+ use ncurses && MY_PLIST="${MY_PLIST} c3270"
+ use tcl && MY_PLIST="${MY_PLIST} tcl3270"
+ use X && MY_PLIST="${MY_PLIST} x3270"
+}
+
+src_compile() {
+ local myconf
+
+ myconf="--without-pr3287"
+ myconf="${myconf} --cache-file=${S}/config.cache"
+ myconf="${myconf} $(use_enable cjk dbcs)"
+ myconf="${myconf} $(use_enable ssl)"
+ myconf="${myconf} $(use_with X x)"
+ myconf="${myconf} $(use_with X fontdir ${MY_FONTDIR})"
+
+ suite3270_makelist
+ for p in ${MY_PLIST} ; do
+ cd "${S}/${p}-${SUB_PV}"
+ econf ${myconf} || die "econf failed on ${p}"
+ emake || die "emake faild on ${p}"
+ done
+}
+
+src_install () {
+ suite3270_makelist
+ use X && dodir ${MY_FONTDIR}
+ for p in ${MY_PLIST} ; do
+ cd "${S}/${p}-${SUB_PV}"
+ emake DESTDIR="${D}" install install.man \
+ || die "emake failed on ${p}"
+ use doc && docinto ${p} && dohtml html/*
+ done
+
+ use X && rm -f "${D}/${MY_FONTDIR}/fonts.dir"
+ return 0
+}
+
+pkg_postinst() {
+ if use X ; then
+ einfo "Running mkfontdir on ${MY_FONTDIR}"
+ mkfontdir ${MY_FONTDIR}
+ fi
+}
diff --git a/net-misc/suite3270/suite3270-3.3.7_p5.ebuild b/net-misc/suite3270/suite3270-3.3.7_p5.ebuild
new file mode 100644
index 000000000000..ddbaded8dfe5
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.3.7_p5.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+IUSE="cjk doc ncurses ssl tcl X"
+
+S="${WORKDIR}"
+DESCRIPTION="Complete 3270 access package"
+SRC_URI="http://x3270.bgp.nu/download/${PN}-${PV/_/}.tgz"
+HOMEPAGE="http://x3270.bgp.nu/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc s390 sparc x86"
+
+RDEPEND="X? ( x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt )
+ cjk? ( dev-libs/icu )
+ ncurses? ( sys-libs/ncurses
+ sys-libs/readline )
+ ssl? ( dev-libs/openssl )
+ tcl? ( dev-lang/tcl )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-misc/imake
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf )"
+
+SUB_PV="3.3"
+MY_FONTDIR="/usr/share/fonts/x3270"
+
+suite3270_makelist() {
+ MY_PLIST="pr3287 s3270"
+ use ncurses && MY_PLIST="${MY_PLIST} c3270"
+ use tcl && MY_PLIST="${MY_PLIST} tcl3270"
+ use X && MY_PLIST="${MY_PLIST} x3270"
+}
+
+src_compile() {
+ local myconf
+
+ myconf="--without-pr3287"
+ myconf="${myconf} --cache-file=${S}/config.cache"
+ myconf="${myconf} $(use_enable cjk dbcs)"
+ myconf="${myconf} $(use_enable ssl)"
+ myconf="${myconf} $(use_with X x)"
+ myconf="${myconf} $(use_with X fontdir ${MY_FONTDIR})"
+
+ suite3270_makelist
+ for p in ${MY_PLIST} ; do
+ cd "${S}/${p}-${SUB_PV}"
+ econf ${myconf} || die "econf failed on ${p}"
+ emake || die "emake faild on ${p}"
+ done
+}
+
+src_install () {
+ suite3270_makelist
+ use X && dodir ${MY_FONTDIR}
+ for p in ${MY_PLIST} ; do
+ cd "${S}/${p}-${SUB_PV}"
+ emake DESTDIR="${D}" install install.man \
+ || die "emake failed on ${p}"
+ use doc && docinto ${p} && dohtml html/*
+ done
+
+ use X && rm -f "${D}/${MY_FONTDIR}/fonts.dir"
+ return 0
+}
+
+pkg_postinst() {
+ if use X ; then
+ einfo "Running mkfontdir on ${MY_FONTDIR}"
+ mkfontdir ${MY_FONTDIR}
+ fi
+}
diff --git a/net-misc/suite3270/suite3270-3.3.7_p8.ebuild b/net-misc/suite3270/suite3270-3.3.7_p8.ebuild
new file mode 100644
index 000000000000..266510fd63e8
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.3.7_p8.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+IUSE="cjk doc ncurses ssl tcl X"
+
+S="${WORKDIR}"
+DESCRIPTION="Complete 3270 access package"
+SRC_URI="http://x3270.bgp.nu/download/${PN}-${PV/_/}.tgz"
+HOMEPAGE="http://x3270.bgp.nu/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~s390 ~sparc ~x86"
+
+RDEPEND="X? ( x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt )
+ cjk? ( dev-libs/icu )
+ ncurses? ( sys-libs/ncurses
+ sys-libs/readline )
+ ssl? ( dev-libs/openssl )
+ tcl? ( dev-lang/tcl )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-misc/imake
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf )"
+
+SUB_PV="3.3"
+MY_FONTDIR="/usr/share/fonts/x3270"
+
+suite3270_makelist() {
+ MY_PLIST="pr3287 s3270"
+ use ncurses && MY_PLIST="${MY_PLIST} c3270"
+ use tcl && MY_PLIST="${MY_PLIST} tcl3270"
+ use X && MY_PLIST="${MY_PLIST} x3270"
+}
+
+src_compile() {
+ local myconf
+
+ myconf="--without-pr3287"
+ myconf="${myconf} --cache-file=${S}/config.cache"
+ myconf="${myconf} $(use_enable cjk dbcs)"
+ myconf="${myconf} $(use_enable ssl)"
+ myconf="${myconf} $(use_with X x)"
+ myconf="${myconf} $(use_with X fontdir ${MY_FONTDIR})"
+
+ suite3270_makelist
+ for p in ${MY_PLIST} ; do
+ cd "${S}/${p}-${SUB_PV}"
+ econf ${myconf} || die "econf failed on ${p}"
+ emake || die "emake faild on ${p}"
+ done
+}
+
+src_install () {
+ suite3270_makelist
+ use X && dodir ${MY_FONTDIR}
+ for p in ${MY_PLIST} ; do
+ cd "${S}/${p}-${SUB_PV}"
+ emake DESTDIR="${D}" install install.man \
+ || die "emake failed on ${p}"
+ use doc && docinto ${p} && dohtml html/*
+ done
+
+ use X && rm -f "${D}/${MY_FONTDIR}/fonts.dir"
+ return 0
+}
+
+pkg_postinst() {
+ if use X ; then
+ einfo "Running mkfontdir on ${MY_FONTDIR}"
+ mkfontdir ${MY_FONTDIR}
+ fi
+}
diff --git a/net-misc/suite3270/suite3270-3.3.8.ebuild b/net-misc/suite3270/suite3270-3.3.8.ebuild
new file mode 100644
index 000000000000..c024501b4cac
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.3.8.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+IUSE="cjk doc ncurses ssl tcl X"
+
+S="${WORKDIR}"
+DESCRIPTION="Complete 3270 access package"
+SRC_URI="http://x3270.bgp.nu/download/${PN}-${PV/_/}.tgz"
+HOMEPAGE="http://x3270.bgp.nu/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~s390 ~sparc ~x86"
+
+RDEPEND="X? ( x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt )
+ ncurses? ( sys-libs/ncurses
+ sys-libs/readline )
+ ssl? ( dev-libs/openssl )
+ tcl? ( dev-lang/tcl )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-misc/imake
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf )"
+
+SUB_PV="3.3"
+MY_FONTDIR="/usr/share/fonts/x3270"
+
+suite3270_makelist() {
+ MY_PLIST="pr3287 s3270"
+ use ncurses && MY_PLIST="${MY_PLIST} c3270"
+ use tcl && MY_PLIST="${MY_PLIST} tcl3270"
+ use X && MY_PLIST="${MY_PLIST} x3270"
+}
+
+src_compile() {
+ local myconf
+
+ myconf="--without-pr3287"
+ myconf="${myconf} --cache-file=${S}/config.cache"
+ myconf="${myconf} $(use_enable cjk dbcs)"
+ myconf="${myconf} $(use_enable ssl)"
+ myconf="${myconf} $(use_with X x)"
+ myconf="${myconf} $(use_with X fontdir ${MY_FONTDIR})"
+
+ suite3270_makelist
+ for p in ${MY_PLIST} ; do
+ cd "${S}/${p}-${SUB_PV}"
+ econf ${myconf} || die "econf failed on ${p}"
+ emake || die "emake faild on ${p}"
+ done
+}
+
+src_install () {
+ suite3270_makelist
+ use X && dodir ${MY_FONTDIR}
+ for p in ${MY_PLIST} ; do
+ cd "${S}/${p}-${SUB_PV}"
+ emake DESTDIR="${D}" install install.man \
+ || die "emake failed on ${p}"
+ use doc && docinto ${p} && dohtml html/*
+ done
+
+ use X && rm -f "${D}/${MY_FONTDIR}/fonts.dir"
+ return 0
+}
+
+pkg_postinst() {
+ if use X ; then
+ einfo "Running mkfontdir on ${MY_FONTDIR}"
+ mkfontdir ${MY_FONTDIR}
+ fi
+}
diff --git a/net-misc/suite3270/suite3270-3.3.9_p12.ebuild b/net-misc/suite3270/suite3270-3.3.9_p12.ebuild
new file mode 100644
index 000000000000..e364a8d778c9
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.3.9_p12.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+IUSE="cjk doc ncurses ssl tcl X"
+
+MY_PV="${PV/_p/ga}"
+MY_P="${PN}-${MY_PV}"
+
+S="${WORKDIR}"
+DESCRIPTION="Complete 3270 access package"
+SRC_URI="mirror://sourceforge/x3270/${MY_P}.tgz"
+HOMEPAGE="http://x3270.bgp.nu/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc s390 sparc x86"
+
+RDEPEND="X? ( x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt )
+ ncurses? ( sys-libs/ncurses
+ sys-libs/readline )
+ ssl? ( dev-libs/openssl )
+ tcl? ( dev-lang/tcl )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-misc/imake
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf )"
+
+SUB_PV="3.3"
+MY_FONTDIR="/usr/share/fonts/x3270"
+
+suite3270_makelist() {
+ MY_PLIST="pr3287 s3270"
+ use ncurses && MY_PLIST="${MY_PLIST} c3270"
+ use tcl && MY_PLIST="${MY_PLIST} tcl3270"
+ use X && MY_PLIST="${MY_PLIST} x3270"
+}
+
+src_compile() {
+ local myconf
+
+ myconf="--without-pr3287"
+ myconf="${myconf} --cache-file=${S}/config.cache"
+ myconf="${myconf} $(use_enable cjk dbcs)"
+ myconf="${myconf} $(use_enable ssl)"
+ myconf="${myconf} $(use_with X x)"
+ myconf="${myconf} $(use_with X fontdir ${MY_FONTDIR})"
+
+ suite3270_makelist
+ for p in ${MY_PLIST} ; do
+ cd "${S}/${p}-${SUB_PV}"
+ econf ${myconf} || die "econf failed on ${p}"
+ emake || die "emake faild on ${p}"
+ done
+}
+
+src_install () {
+ suite3270_makelist
+ use X && dodir ${MY_FONTDIR}
+ for p in ${MY_PLIST} ; do
+ cd "${S}/${p}-${SUB_PV}"
+ emake DESTDIR="${D}" install install.man \
+ || die "emake failed on ${p}"
+ use doc && docinto ${p} && dohtml html/*
+ done
+
+ use X && rm -f "${D}/${MY_FONTDIR}/fonts.dir"
+ return 0
+}
+
+pkg_postinst() {
+ if use X ; then
+ einfo "Running mkfontdir on ${MY_FONTDIR}"
+ mkfontdir ${MY_FONTDIR}
+ fi
+}
diff --git a/net-misc/suite3270/suite3270-3.4_p4.ebuild b/net-misc/suite3270/suite3270-3.4_p4.ebuild
new file mode 100644
index 000000000000..d86e9810bae3
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.4_p4.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_PV=${PV/_p/ga}
+MY_P=${PN}-${MY_PV}
+SUB_PV=${PV:0:3}
+
+S=${WORKDIR}/${PN}-${SUB_PV}
+
+# only the x3270 package installs fonts
+FONT_PN="x3270"
+FONT_S=${WORKDIR}/${FONT_PN}
+
+inherit eutils font
+
+DESCRIPTION="Complete 3270 access package"
+HOMEPAGE="http://x3270.bgp.nu/"
+SRC_URI="mirror://sourceforge/x3270/${MY_P}-src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~s390 ~sparc ~x86"
+IUSE="cjk doc ncurses ssl tcl X"
+
+RDEPEND="ssl? ( dev-libs/openssl:0= )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
+ ncurses? (
+ sys-libs/ncurses:=
+ sys-libs/readline:0=
+ )
+ tcl? ( dev-lang/tcl:0 )"
+DEPEND="${RDEPEND}
+ X? (
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf
+ )"
+
+suite3270_makelist() {
+ echo pr3287 s3270 \
+ $(usex ncurses c3270 '') \
+ $(usex tcl tcl3270 '') \
+ $(usex X x3270 '')
+}
+
+src_prepare() {
+ # Some subdirs (like c3270/x3270/s3270) install the same set of data files
+ # (they have the same contents). Wrap that in a retry to avoid errors.
+ cat <<-EOF > _install
+ #!/bin/sh
+ for n in {1..5}; do
+ install "\$@" && exit
+ echo "retrying ..."
+ done
+ EOF
+ chmod a+rx _install
+ sed -i \
+ -e "s:@INSTALL@:${S}/_install:" \
+ */Makefile.in
+
+ # https://sourceforge.net/p/x3270/bugs/13/
+ sed -i \
+ -e '/pr3287.man/s:$(INSTALL):@INSTALL_DATA@:' \
+ pr3287/Makefile.in || die
+
+ # https://sourceforge.net/p/x3270/bugs/12/
+ if has_version '>=sys-libs/glibc-2.20' ; then
+ sed -i \
+ -e "s:-D_BSD_SOURCE:-D_DEFAULT_SOURCE:" \
+ */configure || die
+ fi
+}
+
+src_configure() {
+ econf \
+ --cache-file="${S}"/config.cache \
+ --enable-s3270 \
+ --enable-pr3287 \
+ $(use_enable ncurses c3270) \
+ $(use_enable tcl tcl3270) \
+ $(use_enable X x3270) \
+ $(use_with X x) \
+ $(use_with X fontdir "${FONTDIR}")
+}
+
+src_install() {
+ use X && dodir "${FONTDIR}"
+ emake DESTDIR="${D}" install{,.man}
+
+ local p
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}"
+ docinto ${p}
+ dodoc README*
+ use doc && dohtml html/*
+ done
+
+ use X && font_src_install
+}
+
+pkg_postinst() { use X && font_pkg_postinst ; }
+pkg_postrm() { use X && font_pkg_postrm ; }
diff --git a/net-misc/suite3270/suite3270-3.4_p5.ebuild b/net-misc/suite3270/suite3270-3.4_p5.ebuild
new file mode 100644
index 000000000000..d86e9810bae3
--- /dev/null
+++ b/net-misc/suite3270/suite3270-3.4_p5.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_PV=${PV/_p/ga}
+MY_P=${PN}-${MY_PV}
+SUB_PV=${PV:0:3}
+
+S=${WORKDIR}/${PN}-${SUB_PV}
+
+# only the x3270 package installs fonts
+FONT_PN="x3270"
+FONT_S=${WORKDIR}/${FONT_PN}
+
+inherit eutils font
+
+DESCRIPTION="Complete 3270 access package"
+HOMEPAGE="http://x3270.bgp.nu/"
+SRC_URI="mirror://sourceforge/x3270/${MY_P}-src.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~s390 ~sparc ~x86"
+IUSE="cjk doc ncurses ssl tcl X"
+
+RDEPEND="ssl? ( dev-libs/openssl:0= )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
+ ncurses? (
+ sys-libs/ncurses:=
+ sys-libs/readline:0=
+ )
+ tcl? ( dev-lang/tcl:0 )"
+DEPEND="${RDEPEND}
+ X? (
+ x11-misc/xbitmaps
+ x11-proto/xproto
+ app-text/rman
+ x11-apps/mkfontdir
+ x11-apps/bdftopcf
+ )"
+
+suite3270_makelist() {
+ echo pr3287 s3270 \
+ $(usex ncurses c3270 '') \
+ $(usex tcl tcl3270 '') \
+ $(usex X x3270 '')
+}
+
+src_prepare() {
+ # Some subdirs (like c3270/x3270/s3270) install the same set of data files
+ # (they have the same contents). Wrap that in a retry to avoid errors.
+ cat <<-EOF > _install
+ #!/bin/sh
+ for n in {1..5}; do
+ install "\$@" && exit
+ echo "retrying ..."
+ done
+ EOF
+ chmod a+rx _install
+ sed -i \
+ -e "s:@INSTALL@:${S}/_install:" \
+ */Makefile.in
+
+ # https://sourceforge.net/p/x3270/bugs/13/
+ sed -i \
+ -e '/pr3287.man/s:$(INSTALL):@INSTALL_DATA@:' \
+ pr3287/Makefile.in || die
+
+ # https://sourceforge.net/p/x3270/bugs/12/
+ if has_version '>=sys-libs/glibc-2.20' ; then
+ sed -i \
+ -e "s:-D_BSD_SOURCE:-D_DEFAULT_SOURCE:" \
+ */configure || die
+ fi
+}
+
+src_configure() {
+ econf \
+ --cache-file="${S}"/config.cache \
+ --enable-s3270 \
+ --enable-pr3287 \
+ $(use_enable ncurses c3270) \
+ $(use_enable tcl tcl3270) \
+ $(use_enable X x3270) \
+ $(use_with X x) \
+ $(use_with X fontdir "${FONTDIR}")
+}
+
+src_install() {
+ use X && dodir "${FONTDIR}"
+ emake DESTDIR="${D}" install{,.man}
+
+ local p
+ for p in $(suite3270_makelist) ; do
+ cd "${S}/${p}"
+ docinto ${p}
+ dodoc README*
+ use doc && dohtml html/*
+ done
+
+ use X && font_src_install
+}
+
+pkg_postinst() { use X && font_pkg_postinst ; }
+pkg_postrm() { use X && font_pkg_postrm ; }
diff --git a/net-misc/switzerland/Manifest b/net-misc/switzerland/Manifest
new file mode 100644
index 000000000000..0108f71c1e82
--- /dev/null
+++ b/net-misc/switzerland/Manifest
@@ -0,0 +1 @@
+DIST switzerland-0.1.0.tgz 592922 SHA256 759d7a3dfda9e71ee309410c741342393585e9a0328d8f0d7ebf2049f319bd60 SHA512 3a5474c005bf45cddf8eede7c1e2faa5855bf9017f5c732555cfe2c8b7b82381ea25c2ada000a9945a330ff3af19f1e861a11508ff057c81a78eab53de1d0cdb WHIRLPOOL 8ac597d03a7ab39af9aad817ea850a5376e5fdacc4879df97a46fccfd97e7cc418dfc70f964873e618d8e9eee967b37fa1de80b5c75def0eb768219103455e0c
diff --git a/net-misc/switzerland/files/Makefile b/net-misc/switzerland/files/Makefile
new file mode 100644
index 000000000000..c1e582d56dc4
--- /dev/null
+++ b/net-misc/switzerland/files/Makefile
@@ -0,0 +1,12 @@
+SRC = FastCollector.c
+OBJ = ${SRC:.c=.o}
+
+LIBS = -lpcap
+
+all: FastCollector
+
+.c.o:
+ $(CC) -c $(CFLAGS) $<
+
+FastCollector: $(OBJ)
+ $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJ) $(LIBS)
diff --git a/net-misc/switzerland/metadata.xml b/net-misc/switzerland/metadata.xml
new file mode 100644
index 000000000000..f1752c727383
--- /dev/null
+++ b/net-misc/switzerland/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>netmon</herd>
+ <longdescription lang="en">
+ Switzerland is an open source software tool for testing the integrity of
+ data communications over networks, ISPs and firewalls. It will spot IP
+ packets which are forged or modified between clients, inform you, and
+ give you copies of the modified packets.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">switzerland</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/switzerland/switzerland-0.1.0.ebuild b/net-misc/switzerland/switzerland-0.1.0.ebuild
new file mode 100644
index 000000000000..592ded400698
--- /dev/null
+++ b/net-misc/switzerland/switzerland-0.1.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 toolchain-funcs
+
+DESCRIPTION="Network Testing Tool"
+HOMEPAGE="http://www.eff.org/testyourisp/switzerland/"
+SRC_URI="mirror://sourceforge/switzerland/${P}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+
+DEPEND="net-libs/libpcap"
+RDEPEND=${DEPEND}
+
+src_prepare() {
+ cp "${FILESDIR}"/Makefile switzerland/client
+
+ sed -i \
+ -e "s/= find_binary()/= dest/" \
+ setup.py
+ distutils-r1_src_prepare
+}
+
+src_compile() {
+ cd switzerland/client
+ emake CC=$(tc-getCC)
+
+ cd "${S}"
+ distutils-r1_src_compile
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ dodoc BUGS.txt CREDITS
+
+ keepdir /var/log/switzerland-pcaps
+ keepdir /var/log/switzerland
+}
diff --git a/net-misc/taptap/Manifest b/net-misc/taptap/Manifest
new file mode 100644
index 000000000000..7c0691a5b0b2
--- /dev/null
+++ b/net-misc/taptap/Manifest
@@ -0,0 +1 @@
+DIST taptap-1.0.tar.bz2 1640 SHA256 cb4273ee00ad488b648547aea39ecf345ad5badde613285347b9df5f3a84dd28
diff --git a/net-misc/taptap/metadata.xml b/net-misc/taptap/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/net-misc/taptap/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/taptap/taptap-1.0.ebuild b/net-misc/taptap/taptap-1.0.ebuild
new file mode 100644
index 000000000000..fe2abf220ce4
--- /dev/null
+++ b/net-misc/taptap/taptap-1.0.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit toolchain-funcs
+
+DESCRIPTION="A program to link two /dev/net/tun to form virtual ethernet"
+HOMEPAGE="http://www.munted.org.uk/programming/taptap/"
+SRC_URI="http://www.munted.org.uk/programming/${PN}/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+IUSE=""
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ sed -i \
+ -e 's:= -Wall -s:+= -Wall:' \
+ -e 's:$(CFLAGS):$(LDFLAGS) &:' \
+ Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+}
diff --git a/net-misc/taylor-uucp/Manifest b/net-misc/taylor-uucp/Manifest
new file mode 100644
index 000000000000..08d04a4c0f59
--- /dev/null
+++ b/net-misc/taylor-uucp/Manifest
@@ -0,0 +1 @@
+DIST uucp-1.07.tar.gz 1013234 SHA256 060c15bfba6cfd1171ad81f782789032113e199a5aded8f8e0c1c5bd1385b62c SHA512 13d215890234e638bed53dce7bab6eb78e0ce6b658f23ac1d7f8abc6e1d97963bef76aa4148ca644f450d5a1678fac940b73fbcd5845d7f5bea3afbd8055229b WHIRLPOOL d46615bfcef6a5348c71a90525d642edcd61c3aadb43737070b27cfc2e30660284dadff44499b09d17ce34855dda8c6dd9633d637f1e81f6f916eaef6aaed46e
diff --git a/net-misc/taylor-uucp/files/taylor-uucp-1.07-gentoo.patch b/net-misc/taylor-uucp/files/taylor-uucp-1.07-gentoo.patch
new file mode 100644
index 000000000000..42839bab300c
--- /dev/null
+++ b/net-misc/taylor-uucp/files/taylor-uucp-1.07-gentoo.patch
@@ -0,0 +1,120 @@
+diff -Nru uucp-1.07.orig/Makefile.am uucp-1.07/Makefile.am
+--- uucp-1.07.orig/Makefile.am 2003-05-30 00:10:23.000000000 +0000
++++ uucp-1.07/Makefile.am 2009-03-06 18:41:48.000000000 +0000
+@@ -78,12 +78,12 @@
+
+ install-exec-hook:
+ for f in uucico uuxqt; do \
+- chown $(OWNER) $(DESTDIR)$(sbindir)/$${f}; \
+- chmod 4555 $(DESTDIR)$(sbindir)/$${f}; \
++ chown $(OWNER):uucp $(DESTDIR)$(sbindir)/$${f}; \
++ chmod 6555 $(DESTDIR)$(sbindir)/$${f}; \
+ done
+ for f in uux uucp uustat uuname cu; do \
+- chown $(OWNER) $(DESTDIR)$(bindir)/$${f}; \
+- chmod 4555 $(DESTDIR)$(bindir)/$${f}; \
++ chown $(OWNER):uucp $(DESTDIR)$(bindir)/$${f}; \
++ chmod 6555 $(DESTDIR)$(bindir)/$${f}; \
+ done
+ if HAVE_MKDIR
+ else
+diff -Nru uucp-1.07.orig/policy.h uucp-1.07/policy.h
+--- uucp-1.07.orig/policy.h 2003-05-29 06:08:45.000000000 +0000
++++ uucp-1.07/policy.h 2009-03-06 18:41:48.000000000 +0000
+@@ -302,8 +302,7 @@
+ /* #define LOCKDIR "/usr/spool/locks" */
+ /* #define LOCKDIR "/usr/spool/uucp/LCK" */
+ /* #define LOCKDIR "/var/spool/lock" */
+-/* #define LOCKDIR "/var/lock" */
+-
++#define LOCKDIR "/var/lock"
+ /* You must also specify the format of the lock files by setting
+ exactly one of the following macros to 1. Check an existing lock
+ file to decide which of these choices is more appropriate.
+@@ -572,16 +571,14 @@
+ /* The name of the default spool directory. If HAVE_TAYLOR_CONFIG is
+ set to 1, this may be overridden by the ``spool'' command in the
+ configuration file. */
+-#define SPOOLDIR "/usr/spool/uucp"
+-/* #define SPOOLDIR "/var/spool/uucp" */
++#define SPOOLDIR "/var/spool/uucp"
+
+ /* The name of the default public directory. If HAVE_TAYLOR_CONFIG is
+ set to 1, this may be overridden by the ``pubdir'' command in the
+ configuration file. Also, a particular system may be given a
+ specific public directory by using the ``pubdir'' command in the
+ system file. */
+-#define PUBDIR "/usr/spool/uucppublic"
+-/* #define PUBDIR "/var/spool/uucppublic" */
++#define PUBDIR "/var/spool/uucppublic"
+
+ /* The default command path. This is a space separated list of
+ directories. Remote command executions requested by uux are looked
+@@ -644,23 +641,17 @@
+ /* The default log file when using HAVE_TAYLOR_LOGGING. When using
+ HAVE_TAYLOR_CONFIG, this may be overridden by the ``logfile''
+ command in the configuration file. */
+-#define LOGFILE "/usr/spool/uucp/Log"
+-/* #define LOGFILE "/var/spool/uucp/Log" */
+-/* #define LOGFILE "/var/log/uucp/Log" */
++#define LOGFILE "/var/log/uucp/Log"
+
+ /* The default statistics file when using HAVE_TAYLOR_LOGGING. When
+ using HAVE_TAYLOR_CONFIG, this may be overridden by the
+ ``statfile'' command in the configuration file. */
+-#define STATFILE "/usr/spool/uucp/Stats"
+-/* #define STATFILE "/var/spool/uucp/Stats" */
+-/* #define STATFILE "/var/log/uucp/Stats" */
++#define STATFILE "/var/log/uucp/Stats"
+
+ /* The default debugging file when using HAVE_TAYLOR_LOGGING. When
+ using HAVE_TAYLOR_CONFIG, this may be overridden by the
+ ``debugfile'' command in the configuration file. */
+-#define DEBUGFILE "/usr/spool/uucp/Debug"
+-/* #define DEBUGFILE "/var/spool/uucp/Debug" */
+-/* #define DEBUGFILE "/var/log/uucp/Debug" */
++#define DEBUGFILE "/var/log/uucp/Debug"
+
+ #endif /* HAVE_TAYLOR_LOGGING */
+
+@@ -669,17 +660,17 @@
+ /* The default log file when using HAVE_V2_LOGGING. When using
+ HAVE_TAYLOR_CONFIG, this may be overridden by the ``logfile''
+ command in the configuration file. */
+-#define LOGFILE "/usr/spool/uucp/LOGFILE"
++#define LOGFILE "/var/log/uucp/LOGFILE"
+
+ /* The default statistics file when using HAVE_V2_LOGGING. When using
+ HAVE_TAYLOR_CONFIG, this may be overridden by the ``statfile''
+ command in the configuration file. */
+-#define STATFILE "/usr/spool/uucp/SYSLOG"
++#define STATFILE "/var/log/uucp/SYSLOG"
+
+ /* The default debugging file when using HAVE_V2_LOGGING. When using
+ HAVE_TAYLOR_CONFIG, this may be overridden by the ``debugfile''
+ command in the configuration file. */
+-#define DEBUGFILE "/usr/spool/uucp/DEBUG"
++#define DEBUGFILE "/var/log/uucp/DEBUG"
+
+ #endif /* HAVE_V2_LOGGING */
+
+@@ -692,16 +683,16 @@
+ be replaced by the system name (if there is no appropriate system,
+ "ANY" will be used). No other '%' character may appear in the
+ string. */
+-#define LOGFILE "/usr/spool/uucp/.Log/%s/%s"
++#define LOGFILE "/var/log/uucp/.Log/%s/%s"
+
+ /* The default statistics file when using HAVE_HDB_LOGGING. When using
+ HAVE_TAYLOR_CONFIG, this may be overridden by the ``statfile''
+ command in the configuration file. */
+-#define STATFILE "/usr/spool/uucp/.Admin/xferstats"
++#define STATFILE "/var/log/uucp/.Admin/xferstats"
+
+ /* The default debugging file when using HAVE_HDB_LOGGING. When using
+ HAVE_TAYLOR_CONFIG, this may be overridden by the ``debugfile''
+ command in the configuration file. */
+-#define DEBUGFILE "/usr/spool/uucp/.Admin/audit.local"
++#define DEBUGFILE "/var/log/uucp/.Admin/audit.local"
+
+ #endif /* HAVE_HDB_LOGGING */
diff --git a/net-misc/taylor-uucp/metadata.xml b/net-misc/taylor-uucp/metadata.xml
new file mode 100644
index 000000000000..4e9d22dc3442
--- /dev/null
+++ b/net-misc/taylor-uucp/metadata.xml
@@ -0,0 +1,9 @@
+<?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>The standard UUCP package of the Free Software Foundation.
+It provides everything you need to make a UUCP connection.</longdescription>
+</pkgmetadata>
diff --git a/net-misc/taylor-uucp/taylor-uucp-1.07-r2.ebuild b/net-misc/taylor-uucp/taylor-uucp-1.07-r2.ebuild
new file mode 100644
index 000000000000..3fb6d932e8ec
--- /dev/null
+++ b/net-misc/taylor-uucp/taylor-uucp-1.07-r2.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils flag-o-matic autotools
+
+DESCRIPTION="Taylor UUCP"
+HOMEPAGE="http://www.airs.com/ian/uucp.html"
+SRC_URI="mirror://gnu/uucp/uucp-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ia64 ppc sparc x86"
+IUSE=""
+
+S="${WORKDIR}/uucp-${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ mv configure.{in,ac} || die
+ sed -i 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ append-cppflags -D_GNU_SOURCE -fno-strict-aliasing
+ econf --with-newconfigdir=/etc/uucp
+}
+
+src_install() {
+ dodir /usr/share/man/man{1,8}
+ dodir /usr/share/info
+ dodir /etc/uucp
+ dodir /usr/bin /usr/sbin
+ diropts -o uucp -g uucp -m 0750
+ keepdir /var/log/uucp /var/spool/uucp
+ diropts -o uucp -g uucp -m 0775
+ keepdir /var/spool/uucppublic
+
+ emake \
+ "prefix=${D}/usr" \
+ "sbindir=${D}/usr/sbin" \
+ "bindir=${D}/usr/bin" \
+ "man1dir=${D}/usr/share/man/man1" \
+ "man8dir=${D}/usr/share/man/man8" \
+ "newconfigdir=${D}/etc/uucp" \
+ "infodir=${D}/usr/share/info" \
+ install install-info
+ sed -i -e 's:/usr/spool:/var/spool:g' sample/config
+ cp sample/* "${ED}/etc/uucp" || die
+ dodoc ChangeLog NEWS README TODO
+}
+
+pkg_preinst() {
+ usermod -s /bin/bash uucp
+}
diff --git a/net-misc/tcpsound/Manifest b/net-misc/tcpsound/Manifest
new file mode 100644
index 000000000000..78d2535c8814
--- /dev/null
+++ b/net-misc/tcpsound/Manifest
@@ -0,0 +1 @@
+DIST tcpsound-0.3.1.tar.gz 155357 SHA256 358869ee017f9ccb62f8425bbc1ec70b65316b981dbf7a7b6b22042ae32b57c6 SHA512 9db7c03f57f0e95b5b6b947bdeff9664dda6f6039e1080611205ca15648cb9b31325f462b31cbb1462a4aa767a9c89d6125c17144bb0dd7d0acf89e24b2f3055 WHIRLPOOL e8bc4575bfaeeab075967cc797f50eb2e6a09c37d22e22a9ad5c11a3188db56f185d4c94268d5cee042155ea0205a8d86efd41642c7e65cb62e9543719b070da
diff --git a/net-misc/tcpsound/files/tcpsound-0.3.1-makefile.patch b/net-misc/tcpsound/files/tcpsound-0.3.1-makefile.patch
new file mode 100644
index 000000000000..83f694878376
--- /dev/null
+++ b/net-misc/tcpsound/files/tcpsound-0.3.1-makefile.patch
@@ -0,0 +1,52 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,32 +1,35 @@
+ # Makefile for tcpsound
+
+-prefix = /usr/local
++prefix = $(DESTDIR)/usr
+
+ bindir = $(prefix)/bin
+-wavdir = $(prefix)/share/sounds
++wavdir = $(prefix)/share/tcpsound
+ includedir = $(prefix)/include
+ libdir = $(prefix)/lib
+-mandir = $(prefix)/man
++mandir = $(prefix)/share/man/man1
+ MAN = tcpsound.1
+ MANGZ = $(MAN:.1=.1.gz)
+-MKTOOL = ./mktool
+-CFLAGS = -c -v -g -W1 -I$(includedir) -L$(libdir) -lSDL -lmba -lpthread
+-CC = $(MKTOOL)
++MKTOOL = install
++CFLAGS += -I$(includedir)
++LIBS = -lSDL -lmba -lpthread
+
+ .SUFFIXES: .1 .1.gz
+
+-tcpsound: mktool src/tcpsound.c src/sound.h src/sound.c src/parse.h src/parse.c
+- @$(CC) $(CFLAGS) src/sound.c src/parse.c src/tcpsound.c -o tcpsound
+-play: mktool src/play.c
+- @$(CC) $(CFLAGS) src/play.c -o play
++tcpsound: src/tcpsound.c src/sound.h src/sound.c src/parse.h src/parse.c
++ $(CC) $(LDFLAGS) $(CFLAGS) src/sound.c src/parse.c src/tcpsound.c -o tcpsound $(LIBS)
++play: src/play.c
++ $(CC) $(LDFLAGS) $(CFLAGS) src/play.c -o play $(LIBS)
+
+ mktool:
+ cc -g -o mktool mktool.c
+
+-install: mktool
+- $(MKTOOL) -i -m 0755 tcpsound $(bindir)
+- $(MKTOOL) -i wavs/*.wav $(wavdir)
+- -$(MKTOOL) -i docs/man/*.1.gz $(mandir)/man1
++install: tcpsound
++ $(MKTOOL) -d $(bindir)
++ $(MKTOOL) -d $(wavdir)
++ $(MKTOOL) -d $(mandir)
++ $(MKTOOL) -m 0755 tcpsound $(bindir)
++ $(MKTOOL) -m 0644 wavs/*.wav $(wavdir)
++ -$(MKTOOL) -m 0644 docs/man/tcpsound.1.gz $(mandir)
+ @echo
+ @echo installation successful
+ uninstall: mktool
diff --git a/net-misc/tcpsound/files/tcpsound-0.3.1-misc.patch b/net-misc/tcpsound/files/tcpsound-0.3.1-misc.patch
new file mode 100644
index 000000000000..7c7136fb954e
--- /dev/null
+++ b/net-misc/tcpsound/files/tcpsound-0.3.1-misc.patch
@@ -0,0 +1,22 @@
+--- a/src/tcpsound.c
++++ b/src/tcpsound.c
+@@ -16,7 +16,7 @@
+ #include "parse.h"
+ #include "sound.h"
+
+-static const char *DEFAULT_CONF = "searchpath = /usr/share/sounds:/usr/local/share/sounds\n\nsnd.default = 1,0,0,generic.wav\nsnd.icmp = 3,0,0,sonar.wav\nsnd.dns = 2,53,53,warning.wav\nsnd.http.in = 2,0,80,pop.wav\nsnd.http.out = 2,80,0,info.wav\nsnd.win.nam = 2,137,137,cuckoo.wav\n";
++static const char *DEFAULT_CONF = "searchpath = /usr/share/tcpsound\n\nsnd.default = 1,0,0,generic.wav\nsnd.icmp = 3,0,0,sonar.wav\nsnd.dns = 2,53,53,warning.wav\nsnd.http.in = 2,0,80,pop.wav\nsnd.http.out = 2,80,0,info.wav\nsnd.win.nam = 2,137,137,cuckoo.wav\n";
+
+ /* struct packet {
+ * unsigned long time;
+--- a/elaborate.conf
++++ b/elaborate.conf
+@@ -7,7 +7,7 @@
+ # to searchpath).
+ #
+
+-searchpath = /usr/share/sounds:/usr/local/share/sounds
++searchpath = /usr/share/tcpsound
+
+ snd.default = 1,0,0,generic.wav
+ snd.icmp = 3,0,0,sonar.wav
diff --git a/net-misc/tcpsound/metadata.xml b/net-misc/tcpsound/metadata.xml
new file mode 100644
index 000000000000..78692635ad22
--- /dev/null
+++ b/net-misc/tcpsound/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>netmon</herd>
+</pkgmetadata>
diff --git a/net-misc/tcpsound/tcpsound-0.3.1-r1.ebuild b/net-misc/tcpsound/tcpsound-0.3.1-r1.ebuild
new file mode 100644
index 000000000000..ba8ebc99a8eb
--- /dev/null
+++ b/net-misc/tcpsound/tcpsound-0.3.1-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Play sounds in response to network traffic"
+LICENSE="BSD"
+HOMEPAGE="http://www.ioplex.com/~miallen/tcpsound/"
+SRC_URI="${HOMEPAGE}dl/${P}.tar.gz"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+DEPEND="
+ dev-libs/libmba
+ media-libs/libsdl
+ net-analyzer/tcpdump
+"
+RDEPEND="${DEPEND}"
+
+DOCS=( README.txt elaborate.conf )
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-makefile.patch \
+ "${FILESDIR}"/${P}-misc.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
diff --git a/net-misc/teamviewer/Manifest b/net-misc/teamviewer/Manifest
new file mode 100644
index 000000000000..d77a6dd7dcd6
--- /dev/null
+++ b/net-misc/teamviewer/Manifest
@@ -0,0 +1,2 @@
+DIST teamviewer-9.0.32150.deb 22898922 SHA256 66d9a69f7e1523a2e1b41ff2e55adac01b2dae9b8bdfabf9db6080fc21d24451 SHA512 3e72ed5cab7a754a0aa75e533da92292ad004f66c55ac4c386b6f4a65cc41b14a8d9d7a5410dccdb90c1172cd33e52383289339ab44f0847a061655498ab8e4d WHIRLPOOL fa48ff99a5df29072b1073f35e3f27aeba87b2b846813dca612212344a5b8e35f7f1e221e1fb4f7a12464fce4a185b8dad6dd8f48432e4c48ecd61d9cc6b7960
+DIST teamviewer_10.0.41499_i386.deb 41166700 SHA256 0694c756b8cb5f2b09c8d6db960ced3e899d4ce43060e77ef4f1c36254dc31c4 SHA512 afdfafb89398b29206414537c69a798574807c0f350d7ec819579167e0ffbb33c2c3754fdc17a79576b3ff7bcb729c78bda47a5387c1dc178cf85107dae71d9f WHIRLPOOL a0d1595f4133e6e875e49ed6db6777e732c79f7a283d1bcddfd489557eb3bebbbc9c41362cf3576e97513ce8345665645fa5e54ada12275e29bd8d3349752713
diff --git a/net-misc/teamviewer/files/teamviewer-9.0.32150-gentoo.patch b/net-misc/teamviewer/files/teamviewer-9.0.32150-gentoo.patch
new file mode 100644
index 000000000000..1df4632795bc
--- /dev/null
+++ b/net-misc/teamviewer/files/teamviewer-9.0.32150-gentoo.patch
@@ -0,0 +1,138 @@
+diff --git a/opt/teamviewer9/tv_bin/script/tvw_extra b/opt/teamviewer9/tv_bin/script/tvw_extra
+index 71164aa..848cd25 100644
+--- a/opt/teamviewer9/tv_bin/script/tvw_extra
++++ b/opt/teamviewer9/tv_bin/script/tvw_extra
+@@ -16,13 +16,6 @@
+ isInstalledTV || return
+ ABecho "teamviewer --passwd [PASSWD]" "set a password (useful when installing remote (ssh)"
+ echo
+- ABecho "teamviewer --daemon status" "show current status of the TeamViewer daemon"
+- ABecho "teamviewer --daemon start" "start TeamViewer daemon"
+- ABecho "teamviewer --daemon stop" "stop TeamViewer daemon"
+- ABecho "teamviewer --daemon restart" "stop/start TeamViewer daemon"
+- ABecho "teamviewer --daemon disable" "disable TeamViewer daemon - don't start daemon on system startup"
+- ABecho "teamviewer --daemon enable" "enable TeamViewer daemon - start daemon on system startup (default)"
+- echo
+ }
+
+ function PrintVersion()
+@@ -37,19 +30,6 @@
+ PrintDaemonStatus
+ echo
+ PrintTeamViewerID
+-}
+-
+-function PrintDaemonStatus()
+-{
+- local cmd="$(daemonCtl 'status')"
+- local txt="n/a"
+-
+- if [ isInstalledTV ] ; then
+- txt="$(eval "$cmd")"
+- [ $? = 0 ] || txt='n/a (error)'
+- fi
+-
+- ABecho "teamviewerd status" "$txt"
+ }
+
+ function PrintTeamViewerID()
+@@ -64,20 +44,21 @@
+ ABecho "TeamViewer ID:" "$tvid"
+
+ if [ -z "$tvid" ] && isInstalledTV; then
+- echo "Try restarting the TeamViewer daemon (e.g. teamviewer --daemon restart)"
++ echo "Try restarting the TeamViewer daemon."
+ fi
+ }
+
+ function SetPasswd()
+ {
++ echo "Stop your teamviewer daemon first, then press enter."
++ read
++
+ local pwd="$1"
+ [ -n "$pwd" ] || die 'no password specified'
+
+ installedTVorDie
+ isSuperUser || die 'You need root permissions for this operation'
+
+- Run_Daemon 'stop' > /dev/null
+-
+ "$TV_BIN_DIR/teamviewerd" --passwd "$pwd"
+ case $? in
+ 0 ) echo 'ok' ;;
+@@ -88,12 +69,14 @@
+ * ) echo 'unknown response' ;;
+ esac
+
+- Run_Daemon 'start' > /dev/null || die 'failed to restart the daemon'
+- echo
++ echo "You may start your teamviewer daemon again."
+ }
+
+ function ExportLicense()
+ {
++ echo "Stop your teamviewer daemon first, then press enter."
++ read
++
+ local license="$1"
+ local path='/tmp/tv_global.conf'
+
+@@ -101,8 +84,6 @@
+
+ isSuperUser || die 'You need root permissions for this operation'
+
+- Run_Daemon 'stop' > /dev/null
+-
+ "$TV_BIN_DIR/teamviewerd" --export-license "$license" "$path"
+ case $? in
+ 0 ) echo "ok - license exported to '$path'" ;;
+@@ -110,8 +91,7 @@
+ * ) echo 'unknown response' ;;
+ esac
+
+- Run_Daemon 'start' > /dev/null || die 'failed to restart the daemon'
+- echo
++ echo "You may start your teamviewer daemon again."
+ }
+
+ function StripPersonalInformation()
+diff --git a/opt/teamviewer9/tv_bin/script/tvw_main b/opt/teamviewer9/tv_bin/script/tvw_main
+index 8984db0..c6dff8d 100644
+--- a/opt/teamviewer9/tv_bin/script/tvw_main
++++ b/opt/teamviewer9/tv_bin/script/tvw_main
+@@ -4,7 +4,6 @@
+ source "$TV_SCRIPT_DIR/tvw_config"
+ source "$TV_SCRIPT_DIR/tvw_exec"
+ source "$TV_SCRIPT_DIR/tvw_extra"
+-source "$TV_SCRIPT_DIR/tvw_daemon"
+ source "$TV_SCRIPT_DIR/tvw_profile"
+
+ function Main()
+@@ -18,7 +17,6 @@
+ --help ) PrintHelp ;;
+ --version ) PrintVersion ;;
+ --info ) PrintInfo ;;
+- --daemon ) Run_Daemon $opt ;;
+ --winecfg ) shift; Run_WineCfg "$@" ;;
+ --regedit ) shift; Run_RegEdit "$@" ;;
+ --kill ) Run_KillTeamViewer ;;
+@@ -170,18 +168,3 @@
+ Init
+ wine regedit "$@"
+ }
+-
+-function Run_Daemon()
+-{
+- local opt="$1"
+-
+- installedTVorDie
+-
+- case "$opt" in
+- ( disable ) removeDaemon || rootSuggest ;;
+- ( enable ) installDaemon || rootSuggest ;;
+- ( start | stop | restart ) cmdDaemon $opt || rootSuggest ;;
+- ( status ) cmdDaemon $opt ;;
+- ( * ) echo "unknown option '$opt'" ;;
+- esac
+-}
diff --git a/net-misc/teamviewer/files/teamviewer.sh b/net-misc/teamviewer/files/teamviewer.sh
new file mode 100755
index 000000000000..70fc4e8a80af
--- /dev/null
+++ b/net-misc/teamviewer/files/teamviewer.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+tv="$(basename $0)"
+tvdir="/opt/${tv}"
+version="@TVV@"
+tvw_version=""
+prefix="${HOME}/.wine-${tv}"
+arch="win32"
+native=true
+
+if $native; then
+ export WINEDLLPATH="${prefix}/drive_c/TeamViewer"
+else
+ export WINEDLLPATH="${tvdir}/tv_bin/wine/lib:${tvdir}/tv_bin/wine/lib/wine:${prefix}/drive_c/TeamViewer"
+ export PATH="${tvdir}/tv_bin/wine/bin:${PATH}"
+fi
+export WINEARCH="${arch}"
+export WINEPREFIX="${prefix}"
+
+if [ ! -d "${prefix}" ]; then
+ echo "Creating prefix..."
+ wineboot -i &> /dev/null
+ mkdir -p "${prefix}/drive_c/TeamViewer"
+fi
+
+if [ -e "${prefix}/tvw-version" ]; then
+ tvw_version=$(<"${prefix}/tvw-version")
+fi
+
+#If version has changed or new instance
+if [ "${version}" != "${tvw_version}" ]; then
+ echo "Copying TeamViewer files to prefix..."
+ cp -R "/opt/${tv}/wine/drive_c/TeamViewer" "${prefix}/drive_c/"
+ echo "Creating config and log directories in ~/.config/teamviewer@TVMV@"
+ mkdir -p "${HOME}"/.config/teamviewer@TVMV@/{config,logfiles}
+ echo "${version}" > "${prefix}/tvw-version"
+fi
+
+TV_BASE_DIR="${tvdir}"
+TV_BIN_DIR="${TV_BASE_DIR}/tv_bin"
+TV_PROFILE="${prefix}"
+TV_LOG_DIR="${TV_PROFILE}/logfiles"
+TV_CFG_DIR="${TV_PROFILE}/config"
+TV_USERHOME="${HOME}"
+
+wine "C:\\TeamViewer\\TeamViewer.exe" "\${[@]}" &> \
+ "${HOME}/.config/teamviewer@TVMV@/logfiles/$(date +%Y.%m.%d-%H:%M:%S)-wine.log"
diff --git a/net-misc/teamviewer/files/teamviewerd.conf b/net-misc/teamviewer/files/teamviewerd.conf
new file mode 100644
index 000000000000..e949660678be
--- /dev/null
+++ b/net-misc/teamviewer/files/teamviewerd.conf
@@ -0,0 +1,6 @@
+# This entry can be used to specify a default daemon password.
+# It is set by running /etc/init.d/teamviewerd@TVV@ passwd.
+# The password must be between 8 and 12 characters, and special characters should
+# be avoided.
+
+PASSWD=""
diff --git a/net-misc/teamviewer/files/teamviewerd.init b/net-misc/teamviewer/files/teamviewerd.init
new file mode 100644
index 000000000000..a8966dc14a4c
--- /dev/null
+++ b/net-misc/teamviewer/files/teamviewerd.init
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+command=/opt/teamviewer@TVV@/tv_bin/teamviewerd
+command_args=-d
+description="daemon for TeamViewer"
+pidfile=/var/run/teamviewerd.pid
+
+extra_stopped_commands="passwd"
+
+passwd() {
+ if [ -z "${PASSWD}" ]; then
+ eerror "No password specified."
+ exit 1
+ fi
+
+ ebegin "Attempting to change password."
+ /opt/teamviewer@TVV@/tv_bin/teamviewerd --passwd "${PASSWD}"
+ retr=$?
+ case $retr in
+ 0) einfo "Password successfully set." ;;
+ 11|12) eerror "Password must be between 8 and 12 characters.";;
+ 13) eerror "Invalid characters detected.";;
+ 14) eerror "Password invalid. Validation failed.";;
+ *) eerror "Unknown error code";;
+ esac
+ eend $retr
+ exit $retr
+}
diff --git a/net-misc/teamviewer/files/teamviewerd9.init b/net-misc/teamviewer/files/teamviewerd9.init
new file mode 100644
index 000000000000..244a604ebab0
--- /dev/null
+++ b/net-misc/teamviewer/files/teamviewerd9.init
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="daemon for TeamViewer"
+
+PIDFILE="/var/run/teamviewerd.pid"
+
+start() {
+ ebegin "Starting Teamviewer Daemon"
+
+ start-stop-daemon \
+ --start \
+ --pidfile "${PIDFILE}" \
+ --background \
+ --exec /opt/teamviewer@TVV@/teamviewerd -- -d
+}
+
+stop() {
+ ebegin "Stopping Teamviewer Daemon"
+
+ start-stop-daemon \
+ --stop \
+ --pidfile "${PIDFILE}"
+}
diff --git a/net-misc/teamviewer/metadata.xml b/net-misc/teamviewer/metadata.xml
new file mode 100644
index 000000000000..936b3b0c5610
--- /dev/null
+++ b/net-misc/teamviewer/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>wine</herd>
+ <maintainer>
+ <email>np-hardass@gentoo.org</email>
+ <name>NP-Hardass</name>
+ </maintainer>
+ <use>
+ <flag name="system-wine">Use <pkg>app-emulation/wine</pkg> instead of bundled wine.</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/teamviewer/teamviewer-10.0.41499-r1.ebuild b/net-misc/teamviewer/teamviewer-10.0.41499-r1.ebuild
new file mode 100644
index 000000000000..aa7d5271b416
--- /dev/null
+++ b/net-misc/teamviewer/teamviewer-10.0.41499-r1.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils gnome2-utils systemd unpacker
+
+# Major version
+MV=${PV/\.*}
+MY_PN=${PN}${MV}
+DESCRIPTION="All-In-One Solution for Remote Access and Support over the Internet"
+HOMEPAGE="https://www.teamviewer.com"
+SRC_URI="https://download.teamviewer.com/download/version_${MV}x/${PN}_${PV}_i386.deb"
+
+IUSE="+system-wine"
+
+LICENSE="TeamViewer LGPL-2.1" #LGPL for bundled wine
+SLOT=${MV}
+KEYWORDS="-* ~amd64 ~x86"
+
+RESTRICT="bindist mirror"
+
+RDEPEND="
+ system-wine? ( app-emulation/wine[abi_x86_32(-)] )
+ dev-qt/qtcore:4[abi_x86_32(-)]
+ dev-qt/qtgui:4[abi_x86_32(-)]
+ dev-qt/qtwebkit:4[abi_x86_32(-)]
+ media-libs/alsa-lib[abi_x86_32(-)]
+ x11-libs/libICE[abi_x86_32(-)]
+ x11-libs/libSM[abi_x86_32(-)]
+ x11-libs/libX11[abi_x86_32(-)]
+ x11-libs/libXau[abi_x86_32(-)]
+ x11-libs/libXdamage[abi_x86_32(-)]
+ x11-libs/libXdmcp[abi_x86_32(-)]
+ x11-libs/libXext[abi_x86_32(-)]
+ x11-libs/libXfixes[abi_x86_32(-)]
+ x11-libs/libXrandr[abi_x86_32(-)]
+ x11-libs/libXtst[abi_x86_32(-)]"
+
+QA_PREBUILT="opt/teamviewer${MV}/*"
+
+S=${WORKDIR}/opt/teamviewer/tv_bin
+
+src_prepare() {
+ #epatch "${FILESDIR}/${P}-gentoo.patch"
+ sed \
+ -e "s/@TVV@/${MV}/g" \
+ "${FILESDIR}"/${PN}d.init > "${T}"/init || die
+ sed \
+ -e "s:/opt/teamviewer:/opt/teamviewer${MV}:g" \
+ "script//${PN}d.service" > "${T}/${PN}d.service" || die
+ sed \
+ -e "s/@TVV@/${PV}/g" \
+ -e "s/@TVMV@/${MV}/g" \
+ "${FILESDIR}"/${PN}.sh > "${T}"/sh || die
+ if ! use system-wine; then
+ sed -i "s/native=true/native=false/g" "${T}/sh" || die
+ fi
+}
+
+src_install () {
+ local destdir="/opt/${MY_PN}"
+
+ # install wine prefix skeleton and reg keys
+ insinto "${destdir}/wine/drive_c/"
+ doins -r wine/drive_c/TeamViewer/
+ # install bundled wine if necessary
+ if ! use system-wine; then
+ insinto "${destdir}/tv_bin/wine"
+ doins -r wine/{lib,share}
+ exeinto "${destdir}/tv_bin/wine/bin"
+ doexe wine/bin/{wine,wine-preloader,wineserver}
+ fi
+ # fix permissions
+ fperms 755 ${destdir}/wine/drive_c/TeamViewer/TeamViewer.exe
+
+ # install wine wrapper
+ exeinto "/opt/bin"
+ newexe "${T}/sh" "${MY_PN}"
+
+ # install teamviewer linux binaries
+ exeinto "${destdir}/tv_bin"
+ doexe TeamViewer_Desktop TVGuiDelegate TVGuiSlave.32
+ use amd64 && doexe TVGuiSlave.64
+
+ # install daemon binary and scripts
+ exeinto "${destdir}/tv_bin"
+ doexe ${PN}d
+ newinitd "${T}/init" ${PN}d${MV}
+ newconfd "${FILESDIR}/${PN}d.conf" ${PN}d${MV}
+ systemd_newunit "${T}/${PN}d.service" ${PN}d${MV}.service
+
+ # set up logdir
+ keepdir /var/log/${MY_PN}
+ dosym /var/log/${MY_PN} /opt/${MY_PN}/logfiles
+
+ # set up config dir
+ keepdir /etc/${MY_PN}
+ dosym /etc/${MY_PN} /opt/${MY_PN}/config
+
+ newicon -s 48 desktop/${PN}.png ${MY_PN}.png
+ #dodoc ../doc/linux_FAQ_{EN,DE}.txt
+ make_desktop_entry ${MY_PN} "TeamViewer ${MV}" ${MY_PN}
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+
+ elog "TeamViewer from upstream uses an overly-complicated set of bash"
+ elog "scripts to start the program. This has been simplified for Gentoo"
+ elog "use. Any issues should be reported via bugzilla."
+ if use system-wine; then
+ elog
+ elog "Due to bug #552016, when using system wine, one is not able to"
+ elog "share one's own screen. At this time, this may be remedied by"
+ elog "toggling the system-wine USE flag."
+ fi
+ elog
+ elog "The end-user client requires running the accompanying daemon,"
+ elog "available via init-scripts."
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-misc/teamviewer/teamviewer-9.0.32150.ebuild b/net-misc/teamviewer/teamviewer-9.0.32150.ebuild
new file mode 100644
index 000000000000..6409e9e95aa1
--- /dev/null
+++ b/net-misc/teamviewer/teamviewer-9.0.32150.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils gnome2-utils systemd unpacker
+
+# Major version
+MV=${PV/\.*}
+MY_PN=${PN}${MV}
+DESCRIPTION="All-In-One Solution for Remote Access and Support over the Internet"
+HOMEPAGE="http://www.teamviewer.com"
+SRC_URI="http://www.teamviewer.com/download/version_${MV}x/teamviewer_linux.deb -> ${P}.deb"
+
+LICENSE="TeamViewer !system-wine? ( LGPL-2.1 )"
+SLOT=${MV}
+KEYWORDS="~amd64 ~x86"
+IUSE="system-wine"
+
+RESTRICT="mirror"
+
+RDEPEND="
+ app-shells/bash
+ x11-misc/xdg-utils
+ !system-wine? (
+ media-libs/alsa-lib[abi_x86_32(-)]
+ media-libs/freetype[abi_x86_32(-)]
+ sys-libs/zlib[abi_x86_32(-)]
+ x11-libs/libX11[abi_x86_32(-)]
+ x11-libs/libXau[abi_x86_32(-)]
+ x11-libs/libXdamage[abi_x86_32(-)]
+ x11-libs/libXext[abi_x86_32(-)]
+ x11-libs/libXfixes[abi_x86_32(-)]
+ x11-libs/libXrandr[abi_x86_32(-)]
+ x11-libs/libXrender[abi_x86_32(-)]
+ x11-libs/libSM[abi_x86_32(-)]
+ x11-libs/libXtst[abi_x86_32(-)]
+ )
+ system-wine? ( app-emulation/wine )"
+
+QA_PREBUILT="opt/teamviewer${MV}/*"
+
+S=${WORKDIR}/opt/teamviewer${MV}/tv_bin
+
+make_winewrapper() {
+ cat << EOF > "${T}/${MY_PN}"
+#!/bin/sh
+export WINEDLLPATH=/opt/${MY_PN}
+exec wine "/opt/${MY_PN}/TeamViewer.exe" "\$@"
+EOF
+ chmod go+rx "${T}/${MY_PN}"
+ exeinto /opt/bin
+ doexe "${T}/${MY_PN}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+
+ sed \
+ -e "s#@TVV@#${MV}/tv_bin#g" \
+ "${FILESDIR}"/${PN}d${MV}.init > "${T}"/${PN}d${MV} || die
+}
+
+src_install () {
+ if use system-wine ; then
+ make_winewrapper
+ exeinto /opt/${MY_PN}
+ doexe wine/drive_c/TeamViewer/*
+ else
+ # install scripts and .reg
+ insinto /opt/${MY_PN}/tv_bin
+ doins -r *
+
+ exeinto /opt/${MY_PN}/tv_bin
+ doexe TeamViewer_Desktop
+ exeinto /opt/${MY_PN}/tv_bin/script
+ doexe script/teamviewer script/tvw_{aux,config,exec,extra,main,profile}
+
+ dosym /opt/${MY_PN}/tv_bin/script/${PN} /opt/bin/${MY_PN}
+
+ # fix permissions
+ fperms 755 /opt/${MY_PN}/tv_bin/wine/bin/wine{,-preloader,server}
+ fperms 755 /opt/${MY_PN}/tv_bin/wine/drive_c/TeamViewer/TeamViewer.exe
+ find "${D}"/opt/${MY_PN} -type f -name "*.so*" -execdir chmod 755 '{}' \;
+ fi
+
+ # install daemon binary
+ exeinto /opt/${MY_PN}/tv_bin
+ doexe ${PN}d
+
+ # set up logdir
+ keepdir /var/log/${MY_PN}
+ dosym /var/log/${MY_PN} /opt/${MY_PN}/logfiles
+
+ # set up config dir
+ keepdir /etc/${MY_PN}
+ dosym /etc/${MY_PN} /opt/${MY_PN}/config
+
+ doinitd "${T}"/${PN}d${MV}
+ systemd_newunit script/${PN}d.service ${PN}d${MV}.service
+
+ newicon -s 48 desktop/${PN}.png ${MY_PN}.png
+ dodoc ../doc/linux_FAQ_{EN,DE}.txt
+ make_desktop_entry ${MY_PN} TeamViewer ${MY_PN}
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+
+ if use system-wine ; then
+ echo
+ eerror "IMPORTANT NOTICE!"
+ elog "Using ${PN} with system wine is not supported and experimental."
+ elog "Do not report gentoo bugs while using this version."
+ echo
+ fi
+
+ eerror "STARTUP NOTICE:"
+ elog "You cannot start the daemon via \"teamviewer --daemon start\"."
+ elog "Instead use the provided gentoo initscript:"
+ elog " /etc/init.d/${PN}d${MV} start"
+ elog
+ elog "Logs are written to \"/var/log/teamviewer${MV}\""
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-misc/telnet-bsd/Manifest b/net-misc/telnet-bsd/Manifest
new file mode 100644
index 000000000000..6768f2a287ec
--- /dev/null
+++ b/net-misc/telnet-bsd/Manifest
@@ -0,0 +1 @@
+DIST telnet-bsd-1.2.tar.bz2 194518 SHA256 d6a9d26740ef75565cb1ed8ff11e327d240e6734748b2d1d2e96c126849e4733 SHA512 e3867362e1a2bc46779bcbc7631ccf08a0bfae84b71653e39099dc2db42995e5fcd39a978595006053e688430445db7ebb7a7bfbbb02a8e4dba209acbf66a69d WHIRLPOOL 673a5178f7c2305c9ad1ece9151d8d6c874ace147640f2d0e02a39f2641935af02fe42861c9ccc17b9f84e328c7e821f93ecf37dc3a86a9d1cf49700e7527f20
diff --git a/net-misc/telnet-bsd/files/telnet-bsd-1.2-fbsd.patch b/net-misc/telnet-bsd/files/telnet-bsd-1.2-fbsd.patch
new file mode 100644
index 000000000000..7c39d6ad81cb
--- /dev/null
+++ b/net-misc/telnet-bsd/files/telnet-bsd-1.2-fbsd.patch
@@ -0,0 +1,105 @@
+diff --git a/configure.in b/configure.in
+index 1547e9b..eda5fb1 100644
+--- a/configure.in
++++ b/configure.in
+@@ -12,6 +12,8 @@ ALL_LINGUAS="de"
+ AC_SUBST(PACKAGE)
+ AC_SUBST(VERSION)
+
++AC_CHECK_HEADERS([pty.h utmp.h])
++
+ if test x"$ac_default_prefix" = x"/usr"
+ then
+ if test x"${mandir}" = x'${prefix}/man'
+diff --git a/telnet/commands.c b/telnet/commands.c
+index c0d349c..fa2cf8a 100644
+--- a/telnet/commands.c
++++ b/telnet/commands.c
+@@ -29,11 +29,13 @@
+
+ #include "telnet_locl.h"
+ #include <err.h>
++#include <unistd.h>
+
+ #if defined(IPPROTO_IP) && defined(IP_TOS)
+ int tos = -1;
+ #endif /* defined(IPPROTO_IP) && defined(IP_TOS) */
+
++extern char **environ;
+ char *hostname;
+
+ typedef int (*intrtn_t) __P ((int, char **));
+diff --git a/telnet/ring.h b/telnet/ring.h
+index 66f7191..9ef8fb8 100644
+--- a/telnet/ring.h
++++ b/telnet/ring.h
+@@ -29,6 +29,7 @@
+ */
+
+ #include <sys/cdefs.h>
++#include <sys/types.h>
+ #define P __P
+
+ /*
+diff --git a/telnetd/setproctitle.c b/telnetd/setproctitle.c
+index f332277..b2adc92 100644
+--- a/telnetd/setproctitle.c
++++ b/telnetd/setproctitle.c
+@@ -72,6 +72,7 @@ char setproctitle_rcsid[] =
+ static char **Argv = NULL; /* pointer to argument vector */
+ static char *LastArgv = NULL; /* end of argv */
+ static char Argv0[128]; /* program name */
++extern char **environ;
+
+ void
+ initsetproctitle(int argc, char **argv, char **envp)
+@@ -86,10 +87,10 @@ initsetproctitle(int argc, char **argv, char **envp)
+
+ for (i = 0; envp[i] != NULL; i++)
+ continue;
+- __environ = (char **) malloc(sizeof (char *) * (i + 1));
++ environ = (char **) malloc(sizeof (char *) * (i + 1));
+ for (i = 0; envp[i] != NULL; i++)
+- __environ[i] = strdup(envp[i]);
+- __environ[i] = NULL;
++ environ[i] = strdup(envp[i]);
++ environ[i] = NULL;
+
+ /*
+ ** Save start and extent of argv for setproctitle.
+diff --git a/telnetd/sys_term.c b/telnetd/sys_term.c
+index 1235428..6fcc601 100644
+--- a/telnetd/sys_term.c
++++ b/telnetd/sys_term.c
+@@ -27,8 +27,15 @@
+ * SUCH DAMAGE.
+ */
+
++#include <config.h>
++
++#include <sys/types.h>
++#ifdef HAVE_UTMP_H
+ #include <utmp.h>
++#endif
++#ifdef HAVE_PTY_H
+ #include <pty.h>
++#endif
+
+ #include "telnetd.h"
+ #include "pathnames.h"
+@@ -820,6 +827,7 @@ addarg (struct argv_stuff *avs, const char *val)
+ void
+ cleanup (int sig)
+ {
++#if !defined(__FreeBSD__) || __FreeBSD__ < 9
+ sigset_t sigset;
+ char *p;
+ (void) sig;
+@@ -847,6 +855,7 @@ cleanup (int sig)
+ *p = 'p';
+ chmod (line, 0666);
+ chown (line, 0, 0);
++#endif
+ shutdown (net, 2);
+ exit (1);
+ }
diff --git a/net-misc/telnet-bsd/files/telnetd.xinetd b/net-misc/telnet-bsd/files/telnetd.xinetd
new file mode 100644
index 000000000000..63dd6dac9e7f
--- /dev/null
+++ b/net-misc/telnet-bsd/files/telnetd.xinetd
@@ -0,0 +1,10 @@
+service telnet
+{
+ flags = REUSE
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/sbin/in.telnetd
+ log_on_failure += USERID
+ disable = yes
+}
diff --git a/net-misc/telnet-bsd/metadata.xml b/net-misc/telnet-bsd/metadata.xml
new file mode 100644
index 000000000000..0926560098f5
--- /dev/null
+++ b/net-misc/telnet-bsd/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mschiff@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/telnet-bsd/telnet-bsd-1.2-r1.ebuild b/net-misc/telnet-bsd/telnet-bsd-1.2-r1.ebuild
new file mode 100644
index 000000000000..0a5ea0562e6a
--- /dev/null
+++ b/net-misc/telnet-bsd/telnet-bsd-1.2-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils autotools toolchain-funcs
+
+DESCRIPTION="Telnet and telnetd ported from OpenBSD with IPv6 support"
+HOMEPAGE="ftp://ftp.suse.com/pub/people/kukuk/ipv6/"
+SRC_URI="ftp://ftp.suse.com/pub/people/kukuk/ipv6/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="nls xinetd"
+
+RDEPEND="sys-libs/ncurses"
+DEPEND="${RDEPEND}
+ !net-misc/netkit-telnetd
+ xinetd? ( sys-apps/xinetd )
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-fbsd.patch
+ eaclocal
+ eautoreconf
+}
+
+src_configure() {
+ # FreeBSD doesn't seem to support PIE neither does hppa
+ if use kernel_FreeBSD; then
+ export libc_cv_fpie="no"
+ fi
+
+ econf
+ emake CFLAGS="${CFLAGS} $("$(tc-getPKG_CONFIG)" --libs ncurses)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/telnetd.xinetd telnetd
+ fi
+
+ dodoc README THANKS NEWS AUTHORS ChangeLog INSTALL
+}
diff --git a/net-misc/termpkg/Manifest b/net-misc/termpkg/Manifest
new file mode 100644
index 000000000000..f0b29750900a
--- /dev/null
+++ b/net-misc/termpkg/Manifest
@@ -0,0 +1,2 @@
+DIST termpkg_3.3-9.1.diff.gz 6759 SHA256 3ece3bc9ae469c45a8eba24ccd46c9460e2f03a215e4ec5f7c8fb0d41598b211 SHA512 dbcba1bc020ead0ef5e4f2fb2e7ee50937dbd6d614e53547bf2473dc3cbf0f4f3100a15bcd200b815a4fcbfd454a08a3185cdb305c4f3bde389070b5545293d4 WHIRLPOOL 87cb0182b4ff5124e43d3fcc16557a7d0dbd888a3d89b466f8b89b785073eb383b29d78ad28bdcdf4f0fa36c1a4353a1dc5a5b82c970d4bc2f3fc53e2c734a4b
+DIST termpkg_3.3.orig.tar.gz 65807 SHA256 0497f30d3fdac114080b65476d2757211a21276ae32c269d91314e3d54b9eff0 SHA512 4dc1152af27af5edda66622435f5c5d46e9bbba9dc3e9e0d6349792efef9488993d9ea02eb8780bc05a0a29756a0ba3cf45bf8d1799906b55d166c287432c22c WHIRLPOOL 0a5f789d2521e3b460fd174bc647efef00d89ea2e53668002ac210ee859e810cb04d8ab7bd0b41e653d2d4a105566fa045ced92231ca6e0b8567c4efa049ca0b
diff --git a/net-misc/termpkg/files/termnetd.confd b/net-misc/termpkg/files/termnetd.confd
new file mode 100644
index 000000000000..4eb95a989d41
--- /dev/null
+++ b/net-misc/termpkg/files/termnetd.confd
@@ -0,0 +1,14 @@
+# Config file for /etc/init.d/termnetd
+
+# Set the configuration file to one other than the default of /etc/termnetd.conf
+#
+#CONFIG_FILE="/etc/termnetd.conf"
+
+# Sets the IP port to listen to for the control port (default = none).
+#
+#CONTROL_PORT=""
+
+# see the termnetd(1) manual page for additional options you can configure here
+#
+#EXTRA_OPTS=""
+
diff --git a/net-misc/termpkg/files/termnetd.initd b/net-misc/termpkg/files/termnetd.initd
new file mode 100644
index 000000000000..90e2462f4fd0
--- /dev/null
+++ b/net-misc/termpkg/files/termnetd.initd
@@ -0,0 +1,52 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="Terminal Server daemon (${RC_SVCNAME#*.})"
+command="/usr/sbin/termnetd"
+name="${RC_SVCNAME}"
+
+extra_started_commands="reload"
+description_reload="Reread configuration file and make the appropriate changes"
+start_stop_daemon_args="--quiet --exec ${command} --name ${name}"
+
+depend() {
+ use logger
+ need net
+}
+
+config_check() {
+ command_args="${EXTRA_OPTS}"
+ CONFIG_FILE_DEFAULT="/etc/termnetd.conf"
+
+ [ -z "${CONFIG_FILE}" ] && CONFIG_FILE="${CONFIG_FILE_DEFAULT}"
+ [ -n "${CONTROL_PORT}" ] && command_args="${command_args} -s ${CONTROL_PORT}"
+ [ "${CONFIG_FILE}" != "${CONFIG_FILE_DEFAULT}" ] && command_args="${command_args} -c ${CONFIG_FILE}"
+
+ if [ ! -f "${CONFIG_FILE}" ]; then
+ eerror "Please create ${CONFIG_FILE}"
+ eerror "Sample conf: ${CONFIG_FILE_DEFAULT}.dist"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ config_check || return ${?}
+ ebegin "Starting ${description}"
+ start-stop-daemon --start ${start_stop_daemon_args} -- ${command_args}
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping ${description}"
+ start-stop-daemon --stop ${start_stop_daemon_args}
+ eend ${?}
+}
+
+reload() {
+ ebegin "Reloading ${description}"
+ start-stop-daemon --signal HUP ${start_stop_daemon_args}
+ eend ${?}
+}
diff --git a/net-misc/termpkg/files/termpkg-3.3-ttydforfax.diff b/net-misc/termpkg/files/termpkg-3.3-ttydforfax.diff
new file mode 100644
index 000000000000..0471fde13154
--- /dev/null
+++ b/net-misc/termpkg/files/termpkg-3.3-ttydforfax.diff
@@ -0,0 +1,28 @@
+--- termpkg-3.3/termnet/ttyd.c.orig 2005-09-29 08:59:05.000000000 -1000
++++ termpkg-3.3/termnet/ttyd.c 2005-09-29 08:51:33.000000000 -1000
+@@ -340,7 +340,10 @@
+ char *cp;
+ int x;
+ for (cp = commbuf, x = 0; x < cnt; x++, cp++)
++if (isprint(*cp))
+ syslog(LOG_DEBUG, "ttyd: Have net char 0x%x, |%c|", *cp, *cp);
++else
++syslog(LOG_DEBUG, "ttyd: Have net char 0x%x", *cp);
+ }
+ write(fd, commbuf, cnt);
+ }
+@@ -366,9 +369,13 @@
+ char *cp;
+ int x;
+ for (cp = commbuf, x = 0; x < cnt; x++, cp++)
++if (isprint(*cp))
+ syslog(LOG_DEBUG, "ttyd: Have key char 0x%x, |%c|", *cp, *cp);
++else
++syslog(LOG_DEBUG, "ttyd: Have key char 0x%x", *cp);
+ }
+- inputTerminal(commbuf, cnt);
++// inputTerminal(commbuf, cnt);
++write(fileno(tnlout), commbuf, cnt);
+ }
+ else
+ break;
diff --git a/net-misc/termpkg/files/termpkg-3.3.9.1-gcc43.diff b/net-misc/termpkg/files/termpkg-3.3.9.1-gcc43.diff
new file mode 100644
index 000000000000..8d17fc5dd8b9
--- /dev/null
+++ b/net-misc/termpkg/files/termpkg-3.3.9.1-gcc43.diff
@@ -0,0 +1,11 @@
+diff -Naur termpkg-3.3.orig/libtn/SocketIO.c termpkg-3.3/libtn/SocketIO.c
+--- termpkg-3.3.orig/libtn/SocketIO.c 2008-09-03 18:21:28.881220673 +0200
++++ termpkg-3.3/libtn/SocketIO.c 2008-09-03 18:23:29.106343243 +0200
+@@ -25,6 +25,7 @@
+ #endif
+ #include <sys/socket.h>
+ #include <netinet/in.h>
++#include <arpa/inet.h>
+ #include <fcntl.h>
+ #include <string.h>
+ #include <stdlib.h>
diff --git a/net-misc/termpkg/files/ttyd.confd b/net-misc/termpkg/files/ttyd.confd
new file mode 100644
index 000000000000..5b0e2b8c0002
--- /dev/null
+++ b/net-misc/termpkg/files/ttyd.confd
@@ -0,0 +1,63 @@
+# Configfile for /etc/init.d/ttyd
+
+# HINT: if you only need one virtual TTY, then you can use this config.
+# Otherwise you should use it as a template for specific configurations.
+# Just copy /etc/conf.d/ttyd to /etc/conf.d/ttyd.<foo> and symlink
+# /etc/init.d/ttyd to /etc/init.d/ttyd.<foo>
+
+
+# Master pseudo tty device to open and wait for a connection on.
+# For reference, in Linux the master pseudo tty devices are the
+# devices /dev/pty[a-ep-z][0-9a-f] and the slave devices are
+# /dev/tty[a-ep-z][0-9a-f].
+#
+PTY="/dev/ptyp0"
+
+# The host and port parameters specify the host and IP port to
+# connect to when the slave pseudo device is opened.
+#
+HOST="host.example.com"
+PORT=3000
+
+# The optional mode and user options specify the filesystem
+# permissions of the slave pseudo device. We set them right
+# after the ttyd daemon has started. After stopping, we reset
+# them to the permissions of the master pseudo device.
+#
+#MODE=660
+#USER="root:uucp"
+
+# Sets the initial baud-rate of the device (optional).
+#
+#BAUDRATE=115200
+
+# Optional port settings. Specified by a string of one of
+# more of the following concatenated together with no
+# intervening spaces:
+#
+# 8: 8 bits/character
+# 7: 7 bits/character
+# 6: 6 bits/character
+# 5: 5 bits/character
+# N: No parity
+# E: Even parity
+# O: Odd parity
+# C0: No hardware flow control
+# C1: Hardware flow control
+# S0: No software flow control
+# S1: Software flow control
+#
+#PORT_SETTINGS="8NC0"
+
+# You can create symlinks to the slave pseudo device, so you
+# have an easy to remember name for your virtual device. You
+# can add as many links as you want, if you blank-seperate the
+# names. All links *must* be relative and beneath to /dev.
+#
+#SYMLINK="ttyd/modem ttyNET0"
+
+# Some odd programs just don't work with symlinks, so you
+# can also create hardlinks (even in addition to symlinks).
+# Same rules apply as for symlinks.
+#
+#HARDLINK="ttyS5"
diff --git a/net-misc/termpkg/files/ttyd.initd b/net-misc/termpkg/files/ttyd.initd
new file mode 100644
index 000000000000..abcb691f3602
--- /dev/null
+++ b/net-misc/termpkg/files/ttyd.initd
@@ -0,0 +1,96 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="Remote Modem Utility (${RC_SVCNAME#*.})"
+command="/usr/sbin/ttyd"
+name="${RC_SVCNAME}"
+
+start_stop_daemon_args="--quiet --exec ${command} --name ${name}"
+
+depend() {
+ use logger
+ need net
+}
+
+config_check() {
+ # sanitize PTY/TTY names
+ DEV_PTY="/dev/${PTY/\/dev\/}"
+ DEV_TTY="${DEV_PTY/\/pty//tty}"
+
+ # create command args
+ command_args="-d ${DEV_PTY}"
+ [ -n "${BAUDRATE}" ] && command_args="${command_args} -b ${BAUDRATE}"
+ [ -n "${PORT_SETTINGS}" ] && command_args="${command_args} -p ${PORT_SETTINGS}"
+ command_args="${command_args} ${HOST} ${PORT}"
+}
+
+device_check() {
+ if [ ! -e "${DEV_PTY}" ]; then
+ eerror "PTY doesn't exist: ${DEV_PTY}"
+ return 1
+ fi
+ if [ ! -e "${DEV_TTY}" ]; then
+ eerror "TTY doesn't exist: ${DEV_TTY}"
+ return 1
+ fi
+ return 0
+}
+
+linkrel() { # <from> <to>
+ local LINK="${1%/*}/${2/\/dev\/}"
+ echo "${LINK/\/dev\/}" | sed "s:[^/]\+/:../:g"
+}
+
+setup_links() {
+ local LINK NODE
+ for LINK in ${SYMLINK}; do
+ NODE="/dev/${LINK/\/dev\/}"
+ mkdir -p -- "${NODE%/*}" && ln -snf -- $(linkrel "${NODE}" "${DEV_TTY}") "${NODE}"
+ done
+ for LINK in ${HARDLINK}; do
+ NODE="/dev/${LINK/\/dev\/}"
+ mkdir -p -- "${NODE%/*}" && ln -nf -- "${DEV_TTY}" "${NODE}"
+ done
+}
+
+unset_links() {
+ local LINK LIST=""
+ for LINK in ${SYMLINK} ${HARDLINK}; do
+ LIST="${LIST} /dev/${LINK/\/dev\/}"
+ done
+ [ -n "${LIST}" ] && rm -f -- ${LIST}
+}
+
+setup_perms() {
+ [ -n "${MODE}" ] && chmod "${MODE}" -- "${DEV_TTY}"
+ [ -n "${USER}" ] && chown "${USER}" -- "${DEV_TTY}"
+}
+
+unset_perms() {
+ [ -n "${USER}" ] && chown --reference "${DEV_PTY}" -- "${DEV_TTY}"
+ [ -n "${MODE}" ] && chmod --reference "${DEV_PTY}" -- "${DEV_TTY}"
+}
+
+start() {
+ config_check || return ${?}
+ device_check || return ${?}
+ ebegin "Starting ${description}"
+ start-stop-daemon --start ${start_stop_daemon_args} -- ${command_args}
+ if eend ${?}; then
+ setup_perms
+ setup_links
+ return 0 # from here we never fail
+ fi
+}
+
+stop() {
+ config_check || return ${?}
+ ebegin "Stopping ${description}"
+ start-stop-daemon --stop ${start_stop_daemon_args}
+ eend ${?}
+ unset_links
+ unset_perms
+ return 0 # never fail
+}
diff --git a/net-misc/termpkg/metadata.xml b/net-misc/termpkg/metadata.xml
new file mode 100644
index 000000000000..7bbee5227ce9
--- /dev/null
+++ b/net-misc/termpkg/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>net-dialup</herd>
+ <longdescription lang="en">
+ Termpkg is a terminal server daemon and simple telnet like client.
+ Allows access to one or more serial ports through the telnet protocol.
+ Can be configured to connect in a one to one relation of telnet ports
+ to serial ports or in a round-robin fashion where one telnet port
+ serves many serial ports.
+ </longdescription>
+ <use>
+ <flag name='uucp'>
+ Adds support for uucp style device locking
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/termpkg/termpkg-3.3.9.1-r1.ebuild b/net-misc/termpkg/termpkg-3.3.9.1-r1.ebuild
new file mode 100644
index 000000000000..a92fbf0b1478
--- /dev/null
+++ b/net-misc/termpkg/termpkg-3.3.9.1-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit base versionator
+
+MY_PV=$(get_version_component_range 1-2)
+MY_PF=$(replace_version_separator 2 '-')
+
+DESCRIPTION="Termpkg, the Poor Man's Terminal Server"
+HOMEPAGE="http://www.linuxlots.com/~termpkg/"
+SRC_URI="mirror://debian/pool/main/t/termpkg/${PN}_${MY_PV}.orig.tar.gz
+ mirror://debian/pool/main/t/termpkg/${PN}_${MY_PF}.diff.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+uucp"
+
+DEPEND="sys-devel/flex"
+RDEPEND=""
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+DOCS=(
+ "README"
+ "CHANGES"
+ "termpkg.lsm"
+)
+
+PATCHES=(
+ # debian patches
+ "${WORKDIR}/${PN}_${MY_PF}.diff"
+
+ # gentoo patches
+ "${FILESDIR}/${P}-gcc43.diff"
+
+ # iaxmodem patches
+ "${FILESDIR}/${PN}-${MY_PV}-ttydforfax.diff"
+)
+
+src_configure() {
+ ./configure LINUX $(use uucp && echo UUCP_LOCKING)
+}
+
+src_compile() {
+ emake -C linux CC=$(tc-getCC) LIBS="${LDFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ local X
+ base_src_install_docs
+ dobin linux/bin/termnet
+ dosbin linux/bin/{termnetd,ttyd}
+ newdoc debian/changelog ChangeLog.debian
+ doman doc/*.1
+ insinto /etc
+ newins debian/termnetd.conf termnetd.conf.dist
+ for X in termnetd ttyd; do
+ newinitd "${FILESDIR}/${X}.initd" "${X}"
+ newconfd "${FILESDIR}/${X}.confd" "${X}"
+ done
+}
diff --git a/net-misc/termpkg/termpkg-3.3.9.1.ebuild b/net-misc/termpkg/termpkg-3.3.9.1.ebuild
new file mode 100644
index 000000000000..b571c2cbf00d
--- /dev/null
+++ b/net-misc/termpkg/termpkg-3.3.9.1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils versionator
+
+MY_PV=$(get_version_component_range 1-2)
+MY_PF=$(replace_version_separator 2 '-')
+
+DESCRIPTION="Termpkg, the Poor Man's Terminal Server"
+HOMEPAGE="http://www.linuxlots.com/~termpkg/"
+SRC_URI="mirror://debian/pool/main/t/termpkg/${PN}_${MY_PV}.orig.tar.gz
+ mirror://debian/pool/main/t/termpkg/${PN}_${MY_PF}.diff.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="uucp"
+
+DEPEND="sys-devel/flex"
+RDEPEND="sys-process/procps"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+src_prepare() {
+ # apply debian patches
+ epatch "${WORKDIR}/${PN}_${MY_PF}.diff"
+
+ # apply gentoo patches
+ epatch "${FILESDIR}/${P}-gcc43.diff"
+
+ # apply iaxmodem patches
+ epatch "${FILESDIR}/${PN}-${MY_PV}-ttydforfax.diff"
+}
+
+src_configure() {
+ ./configure LINUX $(use uucp && echo UUCP_LOCKING)
+}
+
+src_compile() {
+ emake -C linux CC=$(tc-getCC) LIBS="${LDFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ dobin linux/bin/termnet
+ dosbin linux/bin/{termnetd,ttyd}
+ dodoc CHANGES README termpkg.lsm
+ newdoc debian/changelog ChangeLog.debian
+ doman doc/*.1
+ insinto /etc
+ newins debian/termnetd.conf termnetd.conf.dist
+ for X in termnetd ttyd; do
+ newinitd "${FILESDIR}/${X}.initd" "${X}"
+ newconfd "${FILESDIR}/${X}.confd" "${X}"
+ done
+}
diff --git a/net-misc/termtter/Manifest b/net-misc/termtter/Manifest
new file mode 100644
index 000000000000..b1b36b5a81c0
--- /dev/null
+++ b/net-misc/termtter/Manifest
@@ -0,0 +1 @@
+DIST termtter-2.2.2.gem 1506304 SHA256 2b91e872f6dafbcb7128352b3aa95ed8397c20dab872026a3e2bc4b582a25a74 SHA512 f3df3ec14172d1b6235a0acdfa20fc8fdae0cc9151d7b887d8f60355b064694ff69663f54a039e0e075067baeedf804eb0d583dce616adaa62a75db9f44d1cf4 WHIRLPOOL 1afc095b87ae2b20397d292ac84c970fb1bde9174eef8a9e79671c822cb56d5372ff635d6458d3a9c2635901f248be7f77a63f5353909d85f8521f6b5611bbb1
diff --git a/net-misc/termtter/metadata.xml b/net-misc/termtter/metadata.xml
new file mode 100644
index 000000000000..144630fc407e
--- /dev/null
+++ b/net-misc/termtter/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="github">termtter/termtter</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/termtter/termtter-2.2.2.ebuild b/net-misc/termtter/termtter-2.2.2.ebuild
new file mode 100644
index 000000000000..e770c3da2e29
--- /dev/null
+++ b/net-misc/termtter/termtter-2.2.2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+USE_RUBY="ruby19"
+#RUBY_FAKEGEM_RECIPE_TEST="rake"
+RUBY_FAKEGEM_RECIPE_TEST=""
+RUBY_FAKEGEM_TASK_TEST="spec"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Termtter is a terminal based Twitter client"
+HOMEPAGE="https://github.com/termtter/termtter"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+ruby_add_rdepend "dev-ruby/json
+ dev-ruby/highline
+ dev-ruby/termcolor
+ dev-ruby/rubytter
+ dev-ruby/notify
+ dev-ruby/activerecord
+ dev-ruby/builder"
+# dev-ruby/fluent-logger
+ruby_add_bdepend "
+ doc? ( dev-ruby/rdoc )
+ test? (
+ dev-ruby/haml
+ dev-ruby/git
+ dev-ruby/rspec
+ dev-ruby/jeweler
+ )"
+# dev-ruby/cucumber
diff --git a/net-misc/throttle/Manifest b/net-misc/throttle/Manifest
new file mode 100644
index 000000000000..902d901197a1
--- /dev/null
+++ b/net-misc/throttle/Manifest
@@ -0,0 +1 @@
+DIST throttle-1.2.tar.gz 72501 RMD160 febf150f1e614eabe64e2495e287db65ac8c0fda SHA1 fcee417bd75fc7eac31bde2fc80da9f2a449d3c9 SHA256 6d90e4dcd6c604846020d60e82df1576e0a022cb96716a709db4ebfa143d6772
diff --git a/net-misc/throttle/metadata.xml b/net-misc/throttle/metadata.xml
new file mode 100644
index 000000000000..cd950b903bee
--- /dev/null
+++ b/net-misc/throttle/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>grobian@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ throttle copies the standard input to the standard output while
+ limiting bandwidth to the specified maximum.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/throttle/throttle-1.2.ebuild b/net-misc/throttle/throttle-1.2.ebuild
new file mode 100644
index 000000000000..70c1c050a1da
--- /dev/null
+++ b/net-misc/throttle/throttle-1.2.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Bandwidth limiting pipe"
+HOMEPAGE="http://klicman.org/throttle/"
+SRC_URI="http://klicman.org/throttle/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~x86 ~amd64-linux ~ppc-macos ~x86-macos"
+IUSE=""
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS NEWS README ChangeLog
+}
diff --git a/net-misc/tiers/Manifest b/net-misc/tiers/Manifest
new file mode 100644
index 000000000000..a2bbb90e196f
--- /dev/null
+++ b/net-misc/tiers/Manifest
@@ -0,0 +1,2 @@
+DIST tiers1.1.tar.gz 392532 SHA256 d7c44866fdfa70efe22f69942e1624ffeaa4ba1be47e335f8422f1b50a18c017 SHA512 b72a98aeeb3e1799536e1424e8f60bffcef59c61cc709232a670174c80d23fb4c3b60249c7ff2a33442b62b81a493b7ecef4bf0e950147fa8fe81bb9eabb9a08 WHIRLPOOL fbfbe71652239c2ca664340814b883187c037634012aa21ae4c4fb456185b2215dc97a3b5c03c017014f2fe5566dafece520a81f3a5483dcf238ffafd2245eaf
+DIST tiers2ns-lan.awk 3258 SHA256 675540db87c0ab24fb1a0b67fdd48d6b981de5d1bcb2da808ca69ed29d4bf583 SHA512 562204765e0e7c973e6d88c494e5aba9cd47d79c68309359cd232c34be6175f727411a64a6033a246a042987f1ad423008857eaf25c6254bd006c4a3ff4d083e WHIRLPOOL 4533e6811c783307e20d796d95c7aa0cd3adca7729ca24b001a1a6cb65c620e13c0a81fe28ead3a80ad5d317d893684579dabc567296a217842df835a7de13ab
diff --git a/net-misc/tiers/files/tiers-1.1-gcc43.patch b/net-misc/tiers/files/tiers-1.1-gcc43.patch
new file mode 100644
index 000000000000..4f167daf13ce
--- /dev/null
+++ b/net-misc/tiers/files/tiers-1.1-gcc43.patch
@@ -0,0 +1,118 @@
+--- tiers1.1b/src/tiers_create.cc 2009-01-21 03:56:28.000000000 -0400
++++ tiers1.1/src/tiers_create.cc 2009-01-21 03:57:39.000000000 -0400
+@@ -16,7 +16,7 @@
+ //////////////////////////////////////////////////////////////////////////////
+
+ // tiers.cc
+-#include <iostream.h>
++#include <iostream>
+
+ #ifndef _TIERS_HH
+ #include "tiers.hh"
+--- tiers1.1b/src/tiers.cc 2009-01-21 03:56:28.000000000 -0400
++++ tiers1.1/src/tiers.cc 2009-01-21 03:57:22.000000000 -0400
+@@ -17,8 +17,9 @@
+
+ // tiers.cc
+
+-#include <iostream.h>
+-#include <limits.h>
++#include <iostream>
++#include <cstdlib>
++#include <climits>
+
+ #ifndef _TIERS_HH
+ #include "tiers.hh"
+--- tiers1.1b/src/tiers_misc.cc 2009-01-21 03:56:28.000000000 -0400
++++ tiers1.1/src/tiers_misc.cc 2009-01-21 04:07:21.000000000 -0400
+@@ -16,9 +16,9 @@
+ //////////////////////////////////////////////////////////////////////////////
+
+ // tiers_misc.cc
+-#include <iostream.h>
+-#include <math.h>
+-#include <limits.h> // for ULONG_MAX
++#include <iostream>
++#include <cmath>
++#include <climits> // for ULONG_MAX
+
+ #ifndef _TIERS_HH
+ #include "tiers.hh"
+--- tiers1.1b/src/tiers_main.cc 2009-01-21 03:56:28.000000000 -0400
++++ tiers1.1/src/tiers_main.cc 2009-01-21 04:08:13.000000000 -0400
+@@ -17,9 +17,9 @@
+
+ // tiers_main.cc
+
+-#include <iostream.h>
+-#include <stdlib.h> // for strtoul
+-#include <math.h> // for random
++#include <iostream>
++#include <cstdlib> // for strtoul
++#include <cmath> // for random
+
+ #ifndef _TIERS_HH
+ #include "tiers.hh"
+--- tiers1.1b/src/tiers_output.cc 2009-01-21 03:56:28.000000000 -0400
++++ tiers1.1/src/tiers_output.cc 2009-01-21 04:00:09.000000000 -0400
+@@ -17,7 +17,7 @@
+
+ // tiers_output.cc
+
+-#include <iostream.h>
++#include <iostream>
+ #ifndef _TIERS_HH
+ #include "tiers.hh"
+ #endif
+--- tiers1.1b/src/tiers_output_gnuplot.cc 2009-01-21 03:56:28.000000000 -0400
++++ tiers1.1/src/tiers_output_gnuplot.cc 2009-01-21 04:00:39.000000000 -0400
+@@ -17,7 +17,7 @@
+
+ // tiers_output_gnuplot.cc
+
+-#include <iostream.h>
++#include <iostream>
+ #ifndef _TIERS_HH
+ #include "tiers.hh"
+ #endif
+--- tiers1.1b/src/tiers_prims.cc 2009-01-21 03:56:28.000000000 -0400
++++ tiers1.1/src/tiers_prims.cc 2009-01-21 04:10:24.000000000 -0400
+@@ -17,9 +17,9 @@
+
+ // tiers_prims.cc
+
+-#include <iostream.h>
+-#include <math.h> // for random
+-#include <limits.h> // for ULONG_MAX
++#include <iostream>
++#include <cmath> // for random
++#include <climits> // for ULONG_MAX
+
+ #ifndef _TIERS_HH
+ #include "tiers.hh"
+--- tiers1.1b/src/tiers_red_intra.cc 2009-01-21 03:56:28.000000000 -0400
++++ tiers1.1/src/tiers_red_intra.cc 2009-01-21 04:01:21.000000000 -0400
+@@ -17,8 +17,8 @@
+
+ // tiers_red_intra.cc
+
+-#include <iostream.h>
+-#include <limits.h> // for ULONG_MAX
++#include <iostream>
++#include <climits> // for ULONG_MAX
+
+ #ifndef _TIERS_HH
+ #include "tiers.hh"
+--- tiers1.1b/src/tiers_red_inter.cc 2009-01-21 03:56:28.000000000 -0400
++++ tiers1.1/src/tiers_red_inter.cc 2009-01-21 04:01:46.000000000 -0400
+@@ -17,8 +17,8 @@
+
+ // tiers_red_inter.cc
+
+-#include <iostream.h>
+-#include <limits.h> // for ULONG_MAX
++#include <iostream>
++#include <climits> // for ULONG_MAX
+
+ #ifndef _TIERS_HH
+ #include "tiers.hh"
diff --git a/net-misc/tiers/files/tiers1.1-gccfixes.patch b/net-misc/tiers/files/tiers1.1-gccfixes.patch
new file mode 100644
index 000000000000..db340cad1f04
--- /dev/null
+++ b/net-misc/tiers/files/tiers1.1-gccfixes.patch
@@ -0,0 +1,201 @@
+diff -urN tiers1.1/src/Makefile tiers1.1.new/src/Makefile
+--- tiers1.1/src/Makefile 1997-07-12 23:22:30.000000000 -0700
++++ tiers1.1.new/src/Makefile 2004-01-11 04:56:33.000000000 -0800
+@@ -31,7 +31,9 @@
+ # flags
+ #
+ #FLAGS= -fconserve-space -fno-inline -Wall -Winline -Wpointer-arith -g -DDEBUG
+-FLAGS= -g -fconserve-space
++FLAGS = $(CFLAGS) -fPIC #-g -fconserve-space
++CONFIGFILE = ./tiers_config
++FLAGS += -DCONFIGFILE="\"$(CONFIGFILE)\""
+
+ #
+ # tools
+diff -urN tiers1.1/src/tiers.cc tiers1.1.new/src/tiers.cc
+--- tiers1.1/src/tiers.cc 1997-03-04 13:54:18.000000000 -0800
++++ tiers1.1.new/src/tiers.cc 2004-01-11 04:56:33.000000000 -0800
+@@ -24,6 +24,7 @@
+ #include "tiers.hh"
+ #endif
+
++#include "tiers_vars.hh"
+
+
+ ////////////////////////////////////////////////////////////////////////
+@@ -506,4 +507,3 @@
+ }
+
+ // end of file
+-
+diff -urN tiers1.1/src/tiers.hh tiers1.1.new/src/tiers.hh
+--- tiers1.1/src/tiers.hh 1998-01-12 02:10:46.000000000 -0800
++++ tiers1.1.new/src/tiers.hh 2004-01-11 04:56:33.000000000 -0800
+@@ -20,6 +20,8 @@
+ #ifndef _TIERS_HH
+ #define _TIERS_HH
+
++using namespace std;
++
+
+ ////////////////////////////////////////////////////////////////////////
+ // Model
+@@ -264,46 +266,46 @@
+ // Defined in tiers_config.cc
+
+ // Type of output produced by the model, e.g. Model::GENERIC, Model::GNUPLOT
+-Model::OpType OP_TYPE;
++extern Model::OpType OP_TYPE;
+
+ // If set, TIERS_VERBOSE causes the output to contain the
+ // parameters used to generate the model and helpful headings
+ // If undefined, the output is a simple list of nodes and edges
+-bool TIERS_VERBOSE;
++extern bool TIERS_VERBOSE;
+
+ // If set, TIERS_LABEL_XXX causes the output to contain a label for
+ // each of the nodes of type XXX
+-bool TIERS_LABEL_WAN;
+-bool TIERS_LABEL_MAN;
+-bool TIERS_LABEL_LAN;
++extern bool TIERS_LABEL_WAN;
++extern bool TIERS_LABEL_MAN;
++extern bool TIERS_LABEL_LAN;
+
+
+ // If defined as true, the operation of the model is more verbose
+ // If undefined, the model should run with no debugging output
+-bool TIERS_DEBUG;
++extern bool TIERS_DEBUG;
+
+ // If defined as true, then an undirected list of edges is produced in the
+ // output, i.e. the edges (i,j) and (j,i) only appear once in the output
+ // Note that all LAN edges are assumed bidirectional
+-bool REMOVE_DUP_EDGES;
++extern bool REMOVE_DUP_EDGES;
+
+ // Set these true to apply proxmity tests to nodes in each network type
+-bool PROXIMITY_TEST_WAN;
+-bool PROXIMITY_TEST_MAN;
+-bool PROXIMITY_TEST_LAN;
++extern bool PROXIMITY_TEST_WAN;
++extern bool PROXIMITY_TEST_MAN;
++extern bool PROXIMITY_TEST_LAN;
+
+ // The size of a unit in WAN, MAN and LAN grids
+ // e.g. 1000km, 1km, 1m would be best, but the current values fit with
+ // typical int sizes
+-unsigned long int WAN_SCALE;
+-unsigned long int MAN_SCALE;
+-unsigned long int LAN_SCALE;
++extern unsigned long int WAN_SCALE;
++extern unsigned long int MAN_SCALE;
++extern unsigned long int LAN_SCALE;
+
+ // GRID is the size of the square grid on which points are placed
+-unsigned long int GRID;
++extern unsigned long int GRID;
+
+ // The comment character for output
+-char COM;
++extern char COM;
+
+
+ //
+@@ -311,13 +313,13 @@
+ //
+
+ // The output directory for results from gnuplot
+-char *title;
++extern char *title;
+
+ // The title for results from gnuplot
+-char *outputdir;
++extern char *outputdir;
+
+ // Create a unique identifier for each model
+-long int ModelId;
++extern long int ModelId;
+
+ // Forward declaration
+ unsigned long int max(unsigned long int A, unsigned long int B);
+diff -urN tiers1.1/src/tiers_config.cc tiers1.1.new/src/tiers_config.cc
+--- tiers1.1/src/tiers_config.cc 1997-07-13 02:55:53.000000000 -0700
++++ tiers1.1.new/src/tiers_config.cc 2004-01-11 04:58:36.000000000 -0800
+@@ -17,7 +17,8 @@
+
+ // tiers_config.cc
+
+-#include <fstream.h> // for ifstream
++#include <fstream> // for ifstream
++#include <iostream> // for ifstream
+ #include <string.h> // for strcpy
+ #include <stdlib.h> // for strtoul
+
+@@ -36,10 +37,13 @@
+ {
+ bool ret = true;
+
+- ifstream config_file("./tiers_config");
++#ifndef CONFIGFILE
++#error You need to define CONFIGFILE on the commandline
++#endif
++ ifstream config_file(CONFIGFILE);
+ if (!config_file)
+ {
+- cerr << "Tiers:: cannot open file './tiers_config'" << endl;
++ cerr << "Tiers:: cannot open file '" << CONFIGFILE << "'" << endl;
+ }
+
+ // Read the contents of the file in, skipping blank lines or lines which
+diff -urN tiers1.1/src/tiers_main.cc tiers1.1.new/src/tiers_main.cc
+--- tiers1.1/src/tiers_main.cc 1997-07-06 00:58:31.000000000 -0700
++++ tiers1.1.new/src/tiers_main.cc 2004-01-11 04:56:33.000000000 -0800
+@@ -25,11 +25,11 @@
+ #include "tiers.hh"
+ #endif
+
+-extern "C"
+-{
+- long int time(int dummy);
+- char * initstate(unsigned seed, char *state, int n);
+-}
++//extern "C"
++//{
++// long int time(int dummy);
++// char * initstate(unsigned seed, char *state, int n);
++//}
+
+ unsigned long int NW; // maximum number of WANs, currently 1
+ unsigned long int NM; // maximum number of MANs per WAN
+@@ -63,7 +63,7 @@
+ cout.setf( ios::unitbuf );
+
+ // TIERS_VERBOSE
+-#ifdef 0
++#ifdef FALSE
+ cout << "Main:: Processing arguments. Arguments are:"
+ << endl;
+ for (int i = 0; i < argc; i++)
+diff -urN tiers1.1/src/tiers_vars.hh tiers1.1.new/src/tiers_vars.hh
+--- tiers1.1/src/tiers_vars.hh 1969-12-31 16:00:00.000000000 -0800
++++ tiers1.1.new/src/tiers_vars.hh 2004-01-11 04:56:33.000000000 -0800
+@@ -0,0 +1,18 @@
++Model::OpType OP_TYPE;
++bool TIERS_VERBOSE;
++bool TIERS_LABEL_WAN;
++bool TIERS_LABEL_MAN;
++bool TIERS_LABEL_LAN;
++bool TIERS_DEBUG;
++bool REMOVE_DUP_EDGES;
++bool PROXIMITY_TEST_WAN;
++bool PROXIMITY_TEST_MAN;
++bool PROXIMITY_TEST_LAN;
++unsigned long int WAN_SCALE;
++unsigned long int MAN_SCALE;
++unsigned long int LAN_SCALE;
++unsigned long int GRID;
++char COM;
++char *title;
++char *outputdir;
++long int ModelId;
diff --git a/net-misc/tiers/metadata.xml b/net-misc/tiers/metadata.xml
new file mode 100644
index 000000000000..c6d862855eb5
--- /dev/null
+++ b/net-misc/tiers/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-misc/tiers/tiers-1.1.ebuild b/net-misc/tiers/tiers-1.1.ebuild
new file mode 100644
index 000000000000..6bad16f7a604
--- /dev/null
+++ b/net-misc/tiers/tiers-1.1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+MY_P="${PN}${PV}"
+DESCRIPTION="Random network topography generator"
+HOMEPAGE="http://www.isi.edu/nsnam/ns/ns-topogen.html#tiers"
+SRC_URI="http://www.isi.edu/nsnam/dist/topogen/${MY_P}.tar.gz
+ http://www.isi.edu/nsnam/dist/topogen/tiers2ns-lan.awk"
+
+LICENSE="mapm"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+IUSE=""
+
+DEPEND="sys-devel/gcc"
+RDEPEND="virtual/awk
+ sci-visualization/gnuplot"
+
+S=${WORKDIR}/${PN}${PV}
+
+src_unpack() {
+ unpack ${MY_P}.tar.gz
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${MY_P}-gccfixes.patch
+ epatch "${FILESDIR}"/${P}-gcc43.patch
+ sed -e '1a\#!/bin/sh' -e '1d' -e "s|-f |-f /usr/share/${PN}/|g" -i "${S}"/bin/strip4gnuplot3.5
+}
+
+src_compile() {
+ cd "${S}"/src
+ emake CFLAGS="${CFLAGS}" CONFIGFILE="/etc/tiers-gnuplot.conf" EXEC="../bin/tiers-gnuplot" || die
+ # cleanup for a sec
+ rm *.o
+ emake CFLAGS="${CFLAGS}" CONFIGFILE="/etc/tiers.conf" EXEC="../bin/tiers" || die
+}
+
+src_install() {
+ dobin bin/tiers bin/tiers-gnuplot bin/strip4gnuplot3.5
+ insinto /etc
+ newins src/tiers_config.generic tiers.conf
+ newins src/tiers_config.gnuplot tiers-gnuplot.conf
+ insinto /usr/share/${PN}
+ doins bin/*.awk "${DISTDIR}"/tiers2ns-lan.awk
+ dodoc CHANGES COPYRIGHT README docs/*
+}
diff --git a/net-misc/tigervnc/Manifest b/net-misc/tigervnc/Manifest
new file mode 100644
index 000000000000..d2aa94f260a4
--- /dev/null
+++ b/net-misc/tigervnc/Manifest
@@ -0,0 +1,10 @@
+DIST tigervnc-1.3.0-patches-0.2.tar.bz2 8130 SHA256 9cf7ca0e3fe56f99c3ca1b88ddccca0952d86a722a3c3da4585aac4b7882245d SHA512 defb37a4f0aa5b7c2dd71aaf404b048c058adf3181235721607a3cac7e8a4fec7751b081ccb1704e51a68ada84147d408328cdf969c64359dd9460916671be90 WHIRLPOOL 67db5fc1c1b8bea6dc4394d360e5261f52f160627d9bcf5a4fee221c38600c0415a0f10170a960f91cf0cf94a401f9d625d790aba3af17fc3326aae6cb2b899c
+DIST tigervnc-1.3.1-patches-0.1.tar.bz2 16016 SHA256 5bcaabd8993274a5ce1718efc15fdaf22041003a49a94293eeea9b5b72d3b822 SHA512 f7afc3e7062976b704802e58bb654e46ded5f9dcf8e089d1633e82ce8f5383b60885158319142ac8a58d4d0cf0c8fb51134124bb2dd00dc38fb441bc079b31d4 WHIRLPOOL 33c149415633fe4b0c08cd96c9208c70728acc4b2935835bad1c39037af5aec70c54ad9b98503f6ca93441608e3eef82bc3b17dfcdda97f95ae5dbc41cfcd4a4
+DIST tigervnc-1.3.1.tar.gz 6888105 SHA256 628622316eefa5d4f348f00a280a513569bfae3eae6a20d72e2990654d12274e SHA512 28fe61287c4c96b3703055701cb74f7f4cb17392af5201b93fafe5187555710ab4becf110266ea161d26568064435626e85ab7570e1f7f6df2348f1a34d56e8d WHIRLPOOL 35875b230cd4face9a24ae9ff5682c122d7db7a43fe475d9216d30ca9c55409a16788bc6af5e0a2efde3457295f00a3a8f5e29b540477e806be5b0fc30408b99
+DIST tigervnc-1.4.2-patches-0.1.tar.bz2 7361 SHA256 21c77708d303192108ffeef02acc0e7310461b4910bb49ae78c8a944e52c436e SHA512 86235aba8e735e4afed21d2940cee8ea2f4f1bc951db79aaf481ae79ab81d4518add6be2619ce9371f77fd068c8dbf069754ecc0168e5afe9e8505d3d61cc573 WHIRLPOOL 97a8c1719e7959ce8abd29f9ad249c7acf1b5a21ef36c0ce00b6e3bae8e6e78e9cdb0b34a23da6bd44c9e513e95f22716b286c5ec57bf1a854101c4810c7b481
+DIST tigervnc-1.4.2.tar.gz 1370453 SHA256 6cfb33cb2a123dee96ca29d61523391f73c9d49b6cd2fb6522312d01da98866f SHA512 dcd9b223d0d6646a85b2f28abdf36491d6d735b0738cce0b179d745ca124d8430edd883a7ac7342bf882cf62a02ce8d7058ff9101f17c4310dbbe6bad50cc90f WHIRLPOOL 420dd1f72e1ba0de1796133acf0c35ac1e79bc1533610b927c01993af57eb293a886f57739cca7cf0f1985a269a2ed3cf2345896f59696c8e8dfc68a4b9013e5
+DIST tigervnc.png 4958 SHA256 e0828aeb92ccaaf93e690e9ee5e17803de1cb140d3ca79fb756fe08ebbc4492e SHA512 97f9a42e9b9f50f1c91de3b7d7991aa8965240fe4958d6da4e9f72f9baa4510ad615765f7c59d6e0a90c9d4b5fe53ad1547c766f2da45e4a6b6e29b03ced2b8b WHIRLPOOL bbf01f6702724bc4329d053bd3fbf856103371abce20f6f74aa3c2e5eed0eebcdcccd287788b1efbb8de3008cb484a8da5ccd1bd667727e4b0861f3bb550529c
+DIST xorg-server-1.15.0.tar.bz2 5546579 SHA256 613b2f2e7ee2a06d2f8e862c836dc70d319c52f1537749e027398f40086aabb8 SHA512 7bf6a9eff9cc606defbaa46600a4d7b41896f4304e06af745a2717687853c7e92b191481f1f4d6d98ef0adfe5f404c9e3997ebd98553c60b626cd1bb53c58d9d WHIRLPOOL 905d3b47938e5e5604b04953f11ec7acee9298d6f32570612d6301ac71b0c5a49e774267b627957b7a6a94f6b9bf211c9ed6b7102f389a2120a40bd45502a6d7
+DIST xorg-server-1.16.0.tar.bz2 5832944 SHA256 38330a03c5f7a38745a3f9816cf069db5b8844eebb358fd39dbabf61f32cd06b SHA512 eab298e3728aa79ff2ba3f5c12637c4db0f9bbca49ed00b673b2bfedf605f33a69d8eb946bed98e3d28afd9bfaf62e21ce2e8606d84cae9906506d90c26f1662 WHIRLPOOL bd9817cf93587e2b33d63438942c75d49b04f4fc2a4544654dfcc116deaf88abcccd0fa2496fb58848d5a007d2e32177cdbcd3f44237efd8b7882a0abc5b8d56
+DIST xorg-server-1.16.4.tar.bz2 5817330 SHA256 abb6e1cc9213a9915a121f48576ff6739a0b8cdb3d32796f9a7743c9a6efc871 SHA512 f756fca65535aa921a85d8d8eb36ea2ba5b7af90a46d640b0ca76259a9abd9d323885087e11156528d95240937c70373045001ae20266a1b9e89909f007e9e74 WHIRLPOOL 63980a3e2b57d2860998344f21a6524598b3dc135c277e5a868e34b57ab5060681ae7137358b3ba8b9ca5fd622a91aeb06bd0ac9e3e5ce1f4dc55df2b2dc0e33
+DIST xorg-server-1.17.1.tar.bz2 5852385 SHA256 2bf8e9f6f0a710dec1d2472467bff1f4e247cb6dcd76eb469aafdc8a2d7db2ab SHA512 195a0e0a6bd9c7655e62dd40dfbd7dea77d10f1143d4fd6154e8bdbb463d3729f81ecd1e379d66f68e828d4f4583782c15ce260de24444802076844aec552c4f WHIRLPOOL a8a78b0bfa6137941e3434f083319a827f0332fd9c190922bb0a33381e86173868d236c96a89ee3049400f37521fe052838416f009713f004227f05b8717d776
diff --git a/net-misc/tigervnc/files/1.3.1-CVE-2014-8240.patch b/net-misc/tigervnc/files/1.3.1-CVE-2014-8240.patch
new file mode 100644
index 000000000000..dd2707394870
--- /dev/null
+++ b/net-misc/tigervnc/files/1.3.1-CVE-2014-8240.patch
@@ -0,0 +1,78 @@
+Patch-Mainline: To be upstreamed
+References: bnc#900896 CVE-2014-8240
+Signed-off-by: Michal Srb <msrb@suse.com>
+
+Index: tigervnc-1.4.1/unix/x0vncserver/Image.cxx
+===================================================================
+--- tigervnc-1.4.1.orig/unix/x0vncserver/Image.cxx
++++ tigervnc-1.4.1/unix/x0vncserver/Image.cxx
+@@ -80,6 +80,14 @@ void Image::Init(int width, int height)
+ xim = XCreateImage(dpy, vis, DefaultDepth(dpy, DefaultScreen(dpy)),
+ ZPixmap, 0, 0, width, height, BitmapPad(dpy), 0);
+
++ if (xim->bytes_per_line <= 0 ||
++ xim->height <= 0 ||
++ xim->height >= INT_MAX / xim->bytes_per_line) {
++ vlog.error("Invalid display size");
++ XDestroyImage(xim);
++ exit(1);
++ }
++
+ xim->data = (char *)malloc(xim->bytes_per_line * xim->height);
+ if (xim->data == NULL) {
+ vlog.error("malloc() failed");
+@@ -254,6 +262,17 @@ void ShmImage::Init(int width, int heigh
+ delete shminfo;
+ shminfo = NULL;
+ return;
++ }
++
++ if (xim->bytes_per_line <= 0 ||
++ xim->height <= 0 ||
++ xim->height >= INT_MAX / xim->bytes_per_line) {
++ vlog.error("Invalid display size");
++ XDestroyImage(xim);
++ xim = NULL;
++ delete shminfo;
++ shminfo = NULL;
++ return;
+ }
+
+ shminfo->shmid = shmget(IPC_PRIVATE,
+Index: tigervnc-1.4.1/vncviewer/X11PixelBuffer.cxx
+===================================================================
+--- tigervnc-1.4.1.orig/vncviewer/X11PixelBuffer.cxx
++++ tigervnc-1.4.1/vncviewer/X11PixelBuffer.cxx
+@@ -106,6 +106,15 @@ X11PixelBuffer::X11PixelBuffer(int width
+ if (!xim)
+ throw rfb::Exception(_("Could not create framebuffer image"));
+
++ if (xim->bytes_per_line <= 0 ||
++ xim->height <= 0 ||
++ xim->height >= INT_MAX / xim->bytes_per_line) {
++ if (xim)
++ XDestroyImage(xim);
++ xim = NULL;
++ throw rfb::Exception("Invalid display size");
++ }
++
+ xim->data = (char*)malloc(xim->bytes_per_line * xim->height);
+ if (!xim->data)
+ throw rfb::Exception(_("Not enough memory for framebuffer"));
+@@ -172,6 +181,16 @@ int X11PixelBuffer::setupShm()
+ if (!xim)
+ goto free_shminfo;
+
++ if (xim->bytes_per_line <= 0 ||
++ xim->height <= 0 ||
++ xim->height >= INT_MAX / xim->bytes_per_line) {
++ XDestroyImage(xim);
++ xim = NULL;
++ delete shminfo;
++ shminfo = NULL;
++ throw rfb::Exception("Invalid display size");
++ }
++
+ shminfo->shmid = shmget(IPC_PRIVATE,
+ xim->bytes_per_line * xim->height,
+ IPC_CREAT|0777);
diff --git a/net-misc/tigervnc/files/tigervnc.confd b/net-misc/tigervnc/files/tigervnc.confd
new file mode 100644
index 000000000000..e651dbbe7889
--- /dev/null
+++ b/net-misc/tigervnc/files/tigervnc.confd
@@ -0,0 +1,9 @@
+# Config file for /etc/init.d/tigervnc
+
+# Specify the user(s) Xvnc(1) should be run for. The syntax is: "username:display".
+# example: "DISPLAYS="foo:1 bar:2" You can specify more users separated by space.
+# DISPLAYS="myuser:1"
+
+# Specify any of vncserver(1) and Xvnc(1) options. See the respective man pages for more information.
+# VNC_OPTS=""
+
diff --git a/net-misc/tigervnc/files/tigervnc.initd b/net-misc/tigervnc/files/tigervnc.initd
new file mode 100644
index 000000000000..cc0523dc38bd
--- /dev/null
+++ b/net-misc/tigervnc/files/tigervnc.initd
@@ -0,0 +1,73 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ -n "${DISPLAYS}" ]; then
+ if [ $1 = "start" ]; then
+ local user
+ for user in $DISPLAYS; do
+ if eval [ ! -f "~${user%%:*}/.vnc/passwd" ]; then
+ eerror "There are no passwords defined for user ${user%%:*}."
+ return 1
+ elif [ -e "/tmp/.X11-unix/X${user##*:}" ]; then
+ eerror "Display :${user##*:} appears to be already in use because of /tmp/.X11-unix/X${user##*:}"
+ eerror "Remove this file if there is no X server $HOSTNAME:${user##*:}"
+ return 1
+ elif [ -e "/tmp/.X${user##*:}-lock" ]; then
+ eerror "Display :${user##*:} appears to be already in use because of /tmp/.X${user##*:}-lock"
+ eerror "Remove this file if there is no X server $HOSTNAME:${user##*:}"
+ return 1
+ fi
+ done
+ fi
+ return 0
+ else
+ eerror 'Please define $DISPLAYS in /etc/conf.d/tigervnc'
+ return 1
+ fi
+}
+
+start() {
+ checkconfig start || return 1
+ ebegin "Starting TigerVNC server"
+ for user in $DISPLAYS; do
+ usrname=${user%%:*}
+ usropts=VNC_OPTS_${usrname}
+ usrdisp=${user##*:}
+ usrvar=$usropts"["$usrdisp"]"
+ [ -z ${!usrvar} ] && vnc_opts=$VNC_OPTS || vnc_opts=${!usrvar}
+
+ # A user may have an invalid shell, so we default to /bin/sh if its the case
+ if [ -x /usr/bin/getent ] ; then
+ usrshell=`getent passwd ${user%%:*} | cut -d: -f 7`
+ case "$usrshell" in
+ */bash|*/ksh|*/sh|*/csh|*/tcsh) ;;
+ *) shell="-s /bin/sh" ;;
+ esac
+ echo $usrshell $shell
+ fi
+
+ su ${shell} ${user%%:*} -c "source /etc/profile && cd ~${user%%:*} && vncserver :${user##*:} $vnc_opts" &>/dev/null
+ done
+ eend $?
+}
+
+stop() {
+ checkconfig stop || return 2
+ ebegin "Stopping TigerVNC server"
+ for user in $DISPLAYS; do
+ su -s /bin/sh ${user%%:*} -c "vncserver -kill :${user##*:}" &>/dev/null
+ done
+ eend $?
+}
+
+restart() {
+ svc_stop
+ svc_start
+}
diff --git a/net-misc/tigervnc/metadata.xml b/net-misc/tigervnc/metadata.xml
new file mode 100644
index 000000000000..f555d69f5e16
--- /dev/null
+++ b/net-misc/tigervnc/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>armin76@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="server">Build TigerVNC server</flag>
+ <flag name="xorgmodule">Build the Xorg module</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">TigerVNC/tigervnc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/tigervnc/tigervnc-1.3.1-r1.ebuild b/net-misc/tigervnc/tigervnc-1.3.1-r1.ebuild
new file mode 100644
index 000000000000..b2d6c1b5e0e3
--- /dev/null
+++ b/net-misc/tigervnc/tigervnc-1.3.1-r1.ebuild
@@ -0,0 +1,199 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils cmake-utils autotools java-pkg-opt-2 flag-o-matic
+
+PATCHVER="0.2"
+XSERVER_VERSION="1.15.0"
+OPENGL_DIR="xorg-x11"
+#MY_P="${PN}-1.2.80-20130314svn5065"
+#S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Remote desktop viewer display system"
+HOMEPAGE="http://www.tigervnc.org"
+SRC_URI="mirror://sourceforge/tigervnc/${P}.tar.gz
+ mirror://gentoo/${PN}.png
+ mirror://gentoo/${PN}-1.3.0-patches-${PATCHVER}.tar.bz2
+ http://dev.gentoo.org/~armin76/dist/${PN}-1.3.0-patches-${PATCHVER}.tar.bz2
+ server? ( ftp://ftp.freedesktop.org/pub/xorg/individual/xserver/xorg-server-${XSERVER_VERSION}.tar.bz2 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86"
+IUSE="gnutls java nptl +opengl pam server +xorgmodule"
+
+RDEPEND="virtual/jpeg:0
+ sys-libs/zlib
+ >=x11-libs/libXtst-1.0.99.2
+ >=x11-libs/fltk-1.3.1
+ gnutls? ( net-libs/gnutls )
+ java? ( >=virtual/jre-1.5 )
+ pam? ( virtual/pam )
+ server? (
+ dev-lang/perl
+ >=x11-libs/libXi-1.2.99.1
+ >=x11-libs/libXfont-1.4.2
+ >=x11-libs/libxkbfile-1.0.4
+ x11-libs/libXrender
+ >=x11-libs/pixman-0.27.2
+ >=x11-apps/xauth-1.0.3
+ x11-apps/xsetroot
+ >=x11-misc/xkeyboard-config-2.4.1-r3
+ opengl? ( >=app-eselect/eselect-opengl-1.0.8 )
+ xorgmodule? ( =x11-base/xorg-server-${XSERVER_VERSION%.*}* )
+ )
+ !net-misc/vnc
+ !net-misc/tightvnc
+ !net-misc/xf4vnc"
+DEPEND="${RDEPEND}
+ amd64? ( dev-lang/nasm )
+ x86? ( dev-lang/nasm )
+ >=x11-proto/inputproto-2.2.99.1
+ >=x11-proto/xextproto-7.2.99.901
+ >=x11-proto/xproto-7.0.22
+ java? ( >=virtual/jdk-1.5 )
+ server? (
+ virtual/pkgconfig
+ media-fonts/font-util
+ x11-misc/util-macros
+ >=x11-proto/bigreqsproto-1.1.0
+ >=x11-proto/compositeproto-0.4
+ >=x11-proto/damageproto-1.1
+ >=x11-proto/fixesproto-5.0
+ >=x11-proto/fontsproto-2.0.2
+ >=x11-proto/glproto-1.4.17
+ >=x11-proto/randrproto-1.4.0
+ >=x11-proto/renderproto-0.11
+ >=x11-proto/resourceproto-1.2.0
+ >=x11-proto/scrnsaverproto-1.1
+ >=x11-proto/videoproto-2.2.2
+ >=x11-proto/xcmiscproto-1.2.0
+ >=x11-proto/xineramaproto-1.1.3
+ >=x11-libs/xtrans-1.3.2
+ >=x11-proto/dri2proto-2.8
+ opengl? ( >=media-libs/mesa-7.8_rc[nptl=] )
+ )"
+
+CMAKE_IN_SOURCE_BUILD=1
+
+pkg_setup() {
+ if ! use server ; then
+ echo
+ einfo "The 'server' USE flag will build tigervnc's server."
+ einfo "If '-server' is chosen only the client is built to save space."
+ einfo "Stop the build now if you need to add 'server' to USE flags.\n"
+ else
+ ewarn "Forcing on xorg-x11 for new enough glxtokens.h..."
+ OLD_IMPLEM="$(eselect opengl show)"
+ eselect opengl set ${OPENGL_DIR}
+ fi
+}
+
+switch_opengl_implem() {
+ # Switch to the xorg implementation.
+ # Use new opengl-update that will not reset user selected
+ # OpenGL interface ...
+ echo
+ eselect opengl set ${OLD_IMPLEM}
+}
+
+src_prepare() {
+ if use server ; then
+ cp -r "${WORKDIR}"/xorg-server-${XSERVER_VERSION}/* unix/xserver
+ else
+ rm "${WORKDIR}"/patches/*_server_*
+ fi
+
+ EPATCH_SOURCE="${WORKDIR}/patches" EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" epatch
+
+ if use server ; then
+ cd unix/xserver
+ epatch ../xserver114.patch
+ eautoreconf
+ fi
+}
+
+src_configure() {
+
+ use arm || use hppa && append-flags "-fPIC"
+
+ mycmakeargs=(
+ -G "Unix Makefiles"
+ $(cmake-utils_use_enable gnutls GNUTLS)
+ $(cmake-utils_use_enable pam PAM)
+ $(cmake-utils_use_build java JAVA)
+ )
+
+ cmake-utils_src_configure
+
+ if use server; then
+ cd unix/xserver
+ econf \
+ $(use_enable nptl glx-tls) \
+ $(use_enable opengl glx) \
+ --disable-config-dbus \
+ --disable-config-hal \
+ --disable-config-udev \
+ --disable-devel-docs \
+ --disable-dmx \
+ --disable-dri \
+ --disable-dri3 \
+ --disable-kdrive \
+ --disable-selective-werror \
+ --disable-silent-rules \
+ --disable-static \
+ --disable-unit-tests \
+ --disable-xephyr \
+ --disable-xinerama \
+ --disable-xnest \
+ --disable-xorg \
+ --disable-xvfb \
+ --disable-xwin \
+ --enable-dri2 \
+ --with-pic \
+ --without-dtrace \
+ --disable-present \
+ --disable-unit-tests
+ fi
+}
+
+src_compile() {
+ cmake-utils_src_compile
+
+ if use server ; then
+ cd unix/xserver
+ emake
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ newicon "${DISTDIR}"/tigervnc.png vncviewer.png
+ make_desktop_entry vncviewer vncviewer vncviewer Network
+
+ if use server ; then
+ cd unix/xserver/hw/vnc
+ emake DESTDIR="${D}" install
+ ! use xorgmodule && rm -rf "${D}"/usr/$(get_libdir)/xorg
+
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+
+ rm "${D}"/usr/$(get_libdir)/xorg/modules/extensions/libvnc.la
+ else
+ cd "${D}"
+ for f in vncserver vncpasswd x0vncserver vncconfig; do
+ rm usr/bin/$f
+ rm usr/share/man/man1/$f.1
+ done
+ fi
+}
+
+pkg_postinst() {
+ use server && switch_opengl_implem
+}
diff --git a/net-misc/tigervnc/tigervnc-1.3.1-r2.ebuild b/net-misc/tigervnc/tigervnc-1.3.1-r2.ebuild
new file mode 100644
index 000000000000..d7bde60325fa
--- /dev/null
+++ b/net-misc/tigervnc/tigervnc-1.3.1-r2.ebuild
@@ -0,0 +1,198 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils cmake-utils autotools java-pkg-opt-2 flag-o-matic
+
+PATCHVER="0.1"
+XSERVER_VERSION="1.16.0"
+OPENGL_DIR="xorg-x11"
+#MY_P="${PN}-1.2.80-20130314svn5065"
+#S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Remote desktop viewer display system"
+HOMEPAGE="http://www.tigervnc.org"
+SRC_URI="mirror://sourceforge/tigervnc/${P}.tar.gz
+ mirror://gentoo/${PN}.png
+ mirror://gentoo/${PN}-1.3.1-patches-${PATCHVER}.tar.bz2
+ http://dev.gentoo.org/~armin76/dist/${PN}-1.3.1-patches-${PATCHVER}.tar.bz2
+ server? ( ftp://ftp.freedesktop.org/pub/xorg/individual/xserver/xorg-server-${XSERVER_VERSION}.tar.bz2 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
+IUSE="gnutls java nptl +opengl pam server +xorgmodule"
+
+RDEPEND="virtual/jpeg:0
+ sys-libs/zlib
+ >=x11-libs/libXtst-1.0.99.2
+ >=x11-libs/fltk-1.3.1
+ gnutls? ( net-libs/gnutls )
+ java? ( >=virtual/jre-1.5 )
+ pam? ( virtual/pam )
+ server? (
+ dev-lang/perl
+ >=x11-libs/libXi-1.2.99.1
+ >=x11-libs/libXfont-1.4.2
+ >=x11-libs/libxkbfile-1.0.4
+ x11-libs/libXrender
+ >=x11-libs/pixman-0.27.2
+ >=x11-apps/xauth-1.0.3
+ x11-apps/xsetroot
+ >=x11-misc/xkeyboard-config-2.4.1-r3
+ opengl? ( >=app-eselect/eselect-opengl-1.0.8 )
+ xorgmodule? ( =x11-base/xorg-server-${XSERVER_VERSION%.*}* )
+ )
+ !net-misc/vnc
+ !net-misc/tightvnc
+ !net-misc/xf4vnc"
+DEPEND="${RDEPEND}
+ amd64? ( dev-lang/nasm )
+ x86? ( dev-lang/nasm )
+ >=x11-proto/inputproto-2.2.99.1
+ >=x11-proto/xextproto-7.2.99.901
+ >=x11-proto/xproto-7.0.26
+ java? ( >=virtual/jdk-1.5 )
+ server? (
+ virtual/pkgconfig
+ media-fonts/font-util
+ x11-misc/util-macros
+ >=x11-proto/bigreqsproto-1.1.0
+ >=x11-proto/compositeproto-0.4
+ >=x11-proto/damageproto-1.1
+ >=x11-proto/fixesproto-5.0
+ >=x11-proto/fontsproto-2.1.3
+ >=x11-proto/glproto-1.4.17
+ >=x11-proto/randrproto-1.4.0
+ >=x11-proto/renderproto-0.11
+ >=x11-proto/resourceproto-1.2.0
+ >=x11-proto/scrnsaverproto-1.1
+ >=x11-proto/videoproto-2.2.2
+ >=x11-proto/xcmiscproto-1.2.0
+ >=x11-proto/xineramaproto-1.1.3
+ >=x11-libs/xtrans-1.3.3
+ >=x11-proto/dri2proto-2.8
+ opengl? ( >=media-libs/mesa-7.8_rc[nptl=] )
+ )"
+
+CMAKE_IN_SOURCE_BUILD=1
+
+pkg_setup() {
+ if ! use server ; then
+ echo
+ einfo "The 'server' USE flag will build tigervnc's server."
+ einfo "If '-server' is chosen only the client is built to save space."
+ einfo "Stop the build now if you need to add 'server' to USE flags.\n"
+ else
+ ewarn "Forcing on xorg-x11 for new enough glxtokens.h..."
+ OLD_IMPLEM="$(eselect opengl show)"
+ eselect opengl set ${OPENGL_DIR}
+ fi
+}
+
+switch_opengl_implem() {
+ # Switch to the xorg implementation.
+ # Use new opengl-update that will not reset user selected
+ # OpenGL interface ...
+ echo
+ eselect opengl set ${OLD_IMPLEM}
+}
+
+src_prepare() {
+ if use server ; then
+ cp -r "${WORKDIR}"/xorg-server-${XSERVER_VERSION}/* unix/xserver
+ else
+ rm "${WORKDIR}"/patches/*_server_*
+ fi
+
+ EPATCH_SOURCE="${WORKDIR}/patches" EPATCH_SUFFIX="patch" EPATCH_EXCLUDE="*999*" \
+ EPATCH_FORCE="yes" epatch
+
+ if use server ; then
+ cd unix/xserver
+ epatch "${WORKDIR}"/patches/0999_server_xserver-1.14-rebased.patch
+ eautoreconf
+ fi
+}
+
+src_configure() {
+
+ use arm || use hppa && append-flags "-fPIC"
+
+ mycmakeargs=(
+ -G "Unix Makefiles"
+ $(cmake-utils_use_enable gnutls GNUTLS)
+ $(cmake-utils_use_enable pam PAM)
+ $(cmake-utils_use_build java JAVA)
+ )
+
+ cmake-utils_src_configure
+
+ if use server; then
+ cd unix/xserver
+ econf \
+ $(use_enable nptl glx-tls) \
+ $(use_enable opengl glx) \
+ --disable-config-hal \
+ --disable-config-udev \
+ --disable-devel-docs \
+ --disable-dmx \
+ --disable-dri \
+ --disable-dri3 \
+ --disable-kdrive \
+ --disable-selective-werror \
+ --disable-silent-rules \
+ --disable-static \
+ --disable-unit-tests \
+ --disable-xephyr \
+ --disable-xinerama \
+ --disable-xnest \
+ --disable-xorg \
+ --disable-xvfb \
+ --disable-xwin \
+ --enable-dri2 \
+ --with-pic \
+ --without-dtrace \
+ --disable-present \
+ --disable-unit-tests
+ fi
+}
+
+src_compile() {
+ cmake-utils_src_compile
+
+ if use server ; then
+ cd unix/xserver
+ emake
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ newicon "${DISTDIR}"/tigervnc.png vncviewer.png
+ make_desktop_entry vncviewer vncviewer vncviewer Network
+
+ if use server ; then
+ cd unix/xserver/hw/vnc
+ emake DESTDIR="${D}" install
+ ! use xorgmodule && rm -rf "${D}"/usr/$(get_libdir)/xorg
+
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+
+ rm "${D}"/usr/$(get_libdir)/xorg/modules/extensions/libvnc.la
+ else
+ cd "${D}"
+ for f in vncserver vncpasswd x0vncserver vncconfig; do
+ rm usr/bin/$f
+ rm usr/share/man/man1/$f.1
+ done
+ fi
+}
+
+pkg_postinst() {
+ use server && switch_opengl_implem
+}
diff --git a/net-misc/tigervnc/tigervnc-1.3.1-r3.ebuild b/net-misc/tigervnc/tigervnc-1.3.1-r3.ebuild
new file mode 100644
index 000000000000..f626e37d95aa
--- /dev/null
+++ b/net-misc/tigervnc/tigervnc-1.3.1-r3.ebuild
@@ -0,0 +1,202 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils cmake-utils autotools java-pkg-opt-2 flag-o-matic
+
+PATCHVER="0.2"
+XSERVER_VERSION="1.15.0"
+OPENGL_DIR="xorg-x11"
+#MY_P="${PN}-1.2.80-20130314svn5065"
+#S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Remote desktop viewer display system"
+HOMEPAGE="http://www.tigervnc.org"
+SRC_URI="mirror://sourceforge/tigervnc/${P}.tar.gz
+ mirror://gentoo/${PN}.png
+ mirror://gentoo/${PN}-1.3.0-patches-${PATCHVER}.tar.bz2
+ http://dev.gentoo.org/~armin76/dist/${PN}-1.3.0-patches-${PATCHVER}.tar.bz2
+ server? ( ftp://ftp.freedesktop.org/pub/xorg/individual/xserver/xorg-server-${XSERVER_VERSION}.tar.bz2 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
+IUSE="gnutls java nptl +opengl pam server +xorgmodule"
+
+RDEPEND="virtual/jpeg:0
+ sys-libs/zlib
+ >=x11-libs/libXtst-1.0.99.2
+ >=x11-libs/fltk-1.3.1
+ gnutls? ( net-libs/gnutls )
+ java? ( >=virtual/jre-1.5 )
+ pam? ( virtual/pam )
+ server? (
+ dev-lang/perl
+ >=x11-libs/libXi-1.2.99.1
+ >=x11-libs/libXfont-1.4.2
+ >=x11-libs/libxkbfile-1.0.4
+ x11-libs/libXrender
+ >=x11-libs/pixman-0.27.2
+ >=x11-apps/xauth-1.0.3
+ x11-apps/xsetroot
+ >=x11-misc/xkeyboard-config-2.4.1-r3
+ opengl? ( >=app-eselect/eselect-opengl-1.0.8 )
+ xorgmodule? ( =x11-base/xorg-server-${XSERVER_VERSION%.*}* )
+ )
+ !net-misc/vnc
+ !net-misc/tightvnc
+ !net-misc/xf4vnc"
+DEPEND="${RDEPEND}
+ amd64? ( dev-lang/nasm )
+ x86? ( dev-lang/nasm )
+ >=x11-proto/inputproto-2.2.99.1
+ >=x11-proto/xextproto-7.2.99.901
+ >=x11-proto/xproto-7.0.22
+ java? ( >=virtual/jdk-1.5 )
+ server? (
+ virtual/pkgconfig
+ media-fonts/font-util
+ x11-misc/util-macros
+ >=x11-proto/bigreqsproto-1.1.0
+ >=x11-proto/compositeproto-0.4
+ >=x11-proto/damageproto-1.1
+ >=x11-proto/fixesproto-5.0
+ >=x11-proto/fontsproto-2.0.2
+ >=x11-proto/glproto-1.4.17
+ >=x11-proto/randrproto-1.4.0
+ >=x11-proto/renderproto-0.11
+ >=x11-proto/resourceproto-1.2.0
+ >=x11-proto/scrnsaverproto-1.1
+ >=x11-proto/videoproto-2.2.2
+ >=x11-proto/xcmiscproto-1.2.0
+ >=x11-proto/xineramaproto-1.1.3
+ >=x11-libs/xtrans-1.3.2
+ >=x11-proto/dri2proto-2.8
+ opengl? ( >=media-libs/mesa-7.8_rc[nptl=] )
+ )"
+
+CMAKE_IN_SOURCE_BUILD=1
+
+pkg_setup() {
+ if ! use server ; then
+ echo
+ einfo "The 'server' USE flag will build tigervnc's server."
+ einfo "If '-server' is chosen only the client is built to save space."
+ einfo "Stop the build now if you need to add 'server' to USE flags.\n"
+ else
+ ewarn "Forcing on xorg-x11 for new enough glxtokens.h..."
+ OLD_IMPLEM="$(eselect opengl show)"
+ eselect opengl set ${OPENGL_DIR}
+ fi
+}
+
+switch_opengl_implem() {
+ # Switch to the xorg implementation.
+ # Use new opengl-update that will not reset user selected
+ # OpenGL interface ...
+ echo
+ eselect opengl set ${OLD_IMPLEM}
+}
+
+src_prepare() {
+ if use server ; then
+ cp -r "${WORKDIR}"/xorg-server-${XSERVER_VERSION}/* unix/xserver
+ else
+ rm "${WORKDIR}"/patches/*_server_*
+ fi
+
+ EPATCH_SOURCE="${WORKDIR}/patches" EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" epatch
+
+ epatch "${FILESDIR}"/1.3.1-CVE-2014-8240.patch
+
+ if use server ; then
+ cd unix/xserver
+ epatch ../xserver114.patch
+ eautoreconf
+ fi
+}
+
+src_configure() {
+
+ use arm || use hppa && append-flags "-fPIC"
+
+ mycmakeargs=(
+ -G "Unix Makefiles"
+ $(cmake-utils_use_enable gnutls GNUTLS)
+ $(cmake-utils_use_enable pam PAM)
+ $(cmake-utils_use_build java JAVA)
+ )
+
+ cmake-utils_src_configure
+
+ if use server; then
+ cd unix/xserver
+ econf \
+ $(use_enable nptl glx-tls) \
+ $(use_enable opengl glx) \
+ --disable-config-dbus \
+ --disable-config-hal \
+ --disable-config-udev \
+ --disable-devel-docs \
+ --disable-dmx \
+ --disable-dri \
+ --disable-dri3 \
+ --disable-kdrive \
+ --disable-selective-werror \
+ --disable-silent-rules \
+ --disable-static \
+ --disable-unit-tests \
+ --disable-xephyr \
+ --disable-xinerama \
+ --disable-xnest \
+ --disable-xorg \
+ --disable-xvfb \
+ --disable-xwin \
+ --disable-xwayland \
+ --enable-dri2 \
+ --with-pic \
+ --without-dtrace \
+ --disable-present \
+ --disable-unit-tests
+ fi
+}
+
+src_compile() {
+ cmake-utils_src_compile
+
+ if use server ; then
+ cd unix/xserver
+ emake
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ newicon "${DISTDIR}"/tigervnc.png vncviewer.png
+ make_desktop_entry vncviewer vncviewer vncviewer Network
+
+ if use server ; then
+ cd unix/xserver/hw/vnc
+ emake DESTDIR="${D}" install
+ ! use xorgmodule && rm -rf "${D}"/usr/$(get_libdir)/xorg
+
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+
+ rm "${D}"/usr/$(get_libdir)/xorg/modules/extensions/libvnc.la
+ else
+ cd "${D}"
+ for f in vncserver vncpasswd x0vncserver vncconfig; do
+ rm usr/bin/$f
+ rm usr/share/man/man1/$f.1
+ done
+ fi
+}
+
+pkg_postinst() {
+ use server && switch_opengl_implem
+}
diff --git a/net-misc/tigervnc/tigervnc-1.3.1-r4.ebuild b/net-misc/tigervnc/tigervnc-1.3.1-r4.ebuild
new file mode 100644
index 000000000000..374f6fbfc78a
--- /dev/null
+++ b/net-misc/tigervnc/tigervnc-1.3.1-r4.ebuild
@@ -0,0 +1,201 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils cmake-utils autotools java-pkg-opt-2 flag-o-matic
+
+PATCHVER="0.1"
+XSERVER_VERSION="1.16.0"
+OPENGL_DIR="xorg-x11"
+#MY_P="${PN}-1.2.80-20130314svn5065"
+#S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Remote desktop viewer display system"
+HOMEPAGE="http://www.tigervnc.org"
+SRC_URI="mirror://sourceforge/tigervnc/${P}.tar.gz
+ mirror://gentoo/${PN}.png
+ mirror://gentoo/${PN}-1.3.1-patches-${PATCHVER}.tar.bz2
+ http://dev.gentoo.org/~armin76/dist/${PN}-1.3.1-patches-${PATCHVER}.tar.bz2
+ server? ( ftp://ftp.freedesktop.org/pub/xorg/individual/xserver/xorg-server-${XSERVER_VERSION}.tar.bz2 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86"
+IUSE="gnutls java nptl +opengl pam server +xorgmodule"
+
+RDEPEND="virtual/jpeg:0
+ sys-libs/zlib
+ >=x11-libs/libXtst-1.0.99.2
+ >=x11-libs/fltk-1.3.1
+ gnutls? ( net-libs/gnutls )
+ java? ( >=virtual/jre-1.5 )
+ pam? ( virtual/pam )
+ server? (
+ dev-lang/perl
+ >=x11-libs/libXi-1.2.99.1
+ >=x11-libs/libXfont-1.4.2
+ >=x11-libs/libxkbfile-1.0.4
+ x11-libs/libXrender
+ >=x11-libs/pixman-0.27.2
+ >=x11-apps/xauth-1.0.3
+ x11-apps/xsetroot
+ >=x11-misc/xkeyboard-config-2.4.1-r3
+ opengl? ( >=app-eselect/eselect-opengl-1.0.8 )
+ xorgmodule? ( =x11-base/xorg-server-${XSERVER_VERSION%.*}* )
+ )
+ !net-misc/vnc
+ !net-misc/tightvnc
+ !net-misc/xf4vnc"
+DEPEND="${RDEPEND}
+ amd64? ( dev-lang/nasm )
+ x86? ( dev-lang/nasm )
+ >=x11-proto/inputproto-2.2.99.1
+ >=x11-proto/xextproto-7.2.99.901
+ >=x11-proto/xproto-7.0.26
+ java? ( >=virtual/jdk-1.5 )
+ server? (
+ virtual/pkgconfig
+ media-fonts/font-util
+ x11-misc/util-macros
+ >=x11-proto/bigreqsproto-1.1.0
+ >=x11-proto/compositeproto-0.4
+ >=x11-proto/damageproto-1.1
+ >=x11-proto/fixesproto-5.0
+ >=x11-proto/fontsproto-2.1.3
+ >=x11-proto/glproto-1.4.17
+ >=x11-proto/randrproto-1.4.0
+ >=x11-proto/renderproto-0.11
+ >=x11-proto/resourceproto-1.2.0
+ >=x11-proto/scrnsaverproto-1.1
+ >=x11-proto/videoproto-2.2.2
+ >=x11-proto/xcmiscproto-1.2.0
+ >=x11-proto/xineramaproto-1.1.3
+ >=x11-libs/xtrans-1.3.3
+ >=x11-proto/dri2proto-2.8
+ opengl? ( >=media-libs/mesa-7.8_rc[nptl=] )
+ )"
+
+CMAKE_IN_SOURCE_BUILD=1
+
+pkg_setup() {
+ if ! use server ; then
+ echo
+ einfo "The 'server' USE flag will build tigervnc's server."
+ einfo "If '-server' is chosen only the client is built to save space."
+ einfo "Stop the build now if you need to add 'server' to USE flags.\n"
+ else
+ ewarn "Forcing on xorg-x11 for new enough glxtokens.h..."
+ OLD_IMPLEM="$(eselect opengl show)"
+ eselect opengl set ${OPENGL_DIR}
+ fi
+}
+
+switch_opengl_implem() {
+ # Switch to the xorg implementation.
+ # Use new opengl-update that will not reset user selected
+ # OpenGL interface ...
+ echo
+ eselect opengl set ${OLD_IMPLEM}
+}
+
+src_prepare() {
+ if use server ; then
+ cp -r "${WORKDIR}"/xorg-server-${XSERVER_VERSION}/* unix/xserver
+ else
+ rm "${WORKDIR}"/patches/*_server_*
+ fi
+
+ EPATCH_SOURCE="${WORKDIR}/patches" EPATCH_SUFFIX="patch" EPATCH_EXCLUDE="*999*" \
+ EPATCH_FORCE="yes" epatch
+
+ epatch "${FILESDIR}"/1.3.1-CVE-2014-8240.patch
+
+ if use server ; then
+ cd unix/xserver
+ epatch "${WORKDIR}"/patches/0999_server_xserver-1.14-rebased.patch
+ eautoreconf
+ fi
+}
+
+src_configure() {
+
+ use arm || use hppa && append-flags "-fPIC"
+
+ mycmakeargs=(
+ -G "Unix Makefiles"
+ $(cmake-utils_use_enable gnutls GNUTLS)
+ $(cmake-utils_use_enable pam PAM)
+ $(cmake-utils_use_build java JAVA)
+ )
+
+ cmake-utils_src_configure
+
+ if use server; then
+ cd unix/xserver
+ econf \
+ $(use_enable nptl glx-tls) \
+ $(use_enable opengl glx) \
+ --disable-config-hal \
+ --disable-config-udev \
+ --disable-devel-docs \
+ --disable-dmx \
+ --disable-dri \
+ --disable-dri3 \
+ --disable-kdrive \
+ --disable-selective-werror \
+ --disable-silent-rules \
+ --disable-static \
+ --disable-unit-tests \
+ --disable-xephyr \
+ --disable-xinerama \
+ --disable-xnest \
+ --disable-xorg \
+ --disable-xvfb \
+ --disable-xwin \
+ --disable-xwayland \
+ --enable-dri2 \
+ --with-pic \
+ --without-dtrace \
+ --disable-present \
+ --disable-unit-tests
+ fi
+}
+
+src_compile() {
+ cmake-utils_src_compile
+
+ if use server ; then
+ cd unix/xserver
+ emake
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ newicon "${DISTDIR}"/tigervnc.png vncviewer.png
+ make_desktop_entry vncviewer vncviewer vncviewer Network
+
+ if use server ; then
+ cd unix/xserver/hw/vnc
+ emake DESTDIR="${D}" install
+ ! use xorgmodule && rm -rf "${D}"/usr/$(get_libdir)/xorg
+
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+
+ rm "${D}"/usr/$(get_libdir)/xorg/modules/extensions/libvnc.la
+ else
+ cd "${D}"
+ for f in vncserver vncpasswd x0vncserver vncconfig; do
+ rm usr/bin/$f
+ rm usr/share/man/man1/$f.1
+ done
+ fi
+}
+
+pkg_postinst() {
+ use server && switch_opengl_implem
+}
diff --git a/net-misc/tigervnc/tigervnc-1.4.2-r1.ebuild b/net-misc/tigervnc/tigervnc-1.4.2-r1.ebuild
new file mode 100644
index 000000000000..2630ede3f986
--- /dev/null
+++ b/net-misc/tigervnc/tigervnc-1.4.2-r1.ebuild
@@ -0,0 +1,199 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils cmake-utils autotools java-pkg-opt-2 flag-o-matic
+
+PATCHVER="0.1"
+XSERVER_VERSION="1.16.4"
+OPENGL_DIR="xorg-x11"
+#MY_P="${PN}-1.2.80-20130314svn5065"
+#S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Remote desktop viewer display system"
+HOMEPAGE="http://www.tigervnc.org"
+SRC_URI="https://github.com/TigerVNC/tigervnc/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ mirror://gentoo/${PN}.png
+ mirror://gentoo/${P}-patches-${PATCHVER}.tar.bz2
+ http://dev.gentoo.org/~armin76/dist/${P}-patches-${PATCHVER}.tar.bz2
+ server? ( ftp://ftp.freedesktop.org/pub/xorg/individual/xserver/xorg-server-${XSERVER_VERSION}.tar.bz2 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
+IUSE="gnutls java nptl +opengl pam server +xorgmodule"
+
+RDEPEND="virtual/jpeg:0
+ sys-libs/zlib
+ >=x11-libs/libXtst-1.0.99.2
+ >=x11-libs/fltk-1.3.1
+ gnutls? ( net-libs/gnutls )
+ java? ( >=virtual/jre-1.5 )
+ pam? ( virtual/pam )
+ server? (
+ dev-lang/perl
+ >=x11-libs/libXi-1.2.99.1
+ >=x11-libs/libXfont-1.4.2
+ >=x11-libs/libxkbfile-1.0.4
+ x11-libs/libXrender
+ >=x11-libs/pixman-0.27.2
+ >=x11-apps/xauth-1.0.3
+ x11-apps/xsetroot
+ >=x11-misc/xkeyboard-config-2.4.1-r3
+ opengl? ( >=app-eselect/eselect-opengl-1.0.8 )
+ xorgmodule? ( =x11-base/xorg-server-${XSERVER_VERSION%.*}* )
+ )
+ !net-misc/vnc
+ !net-misc/tightvnc
+ !net-misc/xf4vnc"
+DEPEND="${RDEPEND}
+ amd64? ( dev-lang/nasm )
+ x86? ( dev-lang/nasm )
+ >=x11-proto/inputproto-2.2.99.1
+ >=x11-proto/xextproto-7.2.99.901
+ >=x11-proto/xproto-7.0.26
+ java? ( >=virtual/jdk-1.5 )
+ server? (
+ virtual/pkgconfig
+ media-fonts/font-util
+ x11-misc/util-macros
+ >=x11-proto/bigreqsproto-1.1.0
+ >=x11-proto/compositeproto-0.4
+ >=x11-proto/damageproto-1.1
+ >=x11-proto/fixesproto-5.0
+ >=x11-proto/fontsproto-2.1.3
+ >=x11-proto/glproto-1.4.17
+ >=x11-proto/randrproto-1.4.0
+ >=x11-proto/renderproto-0.11
+ >=x11-proto/resourceproto-1.2.0
+ >=x11-proto/scrnsaverproto-1.1
+ >=x11-proto/videoproto-2.2.2
+ >=x11-proto/xcmiscproto-1.2.0
+ >=x11-proto/xineramaproto-1.1.3
+ >=x11-libs/xtrans-1.3.3
+ >=x11-proto/dri2proto-2.8
+ opengl? ( >=media-libs/mesa-7.8_rc[nptl=] )
+ )"
+
+CMAKE_IN_SOURCE_BUILD=1
+
+pkg_setup() {
+ if ! use server ; then
+ echo
+ einfo "The 'server' USE flag will build tigervnc's server."
+ einfo "If '-server' is chosen only the client is built to save space."
+ einfo "Stop the build now if you need to add 'server' to USE flags.\n"
+ else
+ ewarn "Forcing on xorg-x11 for new enough glxtokens.h..."
+ OLD_IMPLEM="$(eselect opengl show)"
+ eselect opengl set ${OPENGL_DIR}
+ fi
+}
+
+switch_opengl_implem() {
+ # Switch to the xorg implementation.
+ # Use new opengl-update that will not reset user selected
+ # OpenGL interface ...
+ echo
+ eselect opengl set ${OLD_IMPLEM}
+}
+
+src_prepare() {
+ if use server ; then
+ cp -r "${WORKDIR}"/xorg-server-${XSERVER_VERSION}/* unix/xserver
+ else
+ rm "${WORKDIR}"/patches/*_server_*
+ fi
+
+ EPATCH_SOURCE="${WORKDIR}/patches" EPATCH_SUFFIX="patch" EPATCH_EXCLUDE="*100*" \
+ EPATCH_FORCE="yes" epatch
+
+ if use server ; then
+ cd unix/xserver
+ epatch "${WORKDIR}"/patches/1000_server_xserver-1.16-rebased.patch
+ eautoreconf
+ fi
+}
+
+src_configure() {
+
+ use arm || use hppa && append-flags "-fPIC"
+
+ mycmakeargs=(
+ -G "Unix Makefiles"
+ $(cmake-utils_use_enable gnutls GNUTLS)
+ $(cmake-utils_use_enable pam PAM)
+ $(cmake-utils_use_build java JAVA)
+ )
+
+ cmake-utils_src_configure
+
+ if use server; then
+ cd unix/xserver
+ econf \
+ $(use_enable nptl glx-tls) \
+ $(use_enable opengl glx) \
+ --disable-config-hal \
+ --disable-config-udev \
+ --disable-devel-docs \
+ --disable-dmx \
+ --disable-dri \
+ --disable-dri3 \
+ --disable-kdrive \
+ --disable-selective-werror \
+ --disable-silent-rules \
+ --disable-static \
+ --disable-unit-tests \
+ --disable-xephyr \
+ --disable-xinerama \
+ --disable-xnest \
+ --disable-xorg \
+ --disable-xvfb \
+ --disable-xwin \
+ --disable-xwayland \
+ --enable-dri2 \
+ --with-pic \
+ --without-dtrace \
+ --disable-present \
+ --disable-unit-tests
+ fi
+}
+
+src_compile() {
+ cmake-utils_src_compile
+
+ if use server ; then
+ cd unix/xserver
+ emake
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ newicon "${DISTDIR}"/tigervnc.png vncviewer.png
+ make_desktop_entry vncviewer vncviewer vncviewer Network
+
+ if use server ; then
+ cd unix/xserver/hw/vnc
+ emake DESTDIR="${D}" install
+ ! use xorgmodule && rm -rf "${D}"/usr/$(get_libdir)/xorg
+
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+
+ rm "${D}"/usr/$(get_libdir)/xorg/modules/extensions/libvnc.la
+ else
+ cd "${D}"
+ for f in vncserver vncpasswd x0vncserver vncconfig; do
+ rm usr/bin/$f
+ rm usr/share/man/man1/$f.1
+ done
+ fi
+}
+
+pkg_postinst() {
+ use server && switch_opengl_implem
+}
diff --git a/net-misc/tigervnc/tigervnc-1.4.2-r2.ebuild b/net-misc/tigervnc/tigervnc-1.4.2-r2.ebuild
new file mode 100644
index 000000000000..dbd234b1a1ea
--- /dev/null
+++ b/net-misc/tigervnc/tigervnc-1.4.2-r2.ebuild
@@ -0,0 +1,200 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils cmake-utils autotools java-pkg-opt-2 flag-o-matic
+
+PATCHVER="0.1"
+XSERVER_VERSION="1.17.1"
+OPENGL_DIR="xorg-x11"
+#MY_P="${PN}-1.2.80-20130314svn5065"
+#S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Remote desktop viewer display system"
+HOMEPAGE="http://www.tigervnc.org"
+SRC_URI="https://github.com/TigerVNC/tigervnc/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ mirror://gentoo/${PN}.png
+ mirror://gentoo/${P}-patches-${PATCHVER}.tar.bz2
+ http://dev.gentoo.org/~armin76/dist/${P}-patches-${PATCHVER}.tar.bz2
+ server? ( ftp://ftp.freedesktop.org/pub/xorg/individual/xserver/xorg-server-${XSERVER_VERSION}.tar.bz2 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
+IUSE="gnutls java nptl +opengl pam server +xorgmodule"
+
+RDEPEND="virtual/jpeg:0
+ sys-libs/zlib
+ >=x11-libs/libXtst-1.0.99.2
+ >=x11-libs/fltk-1.3.1
+ gnutls? ( net-libs/gnutls )
+ java? ( >=virtual/jre-1.5 )
+ pam? ( virtual/pam )
+ server? (
+ dev-lang/perl
+ >=x11-libs/libXi-1.2.99.1
+ >=x11-libs/libXfont-1.4.2
+ >=x11-libs/libxkbfile-1.0.4
+ x11-libs/libXrender
+ >=x11-libs/pixman-0.27.2
+ >=x11-apps/xauth-1.0.3
+ x11-apps/xsetroot
+ >=x11-misc/xkeyboard-config-2.4.1-r3
+ opengl? ( >=app-eselect/eselect-opengl-1.0.8 )
+ xorgmodule? ( =x11-base/xorg-server-${XSERVER_VERSION%.*}* )
+ )
+ !net-misc/vnc
+ !net-misc/tightvnc
+ !net-misc/xf4vnc"
+DEPEND="${RDEPEND}
+ amd64? ( dev-lang/nasm )
+ x86? ( dev-lang/nasm )
+ >=x11-proto/inputproto-2.2.99.1
+ >=x11-proto/xextproto-7.2.99.901
+ >=x11-proto/xproto-7.0.26
+ java? ( >=virtual/jdk-1.5 )
+ server? (
+ virtual/pkgconfig
+ media-fonts/font-util
+ x11-misc/util-macros
+ >=x11-proto/bigreqsproto-1.1.0
+ >=x11-proto/compositeproto-0.4
+ >=x11-proto/damageproto-1.1
+ >=x11-proto/fixesproto-5.0
+ >=x11-proto/fontsproto-2.1.3
+ >=x11-proto/glproto-1.4.17
+ >=x11-proto/randrproto-1.4.0
+ >=x11-proto/renderproto-0.11
+ >=x11-proto/resourceproto-1.2.0
+ >=x11-proto/scrnsaverproto-1.1
+ >=x11-proto/videoproto-2.2.2
+ >=x11-proto/xcmiscproto-1.2.0
+ >=x11-proto/xineramaproto-1.1.3
+ >=x11-libs/xtrans-1.3.3
+ >=x11-proto/dri2proto-2.8
+ opengl? ( >=media-libs/mesa-7.8_rc[nptl=] )
+ )"
+
+CMAKE_IN_SOURCE_BUILD=1
+
+pkg_setup() {
+ if ! use server ; then
+ echo
+ einfo "The 'server' USE flag will build tigervnc's server."
+ einfo "If '-server' is chosen only the client is built to save space."
+ einfo "Stop the build now if you need to add 'server' to USE flags.\n"
+ else
+ ewarn "Forcing on xorg-x11 for new enough glxtokens.h..."
+ OLD_IMPLEM="$(eselect opengl show)"
+ eselect opengl set ${OPENGL_DIR}
+ fi
+}
+
+switch_opengl_implem() {
+ # Switch to the xorg implementation.
+ # Use new opengl-update that will not reset user selected
+ # OpenGL interface ...
+ echo
+ eselect opengl set ${OLD_IMPLEM}
+}
+
+src_prepare() {
+ if use server ; then
+ cp -r "${WORKDIR}"/xorg-server-${XSERVER_VERSION}/* unix/xserver
+ else
+ rm "${WORKDIR}"/patches/*_server_*
+ fi
+
+ EPATCH_SOURCE="${WORKDIR}/patches" EPATCH_SUFFIX="patch" EPATCH_EXCLUDE="*100*" \
+ EPATCH_FORCE="yes" epatch
+
+ if use server ; then
+ cd unix/xserver
+ epatch "${WORKDIR}"/patches/1000_server_xserver-1.16-rebased.patch
+ epatch "${WORKDIR}"/patches/1005_server_xserver-1.17.patch
+ eautoreconf
+ fi
+}
+
+src_configure() {
+
+ use arm || use hppa && append-flags "-fPIC"
+
+ mycmakeargs=(
+ -G "Unix Makefiles"
+ $(cmake-utils_use_enable gnutls GNUTLS)
+ $(cmake-utils_use_enable pam PAM)
+ $(cmake-utils_use_build java JAVA)
+ )
+
+ cmake-utils_src_configure
+
+ if use server; then
+ cd unix/xserver
+ econf \
+ $(use_enable nptl glx-tls) \
+ $(use_enable opengl glx) \
+ --disable-config-hal \
+ --disable-config-udev \
+ --disable-devel-docs \
+ --disable-dmx \
+ --disable-dri \
+ --disable-dri3 \
+ --disable-kdrive \
+ --disable-selective-werror \
+ --disable-silent-rules \
+ --disable-static \
+ --disable-unit-tests \
+ --disable-xephyr \
+ --disable-xinerama \
+ --disable-xnest \
+ --disable-xorg \
+ --disable-xvfb \
+ --disable-xwin \
+ --disable-xwayland \
+ --enable-dri2 \
+ --with-pic \
+ --without-dtrace \
+ --disable-present \
+ --disable-unit-tests
+ fi
+}
+
+src_compile() {
+ cmake-utils_src_compile
+
+ if use server ; then
+ cd unix/xserver
+ emake
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ newicon "${DISTDIR}"/tigervnc.png vncviewer.png
+ make_desktop_entry vncviewer vncviewer vncviewer Network
+
+ if use server ; then
+ cd unix/xserver/hw/vnc
+ emake DESTDIR="${D}" install
+ ! use xorgmodule && rm -rf "${D}"/usr/$(get_libdir)/xorg
+
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+
+ rm "${D}"/usr/$(get_libdir)/xorg/modules/extensions/libvnc.la
+ else
+ cd "${D}"
+ for f in vncserver vncpasswd x0vncserver vncconfig; do
+ rm usr/bin/$f
+ rm usr/share/man/man1/$f.1
+ done
+ fi
+}
+
+pkg_postinst() {
+ use server && switch_opengl_implem
+}
diff --git a/net-misc/tightvnc/Manifest b/net-misc/tightvnc/Manifest
new file mode 100644
index 000000000000..12a4c204fe1b
--- /dev/null
+++ b/net-misc/tightvnc/Manifest
@@ -0,0 +1,3 @@
+DIST tightvnc-1.3.10_javasrc.tar.gz 89641 SHA256 465a6c90d362029152ea16d0b8e2c29f772b06eeec6c561278390f73d64ec6ec SHA512 e33366b45f06b6522dce79e2f43bc4d7ffa00577f7a1a56026f9e869de7e61838093fdc7e9c4dace326652d9416c2267f6d211ac639095ffd1c4ba38dddb8851 WHIRLPOOL 8ba7a6545a105687989f469400d0d76d68e6a1f33462cf4aa725282d8c6c5ebd01a2c0f269dbd924a9272af81423321a85be8b24abf484962d990b21138d3451
+DIST tightvnc-1.3.10_unixsrc.tar.bz2 1780510 SHA256 f48c70fea08d03744ae18df6b1499976362f16934eda3275cead87baad585c0d SHA512 b5b3d5d532feffc07db2d48d3416e1a0d1b1b15bdb8ff801ed42042d4b99f34365e10e3b005bc15cc6e0a33c429db8976c227a1854e1af5e10bcb60e17a69b87 WHIRLPOOL 3ede45e5e480c93384d331f80beefac723925014cf29f94b4b12c3ce6d78daca38ff7f4279411db76c83dca0ab1733310b877836e55a5f2084e826dbabbe1d23
+DIST tightvnc.png 495 SHA256 dfe4eaf3f68a4905b3ab90e7cae528449c7d13a4f712f97d8855058ed9cc3fc4 SHA512 a05f8cabdae9625718d1f9cb52c0893c4a3cd784cb074dee51b68bc617eb59759a4e8849113a4b385dfcea9d3e3b099adb564a6655d6b7f4c5cc87e275714065 WHIRLPOOL 152fcb14f72a2907d3a0751f478033a3c3d0d9a73f6aa371315cd76d73ccda32c4e62bf005828ccb19926d813bb9f65cc8cd27575bf63ebb280377b4412ffea9
diff --git a/net-misc/tightvnc/files/1.3.10-sparc.patch b/net-misc/tightvnc/files/1.3.10-sparc.patch
new file mode 100644
index 000000000000..26b7bddae75b
--- /dev/null
+++ b/net-misc/tightvnc/files/1.3.10-sparc.patch
@@ -0,0 +1,24 @@
+diff -ur vnc_unixsrc.orig/Xvnc/programs/Xserver/include/servermd.h vnc_unixsrc/Xvnc/programs/Xserver/include/servermd.h
+--- vnc_unixsrc.orig/Xvnc/programs/Xserver/include/servermd.h 2009-11-04 18:44:50.000000000 +0000
++++ vnc_unixsrc/Xvnc/programs/Xserver/include/servermd.h 2009-11-04 18:47:48.000000000 +0000
+@@ -421,6 +421,20 @@
+
+ #endif /* Linux/PPC */
+
++#if defined (linux) && defined(__sparc__)
++
++#define IMAGE_BYTE_ORDER MSBFirst
++#define BITMAP_BIT_ORDER MSBFirst
++#define GLYPHPADBYTES 4
++#define GETLEFTBITS_ALIGNMENT 1
++
++#define AVOID_MEMORY_READ
++#define LARGE_INSTRUCTION_CACHE
++#define FAST_CONSTANT_OFFSET_MODE
++#define SHARED_IDCACHE
++
++#endif /* Linux/sparc */
++
+ #if defined(__MACH__) && defined(__POWERPC__)
+
+ #define IMAGE_BYTE_ORDER MSBFirst \ No newline at end of file
diff --git a/net-misc/tightvnc/files/1.3.9-arm.patch b/net-misc/tightvnc/files/1.3.9-arm.patch
new file mode 100644
index 000000000000..a238e29379c6
--- /dev/null
+++ b/net-misc/tightvnc/files/1.3.9-arm.patch
@@ -0,0 +1,12 @@
+diff -ur vnc_unixsrc.orig/Xvnc/config/cf/Imake.cf vnc_unixsrc/Xvnc/config/cf/Imake.cf
+--- vnc_unixsrc.orig/Xvnc/config/cf/Imake.cf 2008-09-24 18:50:40.000000000 +0200
++++ vnc_unixsrc/Xvnc/config/cf/Imake.cf 2008-09-24 18:51:37.000000000 +0200
+@@ -711,7 +711,7 @@
+ # undef __alpha__
+ # endif /* __alpha__ */
+ # ifdef __arm__
+-# define Arm32Architecture
++# define ArmArchitecture
+ # undef arm
+ # undef __arm
+ # undef __arm__
diff --git a/net-misc/tightvnc/files/1.3.9-fbsd.patch b/net-misc/tightvnc/files/1.3.9-fbsd.patch
new file mode 100644
index 000000000000..bc527a802aed
--- /dev/null
+++ b/net-misc/tightvnc/files/1.3.9-fbsd.patch
@@ -0,0 +1,29 @@
+--- Xvnc/include/Xos.bak 2007-03-23 18:26:14 +0100
++++ Xvnc/include/Xos.h 2007-03-23 18:26:22 +0100
+@@ -150,11 +150,6 @@
+ #endif
+ #endif /* X_NOT_POSIX else */
+
+-#ifdef CSRG_BASED
+-#include <stdlib.h>
+-#include <unistd.h>
+-#endif /* CSRG_BASED */
+-
+ /*
+ * Get struct timeval
+ */
+
+--- Xvnc/config/imake/imakemdep.h~ 2003-02-19 09:39:54 -0700
++++ Xvnc/config/imake/imakemdep.h 2007-06-27 09:54:44 -0600
+@@ -253,7 +253,10 @@
+ #ifdef _CRAY
+ #define DEFAULT_CPP "/lib/pcpp"
+ #endif
+-#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
++#if defined(__FreeBSD__)
++#define DEFAULT_CPP "/usr/bin/cpp"
++#endif
++#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ #define DEFAULT_CPP "/usr/libexec/cpp"
+ #endif
+ #if defined(__sgi) && defined(__ANSI_CPP__)
diff --git a/net-misc/tightvnc/files/1.3.9-sh.patch b/net-misc/tightvnc/files/1.3.9-sh.patch
new file mode 100644
index 000000000000..db76917f4e42
--- /dev/null
+++ b/net-misc/tightvnc/files/1.3.9-sh.patch
@@ -0,0 +1,28 @@
+diff -ur vnc_unixsrc.orig/Xvnc/config/cf/linux.cf vnc_unixsrc/Xvnc/config/cf/linux.cf
+--- vnc_unixsrc.orig/Xvnc/config/cf/linux.cf 2009-01-01 11:41:14.000000000 +0100
++++ vnc_unixsrc/Xvnc/config/cf/linux.cf 2009-01-01 11:44:08.000000000 +0100
+@@ -43,7 +43,8 @@
+ #if defined(AlphaArchitecture) || defined(PowerPCArchitecture) || \
+ defined(SparcArchitecture) || defined(ArmArchitecure) || \
+ defined(i386Architecture) || defined(s390Architecture) || \
+- defined(s390xArchitecture) || defined(MipsArchitecture)
++ defined(s390xArchitecture) || defined(MipsArchitecture) || \
++ defined(SuperHArchitecture)
+ #define DefaultLinuxCLibMajorVersion 6
+ #else
+ #define DefaultLinuxCLibMajorVersion 5
+@@ -312,6 +313,14 @@
+ #define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
+ #endif /* Arm */
+
++#ifdef SuperHArchitecture
++#define DefaultCCOptions -fsigned-char
++#define OptimizedCDebugFlags -O2
++#define LinuxMachineDefines -D__sh__
++#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
++#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
++#endif /* SuperH */
++
+ #ifdef SparcArchitecture
+ #define OptimizedCDebugFlags -O2
+ #define LinuxMachineDefines -D__sparc__ \ No newline at end of file
diff --git a/net-misc/tightvnc/files/README.JavaViewer b/net-misc/tightvnc/files/README.JavaViewer
new file mode 100644
index 000000000000..acb96bd9c064
--- /dev/null
+++ b/net-misc/tightvnc/files/README.JavaViewer
@@ -0,0 +1,423 @@
+
+TightVNC Java Viewer version 1.2.7
+==================================
+
+Copyright (C) 2001,2002 HorizonLive.com, Inc. All Rights Reserved.
+Copyright (C) 2001,2002 Constantin Kaplinsky. All Rights Reserved.
+Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
+
+This software is distributed under the GNU General Public Licence as
+published by the Free Software Foundation. See the file LICENCE.TXT for the
+conditions under which this software is made available. TightVNC also
+contains code from other sources. See the Acknowledgements section below, and
+the individual files for details of the conditions under which they are made
+available.
+
+
+Compiling from the sources
+==========================
+
+To compile all the .java files to .class files, simply do:
+
+ % make all
+
+This will also generate a JAR (Java archive) file containing all the classes.
+Most JVM (Java Virtual Machine) implementations are able to use either a set
+of .class files, or the JAR archive.
+
+
+Installation
+============
+
+There are three basic ways to use TightVNC Java viewer:
+
+ 1. Running applet as part of TightVNC server installation.
+
+ Both the Unix and Windows versions of TightVNC servers include small
+ built-in HTTP server which can serve Java viewer to Web clients. This
+ enables easy Web access to the shared desktop without need to install
+ any software on the client computer. Unix and Windows versions of
+ TightVNC servers are different in the way they store the .class and .jar
+ files: the Unix server (Xvnc) is able to serve any set of files present
+ in a particular directory, while the Windows server (WinVNC) has all the
+ .class and .jar files inside the WinVNC executable file. Therefore, for
+ Xvnc, it's enough to copy the files into a correct directory, but for
+ WinVNC, the server binaries should be rebuild if the built-in Java
+ viewer should be updated.
+
+ To install the Java viewer under Xvnc, copy all the .class files, the
+ .jar file and the .vnc files to an installation directory (e.g.
+ /usr/local/vnc/classes):
+
+ cp *.class *.jar *.vnc /usr/local/vnc/classes
+
+ Also, make sure that the vncserver script is configured to point to the
+ installation directory (see the Xvnc manual page for the description of
+ the -httpd command-line option).
+
+ 2. Running applet hosted on a standalone Web server.
+
+ Another possibility to use the Java viewer is to install it under a
+ fully-functional HTTP server such as Apache or IIS. Obviously, this
+ method requires running an HTTP server, and due to the Java security
+ restrictions, it's also required that the server should be installed on
+ the same machine which is running the TightVNC server. In this case,
+ installation is simply copying the .class and .jar files into a
+ directory that is under control of the HTTP server. Also, an HTML page
+ should be created which will act as a the base document for the viewer
+ applet (see an example named index.html in this distribution).
+
+ 3. Running the viewer as a standalone application.
+
+ Finally, the Java viewer can be executed locally on the client machine,
+ but this method requires installation of either JRE (Java Runtime
+ Environment) or JDK (Java Development Kit). If all the .class files are
+ in the current directory, the Java viewer can be executed like this,
+ from the command line:
+
+ java VncViewer HOST vnchost PORT 5900
+
+ The parameters HOST and PORT are required, but there is a number of
+ optional parameters as well (see the Parameters section below).
+
+Parameters
+==========
+
+TightVNC Java viewer supports a number of parameters allowing you to
+customize its behaviour. Most parameter names copy settings available from
+the Options frame in the Java viewer. Both parameter names and their values
+are case-insensitive, with one exception for the "PASSWORD" parameter. Here
+is the full list of parameters supported in TightVNC Java viewer:
+
+--> "HOST" (no GUI equivalent)
+
+ Value: host name or IP address of the VNC server.
+ Default: in applet mode, the host from which the applet was loaded.
+
+ This parameter tells the viewer which server to connect to. Normally,
+ it's not needed, because default Java security policy allow connections
+ from applets to the only one host anyway, and that is the host from which
+ the applet was loaded.
+
+--> "PORT" (no GUI equivalent)
+
+ Value: TCP port number on the VNC server.
+ Default: none.
+
+ This parameter is required in all cases. Note that this port is not the
+ one used for HTTP connection from the browser, it is the port used for
+ RFB connection. Usually, VNC servers use ports 58xx for HTTP connections,
+ and ports 59xx for RFB connections. Thus, most likely, this parameter
+ should be set to something like 5900, 5901 etc.
+
+--> "PASSWORD"
+
+ Value: session password in plan text.
+ Default: none, ask user.
+
+ DO NOT EVER USE THIS PARAMETER, unless you really know what you are
+ doing. It's extremely dangerous from the security point of view. When
+ this parameter is set, the viewer won't ever ask for a password.
+
+--> "ENCPASSWORD"
+
+ Value: encrypted session password in hex-ascii.
+ Default: none, ask user.
+
+ The same as the "PASSWORD" parameter but DES-encrypted using a fixed key.
+ Its value should be represented in hex-ascii e.g. "494015f9a35e8b22".
+ This parameter has higher priority over the "PASSWORD" parameter. DO NOT
+ EVER USE THIS PARAMETER, unless you really know what you are doing. It's
+ extremely dangerous from the security point of view, and encryption does
+ not actually help here since the decryption key is always known.
+
+--> "Encoding"
+
+ Values: "Raw", "RRE", "CoRRE", "Hextile", "Zlib", "Tight".
+ Default: "Tight".
+
+ The preferred encoding. "Hextile" is a good choice for fast networks,
+ while "Tight" is better suited for low-bandwidth connections. From the
+ other side, the "Tight" decoder in TightVNC Java viewer seems to be more
+ efficient than "Hextile" decoder so it's possible that this default
+ setting can be ok for fast networks too.
+
+--> "Compression level"
+
+ Values: "Default", "1", "2", "3", "4", "5", "6", "7", "8", "9".
+ Default: "Default". ;-)
+
+ Use specified compression level for "Tight" and "Zlib" encodings. Level 1
+ uses minimum of CPU time on the server but achieves weak compression
+ ratios. Level 9 offers best compression but may be slow in terms of CPU
+ time consumption on the server side. Use high levels with very slow
+ network connections, and low levels when working over higher-speed
+ networks. The "Default" value means that the server's default compression
+ level should be used.
+
+--> "JPEG image quality"
+
+ Values: "JPEG off", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9".
+ Default: "6".
+
+ Use the specified image quality level in "Tight" encoding. Quality level
+ 0 denotes bad image quality but very impressive compression ratios, while
+ level 9 offers very good image quality at lower compression ratios. If
+ the value is "JPEG off", the server will not use lossy JPEG compression
+ in "Tight" encoding.
+
+--> "Cursor shape updates"
+
+ Values: "Enable", "Ignore", "Disable".
+ Default: "Enable".
+
+ Cursor shape updates is a protocol extension used to handle remote cursor
+ movements locally on the client side, saving bandwidth and eliminating
+ delays in mouse pointer movement. Note that current implementation of
+ cursor shape updates does not allow a client to track mouse cursor
+ position at the server side. This means that clients would not see mouse
+ cursor movements if mouse was moved either locally on the server, or by
+ another remote VNC client. Set this parameter to "Disable" if you always
+ want to see real cursor position on the remote side. Setting this option
+ to "Ignore" is similar to "Enable" but the remote cursor will not be
+ visible at all. This can be a reasonable setting if you don't care about
+ cursor shape and don't want to see two mouse cursors, one above another.
+
+--> "Use CopyRect"
+
+ Values: "Yes", "No".
+ Default: "Yes".
+
+ The "CopyRect" encoding saves bandwidth and drawing time when parts of
+ the remote screen are moving around. Most likely, you don't want to
+ change this setting.
+
+--> "Restricted colors"
+
+ Values: "Yes", "No".
+ Default: "No".
+
+ If set to "No", then 24-bit color format is used to represent pixel data.
+ If set to "Yes", then only 8 bits are used to represent each pixel. 8-bit
+ color format can save bandwidth, but colors may look very inaccurate.
+
+--> "Mouse buttons 2 and 3"
+
+ Values: "Normal", "Reversed".
+ Default: "Normal".
+
+ If set to "Reversed", then right mouse button (button 2) will act as it
+ was middle mouse button (button 3), and vice versa.
+
+--> "View only"
+
+ Values: "Yes", "No".
+ Default: "No".
+
+ If set to "Yes", then all keyboard and mouse events in the desktop window
+ will be silently ignored and will not be passed to the remote side.
+
+--> "Share desktop"
+
+ Values: "Yes", "No".
+ Default: "Yes".
+
+ Share the connection with other clients on the same VNC server. The exact
+ behaviour in each case depends on the server configuration.
+
+--> "Open new window" (no GUI equivalent, applicable only in the applet mode)
+
+ Values: "Yes", "No".
+ Default: "No".
+
+ Operate in a separate window. This makes possible resizing the desktop,
+ and adds scroll bars when necessary. If the server supports variable
+ desktop size, the window will resize automatically when remote desktop
+ size changes.
+
+--> "Show controls" (no GUI equivalent)
+
+ Values: "Yes", "No".
+ Default: "Yes".
+
+ Set to "No" if you want to get rid of that button panel at the top.
+
+--> "Offer relogin" (no GUI equivalent, not applicable in the applet mode)
+
+ Values: "Yes", "No".
+ Default: "Yes".
+
+ If set to "No", the buttons "Login again" and "Close window" won't be
+ shown on disconnects or after an error has occured.
+
+--> "Show offline desktop" (no GUI equivalent)
+
+ Values: "Yes", "No".
+ Default: "No".
+
+ If set to "Yes", the viewer would continue to display desktop even
+ if the remote side has closed the connection. In this case, if the
+ button panel is enabled, then the "Disconnect" button would be
+ changed to "Hide desktop" after the connection is lost.
+
+--> "Defer screen updates" (no GUI equivalent)
+
+ Value: time in milliseconds.
+ Default: "20".
+
+ When updating the desktop contents after receiving an update from server,
+ schedule repaint within the specified number of milliseconds. Small delay
+ helps to coalesce several small updates into one drawing operation,
+ improving CPU usage. Set this parameter to 0 to disable deferred updates.
+
+--> "Defer cursor updates" (no GUI equivalent)
+
+ Value: time in milliseconds.
+ Default: "10".
+
+ When updating the desktop after moving the mouse, schedule repaint within
+ the specified number of milliseconds. This setting makes sense only when
+ "Cursor shape updates" parameter is set to "Enable". Small delay helps to
+ coalesce several small updates into one drawing operation, improving CPU
+ usage. Set this parameter to 0 to disable deferred cursor updates.
+
+--> "Defer update requests" (no GUI equivalent)
+
+ Value: time in milliseconds.
+ Default: "50".
+
+ After processing an update received from server, wait for the specified
+ number of milliseconds before requesting next screen update. Such delay
+ will end immediately on every mouse or keyboard event if not in the "view
+ only" mode. Small delay helps the server to coalesce several small
+ updates into one framebuffer update, improving both bandwidth and CPU
+ usage. Increasing the parameter value does not affect responsiveness on
+ mouse and keyboard events, but causes delays in updating the screen when
+ there is no mouse and keyboard activity on the client side.
+
+--> "SocketFactory" (no GUI equivalent)
+
+ Value: name of the class.
+ Default: none.
+
+ This option provides the way to define an alternate I/O implementation.
+ The dynamically referenced class must implement a SocketFactory
+ interface, and create a Socket, as configured by this parameter. See the
+ source in the SocketFactory.class.
+
+
+RECORDING VNC SESSIONS
+======================
+
+Current version of the TightVNC Java viewer is able to record VNC (RFB)
+sessions in files for later playback. The data format in saved session files
+is compatible with the rfbproxy program written by Tim Waugh. Most important
+thing about session recording is that it's supported only if Java security
+manager allows access to local filesystem. Typically, it would not work for
+unsigned applets. To use this feature, either use TightVNC Java viewer as a
+standalone application (Java Runtime Environment or Java Development Kit
+should be installed), or as a signed applet. The code checks if it's possible
+to support session recording, and if everything's fine, the new "Record"
+button should appear in the button panel. Pressing this button opens new
+window which controls session recording. The GUI is pretty self-explained.
+
+Other important facts about session recording:
+
+--> All sessions are recorded in the 24-bit color format. If you use
+ restricted colors (8-bit format), it will be temporarly switched to
+ 24-bit mode during session recording.
+
+--> All sessions are recorded with cursor shape updates turned off. This is
+ necessary to represent remote cursor movements in recorded sessions.
+
+--> Closing and re-opening the recording control window does not affect the
+ recording. It's not necessary to keep that window open during recording a
+ session.
+
+--> Avoid using Zlib encoding when recording sessions. It's ok if you started
+ recording BEFORE the connection to the VNC server has been established,
+ but if you started recording during an active session, all Zlib sessions
+ will be saved Raw-encoded (that is, without compression at all). Zlib
+ decoding depends on the pixel data received earlier, thus saving the data
+ received from the server at an arbitrary moment is not sufficient to
+ decompress it correctly. And there is no way to say Zlib decoder to reset
+ decompressor's state -- that's a limitation of the Zlib encoder. The
+ viewer could re-compress raw pixel data again before saving Zlib-encoded
+ sessions, but unfortunately Java API does not allow to flush zlib data
+ streams making it impossible to save Zlib-encoded RFB pixel data without
+ using native code.
+
+--> Usually, Tight encoding is the most suitable one for session recording,
+ but some of the issues described above for the Zlib encoding affect the
+ Tight encoding as well. Unlike Zlib sessions, Tight-encoded sessions are
+ always saved Tight-encoded, but the viewer has to re-compress parts of
+ data to synchronize encoder's and decoder's zlib streams. And, due to
+ Java zlib API limitations, zlib streams' states have to be reset on each
+ compressed rectangle, causing compression ratios to be lower than in the
+ original VNC session. If you want to achieve the best possible
+ performance, turn recording on BEFORE connecting to the VNC server,
+ otherwise CPU usage and compression ratios may be notably less efficient.
+
+
+HINTS
+=====
+
+--> To refresh remote desktop in the view-only mode, press "r" or "R"
+ on the keyboard.
+
+
+ACKNOWLEDGEMENTS
+================
+
+This distribution contains Java DES software by Dave Zimmerman
+<dzimm@widget.com> and Jef Poskanzer <jef@acme.com>. This is:
+
+ Copyright (c) 1996 Widget Workshop, Inc. All Rights Reserved.
+
+ Permission to use, copy, modify, and distribute this software and its
+ documentation for NON-COMMERCIAL or COMMERCIAL purposes and without fee
+ is hereby granted, provided that this copyright notice is kept intact.
+
+ WIDGET WORKSHOP MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE
+ SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT
+ NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+ PARTICULAR PURPOSE, OR NON-INFRINGEMENT. WIDGET WORKSHOP SHALL NOT BE
+ LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
+ MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
+
+ THIS SOFTWARE IS NOT DESIGNED OR INTENDED FOR USE OR RESALE AS ON-LINE
+ CONTROL EQUIPMENT IN HAZARDOUS ENVIRONMENTS REQUIRING FAIL-SAFE
+ PERFORMANCE, SUCH AS IN THE OPERATION OF NUCLEAR FACILITIES, AIRCRAFT
+ NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL, DIRECT LIFE
+ SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH THE FAILURE OF THE
+ SOFTWARE COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE
+ PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH RISK ACTIVITIES"). WIDGET
+ WORKSHOP SPECIFICALLY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY OF
+ FITNESS FOR HIGH RISK ACTIVITIES.
+
+ Copyright (C) 1996 by Jef Poskanzer <jef@acme.com>. All rights
+ reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ Visit the ACME Labs Java page for up-to-date versions of this and other
+ fine Java utilities: http://www.acme.com/java/
diff --git a/net-misc/tightvnc/files/server-CVE-2007-1003.patch b/net-misc/tightvnc/files/server-CVE-2007-1003.patch
new file mode 100644
index 000000000000..0f97c11dc4dc
--- /dev/null
+++ b/net-misc/tightvnc/files/server-CVE-2007-1003.patch
@@ -0,0 +1,36 @@
+--- vnc_unixsrc/Xvnc/programs/Xserver/Xext/xcmisc.c.cve-2007-1003 2000-06-11 06:00:51.000000000 -0600
++++ vnc_unixsrc/Xvnc/programs/Xserver/Xext/xcmisc.c 2007-03-22 07:07:34.000000000 -0600
+@@ -41,6 +41,12 @@ from the X Consortium.
+ #include "swaprep.h"
+ #include "xcmiscstr.h"
+
++#if HAVE_STDINT_H
++#include <stdint.h>
++#elif !defined(UINT32_MAX)
++#define UINT32_MAX 0xffffffffU
++#endif
++
+ static unsigned char XCMiscCode;
+
+ static void XCMiscResetProc(
+@@ -135,7 +141,10 @@ ProcXCMiscGetXIDList(client)
+
+ REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq);
+
+- pids = (XID *)ALLOCATE_LOCAL(stuff->count * sizeof(XID));
++ if (stuff->count > UINT32_MAX / sizeof(XID))
++ return BadAlloc;
++
++ pids = (XID *)Xalloc(stuff->count * sizeof(XID));
+ if (!pids)
+ {
+ return BadAlloc;
+@@ -156,7 +165,7 @@ ProcXCMiscGetXIDList(client)
+ client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
+ WriteSwappedDataToClient(client, count * sizeof(XID), pids);
+ }
+- DEALLOCATE_LOCAL(pids);
++ Xfree(pids);
+ return(client->noClientException);
+ }
+
diff --git a/net-misc/tightvnc/files/server-CVE-2007-1351-1352.patch b/net-misc/tightvnc/files/server-CVE-2007-1351-1352.patch
new file mode 100644
index 000000000000..4c9a1adcb2fd
--- /dev/null
+++ b/net-misc/tightvnc/files/server-CVE-2007-1351-1352.patch
@@ -0,0 +1,49 @@
+--- vnc_unixsrc/Xvnc/lib/font/fontfile/fontdir.c.cve-2007-1351-1352 2000-06-11 06:00:53.000000000 -0600
++++ vnc_unixsrc/Xvnc/lib/font/fontfile/fontdir.c 2007-03-28 16:08:03.000000000 -0600
+@@ -35,11 +35,19 @@ in this Software without prior written a
+ #include "fntfilst.h"
+ #include <X11/keysym.h>
+
++#if HAVE_STDINT_H
++#include <stdint.h>
++#elif !defined(INT32_MAX)
++#define INT32_MAX 0x7fffffff
++#endif
++
+ Bool
+ FontFileInitTable (table, size)
+ FontTablePtr table;
+ int size;
+ {
++ if (size < 0 || (size > INT32_MAX/sizeof(FontEntryRec)))
++ return FALSE;
+ if (size)
+ {
+ table->entries = (FontEntryPtr) xalloc(sizeof(FontEntryRec) * size);
+--- vnc_unixsrc/Xvnc/lib/font/bitmap/bdfread.c.cve-2007-1351-1352 2000-06-11 06:00:52.000000000 -0600
++++ vnc_unixsrc/Xvnc/lib/font/bitmap/bdfread.c 2007-03-28 16:06:06.000000000 -0600
+@@ -59,6 +59,12 @@ from the X Consortium.
+ #include "bitmap.h"
+ #include "bdfint.h"
+
++#if HAVE_STDINT_H
++#include <stdint.h>
++#elif !defined(INT32_MAX)
++#define INT32_MAX 0x7fffffff
++#endif
++
+ #define INDICES 256
+ #define MAXENCODING 0xFFFF
+ #define BDFLINELEN 1024
+@@ -271,6 +277,11 @@ bdfReadCharacters(file, pFont, pState, b
+ bdfError("invalid number of CHARS in BDF file\n");
+ return (FALSE);
+ }
++ if (nchars > INT32_MAX / sizeof(CharInfoRec)) {
++ bdfError("Couldn't allocate pCI (%d*%d)\n", nchars,
++ sizeof(CharInfoRec));
++ goto BAILOUT;
++ }
+ ci = (CharInfoPtr) xalloc(nchars * sizeof(CharInfoRec));
+ if (!ci) {
+ bdfError("Couldn't allocate pCI (%d*%d)\n", nchars,
diff --git a/net-misc/tightvnc/files/tightvnc-1.3.10-java-build.patch b/net-misc/tightvnc/files/tightvnc-1.3.10-java-build.patch
new file mode 100644
index 000000000000..42815ac13343
--- /dev/null
+++ b/net-misc/tightvnc/files/tightvnc-1.3.10-java-build.patch
@@ -0,0 +1,20 @@
+diff -ur vnc_javasrc.orig/Makefile vnc_javasrc/Makefile
+--- vnc_javasrc.orig/Makefile 2009-03-07 14:15:55.000000000 +0100
++++ vnc_javasrc/Makefile 2009-03-07 14:16:22.000000000 +0100
+@@ -4,7 +4,6 @@
+
+ CP = cp
+ JC = javac
+-JCFLAGS = -target 1.1 -source 1.2
+ JAR = jar
+ ARCHIVE = VncViewer.jar
+ MANIFEST = MANIFEST.MF
+@@ -32,7 +31,7 @@
+ all: $(CLASSES) $(ARCHIVE)
+
+ $(CLASSES): $(SOURCES)
+- $(JC) $(JCFLAGS) -O $(SOURCES)
++ $(JC) $(JAVACFLAGS) -O $(SOURCES)
+
+ $(ARCHIVE): $(CLASSES) $(MANIFEST)
+ $(JAR) cfm $(ARCHIVE) $(MANIFEST) $(CLASSES)
diff --git a/net-misc/tightvnc/files/tightvnc-1.3.10-pathfixes.patch b/net-misc/tightvnc/files/tightvnc-1.3.10-pathfixes.patch
new file mode 100644
index 000000000000..f61a74902294
--- /dev/null
+++ b/net-misc/tightvnc/files/tightvnc-1.3.10-pathfixes.patch
@@ -0,0 +1,16 @@
+--- vncserver.orig 2009-03-06 17:33:16.000000000 +0100
++++ vncserver 2009-03-06 17:35:39.000000000 +0100
+@@ -32,10 +32,11 @@
+ $geometry = "1024x768";
+ $depth = 24;
+ $desktopName = "X";
+-$vncClasses = "/usr/local/vnc/classes";
++$vncClasses = "/usr/share/tightvnc/classes";
+ $vncUserDir = "$ENV{HOME}/.vnc";
+-$fontPath = "unix/:7100";
++$fontPath = "/usr/share/fonts/misc/,/usr/share/fonts/Type1/";
+ $authType = "-rfbauth $vncUserDir/passwd";
++$colorPath = "/usr/share/X11/rgb";
+
+ # Read configuration from the system-wide and user files if present.
+
diff --git a/net-misc/tightvnc/files/tightvnc-1.3.8-darwin.patch b/net-misc/tightvnc/files/tightvnc-1.3.8-darwin.patch
new file mode 100644
index 000000000000..e5f7aa7016cf
--- /dev/null
+++ b/net-misc/tightvnc/files/tightvnc-1.3.8-darwin.patch
@@ -0,0 +1,24 @@
+--- vnc_unixsrc/Xvnc/config/cf/darwin.cf.orig 2005-11-05 16:42:53.000000000 +0100
++++ vnc_unixsrc/Xvnc/config/cf/darwin.cf 2005-11-05 16:46:52.000000000 +0100
+@@ -106,7 +106,6 @@
+ # endif
+ #endif
+
+-#define StandardDefines -DCSRG_BASED
+ #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
+
+
+--- vnc_unixsrc/Xvnc/config/cf/vnclibs.def.orig 2005-11-05 17:11:41.000000000 +0100
++++ vnc_unixsrc/Xvnc/config/cf/vnclibs.def 2005-11-05 17:17:21.000000000 +0100
+@@ -11,7 +11,11 @@
+ /* Avoid linking with different libjpeg in /usr/shlib under Tru64. */
+ VNCSYSLIBS = /usr/local/lib/libjpeg.a /usr/local/lib/libz.a -lcrypt
+ #else
++# if HasLibCrypt == YES
+ VNCSYSLIBS = -L/usr/local/lib -ljpeg -lz -lcrypt
++# else
++VNCSYSLIBS = -L/usr/local/lib -ljpeg -lz
++# endif
+ #endif
+
+ VNCCPPFLAGS = -I$(TOP)/../include -I/usr/local/include
diff --git a/net-misc/tightvnc/files/tightvnc-1.3.8-imake-tmpdir.patch b/net-misc/tightvnc/files/tightvnc-1.3.8-imake-tmpdir.patch
new file mode 100644
index 000000000000..9d5ccc58ad76
--- /dev/null
+++ b/net-misc/tightvnc/files/tightvnc-1.3.8-imake-tmpdir.patch
@@ -0,0 +1,37 @@
+--- vnc_unixsrc/Xvnc/config/imake/imake.c.orig 2000-06-11 14:00:51.000000000 +0200
++++ vnc_unixsrc/Xvnc/config/imake/imake.c 2003-09-01 22:59:25.000000000 +0200
+@@ -913,12 +913,25 @@
+ static void get_libc_version(inFile)
+ FILE* inFile;
+ {
+- char *aout = tmpnam (NULL);
++ char aout[PATH_MAX];
+ FILE *fp;
+ const char *format = "%s -o %s -x c -";
+ char *cc;
+ int len;
+ char *command;
++ char *tmpdir;
++ int tmpfd;
++
++ if((tmpdir = getenv("TMPDIR")) != NULL && strlen(tmpdir) < (PATH_MAX-13))
++ strcpy(aout, tmpdir);
++ else
++ strcpy(aout, "/tmp");
++ strcat(aout, "/imakeXXXXXX");
++
++ if((tmpfd = mkstemp(aout)) == -1) {
++ perror("mkstemp");
++ abort();
++ }
+
+ cc = getenv ("CC");
+ if (cc == NULL)
+@@ -930,6 +943,7 @@
+ if (snprintf (command , len, format, cc, aout) == len)
+ abort ();
+
++ close(tmpfd);
+ fp = popen (command, "w");
+ if (fp == NULL || fprintf (fp, "%s\n", libc_c) < 0
+ || pclose (fp) != 0)
diff --git a/net-misc/tightvnc/files/tightvnc-1.3.8-mips.patch b/net-misc/tightvnc/files/tightvnc-1.3.8-mips.patch
new file mode 100644
index 000000000000..422a998d5aa6
--- /dev/null
+++ b/net-misc/tightvnc/files/tightvnc-1.3.8-mips.patch
@@ -0,0 +1,89 @@
+diff -cr vnc_unixsrc.orig/Xvnc/config/cf/linux.cf vnc_unixsrc/Xvnc/config/cf/linux.cf
+*** vnc_unixsrc.orig/Xvnc/config/cf/linux.cf Wed Mar 20 02:49:23 2002
+--- vnc_unixsrc/Xvnc/config/cf/linux.cf Sat Nov 4 19:01:06 2006
+***************
+*** 43,49 ****
+ #if defined(AlphaArchitecture) || defined(PowerPCArchitecture) || \
+ defined(SparcArchitecture) || defined(ArmArchitecure) || \
+ defined(i386Architecture) || defined(s390Architecture) || \
+! defined(s390xArchitecture)
+ #define DefaultLinuxCLibMajorVersion 6
+ #else
+ #define DefaultLinuxCLibMajorVersion 5
+--- 43,49 ----
+ #if defined(AlphaArchitecture) || defined(PowerPCArchitecture) || \
+ defined(SparcArchitecture) || defined(ArmArchitecure) || \
+ defined(i386Architecture) || defined(s390Architecture) || \
+! defined(s390xArchitecture) || defined(MipsArchitecture)
+ #define DefaultLinuxCLibMajorVersion 6
+ #else
+ #define DefaultLinuxCLibMajorVersion 5
+***************
+*** 261,266 ****
+--- 261,273 ----
+ #define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
+ #endif /* AlphaArchitecture */
+
++ #ifdef MipsArchitecture
++ #define OptimizedCDebugFlags -O2
++ #define LinuxMachineDefines -D__mips__
++ #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
++ #define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
++ #endif /* MipsArchitecture */
++
+ #ifdef Mc68020Architecture
+ #define OptimizedCDebugFlags -O2
+ #define LinuxMachineDefines -D__mc68000__
+diff -cr vnc_unixsrc.orig/Xvnc/programs/Xserver/cfb/Imakefile vnc_unixsrc/Xvnc/programs/Xserver/cfb/Imakefile
+*** vnc_unixsrc.orig/Xvnc/programs/Xserver/cfb/Imakefile Tue Mar 19 21:16:03 2002
+--- vnc_unixsrc/Xvnc/programs/Xserver/cfb/Imakefile Sat Nov 4 19:01:49 2006
+***************
+*** 10,24 ****
+ /* cfb8cppl.c MUST come last to avoid confusing makedepend */
+ PSZSRCS = cfb8bit.c cfbteblt8.c cfbglrop8.c cfbpush8.c cfbrctstp8.c cfb8cppl.c
+ PSZOBJS = cfb8bit.o cfbteblt8.o cfbglrop8.o cfbpush8.o cfbrctstp8.o cfb8cppl.o
+- #ifdef MipsArchitecture
+- #ifndef ArcArchitecture
+- #ifndef Mips64Architecture
+- STIPPLESRC = stipmips.s stipmipste.s
+- STIPPLEOBJ = stipmips.o stipmipste.o
+- STIPPLEDEF = -DHAS_STIPPLE_CODE
+- #endif
+- #endif
+- #endif
+ #ifdef SparcArchitecture
+ STIPPLESRC = stipsparc.s stipsparcte.s
+ STIPPLEOBJ = stipsparc.o stipsparcte.o
+--- 10,15 ----
+***************
+*** 128,136 ****
+ LinkSourceFile(cfbpush8.c,LinkDirectory)
+ LinkSourceFile(cfbrctstp8.c,LinkDirectory)
+ LinkSourceFile(cfbteblt8.c,LinkDirectory)
+- #ifdef MipsArchitecture
+- LinkSourceFile(stipmips.s,LinkDirectory)
+- #endif
+ #ifdef SparcArchitecture
+ LinkSourceFile(stipsparc.s,LinkDirectory)
+ #endif
+--- 119,124 ----
+***************
+*** 186,202 ****
+ #if PixelSize == 8
+ ObjectFromSpecialSource(cfbglrop8,cfbglblt8,-DGLYPHROP)
+
+- #ifdef MipsArchitecture
+- stipmipste.s: stipmips.s
+- $(RM) $@
+- $(LN) stipmips.s stipmipste.s
+- clean::
+- $(RM) stipmipste.s
+-
+- stipmipste.o: stipmipste.s
+- $(AS) -o $@ -DTETEXT stipmipste.s
+- #endif
+-
+ #ifdef SparcArchitecture
+ stipsparcte.s: stipsparc.s
+ $(RM) $@
+--- 174,179 ----
diff --git a/net-misc/tightvnc/files/tightvnc-1.3.8-pathfixes.patch b/net-misc/tightvnc/files/tightvnc-1.3.8-pathfixes.patch
new file mode 100644
index 000000000000..d9fa5aae30b8
--- /dev/null
+++ b/net-misc/tightvnc/files/tightvnc-1.3.8-pathfixes.patch
@@ -0,0 +1,23 @@
+--- vncserver.old 2006-08-10 13:01:07.000000000 +0200
++++ vncserver 2006-09-05 19:31:30.000000000 +0200
+@@ -36,16 +36,16 @@
+ $geometry = "1024x768";
+ $depth = 24;
+ $desktopName = "X";
+-$vncClasses = "/usr/local/vnc/classes";
++$vncClasses = "/usr/share/tightvnc/classes";
+ $vncUserDir = "$ENV{HOME}/.vnc";
+-$fontPath = "unix/:7100";
++$fontPath = "unix/:-1";
+ $authType = "-rfbauth $vncUserDir/passwd";
+
+ # Here is another example of setting the font path:
+-# $fontPath = "/usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/";
++$fontPath = "/usr/share/fonts/misc/,/usr/share/fonts/Type1/";
+
+ # X colors database path is optional, uncomment and edit to use:
+-# $colorPath = "/usr/lib/X11/rgb";
++$colorPath = "/usr/share/X11/rgb";
+
+ # You might wish to make your vnc directory under /tmp, to make sure
+ # passwords are always kept on the local filesystem. To do that, just
diff --git a/net-misc/tightvnc/files/tightvnc-1.3.9-java-build.patch b/net-misc/tightvnc/files/tightvnc-1.3.9-java-build.patch
new file mode 100644
index 000000000000..8503a30c50cf
--- /dev/null
+++ b/net-misc/tightvnc/files/tightvnc-1.3.9-java-build.patch
@@ -0,0 +1,19 @@
+--- vnc_javasrc/Makefile.bak 2008-09-11 21:17:37.000000000 +1200
++++ vnc_javasrc/Makefile 2008-09-11 21:18:30.000000000 +1200
+@@ -4,7 +4,6 @@
+
+ CP = cp
+ JC = javac
+-JCFLAGS = -target 1.1
+ JAR = jar
+ ARCHIVE = VncViewer.jar
+ MANIFEST = MANIFEST.MF
+@@ -32,7 +31,7 @@
+ all: $(CLASSES) $(ARCHIVE)
+
+ $(CLASSES): $(SOURCES)
+- $(JC) $(JCFLAGS) -O $(SOURCES)
++ $(JC) $(JAVACFLAGS) -O $(SOURCES)
+
+ $(ARCHIVE): $(CLASSES) $(MANIFEST)
+ $(JAR) cfm $(ARCHIVE) $(MANIFEST) $(CLASSES)
diff --git a/net-misc/tightvnc/files/tightvnc.confd b/net-misc/tightvnc/files/tightvnc.confd
new file mode 100644
index 000000000000..757f4b989f80
--- /dev/null
+++ b/net-misc/tightvnc/files/tightvnc.confd
@@ -0,0 +1,9 @@
+# Config file for /etc/init.d/vnc
+
+# Specify the user(s) Xvnc(1) should be run for. The syntax is: "username:display".
+# example: "DISPLAYS="foo:1 bar:2" You can specify more users separated by space.
+# DISPLAYS="myuser:1"
+
+# Specify any of vncserver(1) and Xvnc(1) options. See the respective man pages for more information.
+# VNC_OPTS=""
+
diff --git a/net-misc/tightvnc/files/tightvnc.initd b/net-misc/tightvnc/files/tightvnc.initd
new file mode 100644
index 000000000000..6051fa217c46
--- /dev/null
+++ b/net-misc/tightvnc/files/tightvnc.initd
@@ -0,0 +1,57 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ -n "${DISPLAYS}" ]; then
+ if [ $1 = "start" ]; then
+ local user
+ for user in $DISPLAYS; do
+ if eval [ ! -f "~${user%%:*}/.vnc/passwd" ]; then
+ eerror "There are no passwords defined for user ${user%%:*}."
+ return 1
+ elif [ -e "/tmp/.X11-unix/X${user##*:}" ]; then
+ eerror "Display :${user##*:} appears to be already in use because of /tmp/.X11-unix/X${user##*:}"
+ eerror "Remove this file if there is no X server $HOSTNAME:${user##*:}"
+ return 1
+ elif [ -e "/tmp/.X${user##*:}-lock" ]; then
+ eerror "Display :${user##*:} appears to be already in use because of /tmp/.X${user##*:}-lock"
+ eerror "Remove this file if there is no X server $HOSTNAME:${user##*:}"
+ return 1
+ fi
+ done
+ fi
+ return 0
+ else
+ eerror 'Please define $DISPLAYS in /etc/conf.d/vnc'
+ return 1
+ fi
+}
+
+start() {
+ checkconfig start || return 1
+ ebegin "Starting TightVNC server"
+ for user in $DISPLAYS; do
+ su -s /bin/sh ${user%%:*} -c "cd ~${user%%:*} && vncserver :${user##*:} $VNC_OPTS" &>/dev/null
+ done
+ eend $?
+}
+
+stop() {
+ checkconfig stop || return 2
+ ebegin "Stopping TightVNC server"
+ for user in $DISPLAYS; do
+ su -s /bin/sh ${user%%:*} -c "vncserver -kill :${user##*:}" &>/dev/null
+ done
+ eend $?
+}
+
+restart() {
+ svc_stop
+ svc_start
+}
diff --git a/net-misc/tightvnc/metadata.xml b/net-misc/tightvnc/metadata.xml
new file mode 100644
index 000000000000..d1dc499dbdf8
--- /dev/null
+++ b/net-misc/tightvnc/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>armin76@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="server">Build TightVNC server</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">vnc-tight</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/tightvnc/tightvnc-1.3.10-r2.ebuild b/net-misc/tightvnc/tightvnc-1.3.10-r2.ebuild
new file mode 100644
index 000000000000..c7a9ca89a290
--- /dev/null
+++ b/net-misc/tightvnc/tightvnc-1.3.10-r2.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs java-pkg-opt-2
+
+IUSE="java tcpd server"
+
+S="${WORKDIR}/vnc_unixsrc"
+DESCRIPTION="A great client/server software package allowing remote network access to graphical desktops"
+SRC_URI="mirror://sourceforge/vnc-tight/${P}_unixsrc.tar.bz2
+ mirror://gentoo/${PN}.png
+ java? ( mirror://sourceforge/vnc-tight/${P}_javasrc.tar.gz )"
+HOMEPAGE="http://www.tightvnc.com/"
+
+KEYWORDS="alpha amd64 arm ~mips ppc ~sh sparc x86 ~x86-fbsd ~arm-linux ~x86-linux"
+LICENSE="GPL-2"
+SLOT="0"
+
+CDEPEND="media-fonts/font-misc-misc
+ virtual/jpeg
+ server? (
+ media-fonts/font-cursor-misc
+ x11-apps/rgb
+ x11-apps/xauth
+ x11-apps/xsetroot
+ )
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXmu
+ x11-libs/libXp
+ x11-libs/libXt
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6-r2 )"
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-1.4 )"
+DEPEND="${CDEPEND}
+ java? ( >=virtual/jdk-1.4 )
+ x11-proto/xextproto
+ x11-proto/xproto
+ server? (
+ x11-proto/inputproto
+ x11-proto/kbproto
+ x11-proto/printproto
+ )
+ >=x11-misc/imake-1
+ x11-misc/gccmakedep
+ x11-misc/makedepend
+ !net-misc/tigervnc"
+
+pkg_setup() {
+ if ! use server;
+ then
+ echo
+ einfo "The 'server' USE flag will build tightvnc's server."
+ einfo "If '-server' is chosen only the client is built to save space."
+ einfo "Stop the build now if you need to add 'server' to USE flags.\n"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.3.10-pathfixes.patch" # fixes bug 78385 and 146099
+ epatch "${FILESDIR}/${PN}-1.3.8-imake-tmpdir.patch" # fixes bug 23483
+ epatch "${FILESDIR}/${PN}-1.3.8-darwin.patch" # fixes bug 89908
+ epatch "${FILESDIR}/${PN}-1.3.8-mips.patch"
+ epatch "${FILESDIR}"/server-CVE-2007-1003.patch
+ epatch "${FILESDIR}"/server-CVE-2007-1351-1352.patch
+ epatch "${FILESDIR}"/1.3.9-fbsd.patch
+ epatch "${FILESDIR}"/1.3.9-arm.patch
+ epatch "${FILESDIR}"/1.3.9-sh.patch
+ epatch "${FILESDIR}"/${PV}-sparc.patch
+ sed -e "s:\\(/etc/\\|/usr/share/\\):${EPREFIX}\\1:g" -i vncserver || die
+
+ if use java; then
+ cd "${WORKDIR}"
+ epatch "${FILESDIR}/${PN}-1.3.10-java-build.patch"
+ fi
+}
+
+src_compile() {
+ xmkmf -a || die "xmkmf failed"
+
+ emake -j1 CDEBUGFLAGS="${CFLAGS}" EXTRA_LDOPTIONS="${LDFLAGS}" World
+
+ if use server; then
+ cd Xvnc || die
+ econf
+
+ if use tcpd; then
+ local myextra="-lwrap"
+ emake -j1 EXTRA_LIBRARIES="${myextra}" \
+ CDEBUGFLAGS="${CFLAGS}" EXTRA_LDOPTIONS="${LDFLAGS}" \
+ EXTRA_DEFINES="-DUSE_LIBWRAP=1"
+ else
+ emake -j1 CDEBUGFLAGS="${CFLAGS}" EXTRA_LDOPTIONS="${LDFLAGS}"
+ fi
+ fi
+
+ if use java; then
+ cd "${WORKDIR}/vnc_javasrc" || die
+ emake -j1 JAVACFLAGS="$(java-pkg_javac-args)" all
+ fi
+
+}
+
+src_install() {
+ # the web based interface and the java viewer need the java class files
+ if use java; then
+ java-pkg_newjar "${WORKDIR}/vnc_javasrc/VncViewer.jar"
+ java-pkg_dolauncher "${PN}-java"
+ insinto /usr/share/${PN}/classes
+ doins "${WORKDIR}"/vnc_javasrc/*.vnc || die
+ dosym /usr/share/${PN}/lib/${PN}.jar /usr/share/${PN}/classes/VncViewer.jar
+ fi
+
+ dodir /usr/share/man/man1 /usr/bin
+ ./vncinstall "${ED}"/usr/bin "${ED}"/usr/share/man || die "vncinstall failed"
+
+ if use server; then
+ newconfd "${FILESDIR}"/tightvnc.confd vnc
+ newinitd "${FILESDIR}"/tightvnc.initd vnc
+ else
+ rm -f "${ED}"/usr/bin/vncserver || die
+ rm -f "${ED}"/usr/share/man/man1/{Xvnc,vncserver}* || die
+ fi
+
+ newicon "${DISTDIR}"/tightvnc.png vncviewer.png
+ make_desktop_entry vncviewer vncviewer vncviewer Network
+
+ dodoc ChangeLog README WhatsNew
+ use java && dodoc "${FILESDIR}"/README.JavaViewer
+ newdoc vncviewer/README README.vncviewer
+}
diff --git a/net-misc/tinc/Manifest b/net-misc/tinc/Manifest
new file mode 100644
index 000000000000..1cdd426e2fbf
--- /dev/null
+++ b/net-misc/tinc/Manifest
@@ -0,0 +1,3 @@
+DIST tinc-1.0.25.tar.gz 472819 SHA256 c5c1c554e594d77365b63222ef15f4460c0c202f9163a89a087333a779f4f133 SHA512 0d3cdfa3c7bad131f6b8b9c350afd6818b2cdb44066e322df7a2314d43c532472f372c689a793ec40f3981a55b21a1e0b37bb51b8e6c6a4a569bba0d6c3a7fa1 WHIRLPOOL 1e2e48af73ef69e99bd5e2ec2da9d93196fad4e7c436b80e02516bf7ac13741a3d40e95f1ebfa3c04de570b4024093db6c59752cd364da869c85720f2940b8db
+DIST tinc-1.0.26.tar.gz 473681 SHA256 2b4319ddb3bd2867e72532a233f640a58c2f4d83f1088183ae544b268646ba21 SHA512 33f0a21a6a7f5b4e3bad5e30437efe88738bab243d9ea303842c454be53de0296878da90502b577996767a07d597453054fd4cdefbd05d22b49a6fb78b2aa64c WHIRLPOOL b405587bdb24e378ea32323aa3638928cbbc96959ba71fd42baced7796e5867ad54bc7479ac50243e4f9c93403f07644ffda5ad8e407911f4471c2e6e67c0eda
+DIST tinc-1.1pre11.tar.gz 659259 SHA256 942594563d3aef926a2d04e9ece90c16daf1c700e99e3b91ff749e8377fbf757 SHA512 aca746cf660f560709bd5c9eea7aaa35fcdb123e82ebe1c73b69350b3c7829c454da8618ec6957cb4e1298fc594bd1a4083b8c3a6af64345199edad2db86fc9a WHIRLPOOL 54c2fd13de1329713f6e64d61a523f940052276283148b2030337a3bf6195c40bbd5140cdadc712dc17e1720d930851401b4b2d08cac09cd26c5796146b8a593
diff --git a/net-misc/tinc/files/tinc.networks b/net-misc/tinc/files/tinc.networks
new file mode 100644
index 000000000000..e1844ce2ba24
--- /dev/null
+++ b/net-misc/tinc/files/tinc.networks
@@ -0,0 +1,13 @@
+# file: /etc/conf.d/tinc.networks for /etc/init.d/tincd
+
+# In this file you define the tinc networks you want to connect to
+
+# USAGE:
+# you add a network to the init script by defining:
+# NETWORK: your_network_name
+#
+# if you want to connect to multiple VPN's just set them behind each other. e.g.
+# NETWORK: foo
+# NETWORK: bar
+#
+# this would join the network foo and the network bar.
diff --git a/net-misc/tinc/files/tincd-r1 b/net-misc/tinc/files/tincd-r1
new file mode 100644
index 000000000000..c4539a0219c5
--- /dev/null
+++ b/net-misc/tinc/files/tincd-r1
@@ -0,0 +1,79 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_started_commands="reload"
+
+NETS="/etc/conf.d/tinc.networks"
+DAEMON="/usr/sbin/tincd"
+
+depend() {
+ use logger dns
+ need net
+}
+
+checkconfig() {
+ if [ "${RC_SVCNAME}" = "tincd" ] ; then
+ ALL_NETNAME="$(awk '/^ *NETWORK:/ { print $2 }' "${NETS}")"
+ else
+ ALL_NETNAME="${RC_SVCNAME#*.}"
+ fi
+ # warn this if still not found
+ if [ -z "${ALL_NETNAME}" ] ; then
+ eerror "No VPN networks configured in ${NETS}"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ ebegin "Starting tinc VPN networks"
+ checkconfig || return 1
+ for NETNAME in ${ALL_NETNAME}
+ do
+ CONFIG="/etc/tinc/${NETNAME}/tinc.conf"
+ PIDFILE="/var/run/tinc.${NETNAME}.pid"
+ if [ ! -f "${CONFIG}" ]; then
+ eerror "Cannot start network ${NETNAME}."
+ eerror "Please set up ${CONFIG} !"
+ else
+ ebegin "Starting tinc network ${NETNAME}"
+ if [ "${SYSLOG}" = "yes" ]; then
+ LOG=""
+ else
+ LOG="--logfile=/var/log/tinc.${NETNAME}.log"
+ fi
+ start-stop-daemon --start --exec "${DAEMON}" --pidfile "${PIDFILE}" -- --net="${NETNAME}" ${LOG} --pidfile "${PIDFILE}" --debug="${DEBUG_LEVEL}" ${EXTRA_OPTS}
+ eend $?
+ fi
+ done
+}
+
+stop() {
+ ebegin "Stopping tinc VPN networks"
+ checkconfig || return 1
+ for NETNAME in ${ALL_NETNAME}
+ do
+ PIDFILE="/var/run/tinc.${NETNAME}.pid"
+ if [ -f "${PIDFILE}" ]; then
+ ebegin "Stopping tinc network ${NETNAME}"
+ start-stop-daemon --stop --pidfile "${PIDFILE}"
+ eend $?
+ fi
+ done
+}
+
+reload() {
+ ebegin "Reloading configuration for tinc VPN networks"
+ checkconfig || return 1
+ for NETNAME in ${ALL_NETNAME}
+ do
+ PIDFILE="/var/run/tinc.${NETNAME}.pid"
+ if [ -f "${PIDFILE}" ]; then
+ ebegin "Reloading tinc network ${NETNAME}"
+ start-stop-daemon --signal HUP --pidfile ${PIDFILE}
+ eend $?
+ fi
+ done
+}
diff --git a/net-misc/tinc/files/tincd.conf b/net-misc/tinc/files/tincd.conf
new file mode 100644
index 000000000000..cedca60c42ad
--- /dev/null
+++ b/net-misc/tinc/files/tincd.conf
@@ -0,0 +1,20 @@
+#rc_need="net.net"
+
+#If you want tincd to log to syslog, then set this to "yes"
+#Anything else and tincd will log to /var/log/tinc.NETNAME.log.
+SYSLOG="yes"
+
+#Set debug level, useful for error probe
+# 0 Quiet mode, only show starting/stopping of the daemon
+# 1 Show (dis)connects of other tinc daemons via TCP
+# 2 Show error messages received from other hosts
+# 2 Show status messages received from other hosts
+# 3 Show the requests that are sent/received
+# 4 Show contents of every request that is sent/received
+# 5 Show network traffic information
+# 6 Show contents of each packet that is being sent/received
+# 10 You have been warned
+DEBUG_LEVEL="0"
+
+#Extra Options, if you want addtional customization
+EXTRA_OPTS=""
diff --git a/net-misc/tinc/files/tincd_at.service b/net-misc/tinc/files/tincd_at.service
new file mode 100644
index 000000000000..71f358a39d95
--- /dev/null
+++ b/net-misc/tinc/files/tincd_at.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Tinc daemon for network %i
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/tincd -D --pidfile /run/tinc.%i.pid -n %i
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/tinc/metadata.xml b/net-misc/tinc/metadata.xml
new file mode 100644
index 000000000000..8f358f87c3c3
--- /dev/null
+++ b/net-misc/tinc/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <maintainer>
+ <email>dlan@gentoo.org</email>
+ <name>Yixun Lan</name>
+ </maintainer>
+ <longdescription>tinc is an easy to configure VPN implementation.</longdescription>
+ <use>
+ <flag name="gcrypt">Add support for encrypted log files using <pkg>dev-libs/libgcrypt</pkg></flag>
+ <flag name="gui">Add GUI support, using <pkg>dev-python/wxpython</pkg></flag>
+ <flag name="openssl">Using <pkg>dev-libs/openssl</pkg> for cryptography-related functions</flag>
+ <flag name='uml'> Enable support for User Mode Linux Sockets</flag>
+ <flag name='vde'> Enable Virtual Distributed Ethernet (VDE) based networking</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/tinc/tinc-1.0.25.ebuild b/net-misc/tinc/tinc-1.0.25.ebuild
new file mode 100644
index 000000000000..a185375283ca
--- /dev/null
+++ b/net-misc/tinc/tinc-1.0.25.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit systemd
+
+DESCRIPTION="tinc is an easy to configure VPN implementation"
+HOMEPAGE="http://www.tinc-vpn.org/"
+SRC_URI="http://www.tinc-vpn.org/packages/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="+lzo uml vde +zlib"
+
+DEPEND="dev-libs/openssl:=
+ lzo? ( dev-libs/lzo:2 )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ vde? ( net-misc/vde )"
+
+src_configure() {
+ econf \
+ --enable-jumbograms \
+ --disable-tunemu \
+ $(use_enable lzo) \
+ $(use_enable uml) \
+ $(use_enable vde) \
+ $(use_enable zlib)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodir /etc/tinc
+ dodoc AUTHORS NEWS README THANKS
+ doconfd "${FILESDIR}"/tinc.networks
+ newconfd "${FILESDIR}"/tincd.conf tincd
+ newinitd "${FILESDIR}"/tincd-r1 tincd
+ systemd_newunit "${FILESDIR}"/tincd_at.service "tincd@.service"
+}
+
+pkg_postinst() {
+ elog "This package requires the tun/tap kernel device."
+ elog "Look at http://www.tinc-vpn.org/ for how to configure tinc"
+}
diff --git a/net-misc/tinc/tinc-1.0.26.ebuild b/net-misc/tinc/tinc-1.0.26.ebuild
new file mode 100644
index 000000000000..a185375283ca
--- /dev/null
+++ b/net-misc/tinc/tinc-1.0.26.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit systemd
+
+DESCRIPTION="tinc is an easy to configure VPN implementation"
+HOMEPAGE="http://www.tinc-vpn.org/"
+SRC_URI="http://www.tinc-vpn.org/packages/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="+lzo uml vde +zlib"
+
+DEPEND="dev-libs/openssl:=
+ lzo? ( dev-libs/lzo:2 )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ vde? ( net-misc/vde )"
+
+src_configure() {
+ econf \
+ --enable-jumbograms \
+ --disable-tunemu \
+ $(use_enable lzo) \
+ $(use_enable uml) \
+ $(use_enable vde) \
+ $(use_enable zlib)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodir /etc/tinc
+ dodoc AUTHORS NEWS README THANKS
+ doconfd "${FILESDIR}"/tinc.networks
+ newconfd "${FILESDIR}"/tincd.conf tincd
+ newinitd "${FILESDIR}"/tincd-r1 tincd
+ systemd_newunit "${FILESDIR}"/tincd_at.service "tincd@.service"
+}
+
+pkg_postinst() {
+ elog "This package requires the tun/tap kernel device."
+ elog "Look at http://www.tinc-vpn.org/ for how to configure tinc"
+}
diff --git a/net-misc/tinc/tinc-1.1_pre11.ebuild b/net-misc/tinc/tinc-1.1_pre11.ebuild
new file mode 100644
index 000000000000..008118496bcd
--- /dev/null
+++ b/net-misc/tinc/tinc-1.1_pre11.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+MY_PV=${PV/_/}
+MY_P=${PN}-${MY_PV}
+
+PYTHON_COMPAT=( python2_7 )
+inherit eutils systemd python-any-r1
+
+DESCRIPTION="tinc is an easy to configure VPN implementation"
+HOMEPAGE="http://www.tinc-vpn.org/"
+SRC_URI="http://www.tinc-vpn.org/packages/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="+lzo +ncurses +openssl gcrypt gui +readline uml vde +zlib"
+
+DEPEND="dev-libs/openssl:=
+ lzo? ( dev-libs/lzo:2 )
+ ncurses? ( sys-libs/ncurses )
+ readline? ( sys-libs/readline:= )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ vde? ( net-misc/vde )
+ ${PYTHON_DEPS}
+ gui? ( $(python_gen_any_dep '
+ dev-python/wxpython[${PYTHON_USEDEP}]
+ ') )"
+
+REQUIRED_USE="^^ ( openssl gcrypt )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_configure() {
+ econf \
+ --enable-jumbograms \
+ --disable-tunemu \
+ --with-windows2000 \
+ --disable-silent-rules \
+ $(use_enable lzo) \
+ $(use_enable ncurses curses) \
+ $(use_enable readline) \
+ $(use_enable uml) \
+ $(use_enable vde) \
+ $(use_enable zlib) \
+ $(use_with openssl) \
+# $(use_with gcrypt libgcrypt), upstream not ready
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodir /etc/tinc
+ dodoc AUTHORS NEWS README THANKS
+ doconfd "${FILESDIR}"/tinc.networks
+ newconfd "${FILESDIR}"/tincd.conf tincd
+ newinitd "${FILESDIR}"/tincd-r1 tincd
+ systemd_newunit "${FILESDIR}"/tincd_at.service "tincd@.service"
+
+ if use gui; then
+ python_fix_shebang "${ED}"/usr/bin/tinc-gui
+ else
+ rm -f "${ED}"/usr/bin/tinc-gui || die
+ fi
+}
+
+pkg_postinst() {
+ elog "This package requires the tun/tap kernel device."
+ elog "Look at http://www.tinc-vpn.org/ for how to configure tinc"
+}
diff --git a/net-misc/tipcutils/Manifest b/net-misc/tipcutils/Manifest
new file mode 100644
index 000000000000..ba9705029d6f
--- /dev/null
+++ b/net-misc/tipcutils/Manifest
@@ -0,0 +1,2 @@
+DIST tipcutils-2.0.0.tar.gz 66495 SHA256 e8d2afcc3471f652f9469a65e1c385eb5fbe925c4108c74ee1abbfdee5117d61 SHA512 40d25d7bb23359ef1c5caeef30f15166deb24772034ec34a69600764c0445d9e7023254e19a2a76e75a46643f5c710b881341d3f32e42e2d9c58d4a94e17c49a WHIRLPOOL 3467a1566abebef408056790592f266c508f5e3fc7b5e3d7dc4f78e1d95657f7147b015b7554f6c9092cc1df2b75af701962221495488650f13c0a0502090301
+DIST tipcutils-2.0.3.tar.gz 166337 SHA256 6a2295d4cfe7c02e7cae13194f180855105a0e26c09f522a6a29da1787525997 SHA512 7f07b4729dbd2c0c93cd69ffe6d2d082cd10f8de8bda335555548d14bd6287229da3686d288be3c10024cc6b607e6e4be983716f734f2d049352f924409511ec WHIRLPOOL 2347fb571003b6f1567d4c0956e3aac54885d5dd15eab9471e69e9531704cb8d1d3f471edee5ad02f53467fd60fcc32ab64e719cd1ffa46ce777ce1ec59922b4
diff --git a/net-misc/tipcutils/files/tipcutils-2.0.0-rename_configuration_message_field.patch b/net-misc/tipcutils/files/tipcutils-2.0.0-rename_configuration_message_field.patch
new file mode 100644
index 000000000000..e5dacb485f67
--- /dev/null
+++ b/net-misc/tipcutils/files/tipcutils-2.0.0-rename_configuration_message_field.patch
@@ -0,0 +1,14 @@
+http://bugs.gentoo.org/383807
+http://tipc.git.sourceforge.net/git/gitweb.cgi?p=tipc/tipcutils;a=commit;h=44efb87cb453c16a31ceef27164b0f0394ae4433
+
+--- tipc-config.c
++++ tipc-config.c
+@@ -1150,7 +1150,7 @@ static void enable_bearer(char *args)
+ a, for_dest(), addr2str(domain), pri);
+
+ req_tlv.priority = htonl(pri);
+- req_tlv.detect_scope = htonl(domain);
++ req_tlv.disc_domain = htonl(domain);
+ strncpy(req_tlv.name, a, TIPC_MAX_BEARER_NAME - 1);
+ req_tlv.name[TIPC_MAX_BEARER_NAME - 1] = '\0';
+
diff --git a/net-misc/tipcutils/metadata.xml b/net-misc/tipcutils/metadata.xml
new file mode 100644
index 000000000000..951d18820402
--- /dev/null
+++ b/net-misc/tipcutils/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>proxy-maintainers</herd>
+ <maintainer>
+ <email>tokiclover@gmail.com</email>
+ <description>Maintainer. Assign bugs on him</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">tipc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/tipcutils/tipcutils-2.0.0.ebuild b/net-misc/tipcutils/tipcutils-2.0.0.ebuild
new file mode 100644
index 000000000000..1aa7943bd1e9
--- /dev/null
+++ b/net-misc/tipcutils/tipcutils-2.0.0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs # linux-info
+
+DESCRIPTION="Utilities for TIPC (Transparent Inter-Process Communication)"
+HOMEPAGE="http://tipc.sourceforge.net"
+SRC_URI="mirror://sourceforge/tipc/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND=">=sys-kernel/linux-headers-2.6.39"
+
+S=${WORKDIR}/${P}/tipc-config
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-rename_configuration_message_field.patch
+ sed -i -e '/OFLAGS/s:-O2::' Makefile || die
+}
+
+src_compile() {
+ tc-export CC
+ # inherit linux-info and add IFLAGS="${KERNEL_DIR}/include" below in order
+ # to build against headers in /usr/src/linux
+ emake EXTRAS="${CFLAGS}"
+}
+
+src_install() {
+ dosbin tipc-config
+}
diff --git a/net-misc/tipcutils/tipcutils-2.0.3.ebuild b/net-misc/tipcutils/tipcutils-2.0.3.ebuild
new file mode 100644
index 000000000000..1eebd09145cd
--- /dev/null
+++ b/net-misc/tipcutils/tipcutils-2.0.3.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Utilities for TIPC (Transparent Inter-Process Communication)"
+HOMEPAGE="http://tipc.sourceforge.net"
+SRC_URI="mirror://sourceforge/tipc/${P}.tar.gz"
+
+LICENSE="|| ( BSD-2 GPL-2 )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND=">=sys-kernel/linux-headers-2.6.39"
+
+DOCS=( README )
+
+src_prepare() {
+ epatch_user
+}
diff --git a/net-misc/tlsdate/Manifest b/net-misc/tlsdate/Manifest
new file mode 100644
index 000000000000..d9475bd6bb87
--- /dev/null
+++ b/net-misc/tlsdate/Manifest
@@ -0,0 +1,7 @@
+DIST tlsdate-0.0.1.tar.gz 10062 SHA256 2bdf50aeae8508cff9badec020c2d8063e7686069e4a9a2809c075018c6ce5f7 SHA512 5169b8f2c399bb286f4983e73b2a095e17406b516cc1287016fa581277abd0e38d314972bff456af0162c1970b60909d05e7707ceeeb2be3432fb735a4a6bd69 WHIRLPOOL 2a1980c9d996977580fc7ba108655ea54fd890b132bf37264d2f1141f0eec0c8e82c1bec25186fd6ab5a88472ffe936541a780acb5719f99a766561ac862a7ec
+DIST tlsdate-0.0.11.tar.gz 263961 SHA256 7293689ce85973b5b10fee946f09cc35cb697a46d4e1c14bbc218a74d2c9a90f SHA512 a1c4ff0dbf4513a6dfc15f0d1bbbfe8702333a78b2b295947559b7569389527da4b6cf4e0f4ad9887fecdfab0f1b952522eeabe622a17db65d4f0f74cd1026f6 WHIRLPOOL f9f1b810734750bae0813981e4623c2ca2aab65455e5fd4af02d90a0f14422b9872af205291dcd917e313c8b247e10a19cc084593c59a0b18384ca50eb388d9f
+DIST tlsdate-0.0.12.tar.gz 264156 SHA256 15cf5a86258fa17afe15cc6ea0c87d94caeafe3d77827fea0f358bac734f13e9 SHA512 c16ab3c86514f905841c14ec7b6544ecd6b94af26f4468a7ab923fae8971b77e5c2995fff66979c9c5ada117bb546df7c44378790b8a7b854b028d8769cf4e66 WHIRLPOOL 30e8bdaf89cd1cc0ef225ab5cc5e18322948b929d16495d3dd2af10558fd9e472d1703a6152349d51804e4143d580fc5bdf80e7272cfe11b003999493a5683f8
+DIST tlsdate-0.0.13.tar.gz 264228 SHA256 482640a5efb8489f287da1018176fb1196adf7cb1b81ac0c7f2b419b43d44258 SHA512 9c4fd51439976a8541fdf1bb70afa5333b43b2e43b801a65b3b1ac3e4a437fd3021ef2aaeeb13fc1ba63ccd119f6eff4c10e3a5a28cf0cfd96bbc7a174dbb789 WHIRLPOOL db91755d4751e64ca6285c9f1492d1b82a06f97921a47168398377818407efe6a0fcb901ef93272f0ff66121893873bb360868207998d054c5a550734b05db06
+DIST tlsdate-0.0.4.tar.gz 198005 SHA256 46d6caf123240aff7fd9e162582578b961a556dba2fc6cc3f6dede5c7cd48e0d SHA512 a84e599a823a00d667f9025ffc1c3bd15cdb5a55a95fcec0634da4d2f1bb9ad9de7f6ea64475ab14179a281b797ecd9854b5e40f9890a59a6f56154e7dcd2830 WHIRLPOOL ef5636819469d781d3b64684bbdb6e19567982658c068f32e850ec38f050b449a3dc440fdc77882a24ce19587c2db1583ed223535d8f066c6e2a2152f9383061
+DIST tlsdate-0.0.5.tar.gz 205288 SHA256 00d988d004e207b19e9a4fb7090f111ea491b8a7e525690bfba6d4a13bb6af80 SHA512 ea3ed703076cfb94c3ce2e9670b9621ae620d2a87963948b62ec6d2dd37586bfee02dc921dde163964d508ed624336f426cc88d30ba440d691035f5df2872c2b WHIRLPOOL 4d0d6d0db20cbeaac27227aea65d1c186f1e6bd7f1593e9b44d351b0eb37e24d637c4518c4e66755fad7ad33a0e0b998cc3c63a0fd65f6ca2a1154879001857c
+DIST tlsdate-0.0.6.tar.gz 211400 SHA256 c1f8518216f3fcfb8b19a2caafea555098f907ec60c76f142e839fdede910d18 SHA512 03608e65421fb709a2b0014918f911b5261e5fdba401908e45d2986c87f69e45f6dc3b9d71df18bedce321e573574221849bc6e9f277cbdfcf8b20a536d978f9 WHIRLPOOL 39b2b4d84631007f59b18ca293f920ffeb9520cdfeba71003dcb1d89e0113feab55f1edc14d9c7ccafdf50a989a6eab6cfe0931577c4167076a65370d541ae64
diff --git a/net-misc/tlsdate/files/tlsdate-0.0.4-compiler-flags.patch b/net-misc/tlsdate/files/tlsdate-0.0.4-compiler-flags.patch
new file mode 100644
index 000000000000..dbccaabe597f
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdate-0.0.4-compiler-flags.patch
@@ -0,0 +1,72 @@
+fix in upstream now
+
+From 8b94e111e58fc5d8a2cf47effaaf410a6e4eca46 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 18 Dec 2012 15:38:51 -0500
+Subject: [PATCH] make hardened compiler flags optional
+
+First note: the default behavior is unchanged.
+
+For people building tlsdate themselves with a known toolchain env, the
+checked flags can be redundant, or even harmful. A compile/link check
+for PIE behavior for example might not catch the full supported status
+for some architectures/C libraries.
+
+Further, the current code starts by throwing away the user's compiler
+settings which can also be harmful. Those often times include settings
+related to ABI or target cpu selection and ignoring them can produce an
+unusable binary.
+
+So add a flag that people (including distros) can leverage to bypass
+all of the checks.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ configure.ac | 27 ++++++++++++++++++---------
+ 1 file changed, 18 insertions(+), 9 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 555ae28..f6efb0b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -67,19 +67,28 @@ AC_SUBST(RT_LIB)
+
+ # Debug and hardening flags all in one shot
+ # Alwas do this at the end, otherwise you end up filtering system/other libraries
++AC_ARG_ENABLE([hardened-checks],
++ [AS_HELP_STRING([--disable-hardened-checks],
++ [Disable automatically enabling hardened toolchain options])])
+ AC_DEFUN([LOCAL_CHECK_FLAGS],[
+ AC_REQUIRE([AX_CHECK_LINK_FLAG])
+ AC_REQUIRE([AX_APPEND_COMPILE_FLAGS])
+ AC_LANG_PUSH([C])
+- CFLAGS=
+- LIBS=
+- AX_APPEND_COMPILE_FLAGS([-g -O1 -Wall])
+- AX_APPEND_COMPILE_FLAGS([-fno-strict-aliasing])
+- AX_APPEND_COMPILE_FLAGS([-D_FORTIFY_SOURCE=2 -fstack-protector-all])
+- AX_APPEND_COMPILE_FLAGS([-fwrapv -fPIE -Wstack-protector])
+- AX_APPEND_COMPILE_FLAGS([--param=ssp-buffer-size=1])
+- AX_CHECK_LINK_FLAG([-z relro -z now])
+- AX_CHECK_LINK_FLAG([-pie])
++ AS_IF([test "x$enable_hardened_checks" != xno], [
++ CFLAGS=
++ LIBS=
++ AX_APPEND_COMPILE_FLAGS([-g -O1])
++ ], [
++ AC_MSG_WARN([using hardened flags is HIGHLY RECOMMENDED and disabling them is a BAD IDEA])
++ ])
++ AX_APPEND_COMPILE_FLAGS([-Wall -fno-strict-aliasing])
++ AS_IF([test "x$enable_hardened_checks" != xno], [
++ AX_APPEND_COMPILE_FLAGS([-D_FORTIFY_SOURCE=2 -fstack-protector-all])
++ AX_APPEND_COMPILE_FLAGS([-fwrapv -fPIE -Wstack-protector])
++ AX_APPEND_COMPILE_FLAGS([--param=ssp-buffer-size=1])
++ AX_CHECK_LINK_FLAG([-z relro -z now])
++ AX_CHECK_LINK_FLAG([-pie])
++ ])
+ AC_LANG_POP
+ ])
+ LOCAL_CHECK_FLAGS
+--
+1.8.0
+
diff --git a/net-misc/tlsdate/files/tlsdate-0.0.4-configure-user-group.patch b/net-misc/tlsdate/files/tlsdate-0.0.4-configure-user-group.patch
new file mode 100644
index 000000000000..8cd2472cf44e
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdate-0.0.4-configure-user-group.patch
@@ -0,0 +1,66 @@
+From e6edd1f581b59dffbc1e21d2221af049a5f0b38a Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Wed, 19 Dec 2012 15:48:22 -0500
+Subject: [PATCH] add configure flags for setting droppriv user/group
+
+In order to override the default user/group, you have to append your
+CPPFLAGS before compiling. Since you also have to pass along double
+quotes, it can get ugly/messy fast in shell (due to the escaping).
+Plus, the existing code always defines UNPRIV_USER to "nobody" which
+leads to compile time warnings.
+
+Add dedicated configure flags to make the interface simple for people
+to control.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ configure.ac | 20 ++++++++++++++++++++
+ src/tlsdate.h | 1 -
+ 2 files changed, 20 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index f6efb0b..c95090e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -57,6 +57,26 @@ AC_CHECK_HEADERS([unistd.h], ,[AC_MSG_ERROR([Required headers missing; compilati
+ AC_CHECK_FUNCS([setresuid])
+ AC_CHECK_FUNCS([gettimeofday])
+
++AC_MSG_CHECKING([user/group to drop privs to])
++
++AC_ARG_WITH([unpriv-user],
++ [AS_HELP_STRING([--with-unpriv-user=<user>],
++ [User to drop privs to @<:@default: nobody@:>@])])
++AS_CASE([$with_unpriv_user],
++ [""|yes|no], [UNPRIV_USER="nobody"],
++ [*], [UNPRIV_USER=$with_unpriv_user])
++AC_DEFINE_UNQUOTED([UNPRIV_USER], ["${UNPRIV_USER}"], [Unprivileged user])
++
++AC_ARG_WITH([unpriv-group],
++ [AS_HELP_STRING([--with-unpriv-group=<group>],
++ [Group to drop privs to @<:@default: nogroup@:>@])])
++AS_CASE([$with_unpriv_group],
++ [""|yes|no], [UNPRIV_GROUP="nogroup"],
++ [*], [UNPRIV_GROUP=$with_unpriv_group])
++AC_DEFINE_UNQUOTED([UNPRIV_GROUP], ["${UNPRIV_GROUP}"], [Unprivileged group])
++
++AC_MSG_RESULT(${UNPRIV_USER}:${UNPRIV_GROUP})
++
+ # Check for -lrt
+ AC_CHECK_LIB([rt], [clock_gettime], [
+ RT_LIB="-lrt"
+diff --git a/src/tlsdate.h b/src/tlsdate.h
+index 4db56c1..4c918cd 100644
+--- a/src/tlsdate.h
++++ b/src/tlsdate.h
+@@ -18,7 +18,6 @@
+ #include <time.h>
+ #include <unistd.h>
+
+-#define UNPRIV_USER "nobody"
+ #define DEFAULT_HOST "www.ptb.de"
+ #define DEFAULT_PORT "443"
+ #define DEFAULT_PROTOCOL "tlsv1"
+--
+1.8.0
+
diff --git a/net-misc/tlsdate/files/tlsdate.confd b/net-misc/tlsdate/files/tlsdate.confd
new file mode 100644
index 000000000000..2d7ed030de33
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdate.confd
@@ -0,0 +1,8 @@
+# config file for /etc/init.d/tlsdate
+
+# Command to execute to set the time.
+# This are some common tlsdate options:
+# -l: leap (set time regardless of difference)
+# -H: hostname to sync with
+# -x: proxy URL
+TLSDATE_OPTS="-l -H www.google.com"
diff --git a/net-misc/tlsdate/files/tlsdate.rc b/net-misc/tlsdate/files/tlsdate.rc
new file mode 100755
index 000000000000..95ee306745c6
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdate.rc
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="set time once when started"
+
+depend() {
+ use net
+}
+
+start() {
+ : ${TLSDATE_CMD:=tlsdate}
+ ebegin "Setting clock via tlsdate '${TLSDATE_CMD}'"
+ "${TLSDATE_CMD}" ${TLSDATE_OPTS}
+ eend $? "Failed to set clock"
+}
diff --git a/net-misc/tlsdate/files/tlsdated.confd b/net-misc/tlsdate/files/tlsdated.confd
new file mode 100644
index 000000000000..d257289cc58d
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdated.confd
@@ -0,0 +1,15 @@
+# config file for /etc/init.d/tlsdated
+
+# Command to execute to set the time.
+# This are some common tlsdate options:
+# -l: leap (set time regardless of difference)
+# -H: hostname to sync with
+# -x: proxy URL
+TLSDATED_CMD="/usr/bin/tlsdate -l -H www.google.com"
+
+# Additional options; see `man tlsdated` for reference.
+TLSDATED_OPTS=""
+
+# Cache dir. Probably don't need to change this.
+# It matches the compiled-in default.
+TLSDATED_CACHE_DIR="/var/cache/tlsdated"
diff --git a/net-misc/tlsdate/files/tlsdated.rc b/net-misc/tlsdate/files/tlsdated.rc
new file mode 100755
index 000000000000..cc56fbaa03ca
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdated.rc
@@ -0,0 +1,19 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="start a daemon to continuously set time via a helper"
+
+command="tlsdated"
+command_args="${TLSDATED_OPTS} -- ${TLSDATED_CMD}"
+command_background="true"
+pidfile="/var/run/${SVCNAME}.pid"
+
+depend() {
+ use net
+}
+
+start_pre() {
+ checkpath -d -m 0700 -o tlsdate:tlsdate "${TLSDATED_CACHE_DIR}"
+}
diff --git a/net-misc/tlsdate/metadata.xml b/net-misc/tlsdate/metadata.xml
new file mode 100644
index 000000000000..4fd0b3758172
--- /dev/null
+++ b/net-misc/tlsdate/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>vapier@gentoo.org</email>
+ <description>feel free to fix things</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ioerror/tlsdate</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/tlsdate/tlsdate-0.0.1.ebuild b/net-misc/tlsdate/tlsdate-0.0.1.ebuild
new file mode 100644
index 000000000000..4cb900bec5bd
--- /dev/null
+++ b/net-misc/tlsdate/tlsdate-0.0.1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools vcs-snapshot flag-o-matic
+
+DESCRIPTION="Update local time over HTTPS"
+HOMEPAGE="https://github.com/ioerror/tlsdate"
+SRC_URI="https://github.com/ioerror/tlsdate/tarball/${P} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+DEPEND="dev-libs/openssl"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i -r '/^(C|LD)FLAGS/d' configure.ac || die
+ eautoreconf
+ append-cppflags "-DUNPRIV_GROUP='\"nobody\"'"
+}
diff --git a/net-misc/tlsdate/tlsdate-0.0.11.ebuild b/net-misc/tlsdate/tlsdate-0.0.11.ebuild
new file mode 100644
index 000000000000..af40b10df5a8
--- /dev/null
+++ b/net-misc/tlsdate/tlsdate-0.0.11.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools vcs-snapshot user
+
+DESCRIPTION="Update local time over HTTPS"
+HOMEPAGE="https://github.com/ioerror/tlsdate"
+SRC_URI="https://github.com/ioerror/tlsdate/tarball/${P} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="dbus +seccomp static-libs"
+
+DEPEND="dev-libs/openssl
+ dbus? ( sys-apps/dbus )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable dbus) \
+ $(use_enable seccomp seccomp-filter) \
+ --disable-hardened-checks \
+ --with-unpriv-user=tlsdate \
+ --with-unpriv-group=tlsdate
+}
+
+src_install() {
+ default
+
+ # Use Google servers by default rather than a random German site.
+ # They provide round robin DNS and local servers automatically.
+ rm "${ED}"/etc/tlsdate/ca-roots/tlsdate-ca-roots.conf || die #446426
+ dosym "${EPREFIX}"/etc/ssl/certs/Equifax_Secure_CA.pem \
+ /etc/tlsdate/ca-roots/tlsdate-ca-roots.conf
+ sed -i \
+ -e 's:www.ptb.de:www.google.com:' \
+ "${ED}"/etc/tlsdate/tlsdated.conf || die
+
+ newinitd "${FILESDIR}"/tlsdated.rc tlsdated
+ newconfd "${FILESDIR}"/tlsdated.confd tlsdated
+ newinitd "${FILESDIR}"/tlsdate.rc tlsdate
+ newconfd "${FILESDIR}"/tlsdate.confd tlsdate
+ use static-libs || \
+ find "${ED}"/usr '(' -name '*.la' -o -name '*.a' ')' -delete
+}
+
+pkg_preinst() {
+ enewgroup tlsdate 124
+ enewuser tlsdate 124 -1 /dev/null tlsdate
+}
diff --git a/net-misc/tlsdate/tlsdate-0.0.12-r1.ebuild b/net-misc/tlsdate/tlsdate-0.0.12-r1.ebuild
new file mode 100644
index 000000000000..80577352c24c
--- /dev/null
+++ b/net-misc/tlsdate/tlsdate-0.0.12-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools vcs-snapshot user
+
+DESCRIPTION="Update local time over HTTPS"
+HOMEPAGE="https://github.com/ioerror/tlsdate"
+SRC_URI="https://github.com/ioerror/tlsdate/tarball/${P} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm x86"
+IUSE="dbus +seccomp static-libs"
+
+DEPEND="dev-libs/openssl
+ dev-libs/libevent
+ dbus? ( sys-apps/dbus )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # Use Google servers by default rather than a random German site.
+ # They provide round robin DNS and local servers automatically.
+ sed -i \
+ -e 's:www.ptb.de:www.google.com:' \
+ etc/tlsdated.conf \
+ src/tlsdate.h || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable dbus) \
+ $(use_enable seccomp seccomp-filter) \
+ --disable-hardened-checks \
+ --without-polarssl \
+ --with-unpriv-user=tlsdate \
+ --with-unpriv-group=tlsdate
+}
+
+src_install() {
+ default
+
+ # only install cert required for www.google.com
+ rm "${ED}"/etc/tlsdate/ca-roots/tlsdate-ca-roots.conf || die #446426
+ dosym "${EPREFIX}"/etc/ssl/certs/Equifax_Secure_CA.pem \
+ /etc/tlsdate/ca-roots/tlsdate-ca-roots.conf
+
+ newinitd "${FILESDIR}"/tlsdated.rc tlsdated
+ newconfd "${FILESDIR}"/tlsdated.confd tlsdated
+ newinitd "${FILESDIR}"/tlsdate.rc tlsdate
+ newconfd "${FILESDIR}"/tlsdate.confd tlsdate
+
+ insinto /etc/dbus-1/system.d/
+ doins dbus/org.torproject.tlsdate.conf
+
+ use static-libs || \
+ find "${ED}"/usr '(' -name '*.la' -o -name '*.a' ')' -delete
+}
+
+pkg_preinst() {
+ enewgroup tlsdate 124
+ enewuser tlsdate 124 -1 /dev/null tlsdate
+}
diff --git a/net-misc/tlsdate/tlsdate-0.0.12-r2.ebuild b/net-misc/tlsdate/tlsdate-0.0.12-r2.ebuild
new file mode 100644
index 000000000000..80c446e4047c
--- /dev/null
+++ b/net-misc/tlsdate/tlsdate-0.0.12-r2.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools vcs-snapshot user
+
+DESCRIPTION="Update local time over HTTPS"
+HOMEPAGE="https://github.com/ioerror/tlsdate"
+SRC_URI="https://github.com/ioerror/tlsdate/tarball/${P} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~mips ~x86"
+IUSE="dbus +seccomp static-libs"
+
+DEPEND="dev-libs/openssl
+ dev-libs/libevent
+ dbus? ( sys-apps/dbus )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # Use the system cert store rather than a custom one specific
+ # to the tlsdate package. #534394
+ sed -i \
+ -e 's:/tlsdate/ca-roots/tlsdate-ca-roots.conf:/ssl/certs/ca-certificates.crt:' \
+ Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-silent-rules \
+ $(use_enable dbus) \
+ $(use_enable seccomp seccomp-filter) \
+ --disable-hardened-checks \
+ --without-polarssl \
+ --with-unpriv-user=tlsdate \
+ --with-unpriv-group=tlsdate
+}
+
+src_install() {
+ default
+
+ # Use Google servers by default rather than a random German site.
+ # They provide round robin DNS and local servers automatically.
+ sed -i \
+ -e 's:www.ptb.de:www.google.com:' \
+ "${ED}"/etc/tlsdate/tlsdated.conf || die
+
+ # Use the system cert store; see src_prepare. #446426 #534394
+ rm "${ED}"/etc/tlsdate/ca-roots/tlsdate-ca-roots.conf || die
+ rmdir "${ED}"/etc/tlsdate/ca-roots || die
+
+ newinitd "${FILESDIR}"/tlsdated.rc tlsdated
+ newconfd "${FILESDIR}"/tlsdated.confd tlsdated
+ newinitd "${FILESDIR}"/tlsdate.rc tlsdate
+ newconfd "${FILESDIR}"/tlsdate.confd tlsdate
+
+ insinto /etc/dbus-1/system.d/
+ doins dbus/org.torproject.tlsdate.conf
+
+ use static-libs || \
+ find "${ED}"/usr '(' -name '*.la' -o -name '*.a' ')' -delete
+}
+
+pkg_preinst() {
+ enewgroup tlsdate 124
+ enewuser tlsdate 124 -1 /dev/null tlsdate
+}
diff --git a/net-misc/tlsdate/tlsdate-0.0.12.ebuild b/net-misc/tlsdate/tlsdate-0.0.12.ebuild
new file mode 100644
index 000000000000..af40b10df5a8
--- /dev/null
+++ b/net-misc/tlsdate/tlsdate-0.0.12.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools vcs-snapshot user
+
+DESCRIPTION="Update local time over HTTPS"
+HOMEPAGE="https://github.com/ioerror/tlsdate"
+SRC_URI="https://github.com/ioerror/tlsdate/tarball/${P} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="dbus +seccomp static-libs"
+
+DEPEND="dev-libs/openssl
+ dbus? ( sys-apps/dbus )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable dbus) \
+ $(use_enable seccomp seccomp-filter) \
+ --disable-hardened-checks \
+ --with-unpriv-user=tlsdate \
+ --with-unpriv-group=tlsdate
+}
+
+src_install() {
+ default
+
+ # Use Google servers by default rather than a random German site.
+ # They provide round robin DNS and local servers automatically.
+ rm "${ED}"/etc/tlsdate/ca-roots/tlsdate-ca-roots.conf || die #446426
+ dosym "${EPREFIX}"/etc/ssl/certs/Equifax_Secure_CA.pem \
+ /etc/tlsdate/ca-roots/tlsdate-ca-roots.conf
+ sed -i \
+ -e 's:www.ptb.de:www.google.com:' \
+ "${ED}"/etc/tlsdate/tlsdated.conf || die
+
+ newinitd "${FILESDIR}"/tlsdated.rc tlsdated
+ newconfd "${FILESDIR}"/tlsdated.confd tlsdated
+ newinitd "${FILESDIR}"/tlsdate.rc tlsdate
+ newconfd "${FILESDIR}"/tlsdate.confd tlsdate
+ use static-libs || \
+ find "${ED}"/usr '(' -name '*.la' -o -name '*.a' ')' -delete
+}
+
+pkg_preinst() {
+ enewgroup tlsdate 124
+ enewuser tlsdate 124 -1 /dev/null tlsdate
+}
diff --git a/net-misc/tlsdate/tlsdate-0.0.13.ebuild b/net-misc/tlsdate/tlsdate-0.0.13.ebuild
new file mode 100644
index 000000000000..51e13a5af0c9
--- /dev/null
+++ b/net-misc/tlsdate/tlsdate-0.0.13.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools vcs-snapshot user
+
+DESCRIPTION="Update local time over HTTPS"
+HOMEPAGE="https://github.com/ioerror/tlsdate"
+SRC_URI="https://github.com/ioerror/tlsdate/tarball/${P} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~mips ~x86"
+IUSE="dbus +seccomp static-libs"
+
+DEPEND="dev-libs/openssl
+ dev-libs/libevent
+ dbus? ( sys-apps/dbus )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # Use the system cert store rather than a custom one specific
+ # to the tlsdate package. #534394
+ sed -i \
+ -e 's:/tlsdate/ca-roots/tlsdate-ca-roots.conf:/ssl/certs/ca-certificates.crt:' \
+ Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-silent-rules \
+ $(use_enable dbus) \
+ $(use_enable seccomp seccomp-filter) \
+ --disable-hardened-checks \
+ --without-polarssl \
+ --with-unpriv-user=tlsdate \
+ --with-unpriv-group=tlsdate
+}
+
+src_install() {
+ default
+
+ # Use the system cert store; see src_prepare. #446426 #534394
+ rm "${ED}"/etc/tlsdate/ca-roots/tlsdate-ca-roots.conf || die
+ rmdir "${ED}"/etc/tlsdate/ca-roots || die
+
+ newinitd "${FILESDIR}"/tlsdated.rc tlsdated
+ newconfd "${FILESDIR}"/tlsdated.confd tlsdated
+ newinitd "${FILESDIR}"/tlsdate.rc tlsdate
+ newconfd "${FILESDIR}"/tlsdate.confd tlsdate
+
+ insinto /etc/dbus-1/system.d/
+ doins dbus/org.torproject.tlsdate.conf
+
+ use static-libs || \
+ find "${ED}"/usr '(' -name '*.la' -o -name '*.a' ')' -delete
+}
+
+pkg_preinst() {
+ enewgroup tlsdate 124
+ enewuser tlsdate 124 -1 /dev/null tlsdate
+}
diff --git a/net-misc/tlsdate/tlsdate-0.0.4-r1.ebuild b/net-misc/tlsdate/tlsdate-0.0.4-r1.ebuild
new file mode 100644
index 000000000000..61417bf6f2a6
--- /dev/null
+++ b/net-misc/tlsdate/tlsdate-0.0.4-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools vcs-snapshot flag-o-matic
+
+DESCRIPTION="Update local time over HTTPS"
+HOMEPAGE="https://github.com/ioerror/tlsdate"
+SRC_URI="https://github.com/ioerror/tlsdate/tarball/${P} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="static-libs"
+
+DEPEND="dev-libs/openssl"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i -r '/^[[:space:]]AX_(APPEND_COMPILE_FLAGS|CHECK_LINK_FLAG)[(]/d' configure.ac || die
+ eautoreconf
+ append-cppflags "-DUNPRIV_GROUP='\"nobody\"'"
+}
+
+src_install() {
+ default
+ rm -r "${ED}"/etc || die #446426
+ newinitd "${FILESDIR}"/tlsdated.rc tlsdated
+ newconfd "${FILESDIR}"/tlsdated.confd tlsdated
+ newinitd "${FILESDIR}"/tlsdate.rc tlsdate
+ newconfd "${FILESDIR}"/tlsdate.confd tlsdate
+ use static-libs || \
+ find "${ED}"/usr '(' -name '*.la' -o -name '*.a' ')' -delete
+}
diff --git a/net-misc/tlsdate/tlsdate-0.0.4-r2.ebuild b/net-misc/tlsdate/tlsdate-0.0.4-r2.ebuild
new file mode 100644
index 000000000000..d5446efbee28
--- /dev/null
+++ b/net-misc/tlsdate/tlsdate-0.0.4-r2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools vcs-snapshot eutils user
+
+DESCRIPTION="Update local time over HTTPS"
+HOMEPAGE="https://github.com/ioerror/tlsdate"
+SRC_URI="https://github.com/ioerror/tlsdate/tarball/${P} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="static-libs"
+
+DEPEND="dev-libs/openssl"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-compiler-flags.patch
+ epatch "${FILESDIR}"/${P}-configure-user-group.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-hardened-checks \
+ --with-unpriv-user=tlsdate \
+ --with-unpriv-group=tlsdate
+}
+
+src_install() {
+ default
+ rm -r "${ED}"/etc || die #446426
+ newinitd "${FILESDIR}"/tlsdated.rc tlsdated
+ newconfd "${FILESDIR}"/tlsdated.confd tlsdated
+ newinitd "${FILESDIR}"/tlsdate.rc tlsdate
+ newconfd "${FILESDIR}"/tlsdate.confd tlsdate
+ use static-libs || \
+ find "${ED}"/usr '(' -name '*.la' -o -name '*.a' ')' -delete
+}
+
+pkg_preinst() {
+ enewgroup tlsdate 124
+ enewuser tlsdate 124 -1 /dev/null tlsdate
+}
diff --git a/net-misc/tlsdate/tlsdate-0.0.4.ebuild b/net-misc/tlsdate/tlsdate-0.0.4.ebuild
new file mode 100644
index 000000000000..c4e66d2d1827
--- /dev/null
+++ b/net-misc/tlsdate/tlsdate-0.0.4.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools vcs-snapshot flag-o-matic
+
+DESCRIPTION="Update local time over HTTPS"
+HOMEPAGE="https://github.com/ioerror/tlsdate"
+SRC_URI="https://github.com/ioerror/tlsdate/tarball/${P} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="static-libs"
+
+DEPEND="dev-libs/openssl"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i -r '/^[[:space:]]AX_(APPEND_COMPILE_FLAGS|CHECK_LINK_FLAG)[(]/d' configure.ac || die
+ eautoreconf
+ append-cppflags "-DUNPRIV_GROUP='\"nobody\"'"
+}
+
+src_install() {
+ default
+ use static-libs || \
+ find "${ED}"/usr '(' -name '*.la' -o -name '*.a' ')' -delete
+}
diff --git a/net-misc/tlsdate/tlsdate-0.0.5.ebuild b/net-misc/tlsdate/tlsdate-0.0.5.ebuild
new file mode 100644
index 000000000000..1bdbe9680ff4
--- /dev/null
+++ b/net-misc/tlsdate/tlsdate-0.0.5.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools vcs-snapshot eutils user
+
+DESCRIPTION="Update local time over HTTPS"
+HOMEPAGE="https://github.com/ioerror/tlsdate"
+SRC_URI="https://github.com/ioerror/tlsdate/tarball/${P} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="dbus static-libs"
+
+DEPEND="dev-libs/openssl
+ dbus? ( sys-apps/dbus )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable dbus) \
+ --disable-hardened-checks \
+ --with-unpriv-user=tlsdate \
+ --with-unpriv-group=tlsdate
+}
+
+src_install() {
+ default
+ rm -r "${ED}"/etc || die #446426
+ newinitd "${FILESDIR}"/tlsdated.rc tlsdated
+ newconfd "${FILESDIR}"/tlsdated.confd tlsdated
+ newinitd "${FILESDIR}"/tlsdate.rc tlsdate
+ newconfd "${FILESDIR}"/tlsdate.confd tlsdate
+ use static-libs || \
+ find "${ED}"/usr '(' -name '*.la' -o -name '*.a' ')' -delete
+}
+
+pkg_preinst() {
+ enewgroup tlsdate 124
+ enewuser tlsdate 124 -1 /dev/null tlsdate
+}
diff --git a/net-misc/tlsdate/tlsdate-0.0.6.ebuild b/net-misc/tlsdate/tlsdate-0.0.6.ebuild
new file mode 100644
index 000000000000..b547fc024344
--- /dev/null
+++ b/net-misc/tlsdate/tlsdate-0.0.6.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools vcs-snapshot eutils user
+
+DESCRIPTION="Update local time over HTTPS"
+HOMEPAGE="https://github.com/ioerror/tlsdate"
+SRC_URI="https://github.com/ioerror/tlsdate/tarball/${P} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm x86"
+IUSE="dbus static-libs"
+
+DEPEND="dev-libs/openssl
+ dbus? ( sys-apps/dbus )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable dbus) \
+ --disable-hardened-checks \
+ --with-unpriv-user=tlsdate \
+ --with-unpriv-group=tlsdate
+}
+
+src_install() {
+ default
+ rm -r "${ED}"/etc || die #446426
+ newinitd "${FILESDIR}"/tlsdated.rc tlsdated
+ newconfd "${FILESDIR}"/tlsdated.confd tlsdated
+ newinitd "${FILESDIR}"/tlsdate.rc tlsdate
+ newconfd "${FILESDIR}"/tlsdate.confd tlsdate
+ use static-libs || \
+ find "${ED}"/usr '(' -name '*.la' -o -name '*.a' ')' -delete
+}
+
+pkg_preinst() {
+ enewgroup tlsdate 124
+ enewuser tlsdate 124 -1 /dev/null tlsdate
+}
diff --git a/net-misc/tn5250/Manifest b/net-misc/tn5250/Manifest
new file mode 100644
index 000000000000..3529cfcaee32
--- /dev/null
+++ b/net-misc/tn5250/Manifest
@@ -0,0 +1 @@
+DIST tn5250-0.17.4.tar.gz 648452 SHA256 354237d400dc46af887cb3ffa4ed1f2c371f5b8bee8be046a683a4ac9db4f9c5
diff --git a/net-misc/tn5250/metadata.xml b/net-misc/tn5250/metadata.xml
new file mode 100644
index 000000000000..5d6ac4ce30c5
--- /dev/null
+++ b/net-misc/tn5250/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>neurogeek@gentoo.org</email>
+ <name>Jesus Rivero</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">tn5250</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/tn5250/tn5250-0.17.4.ebuild b/net-misc/tn5250/tn5250-0.17.4.ebuild
new file mode 100644
index 000000000000..adf8e9992589
--- /dev/null
+++ b/net-misc/tn5250/tn5250-0.17.4.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils python
+
+DESCRIPTION="Telnet client for the IBM AS/400 that emulates 5250 terminals and printers"
+HOMEPAGE="http://tn5250.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ppc ~sparc x86"
+IUSE="X ssl"
+
+RDEPEND="sys-libs/ncurses
+ ssl? ( dev-libs/openssl )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-libs/libXt )"
+
+src_unpack() {
+ unpack ${A}
+
+ # Next, the Makefile for the terminfo settings tries to remove
+ # some files it doesn't have access to. We can just remove those
+ # lines.
+ cd "${S}/linux"
+ sed -i \
+ -e "/rm -f \/usr\/.*\/terminfo.*5250/d" Makefile.in \
+ || die "sed Makefile.in failed"
+ cd "${S}"
+}
+
+src_compile() {
+ econf \
+ $(use_with X x) \
+ $(use_with ssl) || die
+ emake || die "emake failed"
+}
+
+src_install() {
+ # The TERMINFO variable needs to be defined for the install
+ # to work, because the install calls "tic." man tic for
+ # details.
+ dodir /usr/share/terminfo
+ make DESTDIR="${D}" \
+ TERMINFO="${D}/usr/share/terminfo" install \
+ || die "make install failed"
+
+ dodoc AUTHORS NEWS README README.ssl TODO ChangeLog
+}
diff --git a/net-misc/tokyotyrant/Manifest b/net-misc/tokyotyrant/Manifest
new file mode 100644
index 000000000000..152c351b12d1
--- /dev/null
+++ b/net-misc/tokyotyrant/Manifest
@@ -0,0 +1 @@
+DIST tokyotyrant-1.1.41.tar.gz 196196 SHA256 42af70fb9f2795d4e05c3e37941ce392a9eaafc991e230c48115370f6d64b88f SHA512 fb181ecab19981733b4b478614f9b28d7f1f776bafe6c58c4bc3e26ed294301a6242d7cd1d47b7d6b55a93305474d2e8e0a75f2f01af21a8bc93d158c8f8179e WHIRLPOOL a4bc53f222e3a210af6b4c1d7ed7a6f345e457b84de166535758a9459ceab9b07ee9a2654affd85980bdec1ebaaf9c287f80d7938276dc24e3be959a408b5320
diff --git a/net-misc/tokyotyrant/files/fix_makefiles-1.4.41.patch b/net-misc/tokyotyrant/files/fix_makefiles-1.4.41.patch
new file mode 100644
index 000000000000..40d26cc5f93a
--- /dev/null
+++ b/net-misc/tokyotyrant/files/fix_makefiles-1.4.41.patch
@@ -0,0 +1,85 @@
+diff --git a/Makefile.in b/Makefile.in
+index b388455..52d3bc3 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -58,8 +58,8 @@ CFLAGS = @MYCFLAGS@
+ LDFLAGS = @MYLDFLAGS@
+ CMDLDFLAGS = @MYCMDLDFLAGS@
+ LIBS = @LIBS@
+-LDENV = LD_RUN_PATH=/lib:/usr/lib:$(LIBDIR):$(HOME)/lib:/usr/local/lib:@MYRUNPATH@:.
+-RUNENV = @MYLDLIBPATHENV@=.:/lib:/usr/lib:$(LIBDIR):$(HOME)/lib:/usr/local/lib:@MYRUNPATH@
++LDENV =
++RUNENV = @MYLDLIBPATHENV@=.:$(LIBDIR)
+ POSTCMD = @MYPOSTCMD@
+
+
+@@ -120,10 +120,6 @@ install :
+ cp -Rf $(LIBRARYFILES) $(DESTDIR)$(LIBDIR)
+ mkdir -p $(DESTDIR)$(BINDIR)
+ cp -Rf $(COMMANDFILES) $(DESTDIR)$(BINDIR)
+- mkdir -p $(DESTDIR)$(SBINDIR)
+- cp -Rf $(INITFILES) $(DESTDIR)$(SBINDIR)
+- mkdir -p $(DESTDIR)$(DATADIR)
+- cp -Rf $(SCREXTFILES) $(DOCUMENTFILES) $(DESTDIR)$(DATADIR)
+ mkdir -p $(DESTDIR)$(MAN1DIR)
+ cd man && cp -Rf $(MAN1FILES) $(DESTDIR)$(MAN1DIR)
+ mkdir -p $(DESTDIR)$(MAN3DIR)
+@@ -132,7 +128,6 @@ install :
+ cd man && cp -Rf $(MAN8FILES) $(DESTDIR)$(MAN8DIR)
+ mkdir -p $(DESTDIR)$(PCDIR)
+ cp -Rf $(PCFILES) $(DESTDIR)$(PCDIR)
+- [ "$$UID" == 0 ] && ldconfig || true
+ @printf '\n'
+ @printf '#================================================================\n'
+ @printf '# Thanks for using Tokyo Tyrant.\n'
+diff --git a/configure.in b/configure.in
+index fbe0c71..809a839 100644
+--- a/configure.in
++++ b/configure.in
+@@ -28,33 +28,15 @@ MYDOCUMENTFILES="COPYING ChangeLog THANKS doc tokyotyrant.idl"
+ MYPCFILES="tokyotyrant.pc"
+
+ # Building flags
+-MYCFLAGS="-std=c99 -Wall -fPIC -fsigned-char -O2"
++MYCFLAGS="-std=c99 -Wall -fPIC -fsigned-char"
+ MYCPPFLAGS="-I. -I\$(INCLUDEDIR) -I$HOME/include -I/usr/local/include"
+ MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1 -D_REENTRANT -D__EXTENSIONS__"
+-MYLDFLAGS="-L. -L\$(LIBDIR) -L$HOME/lib -L/usr/local/lib"
++MYLDFLAGS="-L. -L\$(LIBDIR)"
+ MYCMDLDFLAGS=""
+ MYRUNPATH="\$(LIBDIR)"
+ MYLDLIBPATHENV="LD_LIBRARY_PATH"
+ MYPOSTCMD="true"
+
+-# Building paths
+-PATH="$PATH:$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
+-PATH="$PATH:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/xpg4/bin:/usr/xpg6/bin:/usr/ucb"
+-CPATH="$HOME/include:/usr/local/include:$CPATH"
+-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"
+-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"
+-PKG_CONFIG_PATH="$HOME/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
+-export PATH CPATH LIBRARY_PATH LD_LIBRARY_PATH PKG_CONFIG_PATH
+-if type pkg-config > /dev/null 2>&1
+-then
+- PATH="$PATH:`pkg-config --variable=bindir tokyocabinet`"
+- CPATH="$CPATH:`pkg-config --variable=includedir tokyocabinet`"
+- LIBRARY_PATH="$LIBRARY_PATH:`pkg-config --variable=libdir tokyocabinet`"
+- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:`pkg-config --variable=libdir tokyocabinet`"
+-fi
+-
+-
+-
+ #================================================================
+ # Options
+ #================================================================
+diff --git a/tokyotyrant.pc.in b/tokyotyrant.pc.in
+index efb3749..efec1f6 100644
+--- a/tokyotyrant.pc.in
++++ b/tokyotyrant.pc.in
+@@ -10,5 +10,5 @@ datadir=@datadir@
+ Name: Tokyo Tyrant
+ Description: network interface of Tokyo Cabinet
+ Version: @PACKAGE_VERSION@
+-Libs: -L${libdir} -ltokyotyrant @LIBS@
++Libs: -L${libdir} -ltokyotyrant
+ Cflags: -I${includedir}
diff --git a/net-misc/tokyotyrant/files/fix_testsuite.patch b/net-misc/tokyotyrant/files/fix_testsuite.patch
new file mode 100644
index 000000000000..d48825381777
--- /dev/null
+++ b/net-misc/tokyotyrant/files/fix_testsuite.patch
@@ -0,0 +1,104 @@
+--- Makefile.in 2009-10-14 10:33:16.000000000 +0200
++++ Makefile.in.new 2009-10-14 10:27:39.000000000 +0200
+@@ -166,48 +166,49 @@
+
+
+ check :
++ $(RUNENV) $(RUNCMD) ./ttserver -dmn -host 127.0.0.1 -port 19781 -pid /tmp/tttest.pid /tmp/tttest.tch
+ $(RUNENV) $(RUNCMD) ./tcrmgr version
+- $(RUNENV) $(RUNCMD) ./tcrtest write -cnum 5 -tout 5 -rnd 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrtest write -cnum 5 -tout 5 -nr -rnd 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrtest write -cnum 5 -tout 5 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrtest read -cnum 5 -tout 5 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrtest read -cnum 5 -tout 5 -mul 5 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrtest remove -cnum 5 -tout 5 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrtest rcat -cnum 5 -tout 5 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrtest rcat -cnum 5 -tout 5 -shl 50 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrmgr vanish 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrtest rcat -cnum 5 -tout 5 -dad 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrtest rcat -cnum 5 -tout 5 -ext putcat -xlr 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrtest misc -cnum 5 -tout 5 127.0.0.1 5000
+- $(RUNENV) $(RUNCMD) ./tcrtest wicked -cnum 5 -tout 5 127.0.0.1 5000
+- $(RUNENV) $(RUNCMD) ./tcrmgr inform 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrmgr vanish 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrmttest write -tnum 5 127.0.0.1 5000
+- $(RUNENV) $(RUNCMD) ./tcrmttest read -tnum 5 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrmttest remove -tnum 5 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrmttest write -tnum 5 -ext putcat -rnd 127.0.0.1 5000
+- $(RUNENV) $(RUNCMD) ./tcrmttest typical -tnum 5 127.0.0.1 5000
+- $(RUNENV) $(RUNCMD) ./tcrmgr vanish 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrmgr put 127.0.0.1 one first
+- $(RUNENV) $(RUNCMD) ./tcrmgr put 127.0.0.1 two second
+- $(RUNENV) $(RUNCMD) ./tcrmgr put -dk 127.0.0.1 three third
+- $(RUNENV) $(RUNCMD) ./tcrmgr put -dc 127.0.0.1 three third
+- $(RUNENV) $(RUNCMD) ./tcrmgr put -dc 127.0.0.1 three third
+- $(RUNENV) $(RUNCMD) ./tcrmgr put -dc 127.0.0.1 three third
+- $(RUNENV) $(RUNCMD) ./tcrmgr put 127.0.0.1 four fourth
+- $(RUNENV) $(RUNCMD) ./tcrmgr put -dk 127.0.0.1 five fifth
+- $(RUNENV) $(RUNCMD) ./tcrmgr out 127.0.0.1 one
+- $(RUNENV) $(RUNCMD) ./tcrmgr out 127.0.0.1 two
+- $(RUNENV) $(RUNCMD) ./tcrmgr get 127.0.0.1 three > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr get 127.0.0.1 four > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr get 127.0.0.1 five > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr mget 127.0.0.1 one two three four five > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr misc 127.0.0.1 putlist six sixth seven seventh
+- $(RUNENV) $(RUNCMD) ./tcrmgr misc 127.0.0.1 outlist six
+- $(RUNENV) $(RUNCMD) ./tcrmgr misc 127.0.0.1 getlist three four five six > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr list -pv 127.0.0.1 > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr list -pv -fm f 127.0.0.1 > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr http -ih http://127.0.0.1:1978/five > check.out
++ $(RUNENV) $(RUNCMD) ./tcrtest write -port 19781 -cnum 5 -tout 5 -rnd 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrtest write -port 19781 -cnum 5 -tout 5 -nr -rnd 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrtest write -port 19781 -cnum 5 -tout 5 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrtest read -port 19781 -cnum 5 -tout 5 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrtest read -port 19781 -cnum 5 -tout 5 -mul 5 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrtest remove -port 19781 -cnum 5 -tout 5 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrtest rcat -port 19781 -cnum 5 -tout 5 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrtest rcat -port 19781 -cnum 5 -tout 5 -shl 50 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrmgr vanish -port 19781 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrtest rcat -port 19781 -cnum 5 -tout 5 -dad 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrtest rcat -port 19781 -cnum 5 -tout 5 -ext putcat -xlr 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrtest misc -port 19781 -cnum 5 -tout 5 127.0.0.1 5000
++ $(RUNENV) $(RUNCMD) ./tcrtest wicked -port 19781 -cnum 5 -tout 5 127.0.0.1 5000
++ $(RUNENV) $(RUNCMD) ./tcrmgr inform -port 19781 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrmgr vanish -port 19781 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrmttest write -port 19781 -tnum 5 127.0.0.1 5000
++ $(RUNENV) $(RUNCMD) ./tcrmttest read -port 19781 -tnum 5 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrmttest remove -port 19781 -tnum 5 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrmttest write -port 19781 -tnum 5 -ext putcat -rnd 127.0.0.1 5000
++ $(RUNENV) $(RUNCMD) ./tcrmttest typical -port 19781 -tnum 5 127.0.0.1 5000
++ $(RUNENV) $(RUNCMD) ./tcrmgr vanish -port 19781 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 127.0.0.1 one first
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 127.0.0.1 two second
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 -dk 127.0.0.1 three third
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 -dc 127.0.0.1 three third
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 -dc 127.0.0.1 three third
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 -dc 127.0.0.1 three third
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 127.0.0.1 four fourth
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 -dk 127.0.0.1 five fifth
++ $(RUNENV) $(RUNCMD) ./tcrmgr out -port 19781 127.0.0.1 one
++ $(RUNENV) $(RUNCMD) ./tcrmgr out -port 19781 127.0.0.1 two
++ $(RUNENV) $(RUNCMD) ./tcrmgr get -port 19781 127.0.0.1 three > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr get -port 19781 127.0.0.1 four > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr get -port 19781 127.0.0.1 five > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr mget -port 19781 127.0.0.1 one two three four five > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr misc -port 19781 127.0.0.1 putlist six sixth seven seventh
++ $(RUNENV) $(RUNCMD) ./tcrmgr misc -port 19781 127.0.0.1 outlist six
++ $(RUNENV) $(RUNCMD) ./tcrmgr misc -port 19781 127.0.0.1 getlist three four five six > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr list -port 19781 -pv 127.0.0.1 > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr list -port 19781 -pv -fm f 127.0.0.1 > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr http -ih http://127.0.0.1:19781/five > check.out
+ rm -rf ulog ; mkdir -p ulog
+ $(RUNENV) $(RUNCMD) ./ttultest write -lim 10000 ulog 5000
+ $(RUNENV) $(RUNCMD) ./ttultest write -lim 10000 -as ulog 5000
+@@ -215,6 +216,10 @@
+ rm -rf ulog ; mkdir -p ulog
+ $(RUNENV) $(RUNCMD) ./ttultest thread -lim 10000 ulog 5 5000
+ $(RUNENV) $(RUNCMD) ./ttultest thread -lim 10000 -as ulog 5 5000
++
++ kill `cat /tmp/tttest.pid`
++ rm /tmp/tttest.tch
++
+ @printf '\n'
+ @printf '#================================================================\n'
+ @printf '# Checking completed.\n'
diff --git a/net-misc/tokyotyrant/files/tokyotyrant.confd b/net-misc/tokyotyrant/files/tokyotyrant.confd
new file mode 100644
index 000000000000..b6417134f47c
--- /dev/null
+++ b/net-misc/tokyotyrant/files/tokyotyrant.confd
@@ -0,0 +1,15 @@
+# Tokyo tyrant config
+
+# Listening options
+TT_HOST=127.0.0.1
+TT_PORT=1978
+
+# Database file - please refer to man ttserver for alternatives
+TT_DB="/var/lib/tokyotyrant/casket.tch#bnum=1000000#opts=ld"
+
+# ttserver accepts a wide range of options, put them here
+TT_OPTS=""
+
+# don't change these
+TT_PID=/var/run/tokyotyrant/db.pid
+TT_LOG=/var/log/tokyotyrant/db.log \ No newline at end of file
diff --git a/net-misc/tokyotyrant/files/tokyotyrant.initd b/net-misc/tokyotyrant/files/tokyotyrant.initd
new file mode 100644
index 000000000000..edcc946ed4c4
--- /dev/null
+++ b/net-misc/tokyotyrant/files/tokyotyrant.initd
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+
+extra_commands="configtest reload"
+
+depend() {
+ need net
+}
+
+start() {
+ configtest || return 1
+ ebegin "Starting tokyo tyrant"
+ start-stop-daemon --start --exec /usr/bin/ttserver -- \
+ -pid ${TT_PID} -dmn -host ${TT_HOST} -log ${TT_LOG} \
+ -port ${TT_PORT} ${TT_OPTS} ${TT_DB}
+ eend $? "Failed to start tokyo tyrant"
+}
+
+stop() {
+ configtest || return 1
+ ebegin "Stopping tokyo tyrant"
+ start-stop-daemon --stop --pidfile ${TT_PID}
+ eend $? "Failed to stop tokyo tyrant"
+ rm -f ${TT_PID}
+}
+
+reload() {
+ configtest || return 1
+ ebegin "Gracefully restarting tokyo tyrant"
+ kill -HUP `cat ${TT_PID}` &>/dev/null
+ eend $? "Failed to reload tokyo tyrant"
+}
+
+configtest() {
+ if [ -z "${TT_DB}" ] || [ -z "${TT_PORT}" ] ; then
+ eerror "Please check your configuration"
+ eend $?
+ fi
+}
diff --git a/net-misc/tokyotyrant/metadata.xml b/net-misc/tokyotyrant/metadata.xml
new file mode 100644
index 000000000000..24cbb90cf0c4
--- /dev/null
+++ b/net-misc/tokyotyrant/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>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/tokyotyrant/tokyotyrant-1.1.41-r1.ebuild b/net-misc/tokyotyrant/tokyotyrant-1.1.41-r1.ebuild
new file mode 100644
index 000000000000..18454825f1d6
--- /dev/null
+++ b/net-misc/tokyotyrant/tokyotyrant-1.1.41-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils user
+
+DESCRIPTION="A network interface to Tokyo Cabinet"
+HOMEPAGE="http://fallabs.com/tokyotyrant/"
+SRC_URI="${HOMEPAGE}${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~ppc-macos ~x86-macos"
+IUSE="debug examples lua"
+
+DEPEND="dev-db/tokyocabinet
+ sys-libs/zlib
+ app-arch/bzip2
+ lua? ( dev-lang/lua )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ if use !prefix ; then
+ enewgroup tyrant
+ enewuser tyrant -1 -1 /var/lib/${PN} tyrant
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/fix_makefiles-1.4.41.patch
+ epatch "${FILESDIR}"/fix_testsuite.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable lua)
+}
+
+src_install() {
+ rm ttservctl || die "Install failed"
+ emake DESTDIR="${D}" install || die "Install failed"
+
+ for x in /var/{lib,run,log}/${PN}; do
+ dodir "${x}" || die "Install failed"
+ use prefix || fowners tyrant:tyrant "${x}"
+ done
+
+ if use examples; then
+ insinto /usr/share/${PF}/example
+ doins example/* || die "Install failed"
+ fi
+
+ dohtml doc/* || die
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN} || die "Install failed"
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} || die "Install failed"
+
+}
+
+src_test() {
+ emake -j1 check || die "Tests failed"
+}
diff --git a/net-misc/tor/Manifest b/net-misc/tor/Manifest
new file mode 100644
index 000000000000..6a42d2de1bdc
--- /dev/null
+++ b/net-misc/tor/Manifest
@@ -0,0 +1,3 @@
+DIST tor-0.2.6.10.tar.gz 3587211 SHA256 0542c0efe43b86619337862fa7eb02c7a74cb23a79d587090628a5f0f1224b8d SHA512 4d1fd794d48ada725af829e1c1f3f3b7d8d04f2d1dd22e4f175ddc49401834f2001f04d78b011cdc7e953fe44972f2859d87078489a08ae126b44f93f6b9a438 WHIRLPOOL ba2685454ecb0dd94c568e05fb14526cd06beea6e9c6f7b27328f85c555392b6f42f35dc7860ae25299a830c7f6643963a9b9719a2557c28a7216019c96caf21
+DIST tor-0.2.6.7.tar.gz 3595669 SHA256 8c2be88a542ed1b22a8d3d595ec0acd0e28191de273dbcaefc64fdce92b89e6c SHA512 96e3cb5bcafddb1655663091ecf08f708213e47529d9701d67256e88d5fc2e70acffc6c062df6b8f0f4a4e3ef3d0dda76b5127ef9eeee06371ce0a66e53815b0 WHIRLPOOL 5da1f3e2ed1c12a1efba3eee91016beeaa5c40434831e684bb33670ae301e1661096c4a4231cd345c5dd833e8547f71f0c28d22c6d4b51a43bd0d6603160973c
+DIST tor-0.2.7.2-alpha.tar.gz 4759260 SHA256 006de44b01e15916b1f648df92723c2a7d58e6a2cd05484d70d0af2f566b330c SHA512 92d099ecd84ab9fd480198bb902017be4a264cc1a60292fd5d8beea3901932cba47f219681a6edcd12c3bb9f9e8076e03266fb7a269160d6a59650fd6b2dc574 WHIRLPOOL abb1d36ca825620e2b2c82f46049d57f81c350cdb163cc006cd8bfce5eb74d20121b935a0984f30a49434176a35de08f355d56db9661549ab2bfa55f8b8d8439
diff --git a/net-misc/tor/files/README.gentoo b/net-misc/tor/files/README.gentoo
new file mode 100644
index 000000000000..35214ac6fbb5
--- /dev/null
+++ b/net-misc/tor/files/README.gentoo
@@ -0,0 +1,8 @@
+We created a configuration file for tor, /etc/tor/torrc, but you can
+change it according to your needs. Use the torrc.sample that is in
+that directory as a guide. Also, to have privoxy work with tor
+just add the following line
+
+forward-socks4a / localhost:9050 .
+
+to /etc/privoxy/config. Notice the . at the end!
diff --git a/net-misc/tor/files/tor-0.2.3.14_alpha-torrc.sample.patch b/net-misc/tor/files/tor-0.2.3.14_alpha-torrc.sample.patch
new file mode 100644
index 000000000000..1fa9d2856dc3
--- /dev/null
+++ b/net-misc/tor/files/tor-0.2.3.14_alpha-torrc.sample.patch
@@ -0,0 +1,31 @@
+diff -Naur tor-0.2.3.14-alpha.orig//src/config/torrc.sample.in tor-0.2.3.14-alpha/src/config/torrc.sample.in
+--- tor-0.2.3.14-alpha.orig//src/config/torrc.sample.in 2012-04-23 03:10:14.000000000 -0400
++++ tor-0.2.3.14-alpha/src/config/torrc.sample.in 2012-04-24 06:30:21.000000000 -0400
+@@ -12,6 +12,11 @@
+ ## Tor will look for this file in various places based on your platform:
+ ## https://www.torproject.org/docs/faq#torrc
+
++## Default username and group the server will run as
++User tor
++
++PIDFile /var/run/tor/tor.pid
++
+ ## Tor opens a socks proxy on port 9050 by default -- even if you don't
+ ## configure one below. Set "SocksPort 0" if you plan to run Tor only
+ ## as a relay, and not make any local application connections yourself.
+@@ -41,6 +46,7 @@
+ #Log notice syslog
+ ## To send all messages to stderr:
+ #Log debug stderr
++Log warn syslog
+
+ ## Uncomment this to start the process in the background... or use
+ ## --runasdaemon 1 on the command line. This is ignored on Windows;
+@@ -50,6 +56,7 @@
+ ## The directory for keeping all the keys/etc. By default, we store
+ ## things in $HOME/.tor on Unix, and in Application Data\tor on Windows.
+ #DataDirectory @LOCALSTATEDIR@/lib/tor
++DataDirectory /var/lib/tor/data
+
+ ## The port on which Tor will listen for local connections from Tor
+ ## controller applications, as documented in control-spec.txt.
diff --git a/net-misc/tor/files/tor.conf b/net-misc/tor/files/tor.conf
new file mode 100644
index 000000000000..188c041e5442
--- /dev/null
+++ b/net-misc/tor/files/tor.conf
@@ -0,0 +1 @@
+d /var/run/tor 0775 tor tor - -
diff --git a/net-misc/tor/files/tor.confd b/net-misc/tor/files/tor.confd
new file mode 100644
index 000000000000..4195bf3237b2
--- /dev/null
+++ b/net-misc/tor/files/tor.confd
@@ -0,0 +1,3 @@
+#
+# Set the file limit
+rc_ulimit="-n 30000"
diff --git a/net-misc/tor/files/tor.initd-r7 b/net-misc/tor/files/tor.initd-r7
new file mode 100644
index 000000000000..799cca17f470
--- /dev/null
+++ b/net-misc/tor/files/tor.initd-r7
@@ -0,0 +1,84 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+PIDFILE=/var/run/tor/tor.pid
+CONFFILE=/etc/tor/torrc
+GRACEFUL_TIMEOUT=${GRACEFUL_TIMEOUT:-60}
+
+# See bug #523552, and https://trac.torproject.org/projects/tor/ticket/5525
+# Graceful = wait 30 secs or so until all connections are properly closed.
+extra_commands="checkconfig"
+extra_started_commands="graceful gracefulstop reload"
+description="Anonymizing overlay network for TCP"
+description_checkconfig="Check for valid config file."
+description_reload="Reload the configuration."
+description_graceful="Gracefully restart."
+description_gracefulstop="Gracefully stop."
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ # first check that it exists
+ if [ ! -f ${CONFFILE} ] ; then
+ eerror "You need to setup ${CONFFILE} first"
+ eerror "Example is in ${CONFFILE}.sample"
+ return 1
+ fi
+
+ # now verify whether the configuration is valid
+ /usr/bin/tor --verify-config -f ${CONFFILE} > /dev/null 2>&1
+ if [ $? -eq 0 ] ; then
+ einfo "Tor configuration (${CONFFILE}) is valid."
+ return 0
+ else
+ eerror "Tor configuration (${CONFFILE}) not valid."
+ /usr/bin/tor --verify-config -f ${CONFFILE}
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ checkpath -d -m 0755 -o tor:tor /var/run/tor
+ ebegin "Starting Tor"
+ HOME=/var/lib/tor
+ start-stop-daemon --start --pidfile "${PIDFILE}" --quiet --exec /usr/bin/tor -- -f "${CONFFILE}" --runasdaemon 1 --PidFile "${PIDFILE}" > /dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Tor"
+ start-stop-daemon --stop --pidfile "${PIDFILE}" --exec /usr/bin/tor -- --PidFile "${PIDFILE}"
+ eend $?
+}
+
+graceful() {
+ gracefulstop
+ start
+ eend $?
+}
+
+gracefulstop() {
+ local rc=0
+ ebegin "Gracefully stopping Tor"
+ ebegin "This can take up to ${GRACEFUL_TIMEOUT} seconds"
+ start-stop-daemon -P --stop --signal INT -R ${GRACEFUL_TIMEOUT} --pidfile "${PIDFILE}" --exec /usr/bin/tor -- --PidFile "${PIDFILE}"
+ rc=$?
+ eend "done"
+ eend $rc
+}
+
+reload() {
+ if [ ! -f ${PIDFILE} ]; then
+ eerror "${SVCNAME} isn't running"
+ return 1
+ fi
+ checkconfig || return 1
+ ebegin "Reloading Tor configuration"
+ start-stop-daemon --signal HUP --pidfile ${PIDFILE}
+ eend $?
+}
diff --git a/net-misc/tor/files/tor.service b/net-misc/tor/files/tor.service
new file mode 100644
index 000000000000..8fcc6740ed91
--- /dev/null
+++ b/net-misc/tor/files/tor.service
@@ -0,0 +1,21 @@
+[Unit]
+Description=The Onion Router
+
+[Service]
+ExecStartPre=/usr/bin/tor --verify-config -f /etc/tor/torrc
+ExecStart=/usr/bin/tor --RunAsDaemon 0 -f /etc/tor/torrc
+ExecReload=/bin/kill -HUP $MAINPID
+KillSignal=SIGINT
+TimeoutStopSec=32
+LimitNOFILE=30000
+
+# Hardening options:
+CapabilityBoundingSet = CAP_SETUID CAP_SETGID CAP_NET_BIND_SERVICE
+PrivateTmp = yes
+PrivateDevices = yes
+ProtectHome = yes
+ProtectSystem = full
+NoNewPrivileges = yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/tor/files/torrc-r1 b/net-misc/tor/files/torrc-r1
new file mode 100644
index 000000000000..322a794aa1d5
--- /dev/null
+++ b/net-misc/tor/files/torrc-r1
@@ -0,0 +1,7 @@
+#
+# Minimal torrc so tor will work out of the box
+#
+User tor
+PIDFile /var/run/tor/tor.pid
+Log notice syslog
+DataDirectory /var/lib/tor/data
diff --git a/net-misc/tor/metadata.xml b/net-misc/tor/metadata.xml
new file mode 100644
index 000000000000..dc1abd89bc4b
--- /dev/null
+++ b/net-misc/tor/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <use>
+ <flag name='bufferevents'>Use libevent's buffered IO implementation (unstable, buggy)</flag>
+ <flag name='stats'>Enable tracking of how much of each kind of resource we download</flag>
+ <flag name='nat-pmp'>Enable NAT Port Mapping Protocol</flag>
+ <flag name='scrypt'>Use <pkg>app-crypt/libscrypt</pkg> for the scrypt algorithm</flag>
+ <flag name='tor-hardening'>Compile tor with hardening on vanilla compilers/linkers</flag>
+ <flag name='transparent-proxy'>Enable transparent proxying</flag>
+ <flag name='web'>Build a tor2web service instead of a tor client</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/tor/tor-0.2.6.10.ebuild b/net-misc/tor/tor-0.2.6.10.ebuild
new file mode 100644
index 000000000000..7c29500c58e0
--- /dev/null
+++ b/net-misc/tor/tor-0.2.6.10.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils flag-o-matic readme.gentoo systemd toolchain-funcs versionator user
+
+MY_PV="$(replace_version_separator 4 -)"
+MY_PF="${PN}-${MY_PV}"
+DESCRIPTION="Anonymizing overlay network for TCP"
+HOMEPAGE="http://www.torproject.org/"
+SRC_URI="https://www.torproject.org/dist/${MY_PF}.tar.gz
+ https://archive.torproject.org/tor-package-archive/${MY_PF}.tar.gz"
+S="${WORKDIR}/${MY_PF}"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips ppc ppc64 sparc x86"
+IUSE="-bufferevents nat-pmp scrypt seccomp selinux stats systemd tor-hardening transparent-proxy test upnp web"
+
+DEPEND="dev-libs/openssl:=
+ sys-libs/zlib
+ dev-libs/libevent
+ bufferevents? ( dev-libs/libevent[ssl] )
+ nat-pmp? ( net-libs/libnatpmp )
+ scrypt? ( app-crypt/libscrypt )
+ seccomp? ( sys-libs/libseccomp )
+ systemd? ( sys-apps/systemd )
+ upnp? ( net-libs/miniupnpc )"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-tor )"
+
+pkg_setup() {
+ enewgroup tor
+ enewuser tor -1 -1 /var/lib/tor tor
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.2.3.14_alpha-torrc.sample.patch
+ epatch_user
+}
+
+src_configure() {
+ # Upstream isn't sure of all the user provided CFLAGS that
+ # will break tor, but does recommend against -fstrict-aliasing.
+ # We'll filter-flags them here as we encounter them.
+ filter-flags -fstrict-aliasing
+
+ econf \
+ --enable-system-torrc \
+ --enable-asciidoc \
+ --docdir=/usr/share/doc/${PF} \
+ $(use_enable stats instrument-downloads) \
+ $(use_enable bufferevents) \
+ $(use_enable nat-pmp) \
+ $(use_enable scrypt libscrypt) \
+ $(use_enable seccomp) \
+ $(use_enable systemd) \
+ $(use_enable tor-hardening gcc-hardening) \
+ $(use_enable tor-hardening linker-hardening) \
+ $(use_enable transparent-proxy transparent) \
+ $(use_enable upnp) \
+ $(use_enable web tor2web-mode) \
+ $(use_enable test unittests) \
+ $(use_enable test coverage)
+}
+
+src_install() {
+ readme.gentoo_create_doc
+
+ newconfd "${FILESDIR}"/tor.confd tor
+ newinitd "${FILESDIR}"/tor.initd-r7 tor
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_dotmpfilesd "${FILESDIR}/${PN}.conf"
+
+ emake DESTDIR="${D}" install
+
+ keepdir /var/lib/tor
+
+ dodoc README ChangeLog ReleaseNotes doc/HACKING
+
+ fperms 750 /var/lib/tor
+ fowners tor:tor /var/lib/tor
+
+ insinto /etc/tor/
+ newins "${FILESDIR}"/torrc-r1 torrc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+
+ if [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -eq 8 && $(gcc-micro-version) -ge 1 ]] ; then
+ ewarn "Due to a bug in >=gcc-4.8.1, compiling ${P} with -Os leads to an infinite"
+ ewarn "loop. See:"
+ ewarn
+ ewarn " https://trac.torproject.org/projects/tor/ticket/10259"
+ ewarn " http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59358"
+ ewarn
+ fi
+}
diff --git a/net-misc/tor/tor-0.2.6.7.ebuild b/net-misc/tor/tor-0.2.6.7.ebuild
new file mode 100644
index 000000000000..57ce1990f265
--- /dev/null
+++ b/net-misc/tor/tor-0.2.6.7.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils flag-o-matic readme.gentoo systemd toolchain-funcs versionator user
+
+MY_PV="$(replace_version_separator 4 -)"
+MY_PF="${PN}-${MY_PV}"
+DESCRIPTION="Anonymizing overlay network for TCP"
+HOMEPAGE="http://www.torproject.org/"
+SRC_URI="https://www.torproject.org/dist/${MY_PF}.tar.gz
+ https://archive.torproject.org/tor-package-archive/${MY_PF}.tar.gz"
+S="${WORKDIR}/${MY_PF}"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips ppc ppc64 sparc x86"
+IUSE="-bufferevents nat-pmp scrypt seccomp selinux stats systemd tor-hardening transparent-proxy test upnp web"
+
+DEPEND="dev-libs/openssl
+ sys-libs/zlib
+ dev-libs/libevent
+ bufferevents? ( dev-libs/libevent[ssl] )
+ nat-pmp? ( net-libs/libnatpmp )
+ scrypt? ( app-crypt/libscrypt )
+ seccomp? ( sys-libs/libseccomp )
+ upnp? ( net-libs/miniupnpc )"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-tor )"
+
+pkg_setup() {
+ enewgroup tor
+ enewuser tor -1 -1 /var/lib/tor tor
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.2.3.14_alpha-torrc.sample.patch
+ epatch_user
+}
+
+src_configure() {
+ # Upstream isn't sure of all the user provided CFLAGS that
+ # will break tor, but does recommend against -fstrict-aliasing.
+ # We'll filter-flags them here as we encounter them.
+ filter-flags -fstrict-aliasing
+
+ econf \
+ --enable-system-torrc \
+ --enable-asciidoc \
+ --docdir=/usr/share/doc/${PF} \
+ $(use_enable stats instrument-downloads) \
+ $(use_enable bufferevents) \
+ $(use_enable nat-pmp) \
+ $(use_enable scrypt libscrypt) \
+ $(use_enable seccomp) \
+ $(use_enable systemd) \
+ $(use_enable tor-hardening gcc-hardening) \
+ $(use_enable tor-hardening linker-hardening) \
+ $(use_enable transparent-proxy transparent) \
+ $(use_enable upnp) \
+ $(use_enable web tor2web-mode) \
+ $(use_enable test unittests) \
+ $(use_enable test coverage)
+}
+
+src_install() {
+ readme.gentoo_create_doc
+
+ newconfd "${FILESDIR}"/tor.confd tor
+ newinitd "${FILESDIR}"/tor.initd-r7 tor
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_dotmpfilesd "${FILESDIR}/${PN}.conf"
+
+ emake DESTDIR="${D}" install
+
+ keepdir /var/lib/tor
+
+ dodoc README ChangeLog ReleaseNotes doc/HACKING
+
+ fperms 750 /var/lib/tor
+ fowners tor:tor /var/lib/tor
+
+ insinto /etc/tor/
+ newins "${FILESDIR}"/torrc-r1 torrc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+
+ if [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -eq 8 && $(gcc-micro-version) -ge 1 ]] ; then
+ ewarn "Due to a bug in >=gcc-4.8.1, compiling ${P} with -Os leads to an infinite"
+ ewarn "loop. See:"
+ ewarn
+ ewarn " https://trac.torproject.org/projects/tor/ticket/10259"
+ ewarn " http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59358"
+ ewarn
+ fi
+}
diff --git a/net-misc/tor/tor-0.2.7.2_alpha.ebuild b/net-misc/tor/tor-0.2.7.2_alpha.ebuild
new file mode 100644
index 000000000000..94a68de5bee0
--- /dev/null
+++ b/net-misc/tor/tor-0.2.7.2_alpha.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils flag-o-matic readme.gentoo systemd toolchain-funcs versionator user
+
+MY_PV="$(replace_version_separator 4 -)"
+MY_PF="${PN}-${MY_PV}"
+DESCRIPTION="Anonymizing overlay network for TCP"
+HOMEPAGE="http://www.torproject.org/"
+SRC_URI="https://www.torproject.org/dist/${MY_PF}.tar.gz
+ https://archive.torproject.org/tor-package-archive/${MY_PF}.tar.gz"
+S="${WORKDIR}/${MY_PF}"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="-bufferevents nat-pmp scrypt seccomp selinux stats systemd tor-hardening transparent-proxy test upnp web"
+
+DEPEND="dev-libs/openssl:=
+ sys-libs/zlib
+ dev-libs/libevent
+ bufferevents? ( dev-libs/libevent[ssl] )
+ nat-pmp? ( net-libs/libnatpmp )
+ scrypt? ( app-crypt/libscrypt )
+ seccomp? ( sys-libs/libseccomp )
+ systemd? ( sys-apps/systemd )
+ upnp? ( net-libs/miniupnpc )"
+RDEPEND="${DEPEND}
+ selinux? ( sec-policy/selinux-tor )"
+
+pkg_setup() {
+ enewgroup tor
+ enewuser tor -1 -1 /var/lib/tor tor
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.2.3.14_alpha-torrc.sample.patch
+ epatch_user
+}
+
+src_configure() {
+ # Upstream isn't sure of all the user provided CFLAGS that
+ # will break tor, but does recommend against -fstrict-aliasing.
+ # We'll filter-flags them here as we encounter them.
+ filter-flags -fstrict-aliasing
+
+ econf \
+ --enable-system-torrc \
+ --enable-asciidoc \
+ --docdir=/usr/share/doc/${PF} \
+ $(use_enable stats instrument-downloads) \
+ $(use_enable bufferevents) \
+ $(use_enable nat-pmp) \
+ $(use_enable scrypt libscrypt) \
+ $(use_enable seccomp) \
+ $(use_enable systemd) \
+ $(use_enable tor-hardening gcc-hardening) \
+ $(use_enable tor-hardening linker-hardening) \
+ $(use_enable transparent-proxy transparent) \
+ $(use_enable upnp) \
+ $(use_enable web tor2web-mode) \
+ $(use_enable test unittests) \
+ $(use_enable test coverage)
+}
+
+src_install() {
+ readme.gentoo_create_doc
+
+ newconfd "${FILESDIR}"/tor.confd tor
+ newinitd "${FILESDIR}"/tor.initd-r7 tor
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_dotmpfilesd "${FILESDIR}/${PN}.conf"
+
+ emake DESTDIR="${D}" install
+
+ keepdir /var/lib/tor
+
+ dodoc README ChangeLog ReleaseNotes doc/HACKING
+
+ fperms 750 /var/lib/tor
+ fowners tor:tor /var/lib/tor
+
+ insinto /etc/tor/
+ newins "${FILESDIR}"/torrc-r1 torrc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+
+ if [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -eq 8 && $(gcc-micro-version) -ge 1 ]] ; then
+ ewarn "Due to a bug in >=gcc-4.8.1, compiling ${P} with -Os leads to an infinite"
+ ewarn "loop. See:"
+ ewarn
+ ewarn " https://trac.torproject.org/projects/tor/ticket/10259"
+ ewarn " http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59358"
+ ewarn
+ fi
+}
diff --git a/net-misc/ttytter/Manifest b/net-misc/ttytter/Manifest
new file mode 100644
index 000000000000..859954b473eb
--- /dev/null
+++ b/net-misc/ttytter/Manifest
@@ -0,0 +1 @@
+DIST 2.1.00.txt 238284 SHA256 6292ada5d238009c74345c48a66e59b3c0e4e084a733715953e408bb18191898 SHA512 79629d62ab2a9fd7de82347795f75f9dc850bb6051682af112f4db1362b174f2b4c3df9331483c40461fd5ba7f8dcb325aaee605d2b850f0f7b635afa8fab7b6 WHIRLPOOL 9e4a0fe5e535a79e8065238909ad049b4b6330f7444b2292fd1d0c3fb235a72cdfa60334c1f23f8415503b2224f70ed5ecf4472694bdbcb0791100683c8ee172
diff --git a/net-misc/ttytter/metadata.xml b/net-misc/ttytter/metadata.xml
new file mode 100644
index 000000000000..5e3a61a90139
--- /dev/null
+++ b/net-misc/ttytter/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>hwoarang@gentoo.org</email>
+<name>Markos Chandras</name>
+</maintainer>
+<longdescription lang="en">
+</longdescription>
+</pkgmetadata>
+
diff --git a/net-misc/ttytter/ttytter-2.1.00.ebuild b/net-misc/ttytter/ttytter-2.1.00.ebuild
new file mode 100644
index 000000000000..5d16ba1ad70f
--- /dev/null
+++ b/net-misc/ttytter/ttytter-2.1.00.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit readme.gentoo
+
+DESCRIPTION="A multi-functional, console-based Twitter client"
+HOMEPAGE="http://www.floodgap.com/software/ttytter/"
+SRC_URI="http://www.floodgap.com/software/ttytter/dist2/${PV}.txt"
+
+LICENSE="FFSL"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+DEPEND=""
+RDEPEND=">=dev-lang/perl-5.8
+ || ( net-misc/curl www-client/lynx )"
+
+pkg_setup() {
+ DOC_CONTENTS="Please consult the following webpage on how to
+ configure your client.
+ http://www.floodgap.com/software/ttytter/dl.html"
+}
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}"/${A} ${WORKDIR}/${PN} || die
+}
+
+src_install() {
+ dobin ${PN}
+ readme.gentoo_create_doc
+}
diff --git a/net-misc/ucarp/Manifest b/net-misc/ucarp/Manifest
new file mode 100644
index 000000000000..abd697c6fcd1
--- /dev/null
+++ b/net-misc/ucarp/Manifest
@@ -0,0 +1 @@
+DIST ucarp-1.5.2.tar.gz 429089 SHA256 f3cc77e28481fd04f62bb3d4bc03104a97dd316c80c0ed04ad7be24b544112f3 SHA512 568ff2061e59d314c72a160ccb42eb099bf7cdf04bc30f405b5b62322dff3ceb4fa037c2b430fdb4cee25f0dcacf9309a15bd814b4b70b640840400bda20b253 WHIRLPOOL b763e7c7023f1364e735baf2df2855bd6bbbbd937267c1a411da22b2ad109b01807f8f7c798662ed0e86f1137a1c8a9ed601eb2a3242a444ba5560d8f47bc285
diff --git a/net-misc/ucarp/files/ucarp.8 b/net-misc/ucarp/files/ucarp.8
new file mode 100644
index 000000000000..756c5e6eca8a
--- /dev/null
+++ b/net-misc/ucarp/files/ucarp.8
@@ -0,0 +1,148 @@
+.TH "UCARP" "8"
+.SH "NAME"
+ucarp \(em Automatic IP failover
+.SH "SYNOPSIS"
+.PP
+\fBucarp\fR [\fB-i, \-\-interface=\fIINTERFACE\fR\fP] [\fB-s, \-\-srcip=\fIIPADDRESS\fR\fP]
+.br
+[\fB-v, \-\-vhid=\fIVHID\fR\fP] [\fB-p, \-\-pass=\fIPASSWORD\fR\fP] [\fB-o, \-\-passfile=\fIPASSFILE\fR\fP]
+.br
+[\fB-P, \-\-preempt\fP] [\fB-n, \-\-neutral\fP] [\fB-a, \-\-addr=\fIIPADDR\fR\fP] [\fB-h, \-\-help\fP]
+.br
+[\fB-b, \-\-advbase=\fISECS\fR\fP] [\fB-k, \-\-advskew=\fISKEW\fR\fP] [\fB-u, \-\-upscript=\fISCRIPT\fR\fP]
+.br
+[\fB-d, \-\-downscript=\fISCRIPT\fR\fP] [\fB-r, \-\-deadratio=\fIRATIO\fR\fP] [\fB-z, \-\-shutdown\fP]
+.br
+[\fB-B, \-\-daemonize\fP] [\fB-f, \-\-facility=\fIFACILITY\fR\fP] [\fB-x, \-\-xparam \fIPARAM\fR\fP]
+.br
+[\fB-S, \-\-ignoreifstate\fP] [\fB-M, \-\-nomcast\fP]
+.SH "DESCRIPTION"
+.PP
+ucarp allows a pair of hosts to share common IP addresses in
+order to provide automatic failover of an address from one machine to
+another. It is a portable userland implementation of the secure and
+patent-free Common Address Redundancy Protocol, (CARP), OpenBSD's
+alternative to VRRP.
+.SH "OPTIONS"
+.PP
+ucarp supports the following command line options:
+.IP "\fB-i \fIINTERFACE\fR\fP\fB \-\-interface=\fIINTERFACE\fR\fP" 10
+The network interface to bind to.
+.IP "\fB-s \fIIPADDRESS\fR\fP\fB \-\-srcip=\fIIPADDRESS\fR\fP" 10
+The persistent source address, (real IP), associated with this
+interface.
+.IP "\fB-v \fIVHID\fR\fP\fB \-\-vhid=\fIVHID\fR\fP" 10
+The id of the virtual server [1-255].
+.IP "\fB-p \fIPASSWORD\fR\fP\fB \-\-pass=\fIPASSWORD\fR\fP" 10
+The shared password, (this gets encrypted and is not sent in the
+clear).
+.IP "\fB-o \fIPASSFILE\fR\fP\fB \-\-passfile=\fIPASSFILE\fR\fP" 10
+File to read the shared password from. The file specified
+should contain the password on the first line of the file.
+.IP "\fB-P \fP\fB\-\-preempt\fP" 10
+Turn on preemptive failover. This causes an instance of
+ucarp to assume master status right immediately.
+.IP "\fB-n \fP\fB\-\-neutral\fP" 10
+Do not run the downscript on startup when the
+initial state is backup.
+.IP "\fB-a \fIIPADDRESS\fR\fP\fB \-\-addr=\fIIPADDRESS\fR\fP" 10
+The IP address of the virtual server.
+.IP "\fB-h \fP\fB\-\-help\fP" 10
+Display a brief summary of the command line options.
+.IP "\fB-b \fISECONDS\fR\fP\fB \-\-advbase=\fISECONDS\fR\fP" 10
+Interval in seconds that advertisements will occur, (defaults
+to 1 second).
+.IP "\fB-k \fISKEW\fR\fP\fB \-\-advskew=\fISKEW\fR\fP" 10
+Advertisement skew [1-255], (defaults to 0).
+.IP "\fB-u \fICOMMAND\fR\fP\fB \-\-upscript=\fICOMMAND\fR\fP" 10
+Specifies the command to run after ucarp has successfully
+become master, the interface name gets passed as an argument.
+Typically a script used to bring up the virtual address, log the
+result, add routes, clear arp cache entries, etc.
+.IP "\fB-d \fICOMMAND\fR\fP\fB \-\-downscript=\fICOMMAND\fR\fP" 10
+Specifies the command that is run after ucarp has
+transitioned to the backup state, the interface name is passed
+as an argument. This is typically a script used to bring down
+the virtual interface, log the action, remove routes, etc.
+.IP "\fB-r \fIRATIO\fR\fP\fB \-\-deadratio=\fIRATIO\fR\fP" 10
+Ratio used by the backup to determine how long to wait for an
+unresponsive master before considering it dead.
+.IP "\fB-z\fP\fB \-\-shutdown\fP" 10
+Use of this command causes the command specified by the \-d
+argument to be invoked when ucarp shuts down.
+.IP "\fB-B\fP\fB \-\-daemonize\fP" 10
+Causes ucarp to detach from the terminal and run in the
+background as a daemon.
+.IP "\fB-f\fP\fB \-\-facility\fP" 10
+Set the syslog facility, defaults to daemon.
+.IP "\fB-x \fIPARAMETER\fR\fP\fB \-\-xparam=\fIPARAMETER\fR\fP" 10
+Specify an extra parameter to be supplied to the up/down
+scripts.
+.IP "\fB-S\fP\fB \-\-ignoreifstate\fP" 10
+Ignore unplugged network cables. This option is useful when
+ucarp nodes are connected with a crossover cable. Without
+this option the master will transition to backup when the other
+node is powered down, as it no longer has a link (NO-CARRIER).
+
+.IP "\fB-M\fP\fB \-\-nomcast\fP" 10
+Use broadcast instead of multicast advertisements.
+.SH "EXAMPLES"
+.PP
+A host with a real IP of 10.1.1.10 configured to be the master
+in a preemptive configuration with a virtual IP of 10.1.1.252.
+.PP
+.nf
+\fB \fPucarp \-i eth0 \-s 10.1.1.10 \-v 10 \-p secret \-a 10.1.1.252 \\
+\fB \fP\-\-upscript=/etc/vip-up.sh \-\-downscript=/etc/vip-down.sh \-P
+.fi
+.PP
+The backup might be configured something like this.
+.PP
+.nf
+\fB \fPucarp \-i eth0 \-s 10.1.1.11 \-v 10 \-p secret \-a 10.1.1.252 \\
+\fB \fP\-\-upscript=/etc/vip-up.sh \-\-downscript=/etc/vip-down.sh
+.fi
+.PP
+A machine with a real IP of 192.168.1.19 is the preferred master for
+a virtual IP of 10.1.12.7, broadcasts are sent every 5 seconds.
+.PP
+.nf
+\fB \fPucarp \-b 5 \-s 192.168.1.19 \-v 27 \-p badpass \-a 10.1.12.7 \\
+\fB \fP-u /etc/vip-up.sh \-d /etc/vip-down.sh \-z
+.fi
+.PP
+The hot standby with an IP of 192.168.1.20 uses the following
+command, (note the advskew of 50 putting it at a disadvantage and making
+the first machine preferred).
+.PP
+.nf
+\fB \fPucarp \-b 5 \-k 50 \-s 192.168.1.20 \-v 27 \-p badpass \-a 10.1.12.7 \\
+\fB \fP-u /etc/vip-up.sh \-d /etc/vip-down.sh \-z
+.fi
+.SH "SIGNALS"
+.PP
+Sending the ucarp process a SIGUSR1 will have it log a status
+line to syslog, eg "Sep 13 12:59:56 localhost ucarp[2654]: [INFO]
+MASTER on eth0 id 1" or "Sep 13 13:00:25 localhost ucarp[2644]: [INFO]
+BACKUP on eth0 id 1"
+.PP
+Sending the ucarp process a SIGUSR2 will cause it to demote itself
+from master to backup, pause 3 seconds, then proceed as usual to listen
+for other masters, and promote itself if necessary. This could be useful
+if you wish another node to take over master.
+
+.SH "AUTHOR"
+.PP
+ucarp was written by Frank Denis, <j@ucarp.org>.
+.PP
+This manual page was written by Eric Evans <eevans@debian.org>
+for the \fBDebian\fP system (but may be used by others). Permission is
+granted to copy, distribute and/or modify this document under
+the terms of the GNU General Public License, Version 2 or any
+later version published by the Free Software Foundation.
+
+.PP
+On Debian systems, the complete text of the GNU General Public
+License can be found in /usr/share/common-licenses/GPL.
+
+.\" created by instant / docbook-to-man, Wed 10 Aug 2011, 17:40 \ No newline at end of file
diff --git a/net-misc/ucarp/files/ucarp.confd b/net-misc/ucarp/files/ucarp.confd
new file mode 100644
index 000000000000..1a8cdb156973
--- /dev/null
+++ b/net-misc/ucarp/files/ucarp.confd
@@ -0,0 +1,30 @@
+# /etc/conf.d/ucarp: config file for /etc/init.d/ucarp
+
+# The network interface to bind to, for example 'eth0'
+UCARP_INTERFACE=
+
+# The persistent source address, (real IP), associated with this interface.
+UCARP_SOURCEADDRESS=
+
+# The IP address of the virtual server.
+UCARP_VIRTUALADDRESS=
+
+# The prefix length of the virtual server IP address
+# For example 24 for a netmask of 255.255.255.0
+UCARP_VIRTUALPREFIX=
+
+# The id of the virtual server [1-255].
+UCARP_VHID=123
+
+# File to read the shared password from.
+UCARP_PASSFILE=/etc/ucarp/ucarp.pass
+
+# Specifies the command to run after ucarp has successfully become master.
+UCARP_UPSCRIPT=/usr/libexec/ucarp/vip-up-default.sh
+
+# Specifies the command that is run after ucarp has transitioned to the backup
+# state.
+UCARP_DOWNSCRIPT=/usr/libexec/ucarp/vip-down-default.sh
+
+# Additional ucarp options to pass
+UCARP_OPTS="--shutdown"
diff --git a/net-misc/ucarp/files/ucarp.initd-r1 b/net-misc/ucarp/files/ucarp.initd-r1
new file mode 100644
index 000000000000..5b4d214d04d2
--- /dev/null
+++ b/net-misc/ucarp/files/ucarp.initd-r1
@@ -0,0 +1,59 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="UCARP is a portable implementation of the CARP protocol"
+description_logstatus="Logs the status of ${SVCNAME} to syslog"
+description_demote="Demotes ${SVCNAME} from master to backup"
+
+extra_started_commands="logstatus demote"
+
+command="/usr/sbin/ucarp"
+command_args="--interface=${UCARP_INTERFACE} \
+ --srcip=${UCARP_SOURCEADDRESS} \
+ --vhid=${UCARP_VHID} \
+ --passfile=${UCARP_PASSFILE} \
+ --addr=${UCARP_VIRTUALADDRESS} \
+ --upscript=${UCARP_UPSCRIPT} \
+ --downscript=${UCARP_DOWNSCRIPT} \
+ --xparam=${UCARP_VIRTUALPREFIX} \
+ ${UCARP_OPTS}"
+
+pidfile="/var/run/${SVCNAME}.pid"
+command_background="yes"
+
+required_files="${UCARP_PASSFILE} ${UCARP_UPSCRIPT} ${UCARP_DOWNSCRIPT}"
+
+depend() {
+ need net
+ use logger
+ provide ucarp
+}
+
+start_pre() {
+ local required_vars='UCARP_INTERFACE UCARP_SOURCEADDRESS UCARP_VHID
+ UCARP_PASSFILE UCARP_VIRTUALADDRESS UCARP_UPSCRIPT
+ UCARP_DOWNSCRIPT UCARP_VIRTUALPREFIX'
+
+ local config_var=''
+ for config_var in $required_vars; do
+ if test -z "$(eval echo \$$config_var)"; then
+ eerror "Missing or empty config variable '$config_var'"
+ ewarn "You have to edit /etc/conf.d/${SVCNAME} first"
+ return 1
+ fi
+ done
+}
+
+logstatus() {
+ ebegin "Logging status of ${SVCNAME} to syslog"
+ start-stop-daemon --signal SIGUSR1 --pidfile "${pidfile}"
+ eend $?
+}
+
+demote() {
+ ebegin "Demote ${SVCNAME} from master to backup"
+ start-stop-daemon --signal SIGUSR2 --pidfile "${pidfile}"
+ eend $?
+}
diff --git a/net-misc/ucarp/files/vip-down-default.sh b/net-misc/ucarp/files/vip-down-default.sh
new file mode 100644
index 000000000000..cf5bfe5ce3a1
--- /dev/null
+++ b/net-misc/ucarp/files/vip-down-default.sh
@@ -0,0 +1,7 @@
+#! /bin/sh
+exec 2> /dev/null
+
+/sbin/ip addr del "$2"/"$3" dev "$1"
+
+# or alternatively:
+# /sbin/ifconfig "$1":254 down
diff --git a/net-misc/ucarp/files/vip-down-default.sh-r1 b/net-misc/ucarp/files/vip-down-default.sh-r1
new file mode 100644
index 000000000000..5e1862b3a14b
--- /dev/null
+++ b/net-misc/ucarp/files/vip-down-default.sh-r1
@@ -0,0 +1,7 @@
+#! /bin/sh
+exec 2> /dev/null
+
+/bin/ip addr del "$2"/"$3" dev "$1"
+
+# or alternatively:
+# /sbin/ifconfig "$1":254 down
diff --git a/net-misc/ucarp/files/vip-up-default.sh b/net-misc/ucarp/files/vip-up-default.sh
new file mode 100644
index 000000000000..763a56170a85
--- /dev/null
+++ b/net-misc/ucarp/files/vip-up-default.sh
@@ -0,0 +1,7 @@
+#! /bin/sh
+exec 2> /dev/null
+
+/sbin/ip addr add "$2"/"$3" dev "$1"
+
+# or alternatively:
+# /sbin/ifconfig "$1":254 "$2" netmask "$3"
diff --git a/net-misc/ucarp/files/vip-up-default.sh-r1 b/net-misc/ucarp/files/vip-up-default.sh-r1
new file mode 100644
index 000000000000..4b44dafde734
--- /dev/null
+++ b/net-misc/ucarp/files/vip-up-default.sh-r1
@@ -0,0 +1,7 @@
+#! /bin/sh
+exec 2> /dev/null
+
+/bin/ip addr add "$2"/"$3" dev "$1"
+
+# or alternatively:
+# /sbin/ifconfig "$1":254 "$2" netmask "$3"
diff --git a/net-misc/ucarp/metadata.xml b/net-misc/ucarp/metadata.xml
new file mode 100644
index 000000000000..348e6c4de815
--- /dev/null
+++ b/net-misc/ucarp/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>cluster</herd>
+</pkgmetadata>
diff --git a/net-misc/ucarp/ucarp-1.5.2-r3.ebuild b/net-misc/ucarp/ucarp-1.5.2-r3.ebuild
new file mode 100644
index 000000000000..8e87f6b51a57
--- /dev/null
+++ b/net-misc/ucarp/ucarp-1.5.2-r3.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DESCRIPTION="Portable userland implementation of Common Address Redundancy Protocol (CARP)"
+HOMEPAGE="http://www.ucarp.org"
+SRC_URI="ftp://ftp.ucarp.org/pub/ucarp/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+IUSE="nls"
+
+RDEPEND="net-libs/libpcap"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+src_configure() {
+ econf $(use_enable nls)
+}
+
+src_install() {
+ default
+
+ doman "${FILESDIR}"/ucarp.8
+
+ exeinto /usr/libexec/ucarp
+ doexe "${FILESDIR}"/vip-up-default.sh
+ doexe "${FILESDIR}"/vip-down-default.sh
+
+ keepdir /etc/ucarp
+
+ newinitd "${FILESDIR}"/ucarp.initd-r1 ucarp
+ newconfd "${FILESDIR}"/ucarp.confd ucarp
+}
+
+pkg_postinst() {
+ elog "The provided init script needs to be configured first."
+ elog "Edit /etc/conf.d/ucarp to suite your environment."
+ elog "You will also have to set a shared password within /etc/ucarp/ucarp.pass"
+ elog "or whatever file you have set \$UCARP_PASSFILE to."
+
+ elog "If you need more than one instance of ucarp running, simply symlink"
+ elog "the init script and create a copy of the init script configuration"
+ elog "which corresponds to the name of the init script."
+}
diff --git a/net-misc/ucarp/ucarp-1.5.2-r4.ebuild b/net-misc/ucarp/ucarp-1.5.2-r4.ebuild
new file mode 100644
index 000000000000..0f9ec17729d8
--- /dev/null
+++ b/net-misc/ucarp/ucarp-1.5.2-r4.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DESCRIPTION="Portable userland implementation of Common Address Redundancy Protocol (CARP)"
+HOMEPAGE="http://www.ucarp.org"
+SRC_URI="ftp://ftp.ucarp.org/pub/ucarp/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="nls"
+
+RDEPEND="net-libs/libpcap"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+src_configure() {
+ econf $(use_enable nls)
+}
+
+src_install() {
+ default
+
+ doman "${FILESDIR}"/ucarp.8
+
+ exeinto /usr/libexec/ucarp
+ newexe "${FILESDIR}"/vip-up-default.sh-r1 vip-up-default.sh
+ newexe "${FILESDIR}"/vip-down-default.sh-r1 vip-down-default.sh
+
+ keepdir /etc/ucarp
+
+ newinitd "${FILESDIR}"/ucarp.initd-r1 ucarp
+ newconfd "${FILESDIR}"/ucarp.confd ucarp
+}
+
+pkg_postinst() {
+ elog "The provided init script needs to be configured first."
+ elog "Edit /etc/conf.d/ucarp to suite your environment."
+ elog "You will also have to set a shared password within /etc/ucarp/ucarp.pass"
+ elog "or whatever file you have set \$UCARP_PASSFILE to."
+
+ elog "If you need more than one instance of ucarp running, simply symlink"
+ elog "the init script and create a copy of the init script configuration"
+ elog "which corresponds to the name of the init script."
+}
diff --git a/net-misc/udpcast/Manifest b/net-misc/udpcast/Manifest
new file mode 100644
index 000000000000..17080889397f
--- /dev/null
+++ b/net-misc/udpcast/Manifest
@@ -0,0 +1 @@
+DIST udpcast-20120424.tar.bz2 138955 SHA256 d6c30352571a3215f00f8451d0fe932ba24ed5f98653d3aeb554e3c43c079677 SHA512 b28ada43f9f3cba498ffff3032cff6a673584836439275604c1201a18fe2e37f2c847a48b72783065b1656a7a2f9e9739d8a376e90df8b05749bc2e2f64278de WHIRLPOOL 9d8d48fabe30f462e49d2b1dc0b2d190fd5b0e6d1e68f801209a61782185464a952dd46ffbed9a6d39a3da8fce6de99f68916b3ef447db6d0fcc1523a83cc4de
diff --git a/net-misc/udpcast/files/udpcast-20120424-fd_set.patch b/net-misc/udpcast/files/udpcast-20120424-fd_set.patch
new file mode 100644
index 000000000000..2bd5bd5ce801
--- /dev/null
+++ b/net-misc/udpcast/files/udpcast-20120424-fd_set.patch
@@ -0,0 +1,11 @@
+--- a/console.h
++++ b/console.h
+@@ -6,6 +6,8 @@
+ #include <winbase.h>
+ #endif /* __MINGW32__ */
+
++#include <sys/select.h>
++
+ #define prepareConsole udpc_prepareConsole
+ #define getConsoleFd udpc_getConsoleFd
+ #define restoreConsole udpc_restoreConsole
diff --git a/net-misc/udpcast/files/udpcast-20120424-gentoo.patch b/net-misc/udpcast/files/udpcast-20120424-gentoo.patch
new file mode 100644
index 000000000000..e4269a0873a6
--- /dev/null
+++ b/net-misc/udpcast/files/udpcast-20120424-gentoo.patch
@@ -0,0 +1,12 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -30,8 +30,7 @@
+
+ # For additional warnings & checks, add -Wstrict-prototypes -Wshadow to the
+ # following:
+-CFLAGS +=-Wall -DBB_FEATURE_UDPCAST_FEC -D_FILE_OFFSET_BITS=64 -DUSE_SYSLOG -DUSE_ASSEMBLER -O6
+-LDFLAGS +=-s
++CFLAGS +=-Wall -DBB_FEATURE_UDPCAST_FEC -D_FILE_OFFSET_BITS=64 -DUSE_SYSLOG
+ LIBS +=@LIBS@
+
+ BUSYBOX=../udp-busybox/busybox
diff --git a/net-misc/udpcast/metadata.xml b/net-misc/udpcast/metadata.xml
new file mode 100644
index 000000000000..526d84b8a3cd
--- /dev/null
+++ b/net-misc/udpcast/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>netmon</herd>
+<longdescription>
+UDPcast is a file transfer tool that can send data simultaneously to
+many destinations on a LAN. This can for instance be used to install
+entire classrooms of PC's at once. The advantage of UDPcast over using
+other methods (nfs, ftp, whatever) is that UDPcast uses Ethernet's
+multicast abilities: it won't take longer to install 15 machines than it
+would to install just 2.
+</longdescription>
+</pkgmetadata>
diff --git a/net-misc/udpcast/udpcast-20120424-r1.ebuild b/net-misc/udpcast/udpcast-20120424-r1.ebuild
new file mode 100644
index 000000000000..202047f7598d
--- /dev/null
+++ b/net-misc/udpcast/udpcast-20120424-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 eutils flag-o-matic
+
+DESCRIPTION="Multicast file transfer tool"
+HOMEPAGE="http://www.udpcast.linux.lu/"
+SRC_URI="http://www.udpcast.linux.lu/download/${P}.tar.bz2"
+
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="hardened"
+
+DEPEND="dev-lang/perl"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-fd_set.patch \
+ "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_configure() {
+ use hardened || append-cflags -DUSE_ASSEMBLER
+
+ default
+}
+
+src_install() {
+ default
+ dodoc *.txt
+}
diff --git a/net-misc/udpcast/udpcast-20120424.ebuild b/net-misc/udpcast/udpcast-20120424.ebuild
new file mode 100644
index 000000000000..4f7515388c2e
--- /dev/null
+++ b/net-misc/udpcast/udpcast-20120424.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="Multicast file transfer tool"
+HOMEPAGE="http://www.udpcast.linux.lu/"
+SRC_URI="http://www.udpcast.linux.lu/download/${P}.tar.bz2"
+
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+DEPEND="dev-lang/perl"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-fd_set.patch \
+ "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_install() {
+ default
+ dodoc *.txt
+}
diff --git a/net-misc/udpxy/Manifest b/net-misc/udpxy/Manifest
new file mode 100644
index 000000000000..4b18d8e27953
--- /dev/null
+++ b/net-misc/udpxy/Manifest
@@ -0,0 +1 @@
+DIST udpxy.1.0.23-7-prod.tar.gz 77591 SHA256 da13dab43b9b0e10a4f3e606d8b33ad5d0096901d9b59d1196177751cab5e5e0 SHA512 5bd37822f1d861b3828339175b7daebbf3ccb3969e808a319d3d3f054afbf7769d5f2705d25780a76819b3b7963af3a81af7d71556ba61274141142167907a23 WHIRLPOOL 03638c0fd0402e568ecd7c88d1339d486bc274c6310887d47b8df31e21f2d634511ac8e6c05de2f279a50c423c1a1d09ce848d6ade92389d9dbc86766b72ea5e
diff --git a/net-misc/udpxy/files/udpxy-1.0.21.2-LDFLAGS.patch b/net-misc/udpxy/files/udpxy-1.0.21.2-LDFLAGS.patch
new file mode 100644
index 000000000000..45f7644f92b0
--- /dev/null
+++ b/net-misc/udpxy/files/udpxy-1.0.21.2-LDFLAGS.patch
@@ -0,0 +1,11 @@
+--- Makefile.orig 2012-03-02 16:10:33.127036949 +0400
++++ Makefile 2012-03-02 16:10:35.873002619 +0400
+@@ -169,7 +169,7 @@
+
+ $(EXEC) : $(DEPFILE) $(OBJ)
+ @rm -f $(EXEC)
+- $(CC) $(CFLAGS) $(COPT) -o $(EXEC) $(OBJ)
++ $(CC) $(CFLAGS) $(COPT) -o $(EXEC) $(OBJ) $(LDFLAGS)
+ @ls -l $(EXEC)
+ ifneq (yes, $(NO_UDPXREC))
+ @rm -f $(UDPXREC)
diff --git a/net-misc/udpxy/files/udpxy.confd b/net-misc/udpxy/files/udpxy.confd
new file mode 100644
index 000000000000..e8e12ddf2f0d
--- /dev/null
+++ b/net-misc/udpxy/files/udpxy.confd
@@ -0,0 +1,24 @@
+
+#udpxy 1.0_Chipmunk (build 8) standard
+#usage: udpxy [-vTS] [-a listenaddr] -p port [-m mcast_ifc_addr] [-c clients] [-l logfile] [-B sizeK] [-n nice_incr]
+# -v : enable verbose output [default = disabled]
+# -S : enable client statistics [default = disabled]
+# -T : do NOT run as a daemon [default = daemon if root]
+# -a : (IPv4) address/interface to listen on [default = 0.0.0.0]
+# -p : port to listen on
+# -m : (IPv4) address/interface of (multicast) source [default = 0.0.0.0]
+# -c : max clients to serve [default = 3, max = 16]
+# -l : log output to file [default = stderr]
+# -B : cache size (65536, 32Kb, 1Mb) for inbound (multicast) data [default = 65536 bytes]
+# -R : maximum messages to cache in buffer (-1 = all) [default = -1]
+# -H : maximum time (sec) to hold data in buffer (-1 = unlimited) [default = 4]
+# -n : nice value increment [default = 0]
+# -M : periodically renew multicast subscription (skip if 0 sec) [default = 0 sec]
+#Examples:
+# udpxy -p 4022
+# listen for HTTP requests on port 4022, all network interfaces
+# udpxy -a lan0 -p 4022 -m lan1
+# listen for HTTP requests on interface lan0, port 4022;
+# subscribe to multicast groups on interface lan1
+
+UDPXYOPTS="-p 4022"
diff --git a/net-misc/udpxy/files/udpxy.initd b/net-misc/udpxy/files/udpxy.initd
new file mode 100644
index 000000000000..c5bc1be01bd7
--- /dev/null
+++ b/net-misc/udpxy/files/udpxy.initd
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting udpxy"
+ start-stop-daemon --start --exec /usr/bin/udpxy -- ${UDPXYOPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping udpxy"
+ start-stop-daemon --stop --exec /usr/bin/udpxy
+ eend $?
+}
+
diff --git a/net-misc/udpxy/files/udpxy.service b/net-misc/udpxy/files/udpxy.service
new file mode 100644
index 000000000000..35ee208ed5dc
--- /dev/null
+++ b/net-misc/udpxy/files/udpxy.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=UDP-to-HTTP multicast traffic relay daemon
+After=syslog.target network.target
+
+[Service]
+ExecStart=/usr/bin/udpxy -T -p 4022
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/udpxy/metadata.xml b/net-misc/udpxy/metadata.xml
new file mode 100644
index 000000000000..ff62877c67ae
--- /dev/null
+++ b/net-misc/udpxy/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/udpxy/udpxy-1.0.23.7-r1.ebuild b/net-misc/udpxy/udpxy-1.0.23.7-r1.ebuild
new file mode 100644
index 000000000000..d03143555e8c
--- /dev/null
+++ b/net-misc/udpxy/udpxy-1.0.23.7-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils systemd toolchain-funcs versionator
+
+MY_PV=$(replace_version_separator 3 -)
+DESCRIPTION="Small-footprint daemon to relay multicast UDP traffic to client's TCP (HTTP) connection"
+HOMEPAGE="http://sourceforge.net/projects/udpxy/"
+SRC_URI="http://www.udpxy.com/download/1_23/${PN}.${MY_PV}-prod.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+src_prepare() {
+ epatch_user
+ tc-export CC
+}
+
+src_install() {
+ dobin udpxy
+ dosym udpxy /usr/bin/udpxrec
+
+ doman doc/en/*.1
+ dodoc CHANGES README
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ systemd_dounit "${FILESDIR}/${PN}.service"
+}
diff --git a/net-misc/uftp/Manifest b/net-misc/uftp/Manifest
new file mode 100644
index 000000000000..c2e1e3a63727
--- /dev/null
+++ b/net-misc/uftp/Manifest
@@ -0,0 +1,2 @@
+DIST uftp-3.7.1.tar 849920 SHA256 9010317b53b68dc67408077d56d02becbe2e2a1027d4d27df5378c99fee27433 SHA512 93fefe1d4c5310bfa6470a78011e63aea8cc9cf59a73ea24920d3ad8c835476bbc410b3669ee79c847eba7d21d61f600e09529d5e6f2ed24076f663a34d99c15 WHIRLPOOL 7a4cbd8092ef1439ea4c11b96c5eb2504968f689f0a099208e0a0ba066e72394aa5fcbfb6ca9b9f382702b9631fc27cf80293f13d5e07d8b08818d39a371b1c9
+DIST uftp-3.7.tar 849920 SHA256 c5da4236e57dc152bc8dbb27110a4f504c2525ec079fa285c4f9309a798eca26 SHA512 8e154ea196b34995bc3831c375237a4d98f0627ca79fb6714b66763f64748810e5151efdc40773044a127a0e875ffcc8b985e6f7babd359ae38280a219c4d610 WHIRLPOOL 0a46c5588027ce67777fdfec3b45a27d97c4b95c9cbba9ebdb7704cee5d28b2db29e499ae1f3fcb5d29dec99ec54ade86a1bcaa5f5b8abc178e38768d910ab8d
diff --git a/net-misc/uftp/files/logrotate b/net-misc/uftp/files/logrotate
new file mode 100644
index 000000000000..8dd18f7c2aa9
--- /dev/null
+++ b/net-misc/uftp/files/logrotate
@@ -0,0 +1,16 @@
+#
+# /etc/logrotate.d/uftpd
+#
+/var/log/uftpd.log {
+ daily
+ rotate 5
+ notifempty
+ missingok
+}
+
+/var/log/uftpproxyd.log {
+ daily
+ rotate 5
+ notifempty
+ missingok
+}
diff --git a/net-misc/uftp/files/uftp-3.7_makefile.patch b/net-misc/uftp/files/uftp-3.7_makefile.patch
new file mode 100644
index 000000000000..81afe8b9baae
--- /dev/null
+++ b/net-misc/uftp/files/uftp-3.7_makefile.patch
@@ -0,0 +1,79 @@
+diff -Nuar uftp-3.7.orig//makefile uftp-3.7/makefile
+--- uftp-3.7.orig//makefile 2012-08-10 17:00:22.566403478 +0600
++++ uftp-3.7/makefile 2012-08-10 17:04:47.523386683 +0600
+@@ -39,25 +39,26 @@
+ endif
+
+ # defaults
+-CC = gcc
+-OPTIONS=-g -Wall $(ENC_OPTS)
++CC ?= gcc
++OPTIONS=$(ENC_OPTS)
+ LDLIBS=-lc -lm $(CRYPT_LIB)
+-CFLAGS=
++CFLAGS?=
++LDFLAGS?=
+
+ # FreeBSD
+ ifeq ("FreeBSD", "$(UNAME_S)")
+-OPTIONS=-g -Wall -DHAS_GETIFADDRS $(ENC_OPTS)
++OPTIONS=-DHAS_GETIFADDRS $(ENC_OPTS)
+ endif
+
+ # OSX, aka Darwin
+ ifeq ("Darwin", "$(UNAME_S)")
+-OPTIONS=-g -Wall -DHAS_GETIFADDRS $(ENC_OPTS)
++OPTIONS=-DHAS_GETIFADDRS $(ENC_OPTS)
+ endif
+
+ # Sun
+ ifeq ("SunOS", "$(UNAME_S)")
+-CC = cc
+-OPTIONS=-g -DBSD_COMP $(ENC_OPTS)
++CC ?= cc
++OPTIONS=-DBSD_COMP $(ENC_OPTS)
+ LDLIBS=-lnsl -lsocket -lm $(CRYPT_LIB)
+ CFLAGS=`getconf LFS_CFLAGS`
+ OPENSSL=/usr/sfw
+@@ -65,9 +66,9 @@
+
+ # Linux
+ ifeq ("Linux", "$(UNAME_S)")
+-OPTIONS=-g -Wall -DHAS_GETIFADDRS $(ENC_OPTS)
++OPTIONS=-DHAS_GETIFADDRS $(ENC_OPTS)
+ LDLIBS=-lm $(CRYPT_LIB)
+-CFLAGS=`getconf LFS_CFLAGS`
++CFLAGS?=`getconf LFS_CFLAGS`
+ endif
+
+ ifdef OPENSSL
+@@ -82,7 +83,7 @@
+ testclient_multi.o: testclient_multi.c uftp.h uftp_common.h encryption.h
+
+ testclient_multi: testclient_multi.o encrypt_openssl.o uftp_common.o
+- $(CC) $(OPTIONS) $(LIB) -o $@ $^ $(LDLIBS)
++ $(CC) $(OPTIONS) $(LIB) -o $@ $^ $(LDLIBS) $(LDFLAGS)
+
+ clean:
+ rm -f testclient_multi uftp uftpd uftpproxyd uftp_keymgt *.o
+@@ -176,16 +177,16 @@
+ endif
+
+ uftp: $(UFTP_OBJS)
+- $(CC) $(OPTIONS) $(LIB) -o $@ $^ $(LDLIBS)
++ $(CC) $(OPTIONS) $(LIB) -o $@ $^ $(LDLIBS) $(LDFLAGS)
+
+ uftpd: $(UFTPD_OBJS)
+- $(CC) $(OPTIONS) $(LIB) -o $@ $^ $(LDLIBS)
++ $(CC) $(OPTIONS) $(LIB) -o $@ $^ $(LDLIBS) $(LDFLAGS)
+
+ uftpproxyd: $(UFTPPROXYD_OBJS)
+- $(CC) $(OPTIONS) $(LIB) -o $@ $^ $(LDLIBS)
++ $(CC) $(OPTIONS) $(LIB) -o $@ $^ $(LDLIBS) $(LDFLAGS)
+
+ uftp_keymgt: $(UFTP_KEYMGT_OBJS)
+- $(CC) $(OPTIONS) $(LIB) -o $@ $^ $(LDLIBS)
++ $(CC) $(OPTIONS) $(LIB) -o $@ $^ $(LDLIBS) $(LDFLAGS)
+
+ %.o: %.c
+ $(CC) $(OPTIONS) $(INCLUDE) $(CFLAGS) -c $<
diff --git a/net-misc/uftp/files/uftpd.conf b/net-misc/uftp/files/uftpd.conf
new file mode 100644
index 000000000000..c38336c54bdc
--- /dev/null
+++ b/net-misc/uftp/files/uftpd.conf
@@ -0,0 +1,8 @@
+# conf.d file for uftpd
+
+# Destionation dir for downloaded files
+UFTPD_DIR="/tmp"
+
+# Options to pass to the uftpd process
+# For more info see man utfpd(1)
+UFTPD_OPTS=""
diff --git a/net-misc/uftp/files/uftpd.init b/net-misc/uftp/files/uftpd.init
new file mode 100644
index 000000000000..e2d6a22bc259
--- /dev/null
+++ b/net-misc/uftp/files/uftpd.init
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+PROGRAM=/usr/sbin/uftpd
+PIDFILE=/var/run/uftpd.pid
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting uftpd"
+ start-stop-daemon --start --exec ${PROGRAM} -- \
+ -L /var/log/uftpd.log -P ${PIDFILE} -D ${UFTPD_DIR} ${UFTPD_OPTS}
+ eend $? "Failed to start uftpd"
+}
+
+stop() {
+ ebegin "Stopping uftpd"
+ start-stop-daemon --stop --exec ${PROGRAM} -p ${PIDFILE}
+ eend $? "Failed to stop uftpd"
+}
diff --git a/net-misc/uftp/files/uftpproxyd.conf b/net-misc/uftp/files/uftpproxyd.conf
new file mode 100644
index 000000000000..37c094d7d7ba
--- /dev/null
+++ b/net-misc/uftp/files/uftpproxyd.conf
@@ -0,0 +1,5 @@
+# conf.d file for uftpd
+
+# Options to pass to the uftpd process
+# For more info see man utfpproxyd(1)
+UFTPPROXYD_OPTS=""
diff --git a/net-misc/uftp/files/uftpproxyd.init b/net-misc/uftp/files/uftpproxyd.init
new file mode 100644
index 000000000000..856226b3e3ea
--- /dev/null
+++ b/net-misc/uftp/files/uftpproxyd.init
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+PROGRAM=/usr/sbin/uftpproxyd
+PIDFILE=/var/run/uftpproxyd.pid
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting uftpd"
+ start-stop-daemon --start --exec ${PROGRAM} -- \
+ -L /var/log/uftpproxyd.log -P ${PIDFILE} ${UFTPPROXYD_OPTS}
+ eend $? "Failed to start uftpd"
+}
+
+stop() {
+ ebegin "Stopping uftpd"
+ start-stop-daemon --stop --exec ${PROGRAM} -p ${PIDFILE}
+ eend $? "Failed to stop uftpd"
+}
diff --git a/net-misc/uftp/metadata.xml b/net-misc/uftp/metadata.xml
new file mode 100644
index 000000000000..e172f68d2263
--- /dev/null
+++ b/net-misc/uftp/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>proxy-maintainers</herd>
+<maintainer>
+ <email>azamat.hackimov@gmail.com</email>
+ <name>Azamat Hackimov</name>
+</maintainer>
+<use>
+ <flag name="server">Install uftp server daemon</flag>
+</use>
+</pkgmetadata>
diff --git a/net-misc/uftp/uftp-3.7.1.ebuild b/net-misc/uftp/uftp-3.7.1.ebuild
new file mode 100644
index 000000000000..b3fea778f0f3
--- /dev/null
+++ b/net-misc/uftp/uftp-3.7.1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Encrypted UDP based FTP with multicast"
+HOMEPAGE="http://www.tcnj.edu/~bush/uftp.html"
+SRC_URI="http://www.tcnj.edu/~bush/downloads/${P}.tar"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+server ssl"
+
+DEPEND="ssl? ( dev-libs/openssl )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-3.7_makefile.patch"
+}
+
+src_compile() {
+ use ssl || local opt="NO_ENCRYPTION=1"
+ emake CC=$(tc-getCC) $opt uftp uftp_keymgt
+ use server && emake CC=$(tc-getCC) $opt uftpd uftpproxyd
+}
+
+src_install() {
+ dobin uftp uftp_keymgt
+ dodoc ReadMe.txt
+ doman uftp.1 uftp_keymgt.1
+
+ if use server ; then
+ dosbin uftpd uftpproxyd
+ newinitd "${FILESDIR}/uftpd.init" uftpd
+ newconfd "${FILESDIR}/uftpd.conf" uftpd
+ newinitd "${FILESDIR}/uftpproxyd.init" uftpproxyd
+ newconfd "${FILESDIR}/uftpproxyd.conf" uftpproxyd
+ doman uftpd.1 uftpproxyd.1
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/logrotate" uftpd
+ fi
+}
diff --git a/net-misc/uftp/uftp-3.7.ebuild b/net-misc/uftp/uftp-3.7.ebuild
new file mode 100644
index 000000000000..779b82a9631c
--- /dev/null
+++ b/net-misc/uftp/uftp-3.7.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Encrypted UDP based FTP with multicast"
+HOMEPAGE="http://www.tcnj.edu/~bush/uftp.html"
+SRC_URI="http://www.tcnj.edu/~bush/downloads/${P}.tar"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+server ssl"
+
+DEPEND="ssl? ( dev-libs/openssl )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}_makefile.patch"
+}
+
+src_compile() {
+ use ssl || local opt="NO_ENCRYPTION=1"
+ emake CC=$(tc-getCC) $opt uftp uftp_keymgt
+ use server && emake CC=$(tc-getCC) $opt uftpd uftpproxyd
+}
+
+src_install() {
+ dobin uftp uftp_keymgt
+ dodoc ReadMe.txt
+ doman uftp.1 uftp_keymgt.1
+
+ if use server ; then
+ dosbin uftpd uftpproxyd
+ newinitd "${FILESDIR}/uftpd.init" uftpd
+ newconfd "${FILESDIR}/uftpd.conf" uftpd
+ newinitd "${FILESDIR}/uftpproxyd.init" uftpproxyd
+ newconfd "${FILESDIR}/uftpproxyd.conf" uftpproxyd
+ doman uftpd.1 uftpproxyd.1
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/logrotate" uftpd
+ fi
+}
diff --git a/net-misc/unison/Manifest b/net-misc/unison/Manifest
new file mode 100644
index 000000000000..85471c5a057c
--- /dev/null
+++ b/net-misc/unison/Manifest
@@ -0,0 +1,15 @@
+DIST unison-2.27.157-manual.html 235599 SHA256 58f514c4c0818ebed6b2afa8e3dbf84871e240ddb6819d91e1b7c93be36c3f50 SHA512 6e00b597a62b7874f3459bbe150ee948125c0b06faf1ec4e90ddb3ac52e3684f6c4ce57dd599904d6cf53919904a08b30cbae84daf28eb6f2079c7c6bda48892 WHIRLPOOL 8d3f99038ff33c52980637299d782bde192ce3863d01a4dea91e12c36e70ddc5e8ea235d0c108b4b86113e2ed9d326c45fa675cc0da932089f6c37c95b7a0801
+DIST unison-2.27.157-manual.pdf 453255 SHA256 6af0f5242a08056d7dbcfce171083a577ed9748d13d1f9bc5d7050f224ec0162 SHA512 c5a9a7a0a30219fdcdd9c5bbef5245c718bad4f4e2e844d75b5a44b986b6e7c0fe37acfe95676f8e72530bc8a58e62f469f16eef5f0f0d45bed239e37eb634c2 WHIRLPOOL c54f0273a7c9993adeed001d93e2491772b796b2a02f75b4b56d42dfa7eaaea811b1ea2d07ead9245b7d7504e0944257c7d9f6b945834728418378674a83aba8
+DIST unison-2.27.157.tar.gz 674332 SHA256 ec04069e95249a5b4e212ab48ec03820b1e1f707fb4c607e7f98851e98735adc SHA512 5be96462d1e23164c173b1ad6088832d5a0dfeb8a2d3f6f4b197f8fdef5216d1fdb0b43fdf2d95dfe58c4a857089e1bd3ca3fbf7406019ba3a7837326bb2c554 WHIRLPOOL f05d39b16e3da9ac6c8511e0201b1c170bd98a66ffa21483eff3bc22af226bed4104423f9b08bdb72fb2d83c027586b374239bf5f0bf4930ed2e37b08897370c
+DIST unison-2.32.52-manual.html 249124 SHA256 c898239d8139d8405b96d87e12c06c7f41fd3629cac0c83bc338aad50fed7f81
+DIST unison-2.32.52-manual.pdf 478388 SHA256 b3fee7ac99907f3b1ed02c6ac901678e82ea1eed936acb45e9735b95d55cc4eb
+DIST unison-2.32.52.tar.gz 697866 SHA256 1542e5d4ad03e928260e061a8ff9d5e0bca3282481ed8bec5552de17a0270485 SHA512 a97ab23ca8b87575653f6fea4f7eba7fb5aacb8cfa0195ebfff70ecc38f88f26677b26d76c8ba68bd2dac24bdabfabc2f7334ab94bd4b4c0eeb94303438dbda1 WHIRLPOOL 0608afb822c01b90318be3532dd313469950165ab820c3f8134393e5ef97852b2dfd683125b9ad0c599f2ebcd0b42478dbc3a92f7afc46ebc4dbd664c752a674
+DIST unison-2.40.102-manual.html 267095 SHA256 d45cf43bff8805143c53b9f58c4250b781dae04caa0f8f30048c32eb8cf8bf75 SHA512 08e6f446cc1d905f2bb82b05560c9c8f432e1357a7077a472eb9188ab5b3ef5f687f25d9f9c27a8e091d7fb76057dc9bd3eee50c3718e6f306f77ea5e75a1aad WHIRLPOOL 0d2bac765e0234535df239d14c42db1283a32aeba2074290e0aff407c79d9c469d957437328ea47ccd561ffd718e2639a1abea6aaba6f4764e33fa627efe20de
+DIST unison-2.40.102-manual.pdf 496539 SHA256 145b427a32cc4e295b128238cf2106853906f3e31b0b06d6757c000fd1e3c56b SHA512 dc0ddb3158ee12f5d25bda690c67b8631df2aee07bb1b3f8077dacf5ac9fab2fcd7587a78136972e805e907fcea5991d2655aca50a0e3dfc2156ae1bb5e55896 WHIRLPOOL ca0e4ac796df48a53c33dda68c93150597a0fe420985bc36c4bb90d9f24636e7a88335092094c7756a8ddf308cdb7cc3c2e8e06a862881f4e05e63c4bfaae44a
+DIST unison-2.40.102.tar.gz 2717566 SHA256 4a63395e45bf6b93d5fee5cacbf686c3d9fe43dd7e6fc75ec6fe1a85cf1285ef SHA512 813b5fcad43a3472d0eac38977a6268463db71f133b5f9b08c4357774f8f46ae234f9ffc42dfa3fe960588c61607a5f7dd37ab6553045668fcf53dce59aeec22 WHIRLPOOL e5e81539c9ddb4da5817740d95607ffde0b6543dbed13ca476300138056d7c486e1b8a1493b3f28b0b42b0d932fcc68ca8e65a48a6525d009a033ba8e5f6111c
+DIST unison-2.45.4-manual.html 270543 SHA256 472598d57ef74972a6488f412ba29200f66c809c165b224aef0458708d00a93b SHA512 4faa79620bdf78fd84635f9595ec1048f3a5782e6284d26f26dcaea9193e9199d4be7d4f800900ce01890333af250857763678d271d623346650676ddc5eda3c WHIRLPOOL 271142522f732bae204989ac4022b36cfdf3b4e688d4cf0ee2f271fb09b8a31af952f5d94b8f3d6c7a38859fb5fcc690fa280fa1db87d377e5ab66803609f59b
+DIST unison-2.45.4-manual.pdf 513121 SHA256 f6488eae9fd1e5be405054d96df3aacd5b51c7ce64f615cfed7a43b516f0e839 SHA512 ce27591d77bbc09d41d02af15ae1618226fcb86833969cd3d199798252565f0b507bdb0d7ac3d0201c36a9a9138c89b3b0d2e3a08f28bd1d9cd1692c0d7dea18 WHIRLPOOL 49bd398fa04b9972044f9a6a164216d6032f785da2caedfc3c971f6a5f5d2f4a7d953841092ebe19ddc949a0f6a8082a7d43c8e1eea145a2fccbd943c2baf01f
+DIST unison-2.45.4.tar.gz 2716641 SHA256 f60a3327137129381b2028be43f84d79709ca5794d6394a6ca67a0f5f4d481c1 SHA512 f9ff18b6f2bd46fbb416a90b71e75c641e4c42bdd97f3f4bb13f47e3b629fa5f640ac9a2fca36322838c8ab790770ccaf47526260bdd655e65b1344b6eee02ef WHIRLPOOL a09d54da541866499b59675a2fd3ab998206c140b25df21e25dbb57788b75db11c3313eca613926d2c12b571422e1ef41ace691ee97322b750b8c65c026003b8
+DIST unison-2.48.3-manual.html 278156 SHA256 500d8f83770fc3b07cf443dfb1579281d4379002d51523aa73451e03f6cdbe1a SHA512 50924c624abd86f231ad8cbcfd4e383322a55733108685255df21df6da26d9ad1ac7d4f7d7dcd82faf4696f3f0136c0ff3c8cf5ffda4042f63451f2b7c8e9502 WHIRLPOOL 9a48a23049cd8753ebfd71e2f396107039b1fdc76877a8dc4f229ef8dda6a9481b80156e66c27015c96e7a752dedb2ca7781f42c01a8839ec0361f150910dfcd
+DIST unison-2.48.3-manual.pdf 516703 SHA256 cba2946656e04b856d98184b539e382ed85d987d24458a39e156946125f7b578 SHA512 3a16d6e0df6370784f960d37749f56a223c5eaab24ded299f6a61058f7692139239d0d64436d93268b4cbd8031de6139e187aca0beb54345a615e71253bce977 WHIRLPOOL fd57fec2e5a2605bca216bc4ae441ecd122faa26cd5abdfb39ea19ca4f44961691d266e86b702536dd7326b4072718d9c67739d7a264f9b4127330a41aff6823
+DIST unison-2.48.3.tar.gz 1172646 SHA256 f40d3cfbe82078d79328b51acab3e5179f844135260c2f4710525b9b45b15483 SHA512 169b272119b33146e4f770d1fc9a45d8278502a85a4ae02fd5cb94bade667bdd0ee31bef9acf6cf5170368ecfff948ee668ee195ff7e956c4eeaeed6f83d8d0d WHIRLPOOL a903f1f5e996655e3e001f33b959d839d2540d0a5c0584fded7aa483a774d8b07b3e7997357f03426f41ef6505cf3d40dec18616252c02add4a417dfef4c8df4
diff --git a/net-misc/unison/files/unison-2.27.57-as-needed.patch b/net-misc/unison/files/unison-2.27.57-as-needed.patch
new file mode 100644
index 000000000000..ff5be04853ff
--- /dev/null
+++ b/net-misc/unison/files/unison-2.27.57-as-needed.patch
@@ -0,0 +1,11 @@
+--- unison-2.17.1/Makefile.OCaml
++++ unison-2.17.1/Makefile.OCaml
+@@ -330,7 +330,7 @@
+
+ $(NAME)$(EXEC_EXT): $(CAMLOBJS) $(COBJS)
+ @echo Linking $@
+- $(CAMLC) -verbose $(CAMLFLAGS) -o $@ $(CFLAGS) $(CAMLLIBS) $(CLIBS) $^
++ $(CAMLC) -verbose $(CAMLFLAGS) -o $@ $(CFLAGS) $(CAMLLIBS) $^ $(CLIBS)
+
+ # Unfortunately -output-obj does not put .o files into the output, only .cmx
+ # files, so we have to use $(LD) to take care of COBJS.
diff --git a/net-misc/unison/files/unison-mymap.patch b/net-misc/unison/files/unison-mymap.patch
new file mode 100644
index 000000000000..030eb0f0174e
--- /dev/null
+++ b/net-misc/unison/files/unison-mymap.patch
@@ -0,0 +1,13 @@
+Index: unison-2.32.52/update.mli
+===================================================================
+--- unison-2.32.52.orig/update.mli
++++ unison-2.32.52/update.mli
+@@ -1,7 +1,7 @@
+ (* Unison file synchronizer: src/update.mli *)
+ (* Copyright 1999-2009, Benjamin C. Pierce (see COPYING for details) *)
+
+-module NameMap : Map.S with type key = Name.t
++module NameMap : MyMap.S with type key = Name.t
+
+ type archive =
+ ArchiveDir of Props.t * archive NameMap.t
diff --git a/net-misc/unison/metadata.xml b/net-misc/unison/metadata.xml
new file mode 100644
index 000000000000..2193d772e351
--- /dev/null
+++ b/net-misc/unison/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>ml</herd>
+</pkgmetadata>
diff --git a/net-misc/unison/unison-2.27.157.ebuild b/net-misc/unison/unison-2.27.157.ebuild
new file mode 100644
index 000000000000..7fdc84e465eb
--- /dev/null
+++ b/net-misc/unison/unison-2.27.157.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils versionator
+
+IUSE="gtk doc static debug threads +ocamlopt"
+
+DESCRIPTION="Two-way cross-platform file synchronizer"
+HOMEPAGE="http://www.cis.upenn.edu/~bcpierce/unison/"
+LICENSE="GPL-2"
+SLOT="$(get_version_component_range 1-2 ${PV})"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux"
+
+# ocaml version so we are sure it has ocamlopt use flag
+DEPEND=">=dev-lang/ocaml-3.10.2[ocamlopt?]
+ gtk? ( >=dev-ml/lablgtk-2.2 )"
+
+RDEPEND="gtk? ( >=dev-ml/lablgtk-2.2
+|| ( net-misc/x11-ssh-askpass net-misc/ssh-askpass-fullscreen ) )
+ !net-misc/unison:0
+ app-eselect/eselect-unison"
+
+PDEPEND="gtk? ( media-fonts/font-schumacher-misc )"
+
+SRC_URI="http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}.tar.gz
+doc? ( http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}-manual.pdf
+ http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}-manual.html )"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-2.27.57-as-needed.patch"
+ epatch "${FILESDIR}/${PN}-mymap.patch"
+}
+
+src_compile() {
+ local myconf
+
+ if use threads; then
+ myconf="$myconf THREADS=true"
+ fi
+
+ if use static; then
+ myconf="$myconf STATIC=true"
+ fi
+
+ if use debug; then
+ myconf="$myconf DEBUGGING=true"
+ fi
+
+ if use gtk; then
+ myconf="$myconf UISTYLE=gtk2"
+ else
+ myconf="$myconf UISTYLE=text"
+ fi
+
+ use ocamlopt || myconf="$myconf NATIVE=false"
+
+ # Discard cflags as it will try to pass them to ocamlc...
+ emake -j1 $myconf CFLAGS="" || die "error making unsion"
+}
+
+src_test() {
+ emake selftest || die "selftest failed"
+}
+
+src_install () {
+ # install manually, since it's just too much
+ # work to force the Makefile to do the right thing.
+ newbin unison unison-${SLOT} || die
+ dodoc BUGS.txt CONTRIB INSTALL NEWS \
+ README ROADMAP.txt TODO.txt || die
+
+ if use doc; then
+ dohtml "${DISTDIR}/${P}-manual.html" || die
+ dodoc "${DISTDIR}/${P}-manual.pdf" || die
+ fi
+ use ocamlopt || export STRIP_MASK="*/bin/*"
+}
+
+pkg_postinst() {
+ elog "Unison now uses SLOTs, so you can specify servercmd=/usr/bin/unison-${SLOT}"
+ elog "in your profile files to access exactly this version over ssh."
+ elog "Or you can use 'eselect unison' to set the version."
+}
diff --git a/net-misc/unison/unison-2.32.52.ebuild b/net-misc/unison/unison-2.32.52.ebuild
new file mode 100644
index 000000000000..6a3855ff1128
--- /dev/null
+++ b/net-misc/unison/unison-2.32.52.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils versionator
+
+IUSE="gtk doc static debug threads +ocamlopt test"
+
+DESCRIPTION="Two-way cross-platform file synchronizer"
+HOMEPAGE="http://www.cis.upenn.edu/~bcpierce/unison/"
+LICENSE="GPL-2"
+SLOT="$(get_version_component_range 1-2 ${PV})"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris"
+
+# ocaml version so we are sure it has ocamlopt use flag
+DEPEND=">=dev-lang/ocaml-3.10.2[ocamlopt?]
+ gtk? ( >=dev-ml/lablgtk-2.2 )
+ test? ( || ( dev-util/ctags virtual/emacs ) )"
+
+RDEPEND="gtk? ( >=dev-ml/lablgtk-2.2
+ || ( net-misc/x11-ssh-askpass net-misc/ssh-askpass-fullscreen ) )
+ !net-misc/unison:0
+ app-eselect/eselect-unison"
+
+#PDEPEND="gtk? ( media-fonts/font-schumacher-misc )"
+
+SRC_URI="http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}.tar.gz
+ doc? ( http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}-manual.pdf
+ http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}-manual.html )"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-2.27.57-as-needed.patch"
+ epatch "${FILESDIR}/${PN}-mymap.patch"
+}
+
+src_compile() {
+ local myconf
+
+ if use threads; then
+ myconf="$myconf THREADS=true"
+ fi
+
+ if use static; then
+ myconf="$myconf STATIC=true"
+ fi
+
+ if use debug; then
+ myconf="$myconf DEBUGGING=true"
+ fi
+
+ if use gtk; then
+ myconf="$myconf UISTYLE=gtk2"
+ else
+ myconf="$myconf UISTYLE=text"
+ fi
+
+ use ocamlopt || myconf="$myconf NATIVE=false"
+
+ # Discard cflags as it will try to pass them to ocamlc...
+ emake $myconf CFLAGS="" buildexecutable || die "error making unsion"
+}
+
+src_test() {
+ emake selftest || die "selftest failed"
+}
+
+src_install () {
+ # install manually, since it's just too much
+ # work to force the Makefile to do the right thing.
+ newbin unison unison-${SLOT} || die
+ dodoc BUGS.txt CONTRIB INSTALL NEWS \
+ README ROADMAP.txt TODO.txt || die
+
+ if use doc; then
+ dohtml "${DISTDIR}/${P}-manual.html" || die
+ dodoc "${DISTDIR}/${P}-manual.pdf" || die
+ fi
+ use ocamlopt || export STRIP_MASK="*/bin/*"
+}
+
+pkg_postinst() {
+ elog "Unison now uses SLOTs, so you can specify servercmd=/usr/bin/unison-${SLOT}"
+ elog "in your profile files to access exactly this version over ssh."
+ elog "Or you can use 'eselect unison' to set the version."
+}
diff --git a/net-misc/unison/unison-2.40.102.ebuild b/net-misc/unison/unison-2.40.102.ebuild
new file mode 100644
index 000000000000..8392a648f930
--- /dev/null
+++ b/net-misc/unison/unison-2.40.102.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils versionator
+
+IUSE="gtk doc static debug threads +ocamlopt test"
+
+DESCRIPTION="Two-way cross-platform file synchronizer"
+HOMEPAGE="http://www.cis.upenn.edu/~bcpierce/unison/"
+LICENSE="GPL-2"
+SLOT="$(get_version_component_range 1-2 ${PV})"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris"
+
+# ocaml version so we are sure it has ocamlopt use flag
+DEPEND=">=dev-lang/ocaml-3.10.2[ocamlopt?]
+ gtk? ( >=dev-ml/lablgtk-2.2 )
+ test? ( || ( dev-util/ctags virtual/emacs ) )"
+
+RDEPEND="gtk? ( >=dev-ml/lablgtk-2.2
+ || ( net-misc/x11-ssh-askpass net-misc/ssh-askpass-fullscreen ) )
+ !net-misc/unison:0
+ app-eselect/eselect-unison"
+
+#PDEPEND="gtk? ( media-fonts/font-schumacher-misc )"
+
+SRC_URI="http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}.tar.gz
+ doc? ( http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}-manual.pdf
+ http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}-manual.html )"
+
+src_compile() {
+ local myconf
+
+ if use threads; then
+ myconf="$myconf THREADS=true"
+ fi
+
+ if use static; then
+ myconf="$myconf STATIC=true"
+ fi
+
+ if use debug; then
+ myconf="$myconf DEBUGGING=true"
+ fi
+
+ if use gtk; then
+ myconf="$myconf UISTYLE=gtk2"
+ else
+ myconf="$myconf UISTYLE=text"
+ fi
+
+ use ocamlopt || myconf="$myconf NATIVE=false"
+
+ # Discard cflags as it will try to pass them to ocamlc...
+ emake $myconf CFLAGS="" buildexecutable
+}
+
+src_test() {
+ emake selftest
+}
+
+src_install () {
+ # install manually, since it's just too much
+ # work to force the Makefile to do the right thing.
+ newbin unison unison-${SLOT}
+ dodoc BUGS.txt CONTRIB INSTALL NEWS \
+ README ROADMAP.txt TODO.txt
+
+ if use doc; then
+ dohtml "${DISTDIR}/${P}-manual.html"
+ dodoc "${DISTDIR}/${P}-manual.pdf"
+ fi
+ use ocamlopt || export STRIP_MASK="*/bin/*"
+}
+
+pkg_postinst() {
+ elog "Unison now uses SLOTs, so you can specify servercmd=/usr/bin/unison-${SLOT}"
+ elog "in your profile files to access exactly this version over ssh."
+ elog "Or you can use 'eselect unison' to set the version."
+}
diff --git a/net-misc/unison/unison-2.45.4.ebuild b/net-misc/unison/unison-2.45.4.ebuild
new file mode 100644
index 000000000000..8392a648f930
--- /dev/null
+++ b/net-misc/unison/unison-2.45.4.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils versionator
+
+IUSE="gtk doc static debug threads +ocamlopt test"
+
+DESCRIPTION="Two-way cross-platform file synchronizer"
+HOMEPAGE="http://www.cis.upenn.edu/~bcpierce/unison/"
+LICENSE="GPL-2"
+SLOT="$(get_version_component_range 1-2 ${PV})"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris"
+
+# ocaml version so we are sure it has ocamlopt use flag
+DEPEND=">=dev-lang/ocaml-3.10.2[ocamlopt?]
+ gtk? ( >=dev-ml/lablgtk-2.2 )
+ test? ( || ( dev-util/ctags virtual/emacs ) )"
+
+RDEPEND="gtk? ( >=dev-ml/lablgtk-2.2
+ || ( net-misc/x11-ssh-askpass net-misc/ssh-askpass-fullscreen ) )
+ !net-misc/unison:0
+ app-eselect/eselect-unison"
+
+#PDEPEND="gtk? ( media-fonts/font-schumacher-misc )"
+
+SRC_URI="http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}.tar.gz
+ doc? ( http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}-manual.pdf
+ http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}-manual.html )"
+
+src_compile() {
+ local myconf
+
+ if use threads; then
+ myconf="$myconf THREADS=true"
+ fi
+
+ if use static; then
+ myconf="$myconf STATIC=true"
+ fi
+
+ if use debug; then
+ myconf="$myconf DEBUGGING=true"
+ fi
+
+ if use gtk; then
+ myconf="$myconf UISTYLE=gtk2"
+ else
+ myconf="$myconf UISTYLE=text"
+ fi
+
+ use ocamlopt || myconf="$myconf NATIVE=false"
+
+ # Discard cflags as it will try to pass them to ocamlc...
+ emake $myconf CFLAGS="" buildexecutable
+}
+
+src_test() {
+ emake selftest
+}
+
+src_install () {
+ # install manually, since it's just too much
+ # work to force the Makefile to do the right thing.
+ newbin unison unison-${SLOT}
+ dodoc BUGS.txt CONTRIB INSTALL NEWS \
+ README ROADMAP.txt TODO.txt
+
+ if use doc; then
+ dohtml "${DISTDIR}/${P}-manual.html"
+ dodoc "${DISTDIR}/${P}-manual.pdf"
+ fi
+ use ocamlopt || export STRIP_MASK="*/bin/*"
+}
+
+pkg_postinst() {
+ elog "Unison now uses SLOTs, so you can specify servercmd=/usr/bin/unison-${SLOT}"
+ elog "in your profile files to access exactly this version over ssh."
+ elog "Or you can use 'eselect unison' to set the version."
+}
diff --git a/net-misc/unison/unison-2.48.3.ebuild b/net-misc/unison/unison-2.48.3.ebuild
new file mode 100644
index 000000000000..8392a648f930
--- /dev/null
+++ b/net-misc/unison/unison-2.48.3.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils versionator
+
+IUSE="gtk doc static debug threads +ocamlopt test"
+
+DESCRIPTION="Two-way cross-platform file synchronizer"
+HOMEPAGE="http://www.cis.upenn.edu/~bcpierce/unison/"
+LICENSE="GPL-2"
+SLOT="$(get_version_component_range 1-2 ${PV})"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris"
+
+# ocaml version so we are sure it has ocamlopt use flag
+DEPEND=">=dev-lang/ocaml-3.10.2[ocamlopt?]
+ gtk? ( >=dev-ml/lablgtk-2.2 )
+ test? ( || ( dev-util/ctags virtual/emacs ) )"
+
+RDEPEND="gtk? ( >=dev-ml/lablgtk-2.2
+ || ( net-misc/x11-ssh-askpass net-misc/ssh-askpass-fullscreen ) )
+ !net-misc/unison:0
+ app-eselect/eselect-unison"
+
+#PDEPEND="gtk? ( media-fonts/font-schumacher-misc )"
+
+SRC_URI="http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}.tar.gz
+ doc? ( http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}-manual.pdf
+ http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}-manual.html )"
+
+src_compile() {
+ local myconf
+
+ if use threads; then
+ myconf="$myconf THREADS=true"
+ fi
+
+ if use static; then
+ myconf="$myconf STATIC=true"
+ fi
+
+ if use debug; then
+ myconf="$myconf DEBUGGING=true"
+ fi
+
+ if use gtk; then
+ myconf="$myconf UISTYLE=gtk2"
+ else
+ myconf="$myconf UISTYLE=text"
+ fi
+
+ use ocamlopt || myconf="$myconf NATIVE=false"
+
+ # Discard cflags as it will try to pass them to ocamlc...
+ emake $myconf CFLAGS="" buildexecutable
+}
+
+src_test() {
+ emake selftest
+}
+
+src_install () {
+ # install manually, since it's just too much
+ # work to force the Makefile to do the right thing.
+ newbin unison unison-${SLOT}
+ dodoc BUGS.txt CONTRIB INSTALL NEWS \
+ README ROADMAP.txt TODO.txt
+
+ if use doc; then
+ dohtml "${DISTDIR}/${P}-manual.html"
+ dodoc "${DISTDIR}/${P}-manual.pdf"
+ fi
+ use ocamlopt || export STRIP_MASK="*/bin/*"
+}
+
+pkg_postinst() {
+ elog "Unison now uses SLOTs, so you can specify servercmd=/usr/bin/unison-${SLOT}"
+ elog "in your profile files to access exactly this version over ssh."
+ elog "Or you can use 'eselect unison' to set the version."
+}
diff --git a/net-misc/unix2tcp/Manifest b/net-misc/unix2tcp/Manifest
new file mode 100644
index 000000000000..ae0e21266f09
--- /dev/null
+++ b/net-misc/unix2tcp/Manifest
@@ -0,0 +1 @@
+DIST unix2tcp-0.8.2.tar.bz2 29636 SHA256 aff16bf2873862badeef532d829dee5029f6e921138afdc82a8de6024ed042bb SHA512 0f46895b1693065b592915574142c6475d79701c2f2eca70cfb40603849af9bdb6be939119fcca1d50d069ace940da691cf554a33eb2ac357194cf729b2c7a20 WHIRLPOOL 5086491e72a667b6032a8f4937c581f095dbff8a9bec99ab98b30650b26633f0cbc066c5904163d035a796bebc0593910f3c13f8a60703d0cbdbd8f1f678d509
diff --git a/net-misc/unix2tcp/metadata.xml b/net-misc/unix2tcp/metadata.xml
new file mode 100644
index 000000000000..1470e032181b
--- /dev/null
+++ b/net-misc/unix2tcp/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/unix2tcp/unix2tcp-0.8.2.ebuild b/net-misc/unix2tcp/unix2tcp-0.8.2.ebuild
new file mode 100644
index 000000000000..c64e49d5b2c0
--- /dev/null
+++ b/net-misc/unix2tcp/unix2tcp-0.8.2.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="a connection forwarder that converts Unix sockets into TCP sockets"
+HOMEPAGE="http://dizzy.roedu.net/unix2tcp/"
+SRC_URI="http://dizzy.roedu.net/unix2tcp/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 arm hppa ia64 ~ppc s390 x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc ChangeLog README
+}
diff --git a/net-misc/urlview/Manifest b/net-misc/urlview/Manifest
new file mode 100644
index 000000000000..9d56ad8a8153
--- /dev/null
+++ b/net-misc/urlview/Manifest
@@ -0,0 +1 @@
+DIST urlview-0.9.tar.gz 46685 SHA256 74d18026e84e3cd70a3fdd1a7247a68031b0c1c1c6d761d64b7063ff71091cc3 SHA512 5415c30e34f429c78001b1e87a75a43503d1998b667eaac66dc49298ea491914c6360baba33b5caeeb4ad54e3a4533a46afc05de3b1f135e41069d00fad0936a WHIRLPOOL 1a6311a5ca0675dc937b0875ca4d4955644c7f875e79dfda2db593499fa5bf1ec006db6c118d6f086aae462dcb5f3f3ec114645f5d6d3dd4d42b33625b30a1af
diff --git a/net-misc/urlview/files/include-fix.patch b/net-misc/urlview/files/include-fix.patch
new file mode 100644
index 000000000000..b9bb6ab46992
--- /dev/null
+++ b/net-misc/urlview/files/include-fix.patch
@@ -0,0 +1,11 @@
+--- a/urlview.c
++++ b/urlview.c
+@@ -40,6 +40,8 @@
+ #include <fcntl.h>
+ #include <sys/stat.h>
+
++#include "quote.h"
++
+ #ifdef HAVE_REGEX_H
+ #include <regex.h>
+ #else
diff --git a/net-misc/urlview/files/no-trailing-newline.patch b/net-misc/urlview/files/no-trailing-newline.patch
new file mode 100644
index 000000000000..6d78cd4ed073
--- /dev/null
+++ b/net-misc/urlview/files/no-trailing-newline.patch
@@ -0,0 +1,11 @@
+--- a/urlview.c
++++ b/urlview.no-trailing-newline.c
+@@ -46,7 +46,7 @@
+ #include <rx/rxposix.h>
+ #endif
+
+-#define DEFAULT_REGEXP "(((https?|ftp|gopher)://|(mailto|file|news):)[^' \t<>\"]+|(www|web|w3)\\.[-a-z0-9.]+)[^' \t.,;<>\"\\):]"
++#define DEFAULT_REGEXP "(((https?|ftp|gopher)://|(mailto|file|news):)[^' \t<>\"]+|(www|web|w3)\\.[-a-z0-9.]+)[^' \n\t.,;<>\"\\):]"
+ #define DEFAULT_COMMAND "url_handler.sh %s"
+ #define SYSTEM_INITFILE "/etc/urlview.conf"
+
diff --git a/net-misc/urlview/files/urlview-0.9-DESTDIR.patch b/net-misc/urlview/files/urlview-0.9-DESTDIR.patch
new file mode 100644
index 000000000000..8c4cfe816b63
--- /dev/null
+++ b/net-misc/urlview/files/urlview-0.9-DESTDIR.patch
@@ -0,0 +1,23 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -11,6 +11,7 @@
+ CLEANFILES = *~ *.orig *.rej
+
+ install-data-local:
+- $(INSTALL_DATA) urlview.man $(mandir)/man1/urlview.1
++ $(mkinstalldirs) $(DESTDIR)$(mandir)/man1
++ $(INSTALL_DATA) urlview.man ${DESTDIR}$(mandir)/man1/urlview.1
+
+ # how to create a target for uninstall-data-local???
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -318,7 +318,8 @@
+
+
+ install-data-local:
+- $(INSTALL_DATA) urlview.man $(mandir)/man1/urlview.1
++ $(mkinstalldirs) $(DESTDIR)$(mandir)/man1
++ $(INSTALL_DATA) urlview.man $(DESTDIR)$(mandir)/man1/urlview.1
+
+ # how to create a target for uninstall-data-local???
+
diff --git a/net-misc/urlview/files/urlview-0.9-tinfo.patch b/net-misc/urlview/files/urlview-0.9-tinfo.patch
new file mode 100644
index 000000000000..e8f3886a4d0e
--- /dev/null
+++ b/net-misc/urlview/files/urlview-0.9-tinfo.patch
@@ -0,0 +1,21 @@
+--- a/configure.in
++++ b/configure.in
+@@ -3,6 +3,8 @@
+ dnl AM_CONFIG_HEADER(config.h)
+ AM_PROG_CC_STDC
+ CFLAGS="$CFLAGS -DURLVIEW -Dunix"
++
++PKG_CHECK_MODULES(ncurses,ncurses)
+ AC_ARG_WITH(slang, [ --with-slang[=DIR] use S-Lang instead of curses],
+ [AC_DEFINE(USE_SLANG)
+ if test $withval = yes -a -d ../slang; then
+@@ -22,8 +24,7 @@
+ fi
+ LIBS="$LIBS -lslang -lm"
+ fi],
+-
+- [AC_CHECK_LIB(ncurses, initscr, [LIBS="$LIBS -lncurses"], [LIBS="$LIBS -lcurses"])
++ [LIBS="$LIBS $ncurses_LIBS"
+ AC_CHECK_FUNCS(curs_set)
+ AC_CHECK_HEADERS(ncurses.h)
+ AC_CHECK_HEADER(ncurses/curses.h, [CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses"])])
diff --git a/net-misc/urlview/metadata.xml b/net-misc/urlview/metadata.xml
new file mode 100644
index 000000000000..4d90cf4a1cd0
--- /dev/null
+++ b/net-misc/urlview/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>nimiux@gentoo.org</email>
+ <name>Chema Alonso</name>
+ </maintainer>
+ <longdescription lang="en">
+ urlview is a screen oriented program for extracting URLs from text
+ files and displaying a menu from which you may launch a command to view
+ a specific item.
+ </longdescription>
+ <longdescription lang="es">
+ urlview es un programa orientado a terminal para la extracción de URLs
+ desde ficheros de texto. El programa muestra un menú desde el que se
+ puede lanzar una orden para ver un elemento en particular.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/urlview/urlview-0.9.ebuild b/net-misc/urlview/urlview-0.9.ebuild
new file mode 100644
index 000000000000..f26b69579185
--- /dev/null
+++ b/net-misc/urlview/urlview-0.9.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="extracts urls from text and will send them to another app"
+HOMEPAGE="http://www.mutt.org"
+SRC_URI="ftp://gd.tuwien.ac.at/infosys/mail/mutt/contrib/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ia64 ppc ppc64 s390 sh sparc x86"
+
+RDEPEND="
+ >=sys-libs/ncurses-5.2
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/no-trailing-newline.patch \
+ "${FILESDIR}"/include-fix.patch \
+ "${FILESDIR}"/${P}-DESTDIR.patch \
+ "${FILESDIR}"/${P}-tinfo.patch
+
+ eautoreconf
+}
+
+src_install() {
+ default
+ dodoc README INSTALL ChangeLog AUTHORS sample.urlview
+ dobin url_handler.sh
+}
+
+pkg_postinst() {
+ echo
+ einfo "There is a sample.urlview in /usr/share/doc/${P}"
+ einfo "You can also customize /usr/bin/url_handler.sh"
+ echo
+ einfo "If using urlview from mutt, you may need to "set pipe_decode" in"
+ einfo "your ~/.muttrc to prevent garbled URLs."
+ echo
+}
diff --git a/net-misc/usbip/Manifest b/net-misc/usbip/Manifest
new file mode 100644
index 000000000000..927fe54aec46
--- /dev/null
+++ b/net-misc/usbip/Manifest
@@ -0,0 +1 @@
+DIST linux-3.19.tar.xz 81688872 SHA256 be42511fe5321012bb4a2009167ce56a9e5fe362b4af43e8c371b3666859806c SHA512 d77bfd9b1cd524ac50bb5a93808955be2f9bcd2ec0badcc8aa6a63401e212f891fd14bd27c6441174ba5d70ab875b9e76c7ebc95f046e31aff1d40790d30351c WHIRLPOOL 76a17bb3d7c30cee19e135940f3607106efb2984061f946f0da9a2ddd602dc1bfc7e6f8970975cfb113d13f23a75415f39938204af266e2819e7a239b6f46778
diff --git a/net-misc/usbip/metadata.xml b/net-misc/usbip/metadata.xml
new file mode 100644
index 000000000000..8a9b49eec325
--- /dev/null
+++ b/net-misc/usbip/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>chithanh@gentoo.org</email>
+ <name>Chí-Thanh Christopher Nguyễn</name>
+ </maintainer>
+</pkgmetadata>
+
diff --git a/net-misc/usbip/usbip-3.19.ebuild b/net-misc/usbip/usbip-3.19.ebuild
new file mode 100644
index 000000000000..a737afaee143
--- /dev/null
+++ b/net-misc/usbip/usbip-3.19.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+ETYPE="sources"
+K_NOUSENAME=1
+inherit autotools eutils kernel-2
+
+DESCRIPTION="Userspace utilities for a general USB device sharing system over IP networks"
+HOMEPAGE="http://www.kernel.org/"
+SRC_URI="${KERNEL_URI}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs tcpd"
+RESTRICT=""
+
+RDEPEND=">=dev-libs/glib-2.6
+ sys-apps/hwids
+ >=sys-kernel/linux-headers-3.17
+ virtual/libudev
+ tcpd? ( sys-apps/tcp-wrappers )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="AUTHORS README ../../../drivers/usb/usbip/usbip_protocol.txt"
+
+S=${WORKDIR}/linux-${PV}/tools/usb/${PN}
+
+src_prepare() {
+ # remove -Werror from build, bug #545398
+ sed -i 's/-Werror[^ ]* //g' configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use tcpd || echo --without-tcp-wrappers) \
+ --with-usbids-dir=/usr/share/misc
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ elog "For using USB/IP you need to enable USBIP_VHCI_HCD in the client"
+ elog "machine's kernel config and USBIP_HOST on the server."
+}
diff --git a/net-misc/utelnetd/Manifest b/net-misc/utelnetd/Manifest
new file mode 100644
index 000000000000..53b9b1711996
--- /dev/null
+++ b/net-misc/utelnetd/Manifest
@@ -0,0 +1 @@
+DIST utelnetd-0.1.9.tar.gz 15310 SHA256 fbc182ef314681b90a4f73049c6bf332dc93b7cbebbf39a6086a126ed2787346
diff --git a/net-misc/utelnetd/files/utelnetd.initd b/net-misc/utelnetd/files/utelnetd.initd
new file mode 100644
index 000000000000..fe87e80f6798
--- /dev/null
+++ b/net-misc/utelnetd/files/utelnetd.initd
@@ -0,0 +1,16 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+start() {
+ ebegin "Starting utelnetd"
+ start-stop-daemon -b --start --quiet --exec /usr/sbin/utelnetd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping utelnetd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/utelnetd
+ eend $?
+}
diff --git a/net-misc/utelnetd/metadata.xml b/net-misc/utelnetd/metadata.xml
new file mode 100644
index 000000000000..6c730730ce44
--- /dev/null
+++ b/net-misc/utelnetd/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>maintainer-needed@gentoo.org</email>
+</maintainer>
+<longdescription>This is a small telnet daemon for standalone use, mostly on embedded systems.</longdescription>
+</pkgmetadata>
diff --git a/net-misc/utelnetd/utelnetd-0.1.9-r1.ebuild b/net-misc/utelnetd/utelnetd-0.1.9-r1.ebuild
new file mode 100644
index 000000000000..a7b58fc0458c
--- /dev/null
+++ b/net-misc/utelnetd/utelnetd-0.1.9-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="A small Telnet daemon, derived from the Axis tools"
+HOMEPAGE="http://www.pengutronix.de/software/utelnetd_en.html"
+SRC_URI="http://www.pengutronix.de/software/utelnetd/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~s390 ~sparc ~x86"
+IUSE=""
+
+DEPEND="virtual/shadow"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i \
+ -e "/(STRIP)/d" \
+ -e "/^CC/s:=.*:= $(tc-getCC):" \
+ Makefile || die
+}
+
+src_install() {
+ dosbin utelnetd || die
+ dodoc ChangeLog README
+
+ newinitd "${FILESDIR}"/utelnetd.initd utelnetd
+}
diff --git a/net-misc/valve/Manifest b/net-misc/valve/Manifest
new file mode 100644
index 000000000000..b4acc1d4275d
--- /dev/null
+++ b/net-misc/valve/Manifest
@@ -0,0 +1 @@
+DIST valve-1.0.tar.gz 272182 RMD160 c78a18523c4b22644243971ab5d3f968e34ed6e7 SHA1 fce8ebba5be475f36866acba4b9e62b7e116c5ea SHA256 508ba6854cf3b7b1c1ad9b1a217e7e2a5191953397977e5bcd69c3d953ab6f4a
diff --git a/net-misc/valve/metadata.xml b/net-misc/valve/metadata.xml
new file mode 100644
index 000000000000..c6d862855eb5
--- /dev/null
+++ b/net-misc/valve/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-misc/valve/valve-1.0.ebuild b/net-misc/valve/valve-1.0.ebuild
new file mode 100644
index 000000000000..1af68bcfda24
--- /dev/null
+++ b/net-misc/valve/valve-1.0.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Copies data while enforcing a specified maximum transfer rate"
+HOMEPAGE="http://www.fourmilab.ch/webtools/valve/"
+SRC_URI="http://www.fourmilab.ch/webtools/valve/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~amd64"
+IUSE="doc"
+
+DEPEND=""
+
+src_compile() {
+ econf || die
+ emake CTANGLE='' CWEAVE='' || die
+}
+
+src_install() {
+ dobin valve || die
+ doman valve.1 || die
+ dodoc README valve.pdf || die
+ dohtml index.html logo.png || die
+}
+
+src_test() {
+ emake CTANGLE='' CWEAVE='' check || die "check failed"
+}
diff --git a/net-misc/vconfig/Manifest b/net-misc/vconfig/Manifest
new file mode 100644
index 000000000000..7c941772ee70
--- /dev/null
+++ b/net-misc/vconfig/Manifest
@@ -0,0 +1 @@
+DIST vlan.1.9.tar.gz 176135 SHA256 3b8f0a1bf0d3642764e5f646e1f3bbc8b1eeec474a77392d9aeb4868842b4cca
diff --git a/net-misc/vconfig/metadata.xml b/net-misc/vconfig/metadata.xml
new file mode 100644
index 000000000000..712c2d256e0a
--- /dev/null
+++ b/net-misc/vconfig/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>base-system</herd>
+ <longdescription>
+ The vconfig program allows you to create and remove vlan-devices on a
+ vlan enabled kernel. Vlan-devices are virtual ethernet devices which
+ represents the virtual lans on the physical lan.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/vconfig/vconfig-1.9.ebuild b/net-misc/vconfig/vconfig-1.9.ebuild
new file mode 100644
index 000000000000..8283da014584
--- /dev/null
+++ b/net-misc/vconfig/vconfig-1.9.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils flag-o-matic toolchain-funcs
+
+MY_PN="vlan"
+S=${WORKDIR}/${MY_PN}
+
+DESCRIPTION="802.1Q vlan control utility"
+HOMEPAGE="http://www.candelatech.com/~greear/vlan.html"
+SRC_URI="http://www.candelatech.com/~greear/vlan/${MY_PN}.${PV}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm hppa ~ppc ~ppc64 sparc x86"
+IUSE="static"
+
+src_compile() {
+ use static && appened-ldflags -static
+ emake purge
+ emake CC="$(tc-getCC)" CCFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" STRIP="true" vconfig || die
+}
+
+src_install() {
+ into /
+ dosbin vconfig || die "dosbin error"
+
+ sed -e "s:/usr/local/bin/vconfig:/sbin/vconfig:g" -i vlan_test.pl
+ sed -e "s:/usr/local/bin/vconfig:/sbin/vconfig:g" -i vlan_test2.pl
+
+ doman vconfig.8 || die "doman error"
+ dohtml howto.html vlan.html || die "dohtml error"
+ dodoc CHANGELOG README vlan_test*.pl || die "dodoc error"
+}
+
+pkg_postinst() {
+ ewarn "MTU problems exist for many ethernet drivers."
+ ewarn "Reduce the MTU on the interface to 1496 to work around them."
+}
diff --git a/net-misc/vde/Manifest b/net-misc/vde/Manifest
new file mode 100644
index 000000000000..62417ad97b1c
--- /dev/null
+++ b/net-misc/vde/Manifest
@@ -0,0 +1,3 @@
+DIST vde2-2.2.2.tar.bz2 472059 SHA256 7d4b68c1ba1b661db05ff3674abff4d2ad5da31bb3471699bbec3f2f360b483a SHA512 47dab6f266fa9bb9e581fc3339719d7ee26b2b293ebdd9dca500d1c08e05fe90299fb2962ca4e6efc8528f1291ec0eb3f429cf3a4bbfb1cd0539d68fa39aeab0 WHIRLPOOL fa2ff0d8d2b2fab6c76e84fe1c63fe32c649dc972cc4735d5d4f0b4fa2b0dba4cce6a3101fabdace1c05f441c4ec679554b1d9e078540910bd9fa559fed5e0a9
+DIST vde2-2.3.1.tar.bz2 510947 SHA256 0baa6d429e022eb4069252c0f58636c4b5e0dd2e3a495bdb14b32ecc363d147f SHA512 0484b8e09039263f3050acc4985b6250f025c12bb03c2a4e4f5a78252d8c220e4297e8bafff93949b1c6807982847fc81200b9ba4bb54abaa05cbfe67efcdbe1 WHIRLPOOL 46726e93531608dee3162cf32a8344b6d3ece433195d0ae15502610a2cfaf6397e2a3dd5fe19ba1fc2844e9b861620ee3710b688f4f0c84dd6246699a31b10c3
+DIST vde2-2.3.2.tar.bz2 600527 SHA256 cbea9b7e03097f87a6b5e98b07890d2275848f1fe4b9fcda77b8994148bc9542 SHA512 51be75fde5a526b988060f25322a8b20289b1677db2e3aa6dbee55875c1d7af564f9d8d201a0a4a1a842471cce06f29fcd83e55a5ff7acfdc36a8349cb2f3cc6 WHIRLPOOL dde513400eb725fe683c01110628ec9d2c3e415f0907d4f62d9bf09e2ec8ad14c4ad6437e428680a680118eb4297132f938b5cf71123480bf59c8f37eb0fee53
diff --git a/net-misc/vde/files/vde-2.2.2-gcc43.patch b/net-misc/vde/files/vde-2.2.2-gcc43.patch
new file mode 100644
index 000000000000..3b6e7b003850
--- /dev/null
+++ b/net-misc/vde/files/vde-2.2.2-gcc43.patch
@@ -0,0 +1,60 @@
+diff -NrU5 vde2-2.2.2.orig/src/kvde_switch/consmgmt.c vde2-2.2.2/src/kvde_switch/consmgmt.c
+--- vde2-2.2.2.orig/src/kvde_switch/consmgmt.c 2008-09-04 21:14:55.000000000 +0200
++++ vde2-2.2.2/src/kvde_switch/consmgmt.c 2008-09-04 21:16:26.000000000 +0200
+@@ -22,10 +22,11 @@
+ #include <net/if.h>
+ #include <stdarg.h>
+ #include <getopt.h>
+ #include <dlfcn.h>
+ #include <time.h>
++#include <linux/limits.h>
+
+ #include <config.h>
+ #include <vde.h>
+ #include <vdecommon.h>
+
+diff -NrU5 vde2-2.2.2.orig/src/kvde_switch/datasock.c vde2-2.2.2/src/kvde_switch/datasock.c
+--- vde2-2.2.2.orig/src/kvde_switch/datasock.c 2008-09-04 21:14:55.000000000 +0200
++++ vde2-2.2.2/src/kvde_switch/datasock.c 2008-09-04 21:19:59.000000000 +0200
+@@ -24,10 +24,11 @@
+ #include <net/if.h>
+ #include <stdarg.h>
+ #include <grp.h>
+ #define _GNU_SOURCE
+ #include <getopt.h>
++#include <linux/limits.h>
+
+ #include <config.h>
+ #include <vde.h>
+ #include <vdecommon.h>
+
+diff -NrU5 vde2-2.2.2.orig/src/vde_plug2tap.c vde2-2.2.2/src/vde_plug2tap.c
+--- vde2-2.2.2.orig/src/vde_plug2tap.c 2008-09-04 21:14:55.000000000 +0200
++++ vde2-2.2.2/src/vde_plug2tap.c 2008-09-04 21:22:23.000000000 +0200
+@@ -16,10 +16,11 @@
+ #include <stdarg.h>
+ #include <syslog.h>
+ #include <libgen.h>
+ #define _GNU_SOURCE
+ #include <getopt.h>
++#include <linux/limits.h>
+
+ #include <config.h>
+ #include <vde.h>
+ #include <vdecommon.h>
+ #include <libvdeplug.h>
+diff -NrU5 vde2-2.2.2.orig/src/wirefilter.c vde2-2.2.2/src/wirefilter.c
+--- vde2-2.2.2.orig/src/wirefilter.c 2008-09-04 21:14:55.000000000 +0200
++++ vde2-2.2.2/src/wirefilter.c 2008-09-04 21:25:21.000000000 +0200
+@@ -29,10 +29,11 @@
+ #include <sys/time.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/socket.h>
+ #include <sys/un.h>
++#include <linux/limits.h>
+
+ #include <config.h>
+ #include <vde.h>
+ #include <vdecommon.h>
+ #include <libvdeplug.h>
diff --git a/net-misc/vde/files/vde-2.2.2-slirpvde-buffer-overflow.patch b/net-misc/vde/files/vde-2.2.2-slirpvde-buffer-overflow.patch
new file mode 100644
index 000000000000..cc494e16ac46
--- /dev/null
+++ b/net-misc/vde/files/vde-2.2.2-slirpvde-buffer-overflow.patch
@@ -0,0 +1,49 @@
+From d466d77be6ec40d8d7d96050fbee5e17e7c61af9 Mon Sep 17 00:00:00 2001
+From: Ludwig Nussel <ludwig.nussel@suse.de>
+Date: Tue, 30 Sep 2008 16:59:01 +0200
+Subject: [PATCH] fix static buffer overflows
+
+---
+ src/slirpvde/slirpvde.c | 12 +++++++-----
+ 1 files changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/src/slirpvde/slirpvde.c b/src/slirpvde/slirpvde.c
+index 47512ca..016aa45 100644
+--- a/src/slirpvde/slirpvde.c
++++ b/src/slirpvde/slirpvde.c
+@@ -53,7 +53,7 @@
+ VDECONN *conn;
+ int dhcpmgmt=0;
+ static char *pidfile = NULL;
+-static char pidfile_path[_POSIX_PATH_MAX];
++static char pidfile_path[PATH_MAX];
+ int logok=0;
+ char *prog;
+ extern FILE *lfd;
+@@ -78,9 +78,11 @@ void printlog(int priority, const char *format, ...)
+ static void save_pidfile()
+ {
+ if(pidfile[0] != '/')
+- strncat(pidfile_path, pidfile, PATH_MAX - strlen(pidfile_path));
+- else
+- strcpy(pidfile_path, pidfile);
++ strncat(pidfile_path, pidfile, sizeof(pidfile_path) - strlen(pidfile_path) -1);
++ else {
++ pidfile_path[0] = 0;
++ strncat(pidfile_path, pidfile, sizeof(pidfile_path)-1);
++ }
+
+ int fd = open(pidfile_path,
+ O_WRONLY | O_CREAT | O_EXCL,
+@@ -433,7 +435,7 @@ int main(int argc, char **argv)
+ exit(1);
+ }
+
+- strcat(pidfile_path, "/");
++ strncat(pidfile_path, "/", sizeof(pidfile_path) - strlen(pidfile_path) -1);
+ if (daemonize && daemon(0, 0)) {
+ printlog(LOG_ERR,"daemon: %s",strerror(errno));
+ exit(1);
+--
+1.5.6
+
diff --git a/net-misc/vde/files/vde.conf b/net-misc/vde/files/vde.conf
new file mode 100644
index 000000000000..d8794537537c
--- /dev/null
+++ b/net-misc/vde/files/vde.conf
@@ -0,0 +1,10 @@
+# load the tun module
+VDE_MODPROBE_TUN="yes"
+# virtual tap networking device to be used for vde
+VDE_TAP="tap0"
+# mode and group for the socket
+VDE_SOCK_CHMOD="770"
+VDE_SOCK_CHOWN=":qemu"
+
+# This is the actual options string passed to VDE. Change this at your own risk.
+VDE_OPTS="-tap ${VDE_TAP} -daemon"
diff --git a/net-misc/vde/files/vde.init b/net-misc/vde/files/vde.init
new file mode 100644
index 000000000000..9a1500eeae9e
--- /dev/null
+++ b/net-misc/vde/files/vde.init
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ after net.${VDE_TAP}
+}
+
+
+start() {
+ ebegin "Starting vde"
+ [ "${VDE_MODPROBE_TUN}" = "yes" ] && modprobe tun
+ start-stop-daemon --start --quiet \
+ --exec /usr/bin/vde_switch -- ${VDE_OPTS}
+ eend $? "Failed to start vde"
+ chmod -R ${VDE_SOCK_CHMOD} /var/run/vde.ctl
+ chown -R ${VDE_SOCK_CHOWN} /var/run/vde.ctl
+}
+
+stop() {
+ ebegin "Stopping vde"
+ start-stop-daemon --stop --quiet --exec /usr/bin/vde_switch
+ [ "${VDE_MODPROBE_TUN}" = "yes" ] && modprobe -r tun
+ eend $? "Failed to stop vde"
+}
diff --git a/net-misc/vde/metadata.xml b/net-misc/vde/metadata.xml
new file mode 100644
index 000000000000..8ea7011f3c7d
--- /dev/null
+++ b/net-misc/vde/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>mlspamcb@noci.xs4all.nl</email>
+ </maintainer>
+ <maintainer>
+ <email>jmbsvicetto@gentoo.org</email>
+ <name>Jorge Manuel B. S. Vicetto</name>
+ </maintainer>
+ <use>
+ <flag name="pcap">
+ Enable the pcap-based plugin that allows creating a switch against
+ a real interface.
+ </flag>
+ <flag name="ssl">
+ Enable the cryptcab plugin that allows creating an encrypted
+ virtual cable.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">vde</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/vde/vde-2.2.2.ebuild b/net-misc/vde/vde-2.2.2.ebuild
new file mode 100644
index 000000000000..3430f3cbf0df
--- /dev/null
+++ b/net-misc/vde/vde-2.2.2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit base eutils user
+
+MY_P="${PN}2-${PV}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="vde2 is a virtual distributed ethernet emulator for emulators like qemu, bochs, and uml"
+SRC_URI="mirror://sourceforge/vde/${MY_P}.tar.bz2"
+HOMEPAGE="http://vde.sourceforge.net/"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc ~ppc64 x86"
+IUSE=""
+DEPEND=""
+RDEPEND=""
+
+# The slirpvde-buffer-overflow patch was made by Ludwig Nussel and submitted upstream at
+# http://sourceforge.net/tracker/?func=detail&aid=2138410&group_id=95403&atid=611248
+PATCHES=( "${FILESDIR}/${P}-gcc43.patch" "${FILESDIR}/${P}-slirpvde-buffer-overflow.patch" )
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ newinitd "${FILESDIR}"/vde.init vde
+ newconfd "${FILESDIR}"/vde.conf vde
+
+ dodoc INSTALL README
+}
+
+pkg_postinst() {
+ # default group already used in kqemu
+ enewgroup qemu
+ einfo "To start vde automatically add it to the default runlevel:"
+ einfo "# rc-update add vde default"
+ einfo "You need to setup tap0 in /etc/conf.d/net"
+ einfo "To use it as a user be sure to set a group in /etc/conf.d/vde"
+ einfo "Users of the group can then run: $ vdeq qemu -sock /var/run/vde.ctl ..other opts"
+}
diff --git a/net-misc/vde/vde-2.3.1.ebuild b/net-misc/vde/vde-2.3.1.ebuild
new file mode 100644
index 000000000000..8a5d528eb7f6
--- /dev/null
+++ b/net-misc/vde/vde-2.3.1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils user
+
+MY_P="${PN}2-${PV}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="vde2 is a virtual distributed ethernet emulator for emulators like qemu, bochs, and uml"
+SRC_URI="mirror://sourceforge/vde/${MY_P}.tar.bz2"
+HOMEPAGE="http://vde.sourceforge.net/"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+IUSE="pcap ssl static-libs"
+
+RDEPEND="pcap? ( net-libs/libpcap )
+ ssl? ( dev-libs/openssl )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ econf \
+ $(use_enable pcap) \
+ $(use_enable ssl cryptcab) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ use static-libs || find "${ED}" -name '*.la' -exec rm -f {} +
+
+ newinitd "${FILESDIR}"/vde.init vde
+ newconfd "${FILESDIR}"/vde.conf vde
+}
+
+pkg_postinst() {
+ # default group already used in kqemu
+ enewgroup qemu
+ einfo "To start vde automatically add it to the default runlevel:"
+ einfo "# rc-update add vde default"
+ einfo "You need to setup tap0 in /etc/conf.d/net"
+ einfo "To use it as a user be sure to set a group in /etc/conf.d/vde"
+ einfo "Users of the group can then run: $ vdeq qemu -sock /var/run/vde.ctl ..other opts"
+}
diff --git a/net-misc/vde/vde-2.3.2-r1.ebuild b/net-misc/vde/vde-2.3.2-r1.ebuild
new file mode 100644
index 000000000000..fa698020c4e2
--- /dev/null
+++ b/net-misc/vde/vde-2.3.2-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit eutils python-single-r1 user
+
+MY_P="${PN}2-${PV}"
+
+DESCRIPTION="Virtual distributed ethernet emulator for emulators like qemu, bochs, and uml"
+SRC_URI="mirror://sourceforge/vde/${MY_P}.tar.bz2"
+HOMEPAGE="http://vde.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+IUSE="pcap python ssl static-libs"
+
+RDEPEND="pcap? ( net-libs/libpcap )
+ python? ( ${PYTHON_DEPS} )
+ ssl? ( dev-libs/openssl )"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ # default group already used in kqemu
+ enewgroup qemu
+
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch_user
+}
+
+src_configure() {
+ econf \
+ $(use_enable pcap) \
+ $(use_enable python) \
+ $(use_enable ssl cryptcab) \
+ $(use_enable static-libs static)
+}
+
+src_compile() {
+ emake -j1
+}
+
+src_install() {
+ default
+ prune_libtool_files
+
+ newinitd "${FILESDIR}"/vde.init vde
+ newconfd "${FILESDIR}"/vde.conf vde
+}
+
+pkg_postinst() {
+ einfo "To start vde automatically add it to the default runlevel:"
+ einfo "# rc-update add vde default"
+ einfo "You need to setup tap0 in /etc/conf.d/net"
+ einfo "To use it as an user be sure to set a group in /etc/conf.d/vde"
+ einfo "Users of the group can then run: $ vdeq qemu -sock /var/run/vde.ctl ..other opts"
+}
diff --git a/net-misc/vde/vde-2.3.2-r2.ebuild b/net-misc/vde/vde-2.3.2-r2.ebuild
new file mode 100644
index 000000000000..d78c5e406f21
--- /dev/null
+++ b/net-misc/vde/vde-2.3.2-r2.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit eutils python-single-r1 user
+
+MY_P="${PN}2-${PV}"
+
+DESCRIPTION="Virtual distributed ethernet emulator for emulators like qemu, bochs, and uml"
+SRC_URI="mirror://sourceforge/vde/${MY_P}.tar.bz2"
+HOMEPAGE="http://vde.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+IUSE="pcap python selinux ssl static-libs"
+
+COMMON_DEPS="pcap? ( net-libs/libpcap )
+ python? ( ${PYTHON_DEPS} )
+ ssl? ( dev-libs/openssl )"
+DEPEND="${COMMON_DEPS}"
+RDEPEND="${COMMON_DEPS}
+ selinux? ( sec-policy/selinux-vde )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ # default group already used in kqemu
+ enewgroup qemu
+
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch_user
+}
+
+src_configure() {
+ econf \
+ $(use_enable pcap) \
+ $(use_enable python) \
+ $(use_enable ssl cryptcab) \
+ $(use_enable static-libs static)
+}
+
+src_compile() {
+ emake -j1
+}
+
+src_install() {
+ default
+ prune_libtool_files
+
+ newinitd "${FILESDIR}"/vde.init vde
+ newconfd "${FILESDIR}"/vde.conf vde
+}
+
+pkg_postinst() {
+ einfo "To start vde automatically add it to the default runlevel:"
+ einfo "# rc-update add vde default"
+ einfo "You need to setup tap0 in /etc/conf.d/net"
+ einfo "To use it as an user be sure to set a group in /etc/conf.d/vde"
+ einfo "Users of the group can then run: $ vdeq qemu -sock /var/run/vde.ctl ..other opts"
+}
diff --git a/net-misc/vde/vde-2.3.2.ebuild b/net-misc/vde/vde-2.3.2.ebuild
new file mode 100644
index 000000000000..88f423771a51
--- /dev/null
+++ b/net-misc/vde/vde-2.3.2.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.*"
+
+inherit eutils python user
+
+MY_P="${PN}2-${PV}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="vde2 is a virtual distributed ethernet emulator for emulators like qemu, bochs, and uml"
+SRC_URI="mirror://sourceforge/vde/${MY_P}.tar.bz2"
+HOMEPAGE="http://vde.sourceforge.net/"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+IUSE="pcap python ssl static-libs"
+
+RDEPEND="pcap? ( net-libs/libpcap )
+ ssl? ( dev-libs/openssl )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ econf \
+ $(use_enable pcap) \
+ $(use_enable python) \
+ $(use_enable ssl cryptcab) \
+ $(use_enable static-libs static)
+}
+
+src_compile() {
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ default
+ use static-libs || find "${ED}" -name '*.la' -exec rm -f {} +
+
+ newinitd "${FILESDIR}"/vde.init vde
+ newconfd "${FILESDIR}"/vde.conf vde
+}
+
+pkg_postinst() {
+ # default group already used in kqemu
+ enewgroup qemu
+
+ einfo "To start vde automatically add it to the default runlevel:"
+ einfo "# rc-update add vde default"
+ einfo "You need to setup tap0 in /etc/conf.d/net"
+ einfo "To use it as an user be sure to set a group in /etc/conf.d/vde"
+ einfo "Users of the group can then run: $ vdeq qemu -sock /var/run/vde.ctl ..other opts"
+}
diff --git a/net-misc/vinagre/Manifest b/net-misc/vinagre/Manifest
new file mode 100644
index 000000000000..dd3ab388e5ca
--- /dev/null
+++ b/net-misc/vinagre/Manifest
@@ -0,0 +1,2 @@
+DIST vinagre-3.14.3.tar.xz 1101544 SHA256 f82d8c66684a00a79422724b0e1efad28ba35ba21a92dc7dcb867ed7b64659f0 SHA512 80d87d3aab0e11c2990e6f8f369095e7587a3d2def0afe1e0be2cae31e376bc40c902180b92d84c196ded8c1973dca8421dd5d66ecda5d6d1e41e3fe0aa02ccd WHIRLPOOL 9a38f134b27e1064b186df2c53daacc268e719458fc13fab81a7013972966c107d30c9041082578c4fd0ca037b4285bf9df69ed0f2b900f77ec54fe633539c04
+DIST vinagre-3.16.1.tar.xz 812964 SHA256 d77c0057e8525efeef8b35839bce07e5451d99f3ef9d156c7f549a4c1ad6483f SHA512 60b83a7eb8f4d49e8825a4116d2de4579373cb4fbcde70c241b43f079debc30f0b5ce38da39ed4a3841724a70798338a7c319c72be0e991b97f70cdc264dfacf WHIRLPOOL 24828f91d545fd8da63f14002b1988a677c37ffc3abd10678467cfe5223ec4adbd4c9cec39e1ad7c4d46e2beb7369109445f7e1c19e5d10b7be6b79533c99a50
diff --git a/net-misc/vinagre/files/vinagre-3.14.3-freerdp.patch b/net-misc/vinagre/files/vinagre-3.14.3-freerdp.patch
new file mode 100644
index 000000000000..36cabca8a7ce
--- /dev/null
+++ b/net-misc/vinagre/files/vinagre-3.14.3-freerdp.patch
@@ -0,0 +1,39 @@
+From 2fd545b77c3a2c5f0bc1b0fc5f851857127cc2f3 Mon Sep 17 00:00:00 2001
+From: Jean-Philippe Menil <jpmenil@gmail.com>
+Date: Fri, 28 Nov 2014 17:08:16 +0000
+Subject: [PATCH] Fix RDP initialization with recent FreeRDP
+
+https://bugzilla.gnome.org/show_bug.cgi?id=740868
+---
+ plugins/rdp/vinagre-rdp-tab.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/plugins/rdp/vinagre-rdp-tab.c b/plugins/rdp/vinagre-rdp-tab.c
+index 02f5e4e..770fe99 100644
+--- a/plugins/rdp/vinagre-rdp-tab.c
++++ b/plugins/rdp/vinagre-rdp-tab.c
+@@ -27,7 +27,6 @@
+ #include <freerdp/api.h>
+ #include <freerdp/types.h>
+ #include <freerdp/freerdp.h>
+-#include <freerdp/utils/event.h>
+ #include <freerdp/gdi/gdi.h>
+ #if HAVE_FREERDP_1_1
+ #include <freerdp/locale/keyboard.h>
+@@ -363,7 +362,15 @@ frdp_post_connect (freerdp *instance)
+ rdpGdi *gdi;
+ int stride;
+
+- gdi_init (instance, CLRBUF_24BPP, NULL);
++ gdi_init (instance,
++#if defined(FREERDP_VERSION_MAJOR) && defined(FREERDP_VERSION_MINOR) && \
++ !(FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 && \
++ FREERDP_VERSION_MINOR >= 2))
++ CLRBUF_24BPP,
++#else
++ CLRBUF_32BPP,
++#endif
++ NULL);
+ gdi = instance->context->gdi;
+
+ instance->update->BeginPaint = frdp_begin_paint;
diff --git a/net-misc/vinagre/files/vinagre-3.14.3-freerdp2.patch b/net-misc/vinagre/files/vinagre-3.14.3-freerdp2.patch
new file mode 100644
index 000000000000..5620fcd9920e
--- /dev/null
+++ b/net-misc/vinagre/files/vinagre-3.14.3-freerdp2.patch
@@ -0,0 +1,35 @@
+From c819f3e06363faa3e0c1503d7bbcf3ac88c6dedd Mon Sep 17 00:00:00 2001
+From: Nick Andrade <SDNick484@gmail.com>
+Date: Sat, 16 May 2015 08:03:29 +0100
+Subject: Fix building against newer FreeRDP versions
+
+https://bugzilla.gnome.org/show_bug.cgi?id=749124
+
+diff --git a/plugins/rdp/vinagre-rdp-tab.c b/plugins/rdp/vinagre-rdp-tab.c
+index c4c11f8..690a580 100644
+--- a/plugins/rdp/vinagre-rdp-tab.c
++++ b/plugins/rdp/vinagre-rdp-tab.c
+@@ -887,7 +887,6 @@ open_freerdp (VinagreRdpTab *rdp_tab)
+ settings->RdpSecurity = TRUE;
+ settings->TlsSecurity = TRUE;
+ settings->NlaSecurity = TRUE;
+- settings->DisableEncryption = FALSE;
+ settings->EncryptionMethods = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS;
+ settings->EncryptionLevel = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE;
+ #else
+@@ -898,6 +897,12 @@ open_freerdp (VinagreRdpTab *rdp_tab)
+ settings->encryption_method = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS;
+ settings->encryption_level = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE;
+ #endif
++#include <freerdp/version.h>
++#if (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR >= 2 && FREERDP_VERSION_REVISION >= 1)
++ settings->UseRdpSecurityLayer = FALSE;
++#else
++ settings->DisableEncryption = FALSE;
++#endif
+
+ /* Set display size */
+ #if HAVE_FREERDP_1_1
+--
+cgit v0.10.2
+
diff --git a/net-misc/vinagre/files/vinagre-3.16.1-freerdp.patch b/net-misc/vinagre/files/vinagre-3.16.1-freerdp.patch
new file mode 100644
index 000000000000..dacce43a8e82
--- /dev/null
+++ b/net-misc/vinagre/files/vinagre-3.16.1-freerdp.patch
@@ -0,0 +1,38 @@
+From 89cc8bfeaf47a24c57616021915b30bbc4d12d53 Mon Sep 17 00:00:00 2001
+From: Nick Andrade <SDNick484@gmail.com>
+Date: Sat, 16 May 2015 08:03:29 +0100
+Subject: [PATCH] Fix building against newer FreeRDP versions
+
+https://bugzilla.gnome.org/show_bug.cgi?id=749124
+---
+ plugins/rdp/vinagre-rdp-tab.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/plugins/rdp/vinagre-rdp-tab.c b/plugins/rdp/vinagre-rdp-tab.c
+index c4c11f8..690a580 100644
+--- a/plugins/rdp/vinagre-rdp-tab.c
++++ b/plugins/rdp/vinagre-rdp-tab.c
+@@ -887,7 +887,6 @@ open_freerdp (VinagreRdpTab *rdp_tab)
+ settings->RdpSecurity = TRUE;
+ settings->TlsSecurity = TRUE;
+ settings->NlaSecurity = TRUE;
+- settings->DisableEncryption = FALSE;
+ settings->EncryptionMethods = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS;
+ settings->EncryptionLevel = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE;
+ #else
+@@ -898,6 +897,12 @@ open_freerdp (VinagreRdpTab *rdp_tab)
+ settings->encryption_method = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS;
+ settings->encryption_level = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE;
+ #endif
++#include <freerdp/version.h>
++#if (FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR >= 2 && FREERDP_VERSION_REVISION >= 1)
++ settings->UseRdpSecurityLayer = FALSE;
++#else
++ settings->DisableEncryption = FALSE;
++#endif
+
+ /* Set display size */
+ #if HAVE_FREERDP_1_1
+--
+2.4.0
+
diff --git a/net-misc/vinagre/metadata.xml b/net-misc/vinagre/metadata.xml
new file mode 100644
index 000000000000..4708913096e3
--- /dev/null
+++ b/net-misc/vinagre/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>gnome</herd>
+ <use>
+ <flag name="rdp">Enable access to Windows RDP protocol using
+ <pkg>net-misc/rdesktop</pkg></flag>
+ <flag name="ssh">Enable ssh plugin using <pkg>x11-libs/vte</pkg></flag>
+ <flag name="spice">Enable access to SPICE-enabled virtual machines</flag>
+ <flag name="telepathy">Enable access to remote desktop via a
+ <pkg>net-libs/telepathy-glib</pkg> client</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/vinagre/vinagre-3.14.3-r1.ebuild b/net-misc/vinagre/vinagre-3.14.3-r1.ebuild
new file mode 100644
index 000000000000..a6056927479f
--- /dev/null
+++ b/net-misc/vinagre/vinagre-3.14.3-r1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+VALA_MIN_API_VERSION=0.18
+
+inherit gnome2 linux-info vala
+
+DESCRIPTION="VNC client for the GNOME desktop"
+HOMEPAGE="https://wiki.gnome.org/Apps/Vinagre"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ia64 ~ppc ~ppc64 x86"
+IUSE="rdp +ssh spice +telepathy zeroconf"
+
+# cairo used in vinagre-tab
+# gdk-pixbuf used all over the place
+RDEPEND="
+ >=dev-libs/glib-2.28.0:2
+ >=x11-libs/gtk+-3.9.6:3
+ app-crypt/libsecret
+ >=dev-libs/libxml2-2.6.31:2
+ >=net-libs/gtk-vnc-0.4.3[gtk3]
+ x11-libs/cairo:=
+ x11-libs/gdk-pixbuf:2
+ x11-themes/hicolor-icon-theme
+
+ rdp? ( net-misc/freerdp )
+ ssh? ( >=x11-libs/vte-0.20:2.91 )
+ spice? (
+ app-emulation/spice-protocol
+ >=net-misc/spice-gtk-0.5[gtk3] )
+ telepathy? (
+ dev-libs/dbus-glib
+ >=net-libs/telepathy-glib-0.11.6 )
+ zeroconf? ( >=net-dns/avahi-0.6.26[dbus,gtk3] )
+"
+DEPEND="${RDEPEND}
+ >=dev-lang/perl-5
+ dev-libs/appstream-glib
+ >=dev-util/intltool-0.50
+ >=sys-devel/gettext-0.17
+ virtual/pkgconfig
+ $(vala_depend)
+"
+
+pkg_pretend() {
+ # Needed for VNC ssh tunnel, bug #518574
+ CONFIG_CHECK="~IPV6"
+ check_extra_config
+}
+
+src_prepare() {
+ # Fix RDP initialization with recent FreeRDP (from 'master')
+ epatch "${FILESDIR}"/${PN}-3.14.3-freerdp.patch
+ epatch "${FILESDIR}"/${PN}-3.14.3-freerdp2.patch
+
+ vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ DOCS="AUTHORS ChangeLog ChangeLog.pre-git NEWS README"
+ gnome2_src_configure \
+ $(use_enable rdp) \
+ $(use_enable ssh) \
+ $(use_enable spice) \
+ $(use_with telepathy) \
+ $(use_with zeroconf avahi) \
+ ITSTOOL=$(type -P true)
+}
diff --git a/net-misc/vinagre/vinagre-3.14.3.ebuild b/net-misc/vinagre/vinagre-3.14.3.ebuild
new file mode 100644
index 000000000000..460496e10456
--- /dev/null
+++ b/net-misc/vinagre/vinagre-3.14.3.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+VALA_MIN_API_VERSION=0.18
+
+inherit gnome2 vala
+
+DESCRIPTION="VNC client for the GNOME desktop"
+HOMEPAGE="https://wiki.gnome.org/Apps/Vinagre"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ia64 ~ppc ~ppc64 x86"
+IUSE="avahi rdp +ssh spice +telepathy"
+
+# cairo used in vinagre-tab
+# gdk-pixbuf used all over the place
+RDEPEND="
+ >=dev-libs/glib-2.28.0:2
+ >=x11-libs/gtk+-3.9.6:3
+ app-crypt/libsecret
+ >=dev-libs/libxml2-2.6.31:2
+ >=net-libs/gtk-vnc-0.4.3[gtk3]
+ x11-libs/cairo:=
+ x11-libs/gdk-pixbuf:2
+ x11-themes/hicolor-icon-theme
+
+ avahi? ( >=net-dns/avahi-0.6.26[dbus,gtk3] )
+ rdp? ( net-misc/freerdp )
+ ssh? ( >=x11-libs/vte-0.20:2.91 )
+ spice? (
+ app-emulation/spice-protocol
+ >=net-misc/spice-gtk-0.5[gtk3] )
+ telepathy? (
+ dev-libs/dbus-glib
+ >=net-libs/telepathy-glib-0.11.6 )
+"
+DEPEND="${RDEPEND}
+ >=dev-lang/perl-5
+ dev-libs/appstream-glib
+ >=dev-util/intltool-0.50
+ >=sys-devel/gettext-0.17
+ virtual/pkgconfig
+ $(vala_depend)
+"
+
+src_prepare() {
+ # Fix RDP initialization with recent FreeRDP (from 'master')
+ epatch "${FILESDIR}"/${PN}-3.14.3-freerdp.patch
+
+ vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ DOCS="AUTHORS ChangeLog ChangeLog.pre-git NEWS README"
+ gnome2_src_configure \
+ $(use_with avahi) \
+ $(use_enable rdp) \
+ $(use_enable ssh) \
+ $(use_enable spice) \
+ $(use_with telepathy) \
+ ITSTOOL=$(type -P true)
+}
diff --git a/net-misc/vinagre/vinagre-3.16.1.ebuild b/net-misc/vinagre/vinagre-3.16.1.ebuild
new file mode 100644
index 000000000000..1b4ba2972808
--- /dev/null
+++ b/net-misc/vinagre/vinagre-3.16.1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+VALA_MIN_API_VERSION="0.18"
+
+inherit gnome2 linux-info vala
+
+DESCRIPTION="VNC client for the GNOME desktop"
+HOMEPAGE="https://wiki.gnome.org/Apps/Vinagre"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86"
+IUSE="rdp +ssh spice +telepathy zeroconf"
+
+# cairo used in vinagre-tab
+# gdk-pixbuf used all over the place
+RDEPEND="
+ >=dev-libs/glib-2.28.0:2
+ >=x11-libs/gtk+-3.9.6:3
+ app-crypt/libsecret
+ >=dev-libs/libxml2-2.6.31:2
+ >=net-libs/gtk-vnc-0.4.3[gtk3]
+ x11-libs/cairo:=
+ x11-libs/gdk-pixbuf:2
+ x11-themes/hicolor-icon-theme
+
+ rdp? ( net-misc/freerdp )
+ ssh? ( >=x11-libs/vte-0.20:2.91 )
+ spice? (
+ app-emulation/spice-protocol
+ >=net-misc/spice-gtk-0.5[gtk3] )
+ telepathy? (
+ dev-libs/dbus-glib
+ >=net-libs/telepathy-glib-0.11.6 )
+ zeroconf? ( >=net-dns/avahi-0.6.26[dbus,gtk3] )
+"
+DEPEND="${RDEPEND}
+ >=dev-lang/perl-5
+ dev-libs/appstream-glib
+ >=dev-util/intltool-0.50
+ >=sys-devel/gettext-0.17
+ virtual/pkgconfig
+ $(vala_depend)
+"
+
+pkg_pretend() {
+ # Needed for VNC ssh tunnel, bug #518574
+ CONFIG_CHECK="~IPV6"
+ check_extra_config
+}
+
+src_prepare() {
+ # Fix RDP initialization with recent FreeRDP (from 'master')
+ epatch "${FILESDIR}"/${PN}-3.16.1-freerdp.patch
+
+ vala_src_prepare
+ gnome2_src_prepare
+}
+
+src_configure() {
+ DOCS="AUTHORS ChangeLog ChangeLog.pre-git NEWS README"
+ gnome2_src_configure \
+ $(use_enable rdp) \
+ $(use_enable ssh) \
+ $(use_enable spice) \
+ $(use_with telepathy) \
+ $(use_with zeroconf avahi) \
+ ITSTOOL=$(type -P true)
+}
diff --git a/net-misc/vino/Manifest b/net-misc/vino/Manifest
new file mode 100644
index 000000000000..c09843eda2eb
--- /dev/null
+++ b/net-misc/vino/Manifest
@@ -0,0 +1,2 @@
+DIST vino-3.14.2.tar.xz 750452 SHA256 9042ca347968617f831a472a5c6c123b71bb9ba5339e45ccf46004a7452da3a5 SHA512 daf6710ad89991ae248c633ffcd623182c7b7404daea75762123e17687ea3ede5f49102d6dff7bde9d233257b044a3b95a26b0ea235587004877203bd077d1c8 WHIRLPOOL 975b9d739adafbee5c0276ba630e3232953a39d03f55c97b60b0d0c055ed87a6fb3b19818aa4d7062643419c22ed854761126df16cb1e17f2094b77557e942b7
+DIST vino-3.16.0.tar.xz 760508 SHA256 608d3613d4e0ad40566759df06587effcfae77f205fce83e3bcf7574bc608dc5 SHA512 232cf9e2d986043e8da4db6d7a07ada77b46f71280da85915c54ed53c7212d47256b0e9532aa4879f6e3fa374a46c7ec7e58310d07581f7708efc1a131ba643f WHIRLPOOL 676c055ce1ef93c966c9691d415c84922247993ac6821ba174108bbaf359d3ee7f6d5d6b8e070bc4af02136ead206a25d11b1efba92a46b4dc209d83e0f88543
diff --git a/net-misc/vino/metadata.xml b/net-misc/vino/metadata.xml
new file mode 100644
index 000000000000..326077bc4073
--- /dev/null
+++ b/net-misc/vino/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>gnome</herd>
+<use>
+ <flag name="libsecret">Enable app-crypt/libsecret support to store
+ login credentials.</flag>
+ <flag name="telepathy">Enable desktop sharing through a telepathy client</flag>
+</use>
+</pkgmetadata>
diff --git a/net-misc/vino/vino-3.14.2.ebuild b/net-misc/vino/vino-3.14.2.ebuild
new file mode 100644
index 000000000000..32f65b27e679
--- /dev/null
+++ b/net-misc/vino/vino-3.14.2.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="yes"
+
+inherit gnome2
+
+DESCRIPTION="An integrated VNC server for GNOME"
+HOMEPAGE="https://wiki.gnome.org/Projects/Vino"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86 ~x86-fbsd"
+IUSE="crypt libsecret ipv6 jpeg networkmanager ssl +telepathy zeroconf +zlib"
+# bug #394611; tight encoding requires zlib encoding
+REQUIRED_USE="jpeg? ( zlib )"
+
+# cairo used in vino-fb
+# libSM and libICE used in eggsmclient-xsmp
+RDEPEND="
+ >=dev-libs/glib-2.26:2
+ >=x11-libs/gtk+-3.0.0:3
+ >=dev-libs/libgcrypt-1.1.90:0=
+
+ dev-libs/dbus-glib
+ x11-libs/cairo:=
+ x11-libs/pango[X]
+ x11-libs/libICE
+ x11-libs/libX11
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libSM
+ x11-libs/libXtst
+
+ >=x11-libs/libnotify-0.7.0:=
+
+ crypt? ( >=dev-libs/libgcrypt-1.1.90:0= )
+ libsecret? ( app-crypt/libsecret )
+ jpeg? ( virtual/jpeg:0= )
+ networkmanager? ( >=net-misc/networkmanager-0.7 )
+ ssl? ( >=net-libs/gnutls-2.2.0:= )
+ telepathy? ( >=net-libs/telepathy-glib-0.18 )
+ zeroconf? ( >=net-dns/avahi-0.6:=[dbus] )
+ zlib? ( sys-libs/zlib:= )
+"
+DEPEND="${RDEPEND}
+ >=dev-lang/perl-5
+ >=dev-util/intltool-0.50
+ virtual/pkgconfig
+ app-crypt/libsecret
+"
+# libsecret is always required at build time per bug 322763
+
+src_configure() {
+ gnome2_src_configure \
+ --with-gcrypt \
+ $(use_with crypt gcrypt) \
+ $(use_enable ipv6) \
+ $(use_with jpeg) \
+ $(use_with libsecret secret) \
+ $(use_with networkmanager network-manager) \
+ $(use_with ssl gnutls) \
+ $(use_with telepathy) \
+ $(use_with zeroconf avahi) \
+ $(use_with zlib)
+}
diff --git a/net-misc/vino/vino-3.16.0.ebuild b/net-misc/vino/vino-3.16.0.ebuild
new file mode 100644
index 000000000000..037b150630ab
--- /dev/null
+++ b/net-misc/vino/vino-3.16.0.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="yes"
+
+inherit gnome2
+
+DESCRIPTION="An integrated VNC server for GNOME"
+HOMEPAGE="https://wiki.gnome.org/Projects/Vino"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="crypt libsecret ipv6 jpeg ssl +telepathy zeroconf +zlib"
+# bug #394611; tight encoding requires zlib encoding
+REQUIRED_USE="jpeg? ( zlib )"
+
+# cairo used in vino-fb
+# libSM and libICE used in eggsmclient-xsmp
+RDEPEND="
+ >=dev-libs/glib-2.26:2
+ >=dev-libs/libgcrypt-1.1.90:0=
+ >=x11-libs/gtk+-3:3
+
+ dev-libs/dbus-glib
+ x11-libs/cairo:=
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXtst
+ x11-libs/pango[X]
+
+ >=x11-libs/libnotify-0.7.0:=
+
+ crypt? ( >=dev-libs/libgcrypt-1.1.90:0= )
+ jpeg? ( virtual/jpeg:0= )
+ libsecret? ( app-crypt/libsecret )
+ ssl? ( >=net-libs/gnutls-2.2.0:= )
+ telepathy? ( >=net-libs/telepathy-glib-0.18 )
+ zeroconf? ( >=net-dns/avahi-0.6:=[dbus] )
+ zlib? ( sys-libs/zlib:= )
+"
+DEPEND="${RDEPEND}
+ >=dev-lang/perl-5
+ >=dev-util/intltool-0.50
+ virtual/pkgconfig
+ app-crypt/libsecret
+"
+# libsecret is always required at build time per bug 322763
+
+src_configure() {
+ gnome2_src_configure \
+ --with-gcrypt \
+ $(use_enable ipv6) \
+ $(use_with crypt gcrypt) \
+ $(use_with jpeg) \
+ $(use_with libsecret secret) \
+ $(use_with ssl gnutls) \
+ $(use_with telepathy) \
+ $(use_with zeroconf avahi) \
+ $(use_with zlib)
+}
diff --git a/net-misc/vmnet/Manifest b/net-misc/vmnet/Manifest
new file mode 100644
index 000000000000..a0e53669a3a0
--- /dev/null
+++ b/net-misc/vmnet/Manifest
@@ -0,0 +1,2 @@
+DIST vmnet-0.4.tar.gz 11362 RMD160 dc58a2bb48a38b9da99ac529798548de7f58dd6e SHA1 49c0e4cb70fdd56b79937e0650dd0c6c2c090b8a SHA256 80c7148200bffa239e3daae79332a18c28409a5ef92ce631d41e2859a9011765
+DIST vmnet_0.4-1.diff.gz 5084 RMD160 6a783781706350c7c21dc00392c16f2447ed28b1 SHA1 997805f34ba773176c32d4622bd69302e2e5798c SHA256 fb01abcbc384025365ff50b35ca3e7777cc4a9a62f353c04d16f4c867332e453
diff --git a/net-misc/vmnet/metadata.xml b/net-misc/vmnet/metadata.xml
new file mode 100644
index 000000000000..c6d862855eb5
--- /dev/null
+++ b/net-misc/vmnet/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-misc/vmnet/vmnet-0.4.ebuild b/net-misc/vmnet/vmnet-0.4.ebuild
new file mode 100644
index 000000000000..bfb3a316f368
--- /dev/null
+++ b/net-misc/vmnet/vmnet-0.4.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="A simple virtual networking program - SLIP over stdin/out"
+HOMEPAGE="ftp://ftp.xos.nl/pub/linux/vmnet/"
+# The main site is often down
+# So this might be better but it's a different filename
+# http://ftp.debian.org/debian/pool/main/${PN:0:1}/${PN}/${P/-/_}.orig.tar.gz
+# We use the debian patch anyway
+SRC_URI="ftp://ftp.xos.nl/pub/linux/${PN}/${P}.tar.gz
+ mirror://debian/pool/main/${PN:0:1}/${PN}/${P/-/_}-1.diff.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+IUSE=""
+
+DEPEND="sys-apps/net-tools"
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ epatch "${DISTDIR}"/${P/-/_}-1.diff.gz
+}
+
+src_compile() {
+ append-ldflags -Wl,-z,now
+ emake || die "Emake failed"
+}
+
+src_install() {
+ dobin ${PN} || die "dobin"
+ fperms 4711 /usr/bin/${PN} || die "fperms"
+
+ doman ${PN}.1
+ dodoc README debian/${PN}.sgml
+
+ insinto /etc
+ doins debian/${PN}.conf
+}
+
+pkg_postinst() {
+ einfo "Don't forgot to ensure SLIP support is in your kernel!"
+}
diff --git a/net-misc/vmpsd/Manifest b/net-misc/vmpsd/Manifest
new file mode 100644
index 000000000000..54c70f2799e6
--- /dev/null
+++ b/net-misc/vmpsd/Manifest
@@ -0,0 +1 @@
+DIST vmpsd-1.4.tar.gz 92138 SHA256 f9f0bc2f7b5d81189794179b4706015ec01ce5a2f2c87d2d086538754559da7e SHA512 341a86f8db28f1f7a03b5581ec8f8319a175a2c5dc9c7ff5df880f4416cf048ef9e32afd6600220e48f8713d6c72c4ffae7d1e8d31c73ded466f084711580efd WHIRLPOOL 1ec27dfc0cd6ffc2c9f1fbbd6db716608af04ac8a972518e6a5ff12b01a05443b2665f3a27e7e0835d22df1ef40d0b4eb5490ea0bc2a5f60859df8c83e801837
diff --git a/net-misc/vmpsd/files/vmpsd-1.3-64bit.patch b/net-misc/vmpsd/files/vmpsd-1.3-64bit.patch
new file mode 100644
index 000000000000..c2825d4a6b76
--- /dev/null
+++ b/net-misc/vmpsd/files/vmpsd-1.3-64bit.patch
@@ -0,0 +1,38 @@
+*** vmpsd/vqp.c.orig Tue Aug 3 05:54:04 2004
+--- vmpsd/vqp.c Tue Mar 20 06:48:33 2007
+***************
+*** 127,134 ****
+ VQP_HEADER h;
+ u_char buf[MAX_PACKET_SIZE];
+ u_char *p;
+! unsigned long int data_type;
+! unsigned short int data_len;
+ unsigned int n = 0;
+
+ h.unkn1 = 0x01;
+--- 127,134 ----
+ VQP_HEADER h;
+ u_char buf[MAX_PACKET_SIZE];
+ u_char *p;
+! uint32_t data_type;
+! uint16_t data_len;
+ unsigned int n = 0;
+
+ h.unkn1 = 0x01;
+***************
+*** 310,316 ****
+ MAC_ENTRY *m;
+
+ m = find_mac(r->mac);
+! if ( (m->speed != 0) || (m->duplex != 0) )
+ set_port_speed( inet_ntoa(r->client_ip),
+ community,
+ r->port,
+--- 310,316 ----
+ MAC_ENTRY *m;
+
+ m = find_mac(r->mac);
+! if ( m != NULL && ((m->speed != 0) || (m->duplex != 0)) )
+ set_port_speed( inet_ntoa(r->client_ip),
+ community,
+ r->port,
diff --git a/net-misc/vmpsd/files/vmpsd-1.4-snmp-support.patch b/net-misc/vmpsd/files/vmpsd-1.4-snmp-support.patch
new file mode 100644
index 000000000000..66890af3a731
--- /dev/null
+++ b/net-misc/vmpsd/files/vmpsd-1.4-snmp-support.patch
@@ -0,0 +1,56 @@
+diff -Nuar vmpsd.orig/Makefile.am vmpsd/Makefile.am
+--- vmpsd.orig/Makefile.am 2004-10-31 00:59:51.000000000 +0000
++++ vmpsd/Makefile.am 2012-02-21 09:11:30.120856909 +0000
+@@ -1,5 +1,6 @@
+ bin_PROGRAMS = vmpsd
+-vmpsd_SOURCES = vmpsd.c daemon.c data.c log.c parser.c vqp.c data.h log.h vqp.h external.c external.h
++vmpsd_SOURCES = vmpsd.c daemon.c data.c log.c parser.c vqp.c snmp.c data.h log.h vqp.h external.c external.h
+ vmpsd_CFLAGS = -DSYSCONFDIR="\"${sysconfdir}\""
++vmpsd_LDADD = $(SNMP_LIB)
+ man_MANS = vmpsd.1
+ sysconf_DATA = vlan.db
+diff -Nuar vmpsd.orig/Makefile.in vmpsd/Makefile.in
+--- vmpsd.orig/Makefile.in 2006-05-15 13:33:57.000000000 +0000
++++ vmpsd/Makefile.in 2012-02-21 09:08:54.807227002 +0000
+@@ -59,7 +59,7 @@
+ am_vmpsd_OBJECTS = vmpsd-vmpsd.$(OBJEXT) vmpsd-daemon.$(OBJEXT) \
+ vmpsd-data.$(OBJEXT) vmpsd-log.$(OBJEXT) \
+ vmpsd-parser.$(OBJEXT) vmpsd-vqp.$(OBJEXT) \
+- vmpsd-external.$(OBJEXT)
++ vmpsd-external.$(OBJEXT) $(SNMP_OBJECTS)
+ vmpsd_OBJECTS = $(am_vmpsd_OBJECTS)
+ vmpsd_LDADD = $(LDADD)
+ DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
+diff -Nuar vmpsd.orig/snmp.c vmpsd/snmp.c
+--- vmpsd.orig/snmp.c 2004-07-08 09:34:29.000000000 +0000
++++ vmpsd/snmp.c 2012-02-21 09:11:51.817566865 +0000
+@@ -8,6 +8,8 @@
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+
++#define UCD_COMPATIBLE 1
++#include <net-snmp/net-snmp-config.h>
+ #include <ucd-snmp/ucd-snmp-includes.h>
+
+ #include "log.h"
+diff -Nuar vmpsd.orig/vmpsd.c vmpsd/vmpsd.c
+--- vmpsd.orig/vmpsd.c 2006-05-15 13:33:57.000000000 +0000
++++ vmpsd/vmpsd.c 2012-02-21 09:12:28.987640940 +0000
+@@ -18,7 +18,7 @@
+
+ int parse_options(int argc, char **argv)
+ {
+- char opt;
++ signed char opt;
+ char *options = "a:cde:f:l:p:";
+
+ opterr = 0;
+@@ -80,7 +80,7 @@
+ printf("\t-d do not detach, log to stderr also\n");
+ printf("\t-e path use external program for mac to vlan assignment\n");
+ printf("\t when/if used with -f, -f is disregarded\n");
+- printf("\t-f file read VMPS database from file (/etc/vmps.db)\n");
++ printf("\t-f file read VMPS database from file ("SYSCONFDIR"/vmps.db)\n");
+ printf("\t-l level set logging level:\n");
+ printf("\t 0x0100 - fatal,\n");
+ printf("\t 0x0200 - info,\n");
diff --git a/net-misc/vmpsd/metadata.xml b/net-misc/vmpsd/metadata.xml
new file mode 100644
index 000000000000..f1d10859a0d6
--- /dev/null
+++ b/net-misc/vmpsd/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>robbat2@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">vmps</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/vmpsd/vmpsd-1.4.ebuild b/net-misc/vmpsd/vmpsd-1.4.ebuild
new file mode 100644
index 000000000000..5086962dbbca
--- /dev/null
+++ b/net-misc/vmpsd/vmpsd-1.4.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils flag-o-matic autotools
+
+DESCRIPTION="An open-source VLAN management system"
+HOMEPAGE="http://vmps.sourceforge.net"
+SRC_URI="mirror://sourceforge/vmps/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+DEPEND="net-analyzer/net-snmp[ucd-compat(+)]
+ dev-libs/openssl"
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.4-snmp-support.patch
+ epatch "${FILESDIR}"/${PN}-1.3-64bit.patch
+ # Merged upstream
+ #EPATCH_OPTS="-d${S}" \
+ #epatch "${FILESDIR}"/${PN}-1.3-format-sec.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --sysconfdir=/etc/vmpsd \
+ --enable-snmp \
+ LIBS="-lssl" \
+ || die "econf failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc README INSTALL AUTHORS doc/*txt
+ newdoc external/README README.external
+ newdoc tools/README README.tools
+ dodoc external/simple tools/vqpcli.pl
+}
diff --git a/net-misc/vncrec/Manifest b/net-misc/vncrec/Manifest
new file mode 100644
index 000000000000..1818d83a1403
--- /dev/null
+++ b/net-misc/vncrec/Manifest
@@ -0,0 +1 @@
+DIST vncrec-0.2.tar.gz 65768 SHA256 fd4abed79892c68c078d74ec9cd7599d782325f5f59b71f356aec0120c21295b
diff --git a/net-misc/vncrec/files/vncrec-0.2-includes.patch b/net-misc/vncrec/files/vncrec-0.2-includes.patch
new file mode 100644
index 000000000000..174a42738ab7
--- /dev/null
+++ b/net-misc/vncrec/files/vncrec-0.2-includes.patch
@@ -0,0 +1,21 @@
+--- a/vncconnect/vncconnect.c 2001-06-09 05:41:45.000000000 +0200
++++ b/vncconnect/vncconnect.c 2010-09-28 20:19:03.000000000 +0200
+@@ -5,6 +5,8 @@
+ #include <stdio.h>
+ #include <X11/Xlib.h>
+ #include <X11/Xatom.h>
++#include <stdlib.h> /* exit() */
++#include <string.h> /* strlen() */
+
+ static char *programName;
+
+--- a/libvncauth/vncauth.c 2001-06-09 05:41:45.000000000 +0200
++++ b/libvncauth/vncauth.c 2010-09-28 20:19:44.000000000 +0200
+@@ -28,6 +28,7 @@
+ #include <sys/stat.h>
+ #include <vncauth.h>
+ #include <d3des.h>
++#include <time.h> /* time() */
+
+
+ /*
diff --git a/net-misc/vncrec/metadata.xml b/net-misc/vncrec/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/net-misc/vncrec/metadata.xml
@@ -0,0 +1,7 @@
+<?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>
+</pkgmetadata>
diff --git a/net-misc/vncrec/vncrec-0.2-r1.ebuild b/net-misc/vncrec/vncrec-0.2-r1.ebuild
new file mode 100644
index 000000000000..c27089273247
--- /dev/null
+++ b/net-misc/vncrec/vncrec-0.2-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="VNC session recorder and player"
+HOMEPAGE="http://www.sodan.org/~penny/vncrec/"
+SRC_URI="http://www.sodan.org/~penny/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND="x11-libs/libXaw
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXp
+ x11-libs/libXpm
+ x11-libs/libXt"
+DEPEND="${RDEPEND}
+ app-text/rman
+ x11-misc/gccmakedep
+ x11-misc/imake
+ x11-proto/xextproto"
+
+DOCS=( README README.vnc )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-includes.patch
+ touch vncrec/vncrec.man || die
+ sed -i Imakefile \
+ -e '/make Makefiles/d' \
+ || die "sed Imakefile"
+}
+
+src_configure() {
+ xmkmf -a || die
+}
+
+src_compile() {
+ emake \
+ CC=$(tc-getCC) \
+ CCOPTIONS="${CXXFLAGS}" \
+ EXTRA_LDOPTIONS="${LDFLAGS}" \
+ World
+}
diff --git a/net-misc/vncsnapshot/Manifest b/net-misc/vncsnapshot/Manifest
new file mode 100644
index 000000000000..fa5f20f37dec
--- /dev/null
+++ b/net-misc/vncsnapshot/Manifest
@@ -0,0 +1 @@
+DIST vncsnapshot-1.2a-src.tar.bz2 70121 SHA256 ac490c4b3810d419c65cdfb48d742ca382218c3c0f04e7868520ff9a06149ca6
diff --git a/net-misc/vncsnapshot/files/vncsnapshot-1.2a-amd64grey.patch b/net-misc/vncsnapshot/files/vncsnapshot-1.2a-amd64grey.patch
new file mode 100644
index 000000000000..ee5807b58af9
--- /dev/null
+++ b/net-misc/vncsnapshot/files/vncsnapshot-1.2a-amd64grey.patch
@@ -0,0 +1,12 @@
+diff -aur vncsnapshot-1.2a-orig/rfb.h vncsnapshot-1.2a/rfb.h
+--- vncsnapshot-1.2a-orig/rfb.h 2002-02-09 16:00:42.000000000 -0500
++++ vncsnapshot-1.2a/rfb.h 2008-09-24 16:57:13.000000000 -0400
+@@ -34,7 +34,7 @@
+
+ // Define the CARD* types as used in X11/Xmd.h
+
+-typedef unsigned long CARD32;
++typedef unsigned int CARD32;
+ typedef unsigned short CARD16;
+ typedef short INT16;
+ typedef unsigned char CARD8;
diff --git a/net-misc/vncsnapshot/metadata.xml b/net-misc/vncsnapshot/metadata.xml
new file mode 100644
index 000000000000..09b86bb5a8c1
--- /dev/null
+++ b/net-misc/vncsnapshot/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>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">vncsnapshot</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/vncsnapshot/vncsnapshot-1.2a.ebuild b/net-misc/vncsnapshot/vncsnapshot-1.2a.ebuild
new file mode 100644
index 000000000000..0826735eba07
--- /dev/null
+++ b/net-misc/vncsnapshot/vncsnapshot-1.2a.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="A command-line tool for taking JPEG snapshots of VNC servers"
+HOMEPAGE="http://vncsnapshot.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ppc x86"
+IUSE=""
+
+DEPEND="
+ virtual/jpeg
+ >=sys-libs/zlib-1.1.4"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-amd64grey.patch"
+ sed \
+ -e 's:-I/usr/local/include::g' \
+ -e 's:-L/usr/local/lib::g' \
+ -e '/^all:/s|$(SUBDIRS:.dir=.all)||g' \
+ -e '/^vnc/s|$| $(SUBDIRS:.dir=.all)|g' \
+ -i Makefile || die
+}
+
+src_compile() {
+ #note: We override CDEBUGFLAGS instead of CFLAGS because otherwise
+ # we lost the INCLUDES in the makefile.
+ # bug #295741
+ emake CDEBUGFLAGS="${CXXFLAGS}" CC="$(tc-getCC)" CXX="$(tc-getCXX)"
+}
+
+src_install() {
+ dobin vncsnapshot
+ cp vncsnapshot.man1 vncsnapshot.1
+ doman vncsnapshot.1
+}
diff --git a/net-misc/vpnc/Manifest b/net-misc/vpnc/Manifest
new file mode 100644
index 000000000000..abd3719c28a6
--- /dev/null
+++ b/net-misc/vpnc/Manifest
@@ -0,0 +1,2 @@
+DIST vpnc-0.5.3_p527.tar.xz 98740 SHA256 4076e40b3be37ba95c393cc5e21cccf87540e994275bd336a4ec0c6b4c3d54de SHA512 6c657039c4f914b03214912ef3471fae755b4dcbf771c3653ed00d90bb044fa83dbca7a5cda9ac0c9389baae96c658566c8b3f3a4b94c078dda8387935532c9f WHIRLPOOL 61aaf00f63e531eebf3583492f288ee339c446b0a273f1ff5c008dc37ab9f74749ee3c74ea0f110018ef764448c838064de6140743941ff17039e4288cfe66e8
+DIST vpnc-0.5.3_p550.tar.xz 101860 SHA256 5d7582eb3d7ead3cb0732a404ce10f471a65c48d0bb4cb2dd5c525273bf0f4b5 SHA512 95150c743c61a962c36591bb874c77f2c28f341c0a1290dba4e878a460d22d762dd88f7cfc0aa9d17ace71a8b826d9fd13554c23b5123dee6009e9fffcd2de55 WHIRLPOOL 8194e0dcf2c0bd1910b4b110dd475024d5cc351d86dec58b33811c37f9bcbc2702c4fede861a6318c54dfb7d19ff2d2265da86d573181a02f433e131184b9bd3
diff --git a/net-misc/vpnc/files/vpnc-0.5.3_p514-as-needed.patch b/net-misc/vpnc/files/vpnc-0.5.3_p514-as-needed.patch
new file mode 100644
index 000000000000..18bc90a99587
--- /dev/null
+++ b/net-misc/vpnc/files/vpnc-0.5.3_p514-as-needed.patch
@@ -0,0 +1,47 @@
+ Makefile | 12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 270d7e1..578884e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -60,16 +60,16 @@ BINSRCS = $(addsuffix .c,$(BINS))
+ VERSION := $(shell sh mk-version)
+ RELEASE_VERSION := $(shell cat VERSION)
+
+-CC=gcc
++CC?=gcc
+ CFLAGS ?= -O3 -g
+ CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings
+ CFLAGS += $(shell libgcrypt-config --cflags) $(CRYPTO_CFLAGS)
+ CPPFLAGS += -DVERSION=\"$(VERSION)\"
+ LDFLAGS ?= -g
+-LDFLAGS += $(shell libgcrypt-config --libs) $(CRYPTO_LDADD)
++LIBS += $(shell libgcrypt-config --libs) $(CRYPTO_LDADD)
+
+ ifeq ($(shell uname -s), SunOS)
+-LDFLAGS += -lnsl -lresolv -lsocket
++LIBS += -lnsl -lresolv -lsocket
+ endif
+ ifneq (,$(findstring Apple,$(shell $(CC) --version)))
+ # enabled in FSF GCC, disabled by default in Apple GCC
+@@ -79,16 +79,16 @@ endif
+ all : $(BINS) vpnc.8
+
+ vpnc : $(OBJS) vpnc.o
+- $(CC) -o $@ $^ $(LDFLAGS)
++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+ vpnc.8 : vpnc.8.template makeman.pl vpnc
+ ./makeman.pl
+
+ cisco-decrypt : cisco-decrypt.o decrypt-utils.o
+- $(CC) -o $@ $^ $(LDFLAGS)
++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+ test-crypto : sysdep.o test-crypto.o crypto.o $(CRYPTO_OBJS)
+- $(CC) -o $@ $^ $(LDFLAGS)
++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+ .depend: $(SRCS) $(BINSRCS)
+ $(CC) -MM $(SRCS) $(BINSRCS) $(CFLAGS) $(CPPFLAGS) > $@
diff --git a/net-misc/vpnc/files/vpnc-2.init b/net-misc/vpnc/files/vpnc-2.init
new file mode 100644
index 000000000000..c47198f43811
--- /dev/null
+++ b/net-misc/vpnc/files/vpnc-2.init
@@ -0,0 +1,103 @@
+#!/sbin/runscript
+
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+VPNDIR="/etc/vpnc"
+VPN="${SVCNAME#*.}"
+if [ -n ${VPN} ] && [ ${SVCNAME} != "vpnc" ]; then
+ mkdir -p /var/run/vpnc
+ VPNPID="/var/run/vpnc/${VPN}.pid"
+else
+ VPNPID="/var/run/vpnc.pid"
+fi
+VPNCONF="${VPNDIR}/${VPN}.conf"
+VPNSCRIPTDIR="${VPNDIR}/scripts.d"
+PREUPSCRIPT="${VPNSCRIPTDIR}/${VPN}-preup.sh"
+PREDOWNSCRIPT="${VPNSCRIPTDIR}/${VPN}-predown.sh"
+POSTUPSCRIPT="${VPNSCRIPTDIR}/${VPN}-postup.sh"
+POSTDOWNSCRIPT="${VPNSCRIPTDIR}/${VPN}-postdown.sh"
+# We should source this file to avoid problems when init script
+# name differs from the default name
+. /etc/conf.d/vpnc
+
+depend() {
+ need net
+ before netmount
+}
+
+checktundevice() {
+ if [ ! -e /dev/net/tun ]; then
+ if ! modprobe tun ; then
+ eerror "TUN/TAP support is not available in this kernel"
+ return 1
+ fi
+ fi
+ if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then
+ ebegin "Detected broken /dev/net/tun symlink, fixing..."
+ rm -f /dev/net/tun
+ ln -s /dev/misc/net/tun /dev/net/tun
+ eend $?
+ fi
+}
+
+screenoutput() {
+ if [ "${VPNCOUTPUT}" = "yes" ]; then
+ export SCREEN_OUTPUT="/dev/stdout"
+ else
+ export SCREEN_OUTPUT="/dev/null"
+ fi
+}
+
+start() {
+ ebegin "Starting VPNC: ${VPN}"
+
+ checktundevice || return 1
+ screenoutput
+
+ if [ ! -e "${VPNCONF}" ]; then
+ eend 1 "${VPNCONF} does not exist"
+ return 1
+ fi
+
+ local args=""
+
+ if [ -x "${PREUPSCRIPT}" ] ; then
+ "${PREUPSCRIPT}" > ${SCREEN_OUTPUT}
+ fi
+
+ start-stop-daemon --start --pidfile "${VPNPID}" --exec /usr/sbin/vpnc \
+ -- --pid-file "${VPNPID}" "${VPNCONF}" > ${SCREEN_OUTPUT}
+ local retval=$?
+ if [ ! ${retval} -eq 0 ]; then
+ eend ${retval}
+ return ${retval}
+ fi
+
+ if [ -x "${POSTUPSCRIPT}" ] ; then
+ "${POSTUPSCRIPT}" > ${SCREEN_OUTPUT}
+ fi
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping VPNC: ${VPN}"
+ screenoutput
+ if [ -x "${PREDOWNSCRIPT}" ] ; then
+ "${PREDOWNSCRIPT}" > ${SCREEN_OUTPUT}
+ fi
+
+ start-stop-daemon --stop --exec /usr/sbin/vpnc --pidfile "${VPNPID}"
+ local retval=$?
+ if [ ! ${retval} -eq 0 ]; then
+ eend ${retval}
+ return ${retval}
+ fi
+
+
+ if [ -x "${POSTDOWNSCRIPT}" ] ; then
+ "${POSTDOWNSCRIPT}" > ${SCREEN_OUTPUT}
+ fi
+ eend $?
+}
diff --git a/net-misc/vpnc/files/vpnc-3.init b/net-misc/vpnc/files/vpnc-3.init
new file mode 100644
index 000000000000..c50f933a0fd3
--- /dev/null
+++ b/net-misc/vpnc/files/vpnc-3.init
@@ -0,0 +1,103 @@
+#!/sbin/runscript
+
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+VPNDIR="/etc/vpnc"
+VPN="${SVCNAME#*.}"
+if [ -n ${VPN} ] && [ ${SVCNAME} != "vpnc" ]; then
+ mkdir -p /var/run/vpnc
+ VPNPID="/var/run/vpnc/${VPN}.pid"
+else
+ VPNPID="/var/run/vpnc.pid"
+fi
+VPNCONF="${VPNDIR}/${VPN}.conf"
+VPNSCRIPTDIR="${VPNDIR}/scripts.d"
+PREUPSCRIPT="${VPNSCRIPTDIR}/${VPN}-preup.sh"
+PREDOWNSCRIPT="${VPNSCRIPTDIR}/${VPN}-predown.sh"
+POSTUPSCRIPT="${VPNSCRIPTDIR}/${VPN}-postup.sh"
+POSTDOWNSCRIPT="${VPNSCRIPTDIR}/${VPN}-postdown.sh"
+# We should source this file to avoid problems when init script
+# name differs from the default name
+. /etc/conf.d/vpnc
+
+depend() {
+ need net
+ before netmount
+}
+
+checktundevice() {
+ if [ ! -e /dev/net/tun ]; then
+ if ! modprobe tun ; then
+ eerror "TUN/TAP support is not available in this kernel"
+ return 1
+ fi
+ fi
+ if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then
+ ebegin "Detected broken /dev/net/tun symlink, fixing..."
+ rm -f /dev/net/tun
+ ln -s /dev/misc/net/tun /dev/net/tun
+ eend $?
+ fi
+}
+
+screenoutput() {
+ if [ "${VPNCOUTPUT}" = "yes" ]; then
+ export SCREEN_OUTPUT="/dev/stdout"
+ else
+ export SCREEN_OUTPUT="/dev/null"
+ fi
+}
+
+start() {
+ ebegin "Starting VPNC: ${VPN}"
+
+ checktundevice || return 1
+ screenoutput
+
+ if [ ! -e "${VPNCONF}" ]; then
+ eend 1 "${VPNCONF} does not exist"
+ return 1
+ fi
+
+ local args=""
+
+ if [ -x "${PREUPSCRIPT}" ] ; then
+ "${PREUPSCRIPT}" > ${SCREEN_OUTPUT}
+ fi
+
+ start-stop-daemon --start --pidfile "${VPNPID}" --exec /usr/sbin/vpnc \
+ -- --pid-file "${VPNPID}" "${VPNCONF}" > ${SCREEN_OUTPUT}
+ local retval=$?
+ if [ ! ${retval} -eq 0 ]; then
+ eend ${retval}
+ return ${retval}
+ fi
+
+ if [ -x "${POSTUPSCRIPT}" ] ; then
+ "${POSTUPSCRIPT}" > ${SCREEN_OUTPUT}
+ fi
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping VPNC: ${VPN}"
+ screenoutput
+ if [ -x "${PREDOWNSCRIPT}" ] ; then
+ "${PREDOWNSCRIPT}" > ${SCREEN_OUTPUT}
+ fi
+
+ start-stop-daemon --stop --pidfile "${VPNPID}"
+ local retval=$?
+ if [ ! ${retval} -eq 0 ]; then
+ eend ${retval}
+ return ${retval}
+ fi
+
+
+ if [ -x "${POSTDOWNSCRIPT}" ] ; then
+ "${POSTDOWNSCRIPT}" > ${SCREEN_OUTPUT}
+ fi
+ eend $?
+}
diff --git a/net-misc/vpnc/files/vpnc-tmpfiles.conf b/net-misc/vpnc/files/vpnc-tmpfiles.conf
new file mode 100644
index 000000000000..67224ac3ef2d
--- /dev/null
+++ b/net-misc/vpnc/files/vpnc-tmpfiles.conf
@@ -0,0 +1 @@
+D /run/vpnc 0755 root root -
diff --git a/net-misc/vpnc/files/vpnc.confd b/net-misc/vpnc/files/vpnc.confd
new file mode 100644
index 000000000000..62789bd407ec
--- /dev/null
+++ b/net-misc/vpnc/files/vpnc.confd
@@ -0,0 +1,4 @@
+# If you wish to see the output made by vpnc, for example the password
+# prompt, set this variable to yes
+
+VPNCOUTPUT="no"
diff --git a/net-misc/vpnc/files/vpnc.service b/net-misc/vpnc/files/vpnc.service
new file mode 100644
index 000000000000..ce1e3683f4ec
--- /dev/null
+++ b/net-misc/vpnc/files/vpnc.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=Free Cisco VPN connection to %i
+Documentation=man:vpnc(8) http://www.unix-ag.uni-kl.de/~massar/vpnc/
+Requires=network.target
+After=network.target
+ConditionPathExists=/dev/net/tun
+
+[Service]
+Type=forking
+EnvironmentFile=/etc/vpnc/%i.conf
+PIDFile=/run/vpnc/%i.pid
+
+ExecStartPre=-/etc/vpnc/scripts.d/%i-preup.sh
+ExecStart=/usr/sbin/vpnc --pid-file /run/vpnc/%i.pid
+ExecStartPost=-/etc/vpnc/scripts.d/%i-postup.sh
+
+ExecStopPost=-/etc/vpnc/scripts.d/%i-postdown.sh
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/vpnc/metadata.xml b/net-misc/vpnc/metadata.xml
new file mode 100644
index 000000000000..0baeef4b3423
--- /dev/null
+++ b/net-misc/vpnc/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>ljakab@ac.upc.edu</email>
+ <name>Loránd Jakab</name>
+ </maintainer>
+ <maintainer>
+ <email>mmokrejs@gmail.com</email>
+ <name>Martin Mokrejs</name>
+ </maintainer>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ <name>Justin Lecher</name>
+ </maintainer>
+ <use>
+ <flag name="resolvconf">Enable support for DNS managing framework <pkg>net-dns/openresolv</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/vpnc/vpnc-0.5.3_p527-r1.ebuild b/net-misc/vpnc/vpnc-0.5.3_p527-r1.ebuild
new file mode 100644
index 000000000000..22b68b163e86
--- /dev/null
+++ b/net-misc/vpnc/vpnc-0.5.3_p527-r1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils linux-info systemd toolchain-funcs
+
+DESCRIPTION="Free client for Cisco VPN routing software"
+HOMEPAGE="http://www.unix-ag.uni-kl.de/~massar/vpnc/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
+
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="amd64 arm ppc ppc64 sparc x86"
+IUSE="resolvconf +gnutls selinux"
+
+DEPEND="
+ dev-lang/perl
+ dev-libs/libgcrypt:0=
+ >=sys-apps/iproute2-2.6.19.20061214[-minimal]
+ gnutls? ( net-libs/gnutls )
+ !gnutls? ( dev-libs/openssl:0= )"
+RDEPEND="${DEPEND}
+ resolvconf? ( net-dns/openresolv )
+ selinux? ( sec-policy/selinux-vpn )
+"
+
+RESTRICT="!gnutls? ( bindist )"
+
+CONFIG_CHECK="~TUN"
+
+src_prepare() {
+ if use gnutls; then
+ elog "Will build with GnuTLS (default) instead of OpenSSL so you may even redistribute binaries."
+ elog "See the Makefile itself and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=440318"
+ else
+ sed -i -e '/^#OPENSSL_GPL_VIOLATION/s:#::g' "${S}"/Makefile || die
+ ewarn "Building SSL support with OpenSSL instead of GnuTLS. This means that"
+ ewarn "you are not allowed to re-distibute the binaries due to conflicts between BSD license and GPL,"
+ ewarn "see the vpnc Makefile and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=440318"
+ fi
+
+ epatch "${FILESDIR}"/${PN}-0.5.3_p514-as-needed.patch
+
+ sed -e 's:test/cert0.pem::g' -i Makefile || die
+
+ tc-export CC
+
+ sed \
+ -e 's:/var/run:/run:g' \
+ -i ChangeLog config.c TODO || die
+}
+
+src_install() {
+ emake PREFIX="/usr" DESTDIR="${D}" install
+ dodoc README TODO VERSION
+ keepdir /etc/vpnc/scripts.d
+ newinitd "${FILESDIR}/vpnc-3.init" vpnc
+ newconfd "${FILESDIR}/vpnc.confd" vpnc
+ sed -e "s:/usr/local:/usr:" -i "${D}"/etc/vpnc/vpnc-script || die
+
+ systemd_dotmpfilesd "${FILESDIR}"/vpnc-tmpfiles.conf
+ systemd_newunit "${FILESDIR}"/vpnc.service vpnc@.service
+
+ # COPYING file resides here, should not be installed
+ rm -rf "${ED}"/usr/share/doc/vpnc/ || die
+}
+
+pkg_postinst() {
+ elog "You can generate a configuration file from the original Cisco profiles of your"
+ elog "connection by using /usr/bin/pcf2vpnc to convert the .pcf file"
+ elog "A guide is available at https://wiki.gentoo.org/wiki/Vpnc"
+}
diff --git a/net-misc/vpnc/vpnc-0.5.3_p550.ebuild b/net-misc/vpnc/vpnc-0.5.3_p550.ebuild
new file mode 100644
index 000000000000..dbb239caa9bb
--- /dev/null
+++ b/net-misc/vpnc/vpnc-0.5.3_p550.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils linux-info systemd toolchain-funcs
+
+DESCRIPTION="Free client for Cisco VPN routing software"
+HOMEPAGE="http://www.unix-ag.uni-kl.de/~massar/vpnc/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
+
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="amd64 arm ppc ~ppc64 sparc x86"
+IUSE="resolvconf +gnutls selinux"
+
+DEPEND="
+ dev-lang/perl
+ dev-libs/libgcrypt:0=
+ >=sys-apps/iproute2-2.6.19.20061214[-minimal]
+ gnutls? ( net-libs/gnutls )
+ !gnutls? ( dev-libs/openssl:0= )"
+RDEPEND="${DEPEND}
+ resolvconf? ( net-dns/openresolv )
+ selinux? ( sec-policy/selinux-vpn )
+"
+
+RESTRICT="!gnutls? ( bindist )"
+
+CONFIG_CHECK="~TUN"
+
+src_prepare() {
+ if use gnutls; then
+ elog "Will build with GnuTLS (default) instead of OpenSSL so you may even redistribute binaries."
+ elog "See the Makefile itself and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=440318"
+ else
+ sed -i -e '/^#OPENSSL_GPL_VIOLATION/s:#::g' "${S}"/Makefile || die
+ ewarn "Building SSL support with OpenSSL instead of GnuTLS. This means that"
+ ewarn "you are not allowed to re-distibute the binaries due to conflicts between BSD license and GPL,"
+ ewarn "see the vpnc Makefile and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=440318"
+ fi
+
+ sed -e 's:test/cert0.pem::g' -i Makefile || die
+
+ tc-export CC
+
+ sed \
+ -e 's:/var/run:/run:g' \
+ -i ChangeLog config.c TODO || die
+}
+
+src_install() {
+ emake PREFIX="/usr" DESTDIR="${D}" install
+ dodoc README TODO VERSION
+ keepdir /etc/vpnc/scripts.d
+ newinitd "${FILESDIR}/vpnc-3.init" vpnc
+ newconfd "${FILESDIR}/vpnc.confd" vpnc
+ sed -e "s:/usr/local:/usr:" -i "${ED}"/etc/vpnc/vpnc-script || die
+
+ systemd_dotmpfilesd "${FILESDIR}"/vpnc-tmpfiles.conf
+ systemd_newunit "${FILESDIR}"/vpnc.service vpnc@.service
+
+ # COPYING file resides here, should not be installed
+ rm -rf "${ED}"/usr/share/doc/vpnc/ || die
+}
+
+pkg_postinst() {
+ elog "You can generate a configuration file from the original Cisco profiles of your"
+ elog "connection by using /usr/bin/pcf2vpnc to convert the .pcf file"
+ elog "A guide is available at https://wiki.gentoo.org/wiki/Vpnc"
+}
diff --git a/net-misc/vpncwatch/Manifest b/net-misc/vpncwatch/Manifest
new file mode 100644
index 000000000000..b9db5ef429b6
--- /dev/null
+++ b/net-misc/vpncwatch/Manifest
@@ -0,0 +1,2 @@
+DIST vpncwatch-1.8.1.tar.gz 17420 SHA256 fb69cfc17abacc1c1ccb56f42ebdf5fafe20f7971eb917a90863daed69b72562 SHA512 f5f5f68e2644ee3748a811505025155e77a7d3e345ddfc2f847674aa5d7e9e8be86d10708aeefc521ac747744e4f7edc3853ff230022aee7b098e8d0a35db5c2 WHIRLPOOL 3e5edd96d791aeb57a8ac96542fe200acd6d4d0fcff33b9576636bbccab957e5f168cd27fe52a61afce8cc5a55b940e22471243023d78e1e6c637883f31fc0ac
+DIST vpncwatch-1.8.tar.gz 16356 SHA256 bc5ea19ef4020ed7ecdff3a7c4bdf981590c1a7c62e1c92170e8360782a89626 SHA512 33771af327995be170e98169e4f5594a8298a613b865f1fb3157b0bccb8218e81a4bb26c7d9783d2f7d0963dafa04d21100889c5c710166b4a1e1487f945dceb WHIRLPOOL de524723042357674520c68034c9ecaadbfac94b299c42401565ea284bbc5f794bdd38f2c5a9bda1ed5ed1102febbf191ff325f3ec6b18103612ca67846c6014
diff --git a/net-misc/vpncwatch/files/vpncwatch-1.7-Makefile.patch b/net-misc/vpncwatch/files/vpncwatch-1.7-Makefile.patch
new file mode 100644
index 000000000000..f32e538ade40
--- /dev/null
+++ b/net-misc/vpncwatch/files/vpncwatch-1.7-Makefile.patch
@@ -0,0 +1,21 @@
+--- Makefile 2008-02-04 09:44:34.000000000 +0100
++++ Makefile.new 2009-02-08 18:49:06.061291832 +0100
+@@ -10,7 +10,7 @@
+ OBJS = vpncwatch.o proc.o net.o
+
+ CC ?= gcc
+-CFLAGS = -D_GNU_SOURCE -O2 -Wall -Werror
++CFLAGS += -D_GNU_SOURCE
+
+ vpncwatch: $(OBJS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS)
+@@ -13,7 +13,7 @@
+ CFLAGS = -D_GNU_SOURCE -O2 -Wall -Werror
+
+ vpncwatch: $(OBJS)
+- $(CC) $(CFLAGS) -o $@ $(OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS)
+
+ .c.o:
+ $(CC) $(CFLAGS) -c -o $@ $<
+
diff --git a/net-misc/vpncwatch/files/vpncwatch-1.7-gcc4.3.patch b/net-misc/vpncwatch/files/vpncwatch-1.7-gcc4.3.patch
new file mode 100644
index 000000000000..91c3f5b28399
--- /dev/null
+++ b/net-misc/vpncwatch/files/vpncwatch-1.7-gcc4.3.patch
@@ -0,0 +1,11 @@
+--- vpncwatch.c.orig 2009-02-08 17:03:14.296036582 +0100
++++ vpncwatch.c 2009-02-08 17:02:56.932904474 +0100
+@@ -31,6 +31,7 @@
+ #include <arpa/inet.h>
+ #include <netdb.h>
+ #include <errno.h>
++#include <linux/limits.h>
+
+
+ #include "vpncwatch.h"
+
diff --git a/net-misc/vpncwatch/files/vpncwatch-1.7-literal.patch b/net-misc/vpncwatch/files/vpncwatch-1.7-literal.patch
new file mode 100644
index 000000000000..2944464c08bc
--- /dev/null
+++ b/net-misc/vpncwatch/files/vpncwatch-1.7-literal.patch
@@ -0,0 +1,11 @@
+--- net.c 2008-02-04 09:28:51.000000000 +0100
++++ net.c.new 2009-02-08 17:13:31.188241104 +0100
+@@ -53,7 +53,7 @@
+ /* get the server address */
+ if (inet_pton(AF_INET, chkhost, &(chksock.sin_addr.s_addr)) <= 0) {
+ if ((host = gethostbyname(chkhost)) == NULL) {
+- syslog(LOG_ERR, hstrerror(h_errno));
++ syslog(LOG_ERR, "%s", hstrerror(h_errno));
+ return 0;
+ }
+
diff --git a/net-misc/vpncwatch/files/vpncwatch-1.8-Makefile.patch b/net-misc/vpncwatch/files/vpncwatch-1.8-Makefile.patch
new file mode 100644
index 000000000000..cab556c95352
--- /dev/null
+++ b/net-misc/vpncwatch/files/vpncwatch-1.8-Makefile.patch
@@ -0,0 +1,23 @@
+ Makefile | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 901e0ae..599499a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -10,13 +10,13 @@ OBJS = vpncwatch.o proc.o net.o
+ DISTFILES = AUTHORS COPYING README Makefile $(SRCS) $(HDRS) vpnc-watch.py
+
+ CC ?= gcc
+-CFLAGS = -D_GNU_SOURCE -O2 -Wall -Werror
++CFLAGS += -D_GNU_SOURCE -Wall
+
+ # Update version in vpncwatch.h as well
+ TAG = vpncwatch-1.8
+
+ vpncwatch: $(OBJS)
+- $(CC) $(CFLAGS) -o $@ $(OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS)
+
+ .c.o:
+ $(CC) $(CFLAGS) -c -o $@ $<
diff --git a/net-misc/vpncwatch/files/vpncwatch-1.8.1-Makefile.patch b/net-misc/vpncwatch/files/vpncwatch-1.8.1-Makefile.patch
new file mode 100644
index 000000000000..1f982ee76a3f
--- /dev/null
+++ b/net-misc/vpncwatch/files/vpncwatch-1.8.1-Makefile.patch
@@ -0,0 +1,23 @@
+ Makefile | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 901e0ae..599499a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -10,13 +10,13 @@ OBJS = vpncwatch.o proc.o net.o
+ DISTFILES = AUTHORS COPYING README Makefile $(SRCS) $(HDRS) vpnc-watch.py
+
+ CC ?= gcc
+-CFLAGS = -D_GNU_SOURCE -O2 -Wall -Werror
++CFLAGS += -D_GNU_SOURCE -Wall
+
+ # Update version in vpncwatch.h as well
+ TAG = vpncwatch-1.8.1
+
+ vpncwatch: $(OBJS)
+- $(CC) $(CFLAGS) -o $@ $(OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS)
+
+ .c.o:
+ $(CC) $(CFLAGS) -c -o $@ $<
diff --git a/net-misc/vpncwatch/metadata.xml b/net-misc/vpncwatch/metadata.xml
new file mode 100644
index 000000000000..128fee4d65eb
--- /dev/null
+++ b/net-misc/vpncwatch/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>jlec@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">downloads/dcantrell</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/vpncwatch/vpncwatch-1.8.1.ebuild b/net-misc/vpncwatch/vpncwatch-1.8.1.ebuild
new file mode 100644
index 000000000000..1778947d5d27
--- /dev/null
+++ b/net-misc/vpncwatch/vpncwatch-1.8.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Keepalive daemon for vpnc on Linux systems"
+HOMEPAGE="http://github.com/dcantrell/vpncwatch/"
+SRC_URI="http://github.com/downloads/dcantrell/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="net-misc/vpnc"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-Makefile.patch"
+ tc-export CC
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc README ChangeLog AUTHORS
+}
diff --git a/net-misc/vpncwatch/vpncwatch-1.8.ebuild b/net-misc/vpncwatch/vpncwatch-1.8.ebuild
new file mode 100644
index 000000000000..47b432c72c29
--- /dev/null
+++ b/net-misc/vpncwatch/vpncwatch-1.8.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A keepalive daemon for vpnc on Linux systems"
+HOMEPAGE="http://github.com/dcantrell/vpncwatch/"
+SRC_URI="http://github.com/downloads/dcantrell/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="net-misc/vpnc"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-Makefile.patch"
+ tc-export CC
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc README ChangeLog AUTHORS
+}
diff --git a/net-misc/vrrpd/Manifest b/net-misc/vrrpd/Manifest
new file mode 100644
index 000000000000..d66cc985c232
--- /dev/null
+++ b/net-misc/vrrpd/Manifest
@@ -0,0 +1,2 @@
+DIST vrrpd-1.0.tar.gz 68819 SHA256 5d49eee9ecb3ceba3a35182930d3d740f771c8f7950b2327502a79c66bca2fd6 SHA512 bf855d4d196fe7ee2d6fb8db02d86941ce6e0ddac59896c649df99eb20002d23a42a60dc11ddb1a35da6bb6b20099df81e2e6114915e71d06cbc82d93a0ff82f WHIRLPOOL 34028a5bcb28645840cee636c22e647972b9f4c2ac71369168131a5ea191c39d23d0ac49850c095091542e885649da93d7c1c2bd35e8d0575717cecca892360e
+DIST vrrpd-1.9.tar.gz 542249 SHA256 b505adad5c4c8972ad2a0d8012d8193292a4ddfcb9cfa854a416f1da64c95e03 SHA512 8c719cabbd6a799e4e439dbb698af9d6e24cf2635cfbd71a204b46bd2b65c1384e53f130b663d0fcfc903d89080ff25d9c97ae4cd9f6b2434d5462cf678a306b WHIRLPOOL 38b3c21df58096473ed71e7b8ef8241ef72948758273313f39eb5052d7304cb311c4b94d81dbf3988b54ac077c929e4788b9bf73a2e2210dee728104a2589ebf
diff --git a/net-misc/vrrpd/files/vrrpd-1.9-rollup.patch b/net-misc/vrrpd/files/vrrpd-1.9-rollup.patch
new file mode 100644
index 000000000000..72c5f3ad47f3
--- /dev/null
+++ b/net-misc/vrrpd/files/vrrpd-1.9-rollup.patch
@@ -0,0 +1,37 @@
+This is a partial rollup of patches submitted to upstream to clean up the
+packaging.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+diff --git a/Makefile b/Makefile
+old mode 100755
+new mode 100644
+index d7f3309..869d06d
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,8 @@
+ PROJECT=vrrpd
+
+-ALL_EXE=vrrpd
++ALL_EXE=vrrpd atropos
+
++ATROPOS_OBJS = atropos.o
+ VRRPD_OBJS = vrrpd.o libnetlink.o ipaddr.o
+
+ MAIN_OPT=
+@@ -18,9 +19,13 @@ COMMON_CFLAGS= $(MAIN_OPT) $(INCLUDEOPT) $(PROF_OPT) $(DBG_OPT) $(MACHINEOPT)
+ CC=gcc
+ CFLAGS= $(COMMON_CFLAGS) -Wall
+
++all: $(ALL_EXE)
++
++atropos: $(ATROPOS_OBJS)
++ $(CC) $(PROF_OPT) -o $@ $^
++
+ vrrpd : $(VRRPD_OBJS)
+- $(CC) $(PROF_OPT) -o $@ $(VRRPD_OBJS) $(LINKLIB)
+- $(CC) atropos.c -o atropos
++ $(CC) $(PROF_OPT) -o $@ $^ $(LINKLIB)
+
+ vrrpd.o: vrrpd.h
+ libnetlink.o: libnetlink.h
diff --git a/net-misc/vrrpd/metadata.xml b/net-misc/vrrpd/metadata.xml
new file mode 100644
index 000000000000..61435d907770
--- /dev/null
+++ b/net-misc/vrrpd/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>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">fredbcode/Vrrpd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/vrrpd/vrrpd-1.0.ebuild b/net-misc/vrrpd/vrrpd-1.0.ebuild
new file mode 100644
index 000000000000..0a60d02f41f2
--- /dev/null
+++ b/net-misc/vrrpd/vrrpd-1.0.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Virtual Router Redundancy Protocol Daemon"
+HOMEPAGE="http://www.sourceforge.net/projects/vrrpd"
+SRC_URI="mirror://sourceforge/${PN}/${PN}/1.0/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+DEPEND="sys-devel/gcc"
+RDEPEND=""
+
+src_compile() {
+ emake DBG_OPT="" MACHINEOPT="${CFLAGS}" PROF_OPT="${LDFLAGS}"
+}
+
+src_install() {
+ dosbin vrrpd
+ doman vrrpd.8
+ dodoc FAQ Changes TODO scott_example doc/draft-ietf-vrrp-spec-v2-05.txt doc/rfc2338.txt.vrrp doc/draft-jou-duplicate-ip-address-02.txt
+}
diff --git a/net-misc/vrrpd/vrrpd-1.9.ebuild b/net-misc/vrrpd/vrrpd-1.9.ebuild
new file mode 100644
index 000000000000..f686913209cb
--- /dev/null
+++ b/net-misc/vrrpd/vrrpd-1.9.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="Virtual Router Redundancy Protocol Daemon"
+HOMEPAGE="http://numsys.eu/vrrp_art.php"
+SRC_URI="https://github.com/fredbcode/Vrrpd/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+DEPEND="sys-devel/gcc"
+RDEPEND=""
+S="${WORKDIR}/Vrrpd-${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/vrrpd-1.9-rollup.patch || die
+ emake mrproper
+ #rm -f atropos
+}
+
+src_compile() {
+ emake DBG_OPT="" MACHINEOPT="${CFLAGS}" PROF_OPT="${LDFLAGS}"
+}
+
+src_install() {
+ dosbin vrrpd atropos
+ doman vrrpd.8
+ dodoc FAQ Changes TODO scott_example doc/draft-ietf-vrrp-spec-v2-05.txt doc/rfc2338.txt.vrrp doc/draft-jou-duplicate-ip-address-02.txt doc/principe-Vrrp1.jpg doc/principe-Vrrp2.jpg README.md
+}
diff --git a/net-misc/vtun/Manifest b/net-misc/vtun/Manifest
new file mode 100644
index 000000000000..5e4367868250
--- /dev/null
+++ b/net-misc/vtun/Manifest
@@ -0,0 +1,2 @@
+DIST vtun-3.0.2.tar.gz 125777 SHA256 db26d4dbc35a2b3d65519f68b8ae55c80d7ec4e6569aeec7a432aa82f24c56d6 SHA512 1cf15ca7856c74318f921d9a6c4b47b10fd1aa69e12a223d41c6c41e570333beb825d37d3aea4217d305bb37f53c5beff70081079516d809068f8024dc8a039f WHIRLPOOL ee72023902f2e4688ac84c0e1d9c5a3ad6982fb847dcf162ecd2f12efac0abeaeb11344b0a34322a4ad6f0adabcd986dff9546f98174a7f201c9b87e5ccb5c72
+DIST vtun-3.0.3.tar.gz 130051 SHA256 69dcbe4f8c5ce7d91b4150a6309e536d03b61841169746ca5788413ac7edb9cb SHA512 5fa789d08b556f97492b89515a89c2322c4b0a8fa95bd1035f5ed19061b3654a6a36a9911792096ac872ae9ae5451848cab87d0343dc0ffc064affea1f7d0d54 WHIRLPOOL 8939c132622d4833a8780003548850103c8f35cabd25b38198a254200a80747b57edba327b4ab91b6af954542d2605a5f2d9dda42a64218a5e0a586fe5705475
diff --git a/net-misc/vtun/files/vtun-3.0.2-build-racing-condition-fix.patch b/net-misc/vtun/files/vtun-3.0.2-build-racing-condition-fix.patch
new file mode 100644
index 000000000000..6fa765282ec3
--- /dev/null
+++ b/net-misc/vtun/files/vtun-3.0.2-build-racing-condition-fix.patch
@@ -0,0 +1,17 @@
+--- Makefile.in.orig 2012-06-12 00:20:24.359206241 +0400
++++ Makefile.in 2012-06-12 00:22:46.735301510 +0400
+@@ -60,10 +60,12 @@
+ vtund: $(OBJS)
+ $(CC) $(CFLAGS) -o vtund $(OBJS) $(LFD_OBJS) $(LDFLAGS)
+
+-cfg_file.tab.c: cfg_file.y cfg_kwords.h config.h
++cfg_file.tab.h:
+ $(YACC) $(YACCFLAGS) -b cfg_file cfg_file.y
+
+-cfg_file.lex.c: cfg_file.l cfg_kwords.h config.h
++cfg_file.tab.c: cfg_file.y cfg_kwords.h config.h cfg_file.tab.h
++
++cfg_file.lex.c: cfg_file.l cfg_kwords.h config.h cfg_file.tab.h
+ $(LEX) $(LEXFLAGS) cfg_file.l > cfg_file.lex.c
+
+ depend:
diff --git a/net-misc/vtun/files/vtun-3.0.2-includes.patch b/net-misc/vtun/files/vtun-3.0.2-includes.patch
new file mode 100644
index 000000000000..8634a659ca2e
--- /dev/null
+++ b/net-misc/vtun/files/vtun-3.0.2-includes.patch
@@ -0,0 +1,72 @@
+--- a/lfd_encrypt.c 2008-01-07 23:35:32.000000000 +0100
++++ b/lfd_encrypt.c 2010-09-18 04:53:31.000000000 +0200
+@@ -44,6 +44,7 @@
+ #include <strings.h>
+ #include <string.h>
+ #include <time.h>
++#include <arpa/inet.h> /* htonl() */
+
+ #include "vtun.h"
+ #include "linkfd.h"
+--- a/lib.c 2008-01-07 23:35:40.000000000 +0100
++++ b/lib.c 2010-09-18 04:52:51.000000000 +0200
+@@ -34,6 +34,7 @@
+ #include <sys/wait.h>
+ #include <syslog.h>
+ #include <errno.h>
++#include <time.h> /* nanosleep() */
+
+ #include "vtun.h"
+ #include "linkfd.h"
+--- a/lib.h 2008-01-07 23:35:41.000000000 +0100
++++ b/lib.h 2010-09-18 04:56:50.000000000 +0200
+@@ -26,6 +26,7 @@
+ #include <sys/types.h>
+ #include <signal.h>
+ #include <errno.h>
++#include <unistd.h> /* read(), write() */
+
+ #ifdef HAVE_LIBUTIL_H
+ #include <libutil.h>
+--- a/vtun.h 2008-01-07 23:36:07.000000000 +0100
++++ b/vtun.h 2010-09-18 04:56:08.000000000 +0200
+@@ -219,5 +219,9 @@
+ int tunnel(struct vtun_host *host);
+ int read_config(char *file);
+ struct vtun_host * find_host(char *host);
++int send_msg(int len, char *in, char **out);
++int send_ib_mesg(int *len, char **in);
++int recv_msg(int len, char *in, char **out);
++int recv_ib_mesg(int *len, char **in);
+
+ #endif
+--- a/lock.c 2008-01-07 23:35:50.000000000 +0100
++++ b/lock.c 2010-09-18 05:01:21.000000000 +0200
+@@ -32,6 +32,7 @@
+ #include <sys/types.h>
+ #include <signal.h>
+ #include <errno.h>
++#include <time.h> /* nanosleep() */
+
+ #include "vtun.h"
+ #include "linkfd.h"
+--- a/server 2008-01-07 23:36:01.000000000 +0100
++++ b/server.c 2010-09-18 05:02:45.000000000 +0200
+@@ -49,6 +49,7 @@
+ #include "auth.h"
+
+ #include "compat.h"
++#include "netlib.h" /* generic_addr() */
+
+ static volatile sig_atomic_t server_term;
+ static void sig_term(int sig)
+--- a/lfd_shaper.c 2008-01-07 23:35:36.000000000 +0100
++++ b/lfd_shaper.c 2010-09-18 05:07:12.000000000 +0200
+@@ -27,6 +27,7 @@
+ #include <stdlib.h>
+ #include <sys/time.h>
+ #include <syslog.h>
++#include <time.h> /* nanosleep() */
+
+ #include "vtun.h"
+ #include "linkfd.h"
diff --git a/net-misc/vtun/files/vtun-3.0.2-remove-config-presence-check.patch b/net-misc/vtun/files/vtun-3.0.2-remove-config-presence-check.patch
new file mode 100644
index 000000000000..15b3bf273c34
--- /dev/null
+++ b/net-misc/vtun/files/vtun-3.0.2-remove-config-presence-check.patch
@@ -0,0 +1,13 @@
+--- Makefile.in.orig 2012-06-11 23:31:11.416075337 +0400
++++ Makefile.in 2012-06-11 23:31:21.247324839 +0400
+@@ -86,9 +86,7 @@
+
+ install_config:
+ $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(ETC_DIR)
+- if [ ! -f $(ETC_DIR)/vtund.conf ]; then \
+- $(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(DESTDIR)$(ETC_DIR); \
+- fi
++ $(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(DESTDIR)$(ETC_DIR); \
+
+ install: vtund install_config install_man
+ $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(VAR_DIR)/run
diff --git a/net-misc/vtun/files/vtun-3.0.3-includes.patch b/net-misc/vtun/files/vtun-3.0.3-includes.patch
new file mode 100644
index 000000000000..cd7cf6a2a2ee
--- /dev/null
+++ b/net-misc/vtun/files/vtun-3.0.3-includes.patch
@@ -0,0 +1,62 @@
+--- a/lfd_encrypt.c 2008-01-07 23:35:32.000000000 +0100
++++ b/lfd_encrypt.c 2010-09-18 04:53:31.000000000 +0200
+@@ -44,6 +44,7 @@
+ #include <strings.h>
+ #include <string.h>
+ #include <time.h>
++#include <arpa/inet.h> /* htonl() */
+
+ #include "vtun.h"
+ #include "linkfd.h"
+--- a/lib.c 2008-01-07 23:35:40.000000000 +0100
++++ b/lib.c 2010-09-18 04:52:51.000000000 +0200
+@@ -34,6 +34,7 @@
+ #include <sys/wait.h>
+ #include <syslog.h>
+ #include <errno.h>
++#include <time.h> /* nanosleep() */
+
+ #include "vtun.h"
+ #include "linkfd.h"
+--- a/lib.h 2008-01-07 23:35:41.000000000 +0100
++++ b/lib.h 2010-09-18 04:56:50.000000000 +0200
+@@ -26,6 +26,7 @@
+ #include <sys/types.h>
+ #include <signal.h>
+ #include <errno.h>
++#include <unistd.h> /* read(), write() */
+
+ #ifdef HAVE_LIBUTIL_H
+ #include <libutil.h>
+--- a/vtun.h 2008-01-07 23:36:07.000000000 +0100
++++ b/vtun.h 2010-09-18 04:56:08.000000000 +0200
+@@ -232,5 +232,9 @@
+ int read_config(char *file);
+ struct vtun_host * find_host(char *host);
+ inline void clear_nat_hack_flags(int svr);
++int send_msg(int len, char *in, char **out);
++int send_ib_mesg(int *len, char **in);
++int recv_msg(int len, char *in, char **out);
++int recv_ib_mesg(int *len, char **in);
+
+ #endif
+--- a/lock.c 2008-01-07 23:35:50.000000000 +0100
++++ b/lock.c 2010-09-18 05:01:21.000000000 +0200
+@@ -32,6 +32,7 @@
+ #include <sys/types.h>
+ #include <signal.h>
+ #include <errno.h>
++#include <time.h> /* nanosleep() */
+
+ #include "vtun.h"
+ #include "linkfd.h"
+--- a/lfd_shaper.c 2008-01-07 23:35:36.000000000 +0100
++++ b/lfd_shaper.c 2010-09-18 05:07:12.000000000 +0200
+@@ -27,6 +27,7 @@
+ #include <stdlib.h>
+ #include <sys/time.h>
+ #include <syslog.h>
++#include <time.h> /* nanosleep() */
+
+ #include "vtun.h"
+ #include "linkfd.h"
diff --git a/net-misc/vtun/files/vtun.rc b/net-misc/vtun/files/vtun.rc
new file mode 100644
index 000000000000..df5450fd0af7
--- /dev/null
+++ b/net-misc/vtun/files/vtun.rc
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ IFS=$'\n'
+ for line in `grep -v '^[[:space:]]*#' /etc/vtund-start.conf | grep -v '^[[:space:]]*$'`
+ do
+ echo $line |
+ (IFS=" "
+ read host server args
+ if [ "$host" = "--server--" ]; then
+ ebegin "Starting vtund server"
+ /usr/sbin/vtund -s -P $server $args
+ eend $?
+ else
+ ebegin "Starting vtund client $host to $server"
+ /usr/sbin/vtund $args -- $host $server
+ eend $?
+ fi)
+ done
+}
+
+stop() {
+ ebegin "Stopping all vtund servers and clients"
+ killall vtund
+ eend $?
+}
diff --git a/net-misc/vtun/files/vtund-start.conf b/net-misc/vtun/files/vtund-start.conf
new file mode 100644
index 000000000000..01de38322f48
--- /dev/null
+++ b/net-misc/vtun/files/vtund-start.conf
@@ -0,0 +1,33 @@
+### this file defines whether vtund is run as a client or a server
+###
+### format is "[host] [server] <args>" or "--server-- [portnumber] <args>".
+###
+### [host] is the hostname to use as a client
+###
+### [server] is the server to connect to
+###
+### [args] is optional for both server and client and contains any additional
+### command line args for that instance of vtund. not needed by most people.
+###
+### --server-- is the literal string '--server--'. nothing more, nothing less.
+###
+### [portnumber] is the port number to run the server on.
+###
+###
+### you can have more than one client "host server" line if required,
+### and in theory, it should be possible to run as both a client and a
+### server simultaneously, but i haven't tested that.
+
+
+### examples:
+
+### to run as a client using hostname 'viper'.
+#viper vtun-server.somewhere.com.au
+
+### to run a persistent client connection using hostname 'viper'
+### connecting to a server on port 6000 and using /etc/vtun.viper.conf
+### as the config file.
+#viper vtun-server.somewhere.com.au -f /etc/vtun.viper.conf -s -P 6000
+
+### to run vtund as a server on port 5000, uncomment the following line:
+#--server-- 5000
diff --git a/net-misc/vtun/metadata.xml b/net-misc/vtun/metadata.xml
new file mode 100644
index 000000000000..433c591e0a01
--- /dev/null
+++ b/net-misc/vtun/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>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">vtun</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/vtun/vtun-3.0.2-r2.ebuild b/net-misc/vtun/vtun-3.0.2-r2.ebuild
new file mode 100644
index 000000000000..b9f147296efc
--- /dev/null
+++ b/net-misc/vtun/vtun-3.0.2-r2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils linux-info
+
+DESCRIPTION="Create virtual tunnels over TCP/IP networks with traffic shaping, encryption, and compression"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+HOMEPAGE="http://vtun.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ppc ~sparc x86"
+IUSE="lzo socks5 ssl zlib"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ lzo? ( dev-libs/lzo:2 )
+ zlib? ( sys-libs/zlib )
+ socks5? ( net-proxy/dante )"
+DEPEND="${RDEPEND}
+ sys-devel/bison"
+
+DOCS="ChangeLog Credits FAQ README README.Setup README.Shaper TODO"
+
+CONFIG_CHECK="~TUN"
+
+src_prepare() {
+ sed -i Makefile.in \
+ -e '/^LDFLAGS/s|=|+=|g' \
+ || die "sed Makefile"
+ epatch "${FILESDIR}"/${P}-includes.patch
+ # remove unneeded checking for /etc/vtund.conf
+ epatch "${FILESDIR}"/${P}-remove-config-presence-check.patch
+ # fix build racing condition with bison and lex files, wrt bug #364923
+ epatch "${FILESDIR}"/${P}-build-racing-condition-fix.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable ssl) \
+ $(use_enable zlib) \
+ $(use_enable lzo) \
+ $(use_enable socks5 socks) \
+ --enable-shaper
+}
+
+src_install() {
+ default
+ newinitd "${FILESDIR}"/vtun.rc vtun
+ insinto etc
+ doins "${FILESDIR}"/vtund-start.conf
+}
diff --git a/net-misc/vtun/vtun-3.0.3.ebuild b/net-misc/vtun/vtun-3.0.3.ebuild
new file mode 100644
index 000000000000..67921500af5a
--- /dev/null
+++ b/net-misc/vtun/vtun-3.0.3.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils linux-info
+
+DESCRIPTION="Create virtual tunnels over TCP/IP networks with traffic shaping, encryption, and compression"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+HOMEPAGE="http://vtun.sourceforge.net/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ppc ~sparc x86"
+IUSE="lzo socks5 ssl zlib"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ lzo? ( dev-libs/lzo:2 )
+ zlib? ( sys-libs/zlib )
+ socks5? ( net-proxy/dante )"
+DEPEND="${RDEPEND}
+ sys-devel/bison"
+
+DOCS="ChangeLog Credits FAQ README README.Setup README.Shaper TODO"
+
+CONFIG_CHECK="~TUN"
+
+src_prepare() {
+ sed -i Makefile.in \
+ -e '/^LDFLAGS/s|=|+=|g' \
+ || die "sed Makefile"
+ epatch "${FILESDIR}"/${P}-includes.patch
+ # remove unneeded checking for /etc/vtund.conf
+ epatch "${FILESDIR}"/${PN}-3.0.2-remove-config-presence-check.patch
+ # portage takes care about striping binaries itself
+ sed -i 's:$(BIN_DIR)/strip $(DESTDIR)$(SBIN_DIR)/vtund::' Makefile.in
+}
+
+src_configure() {
+ econf \
+ $(use_enable ssl) \
+ $(use_enable zlib) \
+ $(use_enable lzo) \
+ $(use_enable socks5 socks) \
+ --enable-shaper
+}
+
+src_install() {
+ default
+ newinitd "${FILESDIR}"/vtun.rc vtun
+ insinto etc
+ doins "${FILESDIR}"/vtund-start.conf
+}
diff --git a/net-misc/wakeonlan/Manifest b/net-misc/wakeonlan/Manifest
new file mode 100644
index 000000000000..5d66fc47e588
--- /dev/null
+++ b/net-misc/wakeonlan/Manifest
@@ -0,0 +1 @@
+DIST wakeonlan-0.41.tar.gz 6028 SHA256 581b1b27a7e810ab72668cce4bd9aa9b3e0cea34b2db24dd1a44c09d63ddda98 SHA512 192ed2ad157e3f5af01632b8f2b727e232448e5a9bff6aec25298fa9913ec38f1036b665b141b5299994c88b1941d9896b6eaa92cfdb44d65db3628f50e3824f WHIRLPOOL ac27332a74a2327dc33914c7e4adaffefcc064a5667baa95ac8e43fffc59b4d2917916c073e93bfcfeb23e5141047b032d3f87b8800e9fba81d956e6f40eef46
diff --git a/net-misc/wakeonlan/files/wakeonlan-0.41-ethers-lookup.patch b/net-misc/wakeonlan/files/wakeonlan-0.41-ethers-lookup.patch
new file mode 100644
index 000000000000..6cbc355e2854
--- /dev/null
+++ b/net-misc/wakeonlan/files/wakeonlan-0.41-ethers-lookup.patch
@@ -0,0 +1,90 @@
+--- wakeonlan-0.41.orig/wakeonlan
++++ wakeonlan-0.41/wakeonlan
+@@ -5,6 +5,7 @@
+ #########################################################################
+
+ use strict;
++use Net::hostent;
+ use Socket;
+ use Getopt::Std;
+ use vars qw($VERSION $opt_v $opt_h $opt_i $opt_p $opt_f);
+@@ -44,19 +45,64 @@
+
+ sub wake
+ {
+- my $hwaddr = shift;
++ my $host = shift;
+ my $ipaddr = shift || $DEFAULT_IP;
+ my $port = shift || $DEFAULT_PORT;
+
+ my ($raddr, $them, $proto);
+- my ($hwaddr_re, $pkt);
++ my ($hwaddr, $hwaddr_re, $pkt);
+
+- # Validate hardware address (ethernet address)
++ # get the hardware address (ethernet address)
+
+ $hwaddr_re = join(':', ('[0-9A-Fa-f]{1,2}') x 6);
+- if ($hwaddr !~ m/^$hwaddr_re$/) {
+- warn "Invalid hardware address: $hwaddr\n";
+- return undef;
++ if ($host =~ m/^$hwaddr_re$/) {
++ $hwaddr = $host;
++ } else {
++ # $host is not a hardware address, try to resolve it
++ my $ip_re = join('\.', ('([0-9]|[1-9][0-9]|1[0-9]{2}|2([0-4][0-9]|5[0-5]))') x 4);
++ my $ip_addr;
++ if ($host =~ m/^$ip_re$/) {
++ $ip_addr = $host;
++ } else {
++ my $h;
++ unless ($h = gethost($host)) {
++ warn "$host is not a hardware address and I could not resolve it as to an IP address.\n";
++ return undef;
++ }
++ $ip_addr = inet_ntoa($h->addr);
++ }
++ # look up ip in /etc/ethers
++ unless (open (ETHERS, '<', '/etc/ethers')) {
++ warn "$host is not a hardware address and I could not open /etc/ethers.\n";
++ return undef;
++ }
++ while (<ETHERS>) {
++ if (($_ !~ m/^$/) && ($_ !~ m/^#/)) { # ignore comments
++ my ($mac, $ip);
++ ($mac, $ip) = split(' ', $_, 3);
++ if ($ip =~ m/^$ip$/) {
++ if ($ip eq $ip_addr) {
++ $hwaddr = $mac;
++ last;
++ }
++ next;
++ } else {
++ my $h2;
++ unless ($h2 = gethost($ip)) {
++ next;
++ }
++ if (inet_ntoa($h2->addr) eq $ip_addr) {
++ $hwaddr = $mac;
++ last;
++ }
++ }
++ }
++ }
++ close (ETHERS);
++ unless (defined($hwaddr)) {
++ warn "Could not find $host in /etc/ethers\n";
++ return undef;
++ }
+ }
+
+ # Generate magic sequence
+@@ -68,7 +114,7 @@
+
+ # Allocate socket and send packet
+
+- $raddr = gethostbyname($ipaddr);
++ $raddr = gethostbyname($ipaddr)->addr;
+ $them = pack_sockaddr_in($port, $raddr);
+ $proto = getprotobyname('udp');
+
diff --git a/net-misc/wakeonlan/metadata.xml b/net-misc/wakeonlan/metadata.xml
new file mode 100644
index 000000000000..0f0ffc8cb814
--- /dev/null
+++ b/net-misc/wakeonlan/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>axs@gentoo.org</email>
+ <name>Ian Stakenvicius</name>
+ <description>Primary maintainer</description>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/wakeonlan/wakeonlan-0.41-r2.ebuild b/net-misc/wakeonlan/wakeonlan-0.41-r2.ebuild
new file mode 100644
index 000000000000..16ee02d1dc71
--- /dev/null
+++ b/net-misc/wakeonlan/wakeonlan-0.41-r2.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils perl-app
+
+DESCRIPTION="Client for Wake-On-LAN"
+HOMEPAGE="http://gsd.di.uminho.pt/jpo/software/wakeonlan/"
+SRC_URI="http://gsd.di.uminho.pt/jpo/software/wakeonlan/downloads/${P}.tar.gz"
+
+LICENSE="Artistic GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ppc sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux"
+IUSE=""
+
+DEPEND="virtual/perl-ExtUtils-MakeMaker"
+
+src_prepare() {
+ epatch "${FILESDIR}"/"${P}"-ethers-lookup.patch
+}
+
+src_install() {
+ perl-module_src_install
+ dodoc examples/lab001.wol
+}
diff --git a/net-misc/wget/Manifest b/net-misc/wget/Manifest
new file mode 100644
index 000000000000..88ff133fdd84
--- /dev/null
+++ b/net-misc/wget/Manifest
@@ -0,0 +1,4 @@
+DIST wget-1.16.1.tar.xz 1760120 SHA256 2b96c707ee15fe847f5bc2f872a7a530dca803b927a750419b44f50803e14d33 SHA512 28f69b2037bb3ea34b109bb20d99da7056e025dd9cce18a74cde2ffcc61933625b643673c76a7ba59b42d7e029898774da2d8af0fdbca3cffd5e4434c30e339a WHIRLPOOL a5ed1b7515acbfb33390c575588f8f476bf537eb90ebaaeb2b880e1962f15a6992eb7aa4a977b554fc6e34d384569f132760df7df9c48007e369e9773ceda696
+DIST wget-1.16.2.tar.xz 1805080 SHA256 a7dfde1bcb0eb135addf587a649fd0e47c1a876edef359b9197cdffd1fdcd7d5 SHA512 ec99606577afb131fa1eb3c286a3dd9dccea689bf5c83df8303b1130ed569934ca27f8c517a06f9e2be456c020480842cbf8eebe97285890e46dca60158f3c12 WHIRLPOOL 2b174aa4223d3f3ff64366b96ed5f725e4c4a1c96f2aa01ab4ee0eac702a600869a71636a1860bd9ebca6fad5e0c16164280ca202f92254b6b5052a10bdf0fb7
+DIST wget-1.16.3.tar.xz 1794148 SHA256 67f7b7b0f5c14db633e3b18f53172786c001e153d545cfc85d82759c5c2ffb37 SHA512 2d1fe632bcd116a68ae333278e368cb810081b51d2259ddade602bebf3dd08dee1f51f67c9c7d79d2410e19fe0d48a0b9a1b1a7c7c6eeb47e2840ce6c1a3471c WHIRLPOOL b8fe9880523fc295b092c3b9ff4f9af58c071f55d516903ded66df67722cd27955ad651f6f2f6032b611e5445dd89b8ff97878443abc04d095c29e76f0564490
+DIST wget-1.16.tar.xz 1697308 SHA256 9261dd090a17687b6dc0682a257e90a926def15624b650e8f799af57e5c8b0e7 SHA512 20f1247a344cac8f9120a506a4ca1fff84e5f3f5abb8492f67c22d213cb41cbfa24d5a68b91512a6ca42765d319bea8785adff8fad58d854f8f563c6593b4298 WHIRLPOOL a1094b27f77547baf7dac6f1a6ded691b3a043caff948e8fd84555a730d6a02ae157f4d72144f3c1672439166da28a4cca26f9c4f7ec4473603899545cc956b4
diff --git a/net-misc/wget/files/wget-1.13.4-openssl-pkg-config.patch b/net-misc/wget/files/wget-1.13.4-openssl-pkg-config.patch
new file mode 100644
index 000000000000..97037cee724a
--- /dev/null
+++ b/net-misc/wget/files/wget-1.13.4-openssl-pkg-config.patch
@@ -0,0 +1,31 @@
+detect openssl via pkg-config if it's available
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -234,7 +234,17 @@ dnl
+ dnl Checks for libraries.
+ dnl
+
++PKG_PROG_PKG_CONFIG
++
+ AS_IF([test x"$with_ssl" = xopenssl], [
++ PKG_CHECK_MODULES([OPENSSL], [openssl], [
++ AC_MSG_NOTICE([compiling in support for SSL via OpenSSL])
++ AC_LIBOBJ([openssl])
++ LIBS="$OPENSSL_LIBS $LIBS"
++ CFLAGS="$OPENSSL_CFLAGS -DHAVE_LIBSSL $CFLAGS"
++ LIBSSL=" " # ntlm check below wants this #395349
++ ], [
++
+ dnl some versions of openssl use zlib compression
+ AC_CHECK_LIB(z, compress)
+
+@@ -294,6 +303,8 @@ AS_IF([test x$ssl_found != xyes],
+
+ ])
+
++])
++
+ ], [
+ # --with-ssl is not gnutls: check if it's no
+ AS_IF([test x"$with_ssl" != xno], [
diff --git a/net-misc/wget/files/wget-1.14-gnutls-ssl.patch b/net-misc/wget/files/wget-1.14-gnutls-ssl.patch
new file mode 100644
index 000000000000..8d5fe81e1b55
--- /dev/null
+++ b/net-misc/wget/files/wget-1.14-gnutls-ssl.patch
@@ -0,0 +1,68 @@
+https://bugs.gentoo.org/479948
+
+From ae80fd2ec75fafdbec9895b9d973f2966209d588 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@hush.com>
+Date: Sun, 5 May 2013 07:16:58 +0200
+Subject: [PATCH] gnutls: do not abort on non-fatal alerts during handshake
+
+Signed-off-by: mancha <mancha1@hush.com>
+---
+ src/ChangeLog | 6 ++++++
+ src/gnutls.c | 25 ++++++++++++++++++++++---
+ 2 files changed, 28 insertions(+), 3 deletions(-)
+
+2013-05-05 mancha <mancha1@hush.com> (tiny change)
+
+ * gnutls.c (ssl_connect_wget): Don't abort on non-fatal alerts
+ received during handshake. For example, when connecting to servers
+ using TSL-SNI that send warning-level unrecognized_name alerts.
+
+diff --git a/src/gnutls.c b/src/gnutls.c
+index 769b005..54422fc 100644
+--- a/src/gnutls.c
++++ b/src/gnutls.c
+@@ -376,8 +376,9 @@ ssl_connect_wget (int fd, const char *hostname)
+ {
+ struct wgnutls_transport_context *ctx;
+ gnutls_session_t session;
+- int err;
++ int err,alert;
+ gnutls_init (&session, GNUTLS_CLIENT);
++ const char *str;
+
+ /* We set the server name but only if it's not an IP address. */
+ if (! is_valid_ip_address (hostname))
+@@ -440,10 +441,28 @@ ssl_connect_wget (int fd, const char *hostname)
+ return false;
+ }
+
+- err = gnutls_handshake (session);
++ /* We don't stop the handshake process for non-fatal errors */
++ do
++ {
++ err = gnutls_handshake (session);
++ if (err < 0)
++ {
++ logprintf (LOG_NOTQUIET, "GnuTLS: %s\n", gnutls_strerror (err));
++ if (err == GNUTLS_E_WARNING_ALERT_RECEIVED ||
++ err == GNUTLS_E_FATAL_ALERT_RECEIVED)
++ {
++ alert = gnutls_alert_get (session);
++ str = gnutls_alert_get_name (alert);
++ if (str == NULL)
++ str = "(unknown)";
++ logprintf (LOG_NOTQUIET, "GnuTLS: received alert [%d]: %s\n", alert, str);
++ }
++ }
++ }
++ while (err == GNUTLS_E_WARNING_ALERT_RECEIVED && gnutls_error_is_fatal (err) == 0);
++
+ if (err < 0)
+ {
+- logprintf (LOG_NOTQUIET, "GnuTLS: %s\n", gnutls_strerror (err));
+ gnutls_deinit (session);
+ return false;
+ }
+--
+1.8.4.3
+
diff --git a/net-misc/wget/files/wget-1.14-pkg-config.patch b/net-misc/wget/files/wget-1.14-pkg-config.patch
new file mode 100644
index 000000000000..ea6364bf3ae1
--- /dev/null
+++ b/net-misc/wget/files/wget-1.14-pkg-config.patch
@@ -0,0 +1,200 @@
+From b97942cd6b496501b396ea3bc2710010f4591542 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 21 May 2012 18:39:59 -0400
+Subject: [PATCH] detect openssl/pcre/libuuid/zlib via pkg-config if it's
+ available
+
+Newer versions of these packages ship with pkg-config files, so if we can
+detect it via those, do so. If that fails, fall back to the old methods.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ configure.ac | 110 ++++++++++++++++++++++++++++++++++++++---------------------
+ 1 file changed, 71 insertions(+), 39 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 873c3c9..779ff39 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -68,6 +68,9 @@ AC_ARG_WITH(ssl,
+ AC_ARG_WITH(zlib,
+ [[ --without-zlib disable zlib ]])
+
++AC_ARG_ENABLE(pcre, AC_HELP_STRING([--disable-pcre],
++ [Disable PCRE style regular expressions]))
++
+ AC_ARG_ENABLE(opie,
+ [ --disable-opie disable support for opie or s/key FTP login],
+ ENABLE_OPIE=$enableval, ENABLE_OPIE=yes)
+@@ -237,11 +240,25 @@ dnl
+ dnl Checks for libraries.
+ dnl
+
++PKG_PROG_PKG_CONFIG
++
+ AS_IF([test x"$with_zlib" != xno], [
+- AC_CHECK_LIB(z, compress)
++ PKG_CHECK_MODULES([ZLIB], zlib, [
++ LIBS="$ZLIB_LIBS $LIBS"
++ CFLAGS="$ZLIB_CFLAGS $CFLAGS"
++ ], [
++ AC_CHECK_LIB(z, compress)
++ ])
+ ])
+
+ AS_IF([test x"$with_ssl" = xopenssl], [
++ PKG_CHECK_MODULES([OPENSSL], [openssl], [
++ AC_MSG_NOTICE([compiling in support for SSL via OpenSSL])
++ AC_LIBOBJ([openssl])
++ LIBS="$OPENSSL_LIBS $LIBS"
++ CFLAGS="$OPENSSL_CFLAGS -DHAVE_LIBSSL $CFLAGS"
++ LIBSSL=" " # ntlm check below wants this
++ ], [
+ dnl some versions of openssl use zlib compression
+ AC_CHECK_LIB(z, compress)
+
+@@ -278,29 +295,29 @@ AS_IF([test x"$with_ssl" = xopenssl], [
+ ;;
+ esac
+
+-AS_IF([test x$ssl_found != xyes],
+-[
+- dnl Now actually check for -lssl if it wasn't already found
+- AC_LIB_HAVE_LINKFLAGS([ssl], [crypto z], [
+- #include <openssl/ssl.h>
+- #include <openssl/x509.h>
+- #include <openssl/err.h>
+- #include <openssl/rand.h>
+- #include <openssl/des.h>
+- #include <openssl/md4.h>
+- #include <openssl/md5.h>
+- ], [SSL_library_init ()])
+- if test x"$LIBSSL" != x
+- then
+- ssl_found=yes
+- AC_MSG_NOTICE([compiling in support for SSL via OpenSSL])
+- AC_LIBOBJ([openssl])
+- LIBS="$LIBSSL $LIBS"
+- elif test x"$with_ssl" != x
+- then
+- AC_MSG_ERROR([--with-ssl=openssl was given, but SSL is not available.])
+- fi
+-])
++ AS_IF([test x$ssl_found != xyes], [
++ dnl Now actually check for -lssl if it wasn't already found
++ AC_LIB_HAVE_LINKFLAGS([ssl], [crypto z], [
++#include <openssl/ssl.h>
++#include <openssl/x509.h>
++#include <openssl/err.h>
++#include <openssl/rand.h>
++#include <openssl/des.h>
++#include <openssl/md4.h>
++#include <openssl/md5.h>
++ ], [SSL_library_init ()])
++ if test x"$LIBSSL" != x
++ then
++ ssl_found=yes
++ AC_MSG_NOTICE([compiling in support for SSL via OpenSSL])
++ AC_LIBOBJ([openssl])
++ LIBS="$LIBSSL $LIBS"
++ elif test x"$with_ssl" != x
++ then
++ AC_MSG_ERROR([--with-ssl=openssl was given, but SSL is not available.])
++ fi
++ ])
++ ])
+
+ ], [
+ # --with-ssl is not gnutls: check if it's no
+@@ -322,13 +322,20 @@ AS_IF([test x"$with_ssl" = xopenssl], [
+ ], [
+ # --with-ssl is not gnutls: check if it's no
+ AS_IF([test x"$with_ssl" != xno], [
+- dnl Now actually check for -lssl
++ dnl Now actually check for gnutls
+
++ PKG_CHECK_MODULES([GNUTLS], [gnutls], [
++ AC_MSG_NOTICE([compiling in support for SSL via GnuTLS])
++ AC_LIBOBJ([gnutls])
++ LIBS="$GNUTLS_LIBS $LIBS"
++ CFLAGS="$GNUTLS_CFLAGS -DHAVE_LIBGNUTLS $CFLAGS"
++ ], [
++
++ dnl Now actually check for -lgnutls
+ AC_CHECK_LIB(z, compress)
+ AC_CHECK_LIB(gpg-error, gpg_err_init)
+ AC_CHECK_LIB(gcrypt, gcry_control)
+
+- dnl Now actually check for -lssl
+ AC_LIB_HAVE_LINKFLAGS([gnutls], [], [
+ #include <gnutls/gnutls.h>
+ ], [gnutls_global_init()])
+@@ -342,6 +349,8 @@ AS_IF([test x"$with_ssl" = xopenssl], [
+ AC_MSG_ERROR([--with-ssl was given, but GNUTLS is not available.])
+ fi
+
++ ])
++
+ AC_CHECK_FUNCS(gnutls_priority_set_direct)
+ ]) # endif: --with-ssl == no?
+ ]) # endif: --with-ssl == openssl?
+@@ -524,26 +541,41 @@ dnl
+ dnl Check for UUID
+ dnl
+
+-AC_CHECK_HEADER(uuid/uuid.h,
+- AC_CHECK_LIB(uuid, uuid_generate,
+- [LIBS="${LIBS} -luuid"
+- AC_DEFINE([HAVE_LIBUUID], 1,
+- [Define if libuuid is available.])
+- ])
+-)
++AC_ARG_WITH(libuuid, AC_HELP_STRING([--without-libuuid],
++ [Generate UUIDs for WARC files via libuuid]))
++AS_IF([test "X$with_libuuid" != "Xno"],[
++ PKG_CHECK_MODULES([UUID], uuid, [
++ LIBS="$UUID_LIBS $LIBS"
++ CFLAGS="$UUID_CFLAGS $CFLAGS"
++ ], [
++ AC_CHECK_HEADER(uuid/uuid.h,
++ AC_CHECK_LIB(uuid, uuid_generate,
++ [LIBS="${LIBS} -luuid"
++ AC_DEFINE([HAVE_LIBUUID], 1,
++ [Define if libuuid is available.])
++ ])
++ )
++ ])
++])
+
+ dnl
+ dnl Check for PCRE
+ dnl
+
+-AC_CHECK_HEADER(pcre.h,
+- AC_CHECK_LIB(pcre, pcre_compile,
+- [LIBS="${LIBS} -lpcre"
+- AC_DEFINE([HAVE_LIBPCRE], 1,
+- [Define if libpcre is available.])
+- ])
+-)
+-
++AS_IF([test "X$enable_pcre" != "Xno"],[
++ PKG_CHECK_MODULES([PCRE], libpcre, [
++ LIBS="$PCRE_LIBS $LIBS"
++ CFLAGS="$PCRE_CFLAGS $CFLAGS"
++ ], [
++ AC_CHECK_HEADER(pcre.h,
++ AC_CHECK_LIB(pcre, pcre_compile,
++ [LIBS="${LIBS} -lpcre"
++ AC_DEFINE([HAVE_LIBPCRE], 1,
++ [Define if libpcre is available.])
++ ])
++ )
++ ])
++])
+
+ dnl Needed by src/Makefile.am
+ AM_CONDITIONAL([IRI_IS_ENABLED], [test "X$iri" != "Xno"])
+--
+1.8.4.3
+
diff --git a/net-misc/wget/files/wget-1.14-texi2pod.patch b/net-misc/wget/files/wget-1.14-texi2pod.patch
new file mode 100644
index 000000000000..700242bf4414
--- /dev/null
+++ b/net-misc/wget/files/wget-1.14-texi2pod.patch
@@ -0,0 +1,32 @@
+Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
+Date: 2013-06-18
+Initial Package Version: 1.14
+Upstream Status: Submitted
+Origin: Arch
+Description: Build with perl-5.18.
+
+http://lists.gnu.org/archive/html/bug-wget/2013-06/msg00046.html
+
+From 2ed1707b5d8be66feb80cccfe8e11e719b52b99a Mon Sep 17 00:00:00 2001
+From: Dave Reisner <dreisner@archlinux.org>
+Date: Mon, 17 Jun 2013 23:31:46 +0530
+Subject: [PATCH] Fix error in texi2pod intriduced with Perl 5.18
+
+---
+
+diff --git a/doc/texi2pod.pl b/doc/texi2pod.pl
+index 86c4b18..9db6de1 100755
+--- a/doc/texi2pod.pl
++++ b/doc/texi2pod.pl
+@@ -291,7 +291,7 @@ while(<$inf>) {
+ if (defined $1) {
+ my $thing = $1;
+ if ($ic =~ /\@asis/) {
+- $_ = "\n=item $thing\n";
++ $_ = "\n=item C<$thing>\n";
+ } else {
+ # Entity escapes prevent munging by the <> processing below.
+ $_ = "\n=item $ic\&LT;$thing\&GT;\n";
+--
+1.8.3.1
+
diff --git a/net-misc/wget/files/wget-1.14-wgetrc.patch b/net-misc/wget/files/wget-1.14-wgetrc.patch
new file mode 100644
index 000000000000..8252aca4273c
--- /dev/null
+++ b/net-misc/wget/files/wget-1.14-wgetrc.patch
@@ -0,0 +1,31 @@
+link to the man manual pages
+
+document user agent issue vs portage fetching
+https://bugs.gentoo.org/327229
+
+--- a/doc/sample.wgetrc
++++ b/doc/sample.wgetrc
+@@ -5,7 +5,10 @@
+ ## You can use this file to change the default behaviour of wget or to
+ ## avoid having to type many many command-line options. This file does
+ ## not contain a comprehensive list of commands -- look at the manual
+-## to find out what you can put into this file.
++## to find out what you can put into this file. You can find this here:
++## $ info wget.info 'Startup File'
++## Or online here:
++## https://www.gnu.org/software/wget/manual/wget.html#Startup-File
+ ##
+ ## Wget initialization file can reside in /usr/local/etc/wgetrc
+ ## (global, for all users) or $HOME/.wgetrc (for a single user).
+@@ -14,6 +15,11 @@
+ ## as well as change them, in most cases, as the values on the
+ ## commented-out lines are the default values (e.g. "off").
+
++## You should not modify user_agent in the global config file. Instead,
++## keep that in your ~/.wgetrc file. If you really want to modify it
++## globally, make sure you set a custom FETCHCOMMAND in your package
++## manager because you will randomly break fetching with some servers.
++
+
+ ##
+ ## Global settings (useful for setting up in /usr/local/etc/wgetrc).
diff --git a/net-misc/wget/files/wget-1.15-pkg-config.patch b/net-misc/wget/files/wget-1.15-pkg-config.patch
new file mode 100644
index 000000000000..825ce1dacad8
--- /dev/null
+++ b/net-misc/wget/files/wget-1.15-pkg-config.patch
@@ -0,0 +1,190 @@
+From 5730efa0804468d342cb82d1ac9d5fc794ff572d Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Fri, 16 May 2014 11:29:53 +0200
+Subject: [PATCH] detect openssl/pcre/libuuid/zlib via pkg-config if it's
+ available
+
+Newer versions of these packages ship with pkg-config files, so if we can
+detect it via those, do so. If that fails, fall back to the old methods.
+
+Forward-ported to 1.15 release from b97942cd6b496501b396ea3bc2710010f4591542
+(Mon, 21 May 2012 18:39:59 -0400)
+
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ configure.ac | 107 ++++++++++++++++++++++++++++++++++++++++++-----------------
+ 1 file changed, 77 insertions(+), 30 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c5437bf..e0e2b25 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -68,6 +68,9 @@ AC_ARG_WITH(ssl,
+ AC_ARG_WITH(zlib,
+ [[ --without-zlib disable zlib ]])
+
++AC_ARG_ENABLE(pcre, AC_HELP_STRING([--disable-pcre],
++ [Disable PCRE style regular expressions]))
++
+ AC_ARG_ENABLE(opie,
+ [ --disable-opie disable support for opie or s/key FTP login],
+ ENABLE_OPIE=$enableval, ENABLE_OPIE=yes)
+@@ -237,12 +240,28 @@ dnl
+ dnl Checks for libraries.
+ dnl
+
++PKG_PROG_PKG_CONFIG
++
+ AS_IF([test x"$with_zlib" != xno], [
+ with_zlib=yes
+- AC_CHECK_LIB(z, compress)
++ PKG_CHECK_MODULES([ZLIB], zlib, [
++ LIBS="$ZLIB_LIBS $LIBS"
++ CFLAGS="$ZLIB_CFLAGS $CFLAGS"
++ AC_DEFINE([HAVE_LIBZ], [1], [Define if using zlib.])
++ ], [
++ AC_CHECK_LIB(z, compress)
++ ])
+ ])
+
+ AS_IF([test x"$with_ssl" = xopenssl], [
++ PKG_CHECK_MODULES([OPENSSL], [openssl], [
++ AC_MSG_NOTICE([compiling in support for SSL via OpenSSL])
++ AC_LIBOBJ([openssl])
++ LIBS="$OPENSSL_LIBS $LIBS"
++ CFLAGS="$OPENSSL_CFLAGS -DHAVE_LIBSSL $CFLAGS"
++ LIBSSL=" " # ntlm check below wants this
++ AC_DEFINE([HAVE_LIBSSL], [1], [Define if using openssl.])
++ ], [
+ dnl As of this writing (OpenSSL 0.9.6), the libcrypto shared library
+ dnl doesn't record its dependency on libdl, so we need to make sure
+ dnl -ldl ends up in LIBS on systems that have it. Most OSes use
+@@ -276,9 +295,9 @@ AS_IF([test x"$with_ssl" = xopenssl], [
+ ;;
+ esac
+
+- AS_IF([test x$ssl_found != xyes], [
+- dnl Now actually check for -lssl if it wasn't already found
+- AC_LIB_HAVE_LINKFLAGS([ssl], [crypto], [
++ AS_IF([test x$ssl_found != xyes], [
++ dnl Now actually check for -lssl if it wasn't already found
++ AC_LIB_HAVE_LINKFLAGS([ssl], [crypto], [
+ #include <openssl/ssl.h>
+ #include <openssl/x509.h>
+ #include <openssl/err.h>
+@@ -286,17 +305,18 @@ AS_IF([test x"$with_ssl" = xopenssl], [
+ #include <openssl/des.h>
+ #include <openssl/md4.h>
+ #include <openssl/md5.h>
+- ], [SSL_library_init ()])
+- if test x"$LIBSSL" != x
+- then
+- ssl_found=yes
+- AC_MSG_NOTICE([compiling in support for SSL via OpenSSL])
+- AC_LIBOBJ([openssl])
+- LIBS="$LIBSSL $LIBS"
+- elif test x"$with_ssl" != x
+- then
+- AC_MSG_ERROR([--with-ssl=openssl was given, but SSL is not available.])
+- fi
++ ], [SSL_library_init ()])
++ if test x"$LIBSSL" != x
++ then
++ ssl_found=yes
++ AC_MSG_NOTICE([compiling in support for SSL via OpenSSL])
++ AC_LIBOBJ([openssl])
++ LIBS="$LIBSSL $LIBS"
++ elif test x"$with_ssl" != x
++ then
++ AC_MSG_ERROR([--with-ssl=openssl was given, but SSL is not available.])
++ fi
++ ])
+ ])
+
+ ], [
+@@ -305,6 +325,14 @@ AS_IF([test x"$with_ssl" = xopenssl], [
+ dnl default is -lgnutls
+ with_ssl=gnutls
+
++ PKG_CHECK_MODULES([GNUTLS], [gnutls], [
++ AC_MSG_NOTICE([compiling in support for SSL via GnuTLS])
++ AC_LIBOBJ([gnutls])
++ LIBS="$GNUTLS_LIBS $LIBS"
++ CFLAGS="$GNUTLS_CFLAGS -DHAVE_LIBGNUTLS $CFLAGS"
++ AC_DEFINE([HAVE_LIBGNUTLS], [1], [Define if using gnutls.])
++ ], [
++
+ dnl Now actually check for -lgnutls
+ AC_LIB_HAVE_LINKFLAGS([gnutls], [], [
+ #include <gnutls/gnutls.h>
+@@ -319,6 +347,8 @@ AS_IF([test x"$with_ssl" = xopenssl], [
+ AC_MSG_ERROR([--with-ssl=gnutls was given, but GNUTLS is not available.])
+ fi
+
++ ])
++
+ AC_CHECK_FUNCS(gnutls_priority_set_direct)
+ ]) # endif: --with-ssl != no?
+ ]) # endif: --with-ssl == openssl?
+@@ -535,26 +565,43 @@ dnl
+ dnl Check for UUID
+ dnl
+
+-AC_CHECK_HEADER(uuid/uuid.h,
+- AC_CHECK_LIB(uuid, uuid_generate,
+- [LIBS="${LIBS} -luuid"
+- AC_DEFINE([HAVE_LIBUUID], 1,
+- [Define if libuuid is available.])
+- ])
+-)
++AC_ARG_WITH(libuuid, AC_HELP_STRING([--without-libuuid],
++ [Generate UUIDs for WARC files via libuuid]))
++AS_IF([test "X$with_libuuid" != "Xno"],[
++ PKG_CHECK_MODULES([UUID], uuid, [
++ LIBS="$UUID_LIBS $LIBS"
++ CFLAGS="$UUID_CFLAGS $CFLAGS"
++ AC_DEFINE([HAVE_LIBUUID], [1], [Define if using libuuid.])
++ ], [
++ AC_CHECK_HEADER(uuid/uuid.h,
++ AC_CHECK_LIB(uuid, uuid_generate,
++ [LIBS="${LIBS} -luuid"
++ AC_DEFINE([HAVE_LIBUUID], 1,
++ [Define if libuuid is available.])
++ ])
++ )
++ ])
++])
+
+ dnl
+ dnl Check for PCRE
+ dnl
+
+-AC_CHECK_HEADER(pcre.h,
+- AC_CHECK_LIB(pcre, pcre_compile,
+- [LIBS="${LIBS} -lpcre"
+- AC_DEFINE([HAVE_LIBPCRE], 1,
+- [Define if libpcre is available.])
+- ])
+-)
+-
++AS_IF([test "X$enable_pcre" != "Xno"],[
++ PKG_CHECK_MODULES([PCRE], libpcre, [
++ LIBS="$PCRE_LIBS $LIBS"
++ CFLAGS="$PCRE_CFLAGS $CFLAGS"
++ AC_DEFINE([HAVE_LIBPCRE], [1], [Define if using libpcre.])
++ ], [
++ AC_CHECK_HEADER(pcre.h,
++ AC_CHECK_LIB(pcre, pcre_compile,
++ [LIBS="${LIBS} -lpcre"
++ AC_DEFINE([HAVE_LIBPCRE], 1,
++ [Define if libpcre is available.])
++ ])
++ )
++ ])
++])
+
+ dnl Needed by src/Makefile.am
+ AM_CONDITIONAL([IRI_IS_ENABLED], [test "X$iri" != "Xno"])
+--
+1.9.3
+
diff --git a/net-misc/wget/files/wget-1.15-test_fix.patch b/net-misc/wget/files/wget-1.15-test_fix.patch
new file mode 100644
index 000000000000..754e44f2d92e
--- /dev/null
+++ b/net-misc/wget/files/wget-1.15-test_fix.patch
@@ -0,0 +1,26 @@
+From 3a47a1a918e9076133c046f8792cf68973f7c585 Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Wed, 22 Jan 2014 22:07:18 +0100
+Subject: [PATCH] Don't use --debug in Test--post-file.px
+
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ tests/Test--post-file.px | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/Test--post-file.px b/tests/Test--post-file.px
+index 1c017b7..1212af6 100755
+--- a/tests/Test--post-file.px
++++ b/tests/Test--post-file.px
+@@ -8,7 +8,7 @@ use HTTPTest;
+
+ ###############################################################################
+
+-my $cmdline = $WgetTest::WGETPATH . " -d --post-file=nofile http://localhost:{{port}}/";
++my $cmdline = $WgetTest::WGETPATH . " --post-file=nofile http://localhost:{{port}}/";
+
+ my $expected_error_code = 3;
+
+--
+1.8.5.3
+
diff --git a/net-misc/wget/files/wget-1.16-fix-proxy-test-race.patch b/net-misc/wget/files/wget-1.16-fix-proxy-test-race.patch
new file mode 100644
index 000000000000..8edafd2948b4
--- /dev/null
+++ b/net-misc/wget/files/wget-1.16-fix-proxy-test-race.patch
@@ -0,0 +1,96 @@
+From 3eff3ad69a46364475e1f4abdf9412cfa87e3d6c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de>
+Date: Tue, 28 Oct 2014 11:40:34 +0100
+Subject: [PATCH] synchronize client and server in Test-proxied-https-auth.px
+
+---
+ tests/ChangeLog | 4 ++++
+ tests/Test-proxied-https-auth.px | 36 +++++++++++++++++++++++++-----------
+ 2 files changed, 29 insertions(+), 11 deletions(-)
+
+2014-10-28 Tim Ruehsen <tim.ruehsen@gmx.de>
+
+ * tests/Test-proxied-https-auth.px: synchronize client and server
+
+diff --git a/tests/Test-proxied-https-auth.px b/tests/Test-proxied-https-auth.px
+index cc987ff..272003f 100755
+--- a/tests/Test-proxied-https-auth.px
++++ b/tests/Test-proxied-https-auth.px
+@@ -49,12 +49,15 @@ sub get_request {
+ }
+
+ sub do_server {
++ my ($synch_callback) = @_;
+ my $alrm = alarm 10;
+-
+ my $s = $SOCKET;
+ my $conn;
+ my $rqst;
+ my $rspn;
++
++ $synch_callback->();
++
+ for my $expect_inner_auth (0, 1) {
+ $conn = $s->accept;
+ $rqst = $conn->get_request;
+@@ -90,7 +93,7 @@ sub do_server {
+ Connection => 'close'
+ ]);
+ $rspn->protocol('HTTP/1.0');
+- print $rspn->as_string;
++ print STDERR $rspn->as_string;
+ print $conn $rspn->as_string;
+ } else {
+ die "No proxied auth\n" unless $rqst->header('Authorization');
+@@ -100,9 +103,9 @@ sub do_server {
+ 'Connection' => 'close',
+ ], "foobarbaz\n");
+ $rspn->protocol('HTTP/1.0');
+- print "=====\n";
+- print $rspn->as_string;
+- print "\n=====\n";
++ print STDERR "=====\n";
++ print STDERR $rspn->as_string;
++ print STDERR "\n=====\n";
+ print $conn $rspn->as_string;
+ }
+ $conn->close;
+@@ -113,18 +116,29 @@ sub do_server {
+ }
+
+ sub fork_server {
+- my $pid = fork;
+- die "Couldn't fork" if ($pid < 0);
+- return $pid if $pid;
++ pipe(FROM_CHILD, TO_PARENT) or die "Cannot create pipe!";
++ select((select(TO_PARENT), $| = 1)[0]);
++
++ my $pid = fork();
++ if ($pid < 0) {
++ die "Cannot fork";
++ } elsif ($pid == 0) {
++ # child
++ close FROM_CHILD;
++ do_server(sub { print TO_PARENT "SYNC\n"; close TO_PARENT });
++ } else {
++ # parent
++ close TO_PARENT;
++ chomp(my $line = <FROM_CHILD>);
++ close FROM_CHILD;
++ }
+
+- &do_server;
+- exit;
++ return $pid;
+ }
+
+ system ('rm -f needs-auth.txt');
+ my $pid = &fork_server;
+
+-sleep 1;
+ my $cmdline = $WgetTest::WGETPATH . " --user=fiddle-dee-dee"
+ . " --password=Dodgson -e https_proxy=localhost:{{port}}"
+ . " --no-check-certificate"
+--
+2.1.2
+
diff --git a/net-misc/wget/files/wget-1.16-openssl-header.patch b/net-misc/wget/files/wget-1.16-openssl-header.patch
new file mode 100644
index 000000000000..8df01c132454
--- /dev/null
+++ b/net-misc/wget/files/wget-1.16-openssl-header.patch
@@ -0,0 +1,31 @@
+From 1b5928e14fe5f40b2c8396fc622317790c9a368f Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 27 Oct 2014 14:39:41 -0400
+Subject: [PATCH] openssl: fix implicit decl warning
+
+Include the right header to fix:
+
+openssl.c: In function 'ssl_init':
+openssl.c:195:3: warning: implicit declaration of function
+ 'ENGINE_load_builtin_engines' [-Wimplicit-function-declaration]
+ ENGINE_load_builtin_engines();
+ ^
+---
+ src/openssl.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/openssl.c b/src/openssl.c
+index e24954a..2a3e0d6 100644
+--- a/src/openssl.c
++++ b/src/openssl.c
+@@ -42,6 +42,7 @@ as that of the covered work. */
+ #include <openssl/rand.h>
+ #if OPENSSL_VERSION_NUMBER >= 0x00907000
+ #include <openssl/conf.h>
++#include <openssl/engine.h>
+ #endif
+
+ #include "utils.h"
+--
+2.1.2
+
diff --git a/net-misc/wget/files/wget-1.16-openssl-no-ssl3.patch b/net-misc/wget/files/wget-1.16-openssl-no-ssl3.patch
new file mode 100644
index 000000000000..641ea068c63f
--- /dev/null
+++ b/net-misc/wget/files/wget-1.16-openssl-no-ssl3.patch
@@ -0,0 +1,34 @@
+From c81e3df2bc4d06835791427d888d4ae04a2384bc Mon Sep 17 00:00:00 2001
+From: Peter Meiser <meiser@gmx-topmail.de>
+Date: Wed, 29 Oct 2014 19:26:28 +0100
+Subject: [PATCH] Add guard for OpenSSL without SSLv3
+
+---
+ src/ChangeLog | 5 +++++
+ src/openssl.c | 2 ++
+ 2 files changed, 7 insertions(+)
+
+2014-10-29 Peter Meiser <meiser@gmx-topmail.de> (tiny change)
+
+ * openssl.c (ssl_init) [! OPENSSL_NO_SSL3]: Add guard for OpenSSL
+ without SSLv3.
+
+diff --git a/src/openssl.c b/src/openssl.c
+index e24954a..6f11650 100644
+--- a/src/openssl.c
++++ b/src/openssl.c
+@@ -208,9 +208,11 @@ ssl_init (void)
+ meth = SSLv2_client_method ();
+ break;
+ #endif
++#ifndef OPENSSL_NO_SSL3
+ case secure_protocol_sslv3:
+ meth = SSLv3_client_method ();
+ break;
++#endif
+ case secure_protocol_auto:
+ case secure_protocol_pfs:
+ case secure_protocol_tlsv1:
+--
+2.1.2
+
diff --git a/net-misc/wget/files/wget-1.16-pkg-config.patch b/net-misc/wget/files/wget-1.16-pkg-config.patch
new file mode 100644
index 000000000000..0b8803bd2971
--- /dev/null
+++ b/net-misc/wget/files/wget-1.16-pkg-config.patch
@@ -0,0 +1,200 @@
+From 5730efa0804468d342cb82d1ac9d5fc794ff572d Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Fri, 16 May 2014 11:29:53 +0200
+Subject: [PATCH] detect openssl/pcre/libuuid/zlib via pkg-config if it's
+ available
+
+Newer versions of these packages ship with pkg-config files, so if we can
+detect it via those, do so. If that fails, fall back to the old methods.
+
+Forward-ported to 1.15 release from b97942cd6b496501b396ea3bc2710010f4591542
+(Mon, 21 May 2012 18:39:59 -0400)
+
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ configure.ac | 107 ++++++++++++++++++++++++++++++++++++++++++-----------------
+ 1 file changed, 77 insertions(+), 30 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c5437bf..e0e2b25 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -68,6 +68,9 @@ AC_ARG_WITH(ssl,
+ AC_ARG_WITH(zlib,
+ [[ --without-zlib disable zlib ]])
+
++AC_ARG_ENABLE(pcre, AC_HELP_STRING([--disable-pcre],
++ [Disable PCRE style regular expressions]))
++
+ AC_ARG_ENABLE(opie,
+ [ --disable-opie disable support for opie or s/key FTP login],
+ ENABLE_OPIE=$enableval, ENABLE_OPIE=yes)
+@@ -237,12 +240,28 @@ dnl
+ dnl Checks for libraries.
+ dnl
+
++PKG_PROG_PKG_CONFIG
++
+ AS_IF([test x"$with_zlib" != xno], [
+ with_zlib=yes
+- AC_CHECK_LIB(z, compress)
++ PKG_CHECK_MODULES([ZLIB], zlib, [
++ LIBS="$ZLIB_LIBS $LIBS"
++ CFLAGS="$ZLIB_CFLAGS $CFLAGS"
++ AC_DEFINE([HAVE_LIBZ], [1], [Define if using zlib.])
++ ], [
++ AC_CHECK_LIB(z, compress)
++ ])
+ ])
+
+ AS_IF([test x"$with_ssl" = xopenssl], [
++ PKG_CHECK_MODULES([OPENSSL], [openssl], [
++ AC_MSG_NOTICE([compiling in support for SSL via OpenSSL])
++ AC_LIBOBJ([openssl])
++ LIBS="$OPENSSL_LIBS $LIBS"
++ CFLAGS="$OPENSSL_CFLAGS -DHAVE_LIBSSL $CFLAGS"
++ LIBSSL=" " # ntlm check below wants this
++ AC_DEFINE([HAVE_LIBSSL], [1], [Define if using openssl.])
++ ], [
+ dnl As of this writing (OpenSSL 0.9.6), the libcrypto shared library
+ dnl doesn't record its dependency on libdl, so we need to make sure
+ dnl -ldl ends up in LIBS on systems that have it. Most OSes use
+@@ -276,9 +295,9 @@ AS_IF([test x"$with_ssl" = xopenssl], [
+ ;;
+ esac
+
+- AS_IF([test x$ssl_found != xyes], [
+- dnl Now actually check for -lssl if it wasn't already found
+- AC_LIB_HAVE_LINKFLAGS([ssl], [crypto], [
++ AS_IF([test x$ssl_found != xyes], [
++ dnl Now actually check for -lssl if it wasn't already found
++ AC_LIB_HAVE_LINKFLAGS([ssl], [crypto], [
+ #include <openssl/ssl.h>
+ #include <openssl/x509.h>
+ #include <openssl/err.h>
+@@ -286,17 +305,18 @@ AS_IF([test x"$with_ssl" = xopenssl], [
+ #include <openssl/des.h>
+ #include <openssl/md4.h>
+ #include <openssl/md5.h>
+- ], [SSL_library_init ()])
+- if test x"$LIBSSL" != x
+- then
+- ssl_found=yes
+- AC_MSG_NOTICE([compiling in support for SSL via OpenSSL])
+- AC_LIBOBJ([openssl])
+- LIBS="$LIBSSL $LIBS"
+- elif test x"$with_ssl" != x
+- then
+- AC_MSG_ERROR([--with-ssl=openssl was given, but SSL is not available.])
+- fi
++ ], [SSL_library_init ()])
++ if test x"$LIBSSL" != x
++ then
++ ssl_found=yes
++ AC_MSG_NOTICE([compiling in support for SSL via OpenSSL])
++ AC_LIBOBJ([openssl])
++ LIBS="$LIBSSL $LIBS"
++ elif test x"$with_ssl" != x
++ then
++ AC_MSG_ERROR([--with-ssl=openssl was given, but SSL is not available.])
++ fi
++ ])
+ ])
+
+ ], [
+@@ -305,6 +325,14 @@ AS_IF([test x"$with_ssl" = xopenssl], [
+ dnl default is -lgnutls
+ with_ssl=gnutls
+
++ PKG_CHECK_MODULES([GNUTLS], [gnutls], [
++ AC_MSG_NOTICE([compiling in support for SSL via GnuTLS])
++ AC_LIBOBJ([gnutls])
++ LIBS="$GNUTLS_LIBS $LIBS"
++ CFLAGS="$GNUTLS_CFLAGS -DHAVE_LIBGNUTLS $CFLAGS"
++ AC_DEFINE([HAVE_LIBGNUTLS], [1], [Define if using gnutls.])
++ ], [
++
+ dnl Now actually check for -lgnutls
+ AC_LIB_HAVE_LINKFLAGS([gnutls], [], [
+ #include <gnutls/gnutls.h>
+@@ -319,6 +347,8 @@ AS_IF([test x"$with_ssl" = xopenssl], [
+ AC_MSG_ERROR([--with-ssl=gnutls was given, but GNUTLS is not available.])
+ fi
+
++ ])
++
+ AC_CHECK_FUNCS(gnutls_priority_set_direct)
+ ]) # endif: --with-ssl != no?
+ ]) # endif: --with-ssl == openssl?
+@@ -542,32 +542,51 @@ fi
+ dnl
+ dnl Check for UUID
+ dnl
+-AC_CHECK_HEADER(uuid.h,
+- AC_CHECK_FUNC(uuid, uuid_create,
+- [AC_DEFINE([HAVE_UUID_CREATE], 1,
+- [Define if uuid_create is available.])
+- ])
+-)
+
+-AC_CHECK_HEADER(uuid/uuid.h,
+- AC_CHECK_LIB(uuid, uuid_generate,
+- [LIBS="${LIBS} -luuid"
+- AC_DEFINE([HAVE_LIBUUID], 1,
+- [Define if libuuid is available.])
+- ])
+-)
++AC_ARG_WITH(libuuid, AC_HELP_STRING([--without-libuuid],
++ [Generate UUIDs for WARC files via libuuid]))
++AS_IF([test "X$with_libuuid" != "Xno"],[
++ PKG_CHECK_MODULES([UUID], uuid, [
++ LIBS="$UUID_LIBS $LIBS"
++ CFLAGS="$UUID_CFLAGS $CFLAGS"
++ AC_DEFINE([HAVE_LIBUUID], [1], [Define if using libuuid.])
++ ], [
++ AC_CHECK_HEADER(uuid.h,
++ AC_CHECK_FUNC(uuid, uuid_create,
++ [AC_DEFINE([HAVE_UUID_CREATE], 1,
++ [Define if uuid_create is available.])
++ ])
++ )
++
++ AC_CHECK_HEADER(uuid/uuid.h,
++ AC_CHECK_LIB(uuid, uuid_generate,
++ [LIBS="${LIBS} -luuid"
++ AC_DEFINE([HAVE_LIBUUID], 1,
++ [Define if libuuid is available.])
++ ])
++ )
++ ])
++])
+
+ dnl
+ dnl Check for PCRE
+ dnl
+
+-AC_CHECK_HEADER(pcre.h,
+- AC_CHECK_LIB(pcre, pcre_compile,
+- [LIBS="${LIBS} -lpcre"
+- AC_DEFINE([HAVE_LIBPCRE], 1,
+- [Define if libpcre is available.])
+- ])
+-)
++AS_IF([test "X$enable_pcre" != "Xno"],[
++ PKG_CHECK_MODULES([PCRE], libpcre, [
++ LIBS="$PCRE_LIBS $LIBS"
++ CFLAGS="$PCRE_CFLAGS $CFLAGS"
++ AC_DEFINE([HAVE_LIBPCRE], [1], [Define if using libpcre.])
++ ], [
++ AC_CHECK_HEADER(pcre.h,
++ AC_CHECK_LIB(pcre, pcre_compile,
++ [LIBS="${LIBS} -lpcre"
++ AC_DEFINE([HAVE_LIBPCRE], 1,
++ [Define if libpcre is available.])
++ ])
++ )
++ ])
++])
+
+
+ dnl Needed by src/Makefile.am
diff --git a/net-misc/wget/files/wget-1.16-tests-skip.patch b/net-misc/wget/files/wget-1.16-tests-skip.patch
new file mode 100644
index 000000000000..ce07cc1d01da
--- /dev/null
+++ b/net-misc/wget/files/wget-1.16-tests-skip.patch
@@ -0,0 +1,27 @@
+From 9a85d61a39f9afd0f60e9e5fc59e7ade553c0541 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 27 Oct 2014 14:52:01 -0400
+Subject: [PATCH] tests: fix skip exit code
+
+The test harness looks for exit code 77 to mark tests as skipped, not
+exit 2. Switch over so we get SKIP instead of FAIL.
+---
+ tests/WgetFeature.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/WgetFeature.pm b/tests/WgetFeature.pm
+index 0762314..118e79c 100644
+--- a/tests/WgetFeature.pm
++++ b/tests/WgetFeature.pm
+@@ -22,7 +22,7 @@ sub import
+
+ unless ($have_features{$feature}) {
+ print $skip_messages{$feature}, "\n";
+- exit 2; # skip
++ exit 77; # skip
+ }
+ }
+
+--
+2.1.2
+
diff --git a/net-misc/wget/metadata.xml b/net-misc/wget/metadata.xml
new file mode 100644
index 000000000000..9c89911e82af
--- /dev/null
+++ b/net-misc/wget/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>base-system</herd>
+<use>
+ <flag name='ntlm'>Enable support for NTLM (Windows-based) authorization</flag>
+ <flag name='uuid'>Generate UUIDs for the WARC (Web ARChive file format) using libuuid; otherwise use a simple RNG (random number generator)</flag>
+</use>
+<upstream>
+ <remote-id type="cpe">cpe:/a:gnu:wget</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/net-misc/wget/wget-1.16.1.ebuild b/net-misc/wget/wget-1.16.1.ebuild
new file mode 100644
index 000000000000..a3ca7a9a66c1
--- /dev/null
+++ b/net-misc/wget/wget-1.16.1.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+PYTHON_COMPAT=( python{3_3,3_4} )
+
+inherit flag-o-matic python-any-r1 toolchain-funcs autotools
+
+DESCRIPTION="Network utility to retrieve files from the WWW"
+HOMEPAGE="http://www.gnu.org/software/wget/"
+SRC_URI="mirror://gnu/wget/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug gnutls idn ipv6 nls ntlm pcre +ssl static test uuid zlib"
+
+LIB_DEPEND="idn? ( net-dns/libidn[static-libs(+)] )
+ pcre? ( dev-libs/libpcre[static-libs(+)] )
+ ssl? (
+ gnutls? ( net-libs/gnutls[static-libs(+)] )
+ !gnutls? ( dev-libs/openssl:0[static-libs(+)] )
+ )
+ uuid? ( sys-apps/util-linux[static-libs(+)] )
+ zlib? ( sys-libs/zlib[static-libs(+)] )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ static? ( ${LIB_DEPEND} )
+ test? (
+ ${PYTHON_DEPS}
+ dev-lang/perl
+ dev-perl/HTTP-Daemon
+ dev-perl/HTTP-Message
+ dev-perl/IO-Socket-SSL
+ )
+ nls? ( sys-devel/gettext )"
+
+REQUIRED_USE="ntlm? ( !gnutls ssl ) gnutls? ( ssl )"
+
+DOCS=( AUTHORS MAILING-LIST NEWS README doc/sample.wgetrc )
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ # openssl-0.9.8 now builds with -pthread on the BSD's
+ use elibc_FreeBSD && use ssl && append-ldflags -pthread
+ # fix compilation on Solaris, we need filio.h for FIONBIO as used in
+ # the included gnutls -- force ioctl.h to include this header
+ [[ ${CHOST} == *-solaris* ]] && append-flags -DBSD_COMP=1
+
+ if use static ; then
+ append-ldflags -static
+ tc-export PKG_CONFIG
+ PKG_CONFIG+=" --static"
+ fi
+ econf \
+ --disable-assert \
+ --disable-rpath \
+ $(use_with ssl ssl $(usex gnutls gnutls openssl)) \
+ $(use_enable ssl opie) \
+ $(use_enable ssl digest) \
+ $(use_enable idn iri) \
+ $(use_enable ipv6) \
+ $(use_enable nls) \
+ $(use_enable ntlm) \
+ $(use_enable pcre) \
+ $(use_enable debug) \
+ $(use_with uuid libuuid) \
+ $(use_with zlib)
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ default
+
+ sed -i \
+ -e "s:/usr/local/etc:${EPREFIX}/etc:g" \
+ "${ED}"/etc/wgetrc \
+ "${ED}"/usr/share/man/man1/wget.1 \
+ "${ED}"/usr/share/info/wget.info
+}
diff --git a/net-misc/wget/wget-1.16.2.ebuild b/net-misc/wget/wget-1.16.2.ebuild
new file mode 100644
index 000000000000..cbab975c3721
--- /dev/null
+++ b/net-misc/wget/wget-1.16.2.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+PYTHON_COMPAT=( python{3_3,3_4} )
+
+inherit flag-o-matic python-any-r1 toolchain-funcs autotools
+
+DESCRIPTION="Network utility to retrieve files from the WWW"
+HOMEPAGE="http://www.gnu.org/software/wget/"
+SRC_URI="mirror://gnu/wget/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug gnutls idn ipv6 nls ntlm pcre +ssl static test uuid zlib"
+
+LIB_DEPEND="idn? ( net-dns/libidn[static-libs(+)] )
+ pcre? ( dev-libs/libpcre[static-libs(+)] )
+ ssl? (
+ gnutls? ( net-libs/gnutls[static-libs(+)] )
+ !gnutls? ( dev-libs/openssl:0[static-libs(+)] )
+ )
+ uuid? ( sys-apps/util-linux[static-libs(+)] )
+ zlib? ( sys-libs/zlib[static-libs(+)] )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ static? ( ${LIB_DEPEND} )
+ test? (
+ ${PYTHON_DEPS}
+ dev-lang/perl
+ dev-perl/HTTP-Daemon
+ dev-perl/HTTP-Message
+ dev-perl/IO-Socket-SSL
+ )
+ nls? ( sys-devel/gettext )"
+
+REQUIRED_USE="ntlm? ( !gnutls ssl ) gnutls? ( ssl )"
+
+DOCS=( AUTHORS MAILING-LIST NEWS README doc/sample.wgetrc )
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_configure() {
+ # fix compilation on Solaris, we need filio.h for FIONBIO as used in
+ # the included gnutls -- force ioctl.h to include this header
+ [[ ${CHOST} == *-solaris* ]] && append-cppflags -DBSD_COMP=1
+
+ if use static ; then
+ append-ldflags -static
+ tc-export PKG_CONFIG
+ PKG_CONFIG+=" --static"
+ fi
+ econf \
+ --disable-assert \
+ --disable-rpath \
+ $(use_with ssl ssl $(usex gnutls gnutls openssl)) \
+ $(use_enable ssl opie) \
+ $(use_enable ssl digest) \
+ $(use_enable idn iri) \
+ $(use_enable ipv6) \
+ $(use_enable nls) \
+ $(use_enable ntlm) \
+ $(use_enable pcre) \
+ $(use_enable debug) \
+ $(use_with uuid libuuid) \
+ $(use_with zlib)
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ default
+
+ sed -i \
+ -e "s:/usr/local/etc:${EPREFIX}/etc:g" \
+ "${ED}"/etc/wgetrc \
+ "${ED}"/usr/share/man/man1/wget.1 \
+ "${ED}"/usr/share/info/wget.info
+}
diff --git a/net-misc/wget/wget-1.16.3.ebuild b/net-misc/wget/wget-1.16.3.ebuild
new file mode 100644
index 000000000000..cbab975c3721
--- /dev/null
+++ b/net-misc/wget/wget-1.16.3.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+PYTHON_COMPAT=( python{3_3,3_4} )
+
+inherit flag-o-matic python-any-r1 toolchain-funcs autotools
+
+DESCRIPTION="Network utility to retrieve files from the WWW"
+HOMEPAGE="http://www.gnu.org/software/wget/"
+SRC_URI="mirror://gnu/wget/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug gnutls idn ipv6 nls ntlm pcre +ssl static test uuid zlib"
+
+LIB_DEPEND="idn? ( net-dns/libidn[static-libs(+)] )
+ pcre? ( dev-libs/libpcre[static-libs(+)] )
+ ssl? (
+ gnutls? ( net-libs/gnutls[static-libs(+)] )
+ !gnutls? ( dev-libs/openssl:0[static-libs(+)] )
+ )
+ uuid? ( sys-apps/util-linux[static-libs(+)] )
+ zlib? ( sys-libs/zlib[static-libs(+)] )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ static? ( ${LIB_DEPEND} )
+ test? (
+ ${PYTHON_DEPS}
+ dev-lang/perl
+ dev-perl/HTTP-Daemon
+ dev-perl/HTTP-Message
+ dev-perl/IO-Socket-SSL
+ )
+ nls? ( sys-devel/gettext )"
+
+REQUIRED_USE="ntlm? ( !gnutls ssl ) gnutls? ( ssl )"
+
+DOCS=( AUTHORS MAILING-LIST NEWS README doc/sample.wgetrc )
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_configure() {
+ # fix compilation on Solaris, we need filio.h for FIONBIO as used in
+ # the included gnutls -- force ioctl.h to include this header
+ [[ ${CHOST} == *-solaris* ]] && append-cppflags -DBSD_COMP=1
+
+ if use static ; then
+ append-ldflags -static
+ tc-export PKG_CONFIG
+ PKG_CONFIG+=" --static"
+ fi
+ econf \
+ --disable-assert \
+ --disable-rpath \
+ $(use_with ssl ssl $(usex gnutls gnutls openssl)) \
+ $(use_enable ssl opie) \
+ $(use_enable ssl digest) \
+ $(use_enable idn iri) \
+ $(use_enable ipv6) \
+ $(use_enable nls) \
+ $(use_enable ntlm) \
+ $(use_enable pcre) \
+ $(use_enable debug) \
+ $(use_with uuid libuuid) \
+ $(use_with zlib)
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ default
+
+ sed -i \
+ -e "s:/usr/local/etc:${EPREFIX}/etc:g" \
+ "${ED}"/etc/wgetrc \
+ "${ED}"/usr/share/man/man1/wget.1 \
+ "${ED}"/usr/share/info/wget.info
+}
diff --git a/net-misc/wget/wget-1.16.ebuild b/net-misc/wget/wget-1.16.ebuild
new file mode 100644
index 000000000000..5859a9cc6bad
--- /dev/null
+++ b/net-misc/wget/wget-1.16.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+PYTHON_COMPAT=( python{3_3,3_4} )
+
+inherit flag-o-matic python-any-r1 toolchain-funcs autotools
+
+DESCRIPTION="Network utility to retrieve files from the WWW"
+HOMEPAGE="http://www.gnu.org/software/wget/"
+SRC_URI="mirror://gnu/wget/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug gnutls idn ipv6 nls ntlm pcre +ssl static test uuid zlib"
+
+LIB_DEPEND="idn? ( net-dns/libidn[static-libs(+)] )
+ pcre? ( dev-libs/libpcre[static-libs(+)] )
+ ssl? (
+ gnutls? ( net-libs/gnutls[static-libs(+)] )
+ !gnutls? ( dev-libs/openssl:0[static-libs(+)] )
+ )
+ uuid? ( sys-apps/util-linux[static-libs(+)] )
+ zlib? ( sys-libs/zlib[static-libs(+)] )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+ static? ( ${LIB_DEPEND} )
+ test? (
+ ${PYTHON_DEPS}
+ dev-lang/perl
+ dev-perl/HTTP-Daemon
+ dev-perl/HTTP-Message
+ dev-perl/IO-Socket-SSL
+ )
+ nls? ( sys-devel/gettext )"
+
+REQUIRED_USE="ntlm? ( !gnutls ssl ) gnutls? ( ssl )"
+
+DOCS=( AUTHORS MAILING-LIST NEWS README doc/sample.wgetrc )
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.16-pkg-config.patch
+ epatch "${FILESDIR}"/${PN}-1.16-openssl-header.patch
+ epatch "${FILESDIR}"/${PN}-1.16-tests-skip.patch
+ epatch "${FILESDIR}"/${P}-openssl-no-ssl3.patch
+ epatch "${FILESDIR}"/${P}-fix-proxy-test-race.patch
+ eautoreconf
+}
+
+src_configure() {
+ # openssl-0.9.8 now builds with -pthread on the BSD's
+ use elibc_FreeBSD && use ssl && append-ldflags -pthread
+ # fix compilation on Solaris, we need filio.h for FIONBIO as used in
+ # the included gnutls -- force ioctl.h to include this header
+ [[ ${CHOST} == *-solaris* ]] && append-flags -DBSD_COMP=1
+
+ if use static ; then
+ append-ldflags -static
+ tc-export PKG_CONFIG
+ PKG_CONFIG+=" --static"
+ fi
+ econf \
+ --disable-rpath \
+ $(use_with ssl ssl $(usex gnutls gnutls openssl)) \
+ $(use_enable ssl opie) \
+ $(use_enable ssl digest) \
+ $(use_enable idn iri) \
+ $(use_enable ipv6) \
+ $(use_enable nls) \
+ $(use_enable ntlm) \
+ $(use_enable pcre) \
+ $(use_enable debug) \
+ $(use_with uuid libuuid) \
+ $(use_with zlib)
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ default
+
+ sed -i \
+ -e "s:/usr/local/etc:${EPREFIX}/etc:g" \
+ "${ED}"/etc/wgetrc \
+ "${ED}"/usr/share/man/man1/wget.1 \
+ "${ED}"/usr/share/info/wget.info
+}
diff --git a/net-misc/whatmask/Manifest b/net-misc/whatmask/Manifest
new file mode 100644
index 000000000000..068f99a45def
--- /dev/null
+++ b/net-misc/whatmask/Manifest
@@ -0,0 +1 @@
+DIST whatmask-1.2.tar.gz 170183 RMD160 5863edc9fe0e3f98b5ff03e79117e44080e58033 SHA1 313762672acacd40de8021132b1024a5c96e2ad5 SHA256 7dca0389e22e90ec1b1c199a29838803a1ae9ab34c086a926379b79edb069d89
diff --git a/net-misc/whatmask/metadata.xml b/net-misc/whatmask/metadata.xml
new file mode 100644
index 000000000000..52363bff0cba
--- /dev/null
+++ b/net-misc/whatmask/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>jer@gentoo.org</email>
+ <name>Jeroen Roovers</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/whatmask/whatmask-1.2-r1.ebuild b/net-misc/whatmask/whatmask-1.2-r1.ebuild
new file mode 100644
index 000000000000..9ba66be2f173
--- /dev/null
+++ b/net-misc/whatmask/whatmask-1.2-r1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="little C program to compute different subnet mask notations"
+HOMEPAGE="http://www.laffeycomputer.com/whatmask.html"
+SRC_URI="http://downloads.laffeycomputer.com/current_builds/whatmask/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc sparc x86"
+IUSE=""
+
+DOCS=( AUTHORS ChangeLog INSTALL NEWS README )
+
+src_prepare() {
+ tc-export CC
+}
diff --git a/net-misc/whois/Manifest b/net-misc/whois/Manifest
new file mode 100644
index 000000000000..2f982949b1c1
--- /dev/null
+++ b/net-misc/whois/Manifest
@@ -0,0 +1,5 @@
+DIST whois_5.0.25.tar.xz 72540 SHA256 1207bea7bcc6241554c496608a834e4b3cc1ef4bc1ad5f161be999c6772a6861 SHA512 d4f038225f88622b6ab4a1a53827772ca5db6f5be9ba2a4ae40a22dd350536d60a41a91e829126399d49fcb70fed8421f3b62074a6178a2c2b169ba48ecdca9b WHIRLPOOL e8b9d912890c83fe24f30a0da01f421ac2ab06c6d85e62d5bdaf62f485f5b950939351f5e5aa8fdec2cd09349dfbb7048ea7668669b0e0e1a16447a26e590508
+DIST whois_5.0.26.tar.xz 72508 SHA256 729625ef81425f4771e06492bb4f3e9f24bff75b8176044ce8d2f605f7ad6af5 SHA512 5a292fe721bdaea5db35437a904c0884723d037823769eccc4890cccebb3991534a2dc218b2e7abc7881cd7423dbf389fefc724899b90d28b45e45e17ca774cc WHIRLPOOL 5fa3c60237c99a616c048a25957139bc802100d242138fc41698f56842cccc203eea0040c9953ac534a27fc48db11bb230625e4fe89e51f6635a23209a96ffde
+DIST whois_5.1.5.tar.xz 77176 SHA256 d4a192d6208f1ed3856b5089e2de5fc986031c96148b97c9ef43af7a21af1a9d SHA512 99fb43494aa7ff809055e31679eecb1d8a2a1276c54e550a9559cbca84c4ed7044953bf86f9f155e28f4a3c9d78f7c87ec28188f971c8f30e07d4ca5ef03c8eb WHIRLPOOL 62e2a2b4dcbcf4bb2b2cf320f0ea6a4286e512c032e9d22ba355d60c5a4dd5fea5a23b7db8ec40fcebea9b7e2699dea923484b7176f7fe48f63f5239f456ee7b
+DIST whois_5.2.10.tar.xz 78732 SHA256 8acb42bc693f73f3141b413f7df11b5582b9b738d9bf0d60e9017a8af4cb53b9 SHA512 6f7f409c10c20231e91afb113a60ce6642018700521505546ec1a469c43df236578fbab3e0efd95d0723b1c6379bdfcdef9382b6582af1ae9eca342b925695cb WHIRLPOOL edf7cea6548eaa31e1d10bd2e1464c0025f83937c7e990c1a824f2c24dbda60601cf6cca296132e6c574ccfe61c45a880f58199e4c60dc02efde87a656839887
+DIST whois_5.2.9.tar.xz 78468 SHA256 eee5446bf76ca7d38052767d6e2c542297d3a54ce928cada0ff24d2f1749d359 SHA512 083c77c133dff675a346c203cbd3dd2327ef4b980c474b0deb66d21d9687739b4ccb12a7d1666eb091654902456e64bb416349073d13f16773c56d867f6a2f04 WHIRLPOOL 696db7a8b7f35b4d2f757bbeceb4e4c45baf603ef8c7bdda448719cc1ec78ddac4672f7b06eb04a4dc502af9a9c5fade56eb457fe13e61e96b16ae303d27efe3
diff --git a/net-misc/whois/files/whois-4.7.2-config-file.patch b/net-misc/whois/files/whois-4.7.2-config-file.patch
new file mode 100644
index 000000000000..24ffb3de9ae8
--- /dev/null
+++ b/net-misc/whois/files/whois-4.7.2-config-file.patch
@@ -0,0 +1,12 @@
+Enable /etc/whois.conf support.
+
+http://bugs.gentoo.org/show_bug.cgi?id=89417
+
+--- config.h
++++ config.h
+@@ -13,5 +13,3 @@
+ /* Configuration file */
+-/*
+ #define CONFIG_FILE "/etc/whois.conf"
+-*/
+
diff --git a/net-misc/whois/files/whois-5.1.5-po_fixes.patch b/net-misc/whois/files/whois-5.1.5-po_fixes.patch
new file mode 100644
index 000000000000..904b97a62625
--- /dev/null
+++ b/net-misc/whois/files/whois-5.1.5-po_fixes.patch
@@ -0,0 +1,22 @@
+--- whois-5.1.5/po/eu.po
++++ whois-5.1.5/po/eu.po
+@@ -11,7 +11,7 @@
+ "PO-Revision-Date: 2002-08-24 16:22+0200\n"
+ "Last-Translator: Aitor Ibaez <aitiba@gmail.com>\n"
+ "Language-Team: Euskara <Librezale@librezale.org>\n"
+-"Language: \n"
++"Language: eu\n"
+ "MIME-Version: 1.0\n"
+ "Content-Type: text/plain; charset=UTF-8\n"
+ "Content-Transfer-Encoding: 8bit\n"
+--- whois-5.1.5/po/pt_BR.po
++++ whois-5.1.5/po/pt_BR.po
+@@ -11,7 +11,7 @@
+ "PO-Revision-Date: 2006-04-26 21:03-0300\n"
+ "Last-Translator: Anderson Goulart <globalx@gmail.com>\n"
+ "Language-Team: Portuguese/Brazil\n"
+-"Language: \n"
++"Language: pt_BR\n"
+ "MIME-Version: 1.0\n"
+ "Content-Type: text/plain; charset=iso-8859-1\n"
+ "Content-Transfer-Encoding: 8bit\n"
diff --git a/net-misc/whois/metadata.xml b/net-misc/whois/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/net-misc/whois/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>base-system</herd>
+</pkgmetadata>
diff --git a/net-misc/whois/whois-5.0.25.ebuild b/net-misc/whois/whois-5.0.25.ebuild
new file mode 100644
index 000000000000..3cfed473a610
--- /dev/null
+++ b/net-misc/whois/whois-5.0.25.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+MY_P=${P/-/_}
+DESCRIPTION="improved Whois Client"
+HOMEPAGE="http://www.linux.it/~md/software/"
+SRC_URI="mirror://debian/pool/main/w/whois/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+IUSE="iconv idn nls"
+RESTRICT="test" #59327
+
+RDEPEND="iconv? ( virtual/libiconv )
+ idn? ( net-dns/libidn )
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ >=dev-lang/perl-5
+ nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.7.2-config-file.patch
+
+ if use nls ; then
+ sed -i -e 's:#\(.*pos\):\1:' Makefile || die
+ else
+ sed -i -e '/ENABLE_NLS/s:define:undef:' config.h || die
+
+ # don't generate po files when nls is disabled (bug #419889)
+ sed -i -e '/^all:/s/ pos//' \
+ -e '/^install:/s/ install-pos//' Makefile || die
+ fi
+}
+
+src_configure() { :;} # expected no-op
+
+src_compile() {
+ unset HAVE_ICONV HAVE_LIBIDN
+ use iconv && export HAVE_ICONV=1
+ use idn && export HAVE_LIBIDN=1
+ tc-export CC
+ emake CFLAGS="${CFLAGS} ${CPPFLAGS}"
+}
+
+src_install() {
+ emake BASEDIR="${ED}" prefix=/usr install
+ insinto /etc
+ doins whois.conf
+ dodoc README debian/changelog
+
+ if [[ ${USERLAND} != "GNU" ]]; then
+ mv "${ED}"/usr/share/man/man1/{whois,mdwhois}.1 || die
+ mv "${ED}"/usr/bin/{whois,mdwhois} || die
+ fi
+}
diff --git a/net-misc/whois/whois-5.0.26.ebuild b/net-misc/whois/whois-5.0.26.ebuild
new file mode 100644
index 000000000000..fcfbd126fdb2
--- /dev/null
+++ b/net-misc/whois/whois-5.0.26.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+MY_P=${P/-/_}
+DESCRIPTION="improved Whois Client"
+HOMEPAGE="http://www.linux.it/~md/software/"
+SRC_URI="mirror://debian/pool/main/w/whois/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+IUSE="iconv idn nls"
+RESTRICT="test" #59327
+
+RDEPEND="iconv? ( virtual/libiconv )
+ idn? ( net-dns/libidn )
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ >=dev-lang/perl-5
+ nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.7.2-config-file.patch
+
+ if use nls ; then
+ sed -i -e 's:#\(.*pos\):\1:' Makefile || die
+ else
+ sed -i -e '/ENABLE_NLS/s:define:undef:' config.h || die
+
+ # don't generate po files when nls is disabled (bug #419889)
+ sed -i -e '/^all:/s/ pos//' \
+ -e '/^install:/s/ install-pos//' Makefile || die
+ fi
+}
+
+src_configure() { :;} # expected no-op
+
+src_compile() {
+ unset HAVE_ICONV HAVE_LIBIDN
+ use iconv && export HAVE_ICONV=1
+ use idn && export HAVE_LIBIDN=1
+ tc-export CC
+ emake CFLAGS="${CFLAGS} ${CPPFLAGS}"
+}
+
+src_install() {
+ emake BASEDIR="${ED}" prefix=/usr install
+ insinto /etc
+ doins whois.conf
+ dodoc README debian/changelog
+
+ if [[ ${USERLAND} != "GNU" ]]; then
+ mv "${ED}"/usr/share/man/man1/{whois,mdwhois}.1 || die
+ mv "${ED}"/usr/bin/{whois,mdwhois} || die
+ fi
+}
diff --git a/net-misc/whois/whois-5.1.5.ebuild b/net-misc/whois/whois-5.1.5.ebuild
new file mode 100644
index 000000000000..37b809361d2d
--- /dev/null
+++ b/net-misc/whois/whois-5.1.5.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+MY_P=${P/-/_}
+DESCRIPTION="improved Whois Client"
+HOMEPAGE="http://www.linux.it/~md/software/"
+SRC_URI="mirror://debian/pool/main/w/whois/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+IUSE="iconv idn nls"
+RESTRICT="test" #59327
+
+RDEPEND="iconv? ( virtual/libiconv )
+ idn? ( net-dns/libidn )
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ >=dev-lang/perl-5
+ nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.7.2-config-file.patch \
+ "${FILESDIR}"/${PN}-5.1.5-po_fixes.patch
+
+ if use nls ; then
+ sed -i -e 's:#\(.*pos\):\1:' Makefile || die
+ else
+ sed -i -e '/ENABLE_NLS/s:define:undef:' config.h || die
+
+ # don't generate po files when nls is disabled (bug #419889)
+ sed -i -e '/^all:/s/ pos//' \
+ -e '/^install:/s/ install-pos//' Makefile || die
+ fi
+}
+
+src_configure() { :;} # expected no-op
+
+src_compile() {
+ unset HAVE_ICONV HAVE_LIBIDN
+ use iconv && export HAVE_ICONV=1
+ use idn && export HAVE_LIBIDN=1
+ tc-export CC
+ emake CFLAGS="${CFLAGS} ${CPPFLAGS}"
+}
+
+src_install() {
+ emake BASEDIR="${ED}" prefix=/usr install
+ insinto /etc
+ doins whois.conf
+ dodoc README debian/changelog
+
+ if [[ ${USERLAND} != "GNU" ]]; then
+ mv "${ED}"/usr/share/man/man1/{whois,mdwhois}.1 || die
+ mv "${ED}"/usr/bin/{whois,mdwhois} || die
+ fi
+}
diff --git a/net-misc/whois/whois-5.2.10.ebuild b/net-misc/whois/whois-5.2.10.ebuild
new file mode 100644
index 000000000000..0d80249db919
--- /dev/null
+++ b/net-misc/whois/whois-5.2.10.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+MY_P=${P/-/_}
+DESCRIPTION="improved Whois Client"
+HOMEPAGE="http://www.linux.it/~md/software/"
+SRC_URI="mirror://debian/pool/main/w/whois/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+IUSE="iconv idn nls"
+RESTRICT="test" #59327
+
+RDEPEND="iconv? ( virtual/libiconv )
+ idn? ( net-dns/libidn )
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ >=dev-lang/perl-5
+ nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.7.2-config-file.patch
+
+ if use nls ; then
+ sed -i -e 's:#\(.*pos\):\1:' Makefile || die
+ else
+ sed -i -e '/ENABLE_NLS/s:define:undef:' config.h || die
+
+ # don't generate po files when nls is disabled (bug #419889)
+ sed -i -e '/^all:/s/ pos//' \
+ -e '/^install:/s/ install-pos//' Makefile || die
+ fi
+}
+
+src_configure() { :;} # expected no-op
+
+src_compile() {
+ unset HAVE_ICONV HAVE_LIBIDN
+ use iconv && export HAVE_ICONV=1
+ use idn && export HAVE_LIBIDN=1
+ tc-export CC
+ emake CFLAGS="${CFLAGS} ${CPPFLAGS}"
+}
+
+src_install() {
+ emake BASEDIR="${ED}" prefix=/usr install
+ insinto /etc
+ doins whois.conf
+ dodoc README debian/changelog
+
+ if [[ ${USERLAND} != "GNU" ]]; then
+ mv "${ED}"/usr/share/man/man1/{whois,mdwhois}.1 || die
+ mv "${ED}"/usr/bin/{whois,mdwhois} || die
+ fi
+}
diff --git a/net-misc/whois/whois-5.2.9.ebuild b/net-misc/whois/whois-5.2.9.ebuild
new file mode 100644
index 000000000000..0d80249db919
--- /dev/null
+++ b/net-misc/whois/whois-5.2.9.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+MY_P=${P/-/_}
+DESCRIPTION="improved Whois Client"
+HOMEPAGE="http://www.linux.it/~md/software/"
+SRC_URI="mirror://debian/pool/main/w/whois/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+IUSE="iconv idn nls"
+RESTRICT="test" #59327
+
+RDEPEND="iconv? ( virtual/libiconv )
+ idn? ( net-dns/libidn )
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ >=dev-lang/perl-5
+ nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.7.2-config-file.patch
+
+ if use nls ; then
+ sed -i -e 's:#\(.*pos\):\1:' Makefile || die
+ else
+ sed -i -e '/ENABLE_NLS/s:define:undef:' config.h || die
+
+ # don't generate po files when nls is disabled (bug #419889)
+ sed -i -e '/^all:/s/ pos//' \
+ -e '/^install:/s/ install-pos//' Makefile || die
+ fi
+}
+
+src_configure() { :;} # expected no-op
+
+src_compile() {
+ unset HAVE_ICONV HAVE_LIBIDN
+ use iconv && export HAVE_ICONV=1
+ use idn && export HAVE_LIBIDN=1
+ tc-export CC
+ emake CFLAGS="${CFLAGS} ${CPPFLAGS}"
+}
+
+src_install() {
+ emake BASEDIR="${ED}" prefix=/usr install
+ insinto /etc
+ doins whois.conf
+ dodoc README debian/changelog
+
+ if [[ ${USERLAND} != "GNU" ]]; then
+ mv "${ED}"/usr/share/man/man1/{whois,mdwhois}.1 || die
+ mv "${ED}"/usr/bin/{whois,mdwhois} || die
+ fi
+}
diff --git a/net-misc/wicd/Manifest b/net-misc/wicd/Manifest
new file mode 100644
index 000000000000..290c9f13a4c3
--- /dev/null
+++ b/net-misc/wicd/Manifest
@@ -0,0 +1,4 @@
+DIST Icone-Wicd-Lucid.tar.gz 9015 SHA256 6e4e3483c6cff7398e6871dd3e4360e361e5c6e64007e8e1240fd1c259ac707e SHA512 0df0dbdf05b462264dca2dd9955454a82f688b0fbfa7c2ad70a424df57eb27b35561d37819fc88b5746cff8a54de5b7b43ec325d2f98a4a1a30e4d500e86d2f8 WHIRLPOOL 336f363092c9bac7523047b6052a856a699820147967820418c6ac1ca528c472d371c6c211c505c325b5eb001812042c01425b05e1dfdf2d4a528f96686c530a
+DIST wicd-1.7.2.4.tar.gz 439297 SHA256 dcfdfb5dbbb49dbb9b205fddf064d6b1a4e88f66f1cf40d12fb7fe0e0c7cdc97 SHA512 6dd8d4726c5f9c943d90305b7ed70573b42b5dae00de443209d9f526778e91ac01aabffa14447c47374b4d9986133aacfcc970735d1b5befa232da44d3190d7c WHIRLPOOL 59885a22dbf350e73a55fdbf7ea1c9b93a339edae116beb1c22c271762d90488ecdeb7952a4efc8241d362b5bafcaccf88053c4d5c41468cba0cd524cf2a5756
+DIST wicd-1.7.3.tar.gz 542341 SHA256 91e38857b1651d242ed7e3b3e3fd8b076b4d06a23eedb033310fae510ece8401 SHA512 3ff3f42cd228327641b584bf85ef785a7d490fa5a57d1aa695f9b4860dae086c240a60321832a0aeee2dfb23de70da1a9f6abce4f1b6ecab58455304407fd536 WHIRLPOOL 69a9042e77f78f6d0dabc73e0569023d5a6747b82e3c944aad51a74681765b1b439beef1a578fcba4f048dbba6cbeabe0aca54ea62076d7dacdcbc4100ef2025
+DIST wicd-mac4lin-icons.tar.xz 53136 SHA256 4c48c769c71f962415e3bd3573557e9288351afb867347f9a6f652883ae31011
diff --git a/net-misc/wicd/files/add-wpa-psk-hex-template.patch b/net-misc/wicd/files/add-wpa-psk-hex-template.patch
new file mode 100644
index 000000000000..21daaf3e5091
--- /dev/null
+++ b/net-misc/wicd/files/add-wpa-psk-hex-template.patch
@@ -0,0 +1,29 @@
+diff -U 3 -dHrN wicd-1.7.1b2/encryption/templates/active wicd-1.7.1b2.new/encryption/templates/active
+--- wicd-1.7.1b2/encryption/templates/active 2010-10-29 16:36:55.000000000 +0100
++++ wicd-1.7.1b2.new/encryption/templates/active 2011-09-13 19:58:54.000000000 +0100
+@@ -1,5 +1,6 @@
+ wpa
+ wpa-psk
++wpa-psk-hex
+ wep-hex
+ wep-passphrase
+ wep-shared
+diff -U 3 -dHrN wicd-1.7.1b2/encryption/templates/wpa-psk-hex wicd-1.7.1b2.new/encryption/templates/wpa-psk-hex
+--- wicd-1.7.1b2/encryption/templates/wpa-psk-hex 1970-01-01 01:00:00.000000000 +0100
++++ wicd-1.7.1b2.new/encryption/templates/wpa-psk-hex 2011-09-13 19:59:11.000000000 +0100
+@@ -0,0 +1,15 @@
++name = WPA 1/2 (Preshared Hex Key)
++author = Thomas Kahle
++version = 1
++require apsk *Preshared_Key
++-----
++ctrl_interface=/var/run/wpa_supplicant
++network={
++ ssid="$_ESSID"
++ scan_ssid=$_SCAN
++ proto=WPA RSN
++ key_mgmt=WPA-PSK
++ pairwise=CCMP TKIP
++ group=CCMP TKIP
++ psk=$_APSK
++}
diff --git a/net-misc/wicd/files/wicd-1.7.1-provide-net.patch b/net-misc/wicd/files/wicd-1.7.1-provide-net.patch
new file mode 100644
index 000000000000..f325bcbaa89d
--- /dev/null
+++ b/net-misc/wicd/files/wicd-1.7.1-provide-net.patch
@@ -0,0 +1,11 @@
+diff -U 3 -dHrN wicd-1.7.1.orig/in/init=gentoo=wicd.in wicd-1.7.1/in/init=gentoo=wicd.in
+--- wicd-1.7.1.orig/in/init=gentoo=wicd.in 2012-02-27 21:49:36.422873826 +0100
++++ wicd-1.7.1/in/init=gentoo=wicd.in 2012-02-27 21:50:26.957127714 +0100
+@@ -10,6 +10,7 @@
+ depend() {
+ need dbus
+ after hald
++ provide net
+ }
+
+ start() {
diff --git a/net-misc/wicd/files/wicd-1.7.1_beta2-init.patch b/net-misc/wicd/files/wicd-1.7.1_beta2-init.patch
new file mode 100644
index 000000000000..6a736f9e2cdd
--- /dev/null
+++ b/net-misc/wicd/files/wicd-1.7.1_beta2-init.patch
@@ -0,0 +1,11 @@
+--- in/init=gentoo=wicd.in 2010-10-29 11:36:55.000000000 -0400
++++ in/init=gentoo=wicd.in.new 2011-03-28 09:40:27.245339002 -0400
+@@ -15,7 +15,7 @@
+ start() {
+ ebegin "Starting wicd daemon"
+ # fix Gentoo bug 296197
+- sed -i 's/^\[\]$//' /etc/wicd/wired-settings.conf
++ [ -f /etc/wicd/wired-settings.conf ] && sed -i 's/^\[\]$//' /etc/wicd/wired-settings.conf
+ "${WICD_DAEMON}" >/dev/null 2>&1
+ eend $?
+ }
diff --git a/net-misc/wicd/files/wicd-1.7.1_pre20111210-wpa-psk-hex-template.patch b/net-misc/wicd/files/wicd-1.7.1_pre20111210-wpa-psk-hex-template.patch
new file mode 100644
index 000000000000..6736cb7b8d1b
--- /dev/null
+++ b/net-misc/wicd/files/wicd-1.7.1_pre20111210-wpa-psk-hex-template.patch
@@ -0,0 +1,30 @@
+diff -U 3 -dHrN wicd.org/encryption/templates/active wicd/encryption/templates/active
+--- wicd.org/encryption/templates/active 2011-12-05 16:22:49.584224158 +0100
++++ wicd/encryption/templates/active 2011-12-05 16:16:10.736172566 +0100
+@@ -1,6 +1,7 @@
+ wpa
+ wpa-peap
+ wpa-psk
++wpa-psk-hex
+ wpa2-leap
+ wpa2-peap
+ wep-hex
+diff -U 3 -dHrN wicd.org/encryption/templates/wpa-psk-hex wicd/encryption/templates/wpa-psk-hex
+--- wicd.org/encryption/templates/wpa-psk-hex 1970-01-01 01:00:00.000000000 +0100
++++ wicd/encryption/templates/wpa-psk-hex 2011-12-05 16:16:43.428012863 +0100
+@@ -0,0 +1,15 @@
++name = WPA 1/2 (Preshared Hex Key)
++author = Thomas Kahle
++version = 1
++require apsk *Preshared_Key
++-----
++ctrl_interface=/var/run/wpa_supplicant
++network={
++ ssid="$_ESSID"
++ scan_ssid=$_SCAN
++ proto=WPA RSN
++ key_mgmt=WPA-PSK
++ pairwise=CCMP TKIP
++ group=CCMP TKIP
++ psk=$_APSK
++}
diff --git a/net-misc/wicd/files/wicd-1.7.2.4-fix-dbus-error.patch b/net-misc/wicd/files/wicd-1.7.2.4-fix-dbus-error.patch
new file mode 100644
index 000000000000..2fddc9a2e55f
--- /dev/null
+++ b/net-misc/wicd/files/wicd-1.7.2.4-fix-dbus-error.patch
@@ -0,0 +1,16 @@
+=== modified file 'wicd/misc.py'
+--- wicd/misc.py 2012-04-30 19:20:47 +0000
++++ wicd/misc.py 2012-05-03 16:01:49 +0000
+@@ -430,7 +430,10 @@
+ """ Sanitize property names to be used in config-files. """
+ allowed = string.ascii_letters + '_' + string.digits
+ table = string.maketrans(allowed, ' ' * len(allowed))
+- return s.translate(None, table)
++
++ # s is a dbus.String -- since we don't allow unicode property keys,
++ # make it simple.
++ return str(s).translate(None, table)
+
+ def sanitize_escaped(s):
+ """ Sanitize double-escaped unicode strings. """
+
diff --git a/net-misc/wicd/files/wicd-1.7.2.4-fix-desktop-categories.patch b/net-misc/wicd/files/wicd-1.7.2.4-fix-desktop-categories.patch
new file mode 100644
index 000000000000..d2b856236606
--- /dev/null
+++ b/net-misc/wicd/files/wicd-1.7.2.4-fix-desktop-categories.patch
@@ -0,0 +1,20 @@
+diff -U 3 -dHrN wicd-1.7.2.4.orig/other/wicd.desktop wicd-1.7.2.4/other/wicd.desktop
+--- wicd-1.7.2.4.orig/other/wicd.desktop 2013-06-24 22:18:00.715578998 +0200
++++ wicd-1.7.2.4/other/wicd.desktop 2013-06-24 22:18:57.672595363 +0200
+@@ -1,5 +1,5 @@
+ [Desktop Entry]
+-Categories=Application;Network;
++Categories=Network;Settings;Utility;
+ Exec=wicd-gtk --no-tray
+ GenericName=Network Manager
+ Icon=wicd-gtk
+diff -U 3 -dHrN wicd-1.7.2.4.orig/other/wicd-tray.desktop wicd-1.7.2.4/other/wicd-tray.desktop
+--- wicd-1.7.2.4.orig/other/wicd-tray.desktop 2013-06-24 22:18:00.715578998 +0200
++++ wicd-1.7.2.4/other/wicd-tray.desktop 2013-06-24 22:18:59.864595996 +0200
+@@ -1,5 +1,5 @@
+ [Desktop Entry]
+-Categories=Application;Network;
++Categories=Network;Settings;Utility;
+ Exec=wicd-gtk --tray
+ GenericName=Network Manager
+ Icon=wicd-gtk
diff --git a/net-misc/wicd/files/wicd-1.7.2.4-second-urwid.patch b/net-misc/wicd/files/wicd-1.7.2.4-second-urwid.patch
new file mode 100644
index 000000000000..9a0bae6c9625
--- /dev/null
+++ b/net-misc/wicd/files/wicd-1.7.2.4-second-urwid.patch
@@ -0,0 +1,43 @@
+=== modified file 'curses/curses_misc.py'
+--- curses/curses_misc.py 2012-11-15 09:26:21 +0000
++++ curses/curses_misc.py 2012-11-16 09:22:47 +0000
+@@ -352,7 +352,7 @@
+ if urwid.VERSION < (1, 1, 0):
+ self.focus = focus
+ else:
+- self.focus_position = focus
++ self._w.focus_position = focus
+
+ self.callback = callback
+ self.user_args = user_args
+@@ -368,7 +368,10 @@
+ if urwid.VERSION < (1, 1, 0):
+ self.focus = index
+ else:
+- self.focus_position = index
++ try:
++ self._w.focus_position = index
++ except IndexError:
++ pass
+
+ # API changed between urwid 0.9.8.4 and 0.9.9
+ try:
+@@ -386,7 +389,7 @@
+ if urwid.VERSION < (1, 1, 0):
+ index = self.focus
+ else:
+- index = self.focus_position
++ index = self._w.focus_position
+
+ self.cbox = DynWrap(SelText([self.list[index]+self.DOWN_ARROW]),
+ attrs=self.attrs,focus_attr=self.focus_attr)
+@@ -434,7 +437,7 @@
+ if urwid.VERSION < (1, 1, 0):
+ return None, self.focus
+ else:
+- return None, self.focus_position
++ return None, self._w.focus_position
+
+ def get_sensitive(self):
+ return self.cbox.get_sensitive()
+
diff --git a/net-misc/wicd/files/wicd-1.7.2.4-urwid.patch b/net-misc/wicd/files/wicd-1.7.2.4-urwid.patch
new file mode 100644
index 000000000000..63eba2ed48b6
--- /dev/null
+++ b/net-misc/wicd/files/wicd-1.7.2.4-urwid.patch
@@ -0,0 +1,66 @@
+=== modified file 'curses/curses_misc.py'
+--- curses/curses_misc.py 2012-05-06 15:16:15 +0000
++++ curses/curses_misc.py 2012-11-15 09:26:21 +0000
+@@ -349,7 +349,10 @@
+ # We need this to pick our keypresses
+ self.use_enter = use_enter
+
+- self.focus = focus
++ if urwid.VERSION < (1, 1, 0):
++ self.focus = focus
++ else:
++ self.focus_position = focus
+
+ self.callback = callback
+ self.user_args = user_args
+@@ -362,7 +365,11 @@
+ self.list = list
+
+ def set_focus(self,index):
+- self.focus = index
++ if urwid.VERSION < (1, 1, 0):
++ self.focus = index
++ else:
++ self.focus_position = index
++
+ # API changed between urwid 0.9.8.4 and 0.9.9
+ try:
+ self.cbox.set_w(SelText(self.list[index]+self.DOWN_ARROW))
+@@ -376,16 +383,21 @@
+ def build_combobox(self,parent,ui,row):
+ str,trash = self.label.get_text()
+
+- self.cbox = DynWrap(SelText([self.list[self.focus]+self.DOWN_ARROW]),
++ if urwid.VERSION < (1, 1, 0):
++ index = self.focus
++ else:
++ index = self.focus_position
++
++ self.cbox = DynWrap(SelText([self.list[index]+self.DOWN_ARROW]),
+ attrs=self.attrs,focus_attr=self.focus_attr)
+ if str != '':
+ w = urwid.Columns([('fixed',len(str),self.label),self.cbox],
+ dividechars=1)
+- self.overlay = self.ComboSpace(self.list,parent,ui,self.focus,
++ self.overlay = self.ComboSpace(self.list,parent,ui,index,
+ pos=(len(str)+1,row))
+ else:
+ w = urwid.Columns([self.cbox])
+- self.overlay = self.ComboSpace(self.list,parent,ui,self.focus,
++ self.overlay = self.ComboSpace(self.list,parent,ui,index,
+ pos=(0,row))
+
+ self._w = w
+@@ -419,7 +431,10 @@
+ if self.overlay:
+ return self.overlay._listbox.get_focus()
+ else:
+- return None,self.focus
++ if urwid.VERSION < (1, 1, 0):
++ return None, self.focus
++ else:
++ return None, self.focus_position
+
+ def get_sensitive(self):
+ return self.cbox.get_sensitive()
+
diff --git a/net-misc/wicd/files/wicd-1.7.3-add-missing-gnome-shell-extension.patch b/net-misc/wicd/files/wicd-1.7.3-add-missing-gnome-shell-extension.patch
new file mode 100644
index 000000000000..9ea419eb4e71
--- /dev/null
+++ b/net-misc/wicd/files/wicd-1.7.3-add-missing-gnome-shell-extension.patch
@@ -0,0 +1,39 @@
+diff -U 3 -dHrN wicd-1.7.3.orig/gnome-shell/extension.js wicd-1.7.3/gnome-shell/extension.js
+--- wicd-1.7.3.orig/gnome-shell/extension.js 1970-01-01 01:00:00.000000000 +0100
++++ wicd-1.7.3/gnome-shell/extension.js 2015-01-19 14:12:12.962333228 +0100
+@@ -0,0 +1,29 @@
++/*
++ * Copyright © 2012, David Paleino <d.paleino@gmail.com>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License Version 2 as
++ * published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program. If not, see <http://www.gnu.org/licenses/>.
++ *
++ */
++
++const StatusIconDispatcher = imports.ui.statusIconDispatcher;
++
++function init(metadata) {
++}
++
++function enable() {
++ StatusIconDispatcher.STANDARD_TRAY_ICON_IMPLEMENTATIONS['wicd-client.py'] = 'wicd-gtk';
++}
++
++function disable() {
++ StatusIconDispatcher.STANDARD_TRAY_ICON_IMPLEMENTATIONS['wicd-client.py'] = '';
++}
+diff -U 3 -dHrN wicd-1.7.3.orig/gnome-shell/metadata.json wicd-1.7.3/gnome-shell/metadata.json
+--- wicd-1.7.3.orig/gnome-shell/metadata.json 1970-01-01 01:00:00.000000000 +0100
++++ wicd-1.7.3/gnome-shell/metadata.json 2015-01-19 14:12:12.962333228 +0100
+@@ -0,0 +1 @@
++{"shell-version": ["3.4.2"], "uuid": "wicd@code.hanskalabs.net", "name": "WICD Network Manager", "description": "Show status of WICD"}
+\ No newline at end of file
diff --git a/net-misc/wicd/files/wicd-1.7.3-undefined-LANG.patch b/net-misc/wicd/files/wicd-1.7.3-undefined-LANG.patch
new file mode 100644
index 000000000000..b854607d9583
--- /dev/null
+++ b/net-misc/wicd/files/wicd-1.7.3-undefined-LANG.patch
@@ -0,0 +1,24 @@
+Fixes compilation errors when os.environ['LANG'] is undefiend
+--- ./setup.py
++++ ./setup.py
+@@ -621,7 +621,7 @@ class compile_translations(Command):
+ shutil.rmtree('translations/')
+ os.makedirs('translations')
+
+- oldlang = os.environ['LANG']
++ oldlang = os.environ.get('LANG', None)
+ os.environ['LANG'] = 'C'
+
+ for pofile in sorted(glob('po/*.po')):
+@@ -656,7 +656,10 @@ class compile_translations(Command):
+ os.makedirs('translations/' + lang + '/LC_MESSAGES/')
+ os.system('pybabel compile -D wicd -i %s -l %s -d translations/' % (pofile, lang))
+
+- os.environ['LANG'] = oldlang
++ if oldlang is not None:
++ os.environ['LANG'] = oldlang
++ else:
++ del os.environ['LANG']
+
+ class uninstall(Command):
+ description = "remove Wicd using uninstall.sh and install.log"
diff --git a/net-misc/wicd/files/wicd-1.7.3-urwid-1.3.0.patch b/net-misc/wicd/files/wicd-1.7.3-urwid-1.3.0.patch
new file mode 100644
index 000000000000..a028059f5615
--- /dev/null
+++ b/net-misc/wicd/files/wicd-1.7.3-urwid-1.3.0.patch
@@ -0,0 +1,15 @@
+--- curses/wicd-curses.py 2015-01-27 22:35:25.414781192 -0300
++++ cursesb/wicd-curses.py 2015-01-28 01:13:48.078904587 -0300
+@@ -1153,9 +1153,10 @@
+ if not ui._started:
+ return False
+
+- input_data = ui.get_input_nonblocking()
++ ui.set_input_timeouts(max_wait=0)
++ input_data = ui.get_input()
+ # Resolve any "alarms" in the waiting
+- self.handle_keys(input_data[1])
++ self.handle_keys(input_data)
+
+ # Update the screen
+ canvas = self.frame.render((self.size), True)
diff --git a/net-misc/wicd/files/wicd-init-sve-start.patch b/net-misc/wicd/files/wicd-init-sve-start.patch
new file mode 100644
index 000000000000..c6314920d74a
--- /dev/null
+++ b/net-misc/wicd/files/wicd-init-sve-start.patch
@@ -0,0 +1,10 @@
+diff -U 3 -dHrN wicd-1.7.1b2.old/in/init=gentoo=wicd.in wicd-1.7.1b2/in/init=gentoo=wicd.in
+--- wicd-1.7.1b2.old/in/init=gentoo=wicd.in 2011-05-07 20:52:13.000000000 +0200
++++ wicd-1.7.1b2/in/init=gentoo=wicd.in 2011-05-07 20:52:43.000000000 +0200
+@@ -35,5 +35,5 @@
+
+ restart() {
+ force_kill
+- start
++ sve_start
+ }
diff --git a/net-misc/wicd/files/wicd-init.d b/net-misc/wicd/files/wicd-init.d
new file mode 100644
index 000000000000..3f14f094624c
--- /dev/null
+++ b/net-misc/wicd/files/wicd-init.d
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+opts="start stop restart"
+
+WICD_DAEMON=/usr/sbin/wicd
+WICD_PIDFILE=/var/run/wicd/wicd.pid
+
+depend() {
+ need dbus
+}
+
+start() {
+ ebegin "Starting wicd daemon"
+ "${WICD_DAEMON}" >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping wicd daemon"
+ start-stop-daemon --stop --pidfile "${WICD_PIDFILE}"
+ eend $?
+}
diff --git a/net-misc/wicd/metadata.xml b/net-misc/wicd/metadata.xml
new file mode 100644
index 000000000000..15db7c7de815
--- /dev/null
+++ b/net-misc/wicd/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>tomka@gentoo.org</email>
+ <name>Thomas Kahle</name>
+ </maintainer>
+ <use>
+ <flag name="ambiance">Install icons from Ubuntu's ambiance theme</flag>
+ <flag name="gtk">Installs a gtk UI. This is enabled by default because it is
+ intended behavior. Requires <pkg>dev-python/pygtk</pkg></flag>
+ <flag name="ioctl">Installs additional python libraries to use as a backend.
+ This will improve speed but is experimental.</flag>
+ <flag name="mac4lin">Change default icons to mac4lin icon set</flag>
+ <flag name="ncurses">Installs a ncurses UI</flag>
+ <flag name="pm-utils">Installs the pm-utils hooks for suspend/resume and
+ requires <pkg>sys-power/pm-utils</pkg></flag>
+ <flag name="gnome-shell">Install gnome-shell extension</flag>
+ </use>
+ <upstream>
+ <remote-id type="launchpad">wicd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/wicd/wicd-1.7.2.4-r3.ebuild b/net-misc/wicd/wicd-1.7.2.4-r3.ebuild
new file mode 100644
index 000000000000..829c1898c537
--- /dev/null
+++ b/net-misc/wicd/wicd-1.7.2.4-r3.ebuild
@@ -0,0 +1,142 @@
+# 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?,xml"
+
+inherit eutils distutils-r1 linux-info readme.gentoo systemd
+
+DESCRIPTION="A lightweight wired and wireless network manager for Linux"
+HOMEPAGE="https://launchpad.net/wicd"
+SRC_URI="http://launchpad.net/wicd/1.7/${PV}/+download/${P}.tar.gz
+ mac4lin? ( http://dev.gentoo.org/~anarchy/dist/wicd-mac4lin-icons.tar.xz )
+ ambiance? ( http://freetimesblog.altervista.org/blog/wp-content/uploads/downloads/2010/05/Icone-Wicd-Lucid.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~mips ppc ppc64 x86"
+IUSE="doc X ambiance +gtk ioctl libnotify mac4lin ncurses nls +pm-utils"
+
+DEPEND="nls? ( dev-python/Babel )"
+RDEPEND="${PYTHON_DEPS}
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ X? (
+ gtk? ( dev-python/pygtk )
+ || (
+ x11-misc/ktsuss
+ x11-libs/gksu
+ kde-apps/kdesu
+ )
+ )
+ || (
+ net-misc/dhcpcd
+ net-misc/dhcp
+ net-misc/pump
+ )
+ net-wireless/wireless-tools
+ net-wireless/wpa_supplicant
+ || (
+ sys-apps/net-tools
+ sys-apps/ethtool
+ )
+ !gtk? ( dev-python/pygobject:2[${PYTHON_USEDEP}] )
+ ioctl? ( dev-python/python-iwscan dev-python/python-wpactrl )
+ libnotify? ( dev-python/notify-python[${PYTHON_USEDEP}] )
+ ncurses? (
+ dev-python/urwid
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ )
+ pm-utils? ( sys-power/pm-utils )
+ "
+
+src_prepare() {
+ CONFIG_CHECK="~CFG80211_WEXT"
+ local WARNING_CFG80211_WEXT="Wireless extensions have not been \
+ configured in your kernel. Wicd will not work unless CFG80211_WEXT is set."
+ check_extra_config
+
+ # Fix bug 441966 (urwid-1.1.0 compatibility)
+ epatch "${FILESDIR}"/${P}-urwid.patch
+ epatch "${FILESDIR}"/${P}-second-urwid.patch
+ epatch "${FILESDIR}"/${PN}-1.7.1_beta2-init.patch
+ epatch "${FILESDIR}"/${PN}-init-sve-start.patch
+ # Add a template for hex psk's and wpa (Bug 306423)
+ epatch "${FILESDIR}"/${PN}-1.7.1_pre20111210-wpa-psk-hex-template.patch
+ # The Categories entry in the .desktop files is outdated
+ epatch "${FILESDIR}"/${P}-fix-desktop-categories.patch
+ # Fix bug 416579 (should be included in next release)
+ epatch "${FILESDIR}"/${P}-fix-dbus-error.patch
+ # get rid of opts variable to fix bug 381885
+ sed -i "/opts/d" "in/init=gentoo=wicd.in" || die
+ # Make init script provide net per bug 405775
+ epatch "${FILESDIR}"/${PN}-1.7.1-provide-net.patch
+ # Need to ensure that generated scripts use Python 2 at run time.
+ sed -e "s:self.python = '/usr/bin/python':self.python = '/usr/bin/python2':" \
+ -i setup.py || die "sed failed"
+ # Fix misc helper scripts:
+ sed -e "s:/usr/bin/env python:/usr/bin/env python2:" \
+ -i wicd/suspend.py wicd/autoconnect.py wicd/monitor.py
+ if use nls; then
+ # Asturian is faulty with PyBabel
+ # (https://bugs.launchpad.net/wicd/+bug/928589)
+ rm po/ast.po
+ # zh_CN fails with newer PyBabel (Aug 2013)
+ rm po/zh_CN.po
+ else
+ # nuke translations
+ rm po/*.po
+ fi
+
+ DOC_CONTENTS="To start wicd at boot with openRC, add
+ /etc/init.d/wicd to a runlevel and: (1) Remove all net.*
+ initscripts (except for net.lo) from all runlevels (2) Add these
+ scripts to the RC_PLUG_SERVICES line in /etc/rc.conf (For
+ example, rc_hotplug=\"!net.eth* !net.wlan*\")"
+}
+
+src_configure() {
+ local myconf
+ use gtk || myconf="${myconf} --no-install-gtk"
+ use libnotify || myconf="${myconf} --no-use-notifications"
+ use ncurses || myconf="${myconf} --no-install-ncurses"
+ use pm-utils || myconf="${myconf} --no-install-pmutils"
+ python_export_best
+ "${EPYTHON}" ./setup.py configure --no-install-docs \
+ --resume=/usr/share/wicd/scripts/ \
+ --suspend=/usr/share/wicd/scripts/ \
+ --verbose ${myconf}
+}
+
+src_install() {
+ distutils-r1_src_install
+ keepdir /var/lib/wicd/configurations
+ keepdir /etc/wicd/scripts/{postconnect,disconnect,preconnect}
+ keepdir /var/log/wicd
+ use nls || rm -rf "${D}"/usr/share/locale
+ systemd_dounit "${S}/other/wicd.service"
+
+ if use mac4lin; then
+ rm -rf "${D}"/usr/share/pixmaps/wicd || die "Failed to remove old icons"
+ mv "${WORKDIR}"/wicd "${D}"/usr/share/pixmaps/
+ fi
+ if use ambiance; then
+ # Overwrite tray icons with ambiance icon
+ rm "${WORKDIR}/Icone Wicd Lucid"/signal*
+ cp "${WORKDIR}/Icone Wicd Lucid"/*.png "${D}"/usr/share/pixmaps/wicd/
+ fi
+ readme.gentoo_src_install
+}
+
+pkg_postinst() {
+ # Maintainer's note: the consolekit use flag short circuits a dbus rule and
+ # allows the connection. Else, you need to be in the group.
+ if ! has_version sys-auth/consolekit; then
+ ewarn "Wicd-1.6 and newer requires your user to be in the 'users' group. If"
+ ewarn "you are not in that group, then modify /etc/dbus-1/system.d/wicd.conf"
+ fi
+
+ readme.gentoo_print_elog
+}
diff --git a/net-misc/wicd/wicd-1.7.3-r1.ebuild b/net-misc/wicd/wicd-1.7.3-r1.ebuild
new file mode 100644
index 000000000000..5e0bace30099
--- /dev/null
+++ b/net-misc/wicd/wicd-1.7.3-r1.ebuild
@@ -0,0 +1,142 @@
+# 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?,xml"
+
+inherit eutils distutils-r1 linux-info readme.gentoo systemd
+
+DESCRIPTION="A lightweight wired and wireless network manager for Linux"
+HOMEPAGE="https://launchpad.net/wicd"
+SRC_URI="http://launchpad.net/wicd/1.7/${PV}/+download/${P}.tar.gz
+ mac4lin? ( http://dev.gentoo.org/~anarchy/dist/wicd-mac4lin-icons.tar.xz )
+ ambiance? ( http://freetimesblog.altervista.org/blog/wp-content/uploads/downloads/2010/05/Icone-Wicd-Lucid.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
+IUSE="doc X ambiance +gtk ioctl libnotify mac4lin ncurses nls +pm-utils gnome-shell"
+
+DEPEND="nls? ( dev-python/Babel[${PYTHON_USEDEP}] )"
+RDEPEND="${PYTHON_DEPS}
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ X? (
+ gtk? ( dev-python/pygtk[${PYTHON_USEDEP}] )
+ || (
+ x11-misc/ktsuss
+ x11-libs/gksu
+ kde-apps/kdesu
+ )
+ )
+ || (
+ net-misc/dhcpcd
+ net-misc/dhcp
+ net-misc/pump
+ )
+ net-wireless/wireless-tools
+ net-wireless/wpa_supplicant
+ || (
+ sys-apps/net-tools
+ sys-apps/ethtool
+ )
+ !gtk? ( dev-python/pygobject:2[${PYTHON_USEDEP}] )
+ ioctl? ( dev-python/python-iwscan[${PYTHON_USEDEP}]
+ dev-python/python-wpactrl[${PYTHON_USEDEP}] )
+ libnotify? ( dev-python/notify-python[${PYTHON_USEDEP}] )
+ ncurses? (
+ dev-python/urwid[${PYTHON_USEDEP}]
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ )
+ pm-utils? ( sys-power/pm-utils )
+ gnome-shell? ( gnome-base/gnome-shell )
+ "
+
+src_prepare() {
+ CONFIG_CHECK="~CFG80211_WEXT"
+ local WARNING_CFG80211_WEXT="Wireless extensions have not been \
+ configured in your kernel. Wicd will not work unless CFG80211_WEXT is set."
+ check_extra_config
+
+ epatch "${FILESDIR}"/${PN}-init-sve-start.patch
+ # The Categories entry in the .desktop files is outdated
+ epatch "${FILESDIR}"/${PN}-1.7.2.4-fix-desktop-categories.patch
+ # Upstream bug https://bugs.launchpad.net/wicd/+bug/1412413
+ # Creates files -> give -p
+ epatch -p1 "${FILESDIR}"/${P}-add-missing-gnome-shell-extension.patch
+ # If LANG is undefined, build can fail (bug 537202)
+ epatch "${FILESDIR}"/${P}-undefined-LANG.patch
+ # Fix urwid compat again
+ epatch "${FILESDIR}"/${P}-urwid-1.3.0.patch
+ # get rid of opts variable to fix bug 381885
+ sed -i "/opts/d" "in/init=gentoo=wicd.in" || die
+ # Need to ensure that generated scripts use Python 2 at run time.
+ sed -e "s:self.python = '/usr/bin/python':self.python = '/usr/bin/python2':" \
+ -i setup.py || die "sed failed"
+ # Fix misc helper scripts:
+ sed -e "s:/usr/bin/env python:/usr/bin/env python2:" \
+ -i wicd/suspend.py wicd/autoconnect.py wicd/monitor.py
+ if use nls; then
+ # Asturian is faulty with PyBabel
+ # (https://bugs.launchpad.net/wicd/+bug/928589)
+ rm po/ast.po
+ # zh_CN fails with newer PyBabel (Aug 2013)
+ rm po/zh_CN.po
+ else
+ # nuke translations
+ rm po/*.po
+ fi
+
+ DOC_CONTENTS="To start wicd at boot with openRC, add
+ /etc/init.d/wicd to a runlevel and: (1) Remove all net.*
+ initscripts (except for net.lo) from all runlevels (2) Add these
+ scripts to the RC_PLUG_SERVICES line in /etc/rc.conf (For
+ example, rc_hotplug=\"!net.eth* !net.wlan*\")"
+}
+
+src_configure() {
+ local myconf
+ use gtk || myconf="${myconf} --no-install-gtk"
+ use libnotify || myconf="${myconf} --no-use-notifications"
+ use ncurses || myconf="${myconf} --no-install-ncurses"
+ use pm-utils || myconf="${myconf} --no-install-pmutils"
+ use gnome-shell || myconf="${myconf} --no-install-gnome-shell-extensions"
+ python_setup
+ "${EPYTHON}" ./setup.py configure --no-install-docs \
+ --resume=/usr/share/wicd/scripts/ \
+ --suspend=/usr/share/wicd/scripts/ \
+ --verbose ${myconf}
+}
+
+src_install() {
+ distutils-r1_src_install
+ keepdir /var/lib/wicd/configurations
+ keepdir /etc/wicd/scripts/{postconnect,disconnect,preconnect}
+ keepdir /var/log/wicd
+ use nls || rm -rf "${D}"/usr/share/locale
+ systemd_dounit "${S}/other/wicd.service"
+
+ if use mac4lin; then
+ rm -rf "${D}"/usr/share/pixmaps/wicd || die "Failed to remove old icons"
+ mv "${WORKDIR}"/wicd "${D}"/usr/share/pixmaps/
+ fi
+ if use ambiance; then
+ # Overwrite tray icons with ambiance icon
+ rm "${WORKDIR}/Icone Wicd Lucid"/signal*
+ cp "${WORKDIR}/Icone Wicd Lucid"/*.png "${D}"/usr/share/pixmaps/wicd/
+ fi
+ readme.gentoo_src_install
+}
+
+pkg_postinst() {
+ # Maintainer's note: the consolekit use flag short circuits a dbus rule and
+ # allows the connection. Else, you need to be in the group.
+ if ! has_version sys-auth/consolekit; then
+ ewarn "Wicd-1.6 and newer requires your user to be in the 'users' group. If"
+ ewarn "you are not in that group, then modify /etc/dbus-1/system.d/wicd.conf"
+ fi
+
+ readme.gentoo_print_elog
+}
diff --git a/net-misc/wicd/wicd-1.7.3.ebuild b/net-misc/wicd/wicd-1.7.3.ebuild
new file mode 100644
index 000000000000..e4a854906229
--- /dev/null
+++ b/net-misc/wicd/wicd-1.7.3.ebuild
@@ -0,0 +1,139 @@
+# 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?,xml"
+
+inherit eutils distutils-r1 linux-info readme.gentoo systemd
+
+DESCRIPTION="A lightweight wired and wireless network manager for Linux"
+HOMEPAGE="https://launchpad.net/wicd"
+SRC_URI="http://launchpad.net/wicd/1.7/${PV}/+download/${P}.tar.gz
+ mac4lin? ( http://dev.gentoo.org/~anarchy/dist/wicd-mac4lin-icons.tar.xz )
+ ambiance? ( http://freetimesblog.altervista.org/blog/wp-content/uploads/downloads/2010/05/Icone-Wicd-Lucid.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~mips ppc ppc64 x86"
+IUSE="doc X ambiance +gtk ioctl libnotify mac4lin ncurses nls +pm-utils gnome-shell"
+
+DEPEND="nls? ( dev-python/Babel )"
+RDEPEND="${PYTHON_DEPS}
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ X? (
+ gtk? ( dev-python/pygtk )
+ || (
+ x11-misc/ktsuss
+ x11-libs/gksu
+ kde-apps/kdesu
+ )
+ )
+ || (
+ net-misc/dhcpcd
+ net-misc/dhcp
+ net-misc/pump
+ )
+ net-wireless/wireless-tools
+ net-wireless/wpa_supplicant
+ || (
+ sys-apps/net-tools
+ sys-apps/ethtool
+ )
+ !gtk? ( dev-python/pygobject:2[${PYTHON_USEDEP}] )
+ ioctl? ( dev-python/python-iwscan dev-python/python-wpactrl )
+ libnotify? ( dev-python/notify-python[${PYTHON_USEDEP}] )
+ ncurses? (
+ dev-python/urwid
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ )
+ pm-utils? ( sys-power/pm-utils )
+ gnome-shell? ( gnome-base/gnome-shell )
+ "
+
+src_prepare() {
+ CONFIG_CHECK="~CFG80211_WEXT"
+ local WARNING_CFG80211_WEXT="Wireless extensions have not been \
+ configured in your kernel. Wicd will not work unless CFG80211_WEXT is set."
+ check_extra_config
+
+ epatch "${FILESDIR}"/${PN}-init-sve-start.patch
+ # The Categories entry in the .desktop files is outdated
+ epatch "${FILESDIR}"/${PN}-1.7.2.4-fix-desktop-categories.patch
+ # Upstream bug https://bugs.launchpad.net/wicd/+bug/1412413
+ # Creates files -> give -p
+ epatch -p1 "${FILESDIR}"/${P}-add-missing-gnome-shell-extension.patch
+ # If LANG is undefined, build can fail (bug 537202)
+ epatch "${FILESDIR}"/${P}-undefined-LANG.patch
+ # get rid of opts variable to fix bug 381885
+ sed -i "/opts/d" "in/init=gentoo=wicd.in" || die
+ # Need to ensure that generated scripts use Python 2 at run time.
+ sed -e "s:self.python = '/usr/bin/python':self.python = '/usr/bin/python2':" \
+ -i setup.py || die "sed failed"
+ # Fix misc helper scripts:
+ sed -e "s:/usr/bin/env python:/usr/bin/env python2:" \
+ -i wicd/suspend.py wicd/autoconnect.py wicd/monitor.py
+ if use nls; then
+ # Asturian is faulty with PyBabel
+ # (https://bugs.launchpad.net/wicd/+bug/928589)
+ rm po/ast.po
+ # zh_CN fails with newer PyBabel (Aug 2013)
+ rm po/zh_CN.po
+ else
+ # nuke translations
+ rm po/*.po
+ fi
+
+ DOC_CONTENTS="To start wicd at boot with openRC, add
+ /etc/init.d/wicd to a runlevel and: (1) Remove all net.*
+ initscripts (except for net.lo) from all runlevels (2) Add these
+ scripts to the RC_PLUG_SERVICES line in /etc/rc.conf (For
+ example, rc_hotplug=\"!net.eth* !net.wlan*\")"
+}
+
+src_configure() {
+ local myconf
+ use gtk || myconf="${myconf} --no-install-gtk"
+ use libnotify || myconf="${myconf} --no-use-notifications"
+ use ncurses || myconf="${myconf} --no-install-ncurses"
+ use pm-utils || myconf="${myconf} --no-install-pmutils"
+ use gnome-shell || myconf="${myconf} --no-install-gnome-shell-extensions"
+ python_setup
+ "${EPYTHON}" ./setup.py configure --no-install-docs \
+ --resume=/usr/share/wicd/scripts/ \
+ --suspend=/usr/share/wicd/scripts/ \
+ --verbose ${myconf}
+}
+
+src_install() {
+ distutils-r1_src_install
+ keepdir /var/lib/wicd/configurations
+ keepdir /etc/wicd/scripts/{postconnect,disconnect,preconnect}
+ keepdir /var/log/wicd
+ use nls || rm -rf "${D}"/usr/share/locale
+ systemd_dounit "${S}/other/wicd.service"
+
+ if use mac4lin; then
+ rm -rf "${D}"/usr/share/pixmaps/wicd || die "Failed to remove old icons"
+ mv "${WORKDIR}"/wicd "${D}"/usr/share/pixmaps/
+ fi
+ if use ambiance; then
+ # Overwrite tray icons with ambiance icon
+ rm "${WORKDIR}/Icone Wicd Lucid"/signal*
+ cp "${WORKDIR}/Icone Wicd Lucid"/*.png "${D}"/usr/share/pixmaps/wicd/
+ fi
+ readme.gentoo_src_install
+}
+
+pkg_postinst() {
+ # Maintainer's note: the consolekit use flag short circuits a dbus rule and
+ # allows the connection. Else, you need to be in the group.
+ if ! has_version sys-auth/consolekit; then
+ ewarn "Wicd-1.6 and newer requires your user to be in the 'users' group. If"
+ ewarn "you are not in that group, then modify /etc/dbus-1/system.d/wicd.conf"
+ fi
+
+ readme.gentoo_print_elog
+}
diff --git a/net-misc/wol/Manifest b/net-misc/wol/Manifest
new file mode 100644
index 000000000000..ebfe810bf668
--- /dev/null
+++ b/net-misc/wol/Manifest
@@ -0,0 +1 @@
+DIST wol-0.7.1.tar.gz 445648 SHA256 e0086c9b9811df2bdf763ec9016dfb1bcb7dba9fa6d7858725b0929069a12622 SHA512 233cbd038633c4b04a22710c04a8349d7706c6b4ff0554b6899ee3309349502a318f6fb05a4ad4c80cd373c362b2ad8818cb52a432d768f569e80f05658615a3 WHIRLPOOL 36f9e9fdfe76846e9f65a2c7e83530532dc24c8dff6fe6f5e30c53659d59be926aaef13e028f23f325564a4d7b43dfbc9759b5ca9d354fb61edcf5ca46cbf7b3
diff --git a/net-misc/wol/metadata.xml b/net-misc/wol/metadata.xml
new file mode 100644
index 000000000000..31f0297e3ce5
--- /dev/null
+++ b/net-misc/wol/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>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <longdescription>
+wol implements Wake On LAN functionality in a small program. It wakes up hardware that is Magic Packet compliant.
+Consider you have a sleeping or turned-off computer and you want to remotely wake him up. Just type
+"wol MAC-ADDRESS" and the host wakes up (OK, it will boot ;-).
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">ahh</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/wol/wol-0.7.1-r1.ebuild b/net-misc/wol/wol-0.7.1-r1.ebuild
new file mode 100644
index 000000000000..cc7d1f428d9e
--- /dev/null
+++ b/net-misc/wol/wol-0.7.1-r1.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Wake up hardware that is Magic Packet compliant"
+HOMEPAGE="http://ahh.sourceforge.net/wol/"
+SRC_URI="mirror://sourceforge/ahh/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ppc ~ppc64 x86 ~x86-fbsd"
+IUSE="nls"
+
+src_configure() {
+ econf \
+ $(use_enable nls)
+}
diff --git a/net-misc/wput/Manifest b/net-misc/wput/Manifest
new file mode 100644
index 000000000000..669dc9936820
--- /dev/null
+++ b/net-misc/wput/Manifest
@@ -0,0 +1 @@
+DIST wput-0.6.1.tgz 312342 SHA256 67125acab1d520e5d2a0429cd9cf7fc379987f30d5bbed0b0e97b92b554fcc13
diff --git a/net-misc/wput/files/wput-0.6-gentoo.diff b/net-misc/wput/files/wput-0.6-gentoo.diff
new file mode 100644
index 000000000000..312172348d02
--- /dev/null
+++ b/net-misc/wput/files/wput-0.6-gentoo.diff
@@ -0,0 +1,18 @@
+diff -urN wput/Makefile.in wput/Makefile.in
+--- wput/Makefile.in 2006-04-04 18:16:52.000000000 +0100
++++ wput/Makefile.in 2006-11-07 17:31:10.000000000 +0000
+@@ -15,8 +15,12 @@
+
+ install: all
+ cd po && $(MAKE) $(MAKEDEFS) $@
+- install -m0755 wput $(bindir)
+- install -m0644 doc/wput.1.gz $(mandir)
++
++ install -d $(DESTDIR)/$(bindir)
++ install -m0755 wput $(DESTDIR)/$(bindir)
++ install -d $(DESTDIR)/$(mandir)
++ install -m0644 doc/wput.1.gz $(DESTDIR)/$(mandir)
++
+ @echo "----------------"
+ @echo "Wput installed. See 'wput -h' or 'man wput' for usage information."
+ @echo "Further documentation is located in the doc/USAGE.* files."
diff --git a/net-misc/wput/files/wput-0.6-respectldflags.patch b/net-misc/wput/files/wput-0.6-respectldflags.patch
new file mode 100644
index 000000000000..d2b460b339b3
--- /dev/null
+++ b/net-misc/wput/files/wput-0.6-respectldflags.patch
@@ -0,0 +1,13 @@
+Index: wput/src/Makefile.in
+===================================================================
+--- wput.orig/src/Makefile.in
++++ wput/src/Makefile.in
+@@ -23,7 +23,7 @@ ftplib.o: socketlib.h ftplib.h
+ ftp-ls.o: ftp.h wget.h url.h
+
+ wput: $(OBJ)
+- $(CC) -o $(EXE) $(OBJ) $(LIBS)
++ $(CC) $(LDFLAGS) -o $(EXE) $(OBJ) $(LIBS)
+ clean:
+ rm -f *.o *~ *.bak ../wput getopt/*.o
+ win-clean: clean
diff --git a/net-misc/wput/metadata.xml b/net-misc/wput/metadata.xml
new file mode 100644
index 000000000000..e705eb72f8d0
--- /dev/null
+++ b/net-misc/wput/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>wired@gentoo.org</email>
+ <name>Alex Alexander</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">wput</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/wput/wput-0.6.1.ebuild b/net-misc/wput/wput-0.6.1.ebuild
new file mode 100644
index 000000000000..21c59d63ff03
--- /dev/null
+++ b/net-misc/wput/wput-0.6.1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="A tiny, wget-alike program, that is designed to upload files/whole directories to remote ftp-servers"
+HOMEPAGE="http://wput.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ~sparc x86"
+IUSE="debug nls ssl"
+
+RDEPEND="ssl? ( net-libs/gnutls )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${PN}-0.6-gentoo.diff"
+ # Fix bug 126828
+ epatch "${FILESDIR}/wput-0.6-respectldflags.patch"
+}
+
+src_compile() {
+ local myconf
+ use debug && myconf="--enable-memdbg=yes" || myconf="--enable-g-switch=no"
+ econf ${myconf} \
+ $(use_enable nls) \
+ $(use_with ssl) || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+ dodoc ChangeLog INSTALL TODO
+}
diff --git a/net-misc/x11-ssh-askpass/Manifest b/net-misc/x11-ssh-askpass/Manifest
new file mode 100644
index 000000000000..db8600d321f9
--- /dev/null
+++ b/net-misc/x11-ssh-askpass/Manifest
@@ -0,0 +1 @@
+DIST x11-ssh-askpass-1.2.4.1.tar.gz 29229 SHA256 620de3c32ae72185a2c9aeaec03af24242b9621964e38eb625afb6cdb30b8c88 SHA512 879887cc1d6eb26662494e3a6b59b79a8d153b354abf86e8e8667940545c8e07d0aa051491f5ba6ca5273e3a7fcc367edb4cc79bb2e4bf1bdbd0e234690ad6b9 WHIRLPOOL 0f305023d4d7f4a086122c8c0d5a0a8ecda463b71bed5960365660d293b3670f377d3e0177e743d86413425f6ff48119295dd98d6fc077ba7d759154342dd4de
diff --git a/net-misc/x11-ssh-askpass/metadata.xml b/net-misc/x11-ssh-askpass/metadata.xml
new file mode 100644
index 000000000000..028c4bed18ff
--- /dev/null
+++ b/net-misc/x11-ssh-askpass/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>cardoe@gentoo.org</email>
+ <description>I guess I'll maintain it since I fixed it last</description>
+</maintainer>
+</pkgmetadata>
diff --git a/net-misc/x11-ssh-askpass/x11-ssh-askpass-1.2.4.1-r1.ebuild b/net-misc/x11-ssh-askpass/x11-ssh-askpass-1.2.4.1-r1.ebuild
new file mode 100644
index 000000000000..016c3ac0df22
--- /dev/null
+++ b/net-misc/x11-ssh-askpass/x11-ssh-askpass-1.2.4.1-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 multilib
+
+DESCRIPTION="X11-based passphrase dialog for use with OpenSSH"
+HOMEPAGE="http://www.liquidmeme.net/software/x11-ssh-askpass/"
+SRC_URI="http://www.liquidmeme.net/software/x11-ssh-askpass/${P}.tar.gz"
+
+LICENSE="HPND"
+SLOT="0"
+KEYWORDS="alpha amd64 ia64 ppc sparc x86"
+IUSE=""
+
+RDEPEND="virtual/ssh
+ x11-libs/libXt
+ x11-libs/libX11
+ x11-libs/libSM
+ x11-libs/libICE"
+
+DEPEND="${RDEPEND}
+ x11-misc/imake
+ app-text/rman"
+
+src_compile() {
+ econf --libexecdir=/usr/$(get_libdir)/misc || die
+ xmkmf || die
+ make includes || die
+ make "CDEBUGFLAGS=${CFLAGS}" || die
+}
+
+src_install() {
+ newman x11-ssh-askpass.man x11-ssh-askpass.1
+ dobin x11-ssh-askpass
+ dodir /usr/$(get_libdir)/misc
+ dosym /usr/bin/x11-ssh-askpass /usr/$(get_libdir)/misc/ssh-askpass
+ dodoc ChangeLog README TODO
+}
diff --git a/net-misc/x11rdp/Manifest b/net-misc/x11rdp/Manifest
new file mode 100644
index 000000000000..4b9d79679a93
--- /dev/null
+++ b/net-misc/x11rdp/Manifest
@@ -0,0 +1,2 @@
+DIST xorg-server-1.9.5.tar.bz2 5172054 SHA256 3fc775097c4f0e8f731447d0183ee709ae37c44c0c286ba00a4b028274e029dc SHA512 f17baa6e871c7df4dc61330e32e235906d9e4c842a70226b0833d2b64ab62811131b960eb942f4dc9359ea828676ce60afd82802aa7cffc711d27c4946c32345 WHIRLPOOL a8ede9d5e4ae80713e2b363042a80fe7ac9a03f8623dbf058b241a4237edd2397b437dda5ea56076ec1da71b946dc5b936adfd4afd436893b5c8350996ba169e
+DIST xrdp-0.8.0.tar.xz 1671376 SHA256 433535039f8b8766d9c22f62de9599afa94dd553e72d9791cec85a5e2f436a60 SHA512 bb2afefce7f53b6c3bca30cb6913171211df63a700f7d70325c1722348d5d31981e1d417727e48fd14aad500d0454e4126e6e1f81f8c09da4928b02f4acff26b WHIRLPOOL 39c1d4852f6f927fd348d345a8d4f4a79824eca0d5682340908d28f3b6b497ae33bfed944294b061b118e4154ed7c5dce15878302145ffabc2ca6b3a2eb07818
diff --git a/net-misc/x11rdp/files/xorg-cve-2011-4028+4029.patch b/net-misc/x11rdp/files/xorg-cve-2011-4028+4029.patch
new file mode 100644
index 000000000000..66e77f66e002
--- /dev/null
+++ b/net-misc/x11rdp/files/xorg-cve-2011-4028+4029.patch
@@ -0,0 +1,22 @@
+diff --git a/os/utils.c b/os/utils.c
+index e8ecb71..18ff1ca 100644
+--- a/os/utils.c
++++ b/os/utils.c
+@@ -297,7 +297,7 @@ LockServer(void)
+ FatalError("Could not create lock file in %s\n", tmp);
+ (void) sprintf(pid_str, "%10ld\n", (long)getpid());
+ (void) write(lfd, pid_str, 11);
+- (void) chmod(tmp, 0444);
++ (void) fchmod(lfd, 0444);
+ (void) close(lfd);
+
+ /*
+@@ -318,7 +318,7 @@ LockServer(void)
+ /*
+ * Read the pid from the existing file
+ */
+- lfd = open(LockFile, O_RDONLY);
++ lfd = open(LockFile, O_RDONLY|O_NOFOLLOW);
+ if (lfd < 0) {
+ unlink(tmp);
+ FatalError("Can't read lock file %s\n", LockFile);
diff --git a/net-misc/x11rdp/files/xorg-server-1.9-cve-2013-1940.patch b/net-misc/x11rdp/files/xorg-server-1.9-cve-2013-1940.patch
new file mode 100644
index 000000000000..f06b923f3d92
--- /dev/null
+++ b/net-misc/x11rdp/files/xorg-server-1.9-cve-2013-1940.patch
@@ -0,0 +1,31 @@
+From 6ca03b9161d33b1d2b55a3a1a913cf88deb2343f Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@gmail.com>
+Date: Wed, 10 Apr 2013 06:09:01 +0000
+Subject: xf86: fix flush input to work with Linux evdev devices.
+
+So when we VT switch back and attempt to flush the input devices,
+we don't succeed because evdev won't return part of an event,
+since we were only asking for 4 bytes, we'd only get -EINVAL back.
+
+This could later cause events to be flushed that we shouldn't have
+gotten.
+
+This is a fix for CVE-2013-1940.
+
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+diff -ur a/hw/xfree86/os-support/shared/posix_tty.c b/hw/xfree86/os-support/shared/posix_tty.c
+--- a/hw/xfree86/os-support/shared/posix_tty.c 2010-06-11 08:10:22.000000000 +0200
++++ b/hw/xfree86/os-support/shared/posix_tty.c 2013-04-17 22:49:20.389795964 +0200
+@@ -460,7 +460,8 @@
+ {
+ fd_set fds;
+ struct timeval timeout;
+- char c[4];
++ /* this needs to be big enough to flush an evdev event. */
++ char c[256];
+
+ DebugF("FlushingSerial\n");
+ if (tcflush(fd, TCIFLUSH) == 0)
diff --git a/net-misc/x11rdp/files/xorg-server-1.9-cve-2013-4396.patch b/net-misc/x11rdp/files/xorg-server-1.9-cve-2013-4396.patch
new file mode 100644
index 000000000000..fa8b4825f7e4
--- /dev/null
+++ b/net-misc/x11rdp/files/xorg-server-1.9-cve-2013-4396.patch
@@ -0,0 +1,43 @@
+diff -ur a/dix/dixfonts.c b/dix/dixfonts.c
+--- a/dix/dixfonts.c 2011-12-18 05:44:54.000000000 +0100
++++ b/dix/dixfonts.c 2013-10-10 12:06:44.579225694 +0200
+@@ -1479,6 +1479,7 @@
+ GC *pGC;
+ unsigned char *data;
+ ITclosurePtr new_closure;
++ ITclosurePtr old_closure;
+
+ /* We're putting the client to sleep. We need to
+ save some state. Similar problem to that handled
+@@ -1491,6 +1492,7 @@
+ err = BadAlloc;
+ goto bail;
+ }
++ old_closure = c;
+ *new_closure = *c;
+ c = new_closure;
+
+@@ -1498,6 +1500,7 @@
+ if (!data)
+ {
+ free(c);
++ c = old_closure;
+ err = BadAlloc;
+ goto bail;
+ }
+@@ -1509,6 +1512,7 @@
+ {
+ free(c->data);
+ free(c);
++ c = old_closure;
+ err = BadAlloc;
+ goto bail;
+ }
+@@ -1522,6 +1526,7 @@
+ FreeScratchGC(pGC);
+ free(c->data);
+ free(c);
++ c = old_closure;
+ err = BadAlloc;
+ goto bail;
+ }
diff --git a/net-misc/x11rdp/files/xorg-server-1.9-nouveau-default.patch b/net-misc/x11rdp/files/xorg-server-1.9-nouveau-default.patch
new file mode 100644
index 000000000000..2b05967a9434
--- /dev/null
+++ b/net-misc/x11rdp/files/xorg-server-1.9-nouveau-default.patch
@@ -0,0 +1,30 @@
+diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
+index 74016af..9c296f5 100644
+--- a/hw/xfree86/common/xf86pciBus.c
++++ b/hw/xfree86/common/xf86pciBus.c
+@@ -1118,7 +1118,23 @@ videoPtrToDriverList(struct pci_device *dev,
+ break;
+ case 0x102b: driverList[0] = "mga"; break;
+ case 0x10c8: driverList[0] = "neomagic"; break;
+- case 0x10de: case 0x12d2: driverList[0] = "nv"; break;
++ case 0x10de: case 0x12d2:
++ switch (dev->device_id) {
++ /* NV1 */
++ case 0x0008:
++ case 0x0009:
++ driverList[0] = "vesa";
++ break;
++ /* NV3 */
++ case 0x0018:
++ case 0x0019:
++ driverList[0] = "nv";
++ break;
++ default:
++ driverList[0] = "nouveau";
++ break;
++ }
++ break;
+ case 0x1106: driverList[0] = "openchrome"; break;
+ case 0x1b36: driverList[0] = "qxl"; break;
+ case 0x1163: driverList[0] = "rendition"; break;
+--
diff --git a/net-misc/x11rdp/files/xorg-server-disable-acpi.patch b/net-misc/x11rdp/files/xorg-server-disable-acpi.patch
new file mode 100644
index 000000000000..cc80e6cef4e1
--- /dev/null
+++ b/net-misc/x11rdp/files/xorg-server-disable-acpi.patch
@@ -0,0 +1,31 @@
+From a8079882f1884edc62a9de28af915bd8b65dfbbe Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Wed, 11 Mar 2009 14:02:11 -0400
+Subject: [PATCH] Don't build the ACPI code.
+
+No good can come of this.
+---
+ configure.ac | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 72ae67e..04716f8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1269,13 +1269,11 @@ if test "x$XORG" = xyes; then
+ case $host_cpu in
+ ia64*)
+ linux_ia64=yes
+- linux_acpi="yes"
+ ;;
+ alpha*)
+ linux_alpha=yes
+ ;;
+ i*86|amd64*|x86_64*)
+- linux_acpi="yes"
+ ;;
+ *)
+ ;;
+--
+1.6.1.3
+
diff --git a/net-misc/x11rdp/files/xrdp-0.8.0-0001-Include-xorg-list.h-to-fix-build-errors.patch b/net-misc/x11rdp/files/xrdp-0.8.0-0001-Include-xorg-list.h-to-fix-build-errors.patch
new file mode 100644
index 000000000000..c78d2e3fa212
--- /dev/null
+++ b/net-misc/x11rdp/files/xrdp-0.8.0-0001-Include-xorg-list.h-to-fix-build-errors.patch
@@ -0,0 +1,25 @@
+From 13b7150aef9c61966d39d779c652f988232d7381 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Mon, 27 Oct 2014 09:52:56 +0100
+Subject: [PATCH 1/2] Include <xorg/list.h> to fix build errors
+
+---
+ xorg/X11R7.6/rdp/rdp.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/xorg/X11R7.6/rdp/rdp.h b/xorg/X11R7.6/rdp/rdp.h
+index 00725d1..a2f5bdc 100644
+--- a/xorg/X11R7.6/rdp/rdp.h
++++ b/xorg/X11R7.6/rdp/rdp.h
+@@ -46,6 +46,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ //#include "cfb.h"
+
++#include <xorg/list.h>
++
+ #include "mibstore.h"
+ #include "colormapst.h"
+ #include "gcstruct.h"
+--
+2.1.2
+
diff --git a/net-misc/x11rdp/files/xrdp-0.8.0-0002-Remove-dither-printing.patch b/net-misc/x11rdp/files/xrdp-0.8.0-0002-Remove-dither-printing.patch
new file mode 100644
index 000000000000..1d004181b427
--- /dev/null
+++ b/net-misc/x11rdp/files/xrdp-0.8.0-0002-Remove-dither-printing.patch
@@ -0,0 +1,40 @@
+From fef4e6d15aa42a7d3bb4b134cba9253323398cc6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Mon, 27 Oct 2014 09:55:49 +0100
+Subject: [PATCH 2/2] Remove dither printing
+
+---
+ xorg/X11R7.6/rdp/rdpComposite.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/xorg/X11R7.6/rdp/rdpComposite.c b/xorg/X11R7.6/rdp/rdpComposite.c
+index f763783..50ee6d7 100644
+--- a/xorg/X11R7.6/rdp/rdpComposite.c
++++ b/xorg/X11R7.6/rdp/rdpComposite.c
+@@ -240,9 +240,9 @@ compsoite_print(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
+ if (pSrc != 0)
+ {
+ LLOGLN(0, (" src depth %d width %d height %d repeat %d repeatType %d "
+- "dither %d filter %d alphaMap %p componentAlpha %d", pSrc->pDrawable->depth,
++ "filter %d alphaMap %p componentAlpha %d", pSrc->pDrawable->depth,
+ pSrc->pDrawable->width, pSrc->pDrawable->height,
+- pSrc->repeat, pSrc->repeatType, pSrc->dither, pSrc->filter,
++ pSrc->repeat, pSrc->repeatType, pSrc->filter,
+ pSrc->alphaMap, pSrc->componentAlpha));
+ LLOGLN(0, (" transform %p", pSrc->transform));
+ LLOGLN(0, (" detail format red %d red mask %d green %d green mask %d "
+@@ -277,9 +277,9 @@ compsoite_print(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
+ if (pDst != 0)
+ {
+ LLOGLN(0, (" dst depth %d width %d height %d repeat %d repeatType %d "
+- "dither %d filter %d alphaMap %p", pDst->pDrawable->depth,
++ "filter %d alphaMap %p", pDst->pDrawable->depth,
+ pDst->pDrawable->width, pDst->pDrawable->height,
+- pDst->repeat, pDst->repeatType, pDst->dither, pDst->filter,
++ pDst->repeat, pDst->repeatType, pDst->filter,
+ pDst->alphaMap));
+ LLOGLN(0, (" transform %p", pDst->transform));
+ print_format(pDst->format);
+--
+2.1.2
+
diff --git a/net-misc/x11rdp/metadata.xml b/net-misc/x11rdp/metadata.xml
new file mode 100644
index 000000000000..5cb9324943ab
--- /dev/null
+++ b/net-misc/x11rdp/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>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/x11rdp/x11rdp-0.8.0.1.9.5.ebuild b/net-misc/x11rdp/x11rdp-0.8.0.1.9.5.ebuild
new file mode 100644
index 000000000000..c017e2abba8d
--- /dev/null
+++ b/net-misc/x11rdp/x11rdp-0.8.0.1.9.5.ebuild
@@ -0,0 +1,185 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic versionator
+
+XRDP_P=xrdp-$(get_version_component_range 1-3)
+XORG_P=xorg-server-$(get_version_component_range 4-6)
+
+DESCRIPTION="A X11 server for RDP clients (used by xrdp)"
+HOMEPAGE="http://www.xrdp.org/"
+# mirrored from https://github.com/neutrinolabs/xrdp/releases
+SRC_URI="http://dev.gentoo.org/~mgorny/dist/${XRDP_P}.tar.xz
+ http://xorg.freedesktop.org/releases/individual/xserver/${XORG_P}.tar.bz2"
+
+LICENSE="Apache-2.0 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="nptl"
+
+RDEPEND="dev-libs/openssl
+ media-libs/freetype
+ >=x11-apps/iceauth-1.0.2
+ >=x11-apps/rgb-1.0.3
+ >=x11-apps/xauth-1.0.3
+ x11-apps/xkbcomp
+ >=x11-libs/libpciaccess-0.10.3
+ >=x11-libs/libXau-1.0.4
+ >=x11-libs/libXdmcp-1.0.2
+ >=x11-libs/libXfont-1.4.2
+ >=x11-libs/libxkbfile-1.0.4
+ >=x11-libs/pixman-0.15.20
+ >=x11-libs/xtrans-1.2.2
+ >=x11-misc/xbitmaps-1.0.1
+ >=x11-misc/xkeyboard-config-1.4
+ >=x11-libs/libX11-1.1.5
+ >=x11-libs/libXext-1.0.5
+ >=media-libs/mesa-7.8_rc[nptl=]
+ <x11-base/xorg-server-1.17"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ >=x11-proto/bigreqsproto-1.1.0
+ >=x11-proto/compositeproto-0.4
+ >=x11-proto/damageproto-1.1
+ >=x11-proto/fixesproto-4.1
+ >=x11-proto/fontsproto-2.0.2
+ >=x11-proto/glproto-1.4.11
+ >=x11-proto/inputproto-1.9.99.902
+ >=x11-proto/kbproto-1.0.3
+ >=x11-proto/randrproto-1.2.99.3
+ >=x11-proto/recordproto-1.13.99.1
+ >=x11-proto/renderproto-0.11
+ >=x11-proto/resourceproto-1.0.2
+ >=x11-proto/scrnsaverproto-1.1
+ >=x11-proto/trapproto-3.4.3
+ >=x11-proto/videoproto-2.2.2
+ >=x11-proto/xcmiscproto-1.2.0
+ >=x11-proto/xextproto-7.0.99.3
+ >=x11-proto/xf86dgaproto-2.0.99.1
+ >=x11-proto/xf86rushproto-1.1.2
+ >=x11-proto/xf86vidmodeproto-2.2.99.1
+ >=x11-proto/xineramaproto-1.1.3
+ >=x11-proto/xproto-7.0.17
+ >=x11-proto/xf86driproto-2.1.0
+ >=x11-proto/dri2proto-2.3
+ >=x11-libs/libdrm-2.4.20
+ >=x11-apps/xinit-1.3"
+
+# xrdp-specific
+DEPEND="${DEPEND}
+ app-arch/xz-utils"
+
+S=${WORKDIR}/${XRDP_P}
+
+src_prepare() {
+ # -- xrdp patches --
+ epatch "${FILESDIR}"/${XRDP_P}-0001-Include-xorg-list.h-to-fix-build-errors.patch
+ epatch "${FILESDIR}"/${XRDP_P}-0002-Remove-dither-printing.patch
+
+ # missing -pthread linking
+ sed -i -e 's:LLIBS =:& -pthread:' xorg/X11R7.6/rdp/Makefile || die
+
+ # -- xrdp fancy build layout --
+
+ mv "${WORKDIR}/${XORG_P}" ./ || die
+ mv "${S}"/xorg/X11R7.6/rdp "${XORG_P}/hw" || die
+ ln -s ../.. "${XORG_P}/hw/build_dir" || die
+ ln -s "${XORG_P}" xorg-server-1.9.3 || die
+
+ # -- xorg-server patches --
+ local xorg_patches=(
+ "${FILESDIR}"/xorg-server-disable-acpi.patch
+ "${FILESDIR}"/xorg-server-1.9-nouveau-default.patch
+ "${FILESDIR}"/xorg-cve-2011-4028+4029.patch
+ "${FILESDIR}"/xorg-server-1.9-cve-2013-1940.patch
+ "${FILESDIR}"/xorg-server-1.9-cve-2013-4396.patch
+ )
+ cd "${XORG_P}" || die
+ epatch "${xorg_patches[@]}"
+
+ # -- stuff copied from xorg follows --
+
+ # Xorg-server requires includes from OS mesa which are not visible for
+ # users of binary drivers.
+ # Due to the limitations of CONFIGURE_OPTIONS, we have to export this
+ mkdir -p "${T}/mesa-symlinks/GL"
+ for i in gl glx glxmd glxproto glxtokens; do
+ ln -s "${EROOT}usr/$(get_libdir)/opengl/xorg-x11/include/$i.h" "${T}/mesa-symlinks/GL/$i.h" || die
+ done
+ for i in glext glxext; do
+ ln -s "${EROOT}usr/$(get_libdir)/opengl/global/include/$i.h" "${T}/mesa-symlinks/GL/$i.h" || die
+ done
+ append-cppflags "-I${T}/mesa-symlinks"
+
+ # (#121394) Causes window corruption
+ filter-flags -fweb
+
+ # Incompatible with GCC 3.x SSP on x86, bug #244352
+ if use x86 ; then
+ if [[ $(gcc-major-version) -lt 4 ]]; then
+ filter-flags -fstack-protector
+ fi
+ fi
+
+ # Incompatible with GCC 3.x CPP, bug #314615
+ if [[ $(gcc-major-version) -lt 4 ]]; then
+ ewarn "GCC 3.x C preprocessor may cause build failures. Use GCC 4.x"
+ ewarn "or set CPP=cpp-4.3.4 (replace with the actual installed version)"
+ fi
+}
+
+src_configure() {
+ local myconf=(
+ --disable-ipv6
+ --disable-dmx
+ --disable-kdrive
+ --disable-kdrive-kbd
+ --disable-kdrive-mouse
+ --disable-kdrive-evdev
+ --disable-tslib
+ --disable-xcalibrate
+ --enable-record
+ --disable-xfree86-utils
+ --disable-install-libxf86config
+ --disable-dri
+ --disable-dri2
+ --enable-glx
+ --disable-xnest
+ --enable-xorg
+ --disable-xvfb
+ $(use_enable nptl glx-tls)
+ --disable-config-udev
+ --without-doxygen
+ --without-xmlto
+ --sysconfdir=/etc/X11
+ --localstatedir=/var
+ --enable-install-setuid
+ --with-fontrootdir=/usr/share/fonts
+ --with-xkb-output=/var/lib/xkb
+ --disable-config-hal
+ --without-dtrace
+ --without-fop
+ --with-os-vendor=Gentoo
+ --with-sha1=libcrypto
+ )
+
+ # configure xorg-server, no need to configure xrdp
+ cd "${XORG_P}" || die
+ econf "${myconf[@]}"
+}
+
+src_compile() {
+ # build xorg-server
+ emake -C "${XORG_P}"
+
+ # build x11rdp
+ emake -C "${XORG_P}"/hw/rdp X11RDPBASE=/usr
+}
+
+src_install() {
+ dobin "${XORG_P}"/hw/rdp/X11rdp
+}
diff --git a/net-misc/x2goclient/Manifest b/net-misc/x2goclient/Manifest
new file mode 100644
index 000000000000..24cb40ec275e
--- /dev/null
+++ b/net-misc/x2goclient/Manifest
@@ -0,0 +1,5 @@
+DIST x2goclient-4.0.2.0.tar.gz 1398919 SHA256 7b1d42e30041d469ef986e686a1dacb4d0fb55d04fdcfc20ad26f5a4282d30b3 SHA512 09dfec61961aa63bb7e67aca26b765cd663dfab74d800990bdd6384cbbe9152c9dec91e5b46f44c211b31a12323920c1f6478f05c32ac42e530ce15652fcdeb8 WHIRLPOOL 06a07b033567fa5e3174462179abb1ef392fd43dc2b6985c27e2c87e49b7dbb017cafdbbd91cd5eb8e1476cff4433a56892f244328bc78183f295566733ac9e4
+DIST x2goclient-4.0.3.1.tar.gz 1539521 SHA256 8a5a0d8112250ecc598a9811253081d16f87c17d0707e8f09671c7cb31942bad SHA512 3be070564d9f782e9f2bae162af476ffb3c738ff237f81aa3fdc7a87a3d2dcc03978513cfb538ce2d43f6ba5cd9b1f578a279222c1149e4cde576d3807f3c9eb WHIRLPOOL fd76a1238b567e5140796afb7254aff455378dd4cf81c8587d48ccdbd51aa97b48a5c39a7360fded7b532897e3ff1dd1357bda67442fa80a1408ad092c7a8279
+DIST x2goclient-4.0.3.2.tar.gz 1560536 SHA256 f65a70463eae3d6d9fe6e4379f4ffacda50080a11f196d2792742f5b67fa0c6f SHA512 e390948360cb93db553b157b8146c0222f10a070a7b3f699a0e3be94bba0498b6fc6c0e064b6ecf753afc25a7447e5162f44305688fc2e68423a5530d73f0431 WHIRLPOOL 3d0b6aec77a8096541e810bf0a70d73caf63f34121d6931f5d3c2a721c4cd8b70e0eef1c902decc6733feb9a1cb09d3146baf4429532a60a013d0c36727059f7
+DIST x2goclient-4.0.4.0.tar.gz 1571218 SHA256 86d05ce10039fe0a965cdc55086e00f4f3abc573a96f128b92f87081b7251657 SHA512 53c12e31e9cddc732f1d85f963103c99d3e051946f56b6eef861cb450a5ac69b7d09aceb2a1cb4ff8af949d56abe0c00dff649a1980e21ffbc6980a1a1f87e14 WHIRLPOOL 69bc539e2dd8b4953d3e15417f583d47a4aa6419e207fc6fda666de6b8cf695b85871c3e9995bcfd8cc930bc4b2334d08b1a905a77d5cc97377abde01cbed8bb
+DIST x2goclient-4.0.5.0.tar.gz 1577271 SHA256 242e91720c1e5830f64a632c111ac3c4b6f6690d5005454c8e025b00bfbe42a1 SHA512 4fd3ca6061a4a86d04a699e41b17a546b0ed31e784ff357749d56a8015b60e86d1205580e6e57347a64c6ce47eaa47f054a783c6c90fd6716912333c7858309a WHIRLPOOL 72125958ade3baebdc272621834980ca07290adb16ab3a2129325d7d7ad7692061d5a24c1d48bbcda1c6b925a84bcf97dc30386910d533c0c4ac2db11d0f239f
diff --git a/net-misc/x2goclient/metadata.xml b/net-misc/x2goclient/metadata.xml
new file mode 100644
index 000000000000..f009de1b9d2d
--- /dev/null
+++ b/net-misc/x2goclient/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>nx</herd>
+ <longdescription>The X2Go Qt client</longdescription>
+</pkgmetadata>
diff --git a/net-misc/x2goclient/x2goclient-4.0.2.0.ebuild b/net-misc/x2goclient/x2goclient-4.0.2.0.ebuild
new file mode 100644
index 000000000000..2b4c9fab07bf
--- /dev/null
+++ b/net-misc/x2goclient/x2goclient-4.0.2.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils nsplugins qt4-r2
+
+DESCRIPTION="The X2Go Qt client"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="ldap nsplugin"
+
+DEPEND=">=net-libs/libssh-0.6.0_rc1
+ net-print/cups
+ dev-qt/qtcore:4[ssl]
+ dev-qt/qtgui:4
+ dev-qt/qtsvg:4
+ x11-libs/libXpm
+ ldap? ( net-nds/openldap )"
+RDEPEND="${DEPEND}
+ net-misc/nx"
+
+CLIENT_BUILD=${WORKDIR}/${P}.client_build
+PLUGIN_BUILD=${WORKDIR}/${P}.plugin_build
+
+src_prepare() {
+ if ! use ldap; then
+ sed -e "s/-lldap//" -i x2goclient.pro || die
+ sed -e "s/#define USELDAP//" -i x2goclientconfig.h || die
+ fi
+
+ mkdir -p "${CLIENT_BUILD}"
+ use nsplugin && mkdir -p "${PLUGIN_BUILD}"
+}
+
+src_configure() {
+ cd "${CLIENT_BUILD}"
+ eqmake4 "${S}"/x2goclient.pro
+
+ if use nsplugin;
+ then
+ cd "${PLUGIN_BUILD}"
+ X2GO_CLIENT_TARGET=plugin eqmake4 "${S}"/x2goclient.pro
+ fi
+}
+
+src_compile() {
+ cd "${CLIENT_BUILD}"
+ qt4-r2_src_compile
+
+ if use nsplugin;
+ then
+ cd "${PLUGIN_BUILD}"
+ qt4-r2_src_compile
+ fi
+}
+
+src_install() {
+ dobin "${CLIENT_BUILD}"/${PN}
+
+ insinto /usr/share/pixmaps/x2goclient
+ doins -r icons/*
+
+ domenu desktop/${PN}.desktop
+ doman man/man?/*
+
+ if use nsplugin;
+ then
+ # PLUGINS_DIR comes from nsplugins.eclass
+ exeinto /usr/$(get_libdir)/${PLUGINS_DIR}
+ doexe "${PLUGIN_BUILD}"/libx2goplugin.so
+ fi
+
+ emake DESTDIR="${D}" PREFIX=/usr install_pluginprovider
+}
diff --git a/net-misc/x2goclient/x2goclient-4.0.3.1.ebuild b/net-misc/x2goclient/x2goclient-4.0.3.1.ebuild
new file mode 100644
index 000000000000..2b4c9fab07bf
--- /dev/null
+++ b/net-misc/x2goclient/x2goclient-4.0.3.1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils nsplugins qt4-r2
+
+DESCRIPTION="The X2Go Qt client"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="ldap nsplugin"
+
+DEPEND=">=net-libs/libssh-0.6.0_rc1
+ net-print/cups
+ dev-qt/qtcore:4[ssl]
+ dev-qt/qtgui:4
+ dev-qt/qtsvg:4
+ x11-libs/libXpm
+ ldap? ( net-nds/openldap )"
+RDEPEND="${DEPEND}
+ net-misc/nx"
+
+CLIENT_BUILD=${WORKDIR}/${P}.client_build
+PLUGIN_BUILD=${WORKDIR}/${P}.plugin_build
+
+src_prepare() {
+ if ! use ldap; then
+ sed -e "s/-lldap//" -i x2goclient.pro || die
+ sed -e "s/#define USELDAP//" -i x2goclientconfig.h || die
+ fi
+
+ mkdir -p "${CLIENT_BUILD}"
+ use nsplugin && mkdir -p "${PLUGIN_BUILD}"
+}
+
+src_configure() {
+ cd "${CLIENT_BUILD}"
+ eqmake4 "${S}"/x2goclient.pro
+
+ if use nsplugin;
+ then
+ cd "${PLUGIN_BUILD}"
+ X2GO_CLIENT_TARGET=plugin eqmake4 "${S}"/x2goclient.pro
+ fi
+}
+
+src_compile() {
+ cd "${CLIENT_BUILD}"
+ qt4-r2_src_compile
+
+ if use nsplugin;
+ then
+ cd "${PLUGIN_BUILD}"
+ qt4-r2_src_compile
+ fi
+}
+
+src_install() {
+ dobin "${CLIENT_BUILD}"/${PN}
+
+ insinto /usr/share/pixmaps/x2goclient
+ doins -r icons/*
+
+ domenu desktop/${PN}.desktop
+ doman man/man?/*
+
+ if use nsplugin;
+ then
+ # PLUGINS_DIR comes from nsplugins.eclass
+ exeinto /usr/$(get_libdir)/${PLUGINS_DIR}
+ doexe "${PLUGIN_BUILD}"/libx2goplugin.so
+ fi
+
+ emake DESTDIR="${D}" PREFIX=/usr install_pluginprovider
+}
diff --git a/net-misc/x2goclient/x2goclient-4.0.3.2.ebuild b/net-misc/x2goclient/x2goclient-4.0.3.2.ebuild
new file mode 100644
index 000000000000..2b4c9fab07bf
--- /dev/null
+++ b/net-misc/x2goclient/x2goclient-4.0.3.2.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils nsplugins qt4-r2
+
+DESCRIPTION="The X2Go Qt client"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="ldap nsplugin"
+
+DEPEND=">=net-libs/libssh-0.6.0_rc1
+ net-print/cups
+ dev-qt/qtcore:4[ssl]
+ dev-qt/qtgui:4
+ dev-qt/qtsvg:4
+ x11-libs/libXpm
+ ldap? ( net-nds/openldap )"
+RDEPEND="${DEPEND}
+ net-misc/nx"
+
+CLIENT_BUILD=${WORKDIR}/${P}.client_build
+PLUGIN_BUILD=${WORKDIR}/${P}.plugin_build
+
+src_prepare() {
+ if ! use ldap; then
+ sed -e "s/-lldap//" -i x2goclient.pro || die
+ sed -e "s/#define USELDAP//" -i x2goclientconfig.h || die
+ fi
+
+ mkdir -p "${CLIENT_BUILD}"
+ use nsplugin && mkdir -p "${PLUGIN_BUILD}"
+}
+
+src_configure() {
+ cd "${CLIENT_BUILD}"
+ eqmake4 "${S}"/x2goclient.pro
+
+ if use nsplugin;
+ then
+ cd "${PLUGIN_BUILD}"
+ X2GO_CLIENT_TARGET=plugin eqmake4 "${S}"/x2goclient.pro
+ fi
+}
+
+src_compile() {
+ cd "${CLIENT_BUILD}"
+ qt4-r2_src_compile
+
+ if use nsplugin;
+ then
+ cd "${PLUGIN_BUILD}"
+ qt4-r2_src_compile
+ fi
+}
+
+src_install() {
+ dobin "${CLIENT_BUILD}"/${PN}
+
+ insinto /usr/share/pixmaps/x2goclient
+ doins -r icons/*
+
+ domenu desktop/${PN}.desktop
+ doman man/man?/*
+
+ if use nsplugin;
+ then
+ # PLUGINS_DIR comes from nsplugins.eclass
+ exeinto /usr/$(get_libdir)/${PLUGINS_DIR}
+ doexe "${PLUGIN_BUILD}"/libx2goplugin.so
+ fi
+
+ emake DESTDIR="${D}" PREFIX=/usr install_pluginprovider
+}
diff --git a/net-misc/x2goclient/x2goclient-4.0.4.0.ebuild b/net-misc/x2goclient/x2goclient-4.0.4.0.ebuild
new file mode 100644
index 000000000000..b4505fc64020
--- /dev/null
+++ b/net-misc/x2goclient/x2goclient-4.0.4.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils nsplugins qt4-r2
+
+DESCRIPTION="The X2Go Qt client"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ldap nsplugin"
+
+DEPEND=">=net-libs/libssh-0.6.0_rc1
+ net-print/cups
+ dev-qt/qtcore:4[ssl]
+ dev-qt/qtgui:4
+ dev-qt/qtsvg:4
+ x11-libs/libXpm
+ ldap? ( net-nds/openldap )"
+RDEPEND="${DEPEND}
+ net-misc/nx"
+
+CLIENT_BUILD=${WORKDIR}/${P}.client_build
+PLUGIN_BUILD=${WORKDIR}/${P}.plugin_build
+
+src_prepare() {
+ if ! use ldap; then
+ sed -e "s/-lldap//" -i x2goclient.pro || die
+ sed -e "s/#define USELDAP//" -i src/x2goclientconfig.h || die
+ fi
+
+ mkdir -p "${CLIENT_BUILD}"
+ use nsplugin && mkdir -p "${PLUGIN_BUILD}"
+}
+
+src_configure() {
+ cd "${CLIENT_BUILD}"
+ eqmake4 "${S}"/x2goclient.pro
+
+ if use nsplugin;
+ then
+ cd "${PLUGIN_BUILD}"
+ X2GO_CLIENT_TARGET=plugin eqmake4 "${S}"/x2goclient.pro
+ fi
+}
+
+src_compile() {
+ cd "${CLIENT_BUILD}"
+ qt4-r2_src_compile
+
+ if use nsplugin;
+ then
+ cd "${PLUGIN_BUILD}"
+ qt4-r2_src_compile
+ fi
+}
+
+src_install() {
+ dobin "${CLIENT_BUILD}"/${PN}
+
+ insinto /usr/share/pixmaps/x2goclient
+ doins res/img/icons/${PN}.xpm
+
+ domenu desktop/${PN}.desktop
+ doman man/man?/*
+
+ if use nsplugin;
+ then
+ # PLUGINS_DIR comes from nsplugins.eclass
+ exeinto /usr/$(get_libdir)/${PLUGINS_DIR}
+ doexe "${PLUGIN_BUILD}"/libx2goplugin.so
+ fi
+
+ emake DESTDIR="${D}" PREFIX=/usr install_pluginprovider
+}
diff --git a/net-misc/x2goclient/x2goclient-4.0.5.0.ebuild b/net-misc/x2goclient/x2goclient-4.0.5.0.ebuild
new file mode 100644
index 000000000000..b4505fc64020
--- /dev/null
+++ b/net-misc/x2goclient/x2goclient-4.0.5.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils nsplugins qt4-r2
+
+DESCRIPTION="The X2Go Qt client"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ldap nsplugin"
+
+DEPEND=">=net-libs/libssh-0.6.0_rc1
+ net-print/cups
+ dev-qt/qtcore:4[ssl]
+ dev-qt/qtgui:4
+ dev-qt/qtsvg:4
+ x11-libs/libXpm
+ ldap? ( net-nds/openldap )"
+RDEPEND="${DEPEND}
+ net-misc/nx"
+
+CLIENT_BUILD=${WORKDIR}/${P}.client_build
+PLUGIN_BUILD=${WORKDIR}/${P}.plugin_build
+
+src_prepare() {
+ if ! use ldap; then
+ sed -e "s/-lldap//" -i x2goclient.pro || die
+ sed -e "s/#define USELDAP//" -i src/x2goclientconfig.h || die
+ fi
+
+ mkdir -p "${CLIENT_BUILD}"
+ use nsplugin && mkdir -p "${PLUGIN_BUILD}"
+}
+
+src_configure() {
+ cd "${CLIENT_BUILD}"
+ eqmake4 "${S}"/x2goclient.pro
+
+ if use nsplugin;
+ then
+ cd "${PLUGIN_BUILD}"
+ X2GO_CLIENT_TARGET=plugin eqmake4 "${S}"/x2goclient.pro
+ fi
+}
+
+src_compile() {
+ cd "${CLIENT_BUILD}"
+ qt4-r2_src_compile
+
+ if use nsplugin;
+ then
+ cd "${PLUGIN_BUILD}"
+ qt4-r2_src_compile
+ fi
+}
+
+src_install() {
+ dobin "${CLIENT_BUILD}"/${PN}
+
+ insinto /usr/share/pixmaps/x2goclient
+ doins res/img/icons/${PN}.xpm
+
+ domenu desktop/${PN}.desktop
+ doman man/man?/*
+
+ if use nsplugin;
+ then
+ # PLUGINS_DIR comes from nsplugins.eclass
+ exeinto /usr/$(get_libdir)/${PLUGINS_DIR}
+ doexe "${PLUGIN_BUILD}"/libx2goplugin.so
+ fi
+
+ emake DESTDIR="${D}" PREFIX=/usr install_pluginprovider
+}
diff --git a/net-misc/x2goserver/Manifest b/net-misc/x2goserver/Manifest
new file mode 100644
index 000000000000..e1e83f9ed7fe
--- /dev/null
+++ b/net-misc/x2goserver/Manifest
@@ -0,0 +1,6 @@
+DIST x2goserver-4.0.1.12.tar.gz 78958 SHA256 447c5e7b47e6b2bc087731ed26c827020130cc8530ca020a03f7f3ecadc308cc SHA512 30ce6c20cf0bf67ee162cda5d0cbbfd994ac47aa140e3c4cd6118b594ed8fbf83dbc961f2323694206c705f647f32dba8a7fc7bde4ef22be2d4936642865a3d3 WHIRLPOOL 9d4887a1dd701d361311850a8e936d7f22ecf76e1b4ee78b11feca6ec25d02419221b0fb2e72c440394f81e63ffa73762b33bd58123e7bd441e32446ce40814e
+DIST x2goserver-4.0.1.15.tar.gz 76128 SHA256 46c0fc2303014db99b138a352a7f3df89c4f7cfabc11dc0aeea4cdc76253bdfb SHA512 ca806c39d2536e7962540733e85199fefea54e80695c6f1ca736cc1998b411524afa8d9cf29c26855fc3373105277daa4ddd69cbcd05c2bbecb01ca5172ba05c WHIRLPOOL b06ace09acf14a0b82b0b5b8f795823d7997c99a4a78bd120ecadedf3bbb8c0b6ad371e8bacf1c080e5d6b45d9760cef8c04f69b9a86a1b2dceb3ebaa450bde0
+DIST x2goserver-4.0.1.16.tar.gz 81836 SHA256 c13dde4f6755f6c42fdc32a5a6167a5e2765eb5077a43e74ffdb50a36be7f8f8 SHA512 f66da1e4b1b29021951f3ebdd93ff7be08b20b6322b7cbae66f5792336b54f23d39273fb9e4956dc6b01620488d7b869269a0fe1e7491147650f6232330236ea WHIRLPOOL c79db32e632a6db876529eed0cd1dc0bf13d0ec82c2f2939e595f9e0b9828a0cdf8553eedec483da413ca0cc041627093addb18682f6aa197e84d61001bced6a
+DIST x2goserver-4.0.1.17.tar.gz 82298 SHA256 364d4f3152a4b4a4b04742a125f5b1c6fd0c82ad9e17a8363d56d926998b213b SHA512 3ffcc8678a5ed380b7820042fa0f8c19d017777cd13e6eed84689636ae49aa0733b4ed4e496e37a64939bbc1fafead19671c919f713f86db5e47ce02e1a73cc1 WHIRLPOOL fddffe5e86f355f46cacd9158387b9859c0c8dfe6f32bf02a7e1bac3a1ea643127e0355d9813a1592bd4b19764861eee3f1d522653bdba11187442f039d9261d
+DIST x2goserver-4.0.1.18.tar.gz 82452 SHA256 4a1e7eb9cf309c126fdab1f97bd55cd036b0a02a04cda1d317b193d8ab9b0612 SHA512 e0f439301cbb2acc09e14a101bebbbac3e436383de51b7ae029117eaa95c6181045335c83125615e0f0ed191ae39d5abb120c1f6b20fa5b78fe94288248d6fd8 WHIRLPOOL fe0ad6b5a0a1a124d62ebcee152a84dd7b34ebe83f04440ff5dac471b1f5e19339dfa340631cd2df10398d38c4ed34c875a52337a394281b2976d9059d6f1bbd
+DIST x2goserver-4.0.1.19.tar.gz 89434 SHA256 3dd5c1464a7992a38760fd6b08f5f8d37646f939f4f7834a7cd96bf4950623cc SHA512 dbd054a6bf781d843a48fcea3449037b991aaa38a52705d48dd5fa8d7fe85c56d4ff31b9a10189a9043a3e5cc0c69475947aea5a5fb78e3c076c0e56079b747d WHIRLPOOL f44fadfda6e1ff165ff989f0c10116c8318f5915764b9bfc663e4658190934eb5155e17e072f131842a98cc02908366b0f91c7b0b9b9e73d4e2a729f00ba0d31
diff --git a/net-misc/x2goserver/files/x2gocleansessions.service b/net-misc/x2goserver/files/x2gocleansessions.service
new file mode 100644
index 000000000000..393d841c5acd
--- /dev/null
+++ b/net-misc/x2goserver/files/x2gocleansessions.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=x2go - remote desktop server
+After=syslog.target network.target
+
+[Service]
+ExecStart=/usr/sbin/x2gocleansessions
+PIDFile=/run/x2goserver.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/x2goserver/files/x2goserver-4.0.1.18-fix_local_desktop_sharing.patch b/net-misc/x2goserver/files/x2goserver-4.0.1.18-fix_local_desktop_sharing.patch
new file mode 100644
index 000000000000..11cef863be06
--- /dev/null
+++ b/net-misc/x2goserver/files/x2goserver-4.0.1.18-fix_local_desktop_sharing.patch
@@ -0,0 +1,19 @@
+diff -Naur x2goserver-4.0.1.18.orig/x2goserver/bin/x2golistdesktops x2goserver-4.0.1.18/x2goserver/bin/x2golistdesktops
+--- x2goserver-4.0.1.18.orig/x2goserver/bin/x2golistdesktops 2014-10-06 23:23:27.000000000 +0200
++++ x2goserver-4.0.1.18/x2goserver/bin/x2golistdesktops 2015-01-14 10:52:55.044479499 +0100
+@@ -60,7 +60,15 @@
+ $rdisp="I${rdisp}I";
+
+ my $uname=$ENV{'USER'};
++
++# on Debian the ss command is in /usr/bin, on Fedora, it is in /usr/sbin...
++# -> so we need to tweak the PATH env var a little here...
++my $old_PATH=$ENV{'PATH'};
++$ENV{'PATH'}="$ENV{'PATH'}:/usr/sbin:/sbin";
+ my $lines=`ss -lxu`;
++$ENV{'PATH'}=$old_PATH;
++undef $old_PATH;
++
+ my @lines=split("\n", "$lines");
+
+ my @outp = grep ( /(@| )\/tmp\/.X11-unix\/X.*/, @lines);
diff --git a/net-misc/x2goserver/files/x2goserver-4.0.1.18-prevent_bash_failures_xsession.patch b/net-misc/x2goserver/files/x2goserver-4.0.1.18-prevent_bash_failures_xsession.patch
new file mode 100644
index 000000000000..868c52a0564e
--- /dev/null
+++ b/net-misc/x2goserver/files/x2goserver-4.0.1.18-prevent_bash_failures_xsession.patch
@@ -0,0 +1,27 @@
+diff --git a/x2goserver-xsession/etc/Xsession b/x2goserver-xsession/etc/Xsession
+index b9ef15e..94692db 100755
+--- a/x2goserver-xsession/etc/Xsession
++++ b/x2goserver-xsession/etc/Xsession
+@@ -139,7 +139,9 @@ elif [ -f /etc/redhat-release ] || [ -f /etc/gentoo-release ]; then
+
+ # Set up i18n environment
+ if [ -r /etc/profile.d/lang.sh ]; then
++ set +e
+ . /etc/profile.d/lang.sh
++ set -e
+ fi
+
+ # merge in defaults
+@@ -177,7 +179,9 @@ elif [ -f /etc/redhat-release ] || [ -f /etc/gentoo-release ]; then
+
+ # run all system xinitrc shell scripts.
+ for file in /etc/x2go/xinitrc.d/* ; do
++ set +e
+ [ -r "$file" ] && . $file
++ set -e
+ done
+
+ # Prefix launch of session with ssh-agent if available and not already running.
+--
+1.7.9.5
+
diff --git a/net-misc/x2goserver/files/x2goserver-4.0.1.18-use_printf.patch b/net-misc/x2goserver/files/x2goserver-4.0.1.18-use_printf.patch
new file mode 100644
index 000000000000..434deb6daa5e
--- /dev/null
+++ b/net-misc/x2goserver/files/x2goserver-4.0.1.18-use_printf.patch
@@ -0,0 +1,58 @@
+diff -Naur x2goserver-4.0.1.18.orig/rpm/x2goserver.init x2goserver-4.0.1.18/rpm/x2goserver.init
+--- x2goserver-4.0.1.18.orig/rpm/x2goserver.init 2014-10-06 23:23:27.000000000 +0200
++++ x2goserver-4.0.1.18/rpm/x2goserver.init 2015-01-14 11:23:42.840796430 +0100
+@@ -35,7 +35,7 @@
+ mkdir $XSOCKDIR
+ chmod 1777 $XSOCKDIR
+ fi
+- echo -n $"Starting $prog: "
++ printf '%s' $"Starting $prog: "
+ daemon $exec $OPTS
+ retval=$?
+ echo
+@@ -43,7 +43,7 @@
+ }
+
+ stop() {
+- echo -n $"Stopping $prog: "
++ printf '%s' $"Stopping $prog: "
+ killproc $exec
+ retval=$?
+ echo
+diff -Naur x2goserver-4.0.1.18.orig/x2goserver/bin/x2gopath x2goserver-4.0.1.18/x2goserver/bin/x2gopath
+--- x2goserver-4.0.1.18.orig/x2goserver/bin/x2gopath 2014-10-06 23:23:27.000000000 +0200
++++ x2goserver-4.0.1.18/x2goserver/bin/x2gopath 2015-01-14 11:25:57.105755690 +0100
+@@ -32,12 +32,12 @@
+
+ # The following section is subject to substitution by distro packaging tools.
+ case "$1" in
+- base) echo -n "$base";;
+- lib) echo -n "$base/lib/x2go";;
+- libexec) echo -n "$base/lib/x2go";;
+- share) echo -n "$base/share/x2go";;
+- nx-x11) echo -n "$base/lib/nx/X11";;
+- xinerama) echo -n "$base/lib/nx/X11/Xinerama";;
++ base) printf '%s' "$base";;
++ lib) printf '%s' "$base/lib/x2go";;
++ libexec) printf '%s' "$base/lib/x2go";;
++ share) printf '%s' "$base/share/x2go";;
++ nx-x11) printf '%s' "$base/lib/nx/X11";;
++ xinerama) printf '%s' "$base/lib/nx/X11/Xinerama";;
+ *) exit 1;;
+ esac;
+
+diff -Naur x2goserver-4.0.1.18.orig/x2goserver-xsession/etc/Xsession x2goserver-4.0.1.18/x2goserver-xsession/etc/Xsession
+--- x2goserver-4.0.1.18.orig/x2goserver-xsession/etc/Xsession 2014-10-06 23:23:27.000000000 +0200
++++ x2goserver-4.0.1.18/x2goserver-xsession/etc/Xsession 2015-01-14 11:23:42.840796430 +0100
+@@ -26,9 +26,9 @@
+ # pretty-print messages of arbitrary length (no trailing newline); use
+ # xmessage if it is available and $DISPLAY is set
+ MESSAGE="$PROGNAME: $*"
+- echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2;
++ printf '%s' "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2;
+ if [ -n "$DISPLAY" ] && which xmessage 1> /dev/null 2>&1; then
+- echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file -
++ printf '%s' "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file -
+ fi
+ }
+
diff --git a/net-misc/x2goserver/files/x2goserver.init b/net-misc/x2goserver/files/x2goserver.init
new file mode 100644
index 000000000000..a6b7a66f7889
--- /dev/null
+++ b/net-misc/x2goserver/files/x2goserver.init
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DAEMON=/usr/sbin/x2gocleansessions
+PIDFILE=/var/run/x2goserver.pid
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
+ --exec ${DAEMON} -- $DAEMON_OPTS
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
+ eend $?
+}
diff --git a/net-misc/x2goserver/metadata.xml b/net-misc/x2goserver/metadata.xml
new file mode 100644
index 000000000000..b85de2f29ab3
--- /dev/null
+++ b/net-misc/x2goserver/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>nx</herd>
+ <longdescription>The X2Go server</longdescription>
+ <use>
+ <flag name="fuse">Use <pkg>sys-fs/sshfs-fuse</pkg> to allow shared folders</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/x2goserver/x2goserver-4.0.1.12.ebuild b/net-misc/x2goserver/x2goserver-4.0.1.12.ebuild
new file mode 100644
index 000000000000..9afea863698d
--- /dev/null
+++ b/net-misc/x2goserver/x2goserver-4.0.1.12.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib systemd toolchain-funcs user
+
+DESCRIPTION="The X2Go server"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+doc +fuse postgres +sqlite"
+
+REQUIRED_USE="|| ( postgres sqlite )"
+
+# Requires man2html, only provided by sys-apps/man
+DEPEND="doc? ( sys-apps/man )"
+RDEPEND="dev-perl/Capture-Tiny
+ dev-perl/Config-Simple
+ dev-perl/File-BaseDir
+ dev-perl/File-ReadBackwards
+ media-fonts/font-cursor-misc
+ media-fonts/font-misc-misc
+ net-misc/nx
+ net-misc/openssh
+ x11-apps/xauth
+ x11-apps/xhost
+ x11-apps/xwininfo
+ fuse? ( sys-fs/sshfs-fuse )
+ postgres? ( dev-perl/DBD-Pg )
+ sqlite? ( dev-perl/DBD-SQLite )"
+
+pkg_setup() {
+ # Force the group creation, #479650
+ enewgroup x2gouser
+ enewgroup x2goprint
+ enewuser x2gouser -1 -1 /var/lib/x2go x2gouser
+ enewuser x2goprint -1 -1 /var/spool/x2goprint x2goprint
+}
+
+src_prepare() {
+ # Multilib clean
+ sed -e "/^LIBDIR=/s/lib/$(get_libdir)/" -i Makefile */Makefile || die "multilib sed failed"
+ # Skip man2html build if needed
+ if ! use doc; then
+ sed -e "s/build-indep: build_man2html/build-indep:/" -i Makefile */Makefile || die "man2html sed failed"
+ fi
+ # Use nxagent directly
+ sed -i -e "/NX_TEMP=/s/x2goagent/nxagent/" x2goserver/bin/x2gostartagent || die "sed failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" PREFIX=/usr
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr install
+
+ fowners root:x2goprint /usr/bin/x2goprint
+ fperms 2755 /usr/bin/x2goprint
+ dosym /usr/share/applications /etc/x2go/applications
+
+ newinitd "${FILESDIR}"/${PN}.init x2gocleansessions
+ systemd_dounit "${FILESDIR}"/x2gocleansessions.service
+}
+
+pkg_postinst() {
+ if use sqlite ; then
+ elog "To use sqlite and create the initial database, run:"
+ elog " # x2godbadmin --createdb"
+ fi
+ if use postgres ; then
+ elog "To use a PostgreSQL databse, more information is availabe here:"
+ elog "http://www.x2go.org/doku.php/wiki:advanced:multi-node:x2goserver-pgsql"
+ fi
+
+ elog "For password authentication, you need to enable PasswordAuthentication"
+ elog "in /etc/ssh/sshd_config (disabled by default in Gentoo)"
+ elog "An init script was installed for x2gocleansessions"
+}
diff --git a/net-misc/x2goserver/x2goserver-4.0.1.15.ebuild b/net-misc/x2goserver/x2goserver-4.0.1.15.ebuild
new file mode 100644
index 000000000000..fa090b2b79b3
--- /dev/null
+++ b/net-misc/x2goserver/x2goserver-4.0.1.15.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib systemd toolchain-funcs user
+
+DESCRIPTION="The X2Go server"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+fuse postgres +sqlite"
+
+REQUIRED_USE="|| ( postgres sqlite )"
+
+DEPEND=""
+RDEPEND="dev-perl/Capture-Tiny
+ dev-perl/Config-Simple
+ dev-perl/File-BaseDir
+ dev-perl/File-ReadBackwards
+ media-fonts/font-cursor-misc
+ media-fonts/font-misc-misc
+ net-misc/nx
+ net-misc/openssh
+ x11-apps/xauth
+ x11-apps/xhost
+ x11-apps/xwininfo
+ fuse? ( sys-fs/sshfs-fuse )
+ postgres? ( dev-perl/DBD-Pg )
+ sqlite? ( dev-perl/DBD-SQLite )"
+
+pkg_setup() {
+ # Force the group creation, #479650
+ enewgroup x2gouser
+ enewgroup x2goprint
+ enewuser x2gouser -1 -1 /var/lib/x2go x2gouser
+ enewuser x2goprint -1 -1 /var/spool/x2goprint x2goprint
+}
+
+src_prepare() {
+ # Multilib clean
+ sed -e "/^LIBDIR=/s/lib/$(get_libdir)/" -i Makefile */Makefile || die "multilib sed failed"
+ # Skip man2html build
+ sed -e "s/build-indep: build_man2html/build-indep:/" -i Makefile */Makefile || die "man2html sed failed"
+ # Use nxagent directly
+ sed -i -e "/NX_TEMP=/s/x2goagent/nxagent/" x2goserver/bin/x2gostartagent || die "sed failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" PREFIX=/usr
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr install
+
+ fowners root:x2goprint /usr/bin/x2goprint
+ fperms 2755 /usr/bin/x2goprint
+ fperms 0750 /etc/sudoers.d
+ fperms 0440 /etc/sudoers.d/x2goserver
+ dosym /usr/share/applications /etc/x2go/applications
+
+ newinitd "${FILESDIR}"/${PN}.init x2gocleansessions
+ systemd_dounit "${FILESDIR}"/x2gocleansessions.service
+}
+
+pkg_postinst() {
+ if use sqlite ; then
+ elog "To use sqlite and create the initial database, run:"
+ elog " # x2godbadmin --createdb"
+ fi
+ if use postgres ; then
+ elog "To use a PostgreSQL databse, more information is availabe here:"
+ elog "http://www.x2go.org/doku.php/wiki:advanced:multi-node:x2goserver-pgsql"
+ fi
+
+ elog "For password authentication, you need to enable PasswordAuthentication"
+ elog "in /etc/ssh/sshd_config (disabled by default in Gentoo)"
+ elog "An init script was installed for x2gocleansessions"
+}
diff --git a/net-misc/x2goserver/x2goserver-4.0.1.16.ebuild b/net-misc/x2goserver/x2goserver-4.0.1.16.ebuild
new file mode 100644
index 000000000000..cb09ae2abc15
--- /dev/null
+++ b/net-misc/x2goserver/x2goserver-4.0.1.16.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib systemd toolchain-funcs user
+
+DESCRIPTION="The X2Go server"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+fuse postgres +sqlite"
+
+REQUIRED_USE="|| ( postgres sqlite )"
+
+DEPEND=""
+RDEPEND="dev-perl/Capture-Tiny
+ dev-perl/Config-Simple
+ dev-perl/File-BaseDir
+ dev-perl/File-ReadBackwards
+ media-fonts/font-cursor-misc
+ media-fonts/font-misc-misc
+ >=net-misc/nx-3.5.0.25
+ net-misc/openssh
+ x11-apps/xauth
+ x11-apps/xhost
+ x11-apps/xwininfo
+ fuse? ( sys-fs/sshfs-fuse )
+ postgres? ( dev-perl/DBD-Pg )
+ sqlite? ( dev-perl/DBD-SQLite )"
+
+pkg_setup() {
+ # Force the group creation, #479650
+ enewgroup x2gouser
+ enewgroup x2goprint
+ enewuser x2gouser -1 -1 /var/lib/x2go x2gouser
+ enewuser x2goprint -1 -1 /var/spool/x2goprint x2goprint
+}
+
+src_prepare() {
+ # Multilib clean
+ sed -e "/^LIBDIR=/s/lib/$(get_libdir)/" -i Makefile */Makefile || die "multilib sed failed"
+ # Skip man2html build
+ sed -e "s/build-indep: build_man2html/build-indep:/" -i Makefile */Makefile || die "man2html sed failed"
+ # Use nxagent directly
+ sed -i -e "/NX_TEMP=/s/x2goagent/nxagent/" x2goserver/bin/x2gostartagent || die "sed failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" PREFIX=/usr
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr install
+
+ fowners root:x2goprint /usr/bin/x2goprint
+ fperms 2755 /usr/bin/x2goprint
+ fperms 0750 /etc/sudoers.d
+ fperms 0440 /etc/sudoers.d/x2goserver
+ dosym /usr/share/applications /etc/x2go/applications
+
+ newinitd "${FILESDIR}"/${PN}.init x2gocleansessions
+ systemd_dounit "${FILESDIR}"/x2gocleansessions.service
+}
+
+pkg_postinst() {
+ if use sqlite ; then
+ elog "To use sqlite and create the initial database, run:"
+ elog " # x2godbadmin --createdb"
+ fi
+ if use postgres ; then
+ elog "To use a PostgreSQL databse, more information is availabe here:"
+ elog "http://www.x2go.org/doku.php/wiki:advanced:multi-node:x2goserver-pgsql"
+ fi
+
+ elog "For password authentication, you need to enable PasswordAuthentication"
+ elog "in /etc/ssh/sshd_config (disabled by default in Gentoo)"
+ elog "An init script was installed for x2gocleansessions"
+}
diff --git a/net-misc/x2goserver/x2goserver-4.0.1.17.ebuild b/net-misc/x2goserver/x2goserver-4.0.1.17.ebuild
new file mode 100644
index 000000000000..cb09ae2abc15
--- /dev/null
+++ b/net-misc/x2goserver/x2goserver-4.0.1.17.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib systemd toolchain-funcs user
+
+DESCRIPTION="The X2Go server"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+fuse postgres +sqlite"
+
+REQUIRED_USE="|| ( postgres sqlite )"
+
+DEPEND=""
+RDEPEND="dev-perl/Capture-Tiny
+ dev-perl/Config-Simple
+ dev-perl/File-BaseDir
+ dev-perl/File-ReadBackwards
+ media-fonts/font-cursor-misc
+ media-fonts/font-misc-misc
+ >=net-misc/nx-3.5.0.25
+ net-misc/openssh
+ x11-apps/xauth
+ x11-apps/xhost
+ x11-apps/xwininfo
+ fuse? ( sys-fs/sshfs-fuse )
+ postgres? ( dev-perl/DBD-Pg )
+ sqlite? ( dev-perl/DBD-SQLite )"
+
+pkg_setup() {
+ # Force the group creation, #479650
+ enewgroup x2gouser
+ enewgroup x2goprint
+ enewuser x2gouser -1 -1 /var/lib/x2go x2gouser
+ enewuser x2goprint -1 -1 /var/spool/x2goprint x2goprint
+}
+
+src_prepare() {
+ # Multilib clean
+ sed -e "/^LIBDIR=/s/lib/$(get_libdir)/" -i Makefile */Makefile || die "multilib sed failed"
+ # Skip man2html build
+ sed -e "s/build-indep: build_man2html/build-indep:/" -i Makefile */Makefile || die "man2html sed failed"
+ # Use nxagent directly
+ sed -i -e "/NX_TEMP=/s/x2goagent/nxagent/" x2goserver/bin/x2gostartagent || die "sed failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" PREFIX=/usr
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr install
+
+ fowners root:x2goprint /usr/bin/x2goprint
+ fperms 2755 /usr/bin/x2goprint
+ fperms 0750 /etc/sudoers.d
+ fperms 0440 /etc/sudoers.d/x2goserver
+ dosym /usr/share/applications /etc/x2go/applications
+
+ newinitd "${FILESDIR}"/${PN}.init x2gocleansessions
+ systemd_dounit "${FILESDIR}"/x2gocleansessions.service
+}
+
+pkg_postinst() {
+ if use sqlite ; then
+ elog "To use sqlite and create the initial database, run:"
+ elog " # x2godbadmin --createdb"
+ fi
+ if use postgres ; then
+ elog "To use a PostgreSQL databse, more information is availabe here:"
+ elog "http://www.x2go.org/doku.php/wiki:advanced:multi-node:x2goserver-pgsql"
+ fi
+
+ elog "For password authentication, you need to enable PasswordAuthentication"
+ elog "in /etc/ssh/sshd_config (disabled by default in Gentoo)"
+ elog "An init script was installed for x2gocleansessions"
+}
diff --git a/net-misc/x2goserver/x2goserver-4.0.1.18-r1.ebuild b/net-misc/x2goserver/x2goserver-4.0.1.18-r1.ebuild
new file mode 100644
index 000000000000..463eaf9c5391
--- /dev/null
+++ b/net-misc/x2goserver/x2goserver-4.0.1.18-r1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib systemd toolchain-funcs user
+
+DESCRIPTION="The X2Go server"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+fuse postgres +sqlite"
+
+REQUIRED_USE="|| ( postgres sqlite )"
+
+DEPEND=""
+RDEPEND="dev-perl/Capture-Tiny
+ dev-perl/Config-Simple
+ dev-perl/File-BaseDir
+ dev-perl/File-ReadBackwards
+ media-fonts/font-cursor-misc
+ media-fonts/font-misc-misc
+ >=net-misc/nx-3.5.0.25
+ net-misc/openssh
+ x11-apps/xauth
+ x11-apps/xhost
+ x11-apps/xwininfo
+ fuse? ( sys-fs/sshfs-fuse )
+ postgres? ( dev-perl/DBD-Pg )
+ sqlite? ( dev-perl/DBD-SQLite )"
+
+pkg_setup() {
+ # Force the group creation, #479650
+ enewgroup x2gouser
+ enewgroup x2goprint
+ enewuser x2gouser -1 -1 /var/lib/x2go x2gouser
+ enewuser x2goprint -1 -1 /var/spool/x2goprint x2goprint
+}
+
+src_prepare() {
+ # Bug #524350
+ epatch "${FILESDIR}"/${P}-prevent_bash_failures_xsession.patch
+
+ # Multilib clean
+ sed -e "/^LIBDIR=/s/lib/$(get_libdir)/" -i Makefile */Makefile || die "multilib sed failed"
+ # Skip man2html build
+ sed -e "s/build-indep: build_man2html/build-indep:/" -i Makefile */Makefile || die "man2html sed failed"
+ # Use nxagent directly
+ sed -i -e "/NX_TEMP=/s/x2goagent/nxagent/" x2goserver/bin/x2gostartagent || die "sed failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" PREFIX=/usr
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr install
+
+ fowners root:x2goprint /usr/bin/x2goprint
+ fperms 2755 /usr/bin/x2goprint
+ fperms 0750 /etc/sudoers.d
+ fperms 0440 /etc/sudoers.d/x2goserver
+ dosym /usr/share/applications /etc/x2go/applications
+
+ newinitd "${FILESDIR}"/${PN}.init x2gocleansessions
+ systemd_dounit "${FILESDIR}"/x2gocleansessions.service
+}
+
+pkg_postinst() {
+ if use sqlite ; then
+ elog "To use sqlite and create the initial database, run:"
+ elog " # x2godbadmin --createdb"
+ fi
+ if use postgres ; then
+ elog "To use a PostgreSQL databse, more information is availabe here:"
+ elog "http://www.x2go.org/doku.php/wiki:advanced:multi-node:x2goserver-pgsql"
+ fi
+
+ elog "For password authentication, you need to enable PasswordAuthentication"
+ elog "in /etc/ssh/sshd_config (disabled by default in Gentoo)"
+ elog "An init script was installed for x2gocleansessions"
+}
diff --git a/net-misc/x2goserver/x2goserver-4.0.1.18-r2.ebuild b/net-misc/x2goserver/x2goserver-4.0.1.18-r2.ebuild
new file mode 100644
index 000000000000..9a23e81a01e4
--- /dev/null
+++ b/net-misc/x2goserver/x2goserver-4.0.1.18-r2.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib systemd toolchain-funcs user
+
+DESCRIPTION="The X2Go server"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+fuse postgres +sqlite"
+
+REQUIRED_USE="|| ( postgres sqlite )"
+
+DEPEND=""
+RDEPEND="dev-perl/Capture-Tiny
+ dev-perl/Config-Simple
+ dev-perl/File-BaseDir
+ dev-perl/File-ReadBackwards
+ media-fonts/font-cursor-misc
+ media-fonts/font-misc-misc
+ >=net-misc/nx-3.5.0.25
+ net-misc/openssh
+ x11-apps/xauth
+ x11-apps/xhost
+ x11-apps/xwininfo
+ fuse? ( sys-fs/sshfs-fuse )
+ postgres? ( dev-perl/DBD-Pg )
+ sqlite? ( dev-perl/DBD-SQLite )"
+
+pkg_setup() {
+ # Force the group creation, #479650
+ enewgroup x2gouser
+ enewgroup x2goprint
+ enewuser x2gouser -1 -1 /var/lib/x2go x2gouser
+ enewuser x2goprint -1 -1 /var/spool/x2goprint x2goprint
+}
+
+src_prepare() {
+ # Bug #524350
+ epatch "${FILESDIR}"/${P}-prevent_bash_failures_xsession.patch
+ epatch "${FILESDIR}"/${P}-fix_local_desktop_sharing.patch
+ # Bug #524350
+ epatch "${FILESDIR}"/${P}-use_printf.patch
+
+ # Do not install Xresources symlink (#521126)
+ sed -e '\#$(INSTALL_SYMLINK) /etc/X11/Xresources# s/^/#/' -i x2goserver-xsession/Makefile || die "Xresources symlink sed failed"
+ # Multilib clean
+ sed -e "/^LIBDIR=/s/lib/$(get_libdir)/" -i Makefile */Makefile || die "multilib sed failed"
+ # Skip man2html build
+ sed -e "s/build-indep: build_man2html/build-indep:/" -i Makefile */Makefile || die "man2html sed failed"
+ # Use nxagent directly
+ sed -i -e "/NX_TEMP=/s/x2goagent/nxagent/" x2goserver/bin/x2gostartagent || die "sed failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" PREFIX=/usr
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr install
+
+ fowners root:x2goprint /usr/bin/x2goprint
+ fperms 2755 /usr/bin/x2goprint
+ fperms 0750 /etc/sudoers.d
+ fperms 0440 /etc/sudoers.d/x2goserver
+ dosym /usr/share/applications /etc/x2go/applications
+
+ newinitd "${FILESDIR}"/${PN}.init x2gocleansessions
+ systemd_dounit "${FILESDIR}"/x2gocleansessions.service
+}
+
+pkg_postinst() {
+ if use sqlite ; then
+ elog "To use sqlite and create the initial database, run:"
+ elog " # x2godbadmin --createdb"
+ fi
+ if use postgres ; then
+ elog "To use a PostgreSQL databse, more information is availabe here:"
+ elog "http://www.x2go.org/doku.php/wiki:advanced:multi-node:x2goserver-pgsql"
+ fi
+
+ elog "For password authentication, you need to enable PasswordAuthentication"
+ elog "in /etc/ssh/sshd_config (disabled by default in Gentoo)"
+ elog "An init script was installed for x2gocleansessions"
+}
diff --git a/net-misc/x2goserver/x2goserver-4.0.1.18.ebuild b/net-misc/x2goserver/x2goserver-4.0.1.18.ebuild
new file mode 100644
index 000000000000..cb09ae2abc15
--- /dev/null
+++ b/net-misc/x2goserver/x2goserver-4.0.1.18.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib systemd toolchain-funcs user
+
+DESCRIPTION="The X2Go server"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+fuse postgres +sqlite"
+
+REQUIRED_USE="|| ( postgres sqlite )"
+
+DEPEND=""
+RDEPEND="dev-perl/Capture-Tiny
+ dev-perl/Config-Simple
+ dev-perl/File-BaseDir
+ dev-perl/File-ReadBackwards
+ media-fonts/font-cursor-misc
+ media-fonts/font-misc-misc
+ >=net-misc/nx-3.5.0.25
+ net-misc/openssh
+ x11-apps/xauth
+ x11-apps/xhost
+ x11-apps/xwininfo
+ fuse? ( sys-fs/sshfs-fuse )
+ postgres? ( dev-perl/DBD-Pg )
+ sqlite? ( dev-perl/DBD-SQLite )"
+
+pkg_setup() {
+ # Force the group creation, #479650
+ enewgroup x2gouser
+ enewgroup x2goprint
+ enewuser x2gouser -1 -1 /var/lib/x2go x2gouser
+ enewuser x2goprint -1 -1 /var/spool/x2goprint x2goprint
+}
+
+src_prepare() {
+ # Multilib clean
+ sed -e "/^LIBDIR=/s/lib/$(get_libdir)/" -i Makefile */Makefile || die "multilib sed failed"
+ # Skip man2html build
+ sed -e "s/build-indep: build_man2html/build-indep:/" -i Makefile */Makefile || die "man2html sed failed"
+ # Use nxagent directly
+ sed -i -e "/NX_TEMP=/s/x2goagent/nxagent/" x2goserver/bin/x2gostartagent || die "sed failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" PREFIX=/usr
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr install
+
+ fowners root:x2goprint /usr/bin/x2goprint
+ fperms 2755 /usr/bin/x2goprint
+ fperms 0750 /etc/sudoers.d
+ fperms 0440 /etc/sudoers.d/x2goserver
+ dosym /usr/share/applications /etc/x2go/applications
+
+ newinitd "${FILESDIR}"/${PN}.init x2gocleansessions
+ systemd_dounit "${FILESDIR}"/x2gocleansessions.service
+}
+
+pkg_postinst() {
+ if use sqlite ; then
+ elog "To use sqlite and create the initial database, run:"
+ elog " # x2godbadmin --createdb"
+ fi
+ if use postgres ; then
+ elog "To use a PostgreSQL databse, more information is availabe here:"
+ elog "http://www.x2go.org/doku.php/wiki:advanced:multi-node:x2goserver-pgsql"
+ fi
+
+ elog "For password authentication, you need to enable PasswordAuthentication"
+ elog "in /etc/ssh/sshd_config (disabled by default in Gentoo)"
+ elog "An init script was installed for x2gocleansessions"
+}
diff --git a/net-misc/x2goserver/x2goserver-4.0.1.19.ebuild b/net-misc/x2goserver/x2goserver-4.0.1.19.ebuild
new file mode 100644
index 000000000000..827c64d8a68f
--- /dev/null
+++ b/net-misc/x2goserver/x2goserver-4.0.1.19.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib systemd toolchain-funcs user
+
+DESCRIPTION="The X2Go server"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE="+fuse postgres +sqlite"
+
+REQUIRED_USE="|| ( postgres sqlite )"
+
+DEPEND=""
+RDEPEND="dev-perl/Capture-Tiny
+ dev-perl/Config-Simple
+ dev-perl/File-BaseDir
+ dev-perl/File-ReadBackwards
+ dev-perl/File-Which
+ media-fonts/font-cursor-misc
+ media-fonts/font-misc-misc
+ >=net-misc/nx-3.5.0.25
+ net-misc/openssh
+ x11-apps/xauth
+ x11-apps/xhost
+ x11-apps/xwininfo
+ fuse? ( sys-fs/sshfs-fuse )
+ postgres? ( dev-perl/DBD-Pg )
+ sqlite? ( dev-perl/DBD-SQLite )"
+
+pkg_setup() {
+ # Force the group creation, #479650
+ enewgroup x2gouser
+ enewgroup x2goprint
+ enewuser x2gouser -1 -1 /var/lib/x2go x2gouser
+ enewuser x2goprint -1 -1 /var/spool/x2goprint x2goprint
+}
+
+src_prepare() {
+ # Do not install Xresources symlink (#521126)
+ sed -e '\#$(INSTALL_SYMLINK) /etc/X11/Xresources# s/^/#/' -i x2goserver-xsession/Makefile || die "Xresources symlink sed failed"
+ # Multilib clean
+ sed -e "/^LIBDIR=/s/lib/$(get_libdir)/" -i Makefile */Makefile || die "multilib sed failed"
+ # Skip man2html build
+ sed -e "s/build-indep: build_man2html/build-indep:/" -i Makefile */Makefile || die "man2html sed failed"
+ # Use nxagent directly
+ sed -i -e "/NX_TEMP=/s/x2goagent/nxagent/" x2goserver/bin/x2gostartagent || die "sed failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" PREFIX=/usr
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr install
+
+ fowners root:x2goprint /usr/bin/x2goprint
+ fperms 2755 /usr/bin/x2goprint
+ fperms 0750 /etc/sudoers.d
+ fperms 0440 /etc/sudoers.d/x2goserver
+ dosym /usr/share/applications /etc/x2go/applications
+
+ newinitd "${FILESDIR}"/${PN}.init x2gocleansessions
+ systemd_dounit "${FILESDIR}"/x2gocleansessions.service
+}
+
+pkg_postinst() {
+ if use sqlite ; then
+ elog "To use sqlite and create the initial database, run:"
+ elog " # x2godbadmin --createdb"
+ fi
+ if use postgres ; then
+ elog "To use a PostgreSQL databse, more information is availabe here:"
+ elog "http://www.x2go.org/doku.php/wiki:advanced:multi-node:x2goserver-pgsql"
+ fi
+
+ elog "For password authentication, you need to enable PasswordAuthentication"
+ elog "in /etc/ssh/sshd_config (disabled by default in Gentoo)"
+ elog "An init script was installed for x2gocleansessions"
+}
diff --git a/net-misc/xrdp/Manifest b/net-misc/xrdp/Manifest
new file mode 100644
index 000000000000..acd8c0e8e42b
--- /dev/null
+++ b/net-misc/xrdp/Manifest
@@ -0,0 +1 @@
+DIST xrdp-0.8.0.tar.xz 1671376 SHA256 433535039f8b8766d9c22f62de9599afa94dd553e72d9791cec85a5e2f436a60 SHA512 bb2afefce7f53b6c3bca30cb6913171211df63a700f7d70325c1722348d5d31981e1d417727e48fd14aad500d0454e4126e6e1f81f8c09da4928b02f4acff26b WHIRLPOOL 39c1d4852f6f927fd348d345a8d4f4a79824eca0d5682340908d28f3b6b497ae33bfed944294b061b118e4154ed7c5dce15878302145ffabc2ca6b3a2eb07818
diff --git a/net-misc/xrdp/files/startwm.sh b/net-misc/xrdp/files/startwm.sh
new file mode 100644
index 000000000000..df3dd787f2b5
--- /dev/null
+++ b/net-misc/xrdp/files/startwm.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# try hard to respect Gentoo's wm choice
+. /etc/profile
+[ -f /etc/rc.conf ] && . /etc/rc.conf
+export XSESSION
+
+. /etc/X11/xinit/xinitrc
diff --git a/net-misc/xrdp/files/xrdp-0.8.0-crypt-null-return.patch b/net-misc/xrdp/files/xrdp-0.8.0-crypt-null-return.patch
new file mode 100644
index 000000000000..44543906a5e0
--- /dev/null
+++ b/net-misc/xrdp/files/xrdp-0.8.0-crypt-null-return.patch
@@ -0,0 +1,36 @@
+From 851c762ee722a84d15348b2512b3b578282e590b Mon Sep 17 00:00:00 2001
+From: Jay Sorg <jay.sorg@gmail.com>
+Date: Wed, 29 Oct 2014 17:54:11 -0700
+Subject: [PATCH] sesman: check for null from crypt()
+
+---
+ sesman/verify_user.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/sesman/verify_user.c b/sesman/verify_user.c
+index 98d3dd3..49c475c 100644
+--- a/sesman/verify_user.c
++++ b/sesman/verify_user.c
+@@ -51,6 +51,7 @@ long DEFAULT_CC
+ auth_userpass(char *user, char *pass, int *errorcode)
+ {
+ const char *encr;
++ const char *epass;
+ struct passwd *spw;
+ struct spwd *stp;
+
+@@ -84,8 +85,12 @@ auth_userpass(char *user, char *pass, int *errorcode)
+ /* old system with only passwd */
+ encr = spw->pw_passwd;
+ }
+-
+- return (strcmp(encr, crypt(pass, encr)) == 0);
++ epass = crypt(pass, encr);
++ if (epass == 0)
++ {
++ return 0;
++ }
++ return (strcmp(encr, epass) == 0);
+ }
+
+ /******************************************************************************/
diff --git a/net-misc/xrdp/files/xrdp-initd b/net-misc/xrdp/files/xrdp-initd
new file mode 100644
index 000000000000..797dfda61f2b
--- /dev/null
+++ b/net-misc/xrdp/files/xrdp-initd
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use net logger
+}
+
+start() {
+ ebegin "Starting X remote desktop daemon"
+ start-stop-daemon --start --pidfile /var/run/xrdp.pid --exec /usr/sbin/xrdp > /dev/null
+ eend $? || return $?
+
+ ebegin "Starting remote desktop session manager"
+ start-stop-daemon --start --pidfile /var/run/xrdp-sesman.pid --exec /usr/sbin/xrdp-sesman > /dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping X remote desktop daemon"
+ start-stop-daemon --stop --pidfile /var/run/xrdp.pid
+ eend $?
+
+ ebegin "Stopping remote desktop session manager"
+ start-stop-daemon --stop --pidfile /var/run/xrdp-sesman.pid
+ eend $?
+}
diff --git a/net-misc/xrdp/files/xrdp-sesman.pamd b/net-misc/xrdp/files/xrdp-sesman.pamd
new file mode 100644
index 000000000000..4712aa8aec0d
--- /dev/null
+++ b/net-misc/xrdp/files/xrdp-sesman.pamd
@@ -0,0 +1,4 @@
+auth include system-remote-login
+account include system-remote-login
+password include system-remote-login
+session include system-remote-login
diff --git a/net-misc/xrdp/metadata.xml b/net-misc/xrdp/metadata.xml
new file mode 100644
index 000000000000..7ad52bdd6edd
--- /dev/null
+++ b/net-misc/xrdp/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>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <use>
+ <flag name='fuse'>Enable clipboard file / device redirection via <pkg>sys-fs/fuse</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/xrdp/xrdp-0.8.0-r1.ebuild b/net-misc/xrdp/xrdp-0.8.0-r1.ebuild
new file mode 100644
index 000000000000..290e73154103
--- /dev/null
+++ b/net-misc/xrdp/xrdp-0.8.0-r1.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils pam systemd
+
+DESCRIPTION="An open source Remote Desktop Protocol server"
+HOMEPAGE="http://www.xrdp.org/"
+# mirrored from https://github.com/neutrinolabs/xrdp/releases
+SRC_URI="http://dev.gentoo.org/~mgorny/dist/${P}.tar.xz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug fuse kerberos jpeg pam pulseaudio"
+
+RDEPEND="dev-libs/openssl:0=
+ x11-libs/libX11:0=
+ x11-libs/libXfixes:0=
+ x11-libs/libXrandr:0=
+ fuse? ( sys-fs/fuse:0= )
+ jpeg? ( virtual/jpeg:0= )
+ kerberos? ( virtual/krb5:0= )
+ pam? ( virtual/pam:0= )
+ pulseaudio? ( media-sound/pulseaudio:0= )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils"
+RDEPEND="${RDEPEND}
+ || (
+ net-misc/tigervnc:0=[server,xorgmodule]
+ net-misc/x11rdp:0=
+ )"
+
+# does not work with gentoo version of freerdp
+# neutrinordp? ( net-misc/freerdp:0= )
+# incompatible with current ffmpeg/libav (surprising, isn't it?)
+# xrdpvr? ( virtual/ffmpeg:0= )
+
+src_prepare() {
+ epatch_user
+
+ # #540630: crypt() unchecked for NULL return
+ epatch "${FILESDIR}"/${P}-crypt-null-return.patch
+
+ # don't let USE=debug adjust CFLAGS
+ sed -i -e 's:-g -O0::' configure.ac || die
+ # disallow root login by default
+ sed -i -e '/^AllowRootLogin/s/1/0/' sesman/sesman.ini || die
+ # Fedora files, not included here
+ sed -i -e '/EnvironmentFile=/d' instfiles/*.service || die
+ # reorder so that X11rdp comes last again since it's not supported
+ sed -i -e '/^\[xrdp1\]$/,/^$/{wxrdp.ini.tmp
+ ;d}' xrdp/xrdp.ini || die
+ # move newline to the beginning
+ sed -i -e 'x' xrdp.ini.tmp || die
+ cat xrdp.ini.tmp >> xrdp/xrdp.ini || die
+ rm -f xrdp.ini.tmp || die
+
+ eautoreconf
+ # part of ./bootstrap
+ ln -s ../config.c sesman/tools/config.c || die
+}
+
+src_configure() {
+ use kerberos && use pam \
+ && ewarn "Both kerberos & pam auth enabled, kerberos will take precedence."
+
+ local myconf=(
+ # warning: configure.ac is completed flawed
+
+ --localstatedir="${EPREFIX}"/var
+
+ # -- authentication backends --
+ # kerberos is inside !SESMAN_NOPAM conditional for no reason
+ $(use pam || use kerberos || echo --enable-nopam)
+ $(usex kerberos --enable-kerberos '')
+ # pam_userpass is not in Gentoo at the moment
+ #--disable-pamuserpass
+
+ # -- jpeg support --
+ $(usex jpeg --enable-jpeg '')
+ # the package supports explicit linking against libjpeg-turbo
+ # (no need for -ljpeg compat)
+ $(use jpeg && has_version 'media-libs/libjpeg-turbo:0' && echo --enable-tjpeg)
+
+ # -- sound support --
+ $(usex pulseaudio '--enable-simplesound --enable-loadpulsemodules' '')
+
+ # -- others --
+ $(usex debug --enable-xrdpdebug '')
+ $(usex fuse --enable-fuse '')
+ # $(usex neutrinordp --enable-neutrinordp '')
+ # $(usex xrdpvr --enable-xrdpvr '')
+
+ "$(systemd_with_unitdir)"
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+
+ # use our pam.d file since upstream's incompatible with Gentoo
+ use pam && newpamd "${FILESDIR}"/xrdp-sesman.pamd xrdp-sesman
+ # and our startwm.sh
+ exeinto /etc/xrdp
+ doexe "${FILESDIR}"/startwm.sh
+
+ # Fedora stuff
+ rm -r "${ED}"/etc/default || die
+
+ # own /etc/xrdp/rsakeys.ini
+ : > rsakeys.ini
+ insinto /etc/xrdp
+ doins rsakeys.ini
+
+ # contributed by Jan Psota <jasiupsota@gmail.com>
+ newinitd "${FILESDIR}/${PN}-initd" ${PN}
+}
+
+pkg_preinst() {
+ # either copy existing keys over to avoid CONFIG_PROTECT whining
+ # or generate new keys (but don't include them in binpkg!)
+ if [[ -f ${EROOT}/etc/xrdp/rsakeys.ini ]]; then
+ cp {"${EROOT}","${ED}"}/etc/xrdp/rsakeys.ini || die
+ else
+ einfo "Running xrdp-keygen to generate new rsakeys.ini ..."
+ "${S}"/keygen/xrdp-keygen xrdp "${ED}"/etc/xrdp/rsakeys.ini \
+ || die "xrdp-keygen failed to generate RSA keys"
+ fi
+}
+
+pkg_postinst() {
+ # check for use of bundled rsakeys.ini (installed by default upstream)
+ if [[ $(cksum "${EROOT}"/etc/xrdp/rsakeys.ini) == '2935297193 1019 '* ]]
+ then
+ ewarn "You seem to be using upstream bundled rsakeys.ini. This means that"
+ ewarn "your communications are encrypted using a well-known key. Please"
+ ewarn "consider regenerating rsakeys.ini using the following command:"
+ ewarn
+ ewarn " ${EROOT}/usr/bin/xrdp-keygen xrdp ${EROOT}/etc/xrdp/rsakeys.ini"
+ ewarn
+ fi
+
+ elog "Various session types require different backend implementations:"
+ elog "- sesman-Xvnc requires net-misc/tigervnc[server,xorgmodule]"
+ elog "- sesman-X11rdp requires net-misc/x11rdp"
+}
diff --git a/net-misc/yajhfc/Manifest b/net-misc/yajhfc/Manifest
new file mode 100644
index 000000000000..94a3011756fb
--- /dev/null
+++ b/net-misc/yajhfc/Manifest
@@ -0,0 +1,2 @@
+DIST yajhfc-0_5_2.jar 1902262 SHA256 7182a694b1ee6310b94ca7e5ca913cc381c463101dd2d004a92f4c86fb3a4d7e SHA512 0c0ba609a15dd8e79743d4afea75350ba5626676e3fa2dd24835d8d661c894e910ab1df7c69b05f9db4519ffcd3491b774cad89a2b48597e78e23720414c4e73 WHIRLPOOL 971454666b46beb2fc4aebdf8b69e9a47f32eb87e0ed9eefb1c822f2c6791bc38346645acc611aca37797d49389c5965809cb5e10bd1ec4bd01241f0167f48dd
+DIST yajhfc-0_5_7-src.zip 3577450 SHA256 896f394dabe60238114b2e91f40a595e052185b14105b00f073994cb1b454dcc SHA512 9177e959810df9ab005f2ed380275f6683aa22e0b6209d50a96d8f60018c0dc1d624dc400ad6ac2625688d57ecb84401f26dd66b145da518c0c5287c0af4e9f1 WHIRLPOOL 7e75333ea99eab1aa42937a97b0584a8f71a8b126d55e15111a0a460afa5e999d0510fb0d57f245c2b9cd38a92cc4bb1b26850617b15bb29dfd23d05960e7bdb
diff --git a/net-misc/yajhfc/metadata.xml b/net-misc/yajhfc/metadata.xml
new file mode 100644
index 000000000000..75de67d8673a
--- /dev/null
+++ b/net-misc/yajhfc/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>mattm@gentoo.org</email>
+ <name>Matthew Marlowe</name>
+ </maintainer>
+ <longdescription>
+Client for Hylafax+ Server.
+</longdescription>
+</pkgmetadata>
diff --git a/net-misc/yajhfc/yajhfc-0.5.2.ebuild b/net-misc/yajhfc/yajhfc-0.5.2.ebuild
new file mode 100644
index 000000000000..2e126b29b848
--- /dev/null
+++ b/net-misc/yajhfc/yajhfc-0.5.2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils java-pkg-opt-2 versionator
+
+MY_P="${PN}-${PV}.jar"
+MY_P="${MY_P/_/}"
+MY_P="${MY_P/./_}"
+MY_P="${MY_P/./_}"
+
+DESCRIPTION="Yet another Java HylaFAX Plus Client"
+HOMEPAGE="http://www.yajhfc.de/"
+SRC_URI="http://download.yajhfc.de/releases/${MY_P}"
+
+SLOT="0"
+LICENSE="GPL-3"
+KEYWORDS=""
+IUSE=""
+
+COMMON_DEPEND=">=virtual/jdk-1.4"
+RDEPEND="${COMMON_DEPEND} >=virtual/jre-1.4"
+DEPEND="${COMMON_DEPEND} virtual/pkgconfig"
+
+S="${WORKDIR}/${MY_P}"
+
+src_install() {
+ echo "java -jar /usr/bin/${MY_P}" > "${WORKDIR}"/h.h
+ newbin "${WORKDIR}/h.h" "yajhfc"
+ newbin "${DISTDIR}/${MY_P}" "${MY_P}"
+}
diff --git a/net-misc/yajhfc/yajhfc-0.5.7.ebuild b/net-misc/yajhfc/yajhfc-0.5.7.ebuild
new file mode 100644
index 000000000000..d49aa58ec854
--- /dev/null
+++ b/net-misc/yajhfc/yajhfc-0.5.7.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit java-pkg-2 java-pkg-simple
+
+MY_P="${PN}-${PV}"
+MY_P="${MY_P/_/}"
+MY_P="${MY_P/./_}"
+MY_P="${MY_P/./_}"
+
+DESCRIPTION="Yet another Java HylaFAX Plus Client"
+HOMEPAGE="http://www.yajhfc.de/"
+SRC_URI="http://download.yajhfc.de/releases/${MY_P}-src.zip"
+
+SLOT="0"
+LICENSE="GPL-3"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+COMMON_DEPEND="dev-java/gnu-hylafax:0
+ dev-java/tablelayout:0"
+RDEPEND="${COMMON_DEPEND} >=virtual/jre-1.6"
+DEPEND="${COMMON_DEPEND} >=virtual/jdk-1.6 virtual/pkgconfig app-arch/unzip"
+
+S="${WORKDIR}/${PN}"
+
+JAVA_GENTOO_CLASSPATH="gnu-hylafax,tablelayout"
+JAVA_SRC_DIR="src"
+
+src_prepare() {
+ rm build.xml || die
+ rm -rv "${S}"/jna-src "${S}"/mac-src || die # contains win32/mac only code
+
+ cp -r java1-src/* src || die
+ cp -r java6-src/* src || die
+
+ # this method is missing in the gnu-hylafax api despite they use the same upstream version
+ sed -i -e 's/client.setCharacterEncoding.*//g' src/yajhfc/HylaClientManager.java || die
+}
+
+src_compile() {
+ java-pkg-simple_src_compile
+ pushd src || die
+ find -type f -not -name "*.java" -not -name "*.class" | xargs jar uf "${S}"/${PN}.jar || die
+}
+
+src_install() {
+ java-pkg-simple_src_install
+ java-pkg_dolauncher ${PN} --jar ${PN}.jar --main yajhfc.Launcher
+}
diff --git a/net-misc/yandex-disk/Manifest b/net-misc/yandex-disk/Manifest
new file mode 100644
index 000000000000..4a41aaba21fe
--- /dev/null
+++ b/net-misc/yandex-disk/Manifest
@@ -0,0 +1,4 @@
+DIST yandex-disk-0.1.5.758-1.fedora.i386.rpm 3983558 SHA256 b89b294ea006d28b78c7138fbc387b7211f18e7d49ee4fb4caa4d61ab6266d46 SHA512 b7b65c20bbd827504653a2ee59aa2ba1e0321ac47727e88e14a8c93369c63ccb1d4c583669d3f4d504f66cf07cb84e3c534fa6327aa596b5ca9c8114575af397 WHIRLPOOL f8edace2a2bf1c8f229d1c6bcea3f7e826aa54e213efbf9b09c099631dee13fa8a6c64470002562b00b48666b18a1f9e30b4e7e92dceb5ec96a75f6e00d0057e
+DIST yandex-disk-0.1.5.758-1.fedora.x86_64.rpm 4342203 SHA256 1141a27d70041d81c73f38a8f22b841366cf88c0cd7f3980e4ad2e18a9b2c9ac SHA512 28a720cb0147bb43d8d6e0d9454c2cacf849d7b83f0110d6a01bb9b68ad882701981e8bed880fec112ca76d554b3fc92654df0e0b2498bb7e6cc7871059ef6e3 WHIRLPOOL a2e5e78ebff86cd8adad25af3afd1b463c6a2ef79bb3b569b5136f1215a305f3c9ff15bf5cfbc434f813810ac7dd6c5bc3909762136cc3cb67b00fab1320c1f3
+DIST yandex-disk-0.1.5.870-1.fedora.i386.rpm 3999971 SHA256 63ef9759844e168ba7042264d406a52dd81d6c986d33706c1b88076223ed35d1 SHA512 ae2d8f6c4b9d76dc7af08543bf20bb6c2cece0d13d0377e2de516a73e3e0916f91539b969c65a2ebd4b321081957766c95c4590698b44b6cf744c28ed4934cf7 WHIRLPOOL d3bce8c44068502eef284ecf9054b642867551c547d9df0dcd089115a3592c786a5fd2064c150bb76c02ccefbcdecd61ec7814340ed389a7de5c241a584e9cd3
+DIST yandex-disk-0.1.5.870-1.fedora.x86_64.rpm 4389161 SHA256 31fc1181dd72011e94387d382f08c3b061723767a90d42028598d26d50a03318 SHA512 7494f6c12bbe2648a612e1a43ae92170664bd2082b94dc528ae6a27c9c0cfdabbc2048e0283b89c7c754836fdb6d11d36d0c4052ffb9afe8bbf1fb9fb5944685 WHIRLPOOL d830f733496422f57284e3b3e3e0e956a854f3aa75a7d75e8a2c8cf3f4d1a37f5c23cb52b046fe5e8376e545e53962b633e78bd68e7bd22589668a00eaf64361
diff --git a/net-misc/yandex-disk/metadata.xml b/net-misc/yandex-disk/metadata.xml
new file mode 100644
index 000000000000..9ef9c615e0c0
--- /dev/null
+++ b/net-misc/yandex-disk/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>proxy-maintainers</herd>
+ <maintainer>
+ <email>blueboar@gentoo.org</email>
+ <name>Vladimir Romanov</name>
+ <description>Maintainer. Assign bugs to him</description>
+ </maintainer>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ <description>Proxy maintainer. CC him on bugs</description>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/yandex-disk/yandex-disk-0.1.5.758_p1.ebuild b/net-misc/yandex-disk/yandex-disk-0.1.5.758_p1.ebuild
new file mode 100644
index 000000000000..9c840a9953d8
--- /dev/null
+++ b/net-misc/yandex-disk/yandex-disk-0.1.5.758_p1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit bash-completion-r1 eutils rpm
+
+MY_P="${PN}-${PV/_p/-}"
+
+DESCRIPTION="CLI to access Yandex Disk file storage service"
+HOMEPAGE="https://disk.yandex.ru"
+SRC_URI="
+ amd64? ( http://repo.yandex.ru/yandex-disk/rpm/stable/x86_64/${MY_P}.fedora.x86_64.rpm )
+ x86? ( http://repo.yandex.ru/yandex-disk/rpm/stable/i386/${MY_P}.fedora.i386.rpm )
+"
+
+LICENSE="YDSLA"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+
+DEPEND=""
+RDEPEND="sys-libs/zlib"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="opt/bin/yandex-disk"
+
+src_prepare() {
+ # bug #526312
+ sed -i \
+ -e '/have /d' \
+ -e 's/+o nospace/-o nospace/' \
+ -e '/^complete/s/-X //' \
+ etc/bash_completion.d/yandex-disk-completion.bash || die
+
+ epatch_user
+}
+
+src_install() {
+ exeinto /opt/bin
+ doexe usr/bin/yandex-disk
+ newbashcomp etc/bash_completion.d/yandex-disk-completion.bash "${PN}"
+}
diff --git a/net-misc/yandex-disk/yandex-disk-0.1.5.870_p1.ebuild b/net-misc/yandex-disk/yandex-disk-0.1.5.870_p1.ebuild
new file mode 100644
index 000000000000..090f155c40c4
--- /dev/null
+++ b/net-misc/yandex-disk/yandex-disk-0.1.5.870_p1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit bash-completion-r1 eutils rpm
+
+MY_P="${PN}-${PV/_p/-}"
+
+DESCRIPTION="CLI to access Yandex Disk file storage service"
+HOMEPAGE="https://disk.yandex.ru"
+SRC_URI="
+ amd64? ( http://repo.yandex.ru/yandex-disk/rpm/stable/x86_64/${MY_P}.fedora.x86_64.rpm )
+ x86? ( http://repo.yandex.ru/yandex-disk/rpm/stable/i386/${MY_P}.fedora.i386.rpm )
+"
+
+LICENSE="YDSLA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+
+DEPEND=""
+RDEPEND="sys-libs/zlib"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="opt/bin/yandex-disk"
+
+src_prepare() {
+ # bug #526312
+ sed -i \
+ -e '/have /d' \
+ -e 's/+o nospace/-o nospace/' \
+ -e '/^complete/s/-X //' \
+ etc/bash_completion.d/yandex-disk-completion.bash || die
+
+ epatch_user
+}
+
+src_install() {
+ exeinto /opt/bin
+ doexe usr/bin/yandex-disk
+ newbashcomp etc/bash_completion.d/yandex-disk-completion.bash "${PN}"
+}
diff --git a/net-misc/yaydl/Manifest b/net-misc/yaydl/Manifest
new file mode 100644
index 000000000000..1737a3be20a8
--- /dev/null
+++ b/net-misc/yaydl/Manifest
@@ -0,0 +1 @@
+DIST yaydl-1.5.2.tar.gz 13933 SHA256 f2ee58aad1b6ab458fb3e9ff21f195af17dbfea4237642a998d89996b0449cc0
diff --git a/net-misc/yaydl/metadata.xml b/net-misc/yaydl/metadata.xml
new file mode 100644
index 000000000000..9db41b280b87
--- /dev/null
+++ b/net-misc/yaydl/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="soundextract">Extract the soundtracks of the downloaded videos</flag>
+ </use>
+</pkgmetadata>
+
diff --git a/net-misc/yaydl/yaydl-1.5.2.ebuild b/net-misc/yaydl/yaydl-1.5.2.ebuild
new file mode 100644
index 000000000000..0b99a27632f3
--- /dev/null
+++ b/net-misc/yaydl/yaydl-1.5.2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Yet Another Youtube DownLoader which is downloading more than youtube"
+HOMEPAGE="http://pdes-net.org/x-haui/"
+SRC_URI="http://pdes-net.org/x-haui/scripts/perl/yaydl_youtubedownloader/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="encode soundextract"
+
+DEPEND=""
+RDEPEND="
+ dev-lang/perl
+ dev-perl/LWP-UserAgent-Determined
+ dev-perl/MP3-Info
+ dev-perl/Term-ProgressBar
+ dev-perl/URI
+ encode? (
+ || (
+ virtual/ffmpeg[encode]
+ media-video/mplayer[encode,mp3,xvid]
+ )
+ )
+ soundextract? (
+ || (
+ virtual/ffmpeg[encode,mp3]
+ (
+ media-video/mplayer
+ media-sound/lame
+ )
+ )
+ )"
+
+src_install() {
+ newbin ${PN}.pl ${PN}
+ dodoc changelog README
+}
+
+pkg_postinst() {
+ elog "${PN} is supporting a lot of video websites."
+ elog "Look at ${HOMEPAGE} for more information."
+}
diff --git a/net-misc/youtube-dl/Manifest b/net-misc/youtube-dl/Manifest
new file mode 100644
index 000000000000..53bc85bfbce5
--- /dev/null
+++ b/net-misc/youtube-dl/Manifest
@@ -0,0 +1,3 @@
+DIST youtube-dl-2015.04.03.tar.gz 1472296 SHA256 0521a15a24a9b620728a2f45ea9163ca74660ed443781b6e69b4e06d36d7bf59 SHA512 6b2c85cfa222a31f3462aab583fa98bb92544cd5fb0d395ca0b69a26c24ab174870d02264e058281f09305752d50aa5a06d0d747205499a530b275e3194fc6f9 WHIRLPOOL 391e06ea261f92e03a0b38618307f1c9d53a2dfb9f2062fe0cd3ded1ea0c411033a17ded581616032c74a9e4fb398a57e565bf847196a23a9f89433f861362ae
+DIST youtube-dl-2015.07.28.tar.gz 1671847 SHA256 61c3acea56cb6127c092fed37ce77c64f14b501faceab54496412d3479685c56 SHA512 d1df40ece3a384859ee25419c7caafb37d55fc504920ba638d40ea4971a97e5dc70a2d03be30fadef5ff24df9f55d471095d707795d7951ba3ebe76735d1a9be WHIRLPOOL 49daef34e160a731d5f37c92dca038c86e3ada1d9f3f8468c97e7e164b575bf022bb04636e8967bb7fe723fbbb51b68aa3db25563873ac626f85053f5b4a1444
+DIST youtube-dl-2015.08.06.1.tar.gz 1684397 SHA256 efd25b9827851a5b8f7108437ea4d84f778702e59fcf85e37e9e0933b8a5c908 SHA512 4e7c35f0f903092c218439e2e9437b7af8c18a26a5d918d0ec086749d15d485ec781ac35cfd25498c4e99bccafdaf7283ea51fa6538109b4798ac3a32a5fd106 WHIRLPOOL 169e42c89d46da2dda59af4f92fa60eb7c1132eceedbdeeb6d139676997d61d8fb858a1d689dc23657f085457a678ddbabe8b816567f7ac11bdf8f8bc8426e60
diff --git a/net-misc/youtube-dl/metadata.xml b/net-misc/youtube-dl/metadata.xml
new file mode 100644
index 000000000000..4e9681798108
--- /dev/null
+++ b/net-misc/youtube-dl/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>jer@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <email>nirbheek@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/youtube-dl/youtube-dl-2015.04.03.ebuild b/net-misc/youtube-dl/youtube-dl-2015.04.03.ebuild
new file mode 100644
index 000000000000..f59e2e2a7ea2
--- /dev/null
+++ b/net-misc/youtube-dl/youtube-dl-2015.04.03.ebuild
@@ -0,0 +1,72 @@
+# 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})
+DISTUTILS_SINGLE_IMPL=true
+inherit bash-completion-r1 distutils-r1 eutils
+
+DESCRIPTION="Download videos from YouTube.com (and more sites...)"
+HOMEPAGE="http://rg3.github.com/youtube-dl/"
+SRC_URI="http://youtube-dl.org/downloads/${PV}/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="amd64 ~arm hppa ppc ppc64 x86 ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="offensive test"
+
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? ( dev-python/nose[coverage(+)] )
+"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ if ! use offensive; then
+ sed -i -e "/__version__/s|'$|-gentoo_no_offensive_sites'|g" \
+ youtube_dl/version.py || die
+ # these have single line import statements
+ local xxx=(
+ alphaporno anysex behindkink drtuber empflix eporner eroprofile
+ extremetube fourtube foxgay goshgay hellporno hentaistigma
+ hornbunny keezmovies mofosex motherless pornhd pornotube
+ pornoxo redtube sexykarma sexu sunporno slutload spankwire thisav
+ tnaflix trutube tube8 vporn xbef xhamster xnxx xtube xvideos
+ xxxymovies youjizz youporn
+ )
+ # these have multi-line import statements
+ local mxxx=(
+ pornhub
+ )
+ # do single line imports
+ sed -i -e $( printf '/%s/d;' ${xxx[@]} ) youtube_dl/extractor/__init__.py || die
+ # do multiple line imports
+ sed -i -e $( printf '/%s/,/)/d;' ${mxxx[@]} ) youtube_dl/extractor/__init__.py || die
+
+ rm $( printf 'youtube_dl/extractor/%s.py ' ${xxx[@]} ) \
+ $( printf 'youtube_dl/extractor/%s.py ' ${mxxx[@]} ) \
+ test/test_age_restriction.py || die
+ fi
+
+ epatch_user
+}
+
+src_compile() {
+ distutils-r1_src_compile
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ python_domodule youtube_dl
+ dobin bin/${PN}
+ dodoc README.txt
+ doman ${PN}.1
+ newbashcomp ${PN}.bash-completion ${PN}
+ python_fix_shebang "${ED}"
+}
diff --git a/net-misc/youtube-dl/youtube-dl-2015.07.28.ebuild b/net-misc/youtube-dl/youtube-dl-2015.07.28.ebuild
new file mode 100644
index 000000000000..f78acdd93f6f
--- /dev/null
+++ b/net-misc/youtube-dl/youtube-dl-2015.07.28.ebuild
@@ -0,0 +1,87 @@
+# 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})
+DISTUTILS_SINGLE_IMPL=true
+inherit bash-completion-r1 distutils-r1 eutils
+
+DESCRIPTION="Download videos from YouTube.com (and more sites...)"
+HOMEPAGE="http://rg3.github.com/youtube-dl/"
+SRC_URI="http://youtube-dl.org/downloads/${PV}/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="offensive test"
+
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? ( dev-python/nose[coverage(+)] )
+"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ if ! use offensive; then
+ sed -i -e "/__version__/s|'$|-gentoo_no_offensive_sites'|g" \
+ youtube_dl/version.py || die
+ # these have single line import statements
+ local xxx=(
+ alphaporno anysex behindkink drtuber eporner eroprofile extremetube
+ fourtube foxgay goshgay hellporno hentaistigma hornbunny keezmovies
+ mofosex motherless porn91 pornhd pornotube pornovoisines pornoxo
+ redtube sexykarma sexu sunporno slutload spankbang spankwire thisav
+ trutube tube8 vporn xbef xnxx xtube xvideos xxxymovies youjizz
+ youporn
+ )
+ # these have multi-line import statements
+ local mxxx=(
+ pornhub xhamster tnaflix
+ )
+ # do single line imports
+ sed -i \
+ -e $( printf '/%s/d;' ${xxx[@]} ) \
+ youtube_dl/extractor/__init__.py \
+ || die
+
+ # do multiple line imports
+ sed -i \
+ -e $( printf '/%s/,/)/d;' ${mxxx[@]} ) \
+ youtube_dl/extractor/__init__.py \
+ || die
+
+ sed -i \
+ -e $( printf '/%s/d;' ${mxxx[@]} ) \
+ youtube_dl/extractor/generic.py \
+ youtube_dl/extractor/tumblr.py \
+ || die
+
+ rm \
+ $( printf 'youtube_dl/extractor/%s.py ' ${xxx[@]} ) \
+ $( printf 'youtube_dl/extractor/%s.py ' ${mxxx[@]} ) \
+ test/test_age_restriction.py \
+ || die
+ fi
+
+ epatch_user
+}
+
+src_compile() {
+ distutils-r1_src_compile
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ python_domodule youtube_dl
+ dobin bin/${PN}
+ dodoc README.txt
+ doman ${PN}.1
+ newbashcomp ${PN}.bash-completion ${PN}
+ python_fix_shebang "${ED}"
+}
diff --git a/net-misc/youtube-dl/youtube-dl-2015.08.06.1.ebuild b/net-misc/youtube-dl/youtube-dl-2015.08.06.1.ebuild
new file mode 100644
index 000000000000..f78acdd93f6f
--- /dev/null
+++ b/net-misc/youtube-dl/youtube-dl-2015.08.06.1.ebuild
@@ -0,0 +1,87 @@
+# 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})
+DISTUTILS_SINGLE_IMPL=true
+inherit bash-completion-r1 distutils-r1 eutils
+
+DESCRIPTION="Download videos from YouTube.com (and more sites...)"
+HOMEPAGE="http://rg3.github.com/youtube-dl/"
+SRC_URI="http://youtube-dl.org/downloads/${PV}/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="offensive test"
+
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? ( dev-python/nose[coverage(+)] )
+"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ if ! use offensive; then
+ sed -i -e "/__version__/s|'$|-gentoo_no_offensive_sites'|g" \
+ youtube_dl/version.py || die
+ # these have single line import statements
+ local xxx=(
+ alphaporno anysex behindkink drtuber eporner eroprofile extremetube
+ fourtube foxgay goshgay hellporno hentaistigma hornbunny keezmovies
+ mofosex motherless porn91 pornhd pornotube pornovoisines pornoxo
+ redtube sexykarma sexu sunporno slutload spankbang spankwire thisav
+ trutube tube8 vporn xbef xnxx xtube xvideos xxxymovies youjizz
+ youporn
+ )
+ # these have multi-line import statements
+ local mxxx=(
+ pornhub xhamster tnaflix
+ )
+ # do single line imports
+ sed -i \
+ -e $( printf '/%s/d;' ${xxx[@]} ) \
+ youtube_dl/extractor/__init__.py \
+ || die
+
+ # do multiple line imports
+ sed -i \
+ -e $( printf '/%s/,/)/d;' ${mxxx[@]} ) \
+ youtube_dl/extractor/__init__.py \
+ || die
+
+ sed -i \
+ -e $( printf '/%s/d;' ${mxxx[@]} ) \
+ youtube_dl/extractor/generic.py \
+ youtube_dl/extractor/tumblr.py \
+ || die
+
+ rm \
+ $( printf 'youtube_dl/extractor/%s.py ' ${xxx[@]} ) \
+ $( printf 'youtube_dl/extractor/%s.py ' ${mxxx[@]} ) \
+ test/test_age_restriction.py \
+ || die
+ fi
+
+ epatch_user
+}
+
+src_compile() {
+ distutils-r1_src_compile
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ python_domodule youtube_dl
+ dobin bin/${PN}
+ dodoc README.txt
+ doman ${PN}.1
+ newbashcomp ${PN}.bash-completion ${PN}
+ python_fix_shebang "${ED}"
+}
diff --git a/net-misc/youtube-viewer/Manifest b/net-misc/youtube-viewer/Manifest
new file mode 100644
index 000000000000..286ca46daceb
--- /dev/null
+++ b/net-misc/youtube-viewer/Manifest
@@ -0,0 +1 @@
+DIST youtube-viewer-3.1.1.tar.gz 210183 SHA256 416289dac7c4bb29ad046e41bbf49faaca31f1827379e9e0082f5b282186531d SHA512 1c7236cde68f21a80bb1f3ac29e19f86f52732c784adb70f6fc07177d74ada3a6ae1652e604fc12f62ce8ddf0c172593dd85a419a6d7d804f980fc09afda90f0 WHIRLPOOL 9045cc344bd627806526594daafbd8e17cfefa0e7aaf456c5c3a0c7ebec4bdd53f8ec708e051b37706ac3e1e29af3379e1df8ea21bfd370ca367950e6accf886
diff --git a/net-misc/youtube-viewer/metadata.xml b/net-misc/youtube-viewer/metadata.xml
new file mode 100644
index 000000000000..860e12f9fbde
--- /dev/null
+++ b/net-misc/youtube-viewer/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>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <maintainer status="active">
+ <email>trizenx@gmail.com</email>
+ </maintainer>
+ <bugs-to>https://github.com/trizen/youtube-viewer/issues</bugs-to>
+ </upstream>
+ <longdescription lang="en">
+ Youtube Viewer is a CLI application dedicated for searching and streaming
+ Youtube Videos with MPlayer. It has been written in Perl and plays videos
+ from Youtube at the best quality available without using a flash player.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/youtube-viewer/youtube-viewer-3.1.1.ebuild b/net-misc/youtube-viewer/youtube-viewer-3.1.1.ebuild
new file mode 100644
index 000000000000..09c815ed4d5f
--- /dev/null
+++ b/net-misc/youtube-viewer/youtube-viewer-3.1.1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit gnome2-utils eutils perl-module vcs-snapshot
+
+DESCRIPTION="A command line utility for viewing youtube-videos in Mplayer"
+HOMEPAGE="http://trizen.googlecode.com"
+SRC_URI="https://github.com/trizen/youtube-viewer/tarball/${PV} -> ${P}.tar.gz"
+
+LICENSE="|| ( Artistic GPL-1+ )"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="gtk"
+
+RDEPEND="
+ >=dev-lang/perl-5.16.0
+ dev-perl/Data-Dump
+ dev-perl/libwww-perl
+ || ( media-video/mplayer[X,network]
+ media-video/mplayer2[X,network]
+ media-video/mpv[X] )
+ virtual/perl-File-Spec
+ virtual/perl-Getopt-Long
+ virtual/perl-Term-ANSIColor
+ virtual/perl-Text-ParseWords
+ virtual/perl-Text-Tabs+Wrap
+ gtk? (
+ dev-perl/File-ShareDir
+ >=dev-perl/gtk2-perl-1.244.0
+ virtual/freedesktop-icon-theme
+ x11-libs/gdk-pixbuf:2[X,jpeg]
+ )"
+DEPEND="dev-perl/Module-Build"
+
+SRC_TEST="do"
+
+S=${WORKDIR}/${P}/WWW-YoutubeViewer
+
+src_prepare() {
+ perl-module_src_prepare
+}
+
+# build system installs files on "perl Build.PL" too
+# do all the work in src_install
+src_configure() { :; }
+src_compile() { :; }
+
+src_install() {
+ local myconf
+ if use gtk ; then
+ myconf="--gtk-youtube-viewer"
+ fi
+ perl-module_src_configure
+ perl-module_src_install
+
+ if use gtk ; then
+ domenu share/gtk-youtube-viewer.desktop
+ doicon share/icons/gtk-youtube-viewer.png
+ fi
+}
+
+pkg_preinst() {
+ use gtk && gnome2_icon_savelist
+ perl_set_version
+}
+
+pkg_postinst() {
+ use gtk && gnome2_icon_cache_update
+ einfo
+ elog "optional dependencies:"
+ elog " dev-perl/LWP-Protocol-https or dev-perl/libwww-perl[ssl]"
+ elog " and virtual/perl-MIME-Base64"
+ elog " (for HTTPS protocol and login support)"
+ elog " dev-perl/Term-ReadLine-Gnu (for a better STDIN support)"
+ elog " dev-perl/Text-CharWidth (print the results in a fixed-width"
+ elog " format (--fixed-width, -W))"
+ elog " dev-perl/XML-Fast (faster XML to HASH conversion)"
+ elog " net-misc/gcap (for retrieving Youtube closed captions)"
+ elog " virtual/perl-File-Temp (for posting comments)"
+ elog " virtual/perl-Scalar-List-Utils (to shuffle the playlists"
+ elog " (--shuffle, -s))"
+ elog " virtual/perl-threads (threads support)"
+ einfo
+}
+
+pkg_postrm() {
+ use gtk && gnome2_icon_cache_update
+}
diff --git a/net-misc/youtube-viewer/youtube-viewer-9999.ebuild b/net-misc/youtube-viewer/youtube-viewer-9999.ebuild
new file mode 100644
index 000000000000..d95aa2258bce
--- /dev/null
+++ b/net-misc/youtube-viewer/youtube-viewer-9999.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit perl-module git-2
+
+DESCRIPTION="A command line utility for viewing youtube-videos in Mplayer"
+HOMEPAGE="http://trizen.googlecode.com"
+SRC_URI=""
+EGIT_REPO_URI="git://github.com/trizen/${PN}.git"
+
+LICENSE="|| ( Artistic GPL-1+ )"
+SLOT="0"
+KEYWORDS=""
+IUSE="gtk"
+
+RDEPEND="
+ >=dev-lang/perl-5.16.0
+ dev-perl/Data-Dump
+ dev-perl/libwww-perl
+ || ( media-video/mplayer[X,network]
+ media-video/mplayer2[X,network]
+ media-video/mpv[X] )
+ virtual/perl-File-Spec
+ virtual/perl-Getopt-Long
+ virtual/perl-Term-ANSIColor
+ virtual/perl-Text-ParseWords
+ virtual/perl-Text-Tabs+Wrap
+ gtk? (
+ dev-perl/File-ShareDir
+ >=dev-perl/gtk2-perl-1.244.0
+ virtual/freedesktop-icon-theme
+ x11-libs/gdk-pixbuf:2[X,jpeg]
+ )"
+DEPEND="dev-perl/Module-Build"
+
+EGIT_SOURCEDIR="${WORKDIR}"
+S=${WORKDIR}/WWW-YoutubeViewer
+
+SRC_TEST="do"
+
+# build system installs files on "perl Build.PL" too
+# do all the work in src_install
+src_configure() { :; }
+src_compile() { :; }
+
+src_install() {
+ local myconf
+ if use gtk ; then
+ myconf="--gtk-youtube-viewer"
+ fi
+ perl-module_src_configure
+ perl-module_src_install
+}
+
+pkg_postinst() {
+ einfo
+ elog "optional dependencies:"
+ elog " dev-perl/LWP-Protocol-https or dev-perl/libwww-perl[ssl]"
+ elog " and virtual/perl-MIME-Base64"
+ elog " (for HTTPS protocol and login support)"
+ elog " dev-perl/Term-ReadLine-Gnu (for a better STDIN support)"
+ elog " dev-perl/Text-CharWidth (print the results in a fixed-width"
+ elog " format (--fixed-width, -W))"
+ elog " dev-perl/XML-Fast (faster XML to HASH conversion)"
+ elog " net-misc/gcap (for retrieving Youtube closed captions)"
+ elog " virtual/perl-File-Temp (for posting comments)"
+ elog " virtual/perl-Scalar-List-Utils (to shuffle the playlists"
+ elog " (--shuffle, -s))"
+ elog " virtual/perl-threads (threads support)"
+ einfo
+}
diff --git a/net-misc/ytalk/Manifest b/net-misc/ytalk/Manifest
new file mode 100644
index 000000000000..21985f52fd3e
--- /dev/null
+++ b/net-misc/ytalk/Manifest
@@ -0,0 +1 @@
+DIST ytalk-3.3.0.tar.gz 137989 SHA256 6ecb34f71f723a7b96f90e411c78dff2735c08dc4228c765f7fdbf8ca48572b4 SHA512 ee4c5b13b70c832899c9f62e1eb71e736b74812e6e47d56a9aad34fc5f8cd344d91c0ee9eb652eb11d9aa9578f51bd87213bc7181dfad9933e0fd73af363b8ef WHIRLPOOL 446a0a11fb1a4b82a38c41d73a67c41d0574e7a52036ce5273a29b2fd7e6ecdd262dcd501cff71685def6328aeb2f44c4a3fca9784de549fd468eccd1e392d63
diff --git a/net-misc/ytalk/files/ytalk-3.3.0-tinfo.patch b/net-misc/ytalk/files/ytalk-3.3.0-tinfo.patch
new file mode 100644
index 000000000000..bdfb2aa8aa48
--- /dev/null
+++ b/net-misc/ytalk/files/ytalk-3.3.0-tinfo.patch
@@ -0,0 +1,47 @@
+--- a/configure.in
++++ b/configure.in
+@@ -22,7 +22,6 @@
+ esac
+ AC_SUBST(SYSTEM_DEFS)
+
+-AC_DEFINE_DIR([sysconfdir], [sysconfdir], [sysconfdir])
+ AC_DEFINE_UNQUOTED(SYSTEM_YTALKRC, ["${sysconfdir}/ytalkrc"], ["Location of default ytalkrc file"])
+
+ dnl Checks for programs.
+@@ -35,30 +34,12 @@
+ AC_CHECK_SIZEOF(long)
+ AC_CHECK_SIZEOF(u_int)
+
+-ytalk_cv_curses=/usr
+-AC_ARG_WITH(curses, AC_HELP_STRING([--with-curses=DIR], [Where curses is installed]),
+- [if test $withval != yes; then
+- ytalk_cv_curses=$withval
+- fi
+- if test x$ytalk_cv_curses != x/usr; then
+- LDFLAGS="-L${ytalk_cv_curses}/lib $LDFLAGS"
+- CPPFLAGS="$CPPFLAGS -I${ytalk_cv_curses}/include"
+- fi])
+-
+-AC_CHECK_LIB(ncurses, initscr,
+- [LIBS="$LIBS -lncurses"
+- if test x$ytalk_cv_curses = x/usr -a -d /usr/include/ncurses; then
+- CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses"
+- fi
+- AC_CHECK_HEADERS(ncurses.h)],
+- [CF_CURSES_LIBS])
+-
+-dnl Check for keypad()
+-AC_CHECK_LIB(ncurses, keypad,
+- [AC_DEFINE(HAVE_KEYPAD, 1, [Define to 1 if you have keypad()])],
+-[AC_CHECK_LIB(curses, keypad,
+- [AC_DEFINE(HAVE_KEYPAD, 1, [Define to 1 if you have keypad()])],
+-[])])
++PKG_CHECK_MODULES(ncurses, ncurses,
++ LIBS="$LIBS $ncurses_LIBS"
++ CFLAGS="$CFLAGS $ncurses_CFLAGS"
++ AC_DEFINE(HAVE_KEYPAD, 1, [Define to 1 if you have keypad()]),
++ AC_MSG_ERROR([Could not find ncurses])
++)
+
+ dnl Look for termios, and if that fails, try sgtty.
+ AC_CHECK_FUNC(tcgetattr, [\
diff --git a/net-misc/ytalk/metadata.xml b/net-misc/ytalk/metadata.xml
new file mode 100644
index 000000000000..a2cb70369f03
--- /dev/null
+++ b/net-misc/ytalk/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>proxy-maintainers</herd>
+ <maintainer>
+ <email>keso@impul.se</email>
+ <name>Andreas King</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/ytalk/ytalk-3.3.0.ebuild b/net-misc/ytalk/ytalk-3.3.0.ebuild
new file mode 100644
index 000000000000..8ecd5ced7e03
--- /dev/null
+++ b/net-misc/ytalk/ytalk-3.3.0.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Multi-user replacement for UNIX talk"
+HOMEPAGE="http://www.impul.se/ytalk/"
+SRC_URI="http://www.impul.se/ytalk/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~hppa ~ia64 ppc ~ppc64 sparc x86"
+
+RDEPEND=">=sys-libs/ncurses-5.2"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+DOCS=( ChangeLog INSTALL README )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-tinfo.patch
+ eautoreconf
+}
diff --git a/net-misc/zssh/Manifest b/net-misc/zssh/Manifest
new file mode 100644
index 000000000000..000795dfacbe
--- /dev/null
+++ b/net-misc/zssh/Manifest
@@ -0,0 +1 @@
+DIST zssh-1.5c.tgz 344964 SHA256 a2e840f82590690d27ea1ea1141af509ee34681fede897e58ae8d354701ce71b SHA512 799ce3bbea5e94a800f61e6c38879746a579992396304861b7584b6bad967214b811b6bf9aecb36d9d60a15857377cb2fee80b495ad69778903fc45593efeebd WHIRLPOOL c0e8b06f04ccf0522267317308d4b87cf78eafd6fafaed1e330f9fec7b59561defd1a74652cc53ab2a662a299c021059fe49c1c252b50cb6dd6735086bf0333b
diff --git a/net-misc/zssh/files/zssh-1.5a-gentoo-include.diff b/net-misc/zssh/files/zssh-1.5a-gentoo-include.diff
new file mode 100644
index 000000000000..4fc670ac8055
--- /dev/null
+++ b/net-misc/zssh/files/zssh-1.5a-gentoo-include.diff
@@ -0,0 +1,11 @@
+--- Makefile.in.orig Fri Sep 20 10:34:40 2002
++++ Makefile.in Fri Sep 20 10:34:56 2002
+@@ -19,7 +19,7 @@
+ AR = @AR@
+ RANLIB = @RANLIB@
+ CC = @CC@
+-CFLAGS = @CFLAGS@ @DEFS@ @EXTRA_CFLAGS@
++CFLAGS = @CFLAGS@ @DEFS@ @EXTRA_CFLAGS@ -I.
+ CPPFLAGS = @CPPFLAGS@
+ LIBS = @LIBS@ @EXTRA_LIBS@
+ LDFLAGS = @LDFLAGS@
diff --git a/net-misc/zssh/metadata.xml b/net-misc/zssh/metadata.xml
new file mode 100644
index 000000000000..39a20f0e4817
--- /dev/null
+++ b/net-misc/zssh/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>zlogene@gentoo.org</email>
+ <name>Mikle Kolyada</name>
+ </maintainer>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">zssh</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/zssh/zssh-1.5c-r1.ebuild b/net-misc/zssh/zssh-1.5c-r1.ebuild
new file mode 100644
index 000000000000..f52dbbebfd18
--- /dev/null
+++ b/net-misc/zssh/zssh-1.5c-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="An ssh wrapper enabling zmodem up/download in ssh"
+HOMEPAGE="http://zssh.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc sparc x86"
+IUSE="nls readline"
+
+DEPEND="readline? (
+ sys-libs/ncurses
+ sys-libs/readline:0
+ )"
+RDEPEND="${DEPEND}
+ net-misc/openssh
+ net-dialup/lrzsz"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.5a-gentoo-include.diff"
+
+ # Fix linking with sys-libs/ncurses[tinfo], bug #527036
+ sed -i -e 's/-ltermcap/-ltinfo/g' configure || die
+
+ epatch_user
+}
+
+src_configure() {
+ tc-export AR CC RANLIB
+ econf \
+ $(use_enable nls) \
+ $(use_enable readline)
+}
+
+src_install() {
+ dobin ${PN} ztelnet
+ doman ${PN}.1 ztelnet.1
+ dodoc CHANGES FAQ README TODO
+}
diff --git a/net-misc/zsync/Manifest b/net-misc/zsync/Manifest
new file mode 100644
index 000000000000..dd4fdf2dd0cd
--- /dev/null
+++ b/net-misc/zsync/Manifest
@@ -0,0 +1,2 @@
+DIST zlib-1.2.3.tar.bz2 425209 SHA256 e3b9950851a19904d642c4dec518623382cf4d2ac24f70a76510c944330d28ca SHA512 edae735960279d92acf58e1f4095c6392a7c2059b8f1d2c46648fc608a0fb06b392db2d073f4973f5762c034ea66596e769b95b3d26ad963a086b9b2d09825f2 WHIRLPOOL e874b123296f5d77daf60617501b30f4beebccb64b3910c2539f75f6c194a2cf4885dc7a3904bf790e1651120ec33b55c48e95970dd6bfd6c4d0a2ea48d7d0f4
+DIST zsync-0.6.2.tar.bz2 245592 SHA256 0b9d53433387aa4f04634a6c63a5efa8203070f2298af72a705f9be3dda65af2 SHA512 56437594831f2320c532759805b5c51116c53c8848f14b54cfd9b76676d1d061abe7fc914264f496ed1c7922fbbd5b884166c855a2fb9eb1285f216e478c5f0d WHIRLPOOL d7f2d864b791fc38522d376eef8cb2ea38e57d91da7f8d2ea1379ecdb8397b4ff672c954dc5fd6e90f786d8d48836fd8b637cf8a60229646a1a9c2635bffb51f
diff --git a/net-misc/zsync/files/zsync-0.6.2-zlib-1.2.3-support.patch b/net-misc/zsync/files/zsync-0.6.2-zlib-1.2.3-support.patch
new file mode 100644
index 000000000000..38729b06db73
--- /dev/null
+++ b/net-misc/zsync/files/zsync-0.6.2-zlib-1.2.3-support.patch
@@ -0,0 +1,201 @@
+This is a forward-port to zlib-1.2.3 of the zlib-1.2.11 changes found in
+zsync-0.6.2.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+diff -Nuar --exclude Makefile.in zlib-1.2.3.orig/deflate.c zlib-1.2.3/deflate.c
+--- zlib-1.2.3.orig/deflate.c 2005-07-18 02:27:31.000000000 +0000
++++ zlib-1.2.3/deflate.c 2011-02-09 21:36:02.000000000 +0000
+@@ -807,7 +807,7 @@
+ }
+ if (bstate == block_done) {
+ if (flush == Z_PARTIAL_FLUSH) {
+- _tr_align(s);
++ // _tr_align(s);
+ } else { /* FULL_FLUSH or SYNC_FLUSH */
+ _tr_stored_block(s, (char*)0, 0L, 0);
+ /* For a full flush, this empty block will be recognized
+diff -Nuar --exclude Makefile.in zlib-1.2.3.orig/inflate.c zlib-1.2.3/inflate.c
+--- zlib-1.2.3.orig/inflate.c 2005-06-14 21:50:12.000000000 +0000
++++ zlib-1.2.3/inflate.c 2011-02-09 21:36:02.000000000 +0000
+@@ -6,6 +6,12 @@
+ /*
+ * Change history:
+ *
++ * cph 26 Oct 2004
++ * - A few minor hacks to allow me to locate safe start points in streams
++ * and to position a new inflate on the right bit. I hereby place any
++ * changes to this file (and the zlib.h and inflate.h in this dir) into
++ * the public domain.
++ *
+ * 1.2.beta0 24 Nov 2002
+ * - First version -- complete rewrite of inflate to simplify code, avoid
+ * creation of window when not needed, minimize use of window when it is
+@@ -83,7 +89,6 @@
+ #include "zutil.h"
+ #include "inftrees.h"
+ #include "inflate.h"
+-#include "inffast.h"
+
+ #ifdef MAKEFIXED
+ # ifndef BUILDFIXED
+@@ -93,7 +98,6 @@
+
+ /* function prototypes */
+ local void fixedtables OF((struct inflate_state FAR *state));
+-local int updatewindow OF((z_streamp strm, unsigned out));
+ #ifdef BUILDFIXED
+ void makefixed OF((void));
+ #endif
+@@ -320,7 +324,7 @@
+ output will fall in the output data, making match copies simpler and faster.
+ The advantage may be dependent on the size of the processor's data caches.
+ */
+-local int updatewindow(strm, out)
++int updatewindow(strm, out)
+ z_streamp strm;
+ unsigned out;
+ {
+@@ -925,6 +929,9 @@
+ /* handle error breaks in while */
+ if (state->mode == BAD) break;
+
++ if (state->mode == BAD)
++ break;
++
+ /* build code tables */
+ state->next = state->codes;
+ state->lencode = (code const FAR *)(state->next);
+@@ -948,12 +955,10 @@
+ Tracev((stderr, "inflate: codes ok\n"));
+ state->mode = LEN;
+ case LEN:
+- if (have >= 6 && left >= 258) {
+- RESTORE();
+- inflate_fast(strm, out);
+- LOAD();
+- break;
+- }
++ state->mode = LENDO;
++ goto inf_leave;
++ case LENDO:
++ /* cph - remove inflate_fast */
+ for (;;) {
+ this = state->lencode[BITS(state->lenbits)];
+ if ((unsigned)(this.bits) <= bits) break;
+@@ -1366,3 +1371,48 @@
+ dest->state = (struct internal_state FAR *)copy;
+ return Z_OK;
+ }
++
++/* cph 2004/10/17
++ * Extra stuff I need to move around in gzip files
++ */
++
++void inflate_advance(strm,zoffset,b,s)
++ z_streamp strm;
++ int zoffset;
++ int b;
++ int s;
++{
++ struct inflate_state FAR* state = (struct inflate_state FAR *)strm->state;
++
++ if (s)
++ state->mode = TYPEDO;
++ else if (state->mode == COPY) {
++ /* Reduce length remaining to copy by correct number */
++ state->length -= zoffset - strm->total_in;
++ } else
++ state->mode = LENDO;
++
++ strm->total_in = zoffset; /* We are here, plus a few more bits. */
++
++ if (b) {
++ state->hold = *(strm->next_in)++;
++ state->hold >>= b;
++ state->bits = 8-b;
++ strm->avail_in--;
++ strm->total_in++;
++ } else {
++ state->bits = 0;
++ state->hold = 0;
++ }
++}
++
++int ZEXPORT inflateSafePoint(strm)
++z_streamp strm;
++{
++ struct inflate_state FAR *state;
++
++ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
++ state = (struct inflate_state FAR *)strm->state;
++ return (state->mode == LENDO || state->mode == COPY);
++}
++
+diff -Nuar --exclude Makefile.in zlib-1.2.3.orig/inflate.h zlib-1.2.3/inflate.h
+--- zlib-1.2.3.orig/inflate.h 2004-11-13 05:38:28.000000000 +0000
++++ zlib-1.2.3/inflate.h 2011-02-09 21:36:02.000000000 +0000
+@@ -37,6 +37,7 @@
+ LENLENS, /* i: waiting for code length code lengths */
+ CODELENS, /* i: waiting for length/lit and distance code lengths */
+ LEN, /* i: waiting for length/lit code */
++ LENDO, /* i: same, but skip exit check */
+ LENEXT, /* i: waiting for length extra bits */
+ DIST, /* i: waiting for distance code */
+ DISTEXT, /* i: waiting for distance extra bits */
+diff -Nuar --exclude Makefile.in zlib-1.2.3.orig/Makefile.am zlib-1.2.3/Makefile.am
+--- zlib-1.2.3.orig/Makefile.am 1970-01-01 00:00:00.000000000 +0000
++++ zlib-1.2.3/Makefile.am 2011-02-09 21:36:06.000000000 +0000
+@@ -0,0 +1,6 @@
++
++noinst_LIBRARIES = libinflate.a libdeflate.a
++
++libinflate_a_SOURCES = zlib.h inflate.c inflate.h inffixed.h adler32.c inftrees.c inftrees.h zutil.c zutil.h crc32.c crc32.h zconf.h
++
++libdeflate_a_SOURCES = deflate.c deflate.h compress.c trees.c trees.h
+diff -Nuar --exclude Makefile.in zlib-1.2.3.orig/zconf.h zlib-1.2.3/zconf.h
+--- zlib-1.2.3.orig/zconf.h 2005-05-28 06:40:35.000000000 +0000
++++ zlib-1.2.3/zconf.h 2011-02-09 21:36:06.000000000 +0000
+@@ -284,9 +284,8 @@
+ typedef Byte *voidp;
+ #endif
+
+-#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
++#if 1 /* HAVE_UNISTD_H -- this line is updated by ./configure */
+ # include <sys/types.h> /* for off_t */
+-# include <unistd.h> /* for SEEK_* and off_t */
+ # ifdef VMS
+ # include <unixio.h> /* for off_t */
+ # endif
+diff -Nuar --exclude Makefile.in zlib-1.2.3.orig/zlib.h zlib-1.2.3/zlib.h
+--- zlib-1.2.3.orig/zlib.h 2005-07-18 02:26:49.000000000 +0000
++++ zlib-1.2.3/zlib.h 2011-02-09 21:36:06.000000000 +0000
+@@ -1110,9 +1110,10 @@
+ of bytes into the buffer.
+ gzread returns the number of uncompressed bytes actually read (0 for
+ end of file, -1 for error). */
+-
++#if 0
+ ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
+ voidpc buf, unsigned len));
++#endif
+ /*
+ Writes the given number of uncompressed bytes into the compressed file.
+ gzwrite returns the number of uncompressed bytes actually written
+@@ -1308,6 +1309,8 @@
+ len2.
+ */
+
++ZEXTERN int ZEXPORT updatewindow OF((z_streamp strm, unsigned out));
++ZEXTERN void ZEXPORT inflate_advance OF((z_streamp strm, int zoffset, int b, int s));
+
+ /* various hacks, don't look :) */
+
+@@ -1348,6 +1351,7 @@
+
+ ZEXTERN const char * ZEXPORT zError OF((int));
+ ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z));
++ZEXTERN int ZEXPORT inflateSafePoint OF((z_streamp z));
+ ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
+
+ #ifdef __cplusplus
diff --git a/net-misc/zsync/metadata.xml b/net-misc/zsync/metadata.xml
new file mode 100644
index 000000000000..d675d5ef7117
--- /dev/null
+++ b/net-misc/zsync/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ From the zsync web page:
+
+ "zsync is a file transfer program. It allows you to download a file from a
+ remote web server, where you have a copy of an older version of the file on your
+ computer already. zsync downloads only the new parts of the file. It uses the
+ same algorithm as rsync.
+
+ zsync does not require any special server software or a shell account on the
+ remote system (rsync, in comparison, requires that you have an rsh or ssh
+ account, or that the remote system runs rsyncd). Instead, it uses a control file
+ -- a .zsync file -- that describes the file to be downloaded and enables zsync to
+ work out which blocks it needs. This file can be created by the admin of the web
+ server hosting the download, and placed alongside the file to download -- it is
+ generated once, then any downloaders with zsync can use it. Alternatively,
+ anyone can download the file, make a .zsync and provide it to other users (this
+ is what I am doing for the moment)."
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/zsync/zsync-0.6.2-r1.ebuild b/net-misc/zsync/zsync-0.6.2-r1.ebuild
new file mode 100644
index 000000000000..8ab1faccffd8
--- /dev/null
+++ b/net-misc/zsync/zsync-0.6.2-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+ZLIB_PV=1.2.3
+ZLIB_P="zlib-${ZLIB_PV}"
+
+DESCRIPTION="Partial/differential file download client over HTTP which uses the rsync algorithm"
+HOMEPAGE="http://zsync.moria.org.uk/"
+SRC_URI="
+ http://zsync.moria.org.uk/download/${P}.tar.bz2
+ http://www.gzip.org/zlib/${ZLIB_P}.tar.bz2
+ http://www.zlib.net/${ZLIB_P}.tar.bz2"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE=""
+
+ZLIB_S="${WORKDIR}/${ZLIB_P}"
+
+src_prepare() {
+ # Move old zlib-1.2.11 out the way
+ mv "${S}"/zlib zlib-1.2.11-modified || die
+
+ cd "${ZLIB_S}" || die
+ # I am not sure how many other zlib patches we will need to port as well
+ # This covers the security vuln in 1.2.11
+ epatch "${FILESDIR}"/${P}-${ZLIB_P}-support.patch
+ rm -f Makefile || die
+
+ cd "${S}" || die
+ cp -a "${ZLIB_S}" "${ZLIB_P}-modified" || die
+ ln -s "${ZLIB_P}-modified" zlib || die
+
+ eautoreconf
+}
+
+src_install() {
+ dobin zsync zsyncmake
+ dodoc NEWS README
+ doman doc/zsync.1 doc/zsyncmake.1
+}