summaryrefslogtreecommitdiff
path: root/net-dialup
diff options
context:
space:
mode:
Diffstat (limited to 'net-dialup')
-rw-r--r--net-dialup/accel-ppp/Manifest13
-rw-r--r--net-dialup/accel-ppp/accel-ppp-1.11.0.ebuild98
-rw-r--r--net-dialup/accel-ppp/accel-ppp-1.11.1_p20170508.ebuild107
-rw-r--r--net-dialup/accel-ppp/accel-ppp-1.11.9999.ebuild101
-rw-r--r--net-dialup/accel-ppp/accel-ppp-9999.ebuild100
-rw-r--r--net-dialup/accel-ppp/files/accel-ppp-1.11.1-linux-4.10.patch80
-rw-r--r--net-dialup/accel-ppp/files/accel-ppp-1.11.1-socklen.patch18
-rw-r--r--net-dialup/accel-ppp/files/accel-ppp.confd10
-rw-r--r--net-dialup/accel-ppp/files/accel-ppp.initd44
-rw-r--r--net-dialup/accel-ppp/metadata.xml16
-rw-r--r--net-dialup/cistronradius/Manifest7
-rw-r--r--net-dialup/cistronradius/cistronradius-1.6.8-r2.ebuild48
-rw-r--r--net-dialup/cistronradius/files/cistronradius-1.6.8-gcc41.patch11
-rw-r--r--net-dialup/cistronradius/files/cistronradius.rc34
-rw-r--r--net-dialup/cistronradius/metadata.xml8
-rw-r--r--net-dialup/cutecom/Manifest5
-rw-r--r--net-dialup/cutecom/cutecom-0.40.0-r1.ebuild39
-rw-r--r--net-dialup/cutecom/metadata.xml11
-rw-r--r--net-dialup/dgcmodem/Manifest5
-rw-r--r--net-dialup/dgcmodem/dgcmodem-1.10.ebuild59
-rw-r--r--net-dialup/dgcmodem/metadata.xml8
-rw-r--r--net-dialup/dial/Manifest6
-rw-r--r--net-dialup/dial/dial-1.2-r2.ebuild18
-rw-r--r--net-dialup/dial/files/dial-1.2-gcc3.3.patch13
-rw-r--r--net-dialup/dial/metadata.xml8
-rw-r--r--net-dialup/diald/Manifest11
-rw-r--r--net-dialup/diald/diald-1.0-r3.ebuild58
-rw-r--r--net-dialup/diald/files/diald-1.0-gentoo.patch50
-rw-r--r--net-dialup/diald/files/diald-1.0-nopam.patch40
-rw-r--r--net-dialup/diald/files/diald-1.0-posix.patch42
-rw-r--r--net-dialup/diald/files/diald-init29
-rw-r--r--net-dialup/diald/files/diald.conf38
-rw-r--r--net-dialup/diald/files/diald.filter138
-rw-r--r--net-dialup/diald/metadata.xml10
-rw-r--r--net-dialup/dwun/Manifest6
-rw-r--r--net-dialup/dwun/dwun-0.96e-r4.ebuild45
-rw-r--r--net-dialup/dwun/files/dwun22
-rw-r--r--net-dialup/dwun/metadata.xml8
-rw-r--r--net-dialup/fbgetty/Manifest6
-rw-r--r--net-dialup/fbgetty/fbgetty-0.1.698-r1.ebuild28
-rw-r--r--net-dialup/fbgetty/files/fbgetty-0.1.698-gcc41.patch64
-rw-r--r--net-dialup/fbgetty/metadata.xml5
-rw-r--r--net-dialup/freeradius-client/Manifest5
-rw-r--r--net-dialup/freeradius-client/freeradius-client-1.1.7.ebuild38
-rw-r--r--net-dialup/freeradius-client/metadata.xml16
-rw-r--r--net-dialup/freeradius/Manifest11
-rw-r--r--net-dialup/freeradius/files/freeradius.service15
-rw-r--r--net-dialup/freeradius/files/freeradius.tmpfiles1
-rw-r--r--net-dialup/freeradius/files/radius.conf-r416
-rw-r--r--net-dialup/freeradius/files/radius.init-r331
-rw-r--r--net-dialup/freeradius/freeradius-3.0.14.ebuild225
-rw-r--r--net-dialup/freeradius/freeradius-3.0.15.ebuild225
-rw-r--r--net-dialup/freeradius/metadata.xml10
-rw-r--r--net-dialup/globespan-adsl/Manifest10
-rw-r--r--net-dialup/globespan-adsl/files/globespan-adsl-0.11-pagesize.patch31
-rw-r--r--net-dialup/globespan-adsl/files/globespan-adsl-0.11-synch.patch85
-rw-r--r--net-dialup/globespan-adsl/files/globespan-adsl-0.12-pagesize.patch34
-rw-r--r--net-dialup/globespan-adsl/globespan-adsl-0.11-r1.ebuild48
-rw-r--r--net-dialup/globespan-adsl/globespan-adsl-0.12.ebuild46
-rw-r--r--net-dialup/globespan-adsl/metadata.xml6
-rw-r--r--net-dialup/hcfpcimodem/Manifest9
-rw-r--r--net-dialup/hcfpcimodem/files/hcfpcimodem-1.20-gentoo.patch29
-rw-r--r--net-dialup/hcfpcimodem/hcfpcimodem-1.20.ebuild91
-rw-r--r--net-dialup/hcfpcimodem/hcfpcimodem-1.21.ebuild90
-rw-r--r--net-dialup/hcfpcimodem/metadata.xml5
-rw-r--r--net-dialup/isdn-firmware/Manifest5
-rw-r--r--net-dialup/isdn-firmware/isdn-firmware-2005.8.15.2.ebuild26
-rw-r--r--net-dialup/isdn-firmware/metadata.xml8
-rw-r--r--net-dialup/kpnadsl4linux/Manifest7
-rw-r--r--net-dialup/kpnadsl4linux/files/kpnadsl4linux-1.11-Makefile.patch25
-rw-r--r--net-dialup/kpnadsl4linux/files/kpnadsl4linux-config100
-rw-r--r--net-dialup/kpnadsl4linux/kpnadsl4linux-1.11.ebuild46
-rw-r--r--net-dialup/kpnadsl4linux/metadata.xml5
-rw-r--r--net-dialup/linux-atm/Manifest11
-rw-r--r--net-dialup/linux-atm/files/linux-atm-2.5.0-bison24.patch47
-rw-r--r--net-dialup/linux-atm/files/linux-atm-2.5.0-glibc28.patch11
-rw-r--r--net-dialup/linux-atm/files/linux-atm-2.5.0-headers.patch213
-rw-r--r--net-dialup/linux-atm/files/linux-atm-2.5.2-headers.patch30
-rw-r--r--net-dialup/linux-atm/linux-atm-2.5.0.ebuild48
-rw-r--r--net-dialup/linux-atm/linux-atm-2.5.2.ebuild45
-rw-r--r--net-dialup/linux-atm/metadata.xml9
-rw-r--r--net-dialup/lrzsz/Manifest9
-rw-r--r--net-dialup/lrzsz/files/lrzsz-0.12.20-automake-1.12.patch28
-rw-r--r--net-dialup/lrzsz/files/lrzsz-0.12.20-automake-1.13.patch12
-rw-r--r--net-dialup/lrzsz/files/lrzsz-autotools.patch264
-rw-r--r--net-dialup/lrzsz/files/lrzsz-implicit-decl.patch21
-rw-r--r--net-dialup/lrzsz/lrzsz-0.12.20-r3.ebuild61
-rw-r--r--net-dialup/lrzsz/metadata.xml9
-rw-r--r--net-dialup/metadata.xml35
-rw-r--r--net-dialup/mgetty/Manifest11
-rw-r--r--net-dialup/mgetty/files/Lucent.c.patch17
-rw-r--r--net-dialup/mgetty/files/mgetty-1.1.36-callback.patch26
-rw-r--r--net-dialup/mgetty/files/mgetty-1.1.36-tmpfile.patch33
-rw-r--r--net-dialup/mgetty/files/mgetty-1.1.37-gentoo.patch172
-rw-r--r--net-dialup/mgetty/files/mgetty-1.1.37-nofax.patch110
-rw-r--r--net-dialup/mgetty/files/mgetty-1.1.37-qa-fixes.patch175
-rw-r--r--net-dialup/mgetty/metadata.xml11
-rw-r--r--net-dialup/mgetty/mgetty-1.1.37-r1.ebuild163
-rw-r--r--net-dialup/mingetty/Manifest7
-rw-r--r--net-dialup/mingetty/files/mingetty-1.08-check_chroot_chdir_nice.patch36
-rw-r--r--net-dialup/mingetty/files/mingetty-1.08-utf8.patch156
-rw-r--r--net-dialup/mingetty/metadata.xml18
-rw-r--r--net-dialup/mingetty/mingetty-1.08-r1.ebuild33
-rw-r--r--net-dialup/minicom/Manifest14
-rw-r--r--net-dialup/minicom/files/minicom-2.3-gentoo-runscript.patch55
-rw-r--r--net-dialup/minicom/files/minicom-2.6-etimeout.patch11
-rw-r--r--net-dialup/minicom/files/minicom-2.7-lockdir.patch14
-rw-r--r--net-dialup/minicom/files/minirc.dfl1
-rw-r--r--net-dialup/minicom/metadata.xml12
-rw-r--r--net-dialup/minicom/minicom-2.6.ebuild52
-rw-r--r--net-dialup/minicom/minicom-2.7-r1.ebuild59
-rw-r--r--net-dialup/minicom/minicom-2.7.1.ebuild60
-rw-r--r--net-dialup/minicom/minicom-2.7.ebuild48
-rw-r--r--net-dialup/moserial/Manifest7
-rw-r--r--net-dialup/moserial/metadata.xml14
-rw-r--r--net-dialup/moserial/moserial-3.0.10.ebuild25
-rw-r--r--net-dialup/moserial/moserial-3.0.11.ebuild25
-rw-r--r--net-dialup/mwavem/Manifest11
-rw-r--r--net-dialup/mwavem/files/mwave-dev-handler11
-rw-r--r--net-dialup/mwavem/files/mwave.devfs2
-rw-r--r--net-dialup/mwavem/files/mwave.modules1
-rw-r--r--net-dialup/mwavem/files/mwavem-2.0-gentoo.patch24
-rw-r--r--net-dialup/mwavem/files/mwavem-2.0-glibc-2.10.patch40
-rw-r--r--net-dialup/mwavem/metadata.xml6
-rw-r--r--net-dialup/mwavem/mwavem-2.0-r1.ebuild63
-rw-r--r--net-dialup/mwavem/mwavem-2.0-r2.ebuild52
-rw-r--r--net-dialup/neocon/Manifest5
-rw-r--r--net-dialup/neocon/metadata.xml8
-rw-r--r--net-dialup/neocon/neocon-20110228.ebuild24
-rw-r--r--net-dialup/picocom/Manifest5
-rw-r--r--net-dialup/picocom/metadata.xml11
-rw-r--r--net-dialup/picocom/picocom-2.2.ebuild29
-rw-r--r--net-dialup/ppp-scripts/Manifest5
-rw-r--r--net-dialup/ppp-scripts/metadata.xml5
-rw-r--r--net-dialup/ppp-scripts/ppp-scripts-0.ebuild27
-rw-r--r--net-dialup/ppp/Manifest11
-rw-r--r--net-dialup/ppp/files/README.mpls15
-rw-r--r--net-dialup/ppp/files/modules.ppp10
-rw-r--r--net-dialup/ppp/metadata.xml34
-rw-r--r--net-dialup/ppp/ppp-2.4.7-r3.ebuild221
-rw-r--r--net-dialup/ppp/ppp-2.4.7-r4.ebuild221
-rw-r--r--net-dialup/pppconfig/Manifest6
-rw-r--r--net-dialup/pppconfig/files/pppconfig9
-rw-r--r--net-dialup/pppconfig/metadata.xml5
-rw-r--r--net-dialup/pppconfig/pppconfig-2.3.21.ebuild54
-rw-r--r--net-dialup/pptpclient/Manifest12
-rw-r--r--net-dialup/pptpclient/files/pptp_fe.pl370
-rw-r--r--net-dialup/pptpclient/files/pptpclient-1.7.2-process-name.patch42
-rw-r--r--net-dialup/pptpclient/files/pptpclient-1.8.0-process-name.patch39
-rw-r--r--net-dialup/pptpclient/files/xpptp_fe.pl255
-rw-r--r--net-dialup/pptpclient/metadata.xml9
-rw-r--r--net-dialup/pptpclient/pptpclient-1.7.2-r3.ebuild52
-rw-r--r--net-dialup/pptpclient/pptpclient-1.8.0.ebuild52
-rw-r--r--net-dialup/qtwvdialer/Manifest5
-rw-r--r--net-dialup/qtwvdialer/metadata.xml8
-rw-r--r--net-dialup/qtwvdialer/qtwvdialer-0.4.4_p20091228.ebuild31
-rw-r--r--net-dialup/radiusclient-ng/Manifest6
-rw-r--r--net-dialup/radiusclient-ng/files/radiusclient-ng-0.5.6-cross-compile.patch73
-rw-r--r--net-dialup/radiusclient-ng/metadata.xml10
-rw-r--r--net-dialup/radiusclient-ng/radiusclient-ng-0.5.6-r1.ebuild35
-rw-r--r--net-dialup/rp-l2tp/Manifest9
-rw-r--r--net-dialup/rp-l2tp/files/rp-l2tp-0.4-build.patch68
-rw-r--r--net-dialup/rp-l2tp/files/rp-l2tp-0.4-flags.patch54
-rw-r--r--net-dialup/rp-l2tp/files/rp-l2tp-0.4-gentoo.patch233
-rw-r--r--net-dialup/rp-l2tp/files/rp-l2tpd-init19
-rw-r--r--net-dialup/rp-l2tp/metadata.xml8
-rw-r--r--net-dialup/rp-l2tp/rp-l2tp-0.4-r4.ebuild35
-rw-r--r--net-dialup/rp-pppoe/Manifest19
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.10-autotools.patch115
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.10-gentoo-netscripts.patch150
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.10-linux-headers.patch31
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.10-plugin-options.patch39
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.10-posix-source-sigaction.patch18
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.10-session-offset.patch21
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.10-username-charset.patch58
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.11-gentoo.patch11
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.11-kmode.patch10
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.12-ifconfig-path.patch65
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.12-linux-headers.patch28
-rw-r--r--net-dialup/rp-pppoe/metadata.xml12
-rw-r--r--net-dialup/rp-pppoe/rp-pppoe-3.11-r3.ebuild98
-rw-r--r--net-dialup/rp-pppoe/rp-pppoe-3.12-r1.ebuild107
-rw-r--r--net-dialup/sendpage/Manifest7
-rw-r--r--net-dialup/sendpage/files/1.1.0-makefile.patch11
-rw-r--r--net-dialup/sendpage/files/sendpage.initd20
-rw-r--r--net-dialup/sendpage/metadata.xml10
-rw-r--r--net-dialup/sendpage/sendpage-1.1.0-r3.ebuild48
-rw-r--r--net-dialup/sercd/Manifest8
-rw-r--r--net-dialup/sercd/files/sercd.confd23
-rw-r--r--net-dialup/sercd/files/sercd.initd24
-rw-r--r--net-dialup/sercd/files/sercd.xinetd15
-rw-r--r--net-dialup/sercd/metadata.xml10
-rw-r--r--net-dialup/sercd/sercd-3.0.0-r2.ebuild35
-rw-r--r--net-dialup/speedtouch-usb/Manifest6
-rw-r--r--net-dialup/speedtouch-usb/files/README253
-rw-r--r--net-dialup/speedtouch-usb/metadata.xml6
-rw-r--r--net-dialup/speedtouch-usb/speedtouch-usb-3.0.1.2-r3.ebuild92
-rw-r--r--net-dialup/tkvoice/Manifest6
-rw-r--r--net-dialup/tkvoice/files/tkvoice.desktop7
-rw-r--r--net-dialup/tkvoice/metadata.xml7
-rw-r--r--net-dialup/tkvoice/tkvoice-1.5.ebuild53
-rw-r--r--net-dialup/ueagle-atm/Manifest6
-rw-r--r--net-dialup/ueagle-atm/files/README235
-rw-r--r--net-dialup/ueagle-atm/metadata.xml7
-rw-r--r--net-dialup/ueagle-atm/ueagle-atm-1.1-r3.ebuild60
-rw-r--r--net-dialup/ueagle4-atm/Manifest6
-rw-r--r--net-dialup/ueagle4-atm/files/README235
-rw-r--r--net-dialup/ueagle4-atm/metadata.xml7
-rw-r--r--net-dialup/ueagle4-atm/ueagle4-atm-1.0.ebuild56
-rw-r--r--net-dialup/wvdial/Manifest8
-rw-r--r--net-dialup/wvdial/files/wvdial-1.61-as-needed.patch15
-rw-r--r--net-dialup/wvdial/files/wvdial-1.61-destdir.patch35
-rw-r--r--net-dialup/wvdial/files/wvdial-1.61-parallel-make.patch20
-rw-r--r--net-dialup/wvdial/metadata.xml10
-rw-r--r--net-dialup/wvdial/wvdial-1.61.ebuild48
-rw-r--r--net-dialup/xc/Manifest10
-rw-r--r--net-dialup/xc/files/xc-4.3.2-add-115200.patch12
-rw-r--r--net-dialup/xc/files/xc-4.3.2-fix-set_bps-overflow.patch14
-rw-r--r--net-dialup/xc/files/xc-4.3.2-gentoo.patch122
-rw-r--r--net-dialup/xc/files/xc-4.3.2-implicit-decl.patch22
-rw-r--r--net-dialup/xc/metadata.xml12
-rw-r--r--net-dialup/xc/xc-4.3.2-r3.ebuild43
-rw-r--r--net-dialup/xc/xc-4.3.2-r4.ebuild44
-rw-r--r--net-dialup/xl2tpd/Manifest22
-rw-r--r--net-dialup/xl2tpd/files/xl2tpd-1.3.0-LDFLAGS.patch15
-rw-r--r--net-dialup/xl2tpd/files/xl2tpd-1.3.1-CFLAGS.patch19
-rw-r--r--net-dialup/xl2tpd/files/xl2tpd-1.3.1-kernelmode.patch361
-rw-r--r--net-dialup/xl2tpd/files/xl2tpd-1.3.1-no-type-punning-b119c0da.patch23
-rw-r--r--net-dialup/xl2tpd/files/xl2tpd-dnsretry.patch42
-rw-r--r--net-dialup/xl2tpd/files/xl2tpd-init31
-rw-r--r--net-dialup/xl2tpd/files/xl2tpd-init-r111
-rw-r--r--net-dialup/xl2tpd/files/xl2tpd.conf1
-rw-r--r--net-dialup/xl2tpd/files/xl2tpd.service12
-rw-r--r--net-dialup/xl2tpd/metadata.xml20
-rw-r--r--net-dialup/xl2tpd/xl2tpd-1.3.1-r2.ebuild52
-rw-r--r--net-dialup/xl2tpd/xl2tpd-1.3.1-r3.ebuild52
-rw-r--r--net-dialup/xl2tpd/xl2tpd-1.3.1-r4.ebuild52
-rw-r--r--net-dialup/xl2tpd/xl2tpd-1.3.10.ebuild55
-rw-r--r--net-dialup/xl2tpd/xl2tpd-1.3.6.ebuild45
-rw-r--r--net-dialup/xl2tpd/xl2tpd-1.3.9.ebuild55
240 files changed, 10642 insertions, 0 deletions
diff --git a/net-dialup/accel-ppp/Manifest b/net-dialup/accel-ppp/Manifest
new file mode 100644
index 000000000000..098152c73be8
--- /dev/null
+++ b/net-dialup/accel-ppp/Manifest
@@ -0,0 +1,13 @@
+AUX accel-ppp-1.11.1-linux-4.10.patch 2373 SHA256 ad96baff69128adb8375e7462b5b7afdc9b6fa9e4857cbd7f594b822c8a43d38 SHA512 5915500f67aad2c956c7a65bc9716e2f32fca6bf51010d8905f025a0386578bcf63613f3b195b47c1a06c01ce68c88a69af2bfed94b3ca76fdb324279f8acfdb WHIRLPOOL 2bf331bcf955694fc6e6a38bb6e5a4f48df18a7e34655c6b539fbc089c053c93c0985bd874ae70764564ff0206b66d29589f1dec6c1131e375e587409dd81535
+AUX accel-ppp-1.11.1-socklen.patch 483 SHA256 ff430eab2e66dc440afde15eb12dc0ef54353afd36af4859eb09d124b8fae8ce SHA512 6561b95c8cc0ec642c12895426c5b0b8290da9c7e3c9207beb837e50218fec70ead92a680e131f2967d3281a273cc920ccfebbd66aed4579feec61a759b36dd5 WHIRLPOOL 7bb0f96b4ede93191c06b665bd9ef77e794c2ed39f9c22611e0bb5bd0a6a4f6ddd3599bdddbc4c0cf23b842232d5da5e951744c535fc40c9e0f5ae7bf455f7bb
+AUX accel-ppp.confd 212 SHA256 aa59531b4fa11bf9a4224b70e4ef6570fd571e01108b30137fabe343cadd3a06 SHA512 39b3fa3e9dbbdfa2e4ea43cdff704924b5da7eef5881488df039b973e828dd08ca9329c4f81343db62f0bf6730ea902708398273dc73d23586bad50e5c0ae441 WHIRLPOOL b3e324fc0d62a5ced99cc07fe2d84a3cd362e2160f7b5faa51e100d0729e048eae7dd067b787e95341c0548bbba828a642540fffcff2610a31bea1c0f7951cea
+AUX accel-ppp.initd 975 SHA256 3857162a8cfa70597b8a4f8ee1f7356cd9cec32fe41bdb018ed747fcd86beb20 SHA512 bb4a59f14bf254620925adef1822c8311bdb890f5f8ad296e4b8ee46a7bc6f49536da9e970f2171fe9f24a9b0d50801bc07b5912b44a14b00c4479eda6699c45 WHIRLPOOL 00445c3b27ef2948bd62e14b2db67a6e27cadaa9d3cd1018d5f97c22019c2084159ac1790dd418c1df3fec0a831035142f5045376a1e327e7e249b330c9ab8f0
+DIST accel-ppp-1.11.0.tar.bz2 1594327 SHA256 1b4f02fb0b264d7144c2b3f81c002983aae5b26bcf26af9cd2cd8492222efffe SHA512 907b484e73a4d70757a3991e6f33873aad5f10f6d5180307ee2f3eb0caacc576795d0e9c7666172a00842e6d31563503250f0e8165f6adb2bc88a1270814ea3c WHIRLPOOL 3975b076961c8ed7e3f207309e941785de26452f6ef5490f0668aca19e404e9f2b4ffa978b2af95897fdb339289d578c52f24493a8130ea38ccabe6846363587
+DIST accel-ppp-1.11.1_p20170508.tar.bz2 1609904 SHA256 672a32b990afd970e21188d65b68b1fa067cb272a35686808f21ac66d74e66c3 SHA512 79f928c9d07891957d12443eaf32e96e826d5bebf241dcfcb31a7777fbce2332078bf0c1dd1e1a55cf96154be1fec610f1afd088fc018f54ebd5d265c037c07a WHIRLPOOL 47faf7ee243385c135766a018a51f322b6a1ea2a522d4d0aad674e157ef86e9aa0c1feb1778f17e5c69e89b944652e45f7631fdae48161290fb1a7e4ee66ccd2
+EBUILD accel-ppp-1.11.0.ebuild 2282 SHA256 5d150d6bff6a59a27cf3f0819263752a4ee505a60e1a988bd290763c13c857d8 SHA512 200ab0e64d650ee47726dfbc0033a860316fbe7828defb5d725e23d0586a9016bc19f3929fe4d6a46e16a6dec60f79f47062a8fb9baa99e97114968bdaabfe94 WHIRLPOOL 763a32669b66d6df3401216226292121909e032ae65f5ce66556400811e695c2f5ac2b74bcdf005799117b8b66de95042eae7c42e036847cd9a1bc74736787a2
+EBUILD accel-ppp-1.11.1_p20170508.ebuild 2475 SHA256 c7ee33e8bba4830f2868d12042d5e3eec7a128007ddf174353ff2c55aa676136 SHA512 b624a2a986d5f08a8a7b1b1e0a215f1ea112979281ebe28e83690ffc3b9ec7c167b7763259eed3e2cd61949cbdd5e0c34e59ceee850c907fd21111993e7e55e4 WHIRLPOOL b42e3027f3a48a345054a805123322b72986fa8bd020eb7e599518a5079aa480ec27e4804da90973fa4db0320868922c563a9866b3151744d49b3724a4a9a194
+EBUILD accel-ppp-1.11.9999.ebuild 2342 SHA256 c9c747b3d9c2b4c906f8be8f04da3c0b9078d3dc4d12b7f2f623268036859bd6 SHA512 b8c749745acc321ee77b2b87eea1af70de2c60fc17288fed9998db7d55d773e0926dd24dce166371875a81f92e09251bdd4c9831ae01103eda1e9aadfe85452b WHIRLPOOL 1c325d02f7713c2586ffa7354fc01e8317564d9c32f20ad8fefd66cdf4097a6a27bbc92550982f3b65bfc75fc80de26195aa941ce758e4e2f4c060f9c69d95ea
+EBUILD accel-ppp-9999.ebuild 2323 SHA256 1dacc184d6574d4a704e38f4c14b6a9647206611f9f2823e584abe78f4fbd503 SHA512 0978564d9ec8cd4870db60f2c269e291d62074eb755a2765ab43a9b7d2523bcf9606ff8b79cba74fdaccc2d5d00758ddec65bb40d30da56079d002a9391124fe WHIRLPOOL 39d13273aa68776ca2d2db3fa662e91465d890ecb83de1a6dc161366c23104704fefeccbacac4f71707f2a1ae937f8876c2173ff5ee51768414d847e1e06d13d
+MISC ChangeLog 4613 SHA256 7dcd1e6907baf10fcab7e932b33102c09660b23608b864ed828132528723b3d5 SHA512 21b88e34cb4d2480dfa786fe8488bf2aef4a0686149ea7fdcd3b147baaf54367f453cb382ee7947b710da1150b25cf651f66d5f7beeddfc8c6d7122ed0eb2483 WHIRLPOOL 8c400501dc1e0db0213eb0db142c3fcd18f0de655ef8346edceff883c98e453aa4b7d9c190760bb319109945cf329d7d6620c1952176543d2a1d5965caa4a1be
+MISC ChangeLog-2015 2460 SHA256 0ed7d8b9b44ad4eff4f8559c1503f7696357a03734505ba2c6815750c3ffce8c SHA512 b6b391342750eaccaa3b3908604751e072acb72d4137fdbcb15b9251bce03511f6e0e6c33dcafe6aa053e80fc63791b3a134ff0f037aa89b7a496e7712619d10 WHIRLPOOL 811ba3b0d75710f68908ebd282db36cf5751e89d501de0de8f841da3d1b6f1dbf254514eec94fd3ff845fbacd089a0903010f38337ebc8f1a9682def990dd1b5
+MISC metadata.xml 507 SHA256 e1a5d7d72e0ca0edb208f83a55a2c2c594dfacea5fe44054891328576eeddbb0 SHA512 6b60c890f172501225ed3da4a229298c2b05601606d047bbe46dbea88246bcce8c15695259063daf73574c9d24048b04d2422c83e2e934015768338120e9154e WHIRLPOOL 8b8bbd5e89cd20bd40aa931f52cb32cde1becc69131afbc40c64a5b1477b306fa179075d8853b73d5bbf081879600d90b100811d83d55532e68d45078b5e526e
diff --git a/net-dialup/accel-ppp/accel-ppp-1.11.0.ebuild b/net-dialup/accel-ppp/accel-ppp-1.11.0.ebuild
new file mode 100644
index 000000000000..03107ba307d5
--- /dev/null
+++ b/net-dialup/accel-ppp/accel-ppp-1.11.0.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils flag-o-matic linux-info linux-mod
+
+DESCRIPTION="High performance PPTP, PPPoE and L2TP server"
+HOMEPAGE="http://accel-ppp.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc ipoe postgres radius shaper snmp valgrind"
+
+RDEPEND="postgres? ( dev-db/postgresql:* )
+ snmp? ( net-analyzer/net-snmp )
+ dev-libs/libpcre
+ dev-libs/openssl:0"
+DEPEND="${RDEPEND}
+ valgrind? ( dev-util/valgrind )"
+PDEPEND="net-dialup/ppp-scripts"
+
+DOCS=( README )
+
+CONFIG_CHECK="~L2TP ~PPPOE ~PPTP"
+
+REQUIRED_USE="valgrind? ( debug )"
+
+pkg_setup() {
+ if use ipoe; then
+ linux-mod_pkg_setup
+ set_arch_to_kernel
+ else
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ sed -i -e "/mkdir/d" \
+ -e "/echo/d" \
+ -e "s: RENAME accel-ppp.conf.dist::" accel-pppd/CMakeLists.txt || die 'sed on accel-pppd/CMakeLists.txt failed'
+
+ # Do not install kernel modules like that - breaks sandbox!
+ sed -i -e '/modules_install/d' \
+ drivers/ipoe/CMakeLists.txt \
+ drivers/vlan_mon/CMakeLists.txt || die
+
+ # Bug #549918
+ append-ldflags -Wl,-z,lazy
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local libdir="$(get_libdir)"
+ # There must be also dev-libs/tomcrypt (TOMCRYPT) as crypto alternative to OpenSSL
+ local mycmakeargs=(
+ -DLIB_PATH_SUFFIX="${libdir#lib}"
+ -DBUILD_IPOE_DRIVER="$(usex ipoe)"
+ -DBUILD_PPTP_DRIVER=no
+ -DBUILD_VLAN_MON_DRIVER="$(usex ipoe)"
+ -DCRYPTO=OPENSSL
+ -DLOG_PGSQL="$(usex postgres)"
+ -DMEMDEBUG="$(usex debug)"
+ -DNETSNMP="$(usex snmp)"
+ -DRADIUS="$(usex radius)"
+ -DSHAPER="$(usex shaper)"
+ -DVALGRIND="$(usex valgrind)"
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ if use ipoe; then
+ local MODULE_NAMES="ipoe(accel-ppp:${BUILD_DIR}/drivers/ipoe/driver) vlan_mon(accel-ppp:${BUILD_DIR}/drivers/vlan_mon/driver)"
+ linux-mod_src_install
+ fi
+
+ cmake-utils_src_install
+
+ use doc && dodoc -r rfc
+
+ if use snmp; then
+ insinto /usr/share/snmp/mibs
+ doins accel-pppd/extra/net-snmp/ACCEL-PPP-MIB.txt
+ fi
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}d
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}d
+
+ dodir /var/log/accel-ppp
+}
diff --git a/net-dialup/accel-ppp/accel-ppp-1.11.1_p20170508.ebuild b/net-dialup/accel-ppp/accel-ppp-1.11.1_p20170508.ebuild
new file mode 100644
index 000000000000..e69b411d936d
--- /dev/null
+++ b/net-dialup/accel-ppp/accel-ppp-1.11.1_p20170508.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils flag-o-matic linux-info linux-mod
+
+DESCRIPTION="High performance PPTP, PPPoE and L2TP server"
+HOMEPAGE="http://accel-ppp.sourceforge.net/"
+SRC_URI="https://dev.gentoo.org/~pinkbyte/distfiles/snapshots/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc ipoe lua postgres radius shaper snmp valgrind"
+
+RDEPEND="lua? ( dev-lang/lua:0 )
+ postgres? ( dev-db/postgresql:* )
+ snmp? ( net-analyzer/net-snmp )
+ dev-libs/libpcre
+ dev-libs/openssl:0"
+DEPEND="${RDEPEND}
+ valgrind? ( dev-util/valgrind )"
+PDEPEND="net-dialup/ppp-scripts"
+
+DOCS=( README )
+
+CONFIG_CHECK="~L2TP ~PPPOE ~PPTP"
+
+REQUIRED_USE="valgrind? ( debug )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.11.1-linux-4.10.patch"
+ "${FILESDIR}/${PN}-1.11.1-socklen.patch"
+)
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ if use ipoe; then
+ linux-mod_pkg_setup
+ set_arch_to_kernel
+ else
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ sed -i -e "/mkdir/d" \
+ -e "/echo/d" \
+ -e "s: RENAME accel-ppp.conf.dist::" accel-pppd/CMakeLists.txt || die 'sed on accel-pppd/CMakeLists.txt failed'
+
+ # Do not install kernel modules like that - breaks sandbox!
+ sed -i -e '/modules_install/d' \
+ drivers/ipoe/CMakeLists.txt \
+ drivers/vlan_mon/CMakeLists.txt || die
+
+ # Bug #549918
+ append-ldflags -Wl,-z,lazy
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local libdir="$(get_libdir)"
+ # There must be also dev-libs/tomcrypt (TOMCRYPT) as crypto alternative to OpenSSL
+ local mycmakeargs=(
+ -DLIB_PATH_SUFFIX="${libdir#lib}"
+ -DBUILD_IPOE_DRIVER="$(usex ipoe)"
+ -DBUILD_PPTP_DRIVER=no
+ -DBUILD_VLAN_MON_DRIVER="$(usex ipoe)"
+ -DCRYPTO=OPENSSL
+ -DLOG_PGSQL="$(usex postgres)"
+ -DLUA="$(usex lua)"
+ -DMEMDEBUG="$(usex debug)"
+ -DNETSNMP="$(usex snmp)"
+ -DRADIUS="$(usex radius)"
+ -DSHAPER="$(usex shaper)"
+ -DVALGRIND="$(usex valgrind)"
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ if use ipoe; then
+ local MODULE_NAMES="ipoe(accel-ppp:${BUILD_DIR}/drivers/ipoe/driver) vlan_mon(accel-ppp:${BUILD_DIR}/drivers/vlan_mon/driver)"
+ linux-mod_src_install
+ fi
+
+ cmake-utils_src_install
+
+ use doc && dodoc -r rfc
+
+ if use snmp; then
+ insinto /usr/share/snmp/mibs
+ doins accel-pppd/extra/net-snmp/ACCEL-PPP-MIB.txt
+ fi
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}d
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}d
+
+ dodir /var/log/accel-ppp
+}
diff --git a/net-dialup/accel-ppp/accel-ppp-1.11.9999.ebuild b/net-dialup/accel-ppp/accel-ppp-1.11.9999.ebuild
new file mode 100644
index 000000000000..f4c53dbb43ea
--- /dev/null
+++ b/net-dialup/accel-ppp/accel-ppp-1.11.9999.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGIT_REPO_URI="git://git.code.sf.net/p/accel-ppp/code"
+EGIT_BRANCH="1.11"
+inherit cmake-utils flag-o-matic git-r3 linux-info linux-mod
+
+DESCRIPTION="High performance PPTP, PPPoE and L2TP server"
+HOMEPAGE="http://accel-ppp.sourceforge.net/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="debug doc ipoe lua postgres radius shaper snmp valgrind"
+
+RDEPEND="lua? ( dev-lang/lua:0 )
+ postgres? ( dev-db/postgresql:* )
+ snmp? ( net-analyzer/net-snmp )
+ dev-libs/libpcre
+ dev-libs/openssl:0"
+DEPEND="${RDEPEND}
+ valgrind? ( dev-util/valgrind )"
+PDEPEND="net-dialup/ppp-scripts"
+
+DOCS=( README )
+
+CONFIG_CHECK="~L2TP ~PPPOE ~PPTP"
+
+REQUIRED_USE="valgrind? ( debug )"
+
+pkg_setup() {
+ if use ipoe; then
+ linux-mod_pkg_setup
+ set_arch_to_kernel
+ else
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ sed -i -e "/mkdir/d" \
+ -e "/echo/d" \
+ -e "s: RENAME accel-ppp.conf.dist::" accel-pppd/CMakeLists.txt || die 'sed on accel-pppd/CMakeLists.txt failed'
+
+ # Do not install kernel modules like that - breaks sandbox!
+ sed -i -e '/modules_install/d' \
+ drivers/ipoe/CMakeLists.txt \
+ drivers/vlan_mon/CMakeLists.txt || die
+
+ # Bug #549918
+ append-ldflags -Wl,-z,lazy
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local libdir="$(get_libdir)"
+ # There must be also dev-libs/tomcrypt (TOMCRYPT) as crypto alternative to OpenSSL
+ local mycmakeargs=(
+ -DLIB_PATH_SUFFIX="${libdir#lib}"
+ -DBUILD_IPOE_DRIVER="$(usex ipoe)"
+ -DBUILD_PPTP_DRIVER=no
+ -DBUILD_VLAN_MON_DRIVER="$(usex ipoe)"
+ -DCRYPTO=OPENSSL
+ -DLOG_PGSQL="$(usex postgres)"
+ -DMEMDEBUG="$(usex debug)"
+ -DNETSNMP="$(usex snmp)"
+ -DRADIUS="$(usex radius)"
+ -DSHAPER="$(usex shaper)"
+ -DVALGRIND="$(usex valgrind)"
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ if use ipoe; then
+ local MODULE_NAMES="ipoe(accel-ppp:${BUILD_DIR}/drivers/ipoe/driver) vlan_mon(accel-ppp:${BUILD_DIR}/drivers/vlan_mon/driver)"
+ linux-mod_src_install
+ fi
+
+ cmake-utils_src_install
+
+ use doc && dodoc -r rfc
+
+ if use snmp; then
+ insinto /usr/share/snmp/mibs
+ doins accel-pppd/extra/net-snmp/ACCEL-PPP-MIB.txt
+ fi
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}d
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}d
+
+ dodir /var/log/accel-ppp
+}
diff --git a/net-dialup/accel-ppp/accel-ppp-9999.ebuild b/net-dialup/accel-ppp/accel-ppp-9999.ebuild
new file mode 100644
index 000000000000..0630264eef34
--- /dev/null
+++ b/net-dialup/accel-ppp/accel-ppp-9999.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGIT_REPO_URI="git://git.code.sf.net/p/accel-ppp/code"
+inherit cmake-utils flag-o-matic git-r3 linux-info linux-mod
+
+DESCRIPTION="High performance PPTP, PPPoE and L2TP server"
+HOMEPAGE="http://accel-ppp.sourceforge.net/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="debug doc ipoe lua postgres radius shaper snmp valgrind"
+
+RDEPEND="lua? ( dev-lang/lua:0 )
+ postgres? ( dev-db/postgresql:* )
+ snmp? ( net-analyzer/net-snmp )
+ dev-libs/libpcre
+ dev-libs/openssl:0"
+DEPEND="${RDEPEND}
+ valgrind? ( dev-util/valgrind )"
+PDEPEND="net-dialup/ppp-scripts"
+
+DOCS=( README )
+
+CONFIG_CHECK="~L2TP ~PPPOE ~PPTP"
+
+REQUIRED_USE="valgrind? ( debug )"
+
+pkg_setup() {
+ if use ipoe; then
+ linux-mod_pkg_setup
+ set_arch_to_kernel
+ else
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ sed -i -e "/mkdir/d" \
+ -e "/echo/d" \
+ -e "s: RENAME accel-ppp.conf.dist::" accel-pppd/CMakeLists.txt || die 'sed on accel-pppd/CMakeLists.txt failed'
+
+ # Do not install kernel modules like that - breaks sandbox!
+ sed -i -e '/modules_install/d' \
+ drivers/ipoe/CMakeLists.txt \
+ drivers/vlan_mon/CMakeLists.txt || die
+
+ # Bug #549918
+ append-ldflags -Wl,-z,lazy
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local libdir="$(get_libdir)"
+ # There must be also dev-libs/tomcrypt (TOMCRYPT) as crypto alternative to OpenSSL
+ local mycmakeargs=(
+ -DLIB_PATH_SUFFIX="${libdir#lib}"
+ -DBUILD_IPOE_DRIVER="$(usex ipoe)"
+ -DBUILD_PPTP_DRIVER=no
+ -DBUILD_VLAN_MON_DRIVER="$(usex ipoe)"
+ -DCRYPTO=OPENSSL
+ -DLOG_PGSQL="$(usex postgres)"
+ -DMEMDEBUG="$(usex debug)"
+ -DNETSNMP="$(usex snmp)"
+ -DRADIUS="$(usex radius)"
+ -DSHAPER="$(usex shaper)"
+ -DVALGRIND="$(usex valgrind)"
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ if use ipoe; then
+ local MODULE_NAMES="ipoe(accel-ppp:${BUILD_DIR}/drivers/ipoe/driver) vlan_mon(accel-ppp:${BUILD_DIR}/drivers/vlan_mon/driver)"
+ linux-mod_src_install
+ fi
+
+ cmake-utils_src_install
+
+ use doc && dodoc -r rfc
+
+ if use snmp; then
+ insinto /usr/share/snmp/mibs
+ doins accel-pppd/extra/net-snmp/ACCEL-PPP-MIB.txt
+ fi
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}d
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}d
+
+ dodir /var/log/accel-ppp
+}
diff --git a/net-dialup/accel-ppp/files/accel-ppp-1.11.1-linux-4.10.patch b/net-dialup/accel-ppp/files/accel-ppp-1.11.1-linux-4.10.patch
new file mode 100644
index 000000000000..568a405fd69c
--- /dev/null
+++ b/net-dialup/accel-ppp/files/accel-ppp-1.11.1-linux-4.10.patch
@@ -0,0 +1,80 @@
+--- ./drivers/ipoe/ipoe.c.orig 2016-11-28 14:28:33.000000000 +0300
++++ ./drivers/ipoe/ipoe.c 2017-05-17 11:27:42.030000000 +0300
+@@ -52,6 +52,27 @@
+ #define DEFINE_SEMAPHORE(name) struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1)
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++static inline int
++_genl_register_family_with_ops_grps(struct genl_family *family,
++ const struct genl_ops *ops, size_t n_ops,
++ const struct genl_multicast_group *mcgrps,
++ size_t n_mcgrps)
++{
++ family->module = THIS_MODULE;
++ family->ops = ops;
++ family->n_ops = n_ops;
++ family->mcgrps = mcgrps;
++ family->n_mcgrps = n_mcgrps;
++ return genl_register_family(family);
++}
++
++#define genl_register_family_with_ops_groups(family, ops, grps) \
++ _genl_register_family_with_ops_grps((family), \
++ (ops), ARRAY_SIZE(ops), \
++ (grps), ARRAY_SIZE(grps))
++#endif
++
+ struct ipoe_stats {
+ struct u64_stats_sync sync;
+ u64 packets;
+@@ -1668,7 +1689,9 @@
+ };
+
+ static struct genl_family ipoe_nl_family = {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
+ .id = GENL_ID_GENERATE,
++#endif
+ .name = IPOE_GENL_NAME,
+ .version = IPOE_GENL_VERSION,
+ .hdrsize = 0,
+--- ./drivers/vlan_mon/vlan_mon.c.orig 2017-05-17 11:28:23.320000000 +0300
++++ ./drivers/vlan_mon/vlan_mon.c 2017-05-17 11:29:41.660000000 +0300
+@@ -39,6 +39,27 @@
+ #define vlan_tx_tag_present(skb) skb_vlan_tag_present(skb)
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++static inline int
++_genl_register_family_with_ops_grps(struct genl_family *family,
++ const struct genl_ops *ops, size_t n_ops,
++ const struct genl_multicast_group *mcgrps,
++ size_t n_mcgrps)
++{
++ family->module = THIS_MODULE;
++ family->ops = ops;
++ family->n_ops = n_ops;
++ family->mcgrps = mcgrps;
++ family->n_mcgrps = n_mcgrps;
++ return genl_register_family(family);
++}
++
++#define genl_register_family_with_ops_groups(family, ops, grps) \
++ _genl_register_family_with_ops_grps((family), \
++ (ops), ARRAY_SIZE(ops), \
++ (grps), ARRAY_SIZE(grps))
++#endif
++
+ struct vlan_dev {
+ unsigned int magic;
+ int ifindex;
+@@ -660,7 +681,9 @@
+ };
+
+ static struct genl_family vlan_mon_nl_family = {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
+ .id = GENL_ID_GENERATE,
++#endif
+ .name = VLAN_MON_GENL_NAME,
+ .version = VLAN_MON_GENL_VERSION,
+ .hdrsize = 0,
diff --git a/net-dialup/accel-ppp/files/accel-ppp-1.11.1-socklen.patch b/net-dialup/accel-ppp/files/accel-ppp-1.11.1-socklen.patch
new file mode 100644
index 000000000000..79f76cae98a3
--- /dev/null
+++ b/net-dialup/accel-ppp/files/accel-ppp-1.11.1-socklen.patch
@@ -0,0 +1,18 @@
+commit 68008248259dfaa2fde91f8697db889971056bb3
+Author: lmwangi <lmwangi@gmail.com>
+Date: Tue Jun 7 13:55:04 2016 +0300
+
+ fix build issue where socketlen is not found
+
+diff --git a/accel-pppd/logs/log_pgsql.c b/accel-pppd/logs/log_pgsql.c
+index e4b5a9e..78fa72d 100644
+--- a/accel-pppd/logs/log_pgsql.c
++++ b/accel-pppd/logs/log_pgsql.c
+@@ -1,6 +1,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <sys/socket.h>
+
+ #include <postgresql/libpq-fe.h>
+
diff --git a/net-dialup/accel-ppp/files/accel-ppp.confd b/net-dialup/accel-ppp/files/accel-ppp.confd
new file mode 100644
index 000000000000..41073c6529c6
--- /dev/null
+++ b/net-dialup/accel-ppp/files/accel-ppp.confd
@@ -0,0 +1,10 @@
+# Config file for accel-pppd
+
+# Pid file
+ACCEL_PPPD_PID="/run/accel-ppp/accel-pppd.pid"
+
+# Directory for radius attributes
+RADATTR_DIR="/run/radattr"
+
+# Daemon options
+ACCEL_PPPD_OPTS="-d -c /etc/accel-ppp.conf"
diff --git a/net-dialup/accel-ppp/files/accel-ppp.initd b/net-dialup/accel-ppp/files/accel-ppp.initd
new file mode 100644
index 000000000000..abbc4286228a
--- /dev/null
+++ b/net-dialup/accel-ppp/files/accel-ppp.initd
@@ -0,0 +1,44 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+extra_started_commands="reload"
+
+depend() {
+ need net
+}
+
+start_pre() {
+ # Create directory for PID file
+ checkpath -d -q "$(dirname ${ACCEL_PPPD_PID})"
+ # Create default directory for radius attributes
+ checkpath -d -q "${RADATTR_DIR}"
+}
+
+start() {
+ ebegin "Starting accel-pppd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/accel-pppd -- ${ACCEL_PPPD_OPTS} -p ${ACCEL_PPPD_PID}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping accel-pppd"
+ accel-cmd shutdown
+ [ $? -ne 0 ] && kill -9 $(pidof accel-pppd)
+ PID="$(cat ${ACCEL_PPPD_PID})"
+ while [ -n "${PID}" -a -d "/proc/${PID}" ]; do
+ sleep 1
+ done
+ rm -f ${ACCEL_PPPD_PID}
+ eend 0
+}
+
+reload() {
+ if [ ! -f ${ACCEL_PPPD_PID} ]; then
+ eerror "accel-pppd isn't running"
+ return 1
+ fi
+ ebegin "Reloading configuration"
+ start-stop-daemon --signal USR1 --pidfile ${ACCEL_PPPD_PID}
+ eend $?
+}
diff --git a/net-dialup/accel-ppp/metadata.xml b/net-dialup/accel-ppp/metadata.xml
new file mode 100644
index 000000000000..138dfdc41815
--- /dev/null
+++ b/net-dialup/accel-ppp/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 type="person">
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <use>
+ <flag name="ipoe">Build IPoE kernel module</flag>
+ <flag name="shaper">Support for traffic shaping</flag>
+ <flag name="valgrind">Compile in valgrind hints</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">accel-ppp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/cistronradius/Manifest b/net-dialup/cistronradius/Manifest
new file mode 100644
index 000000000000..e3f968d476cb
--- /dev/null
+++ b/net-dialup/cistronradius/Manifest
@@ -0,0 +1,7 @@
+AUX cistronradius-1.6.8-gcc41.patch 452 SHA256 c534985f74b9404059877f03b62de86ecb8120055a9f9ed838f507f81cde218e SHA512 c99ecdaa8bb9e1152c58f8a5cce79e3af058825de1b6818679e059b1c98e0ed72640dc5cdcf6c66a7b5f91792208bd1b0d4ede2c753f5f8dacc1ed4c64091f37 WHIRLPOOL 6a78b1ca1fd0827a59f94fb9f33bf625d569acbe8e1b398360714244f5b529a28dbf0cb763549c1ed02f54ecd7d168777573024e0e4fa719fe941b99fd4e78b3
+AUX cistronradius.rc 716 SHA256 fe034ca3b07c43c65e74f797c96e8d7c2bf9e3213e539a4ad0624848a8798aff SHA512 d86029f75b922f2b382f34e219462f898ffb1ca8d0517d7a57b33b239396906a89da8afa5667257995aa7bac2f3f7eda4e5284672682405d131d2cdb79491fc3 WHIRLPOOL 6a44d6c89aa2bde60069bb672fa83fc1d95c99f9ed7b1e337db1504689cd40a847738eddc0a086fc1e79aa25f425ce840f23a81b17c844c016b64645b601858a
+DIST radiusd-cistron-1.6.8.tar.gz 199459 SHA256 ed08ff8fb3f49ac5a921c2e23b639e9b87db85e3e6105953c5a921b9a2cc6150 SHA512 9d42ec39eaa78f0c35ca036cf891d45a99c38af03416e4bca2d9d883a9aac818a0da1a52b5c1d4e54a1bdb108b237ed92c16309b61b7aa24f8782d0d0e0f8de5 WHIRLPOOL fd4515b9d2b66624ae23f6df111a4b22fa5f25853337f6263c56e401e16a5af4e1a18b261950402504d477ad51bf6b1da8baa5ad87bca8a4398b6af97a716587
+EBUILD cistronradius-1.6.8-r2.ebuild 1155 SHA256 a8bb2445a58fa5eb605ef453892da2f22c96cf309b4bbd0ca141b8e4626daf2f SHA512 3a292d873b36eb0faa0d95314816cbcbb6f585603be3b506c82bebe2912e80e3b47b955aee2d86cf4b60d6824c7b9ad0d1695b04d746fcd79e56f5acaba20360 WHIRLPOOL c537ce78bba1f3a7949449c7d32466f2bba01bf9bfb87e3f11e9c240a0d5c416c2f716b2f2ba55962d6fa35edad1f0f5d2c2db01407b95a745eff6fe610d4b5d
+MISC ChangeLog 2992 SHA256 b25c114ccb5117b70f1a172fdd36f011b5dbd89733c03d2eaa3dc00b01e8c381 SHA512 189236d8327da4b226cf5b22921ddaf1bc298abec392bc7c91e0da8bb1c4a2b2694662c6e3895d0e26da3346dee3a20942b1a173355d0569583d8af2f9cfa676 WHIRLPOOL 3684d493a39039a7061119ae9d3c0811df367d69179954392a7cf708d3e459d4896211d95f9eb6716c30f8e783263d3173969c3cea971ca74aa7fda8303de7a5
+MISC ChangeLog-2015 3080 SHA256 822bc28d91c5ddd9d16738266d818c069ed42af0be0b5be0da423c175ccd567c SHA512 3c66c3bf17f6493f52bee80a03160a1f29ccc270d2281d0c973b80d4b5dd2260fadba8b7b1f1ddb2876f1002e1b69e224f0e42dd42e40b2ea76e60a383b59d57 WHIRLPOOL 181974be304c99c4f9402a48a9445ef1727eb25d809523ac705743cde1352ec1f6e83cfdf61ccf2990dfe61ea22108f6f7954fd84cf446bfaf7f47821f8e72de
+MISC metadata.xml 296 SHA256 46421abfbedbe680840a6005305fef2508364408baab6f1c6c1f3e4d751200b4 SHA512 46978f543efeb23b4fe607a276f36658ca471dc3b6b4558f836971ea1074676586bdf069ff28efb45aa49ca8d874af66ed4ba93bdc82efca90ad4d896929b49f WHIRLPOOL 6f167d8e47fcd876942ce1a822cb03c2d5aee3b982f425fd20a492d0a79656d8f1923756237cacbf002275f02ccefba3947b094b6f648e1b9c5fd6ae5aa4eae3
diff --git a/net-dialup/cistronradius/cistronradius-1.6.8-r2.ebuild b/net-dialup/cistronradius/cistronradius-1.6.8-r2.ebuild
new file mode 100644
index 000000000000..7937bca89361
--- /dev/null
+++ b/net-dialup/cistronradius/cistronradius-1.6.8-r2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Authentication and accounting server for terminal servers using RADIUS"
+HOMEPAGE="http://www.radius.cistron.nl/"
+SRC_URI="ftp://ftp.radius.cistron.nl/pub/radius/radiusd-cistron-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* x86"
+
+DEPEND="
+ !net-dialup/freeradius
+ !net-dialup/gnuradius"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/radiusd-cistron-${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-gcc41.patch"
+ sed -i -e "s:SHAREDIR/::g" raddb/dictionary || die
+ mv src/checkrad.pl src/checkrad || die
+
+ epatch_user
+}
+
+src_compile() {
+ emake -C src \
+ CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
+ BINDIR=/usr/bin SBINDIR=/usr/sbin \
+ MANDIR=/usr/share/man SHAREDIR=/usr/share/radius
+}
+
+src_install() {
+ insinto /etc/raddb
+ doins raddb/*
+ dodoc README doc/{ChangeLog,FAQ.txt,README*}
+ doman doc/{*.1,*.8,*.5rad,*.8rad}
+
+ dosbin src/{checkrad,radiusd,radrelay}
+ dobin src/{radclient,radlast,radtest,radwho,radzap}
+
+ newinitd "${FILESDIR}/cistronradius.rc" cistronradius
+}
diff --git a/net-dialup/cistronradius/files/cistronradius-1.6.8-gcc41.patch b/net-dialup/cistronradius/files/cistronradius-1.6.8-gcc41.patch
new file mode 100644
index 000000000000..7600df739c7b
--- /dev/null
+++ b/net-dialup/cistronradius/files/cistronradius-1.6.8-gcc41.patch
@@ -0,0 +1,11 @@
+diff -Nru radiusd-cistron-1.6.8.orig/src/radiusd.h radiusd-cistron-1.6.8/src/radiusd.h
+--- radiusd-cistron-1.6.8.orig/src/radiusd.h 2003-12-08 18:12:22.000000000 +0200
++++ radiusd-cistron-1.6.8/src/radiusd.h 2006-09-21 15:33:05.000000000 +0300
+@@ -204,7 +204,6 @@
+ extern char *radwtmp_path;
+ extern UINT4 expiration_seconds;
+ extern UINT4 warning_seconds;
+-extern int radius_pid;
+ extern int use_dbm;
+ extern int use_dns;
+ extern int use_wtmp;
diff --git a/net-dialup/cistronradius/files/cistronradius.rc b/net-dialup/cistronradius/files/cistronradius.rc
new file mode 100644
index 000000000000..9155ee59b6a5
--- /dev/null
+++ b/net-dialup/cistronradius/files/cistronradius.rc
@@ -0,0 +1,34 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -x /usr/sbin/radiusd ] ; then
+ eerror "The radius daemon was not found."
+ eerror "Please (re)emerge cistronradius."
+ return 1
+ fi
+
+ if [ ! -e /etc/raddb/clients ] ; then
+ eerror "No /etc/raddb/clients file found."
+ eerror "Please create the file and retry."
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting Cistron Radius"
+ start-stop-daemon --start --quiet --exec /usr/sbin/radiusd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Cistron Radius"
+ start-stop-daemon --stop --quiet --pidfile /var/run/radiusd.pid
+ eend $?
+}
diff --git a/net-dialup/cistronradius/metadata.xml b/net-dialup/cistronradius/metadata.xml
new file mode 100644
index 000000000000..2f725d0fbf41
--- /dev/null
+++ b/net-dialup/cistronradius/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+<longdescription>
+An authentication and accounting server for terminal servers that speak the RADIUS protocol.
+</longdescription>
+</pkgmetadata>
diff --git a/net-dialup/cutecom/Manifest b/net-dialup/cutecom/Manifest
new file mode 100644
index 000000000000..7ebde5e08254
--- /dev/null
+++ b/net-dialup/cutecom/Manifest
@@ -0,0 +1,5 @@
+DIST cutecom-0.40.0.tar.gz 813238 SHA256 4a8583cccabe98e12442d7ebd8f0752348bad1a59b990c703574f22c0360bf9f SHA512 63df993fee01d73c40180a6b92d49e5200ae14db0275690f59ff02cfd2b6f573623cf74fb6d5dcabc292314642bb9cf2d9bd274a4094917f70418c30209bb403 WHIRLPOOL 870d7eae8b73e29656abb69066584f54f7d7a60ef8cd495c344668a23456456f51000cf2296a3951ba6d7267213077cd1c4febf13aa671702afa67922380f6a7
+EBUILD cutecom-0.40.0-r1.ebuild 811 SHA256 34abd9d0460bbc1678c026d99dccaee61acec625f556cca78bc3cab6f6764f38 SHA512 de15e8529b6855c7e3330dde8d893e53202fc7daab13117d51732ba8157797085a1c9caf90cb21d8ca0be6b50649e59cb6e4d4533e072be3c36d4a0ee0f7695e WHIRLPOOL ed53006f4d864be42150d2933d5f494973b4809990f1e4b6d79dfd6240f2c6e5adfef0a47dae78c350a355fdd6507920c387ee0fddbac2b00fedf8ae386c11e8
+MISC ChangeLog 3012 SHA256 1572d33141a80dec88531857a11416a65874b54a1f4bae05719b38f6d7fdb391 SHA512 88171bae0fc93e9be3358f59f45d487921e08ac257e49a314a949a2f3c5827445fa63cd81eee7c085eecf521f888a6b1e2d87672898f62fd7e6e2c6cacaafe06 WHIRLPOOL 8f50352198ed7f4541f708309fcd6b60ad6122aa213bfe4bbde1a558473bba51efbeec3eda24a0f19a49438bae856e0ff343be5c88a98b1d482b657a6aaba15f
+MISC ChangeLog-2015 5269 SHA256 ee949b7f51d687b4ad93987eb36bb1b1c9862f05e7f008e799e0ee948af6f8fd SHA512 01786eefdbd744b53cb1a6e0450c67367dab6a51b9dc56e4c8bd24754774410bd5a2f770542583e37f6242ed245851f75fb5c3fad5b86d890eeccb93188629d8 WHIRLPOOL 762ad6199f5aaac1c9baa03fc6a545030a83d7b5c69d48133e0e54d83c8ddecbb439e07a4757195708ccedbd76f20b5856d2723abc883602765695e4783a3527
+MISC metadata.xml 503 SHA256 9b6ce8c4bc5508d8463214a91879f73318d49819842b16af466935ab70b64cff SHA512 15d1dab579e2af2f6176b46b9c23ac621eeb302c53fd87848550e584e36a90855f6a13995fe5baecb1526485c0cefacb4dcdd426c7ea5682537bf0468dadd4f3 WHIRLPOOL c2e84ddd3a3cb89be2b52996184981ba3338c9f94786e6dde171759305014249d9dcbde9118efc7f8b4d1166743b48e62043b54a2c2ecc819caa9afbce55cca4
diff --git a/net-dialup/cutecom/cutecom-0.40.0-r1.ebuild b/net-dialup/cutecom/cutecom-0.40.0-r1.ebuild
new file mode 100644
index 000000000000..325579387758
--- /dev/null
+++ b/net-dialup/cutecom/cutecom-0.40.0-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils eutils
+
+DESCRIPTION="CuteCom is a serial terminal, like minicom, written in qt"
+HOMEPAGE="https://github.com/neundorf/CuteCom"
+SRC_URI="https://codeload.github.com/neundorf/${PN}/tar.gz/v${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtserialport:5
+ dev-qt/qtwidgets:5"
+RDEPEND="${DEPEND}
+ net-dialup/lrzsz"
+
+S="${WORKDIR}/CuteCom-${PV}"
+
+src_prepare() {
+ sed -i \
+ -e '/Path/d' \
+ -e '/Terminal/s/0/false/' \
+ "${PN}.desktop" || die 'sed on desktop file failed'
+
+ cmake-utils_src_prepare
+}
+
+src_install() {
+ cmake-utils_src_install
+ domenu "${PN}.desktop"
+ doicon "distribution/${PN}.png"
+}
diff --git a/net-dialup/cutecom/metadata.xml b/net-dialup/cutecom/metadata.xml
new file mode 100644
index 000000000000..8ad2379909d6
--- /dev/null
+++ b/net-dialup/cutecom/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription>CuteCom is a graphical serial terminal, like minicom. It is aimed mainly at hardware
+developers or other people who need a terminal to talk to their devices.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">cutecom</remote-id>
+ <remote-id type="github">neundorf/CuteCom</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/dgcmodem/Manifest b/net-dialup/dgcmodem/Manifest
new file mode 100644
index 000000000000..e29296ca7c01
--- /dev/null
+++ b/net-dialup/dgcmodem/Manifest
@@ -0,0 +1,5 @@
+DIST dgcmodem-1.10.tar.gz 73685 SHA256 90762bef97ac3972d76d2d0152177ea6930130e7bb3a79889511222b48dce80d SHA512 ad02fa129f87c81a853b958c1a2a267fcc2f56e083b6fbad980831a0b6f5ad7effe2977c7667eaca4553f3466950c5543d0ddc6f720dc1662aa62b2f2dd57d18 WHIRLPOOL dd24f3b8d761c1b0a8e05d780ea16b314ca9e1fe3f801027c032131d8e9e466be89c444e3bae2baeeacf73f320e4a052fbdd3d1f85ad40e7d77fb11d727d7fce
+EBUILD dgcmodem-1.10.ebuild 1628 SHA256 a017de4496200d38ce15cb76b58a338c9ef1e6921e09bedf9045ea3e1f11d944 SHA512 d2d50bb79a9f5fcb387bdc2135b2c606c11d2613e1455ae15f38141f5c3ce52baa517504a7d0557f5c8bd71f5ce178c818e9a97ae321bbef281113877b7f1702 WHIRLPOOL c821b76548fefafaf58a5040ae27cd87c59ea310e9feb074593afcdaa749e97972220d8cd04ca29aec616a7a5c6e297c5e730554f08b5797a9e04da69c5356e0
+MISC ChangeLog 2179 SHA256 4d76055d10e258fb741a35c0a98b5b4ce69cb022f082fdde29dea27d710bfd8b SHA512 4766f5ce9b851b26e28742c5528e598148588080656146f24656b5991b781e96e5085a929c3b9a777cace35062c960aaf6bee726e860642c12d20e3e4041c5ee WHIRLPOOL 9d249598dc527c10c64b6bb26462589b34a30caa0f34c67f0bc9794d576141f7fb1f8c890a3eff711520a881c06afed425dfbbbbc852b93c85a7fd5db8724d7d
+MISC ChangeLog-2015 1286 SHA256 105b123b69003ad17307e2f213805deb93ab6b3daf5912f3d877e4a447ef1db6 SHA512 438d22de178a74722fef1458986a3f3ad07ef0da2e357f1d3a80907bb30b09d4b0494b8faad3a690bd4dd6e618e1cdf6a446e6fa2cba6c2160f94b4af969e119 WHIRLPOOL 8d63a672de1974ef1d61b3f6d9bdfb8d0ec719e92d9476f48ed1c106ef48e6b2a401cd2c692a90dd6d861b919c626f470af14dac0bbc1bd21f7d666c9786533e
+MISC metadata.xml 246 SHA256 3e24bf9a254069b14bf2ff124fd414fb235ac7157fa82c1d2a3ee93287b88474 SHA512 4f7ed62ba7f03a650ba8db92de0fd24d5a5fecb9866aa28011f7bb10d13f7fcff92bae46d1b68c5d5c03fe39b45a36dc264db290c8518cb2ed77ffbca93af563 WHIRLPOOL 572f0789929b2a6d7a8b7e4f28107cd635435e5837dc505bf3b2720eb19f7feb89983a98f612bf2363cbf4c5c0d5c97c131a3f001ae9d0d66708b48728731c50
diff --git a/net-dialup/dgcmodem/dgcmodem-1.10.ebuild b/net-dialup/dgcmodem/dgcmodem-1.10.ebuild
new file mode 100644
index 000000000000..cfa447bb52a8
--- /dev/null
+++ b/net-dialup/dgcmodem/dgcmodem-1.10.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit linux-info
+
+DESCRIPTION="Driver for Connexant DGC modems"
+HOMEPAGE="http://www.linuxant.com/drivers/dgc/"
+SRC_URI="http://www.linuxant.com/drivers/dgc/archive/${P}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+DEPEND=""
+RDEPEND=""
+
+CONFIG_CHECK="~USB_ACM"
+ERROR_USB_ACM="${PN} requires USB modem (CDC ACM) support in your kernel (module name: USB_ACM)".
+
+src_compile() {
+ cd "${S}"/scripts
+ emake dgcconfig dgcdcpd dgcmodconflicts dgcstop || die "Failed to make scripts"
+}
+
+src_install() {
+ rm -f modules/GPL/COPYING
+ rm -rf modules/binaries
+ insinto /usr/lib/dgcmodem
+ doins -r modules config.mak || die "Failed to install module files"
+ fperms u+x /usr/lib/dgcmodem/modules/kernelcompiler.sh
+
+ cd "${S}"/scripts
+ dosbin dgcconfig dgcdcpd dgcmodconflicts dgcstop || die "Failed to install scripts"
+
+ echo 'KERNEL=="ttyACM0", SYMLINK="modem"' > "${D}"/etc/udev/rules.d/90-dgcmodem.rules
+
+ keepdir /etc/dgcmodem
+}
+
+pkg_postinst() {
+ ewarn "Users need to be in the uucp group to use this driver."
+ ewarn
+ ewarn "Do not set the baud rate to a value higher than 115200, or it will not work."
+ elog
+ elog "Please run:"
+ elog " emerge --config ${PN}"
+ elog "now and every time you update your kernel."
+ elog
+ elog "Note that using dgcconfig with default options may install an undesirable"
+ elog "rc script, so it is advised you always use the above command instead."
+}
+
+pkg_config(){
+ dgcconfig --kernel --serial --info
+}
+
+pkg_prerm() {
+ dgcconfig --remove
+ rm -f /etc/dgcmodem/.serial_configured
+}
diff --git a/net-dialup/dgcmodem/metadata.xml b/net-dialup/dgcmodem/metadata.xml
new file mode 100644
index 000000000000..ca3cdb362951
--- /dev/null
+++ b/net-dialup/dgcmodem/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>calchan@gentoo.org</email>
+ <name>Denis Dupeyron</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-dialup/dial/Manifest b/net-dialup/dial/Manifest
new file mode 100644
index 000000000000..d3633e029f67
--- /dev/null
+++ b/net-dialup/dial/Manifest
@@ -0,0 +1,6 @@
+AUX dial-1.2-gcc3.3.patch 512 SHA256 e48af554d6477b03fd30f712235f702c065410e3bd4e5566cb00fb332aa82042 SHA512 e2e0362186bbd27de2f19380fa46a8256afd083a809e28541a9740377f61d4712379e7204a762b6ee8a4444d832445b31d077020af06ea5d38b26f9f0e7419a4 WHIRLPOOL bb510fe1b1edfcfaaa9e06713668ec809f1402a918c533d469c3d34db679dac08b231b4a4034488efb30ad94f2a2370739e1449bd2e3b855b9fd6d0d45f18c55
+DIST dial-1.2.tar.gz 48400 SHA256 bc9827b5204f86e556c5bba88825317a68eb06df658649a79eea2c4246f2ffe8 SHA512 de24bc0c23c2e0daf305b7808a203dde97811d96c034b9a326dea3aec1a97538475a1ef56f4b4efba762c866d294e0e29dcbc16aa3779d5e74cab1aea8131957 WHIRLPOOL 106df2c4ce2b2160abd89a3aa67a424eda5f19d639342da9f9aa3d81e35e96f276293a6cd1f20544be183b3e8cc9fe27a9924c82a06877a6b9b418d57cd95d74
+EBUILD dial-1.2-r2.ebuild 379 SHA256 9f235d79e92e75dea7a9b2ac6db713fa0c8d26ca5b3146a791810166eee3f9a3 SHA512 f8724c3e21fcc8ba1c4651e3eeab46d71f277cc73a30bbee283478863ee64189dad3359bf492ab0cce95d10f48db405d5629d19feff050cb66a1c3b465653fbf WHIRLPOOL 2fb15dbd9615f76acff6bf6bf60ed4252b0d9779560997d842caaf84db77c9cb7a0d5cddf3525a3e1b4d7757b1a2ddbcab249479dcd38fa0d6fa16198eb4a616
+MISC ChangeLog 2838 SHA256 22c65892b4111d878feaea21c924e4511deadc1a370fab37641110812969ae26 SHA512 cbcda7be07813348a9cc0ea51a30a839166f83705f0ec73a174af0339af57e41fc244fcdba682120f7e837b07245be32f8f739f890ee69b5bfe3ed0b53ebc91d WHIRLPOOL a61f8be34c3d1da3469a826d94c875453d981f867a6f983ba3a21b41d5609622dceb5c3ed5e912c4ed0e234b2a4cdc2c7adde507accb72f16facd0a8daba30e8
+MISC ChangeLog-2015 1049 SHA256 d853bc837bf2ba83007d838fe643b63b32038c56ddef5ce3c8709ff671e74008 SHA512 26264fa75de9c5bad6676a89100f6fd9ed8cd65fd63462faf4d27c3fb8c5d5d40ee10ded8542490982aef4598362b915ed73efd6abdadd6f8ead2e17c0e4a92d WHIRLPOOL 73cc61858863357aa99e110b876b632ed1b66b90b86b05d72707969a9625f0fae5a02f59f8372247344b5592e92c75d29f1d8f1f757b711d166baebc114ce0e6
+MISC metadata.xml 241 SHA256 b20bb778d6932ef1b3961179fcd160174f52cfba7126bb445360c243620dfba0 SHA512 039438d314afaa5fef1f7aa3e11d5094c8fc797b0265171a55fe253c799ac95a30203284161da398554f5c73c434fd81c59b154c2d6971d2a65e752b72212f16 WHIRLPOOL 4fc1cc3a16924163abd99d4ee2363404516ceae3d814bb5ae7c5c1064c49700025a08c86a8fcbeb65aa1eb3cf83e11feaaee5cee8861e94179f406b0f50b683c
diff --git a/net-dialup/dial/dial-1.2-r2.ebuild b/net-dialup/dial/dial-1.2-r2.ebuild
new file mode 100644
index 000000000000..fef44139988a
--- /dev/null
+++ b/net-dialup/dial/dial-1.2-r2.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="A simple client for DWUN"
+HOMEPAGE="http://dwun.sourceforge.net/"
+SRC_URI="mirror://sourceforge/dwun/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="net-dialup/dwun"
+
+PATCHES=( "${FILESDIR}/${P}-gcc3.3.patch" )
diff --git a/net-dialup/dial/files/dial-1.2-gcc3.3.patch b/net-dialup/dial/files/dial-1.2-gcc3.3.patch
new file mode 100644
index 000000000000..18cacbf4916e
--- /dev/null
+++ b/net-dialup/dial/files/dial-1.2-gcc3.3.patch
@@ -0,0 +1,13 @@
+diff -ur dial-1.2.orig/src/dial.c dial-1.2/src/dial.c
+--- dial-1.2.orig/src/dial.c 2003-11-28 13:24:13.000000000 +1300
++++ dial-1.2/src/dial.c 2003-11-28 13:25:12.000000000 +1300
+@@ -162,8 +162,7 @@
+ snprintf(rcfile, MAXPATHLEN, "%s/.dialrc", home);
+ #else
+ if (strlen(home) + strlen("/.dialrc") + 1 > MAXPATHLEN) {
+- fprintf(stderr, "$HOME environment variable too
+- long\n");
++ fprintf(stderr, "$HOME environment variable too long\n");
+ return 1;
+ }
+ sprintf(rcfile, "%s/.dialrc", home);
diff --git a/net-dialup/dial/metadata.xml b/net-dialup/dial/metadata.xml
new file mode 100644
index 000000000000..98b7a1971e49
--- /dev/null
+++ b/net-dialup/dial/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">dwun</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/diald/Manifest b/net-dialup/diald/Manifest
new file mode 100644
index 000000000000..635615da2a9a
--- /dev/null
+++ b/net-dialup/diald/Manifest
@@ -0,0 +1,11 @@
+AUX diald-1.0-gentoo.patch 2833 SHA256 ace2671a8eb4a732663acf2f30f15a08109e10c0724de4d2afb2cab48f8a8c03 SHA512 0054c666b69632975421efda8c3321e9151453aee74d3e6af9d5baeddaaa8f717acd029fd050a97602c472e4da08df507ef0efa72e8f2390787f023560cb5ed0 WHIRLPOOL 5cbb3b247fbc18e5a9eb7ea9701dae3380604d59e28f119d896cffe411681f0516a58d7bcd44f81cdd4dc349132b68c18f9f78779e098aca67f4b5be8ba7ce39
+AUX diald-1.0-nopam.patch 1621 SHA256 1dd5493880a40395ea63769739fd265900f2171d1f48096070d81d44d13fdad1 SHA512 d80dd6c7882e4b938b9cc2f803d7a0f6f2d1bf108e421e0dabe774c30f177e679f2bdf2f30803cf7c78cbfa6645cb55e38963fbac3a633a067462ef3b4c33424 WHIRLPOOL e4f4f5bdf357b33f2b4b8a9a2d6a9bea20a23b801c1f99e7915bc7ace8b6bed66f218a9ff1223d96b2d272d9b16a90cb84c3b4e1bd691fc2356dab7fcecd1989
+AUX diald-1.0-posix.patch 1275 SHA256 fa2a3f830166783392f571b1f1b766718fd1583ae36148d5eb6acd3bbb92dc5d SHA512 ea2384b0de99a502b33e3d0f0e3b068ab854e8f25ad98f7d95075a8eb12b7b0d2965d19ec2ee569fd4a66f94c3f3bfd59ccce31826375642692d27818f16535d WHIRLPOOL d2469de4ed4cb786021788b9a1770087ea3b69878b1ee2fae9328481814fce6885c9721c8b4bf9e9e0ce5474de03d5a42f40bea2bcc69651acd1c70c0b3a9051
+AUX diald-init 609 SHA256 825bf653d0d04fd52097bd9d250d7c015555eafdbe61289ea2260819b63c4643 SHA512 9b7feb6ffafc72137636d9fcc6be9f196faebf0d160ccdd3e3d2c6a02577737da850529c426b4e9c0bd40fd15d73ed7cfa3a47b8c738e841410298ce58e486da WHIRLPOOL 092f9a9b9f69ee1024e9df883ba2586bafc81e5cefa9b22c697abb89465345f6d4759a17da24459e951c7611e72ee82a8afcefc9375357bfbc8ba1935b4695a3
+AUX diald.conf 884 SHA256 eab65711dd95a50aaf0dffa62fbc29c44f08a65a1ed6e1dfb312a992b62b76d4 SHA512 5ec12d52eee408f544167b87f8bf19908af4887b0c26e07775b420303869f66ef67391beda202f75bcf8d0b1dae9effcf875b2c09fbfd1d47bfd980f391badd2 WHIRLPOOL ff6d23b07e50c54d724afe8f89c5b1e14be9b5eea384695fb2d372aebec1d794ae9c9569fe13f40aa743404ef2288a777a1254a4c9860035b9a6ba0bcef4ee17
+AUX diald.filter 4532 SHA256 dad1dccfe307e57849b4b15808c76f9bd60af403bea35f243763c3234569d46d SHA512 0eb435d4cccb685b930d5601c05f21dd13b3ec3c58a9d48d04ecc8895a9ed5b3568a6187e2baa303bda587b4182f8db1322f90d50692f41fbfe7e21f9f54df68 WHIRLPOOL 81f4fe22b19fde62d507f90d6d34cadf0ce4f9571fa12c103fe8af2bbdf9ac994cb981fb4a6b9634ce34096fe4cc50373af7da696abc69da5cc3cd0f7543859e
+DIST diald-1.0.tar.gz 199698 SHA256 dd7630811006ad0f49512de9f2fa6705e50fb475c5bb12e2dde77e198a863bd0 SHA512 e9429e63b70f06801fafcb325630bf86775835df386799b003d85df691fdd2fe8cda261735c4d9baf2663ece6e369bd51a0f6c5031e62d4870b3253a1c49ce25 WHIRLPOOL 5dd0e5c18d1094bb2789dd70a4a8037319a10087675cf322ab0e09beda193ffd340d441a1e69fe35583500d25de90093409616f0cd1d2d0d0fdd68c07afa2447
+EBUILD diald-1.0-r3.ebuild 1380 SHA256 ddddf2663ebf9afdee40157748e15057567dc55142c78942ddf810743391c68a SHA512 01a503fc569839ce92fa0d204048597fb11a19e81af46e3cd531e6f1e250c07dbdd80ab684342f166002c4e9a9a399cf569f2b5ddfb88c6040ba187db86a7c57 WHIRLPOOL d050a3e01d5c440815db6ea5cc103dc8e5a84f586f9871f64d7c325384f0ca6999a1b60ed9c750d29b9862015b509f3483b696e3cc6d62b208754cad441e4ecc
+MISC ChangeLog 2869 SHA256 73d8370fa393066aa8431543582bfb85884b65f9ee44a3e8aaad3a814bb54cbd SHA512 c0ce3810ca09bbfdcb90fc02ccf90d5d5f5bc91eb429b8caa610b0bd092aa1c6704b2634e7706ab1cc998a18fc0c768ae825aa10088c5bc1a47a1579379fc2d7 WHIRLPOOL e5e73afeaafa6e01724942e4f3f90980b0c6d931b5fa313ea445c1d33cf5a0990cdc040d63ab8fa0b7113164309f7e09b253bc7a72d658c1cf89bb968d620335
+MISC ChangeLog-2015 2180 SHA256 386ee3eb929b0a29a505a48b9fee1749d5fd6eba09ed5d8a6c3e566f7c2db1b2 SHA512 1d03b19e310c8706d1635a788affc48d4c3cbcd019a34f0c994e7cdd8e8be2ce1edfc5fb784ae415727f2ec193d4d06cbb92fca86a6728f40ad740ebb55387cd WHIRLPOOL a1b62762ed69e808aa474b5758354c49ac6302b092281dbb2900587dd9ff4621eaaf4f7bf3cfa2b94031f56d8372bb78d44d9ba1928a36cd69768e7709538a33
+MISC metadata.xml 403 SHA256 75aa824c2e0874ce99cf8dbead6295ce99a2b7a2f1cb28f93af214165b8521ce SHA512 40d961035107b6bd8ab81e48597e83ea91e6f2edf9ee2773c0312105a731e51f2e026c2d852234d9a1fde3574e39830a459c2c6cd0eb1bc155e8f658d9b70434 WHIRLPOOL 0738e14847f9925ac108e34914b99fc4e604acc67b2398f3dfc4cd446ce9e2a8b08e4945e7155b2af327feac4c42db06d5277b24d39f756f8449a070b0695bbb
diff --git a/net-dialup/diald/diald-1.0-r3.ebuild b/net-dialup/diald/diald-1.0-r3.ebuild
new file mode 100644
index 000000000000..46729a5be186
--- /dev/null
+++ b/net-dialup/diald/diald-1.0-r3.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools pam
+
+DESCRIPTION="Daemon that provides on demand IP links via SLIP or PPP"
+HOMEPAGE="http://diald.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="Old-MIT GPL-2" # GPL-2 only for init script
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE="pam"
+
+DEPEND="pam? ( virtual/pam )
+ sys-apps/tcp-wrappers"
+RDEPEND="${DEPEND}
+ net-dialup/ppp"
+
+src_prepare() {
+ eapply "${FILESDIR}/${P}-posix.patch"
+ eapply "${FILESDIR}/${P}-gentoo.patch"
+ if ! use pam; then
+ eapply "${FILESDIR}/${P}-nopam.patch"
+ rm "${S}"/README.pam
+ cd "${S}"
+ eautoconf
+ fi
+ eapply_user
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ sysconfdir=/etc \
+ bindir=/usr/bin \
+ sbindir=/usr/sbin \
+ mandir=/usr/share/man \
+ libdir=/usr/lib/diald \
+ BINGRP=root \
+ ROOTUID=root \
+ ROOTGRP=root \
+ install
+ use pam && pamd_mimic_system diald auth account
+
+ dodir /var/cache/diald
+ mknod -m 0660 "${D}/var/cache/diald/diald.ctl" p
+
+ dodoc BUGS CHANGES NOTES README* \
+ THANKS TODO TODO.budget doc/diald-faq.txt
+ docinto setup ; cp -pPR setup/* "${D}/usr/share/doc/${PF}/setup"
+ docinto contrib ; cp -pPR contrib/* "${D}/usr/share/doc/${PF}/contrib"
+
+ insinto /etc/diald ; doins "${FILESDIR}"/{diald.conf,diald.filter}
+ newinitd "${FILESDIR}/diald-init" diald
+}
diff --git a/net-dialup/diald/files/diald-1.0-gentoo.patch b/net-dialup/diald/files/diald-1.0-gentoo.patch
new file mode 100644
index 000000000000..0e6f538ef76c
--- /dev/null
+++ b/net-dialup/diald/files/diald-1.0-gentoo.patch
@@ -0,0 +1,50 @@
+diff -Nru diald-1.0.orig/Makefile.in diald-1.0/Makefile.in
+--- diald-1.0.orig/Makefile.in 2008-04-13 21:09:37.000000000 +0300
++++ diald-1.0/Makefile.in 2008-04-13 21:11:17.000000000 +0300
+@@ -21,9 +21,13 @@
+ mandir = @mandir@
+
+
++ROOTUID = root
++ROOTGRP = root
++BINGRP = bin
++
+ CC = @CC@
+ CFLAGS = @CFLAGS@ @DEFS@ -I$(srcdir) \
+- -DDIALD_CONFIG_FILE=\"@sysconfdir@/diald.conf\" \
++ -DDIALD_CONFIG_FILE=\"@sysconfdir@/diald/diald.conf\" \
+ -DDIALD_DEFS_FILE=\"@libdir@/diald/diald.defs\" \
+ -DRUN_PREFIX=\"@localstatedir@/run\"
+ INSTALL = @INSTALL@
+@@ -51,21 +55,19 @@
+ $(INSTALL) -d $(DESTDIR)$(bindir)
+ $(INSTALL) -m 0755 bin/dctrl $(DESTDIR)$(bindir)/dctrl
+ $(INSTALL) -d $(DESTDIR)$(sbindir)
+- $(INSTALL) -s -o root -g bin diald $(DESTDIR)$(sbindir)/diald
++ $(INSTALL) -o $(ROOTUID) -g $(BINGRP) diald $(DESTDIR)$(sbindir)/diald
+ $(INSTALL) -d $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 \
+ $(DESTDIR)$(mandir)/man8
+- $(INSTALL) -o root -g bin -m 0644 doc/diald.man $(DESTDIR)$(mandir)/man8/diald.8
+- $(INSTALL) -o root -g bin -m 0644 doc/dctrl.man $(DESTDIR)$(mandir)/man1/dctrl.1
+- $(INSTALL) -o root -g bin -m 0644 doc/diald-examples.man $(DESTDIR)$(mandir)/man5/diald-examples.5
+- $(INSTALL) -o root -g bin -m 0644 doc/diald-control.man $(DESTDIR)$(mandir)/man5/diald-control.5
+- $(INSTALL) -o root -g bin -m 0644 doc/diald-monitor.man $(DESTDIR)$(mandir)/man5/diald-monitor.5
++ $(INSTALL) -o $(ROOTUID) -g $(BINGRP) -m 0644 doc/diald.man $(DESTDIR)$(mandir)/man8/diald.8
++ $(INSTALL) -o $(ROOTUID) -g $(BINGRP) -m 0644 doc/dctrl.man $(DESTDIR)$(mandir)/man1/dctrl.1
++ $(INSTALL) -o $(ROOTUID) -g $(BINGRP) -m 0644 doc/diald-examples.man $(DESTDIR)$(mandir)/man5/diald-examples.5
++ $(INSTALL) -o $(ROOTUID) -g $(BINGRP) -m 0644 doc/diald-control.man $(DESTDIR)$(mandir)/man5/diald-control.5
++ $(INSTALL) -o $(ROOTUID) -g $(BINGRP) -m 0644 doc/diald-monitor.man $(DESTDIR)$(mandir)/man5/diald-monitor.5
+ -mkdir -p $(DESTDIR)$(libdir)
+- $(INSTALL) -o root -g bin lib/*.gif $(DESTDIR)$(libdir)
+- $(INSTALL) -o root -g bin -m 0644 config/diald.defs $(DESTDIR)$(libdir)/diald.defs
+- $(INSTALL) -o root -g bin -m 0644 config/standard.filter $(DESTDIR)$(libdir)/standard.filter
+- $(INSTALL) -d -m 0755 $(DESTDIR)/etc/pam.d
+- $(INSTALL) -o root -g root -m 0644 config/diald.pam $(DESTDIR)/$(sysconfdir)/pam.d/diald
+- $(INSTALL) -o root -g bin bin/connect $(DESTDIR)$(libdir)/connect
++ $(INSTALL) -o $(ROOTUID) -g $(BINGRP) lib/*.gif $(DESTDIR)$(libdir)
++ $(INSTALL) -o $(ROOTUID) -g $(BINGRP) -m 0644 config/diald.defs $(DESTDIR)$(libdir)/diald.defs
++ $(INSTALL) -o $(ROOTUID) -g $(BINGRP) -m 0644 config/standard.filter $(DESTDIR)$(libdir)/standard.filter
++ $(INSTALL) -o $(ROOTUID) -g $(BINGRP) bin/connect $(DESTDIR)$(libdir)/connect
+
+ clean:
+ rm -f *.o diald
diff --git a/net-dialup/diald/files/diald-1.0-nopam.patch b/net-dialup/diald/files/diald-1.0-nopam.patch
new file mode 100644
index 000000000000..7fb78b5631a2
--- /dev/null
+++ b/net-dialup/diald/files/diald-1.0-nopam.patch
@@ -0,0 +1,40 @@
+diff -Nru diald-1.0.orig/configure.in diald-1.0/configure.in
+--- diald-1.0.orig/configure.in 2001-06-16 19:01:25.000000000 +0300
++++ diald-1.0/configure.in 2007-07-12 09:56:35.000000000 +0300
+@@ -10,7 +10,6 @@
+ dnl Checks for libraries.
+ AC_CHECK_LIB(dl, dlsym)
+ AC_CHECK_LIB(nsl, nis_add)
+-AC_CHECK_LIB(pam, pam_start)
+ AC_CHECK_LIB(wrap, request_init)
+ AC_CHECK_LIB(util, openpty)
+
+diff -Nru diald-1.0.orig/doc/diald-control.man diald-1.0/doc/diald-control.man
+--- diald-1.0.orig/doc/diald-control.man 2001-06-15 18:38:20.000000000 +0300
++++ diald-1.0/doc/diald-control.man 2007-07-12 09:55:59.000000000 +0300
+@@ -65,10 +65,6 @@
+ TCP connections.
+ If \fI<method>\fR is "simple" then a single following
+ string specifies the name of the privileges to request.
+-If \fI<method>\fR is "pam" then the two following strings specify
+-the UNIX username and password to be authenticated using PAM
+-(Pluggable Authentication Modules). Privileges are then given
+-according to group membership.
+ .TP
+ .B block
+ Block diald from making outgoing calls until a unblock command is issued.
+diff -Nru diald-1.0.orig/doc/diald.man diald-1.0/doc/diald.man
+--- diald-1.0.orig/doc/diald.man 2001-06-15 18:38:20.000000000 +0300
++++ diald-1.0/doc/diald.man 2007-07-12 09:54:37.000000000 +0300
+@@ -184,11 +184,6 @@
+ (very simple...) for TCP monitor connections.
+
+ .TP
+-.B authpam \fI<file>\fR
+-Specifies the name of a file to be used for PAM authentication
+-(not so simple...) for TCP monitor connections.
+-
+-.TP
+ .B scheduler \fI<class>\fR
+ Set diald's scheduling class. Valid choices for systems that
+ support POSIX scheduling classes are:
diff --git a/net-dialup/diald/files/diald-1.0-posix.patch b/net-dialup/diald/files/diald-1.0-posix.patch
new file mode 100644
index 000000000000..3ff13ab9bdbc
--- /dev/null
+++ b/net-dialup/diald/files/diald-1.0-posix.patch
@@ -0,0 +1,42 @@
+diff -Nru diald-1.0.orig/diald.h diald-1.0/diald.h
+--- diald-1.0.orig/diald.h 2001-06-16 19:01:25.000000000 +0300
++++ diald-1.0/diald.h 2006-09-21 15:58:57.000000000 +0300
+@@ -31,6 +31,10 @@
+ #if HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ #endif
++#include <time.h>
++#ifndef CLK_TCK
++# define CLK_TCK (CLOCKS_PER_SEC)
++#endif
+ #ifdef _POSIX_PRIORITY_SCHEDULING
+ # include <sched.h>
+ #endif
+diff -Nru diald-1.0.orig/firewall.c diald-1.0/firewall.c
+--- diald-1.0.orig/firewall.c 2006-09-21 16:08:18.000000000 +0300
++++ diald-1.0/firewall.c 2006-09-21 15:49:12.000000000 +0300
+@@ -69,7 +69,7 @@
+ #if 0
+ mon_syslog(LOG_DEBUG,"slot def: %d %d %x %x %x",
+ slot->start, slot->end, slot->wday, slot->mday, slot->month);
+-#endif 0
++#endif
+ if ((slot->start <= ctime)
+ && (ctime <= slot->end)
+ && (slot->wday & (1<<ltime->tm_wday))
+diff -Nru diald-1.0.orig/log.c diald-1.0/log.c
+--- diald-1.0.orig/log.c 2001-06-16 22:51:39.000000000 +0300
++++ diald-1.0/log.c 2006-09-21 16:05:11.000000000 +0300
+@@ -19,10 +19,8 @@
+ xstrerror(int n)
+ {
+ static char buf[30];
+-
+- if (n >= 0 && n < sys_nerr)
+- return (char *)sys_errlist[n];
+- sprintf(buf, "Error code %d\n", n);
++ if (strerror_r(n, buf, 30) != 0)
++ sprintf(buf, "Error code %d\n", n);
+ return buf;
+ }
+
diff --git a/net-dialup/diald/files/diald-init b/net-dialup/diald/files/diald-init
new file mode 100644
index 000000000000..fe0ea59c3204
--- /dev/null
+++ b/net-dialup/diald/files/diald-init
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /etc/diald/diald.conf ] ; then
+ eerror "You need an /etc/diald/diald.conf file first"
+ eerror "There is a sample in /usr/share/doc/diald"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting diald"
+ start-stop-daemon --start --quiet --exec /usr/sbin/diald \
+ -- -f /etc/diald/diald.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping diald"
+ start-stop-daemon --stop --quiet --pidfile /var/run/diald.pid
+ eend $?
+}
diff --git a/net-dialup/diald/files/diald.conf b/net-dialup/diald/files/diald.conf
new file mode 100644
index 000000000000..9bbda2aa59a4
--- /dev/null
+++ b/net-dialup/diald/files/diald.conf
@@ -0,0 +1,38 @@
+# sample diald.conf
+
+# if Internet Access Type is modem
+# ---------begin-section----------
+mode ppp
+connect "/usr/sbin/chat -v -f /etc/network-scripts/chat-ppp0"
+device /dev/modem
+speed 115200
+modem
+lock
+crtscts
+# ---------end-section------------
+#
+
+# if Internet Access Type is ISDN
+# ---------begin-section----------
+# mode dev
+# connect "/bin/sh /etc/network-scripts/net_cnx_up"
+# disconnect "/bin/sh /etc/network-scripts/net_cnx_down"
+# device ippp0
+# ---------end-section------------
+
+local 10.0.0.2
+remote 10.0.0.3
+dynamic
+defaultroute
+connect-timeout 90
+redial-timeout 10
+retry-count 3
+include /etc/diald/diald.filter
+fifo /var/cache/diald/diald.ctl
+#
+# you can start any script when interface up or down
+# sample with bastille
+# ---------begin-section----------
+#ip-up /sbin/bastille-firewall-reset
+#ip-down /sbin/bastille-firewall-reset
+# ---------end-section------------
diff --git a/net-dialup/diald/files/diald.filter b/net-dialup/diald/files/diald.filter
new file mode 100644
index 000000000000..461e4f7d5be2
--- /dev/null
+++ b/net-dialup/diald/files/diald.filter
@@ -0,0 +1,138 @@
+# sample diald.filter
+#
+# connect policy during office hours on weekdays
+restrict 8:00:00 17:59:59 1-5 * *
+
+# connect policy outside office hours on weekdays
+#restrict * 7:59:59 1-5 * *
+#or-restrict 18:00:00 * 1-5 * *
+
+# connect policy during the weekend
+#restrict * * 0,6 * *
+
+# always connected
+up
+
+# always down
+# down
+
+
+#------------------------------------------------------------------------------
+# Rules for TCP packets.
+#------------------------------------------------------------------------------
+
+# If we force the line up (for example to trigger fetchmail)
+# but no packets are sent, specify how long to hold the line
+# up:
+# here :everything else gets 30 minutes.
+
+first-packet-timeout 30
+
+# The first rule is designed to give the link 30 seconds up time
+# when we are initiating a TCP connection. The idea here is to deal
+# with possibility that the network on the opposite end of the
+# connection is unreachable. In this case you don't really want to
+# give the link 10 minutes up time. With the rule below we only give
+# the link 30 seconds initially. If the network is reachable then
+# we will normally get a response that actually contains some data
+# within 30 seconds. If this causes problems because you have a
+# slow response time at some site you want to regularly access, you
+# can either increase the timeout or remove this rule.
+
+accept tcp 30 tcp.syn
+
+# If you are running named, then it will send data across the link
+# periodically to synchronize against other domain name servers.
+# Since this can happen at any time, it is undesirable to keep the
+# link up for it. Therefore, we ignore any tcp traffic from or to a
+# domain name server.
+
+ignore tcp tcp.dest=tcp.domain
+ignore tcp tcp.source=tcp.domain
+
+# Normally the packet that starts a connection is longer that 40
+# bytes, since it normally contains TCP options to specify the MSS.
+# However, some TCP implementations don't include these options.
+# Therefore, we must be careful not to ignore SYN packets that are
+# only 40 bytes long.
+
+accept tcp 30 ip.tot_len=40,tcp.syn
+
+# Otherwise, we want to ignore any TCP packet that is only 40 bytes
+# long, since it is not carrying any data. However, we don't want to
+# ignore 40 byte packets that mark the closing of a connection,
+# since we use those to cut short the timeout on connections that
+# have died. Therefore we must test the tcp.live flag here. If it
+# is not set we might want to see this packet later on in the rules.
+
+ignore tcp ip.tot_len=40,tcp.live
+
+# Make sure http transfers hold the link up, even after they end.
+# This prevents web browsers from bouncing the connection too much.
+#
+# HTTP transfers get 3 minutes
+accept tcp 180 tcp.dest=tcp.www
+accept tcp 180 tcp.source=tcp.www
+
+
+# Once the link is no longer live, we try to shut down the
+# connection quickly. Note that if the link is already down, the
+# closing of the a connection (which will generate traffic) will not
+# bring it back up.
+
+# here :everything else gets 30 minutes.
+keepup tcp 30 !tcp.live
+ignore tcp !tcp.live
+
+# Finally, if we don't match the TCP packet somewhere above, then we
+# give the link 10 minutes up time. Most TCP packets match this
+# rule. Note that as soon as the TCP connection is closed, the keepup
+# rule above overwrites the timeout.
+
+accept tcp 600 any
+
+#------------------------------------------------------------------------------
+# Rules for UDP packets
+#------------------------------------------------------------------------------
+
+# Don't bring the link up for rwho:
+
+ignore udp udp.dest=udp.who
+ignore udp udp.source=udp.who
+
+# Don't bring the link up for routing packets:
+
+ignore udp udp.dest=udp.router
+ignore udp udp.source=udp.router
+
+# Don't bring the link up for NTP or timed:
+
+ignore udp udp.dest=udp.ntp
+ignore udp udp.source=udp.ntp
+ignore udp udp.dest=udp.timed
+ignore udp udp.source=udp.timed
+
+# Don't bring up on domain name requests between two running copies of named:
+
+ignore udp udp.dest=udp.domain,udp.source=udp.domain
+
+# Bring up the network for domain requests:
+
+accept udp 30 udp.dest=udp.domain
+accept udp 30 udp.source=udp.domain
+
+# Bring up the network for netbios requests, except between netbios servers:
+
+ignore udp udp.source=udp.netbios-ns,udp.dest=udp.netbios-ns
+accept udp 30 udp.dest=udp.netbios-ns
+accept udp 30 udp.source=udp.netbios-ns
+
+# Any other UDP packets:
+
+# here :everything else gets 30 minutes.
+accept udp 30 any
+
+# Catch any packets that we didn't catch above:
+
+# here :everything else gets 30 minutes.
+accept any 30 any
diff --git a/net-dialup/diald/metadata.xml b/net-dialup/diald/metadata.xml
new file mode 100644
index 000000000000..3de69495b62b
--- /dev/null
+++ b/net-dialup/diald/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-needed -->
+ <longdescription>Diald is an intelligent link management tool originally named
+for its ability to control dial-on-demand network connections</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">diald</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/dwun/Manifest b/net-dialup/dwun/Manifest
new file mode 100644
index 000000000000..bc8f0e659292
--- /dev/null
+++ b/net-dialup/dwun/Manifest
@@ -0,0 +1,6 @@
+AUX dwun 432 SHA256 e094cdfb49d8f88263dca0ee950f62870e7791974f33170c972cc28d512553ed SHA512 daef582f4ecac47ddc826976eb1d1b97f06664c584b9501dd72068749a8724ac06a3780bb0fee2c84307db4d343b05b1a8663d05fb56a9a52a31c28939208d2c WHIRLPOOL 5ac5673ea79cec0744e29375661e832524ea35945718db5af61abffc00aa96f6b9bc9a2a9fa7b38fa9f5d2219122781d052add601ae8fea08b1cf23600ef1c6e
+DIST dwun-0.96e.tar.gz 147960 SHA256 43aafb4e3dcb9f0aebe54661e880e04f8764da23539621beead29bcaf618d887 SHA512 6763acd60192f18ffd81edd4f4e18ccfb8c5ac3882db96f9b7d2d032e9a0c61cb843094222744525a9927981c8cc7a603fd0aa1e1d4309d3f7fab21fec028115 WHIRLPOOL 81a102494a9a2279bfae3e7ef8609869dbe9076fef5be60ca90f8bd0dce32f4a424ea4e779560fcb7f1d88722272e44fa112fb641e1b367de8883c59197814db
+EBUILD dwun-0.96e-r4.ebuild 1024 SHA256 3d2238082fdf7240d85ef452bb97c694ba2d38bc8e6ecd7b152eb7a62eee7113 SHA512 b6f1e05a74b4ec0b0cf53984af06cef4df5082125f9954c99ec6a23ebc236c765f33fa35bfb1e2955520cd5f5a3a678b53b7f2dbfefd6b48f15f637ff63c0daf WHIRLPOOL 0bf1393b1a22b4501997943e1a65c11ba886659ee586b230c6b2d5aa9b5f0c9bd6c2959f3b0f14a4f4c1a340e7899536f21ef991d9075e65f60e0a4e87aa2c9c
+MISC ChangeLog 2878 SHA256 3ef064ed3bc70911894155f0910439e1c89c7dacb422294a23fd925485064cf2 SHA512 99a40cec7d4e5e4293f7bc38753f0d344c449cfb9416e903ced130ce5b5ebc5e1a95bf698f4e8f9cdd42650847af9a78f2c3d6b7619d06d6306f67c2e8e95371 WHIRLPOOL 8c8bed08422f40402049ea97fc973624659a2ebadb2d3085276c21246398e86f8921e8737c9229c2ee7f748e2b9722136432ed22d70a41667d5f5381ffd59a3d
+MISC ChangeLog-2015 1738 SHA256 a44ff69f3b3a32068719c39d0c39e7a8346917093cf1882e26266237c4daeb0e SHA512 4ea039a4c3f4235611fa6b2786d79a48edf46651759dbe693fbf32b86760c589e65930e6b7c0e6e7cf54e79416be2d456f2f413e6f843b87f17f66103e3806ed WHIRLPOOL a78337718a1be91a6797b2394a9e59ed4b9fbdd6e3251acebedb435b0351025d77cc5eb6e3c1d78883f13cb4e976eaaed7f080c8480c6470038e7f104f64a111
+MISC metadata.xml 241 SHA256 b20bb778d6932ef1b3961179fcd160174f52cfba7126bb445360c243620dfba0 SHA512 039438d314afaa5fef1f7aa3e11d5094c8fc797b0265171a55fe253c799ac95a30203284161da398554f5c73c434fd81c59b154c2d6971d2a65e752b72212f16 WHIRLPOOL 4fc1cc3a16924163abd99d4ee2363404516ceae3d814bb5ae7c5c1064c49700025a08c86a8fcbeb65aa1eb3cf83e11feaaee5cee8861e94179f406b0f50b683c
diff --git a/net-dialup/dwun/dwun-0.96e-r4.ebuild b/net-dialup/dwun/dwun-0.96e-r4.ebuild
new file mode 100644
index 000000000000..fbc86601b416
--- /dev/null
+++ b/net-dialup/dwun/dwun-0.96e-r4.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Dialer Without a Useful Name (DWUN)"
+HOMEPAGE="http://dwun.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="MIT GPL-2" # GPL-2 only for init script
+SLOT="0"
+KEYWORDS="~amd64 x86"
+
+DOCS=( AUTHORS ChangeLog QUICKSTART README TODO UPGRADING )
+
+src_prepare() {
+ sed -i -e "s:TODO QUICKSTART README UPGRADING ChangeLog COPYING AUTHORS::" Makefile.in || die
+ tc-export CC
+
+ eapply_user
+}
+
+src_configure() {
+ econf --with-docdir="share/doc/${PF}"
+}
+
+src_install() {
+ default
+
+ insinto /etc
+ newins doc/examples/complete-rcfile dwunrc
+ newins debian/dwunauth dwunauth
+ newinitd "${FILESDIR}/dwun" dwun
+}
+
+pkg_postinst() {
+ elog
+ elog 'Make sure you have "net-dialup/ppp" merged if you intend to use dwun'
+ elog "to control a standard PPP network link."
+ elog "See /usr/share/doc/${P}/QUICKSTART for instructions on"
+ elog "configuring dwun."
+ elog
+}
diff --git a/net-dialup/dwun/files/dwun b/net-dialup/dwun/files/dwun
new file mode 100644
index 000000000000..8584844fa1fb
--- /dev/null
+++ b/net-dialup/dwun/files/dwun
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+DAEMON=/usr/sbin/dwun
+PIDFILE="/run/${SVCNAME}.pid"
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --pidfile ${PIDFILE} --startas ${DAEMON}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --signal 1 --pidfile ${PIDFILE}
+ eend $?
+}
diff --git a/net-dialup/dwun/metadata.xml b/net-dialup/dwun/metadata.xml
new file mode 100644
index 000000000000..98b7a1971e49
--- /dev/null
+++ b/net-dialup/dwun/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">dwun</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/fbgetty/Manifest b/net-dialup/fbgetty/Manifest
new file mode 100644
index 000000000000..1d0371604bb9
--- /dev/null
+++ b/net-dialup/fbgetty/Manifest
@@ -0,0 +1,6 @@
+AUX fbgetty-0.1.698-gcc41.patch 2549 SHA256 b23e7fda7900a380b8fc1015ca126715624bf1192622e9d9856ac8d44b44ebde SHA512 a53e5f9e2880362d023d6fc017bd49d519c25ea3395f606f5dafccc52a72d80e18bf6cd345a732733e4f252c9e5fddbbf02dd63a2d4c6ee808073fc895be5a9f WHIRLPOOL b7ec0d4935b1229a98790d077617d41674a80f38f66caa5ab6f206ce42c50fc74ea7bf9c9e6369539783b34fcb31b0cff06070b7e14f83216391e8d2556a63b8
+DIST fbgetty-0.1.698.tar.gz 279751 SHA256 332cbffa7c489b39a7d13d12d581c27dfc57ba098041431a6845b44785cf2d35 SHA512 942304ac00ecfaad59419a0994331e59d91269ee015e3bd38faa85db0b205e6e88e1958b65e503f59b81f050a1e110aeea6534eecb3ba010096a6b5173fd1ac5 WHIRLPOOL a2a6cfd2c1cadc60e941922229cfd642f054a3221fb95dad2d63f4d44f8ebd7268fc7761b36d926b591433e4e9da3e4ea49dee6ba499ee2dfb446232c960cd37
+EBUILD fbgetty-0.1.698-r1.ebuild 577 SHA256 cf5847f642742276931b3d06708d1884911f6de8ed208b7f5b13cf9fc2a15efb SHA512 86dace92cff3f9b81a5880fa0d175003335e00b4385cf685322e8e9fc49be3eac3ef9f386be16fab4ff8072bc9b143b421db7670799b06e7470e1de958485e64 WHIRLPOOL 2076ae840fd6d62eb84b26465381088cc36d4a81455aeb2b4e008173fa99da27b387255d24da88fa0978755be4c39bf4e35d75848d6a1cd3d68fa35e39aed0b0
+MISC ChangeLog 2506 SHA256 b8a9f06c84f831d9492efafc116e4eddbce7d04af26800b113f539c94f51a944 SHA512 43a79e0c9e4b92d7d834249fc2721566a99c73ddf66c22f79853236db88cf67fae5f71eca3c37b2cbd4cdd35aefdcb54d754bbf491dd0c69af9b88f453378a1a WHIRLPOOL e946eece3a84a7f5f8e5ef955edbba7f4ce74f0916cd04133f65d0541ba1c7e62cea043a840376f820a92d01c2385cc819a352106a4392e95d8e19a97e78bc6c
+MISC ChangeLog-2015 1505 SHA256 034f6622b1eafef0a3b81b36b216daa20b51008b97e69cbc41eafe9982efb7f1 SHA512 018d8e12923e26cecb04f2be1a9fffc2a2f5b734a7e283eeeff0e07e43e9b17276972ad6e52c599810ef682040242323a10522d2b834820392a970aef59a38bb WHIRLPOOL e7c6ee0b30ff6b3b22308c8a653760daf195c2eb29b53b3c66a512582980a75e9f100dc0ba56ca1cb2b0281ba97b8bd76e3e5ed8e83ea59a69f24df2d7fb584b
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/net-dialup/fbgetty/fbgetty-0.1.698-r1.ebuild b/net-dialup/fbgetty/fbgetty-0.1.698-r1.ebuild
new file mode 100644
index 000000000000..ad131bc4778c
--- /dev/null
+++ b/net-dialup/fbgetty/fbgetty-0.1.698-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="An extended getty for the framebuffer console"
+HOMEPAGE="http://projects.meuh.org/fbgetty/"
+SRC_URI="http://projects.meuh.org/${PN}/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-gcc41.patch"
+
+ epatch_user
+}
+
+src_install() {
+ default
+
+ docompress -x "/usr/share/doc/${PF}/examples"
+ insinto "/usr/share/doc/${PF}/examples"
+ doins examples/{issue.*,inittab.*}
+}
diff --git a/net-dialup/fbgetty/files/fbgetty-0.1.698-gcc41.patch b/net-dialup/fbgetty/files/fbgetty-0.1.698-gcc41.patch
new file mode 100644
index 000000000000..a9722f12c115
--- /dev/null
+++ b/net-dialup/fbgetty/files/fbgetty-0.1.698-gcc41.patch
@@ -0,0 +1,64 @@
+diff -Nru fbgetty-0.1.698.orig/include/fbgetty/generated/fgoptions.awk fbgetty-0.1.698/include/fbgetty/generated/fgoptions.awk
+--- fbgetty-0.1.698.orig/include/fbgetty/generated/fgoptions.awk 2001-07-11 23:01:15.000000000 +0300
++++ fbgetty-0.1.698/include/fbgetty/generated/fgoptions.awk 2007-10-27 11:29:50.000000000 +0300
+@@ -45,8 +45,7 @@
+ name = $3;
+ type = $2;
+
+- printf("#define OFFSET_%s (offsetof(struct fbgetty_options_t, %s))\n", name, name);
+- printf(" %s %s;\n\n", type, name);
++ printf(" %s %s;\n", type, name);
+ }
+
+ END {
+diff -Nru fbgetty-0.1.698.orig/src/options.c fbgetty-0.1.698/src/options.c
+--- fbgetty-0.1.698.orig/src/options.c 2001-12-17 22:55:42.000000000 +0200
++++ fbgetty-0.1.698/src/options.c 2007-10-27 11:32:53.000000000 +0300
+@@ -27,7 +27,7 @@
+ */
+
+ #include <fbgetty/global.h>
+-
++#include <stddef.h>
+
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -141,7 +141,7 @@
+ #define ENV_BINARY 0x04
+ #define ENV_LEDS 0x08
+
+-#define ENV_ENTRY(name, type, ptr) { name, type, OFFSET_ ## ptr }
++#define ENV_ENTRY(name, type, ptr) { name, type, offsetof(struct fbgetty_options_t, ptr) }
+
+ static struct env_entry
+ {
+@@ -899,20 +899,20 @@
+ }
+ merge_option_list[] =
+ {
+- { OFFSET_tty_device , MERGE_STR, NULL, -1 },
++ { offsetof(struct fbgetty_options_t, tty_device) , MERGE_STR, NULL, -1 },
+ #ifdef USE_FRAME_BUFFER
+- { OFFSET_fb_device, MERGE_STR, NULL, -1 },
++ { offsetof(struct fbgetty_options_t, fb_device), MERGE_STR, NULL, -1 },
+ #endif
+
+- { OFFSET_login_program, MERGE_STR, LOGIN_PROGRAM, -1 },
+- { OFFSET_login_prompt, MERGE_STR, LOGIN_PROMPT, -1 },
+- { OFFSET_issue_filename, MERGE_STR, ISSUE_FILE, -1 },
++ { offsetof(struct fbgetty_options_t, login_program), MERGE_STR, LOGIN_PROGRAM, -1 },
++ { offsetof(struct fbgetty_options_t, login_prompt), MERGE_STR, LOGIN_PROMPT, -1 },
++ { offsetof(struct fbgetty_options_t, issue_filename), MERGE_STR, ISSUE_FILE, -1 },
+
+- { OFFSET_login_timeout, MERGE_INT, NULL, LOGIN_TIMEOUT },
+- { OFFSET_issue_refresh, MERGE_INT, NULL, ISSUE_REFRESH },
+- { OFFSET_screen_clear, MERGE_INT, NULL, TRUE },
++ { offsetof(struct fbgetty_options_t, login_timeout), MERGE_INT, NULL, LOGIN_TIMEOUT },
++ { offsetof(struct fbgetty_options_t, issue_refresh), MERGE_INT, NULL, ISSUE_REFRESH },
++ { offsetof(struct fbgetty_options_t, screen_clear), MERGE_INT, NULL, TRUE },
+
+- { OFFSET_leds, MERGE_INT, NULL, 0 },
++ { offsetof(struct fbgetty_options_t, leds), MERGE_INT, NULL, 0 },
+ { 0, 0, NULL, -1 }
+ };
+
diff --git a/net-dialup/fbgetty/metadata.xml b/net-dialup/fbgetty/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/net-dialup/fbgetty/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/net-dialup/freeradius-client/Manifest b/net-dialup/freeradius-client/Manifest
new file mode 100644
index 000000000000..eb754f5ffe34
--- /dev/null
+++ b/net-dialup/freeradius-client/Manifest
@@ -0,0 +1,5 @@
+DIST freeradius-client-1.1.7.tar.gz 433141 SHA256 eada2861b8f4928e3ac6b5bbfe11e92cd6cdcacfce40cae1085e77c1b6add0e9 SHA512 20e79ec97da79f46b334e1c2880803a692885a4038196a4d016094d349f675e2d0521d921140c5ab06703008619417f7a20d3e90cdfc7b3578faccbd232be0ce WHIRLPOOL f8c9f2875bb6bf8ba3ccb45bdc75f30a1708ee5a4966d48c533827400a417c440bf6ba3a356f774ef9d450b78ac1728737ed30932ceb1e1e4ff225876724ea11
+EBUILD freeradius-client-1.1.7.ebuild 832 SHA256 2a76b4ab967cd2bae7c22aa58082d9116a13514e5c613907ba4fe194ada5e987 SHA512 a87fccdba0390dc047527dbd111110c1d0fbbeb57ac0fa53b8c41a92517e747ee11326fa61d4c22f2eef8b34a79217cb2e750e4d065ddeae7001fc04880dc448 WHIRLPOOL 8b9c9869b1db2311f410b287843fbdad4764e96154f52a6a1bed1ea01275c52df18a480956905368f886140255170ee2e96da5cd697cf633942e78adea78b940
+MISC ChangeLog 5257 SHA256 5eea6d97c27493beff34b2fd6851d7896a875c8ed9167cb8ca16e9d4b0e2f032 SHA512 dc7e650c9dcba742dd283f6d25fc13fe33efce00bb357aa9c9432b4bf31d6ddaefcd30b20e0b67d00333f02138ecf8c6c78d19dc23f254ec5774f67be0f3e24c WHIRLPOOL 1d203d1b3b41cbd6bbd30a7dadcfd133ac6629d9f3084525050ff2168f6adf9a1f869a6f4aee75c173e6a1b376703041a0fc2261e6c6a6000dc9b730dc4ce5a8
+MISC ChangeLog-2015 623 SHA256 bcf41b5abc5c5c163086053cacb8fb7747dfa2e00444193c6a463fadc4bee5e5 SHA512 4ff4c427d1cbc2784b0b7f0c17f6d2354e47313d58e6df15b7f9d932a250097ea6aa042cb7d91758abed004037a70560c1269e0216ebad49f71437e6fb00db25 WHIRLPOOL a4721b8aeb597a028558d6cc14fc8a2c609da2c0c89e2a0572732cb6ee24bf6cefdec556bb6a855e652aaace7bdedbde03632fcacfcc9a964d6ff134f93f4ef3
+MISC metadata.xml 711 SHA256 03b0d1651186c92d6f9ef6df577a85abcd8326d4f75477d2722da90410d8c65f SHA512 9e0758dd57ba13e42d5517aba8c7a6a6f5ede66f0fc6fa62a2a361ab7ba03058032b6a998f93ee24d3ce3050f3757694d8d088c6e09754cfc0652c2b857ef3cc WHIRLPOOL 2dbd7f10e72e661e3af7d4dedceb0862e0e97dd6f835d9af37ab5c22784d9a894b4a901ad19def6110c39c7f7b2aa38df416a6c2d7bebb0fa6799f2ee0f7bf51
diff --git a/net-dialup/freeradius-client/freeradius-client-1.1.7.ebuild b/net-dialup/freeradius-client/freeradius-client-1.1.7.ebuild
new file mode 100644
index 000000000000..905a44c7d187
--- /dev/null
+++ b/net-dialup/freeradius-client/freeradius-client-1.1.7.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit autotools-utils
+
+DESCRIPTION="FreeRADIUS Client framework"
+HOMEPAGE="http://wiki.freeradius.org/Radiusclient"
+SRC_URI="ftp://ftp.freeradius.org/pub/freeradius/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86"
+
+IUSE="scp shadow static-libs"
+
+DEPEND="!net-dialup/radiusclient
+ !net-dialup/radiusclient-ng"
+RDEPEND="${DEPEND}"
+
+DOCS=( BUGS doc/ChangeLog doc/login.example doc/release-method.txt )
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable scp)
+ $(use_enable shadow)
+ --with-secure-path
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+ dodoc README*
+ newdoc doc/README README.login.example
+ dohtml doc/instop.html
+}
diff --git a/net-dialup/freeradius-client/metadata.xml b/net-dialup/freeradius-client/metadata.xml
new file mode 100644
index 000000000000..2a085401d81d
--- /dev/null
+++ b/net-dialup/freeradius-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>
+<!-- maintainer-needed -->
+<longdescription>FreeRADIUS Client is a framework and library for writing
+RADIUS Clients which additionally includes radlogin, a flexible RADIUS
+aware login replacement, a command line program to send RADIUS accounting
+records, a utility allowing to send RADIUS AAA requests from command
+line or from shell scripts and a utility to query the status of a (Merit)
+RADIUS server.</longdescription>
+<use>
+ <flag name="scp">Add service type hints derived from username
+ prefix</flag>
+ <flag name="shadow">Enable shadow password support</flag>
+</use>
+</pkgmetadata>
diff --git a/net-dialup/freeradius/Manifest b/net-dialup/freeradius/Manifest
new file mode 100644
index 000000000000..8eaef42de2a6
--- /dev/null
+++ b/net-dialup/freeradius/Manifest
@@ -0,0 +1,11 @@
+AUX freeradius.service 392 SHA256 046224fcc38c2c11ca93f19aee9121f205f5d9ee227daa8c6a63d0fc570a6b2a SHA512 c2e153f0e8543758dff81835b17c6221ca031fc66f17828b6380d40501c8b6f6ed7e33096218e44326f731245c24386427bb3c9eda48ac185b67104fc878b692 WHIRLPOOL e8e003333df3da12e02af694898e7202d9a4e8d01bf8a2b6e2f7ce0413defe48eb6c807face2f6ab737080585efea3f5b70be2f0be809493676e13a482641838
+AUX freeradius.tmpfiles 36 SHA256 26abcb6b7ad588ca7dfb1dabc40eb921873094fd67bdbecfddbcfe93e810be4a SHA512 cf364cd860588318d49089946739bb30a6259a5aa7977c768155449fbb495473fe24c1ddccc75dc822e25b1f0d404589d7606590fd2018cc6503dd2767463a7c WHIRLPOOL 5945a06d8415016e970201d53d82cb500587916ac21d8ee77e09c71c6799ab3f949345ca0b91f2f02a5b19110ccda6656afc5391e4d4d1af56de2e0deaa2039e
+AUX radius.conf-r4 465 SHA256 5090c25d84dc1f6bb8176d421c2acc600e9e42bf28707cc96607ca9429953180 SHA512 4142869fb61b2938232002c9cb5b843590785560da7db4f2b2a9c9d55c76d0e2d4a6cb946a5347dfa505cd82f5e86c7315cf71f3443a86632090cf4bd025748a WHIRLPOOL a172ab14fb78ad7b5b2240f0a97c1189ca894ada93703daea6be668ae6353bb051f43aeab40eb2fe803b6144662c08359595abce2a65493cea06ae5029706c20
+AUX radius.init-r3 734 SHA256 4636601eb84a42a159de05664325ce0e92c25e250448cd47108f5f20a5ab7755 SHA512 826fd3fd576b09e7e590095b1ac63dfaec587a3b46ae1ccdec68134264fb689827aea4a446522bc2a253b9885469b6788a3dddc466ad47483dd62ef67262de49 WHIRLPOOL 28f4e6f04b0a88baba36ee97025c1851cddd19ddbdd0e5957670aa25bd220e11c45d88047ab608898d792c9af829e8059d27db70cd6fa2191172ad76ed86ed21
+DIST freeradius-server-3.0.14.tar.gz 4816144 SHA256 fcd6174d986a942db7a0defbccf6ffb6e692264a87915659493abb466c075909 SHA512 5f81f09a843bf59b16ed4c9c311013e3e839911ed926c56151502a00bb86cc3a593906059ec08b994cfbc4c36d1bc6005d62c5d253ddb5cc3894324c4aaeb308 WHIRLPOOL f679bd442ffc43fe6535a29e345290efa46837f2b31e5789920b9844b01a874ccc2bec6466bf99c6f60c587926a58cd537d4817def16fa89411ead9200c4a1e3
+DIST freeradius-server-3.0.15.tar.gz 4818244 SHA256 fd29c5eda3f69f2d823d07745d24a80197df3c1284f2efe6a15f76e16271cfe3 SHA512 9b92045b445032bde9d421499fdc0f6a08d602c501730c31a8d3974b21cc5c12c78abb024ed62a176c7aa7fe260fe1d19386aaf558e0fecfcd3a0ba7aa47499c WHIRLPOOL 102719d62417870bad1c698d3e999cf3829397f8b310c898d7cbb551a44bdbf302dd9e4e2610287c281318930f057446f20b3f994c56ceeadf0864795c92a5d0
+EBUILD freeradius-3.0.14.ebuild 5929 SHA256 cdbdfac23937a26e6132415072277a2038b0aff386007136b575c8cf1fbc2017 SHA512 83bbdab55422dab609dab2d5d1ffc4727655690df7682740b1c4a60362c56ca34a6014ea38a981b4f4359613ad594252ec28fc64ca721028b3ec88e3d64c7ace WHIRLPOOL b31005e14c0e5d423f339fc59b6ece9ae6918b290a1c16688a6f5139985d80096aa2dc27af95a5cb122d69868f54ceda2ebd17df965604d25368d3ed4b9d2556
+EBUILD freeradius-3.0.15.ebuild 5931 SHA256 6e52a774dc2adc1e852cc0934bda6a1cfe20e9ad5d85740258d081a02973ef9e SHA512 ca6c0e8674a5daf1310b7e70c000651826d7472a33c0782e28196ad9835382878f1371c8f37f91be97ff14783aeec5572310a6e122a600d2218169931775e13b WHIRLPOOL 34e10b30ee5cc2c62a51997383eaa774d2a797a303f78ea381c76a2bd4dc7d8b0d3544d0e6a0ce03682d38de2d8ac1cf495863076de573e98509260cb55cf621
+MISC ChangeLog 7183 SHA256 bfaf4489bff01de20397fb8268920d0886182adb0aaf44925783ef4cc58a0454 SHA512 b803848821bdee1908c17c322fff0896e842cdbecb3ba3f7cf6528dab31300e231457afa6027c2d5268dac87b7d29442e73cc81ea462bbe687014cf668390c2c WHIRLPOOL 9a66f729ef07d7b619d31443b7d8bfe36cfd0335e9f0ac2a574ebbb886a2ebad33899fc5dc0ecaf568ea80c3b34def8cb644e93905cd99dd31d21e1d69e89cdd
+MISC ChangeLog-2015 28265 SHA256 bebaacc4b68b52c055ba6d19030606cac47a0aae7328b83acc574fa1250e7223 SHA512 4303e8aa36161e358c4fc4f6c6e4d4e44c33a1ede0810928591319e570f4b95d0190f7c36122f4e28a124bc40802c9c4d88ce03913bba6b4572de0e47ba32812 WHIRLPOOL 6ffa9d991348ca09a98ff5b429e90a6591682624cd74e357965d1bed030290a90725b13ee91e0ac0a7ddab512294eb39462a7ee4edeaac0e7b7609427042ef42
+MISC metadata.xml 295 SHA256 4b4b7537cf0d9c8772a80b4ed187f66343fd0415f8d1bcea0fbe9aae3cdc122e SHA512 4f6cbe1b6931f4d672943e6cbb8e82dc66af63245027d4c1b791697bc492f8a9cc1dfe937fc59fc19f03713293458b27fc721d9b9a6bf43d2938d09a91ca4fbc WHIRLPOOL 58e18dc2c755d8f7fea97600d9e7e1f3b1710c6424d3177b8521eda12a2a70cf2734a4b8ac2ed2d0ccc46cba7d17bc90a7238010799f9987ea7be8fb1a9cdc1f
diff --git a/net-dialup/freeradius/files/freeradius.service b/net-dialup/freeradius/files/freeradius.service
new file mode 100644
index 000000000000..5304f076119b
--- /dev/null
+++ b/net-dialup/freeradius/files/freeradius.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=FreeRADIUS high performance RADIUS server.
+After=syslog.target network.target
+
+[Service]
+Type=simple
+PIDFile=/run/radiusd/radiusd.pid
+ExecStartPre=-/bin/chown -R radius.radius /run/radiusd
+ExecStartPre=/usr/sbin/radiusd -C
+ExecStart=/usr/sbin/radiusd -d /etc/raddb -f
+ExecReload=/usr/sbin/radiusd -C
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dialup/freeradius/files/freeradius.tmpfiles b/net-dialup/freeradius/files/freeradius.tmpfiles
new file mode 100644
index 000000000000..21620c97706d
--- /dev/null
+++ b/net-dialup/freeradius/files/freeradius.tmpfiles
@@ -0,0 +1 @@
+d /run/radiusd 0755 radius radius -
diff --git a/net-dialup/freeradius/files/radius.conf-r4 b/net-dialup/freeradius/files/radius.conf-r4
new file mode 100644
index 000000000000..a5760d29f7b9
--- /dev/null
+++ b/net-dialup/freeradius/files/radius.conf-r4
@@ -0,0 +1,16 @@
+# Config file for /etc/init.d/radiusd
+
+# see man pages for radiusd run `radiusd -h`
+# for valid cmdline options
+#RADIUSD_OPTS=""
+
+# Change this value if you change it in /etc/raddb/radiusd.conf
+pidfile=/var/run/radiusd/radiusd.pid
+
+# Change these values if you change them in /etc/raddb/radiusd.conf
+RADIUSD_USER=radius
+RADIUSD_GROUP=radius
+
+# If you set up logging to syslog in /etc/raddb/radiusd.conf, you want
+# to uncomment the following line.
+#rc_use="logger"
diff --git a/net-dialup/freeradius/files/radius.init-r3 b/net-dialup/freeradius/files/radius.init-r3
new file mode 100644
index 000000000000..9c16ac59b41e
--- /dev/null
+++ b/net-dialup/freeradius/files/radius.init-r3
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command=/usr/sbin/radiusd
+command_args="${RADIUSD_OPTS}"
+pidfile="${pidfile:-/run/radiusd/radiusd.pid}"
+extra_started_commands="reload"
+
+depend() {
+ need localmount
+ use dns
+}
+
+start_pre() {
+ if [ ! -f /etc/raddb/radiusd.conf ] ; then
+ eerror "No /etc/raddb/radiusd.conf file exists!"
+ return 1
+ fi
+
+ checkpath -m0750 -o "${RADIUSD_USER:-root}:${RADIUSD_GROUP:-root}" -d \
+ $(dirname ${pidfile}) /var/log/radius
+ checkpath -m0750 -o "${RADIUSD_USER:-root}:${RADIUSD_GROUP:-root}" -d \
+ $(dirname ${pidfile}) /run/radiusd
+}
+
+reload() {
+ ebegin "Reloading radiusd"
+ kill -HUP $(cat ${pidfile})
+ eend $?
+}
diff --git a/net-dialup/freeradius/freeradius-3.0.14.ebuild b/net-dialup/freeradius/freeradius-3.0.14.ebuild
new file mode 100644
index 000000000000..e42fc8e30526
--- /dev/null
+++ b/net-dialup/freeradius/freeradius-3.0.14.ebuild
@@ -0,0 +1,225 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+inherit autotools pam python-single-r1 systemd user
+
+MY_P="${PN}-server-${PV}"
+
+DESCRIPTION="Highly configurable free RADIUS server"
+SRC_URI="
+ ftp://ftp.freeradius.org/pub/radius/${MY_P}.tar.gz
+ ftp://ftp.freeradius.org/pub/radius/old/${MY_P}.tar.gz
+"
+HOMEPAGE="http://www.freeradius.org/"
+
+KEYWORDS="amd64 ~arm ~ppc ~ppc64 ~sparc x86 ~x86-fbsd"
+LICENSE="GPL-2"
+SLOT="0"
+
+IUSE="
+ debug firebird iodbc kerberos ldap mysql odbc oracle pam pcap
+ postgres python readline sqlite ssl
+"
+RESTRICT="test firebird? ( bindist )"
+
+RDEPEND="!net-dialup/cistronradius
+ !net-dialup/gnuradius
+ sys-devel/libtool
+ dev-lang/perl:=
+ sys-libs/gdbm
+ sys-libs/talloc
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:0= )
+ pcap? ( net-libs/libpcap )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:= )
+ firebird? ( dev-db/firebird )
+ pam? ( virtual/pam )
+ ssl? ( dev-libs/openssl:0= )
+ ldap? ( net-nds/openldap )
+ kerberos? ( virtual/krb5 )
+ sqlite? ( dev-db/sqlite:3 )
+ odbc? ( dev-db/unixODBC )
+ iodbc? ( dev-db/libiodbc )
+ oracle? ( dev-db/oracle-instantclient-basic )"
+DEPEND="${RDEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup radius
+ enewuser radius -1 -1 /var/log/radius radius
+
+ python-single-r1_pkg_setup
+ export PYTHONBIN="${EPYTHON}"
+}
+
+src_prepare() {
+ # most of the configuration options do not appear as ./configure
+ # switches. Instead it identifies the directories that are available
+ # and run through them. These might check for the presence of
+ # various libraries, in which case they are not built. To avoid
+ # automagic dependencies, we just remove all the modules that we're
+ # not interested in using.
+
+ use ssl || { rm -r src/modules/rlm_eap/types/rlm_eap_{tls,ttls,peap} || die ; }
+ use ldap || { rm -r src/modules/rlm_ldap || die ; }
+ use kerberos || { rm -r src/modules/rlm_krb5 || die ; }
+ use pam || { rm -r src/modules/rlm_pam || die ; }
+ use python || { rm -r src/modules/rlm_python || die ; }
+ # Do not install ruby rlm module, bug #483108
+ rm -r src/modules/rlm_ruby || die
+
+ # these are all things we don't have in portage/I don't want to deal
+ # with myself
+ rm -r src/modules/rlm_eap/types/rlm_eap_tnc || die # requires TNCS library
+ rm -r src/modules/rlm_eap/types/rlm_eap_ikev2 || die # requires libeap-ikev2
+ rm -r src/modules/rlm_opendirectory || die # requires some membership.h
+ rm -r src/modules/rlm_redis{,who} || die # requires redis
+ rm -r src/modules/rlm_sql/drivers/rlm_sql_{db2,freetds} || die
+
+ # sql drivers that are not part of experimental are loaded from a
+ # file, so we have to remove them from the file itself when we
+ # remove them.
+ usesqldriver() {
+ local flag=$1
+ local driver=rlm_sql_${2:-${flag}}
+
+ if ! use ${flag}; then
+ rm -r src/modules/rlm_sql/drivers/${driver} || die
+ sed -i -e /${driver}/d src/modules/rlm_sql/stable || die
+ fi
+ }
+
+ sed -i \
+ -e 's:^#\tuser = :\tuser = :g' \
+ -e 's:^#\tgroup = :\tgroup = :g' \
+ -e 's:/var/run/radiusd:/run/radiusd:g' \
+ -e '/^run_dir/s:${localstatedir}::g' \
+ raddb/radiusd.conf.in || die
+
+ # verbosity
+ # build shared libraries using jlibtool --shared
+ sed -i \
+ -e '/$(LIBTOOL)/s|--quiet ||g' \
+ -e 's:--mode=\(compile\|link\):& --shared:g' \
+ Make.inc.in || die
+
+ sed -i \
+ -e 's|--silent ||g' \
+ -e 's:--mode=\(compile\|link\):& --shared:g' \
+ scripts/libtool.mk || die
+
+ # crude measure to stop jlibtool from running ranlib and ar
+ sed -i \
+ -e '/LIBRARIAN/s|".*"|"true"|g' \
+ -e '/RANLIB/s|".*"|"true"|g' \
+ scripts/jlibtool.c || die
+
+ usesqldriver mysql
+ usesqldriver postgres postgresql
+ usesqldriver firebird
+ usesqldriver iodbc
+ usesqldriver odbc unixodbc
+ usesqldriver oracle
+ usesqldriver sqlite
+
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ # fix bug #77613
+ local myeconfargs=()
+ if has_version app-crypt/heimdal; then
+ myeconfargs+=( --enable-heimdal-krb5 )
+ fi
+
+ use readline || export ac_cv_lib_readline=no
+ use pcap || export ac_cv_lib_pcap_pcap_open_live=no
+
+ # do not try to enable static with static-libs; upstream is a
+ # massacre of libtool best practices so you also have to make sure
+ # to --enable-shared explicitly.
+ myeconfargs+=(
+ --enable-shared
+ --disable-static
+ --disable-ltdl-install
+ --with-system-libtool
+ --with-system-libltdl
+ --with-ascend-binary
+ --with-udpfromto
+ --with-dhcp
+ --with-iodbc-include-dir=/usr/include/iodbc
+ --with-experimental-modules
+ --with-docdir=/usr/share/doc/${PF}
+ --with-logdir=/var/log/radius
+ $(use_enable debug developer)
+ $(use_with ldap edir)
+ $(use_with ssl openssl)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ # verbose, do not generate certificates
+ emake \
+ Q='' ECHO=true \
+ LOCAL_CERT_PRODUCTS=''
+}
+
+src_install() {
+ dodir /etc
+ diropts -m0750 -o root -g radius
+ dodir /etc/raddb
+ diropts -m0750 -o radius -g radius
+ dodir /var/log/radius
+ keepdir /var/log/radius/radacct
+ diropts
+
+ # verbose, do not install certificates
+ # Parallel install fails (#509498)
+ emake -j1 \
+ Q='' ECHO=true \
+ LOCAL_CERT_PRODUCTS='' \
+ R="${D}" \
+ install
+
+ fowners -R root:radius /etc/raddb
+
+ pamd_mimic_system radiusd auth account password session
+
+ dodoc CREDITS
+
+ rm "${D}/usr/sbin/rc.radiusd" || die
+
+ newinitd "${FILESDIR}/radius.init-r3" radiusd
+ newconfd "${FILESDIR}/radius.conf-r4" radiusd
+
+ systemd_newtmpfilesd "${FILESDIR}"/freeradius.tmpfiles freeradius.conf
+ systemd_dounit "${FILESDIR}"/freeradius.service
+
+ find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die
+}
+
+pkg_config() {
+ if use ssl; then
+ cd "${ROOT}"/etc/raddb/certs
+ ./bootstrap
+
+ chown -R root:radius "${ROOT}"/etc/raddb/certs
+ fi
+}
+
+pkg_preinst() {
+ if ! has_version ${CATEGORY}/${PN} && use ssl; then
+ elog "You have to run \`emerge --config =${CATEGORY}/${PF}\` to be able"
+ elog "to start the radiusd service."
+ fi
+}
diff --git a/net-dialup/freeradius/freeradius-3.0.15.ebuild b/net-dialup/freeradius/freeradius-3.0.15.ebuild
new file mode 100644
index 000000000000..e5c5443ca3c3
--- /dev/null
+++ b/net-dialup/freeradius/freeradius-3.0.15.ebuild
@@ -0,0 +1,225 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+inherit autotools pam python-single-r1 systemd user
+
+MY_P="${PN}-server-${PV}"
+
+DESCRIPTION="Highly configurable free RADIUS server"
+SRC_URI="
+ ftp://ftp.freeradius.org/pub/radius/${MY_P}.tar.gz
+ ftp://ftp.freeradius.org/pub/radius/old/${MY_P}.tar.gz
+"
+HOMEPAGE="http://www.freeradius.org/"
+
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+LICENSE="GPL-2"
+SLOT="0"
+
+IUSE="
+ debug firebird iodbc kerberos ldap mysql odbc oracle pam pcap
+ postgres python readline sqlite ssl
+"
+RESTRICT="test firebird? ( bindist )"
+
+RDEPEND="!net-dialup/cistronradius
+ !net-dialup/gnuradius
+ sys-devel/libtool
+ dev-lang/perl:=
+ sys-libs/gdbm
+ sys-libs/talloc
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:0= )
+ pcap? ( net-libs/libpcap )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql:= )
+ firebird? ( dev-db/firebird )
+ pam? ( virtual/pam )
+ ssl? ( dev-libs/openssl:0= )
+ ldap? ( net-nds/openldap )
+ kerberos? ( virtual/krb5 )
+ sqlite? ( dev-db/sqlite:3 )
+ odbc? ( dev-db/unixODBC )
+ iodbc? ( dev-db/libiodbc )
+ oracle? ( dev-db/oracle-instantclient-basic )"
+DEPEND="${RDEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup radius
+ enewuser radius -1 -1 /var/log/radius radius
+
+ python-single-r1_pkg_setup
+ export PYTHONBIN="${EPYTHON}"
+}
+
+src_prepare() {
+ # most of the configuration options do not appear as ./configure
+ # switches. Instead it identifies the directories that are available
+ # and run through them. These might check for the presence of
+ # various libraries, in which case they are not built. To avoid
+ # automagic dependencies, we just remove all the modules that we're
+ # not interested in using.
+
+ use ssl || { rm -r src/modules/rlm_eap/types/rlm_eap_{tls,ttls,peap} || die ; }
+ use ldap || { rm -r src/modules/rlm_ldap || die ; }
+ use kerberos || { rm -r src/modules/rlm_krb5 || die ; }
+ use pam || { rm -r src/modules/rlm_pam || die ; }
+ use python || { rm -r src/modules/rlm_python || die ; }
+ # Do not install ruby rlm module, bug #483108
+ rm -r src/modules/rlm_ruby || die
+
+ # these are all things we don't have in portage/I don't want to deal
+ # with myself
+ rm -r src/modules/rlm_eap/types/rlm_eap_tnc || die # requires TNCS library
+ rm -r src/modules/rlm_eap/types/rlm_eap_ikev2 || die # requires libeap-ikev2
+ rm -r src/modules/rlm_opendirectory || die # requires some membership.h
+ rm -r src/modules/rlm_redis{,who} || die # requires redis
+ rm -r src/modules/rlm_sql/drivers/rlm_sql_{db2,freetds} || die
+
+ # sql drivers that are not part of experimental are loaded from a
+ # file, so we have to remove them from the file itself when we
+ # remove them.
+ usesqldriver() {
+ local flag=$1
+ local driver=rlm_sql_${2:-${flag}}
+
+ if ! use ${flag}; then
+ rm -r src/modules/rlm_sql/drivers/${driver} || die
+ sed -i -e /${driver}/d src/modules/rlm_sql/stable || die
+ fi
+ }
+
+ sed -i \
+ -e 's:^#\tuser = :\tuser = :g' \
+ -e 's:^#\tgroup = :\tgroup = :g' \
+ -e 's:/var/run/radiusd:/run/radiusd:g' \
+ -e '/^run_dir/s:${localstatedir}::g' \
+ raddb/radiusd.conf.in || die
+
+ # verbosity
+ # build shared libraries using jlibtool --shared
+ sed -i \
+ -e '/$(LIBTOOL)/s|--quiet ||g' \
+ -e 's:--mode=\(compile\|link\):& --shared:g' \
+ Make.inc.in || die
+
+ sed -i \
+ -e 's|--silent ||g' \
+ -e 's:--mode=\(compile\|link\):& --shared:g' \
+ scripts/libtool.mk || die
+
+ # crude measure to stop jlibtool from running ranlib and ar
+ sed -i \
+ -e '/LIBRARIAN/s|".*"|"true"|g' \
+ -e '/RANLIB/s|".*"|"true"|g' \
+ scripts/jlibtool.c || die
+
+ usesqldriver mysql
+ usesqldriver postgres postgresql
+ usesqldriver firebird
+ usesqldriver iodbc
+ usesqldriver odbc unixodbc
+ usesqldriver oracle
+ usesqldriver sqlite
+
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ # fix bug #77613
+ local myeconfargs=()
+ if has_version app-crypt/heimdal; then
+ myeconfargs+=( --enable-heimdal-krb5 )
+ fi
+
+ use readline || export ac_cv_lib_readline=no
+ use pcap || export ac_cv_lib_pcap_pcap_open_live=no
+
+ # do not try to enable static with static-libs; upstream is a
+ # massacre of libtool best practices so you also have to make sure
+ # to --enable-shared explicitly.
+ myeconfargs+=(
+ --enable-shared
+ --disable-static
+ --disable-ltdl-install
+ --with-system-libtool
+ --with-system-libltdl
+ --with-ascend-binary
+ --with-udpfromto
+ --with-dhcp
+ --with-iodbc-include-dir=/usr/include/iodbc
+ --with-experimental-modules
+ --with-docdir=/usr/share/doc/${PF}
+ --with-logdir=/var/log/radius
+ $(use_enable debug developer)
+ $(use_with ldap edir)
+ $(use_with ssl openssl)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ # verbose, do not generate certificates
+ emake \
+ Q='' ECHO=true \
+ LOCAL_CERT_PRODUCTS=''
+}
+
+src_install() {
+ dodir /etc
+ diropts -m0750 -o root -g radius
+ dodir /etc/raddb
+ diropts -m0750 -o radius -g radius
+ dodir /var/log/radius
+ keepdir /var/log/radius/radacct
+ diropts
+
+ # verbose, do not install certificates
+ # Parallel install fails (#509498)
+ emake -j1 \
+ Q='' ECHO=true \
+ LOCAL_CERT_PRODUCTS='' \
+ R="${D}" \
+ install
+
+ fowners -R root:radius /etc/raddb
+
+ pamd_mimic_system radiusd auth account password session
+
+ dodoc CREDITS
+
+ rm "${D}/usr/sbin/rc.radiusd" || die
+
+ newinitd "${FILESDIR}/radius.init-r3" radiusd
+ newconfd "${FILESDIR}/radius.conf-r4" radiusd
+
+ systemd_newtmpfilesd "${FILESDIR}"/freeradius.tmpfiles freeradius.conf
+ systemd_dounit "${FILESDIR}"/freeradius.service
+
+ find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die
+}
+
+pkg_config() {
+ if use ssl; then
+ cd "${ROOT}"/etc/raddb/certs
+ ./bootstrap
+
+ chown -R root:radius "${ROOT}"/etc/raddb/certs
+ fi
+}
+
+pkg_preinst() {
+ if ! has_version ${CATEGORY}/${PN} && use ssl; then
+ elog "You have to run \`emerge --config =${CATEGORY}/${PF}\` to be able"
+ elog "to start the radiusd service."
+ fi
+}
diff --git a/net-dialup/freeradius/metadata.xml b/net-dialup/freeradius/metadata.xml
new file mode 100644
index 000000000000..fa9540c73dc9
--- /dev/null
+++ b/net-dialup/freeradius/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-needed -->
+ <use>
+ <flag name="pcap">
+ Build the RADIUS sniffer which requires <pkg>net-libs/libpcap</pkg>.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/net-dialup/globespan-adsl/Manifest b/net-dialup/globespan-adsl/Manifest
new file mode 100644
index 000000000000..b6175f202c9c
--- /dev/null
+++ b/net-dialup/globespan-adsl/Manifest
@@ -0,0 +1,10 @@
+AUX globespan-adsl-0.11-pagesize.patch 669 SHA256 291e4a33108b0d2cd78d1fe2725210c668d8e982e442c99366ab4e872379b890 SHA512 b767da78fcd4f482076449c23ecd8dc9be8ef672a6c7d6b0dfa666fe834aab1d0c31ad84dd46359178583131ce800b3e40af8aa66a66f65a0857ad31ff5d3ac2 WHIRLPOOL bbe9ddfbbcef11d7f806e7090e32716d3923613111b6174266a29d0eae98db6e879a49261ce390e8edfaa95679fb729135cabdcd6b67fdd5fb4f1561419266a5
+AUX globespan-adsl-0.11-synch.patch 2283 SHA256 77667877afed9bcabe5d45ea460eb7e92d6df92cb77f49799f8817fd4fb3e003 SHA512 ddc571f4d3d0ccf2e0978c28a47cec94332823dfc8bb9cb127b3ff70a166f3464d4fdf7a5a02c4e13593630414c40cf36c378e58285ad8d59bdb69b01b4fdac2 WHIRLPOOL 1b1f4f7d392f12305ecca6d0fc2cbe4a86592decc04febbe94f8943cae8d8bfa43676d3b9f227b27d90a710249f293c67b22a8eda00a86c4d79a9a659e9b988c
+AUX globespan-adsl-0.12-pagesize.patch 756 SHA256 4b0853f5a6a0dd24b30d6dbfca275406368ad8b8625b06aab778757ffe5485db SHA512 2bfb5a8706d2f5276d4c0818eadafd19f7f06ab42c07dc767aba9f0c356c9e72cf42f51c7cc9a3c559a1a13a8082c6eb6156a3d5d6dec5979df99e577d9d156a WHIRLPOOL 9f84eccf7b9e0ca3285425ea8e28a42e37e98212cfa326e631c125b49df0c15516471c1ec415e8fd1d0be5ca1988bea15cf94302d6d1840b25b22ea28eb20058
+DIST eciadsl-usermode-0.11.tar.gz 323391 SHA256 2382f315fda4241a0043bac1dfc669f006d8e93e87fa382b263b1672972f4077 SHA512 4ac8f537538a5e1d93158bfb51810e331a684b424ad44cd3fa880dcfb3c2a3167900c29bc0b8762a30b3b565b08c64aca7446ac5d66ec4ee00ad706ea71d2dd7 WHIRLPOOL 0838b13b0a3197e77593530149ef45034c37e5fcce7cd5ae23019e3cdf7087aa41227f7f6a4587e77f8e2aab8d69e6d2ddd618684827b754e99c986b8f115709
+DIST eciadsl-usermode-0.12.tar.gz 338548 SHA256 7159b80bb2ad6185c1d3eb183777ad54af2d0e40d735fc9f4dda9d16276c2947 SHA512 6f16d0ec0fecb133ff0057607324415aa6a6580e72d9950379a2307b77900651c101be1e762aed18fc3343935c7bb35085a51672f839c52d22d9493a41c4354d WHIRLPOOL 6e74072e2bb76ca0f83641f9587596fa0fa2eccdac1a5570c85346c6f01a8a230ff0952bcb70661c3c71ce351ca7eef46f96ee9e03d057e626ae5e5ee9b36aa7
+EBUILD globespan-adsl-0.11-r1.ebuild 1259 SHA256 c4902887f1f35548498d74813ab6defcee6356396b442ca9a9a0b68721d00adf SHA512 638fc65dbf2cd9b95cf2a0af0530d32e64653695eb7eeb8c254d4dd5bc1e2bbe4473e40b79c2170ff19cf97c993b63be5f9877b184deb8feda676851043b3bff WHIRLPOOL 35dea6e9e5fba5028252b3bcf2334a1bca6024ab42ba7daca9be0f0c356a42efe987a8540997d4374f3c8e29319a046b610d45de415878742761bb8ffb38ad6e
+EBUILD globespan-adsl-0.12.ebuild 1097 SHA256 82a03ded70aed6e9b668618ffe084f52781eb00449dd52499d520b889f99095a SHA512 f919a7237fda90f42a2575c10f401151c979819df9a1049768d9391d7cb617e3ef98f235fd6d92d84fa1e0a01af700acc35ca57274a935abb751bc0f6660e73c WHIRLPOOL 8749a2d4bf6887827d6c7d2e3110b260a42a68016121a62aa3276b70d25ebcd644e8b51c5af5f0f5cbcfb5e6c7cad23139452cddfcad51abdeeb602afb2857b7
+MISC ChangeLog 2679 SHA256 6ed8744f59147f032b11b4d6206fcbd5f1f02c4bd35d4e375e1fb0d2e231c979 SHA512 c77c24718c28c2886b8b7c38d7f7ede3e19fe10715f0570c22bebfd2aaffe6f5a7392f39210e1a1d7aca0ae8c0ddb4f53956e4f962ed88a34bc6fbd47d2f102e WHIRLPOOL 90dcb4994a6d18c34f02829d3aee3b7088ee9f96ddcdf5216271470eba1f09dae93b7546128c9f10fe6b7097ee1cd0616db25de49b40950ad632038156d455cc
+MISC ChangeLog-2015 4227 SHA256 6ebcb4e0955f706c4eb4e2d38938c5d75d65062750335dba5a26c49233ecff98 SHA512 81fa91d6363acc0966998552d04bc505bd3e723c6854cacfb093b6afb864e7d17221287ddb4c842541bb87377985ed6634e236445b1571c7b12d1677eb2cefb2 WHIRLPOOL 614685a02d4ac18cf56d58dcc451962bec508084bd1294ed83af98bf36a67da7b955861aa239ec4d19db99131f47f2ec20c379cb864031fbc8b50be0fdd93d8e
+MISC metadata.xml 247 SHA256 fe7eb4e436c290f4557ec9792e437d08e492349db9b5347d0cc5ffedb439ffc7 SHA512 20fb6e12a8b7ba83efda9ae4b4146674eeb64cb9c4603b2e690a3af236f8dadedc676d8c9fd1caa7aa52f62a1c3c0683c52d74ea9db35371415b9ecf4d96371d WHIRLPOOL 269e21e114146273738389575fce97af3d65ab35f9b408f19fd526be3ced2e76642437f4b15a6d9b5fb761838014f5319d3eb1d2e8e1b324667579255bc03d0b
diff --git a/net-dialup/globespan-adsl/files/globespan-adsl-0.11-pagesize.patch b/net-dialup/globespan-adsl/files/globespan-adsl-0.11-pagesize.patch
new file mode 100644
index 000000000000..dcb2141197c4
--- /dev/null
+++ b/net-dialup/globespan-adsl/files/globespan-adsl-0.11-pagesize.patch
@@ -0,0 +1,31 @@
+--- eciadsl-usermode-0.11/pusb-linux.c.orig 2007-11-24 23:05:42.000000000 +0100
++++ eciadsl-usermode-0.11/pusb-linux.c 2007-11-24 23:12:15.000000000 +0100
+@@ -29,7 +29,6 @@
+ #include <string.h>
+
+ #include "pusb-linux.h"
+-#include <asm/page.h>
+
+ struct pusb_endpoint_t
+ {
+@@ -392,13 +391,18 @@
+ {
+ struct usbdevfs_bulktransfer bulk;
+ int ret, received = 0;
++ static long pagesize = 0;
++
++ if (pagesize == 0)
++ pagesize = sysconf(_SC_PAGESIZE);
++
+
+ do
+ {
+ bulk.ep = ep;
+ bulk.len = size;
+- if (bulk.len > PAGE_SIZE)
+- bulk.len = PAGE_SIZE;
++ if (size > pagesize)
++ bulk.len = pagesize;
+ bulk.timeout = timeout;
+ bulk.data = buf;
+
diff --git a/net-dialup/globespan-adsl/files/globespan-adsl-0.11-synch.patch b/net-dialup/globespan-adsl/files/globespan-adsl-0.11-synch.patch
new file mode 100644
index 000000000000..344ec3ddbd28
--- /dev/null
+++ b/net-dialup/globespan-adsl/files/globespan-adsl-0.11-synch.patch
@@ -0,0 +1,85 @@
+diff --git a/eciadsl-synch.c b/eciadsl-synch.c
+index 27c1f34..31c51dc 100644
+--- a/eciadsl-synch.c
++++ b/eciadsl-synch.c
+@@ -322,7 +322,7 @@ void read_endpoint(pusb_endpoint_t ep_int, int epnum){
+ device. So we revert to the old behaviour : NO TIMEOUTS ...
+ */
+
+- ret = pusb_endpoint_read(ep_int, lbuf, sizeof(lbuf), 0);
++ ret = pusb_endpoint_read_int(ep_int, lbuf, sizeof(lbuf));
+
+ if (ret < 0)
+ {
+diff --git a/pusb-linux.c b/pusb-linux.c
+index 79b7545..b5bf1dd 100644
+--- a/pusb-linux.c
++++ b/pusb-linux.c
+@@ -340,6 +340,54 @@ int pusb_endpoint_rw_no_timeout(int fd, int ep,
+ return(purb->actual_length);
+ }
+
++int pusb_endpoint_read_int_no_timeout(int fd, int ep,
++ unsigned char* buf, int size)
++{
++ struct usbdevfs_urb urb, *purb = &urb;
++ int ret;
++
++ memset(purb, 0, sizeof(urb));
++
++ purb->type = USBDEVFS_URB_TYPE_INTERRUPT;
++ purb->endpoint = ep;
++ purb->flags = 0;
++ purb->buffer = buf;
++ purb->buffer_length = size;
++ purb->signr = 0;
++
++ do
++ {
++ ret = ioctl(fd, USBDEVFS_SUBMITURB, purb);
++ }
++ while (ret < 0 && errno == EINTR);
++
++ if (ret < 0)
++ return(ret);
++
++ do
++ {
++ ret = ioctl(fd, USBDEVFS_REAPURB, &purb);
++ }
++ while (ret < 0 && errno == EINTR);
++
++ if (ret < 0)
++ return(ret);
++
++ if (purb != &urb)
++ printf("purb=%p, &urb=%p\n", (void*)purb, (void*)&urb);
++
++ if (purb->buffer != buf)
++ printf("purb->buffer=%p, buf=%p\n", (void*)purb->buffer, (void*)buf);
++
++ return(purb->actual_length);
++}
++
++int pusb_endpoint_read_int(pusb_endpoint_t ep,
++ unsigned char* buf, int size)
++{
++ return(pusb_endpoint_read_int_no_timeout(ep->fd, ep->ep|USB_DIR_IN, buf, size));
++}
++
+ int pusb_endpoint_rw(int fd, int ep, unsigned char* buf, int size, int timeout)
+ {
+ struct usbdevfs_bulktransfer bulk;
+diff --git a/pusb.h b/pusb.h
+index 921543b..112e41f 100644
+--- a/pusb.h
++++ b/pusb.h
+@@ -30,6 +30,8 @@ int pusb_release_interface(pusb_device_t dev,int interface);
+ pusb_endpoint_t pusb_endpoint_open(pusb_device_t dev, int epnum, int flags);
+ int pusb_endpoint_read(pusb_endpoint_t ep,
+ unsigned char *buf, int size, int timeout);
++int pusb_endpoint_read_int(pusb_endpoint_t ep,
++ unsigned char *buf, int size);
+ int pusb_endpoint_write(pusb_endpoint_t ep,
+ const unsigned char *buf, int size, int timeout);
+
diff --git a/net-dialup/globespan-adsl/files/globespan-adsl-0.12-pagesize.patch b/net-dialup/globespan-adsl/files/globespan-adsl-0.12-pagesize.patch
new file mode 100644
index 000000000000..efed69327251
--- /dev/null
+++ b/net-dialup/globespan-adsl/files/globespan-adsl-0.12-pagesize.patch
@@ -0,0 +1,34 @@
+diff -Nru eciadsl-usermode-0.12.orig/pusb-linux.c eciadsl-usermode-0.12/pusb-linux.c
+--- eciadsl-usermode-0.12.orig/pusb-linux.c 2007-08-25 08:41:28.000000000 +0300
++++ eciadsl-usermode-0.12/pusb-linux.c 2007-08-25 08:42:27.000000000 +0300
+@@ -29,7 +29,6 @@
+ #include <string.h>
+
+ #include "pusb-linux.h"
+-#include <asm/page.h>
+
+ #include "pusb.h"
+
+@@ -430,16 +429,20 @@
+ {
+ static struct usbdevfs_bulktransfer bulk;
+ static int ret;
++ static long pagesize = 0;
+ int received = 0;
+
++ if (pagesize == 0)
++ pagesize = sysconf(_SC_PAGESIZE);
++
+ do
+ {
+ bulk.ep = ep;
+
+ bulk.len = size;
+
+- if (size > PAGE_SIZE)
+- bulk.len = PAGE_SIZE;
++ if (size > pagesize)
++ bulk.len = pagesize;
+
+ bulk.timeout = timeout;
+ bulk.data = buf;
diff --git a/net-dialup/globespan-adsl/globespan-adsl-0.11-r1.ebuild b/net-dialup/globespan-adsl/globespan-adsl-0.11-r1.ebuild
new file mode 100644
index 000000000000..6af732cd9f0d
--- /dev/null
+++ b/net-dialup/globespan-adsl/globespan-adsl-0.11-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+MY_PN="eciadsl-usermode-${PV}"
+
+DESCRIPTION="Driver for various ADSL modems. Also known as EciAdsl"
+SRC_URI="http://eciadsl.flashtux.org/download/${MY_PN}.tar.gz"
+HOMEPAGE="http://eciadsl.flashtux.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE="tk"
+
+DEPEND="net-dialup/ppp"
+RDEPEND="${DEPEND}
+ dev-lang/perl
+ tk? ( >=dev-lang/tk-8.3.4 )"
+
+S="${WORKDIR}/${MY_PN}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-synch.patch
+ epatch "${FILESDIR}"/${P}-pagesize.patch
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+ dodoc README* TROUBLESHOOTING* ChangeLog || die "failed to install documentation"
+}
+
+pkg_postinst() {
+ elog
+ elog "Package succesfully installed you should now run "
+ elog "eciconf.sh (graphical, requires TCL/TK) or eciconftxt.sh"
+ elog
+ elog "Paquetage installé avec succés vous devriez maintenant"
+ elog "executer eciconf.sh (qui requiert TCL/TK) ou eciconftxt.sh"
+ elog
+ ewarn "Please note that if you're using a 2.6.x kernel you'll"
+ ewarn "probably need to apply a patch to fix a USB bug. See"
+ ewarn "http://eciadsl.flashtux.org/download/beta/"
+ ewarn
+}
diff --git a/net-dialup/globespan-adsl/globespan-adsl-0.12.ebuild b/net-dialup/globespan-adsl/globespan-adsl-0.12.ebuild
new file mode 100644
index 000000000000..ef699961969c
--- /dev/null
+++ b/net-dialup/globespan-adsl/globespan-adsl-0.12.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+MY_PN="eciadsl-usermode-${PV}"
+
+DESCRIPTION="Driver for various ADSL modems. Also known as EciAdsl"
+SRC_URI="http://eciadsl.flashtux.org/download/${MY_PN}.tar.gz"
+HOMEPAGE="http://eciadsl.flashtux.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-amd64 x86"
+IUSE="tk"
+
+DEPEND="net-dialup/ppp"
+RDEPEND="${DEPEND}
+ dev-lang/perl
+ tk? ( >=dev-lang/tk-8.3.4 )"
+
+S="${WORKDIR}/${MY_PN}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-pagesize.patch
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+ if ! use tk ; then
+ rm "${D}"/usr/bin/eciadsl-config-tk
+ fi
+ dodoc README* TROUBLESHOOTING* ChangeLog || die "failed to install documentation"
+}
+
+pkg_postinst() {
+ elog
+ elog "Package succesfully installed you should now run "
+ elog "eciconf.sh (graphical, requires TCL/TK) or eciconftxt.sh"
+ elog
+ elog "Paquetage installé avec succés vous devriez maintenant"
+ elog "executer eciconf.sh (qui requiert TCL/TK) ou eciconftxt.sh"
+ elog
+}
diff --git a/net-dialup/globespan-adsl/metadata.xml b/net-dialup/globespan-adsl/metadata.xml
new file mode 100644
index 000000000000..a814de526b50
--- /dev/null
+++ b/net-dialup/globespan-adsl/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+<longdescription>ADSL modem driver for Globespan/ECI chipsets.</longdescription>
+</pkgmetadata>
diff --git a/net-dialup/hcfpcimodem/Manifest b/net-dialup/hcfpcimodem/Manifest
new file mode 100644
index 000000000000..42bb809faeeb
--- /dev/null
+++ b/net-dialup/hcfpcimodem/Manifest
@@ -0,0 +1,9 @@
+AUX hcfpcimodem-1.20-gentoo.patch 901 SHA256 5044787a51eeaa8c681d970786b51680059825bbc57f4a7e502dc1f2841e7dbf SHA512 7f834a33947253ad1cd637031553c77e0a1636513ddf41ac2cada6021a93c5d15584f7eb8941dc62eadab1a79a6b1a718bc2a2b2bce53d2fabeccc023df8a0d1 WHIRLPOOL 88a25d5bdf8f00edb57e7febfecd0574543aa273b2a1c34330b17c08769785ea9f075ac3bf5fe3b94a87908f41a094dfa8f333feab6d6b0fa3dc5fe3bea44257
+DIST 100498D_RM_HxF_Released.pdf 718949 SHA256 e05385b094ac97f13aabc9432ba7478c0acf12862b3c4da097272435d43f6ac1 SHA512 3a2b79bcf63f9f6cb6e846ba41cad810ebe3622273e7df749efa6a24ea1c1ca0fd627ca3455feafa77d7f54a3aba2ed2b3ba01c37286a750929f9b7685bcf40f WHIRLPOOL 034de1c491a0cb911f4c0188176727d5fb55b9e75cc7f69fe27e8f03cc1997781bef0a4600c7b6cd718db72fea56c73feb9664c0849f72a7606d248e56c112ca
+DIST hcfpcimodem-1.20full.tar.gz 692131 SHA256 a245a71d4cc78b4263c0d3321729119f158afeaf67fa6eb81feda27966284dd6 SHA512 bacb05fd6f35a6d795c7e5497a5cc3ca330e4f47a75f3a5d3322e1f018de89cd59485db064e1ca9b095472ec20998b51af0d099df978df4a7326bca9188786e7 WHIRLPOOL 060704a8c4d6f2e774dbb29af624b3f93c0b5df858dfbfc3f72e9118b75037b888fd2b2144525b003ca3fdd49c87b63e96bd8a0d34e7169fea3fecc889e06782
+DIST hcfpcimodem-1.21full.tar.gz 692291 SHA256 ee062de63df771c7eeac70790dbc38f4ad0d44b6d9f3cb35ae4bdb6be972a3fc SHA512 eddcff4222c9a3642c590673249966bce59c0afb30536dbcce80df5bd9d7c47a30281f80b8f9a20853424181123369088203141dd9dd1e73e7b1aa6a9ed695c3 WHIRLPOOL a91d307238e35b0ab87f98b3e4b1bb4abc58a910052268d21a7ffa5f026f5ebbf47ba80881a76f1e0600cc05efe1c410146b1d8469a367d50e5dcb8167dcd73b
+EBUILD hcfpcimodem-1.20.ebuild 2251 SHA256 29dd6d15ed89cc86afd84cbcc6bf4f7d18b8ddf032435a44cf65ae7041f348ce SHA512 63f987a11287891e5479472f2e19557c27f918b374da75e5f24ca3fdb3fa506459171a56a348471aaa01e88bc9560c95d26788aeed60d71e7e7a4a0097fe09db WHIRLPOOL 1fbcb9984b3c79db3e2ef22cc40d23d7208907df76e2ba7a96d90053432838b65476b99f64526b6a74672d9fea1785acd898906bf59e3920bc158e91745517ee
+EBUILD hcfpcimodem-1.21.ebuild 2288 SHA256 6f1cc0c46a3eef6213ee2f0256aa864a79ba43ec7102c8e72f0566e65118be59 SHA512 9fd323a2b981b2355e8853fcec4d9abaa0989c3642385326892aca1ec67c4bd39d2e27fb7197da7d5a355963351e4cb1ef86317a2493d2a8b4c441723d5120e5 WHIRLPOOL bf55f771a8a0ca91d94727aabb182e43e38af22c01c99cfea22fdce46d5b6a1dcb4148e0f897428897f315237d968d3f7343b7fb31df8dd087350a9449c357b9
+MISC ChangeLog 2566 SHA256 305ba8f5d6348ba710352a951cbb5d400e91df9b8f0eb17129189949f05fbde7 SHA512 9f6fc82f0a3825300042db3c29e8713c941a7414b7552194fcd70fd6dad23e500c72220cbebb12d5c439825eee23949c15b25a14324b74ab54d7331f1f9d6bab WHIRLPOOL 905c70c4b3e7f7016e83fbac548613928ac4c48f177cbd3737f8f085588ae5b194ac4875ab751cf70a3038eba7afb1b784b4593868dbb0ba1527db96ae5099cb
+MISC ChangeLog-2015 8595 SHA256 b10f4618cd2146d66023643395182e0e8dbd603d60231a5e2078631f5ee2ea55 SHA512 a92cd188b2acca7bbdf1a49169a8cb2529b4ac1ee04f9baaa9d4ca2b6ff478d953f6cdd3c4441edf46d2d88f09d688061e31033a90fde6f00319e1492e7050a1 WHIRLPOOL 9f21804b1844b400912a0a5271048504b719aaad6e2408b41bc9a8546b1e402ac3c8a020f97023d3d554e3a09906ea2481475af42092d5698c728cac9548f340
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/net-dialup/hcfpcimodem/files/hcfpcimodem-1.20-gentoo.patch b/net-dialup/hcfpcimodem/files/hcfpcimodem-1.20-gentoo.patch
new file mode 100644
index 000000000000..11ce09abfbbc
--- /dev/null
+++ b/net-dialup/hcfpcimodem/files/hcfpcimodem-1.20-gentoo.patch
@@ -0,0 +1,29 @@
+diff -Nru hcfpcimodem-1.20full.orig/diag/makefile hcfpcimodem-1.20full/diag/makefile
+--- hcfpcimodem-1.20full.orig/diag/makefile 2004-12-14 08:50:41.000000000 +0100
++++ hcfpcimodem-1.20full/diag/makefile 2009-11-29 10:35:05.000000000 +0100
+@@ -10,7 +10,7 @@
+ include $(TOP)/config.mak
+ -include $(TOP)/modules/imported/makeflags.mak
+
+-CFLAGS = -I$(TOP)/modules/imported/include -I$(TOP)/modules/include
++CFLAGS += -I$(TOP)/modules/imported/include -I$(TOP)/modules/include
+ CFLAGS += $(IMPORTED_FRAMEWORK_DEFS) $(IMPORTED_GENERAL_DEFS)
+ CFLAGS += -DCNXTTARGET="\"$(CNXTTARGET)\""
+
+@@ -41,13 +41,13 @@
+ $(MKDIR) -p $@
+
+ $(CNXTTARGET)diag: diag.o modemexpert.o
+- $(CC) -o $@ $^
++ $(CC) ${LDFLAGS} -o $@ $^
+
+ $(CNXTTARGET)scr: scr.o
+- $(CC) -o $@ $^
++ $(CC) ${CFLAGS} ${LDFLAGS} -o $@ $^
+
+ $(CNXTTARGET)dmp: dmp.o
+- $(CC) -o $@ $^
++ $(CC) ${CFLAGS} ${LDFLAGS} -o $@ $^
+
+ clean:
+ rm -f *.o $(ALL)
diff --git a/net-dialup/hcfpcimodem/hcfpcimodem-1.20.ebuild b/net-dialup/hcfpcimodem/hcfpcimodem-1.20.ebuild
new file mode 100644
index 000000000000..0d16f721ac06
--- /dev/null
+++ b/net-dialup/hcfpcimodem/hcfpcimodem-1.20.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils linux-info
+
+#The document is the same as in hsfmodem, even if it has a different URL
+MY_DOC="100498D_RM_HxF_Released.pdf"
+
+DESCRIPTION="Linuxant's modem driver for Connexant HCF chipset"
+HOMEPAGE="http://www.linuxant.com/drivers/hcf/index.php"
+SRC_URI="http://www.linuxant.com/drivers/hcf/full/archive/${P}full/${P}full.tar.gz
+ doc? ( http://www.linuxant.com/drivers/hcf/full/archive/${P}full/${MY_DOC} )"
+
+LICENSE="Conexant"
+SLOT="0"
+KEYWORDS="-* x86"
+IUSE="doc"
+
+DEPEND="dev-lang/perl
+ app-arch/cpio"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${P}full"
+
+QA_EXECSTACK="usr/lib/hcfpcimodem/modules/imported/hcfblam-i386.O usr/lib/hcfpcimodem/modules/imported/hcfengine-i386.O"
+
+pkg_setup() {
+ linux-info_pkg_setup
+
+ MOD_N="hcfpci"
+ # Check to see if module is inserted into kernel, otherwise, build fails
+ if [ "`lsmod | sed '/^'$MOD_N'serial/!d'`" ]; then
+ eerror
+ eerror "Module is in use by the kernel!!!"
+ eerror "Attempting to unload..."
+ eerror
+
+ # Unloading module...
+ ${MOD_N}stop
+ if [ "`lsmod | sed '/^'$MOD_N'serial/!d'`" ]; then
+ eerror "Failed to unload modules from kernel!!!"
+ eerror "Please manualy remove the module from the kernel and emerge again."
+ eerror
+ die
+ fi
+ einfo "Successfuly removed module from memory. Resuming emerge."
+ einfo
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+}
+
+src_compile() {
+ emake all || die "make failed"
+}
+
+pkg_preinst() {
+ local NVMDIR="${ROOT}/etc/${PN}/nvm"
+ if [ -d "${NVMDIR}" ]; then
+ einfo "Cleaning ${NVMDIR}..."
+ rm -rf "${NVMDIR}"
+ eend
+ fi
+}
+
+src_install () {
+ make PREFIX="${D}/usr/" ROOT="${D}" install || die "make install failed"
+
+ # in some cases, kernelcompiler.sh does not have x permission (#173414)
+ fperms a+rx /usr/lib/hcfpcimodem/modules/kernelcompiler.sh
+
+ use doc && dodoc "${DISTDIR}/${MY_DOC}"
+}
+
+pkg_postinst() {
+ if [ "${ROOT}" = / ]; then
+ elog "To complete the installation and configuration of your HCF modem,"
+ elog "please run hcfpciconfig."
+ fi
+}
+
+pkg_prerm() {
+ if [ "${ROOT}" = / -a -f /etc/init.d/hcfpci ] ; then
+ hcfpciconfig --remove || die "hcfpciconfig --remove failed"
+ fi
+}
diff --git a/net-dialup/hcfpcimodem/hcfpcimodem-1.21.ebuild b/net-dialup/hcfpcimodem/hcfpcimodem-1.21.ebuild
new file mode 100644
index 000000000000..2af11b5cec43
--- /dev/null
+++ b/net-dialup/hcfpcimodem/hcfpcimodem-1.21.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+
+inherit eutils linux-info toolchain-funcs
+
+#The document is the same as in hsfmodem, even if it has a different URL
+MY_DOC="100498D_RM_HxF_Released.pdf"
+
+DESCRIPTION="Linuxant's modem driver for Connexant HCF chipset"
+HOMEPAGE="http://www.linuxant.com/drivers/hcf/index.php"
+SRC_URI="http://www.linuxant.com/drivers/hcf/full/archive/${P}full/${P}full.tar.gz
+ doc? ( http://www.linuxant.com/drivers/hcf/full/archive/${P}full/${MY_DOC} )"
+
+LICENSE="Conexant"
+SLOT="0"
+KEYWORDS="-* ~x86"
+IUSE="doc"
+
+DEPEND="dev-lang/perl
+ app-arch/cpio"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${P}full"
+
+QA_EXECSTACK="usr/lib/hcfpcimodem/modules/imported/hcfblam-i386.O usr/lib/hcfpcimodem/modules/imported/hcfengine-i386.O"
+
+pkg_setup() {
+ linux-info_pkg_setup
+
+ local MOD_N="hcfpci"
+ # Check to see if module is inserted into kernel, otherwise, build fails
+ if [ "`lsmod | sed '/^'$MOD_N'serial/!d'`" ]; then
+ eerror
+ eerror "Module is in use by the kernel!!!"
+ eerror "Attempting to unload..."
+ eerror
+
+ # Unloading module...
+ ${MOD_N}stop
+ if [ "`lsmod | sed '/^'$MOD_N'serial/!d'`" ]; then
+ eerror "Failed to unload modules from kernel!!!"
+ eerror "Please manualy remove the module from the kernel and emerge again."
+ eerror
+ die
+ fi
+ einfo "Successfuly removed module from memory. Resuming emerge."
+ einfo
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.20-gentoo.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" all || die "make failed"
+}
+
+pkg_preinst() {
+ local NVMDIR="${ROOT}/etc/${PN}/nvm"
+ if [ -d "${NVMDIR}" ]; then
+ einfo "Cleaning ${NVMDIR}..."
+ rm -rf "${NVMDIR}" || die
+ eend
+ fi
+}
+
+src_install () {
+ make PREFIX="${D}/usr/" ROOT="${D}" install || die "make install failed"
+
+ # in some cases, kernelcompiler.sh does not have x permission (#173414)
+ fperms a+rx /usr/lib/hcfpcimodem/modules/kernelcompiler.sh
+
+ use doc && dodoc "${DISTDIR}/${MY_DOC}"
+}
+
+pkg_postinst() {
+ if [ "${ROOT}" = / ]; then
+ elog "To complete the installation and configuration of your HCF modem,"
+ elog "please run hcfpciconfig."
+ fi
+}
+
+pkg_prerm() {
+ if [ "${ROOT}" = / -a -f /etc/init.d/hcfpci ] ; then
+ hcfpciconfig --remove || die "hcfpciconfig --remove failed"
+ fi
+}
diff --git a/net-dialup/hcfpcimodem/metadata.xml b/net-dialup/hcfpcimodem/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/net-dialup/hcfpcimodem/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/net-dialup/isdn-firmware/Manifest b/net-dialup/isdn-firmware/Manifest
new file mode 100644
index 000000000000..aca263ff9f5e
--- /dev/null
+++ b/net-dialup/isdn-firmware/Manifest
@@ -0,0 +1,5 @@
+DIST i4lfirm-2005.8.15-2.i586.rpm 2530426 SHA256 6a63b534886af59301e7ff6ab83f2cac1ebdc25df0206e2ff79405d1fe18f7d0 SHA512 fe943d33b38fa4f2d1c87b31cfe0fd1a99fc930660b88b8e5a138ca8be4c8abcfb7f09f7cd39ed7d12da34b61b0b60bec22b84a38818b478a802eba8a2191153 WHIRLPOOL f96b46f84a258de4d1ffe93c3c404887def1297d457bc999364d97abc008121493499029c3a5b62635f449e028a5144be10624dacbd0d20d7f41f98cd8651d28
+EBUILD isdn-firmware-2005.8.15.2.ebuild 695 SHA256 0a671d657c264c201f1730bfbb1bd0d4ad2c4ed59996488956cd52275b9cb669 SHA512 405d1c8a7c31d85996bab0ed76d2137de79012711d4695e63c5264a49c72fea24d70081379e85e704f17ec50ce180fa1aaae502ecb640f9c8efe2e3c275ad2a1 WHIRLPOOL 841b4e0842bcd93d3277fbc0a34c6ca8b56f11d4d846534ec6afadb76bcb44f400d21fefa2767fd9cc997e8eda2d550cf24245681efeb49d2bbc26bc2f816fc4
+MISC ChangeLog 2488 SHA256 af6b104f76e9bd8c2fa8432fab7ea53db2130b94f487fb5e72b96e9f96329e3b SHA512 92a904c345d04baa276919a42cc00d3f20dc6b6122afc0b192771157f46785d0cdbc96d42701b38c31e0c4011d9ec7bc53dabcb7d5bede600d25aed1aff7eb37 WHIRLPOOL 676827e0761da35cb63659f5825cc5f08d0317b69f8c4ee6e29cbf156ccdec5c024ea956e21afe9f98267db3e8c9dd7bb21f0083cde3c790b1be5b273556c257
+MISC ChangeLog-2015 3192 SHA256 e6c064df1cdee260c2fc2be5c6b0f3fced70cc75c9cea301443cc66b519e30e6 SHA512 007d1a217f66bc3d940cd13b1b16b77406976d9912c027bc619c45c206825b1b020fff575e1ad5f14752ebbc35e5a9d5ba782cf880f8283e173da25686f5f524 WHIRLPOOL 9197bddeea3581f1014f449c0cd327f3515f669e9e65850527c8e0a63539d25c4e54d2395f7c3ae8e68fc189acf3878a45c8fd5b0d816e2f7f1ad291291b4e3e
+MISC metadata.xml 273 SHA256 fdef4246dccf38f6cc6e158e48c854662847bcbe421446db6768156e3ca94c3c SHA512 df17921ad6d2ac8087652db27af1188ca9ca87acbf3c5d37d1197a6337e10a2fc763d5333bca9306362b08c1c0b5ed9da358017be1ae0d53dc14e6e87f8a1766 WHIRLPOOL 22efa81b6fe27e815e1fb4101d9461502d33b61e54fb3070eb88e81dc4252f12c6f9c6aaedaaecd5eee4094b3dd3c0526ef6c9204902b30812c48a2bac5a98db
diff --git a/net-dialup/isdn-firmware/isdn-firmware-2005.8.15.2.ebuild b/net-dialup/isdn-firmware/isdn-firmware-2005.8.15.2.ebuild
new file mode 100644
index 000000000000..9f426a2c7d86
--- /dev/null
+++ b/net-dialup/isdn-firmware/isdn-firmware-2005.8.15.2.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit multilib rpm versionator
+
+MY_PN="i4lfirm"
+MY_PV="$(get_version_component_range 1-3)"
+MY_PP="$(get_version_component_range 4)"
+MY_P="${MY_PN}-${MY_PV}-${MY_PP}"
+
+DESCRIPTION="ISDN firmware for active ISDN cards (AVM, Eicon, etc.)"
+HOMEPAGE="http://www.isdn4linux.de/"
+SRC_URI="ftp://ftp.man.poznan.pl/pub/linux/opensuse/opensuse/distribution/SL-10.0-OSS/inst-source/suse/i586/i586/${MY_P}.i586.rpm"
+
+LICENSE="freedist" #446158
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+
+S="${WORKDIR}/lib/firmware/isdn"
+
+src_install() {
+ insinto $(get_libdir)/firmware
+ insopts -m 0644
+ doins *
+}
diff --git a/net-dialup/isdn-firmware/metadata.xml b/net-dialup/isdn-firmware/metadata.xml
new file mode 100644
index 000000000000..f28529eb62f5
--- /dev/null
+++ b/net-dialup/isdn-firmware/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription lang="en">
+ ISDN firmware for active ISDN cards (AVM, Eicon, etc.)
+ </longdescription>
+</pkgmetadata>
diff --git a/net-dialup/kpnadsl4linux/Manifest b/net-dialup/kpnadsl4linux/Manifest
new file mode 100644
index 000000000000..db73ee2af333
--- /dev/null
+++ b/net-dialup/kpnadsl4linux/Manifest
@@ -0,0 +1,7 @@
+AUX kpnadsl4linux-1.11-Makefile.patch 637 SHA256 dc98afedb8b6c520c18d7f5178aa463b28fb340abe8cb2f70762bc31619365a9 SHA512 011a541cd696670871f950f53cd8b11f6c91006bf2806500e610fcc8320143401aaa5c7c976b8df1b3ccc84d29e79e3ff1bfe10735784c5646cda02d5623bbe1 WHIRLPOOL fd4f3039f0e94a2b5670c5f27f852a65b2214a790d7eacc0158a7c28cdd9795ca32d8dcf32abc711ceda8c500a4aef94b9cf594280dc40706d3aa72b77c3804a
+AUX kpnadsl4linux-config 3773 SHA256 f2109396e113e1d81991110c1299dad670bc6cf7645555c552c66725fc0933fb SHA512 6f2fa43a33b111aadad0253aceafafff3850a46dba05d00752f72215dc2f37fa825337b20292a3f1d17af1a967dcbf425ce4ba4dfea7b84a3d01ede2f035d99a WHIRLPOOL 04360576186224952fb747039b3e431040b09d98e1c34cc5397f014ad60776d9dcb61574ffbde3086494b73b1f5b35f41ac73c934119d4bf83ba307b236c062b
+DIST kpnadsl4linux-1.11.tar.gz 15068 SHA256 45be6dfd6c11a4327da622efd947c077bd04c8ae0f812731c9cd3bd9f992d7c3 SHA512 050c879aff115169e6cb0f0bf081a8172a3f4735f7231d1e5d1f245b34a1b522691e7640d146eac3c894a17c2901e59f1f942f7be5a2eed5ce1eb8c96bfef201 WHIRLPOOL ff8bd2d8db5490f1c1d5f47bf21f122c505851f2b48676745c17ba5573efbf5ec14f8a363608e6387ed782f92e411d9ec5afb54b4bb7ef6910ba27085ff55061
+EBUILD kpnadsl4linux-1.11.ebuild 1129 SHA256 ef4dcc36cba52267c0a375d65dcfd7109d45a88add4746f72fa7c674a3dcce44 SHA512 d1f4c3f4947a6db876ed919a7d97ecaf920d5540244d8bcd5fbb7bf4e70e6b05ad11ba49393298bba5114ecc0e0ca8e9c21d52e71132882a14eeaa68f91b56d3 WHIRLPOOL b7d29878bdd3eb0430dc9c4f48770cd47acf6aa1e6535aff1a4e2a5d5b8eae96c18bddb5b04223bf2110ea17e02cfb650f71bfaace133203ac9bd50fe9b5c911
+MISC ChangeLog 2547 SHA256 f8243e3bf01a89ae6fad5ad2b2ef365c6e8ba58796ecb4516b5ed033aeebc0aa SHA512 7badf99dd62e8edc47f37144f2a4bf0a9973a6f27c2749bc64c5245d8e184a7308d15252b2c77b83b862661d966f4824ec4cc52c5bf4b90050712f5eacd16290 WHIRLPOOL 95f3cfe3935a10aa5f683c22ada893db6ce102b02297ed122459bd2f69362a2f260ff2c9271d654cbcd6b35f35de231f34505ceee1931643d208783a7e1d93fd
+MISC ChangeLog-2015 2725 SHA256 4f768cdab158033f696fb06cf93153fb4e1e9a35183eac3900c9da32a932d2b3 SHA512 0afea5d64bedf36f5eccc68d410faece7377ca3a2b20e95ced2837e87849f8070f76d2c20f43bcf78e062f3778a169179d70ee151330944dd54fa72978d2e158 WHIRLPOOL 91d7749df3454558e707c44672df5a8e73dd052086fad44e016d09542184dfe464321542c5a9b84e76ec2f5e8b3b84850af10fa0ee73352bba5554d3ef571f4a
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/net-dialup/kpnadsl4linux/files/kpnadsl4linux-1.11-Makefile.patch b/net-dialup/kpnadsl4linux/files/kpnadsl4linux-1.11-Makefile.patch
new file mode 100644
index 000000000000..f7d20bf348a6
--- /dev/null
+++ b/net-dialup/kpnadsl4linux/files/kpnadsl4linux-1.11-Makefile.patch
@@ -0,0 +1,25 @@
+--- Makefile.orig 2013-04-14 16:50:26.676698258 +0400
++++ Makefile 2013-04-14 16:51:14.107695809 +0400
+@@ -1,18 +1,18 @@
+ # Makefile for ADSL4Linux 1.11 Gentoo Edition
+
+ all: adsl
+
+ adsl: adsl.o adslstatus.o adslstatus.h adsl.h
+- gcc adsl.o adslstatus.o -o adsl
++ $(CC) $(LDFLAGS) adsl.o adslstatus.o -o adsl
+
+ adsl.o: adsl.c adsl.h
+- gcc -c adsl.c
++ $(CC) $(CFLAGS) -c adsl.c
+
+ adslstatus: adslstatus.o adslstatus.h adsl.h
+- gcc adslstatus.o -o adslstatus
++ $(CC) $(LDFLAGS) adslstatus.o -o adslstatus
+
+ adslstatus.o: adslstatus.c adslstatus.h adsl.h
+- gcc -c adslstatus.c
++ $(CC) $(CFLAGS) -c adslstatus.c
+
+ clean:
+ rm adsl *.o
diff --git a/net-dialup/kpnadsl4linux/files/kpnadsl4linux-config b/net-dialup/kpnadsl4linux/files/kpnadsl4linux-config
new file mode 100644
index 000000000000..439528e14f4a
--- /dev/null
+++ b/net-dialup/kpnadsl4linux/files/kpnadsl4linux-config
@@ -0,0 +1,100 @@
+#/bin/bash
+
+# This script is to be distributed on the Gentoo liveCD's under the terms or the GNU General Public License version 2 or later
+# Copyright 2002 Sam Besselink (sambesselink@planet.nl)
+# This script does some configuration needed before it's possible to make a succesful pptp tunnel.
+
+a4lvarconfig() {
+ # Get username, password and 'phonenumber' (pc1/pc2/pc3/...)
+ echo "What's your username? (ie. myname@subscription-form)"; read USERNAME;
+ echo ""
+ echo "What's your password?"; read PAWD;
+ echo ""
+ echo "If you have a subscription with multiple ip addresses, please specify your 'pc-number'? (ie. pc3) Press"\
+ "ENTER if you have no idea what I'm talking about."; read PCNUMBER;
+ echo ""
+ if [ -z ${PCNUMBER} ]; then PCNUMBER=pc1; else :; fi;
+ echo "Are these, in order, your username, password and pc-number?";
+ echo "username: ${USERNAME}";
+ echo "password: ${PAWD}";
+ echo "pc-number: ${PCNUMBER}";
+ # Ask whether settings are correct and act accordingly.
+ CHECK="Yes No";
+ select CHCKCHCK in ${CHECK}; do
+ if [ ${CHCKCHCK} = "Yes" ];
+ # Get username etc. again if last try was incorrect.
+ then adslconfigins;
+ # Else go to the next step.
+ else echo ""; echo ""; echo ""; a4lvarconfig;
+ fi
+ done
+}
+
+adslconfigins() {
+ if [ -d /etc/ppp/peers ]; then :; else mkdir /etc/ppp/peers; fi
+ cd /etc/ppp/peers
+
+ # Save your settings to a file.
+ echo "idle 0" > .adsl
+ echo "noauth" >> .adsl
+ echo "user ${USERNAME}" >> .adsl
+ echo "usepeerdns" >> .adsl
+ echo "defaultroute" >> .adsl
+ echo "linkname mxstream" >> .adsl
+ echo 'pty "/usr/sbin/pptp 10.0.0.138 --nolaunchpppd --phone '"${PCNUMBER}"'"' >> .adsl
+ if [ -e adsl ]; then mv .adsl ._cfg0000_adsl; else mv .adsl adsl; fi
+ chmod 644 adsl
+ pap-secretsins;
+}
+
+pap-secretsins() {
+ if [ -d /etc/ppp/peers ]; then :; else mkdir /etc/ppp/peers; fi
+ cd /etc/ppp
+ # Save the 'secret' (password) in the secrets file.
+ echo "# Secrets for authentication using PAP" > .pap-secrets
+ echo "# client server secret ip-addresses" >> .pap-secrets
+ echo "${USERNAME} * "'"'"${PAWD}"'"'" *" >> .pap-secrets
+ if [ -e pap-secrets ]; then mv .pap-secrets ._cfg0000_pap-secrets; else mv .pap-secrets pap-secrets; fi
+ loggingadsl;
+}
+
+loggingadsl() {
+ # Crontab Logging
+ echo "Trying to install logging..."
+ local TESTER="root test -x /usr/sbin/adsl && /usr/sbin/adsl update"
+ local STRING1="/5 * * * * ${TESTER}"
+ # Check if /etc/crontab exists
+ if [ -e /etc/crontab ]; then \
+ # If cron works install, else don't.
+ if [ `grep -c "/5 \* \* \* \* ${TESTER}" /etc/crontab` != "0" ]; then echo "Not adding string for crontab";
+ else echo -e '\n# 5-minute ADSL log update' >> /etc/crontab;
+ echo -e "${STRING1}" >> /etc/crontab;
+ echo "Added to crontab: a 5 minute log update";
+ fi;
+ else echo "/etc/crontab doesn't exist!"
+ fi;
+
+ # ip-down.local logging
+ local TEST=""
+ local TEST2="^/usr/sbin/adsl stoplog$"
+ local STRING2="/usr/sbin/adsl stoplog"
+ if [ -e /etc/ppp/ip-down.local ]; then :; else touch /etc/ppp/ip-down.local; fi
+ local test=`grep -c "${TEST2}" /etc/ppp/ip-down.local`
+ # If there already is such a string, don't do anything, else add it.
+ if [ "${TEST}" != "0" ]; then echo "Not adding string for log in /etc/ppp/ip-down.local";
+ else echo -e '\n# ADSL log save' >> /etc/ppp/ip-down.local;
+ echo -e "${STRING2}" >> /etc/ppp/ip-down.local;
+ echo "Added to ip-down.local: log save";
+ fi;
+
+ echo "Configuration is done!"
+ echo "If you want you can check/tweak your settings by editting /etc/ppp/pap-secrets"
+ echo "and /etc/ppp/peers/adsl. Enjoy!"
+ echo -e "\e[33;01m* IMPORTANT:\e[00;00m files in /etc _MAY_ need updating.";
+ echo -e "\e[33;01m*\e[00;00m Type \e[32;01memerge --help config \e[00;00mto learn how to update config files.";
+
+ exit;
+}
+
+# Start the configuring
+a4lvarconfig;
diff --git a/net-dialup/kpnadsl4linux/kpnadsl4linux-1.11.ebuild b/net-dialup/kpnadsl4linux/kpnadsl4linux-1.11.ebuild
new file mode 100644
index 000000000000..658aea979dcf
--- /dev/null
+++ b/net-dialup/kpnadsl4linux/kpnadsl4linux-1.11.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="ADSL4Linux, a PPTP start/stop/etc. program especially for Dutch users"
+HOMEPAGE="http://www.adsl4linux.nl/"
+SRC_URI="http://home.planet.nl/~mcdon001/${P}.tar.gz
+ http://www.adsl4linux.nl/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+
+RDEPEND=">=net-dialup/pptpclient-1.7.0
+ >=net-dialup/ppp-2.4.2"
+
+src_prepare() {
+ # Respect CC, CFLAGS and LDFLAGS. Bug #336109
+ epatch "${FILESDIR}/${P}-Makefile.patch"
+ tc-export CC
+
+ # Fix a typo
+ sed -i -e 's:* at first:/\0:' adslstatus.c || die 'sed on adslstatuc.c failed'
+
+ epatch_user
+}
+
+src_install() {
+ dosbin adsl
+ dodoc Changelog modemREADME README
+ newinitd init.d.adsl adsl
+ dosbin "${FILESDIR}/${PN}-config"
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "Do _NOT_ forget to run the following if this is your _FIRST_ install:"
+ elog " kpnadsl4linux-config"
+ elog " etc-update"
+ elog "To start ${P} at boot type:"
+ elog " rc-update add adsl default"
+ fi
+}
diff --git a/net-dialup/kpnadsl4linux/metadata.xml b/net-dialup/kpnadsl4linux/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/net-dialup/kpnadsl4linux/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/net-dialup/linux-atm/Manifest b/net-dialup/linux-atm/Manifest
new file mode 100644
index 000000000000..09b36117f46e
--- /dev/null
+++ b/net-dialup/linux-atm/Manifest
@@ -0,0 +1,11 @@
+AUX linux-atm-2.5.0-bison24.patch 1062 SHA256 83100e456a259badbcbc45cb7b031a772fbb2f504a41c7444e85f1d95b0c1e5e SHA512 4fb86766e94c1bb46c8daecb943e26a6f205c0d6476c5a529eb461b8a06f44bbf693a8993bd988f686010d8849dad87f8d8f310fd93e897461225e64bf0fa283 WHIRLPOOL 22cd72854dff37a13ee7667b97ae439cfef1aaace63d255bf9b91a27474c3ecbf43ce548eb6b41a73531619d7f26863988025e5f6f7a30bd8e614ac6b7cd7864
+AUX linux-atm-2.5.0-glibc28.patch 376 SHA256 da87e8709dc451d0f6cad5f0cc50d74470dab1cc0b5e8bd36970a8371b8a9375 SHA512 856d1cd6f9d2aff4db1b81ecda21995d181b810efc2c71a7cba45b2df99b456861cec6bdbf03d4f2914d54dc1e4ed5ff3df42fa29c58c8f8dfa6c3aba65556b6 WHIRLPOOL 506e00c2dd971872ee289402364219f28c7273671c85867c1b3f314032a7462ddce2052b641c7c9164176685a6fd230b5129061f15b4eb74e24339e4a2288bad
+AUX linux-atm-2.5.0-headers.patch 4681 SHA256 96ffc8834b0a667f9458aa2e7ff95fd2396b8e3bfbb8c36f9c1a69ec843e8462 SHA512 6d8a1078bf7710af917a59b0c94d6455666ea170cad5425d9741a1a8004785e06295cfd39524170cb7fd57b58416adfc89fcf3e3081bc6bf1619cefa1340d6a3 WHIRLPOOL fc852cf24c224bb6b72c00c388d0185435da1722fc52f629b6906c003fec173deff71d4c5856fac5e2907a90fd71f5c46c37cd4b4acb54c3874761329fc5594c
+AUX linux-atm-2.5.2-headers.patch 646 SHA256 1af9ad2106d0a6e53cc360e1f052db1437c8286481c9b4cd4166018e9413e26d SHA512 4248a0063de9723ca6a3abdd07c5c3f4bda5a43f21bb5d19f931e898abd3e10f52b20c9d1a21415a17bee70ac6bdba83e13704f2a7c5489fb12d6e93a5a8e113 WHIRLPOOL 1897069af35688e102c4ff957b098720a5b659beeb06eb4fcf9d754286677b6677e50149b2a59e25357ad9fc903fc25a5e0ea817d0580c7041f293a526b6e6d7
+DIST linux-atm-2.5.0.tar.gz 1036180 SHA256 e73aa34dc00c9fd50da73d8b528da994f28003dcdd1d23485d251bb451220ca8 SHA512 48e9bf848318d6842584d19e2c896c906a5dc3d6cf362aab346c47dd258b28ad7bc0b6a7f90708b4c0069504b500cd88e3aed7f54ff803b0ed772e35bc2181b0 WHIRLPOOL a1be9df4c34f2c7d5b876805dfb46e7f34fd37a90dee0540b4da1be755a242e8f6deb0aa69b14e500aa22ac5762177cca73f751cf37005f2566ec0b665755169
+DIST linux-atm-2.5.2.tar.gz 1082256 SHA256 9645481a2b16476b59220aa2d6bc5bc41043f291326c9b37581018fbd16dd53a SHA512 0a50e91513e4e1f882dc6f4792dc032e89497ff745c0eaea0c0c848b0f84e40d19e038e4ab5aa70c1f915c28a9f845340c332ac5c3ae838b8f539466e10a0a08 WHIRLPOOL ddff2b022bd94a64662e2feb8588b0b7a1d33380aaca91888d57c90602ec777f8db308f62b33846f9b2f40dfd7d6b40ca4ddd9d430e1c6bc8a36cdbb4e370771
+EBUILD linux-atm-2.5.0.ebuild 1158 SHA256 7e2663bf260c9313106f0b9dc245f4b0150361899e744eae1ed563407c194f64 SHA512 f403a65ff6a9c122b519a29df41d5f1b3bac5d4b13b477e8c33585b4a11243ab09a0c8784863d8580720c8c4016e36ecc712910d7fcb71db7d7e4e8014ac9ecf WHIRLPOOL c02f104eb2623f48c5d851c290205270a125d4a22cfd2a0bdee9430db1520063359aac9a3d105bb64f7a931d3de42a1de20489aa80af047e7a0b5a402e6cadcf
+EBUILD linux-atm-2.5.2.ebuild 902 SHA256 63107dd2cddf454bb733116955bca4c5cce7352b6a72ccd83a73462070804440 SHA512 037baf66eb428347a43d292c1b4e3d6245debf0efe9d582549325723883f42057ba9771b7eeea04d40b7be0550bac903cdb97502382644d6633f601507f37966 WHIRLPOOL 762efbabd734c692d8a8ba7c67371b99794dc585924e9f62b14287692cbe7e6f0964a63dedee1999a9721d2533e887f3ed257ce97531122c6dac8e6e9c5ac778
+MISC ChangeLog 2758 SHA256 7303489a803f4ae096cc5ad0fc9f395bd59573729bc874d92ebb5d46d94bad2e SHA512 99a16ae4e5b17c999d7183b1cbd3adc7584f297402d27e11e70a2f58c82e140e3c38312776d77ca338a0c354f2b381189861980ddd859763a8ce7595df22f49c WHIRLPOOL 4f81746dd581caeacc8ee40626220500da1e317374927f323856047108ff8edcb6c92e75ab4519dec612bd3b3a02f47fd5fa3795bf252d4265e35b20e6aedb4f
+MISC ChangeLog-2015 5835 SHA256 f1f6845df14688f876d19ff1879edfbbe65ed3d3fb33919cb1cbc992d1becdfd SHA512 138eeab05eabbe01e52545264d2f7a79b67ebbd18e199d69ec6ae39472b06651b7290b7f65396775f9b3356e14a3a3b5320c3b61122bbfc1a4a47edcdec0e3b7 WHIRLPOOL 22144f496c5c9b39fb918717b54f210263d974e5480b285bc54a5519d24b7f88ddaef8786cd5a3ce7c32061d6ffa7d2f3b6f2051897edfde79e5f0b6d1b0a961
+MISC metadata.xml 303 SHA256 0b3c1c830298704b10c8cc47056485d0d910984e3270a807be57e306070233e0 SHA512 86ae1e28bb9f9d2db0a9607d58dd8cb48f96e76c4aaf5e7027f9ae792ef41ca6ac8da92adf13a40c4bcc1bd2cbea67cd4535232116616f687011c777789bc79b WHIRLPOOL 2942d539ecac8269a09d0f0a0b3e761e42b7687c553d61450536061decd25e893b21ea8482006be740faf6f96d4ddb8a17c923ade4bd14540d4c09a79d9d9700
diff --git a/net-dialup/linux-atm/files/linux-atm-2.5.0-bison24.patch b/net-dialup/linux-atm/files/linux-atm-2.5.0-bison24.patch
new file mode 100644
index 000000000000..f422c9c35e96
--- /dev/null
+++ b/net-dialup/linux-atm/files/linux-atm-2.5.0-bison24.patch
@@ -0,0 +1,47 @@
+--- linux-atm-2.5.0.orig/src/qgen/ql_y.y 2009-02-28 08:22:09.000000000 +0000
++++ linux-atm-2.5.0/src/qgen/ql_y.y 2009-02-28 08:41:35.000000000 +0000
+@@ -61,8 +61,10 @@
+ *walk = 0;
+ if (*start == ':') {
+ if (!(searching = strcmp(start+1,name)))
++ {
+ if (found) yyerror("multiple entries");
+ else found = 1;
++ }
+ continue;
+ }
+ if (searching) continue;
+@@ -308,9 +310,11 @@
+ $$->pos = $2;
+ $$->flush = !$3;
+ if ($$->pos == -1)
++ {
+ if ($$->size & 7)
+ yyerror("position required for small fields");
+ else $$->pos = 0;
++ }
+ $$->value = $5;
+ $$->structure = NULL;
+ $$->next = NULL;
+@@ -432,8 +436,8 @@
+ }
+ | TOK_ID opt_id list block
+ {
+- $$ = alloc_t(TAG);
+- $$->abort_id = abort_id;
++ $<tag>$ = alloc_t(TAG);
++ $<tag>$->abort_id = abort_id;
+ }
+ tags
+ {
+@@ -475,8 +479,8 @@
+ }
+ | TOK_ID opt_id list rep_block
+ {
+- $$ = alloc_t(TAG);
+- $$->abort_id = abort_id;
++ $<tag>$ = alloc_t(TAG);
++ $<tag>$->abort_id = abort_id;
+ }
+ rep_tags
+ {
diff --git a/net-dialup/linux-atm/files/linux-atm-2.5.0-glibc28.patch b/net-dialup/linux-atm/files/linux-atm-2.5.0-glibc28.patch
new file mode 100644
index 000000000000..692f3163deaa
--- /dev/null
+++ b/net-dialup/linux-atm/files/linux-atm-2.5.0-glibc28.patch
@@ -0,0 +1,11 @@
+diff -up linux-atm-2.5.0/src/led/main.c.path_max linux-atm-2.5.0/src/led/main.c
+--- linux-atm-2.5.0/src/led/main.c.path_max 2008-05-19 02:47:40.000000000 +0900
++++ linux-atm-2.5.0/src/led/main.c 2008-05-19 02:47:52.000000000 +0900
+@@ -41,6 +41,7 @@
+ #include <getopt.h>
+ #include <errno.h>
+ #include <fcntl.h>
++#include <linux/limits.h>
+
+ #include <atm.h>
+ #include <atmd.h>
diff --git a/net-dialup/linux-atm/files/linux-atm-2.5.0-headers.patch b/net-dialup/linux-atm/files/linux-atm-2.5.0-headers.patch
new file mode 100644
index 000000000000..7097384f037d
--- /dev/null
+++ b/net-dialup/linux-atm/files/linux-atm-2.5.0-headers.patch
@@ -0,0 +1,213 @@
+--- linux-atm/src/maint/hediag.c.orig
++++ linux-atm/src/maint/hediag.c
+@@ -1,4 +1,6 @@
+ #include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
+ #include <sys/ioctl.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+--- linux-atm/src/arpd/io.c
++++ linux-atm/src/arpd/io.c
+@@ -16,7 +16,7 @@
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+-#include <net/if.h>
++#include <linux/if.h>
+ #include <netinet/in.h>
+ #include <atm.h>
+ #include <linux/atmclip.h> /* for CLIP_DEFAULT_IDLETIMER */
+--- linux-atm/src/debug/svctor.c
++++ linux-atm/src/debug/svctor.c
+@@ -20,6 +20,7 @@
+ #define QOS "ubr,aal5:tx:max_sdu=100,rx:max_sdu=100"
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <signal.h>
+--- linux-atm/src/ilmid/asn1/asn_bits.c
++++ linux-atm/src/ilmid/asn1/asn_bits.c
+@@ -20,6 +20,8 @@
+ #if HAVE_CONFIG_H
+ #include <config.h>
+ #endif
++#include <stdlib.h>
++#include <string.h>
+
+ #include "asn_config.h"
+ #include "asn_len.h"
+--- linux-atm/src/ilmid/asn1/asn_list.c
++++ linux-atm/src/ilmid/asn1/asn_list.c
+@@ -20,6 +20,7 @@
+ #include <config.h>
+ #endif
+
++#include <stdlib.h>
+ #include "asn_config.h"
+ #include "asn_list.h"
+
+--- linux-atm/src/ilmid/asn1/asn_octs.c
++++ linux-atm/src/ilmid/asn1/asn_octs.c
+@@ -20,6 +20,8 @@
+ #if HAVE_CONFIG_H
+ #include <config.h>
+ #endif
++#include <stdlib.h>
++#include <string.h>
+
+ #include "asn_config.h"
+ #include "asn_len.h"
+--- linux-atm/src/ilmid/asn1/asn_oid.c
++++ linux-atm/src/ilmid/asn1/asn_oid.c
+@@ -20,6 +20,8 @@
+ #if HAVE_CONFIG_H
+ #include <config.h>
+ #endif
++#include <stdlib.h>
++#include <string.h>
+
+ #include "asn_config.h"
+ #include "asn_len.h"
+--- linux-atm/src/ilmid/asn1/nibble_alloc.c
++++ linux-atm/src/ilmid/asn1/nibble_alloc.c
+@@ -20,6 +20,7 @@
+ #include <config.h>
+ #endif
+
++#include <stdlib.h>
+ #include <memory.h>
+ #include "asn_config.h"
+ #include "nibble_alloc.h"
+--- linux-atm/src/ilmid/atmf_uni.c
++++ linux-atm/src/ilmid/atmf_uni.c
+@@ -25,6 +25,7 @@
+ #include <config.h>
+ #endif
+
++#include <stdlib.h>
+ #include "atmf_uni.h"
+ #include "atmd.h"
+ #include "util.h"
+--- linux-atm/src/ilmid/mib.c
++++ linux-atm/src/ilmid/mib.c
+@@ -30,6 +30,7 @@
+ #include "atmf_uni.h"
+ #include "util.h"
+ #include "atmd.h"
++#include "io.h"
+
+ #include <unistd.h> /* gethostname() */
+ #include <netdb.h> /* gethostbyname() */
+--- linux-atm/src/lane/lecs_db.l
++++ linux-atm/src/lane/lecs_db.l
+@@ -7,6 +7,7 @@
+ /*Standard includes*/
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+
+ /* Local includes */
+ #include "lecs_load.h"
+--- linux-atm/src/lane/load_lex.l
++++ linux-atm/src/lane/load_lex.l
+@@ -4,6 +4,7 @@
+ #include <config.h>
+ #endif
+
++#include <string.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+
+--- linux-atm/src/lane/mem_lecs.c
++++ linux-atm/src/lane/mem_lecs.c
+@@ -13,6 +13,7 @@
+ /* System includes */
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <sys/types.h>
+
+ /* Local includes */
+--- linux-atm/src/mpoad/k_interf.c
++++ linux-atm/src/mpoad/k_interf.c
+@@ -3,6 +3,7 @@
+ #endif
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <unistd.h>
+ #include <string.h>
+ #include <errno.h>
+--- linux-atm/src/qgen/ql_y.y
++++ linux-atm/src/qgen/ql_y.y
+@@ -26,6 +26,8 @@
+ static STRUCTURE *structures = NULL;
+ static const char *abort_id; /* indicates abort flag */
+
++void yyerror(const char *s);
++int yylex ( void );
+
+ static NAME_LIST *get_name_list(const char *name)
+ {
+--- linux-atm/src/sigd/cfg_y.y
++++ linux-atm/src/sigd/cfg_y.y
+@@ -7,6 +7,7 @@
+ #include <config.h>
+ #endif
+
++#include <stdlib.h>
+ #include <string.h>
+ #include <ctype.h>
+ #include <limits.h>
+@@ -23,6 +24,9 @@
+ static RULE *rule;
+ static SIG_ENTITY *curr_sig = &_entity;
+
++void yyerror(const char *s);
++void yywarn(const char *s);
++int yylex ( void );
+
+ static int hex2num(char digit)
+ {
+@@ -126,7 +130,7 @@
+ for (sig = entities; sig; sig = sig->next)
+ if (atm_equal((struct sockaddr *) &sig->signaling_pvc,
+ (struct sockaddr *) &$2,0,0))
+- yyerror("duplicate PVC address %d.%d.%d",S_PVC(sig));
++ yyerror("duplicate PVC address");
+ curr_sig = alloc_t(SIG_ENTITY);
+ *curr_sig = _entity;
+ curr_sig->signaling_pvc = $2;
+--- linux-atm/src/switch/cfg_y.y
++++ linux-atm/src/switch/cfg_y.y
+@@ -7,6 +7,7 @@
+ #include <config.h>
+ #endif
+
++#include <stdlib.h>
+ #include <string.h>
+ #include <errno.h>
+ #include <limits.h>
+@@ -22,6 +23,9 @@
+ static int itf;
+ static SIGNALING_ENTITY *sig;
+
++void yyerror(const char *s);
++int yylex ( void );
++
+ %}
+
+ %union {
+--- linux-atm/src/test/ispl_y.y
++++ linux-atm/src/test/ispl_y.y
+@@ -19,6 +19,7 @@
+
+ static struct atmsvc_msg msg;
+
++int yylex ( void );
+
+ %}
+
diff --git a/net-dialup/linux-atm/files/linux-atm-2.5.2-headers.patch b/net-dialup/linux-atm/files/linux-atm-2.5.2-headers.patch
new file mode 100644
index 000000000000..edfb38d68b7b
--- /dev/null
+++ b/net-dialup/linux-atm/files/linux-atm-2.5.2-headers.patch
@@ -0,0 +1,30 @@
+--- linux-atm/src/maint/hediag.c.orig
++++ linux-atm/src/maint/hediag.c
+@@ -1,5 +1,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <sys/types.h>
+--- linux-atm/src/qgen/ql_y.y
++++ linux-atm/src/qgen/ql_y.y
+@@ -17,6 +17,8 @@
+ static STRUCTURE *structures = NULL;
+ static const char *abort_id; /* indicates abort flag */
+
++void yyerror(const char *s);
++int yylex ( void );
+
+ static NAME_LIST *get_name_list(const char *name)
+ {
+--- linux-atm/src/test/ispl_y.y
++++ linux-atm/src/test/ispl_y.y
+@@ -16,6 +16,7 @@
+
+ static struct atmsvc_msg msg;
+
++int yylex ( void );
+
+ %}
+
diff --git a/net-dialup/linux-atm/linux-atm-2.5.0.ebuild b/net-dialup/linux-atm/linux-atm-2.5.0.ebuild
new file mode 100644
index 000000000000..144e592bc906
--- /dev/null
+++ b/net-dialup/linux-atm/linux-atm-2.5.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils libtool flag-o-matic toolchain-funcs
+
+DESCRIPTION="Tools for ATM"
+HOMEPAGE="http://linux-atm.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="virtual/yacc"
+
+RESTRICT="test"
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-headers.patch
+ epatch "${FILESDIR}"/${P}-glibc28.patch
+ epatch "${FILESDIR}"/${P}-bison24.patch
+
+ sed -i '/#define _LINUX_NETDEVICE_H/d' \
+ src/arpd/*.c || die "sed command on arpd/*.c files failed"
+ sed -i 's:cp hosts.atm /etc:cp hosts.atm ${DESTDIR}/etc:' \
+ src/config/Makefile.in || die "sed command on Makefile.in failed"
+
+ elibtoolize
+}
+
+src_compile() {
+ append-flags -fno-strict-aliasing
+
+ CC_FOR_BUILD=$(tc-getCC) econf || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+
+ dodoc README NEWS THANKS AUTHORS BUGS ChangeLog
+ dodoc doc/README* doc/atm*
+}
diff --git a/net-dialup/linux-atm/linux-atm-2.5.2.ebuild b/net-dialup/linux-atm/linux-atm-2.5.2.ebuild
new file mode 100644
index 000000000000..f1e9ca9f4203
--- /dev/null
+++ b/net-dialup/linux-atm/linux-atm-2.5.2.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic libtool linux-info
+
+DESCRIPTION="Tools for ATM"
+HOMEPAGE="http://linux-atm.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="static-libs"
+
+RDEPEND=""
+DEPEND="virtual/yacc"
+
+RESTRICT="test"
+
+DOCS=( AUTHORS BUGS ChangeLog NEWS README THANKS )
+
+CONFIG_CHECK="~ATM"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-headers.patch
+
+ sed -i '/#define _LINUX_NETDEVICE_H/d' \
+ src/arpd/*.c || die "sed command on arpd/*.c files failed"
+
+ elibtoolize
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+ dodoc doc/README* doc/atm*
+}
diff --git a/net-dialup/linux-atm/metadata.xml b/net-dialup/linux-atm/metadata.xml
new file mode 100644
index 000000000000..44b11c5f4517
--- /dev/null
+++ b/net-dialup/linux-atm/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-needed -->
+ <longdescription>Tools for ATM.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">linux-atm</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/lrzsz/Manifest b/net-dialup/lrzsz/Manifest
new file mode 100644
index 000000000000..ab1a7f192bca
--- /dev/null
+++ b/net-dialup/lrzsz/Manifest
@@ -0,0 +1,9 @@
+AUX lrzsz-0.12.20-automake-1.12.patch 793 SHA256 da14545c343544d9c35cb20d9574f1f16cb39a057be1cb0af79998a5c0960455 SHA512 8e55cec506a494f97e7bd0c7bf910a0f49ab56485fe916e6d9e7dec7c6ff0f14aadd2b88d393ea16493c1780405e69ec7876490bf93fd05a8c51a3f58666a4a0 WHIRLPOOL 2494d8e15ee9d08f1001f512fca0bbf13646aead8d73100a003d56c99954fff133ff3c475dd13d458d8eca035949ee0c4c9d4d4f590f72fa55a7c6dbd9c8be6b
+AUX lrzsz-0.12.20-automake-1.13.patch 454 SHA256 e25ebcc294beb5628e9801142a5dc4efb3ed1590f9afb89512cd0e51d2db5a72 SHA512 75b0f707704bb4f788de9f2fbb82c29daaa4b748e151271ba2617d24d759a84dea323f2f160b727e2c94675df78ffe1bd8368dd593d4582cbb567643717ec68e WHIRLPOOL 866e2c9300e69e44948bcc2537e8726148cbb06fcf1a4eefd0fbf9437853a740f8ca1e9d0299df6d557481f88b155c8ddf928edefb0e6ef384367117065894cc
+AUX lrzsz-autotools.patch 8725 SHA256 05efb70cbe0a72a4ff3bfc89f9af05c79c215d7b4ffc7a883cd8ece56e605eb2 SHA512 4ba98fb4a72d8fcc654741d57992598d56eded61e7b89c54d44edd7a609149e15d9948d777d70bf41137daa0b860c67e1212a3f38519434cb5d44546bfb94909 WHIRLPOOL f37457903b0fb0638401edb084aac1ca64bb7e41473c8e25c624c3b0ba363d26b1b61a0334db67f10225696e5e69a0464084ca2a5ce3200ea9e17b0af4773d7e
+AUX lrzsz-implicit-decl.patch 428 SHA256 867e4dc69fc83d0f96bb46d11d44b9575106e199506cf7098be0a5d2d9e39d81 SHA512 7dd642aa6701671986e6ab1635935c7a8088ad5ee74131b7c486e2e87d748fc835798d1a8a291e85a80ba3f88328ce4f293a8dafb1ebd9924f1f31fb2bd3a7d7 WHIRLPOOL f896657ad15689eec5d586e2b2954d32bed9a45583b1c545a80c5a97d4ac1f16cdebbf5232630c5480b55ae71eb841cace4701cbc095eda36809516387480d0c
+DIST lrzsz-0.12.20.tar.gz 280938 SHA256 c28b36b14bddb014d9e9c97c52459852f97bd405f89113f30bee45ed92728ff1 SHA512 9bce64036f1f1c65f5910f19802aecaf3dc5ffeab0feeca10fa8d2fe1b83e212391cce23056d22fd0eda52df89e12ede68eb5d22ffcf22f935910d2af7399f12 WHIRLPOOL 17934730db44d11c08b700cd68d8a1e619612bf158db106ef8e7fc54e623b0c5e98a133870cf8cd0b8f824c3cf24b24f7102725dcf438d307a2e1d3839e0d1d5
+EBUILD lrzsz-0.12.20-r3.ebuild 1584 SHA256 344aa35bdb1f80f10f62abff4c7b163f302cfb039e0188a6587edc06cbda911b SHA512 a3b2600b7f46676398e16bd8920f088093b003b1e5f0ea8cea3ad3ff023be71989f6721c1d798a2e1a8cde560e60570adb05a08603d0915dde9281ad32dcff4f WHIRLPOOL 9f0448a80887a0e66c206a2db52a91319c5537036632447ee416bc24f4483e827141fd96da41ef1d381e0cf3f1dda8bf93660dea6f109f108f6f64f5e2dc7217
+MISC ChangeLog 2722 SHA256 aad47fdec0c1e6d772f0ecff04c6f9e497c1ac5b488428291b63ffe77ffc1e7a SHA512 2fc2002b3030104a7645a89414a48d052e44eca7bdef3470d09c838deee5e37e1ed6246520bf7c969aa29536733383876bdd8992dba2cf3de0c5ebb3e41b4cbc WHIRLPOOL 7fdd57e1bed2ee3efc3e20c1dea969974b84842f8e472db05641fe65c83de6e647d4a9c8789b64d38a7f73f17988ddad5accfa8fd7531861106681ef9bcc3bcd
+MISC ChangeLog-2015 6389 SHA256 5dd07ea33de701dbfea7d8b896874ceefcd67708b2bdf672baf3ab93d001d67e SHA512 90d54acb6cafc47e2291feb8f13c2664b6e879071510c0e0a35e6f7ad00c0d006573396a4749ad21170f4c32bbcdfe5b1084832f40b5adad7acf8c614bbd2dae WHIRLPOOL 9d30aef5977179c77f7628e8958247aa1e2077d09e99fe2d10ae7ff11e94083887ad173be0707ac012a17ea4c4d05ce7e8f588dbc927fdcc1c5b0cd0ab1c3b83
+MISC metadata.xml 359 SHA256 e8474498736cf63d1f9cc72bf7d71e36ab353c7f89fbe545deddefe95a0ee278 SHA512 5e033194af9899fd66ee44372089c3e63a2839a486f845ba139786a862f1b0534902465e776d901155ddffb794e7419f338b4c5ed43d6a8301c98ae8dc24db70 WHIRLPOOL cdbd068ff320731a2f1347af03f6b41517fec30c714fb453f574a8c5fba25c74421ece285b4b776a7946a0e86007eb26b789bcec580f4905f5ea0ec3f02b6ff2
diff --git a/net-dialup/lrzsz/files/lrzsz-0.12.20-automake-1.12.patch b/net-dialup/lrzsz/files/lrzsz-0.12.20-automake-1.12.patch
new file mode 100644
index 000000000000..c5ecdee208d0
--- /dev/null
+++ b/net-dialup/lrzsz/files/lrzsz-0.12.20-automake-1.12.patch
@@ -0,0 +1,28 @@
+--- lrzsz-0.12.20/configure.in
++++ lrzsz-0.12.20/configure.in
+@@ -97,7 +97,6 @@
+ AC_ISC_POSIX
+ AC_USE_SYSTEM_EXTENSIONS
+ AM_GNU_GETTEXT
+-AM_C_PROTOTYPES
+ AC_C_CONST
+ AC_C_INLINE
+
+--- lrzsz-0.12.20/lib/Makefile.am
++++ lrzsz-0.12.20/lib/Makefile.am
+@@ -1,5 +1,4 @@
+ noinst_LIBRARIES=libzmodem.a
+-AUTOMAKE_OPTIONS=ansi2knr
+
+ EXTRA_DIST = alloca.c ansi2knr.1 ansi2knr.c \
+ getopt.c getopt1.c mkdir.c mktime.c \
+--- lrzsz-0.12.20/src/Makefile.am
++++ lrzsz-0.12.20/src/Makefile.am
+@@ -7,7 +7,6 @@
+ DISTCLEAN_FILES=lrzszbug
+
+ LDADD = ../lib/libzmodem.a @INTLLIBS@
+-AUTOMAKE_OPTIONS=ansi2knr
+ EXTRA_DIST = ansi2knr.1 ansi2knr.c lrzszbug.in
+ INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/src -I../intl -I$(top_srcdir)/lib
+ #DEFS = -DLOCALEDIR=\"$(localedir)\" -DOS=\"@host_os@\" -DCPU=\"@host_cpu@\"
diff --git a/net-dialup/lrzsz/files/lrzsz-0.12.20-automake-1.13.patch b/net-dialup/lrzsz/files/lrzsz-0.12.20-automake-1.13.patch
new file mode 100644
index 000000000000..a0d67c9f014f
--- /dev/null
+++ b/net-dialup/lrzsz/files/lrzsz-0.12.20-automake-1.13.patch
@@ -0,0 +1,12 @@
+diff -urN lrzsz-0.12.20/configure.in lrzsz-0.12.20-new/configure.in
+--- lrzsz-0.12.20/configure.in 1998-12-30 16:50:07.000000000 +0900
++++ lrzsz-0.12.20-new/configure.in 2013-04-26 18:53:29.020100620 +0900
+@@ -1,7 +1,7 @@
+ dnl Process this file with autoconf to produce a configure script.
+ AC_INIT(src/crctab.c)
+ AM_INIT_AUTOMAKE(lrzsz, 0.12.20)
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS([config.h])
+
+
+ dnl AC_C_CROSS is in AC_PROG_CC since 2.12
diff --git a/net-dialup/lrzsz/files/lrzsz-autotools.patch b/net-dialup/lrzsz/files/lrzsz-autotools.patch
new file mode 100644
index 000000000000..704af801559e
--- /dev/null
+++ b/net-dialup/lrzsz/files/lrzsz-autotools.patch
@@ -0,0 +1,264 @@
+diff -Nru lrzsz-0.12.20.orig/acinclude.m4 lrzsz-0.12.20/acinclude.m4
+--- lrzsz-0.12.20.orig/acinclude.m4 1998-12-27 23:08:59.000000000 +0100
++++ lrzsz-0.12.20/acinclude.m4 2010-09-25 00:43:43.000000000 +0200
+@@ -13,7 +13,7 @@
+ lrzsz_cv_decl_errno=yes, lrzsz_cv_decl_errno=no)])
+ AC_MSG_RESULT($lrzsz_cv_decl_errno)
+ if test $lrzsz_cv_decl_errno = yes; then
+- AC_DEFINE([HAVE_ERRNO_DECLARATION])
++ AC_DEFINE([HAVE_ERRNO_DECLARATION], 1, [[HAVE_ERRNO_DECLARATION]])
+ fi
+ ])
+
+@@ -57,7 +57,7 @@
+ ], ac_cv_type_speed_t=yes, ac_cv_type_speed_t=no)])dnl
+ AC_MSG_RESULT($ac_cv_type_speed_t)
+ if test $ac_cv_type_speed_t = no; then
+- AC_DEFINE([speed_t],long)
++ AC_DEFINE([speed_t],long, [speed_t])
+ fi
+ ])
+
+@@ -69,7 +69,7 @@
+ #include <sys/select.h>],
+ [struct tm *tp;], lrzsz_cv_header_sys_select=yes, lrzsz_cv_header_sys_select=no)])
+ if test $lrzsz_cv_header_sys_select = no; then
+- AC_DEFINE(SYS_TIME_WITHOUT_SYS_SELECT)
++ AC_DEFINE(SYS_TIME_WITHOUT_SYS_SELECT, 1, [SYS_TIME_WITHOUT_SYS_SELECT])
+ fi
+ ])
+
+diff -Nru lrzsz-0.12.20.orig/configure.in lrzsz-0.12.20/configure.in
+--- lrzsz-0.12.20.orig/configure.in 1998-12-30 08:50:07.000000000 +0100
++++ lrzsz-0.12.20/configure.in 2010-09-25 00:45:10.000000000 +0200
+@@ -20,6 +20,11 @@
+ AC_SUBST(PACKAGE)
+ AC_SUBST(VERSION)
+
++GT_YES="#"
++GT_NO=""
++AC_SUBST(GT_YES)
++AC_SUBST(GT_NO)
++
+ changequote(,)dnl
+ case $VERSION in
+ [0-9]*.[0-9]*.[0-9]*) README_ALPHA="README-alpha";;
+@@ -33,25 +38,25 @@
+ [if test "$enableval" = "no" ; then
+ :
+ else
+- AC_DEFINE(ENABLE_TIMESYNC)
++ AC_DEFINE(ENABLE_TIMESYNC, 1, [ENABLE_TIMESYNC])
+ fi],
+- [AC_DEFINE(ENABLE_TIMESYNC)])
++ [AC_DEFINE(ENABLE_TIMESYNC, 1, [ENABLE_TIMESYNC])])
+ AC_SUBST(ENABLE_TIMESYNC)
+ AC_ARG_ENABLE(pubdir,
+ [--enable-pubdir=/path include support for a public writeable directory],
+ [if test "$enableval" = "no" ; then
+ :
+ else
+- AC_DEFINE_UNQUOTED(PUBDIR,"$enableval")
++ AC_DEFINE_UNQUOTED(PUBDIR,"$enableval", [PUBDIR])
+ fi])
+ AC_ARG_ENABLE(mkdir,
+ [--disable-mkdir disable support for creating directories (lrz)],
+ [if test "$enableval" = "no" ; then
+ :
+ else
+- AC_DEFINE(ENABLE_MKDIR)
++ AC_DEFINE(ENABLE_MKDIR, 1, [ENABLE_MKDIR])
+ fi],
+- [AC_DEFINE(ENABLE_MKDIR)])
++ [AC_DEFINE(ENABLE_MKDIR, 1, [ENABLE_MKDIR])])
+ AC_ARG_ENABLE(syslog,
+ [--enable-syslog=FACILITY,{force,default,optional} include syslogsupport],
+ [
+@@ -62,7 +67,7 @@
+ *,*)
+ level=`echo $enableval|sed -e 's/^.*,//'`
+ fac=`echo $enableval|sed -e 's/,.*$//'`
+- AC_DEFINE_UNQUOTED(ENABLE_SYSLOG,$fac)
++ AC_DEFINE_UNQUOTED(ENABLE_SYSLOG,$fac, [ENABLE_SYSLOG])
+ ;;
+ *)
+ lookup_facility=LOG_UUCP
+@@ -70,16 +75,16 @@
+ ;;
+ esac
+ if test "$level" = "force" ; then
+- AC_DEFINE(ENABLE_SYSLOG_FORCE)
++ AC_DEFINE(ENABLE_SYSLOG_FORCE, 1, [ENABLE_SYSLOG_FORCE])
+ else
+ if test "$level" = "optional" ; then
+ :
+ else
+- AC_DEFINE(ENABLE_SYSLOG_DEFAULT)
++ AC_DEFINE(ENABLE_SYSLOG_DEFAULT, 1, [ENABLE_SYSLOG_DEFAULT])
+ fi
+ fi
+ fi],[
+- AC_DEFINE(ENABLE_SYSLOG_DEFAULT)
++ AC_DEFINE(ENABLE_SYSLOG_DEFAULT, 1, [ENABLE_SYSLOG_DEFAULT])
+ lookup_facility=LOG_UUCP
+ ])
+
+@@ -90,8 +95,8 @@
+ dnl AC_PROG_MAKE_SET included in AM_INIT_AUTOMAKE
+ AC_PROG_RANLIB
+ AC_ISC_POSIX
+-AC_AIX
+-AC_MINIX
++AC_USE_SYSTEM_EXTENSIONS
++AM_GNU_GETTEXT
+ AM_C_PROTOTYPES
+ AC_C_CONST
+ AC_C_INLINE
+@@ -113,7 +118,7 @@
+ fi
+ case "$CFLAGS" in
+ *-Wstrict-prototypes*)
+- AC_DEFINE(STRICT_PROTOTYPES)
++ AC_DEFINE(STRICT_PROTOTYPES, 1, [STRICT_PROTOTYPES])
+ ;;
+ esac
+
+@@ -131,7 +136,7 @@
+ LRZSZ_HEADERS_TERM_IO
+ AC_CHECK_HEADERS(termios.h sys/termios.h termio.h sys/termio.h sgtty.h)
+ AC_CHECK_HEADERS(sys/mman.h utime.h syslog.h sys/syslog.h sys/param.h)
+-AC_CHECK_HEADERS(sys/select.h strings.h arpa/inet.h)
++AC_CHECK_HEADERS(sys/select.h strings.h locale.h arpa/inet.h)
+
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_TYPE_SIZE_T
+@@ -153,7 +158,7 @@
+ dnl AC_FUNC_UTIME_NULL
+ AC_FUNC_MMAP
+ AC_FUNC_ALLOCA
+-AC_EGREP_HEADER([struct.*utimbuf], utime.h, AC_DEFINE(HAVE_STRUCT_UTIMBUF))
++AC_EGREP_HEADER([struct.*utimbuf], utime.h, AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1, [HAVE_STRUCT_UTIMBUF]))
+
+ AC_CHECK_FUNCS(gettimeofday settimeofday)
+ AC_CHECK_FUNCS(strchr memcpy select vprintf)
+@@ -206,10 +211,10 @@
+ lrzsz_cv_sys_ftime_ok=no,
+ lrzsz_cv_sys_ftime_ok=runtime)])
+ case $lrzsz_cv_sys_ftime_ok in
+-yes) AC_DEFINE(HAVE_FTIME) AC_MSG_RESULT(yes) ;;
++yes) AC_DEFINE(HAVE_FTIME, 1, [HAVE_FTIME]) AC_MSG_RESULT(yes) ;;
+ no) AC_MSG_RESULT(no)
+ AC_MSG_WARN(ftime seems to be buggy) ;;
+-runtime) AC_DEFINE(HAVE_FTIME)
++runtime) AC_DEFINE(HAVE_FTIME, 1, [HAVE_FTIME])
+ AC_MSG_RESULT(will check at run time) ;;
+ esac
+ ])
+@@ -223,7 +228,7 @@
+ ])
+ if test $libquark_cv_var_timezone = yes ; then
+ AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_TIMEZONE_VAR)
++ AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [HAVE_TIMEZONE_VAR])
+ else
+ AC_MSG_RESULT(no)
+ fi
+@@ -245,9 +250,9 @@
+ ])
+ if test $lrzsz_cv_lookup_facility = yes ; then
+ AC_MSG_RESULT(yes)
+- AC_DEFINE_UNQUOTED(ENABLE_SYSLOG,$lookup_facility)
++ AC_DEFINE_UNQUOTED(ENABLE_SYSLOG,$lookup_facility, [ENABLE_SYSLOG])
+ else
+- AC_DEFINE(ENABLE_SYSLOG,LOG_USER)
++ AC_DEFINE(ENABLE_SYSLOG,LOG_USER, [ENABLE_SYSLOG])
+ AC_MSG_RESULT(no)
+ fi
+ fi
+@@ -257,9 +262,8 @@
+ AC_SUBST(LDFLAGS)
+ AC_SUBST(LIBS)
+
+-AM_GNU_GETTEXT
+
+-AC_DEFINE_UNQUOTED(LOCALEDIR,"$prefix/$DATADIRNAME")
++AC_DEFINE_UNQUOTED(LOCALEDIR,"$prefix/$DATADIRNAME", [LOCALEDIR])
+ AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
+
+ AC_OUTPUT([Makefile intl/Makefile lib/Makefile testsuite/Makefile \
+diff -Nru lrzsz-0.12.20.orig/lib/Makefile.am lrzsz-0.12.20/lib/Makefile.am
+--- lrzsz-0.12.20.orig/lib/Makefile.am 1998-12-27 17:25:26.000000000 +0100
++++ lrzsz-0.12.20/lib/Makefile.am 2010-09-25 00:43:43.000000000 +0200
+@@ -1,5 +1,4 @@
+ noinst_LIBRARIES=libzmodem.a
+-CFLAGS=@CFLAGS@
+ AUTOMAKE_OPTIONS=ansi2knr
+
+ EXTRA_DIST = alloca.c ansi2knr.1 ansi2knr.c \
+diff -Nru lrzsz-0.12.20.orig/po/Makefile.in.in lrzsz-0.12.20/po/Makefile.in.in
+--- lrzsz-0.12.20.orig/po/Makefile.in.in 1998-04-26 15:22:40.000000000 +0200
++++ lrzsz-0.12.20/po/Makefile.in.in 2010-09-25 00:43:43.000000000 +0200
+@@ -51,7 +51,7 @@
+
+ POTFILES = \
+
+-CATALOGS = @CATALOGS@
++CATALOGS = de.gmo
+ CATOBJEXT = @CATOBJEXT@
+ INSTOBJEXT = @INSTOBJEXT@
+
+@@ -118,8 +118,8 @@
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ case "$$cat" in \
+- *.gmo) destdir=$(gnulocaledir);; \
+- *) destdir=$(localedir);; \
++ *.gmo) destdir=$(DESTDIR)$(gnulocaledir);; \
++ *) destdir=$(DESTDIR)$(localedir);; \
+ esac; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$$destdir/$$lang/LC_MESSAGES; \
+diff -Nru lrzsz-0.12.20.orig/src/Makefile.am lrzsz-0.12.20/src/Makefile.am
+--- lrzsz-0.12.20.orig/src/Makefile.am 1998-12-28 09:38:47.000000000 +0100
++++ lrzsz-0.12.20/src/Makefile.am 2010-09-25 00:43:43.000000000 +0200
+@@ -4,7 +4,6 @@
+ noinst_HEADERS = timing.h zglobal.h zmodem.h
+ datadir = $(prefix)/@DATADIRNAME@
+ localedir = $(datadir)/locale
+-CFLAGS=@CFLAGS@
+ DISTCLEAN_FILES=lrzszbug
+
+ LDADD = ../lib/libzmodem.a @INTLLIBS@
+@@ -14,22 +13,16 @@
+ #DEFS = -DLOCALEDIR=\"$(localedir)\" -DOS=\"@host_os@\" -DCPU=\"@host_cpu@\"
+ DEFS = -DNFGVMIN @DEFS@ -DLOCALEDIR=\"$(localedir)\"
+
+-install-exec-local:
+- rm -f $(DESTDIR)/$(bindir)/`echo lsb | sed -e '$(transform)'`
+- ln $(DESTDIR)/$(bindir)/`echo lsz |sed -e '$(transform)'` \
+- $(DESTDIR)/$(bindir)/`echo lsb |sed -e '$(transform)'`
+- rm -f $(bindir)/`echo lsx | sed -e '$(transform)'`
+- ln $(DESTDIR)/$(bindir)/`echo lsz |sed -e '$(transform)'` \
+- $(DESTDIR)/$(bindir)/`echo lsx |sed -e '$(transform)'`
+- rm -f $(bindir)/`echo lrb | sed -e '$(transform)'`
+- ln $(DESTDIR)/$(bindir)/`echo lrz |sed -e '$(transform)'` \
+- $(DESTDIR)/$(bindir)/`echo lrb |sed -e '$(transform)'`
+- rm -f $(bindir)/`echo lrx | sed -e '$(transform)'`
+- ln $(DESTDIR)/$(bindir)/`echo lrz |sed -e '$(transform)'` \
+- $(DESTDIR)/$(bindir)/`echo lrx |sed -e '$(transform)'`
+-# rm -f $(bindir)/`echo lrzszbug | sed -e '$(transform)'`
+-# ln $(bindir)/`echo lrzszbug |sed -e '$(transform)'` \
+-# $(bindir)/`echo lrzszbug |sed -e '$(transform)'`
++# Caveat: program name transformation is ignored here.
++$(DESTDIR)$(bindir)/lsz $(DESTDIR)$(bindir)/lrz: install-binPROGRAMS
++
++$(DESTDIR)$(bindir)/lsb $(DESTDIR)$(bindir)/lsx: $(DESTDIR)$(bindir)/lsz
++ rm -f $@ ; ln -s `basename $<` $@
++
++$(DESTDIR)$(bindir)/lrb $(DESTDIR)$(bindir)/lrx: $(DESTDIR)$(bindir)/lrz
++ rm -f $@ ; ln -s `basename $<` $@
++
++install-exec-local: $(DESTDIR)$(bindir)/lsb $(DESTDIR)$(bindir)/lsx $(DESTDIR)$(bindir)/lrb $(DESTDIR)$(bindir)/lrx
+
+ uninstall-local:
+ rm -f $(DESTDIR)/$(bindir)/`echo lsb |sed -e '$(transform)'`
diff --git a/net-dialup/lrzsz/files/lrzsz-implicit-decl.patch b/net-dialup/lrzsz/files/lrzsz-implicit-decl.patch
new file mode 100644
index 000000000000..9b1decdba856
--- /dev/null
+++ b/net-dialup/lrzsz/files/lrzsz-implicit-decl.patch
@@ -0,0 +1,21 @@
+--- lrzsz-0.12.20/lib/long-options.c
++++ lrzsz-0.12.20/lib/long-options.c
+@@ -22,6 +22,7 @@
+ #endif
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <getopt.h>
+ #include "long-options.h"
+
+--- lrzsz-0.12.20/src/lsyslog.c
++++ lrzsz-0.12.20/src/lsyslog.c
+@@ -22,6 +22,8 @@
+ #ifdef ENABLE_SYSLOG
++#define _GNU_SOURCE
+ #include "zglobal.h"
+ #include <pwd.h>
++#include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #endif
diff --git a/net-dialup/lrzsz/lrzsz-0.12.20-r3.ebuild b/net-dialup/lrzsz/lrzsz-0.12.20-r3.ebuild
new file mode 100644
index 000000000000..0ebc323bda34
--- /dev/null
+++ b/net-dialup/lrzsz/lrzsz-0.12.20-r3.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+inherit autotools flag-o-matic eutils toolchain-funcs
+
+DESCRIPTION="Communication package providing the X, Y, and ZMODEM file transfer protocols"
+HOMEPAGE="http://www.ohse.de/uwe/software/lrzsz.html"
+SRC_URI="http://www.ohse.de/uwe/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="nls"
+
+DEPEND="nls? ( virtual/libintl )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-autotools.patch
+ epatch "${FILESDIR}"/${PN}-implicit-decl.patch
+ epatch "${FILESDIR}"/${P}-automake-1.12.patch
+ epatch "${FILESDIR}"/${P}-automake-1.13.patch
+
+ # automake is unhappy if this is missing
+ >> config.rpath
+ # This is too old. Remove it so automake puts in a newer copy.
+ rm -f missing
+ # Autoheader does not like seeing this file.
+ rm -f acconfig.h
+
+ eautoreconf
+}
+
+src_configure() {
+ tc-export CC
+ append-flags -Wstrict-prototypes
+ econf $(use_enable nls) || die "econf failed"
+}
+
+src_test() {
+ #Don't use check target.
+ #See bug #120748 before changing this function.
+ make vcheck || die "tests failed"
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ install || die "make install failed"
+
+ local x
+ for x in {r,s}{b,x,z} ; do
+ dosym l${x} /usr/bin/${x}
+ dosym l${x:0:1}z.1 /usr/share/man/man1/${x}.1
+ [ "${x:1:1}" = "z" ] || dosym l${x:0:1}z.1 /usr/share/man/man1/l${x}.1
+ done
+
+ dodoc AUTHORS COMPATABILITY ChangeLog NEWS README* THANKS TODO
+}
diff --git a/net-dialup/lrzsz/metadata.xml b/net-dialup/lrzsz/metadata.xml
new file mode 100644
index 000000000000..bc795c3823a6
--- /dev/null
+++ b/net-dialup/lrzsz/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 type="project">
+ <email>embedded@gentoo.org</email>
+ <name>Embedded Gentoo</name>
+</maintainer>
+<longdescription>Communication package providing the X, Y, and ZMODEM file transfer protocols</longdescription>
+</pkgmetadata>
diff --git a/net-dialup/metadata.xml b/net-dialup/metadata.xml
new file mode 100644
index 000000000000..313bfd552fa4
--- /dev/null
+++ b/net-dialup/metadata.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The net-dialup category contains dialup-related networking software.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie net-dialup enthält Software für Dialup-Verbindungen.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría net-dialup contiene paquetes relacionados con conexiones
+ telefónicas.
+ </longdescription>
+ <longdescription lang="ja">
+ net-dialupカテゴリーにはダイアルアップに関連したネットワーキング・ソフトウェアが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De net-dialup categorie bevat applicaties voor inbelverbindingen.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm net-dialup chứa các phần mềm liên quan đến mạng quay số.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria net-dialup contiene pacchetti per la connessione telefonica dial-up.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria net-dialup contém programas relacionados com
+ conexões telefônicas.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria net-dialup zawiera programy sieciowe związane z połączeniami
+ telefonicznymi (dialup).
+ </longdescription>
+</catmetadata>
+
diff --git a/net-dialup/mgetty/Manifest b/net-dialup/mgetty/Manifest
new file mode 100644
index 000000000000..872bbf6c5ca8
--- /dev/null
+++ b/net-dialup/mgetty/Manifest
@@ -0,0 +1,11 @@
+AUX Lucent.c.patch 814 SHA256 67770841c024a135efe7fffe24028829366b6da74195ccf43c71d7162738b2e2 SHA512 68f5792c2fb3b13330cd78f74f9dc03b5c66665896af01ff6f0df8aa1615985cfe64b332e945508de5cafa9287d00904d32d164ca4d0f7785e5aa8f147e7f882 WHIRLPOOL 2a8daa6e70be09b51f7908b23ca2f05c19d00c5f00e2b0455aa2108d86e6c287b46c3c3f0e5821eb19791770cd231d9d24b9db4a6931208f1dc55f7da92a2f44
+AUX mgetty-1.1.36-callback.patch 991 SHA256 881df3df8299deea291b1d823ccb0c61430c2f1a2b8f0af4b8ae334d9f6ffb44 SHA512 8cb246feddb91683f9438af6975ff6119d8229156a54bd2fac7aed25111079730d65ae1cb94d57fa311d26d420129eb65a8f1250b53f016d5bfeab59202b244b WHIRLPOOL 35727876e2ce2f008ddc6e45fabe1688875b009bf7b81982af6668713a986a0b2a30c6eff1e42eddbc35a3ba8da106effb2650270618079e1a7057816bd700be
+AUX mgetty-1.1.36-tmpfile.patch 796 SHA256 22c99bdcf54fe15458c17ee886d24d7d837b8f5642c022dd5542b77a2f7fce68 SHA512 be58895174a8eae047952a7fee76a7989175ec8169321d1deaa7d8719eeb71d08111cb3677e855a676e16ef58eda6901090ffcd5a5989176be1184adb7f3d2d9 WHIRLPOOL 1a43a3d372ec7dafb03cf380b4df211a6719996eb30959d72407eed475ee682abd0f8ec619f3ea6203e3c41d5213303c73d3a066fee7b4956ba9a03d5d3d0265
+AUX mgetty-1.1.37-gentoo.patch 5835 SHA256 744a4b26d051bca379683c4c7dc594a9cfe6fe75cd52b83395d16ad7fdd427fb SHA512 1975c8f4d96e5c136bf2f2cef236ffc3da27c146ff57bc3703f1de61764b28d7da94680291ee3c54bab6a083ff24315d81fac6ea4c73f815377555f19fac2c2e WHIRLPOOL 2e095b9bbdaf072cdac788a9d3c1d91c19136f6792774cb93c630f86466b359d1a27387de47665053ea6c3d0b72cfabbc5275560d464f3fae03e1bfa20a60fd5
+AUX mgetty-1.1.37-nofax.patch 3613 SHA256 5c0f3ffb17f4b2040f0182b3109dce7083d9c10ba8e6864b7c70eb4e539990b0 SHA512 be64802b24f4fa5b21c97782b8c2f74c8311878ebb48a05d0b0101e8fb3a24f1629780452acd710dade02660b186d494b3363a90e36550dcff9bf0b257bc5c71 WHIRLPOOL 66256b5c2e87f0bf2289663cbf3ee99393c084bd33e7369e83d395dd25c4fc594822cbe97bd55bc560059482019d4fac3a5a54321c0514a9c2357e1c0a475c51
+AUX mgetty-1.1.37-qa-fixes.patch 6029 SHA256 f5bbe6f88f9af94a8515e6eb23fd8a9d0d95f022f28749ed67079b1bfb559767 SHA512 8286d5d11dbf900a28918cc2471ef0170483afc5ae537f8f05b885213fb62b2fa5969a1448229afefe2f6b736148c7e5818ed997ef710360de6f3e2a450b8918 WHIRLPOOL 87decf788f2078814c523964e562a328d566e701830f8a04465109ea5914cd1e8495388c5e7f9937b975a4fa290ac0d6007d2acadb5a540073e6e56b95399851
+DIST mgetty1.1.37-Jun05.tar.gz 1057939 SHA256 6ff8cbc4f8aacd3dd7f247ff96715141bc6173745ea916dd98b8381a85ecdf0e SHA512 577d740c7d209b830bf8e783bf71edb666cb8bbfe8e7dceaa51dda6095d88724715394bcbd24eacfb1c377999f5779b547a7ec79cd9cdc13de6de18c4d857188 WHIRLPOOL f00d22ab213cd00f392ead46804ad1c3b192ae816b7518f1a73b4d65c180ba78fb2f193ceacf1f5aa88aeca4431eecb87e0960f0b6196a7e00247690083e937e
+EBUILD mgetty-1.1.37-r1.ebuild 4879 SHA256 16d7896e34a3aabb25f3872d7100cd5a4c412b131d9f4279d2eadf63ba110996 SHA512 49e8baa2ca76c2751413af6c2a37070f7f7fad458cedd057bcbbd7a3d936df8033089ccd1412e2ba867890cf84277000fde1aa7e981e29e4ed699c4e1db66fb1 WHIRLPOOL fce8ac46c279cbae1d1d7fa0d5c32b28a2ac6f7f6d0130565ac4c58fa53c56e8c0497f7f048870940e2ea91edf2fe26d1e058f19450f66a464ca8b01a6e760b4
+MISC ChangeLog 3172 SHA256 9f12aaccd3a786a49f493194fd931c3c3fb05004b31a05aec8b1d2af47389384 SHA512 d85be240c498ff1012d1ad8cd5aeba6b4a7c56c38a79ea93e4fbad9d17cae698f15d7bf25778827f11db5613c531a032bcf025c282d85a369845a7d7aeb8272f WHIRLPOOL cf0b81c2b914056ac2416cb7056e8f11a5fc22695b37349b24301f5f8c69c921f261c0ff91bd8d0116bc6992ba0509a6b477656cf18eea2d6767740432bd4255
+MISC ChangeLog-2015 17473 SHA256 9127603e6a52d1fe3aa203671b18283c7328874cf11f41c1da29cb5adc1e2eb3 SHA512 c383897eba68bad59428362286b26229e29ff454e378311573472852efebeaab0ff375ef81bdfe35afb053da340db05457b856a459e64e111dcbac13b725d55a WHIRLPOOL a5aa6de36017f87d659fbece1096f2debaaca318648d5780ad5076cae1017d071c55d56534d996a8c64c2310451ea51f85d9fca0b1aff39d30890b197cdf4fce
+MISC metadata.xml 491 SHA256 a2bf7470814bf84ec3f4e6baa35f8042a1a26156b3a2733c3e0f14b79d007ae1 SHA512 e975c8e98834b587752c566c0f52fd16fbbcd1b6b930407d5bf027b5717eb898af0c7c7aff94a31a18a8033d561e934e151f17b1ebbfe406c2cff22f88adba36 WHIRLPOOL 742d512c3c0fb163597b747bdf2f30e8507502deb1507024f5d76d37600f60c55fe09a3eaac7682fd85a339d63d8d69861d9a9331d4a13ef1b01303a2c6058ba
diff --git a/net-dialup/mgetty/files/Lucent.c.patch b/net-dialup/mgetty/files/Lucent.c.patch
new file mode 100644
index 000000000000..35b4b3e0b612
--- /dev/null
+++ b/net-dialup/mgetty/files/Lucent.c.patch
@@ -0,0 +1,17 @@
+diff -Nru mgetty-1.1.31.orig/voice/libvoice/Lucent.c mgetty-1.1.31/voice/libvoice/Lucent.c
+--- mgetty-1.1.31.orig/voice/libvoice/Lucent.c 2004-11-20 16:13:01.000000000 -0500
++++ mgetty-1.1.31/voice/libvoice/Lucent.c 2004-11-20 16:39:11.000000000 -0500
+@@ -96,6 +96,13 @@
+ if (voice_command("AT+VLS=0", "OK") != VMA_USER_1)
+ lprintf(L_WARN, "can't deselect all input/output devices");
+
++ /* the Lucent chips DO support Caller ID, this command is OK */
++ /* Just borrowed from the V253modem.c file */
++ /* enable callerid (if supported) and setformat */
++ if (voice_command("AT+VCID=1", "OK") != VMA_USER_1)
++ lprintf(L_WARN, "can't set caller ID output");
++ /* mgetty supports formated callerid output */
++
+ voice_modem_state = IDLE;
+ return(OK);
+ }
diff --git a/net-dialup/mgetty/files/mgetty-1.1.36-callback.patch b/net-dialup/mgetty/files/mgetty-1.1.36-callback.patch
new file mode 100644
index 000000000000..fcd4e0e2cd48
--- /dev/null
+++ b/net-dialup/mgetty/files/mgetty-1.1.36-callback.patch
@@ -0,0 +1,26 @@
+diff -Nru mgetty-1.1.36.orig/Makefile mgetty-1.1.36/Makefile
+--- mgetty-1.1.36.orig/Makefile 2007-09-14 22:15:02.000000000 +0300
++++ mgetty-1.1.36/Makefile 2007-09-14 22:15:37.000000000 +0300
+@@ -164,7 +164,7 @@
+ #
+ # if your systems doesn't have one, use the shell script that I provide
+ # in "inst.sh" (taken from X11R5). Needed on IRIX5.2
+-INSTALL=install -c -o bin -g bin
++INSTALL=install -c
+ #INSTALL=install -c -o root -g wheel # NeXT/BSD
+ #INSTALL=/usr/ucb/install -c -o bin -g bin # AIX, Solaris 2.x
+ #INSTALL=installbsd -c -o bin -g bin # OSF/1, AIX 4.1, 4.2
+@@ -693,6 +693,13 @@
+
+ install-vgetty: vgetty-install
+
++install-callback:
++ cd callback; $(MAKE) CFLAGS="$(CFLAGS)" CC="$(CC)" LDFLAGS="$(LDFLAGS)" \
++ BINDIR="$(BINDIR)" SBINDIR="$(SBINDIR)" LIBDIR="$(LIBDIR)" \
++ CONFDIR="$(CONFDIR)" MAN1DIR="$(MAN1DIR)" MAN8DIR="$(MAN8DIR)" INSTALL="$(INSTALL)" \
++ LN="$(LN)" MV="$(MV)" RM="$(RM)" \
++ LIBS="$(LIBS)" install
++
+ ## test suite
+ test: bin-all
+ for D in g3 t ; do \
diff --git a/net-dialup/mgetty/files/mgetty-1.1.36-tmpfile.patch b/net-dialup/mgetty/files/mgetty-1.1.36-tmpfile.patch
new file mode 100644
index 000000000000..68f6f58868d7
--- /dev/null
+++ b/net-dialup/mgetty/files/mgetty-1.1.36-tmpfile.patch
@@ -0,0 +1,33 @@
+diff -Nru mgetty-1.1.36.orig/fax/faxspool.in mgetty-1.1.36/fax/faxspool.in
+--- mgetty-1.1.36.orig/fax/faxspool.in 2008-12-09 23:12:31.000000000 +0000
++++ mgetty-1.1.36/fax/faxspool.in 2008-12-09 23:13:28.000000000 +0000
+@@ -675,9 +675,8 @@
+ if [ x$file = x- ]
+ then
+ $echo "spooling $file (stdin)..."
+- trap "rm /tmp/faxsp.$$" 0
+- cat - >/tmp/faxsp.$$
+- file=/tmp/faxsp.$$
++ file=$spooldir/faxsp
++ cat - > $file
+ else
+ $echo "spooling $file..."
+ fi
+@@ -924,7 +923,7 @@
+ then
+ $echo "\nnothing to do (no cover page, no data)." >&2
+ cd $FAX_SPOOL_OUT
+- rmdir $spooldir
++ rm -rf $spooldir
+ exit 52
+ fi
+
+@@ -965,7 +964,7 @@
+ # clean up
+ rm $job.q
+ cd ..
+-rmdir $spooldir
++rm -rf $spooldir
+
+ if [ -z "`find $LAST_RUN -ctime -1 -print 2>/dev/null`" ]
+ then
diff --git a/net-dialup/mgetty/files/mgetty-1.1.37-gentoo.patch b/net-dialup/mgetty/files/mgetty-1.1.37-gentoo.patch
new file mode 100644
index 000000000000..8f0c004d6011
--- /dev/null
+++ b/net-dialup/mgetty/files/mgetty-1.1.37-gentoo.patch
@@ -0,0 +1,172 @@
+diff -Nru mgetty-1.1.37.orig/callback/Makefile mgetty-1.1.37/callback/Makefile
+--- mgetty-1.1.37.orig/callback/Makefile 2007-09-14 23:03:32.000000000 +0300
++++ mgetty-1.1.37/callback/Makefile 2007-09-14 23:02:58.000000000 +0300
+@@ -37,7 +37,7 @@
+ # install programs
+ #
+ install: all
+- $(INSTALL) -s -m 700 -o root callback $(SBINDIR)
+- $(INSTALL) -s -m 4711 -o root ct $(BINDIR)
++ $(INSTALL) -m 700 -o root callback $(SBINDIR)
++ $(INSTALL) -m 4711 -o root ct $(BINDIR)
+
+ # source modules
+diff -Nru mgetty-1.1.37.orig/doc/mgetty.texi-in mgetty-1.1.37/doc/mgetty.texi-in
+--- mgetty-1.1.37.orig/doc/mgetty.texi-in 2007-09-14 23:03:32.000000000 +0300
++++ mgetty-1.1.37/doc/mgetty.texi-in 2007-09-14 23:02:58.000000000 +0300
+@@ -19,6 +19,11 @@
+ Copyright @copyright{} 1993-2005 Gert Doering
+ @end ifinfo
+
++@dircategory User
++@direntry
++* MGETTY: (mgetty). Modem+Voice+Fax utilities
++@end direntry
++
+ @titlepage
+ @sp 6
+ @center @titlefont{mgetty+sendfax}
+diff -Nru mgetty-1.1.37.orig/fax/faxspool.in mgetty-1.1.37/fax/faxspool.in
+--- mgetty-1.1.37.orig/fax/faxspool.in 2007-09-14 23:03:32.000000000 +0300
++++ mgetty-1.1.37/fax/faxspool.in 2007-09-14 23:02:58.000000000 +0300
+@@ -390,7 +390,7 @@
+
+ #
+ # convert pdf data
+-# needs GNU GhostScript and Adobe acroread installed.
++# needs GNU GhostScript installed.
+ # For driver selection, see definition of GS_DRIVER_{HI,LO} above.
+ #
+ # contributed by mfvm@gmx.de (Michael Fischer v. Mollard)
+@@ -401,7 +401,7 @@
+ test X$3 = X-n && driver="$GS_DRIVER_LO"
+
+ cat $1 |
+- acroread -toPostScript |
++ pdf2ps -sOutputFile=- - |
+ gs $driver -sOutputFile=$2%03d -dNOPAUSE -q -dSAFER -
+ }
+
+diff -Nru mgetty-1.1.37.orig/frontends/X11/viewfax/Makefile mgetty-1.1.37/frontends/X11/viewfax/Makefile
+--- mgetty-1.1.37.orig/frontends/X11/viewfax/Makefile 2007-09-14 23:03:32.000000000 +0300
++++ mgetty-1.1.37/frontends/X11/viewfax/Makefile 2007-09-14 23:02:58.000000000 +0300
+@@ -61,7 +61,7 @@
+ g3hack: g3hack.c
+
+ install: viewfax
+- $(INSTALL) -s -m 755 viewfax $(BINDIR)
++ $(INSTALL) -m 755 viewfax $(BINDIR)
+ $(INSTALL) -m 644 viewfax.man $(MANDIR)/viewfax.1
+ $(INSTALL) -m 644 viewfax.tif $(LIBDIR)
+
+diff -Nru mgetty-1.1.37.orig/g3/Makefile mgetty-1.1.37/g3/Makefile
+--- mgetty-1.1.37.orig/g3/Makefile 2007-09-14 23:03:32.000000000 +0300
++++ mgetty-1.1.37/g3/Makefile 2007-09-14 23:02:58.000000000 +0300
+@@ -37,13 +37,13 @@
+ # install programs
+ #
+ for f in $(G3_PROGRAMS) ; do \
+- $(INSTALL) -s -m 755 $$f $(BINDIR) ; \
++ $(INSTALL) -m 755 $$f $(BINDIR) ; \
+ done
+ #
+ # make symlink for "g3topbm" (so third-party fax viewers won't fail)
+-#
+- -cd $(BINDIR) ; \
+- test -x g3topbm || ln -s g32pbm g3topbm
++# Note for Gentoo: following lines will create collision with netpbm if netpbm is installed after
++# -cd $(BINDIR) ; \
++# test -x g3topbm || ln -s g32pbm g3topbm
+
+
+ # test suite
+diff -Nru mgetty-1.1.37.orig/Makefile mgetty-1.1.37/Makefile
+--- mgetty-1.1.37.orig/Makefile 2007-09-14 23:03:32.000000000 +0300
++++ mgetty-1.1.37/Makefile 2007-09-14 23:02:58.000000000 +0300
+@@ -282,7 +282,7 @@
+ # please use the "mg.echo" program provided in the compat/ subdirectory.
+ # Set ECHO="mg.echo" and INSTALL_MECHO to mg.echo
+ #
+-ECHO="echo"
++ECHO="echo -e"
+ #
+ # INSTALL_MECHO=mg.echo
+
+@@ -596,12 +596,8 @@
+ $(INSTALL) -m 755 newslock $(BINDIR)
+
+ -test -d $(SBINDIR) || ( ./mkidirs $(SBINDIR) ; chmod 755 $(SBINDIR) )
+- if [ -f $(SBINDIR)/mgetty ] ; then \
+- mv -f $(SBINDIR)/mgetty $(SBINDIR)/mgetty.old ; fi
+- if [ -f $(SBINDIR)/sendfax ] ; then \
+- mv -f $(SBINDIR)/sendfax $(SBINDIR)/sendfax.old ; fi
+- $(INSTALL) -s -m 700 mgetty $(SBINDIR)
+- $(INSTALL) -s -m 755 sendfax $(SBINDIR)
++ $(INSTALL) -m 700 mgetty $(SBINDIR)
++ $(INSTALL) -m 755 sendfax $(SBINDIR)
+ #
+ # data files + directories
+ #
+@@ -663,7 +661,7 @@
+ if [ ! -z "$(INSTALL_MECHO)" ] ; then \
+ cd compat ; \
+ $(CC) $(CFLAGS) -o mg.echo mg.echo.c && \
+- $(INSTALL) -s -m 755 mg.echo $(BINDIR) ; \
++ $(INSTALL) -m 755 mg.echo $(BINDIR) ; \
+ fi
+
+ #
+diff -Nru mgetty-1.1.37.orig/mgetty.cfg.in mgetty-1.1.37/mgetty.cfg.in
+--- mgetty-1.1.37.orig/mgetty.cfg.in 2003-11-17 21:09:41.000000000 +0200
++++ mgetty-1.1.37/mgetty.cfg.in 2007-09-14 23:02:58.000000000 +0300
+@@ -20,16 +20,16 @@
+ # access the modem(s) with @SPEED@ bps
+ speed @SPEED@
+
+-# use these options to make the /dev/tty-device owned by "uucp.uucp"
++# use these options to make the /dev/tty-device owned by "fax.fax"
+ # and mode "rw-rw-r--" (0664). *LEADING ZERO NEEDED!*
+-#port-owner uucp
+-#port-group uucp
++#port-owner fax
++#port-group fax
+ #port-mode 0664
+
+-# use these options to make incoming faxes owned by "root.uucp"
++# use these options to make incoming faxes owned by "root.fax"
+ # and mode "rw-r-----" (0640). *LEADING ZERO NEEDED!*
+ #fax-owner root
+-#fax-group uucp
++#fax-group fax
+ #fax-mode 0640
+
+
+diff -Nru mgetty-1.1.37.orig/voice/Makefile mgetty-1.1.37/voice/Makefile
+--- mgetty-1.1.37.orig/voice/Makefile 2007-09-14 23:03:32.000000000 +0300
++++ mgetty-1.1.37/voice/Makefile 2007-09-14 23:02:58.000000000 +0300
+@@ -85,6 +85,7 @@
+ @echo ""
+ $(INSTALL) -m 700 vgetty/vgetty $(SBINDIR)
+ $(INSTALL) -m 755 vm/vm $(BINDIR)
++ $(INSTALL) -m 644 voice.conf-dist $(CONFDIR)/voice.conf
+ for i in $(PVFTOOLS); \
+ do \
+ $(INSTALL) -m 755 pvftools/$$i $(BINDIR); \
+diff -Nru mgetty-1.1.37.orig/voice/voice.conf-dist mgetty-1.1.37/voice/voice.conf-dist
+--- mgetty-1.1.37.orig/voice/voice.conf-dist 2005-03-19 18:10:20.000000000 +0200
++++ mgetty-1.1.37/voice/voice.conf-dist 2007-09-14 23:02:58.000000000 +0300
+@@ -47,11 +47,11 @@
+ voice_dir /var/spool/voice
+
+ #
+-# incoming messages are owned by "root.phone" and mode "rw-rw----" (0660)
++# incoming messages are owned by "fax:fax" and mode "rw-rw----" (0660)
+ #
+
+-phone_owner root
+-phone_group phone
++phone_owner fax
++phone_group fax
+ phone_mode 0660
+
+ #
diff --git a/net-dialup/mgetty/files/mgetty-1.1.37-nofax.patch b/net-dialup/mgetty/files/mgetty-1.1.37-nofax.patch
new file mode 100644
index 000000000000..6636526b691e
--- /dev/null
+++ b/net-dialup/mgetty/files/mgetty-1.1.37-nofax.patch
@@ -0,0 +1,110 @@
+diff -Nru mgetty-1.1.37.orig/doc/Makefile mgetty-1.1.37/doc/Makefile
+--- mgetty-1.1.37.orig/doc/Makefile 2007-11-25 09:31:56.000000000 +0200
++++ mgetty-1.1.37/doc/Makefile 2007-11-25 09:28:02.000000000 +0200
+@@ -6,11 +6,10 @@
+ NROFF=nroff
+ #
+ #
+-MAN1PAGES=g32pbm.1 g3cat.1 pbm2g3.1 sff2g3.1 fax.1 \
+- faxspool.1 faxrunq.1 faxq.1 faxrm.1 coverpg.1
++MAN1PAGES=
+ MAN4PAGES=mgettydefs.4
+-MAN5PAGES=faxqueue.5
+-MAN8PAGES=sendfax.8 mgetty.8 callback.8 faxrunqd.8 faxq-helper.8
++MAN5PAGES=
++MAN8PAGES=mgetty.8 callback.8
+ MANSRC=$(MAN1PAGES) $(MAN4PAGES) $(MAN5PAGES) $(MAN8PAGES)
+ MAN1DIR=/usr/local/man/man1
+ MAN4DIR=/usr/local/man/man4
+diff -Nru mgetty-1.1.37.orig/Makefile mgetty-1.1.37/Makefile
+--- mgetty-1.1.37.orig/Makefile 2007-11-25 09:31:58.000000000 +0200
++++ mgetty-1.1.37/Makefile 2007-11-25 09:34:45.000000000 +0200
+@@ -324,7 +324,7 @@
+
+ all: bin-all doc-man-only
+
+-bin-all: mgetty sendfax newslock sedscript subdirs call-back
++bin-all: mgetty newslock sedscript subdirs call-back
+
+ # a few C files need extra compiler arguments
+
+@@ -369,9 +369,7 @@
+ # subdirectories...
+
+ subdirs: sedscript
+- cd g3 && $(MAKE) "CC=$(CC)" "CFLAGS=$(CFLAGS) -I.." "LDFLAGS=$(LDFLAGS)" "LIBS=$(LIBS)" all
+ cd tools && $(MAKE) "CC=$(CC)" "CFLAGS=$(CFLAGS) -I.." "LDFLAGS=$(LDFLAGS)" "LIBS=$(LIBS)" all
+- cd fax && $(MAKE) "CC=$(CC)" "CFLAGS=$(CFLAGS) -I.." "LDFLAGS=$(LDFLAGS)" "LIBS=$(LIBS)" "FAX_SPOOL_OUT=$(FAX_SPOOL_OUT)" "FAX_OUT_USER=$(FAX_OUT_USER)" "CONFDIR=$(CONFDIR)" all
+
+ call-back:
+ @$(MAKE) mgetty
+@@ -597,7 +595,6 @@
+
+ -test -d $(SBINDIR) || ( ./mkidirs $(SBINDIR) ; chmod 755 $(SBINDIR) )
+ $(INSTALL) -m 700 mgetty $(SBINDIR)
+- $(INSTALL) -m 755 sendfax $(SBINDIR)
+ #
+ # data files + directories
+ #
+@@ -609,12 +606,8 @@
+ $(INSTALL) -o root -m 600 login.config $(CONFDIR)/
+ test -f $(CONFDIR)/mgetty.config || \
+ $(INSTALL) -o root -m 600 mgetty.config $(CONFDIR)/
+- test -f $(CONFDIR)/sendfax.config || \
+- $(INSTALL) -o root -m 644 sendfax.config $(CONFDIR)/
+ test -f $(CONFDIR)/dialin.config || \
+ $(INSTALL) -o root -m 600 dialin.config $(CONFDIR)/
+- test -f $(CONFDIR)/faxrunq.config || \
+- $(INSTALL) -o root -m 644 faxrunq.config $(CONFDIR)/
+ #
+ # test for outdated stuff
+ #
+@@ -626,34 +626,6 @@
+ echo "" ;\
+ fi
+ #
+-# fax spool directories
+-#
+- test -d $(spool) || \
+- ( ./mkidirs $(spool) && chmod 755 $(spool) )
+- test -d $(FAX_SPOOL) || \
+- ( ./mkidirs $(FAX_SPOOL) && \
+- chown $(FAX_OUT_USER) $(FAX_SPOOL) && \
+- chmod 755 $(FAX_SPOOL) )
+- test -d $(FAX_SPOOL_IN) || \
+- ( ./mkidirs $(FAX_SPOOL_IN) && chmod 755 $(FAX_SPOOL_IN) )
+- test -d $(FAX_SPOOL_OUT) || \
+- ./mkidirs $(FAX_SPOOL_OUT)
+- chown $(FAX_OUT_USER) $(FAX_SPOOL_OUT)
+- chmod 755 $(FAX_SPOOL_OUT)
+-#
+-# g3 tool programs
+-#
+- cd g3 && $(MAKE) install INSTALL="$(INSTALL)" \
+- BINDIR=$(BINDIR) \
+- LIBDIR=$(LIBDIR) CONFDIR=$(CONFDIR)
+-#
+-# fax programs / scripts / font file
+-#
+- cd fax && $(MAKE) install INSTALL="$(INSTALL)" \
+- FAX_OUT_USER=$(FAX_OUT_USER) \
+- BINDIR=$(BINDIR) SBINDIR=$(SBINDIR) \
+- LIBDIR=$(LIBDIR) CONFDIR=$(CONFDIR)
+-#
+ # compatibility
+ #
+ if [ ! -z "$(INSTALL_MECHO)" ] ; then \
+diff -Nru mgetty-1.1.37.orig/t/Makefile mgetty-1.1.37/t/Makefile
+--- mgetty-1.1.37.orig/t/Makefile 2006-09-26 01:32:10.000000000 +0300
++++ mgetty-1.1.37/t/Makefile 2007-11-25 09:32:28.000000000 +0200
+@@ -8,8 +8,8 @@
+ CFLAGS=-O2 -I.. -g #-DT_LOG_VERBOSE
+
+ TEST_PROGRAMS=t_config t_ring
+-TEST_HELP_PGM=t_g3f_c
+-TEST_SCRIPTS=t_echo t_trap t_g3file
++TEST_HELP_PGM=
++TEST_SCRIPTS=t_echo t_trap
+
+ test: $(TEST_PROGRAMS) $(TEST_HELP_PGM)
+ @for f in $(TEST_PROGRAMS) ; \
diff --git a/net-dialup/mgetty/files/mgetty-1.1.37-qa-fixes.patch b/net-dialup/mgetty/files/mgetty-1.1.37-qa-fixes.patch
new file mode 100644
index 000000000000..e803b4243155
--- /dev/null
+++ b/net-dialup/mgetty/files/mgetty-1.1.37-qa-fixes.patch
@@ -0,0 +1,175 @@
+diff -Nru mgetty-1.1.37.orig/doc/Makefile mgetty-1.1.37/doc/Makefile
+--- mgetty-1.1.37.orig/doc/Makefile 2006-02-22 18:35:02.000000000 +0100
++++ mgetty-1.1.37/doc/Makefile 2009-08-31 20:31:01.000000000 +0200
+@@ -64,7 +64,7 @@
+
+ install: $(MANSRC) mgetty.info
+ for D in `dirname $(MAN1DIR)` $(MAN1DIR) $(MAN4DIR) $(MAN5DIR) $(MAN8DIR) ; do \
+- if [ ! -d $$D ] ; then mkdir $$D || exit 1 ; fi ; \
++ if [ ! -d $$D ] ; then mkdir -p $$D || exit 1 ; fi ; \
+ done
+ for i in $(MAN1PAGES) ; do \
+ $(INSTALL) -m 644 $$i $(MAN1DIR) ; \
+@@ -122,16 +122,16 @@
+ #
+ .SUFFIXES: .1in .4in .5in .8in .1 .4 .5 .8
+
+-.1in.1:
++.1in.1: ../sedscript
+ ../sedscript <$< >$*.1
+
+-.4in.4:
++.4in.4: ../sedscript
+ ../sedscript <$< >$*.4
+
+-.5in.5:
++.5in.5: ../sedscript
+ ../sedscript <$< >$*.5
+
+-.8in.8:
++.8in.8: ../sedscript
+ ../sedscript <$< >$*.8
+
+ #
+diff -Nru mgetty-1.1.37.orig/fax/Makefile mgetty-1.1.37/fax/Makefile
+--- mgetty-1.1.37.orig/fax/Makefile 2006-02-22 18:25:30.000000000 +0100
++++ mgetty-1.1.37/fax/Makefile 2009-08-31 20:31:01.000000000 +0200
+@@ -36,7 +36,7 @@
+ @cd .. ; $(MAKE) sedscript
+
+ faxq-helper: faxq-helper.o
+- $(CC) $(CFLAGS) -o faxq-helper faxq-helper.o
++ $(CC) $(LDLAGS) -o faxq-helper faxq-helper.o
+
+ faxq-helper.o: faxq-helper.c ../sedscript
+ $(CC) $(CFLAGS) -DFAX_SPOOL_OUT=\"$(FAX_SPOOL_OUT)\" \
+diff -Nru mgetty-1.1.37.orig/fax_lib.h mgetty-1.1.37/fax_lib.h
+--- mgetty-1.1.37.orig/fax_lib.h 2007-06-15 08:44:36.000000000 +0200
++++ mgetty-1.1.37/fax_lib.h 2009-08-31 20:31:01.000000000 +0200
+@@ -41,6 +41,7 @@
+ int fax_set_fdcc _PROTO(( int fd, int fine, int maxsp, int minsp ));
+ int fax_set_bor _PROTO(( int fd, int bit_order ));
+ int fax_set_flowcontrol _PROTO(( int fd, int hw_flow ));
++void fax_init_swaptable _PROTO(( int direct, unsigned char byte_tab[] ));
+ int mdm_identify _PROTO(( int fd ));
+ void fax2_incoming_nsf _PROTO(( char * nsf_hex ));
+ void fax1_incoming_nsf _PROTO(( uch * nsf_bin, int len ));
+diff -Nru mgetty-1.1.37.orig/frontends/www/Makefile mgetty-1.1.37/frontends/www/Makefile
+--- mgetty-1.1.37.orig/frontends/www/Makefile 2006-02-22 18:25:32.000000000 +0100
++++ mgetty-1.1.37/frontends/www/Makefile 2009-08-31 20:31:01.000000000 +0200
+@@ -125,12 +125,12 @@
+ #
+ .SUFFIXES: .in .cgi .html
+
+-.in.cgi:
++.in.cgi: ../../sedscript
+ rm -f $*.cgi
+ ../../sedscript <$< >$*.cgi
+ chmod +x $*.cgi
+
+-.in.html:
++.in.html: ../../sedscript
+ rm -f $*.html
+ ../../sedscript <$< | \
+ sed -e "s!@CGI_HREF@!$(CGI_HREF)!" >$*.html
+diff -Nru mgetty-1.1.37.orig/logfile.c mgetty-1.1.37/logfile.c
+--- mgetty-1.1.37.orig/logfile.c 2005-11-26 14:48:16.000000000 +0100
++++ mgetty-1.1.37/logfile.c 2009-08-31 20:31:01.000000000 +0200
+@@ -58,10 +58,10 @@
+ /* Most systems have these variables but do not declare them. On many
+ of those systems that _do_ declare them, it won't hurt */
+
+-#if !defined(__NetBSD__) && !defined( __FreeBSD__ ) && !defined(__OpenBSD__) && !defined(__GLIBC__) && !defined(__MACH__)
++/*#if !defined(__NetBSD__) && !defined( __FreeBSD__ ) && !defined(__OpenBSD__) && !defined(__GLIBC__) && !defined(__MACH__)
+ extern int sys_nerr;
+ extern char *sys_errlist[];
+-#endif
++#endif*/
+
+ /* Interactive Unix is a little bit braindead - does not have atexit(),
+ */
+@@ -211,6 +211,7 @@
+ va_list pvar;
+ int errnr;
+ char * p;
++char *error_string;
+ static int first_open = TRUE;
+
+ if ( level > log_level ) /* log level high enough? */
+@@ -327,12 +328,20 @@
+ }
+ else /* ERROR or FATAL */
+ {
++ error_string = strerror (errnr);
++ if ( error_string == NULL )
++ {
++ if ( errno == EINVAL )
++ error_string = "<error not in list>";
++ else
++ error_string = "<error calling strerror()>";
++ }
++
+ fprintf(log_fp, "\n%02d/%02d %02d:%02d:%02d %s %s: %s",
+ tm->tm_mon+1, tm->tm_mday,
+ tm->tm_hour, tm->tm_min, tm->tm_sec,
+ log_infix, ws,
+- ( errnr <= sys_nerr ) ? sys_errlist[errnr]:
+- "<error not in list>" );
++ strerror (errnr));
+ #ifdef SYSLOG
+ syslog( level == L_FATAL? LOG_ALERT: LOG_ERR, "%s: %m", ws );
+ #endif
+diff -Nru mgetty-1.1.37.orig/Makefile mgetty-1.1.37/Makefile
+--- mgetty-1.1.37.orig/Makefile 2009-08-31 20:30:33.000000000 +0200
++++ mgetty-1.1.37/Makefile 2009-08-31 20:32:08.000000000 +0200
+@@ -368,7 +368,7 @@
+
+ # subdirectories...
+
+-subdirs:
++subdirs: sedscript
+ cd g3 && $(MAKE) "CC=$(CC)" "CFLAGS=$(CFLAGS) -I.." "LDFLAGS=$(LDFLAGS)" "LIBS=$(LIBS)" all
+ cd tools && $(MAKE) "CC=$(CC)" "CFLAGS=$(CFLAGS) -I.." "LDFLAGS=$(LDFLAGS)" "LIBS=$(LIBS)" all
+ cd fax && $(MAKE) "CC=$(CC)" "CFLAGS=$(CFLAGS) -I.." "LDFLAGS=$(LDFLAGS)" "LIBS=$(LIBS)" "FAX_SPOOL_OUT=$(FAX_SPOOL_OUT)" "FAX_OUT_USER=$(FAX_OUT_USER)" "CONFDIR=$(CONFDIR)" all
+@@ -633,15 +633,15 @@
+ # fax spool directories
+ #
+ test -d $(spool) || \
+- ( mkdir $(spool) && chmod 755 $(spool) )
++ ( ./mkidirs $(spool) && chmod 755 $(spool) )
+ test -d $(FAX_SPOOL) || \
+- ( mkdir $(FAX_SPOOL) && \
++ ( ./mkidirs $(FAX_SPOOL) && \
+ chown $(FAX_OUT_USER) $(FAX_SPOOL) && \
+ chmod 755 $(FAX_SPOOL) )
+ test -d $(FAX_SPOOL_IN) || \
+- ( mkdir $(FAX_SPOOL_IN) && chmod 755 $(FAX_SPOOL_IN) )
++ ( ./mkidirs $(FAX_SPOOL_IN) && chmod 755 $(FAX_SPOOL_IN) )
+ test -d $(FAX_SPOOL_OUT) || \
+- mkdir $(FAX_SPOOL_OUT)
++ ./mkidirs $(FAX_SPOOL_OUT)
+ chown $(FAX_OUT_USER) $(FAX_SPOOL_OUT)
+ chmod 755 $(FAX_SPOOL_OUT)
+ #
+diff -Nru mgetty-1.1.37.orig/t/t_g3f_c.c mgetty-1.1.37/t/t_g3f_c.c
+--- mgetty-1.1.37.orig/t/t_g3f_c.c 2007-05-05 14:03:03.000000000 +0200
++++ mgetty-1.1.37/t/t_g3f_c.c 2009-08-31 20:31:01.000000000 +0200
+@@ -19,6 +19,7 @@
+ #include "fax_lib.h"
+
+ #include <stdio.h>
++#include <unistd.h>
+ #include <signal.h>
+ #include <errno.h>
+ #include <stdlib.h>
+diff -Nru mgetty-1.1.37.orig/t/t_ring.c mgetty-1.1.37/t/t_ring.c
+--- mgetty-1.1.37.orig/t/t_ring.c 2005-03-23 10:56:21.000000000 +0100
++++ mgetty-1.1.37/t/t_ring.c 2009-08-31 20:31:01.000000000 +0200
+@@ -24,6 +24,7 @@
+
+ #include "mgetty.h"
+ #include <stdio.h>
++#include <string.h>
+ #include <signal.h>
+ #include <errno.h>
+ #ifdef T_LOG_VERBOSE
diff --git a/net-dialup/mgetty/metadata.xml b/net-dialup/mgetty/metadata.xml
new file mode 100644
index 000000000000..d1a981dc9572
--- /dev/null
+++ b/net-dialup/mgetty/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+<longdescription>Suite of programs that allows you to take full advantage of your voice/fax modem.
+mgetty is capable of handling data, fax and voice calls without interfering with outgoing calls.</longdescription>
+<use>
+ <flag name="fax">Enables fax support</flag>
+ <flag name="fidonet">Enables FidoNet support</flag>
+</use>
+</pkgmetadata>
diff --git a/net-dialup/mgetty/mgetty-1.1.37-r1.ebuild b/net-dialup/mgetty/mgetty-1.1.37-r1.ebuild
new file mode 100644
index 000000000000..f071ac4d388e
--- /dev/null
+++ b/net-dialup/mgetty/mgetty-1.1.37-r1.ebuild
@@ -0,0 +1,163 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils flag-o-matic toolchain-funcs user
+
+DESCRIPTION="fax and voice modem programs"
+SRC_URI="ftp://mgetty.greenie.net/pub/mgetty/source/1.1/${PN}${PV}-Jun05.tar.gz"
+HOMEPAGE="http://mgetty.greenie.net/"
+
+DEPEND="doc? ( virtual/latex-base virtual/texi2dvi )
+ >=sys-apps/sed-4
+ sys-apps/groff
+ dev-lang/perl
+ sys-apps/texinfo
+ virtual/awk
+ fax? (
+ !net-misc/efax
+ !net-misc/hylafax
+ )"
+RDEPEND="${DEPEND}
+ fax? ( media-libs/netpbm app-text/ghostscript-gpl )"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ~ppc64 sparc x86"
+IUSE="doc +fax fidonet"
+
+pkg_setup() {
+ enewgroup fax
+ enewuser fax -1 -1 /dev/null fax
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-gentoo.patch"
+ epatch "${FILESDIR}/${P}-qa-fixes.patch"
+ epatch "${FILESDIR}/${PN}-1.1.36-callback.patch" # add callback install to Makefile
+ epatch "${FILESDIR}/Lucent.c.patch" # Lucent modem CallerID patch - bug #80366
+ use fax || epatch "${FILESDIR}/${P}-nofax.patch" # don't install fax related files - bug #195467
+ epatch "${FILESDIR}/${PN}-1.1.36-tmpfile.patch" # fix security bug 235806
+
+ sed -e 's:var/log/mgetty:var/log/mgetty/mgetty:' \
+ -e 's:var/log/sendfax:var/log/mgetty/sendfax:' \
+ -e 's:\/\* \(\#define CNDFILE "dialin.config"\) \*\/:\1:' \
+ -e 's:\(\#define FAX_NOTIFY_PROGRAM\).*:\1 "/etc/mgetty+sendfax/new_fax":' \
+ policy.h-dist > policy.h || die 'creating policy.h failed'
+
+ sed -i -e 's:/usr/local/lib/mgetty+sendfax:/etc/mgetty+sendfax:' faxrunq.config || die 'changing mgetty config dir failed'
+ sed -i -e 's:/usr/local/bin/g3cat:/usr/bin/g3cat:' faxrunq.config fax/faxspool.rules || die 'changing g3cat path failed'
+
+ sed -e "/^doc-all:/s/mgetty.asc mgetty.info mgetty.dvi mgetty.ps/mgetty.info/" \
+ -i doc/Makefile || die 'first sed on doc/Makefile failed'
+ if use doc; then
+ sed -i \
+ -e "s/^doc-all:/doc-all: mgetty.ps/" \
+ -e "s/^all:/all: doc-all/" \
+ doc/Makefile || die 'second sed on doc/Makefile failed'
+ fi
+
+ # Support user's CFLAGS and LDFLAGS.
+ sed -e "s/\$(CFLAGS) -o newslock/${CFLAGS} ${LDFLAGS} -Wall -o newslock/" \
+ -e "s/\$(LDLAGS)/${LDFLAGS}/" -i {,fax/}Makefile || die
+}
+
+src_compile() {
+ use fidonet && append-cppflags "-DFIDO"
+ append-cppflags "-DAUTO_PPP"
+ # bug #299421
+ VARTEXFONTS="${T}"/fonts emake -j1 prefix=/usr \
+ CC="$(tc-getCC)" \
+ CONFDIR=/etc/mgetty+sendfax \
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ all vgetty
+}
+
+src_install () {
+ # parallelization issue: vgetty-install target fails if install target
+ # isn't finished
+ local targets
+ for targets in install "vgetty-install install-callback"; do
+ emake prefix="${D}/usr" \
+ INFODIR="${D}/usr/share/info" \
+ CONFDIR="${D}/etc/mgetty+sendfax" \
+ MAN1DIR="${D}/usr/share/man/man1" \
+ MAN4DIR="${D}/usr/share/man/man4" \
+ MAN5DIR="${D}/usr/share/man/man5" \
+ MAN8DIR="${D}/usr/share/man/man8" \
+ SBINDIR="${D}/usr/sbin" \
+ BINDIR="${D}/usr/bin" \
+ VOICE_DIR="${D}/var/spool/voice" \
+ PHONE_GROUP=fax \
+ PHONE_PERMS=755 \
+ spool="${D}/var/spool" \
+ ${targets}
+ done
+
+ keepdir /var/log/mgetty
+
+ #Install mgetty into /sbin (#119078)
+ dodir /sbin && \
+ mv "${D}"/usr/sbin/mgetty "${D}"/sbin && \
+ dosym /sbin/mgetty /usr/sbin/mgetty || die "failed to install /sbin/mgetty"
+ #Don't install ct (#106337)
+ rm "${D}"/usr/bin/ct || die "failed to remove useless ct program"
+
+ dodoc BUGS ChangeLog README.1st Recommend THANKS TODO \
+ doc/*.txt doc/modems.db
+ doinfo doc/mgetty.info
+
+ docinto vgetty
+ dodoc voice/{Readme,Announce,ChangeLog,Credits}
+
+ if use doc; then
+ dodoc doc/mgetty.ps
+ fi
+
+ docinto vgetty/doc
+ dodoc voice/doc/*
+
+ if use fax; then
+ mv samples/new_fax.all samples_new_fax.all || die "move failed."
+ docinto samples
+ dodoc samples/*
+
+ docinto samples/new_fax
+ dodoc samples_new_fax.all/*
+ fi
+
+ if ! use fax; then
+ insinto /usr/share/${PN}/frontends
+ doins -r frontends/{voice,network}
+ else
+ insinto /usr/share/${PN}
+ doins -r frontends
+ fi
+ insinto /usr/share/${PN}
+ doins -r patches
+ insinto /usr/share/${PN}/voice
+ doins -r voice/{contrib,Perl,scripts}
+
+ diropts -m 0750 -o fax -g fax
+ dodir /var/spool/voice
+ keepdir /var/spool/voice/incoming
+ keepdir /var/spool/voice/messages
+ if use fax; then
+ dodir /var/spool/fax
+ dodir /var/spool/fax/outgoing
+ keepdir /var/spool/fax/outgoing/locks
+ keepdir /var/spool/fax/incoming
+ fi
+}
+
+pkg_postinst() {
+ elog "Users who wish to use the fax or voicemail capabilities must be members"
+ elog "of the group fax in order to access files"
+ elog
+ elog "If you want to grab voice messages from a remote location, you must save"
+ elog "the password in /var/spool/voice/.code file"
+ echo
+ ewarn "/var/spool/voice/.code and /var/spool/voice/messages/Index"
+ ewarn "are not longer created by this automatically!"
+}
diff --git a/net-dialup/mingetty/Manifest b/net-dialup/mingetty/Manifest
new file mode 100644
index 000000000000..70226b49f47f
--- /dev/null
+++ b/net-dialup/mingetty/Manifest
@@ -0,0 +1,7 @@
+AUX mingetty-1.08-check_chroot_chdir_nice.patch 1148 SHA256 cf82654c452dc43ec0a53bfc940429707cc54afefb57665471a0a16dc4fc5b40 SHA512 b296b8618218014bbe02b0d449d7e478a098d23e224ded632ea2e2f9ee95252930f31657adecb971e9e5d984491f6763295a0d269f3d6d59926e1f86ed49e0b2 WHIRLPOOL d2ee7ff7983dd4d56d699ec4d3e8973750842125baf5a6d75c0517aabe1447a34d0287501de12f6095bf878f9a651c0632cfbdf000a9d7c50dcbce7d7a36fcc4
+AUX mingetty-1.08-utf8.patch 4203 SHA256 690f5c2587de5f63a52fc2d61a8af8660773eefdba7e1a0f05cbb97740338938 SHA512 157ee0f38ad2175a3a5c1fd40a419e963c7310c2e1e7d8e8879ee17cca1283f2ea7ba39a0a67381347e75d5b691becf56f92c9ae2e5f65ca400687cb565ca31a WHIRLPOOL 7a954002f3075baa37091c65f96b59b66274d35712fe72c657f14a5ffc2de7717a4d9813674edf9d9e96f61bd57a82670d5797a92c23480335097a9cd25fdcd5
+DIST mingetty-1.08.tar.gz 13476 SHA256 0f55c90ba4faa913d91ef99cbf5cb2eb4dbe2780314c3bb17953f849c8cddd17 SHA512 d2c050a412af81d4635cbaa5610dfa2cf2addce0d3116fa53f73eb15cd6b53d476165a0509ae630a151de07a5bdc82cba1b5da0ab78d0313b200adece3c8872b WHIRLPOOL 090c778d6fdb43a4aa0dd916c344cc810df78a623ead391b4e06cc3a1e7a5f1497b05aadd558d3c031953e4941cbf1f521c307f148215af26bffb2708bc9e8bf
+EBUILD mingetty-1.08-r1.ebuild 754 SHA256 fcbbe3f89104d0657b92b0a7056632119fdec639baa064739f8326feadd9e7ec SHA512 8d7a84a5573aff99c6272277d55c89e27d8317814eb1a1a4d1a529d6d6b95a0d250ff3252e76996cf1074673564b77178e88c883ea3d54f6ac9788c9e4f97737 WHIRLPOOL f64eae77dde9629a0d764416a805ea70f37a2616f12fcad6c51c8559c5efe77f7266b8ba889f4b4c997f282b9968a7e9c568b50047a29761549bdb819a6038df
+MISC ChangeLog 5134 SHA256 67451d5103507e3693aca0aca6a992d8b8ff16ff869da9c060013cc1452df31d SHA512 8cfa1dc4d750975760c78e031113194118c9632c0cdee7c33438934dd2d39edc320b3324ed85ee870e8b63acae1d36d9624af3dc4fdc2415d42b8d870513f70e WHIRLPOOL b027ddedb8ad83ea2077aeeeb3e7554ea41a2f5e68c33608e5b724cebda86b3bc2cfd39e237365267de38ea11fc816cab72b4516b0ace4a9e64279e527000edc
+MISC ChangeLog-2015 7070 SHA256 353797719837668a941d1b704905d70d5b47375dcb1ea55ed3752f104876a57f SHA512 b19c747d1158e2d9a2e39e1032858dd3ee1d976e8dad39b80d5fb9772a6e803631f3d2784019ccb605d77c395a3b0f29ae8183d289370308f410a2b0267da2fa WHIRLPOOL dc3d1471dbc6e05689f1bc86862118ad7e99151f0fb9bccfe87fca389e9c252b0dd7a335caa5dcaa5b4b470b257d653705bc7203e76eb9bad22daf1ce1440a37
+MISC metadata.xml 674 SHA256 b00ecc64451c6922c2e784d79ebb7f2458af5b3e3df26cdbfc3ad7329137582c SHA512 0d35b42494edd2c4f8e7f2ad51463c2f9730f52d032adf6e3ea3156b05f090b0eaaaec95c4fc4db02e3ebc76cf7848571398bdccf3735adf5511ff1959431201 WHIRLPOOL e8b1c59c4caffbe4e0459b4b3d9a66c42538a00e7df75df4144c938a3f19d3817d0317d9e8f9e77b8bc3dd097bc2f84b982ea8536ed1304907f4b9e878fa59cc
diff --git a/net-dialup/mingetty/files/mingetty-1.08-check_chroot_chdir_nice.patch b/net-dialup/mingetty/files/mingetty-1.08-check_chroot_chdir_nice.patch
new file mode 100644
index 000000000000..84599667551b
--- /dev/null
+++ b/net-dialup/mingetty/files/mingetty-1.08-check_chroot_chdir_nice.patch
@@ -0,0 +1,36 @@
+Check chdir() on chroot() syscalls (and similar) as chroot without proper
+chdir() allows to escape from changed root.
+
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597382
+https://sourceforge.net/tracker/?func=detail&aid=3095679&group_id=80387&atid=559616
+
+--- mingetty-1.08/mingetty.c
++++ mingetty-1.08/mingetty.c
+@@ -422,12 +422,21 @@
+ while ((logname = get_logname ()) == 0)
+ /* do nothing */ ;
+
+- if (ch_root)
+- chroot (ch_root);
+- if (ch_dir)
+- chdir (ch_dir);
+- if (priority)
+- nice (priority);
++ if (ch_root) {
++ if (chroot (ch_root))
++ error ("chroot(\"%s\") failed: %s", ch_root, strerror (errno));
++ if (chdir("/"))
++ error ("chdir(\"/\") failed: %s", strerror (errno));
++ }
++ if (ch_dir) {
++ if (chdir (ch_dir))
++ error ("chdir(\"%s\") failed: %s", ch_dir, strerror (errno));
++ }
++ if (priority) {
++ errno = 0; /* see the nice(2) NOTES for why we do this */
++ if ((nice (priority) == -1) && (errno != 0))
++ error ("nice(%d) failed: %s", priority, strerror (errno));
++ }
+
+ execl (loginprog, loginprog, autologin? "-f" : "--", logname, NULL);
+ error ("%s: can't exec %s: %s", tty, loginprog, strerror (errno));
diff --git a/net-dialup/mingetty/files/mingetty-1.08-utf8.patch b/net-dialup/mingetty/files/mingetty-1.08-utf8.patch
new file mode 100644
index 000000000000..c57bc0b6ad4e
--- /dev/null
+++ b/net-dialup/mingetty/files/mingetty-1.08-utf8.patch
@@ -0,0 +1,156 @@
+diff -Nru mingetty-1.08.orig/mingetty.c mingetty-1.08/mingetty.c
+--- mingetty-1.08.orig/mingetty.c 2008-01-18 13:13:07.000000000 +0200
++++ mingetty-1.08/mingetty.c 2008-01-30 00:14:25.000000000 +0200
+@@ -16,10 +16,15 @@
+ * - autologin only at first login
+ * - /etc/mingetty.conf that can be used instead of /etc/inittab for
+ * command line options
+- * - Can UTF-8 setup be done within mingetty?
++ * - Can UTF-8 setup be done within mingetty? Let's try now :-) (VinzC)
+ * - Also add /bin/login-type functionality in here?
+ */
+
++/* Additional comments: Vincent Cadet <vcadet@hotmail.com> (2006-11-21)
++ * - Attempt to make mingetty support UTF-8. Modifications were imported
++ * from Suse migetty.c 0.9.6s.
++ */
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+@@ -39,6 +44,19 @@
+ #include <syslog.h>
+ #include <sys/utsname.h>
+ #include <time.h>
++#include <locale.h>
++#include <iconv.h>
++#include <wctype.h>
++#include <sys/kd.h>
++#include <sys/ttydefaults.h>
++
++#ifndef IUTF8
++# ifndef ASM_IUTF8
++# error ASM_IUTF8 input flag not defined - Cannot define IUTF8
++# else
++# define IUTF8 ASM_IUTF8
++# endif
++#endif
+
+ /* name of this program (argv[0]) */
+ static char *progname;
+@@ -76,6 +94,8 @@
+ static char *autologin = NULL;
+ /* try to read a char before dropping to login prompt */
+ static int loginpause = 0;
++/* terminal mode */
++static int mode = K_RAW;
+
+ /* error() - output error messages */
+ static void error (const char *fmt, ...)
+@@ -189,10 +209,21 @@
+ if (fd > 2)
+ close (fd);
+
++ /* Detect mode of current keyboard setup, e.g. for UTF-8 */
++ if (ioctl(0, KDGKBMODE, &mode) < 0)
++ mode = K_RAW;
++
+ /* Write a reset string to the terminal. This is very linux-specific
+ and should be checked for other systems. */
+ if (noclear == 0)
+- write (0, "\033c", 2);
++ /* don't write a full reset (ESC c) because this leaves the
++ unicode mode again if the terminal was in unicode mode
++ and also undos the ESC sequences in CONSOLE_MAGIC which
++ are needed for some languages/console-fonts.
++ Just put the cursor to the home position (ESC [ H),
++ erase everything below the cursor (ESC [ J), and set the
++ scrolling region to the full window (ESC [ r) */
++ write (0, "\033[r\033[H\033[J", 9);
+
+ sigaction (SIGHUP, &sa_old, NULL);
+ }
+@@ -298,32 +329,75 @@
+
+ static char *get_logname (void)
+ {
+- static char logname[40];
++ static char logname[4*UT_NAMESIZE];
+ char *bp;
+ unsigned char c;
++ int ascii;
++ iconv_t ic;
+
+ tcflush (0, TCIFLUSH); /* flush pending input */
++
++ /* Check for UTF-8 mode */
++ switch(mode) {
++ case K_UNICODE:
++ ascii = 0;
++ setlocale(LC_CTYPE, "en_US.UTF-8");
++ break;
++ case K_RAW:
++ case K_MEDIUMRAW:
++ case K_XLATE:
++ default:
++ ascii = 1;
++ setlocale(LC_CTYPE, "POSIX");
++ break;
++ }
++
+ for (*logname = 0; *logname == 0;) {
+ do_prompt (1);
+ for (bp = logname;;) {
+ if (read (0, &c, 1) < 1) {
+- if (errno == EINTR || errno == EIO
+- || errno == ENOENT)
++ if (errno == EINTR || errno == EAGAIN) {
++ usleep(1000);
++ continue;
++ }
++ if (errno == EIO || errno == ENOENT)
+ exit (EXIT_SUCCESS);
+ error ("%s: read: %s", tty, strerror (errno));
+ }
+ if (c == '\n' || c == '\r') {
+ *bp = 0;
+ break;
+- } else if (!isprint (c))
+- error ("%s: invalid character 0x%x in login"
+- " name", tty, c);
++ }
++
++ if (ascii && !isprint (c))
++ error ("%s: invalid character 0x%x in login name", tty, c);
+ else if ((size_t)(bp - logname) >= sizeof (logname) - 1)
+ error ("%s: too long login name", tty);
+- else
+- *bp++ = c;
++
++ *bp++ = c;
+ }
+ }
++
++ if (!ascii && (ic = iconv_open("WCHAR_T", "UTF-8"))) {
++ char tmpbuf[4*sizeof(logname)], *op, *lp;
++ size_t len = bp - logname;
++ size_t out = sizeof(tmpbuf) - 1;
++ size_t wcl;
++ wint_t *wcp;
++
++ op = tmpbuf;
++ lp = logname;
++ if ((wcl = iconv(ic , &lp, &len, &op, &out)) == (size_t)-1)
++ error ("%s: invalid character conversion for login name", tty);
++ iconv_close(ic);
++
++ wcp = (wint_t*)tmpbuf;
++ wcp[wcl] = (wint_t)0;
++ while (*wcp) {
++ if (!iswprint(*wcp++))
++ error ("%s: invalid character for login name found", tty);
++ }
++ }
+ return logname;
+ }
+
diff --git a/net-dialup/mingetty/metadata.xml b/net-dialup/mingetty/metadata.xml
new file mode 100644
index 000000000000..6ecb8ff961fe
--- /dev/null
+++ b/net-dialup/mingetty/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <longdescription>The mingetty program is a lightweight, minimalist getty program for
+use only on virtual consoles. Mingetty is not suitable for serial
+lines (you should use the mgetty program in that case).</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">mingetty</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/mingetty/mingetty-1.08-r1.ebuild b/net-dialup/mingetty/mingetty-1.08-r1.ebuild
new file mode 100644
index 000000000000..c70e8e1d5871
--- /dev/null
+++ b/net-dialup/mingetty/mingetty-1.08-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="A compact getty program for virtual consoles only"
+HOMEPAGE="https://sourceforge.net/projects/mingetty"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 sparc x86"
+IUSE="unicode"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.08-check_chroot_chdir_nice.patch"
+)
+
+src_prepare() {
+ use unicode && eapply "${FILESDIR}"/${PN}-1.08-utf8.patch
+ default
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS} -Wall -W -pipe -D_GNU_SOURCE" CC="$(tc-getCC)"
+}
+
+src_install () {
+ dodir /sbin /usr/share/man/man8
+ emake DESTDIR="${D}" install
+}
diff --git a/net-dialup/minicom/Manifest b/net-dialup/minicom/Manifest
new file mode 100644
index 000000000000..06eda13d59f4
--- /dev/null
+++ b/net-dialup/minicom/Manifest
@@ -0,0 +1,14 @@
+AUX minicom-2.3-gentoo-runscript.patch 2382 SHA256 9d79ab8eb2942cdbde2b65ab7958b7c485c83428f31e5644f0f2af2c1d6bffb7 SHA512 f88a54d5d64bec288930eb7d34332d3f4cdf879a90a694c4e538cc92ec213f15816ea9fa1225ea1122b3ee00b69b365cd69a17ec09369f4498b437374d425b5f WHIRLPOOL 74c40c8b81c81ec504d3193175b38c0644809a505f201f5d01cd9d74723336e3b4c1cd5cfd11e55fa528439aaef17bdc2c88b797de63c339c1ce8b51a020387f
+AUX minicom-2.6-etimeout.patch 266 SHA256 cce9dfa838f7df59e59e64e0494d98ffe7143512ed419f2034f36e73be80d698 SHA512 623310112fe8c9ca50e2f5bc3c67675d501a96706ff80cb30b0e4da0074c6662f9268bd9aad792e7495f156690755ce7c1625c19efa69ff577a34967646cbb4c WHIRLPOOL 6333f7ae0d68824ae16126705800cc90837a1be4090f423f2bce60e24c2904829044a413fa3a018bc4202ce0ae9bf978877e3c763be670364e878cc249e2db80
+AUX minicom-2.7-lockdir.patch 535 SHA256 bfabbe8c36248b57a7ac0ab453e0597f37889791b848610dce15ba4727ba39ba SHA512 7e555046cd58a796f01473e064cbf289bfd467b0ceefbdc49734d5a9ee3c8f41480378cd456e0b30e94bb892b3329959c4c38ecc942e35d3890bc6da515e1f59 WHIRLPOOL 1fe4316e70b4cb2ed26072769f64228f81e80fe9010e11bbdd8be7b499a056d0af7d0c925c3e82da80ac52b3b64e10fa597a607b7871ff84fe9e5dc6ee17a6f3
+AUX minirc.dfl 66 SHA256 d7a08c0a5befc155170b8e6009b028c0361e72da6c2c3f55e1858711eaaca5a0 SHA512 dc6f65392ec4ee9e0f499596b6220cb23e443530a3802edc8805412a7999ffb48cb2f9f5c9f7a7ebfbbe166fdbf128847f00141c4f67c0176bb245081814955c WHIRLPOOL 7c245ce32e0e37147974b392ce01a3deb8fc81e692fabc9eada329f00523a6989dffc652b95e2ce6a091b6f199964a038618afced647d2cc85f9556a850490f9
+DIST minicom-2.6.tar.gz 830255 SHA256 ea5fe79c22dcb115cf5ed287b0e7a69e069bedd39889aa89b1a23f64f53fceb3 SHA512 96345e0c7b5991d3320fb4478b26717efdcdde307cd1cd065be424456bd90e528405c889a8aebaf6a67f3c614e4858825ec7f32769f2069f1b2e3ec5a2556023 WHIRLPOOL 7bfcb9a9609dc85585c808c8027f14406c1ff72771262d3c5beee9209078db9a58396d272333eb1ec6f97c0013b6a3792e0a1444cb737db4c202ccc90b8b1483
+DIST minicom-2.7.1.tar.gz 863544 SHA256 9ac3a663b82f4f5df64114b4792b9926b536c85f59de0f2d2b321c7626a904f4 SHA512 eb9679ac3a3d3585ea06c54407567898e50b981378656e7f8a241071c91054ff0928cc9023d2c79d1936588cdffa9426f4962b556e8daa1783add0c5ac59b5af WHIRLPOOL f93642d6cc3c8dee987d461a67e4a98b55d0ebea1a0c1b2dc8564a9af66dbf9aaad3e4cb2e161d127b965d955637882eda601034b863b32ee776925db969418e
+DIST minicom-2.7.tar.gz 863544 SHA256 9ac3a663b82f4f5df64114b4792b9926b536c85f59de0f2d2b321c7626a904f4 SHA512 eb9679ac3a3d3585ea06c54407567898e50b981378656e7f8a241071c91054ff0928cc9023d2c79d1936588cdffa9426f4962b556e8daa1783add0c5ac59b5af WHIRLPOOL f93642d6cc3c8dee987d461a67e4a98b55d0ebea1a0c1b2dc8564a9af66dbf9aaad3e4cb2e161d127b965d955637882eda601034b863b32ee776925db969418e
+EBUILD minicom-2.6.ebuild 1297 SHA256 42e94f0256f5fd0c14261fe94837e6df86d9981296641ef01f4067c52d79aebb SHA512 414e4a77e21a7a2158047e9f645f3304c78e40eccb28e7d3071227814cbdd740089f928f38fbe867c943f173b86f78a9c0afa6d9aa8604d69effa57ed8c78388 WHIRLPOOL 359e1fe14b87a5ebb76f35590fd9587dd638e8f780e5160640cbeaed2a49bff066d4172f1b422de9515b2849036b9c93a57dd948d3cdc029415d6a7cc5f82712
+EBUILD minicom-2.7-r1.ebuild 1515 SHA256 ed53a8057ff1d0003e6651959c7c00713d91dbab0b32e0c32fb5b2420383655c SHA512 277c4fc3446b1ec23853ab521ee6c5a90f2b8f8d18875ccc9d5a704c6c51504f65542c3cfb5b882b7f54f77435f84f6655123dde5c9f4b971da6b424db525fbc WHIRLPOOL 7d3bf88a0fe302c4c45f9c2cd0a45da0b93a2c94784b286736082e08f982a4a37558ded750abab285659b741cce9fe11ffc21712f47b8043b25563e874329581
+EBUILD minicom-2.7.1.ebuild 1549 SHA256 f98acfc71ba9aebc5443f534d1a0c6c1b30084e1e4bfa7aed8bc8517fe37966c SHA512 e48de13f90d97ae188307573e49b96db8c5865751ce73b76d95a7adc301c2b81a1eb1f00c4b8774c2669a51101f3104a3a2273df1c118e5b458f895989bc1373 WHIRLPOOL ef50d9106fc72943a31654aa9661dba6383151e7aece6d2e26496424cb1b1fdb0ef2023769fbf65a2a707f2e7f5271a079a3ca804302c39ea562798a78dac7f7
+EBUILD minicom-2.7.ebuild 1269 SHA256 1eea7fdf8aa21e4410b22dfd80ca6c14698240e81d67d13041f67630305d57ca SHA512 9bcfbecd8f3a639ae8d98d104a08d95af9f9735d75dcd026c7965e86dc9648a1c06a9b152c182f466ac72db594a4c07ec7565cc65c95d0d5721a6c60c498a7b8 WHIRLPOOL 19a585000c1b9c5c458d47c4757df7fc0d1d9a40928f4028db9959167ddf3f2536c1ea649ed85a400c5336fe97ba61a8c4c583894eeb12c705cbec9557fd302c
+MISC ChangeLog 3104 SHA256 b48e3e7269765489b1d0eceaec11062fa87a474bb7c692d91254604ff6c12280 SHA512 cad2f9a88ab489f90f9ecb3f8e638eacbd96a7ade1db9fb84aaf3f9d2390afb491ce8c611c25d51c18432c8446496894f16b44c44326f04b7530dda8faafd9e0 WHIRLPOOL 11d9797df2dbdbaac2da09e32052b75a29dc24cd36996ef42398a38641927ec186422525d9d63edc3d9222d53786b041153ac7eca3c77eaa61bf10532e8ced36
+MISC ChangeLog-2015 13282 SHA256 6ab75410072149bf7acf3b1eadc1776505be34fe46f2cb014d0f543b7a572c1f SHA512 d0bcb42be3439cba34194e75146cf0cb83039fd57ac4dfd262ee4201ee40e810aedbc8eeca1cf2ecf07cc9481a5f703a3b407cf7938cde0e5f7eed74d0e854fc WHIRLPOOL 7c00c6208af8e3a38c7e61d55f54046ddd9e318d8075a50ad13ab9359efa87b717a4cda516ac4730f3024053d4a6577e369c9f32683f97196c3876677fda6ed3
+MISC metadata.xml 456 SHA256 6e64d84b244d1d177d3c88778c94b0a4b6af1f5c3124d720a6a403b7c4d0d6eb SHA512 9d7b2e8de12baea7bbc03a2031caf9e791b1168eb70a8100edbedea42344a26421e7f8e11b114ff86677799583d471220da2973c1395a0fe13d9f33b3a22c336 WHIRLPOOL 359c9ed736edd57e648262f37fbf138bf7f62ed826b323dfa236a77b8214ff48821504742902329568880f5366d8a39141792f49ddc6f5375183ded85386597f
diff --git a/net-dialup/minicom/files/minicom-2.3-gentoo-runscript.patch b/net-dialup/minicom/files/minicom-2.3-gentoo-runscript.patch
new file mode 100644
index 000000000000..ff72db966b85
--- /dev/null
+++ b/net-dialup/minicom/files/minicom-2.3-gentoo-runscript.patch
@@ -0,0 +1,55 @@
+diff -ru minicom-2.3.orig/extras/scriptdemo minicom-2.3/extras/scriptdemo
+--- minicom-2.3.orig/extras/scriptdemo 2003-03-30 21:55:39.000000000 +0300
++++ minicom-2.3/extras/scriptdemo 2008-04-20 05:27:19.000000000 +0300
+@@ -1,5 +1,5 @@
+ # A little demonstration of the possibilities of "runscript".
+-# This script can be executed by typing: "runscript scriptdemo".
++# This script can be executed by typing: "/usr/bin/runscript scriptdemo".
+ #
+ # Adjust the stty's below to your system: BSD-like or SysV-like.
+ # Linux ofcourse accepts both :-)
+diff -ru minicom-2.3.orig/man/minicom.1 minicom-2.3/man/minicom.1
+--- minicom-2.3.orig/man/minicom.1 2008-02-24 12:22:43.000000000 +0200
++++ minicom-2.3/man/minicom.1 2008-04-20 05:27:19.000000000 +0300
+@@ -418,7 +418,7 @@
+ .TP 0.5i
+ .B D - Script program
+ Which program to use as the script interpreter. Defaults to the
+-program "runscript", but if you want to use something else (eg,
++program "/usr/bin/runscript", but if you want to use something else (eg,
+ /bin/sh or "expect") it is possible. Stdin and stdout are connected
+ to the modem, stderr to the screen.
+ .RS 0.5i
+diff -ru minicom-2.3.orig/man/runscript.1 minicom-2.3/man/runscript.1
+--- minicom-2.3.orig/man/runscript.1 2007-11-13 23:35:06.000000000 +0200
++++ minicom-2.3/man/runscript.1 2008-04-20 05:27:19.000000000 +0300
+@@ -5,7 +5,7 @@
+ .\" for conditions under which this file may be redistributed.
+ .TH RUNSCRIPT 1 "$Date: 2008/04/20 02:39:28 $" "User's Manual"
+ .SH NAME
+-runscript \- script interpreter for minicom
++/usr/bin/runscript \- script interpreter for minicom
+ .SH SYNOPSIS
+ .B runscript
+ .RI "scriptname [logfile [homedir]]"
+diff -ru minicom-2.3.orig/src/rwconf.c minicom-2.3/src/rwconf.c
+--- minicom-2.3.orig/src/rwconf.c 2007-10-10 23:18:20.000000000 +0300
++++ minicom-2.3/src/rwconf.c 2008-04-20 05:27:19.000000000 +0300
+@@ -118,7 +118,7 @@
+ { N_("No"), 0, "kermreal" },
+ { "3", 0, "colusage" },
+ /* The script program */
+- { "runscript", 0, "scriptprog" },
++ { "/usr/bin/runscript", 0, "scriptprog" },
+ /* Modem parameters */
+ { "~^M~AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0^M", 0, "minit" },
+ { "^M~ATZ^M~", 0, "mreset" },
+@@ -246,7 +246,7 @@
+ int matched;
+
+ if (conftype == CONFIG_GLOBAL)
+- strcpy(P_SCRIPTPROG, "runscript");
++ strcpy(P_SCRIPTPROG, "/usr/bin/runscript");
+
+ line = malloc(line_size);
+ if (!line) {
diff --git a/net-dialup/minicom/files/minicom-2.6-etimeout.patch b/net-dialup/minicom/files/minicom-2.6-etimeout.patch
new file mode 100644
index 000000000000..2dd01963c443
--- /dev/null
+++ b/net-dialup/minicom/files/minicom-2.6-etimeout.patch
@@ -0,0 +1,11 @@
+--- src/main.c.orig 2011-09-30 09:57:00.000000000 +0200
++++ src/main.c 2011-12-28 16:07:59.000000000 +0100
+@@ -112,7 +112,7 @@ char *esc_key(void)
+ static void get_alrm(int dummy)
+ {
+ (void)dummy;
+- errno = ETIME;
++ errno = ETIMEDOUT;
+ longjmp(albuf, 1);
+ }
+
diff --git a/net-dialup/minicom/files/minicom-2.7-lockdir.patch b/net-dialup/minicom/files/minicom-2.7-lockdir.patch
new file mode 100644
index 000000000000..acbdcbe902ba
--- /dev/null
+++ b/net-dialup/minicom/files/minicom-2.7-lockdir.patch
@@ -0,0 +1,14 @@
+--- minicom-2.7.orig/configure.in 2013-12-31 07:14:09.000000000 -0800
++++ minicom-2.7/configure.in 2017-03-05 11:25:01.379020326 -0800
+@@ -217,7 +217,10 @@
+
+ if test "x$UUCPLOCK" != x
+ then
+- if test -d $UUCPLOCK
++ dnl If a lock directory was manually specified, do not test it actually
++ dnl exists, as that might not be true during a chroot build, and the
++ dnl packager is responsible for making sure it exists at runtime.
++ if true
+ then
+ AC_MSG_RESULT($UUCPLOCK)
+ AC_DEFINE_UNQUOTED(UUCPLOCK, "$UUCPLOCK", [Lock directory])
diff --git a/net-dialup/minicom/files/minirc.dfl b/net-dialup/minicom/files/minirc.dfl
new file mode 100644
index 000000000000..42e9d8fe4646
--- /dev/null
+++ b/net-dialup/minicom/files/minirc.dfl
@@ -0,0 +1 @@
+# Machine-generated file - use "minicom -s" to change parameters.
diff --git a/net-dialup/minicom/metadata.xml b/net-dialup/minicom/metadata.xml
new file mode 100644
index 000000000000..6c2a6ce03ca7
--- /dev/null
+++ b/net-dialup/minicom/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>embedded@gentoo.org</email>
+ <name>Embedded Gentoo</name>
+ </maintainer>
+ <longdescription lang="en">
+ Minicom is a menu driven communications program. It emulates ANSI and VT102
+ terminals. It has a dialing directory and auto zmodem download.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-dialup/minicom/minicom-2.6.ebuild b/net-dialup/minicom/minicom-2.6.ebuild
new file mode 100644
index 000000000000..1f2712ff7341
--- /dev/null
+++ b/net-dialup/minicom/minicom-2.6.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils
+
+STUPID_NUM="3689"
+
+DESCRIPTION="Serial Communication Program"
+HOMEPAGE="http://alioth.debian.org/projects/minicom"
+SRC_URI="http://alioth.debian.org/download.php/${STUPID_NUM}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="nls"
+
+COMMON_DEPEND="sys-libs/ncurses"
+DEPEND="${COMMON_DEPEND}
+ nls? ( sys-devel/gettext )"
+RDEPEND="${COMMON_DEPEND}
+ net-dialup/lrzsz"
+
+DOCS="AUTHORS ChangeLog NEWS README doc/minicom.FAQ"
+
+# Supported languages and translated documentation
+# Be sure all languages are prefixed with a single space!
+MY_AVAILABLE_LINGUAS=" cs da de es fi fr hu id ja nb pl pt_BR ro ru rw sv vi zh_TW"
+IUSE="${IUSE} ${MY_AVAILABLE_LINGUAS// / linguas_}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.3-gentoo-runscript.patch
+ epatch "${FILESDIR}"/${P}-etimeout.patch
+}
+
+src_configure() {
+ econf \
+ --sysconfdir="${EPREFIX}"/etc/${PN} \
+ $(use_enable nls)
+}
+
+src_install() {
+ default
+ insinto /etc/minicom
+ doins "${FILESDIR}"/minirc.dfl
+}
+
+pkg_preinst() {
+ [[ -s ${EROOT}/etc/minicom/minirc.dfl ]] \
+ && rm -f "${ED}"/etc/minicom/minirc.dfl
+}
diff --git a/net-dialup/minicom/minicom-2.7-r1.ebuild b/net-dialup/minicom/minicom-2.7-r1.ebuild
new file mode 100644
index 000000000000..fece4e19b3ed
--- /dev/null
+++ b/net-dialup/minicom/minicom-2.7-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils autotools
+
+STUPID_NUM="3977"
+DESCRIPTION="Serial Communication Program"
+HOMEPAGE="http://alioth.debian.org/projects/minicom"
+SRC_URI="https://alioth.debian.org/frs/download.php/file/${STUPID_NUM}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="nls"
+
+COMMON_DEPEND="sys-libs/ncurses:="
+DEPEND="${COMMON_DEPEND}
+ nls? ( sys-devel/gettext )"
+RDEPEND="${COMMON_DEPEND}
+ net-dialup/lrzsz"
+
+DOCS="AUTHORS ChangeLog NEWS README doc/minicom.FAQ"
+
+# Supported languages and translated documentation
+# Be sure all languages are prefixed with a single space!
+MY_AVAILABLE_LINGUAS=" cs da de es fi fr hu id ja nb pl pt_BR ro ru rw sv vi zh_TW"
+IUSE="${IUSE} ${MY_AVAILABLE_LINGUAS// / linguas_}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.3-gentoo-runscript.patch
+ "${FILESDIR}"/${PN}-2.7-lockdir.patch
+)
+
+src_prepare() {
+ default
+ mv "${S}"/configure.{in,ac}
+ eautoreconf
+}
+
+src_configure() {
+ # Lockdir must exist if not manually specified.
+ # /var/lock is created by openrc.
+ LOCKDIR=/var/lock
+ econf \
+ --sysconfdir="${EPREFIX}"/etc/${PN} \
+ --enable-lock-dir="${LOCKDIR}" \
+ $(use_enable nls)
+}
+
+src_install() {
+ default
+ insinto /etc/minicom
+ doins "${FILESDIR}"/minirc.dfl
+}
+
+pkg_preinst() {
+ [[ -s ${EROOT}/etc/minicom/minirc.dfl ]] && rm -f "${ED}"/etc/minicom/minirc.dfl
+}
diff --git a/net-dialup/minicom/minicom-2.7.1.ebuild b/net-dialup/minicom/minicom-2.7.1.ebuild
new file mode 100644
index 000000000000..487e66e64aa2
--- /dev/null
+++ b/net-dialup/minicom/minicom-2.7.1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils autotools
+
+STUPID_NUM="3977"
+DESCRIPTION="Serial Communication Program"
+HOMEPAGE="http://alioth.debian.org/projects/minicom"
+SRC_URI="https://alioth.debian.org/frs/download.php/file/${STUPID_NUM}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="nls"
+
+COMMON_DEPEND="sys-libs/ncurses:="
+DEPEND="${COMMON_DEPEND}
+ nls? ( sys-devel/gettext )"
+RDEPEND="${COMMON_DEPEND}
+ net-dialup/lrzsz"
+
+DOCS="AUTHORS ChangeLog NEWS README doc/minicom.FAQ"
+S="${WORKDIR}/${PN}-2.7" # 2.7.1 specific
+
+# Supported languages and translated documentation
+# Be sure all languages are prefixed with a single space!
+MY_AVAILABLE_LINGUAS=" cs da de es fi fr hu id ja nb pl pt_BR ro ru rw sv vi zh_TW"
+IUSE="${IUSE} ${MY_AVAILABLE_LINGUAS// / linguas_}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.3-gentoo-runscript.patch
+ "${FILESDIR}"/${PN}-2.7-lockdir.patch
+)
+
+src_prepare() {
+ default
+ mv "${S}"/configure.{in,ac}
+ eautoreconf
+}
+
+src_configure() {
+ # Lockdir must exist if not manually specified.
+ # /var/lock is created by openrc.
+ LOCKDIR=/var/lock
+ econf \
+ --sysconfdir="${EPREFIX}"/etc/${PN} \
+ --enable-lock-dir="${LOCKDIR}" \
+ $(use_enable nls)
+}
+
+src_install() {
+ default
+ insinto /etc/minicom
+ doins "${FILESDIR}"/minirc.dfl
+}
+
+pkg_preinst() {
+ [[ -s ${EROOT}/etc/minicom/minirc.dfl ]] && rm -f "${ED}"/etc/minicom/minirc.dfl
+}
diff --git a/net-dialup/minicom/minicom-2.7.ebuild b/net-dialup/minicom/minicom-2.7.ebuild
new file mode 100644
index 000000000000..0e9f00786bc5
--- /dev/null
+++ b/net-dialup/minicom/minicom-2.7.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils
+
+STUPID_NUM="3977"
+DESCRIPTION="Serial Communication Program"
+HOMEPAGE="http://alioth.debian.org/projects/minicom"
+SRC_URI="https://alioth.debian.org/frs/download.php/file/${STUPID_NUM}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="nls"
+
+COMMON_DEPEND="sys-libs/ncurses"
+DEPEND="${COMMON_DEPEND}
+ nls? ( sys-devel/gettext )"
+RDEPEND="${COMMON_DEPEND}
+ net-dialup/lrzsz"
+
+DOCS="AUTHORS ChangeLog NEWS README doc/minicom.FAQ"
+
+# Supported languages and translated documentation
+# Be sure all languages are prefixed with a single space!
+MY_AVAILABLE_LINGUAS=" cs da de es fi fr hu id ja nb pl pt_BR ro ru rw sv vi zh_TW"
+IUSE="${IUSE} ${MY_AVAILABLE_LINGUAS// / linguas_}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.3-gentoo-runscript.patch
+}
+
+src_configure() {
+ econf \
+ --sysconfdir="${EPREFIX}"/etc/${PN} \
+ $(use_enable nls)
+}
+
+src_install() {
+ default
+ insinto /etc/minicom
+ doins "${FILESDIR}"/minirc.dfl
+}
+
+pkg_preinst() {
+ [[ -s ${EROOT}/etc/minicom/minirc.dfl ]] && rm -f "${ED}"/etc/minicom/minirc.dfl
+}
diff --git a/net-dialup/moserial/Manifest b/net-dialup/moserial/Manifest
new file mode 100644
index 000000000000..5be14b202c6d
--- /dev/null
+++ b/net-dialup/moserial/Manifest
@@ -0,0 +1,7 @@
+DIST moserial-3.0.10.tar.xz 1093544 SHA256 3d7107a0fc69a58ee139241214351373d35ead5ac07c751854479d2c30442980 SHA512 a21f10fea7cfbbbf5f484f298d7a1bcb6f74450c1a715c79594e0cf85035291dd5bd2e27f1050fd0e38b5449d696da03a1ee6e50737f11f7ddc2140f49d6cdb9 WHIRLPOOL 2f6d11ad0a19578f86001152e3c3141a9ab4f6d65bce0548c1800c40187890b7eb3697831e9f57461a0bedbbc1538907938008cabdd23036b820a8fa938f82f3
+DIST moserial-3.0.11.tar.xz 1103168 SHA256 84136f4f31c56c3f8b693ab7e40124af43cf78a027877616fd1176f8d48e37f6 SHA512 1f274b0b949bed475f3a5210ae90916ce45e1c6a740813b4fe89a18b4914b0a924eacf16440bfc6fb860cd98f709559a28867e35b713fe6550638bf2d060577c WHIRLPOOL 878d5b57017de1e793ea647f83b320c645ef56ef52edd77cb9e1b0ab881c1d0aea52d265ef03e267b2535887f308403f76fe2f7ed38e1dc29fbb7d50c186ea54
+EBUILD moserial-3.0.10.ebuild 519 SHA256 7cf5499111a1519f00542e343b70076b099f650d3152679dd6e4411a9761656c SHA512 ce823423be000089ec42fbad39881de868192a1b183678d3454884bdd41eb5fc5156139ea6ff4d21625b9af68fc25f7838ad032bfdb2bd819f5856cb94199167 WHIRLPOOL d4a313629430a8ed3ea502e74c317c75afdef8fd3d6c95ce89ca58af1b1f8b132d4ba9755238d718c035398d7f24ba07a48d4bd2db79b2a456978897facb52ce
+EBUILD moserial-3.0.11.ebuild 521 SHA256 5996b46e017ab97b170daf38ebfafccd1ba7f8c34198096cd78453a3c15a03cb SHA512 4704e1841e7255da5cefcebbf78cd7c88c2377fdae3d16ea1a35b0413453261e54c0ddae05122a7849163a370d14a460504df17921b92d552332125398d3dd91 WHIRLPOOL 50b8707333f332fe1d28d9269bfbc92324749a34914674c32c68db2cea6de96c129f6fdc6ad1cb001da16581e5a74074fb6bfedbcc6515709cb843abf3250053
+MISC ChangeLog 3636 SHA256 92295d392958ed7a9cfdf672ce3c394ce1bd6b1f1783f846a516f868722cd196 SHA512 e69368131036e74aa84c50ae4bf66417bddf4df45dbe6a760d638d5dbfdd85f5f5f60224aab8c923eb4f7579cc5fd8159e40efd5f6f0b875a75e503e0667e52e WHIRLPOOL d6569cfed434b0f53acbe6397f85623bd71f7015f16de262a0347b6fb9795ba7f2f8e8c5ea510b5414a883b316b369d0b9358f5bf655c255a6f8329cdb6f7c7d
+MISC ChangeLog-2015 4618 SHA256 260a6ab31b4be6c2231fc400692543657823e4f10c15566a64adba1bff07b138 SHA512 28ba50180471b57d2da3fa85b95872c1ec092115f56245b028b4985c4ce29b4e89aaa52f70f5acdf9098d5f03d4a81663af10f7fe8fc565c8189d6fe43aafd63 WHIRLPOOL 75d8a7c4c2d788414bb7bc97729378990eb1bc9624efae51903236e60481a1950f013a9f4ee473a9db3869b229cd5f7133be62d96041ba4fa31303c33497d089
+MISC metadata.xml 450 SHA256 cb17946eae8bf51d528b5a812dae7a7be3bac7c96b3ab0ae1f4606350c783d9a SHA512 3d43f372876327a252c33b20c444b3c1370035db36959d9c19453cae8b19b4f0a0fff17e834b41de1cd236f1f2e8707c5b55646cee6deb99a5b92042c3de4e1b WHIRLPOOL 40f623135c8f892edfc30b4c713385ecb12892b00c699f054c9975070c42d0d56ab41847c5dfafd7b54ee2223298812596550aed76d00b968a4ddfd69899cd19
diff --git a/net-dialup/moserial/metadata.xml b/net-dialup/moserial/metadata.xml
new file mode 100644
index 000000000000..f5067519d0b5
--- /dev/null
+++ b/net-dialup/moserial/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 type="person">
+ <email>steev@gentoo.org</email>
+</maintainer>
+<maintainer type="project">
+ <email>gnome@gentoo.org</email>
+ <name>Gentoo GNOME Desktop</name>
+</maintainer>
+<longdescription lang="en">
+ moserial is a clean, friendly gtk-based serial terminal for the gnome desktop.
+</longdescription>
+</pkgmetadata>
diff --git a/net-dialup/moserial/moserial-3.0.10.ebuild b/net-dialup/moserial/moserial-3.0.10.ebuild
new file mode 100644
index 000000000000..2d317bc99106
--- /dev/null
+++ b/net-dialup/moserial/moserial-3.0.10.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit gnome2
+
+DESCRIPTION="A clean and friendly gtk-based serial terminal"
+HOMEPAGE="https://wiki.gnome.org/moserial"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+RDEPEND="
+ >=dev-libs/glib-2.16:2[dbus]
+ gnome-base/gsettings-desktop-schemas
+ >=x11-libs/gtk+-3.0.0:3
+"
+DEPEND="${RDEPEND}
+ >=app-text/gnome-doc-utils-0.3.2
+ >=dev-util/intltool-0.35
+ dev-util/itstool
+ virtual/pkgconfig
+"
diff --git a/net-dialup/moserial/moserial-3.0.11.ebuild b/net-dialup/moserial/moserial-3.0.11.ebuild
new file mode 100644
index 000000000000..faf07e613193
--- /dev/null
+++ b/net-dialup/moserial/moserial-3.0.11.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit gnome2
+
+DESCRIPTION="A clean and friendly gtk-based serial terminal"
+HOMEPAGE="https://wiki.gnome.org/moserial"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND="
+ >=dev-libs/glib-2.16:2[dbus]
+ gnome-base/gsettings-desktop-schemas
+ >=x11-libs/gtk+-3.0.0:3
+"
+DEPEND="${RDEPEND}
+ >=app-text/gnome-doc-utils-0.3.2
+ >=dev-util/intltool-0.35
+ dev-util/itstool
+ virtual/pkgconfig
+"
diff --git a/net-dialup/mwavem/Manifest b/net-dialup/mwavem/Manifest
new file mode 100644
index 000000000000..02844a6af1bf
--- /dev/null
+++ b/net-dialup/mwavem/Manifest
@@ -0,0 +1,11 @@
+AUX mwave-dev-handler 210 SHA256 432642343ccd048758a1f33eb27e4523edad399e89ef77de367bd4c90f086eff SHA512 5f9806aa690f465a188ec48692ac27e755b58480f8e329e519dd64766ceed20bb7342b15fd7d8981fefe133975a8dd593f2ed03c673bccfcb95582c990901248 WHIRLPOOL db4caa344a7def223b197df54d2477b1540b5e3226ad4dea9506cc8d1e58a235811171dafd9d0ecbe2466271cd1c2abc8aafaaa2ec2e9a2cef996f227c35939d
+AUX mwave.devfs 150 SHA256 93b5848123a25170298ae158290e37ad1d443712a7bfa69606a7aac28bad674b SHA512 e283fa56e535e69ac5ae602301bf36ae1bf58e6e3a4abf68056c0082bc0bbf82b20cd0293c2853ff10bcc09fc39ebb294f812086cc39ef8e2d06e07b9ace128b WHIRLPOOL 33bac26b8c452c3b988fdb2b4c8a28bdd2f98f58040959c7b3146d106250d46c6cecddd1ae8176c5dc8153ba619116af48d1eea5087cb7f545614d7e5e78439c
+AUX mwave.modules 30 SHA256 875f0c3f2872e5cc74a17c70f2c72a4ecd76122988aa3065bd32810c10dd5437 SHA512 062bb44acbb71fba0a1807a4c0a618d80e40be7c31c5185441be6e8c845e29aa9c702391081e1c28eb65bb19b2c1dca1cabacc96c8c0b26b4d132406374cd145 WHIRLPOOL f5f0a5ae890cfd0b702ad02833b86fb34323b6850090ca0534b450f96e8520a49c455d490930493032c45d30835e2f9e155af34eeff8ce9872e05fc8fca97e0d
+AUX mwavem-2.0-gentoo.patch 1010 SHA256 3f6cb623e1017088a58fd31d4e832c40bb74491bd05d21c27dd3eff242b6f88d SHA512 e0a97cfe59d7ecffc1199e9ad1380c9965546e554536747f593a69e0920f022e9667554fcb6633e1814163243b98ffc695ec25d98471d41b2e08ed112653dccf WHIRLPOOL 44c7b4b338e80e4f759bc2a435005b26bf4df90f3a87987b1158feaa5f0ec84f6f25a4a123ff7806fcd54f3239da6f198f0c11bea1dd65d37467d27e9bbef596
+AUX mwavem-2.0-glibc-2.10.patch 1389 SHA256 b8bd22d52a067927960f4062ad8ee10bf678243730d24e48a42ee1b641211d0c SHA512 a946530d607361c189d4cda8d8dcd3454caed695894dea8e7c25f53a2ae33a0e4684f738527f635eb0ddcbd238ce5007b9bd54c0c34f5b78d83d49ad530ba474 WHIRLPOOL baa3d6366f2ef2fb7522f476ea37f69b182ce6a056267bbce0a6bd6299c95c158aedccddfc6c9d3af64e64da870f4d860deb05a810a8fe82f80628bee768e321
+DIST mwavem-2.0.tar.gz 1443167 SHA256 4b3da6be3ec44caee70ef041f58054ac15ddc12c95455a068ef44edf633329ee SHA512 e1bb3c7e5511abc784b0359b844498389a9cb970fe46752775aaae6146d8cf25998a6e12dfc70df5c5f4287fd57abb49252f81a00528db5f7c2c96e3e7efb516 WHIRLPOOL 4d4728ffe824ae0b9ab77ea89f047d420404dafe0fe999d1378695e5ff4cbef6464091709f6b413522477d432043e99e19cbe120191669c2d9ac98118a04241d
+EBUILD mwavem-2.0-r1.ebuild 1560 SHA256 b27d67e90a39712d658bdd2db74cd71ff1edf73d2cc6a7f0defe9e7aa829f558 SHA512 7a086f08f7e7c3560df508ea0fd5edff0c536db655aa2c33d51bca5a7f589e726956c29214d6f5d932fee740329527d0808e16cd75dfa0c63f566ae87f60a57d WHIRLPOOL 3672be04ec0027bb29434b17d60f2afee96cf6afb464df34610c61ad43e1f2aea26a5e3b6e9f6ca15312d3c149850816348e4f64ad62051be4df99eaddf29293
+EBUILD mwavem-2.0-r2.ebuild 1164 SHA256 eb074db89a5c92e6efb0d515f43a54c67086c378a9c14737f5fa5534df5ecdb7 SHA512 b80aa396945ad1dcd8a28d8de0acaba3da6be5890918584d97aba75c75093d6050bbcd88e8bd3ece620065456ea1ba9ab7bbb5bec933ccfd148419242e6b2dce WHIRLPOOL 27d484cf4eace28fdffd8a1611a878f0ab2439551a4a3ca346a4e1102a501fb1ba23d23581189836c82c44ee380517a0a75a22b30e81686613bdc9b84a7c9f7c
+MISC ChangeLog 2775 SHA256 df56728e7d852d1ac56f3c19877c95579263c41a7fb1d53a7bb7f7acba9e02b1 SHA512 54072367c106ab3d6205cc2ea30bde1438a1752355f1af37ad13c7193ab386cc0408b534fb15bc0e859bee9c717cf17a3e296669452fba7f213da2bc94fdd478 WHIRLPOOL f6bb70ad3dca7082ae12a583a19a521d199ccc51a623fb9e6749378847117730ce427d3abfd14b35ade12909286a001a9eca3810cc601cd7524108614077687d
+MISC ChangeLog-2015 3836 SHA256 3b6c279ef67b97bb666229d682297b3f6c347a9da00e04d33c366354880c9677 SHA512 7b23ea7671fc3e4466ee96134a422f1c56d05a710afcb9f8dc0d3e0c072e0ddc9f6f31461c0c67225ad6417ad07a0aca457034bbc92360072139604479401dc1 WHIRLPOOL 0a52890d258ece9b8a89715a49097b4922c13a692a4ef2071ab2f29dfc5b8c22737d086abb8a8a1995ba6a0272f8ec405929935e0cbfad7896f1028498b6c2d6
+MISC metadata.xml 245 SHA256 209c5a8569376b8fb0fd33e3cb6f05e0ad2f2f6f9a336c040cbaa03a23b6a165 SHA512 870dd73eec3bfd31c5545ebbce07fc74ccd06a1d44bad15d71858f756572f89e5af9387f3e207d08c1146c7397a325ce9d01497816d4d9bad6472d5a27b65c1f WHIRLPOOL 3ae9e066f9aa02aabad0a93db785abaac35400da25c6140cfceb59c3802c46e3ffcba56d8cf29e642425e4f2aec36a09c984dc84ad4366f2da7e2e23ac13e191
diff --git a/net-dialup/mwavem/files/mwave-dev-handler b/net-dialup/mwavem/files/mwave-dev-handler
new file mode 100644
index 000000000000..3ba51ff75db2
--- /dev/null
+++ b/net-dialup/mwavem/files/mwave-dev-handler
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+case "$1" in
+register)
+ [ ! -d /dev/modem ] && mkdir --mode=0755 /dev/modems
+ [ ! -h /dev/modems/mwave ] && ln -s /dev/misc/mwave /dev/modems/mwave
+ ;;
+unregister)
+ rm -rf /dev/modems/mwave
+ ;;
+esac
diff --git a/net-dialup/mwavem/files/mwave.devfs b/net-dialup/mwavem/files/mwave.devfs
new file mode 100644
index 000000000000..67ba1e527ab9
--- /dev/null
+++ b/net-dialup/mwavem/files/mwave.devfs
@@ -0,0 +1,2 @@
+REGISTER ^misc/mwave$ EXECUTE /usr/sbin/mwave-dev-handler register
+UNREGISTER ^misc/mwave$ EXECUTE /usr/sbin/mwave-dev-handler unregister
diff --git a/net-dialup/mwavem/files/mwave.modules b/net-dialup/mwavem/files/mwave.modules
new file mode 100644
index 000000000000..613eef5c77a1
--- /dev/null
+++ b/net-dialup/mwavem/files/mwave.modules
@@ -0,0 +1 @@
+alias char-major-10-219 mwave
diff --git a/net-dialup/mwavem/files/mwavem-2.0-gentoo.patch b/net-dialup/mwavem/files/mwavem-2.0-gentoo.patch
new file mode 100644
index 000000000000..ca86b5039444
--- /dev/null
+++ b/net-dialup/mwavem/files/mwavem-2.0-gentoo.patch
@@ -0,0 +1,24 @@
+diff -ur mwavem-2.0.orig/configure.in mwavem-2.0/configure.in
+--- mwavem-2.0.orig/configure.in 2004-04-06 23:50:57.000000000 +0000
++++ mwavem-2.0/configure.in 2008-10-18 09:31:29.000000000 +0000
+@@ -27,7 +27,7 @@
+ AC_DEFINE(MWWTDBG)
+
+ INCLUDES="-I\$(top_srcdir)/src/include"
+-CFLAGS="$INCLUDES -O2 -fno-strict-aliasing -fomit-frame-pointer -Wall"
++CFLAGS="${CFLAGS} $INCLUDES -fno-strict-aliasing -Wall"
+
+ dnl Set dsp_dir here and we substitute it in mwavem.conf from mwavem.conf.in
+ dsp_dir=` test "x$exec_prefix" = xNONE && exec_prefix=$ac_default_prefix
+diff -ur mwavem-2.0.orig/src/mwavem/Makefile.am mwavem-2.0/src/mwavem/Makefile.am
+--- mwavem-2.0.orig/src/mwavem/Makefile.am 2008-10-18 09:38:52.000000000 +0000
++++ mwavem-2.0/src/mwavem/Makefile.am 2008-10-18 09:38:00.000000000 +0000
+@@ -10,6 +10,8 @@
+ -rm $(distdir)/modem.c
+
+ install-exec-local:
++
++install-exec-local-invalid:
+ if [ ! -c "/dev/modems/mwave" ]; then \
+ mkdir -p /dev/modems; \
+ mknod --mode=660 /dev/modems/mwave c 10 219; \
diff --git a/net-dialup/mwavem/files/mwavem-2.0-glibc-2.10.patch b/net-dialup/mwavem/files/mwavem-2.0-glibc-2.10.patch
new file mode 100644
index 000000000000..fa867986ec22
--- /dev/null
+++ b/net-dialup/mwavem/files/mwavem-2.0-glibc-2.10.patch
@@ -0,0 +1,40 @@
+diff -ur mwavem-2.0.orig/src/include/mwmparsi.h mwavem-2.0/src/include/mwmparsi.h
+--- mwavem-2.0.orig/src/include/mwmparsi.h 2001-05-04 22:28:52.000000000 +0300
++++ mwavem-2.0/src/include/mwmparsi.h 2009-08-08 11:58:51.000000000 +0300
+@@ -516,8 +516,8 @@
+
+
+ #ifdef DEBUG
+- void dprintf(char *szFormat, ...);
+- #define DPF dprintf
++ void mwavem_dprintf(char *szFormat, ...);
++ #define DPF mwavem_dprintf
+
+ #else
+ #define DPF ((void)0)
+diff -ur mwavem-2.0.orig/src/include/mwmspcfc.h mwavem-2.0/src/include/mwmspcfc.h
+--- mwavem-2.0.orig/src/include/mwmspcfc.h 2001-05-04 22:28:52.000000000 +0300
++++ mwavem-2.0/src/include/mwmspcfc.h 2009-08-08 11:56:34.000000000 +0300
+@@ -705,8 +705,8 @@
+ void MWM_ENTRY mwmPostMessage(UINT uMsg, LONG wParam, LONG lParam); // @TBD
+
+ #ifdef DEBUG
+- void dprintf(char *szFormat, ...);
+- #define DPF dprintf
++ void mwavem_dprintf(char *szFormat, ...);
++ #define DPF mwavem_dprintf
+ #else
+ #define DPF ((void)0)
+ #endif
+diff -ur mwavem-2.0.orig/src/mwmlw32/mwmload.c mwavem-2.0/src/mwmlw32/mwmload.c
+--- mwavem-2.0.orig/src/mwmlw32/mwmload.c 2004-03-31 06:58:55.000000000 +0300
++++ mwavem-2.0/src/mwmlw32/mwmload.c 2009-08-08 11:56:50.000000000 +0300
+@@ -72,7 +72,7 @@
+
+
+ #define MODNAME "MWMODEM"
+-void dprintf(char *szFormat, ...)
++void mwavem_dprintf(char *szFormat, ...)
+ {
+ /*if (usDebugWindow)
+ {*/
diff --git a/net-dialup/mwavem/metadata.xml b/net-dialup/mwavem/metadata.xml
new file mode 100644
index 000000000000..a122370406ef
--- /dev/null
+++ b/net-dialup/mwavem/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+<longdescription>User level application for IBM Mwave modem.</longdescription>
+</pkgmetadata>
diff --git a/net-dialup/mwavem/mwavem-2.0-r1.ebuild b/net-dialup/mwavem/mwavem-2.0-r1.ebuild
new file mode 100644
index 000000000000..1ff1d46784f2
--- /dev/null
+++ b/net-dialup/mwavem/mwavem-2.0-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+AT_M4DIR="m4"
+
+inherit autotools eutils
+
+DESCRIPTION="User level application for IBM Mwave modem"
+HOMEPAGE="http://oss.software.ibm.com/acpmodem/"
+SRC_URI="ftp://www-126.ibm.com/pub/acpmodem/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE=""
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-glibc-2.10.patch
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ dosbin "${FILESDIR}/mwave-dev-handler"
+
+ insinto /etc/devfs.d
+ newins "${FILESDIR}/mwave.devfs" mwave
+
+ insinto /etc/modprobe.d
+ newins "${FILESDIR}/mwave.modules" mwave.conf
+
+ dodoc AUTHORS ChangeLog FAQ NEWS README README.devfs THANKS
+ docinto doc
+ dodoc doc/mwave.sgml doc/mwave.txt
+ dohtml doc/mwave.html
+}
+
+pkg_postinst() {
+ # Below is to get /etc/modules.d/mwave loaded into /etc/modules.conf
+ if [ "$ROOT" = "/" ]; then
+ [ -x /sbin/update-modules ] && /sbin/update-modules || /sbin/modules-update
+ fi
+
+ if [ -e "${ROOT}/dev/.devfsd" ]; then
+ # device node is created by devfs
+ ebegin "Restarting devfsd to reread devfs rules"
+ killall -HUP devfsd
+ eend $?
+ elif [ -e "${ROOT}/dev/.udev" ]; then
+ #the device should be created by udev
+ ebegin "Restarting udev to reread udev rules"
+ udevadm control --reload-rules
+ eend $?
+ else
+ [ ! -d "${ROOT}/dev/modem" ] && mkdir --mode=0755 "${ROOT}/dev/modems"
+ mknod --mode=0660 "${ROOT}/dev/modems/mwave" c 10 219
+ fi
+}
diff --git a/net-dialup/mwavem/mwavem-2.0-r2.ebuild b/net-dialup/mwavem/mwavem-2.0-r2.ebuild
new file mode 100644
index 000000000000..aa3588663efc
--- /dev/null
+++ b/net-dialup/mwavem/mwavem-2.0-r2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+AT_M4DIR="m4"
+AUTOTOOLS_AUTORECONF=1
+
+inherit autotools-utils
+
+DESCRIPTION="User level application for IBM Mwave modem"
+HOMEPAGE="http://oss.software.ibm.com/acpmodem/"
+SRC_URI="ftp://www-126.ibm.com/pub/acpmodem/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DOCS=( AUTHORS ChangeLog FAQ NEWS README README.devfs THANKS )
+
+PATCHES=(
+ "${FILESDIR}/${P}-gentoo.patch"
+ "${FILESDIR}/${P}-glibc-2.10.patch"
+)
+
+src_install() {
+ autotools-utils_src_install
+
+ dosbin "${FILESDIR}/mwave-dev-handler"
+
+ insinto /etc/devfs.d
+ newins "${FILESDIR}/mwave.devfs" mwave
+
+ insinto /etc/modprobe.d
+ newins "${FILESDIR}/mwave.modules" mwave.conf
+
+ docinto doc
+ dodoc doc/mwave.sgml doc/mwave.txt
+ dohtml doc/mwave.html
+}
+
+pkg_postinst() {
+ if [ -e "${ROOT}/dev/.devfsd" ]; then
+ # device node is created by devfs
+ ebegin "Restarting devfsd to reread devfs rules"
+ killall -HUP devfsd
+ eend $?
+ else
+ elog "Create device node if needed, using command like this:"
+ elog "# mknod --mode=0660 \"${ROOT}/dev/modems/mwave\" c 10 219"
+ fi
+}
diff --git a/net-dialup/neocon/Manifest b/net-dialup/neocon/Manifest
new file mode 100644
index 000000000000..508e1684c844
--- /dev/null
+++ b/net-dialup/neocon/Manifest
@@ -0,0 +1,5 @@
+DIST neocon-20110228.tar.bz2 3800 SHA256 e07ec16b98bc1495eb3ce22905d5a4fa0dfc3ab1363bb9884707763e341b1414 SHA512 184bc268416453e15f11f27e8627d75159b308bc2b5d5a706e6f6e1130aee4673677b88284c59b836960a620915f0cdac5d7554fd2bddb25b4a34bd37ca25fd2 WHIRLPOOL 3b3ba17ea62888cbc66aaa6576717776e405da69291e4761601c0607acbe4c5943beb96539b9be6c9c363d74fd992ee046be8380cdd308cfdb56514c2b8a516c
+EBUILD neocon-20110228.ebuild 507 SHA256 38494c115b6ffe6cf60eca2733474358f90224d4e144874a4e5adb63b95507ae SHA512 1a45722b591bec27b4107746b4ad63ef1b3c410dfb575bb5a48351ccb40a9dd7b0a51eeeeaa3485a1fa3ec15957d097d80aca29e5e341368ef197f2602e40a96 WHIRLPOOL 51b2457253448056e7c4dd535e1e093c4ec334adf3d827c96e38a628638255884f0ada9f02515e5a455673b102f02b516c8172bc56c725d4fb734dff2efe6116
+MISC ChangeLog 2207 SHA256 d573e639fb15714534d3ee2e3f740ba2aa40ccecc5c56a5998fc85594752cd54 SHA512 6d762e92b4b93e282003a90da99a4452fbd7ef3adf36112929dd73e03b3729db29b8b7d30313d1ec16e5822689c277a754aaabb679f54f95729b2e5b22cc218b WHIRLPOOL 18d046de468e8f897d036b680985820a052405c81445b3a0e498ae7676bff7881956f3c5470ac8cd36e6285ec99e653c0070dc5626ee555c6ecf68e50e15b0e8
+MISC ChangeLog-2015 463 SHA256 37386f09199f469a2c02d6eb619cd73ccae95e54037a1ae3e72e56248be8ddd3 SHA512 148844ced415c2cae125583b3b08e7e17b61f2bb3c91fccaf166935599aa5e8080c5f37af06362ce2c3c464131356fcdf3b00dbd3a67cf703cfc2049e2562fed WHIRLPOOL 206b7610f55ef506b66fbb6d061eb9385da715b5abb9fa8e1720b086011844f98c09c15fadecf23819fca6bf17d5e9c7de6900dfb2e234dcbf5f99ad822ac92b
+MISC metadata.xml 246 SHA256 92d5540a2f0904365eafb8ce96e6320cfc14e08f22e124d721521ef77ddbf6f6 SHA512 ca07e0609b698c2b53062b71008fee49b91af78fc2ef25997311e37985d79283d333f5b842257a16e7dee36ce34c07d405e1f93742f341f10ca70904e9f9a4e6 WHIRLPOOL d15a33750d6ada278082c675223992c98cccf98af92ec04ab5b908816381ab6965714988fac87a795265973c6fb81a588a08c385ac6fb66046d14d119e0c236c
diff --git a/net-dialup/neocon/metadata.xml b/net-dialup/neocon/metadata.xml
new file mode 100644
index 000000000000..78e64a5cf1ad
--- /dev/null
+++ b/net-dialup/neocon/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-dialup/neocon/neocon-20110228.ebuild b/net-dialup/neocon/neocon-20110228.ebuild
new file mode 100644
index 000000000000..d3302898f46d
--- /dev/null
+++ b/net-dialup/neocon/neocon-20110228.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="A simple serial console utility that tries to open ttys repeatedly"
+HOMEPAGE="http://wiki.openmoko.org/wiki/NeoCon"
+SRC_URI="https://dev.gentoo.org/~radhermit/distfiles/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" all
+}
+
+src_install() {
+ dobin neocon
+ dodoc README
+}
diff --git a/net-dialup/picocom/Manifest b/net-dialup/picocom/Manifest
new file mode 100644
index 000000000000..1852df7db4af
--- /dev/null
+++ b/net-dialup/picocom/Manifest
@@ -0,0 +1,5 @@
+DIST picocom-2.2.tar.gz 88670 SHA256 3e3904158d675541f0fcfdcd1f671b38445338f536080f5de8d6674b5f33d4ce SHA512 21495af30b81dfd1b3f4fea1ecf93c3a9252be1ae2ba94c7a2a07ceb75f562bc2ebc6ef6a8ae61f810ff5c121d4ab572a6f8ba75283e2cb28cf9886f834df0fa WHIRLPOOL 0c5aa85cbb8255e90632d737566bf4349169cdfbdc83cb65be617a87c8837a0d4fd3646061d816fc5ae6fbad761f97eb587b3572e163c0e0d0c183fddc900c8d
+EBUILD picocom-2.2.ebuild 788 SHA256 d4225302fc5b03d19c948c29cd2b2a9d06005a007185ffe5f06307617249ee43 SHA512 422a9e110619df5f6f8141831afcd642f01e112935e11b7b1e0e7b0b7d822d2f048517081a16cdcb6496077a8e2d0ed1efbdca52bb70357e28a917fc2d65d8ec WHIRLPOOL 98a957a28e7c7cf4f8484cdccb33acf65fb51f2beccdba760f6b6e7bce53c456bd712ab48ae257b1e5714bf65579bab08dd429af0af7fe3253ae17af5a7f794e
+MISC ChangeLog 3739 SHA256 943ed714b54f311b0f5985957153d87ebacc20a3fd46114a02793bafd7d814b1 SHA512 8504e9613dbe848e6fa242981069f9b53d91b973abc0d18a366b91e4cb3219786b284a2801d288f263467709b7dd3f40529186cee03c37f151d0bfe7b07ec2eb WHIRLPOOL d8e14050beeb4e64f37dfd83a49f3582665129f41f3f7d9c3a84e967d87e9cd5a59cfc96eb1527a2883882b44948503637d534b71fb2fbebd210428548ce12e9
+MISC ChangeLog-2015 1668 SHA256 dc96338ad968d77b5ce9ccfeca990256214c04e916bc71a38a58b3da745f7696 SHA512 e743fa10e9d569d01071580cbc42f3efe4ee02b5447a7f7842e98d34ef0a7645901cae61bb329638af4748f8c3e5cf65b8c46d44a7fb9f7c8bd45c41e5eac020 WHIRLPOOL b7a0ce8be01557aaaadf36cab702da46b5987f9dbfbbe6d9fff3286833f107bd05c5b07eaa0ca0b2b91b5faf33cfeb754e73c1bf5c697b54d010ddf8fcf6b203
+MISC metadata.xml 335 SHA256 98ceaa7eb9863b1fd7f2f6f0a4aa0c9dfdf9da16709e946777026aeafe781386 SHA512 9e039f41b69e370ca12ada0240ac7d9a2977cdc3bc1f2384c85cb14ae169b344272e9cb9705081e455a2a381533d488027f8a3e283e518d9ca23eac087e83bc4 WHIRLPOOL b9e433f817faff2977dd400d28f184738768ef2674ed26e69ed13e423482c1e3f2d5e0369153a61a9aa15ed94f05cf95617a1242036e76465bb66e055873464b
diff --git a/net-dialup/picocom/metadata.xml b/net-dialup/picocom/metadata.xml
new file mode 100644
index 000000000000..f9f6fb1f570a
--- /dev/null
+++ b/net-dialup/picocom/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>embedded@gentoo.org</email>
+ <name>Embedded Gentoo</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">npat-efault/picocom</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/picocom/picocom-2.2.ebuild b/net-dialup/picocom/picocom-2.2.ebuild
new file mode 100644
index 000000000000..635ec1958d2b
--- /dev/null
+++ b/net-dialup/picocom/picocom-2.2.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="minimal dumb-terminal emulation program"
+HOMEPAGE="https://github.com/npat-efault/picocom"
+SRC_URI="https://github.com/npat-efault/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~sparc x86 ~x86-fbsd"
+IUSE=""
+
+src_compile() {
+ # CPPFLAGS is shared between CFLAGS and CXXFLAGS, but there is no
+ # C++ file, and the pre-processor is never called directly, this
+ # is easier than patching it out.
+ emake LDFLAGS="${LDFLAGS}" CFLAGS="${CFLAGS} ${CPPFLAGS} -Wall" \
+ CC="$(tc-getCC)"
+}
+
+src_install() {
+ dobin picocom pc{asc,xm,ym,zm}
+ doman picocom.1
+ dodoc CHANGES.old CONTRIBUTORS README.md
+}
diff --git a/net-dialup/ppp-scripts/Manifest b/net-dialup/ppp-scripts/Manifest
new file mode 100644
index 000000000000..1bf9450c1184
--- /dev/null
+++ b/net-dialup/ppp-scripts/Manifest
@@ -0,0 +1,5 @@
+DIST ppp-scripts-0.tar.xz 1824 SHA256 41c9c8321ccc5a4b07079164528a83f9194c1640ac26cbf09894c493ab7394da SHA512 a36e6180b0acc8081b192602a2a5dbe765f1ba26e2cca8dc80d1dbc0e405b86acd6fe0cf655fb520c9f45373528773e64545876fd3370ce3514ffd9858916971 WHIRLPOOL 828b4488ccf996ef3c62bbae9d322fc185a26da16bf335da576e7092657b159c3248526669074aa9968577babda653e3716d0262a36585436b0d4bc9afae2cfa
+EBUILD ppp-scripts-0.ebuild 641 SHA256 03bf7241ebeb94178703dbab64668a6a8b0f265c2d29b5977f9517b43dcbdf28 SHA512 03ac32b84b924d4c910bc76ce6406118c1ff4bba1d3327ace4b578f9d6c281638fbed9ef90c37d84564c52e3b5c1aae1a617bc37a715991cd05ab58e711abbde WHIRLPOOL 23626fa22475d702605bcc8cccc23fdcedf5f4b3b2e1efabc81da83d4cf5990990b88b252f26f036de473282079f67fc5e642538011a09960dd230a024759dd7
+MISC ChangeLog 3022 SHA256 336c828a16e7c38bec0c9e58ca010d6e72719acde8f8ca3dbb74ced8cd1af235 SHA512 7a9b9151cb0ac7fa5e4bbd9fc1cac95423d184fad116836e57ebc1f58d1f3d49d75856e1ad5f754e2cc4d0ca00051f4d582bdc545ad566639e52f20d6c896a8c WHIRLPOOL bb1ecb750849978b60ca6732a346f1cb25cd718ab28ea77f7ff9a6fc1d0876e3beaa4f07c9e709044804ae748250202e564439b05eb05417d8d6e5b98bacf3ac
+MISC ChangeLog-2015 566 SHA256 94e5ed234dd7880f1bc52034a956f18c88c068fe4ca5589c67d566cacdccab79 SHA512 0810ec3f1aa260496492aef79d560b5c372707b281a38ff284b01ded1737b1a741de5bdb358536830baf7c8a1d9172c5614264db532077a5e16a316f19317a91 WHIRLPOOL d04b59f266a8a4c15382741bdf2fb573f64f370818a3871ecbb030908960308cf97b4e70b844b30ae4f14704e9bb3a554b4e74c8771ffbe707a338cd947f9718
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/net-dialup/ppp-scripts/metadata.xml b/net-dialup/ppp-scripts/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/net-dialup/ppp-scripts/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/net-dialup/ppp-scripts/ppp-scripts-0.ebuild b/net-dialup/ppp-scripts/ppp-scripts-0.ebuild
new file mode 100644
index 000000000000..023d91c31e53
--- /dev/null
+++ b/net-dialup/ppp-scripts/ppp-scripts-0.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Common set of scripts for various PPP implementations"
+HOMEPAGE="https://gentoo.org/"
+SRC_URI="https://dev.gentoo.org/~pinkbyte/distfiles/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86"
+
+DEPEND="!<net-dialup/ppp-2.4.7-r1"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+src_install() {
+ exeinto /etc/ppp
+ for i in ip-up ip-down ; do
+ doexe "scripts/${i}"
+ insinto /etc/ppp/${i}.d
+ dosym ${i} /etc/ppp/${i/ip/ipv6}
+ doins "scripts/${i}.d"/*
+ done
+}
diff --git a/net-dialup/ppp/Manifest b/net-dialup/ppp/Manifest
new file mode 100644
index 000000000000..6fe4c8ccf3f2
--- /dev/null
+++ b/net-dialup/ppp/Manifest
@@ -0,0 +1,11 @@
+AUX README.mpls 530 SHA256 5ef99aba902533fe9d17b7dfaf91e72b638cc70b9f811d1e518822ee80b5ff57 SHA512 2b617365fce74cceeb14e53f476b454c4420273661050d25e1c524cf5d56a7554318a268f7b9ebb100592b61a01d274efaeed28abb9ca0adaeb71ef981201b36 WHIRLPOOL f96310ae7e75bd4e289d97767f6a74a6a0a0006855068755d7cfb484950e145246472b3a6cffcd0db44c589ed43720f998872ef1e7b12a3ccd02e833d80e6e84
+AUX modules.ppp 299 SHA256 8947dd48d3d0c128166edc9bb0917b9af88502296fad791d6d90bf165ca50db3 SHA512 58bf5d6d286a08bd6dd595b39ee425efedd5745dddf33a9c90505891546eb46f4cf1306d83911bef61bc4611816aa0f6aef5d3e0f14c2f4ddd0a588780570041 WHIRLPOOL dfc2d6fb1a36b74b0dd998739bb1c5977234c2d88100f686fb6faae2826795b0ca217937a7775660421f5ebc356e5e1378849ac6e56fef018eceab6f90bb26e3
+DIST ppp-2.4.7-patches-4.tar.xz 37308 SHA256 afd96003fb50b462852d81f10af344ff23dcf26f626e65301b45dbaaa89f03c4 SHA512 f217f7272a791605101e0f1885350db8ff8b580a647e670461b81fe0026ee9050ce68b9b9635edee89ec1ada7adf000c7e6b3aa5a5dafec875ce715a9dfb84d2 WHIRLPOOL ec8ef47938eac296e1573c8281afbfc0914e4cd2461a082f670a2367f4a77359f09b4986c10c498bf39b6a1441bbf9700529991a82a01854d8e2289a14636e9d
+DIST ppp-2.4.7-patches-5.tar.xz 38680 SHA256 0bdc52dfb43fd2ab2b4beade8ce8db804b97ed098995416490977ee82a360f58 SHA512 f8cdbb8fd4bf10eb5b4e911f1e8415f24d02297280aa6f5e63617c0533af41525bd54932eb050728320a2697efe5206d869f014bcfb8f8f3723ecefed1976adc WHIRLPOOL 6b1b9271173f1d4d7db07f1c2c71cf4c3c4c0df8101623793163a0fe6d9da4aa1c675254b8746eacc906d08b61544463806d7a3d1eb781b53d7a20433c7da448
+DIST ppp-2.4.7.tar.gz 688117 SHA256 02e0a3dd3e4799e33103f70ec7df75348c8540966ee7c948e4ed8a42bbccfb30 SHA512 e34ce24020af6a73e7a26c83c4f73a9c83fa455b7b363794dba27bf01f70368be06bff779777843949bd77f4bc9385d6ad455ea48bf8fff4e0d73cc8fef16ae2 WHIRLPOOL 48f3251e6b955ecfdaf9260b9ea5220d9e355fff836e2f5217ee0b15bf2c93e43f8207005f58bf1f97fb8ff0c76c56df8ecd8536f63c4d84d5940458ba0ba5c3
+DIST ppp-dhcpc.tgz 33497 SHA256 977fd980bb1d285963d8e27a87b7601ea84317faadfdb40989b258d1853db644 SHA512 aeaf791b14f5a09c0e2079072a157e65132cbff46e608bc0724e6a5827a01da934f5006e2774eb7105f83e607a52cb4987238f4385cf6f5cc86cbe305a556738 WHIRLPOOL 74e5e0d7f9bc52d1b9cfeff83fe74c2b38cc10c60636cd9c0f5d67d61dc7da56dbf2bcc84afa29444546792876cb36afbc853a6515ce9b3d83d6de98eacedd1e
+EBUILD ppp-2.4.7-r3.ebuild 6797 SHA256 82c57c1955b39f03854537f383f1a2aff67f7a36c97a1f29371fe420bc44bdb2 SHA512 1a70b243ad38101122e5b1f58b3d7ab956f38ff536d4050139872dfbcb92818b279e8d32ffa519066bb51a2a686fca8f17d2221d28249fb8edba9db7ce215abb WHIRLPOOL e343b1a9ce6ee2d72ce44e9784ead21ced0c5da378026edb31a7edc0b0f5b480d952490414cf7178f3efebae7fa2855bb270b187ccb5deb679f55d71c93c20c4
+EBUILD ppp-2.4.7-r4.ebuild 6806 SHA256 42887505c04a46d74f7ebb50fe0b8dbdc248536bc134bf26b7c98c421a1894a7 SHA512 ef21404a7a9b13cd9da1bc36404d3b49ac5f9997ca41f3bb27f785d775ce29ddddfdda7e280e6de04ab9f51fb6ab5cc60424c099e983fac5ba164c4867a1f99d WHIRLPOOL 1a54ffad3e88508d6ea12029de07fbe47628ab3f5c9f3c94392cb8636ddd05299aaa95743520fb02ae23b352a141df0b86b4e1095e002f511b83574359409bb2
+MISC ChangeLog 4976 SHA256 67242cf7fe1ec6c64b770652cf7e1c9bebad958358dc024e59745e5da41f5395 SHA512 f47315445fb43b9f748d1d723f7920a3cd47692268dc976f9ca3bcdcef9f3c9bf2583bd1837e31a6d07268ff7369d24e69bf45610530ecc99baf40fe2147018b WHIRLPOOL 5c3293d6f7e810a5844463439716545d4f1149ece89002d42d3870213cf6626dcd7981d76f8d2250ffab2c52dc0a22ac59492fa578208bc15feedc7498300952
+MISC ChangeLog-2015 48359 SHA256 7fc888cc470be8f7d8fb3dc93e5f47663040b3a7b831714a6df5a3a9709e7b59 SHA512 21979dedf9368f3b3135b54dd7ce8db70c105461bfdd2b1c2c8c3d1986bc6285a19621cfcca52a4130e0d32997a89bf3cdbcb232159987689689c14bd81145b5 WHIRLPOOL 597664594efeb789dcefd0e7ea0b722a53463910757c57994c3b13516d338c86157a3d819fd7367c63155e78bacb96192079753f2b184c88beb65319534d3fac
+MISC metadata.xml 1470 SHA256 f202e01dec4fa5519f5720c1b1eea86e9cc67ea119f2e8c0b35953c879d6dd2e SHA512 2b00f6c0b4f3079eb885327188e12d151ec3d9682df9a71232b331524d9d3430af5fe342ca4198d926c012059786ec6a7e91fffeec899069a990e032b94b94c4 WHIRLPOOL ffa072ae03216d551c6335cd49633ceb96dbc7e4200a46ced255c1fe8d33dfde5ea5426cac50156d6934b228f35191b6a061c2f95431adc6daef111ad65837a9
diff --git a/net-dialup/ppp/files/README.mpls b/net-dialup/ppp/files/README.mpls
new file mode 100644
index 000000000000..1ae7ae46057a
--- /dev/null
+++ b/net-dialup/ppp/files/README.mpls
@@ -0,0 +1,15 @@
+MPLS consists of 3 components:
+1. MPLS forwarding
+2. MPLS signalling
+3. Mapping layer 3 traffic onto MPLS LSPs
+
+The document mpls-forwarding basics explains item 1.
+
+Examples of MPLS signalling protocols are: RSVP-TE LDP and CR-LDP.
+The package ldp-portable is an implementation of LDP and contains more
+information about LDP based MPLS signalling.
+
+Mapping of layer 3 traffic to MPLS LSPs is accomplised in a couple of
+different ways.
+-Per FEC where FEC is an entry in the routing table
+-Virtual interface that represents an LSP
diff --git a/net-dialup/ppp/files/modules.ppp b/net-dialup/ppp/files/modules.ppp
new file mode 100644
index 000000000000..e936041c6bb3
--- /dev/null
+++ b/net-dialup/ppp/files/modules.ppp
@@ -0,0 +1,10 @@
+alias char-major-108 ppp_generic
+alias /dev/ppp ppp_generic
+alias tty-ldisc-3 ppp_async
+alias tty-ldisc-13 n_hdlc
+alias tty-ldisc-14 ppp_synctty
+alias ppp-compress-18 ppp_mppe
+alias ppp-compress-21 bsd_comp
+alias ppp-compress-24 ppp_deflate
+alias ppp-compress-26 ppp_deflate
+alias net-pf-24 pppoe
diff --git a/net-dialup/ppp/metadata.xml b/net-dialup/ppp/metadata.xml
new file mode 100644
index 000000000000..291e09f93cd4
--- /dev/null
+++ b/net-dialup/ppp/metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <longdescription>ppp (Paul's PPP Package) is an open source package which
+ implements the Point-to-Point Protocol</longdescription>
+ <use>
+ <flag name="activefilter">Enables active filter support</flag>
+ <flag name="atm">Enables ATM (Asynchronous Transfer Mode) protocol
+ support</flag>
+ <flag name="dhcp">Installs PPP DHCP client plugin for IP address allocation
+ by a DHCP server (see http://www.netservers.co.uk/gpl/)</flag>
+ <flag name="eap-tls">Enables support for Extensible Authentication
+ Protocol and Transport Level Security (see
+ http://www.nikhef.nl/~janjust/ppp/index.html)</flag>
+ <flag name="gtk">Installs GTK+ password prompting program that can be used
+ by passprompt.so PPP plugin for reading the password from a X11 input
+ terminal</flag>
+ <flag name="ipv6">Enables support for IP version 6</flag>
+ <flag name="pam">Enables PAM (Pluggable Authentication Modules)
+ support</flag>
+ <flag name="radius">Enables RADIUS support</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:samba:ppp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/ppp/ppp-2.4.7-r3.ebuild b/net-dialup/ppp/ppp-2.4.7-r3.ebuild
new file mode 100644
index 000000000000..7a00f3276714
--- /dev/null
+++ b/net-dialup/ppp/ppp-2.4.7-r3.ebuild
@@ -0,0 +1,221 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils linux-info multilib pam toolchain-funcs
+
+PATCH_VER="4"
+DESCRIPTION="Point-to-Point Protocol (PPP)"
+HOMEPAGE="http://www.samba.org/ppp"
+SRC_URI="ftp://ftp.samba.org/pub/ppp/${P}.tar.gz
+ https://dev.gentoo.org/~polynomial-c/${P}-patches-${PATCH_VER}.tar.xz
+ http://www.netservers.net.uk/gpl/ppp-dhcpc.tgz"
+
+LICENSE="BSD GPL-2"
+SLOT="0/${PV}"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86"
+IUSE="activefilter atm dhcp eap-tls gtk ipv6 libressl pam radius"
+
+DEPEND="activefilter? ( net-libs/libpcap )
+ atm? ( net-dialup/linux-atm )
+ pam? ( virtual/pam )
+ gtk? ( x11-libs/gtk+:2 )
+ eap-tls? (
+ net-misc/curl
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )"
+RDEPEND="${DEPEND}"
+PDEPEND="net-dialup/ppp-scripts"
+
+src_prepare() {
+ mv "${WORKDIR}/dhcp" "${S}/pppd/plugins" || die
+
+ use eap-tls || EPATCH_EXCLUDE+=" 8?_all_eaptls-*"
+ EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}"/patch
+
+ if use atm ; then
+ einfo "Enabling PPPoATM support"
+ sed -i '/^#HAVE_LIBATM=yes/s:#::' \
+ pppd/plugins/pppoatm/Makefile.linux || die
+ fi
+
+ if ! use activefilter ; then
+ einfo "Disabling active filter"
+ sed -i '/^FILTER=y/s:^:#:' pppd/Makefile.linux || die
+ fi
+
+ if use pam ; then
+ einfo "Enabling PAM"
+ sed -i '/^#USE_PAM=y/s:^#::' pppd/Makefile.linux || die
+ fi
+
+ if use ipv6 ; then
+ einfo "Enabling IPv6"
+ sed -i '/#HAVE_INET6/s:#::' pppd/Makefile.linux || die
+ fi
+
+ einfo "Enabling CBCP"
+ sed -i '/^#CBCP=y/s:#::' pppd/Makefile.linux || die
+
+ if use dhcp ; then
+ einfo "Adding ppp-dhcp plugin files"
+ sed -i \
+ -e '/^SUBDIRS :=/s:$: dhcp:' \
+ pppd/plugins/Makefile.linux || die
+ fi
+
+ # Set correct libdir
+ sed -i -e "s:/lib/pppd:/$(get_libdir)/pppd:" \
+ pppd/{pathnames.h,pppd.8} || die
+
+ if use radius ; then
+ #set the right paths in radiusclient.conf
+ sed -i -e "s:/usr/local/etc:/etc:" \
+ -e "s:/usr/local/sbin:/usr/sbin:" \
+ pppd/plugins/radius/etc/radiusclient.conf || die
+ #set config dir to /etc/ppp/radius
+ sed -i -e "s:/etc/radiusclient:/etc/ppp/radius:g" \
+ pppd/plugins/radius/{*.8,*.c,*.h} \
+ pppd/plugins/radius/etc/* || die
+ else
+ einfo "Disabling radius"
+ sed -i -e '/+= radius/s:^:#:' pppd/plugins/Makefile.linux || die
+ fi
+
+ epatch_user # 549588
+}
+
+src_compile() {
+ tc-export AR CC
+ emake COPTS="${CFLAGS} -D_GNU_SOURCE"
+
+ # build pppgetpass
+ cd contrib/pppgetpass || die
+ if use gtk ; then
+ emake -f Makefile.linux
+ else
+ emake pppgetpass.vt
+ fi
+}
+
+src_install() {
+ local i
+ for i in chat pppd pppdump pppstats ; do
+ doman ${i}/${i}.8
+ dosbin ${i}/${i}
+ done
+ fperms u+s-w /usr/sbin/pppd
+
+ # Install pppd header files
+ emake -C pppd INSTROOT="${D}" install-devel
+
+ dosbin pppd/plugins/rp-pppoe/pppoe-discovery
+
+ dodir /etc/ppp/peers
+ insinto /etc/ppp
+ insopts -m0600
+ newins etc.ppp/pap-secrets pap-secrets.example
+ newins etc.ppp/chap-secrets chap-secrets.example
+
+ insopts -m0644
+ doins etc.ppp/options
+
+ pamd_mimic_system ppp auth account session
+
+ local PLUGINS_DIR="/usr/$(get_libdir)/pppd/${PV}"
+ # closing " for syntax coloring
+ insinto "${PLUGINS_DIR}"
+ insopts -m0755
+ doins pppd/plugins/minconn.so
+ doins pppd/plugins/passprompt.so
+ doins pppd/plugins/passwordfd.so
+ doins pppd/plugins/winbind.so
+ doins pppd/plugins/rp-pppoe/rp-pppoe.so
+ doins pppd/plugins/pppol2tp/openl2tp.so
+ doins pppd/plugins/pppol2tp/pppol2tp.so
+ if use atm ; then
+ doins pppd/plugins/pppoatm/pppoatm.so
+ fi
+ if use dhcp ; then
+ doins pppd/plugins/dhcp/dhcpc.so
+ fi
+ if use radius ; then
+ doins pppd/plugins/radius/rad{ius,attr,realms}.so
+
+ #Copy radiusclient configuration files (#92878)
+ insinto /etc/ppp/radius
+ insopts -m0644
+ doins pppd/plugins/radius/etc/{dictionary*,issue,port-id-map,radiusclient.conf,realms,servers}
+
+ doman pppd/plugins/radius/pppd-rad{ius,attr}.8
+ fi
+
+ insinto /etc/modprobe.d
+ insopts -m0644
+ newins "${FILESDIR}/modules.ppp" ppp.conf
+
+ dodoc PLUGINS README* SETUP Changes-2.3 FAQ
+ dodoc "${FILESDIR}/README.mpls"
+
+ dosbin scripts/p{on,off,log}
+ doman scripts/pon.1
+
+ # Adding misc. specialized scripts to doc dir
+ insinto /usr/share/doc/${PF}/scripts/chatchat
+ doins scripts/chatchat/*
+ insinto /usr/share/doc/${PF}/scripts
+ doins scripts/*
+
+ if use gtk ; then
+ dosbin contrib/pppgetpass/{pppgetpass.vt,pppgetpass.gtk}
+ newsbin contrib/pppgetpass/pppgetpass.sh pppgetpass
+ else
+ newsbin contrib/pppgetpass/pppgetpass.vt pppgetpass
+ fi
+ doman contrib/pppgetpass/pppgetpass.8
+}
+
+pkg_postinst() {
+ if linux-info_get_any_version && linux_config_src_exists ; then
+ echo
+ ewarn "If the following test report contains a missing kernel configuration option that you need,"
+ ewarn "you should reconfigure and rebuild your kernel before running pppd."
+ CONFIG_CHECK="~PPP ~PPP_ASYNC ~PPP_SYNC_TTY"
+ local ERROR_PPP="CONFIG_PPP:\t missing PPP support (REQUIRED)"
+ local ERROR_PPP_ASYNC="CONFIG_PPP_ASYNC:\t missing asynchronous serial line discipline (optional, but highly recommended)"
+ local WARNING_PPP_SYNC_TTY="CONFIG_PPP_SYNC_TTY:\t missing synchronous serial line discipline (optional; used by 'sync' pppd option)"
+ if use activefilter ; then
+ CONFIG_CHECK="${CONFIG_CHECK} ~PPP_FILTER"
+ local ERROR_PPP_FILTER="CONFIG_PPP_FILTER:\t missing PPP filtering support (REQUIRED)"
+ fi
+ CONFIG_CHECK="${CONFIG_CHECK} ~PPP_DEFLATE ~PPP_BSDCOMP ~PPP_MPPE"
+ local ERROR_PPP_DEFLATE="CONFIG_PPP_DEFLATE:\t missing Deflate compression (optional, but highly recommended)"
+ local ERROR_PPP_BSDCOMP="CONFIG_PPP_BSDCOMP:\t missing BSD-Compress compression (optional, but highly recommended)"
+ local WARNING_PPP_MPPE="CONFIG_PPP_MPPE:\t missing MPPE encryption (optional, mostly used by PPTP links)"
+ CONFIG_CHECK="${CONFIG_CHECK} ~PPPOE ~PACKET"
+ local WARNING_PPPOE="CONFIG_PPPOE:\t missing PPPoE support (optional, needed by rp-pppoe plugin)"
+ local WARNING_PACKET="CONFIG_PACKET:\t missing AF_PACKET support (optional, used by rp-pppoe and dhcpc plugins)"
+ if use atm ; then
+ CONFIG_CHECK="${CONFIG_CHECK} ~PPPOATM"
+ local WARNING_PPPOATM="CONFIG_PPPOATM:\t missing PPPoA support (optional, needed by pppoatm plugin)"
+ fi
+ check_extra_config
+ fi
+
+ # create *-secrets files if not exists
+ [ -f "${ROOT}/etc/ppp/pap-secrets" ] || \
+ cp -pP "${ROOT}/etc/ppp/pap-secrets.example" "${ROOT}/etc/ppp/pap-secrets"
+ [ -f "${ROOT}/etc/ppp/chap-secrets" ] || \
+ cp -pP "${ROOT}/etc/ppp/chap-secrets.example" "${ROOT}/etc/ppp/chap-secrets"
+
+ # lib name has changed
+ sed -i -e "s:^pppoe.so:rp-pppoe.so:" "${ROOT}/etc/ppp/options" || die
+
+ echo
+ elog "Pon, poff and plog scripts have been supplied for experienced users."
+ elog "Users needing particular scripts (ssh,rsh,etc.) should check out the"
+ elog "/usr/share/doc/${PF}/scripts directory."
+}
diff --git a/net-dialup/ppp/ppp-2.4.7-r4.ebuild b/net-dialup/ppp/ppp-2.4.7-r4.ebuild
new file mode 100644
index 000000000000..2a577cba7e79
--- /dev/null
+++ b/net-dialup/ppp/ppp-2.4.7-r4.ebuild
@@ -0,0 +1,221 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils linux-info multilib pam toolchain-funcs
+
+PATCH_VER="5"
+DESCRIPTION="Point-to-Point Protocol (PPP)"
+HOMEPAGE="http://www.samba.org/ppp"
+SRC_URI="ftp://ftp.samba.org/pub/ppp/${P}.tar.gz
+ https://dev.gentoo.org/~polynomial-c/${P}-patches-${PATCH_VER}.tar.xz
+ http://www.netservers.net.uk/gpl/ppp-dhcpc.tgz"
+
+LICENSE="BSD GPL-2"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="activefilter atm dhcp eap-tls gtk ipv6 libressl pam radius"
+
+DEPEND="activefilter? ( net-libs/libpcap )
+ atm? ( net-dialup/linux-atm )
+ pam? ( virtual/pam )
+ gtk? ( x11-libs/gtk+:2 )
+ eap-tls? (
+ net-misc/curl
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )"
+RDEPEND="${DEPEND}"
+PDEPEND="net-dialup/ppp-scripts"
+
+src_prepare() {
+ mv "${WORKDIR}/dhcp" "${S}/pppd/plugins" || die
+
+ use eap-tls || EPATCH_EXCLUDE+=" 8?_all_eaptls-*"
+ EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}"/patch
+
+ if use atm ; then
+ einfo "Enabling PPPoATM support"
+ sed -i '/^#HAVE_LIBATM=yes/s:#::' \
+ pppd/plugins/pppoatm/Makefile.linux || die
+ fi
+
+ if ! use activefilter ; then
+ einfo "Disabling active filter"
+ sed -i '/^FILTER=y/s:^:#:' pppd/Makefile.linux || die
+ fi
+
+ if use pam ; then
+ einfo "Enabling PAM"
+ sed -i '/^#USE_PAM=y/s:^#::' pppd/Makefile.linux || die
+ fi
+
+ if use ipv6 ; then
+ einfo "Enabling IPv6"
+ sed -i '/#HAVE_INET6/s:#::' pppd/Makefile.linux || die
+ fi
+
+ einfo "Enabling CBCP"
+ sed -i '/^#CBCP=y/s:#::' pppd/Makefile.linux || die
+
+ if use dhcp ; then
+ einfo "Adding ppp-dhcp plugin files"
+ sed -i \
+ -e '/^SUBDIRS :=/s:$: dhcp:' \
+ pppd/plugins/Makefile.linux || die
+ fi
+
+ # Set correct libdir
+ sed -i -e "s:/lib/pppd:/$(get_libdir)/pppd:" \
+ pppd/{pathnames.h,pppd.8} || die
+
+ if use radius ; then
+ #set the right paths in radiusclient.conf
+ sed -i -e "s:/usr/local/etc:/etc:" \
+ -e "s:/usr/local/sbin:/usr/sbin:" \
+ pppd/plugins/radius/etc/radiusclient.conf || die
+ #set config dir to /etc/ppp/radius
+ sed -i -e "s:/etc/radiusclient:/etc/ppp/radius:g" \
+ pppd/plugins/radius/{*.8,*.c,*.h} \
+ pppd/plugins/radius/etc/* || die
+ else
+ einfo "Disabling radius"
+ sed -i -e '/+= radius/s:^:#:' pppd/plugins/Makefile.linux || die
+ fi
+
+ epatch_user # 549588
+}
+
+src_compile() {
+ tc-export AR CC
+ emake COPTS="${CFLAGS} -D_GNU_SOURCE"
+
+ # build pppgetpass
+ cd contrib/pppgetpass || die
+ if use gtk ; then
+ emake -f Makefile.linux
+ else
+ emake pppgetpass.vt
+ fi
+}
+
+src_install() {
+ local i
+ for i in chat pppd pppdump pppstats ; do
+ doman ${i}/${i}.8
+ dosbin ${i}/${i}
+ done
+ fperms u+s-w /usr/sbin/pppd
+
+ # Install pppd header files
+ emake -C pppd INSTROOT="${D}" install-devel
+
+ dosbin pppd/plugins/rp-pppoe/pppoe-discovery
+
+ dodir /etc/ppp/peers
+ insinto /etc/ppp
+ insopts -m0600
+ newins etc.ppp/pap-secrets pap-secrets.example
+ newins etc.ppp/chap-secrets chap-secrets.example
+
+ insopts -m0644
+ doins etc.ppp/options
+
+ pamd_mimic_system ppp auth account session
+
+ local PLUGINS_DIR="/usr/$(get_libdir)/pppd/${PV}"
+ # closing " for syntax coloring
+ insinto "${PLUGINS_DIR}"
+ insopts -m0755
+ doins pppd/plugins/minconn.so
+ doins pppd/plugins/passprompt.so
+ doins pppd/plugins/passwordfd.so
+ doins pppd/plugins/winbind.so
+ doins pppd/plugins/rp-pppoe/rp-pppoe.so
+ doins pppd/plugins/pppol2tp/openl2tp.so
+ doins pppd/plugins/pppol2tp/pppol2tp.so
+ if use atm ; then
+ doins pppd/plugins/pppoatm/pppoatm.so
+ fi
+ if use dhcp ; then
+ doins pppd/plugins/dhcp/dhcpc.so
+ fi
+ if use radius ; then
+ doins pppd/plugins/radius/rad{ius,attr,realms}.so
+
+ #Copy radiusclient configuration files (#92878)
+ insinto /etc/ppp/radius
+ insopts -m0644
+ doins pppd/plugins/radius/etc/{dictionary*,issue,port-id-map,radiusclient.conf,realms,servers}
+
+ doman pppd/plugins/radius/pppd-rad{ius,attr}.8
+ fi
+
+ insinto /etc/modprobe.d
+ insopts -m0644
+ newins "${FILESDIR}/modules.ppp" ppp.conf
+
+ dodoc PLUGINS README* SETUP Changes-2.3 FAQ
+ dodoc "${FILESDIR}/README.mpls"
+
+ dosbin scripts/p{on,off,log}
+ doman scripts/pon.1
+
+ # Adding misc. specialized scripts to doc dir
+ insinto /usr/share/doc/${PF}/scripts/chatchat
+ doins scripts/chatchat/*
+ insinto /usr/share/doc/${PF}/scripts
+ doins scripts/*
+
+ if use gtk ; then
+ dosbin contrib/pppgetpass/{pppgetpass.vt,pppgetpass.gtk}
+ newsbin contrib/pppgetpass/pppgetpass.sh pppgetpass
+ else
+ newsbin contrib/pppgetpass/pppgetpass.vt pppgetpass
+ fi
+ doman contrib/pppgetpass/pppgetpass.8
+}
+
+pkg_postinst() {
+ if linux-info_get_any_version && linux_config_src_exists ; then
+ echo
+ ewarn "If the following test report contains a missing kernel configuration option that you need,"
+ ewarn "you should reconfigure and rebuild your kernel before running pppd."
+ CONFIG_CHECK="~PPP ~PPP_ASYNC ~PPP_SYNC_TTY"
+ local ERROR_PPP="CONFIG_PPP:\t missing PPP support (REQUIRED)"
+ local ERROR_PPP_ASYNC="CONFIG_PPP_ASYNC:\t missing asynchronous serial line discipline (optional, but highly recommended)"
+ local WARNING_PPP_SYNC_TTY="CONFIG_PPP_SYNC_TTY:\t missing synchronous serial line discipline (optional; used by 'sync' pppd option)"
+ if use activefilter ; then
+ CONFIG_CHECK="${CONFIG_CHECK} ~PPP_FILTER"
+ local ERROR_PPP_FILTER="CONFIG_PPP_FILTER:\t missing PPP filtering support (REQUIRED)"
+ fi
+ CONFIG_CHECK="${CONFIG_CHECK} ~PPP_DEFLATE ~PPP_BSDCOMP ~PPP_MPPE"
+ local ERROR_PPP_DEFLATE="CONFIG_PPP_DEFLATE:\t missing Deflate compression (optional, but highly recommended)"
+ local ERROR_PPP_BSDCOMP="CONFIG_PPP_BSDCOMP:\t missing BSD-Compress compression (optional, but highly recommended)"
+ local WARNING_PPP_MPPE="CONFIG_PPP_MPPE:\t missing MPPE encryption (optional, mostly used by PPTP links)"
+ CONFIG_CHECK="${CONFIG_CHECK} ~PPPOE ~PACKET"
+ local WARNING_PPPOE="CONFIG_PPPOE:\t missing PPPoE support (optional, needed by rp-pppoe plugin)"
+ local WARNING_PACKET="CONFIG_PACKET:\t missing AF_PACKET support (optional, used by rp-pppoe and dhcpc plugins)"
+ if use atm ; then
+ CONFIG_CHECK="${CONFIG_CHECK} ~PPPOATM"
+ local WARNING_PPPOATM="CONFIG_PPPOATM:\t missing PPPoA support (optional, needed by pppoatm plugin)"
+ fi
+ check_extra_config
+ fi
+
+ # create *-secrets files if not exists
+ [ -f "${ROOT}/etc/ppp/pap-secrets" ] || \
+ cp -pP "${ROOT}/etc/ppp/pap-secrets.example" "${ROOT}/etc/ppp/pap-secrets"
+ [ -f "${ROOT}/etc/ppp/chap-secrets" ] || \
+ cp -pP "${ROOT}/etc/ppp/chap-secrets.example" "${ROOT}/etc/ppp/chap-secrets"
+
+ # lib name has changed
+ sed -i -e "s:^pppoe.so:rp-pppoe.so:" "${ROOT}/etc/ppp/options" || die
+
+ echo
+ elog "Pon, poff and plog scripts have been supplied for experienced users."
+ elog "Users needing particular scripts (ssh,rsh,etc.) should check out the"
+ elog "/usr/share/doc/${PF}/scripts directory."
+}
diff --git a/net-dialup/pppconfig/Manifest b/net-dialup/pppconfig/Manifest
new file mode 100644
index 000000000000..ee8487f1d629
--- /dev/null
+++ b/net-dialup/pppconfig/Manifest
@@ -0,0 +1,6 @@
+AUX pppconfig 219 SHA256 d12b1519bf234ac595b6e76988f1eb4660977e5620c8d62d78a89db90d2e2448 SHA512 1fce4236bc67ff9f9c5d5d273794863504dd93f75c6383ac921028ed255b3b7830ae4dd7182cf0f93241e350a7ef0619ad9f8bd38c50d20b4baf86421bc075d9 WHIRLPOOL 18b5b9e0f95c157a36e969299b42bffc33fb974f21ebd825769b03ed6aafce28d9bc5b4a73a713589fe279b3b4f91ea8bb8f3278e157b0cd49dc9826acba7873
+DIST pppconfig_2.3.21.tar.gz 397243 SHA256 cc8bd046aa8c9495b589ec87d5051a237ba89d0dcb7b1924a50a72dfac6f20f8 SHA512 e6297a6834eb806d591aee44343c6e64536e260ea8e637f3a4d4b5a752e26ae90d467ca12dd83022e071f7c2c4f111660418a6b953c4a02f5618fc54a89c2893 WHIRLPOOL d02d0c1da782ede453633086497d51cf8ae456601694e782337b39cc33efad88f57cf4dee7df15020a40144dbd9f2d384fb4801d2b182ddb131f93ecef3a0e19
+EBUILD pppconfig-2.3.21.ebuild 1048 SHA256 d0db5f10cc8d45275acf57f21aba239f3d9598e68b77a104342c20512cfcab86 SHA512 6a68b90aae289e25f7b05bb6fd8713f0fc191cb35506415982c9b5649dd93dd79e0ed98e86e8f1af6b38faf08124233656402953bab7f8c544caab81d96a5515 WHIRLPOOL 3f177f57fb20ae3fbefcd4b0073d870a66e7e6f972cc767dc6f5a1bc7b7aaa2a9ffdc08c04d507b680a73cf4cf3212d21788010b1bf10db6b3837ce20117b16d
+MISC ChangeLog 2674 SHA256 5e58574d1e0acab4bef1eaf4768530ae2abf1c391e1273d689bb64db635155bd SHA512 090028a5dd0eea4a47a5d22ccff148eabe2d4b3bfcab1947a52dbe261ba5a8706110f817ff855d0be11c8b94653f688172f84e449bc962dcadff0782de6a6cfa WHIRLPOOL 13feec46c217385b66760d98b352fa5d4173966655e1fcc8041b7f8aecacfebe4372890b841130227a322f2c4dc1e219cb0eaf639256c984254e726ec961f929
+MISC ChangeLog-2015 5340 SHA256 ff8ab8c0a4c6ad1d9b60fbea9516c99d44a0a1b0c48bb8d66c8a039da3721829 SHA512 ce1d589b9575645fa53bba30ee302b01022a1efaa681f3bead36f2eca234baa0757de707268d259e26d8d9544abdbda866cb2a2e012a189e73e21dc7633f2e16 WHIRLPOOL 77242fcff54794610f2f4d2793666f07e7fe9084743eb49debed0dfd75e461b280fab91b2d69f2705ef7d5d2a88765f1199f85691bd8995e41ed8b2e9034acf7
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/net-dialup/pppconfig/files/pppconfig b/net-dialup/pppconfig/files/pppconfig
new file mode 100644
index 000000000000..606300f2026b
--- /dev/null
+++ b/net-dialup/pppconfig/files/pppconfig
@@ -0,0 +1,9 @@
+#!/bin/sh
+# Since I don't feel like installing whiptail, we need to wrap this app
+PPPCONFIG="/usr/sbin/pppconfig.real"
+if [ -x ${PPPCONFIG} ]; then
+ $PPPCONFIG --dialog
+else
+ echo "Error starting $PPPCONFIG"
+ exit 1
+fi
diff --git a/net-dialup/pppconfig/metadata.xml b/net-dialup/pppconfig/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/net-dialup/pppconfig/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/net-dialup/pppconfig/pppconfig-2.3.21.ebuild b/net-dialup/pppconfig/pppconfig-2.3.21.ebuild
new file mode 100644
index 000000000000..85b063a1b96b
--- /dev/null
+++ b/net-dialup/pppconfig/pppconfig-2.3.21.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="A text menu based utility for configuring ppp"
+HOMEPAGE="https://packages.qa.debian.org/p/pppconfig.html"
+SRC_URI="mirror://debian/pool/main/p/${PN}/${P/-/_}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc x86"
+IUSE="nls"
+
+RDEPEND="net-dialup/ppp
+ dev-util/dialog
+ dev-lang/perl"
+DEPEND="nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ if use nls; then
+ strip-linguas -i po/
+ fi
+}
+
+src_compile() {
+ default
+
+ if use nls; then
+ local lang
+ for lang in ${LINGUAS}; do
+ msgfmt -o po/${lang}.{m,p}o || die
+ done
+ fi
+}
+
+src_install () {
+ dodir /etc/chatscripts /etc/ppp/resolv
+ dosbin 0dns-down 0dns-up dns-clean
+ newsbin pppconfig pppconfig.real
+ dosbin "${FILESDIR}/pppconfig"
+ doman man/pppconfig.8
+ dodoc debian/{copyright,changelog}
+
+ if use nls; then
+ local lang
+ for lang in ${LINGUAS}; do
+ insinto /usr/share/locale/${lang}/LC_MESSAGES
+ newins po/${lang}.mo pppconfig.mo
+ done
+ fi
+}
diff --git a/net-dialup/pptpclient/Manifest b/net-dialup/pptpclient/Manifest
new file mode 100644
index 000000000000..4a315c9da0dc
--- /dev/null
+++ b/net-dialup/pptpclient/Manifest
@@ -0,0 +1,12 @@
+AUX pptp_fe.pl 8097 SHA256 47a47315c8cad7b3d8c79d57629a22d699fd2176e6675fbe6b0084cd9280b11b SHA512 7ea144546b0435a6c94306c831a91edb0915342b31701d87a417f45547353dad9509b5e4dfe1abf117982d3fecdd466af79c0a232f13ee0890bb375f41543342 WHIRLPOOL 048b93d84c3690ba9ae62bb9868451b8f92c6a5e5a2291d9f51c4b930af21d80e6105b29b17663f036c6821e22ff7d392a5f369354a0fdb3bd924dc44120690d
+AUX pptpclient-1.7.2-process-name.patch 1242 SHA256 a16bc434f301af72f43cca41a17e8232006878295b0f4f2a3fc5dbe85b020b5e SHA512 f0157c828783838493ad56a0737fa696ce3422d6db50c76c9f8d6771c57a359a3ebafbd30bba09b4e440a4cad28f935f7bf8992695bccd16b16143cdadf62a25 WHIRLPOOL 5a52106ae0483d486622be6412440af7459664e32949f574cbe5061a9d827c4fce590a12f675833555dfb3e7b1484e84b0716887e5c14fff28a9104a36c1a7aa
+AUX pptpclient-1.8.0-process-name.patch 1134 SHA256 ce8d2abc8b47ac20ee574e1278a948fcb5746345f686f390676a795379c27b53 SHA512 4615438cb457c3fe0e2e7342f0aa234f3b63fccb069d217c9b7340e1b6a73ca7879e85b21742f155bb5a16db5a1bd55da14f9867486760a49479f96bdddbc451 WHIRLPOOL 9978c48a9034446aaa89ff6e35df7b90b19d2d80f49010a9714e4b923f3c2dbf34c3f8c31b5c50ea14e07d53c2708726b8c9311be684a923caf9cd414ecaa1d1
+AUX xpptp_fe.pl 5620 SHA256 a9e642002b3155c026460c8f42c7b20484a28cf137cf4879f1dcfdf0cef8ee96 SHA512 fa6d31c9b9ae319ea3cbbba389664f04c6fff8d2d17a826870ebca236e04df4ca51cb2cd60961a2cd78ee3c99af2738c4bf87edaf49032dd3ec1dbe5d3632833 WHIRLPOOL 68bde38df71000487c998bbade0c79383bffadbecc44e8db57c41264b104f8a6d4c519ded242e3137ee8166beb19a5f35900d632640d5fbc2c73d0446957a26d
+DIST pptp-1.7.2.tar.gz 81113 SHA256 e98ae0065d2a39fa3131654ff28cb7070e996f668ed6d0e7d9a445b8d37694bc SHA512 8c070bd0e2fac68e54eefcc21a31b567f74080764130cf94bf1e29138c3a43b8f56721836d826343528062fc6afcffee03ad93631678cc9b946bc6a8f4ce3dec WHIRLPOOL 4a1a38e3e50fe77e553933532147a202858ba54f009fb8b98c33539122014a61fae6df69d985d118329a5b62f86bdfe4ca4bcb62b1586c4dbd76f4a9750f1280
+DIST pptp-1.8.0.tar.gz 86778 SHA256 e39c42d933242a8a6dd8600a0fa7f0a5ec8f066d10c4149d8e81a5c68fe4bbda SHA512 cabcc2ef29d20859af923c6d96c524e83a80549839d1ad6fccaf9ec0ed5e7a5de7120e0694e6160b374952ea3ecb7b69d9809641000d6bf2585eeedb2d29c073 WHIRLPOOL da21a83f78c2973d90679d2ae76b47bd32ad0327d55ff943c5f663513fe2ce6736ca0910f55cb9929667e935975c1ac523641e12eaa3c42ba60e30d017d5942c
+DIST pptp-command-20130515.bz2 7269 SHA256 c94f6ccb4370adb4c8f857ed260326583484d461df54dc06a966b1387c68cd6a SHA512 3b0ad28c5f7bf4f674ba8742e8a3be50cb62521f767142a1a1e74263707bc860126b7238a4aea307366a71100a193d18f3ec7599f4c0c52cd259f8b1d6b429bf WHIRLPOOL 2f1c9c1e6c4fb75bc4932c8536d0b10aa89c7fc53ba0887875b7920c8fc2bc894e7863ae4830dd907e9a4459c16f747b3454fda542664f61ac80353164121773
+EBUILD pptpclient-1.7.2-r3.ebuild 1220 SHA256 2b0f22d9e6c27b8ab7acd42593b14340dbb6bf7a168f190d91b5c4389d98aac9 SHA512 ab459c4f20e422ea293902d6e05e7499e665acd71c5cb5e3761286ff4820628fac98322f0c7e06539b68f8f0c9c565382866d0bff2777624944fb580af8ce9f6 WHIRLPOOL 0b13b1c1bf354cbccea9202939439d0e22354b9affd5a87cbd14803c533928d6010a3f9f0afe699eeffa5c6fda7ef96143850500a2788f6adf396fe8ad2f2735
+EBUILD pptpclient-1.8.0.ebuild 1227 SHA256 949bbcd275599af43379332351951421aa5002de2166dc75c37333b4697175de SHA512 e95fb37a5bb9fa83e8d647e7dfb67ea28773390f77da625937f2e830e99402873ecf76d919bed310c69dc5e5c6f1c6ab3d6393a71a09dcd4a13306816b8c4cf7 WHIRLPOOL fe6e5ed85b74fe557f4103f9e31932c6e3be4f715b37614fdfb43130edae5f871fc935ffd1bde18a835d33ea745d9c74175d3c2350c49f49e7c196f3926c1acf
+MISC ChangeLog 3125 SHA256 2d6c00ddf6b76ab480fd72c4317ea983f8c13070e7afe831e9b25076382dbace SHA512 d3b21cf92c1f5c48ffadc87ef3438a09f8da55ddffa234179f524bdf423f095ebccefc44d043bd3cf4aa839f17c68fd56c64ffd54a0e603a59d7a8475203922f WHIRLPOOL 8cdd5d6bd48ad0034ad97bf9a06736d6f1c3ed5c7bf3fa01e1ecda0f5722cf2bdef7b91efd2d87cf7568f3d52fce2e8f2cc3f57b1ee97560ad6d9dc3aa63e66e
+MISC ChangeLog-2015 10145 SHA256 c012d1415fc96985985acff8ac3869bf0cb9f313545fa13b740110ade19e3c10 SHA512 9bb69b4982f9400ea0f90c280ecc4c6c83ef3b4d1cba09687ad8da270a5f1f97d65c60232aed63f89ac6349f19e33d6f1f943eddbe0fae754989c3e0d284363a WHIRLPOOL da1e91aaf5ed007cde8f0c203f88eac7b220fd5790476809828b25b3c986d36b7c69f652584e27f2891230e904db3bb311fac430b27dbee89794f0663865bdee
+MISC metadata.xml 378 SHA256 7367c609ea9be38f4dad6b5a4e3e9df752e8640edee8ca15116aa1d2ee25f1f2 SHA512 7a4b7cfeecee2503bcf7171f7a66edc27962a6f461695dfad358421be6c1bfc794e438d9136448278b11a4fd0761df03132d8ee66b7e43f7b407c0a5bad09ea7 WHIRLPOOL b360c7bef6671b0873ecf79d40582e1b422b88b4c8ed40ba947b7b42d9aa997dccfa54fd95887f29c740fb7c8e20520c43df19fa1e78f9ea3b0563b9b029e06f
diff --git a/net-dialup/pptpclient/files/pptp_fe.pl b/net-dialup/pptpclient/files/pptp_fe.pl
new file mode 100644
index 000000000000..83899d9a2c91
--- /dev/null
+++ b/net-dialup/pptpclient/files/pptp_fe.pl
@@ -0,0 +1,370 @@
+#!/usr/bin/perl
+#
+# $Id: pptp_fe.pl,v 1.1 2001/11/29 05:19:10 quozl Exp $
+#
+# pptp_fe.pl, privileged portion of xpptp_fe.pl
+# Copyright (C) 2001 Smoot Carl-Mitchell (smoot@tic.com)
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+use strict;
+use Getopt::Std;
+use Time::localtime;
+use IO::Handle;
+
+my $Usage = "usage: pptp_fe [-c config_file] [-d] [-h] [-k] [-n network]
+ [-p] [-r routes] [-t timeout] [host]
+ where:
+ -c - configuration file (default is ~/.pptp_fe.conf)
+ -d - pppd debug flag
+ -h - this help message
+ -k - kill pppd daemon with route to network
+ -n - network number of remote private network in x.x.x.x/n notation
+ -r - routes to add to routing table separated by commas
+ -p - suppress prompting
+ -t - connection timeout retry interval in seconds (default 60 seconds)
+ host - remote PPTP server name
+";
+
+my %Opt;
+getopts("c:dhkn:pr:t:", \%Opt);
+
+my $Config_File = $Opt{'c'};
+$Config_File = "$ENV{'HOME'}/.pptp_fe.conf" unless $Opt{'c'};
+my $Config;
+my $Debug = $Opt{'d'};
+$Debug = 0 unless $Debug;
+my $Debug_Flag = "debug" if $Debug;
+my $Help = $Opt{'h'};
+my $Kill = $Opt{'k'};
+my $Net = $Opt{'n'};
+my $No_Prompt = $Opt{'p'};
+my $Route = $Opt{'r'};
+my $Timeout = $Opt{'t'}; $Timeout = 60 unless $Timeout;
+
+print($Usage), exit(1) if $Help;
+
+my $Server = $ARGV[0];
+
+my $State = "disconnected";
+
+system("modprobe ppp-compress-18");
+
+$Config = cmd_read_config_file($Config_File);
+for my $cmd (@$Config) {
+ cmd_set($cmd, 1);
+}
+
+print "($State) > " unless $No_Prompt;
+STDOUT->flush;
+for (;;) {
+ my $rin = '';
+ my $rout = '';
+ vec($rin, fileno(STDIN), 1) = 1;
+ command() if select($rout=$rin, undef, undef, 5);
+
+ my $interface = "";
+ if ($State eq "connected" && ! ($interface = net_interface_up($Net))) {
+ print "\n";
+ print "interface $interface for $Net not up - restarting\n";
+ cmd_connect();
+ print "($State) > " unless $No_Prompt;;
+ }
+}
+
+sub command {
+
+ my $input;
+ sysread(STDIN, $input, 1024);
+
+ for my $line1 (split("\n", $input)) {
+ my $line = $line1;
+ $line =~ s/\s*$//;
+ $line =~ s/^\s*//;
+ my ($command, $arguments) = split(" ", $line, 2);
+
+ if ($command eq "c") {
+ cmd_connect();
+ }
+ elsif ($command eq "d") {
+ cmd_disconnect();
+ }
+ elsif ($command eq "h") {
+ cmd_help();
+ }
+ elsif ($command eq "l") {
+ cmd_list();
+ }
+ elsif ($command eq "q") {
+ cmd_disconnect();
+ exit 0;
+ }
+ elsif ($command eq "r") {
+ $Config = cmd_read_config_file($arguments);
+ }
+ elsif ($command eq "s") {
+ cmd_set($arguments, 0);
+ }
+ elsif ($command eq "w") {
+ cmd_write_config_file($arguments);
+ }
+ elsif ($command ne "") {
+ print "unknown command\n";
+ }
+ }
+ print "($State) > " unless $No_Prompt;
+ STDOUT->flush;
+}
+
+sub cmd_connect {
+
+ cmd_disconnect() if $State eq "connected";
+
+ my $start_time = time();
+ my $date_string = ctime($start_time);
+ print "$date_string Running pptp $Server $Debug_Flag";
+ system("pptp $Server $Debug_Flag");
+
+ my $interface = "";
+
+ do {
+ sleep 1;
+ $interface = net_interface_up($Net);
+ print ".";
+ } until ($interface || time() > $start_time + $Timeout);
+
+ if (time() > $start_time + $Timeout) {
+ print "timed out after $Timeout sec\n";
+ $State = "disconnected";
+ return 0;
+ }
+
+ print "\n";
+
+ my $ifcfg = `ifconfig $interface`;
+ $ifcfg =~ /P-t-P:(.*) Mask/;
+ my $ip = $1;
+ print "setting route to network $Net to interface $interface\n";
+ system("route add -net $Net dev $interface metric 2");
+
+ # Routes are separated by commas
+ my @route = split(/,/, $Route);
+ for my $route (@route) {
+ my $net_flag = "";
+ $net_flag = "-net" if $route =~ /\//;
+
+ print "setting route to $route to interface $interface\n";
+ system("route add $net_flag $route dev $interface");
+ }
+
+ $State = "connected";
+ print "connected\n";
+ return 1;
+}
+
+sub cmd_disconnect {
+
+ return 1 if $State eq "disconnected";
+
+ my $interface = net_interface_up($Net);
+ my $pid_file = "/var/run/$interface.pid";
+
+ # delete the named pipes - XXX this is a bit crude
+ system("rm -f /var/run/pptp/*");
+
+ $State = "disconnected", return 1 unless $interface && -f $pid_file;
+
+ my $pid = `cat $pid_file`;
+ chomp $pid;
+ print "killing pppd($pid)\n";
+ kill("HUP", $pid);
+ print "waiting for pppd to die";
+ do {
+ sleep 1;
+ print ".";
+ }
+ until (kill(0, $pid));
+
+ print "\n";
+ $State = "disconnected";
+ print "disconnected\n";
+ return 1;
+}
+
+sub cmd_list {
+
+ print "Server = $Server\n";
+ print "Network = $Net\n";
+ print "Routes = $Route\n";
+ print "Debug = $Debug_Flag\n";
+ print "No_Prompt = $No_Prompt\n";
+ print "Timeout = $Timeout\n";
+ print "\n";
+}
+
+sub cmd_help {
+
+ print "Commands are:\n";
+ print "c - initiate PPTP connection\n";
+ print "d - disconnect PPTP\n";
+ print "h - this help message\n";
+ print "l - list current configuration\n";
+ print "q - quite the program\n";
+ print "r - read configuration file\n";
+ print "s - set configuration variable (l for a list)\n";
+ print "w - write the configuration file\n";
+
+}
+
+sub cmd_set {
+ my $input = shift;
+ my $no_replace = shift;
+
+ my ($variable, $value) = split(/\s*=\s*/, $input);
+
+ $variable = "\L$variable";
+ if (! $variable) {
+ print "syntax: s variable = value\n";
+ return 0;
+ }
+
+ if ($variable eq "server") {
+ $Server = $value unless $no_replace && $Server;
+ }
+ elsif ($variable eq "network") {
+ $Net = $value unless $no_replace && $Net;
+ }
+ elsif ($variable eq "routes") {
+ $Route = $value unless $no_replace && $Route;
+ }
+ elsif ($variable eq "debug") {
+ $Debug_Flag = $value unless $no_replace && $Debug_Flag;
+ }
+ elsif ($variable eq "no_prompt") {
+ $No_Prompt = $value unless $no_replace && $No_Prompt;
+ }
+ elsif ($variable eq "timeout") {
+ $Timeout = $value unless $no_replace && $Timeout;
+ }
+ elsif ($variable eq "config_file") {
+ $Config_File = $value unless $no_replace && $Config_File;
+ }
+ else {
+ print "unknown variable\n";
+ }
+}
+
+sub cmd_read_config_file {
+ my $file = shift;
+
+ my $config = [];
+ $file = $Config_File unless $file;
+ local *IN;
+ if (!open(IN, $file)) {
+ print "cannot open $file\n";
+ return $config;
+ }
+
+ my @config_file = <IN>;
+ close IN;
+ push @config_file, "\n";
+ chomp @config_file;
+
+ for my $line (@config_file) {
+ next if /\s*#/;
+
+ if ($line =~ /\S/) {
+ $line =~ s/^\s*//;
+ $line =~ s/\s*$//;
+ push @$config, $line;
+ next;
+ }
+ }
+ return $config;
+}
+
+sub cmd_write_config_file {
+ my $file = shift;
+
+ $file = $Config_File unless $file;
+ local *OUT;
+ if (!open(OUT, ">$file")) {
+ print "cannot open $file\n";
+ return 0;
+ }
+
+ my $oldfh = select OUT;
+ cmd_list();
+ close OUT;
+ select $oldfh;
+
+ return 1;
+}
+
+sub net_interface_up {
+ my $cidr = shift;
+
+ # cidr is net/bits
+ my($net, $nbits) = split(/\//, $cidr);
+
+ # compute the network number
+ my $netnum = netnum($net, $nbits);
+ local(*INTERFACE);
+ open(INTERFACE, "ifconfig|") || die "cannot run ifconfig - $!\n";
+
+ my $interface = "";
+ my @interface = <INTERFACE>;
+ close INTERFACE;
+ for (@interface) {
+ chomp;
+
+ # new interface
+ if (/^[a-zA-Z]/) {
+ if ($interface =~ /(.*) Link.*P-t-P:(.*) Mask/) {
+ my $interface_name = $1;
+ my $ip = $2;
+ return $interface_name
+ if netnum($ip, $nbits) == $netnum;
+ }
+ $interface = "";
+ }
+ $interface .= $_;
+ }
+ return "";
+}
+
+sub netnum {
+ my $net = shift;
+ my $bits = shift;
+
+ my @octets = split(/\./, $net);
+ my $netnum = 0;
+ for my $octet (@octets) {
+ $netnum <<= 8;
+ $netnum |= $octet;
+ }
+
+ my $mask = 0;
+ for (1..$bits) {
+ $mask <<= 1;
+ $mask |= 1;
+ }
+ $mask = $mask << (32-$bits);
+
+ $netnum &= $mask;
+
+ return $netnum;
+}
diff --git a/net-dialup/pptpclient/files/pptpclient-1.7.2-process-name.patch b/net-dialup/pptpclient/files/pptpclient-1.7.2-process-name.patch
new file mode 100644
index 000000000000..b0051f81bde0
--- /dev/null
+++ b/net-dialup/pptpclient/files/pptpclient-1.7.2-process-name.patch
@@ -0,0 +1,42 @@
+diff -Nru pptp-1.7.2.orig/pptp.c pptp-1.7.2/pptp.c
+--- pptp-1.7.2.orig/pptp.c 2008-05-14 08:33:55.000000000 +0200
++++ pptp-1.7.2/pptp.c 2009-06-20 10:53:07.000000000 +0200
+@@ -59,11 +59,7 @@
+ #include "pptp_callmgr.h"
+ #include "pptp_gre.h"
+ #include "version.h"
+-#if defined(__linux__)
+-#include <sys/prctl.h>
+-#else
+ #include "inststr.h"
+-#endif
+ #include "util.h"
+ #include "pptp_quirks.h"
+ #include "pqueue.h"
+@@ -394,12 +390,7 @@
+ char *tty_name = ttyname(tty_fd);
+ snprintf(buf, sizeof(buf), "pptp: GRE-to-PPP gateway on %s",
+ tty_name ? tty_name : "(null)");
+-#ifdef PR_SET_NAME
+- rc = prctl(PR_SET_NAME, "pptpgw", 0, 0, 0);
+- if (rc != 0) perror("prctl");
+-#else
+ inststr(argc, argv, envp, buf);
+-#endif
+ if (sigsetjmp(env, 1)!= 0) goto shutdown;
+
+ signal(SIGINT, sighandler);
+@@ -495,13 +486,7 @@
+ char *my_argv[3] = { argv[0], inet_ntoa(inetaddr), phonenr };
+ char buf[128];
+ snprintf(buf, sizeof(buf), "pptp: call manager for %s", my_argv[1]);
+-#ifdef PR_SET_NAME
+- int rc;
+- rc = prctl(PR_SET_NAME, "pptpcm", 0, 0, 0);
+- if (rc != 0) perror("prctl");
+-#else
+ inststr(argc, argv, envp, buf);
+-#endif
+ exit(callmgr_main(3, my_argv, envp));
+ }
+
diff --git a/net-dialup/pptpclient/files/pptpclient-1.8.0-process-name.patch b/net-dialup/pptpclient/files/pptpclient-1.8.0-process-name.patch
new file mode 100644
index 000000000000..926574762499
--- /dev/null
+++ b/net-dialup/pptpclient/files/pptpclient-1.8.0-process-name.patch
@@ -0,0 +1,39 @@
+--- pptp.c.orig 2013-10-23 12:10:46.000000000 +0400
++++ pptp.c 2013-11-26 13:05:43.259867888 +0400
+@@ -60,9 +60,6 @@
+ #include "pptp_callmgr.h"
+ #include "pptp_gre.h"
+ #include "version.h"
+-#if defined(__linux__)
+-#include <sys/prctl.h>
+-#endif
+ #include "inststr.h"
+ #include "util.h"
+ #include "pptp_quirks.h"
+@@ -413,12 +410,7 @@
+ tty_name = ttyname(tty_fd);
+ snprintf(buf, sizeof(buf), "pptp: GRE-to-PPP gateway on %s",
+ tty_name ? tty_name : "(null)");
+-#ifdef PR_SET_NAME
+- rc = prctl(PR_SET_NAME, "pptpgw", 0, 0, 0);
+- if (rc != 0) perror("prctl");
+-#else
+ inststr(argc, argv, envp, buf);
+-#endif
+ if (sigsetjmp(env, 1)!= 0) goto shutdown;
+
+ signal(SIGINT, sighandler);
+@@ -517,13 +509,7 @@
+ char *my_argv[3] = { argv[0], inet_ntoa(inetaddr), phonenr };
+ char buf[128];
+ snprintf(buf, sizeof(buf), "pptp: call manager for %s", my_argv[1]);
+-#ifdef PR_SET_NAME
+- int rc;
+- rc = prctl(PR_SET_NAME, "pptpcm", 0, 0, 0);
+- if (rc != 0) perror("prctl");
+-#else
+ inststr(argc, argv, envp, buf);
+-#endif
+ exit(callmgr_main(3, my_argv, envp));
+ }
+
diff --git a/net-dialup/pptpclient/files/xpptp_fe.pl b/net-dialup/pptpclient/files/xpptp_fe.pl
new file mode 100644
index 000000000000..e32dcd9eabc8
--- /dev/null
+++ b/net-dialup/pptpclient/files/xpptp_fe.pl
@@ -0,0 +1,255 @@
+#!/usr/bin/perl -w
+#
+# $Id: xpptp_fe.pl.pl,v 1.1 2001/11/29 05:19:10 quozl Exp $
+#
+# xpptp_fe.pl.pl, graphical user interface for PPTP configuration
+# Copyright (C) 2001 Smoot Carl-Mitchell (smoot@tic.com)
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+use Tk;
+use Tk::DirTree;
+
+=pod
+TK driver for pptp_fe.pl command script
+=cut
+
+=pod
+Global flags which correspnd to the pptp_fe.pl flags and options
+=cut
+
+my $Debug = 0;
+my $Debug_Flag = "";
+my $Network = "";
+my $Server = "";
+my $Routes = "";
+my $Get_Current_Config = 0;
+
+=pod
+
+Start up pptp_fe.pl and connect its input and output to the TK frontend.
+All I/O is done in raw mode, so the reads and writes are atomic and
+unbuffered.
+
+=cut
+
+pipe OUTPUT_READ, OUTPUT_WRITE;
+pipe COMMAND_READ, COMMAND_WRITE;
+
+my $Child_Pid = fork();
+die "cannot fork - $!\n" if $Child_Pid == -1;
+
+if ($Child_Pid) { # parent
+ close OUTPUT_WRITE;
+ close COMMAND_READ;
+}
+else { # child
+ close OUTPUT_READ;
+ close COMMAND_WRITE;
+
+ open(STDIN, "<&COMMAND_READ");
+ open(STDOUT, ">&OUTPUT_WRITE");
+
+ exec("pptp_fe.pl -p");
+}
+
+=pod
+The main window which present the various pptp_fe.pl options.
+
+The window is composed of:
+
+ Server name
+ Network number
+ Routes
+Connect Button Disconnect Button Write Config Button Quit Button
+=cut
+
+my $Main = MainWindow->new();
+$Main->Label(-text => "PPTP")->pack;
+
+my $Server_Frame = $Main->Frame->pack(-fill => 'x',
+ -padx => 5,
+ -pady => 5);
+
+$Server_Frame->Label(-text => "Remote PPTP Host")->pack(-side => "left");
+$Server_Frame->Entry(
+ -text => "Host",
+ -width => 30,
+ -textvariable => \$Server,
+ )->pack(-side => "left");
+
+
+my $Net_Frame = $Main->Frame->pack(-fill => 'x',
+ -padx => 5,
+ -pady => 5);
+
+=pod
+Network number entry box. This is the argument to the the -n flag
+=cut
+
+$Net_Frame->Label(-text => "Network Number")->pack(-side => "left");
+$Net_Frame->Entry(
+ -text => "Network",
+ -width => 15,
+ -textvariable => \$Network,
+ )->pack(-side => "left");
+
+=pod
+Additional static routes (-r) flag
+=cut
+
+my $Route_Frame = $Main->Frame->pack(
+ -fill => 'x',
+ -padx => 5,
+ -pady => 5);
+
+$Route_Frame->Label(-text => "Routes")->pack(-side => "left");
+
+$Route_Frame->Entry(
+ -text => "Routes",
+ -width => 30,
+ -textvariable => \$Routes
+ )->pack(
+ -side => "left",
+ -padx => 5,
+ -pady => 5);
+
+=pod
+Buttons
+
+Connect - Connect to a remote PPTP server
+
+Disconnect - Disconnect from the remote PPTP server
+
+Write - Write a configuration file
+
+Quit - Terminates the running pptp daemon and pptp_fe.pl program.
+=cut
+
+my $Button_Frame = $Main->Frame->pack(-fill => 'x', -pady => 5);
+
+my $Disconnect_Button;
+my $Connect_Button;
+my $Read_Button;
+my $Write_Button;
+my $Quit_Button;
+
+$Connect_Button = $Button_Frame->Button(
+ -text => "Connect",
+ -command =>
+ sub {
+ update_config();
+ syswrite(COMMAND_WRITE, "c\n");
+
+ $Connect_Button->configure(-state => "disabled");
+ $Disconnect_Button->configure(-state => "normal");
+ },
+ )->pack(-side => "left", -pady => 5, -padx => 5);
+
+$Disconnect_Button = $Button_Frame->Button(
+ -text => "Disconnect",
+ -state => "disabled",
+ -command =>
+ sub {
+ syswrite(COMMAND_WRITE, "d\n");
+
+ $Connect_Button->configure(-state => "normal");
+ $Disconnect_Button->configure(-state => "disabled");
+ }
+ )->pack(-side => "left", -pady => 5, -padx => 5);
+
+$Write_Button = $Button_Frame->Button(
+ -text => "Write Config",
+ -command =>
+ sub {
+ syswrite(COMMAND_WRITE, "w\n");
+
+ }
+ )->pack(-side => "left", -pady => 5, -padx => 5);
+
+$Quit_Button = $Button_Frame->Button(
+ -text => "Quit",
+ -command =>
+ sub {
+ syswrite(COMMAND_WRITE, "q\n");
+
+ $Connect_Button->configure(-state => "disabled");
+ $Disconnect_Button->configure(-state => "disabled");
+ $Quit_Button->configure(-state => "disabled");
+ }
+ )->pack(-side => "left", -pady => 5, -padx => 5);
+
+my $Log_Window = $Main->Toplevel;
+$Log_Window->title("PPTP Log");
+
+my $Log_Widget = $Log_Window->Text(
+ -height => 20,
+ -width => 80,
+ )->pack;
+
+
+$Log_Widget->fileevent(OUTPUT_READ, "readable", sub {
+ my $in = "";
+ my $n = sysread(OUTPUT_READ, $in, 1024);
+ if ($n == 0) {
+ close OUTPUT_READ;
+ $Main->destroy;
+ exit 0;
+ }
+
+ if (!$Get_Current_Config) {
+ $Log_Widget->insert("end", $in);
+ $Log_Widget->see("end");
+ }
+ else {
+ $Get_Current_Config = 0;
+
+ for my $line (split("\n", $in)) {
+ next unless $line =~ /\S/;
+
+ my ($variable, $value) = split(/\s*=\s*/, $line);
+ $variable = "\L$variable";
+
+ if ($variable eq "server") {
+ $Server = $value;
+ }
+ elsif ($variable eq "network") {
+ $Network = $value;
+ }
+ elsif ($variable eq "routes") {
+ $Routes = $value;
+ }
+ elsif ($variable eq "debug") {
+ $Debug = $value;
+ }
+ }
+ }
+
+ return 1;
+});
+
+syswrite(COMMAND_WRITE, "l\n");
+$Get_Current_Config = 1;
+
+MainLoop;
+
+sub update_config {
+
+ syswrite(COMMAND_WRITE, "s server = $Server\n");
+ syswrite(COMMAND_WRITE, "s network = $Network\n");
+ syswrite(COMMAND_WRITE, "s routes = $Routes\n");
+ syswrite(COMMAND_WRITE, "s debug = $Debug_Flag\n");
+}
diff --git a/net-dialup/pptpclient/metadata.xml b/net-dialup/pptpclient/metadata.xml
new file mode 100644
index 000000000000..15734ef7acba
--- /dev/null
+++ b/net-dialup/pptpclient/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-needed -->
+ <longdescription>PPTP Client is a client for the proprietary Microsoft Point-to-Point Tunneling Protocol.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">pptpclient</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/pptpclient/pptpclient-1.7.2-r3.ebuild b/net-dialup/pptpclient/pptpclient-1.7.2-r3.ebuild
new file mode 100644
index 000000000000..56577c7da2bf
--- /dev/null
+++ b/net-dialup/pptpclient/pptpclient-1.7.2-r3.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+MY_P="${P/client}"
+MY_CMD="pptp-command-20130515"
+
+DESCRIPTION="Linux client for PPTP"
+HOMEPAGE="http://pptpclient.sourceforge.net/"
+SRC_URI="mirror://sourceforge/pptpclient/${MY_P}.tar.gz
+ https://dev.gentoo.org/~pinkbyte/distfiles/pptpclient/${MY_CMD}.bz2"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="alpha amd64 ~arm ppc ppc64 x86"
+IUSE="tk"
+
+DEPEND="net-dialup/ppp
+ dev-lang/perl
+ tk? ( dev-perl/Tk )"
+RDEPEND="${DEPEND}
+ sys-apps/iproute2"
+
+RESTRICT="test" #make test is useless and vector_test.c is broken
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( AUTHORS ChangeLog DEVELOPERS NEWS README TODO USING )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-process-name.patch
+ epatch_user
+}
+
+src_compile() {
+ emake OPTIMISE= DEBUG= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)"
+}
+
+src_install() {
+ default
+ dodoc Documentation/*
+ dodir /etc/pptp.d
+
+ # The current version of pptp-linux doesn't include the
+ # RH-specific portions, so include them ourselves.
+ newsbin "${WORKDIR}/${MY_CMD}" pptp-command
+ dosbin "${FILESDIR}/pptp_fe.pl"
+ use tk && dosbin "${FILESDIR}/xpptp_fe.pl"
+}
diff --git a/net-dialup/pptpclient/pptpclient-1.8.0.ebuild b/net-dialup/pptpclient/pptpclient-1.8.0.ebuild
new file mode 100644
index 000000000000..47150a73c096
--- /dev/null
+++ b/net-dialup/pptpclient/pptpclient-1.8.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+MY_P="${P/client}"
+MY_CMD="pptp-command-20130515"
+
+DESCRIPTION="Linux client for PPTP"
+HOMEPAGE="http://pptpclient.sourceforge.net/"
+SRC_URI="mirror://sourceforge/pptpclient/${MY_P}.tar.gz
+ https://dev.gentoo.org/~pinkbyte/distfiles/pptpclient/${MY_CMD}.bz2"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="alpha amd64 ~arm ~arm64 ppc ppc64 x86"
+IUSE="tk"
+
+DEPEND="net-dialup/ppp
+ dev-lang/perl
+ tk? ( dev-perl/Tk )"
+RDEPEND="${DEPEND}
+ sys-apps/iproute2"
+
+RESTRICT="test" #make test is useless and vector_test.c is broken
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( AUTHORS ChangeLog DEVELOPERS NEWS README TODO USING )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-process-name.patch
+ epatch_user
+}
+
+src_compile() {
+ emake OPTIMISE= DEBUG= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)"
+}
+
+src_install() {
+ default
+ dodoc Documentation/*
+ dodir /etc/pptp.d
+
+ # The current version of pptp-linux doesn't include the
+ # RH-specific portions, so include them ourselves.
+ newsbin "${WORKDIR}/${MY_CMD}" pptp-command
+ dosbin "${FILESDIR}/pptp_fe.pl"
+ use tk && dosbin "${FILESDIR}/xpptp_fe.pl"
+}
diff --git a/net-dialup/qtwvdialer/Manifest b/net-dialup/qtwvdialer/Manifest
new file mode 100644
index 000000000000..fac21282b0ac
--- /dev/null
+++ b/net-dialup/qtwvdialer/Manifest
@@ -0,0 +1,5 @@
+DIST qtwvdialer-0.4.4_p20091228.tar.bz2 166522 SHA256 0549ff5353189728474e9843feb3797e0ba8bc662b268a1306b5ac46a4d36c25 SHA512 6468ebc4f00caa8f150690a709a1d1dbc5908d3e57a1d0796ca05a6cdd9d836b340b299df44bdb9a5fe09f7101454ee91ea412976aec751c09ca28cca23cc632 WHIRLPOOL c8ffe970512f2d6f8457fa62c42d348428215f70066769a6e684bf843e538453c489d56ef312dfc50404bf936da9e3dbc2a1fc4c40cc613740c78db09ae3a570
+EBUILD qtwvdialer-0.4.4_p20091228.ebuild 616 SHA256 b385ce3c10c98b9c6ea322b31d58796befc5475cfa509494602057b940266019 SHA512 d354ebdabbf914031defb1376351fe376be3c0611b70677ae33a8b62acb0833d2668486ad4701c9789c54fe0d2eb6f3943182f64192e68694bfa6028850c6022 WHIRLPOOL 9528bf2715f7b4b6e0bf8a93e4d9ae0e989e52539035890632be1d78a94a45fc19f3abf2f138142088f3eaca10764c728b36cf42a590eb13143f4b72a06c8011
+MISC ChangeLog 2645 SHA256 51ee2635e5f0ba7d5ad34ff65ae187b068cbcfacb68a71b82ab24ea93243afb9 SHA512 19ac8ec75ef650783c69785a9c936fbdc3510fe82a5f15a7e0c4cbfc878352eb6e497d417958b93a1ce492b220f70752e0e53df6ad5479b94fd0cd2271a68a8d WHIRLPOOL 63e23486740c0d3bdd256dfd2e0772dbd17fbd7548483bf13c013f5d11a71182878a10055e04d859ad30419303802b5ded5847ab28202ada33b690f92e9691b9
+MISC ChangeLog-2015 3030 SHA256 30dfed6c6ea8e4f136cda35e5818fae30ad0a899038a13e2a6563db97de398ae SHA512 71507623ad2897a5e88246dfab6b36e3a8b5faf89093933d1080a38d2f17606bfddcb4f6a2c08691cd3f0a8349d349e179aab8dab991cdf6a769f2394d7bd0e0 WHIRLPOOL e1123ba91aa2eaddbdff30da5f858c8aa0cdec4a95e0f6dedcdc87448ff66789d57c610e6367ae4e38dcab3cfe7be443885add3cdad59bf290daceacb2d81734
+MISC metadata.xml 250 SHA256 8ffda4d3f91ceb84f4ee7bc0f8561fb76b00b4751aba0030937b2e4f863c1c09 SHA512 0e3501ec6a8f397aac24f9a55ab2c3c5a68879800a4981c5f7aa0e48ec79309a5c426a655d5276b1904e4424fbac13084e8ab21fba45bc219dd51d9cb6b922c8 WHIRLPOOL 1deee8a85563289c55a5b7a1d18eb4d70822693d42289781effdf63d451f673d6c47f05dd908f44fdfb38820ea6297cf0b9b123ccf5600d3046043251627aa66
diff --git a/net-dialup/qtwvdialer/metadata.xml b/net-dialup/qtwvdialer/metadata.xml
new file mode 100644
index 000000000000..cde21abbff4a
--- /dev/null
+++ b/net-dialup/qtwvdialer/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="github">schuay/qt4wvdialer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/qtwvdialer/qtwvdialer-0.4.4_p20091228.ebuild b/net-dialup/qtwvdialer/qtwvdialer-0.4.4_p20091228.ebuild
new file mode 100644
index 000000000000..31496d9739ca
--- /dev/null
+++ b/net-dialup/qtwvdialer/qtwvdialer-0.4.4_p20091228.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+inherit eutils qt4-r2
+
+DESCRIPTION="Qt4 frontend for wvdial"
+HOMEPAGE="https://github.com/schuay/qt4wvdialer/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+IUSE=""
+
+DEPEND="dev-qt/qtgui:4[qt3support]"
+RDEPEND="${DEPEND}
+ net-dialup/wvdial"
+
+src_configure() {
+ eqmake4 QtWvDialer.pro
+ cd src
+ eqmake4 src.pro
+}
+
+src_install() {
+ dobin bin/qtwvdialer || die
+ doicon src/qtwvdialer.png
+ make_desktop_entry ${PN} QtWvDialer
+ dodoc AUTHORS CHANGELOG README
+}
diff --git a/net-dialup/radiusclient-ng/Manifest b/net-dialup/radiusclient-ng/Manifest
new file mode 100644
index 000000000000..96bc7061685f
--- /dev/null
+++ b/net-dialup/radiusclient-ng/Manifest
@@ -0,0 +1,6 @@
+AUX radiusclient-ng-0.5.6-cross-compile.patch 1938 SHA256 01bf118cfc11b9c27e7904b2bf65831734dbc189c238a4e9910eedb8ff8c99c9 SHA512 5d7bc663a233af5c3f098eb8531c6ec87b32099e1e7990ba1c189c94e2c45a52970b77165ec898514036990e14edbf430f0550d71667b681ea58af7ebe32898f WHIRLPOOL 3e4301ca026eb7e1db14a02c96315fc7bcc891728279d720e514187e9c487208ce77cc762099cd1d4c4f35b1e623378e86f3ae37a10b722bf32edddc12796871
+DIST radiusclient-ng-0.5.6.tar.gz 383882 SHA256 282a9f1355f190efbb06c0d7c4e062eaa652caf342ed3ad361ac595f72f09f14 SHA512 3096519cb2029a216ac9a613c8c0721d9154b0b82c219f5528423bd1157333101137064cb2363e9cfd646a1719b06b1cec78eaf24fafb2f780fec41f40bcae88 WHIRLPOOL c50a0840a63081d1f1da86c523f57f0af6da9329553b7bd45f379e91d738b80dcccb07ffce1ce791c4ce4570610ca03ee022ee2ee5ada9a646f6c7eb697ff282
+EBUILD radiusclient-ng-0.5.6-r1.ebuild 828 SHA256 207ce00acc4a4ea648f270113fee7725abc05cddd76d76e9ca9c84ce5e864d80 SHA512 6fbec225d66599fa9a7f9e3d341bfd8ab1148dbec221a9d94991217c5d9497eb3acdfee229c08e555612ad8eb76ba45c5e807d4a4195d1d0529de0244cdf3f39 WHIRLPOOL 6fec501fa080fabf6126a7668af5574a9811a536cbf88237b8f9b130a66ba451ef209e9307c392edba28225d29ac08510b404670d8ce0fa7c21bff527eaad9da
+MISC ChangeLog 2665 SHA256 65701937ce1fe5721ed1377306b162a272440f864b5c98288ea4ba6438c61696 SHA512 0be98984d9e7c9f4e26a14ec80db08d7b8b5e27ae2f9cae721835b58c435a9f002ead08b5397f31c1f006a3dd02325b0b08c0888c5dd13a8a6116fd78e6fdaca WHIRLPOOL 48a10720002d500bbfe4134d391d6923f77bbfa653bc0bb1741cca87cbd66783c50e79cba478d6ca868e85b6c20844c78b6c158b15d71cf1e0ae9867ab517a1c
+MISC ChangeLog-2015 3996 SHA256 552426f6ae3400ebcafe534730f2f6bb0545bef93c9ad7fea995be1d9b7a7a51 SHA512 b4185859519558572b910a50ee33829c927a41e82eca19773ea21264aca2b5393b4997404891dc56774bc0a613c7ba47475b23494a54582af6e683332661ec5b WHIRLPOOL db0a54b0944037e93e5c19d1dfdb6e77c5ecc3bebfe76f50ede2798e21b4c530190ac8c63cc00656738fa1642b61b6a6fef8c3e47cf812fec605892ec4518d9d
+MISC metadata.xml 501 SHA256 d572719117dd6b9cf8439225a522045ae9b82ddd163063c0b683ea5fc3e061c9 SHA512 15c33f1f895766cdccccd0b98c0b0d345430c25d4bad768c183f8c817ae7250547662ae5d00df7436190f8a910e8cf33b907d826488c37b98e08fbb63351e01a WHIRLPOOL a3a620b7f34bb0781da032e3ce5b137c13d26c7fe48c9dc5c32043c184707d99548f8f44cdd0b16b05e094089cedf03ac2cda1c75504035fe902a7c11ab3f19f
diff --git a/net-dialup/radiusclient-ng/files/radiusclient-ng-0.5.6-cross-compile.patch b/net-dialup/radiusclient-ng/files/radiusclient-ng-0.5.6-cross-compile.patch
new file mode 100644
index 000000000000..ff11d841bcec
--- /dev/null
+++ b/net-dialup/radiusclient-ng/files/radiusclient-ng-0.5.6-cross-compile.patch
@@ -0,0 +1,73 @@
+Fix by Bertrand Jacquin <beber AT meleeweb.net>
+
+Gentoo bugreport: https://bugs.gentoo.org/show_bug.cgi?id=373365
+Upstream bugreport: https://developer.berlios.de/bugs/?func=detailbug&bug_id=18190&group_id=1208
+
+--- configure.in.orig 2011-06-28 16:26:10.000000000 +0200
++++ configure.in 2011-06-28 16:26:12.000000000 +0200
+@@ -104,32 +104,40 @@
+ AC_CHECK_FUNCS(flock fcntl uname gethostname sysinfo getdomainname)
+ AC_CHECK_FUNCS(stricmp random rand snprintf vsnprintf)
+
+-if test "$ac_cv_func_uname" = 'yes'
+-then
+- AC_MSG_CHECKING([for field domainname in struct utsname])
+- AC_TRY_RUN([
+- #include <sys/utsname.h>
++AC_CACHE_CHECK([for field domainname in struct utsname], ac_cv_struct_utsname,
++ [AC_TRY_RUN([
++ #include <sys/utsname.h>
+
+- main(int argc, char **argv)
+- {
+- struct utsname uts;
+- uts.domainname[0] = '\0';
+- }
+- ],
+- AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_STRUCT_UTSNAME_DOMAINNAME),
+- AC_MSG_RESULT(no)
+- )
+-fi
++ main(int argc, char **argv)
++ {
++ struct utsname uts;
++ uts.domainname[0] = '\0';
++ }
++ ],
++ ac_cv_struct_utsname=yes,
++ ac_cv_struct_utsname=no,
++ [AC_MSG_ERROR([cross-compiling,
++ presetting ac_cv_struct_utsname=(yes|no) will help])]
++ )
++])
++AS_VAR_IF(ac_cv_struct_utsname, yes,
++ [AC_DEFINE(HAVE_STRUCT_UTSNAME_DOMAINNAME)],
++)
+
+-AC_MSG_CHECKING([for /dev/urandom])
+-if test -c /dev/urandom
+-then
+- AC_MSG_RESULT(yes)
+- AC_DEFINE(HAVE_DEV_URANDOM)
+-else
+- AC_MSG_RESULT(no)
+-fi
++AC_CACHE_CHECK([for /dev/urandom], ac_cv_file__dev_urandom,
++ [AS_IF([test "$cross_compiling" = yes],
++ [AC_MSG_ERROR([cross-compiling,
++ presetting ac_cv_file__dev_urandom=(yes|no) will help])],
++ if test -c /dev/urandom ; then
++ ac_cv_file__dev_urandom=yes
++ else
++ ac_cv_file__dev_urandom=no
++ fi
++ )]
++)
++AS_VAR_IF(ac_cv_file__dev_urandom, yes,
++ [AC_DEFINE(HAVE_DEV_URANDOM)]
++)
+
+ dnl Determine PATH setting
+ echo $ac_n "using the following PATH setting for exec'ed programs... $ac_c" 1>&6
+
diff --git a/net-dialup/radiusclient-ng/metadata.xml b/net-dialup/radiusclient-ng/metadata.xml
new file mode 100644
index 000000000000..2dedb58545bc
--- /dev/null
+++ b/net-dialup/radiusclient-ng/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-needed -->
+ <longdescription>Purpose of this project is to build portable, easy-to-use and standard compliant library suitable for
+developing free and commercial software that need support for a RADIUS protocol (RFCs 2128 and 2139).</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">radiusclient-ng.berlios</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/radiusclient-ng/radiusclient-ng-0.5.6-r1.ebuild b/net-dialup/radiusclient-ng/radiusclient-ng-0.5.6-r1.ebuild
new file mode 100644
index 000000000000..cc56f4a66300
--- /dev/null
+++ b/net-dialup/radiusclient-ng/radiusclient-ng-0.5.6-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils eutils toolchain-funcs
+
+DESCRIPTION="RadiusClient NextGeneration - library for RADIUS clients"
+HOMEPAGE="https://sourceforge.net/projects/radiusclient-ng.berlios/"
+SRC_URI="mirror://sourceforge/${PN}.berlios/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~sparc x86"
+IUSE="static-libs"
+
+DEPEND="!net-dialup/radiusclient
+ !net-dialup/freeradius-client"
+RDEPEND="${DEPEND}"
+
+DOCS=( BUGS CHANGES README )
+HTML_DOCS=( doc/instop.html )
+
+PATCHES=( "${FILESDIR}/${P}-cross-compile.patch" )
+
+src_prepare() {
+ # bug #373365
+ if tc-is-cross-compiler ; then
+ export ac_cv_file__dev_urandom=yes
+ export ac_cv_struct_utsname=no
+ fi
+
+ autotools-utils_src_prepare
+}
diff --git a/net-dialup/rp-l2tp/Manifest b/net-dialup/rp-l2tp/Manifest
new file mode 100644
index 000000000000..5aeb4a712420
--- /dev/null
+++ b/net-dialup/rp-l2tp/Manifest
@@ -0,0 +1,9 @@
+AUX rp-l2tp-0.4-build.patch 1807 SHA256 5eef8c096e47906adda1ce5f64675fed960d8bc0dced4f579254210a04510f0c SHA512 e9f268c50ffccc4808d5c5d49727ec9d33d4179153481bb991bc94def1edb444fae3e5fd1b02f6b5815ab6d2343083bb62b888f16f72a82a9e35661182b08123 WHIRLPOOL 5d033eb42c00c0126c693bd4e6483a3e8c6ab1d27cdaf484fb91a7fe829f74629060d807ab8de806e785f4c1758374d932b5dc474e34b985b1b82eb51ef0cc41
+AUX rp-l2tp-0.4-flags.patch 1776 SHA256 66d8ba333c6f4aecfa102acb42397a2af6b3e41d2dc7d9b7a45dabe6b9c48c5f SHA512 f8c91791a381139a07941b25901aba1673c3c39df5d6e0f428c7b2a8785e3d11b10263ffd5d708cd45eb4752cb7261858521ac8556c1fdb8194959aa5239a825 WHIRLPOOL 508fe6a5c5fb41fafd557f739eaa30d3fc2ac547c0e797e53402f86055162ceb3e902863e9493b93c6219cdbba2f5da26f05d7f07118a9dab719553ca02f7bbb
+AUX rp-l2tp-0.4-gentoo.patch 9421 SHA256 1b0a96f9260212e5635714f0e348f8131723ef93fd93afbdaad0e46258f0daee SHA512 fdff7068aa6811391bc37497914f58e9239f78f84e5928e61799c523e8a1c859f036a55d7f2517ea316a55816e76ffa83f8ffce10fc188adb6ab79541d20a601 WHIRLPOOL 9fd5786807584b7fc83c28023fb6305a732d572e75ece8d793f47de20aac5a2fdc8a609ad459f265653d247d52be869818e58cb7f0462120fdb8d50fb640f95f
+AUX rp-l2tpd-init 370 SHA256 ce7902d8a5723437c61542ce4785cb39e6ba638c412b67a4e6575880c9c11660 SHA512 a0fcf486af04e5fd90903be8fca7d6235a791bc4a406bd4e09a85a3d29964aa20bb6aefa409d992701be9901aefb2fd52b9d7b57b24ea926b3031bf70a05a3f7 WHIRLPOOL 338cfa7c77c1be9d0cbaba9cf2e482000f6976e120f021054c3d37e02116c8017ff7be9903265da7704793d02b7721788395f2822349f780a5debd3615dc3093
+DIST rp-l2tp-0.4.tar.gz 198869 SHA256 1b5bfbd130867e55018a4e64c720c09d821688c81e6e687858948837e137d555 SHA512 43a1ce8728323ed25f8b92c981731b21db8714f8d157343deb1da49f2c7b25e1833de5012238098ad9d1add7daec228a48f2cb8d6d0b60afbcc1c385ae79d3c9 WHIRLPOOL 1f3ef1841629f6f5a2d1bd199b8a86af69ee39998e424a6259798bd510700206d6a8ab4fe4f00349e9c0f825e9f48788bccdc100f21330dd80a1f2685c4b7286
+EBUILD rp-l2tp-0.4-r4.ebuild 793 SHA256 72234c6f8209234b3169829bbd1787155b0bc679da1cccaa8bbf9718d20db989 SHA512 c7a9f169223bcd8b0a9e4e69a82e77ac72f618232bfe2bab086cdeec19cfdeaf257e0ab464a3df42bb02a372b61d5b354e5d9e3a33b7d5c4068feff4fc4228dc WHIRLPOOL 52ad020a0e6f6c2dd9f90959fdf5d9f953807bdc02a1c1d03439bde1fd063632bbfa3728e82b8e7d0c403a781af3153677947df9dd740e13ae30b06644e97529
+MISC ChangeLog 3104 SHA256 4035dc1e4cfdc1da7b484ef83fca6cdcf959c7331f12db51c1874c0d883286a7 SHA512 c45d90add8b8b81e41dc73e988f736f12bc2c14ce7ea21827b2cb494b3a4bf65d27e1b0fcdc46bb6d5d0935dae45a631a94e69ee2543e314eae06bc131c75661 WHIRLPOOL 046a15c0893dcfe5084eda89f8d396431753df4f176a01034354eb67b8bab2ef1a45bfce170a754fd5cde8a5c010e67e9e761b9429a4195e9363d61fded9f5cb
+MISC ChangeLog-2015 3330 SHA256 c239547e0d48140a891daec2d457f0e747759b3f1cefc083fc299ec1f886d4ef SHA512 d11b3c94873fe37b1ec9c23bcea1253978a524bb4170885f1971838f447352f67fa86b910a85f5b86cea9375fc72f211c3f0ca83e1a7240757b285e4ccb28ce5 WHIRLPOOL d1122f5d978f434dca7ba8da4183fff6f35c6e04e47910f2b36442bc25808805680fc7a27fdd23d475f42a0c7775909423928bcdfa351a1ce881b3c039852c69
+MISC metadata.xml 244 SHA256 adca951ace70c548b336298e0ce38f79d7baa334b4ebf7f7a1a8b01bacefc8e3 SHA512 c9b38861937a6e1f07e3461eba4a51b97c0d18deb5868b0aa2d2cfd9464549aa0dde6757e941ce0da7e5f860b8836cc747639aa4b16d9676275ecc38bf0a6332 WHIRLPOOL 406089fcd93a5e1c23322cde61f0fa9dd101668de1baea42030846c8f5fc26b6c4288bedceef46bed08ccd12bc860cd2fe11932be8af05c18f8e7a59db01d29d
diff --git a/net-dialup/rp-l2tp/files/rp-l2tp-0.4-build.patch b/net-dialup/rp-l2tp/files/rp-l2tp-0.4-build.patch
new file mode 100644
index 000000000000..7bb534b67940
--- /dev/null
+++ b/net-dialup/rp-l2tp/files/rp-l2tp-0.4-build.patch
@@ -0,0 +1,68 @@
+--- Makefile.in.orig 2014-06-24 15:20:47.028342728 +0400
++++ Makefile.in 2014-06-24 15:21:07.468320934 +0400
+@@ -39,8 +39,8 @@
+
+ libl2tp.a: $(OBJS)
+ rm -f $@
+- ar -rc $@ $^
+- ranlib $@ || true
++ $(AR) -rc $@ $^
++ @RANLIB@ $@ || true
+
+ l2tpd: libl2tp.a libevent/libevent.a
+ $(MAKE) -C handlers
+--- libevent/Makefile.in.orig 2002-09-30 23:45:00.000000000 +0400
++++ libevent/Makefile.in 2014-06-24 15:24:31.535105268 +0400
+@@ -18,20 +18,20 @@
+
+ libevent.a: $(OBJS)
+ rm -f libevent.a
+- ar -cq libevent.a $(OBJS)
++ $(AR) -cq libevent.a $(OBJS)
+ @RANLIB@ libevent.a
+
+ event.o: event.c $(HDRS)
+- gcc $(CFLAGS) -c -o event.o event.c
++ $(CC) $(CFLAGS) -c -o event.o event.c
+
+ hash.o: hash.c $(HDRS)
+- gcc $(CFLAGS) -c -o hash.o hash.c
++ $(CC) $(CFLAGS) -c -o hash.o hash.c
+
+ event_sig.o: event_sig.c $(HDRS)
+- gcc $(CFLAGS) -c -o event_sig.o event_sig.c
++ $(CC) $(CFLAGS) -c -o event_sig.o event_sig.c
+
+ event_tcp.o: event_tcp.c $(HDRS)
+- gcc $(CFLAGS) -c -o event_tcp.o event_tcp.c
++ $(CC) $(CFLAGS) -c -o event_tcp.o event_tcp.c
+
+ clean: FORCE
+ rm -f *.a *.o *~
+--- handlers/Makefile.in.orig 2014-06-24 15:31:35.186667624 +0400
++++ handlers/Makefile.in 2014-06-24 15:32:26.659615281 +0400
+@@ -20,19 +20,19 @@
+ all: $(HANDLERS) l2tp-control
+
+ l2tp-control: cmd-control.o
+- gcc $(LDFLAGS) -o l2tp-control cmd-control.o
++ $(CC) $(CFLAGS) $(LDFLAGS) -o l2tp-control cmd-control.o
+
+ cmd-control.o: cmd-control.c
+- gcc $(CFLAGS) -c -o $@ $^
++ $(CC) $(CFLAGS) -c -o $@ $^
+
+ %.o: %.c
+- gcc $(CFLAGS) -fPIC -c -o $@ $<
++ $(CC) $(CFLAGS) -fPIC -c -o $@ $<
+
+ sync-pppd.so: pty.o sync-pppd.o
+- gcc $(LDFLAGS) -shared -o $@ $^
++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^
+
+ cmd.so: cmd.o dstring.o
+- gcc $(LDFLAGS) -shared -o $@ $^
++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^
+
+ clean:
+ rm -f *.so *.o *~
diff --git a/net-dialup/rp-l2tp/files/rp-l2tp-0.4-flags.patch b/net-dialup/rp-l2tp/files/rp-l2tp-0.4-flags.patch
new file mode 100644
index 000000000000..bf5d0cf82b3f
--- /dev/null
+++ b/net-dialup/rp-l2tp/files/rp-l2tp-0.4-flags.patch
@@ -0,0 +1,54 @@
+diff -ru rp-l2tp-0.4.orig/handlers/Makefile.in rp-l2tp-0.4/handlers/Makefile.in
+--- rp-l2tp-0.4.orig/handlers/Makefile.in 2008-10-18 08:35:39.000000000 +0000
++++ rp-l2tp-0.4/handlers/Makefile.in 2008-10-18 08:47:02.000000000 +0000
+@@ -15,24 +15,24 @@
+
+ OBJS=pty.o sync-pppd.o dstring.o
+ SRCS=$(OBJS:.o=.c)
+-CFLAGS=-g -O2 -I.. -I../libevent -I../../libevent -Wall
++CFLAGS=@CFLAGS@ -I.. -I../libevent -I../../libevent -Wall
+
+ all: $(HANDLERS) l2tp-control
+
+ l2tp-control: cmd-control.o
+- gcc -o l2tp-control cmd-control.o
++ gcc $(LDFLAGS) -o l2tp-control cmd-control.o
+
+ cmd-control.o: cmd-control.c
+- gcc -c -o $@ $^
++ gcc $(CFLAGS) -c -o $@ $^
+
+ %.o: %.c
+ gcc $(CFLAGS) -fPIC -c -o $@ $<
+
+ sync-pppd.so: pty.o sync-pppd.o
+- gcc -shared -o $@ $^
++ gcc $(LDFLAGS) -shared -o $@ $^
+
+ cmd.so: cmd.o dstring.o
+- gcc -shared -o $@ $^
++ gcc $(LDFLAGS) -shared -o $@ $^
+
+ clean:
+ rm -f *.so *.o *~
+diff -ru rp-l2tp-0.4.orig/Makefile.in rp-l2tp-0.4/Makefile.in
+--- rp-l2tp-0.4.orig/Makefile.in 2008-10-18 08:35:39.000000000 +0000
++++ rp-l2tp-0.4/Makefile.in 2008-10-18 08:40:38.000000000 +0000
+@@ -31,7 +31,7 @@
+ EXTRA_LIBS=@LIBEVENT@/*.o -ldl
+
+ SRCS=$(OBJS:.o=.c)
+-CFLAGS=-g -I.. -I@LIBEVENT@ -Wall -Wstrict-prototypes -ansi -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" -DPREFIX=\"$(prefix)\" -DLIBDIR=\"$(libdir)\"
++CFLAGS=@CFLAGS@ -I.. -I@LIBEVENT@ -Wall -Wstrict-prototypes -ansi -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" -DPREFIX=\"$(prefix)\" -DLIBDIR=\"$(libdir)\"
+
+ TARGETS=l2tpd libl2tp.a handlers
+
+@@ -44,7 +44,7 @@
+
+ l2tpd: libl2tp.a libevent/libevent.a
+ $(MAKE) -C handlers
+- @CC@ -o l2tpd -rdynamic $(OBJS) $(EXTRA_LIBS)
++ @CC@ $(LDFLAGS) -o l2tpd -rdynamic $(OBJS) $(EXTRA_LIBS)
+
+ libevent/libevent.a:
+ test -d libevent || ln -s ../libevent .
diff --git a/net-dialup/rp-l2tp/files/rp-l2tp-0.4-gentoo.patch b/net-dialup/rp-l2tp/files/rp-l2tp-0.4-gentoo.patch
new file mode 100644
index 000000000000..1138b37b20e2
--- /dev/null
+++ b/net-dialup/rp-l2tp/files/rp-l2tp-0.4-gentoo.patch
@@ -0,0 +1,233 @@
+diff -Nru rp-l2tp-0.4.orig/handlers/cmd.c rp-l2tp-0.4/handlers/cmd.c
+--- rp-l2tp-0.4.orig/handlers/cmd.c 2007-04-15 13:30:55.000000000 +0300
++++ rp-l2tp-0.4/handlers/cmd.c 2007-04-15 13:29:18.000000000 +0300
+@@ -162,7 +162,7 @@
+
+ /* We have hit the end of our options. Open command socket */
+ if (!sockname) {
+- sockname = "/var/run/l2tpctrl";
++ sockname = "/var/run/rp-l2tpdctrl";
+ }
+
+ (void) remove(sockname);
+diff -Nru rp-l2tp-0.4.orig/handlers/cmd-control.c rp-l2tp-0.4/handlers/cmd-control.c
+--- rp-l2tp-0.4.orig/handlers/cmd-control.c 2007-04-15 13:30:55.000000000 +0300
++++ rp-l2tp-0.4/handlers/cmd-control.c 2007-04-15 13:29:18.000000000 +0300
+@@ -52,7 +52,7 @@
+
+ memset(&addr, 0, sizeof(addr));
+ addr.sun_family = AF_LOCAL;
+- strncpy(addr.sun_path, "/var/run/l2tpctrl", sizeof(addr.sun_path) - 1);
++ strncpy(addr.sun_path, "/var/run/rp-l2tpdctrl", sizeof(addr.sun_path) - 1);
+
+ fd = socket(AF_LOCAL, SOCK_STREAM, 0);
+ if (fd < 0) {
+diff -Nru rp-l2tp-0.4.orig/handlers/Makefile.in rp-l2tp-0.4/handlers/Makefile.in
+--- rp-l2tp-0.4.orig/handlers/Makefile.in 2007-04-15 13:30:55.000000000 +0300
++++ rp-l2tp-0.4/handlers/Makefile.in 2007-04-15 13:33:41.000000000 +0300
+@@ -9,6 +9,7 @@
+ install=@INSTALL@
+ install_dir=@INSTALL@ -d
+ sbindir=@sbindir@
++libdir=@libdir@
+
+ HANDLERS=sync-pppd.so cmd.so
+
+@@ -39,7 +40,7 @@
+
+ install: all
+ -mkdir -p $(RPM_INSTALL_ROOT)$(sbindir)
+- -mkdir -p $(RPM_INSTALL_ROOT)$(prefix)/lib/l2tp/plugins
+- $(install) -m 755 -s l2tp-control $(RPM_INSTALL_ROOT)$(sbindir)
+- $(install) -m 755 $(HANDLERS) $(RPM_INSTALL_ROOT)$(prefix)/lib/l2tp/plugins
++ -mkdir -p $(RPM_INSTALL_ROOT)$(libdir)/rp-l2tpd/plugins
++ $(install) -m 755 l2tp-control $(RPM_INSTALL_ROOT)$(sbindir)/rp-l2tpd-control
++ $(install) -m 755 $(HANDLERS) $(RPM_INSTALL_ROOT)$(libdir)/rp-l2tpd/plugins
+ distclean: clean
+diff -Nru rp-l2tp-0.4.orig/main.c rp-l2tp-0.4/main.c
+--- rp-l2tp-0.4.orig/main.c 2007-04-15 13:30:55.000000000 +0300
++++ rp-l2tp-0.4/main.c 2007-04-15 13:29:18.000000000 +0300
+@@ -27,7 +27,7 @@
+ static void
+ usage(int argc, char *argv[], int exitcode)
+ {
+- fprintf(stderr, "\nl2tpd Version %s Copyright 2002 Roaring Penguin Software Inc.\n", VERSION);
++ fprintf(stderr, "\nrp-l2tpd Version %s Copyright 2002 Roaring Penguin Software Inc.\n", VERSION);
+ fprintf(stderr, "http://www.roaringpenguin.com/\n\n");
+ fprintf(stderr, "Usage: %s [options]\n", argv[0]);
+ fprintf(stderr, "Options:\n");
+@@ -68,7 +68,7 @@
+ l2tp_peer_init();
+ l2tp_debug_set_bitmask(debugmask);
+
+- if (l2tp_parse_config_file(es, "/etc/l2tp/l2tp.conf") < 0) {
++ if (l2tp_parse_config_file(es, "/etc/rp-l2tp/rp-l2tpd.conf") < 0) {
+ l2tp_die();
+ }
+
+diff -Nru rp-l2tp-0.4.orig/Makefile.in rp-l2tp-0.4/Makefile.in
+--- rp-l2tp-0.4.orig/Makefile.in 2007-04-15 13:30:55.000000000 +0300
++++ rp-l2tp-0.4/Makefile.in 2007-04-15 13:39:09.000000000 +0300
+@@ -25,12 +25,13 @@
+ install=@INSTALL@
+ install_dir=@INSTALL@ -d
+ sbindir=@sbindir@
++libdir=@libdir@
+
+ OBJS=auth.o debug.o dgram.o main.o md5.o network.o options.o peer.o session.o tunnel.o utils.o
+ EXTRA_LIBS=@LIBEVENT@/*.o -ldl
+
+ SRCS=$(OBJS:.o=.c)
+-CFLAGS=-g -I.. -I@LIBEVENT@ -Wall -Wstrict-prototypes -ansi -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" -DPREFIX=\"$(prefix)\"
++CFLAGS=-g -I.. -I@LIBEVENT@ -Wall -Wstrict-prototypes -ansi -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" -DPREFIX=\"$(prefix)\" -DLIBDIR=\"$(libdir)\"
+
+ TARGETS=l2tpd libl2tp.a handlers
+
+@@ -81,13 +82,13 @@
+
+ install: all
+ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir)
+- $(install) -m 755 -s l2tpd $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir)
+- -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/l2tp
+- $(install) -m 644 l2tp.conf $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/l2tp/l2tp.conf.example
++ $(install) -m 755 l2tpd $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir)/rp-l2tpd
++ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rp-l2tp
++ $(install) -m 644 l2tp.conf $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rp-l2tp/rp-l2tpd.conf.example
+ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8
+ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man5
+- $(install) -m 644 man/l2tpd.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8
+- $(install) -m 644 man/l2tp.conf.5 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man5
++ $(install) -m 644 man/l2tpd.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8/rp-l2tpd.8
++ $(install) -m 644 man/l2tp.conf.5 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man5/rp-l2tpd.conf.5
+
+ $(MAKE) -C handlers install
+
+diff -Nru rp-l2tp-0.4.orig/man/l2tp.conf.5 rp-l2tp-0.4/man/l2tp.conf.5
+--- rp-l2tp-0.4.orig/man/l2tp.conf.5 2007-04-15 13:30:55.000000000 +0300
++++ rp-l2tp-0.4/man/l2tp.conf.5 2007-04-15 13:29:18.000000000 +0300
+@@ -1,13 +1,13 @@
+ .\" $Id$
+ .\" LIC: GPL
+-.TH L2TP.CONF 5 "11 March 2002"
++.TH RP-L2TPD.CONF 5 "11 March 2002"
+ .\""
+ .UC 4
+ .SH NAME
+-l2tp.conf \- L2TP configuration file
++rp-l2tpd.conf \- L2TP configuration file
+ .SH DESCRIPTION
+-The \fBl2tp.conf\fP file contains the configuration for
+-the L2TP daemon \fBl2tpd\fP(8).
++The \fBrp-l2tpd.conf\fP file contains the configuration for
++the L2TP daemon \fBrp-l2tpd\fP(8).
+ Each line in the file takes one of the following forms:
+ .\"
+ .IP "# \fIcomment\fR"
+@@ -155,9 +155,9 @@
+ in the global section. The only option available is:
+ .IP "\fBsocket-path\fP \fIpathname\fR"
+ Specifies the path name of the UNIX-domain socket for controlling the
+-daemon. Defaults to \fI/var/run/l2tpctrl\fR.
++daemon. Defaults to \fI/var/run/rp-l2tpdctrl\fR.
+ .PP
+ Even if you do not supply any options to cmd, you \fImust\fR have
+ a \fBsection cmd\fR line to activate the handler.
+ .SH AUTHORS
+-\fBl2tpd\fR was written by David F. Skoll <dfs@roaringpenguin.com>.
++\fBrp-l2tpd\fR was written by David F. Skoll <dfs@roaringpenguin.com>.
+diff -Nru rp-l2tp-0.4.orig/man/l2tpd.8 rp-l2tp-0.4/man/l2tpd.8
+--- rp-l2tp-0.4.orig/man/l2tpd.8 2007-04-15 13:30:55.000000000 +0300
++++ rp-l2tp-0.4/man/l2tpd.8 2007-04-15 13:29:18.000000000 +0300
+@@ -1,14 +1,14 @@
+ .\" $Id$
+ .\" LIC: GPL
+-.TH L2TPD 8 "11 March 2002"
++.TH RP-L2TPD 8 "11 March 2002"
+ .UC 4
+ .SH NAME
+-l2tpd \- user-space L2TP daemon.
++rp-l2tpd \- user-space L2TP daemon.
+ .SH SYNOPSIS
+-.B l2tpd \fR[\fIoptions\fR]
++.B rp-l2tpd \fR[\fIoptions\fR]
+
+ .SH DESCRIPTION
+-\fBl2tpd\fR is a user-space L2TP daemon. L2TP is the Layer Two
++\fBrp-l2tpd\fR is a user-space L2TP daemon. L2TP is the Layer Two
+ Tunneling Protocol described in RFC 2661. It allows you to tunnel
+ PPP sessions over a network or transport protocol (in this case, UDP.)
+
+@@ -16,50 +16,50 @@
+ .TP
+ .B \-d \fInum\fR
+ Sets the debug level to \fInum\fR. Of interest mostly to
+-\fBl2tpd\fR developers. \fInum\fR is a bitmask; set it to
++\fBrp-l2tpd\fR developers. \fInum\fR is a bitmask; set it to
+ 65535 for maximum debugging information.
+
+ .TP
+ .B \-f
+-Do not fork. Normally, \fBl2tpd\fR forks and puts itself in the
++Do not fork. Normally, \fBrp-l2tpd\fR forks and puts itself in the
+ background. This option causes it to stay running in the foreground.
+
+ .SH L2TPD ARCHITECTURE
+
+-The \fBl2tpd\fR program itself contains \fIonly\fR code necessary
++The \fBrp-l2tpd\fR program itself contains \fIonly\fR code necessary
+ for processing L2TP datagrams and maintaining L2TP tunnels and
+ sessions. It does \fInot\fR contain code for interacting with
+ \fBpppd\fR or for users to control session establishment and teardown.
+ These functions are performed by \fIhandlers\fR, which are
+ shared-object libraries dynamically loaded at run-time.
+ .PP
+-The handlers currently distributed with \fBl2tpd\fR include:
++The handlers currently distributed with \fBrp-l2tpd\fR include:
+ .TP
+ .B sync-pppd.so
+-A shared-library which interfaces with \fBpppd\fR and allows \fBl2tpd\fR
++A shared-library which interfaces with \fBpppd\fR and allows \fBrp-l2tpd\fR
+ to act as both an LAC and an LNS.
+ .TP
+ .B cmd.so
+ A simple command-interpreter which listens on a UNIX-domain socket
+ and allows you to start and stop L2TP sessions.
+ .PP
+-\fBl2tpd\fR is a single-threaded, event-driven program. It should be
++\fBrp-l2tpd\fR is a single-threaded, event-driven program. It should be
+ fairly lightweight and efficient.
+
+ .SH L2TPD CONFIGURATION
+-On startup, \fBl2tpd\fR reads the configuration file \fB/etc/l2tp/l2tp.conf\fR.
++On startup, \fBrp-l2tpd\fR reads the configuration file \fB/etc/rp-l2tp/rp-l2tpd.conf\fR.
+ This configuration file sets operating parameters, describes peers and loads
+-and configures handlers. See \fBl2tp.conf\fR(5) for configuration
++and configures handlers. See \fBrp-l2tp.conf\fR(5) for configuration
+ file details.
+
+ .SH FILES
+ .TP
+-.B /etc/l2tp/l2tp.conf
++.B /etc/rp-l2tp/rp-l2tp.conf
+ Main configuration file.
+ .TP
+-.B /var/run/l2tpctrl
++.B /var/run/rp-l2tpdctrl
+ Control socket for \fBcmd.so\fR handler.
+
+ .SH AUTHORS
+-\fBl2tpd\fR was written by David F. Skoll <dfs@roaringpenguin.com>.
++\fBrp-l2tpd\fR was written by David F. Skoll <dfs@roaringpenguin.com>.
+
+diff -Nru rp-l2tp-0.4.orig/utils.c rp-l2tp-0.4/utils.c
+--- rp-l2tp-0.4.orig/utils.c 2007-04-15 13:30:55.000000000 +0300
++++ rp-l2tp-0.4/utils.c 2007-04-15 13:34:20.000000000 +0300
+@@ -196,7 +196,7 @@
+ if (*fname == '/') {
+ handle = dlopen(fname, RTLD_NOW);
+ } else {
+- snprintf(buf, sizeof(buf), "%s/lib/l2tp/plugins/%s", PREFIX, fname);
++ snprintf(buf, sizeof(buf), "%s/rp-l2tpd/plugins/%s", LIBDIR, fname);
+ buf[sizeof(buf)-1] = 0;
+ handle = dlopen(buf, RTLD_NOW);
+ }
diff --git a/net-dialup/rp-l2tp/files/rp-l2tpd-init b/net-dialup/rp-l2tp/files/rp-l2tpd-init
new file mode 100644
index 000000000000..7af7cf6f6567
--- /dev/null
+++ b/net-dialup/rp-l2tp/files/rp-l2tpd-init
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting rp-l2tpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/rp-l2tpd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping rp-l2tpd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/rp-l2tpd
+ eend $?
+}
diff --git a/net-dialup/rp-l2tp/metadata.xml b/net-dialup/rp-l2tp/metadata.xml
new file mode 100644
index 000000000000..9e7736c5340f
--- /dev/null
+++ b/net-dialup/rp-l2tp/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">rp-l2tp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/rp-l2tp/rp-l2tp-0.4-r4.ebuild b/net-dialup/rp-l2tp/rp-l2tp-0.4-r4.ebuild
new file mode 100644
index 000000000000..cfe036f1c588
--- /dev/null
+++ b/net-dialup/rp-l2tp/rp-l2tp-0.4-r4.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="User-space implementation of L2TP for Linux and other UNIX systems"
+HOMEPAGE="https://sourceforge.net/projects/rp-l2tp/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 ~ppc x86"
+SLOT="0"
+
+src_prepare() {
+ tc-export AR CC RANLIB
+ epatch \
+ "${FILESDIR}/${P}-gentoo.patch" \
+ "${FILESDIR}/${P}-flags.patch" \
+ "${FILESDIR}/${P}-build.patch"
+ epatch_user
+}
+
+src_install() {
+ emake RPM_INSTALL_ROOT="${D}" install
+
+ dodoc README
+ newdoc l2tp.conf rp-l2tpd.conf
+ docinto libevent
+ dodoc libevent/Doc/*
+ docompress -x "/usr/share/doc/${PF}/libevent"
+
+ newinitd "${FILESDIR}/rp-l2tpd-init" rp-l2tpd
+}
diff --git a/net-dialup/rp-pppoe/Manifest b/net-dialup/rp-pppoe/Manifest
new file mode 100644
index 000000000000..6392cf882aec
--- /dev/null
+++ b/net-dialup/rp-pppoe/Manifest
@@ -0,0 +1,19 @@
+AUX rp-pppoe-3.10-autotools.patch 4038 SHA256 aa9bc0e6c529e59c00cc35b66f3db57ab02f015810da4e21b5b0a05efafe833d SHA512 a6269e86c8b4d693fc8b0f501103bd3308394040d35ea9a163ce4f89b9a4a571178b0f52e693ab2189648309f136760d15d9247f4f17305582376507e26ea393 WHIRLPOOL 3a25ca4c234c166685c34be44228d1ac0b4907ca985fbf6e6680e7c324395db8d9be3498f9ee1920f7af471b278bce7a2df4a5774b7bcb375ba1035d9ee97c9e
+AUX rp-pppoe-3.10-gentoo-netscripts.patch 5238 SHA256 c9c4997c3db1d0d350d285f371575b12cb15f15dfeac920b2fe573bff85754dc SHA512 b479de56886e30c40cf707ed9edcef5ff3bc08448d8084c7f96b26fc20594ed2a5a61a9706d992fb1ddab5f7d6b4d68ce90b9a1dee606bf9b02843322eaa451f WHIRLPOOL 766283107d9ac2c2f3fbb3c03e28fca60802da4b694d0aa9c11ad4b29a4316d3e9f4ecaa664a4fd2fd2c2812812ec6a32e30291f965c8edf47c1fb184b7d347d
+AUX rp-pppoe-3.10-linux-headers.patch 823 SHA256 39c854283b6a3d4ef382fb8aa1339b6a64be42c0922fa48ecc9b0c19e2a103e6 SHA512 f4cdbeb16af670c3674cf965c3fb43bed1e7716e6ff737b2592a8aa33453adc9dfff0466805bb8c84b6395adaa4c47e2b145cb073c0fb109456c27fd35bf0a96 WHIRLPOOL d6121e14c8b7ff029c9d41977bdcd7e7580381f4710f5b9cf8fc1c17a198580eb7127f13412ab1837a9e60baa674269ff6e947f600e1f079f4ed5601131d5e1a
+AUX rp-pppoe-3.10-plugin-options.patch 1491 SHA256 dc3fe5aa64c1880a701940e5636964eb90a3afec8ddf739aa4046fdf771d0374 SHA512 d25e64e6fa167271a425d0414254b9ba21e33eaaf2623027c586527a7c3be176be0166f9a1dd50885dfbef2e0cc57c9a228e74c736bcfe684add91c9cfb56792 WHIRLPOOL 4b07d32fd062cab31a744aa2c5cf297a82db0b154d2f0fc2ab9ab2825eb311eeeff1b9d78f5fdce17a43ea18c2aa7bf513d50e4925b59c05ce7b2fd66bda17b4
+AUX rp-pppoe-3.10-posix-source-sigaction.patch 513 SHA256 77d96c8a032e51d78649b55bcffe9dc0a146259fb82e37801623d801824bdd2f SHA512 52164a8194dbe160df3c16028ba3720cf801b94ab0d14e471b1fbff6db91e1e88be25fff3ece7571b49cc0befcbbe9aad2cd72da9d63cfcf16a9c365dc78d4ba WHIRLPOOL bb23a2e62f0085ae9be1abbce7737774dc29921d0ff08f79016ec5392971a2c38d57fd56dded2754539188120fe9dc6a38f55ccee50a8ba009109fa09e9376c0
+AUX rp-pppoe-3.10-session-offset.patch 832 SHA256 66499b084aab890c61399c703e21ba00a46d93da1f36e87674a27026b0c2f013 SHA512 20d169a27d7fc52c53e8ed06652c8db22c4b8b7d44a137c6f3beece41a408ca71b6aeb441a3bbcac76275382b40633f4a1c75dc95212402aa3ebf378dc3cb052 WHIRLPOOL b8406150e1fa63f8cca6092de65a323c2bbdb2ebe0a29b77488ac66c7480d0e639e00fd17ecc286036dfe6a7d63954b1ba3996f4dfe9e0f08ffa2b874d73f001
+AUX rp-pppoe-3.10-username-charset.patch 1950 SHA256 1a6df9197e108e310e90ca52f1d8b14b59fb368f59184aed3dc30abb9ca77417 SHA512 849cd9d0b59b844b2def6b49a203f3af0ec551a09235004b13541f14812517a651327e5694502a32f259b0eee7bc4b708800deabd93eaf3a01771bd47dd43e3f WHIRLPOOL 6382ce336a5b4782b5300ce4838088d082529f58e43d9127b50b6357c61eb58b4e7da87f898d94bad90933b920c9a9ec02a1ad008f8786848aca69500cc24cad
+AUX rp-pppoe-3.11-gentoo.patch 333 SHA256 336e22cc8202b572929ee36d8342ad1b4b0feb7a45a8291b6cb1630dd50a5104 SHA512 76a79224e9d2b12c7a580f66e1ccc2ae4f2b655b2e54a10ec791e49d806d5afc6f2e8b6dd9128c1eb6222d3bdc0ed6787ddfd7775f4c3df42d05033e35ae65b1 WHIRLPOOL 9b9071f1ef4083877fb76360484bbbb5e887c592c2344b4a3c0518bfb99c24e4e1c23621a63623fd97b0d272bc546ceda28bd9cb4b182907a157b49b88170f8a
+AUX rp-pppoe-3.11-kmode.patch 232 SHA256 5163e3d8b4019785af948d1b4b0d860ce8cd092daa98dcadca10b41764ca8e88 SHA512 4481d6ba933a8d400acacab1147de5d7675ee898ead8ddee9a24fa065a1e701569e83ae68a08c9bc0ea4ff5c909aa256e5c75fed7229ff288bd99cbbabdf2c59 WHIRLPOOL 0c3c6b3a4619943c0ac17ef3ae0bd67044f306ba81a6291b5ca3a245eb473cc190e280649295a43f26210db09dadfca4946538ba6a5ac517735e9da6ab8ecf91
+AUX rp-pppoe-3.12-ifconfig-path.patch 1892 SHA256 8fdd811eb4a71a6b61f305e79add2840992f4fc9b131b82158861d54410adc94 SHA512 9fc96ff573f8973ca864de9bc017d75d6bd01b7080adef14f5cc8f3ed253efa8cfbb850327e769400994c5208a4ffcc8d72cf693d2fb6cf678e3305a5ce3f5e4 WHIRLPOOL 90c293266aad0cec07ee06289c99fb7180219db1e423cfb12c6ce91c3dd34ca362cb3b5c2bd1476180495dbc5b00aaf8ac14d6c5eef5fc19f5eb1ce2cb876205
+AUX rp-pppoe-3.12-linux-headers.patch 681 SHA256 99761e5f84535d02e2004000567cab009ef49ed96f0534a5937e63d15dbed184 SHA512 b4d25bfd060e8ab63978ac243516c92d889a2a00b1cb786c0c3bc9ca892c43e0e76c24964aa3165a5a4bb3eb56af8df20be4f99accb8bfb812a4678e8bf9980c WHIRLPOOL 8e4a18c75c6e7589452e6364ff2679e72f65da67636da910a24872b88b2dae5bfcc0d29be1fd25511749cfc843f58df36bc542e0363504c22565387bab4c2345
+DIST ppp-2.4.7.tar.gz 688117 SHA256 02e0a3dd3e4799e33103f70ec7df75348c8540966ee7c948e4ed8a42bbccfb30 SHA512 e34ce24020af6a73e7a26c83c4f73a9c83fa455b7b363794dba27bf01f70368be06bff779777843949bd77f4bc9385d6ad455ea48bf8fff4e0d73cc8fef16ae2 WHIRLPOOL 48f3251e6b955ecfdaf9260b9ea5220d9e355fff836e2f5217ee0b15bf2c93e43f8207005f58bf1f97fb8ff0c76c56df8ecd8536f63c4d84d5940458ba0ba5c3
+DIST rp-pppoe-3.11.tar.gz 223234 SHA256 86a1a4d92fcea74fa6dd45516c5975933fa978b36fafe71f76ea70b4b4747720 SHA512 cb9579ad94f6b6cfd709e8061aacac0a007f1f58ffd50bd0603f5a2b612c0cf4831febdbfeee290b97932fd30f8ae7f707d532a291124c4aeae2333131d53905 WHIRLPOOL 5e0580b469973726696adc8754f4490877b748e04395873b63a7f6b87b682e0fe4d75f53b1cab674932fe7dcf4d7c99458979926f74589e6d4e15b07505720f6
+DIST rp-pppoe-3.12.tar.gz 224125 SHA256 00794e04031546b0e9b8cf286f2a6d1ccfc4a621b2a3abb2d7ef2a7ab7cc86c2 SHA512 1b9e4c806fcbad1bc21f7b74a780ae98682b10a69d91fb08df6dbd1fff86f6271995ebded43f926f8249a17cdddb541edccbbb3ee28e1a2dc89173ad61cd3de1 WHIRLPOOL 3285578003c1f03037517e468829e72cc4bbaeeb78f40bbcaf27a077ab3437fa4139bb7b141311658dbff55597da42d66c31155a180ed9acfefdc73dab1fffaf
+EBUILD rp-pppoe-3.11-r3.ebuild 2686 SHA256 3a3bd0b2ee0eefa4747b9f0eb53ccec2686e9975545521c0df089c1447ebffdf SHA512 6a2ea94d70648156b548090c743696e836d46ce0b85e29b7bc966fea831589ed3936ec75168d30242328ad5999088acebe7b4ba1b87623033ba6e1b60c12267c WHIRLPOOL a41629e48731dd87442c4c71c68ad759a61b5ff56615021d98654188498c569d9418a27479bcef1055169bde0bf025252d020931711d40ec0caf8d9ac152b4bc
+EBUILD rp-pppoe-3.12-r1.ebuild 2718 SHA256 0ba3ac93440987eb5fb52ae67d8f36579067f882f782f672e284a9ac13405a54 SHA512 d0072e6c08f62b7cce9982248ff9c23227cf5661ba5ef8255b9016708d48a4f434671f61de7e475e9efa024fc49639dd58985edc24d7eb2f4fb090962f427dd6 WHIRLPOOL f7850081149b207dfab4fdde53a3c61b9d48c7eac751067c9d7c69193f60adc4ed192a2088e847f81ff54d8babb49b92dad274b3619359bdb1ccdf0a8695ee2f
+MISC ChangeLog 6630 SHA256 11fa3a56cebf4e77cb6d1a7e352c1cde47a83e34cdc7d072ed4b66e4c67ea751 SHA512 c5fbac8014f51699848391dcff13b04d8e230df6630937efafd32a1a07e2cce3a55b11cca04ec6d18406da66badec16b518019ca5a3818fc7ecb7dad7e476751 WHIRLPOOL 1583dea45c682510271b6f57ae1fb0c2f50dc45b388a7eec581d27e024d9aa04ca916f66ae6cf62e3ea9ee9cbca31411daee8fbc01b9382f1cbf44b6685409fd
+MISC ChangeLog-2015 16938 SHA256 801fb20d1529fd194faf8c52adc8aa1f57fe36fb7bf95118bcae61872396338c SHA512 72c94301763ebce4f1c184915ddb08411b8a55bd7e7430e99fb96a718f785b3df2f94b09eba0bce2a44acd7fb5a52c0506b49661bf83a4bfa5352e76e155347a WHIRLPOOL 15ef14ead9f2cb627495a306b7c6de26f9b4b2f10e1740975be0ac37a1decf059bc8debeb623d09099cf500441722058838d5d9c991df6838e7d99e7ff6ba715
+MISC metadata.xml 370 SHA256 66f55e4ce20939e8b03120d8e3a767e9a1e2decf66d8c44df5c3ef1c91e019f5 SHA512 ebfae7addd585ee6f01b45921b1ba6a1c824c6e34f8f6a3c6d2fd917d7b17aceffca5f6a4ca1c7b135a34c679394417b73a23e067daed8a2c4b71fa63536c849 WHIRLPOOL 8f6c1769536a8cbd07d48306c2f3f102ac32c9216109a97522bb78ebdc14badac2d4e5971d42264d7527dd881f552cd083d392195f1ebc0ffbdd0632ad822e6f
diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-autotools.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-autotools.patch
new file mode 100644
index 000000000000..265d15db0936
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-autotools.patch
@@ -0,0 +1,115 @@
+diff -Nru rp-pppoe-3.10.orig/gui/Makefile.in rp-pppoe-3.10/gui/Makefile.in
+--- rp-pppoe-3.10.orig/gui/Makefile.in 2008-06-30 16:00:41.000000000 +0200
++++ rp-pppoe-3.10/gui/Makefile.in 2008-06-30 22:30:56.000000000 +0200
+@@ -46,7 +46,7 @@
+ -mkdir -p $(DESTDIR)$(sbindir)
+ -mkdir -p $(DESTDIR)$(bindir)
+ -mkdir -p $(DESTDIR)/etc/ppp/rp-pppoe-gui
+- $(install) -m 4755 -s pppoe-wrapper $(DESTDIR)$(sbindir)
++ $(install) -m 4755 pppoe-wrapper $(DESTDIR)$(sbindir)
+ $(install) -m 755 tkpppoe $(DESTDIR)$(bindir)
+ -mkdir -p $(DESTDIR)$(mandir)/man1
+ $(install) -m 644 pppoe-wrapper.1 $(DESTDIR)$(mandir)/man1
+diff -Nru rp-pppoe-3.10.orig/src/configure.in rp-pppoe-3.10/src/configure.in
+--- rp-pppoe-3.10.orig/src/configure.in 2008-06-30 16:00:42.000000000 +0200
++++ rp-pppoe-3.10/src/configure.in 2008-06-30 22:29:53.000000000 +0200
+@@ -45,7 +45,7 @@
+ AC_MSG_RESULT($ac_cv_struct_sockaddr_ll)
+
+ if test "$ac_cv_struct_sockaddr_ll" = yes ; then
+-AC_DEFINE(HAVE_STRUCT_SOCKADDR_LL)
++AC_DEFINE(HAVE_STRUCT_SOCKADDR_LL, 1, [Define if you have struct sockaddr_ll])
+ fi
+
+ dnl Check for N_HDLC line discipline
+@@ -56,7 +56,7 @@
+ ac_cv_n_hdlc=no)
+ AC_MSG_RESULT($ac_cv_n_hdlc)
+ if test "$ac_cv_n_hdlc" = yes ; then
+-AC_DEFINE(HAVE_N_HDLC)
++AC_DEFINE(HAVE_N_HDLC, 1, [Define if you have the N_HDLC line discipline in linux/termios.h])
+ fi
+
+ AC_ARG_ENABLE(plugin, [ --enable-plugin=pppd_src_path build pppd plugin], ac_cv_pluginpath=$enableval, ac_cv_pluginpath=no)
+@@ -104,7 +104,7 @@
+ if test "$ac_cv_header_linux_if_pppox_h" = yes ; then
+ if test "$ac_cv_pluginpath" != no ; then
+ LINUX_KERNELMODE_PLUGIN=rp-pppoe.so
+- AC_DEFINE(HAVE_LINUX_KERNEL_PPPOE)
++ AC_DEFINE(HAVE_LINUX_KERNEL_PPPOE, 1, [Define if you have kernel-mode PPPoE in Linux file])
+ PPPD_INCDIR=$ac_cv_pluginpath
+ fi
+ fi
+@@ -114,7 +114,7 @@
+ fi
+
+ if test "$ac_cv_debugging" = "yes" ; then
+- AC_DEFINE(DEBUGGING_ENABLED)
++ AC_DEFINE(DEBUGGING_ENABLED, 1, [Define to include debugging code])
+ fi
+
+ AC_SUBST(LINUX_KERNELMODE_PLUGIN)
+@@ -154,15 +154,15 @@
+ AC_MSG_CHECKING(for Linux 2.4.X kernel-mode PPPoE support)
+ AC_CACHE_VAL(ac_cv_linux_kernel_pppoe,[
+ if test "`uname -s`" = "Linux" ; then
+-if test $cross_compiling = "no"; then
++dnl if test $cross_compiling = "no"; then
+
+ dnl Do a bunch of modprobes. Can't hurt; might help.
+-modprobe ppp_generic > /dev/null 2>&1
+-modprobe ppp_async > /dev/null 2>&1
+-modprobe n_hdlc > /dev/null 2>&1
+-modprobe ppp_synctty > /dev/null 2>&1
+-modprobe pppoe > /dev/null 2>&1
+-fi
++dnl modprobe ppp_generic > /dev/null 2>&1
++dnl modprobe ppp_async > /dev/null 2>&1
++dnl modprobe n_hdlc > /dev/null 2>&1
++dnl modprobe ppp_synctty > /dev/null 2>&1
++dnl modprobe pppoe > /dev/null 2>&1
++dnl fi
+ AC_TRY_RUN([#include <sys/socket.h>
+ #include <net/ethernet.h>
+ #include <linux/if.h>
+@@ -204,7 +204,7 @@
+ dnl Figure out pppd version. 2.3.7 to 2.3.9 -- issue warning. Less than
+ dnl 2.3.7 -- stop
+
+-PPPD_VERSION=`$PPPD --version 2>&1 | awk ' /version/ {print $NF}'`
++PPPD_VERSION=2.4.4
+
+ case "$PPPD_VERSION" in
+ 1.*|2.0.*|2.1.*|2.2.*|2.3.0|2.3.1|2.3.2|2.3.3|2.3.4|2.3.5|2.3.6)
+@@ -258,7 +258,7 @@
+
+ if test "$rpppoe_cv_pack_bitfields" = "rev" ; then
+ AC_MSG_RESULT(reversed)
+- AC_DEFINE(PACK_BITFIELDS_REVERSED)
++ AC_DEFINE(PACK_BITFIELDS_REVERSED, 1, [Define if bitfields are packed in reverse order])
+ else
+ AC_MSG_RESULT(normal)
+ fi
+diff -Nru rp-pppoe-3.10.orig/src/plugin.c rp-pppoe-3.10/src/plugin.c
+--- rp-pppoe-3.10.orig/src/plugin.c 2008-06-30 16:00:43.000000000 +0200
++++ rp-pppoe-3.10/src/plugin.c 2008-06-30 22:27:18.000000000 +0200
+@@ -27,7 +27,6 @@
+ static char const RCSID[] =
+ "$Id$";
+
+-#define _GNU_SOURCE 1
+ #include "pppoe.h"
+
+ #include "pppd/pppd.h"
+diff -Nru rp-pppoe-3.10.orig/src/relay.c rp-pppoe-3.10/src/relay.c
+--- rp-pppoe-3.10.orig/src/relay.c 2008-06-30 16:00:43.000000000 +0200
++++ rp-pppoe-3.10/src/relay.c 2008-06-30 22:27:18.000000000 +0200
+@@ -17,8 +17,6 @@
+ static char const RCSID[] =
+ "$Id$";
+
+-#define _GNU_SOURCE 1 /* For SA_RESTART */
+-
+ #include "relay.h"
+
+ #include <signal.h>
diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-gentoo-netscripts.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-gentoo-netscripts.patch
new file mode 100644
index 000000000000..f45557a0d6f0
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-gentoo-netscripts.patch
@@ -0,0 +1,150 @@
+diff -Nru rp-pppoe-3.10.orig/configs/pppoe.conf rp-pppoe-3.10/configs/pppoe.conf
+--- rp-pppoe-3.10.orig/configs/pppoe.conf 2008-06-30 16:00:42.000000000 +0200
++++ rp-pppoe-3.10/configs/pppoe.conf 2008-06-30 22:22:32.000000000 +0200
+@@ -21,6 +21,9 @@
+ # When you configure a variable, DO NOT leave spaces around the "=" sign.
+
+ # Ethernet card connected to DSL modem
++#
++# NB: Gentoo overrides ETH when pppoe-start is called from the
++# networking scripts. This setting has no effect in that case.
+ ETH=eth1
+
+ # PPPoE user name. You may have to supply "@provider.com" Sympatico
+@@ -86,8 +89,10 @@
+ # $PIDFILE contains PID of pppoe-connect script
+ # $PIDFILE.pppoe contains PID of pppoe process
+ # $PIDFILE.pppd contains PID of pppd process
+-CF_BASE=`basename $CONFIG`
+-PIDFILE="/var/run/$CF_BASE-pppoe.pid"
++#
++# NB: Gentoo overrides PIDFILE when pppoe-start is run from the
++# networking scripts. This setting has no effect in that case.
++PIDFILE="/var/run/rp-pppoe.pid"
+
+ # Do you want to use synchronous PPP? "yes" or "no". "yes" is much
+ # easier on CPU usage, but may not work for you. It is safer to use
+diff -Nru rp-pppoe-3.10.orig/scripts/pppoe-connect.in rp-pppoe-3.10/scripts/pppoe-connect.in
+--- rp-pppoe-3.10.orig/scripts/pppoe-connect.in 2008-06-30 16:00:42.000000000 +0200
++++ rp-pppoe-3.10/scripts/pppoe-connect.in 2008-06-30 22:22:32.000000000 +0200
+@@ -62,12 +62,17 @@
+ ;;
+ esac
+
+-if test ! -f "$CONFIG" -o ! -r "$CONFIG" ; then
++# In Gentoo, CONFIG is a named pipe when pppoe is started by the
++# network scripts. Testing -r is allowed; testing -f is not.
++if test ! -r "$CONFIG" ; then
+ echo "$0: Cannot read configuration file '$CONFIG'" >& 2
+ exit 1
+ fi
+-export CONFIG
+-. $CONFIG
++
++# Read the named pipe (/dev/fd/foo) into a variable so we can use it
++# again later (since reading once from the pipe will exhaust it)
++CONFREAD=$(<$CONFIG)
++eval "$CONFREAD"
+
+ PPPOE_PIDFILE="$PIDFILE.pppoe"
+ PPPD_PIDFILE="$PIDFILE.pppd"
+diff -Nru rp-pppoe-3.10.orig/scripts/pppoe-start.in rp-pppoe-3.10/scripts/pppoe-start.in
+--- rp-pppoe-3.10.orig/scripts/pppoe-start.in 2008-06-30 16:00:42.000000000 +0200
++++ rp-pppoe-3.10/scripts/pppoe-start.in 2008-06-30 22:22:32.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ # @configure_input@
+ #***********************************************************************
+ #
+@@ -113,12 +113,17 @@
+ ;;
+ esac
+
+-if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then
++# In Gentoo, CONFIG is a named pipe when pppoe is started by the
++# network scripts. Testing -r is allowed; testing -f is not.
++if [ ! -r "$CONFIG" ] ; then
+ $ECHO "$ME: Cannot read configuration file '$CONFIG'" >& 2
+ exit 1
+ fi
+-export CONFIG
+-. $CONFIG
++
++# Read the named pipe (/dev/fd/foo) into a variable so we can use it
++# again later (since reading once from the pipe will exhaust it)
++CONFREAD=$(<$CONFIG)
++eval "$CONFREAD"
+
+ # Check for command-line overriding of ETH and USER
+ case "$#" in
+@@ -145,11 +150,11 @@
+
+ # Start the connection in the background unless we're debugging
+ if [ "$DEBUG" != "" ] ; then
+- $CONNECT "$@"
++ $CONNECT <(echo "$CONFREAD")
+ exit 0
+ fi
+
+-$CONNECT "$@" > /dev/null 2>&1 &
++$CONNECT <(echo "$CONFREAD") >/dev/null 2>&1 &
+ CONNECT_PID=$!
+
+ if [ "$CONNECT_TIMEOUT" = "" -o "$CONNECT_TIMEOUT" = 0 ] ; then
+@@ -164,7 +169,7 @@
+ # Monitor connection
+ TIME=0
+ while [ true ] ; do
+- @sbindir@/pppoe-status $CONFIG > /dev/null 2>&1
++ @sbindir@/pppoe-status <(echo "$CONFREAD") >/dev/null 2>&1
+
+ # Looks like the interface came up
+ if [ $? = 0 ] ; then
+diff -Nru rp-pppoe-3.10.orig/scripts/pppoe-status rp-pppoe-3.10/scripts/pppoe-status
+--- rp-pppoe-3.10.orig/scripts/pppoe-status 2008-06-30 16:00:42.000000000 +0200
++++ rp-pppoe-3.10/scripts/pppoe-status 2008-06-30 22:22:32.000000000 +0200
+@@ -28,12 +28,17 @@
+ ;;
+ esac
+
+-if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then
++# In Gentoo, CONFIG is a named pipe when pppoe is started by the
++# network scripts. Testing -r is allowed; testing -f is not.
++if [ ! -r "$CONFIG" ] ; then
+ echo "$0: Cannot read configuration file '$CONFIG'" >& 2
+ exit 1
+ fi
+
+-. $CONFIG
++# Read the named pipe (/dev/fd/foo) into a variable so we can use it
++# again later (since reading once from the pipe will exhaust it)
++CONFREAD=$(<$CONFIG)
++eval "$CONFREAD"
+
+ PPPOE_PIDFILE="$PIDFILE.pppoe"
+ PPPD_PIDFILE="$PIDFILE.pppd"
+diff -Nru rp-pppoe-3.10.orig/scripts/pppoe-stop.in rp-pppoe-3.10/scripts/pppoe-stop.in
+--- rp-pppoe-3.10.orig/scripts/pppoe-stop.in 2008-06-30 16:00:42.000000000 +0200
++++ rp-pppoe-3.10/scripts/pppoe-stop.in 2008-06-30 22:22:32.000000000 +0200
+@@ -31,12 +31,17 @@
+ CONFIG=/etc/ppp/pppoe.conf
+ fi
+
+-if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then
++# In Gentoo, CONFIG is a named pipe when pppoe is started by the
++# network scripts. Testing -r is allowed; testing -f is not.
++if [ ! -r "$CONFIG" ] ; then
+ echo "$ME: Cannot read configuration file '$CONFIG'" >& 2
+ exit 1
+ fi
+-export CONFIG
+-. $CONFIG
++
++# Read the named pipe (/dev/fd/foo) into a variable so we can use it
++# again later (since reading once from the pipe will exhaust it)
++CONFREAD=$(<$CONFIG)
++eval "$CONFREAD"
+
+ PPPOE_PIDFILE="$PIDFILE.pppoe"
+ PPPD_PIDFILE="$PIDFILE.pppd"
diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-linux-headers.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-linux-headers.patch
new file mode 100644
index 000000000000..47e504bf7835
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-linux-headers.patch
@@ -0,0 +1,31 @@
+diff -Nru rp-pppoe-3.10.orig/src/pppoe.h rp-pppoe-3.10/src/pppoe.h
+--- rp-pppoe-3.10.orig/src/pppoe.h 2008-06-30 16:00:43.000000000 +0200
++++ rp-pppoe-3.10/src/pppoe.h 2008-06-30 23:25:54.000000000 +0200
+@@ -19,6 +19,13 @@
+
+ extern int IsSetID;
+
++/* Ugly header files on some Linux boxes... */
++#if defined(HAVE_LINUX_IF_H)
++#include <linux/if.h>
++#elif defined(HAVE_NET_IF_H)
++#include <net/if.h>
++#endif
++
+ #if defined(HAVE_NETPACKET_PACKET_H) || defined(HAVE_LINUX_IF_PACKET_H)
+ #define _POSIX_SOURCE 1 /* For sigaction defines */
+ #endif
+@@ -51,13 +58,6 @@
+ #include <sys/socket.h>
+ #endif
+
+-/* Ugly header files on some Linux boxes... */
+-#if defined(HAVE_LINUX_IF_H)
+-#include <linux/if.h>
+-#elif defined(HAVE_NET_IF_H)
+-#include <net/if.h>
+-#endif
+-
+ #ifdef HAVE_NET_IF_TYPES_H
+ #include <net/if_types.h>
+ #endif
diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-plugin-options.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-plugin-options.patch
new file mode 100644
index 000000000000..0d447748a1bc
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-plugin-options.patch
@@ -0,0 +1,39 @@
+diff -ur rp-pppoe-3.10.orig/configs/pppoe.conf rp-pppoe-3.10/configs/pppoe.conf
+--- rp-pppoe-3.10.orig/configs/pppoe.conf 2008-08-23 03:40:56.000000000 +0000
++++ rp-pppoe-3.10/configs/pppoe.conf 2008-08-23 03:42:20.000000000 +0000
+@@ -120,7 +120,7 @@
+ FIREWALL=NONE
+
+ # Linux kernel-mode plugin for pppd. If you want to try the kernel-mode
+-# plugin, use LINUX_PLUGIN=/etc/ppp/plugins/rp-pppoe.so
++# plugin, use LINUX_PLUGIN=rp-pppoe.so
+ LINUX_PLUGIN=
+
+ # Any extra arguments to pass to pppoe. Normally, use a blank string
+diff -ur rp-pppoe-3.10.orig/scripts/pppoe-connect.in rp-pppoe-3.10/scripts/pppoe-connect.in
+--- rp-pppoe-3.10.orig/scripts/pppoe-connect.in 2008-08-23 03:40:56.000000000 +0000
++++ rp-pppoe-3.10/scripts/pppoe-connect.in 2008-08-23 03:45:43.000000000 +0000
+@@ -202,10 +202,13 @@
+
+ # If we're using kernel-mode PPPoE on Linux...
+ if test "$LINUX_PLUGIN" != "" ; then
+- PLUGIN_OPTS="plugin $LINUX_PLUGIN nic-$ETH"
++ PLUGIN_OPTS="plugin $LINUX_PLUGIN"
+ if test -n "$SERVICENAME" ; then
+ PLUGIN_OPTS="$PLUGIN_OPTS rp_pppoe_service $SERVICENAME"
+ fi
++
++ # Interface name MUST BE LAST!!
++ PLUGIN_OPTS="$PLUGIN_OPTS $ETH"
+ modprobe pppoe > /dev/null 2>&1
+ fi
+
+@@ -297,7 +300,7 @@
+ $SETSID $OVERRIDE_PPPD_COMMAND &
+ echo "$!" > $PPPD_PIDFILE
+ elif test "$LINUX_PLUGIN" != "" ; then
+- $SETSID $PPPD $PPP_STD_OPTIONS $DEMAND &
++ $SETSID $PPPD $DEMAND $PPP_STD_OPTIONS &
+ echo "$!" > $PPPD_PIDFILE
+ else
+ $SETSID $PPPD pty "$PPPOE_CMD" \
diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-posix-source-sigaction.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-posix-source-sigaction.patch
new file mode 100644
index 000000000000..7ed4b98c7213
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-posix-source-sigaction.patch
@@ -0,0 +1,18 @@
+glibc does not define SA_RESTART when _POSIX_SOURCE is defined, so we
+have to just assume the default signal.h include defines SA_RESTART
+
+https://sourceware.org/bugzilla/show_bug.cgi?id=12252
+
+--- rp-pppoe-3.10/src/pppoe.h
++++ rp-pppoe-3.10/src/pppoe.h
+@@ -19,10 +19,6 @@
+
+ extern int IsSetID;
+
+-#if defined(HAVE_NETPACKET_PACKET_H) || defined(HAVE_LINUX_IF_PACKET_H)
+-#define _POSIX_SOURCE 1 /* For sigaction defines */
+-#endif
+-
+ #include <stdio.h> /* For FILE */
+ #include <sys/types.h> /* For pid_t */
+
diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-session-offset.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-session-offset.patch
new file mode 100644
index 000000000000..303ecfa9e4b7
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-session-offset.patch
@@ -0,0 +1,21 @@
+diff -Nru rp-pppoe-3.10.orig/src/pppoe-server.c rp-pppoe-3.10/src/pppoe-server.c
+--- rp-pppoe-3.10.orig/src/pppoe-server.c 2008-06-30 16:00:43.000000000 +0200
++++ rp-pppoe-3.10/src/pppoe-server.c 2008-06-30 22:35:11.000000000 +0200
+@@ -1751,7 +1751,7 @@
+ }
+ if (PassUnitOptionToPPPD) {
+ argv[c++] = "unit";
+- sprintf(buffer, "%u", (unsigned int) (ntohs(session->sess) - 1 - SessOffset));
++ sprintf(buffer, "%u", (unsigned int) (ntohs(session->sess) - 1));
+ argv[c++] = buffer;
+ }
+ argv[c++] = NULL;
+@@ -1834,7 +1834,7 @@
+ argv[c++] = "default-asyncmap";
+ if (PassUnitOptionToPPPD) {
+ argv[c++] = "unit";
+- sprintf(buffer, "%u", (unsigned int) (ntohs(session->sess) - 1 - SessOffset));
++ sprintf(buffer, "%u", (unsigned int) (ntohs(session->sess) - 1));
+ argv[c++] = buffer;
+ }
+ argv[c++] = NULL;
diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-username-charset.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-username-charset.patch
new file mode 100644
index 000000000000..8ef99a4b7aa9
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-username-charset.patch
@@ -0,0 +1,58 @@
+diff -Nru rp-pppoe-3.10.orig/scripts/pppoe-setup.in rp-pppoe-3.10/scripts/pppoe-setup.in
+--- rp-pppoe-3.10.orig/scripts/pppoe-setup.in 2008-06-30 16:00:42.000000000 +0200
++++ rp-pppoe-3.10/scripts/pppoe-setup.in 2008-06-30 22:23:40.000000000 +0200
+@@ -86,11 +86,13 @@
+ $ECHO "USER NAME"
+ $ECHO ""
+ printf "%s" ">>> Enter your PPPoE user name (default $USER): "
+- read U
++ read Uu
+
+- if [ "$U" = "" ] ; then
+- U="$USER"
++ if [ "$Uu" = "" ] ; then
++ Uu="$USER"
+ fi
++
++ U=`echo $Uu | sed -e "s/&/\\\\\&/g"`
+
+ # Under Linux, "fix" the default interface if eth1 is not available
+ if test `uname -s` = "Linux" ; then
+@@ -221,7 +223,7 @@
+ $ECHO "** Summary of what you entered **"
+ $ECHO ""
+ $ECHO "Ethernet Interface: $E"
+- $ECHO "User name: $U"
++ $ECHO "User name: $Uu"
+ if [ "$D" = "no" ] ; then
+ $ECHO "Activate-on-demand: No"
+ else
+@@ -288,7 +290,12 @@
+ fi
+
+ # Some #$(*& ISP's use a slash in the user name...
+-sed -e "s&^USER=.*&USER='$U'&" \
++for SEP in ':' ';' '/' '!' '|' '_' '-' '@' ; do
++ if [ "$U" = `echo $U | sed "sI${SEP}II"` ]; then
++ break;
++ fi
++done
++sed -e "s${SEP}^USER=.*${SEP}USER='$U'${SEP}"\
+ -e "s&^ETH=.*&ETH='$E'&" \
+ -e "s&^PIDFILE=.*&PIDFILE=\"$VARRUN/\$CF_BASE-pppoe.pid\"&" \
+ -e "s/^FIREWALL=.*/FIREWALL=$FIREWALL/" \
+@@ -337,10 +344,10 @@
+ cp /dev/null /etc/ppp/chap-secrets-bak
+ fi
+
+-egrep -v "^$U|^\"$U\"" /etc/ppp/pap-secrets-bak > /etc/ppp/pap-secrets
+-$ECHO "\"$U\" * \"$PWD1\"" >> /etc/ppp/pap-secrets
+-egrep -v "^$U|^\"$U\"" /etc/ppp/chap-secrets-bak > /etc/ppp/chap-secrets
+-$ECHO "\"$U\" * \"$PWD1\"" >> /etc/ppp/chap-secrets
++egrep -v "^$Uu|^\"$Uu\"" /etc/ppp/pap-secrets-bak > /etc/ppp/pap-secrets
++$ECHO "\"$Uu\" * \"$PWD1\"" >> /etc/ppp/pap-secrets
++egrep -v "^$Uu|^\"$Uu\"" /etc/ppp/chap-secrets-bak > /etc/ppp/chap-secrets
++$ECHO "\"$Uu\" * \"$PWD1\"" >> /etc/ppp/chap-secrets
+
+ $ECHO ""
+ $ECHO ""
diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.11-gentoo.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.11-gentoo.patch
new file mode 100644
index 000000000000..9f03a0cf8b1f
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.11-gentoo.patch
@@ -0,0 +1,11 @@
+--- rp-pppoe-3.11/gui/Makefile.in
++++ rp-pppoe-3.11/gui/Makefile.in
+@@ -37,7 +37,7 @@
+ @echo "Type 'make install' as root to install the software."
+
+ pppoe-wrapper: wrapper.o
+- @CC@ -o pppoe-wrapper wrapper.o
++ @CC@ $(CFLAGS) $(LDFLAGS) -o pppoe-wrapper wrapper.o
+
+ wrapper.o: wrapper.c
+ @CC@ $(CFLAGS) -c -o wrapper.o wrapper.c
diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.11-kmode.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.11-kmode.patch
new file mode 100644
index 000000000000..78a6a3b67541
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.11-kmode.patch
@@ -0,0 +1,10 @@
+--- a/src/configure.in
++++ b/src/configure.in
+@@ -26,6 +26,7 @@
+ #include<net/ethernet.h>
+ #include<linux/if.h>
+ #include<linux/in.h>
++#include <linux/in6.h>
+ ])
+
+ dnl Checks for typedefs, structures, and compiler characteristics.
diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.12-ifconfig-path.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.12-ifconfig-path.patch
new file mode 100644
index 000000000000..2a56d40fabcf
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.12-ifconfig-path.patch
@@ -0,0 +1,65 @@
+diff --git a/gui/tkpppoe.in b/gui/tkpppoe.in
+index 148c8c8..1d952d4 100755
+--- a/gui/tkpppoe.in
++++ b/gui/tkpppoe.in
+@@ -1573,7 +1573,7 @@ proc SetButtonStates {} {
+ #***********************************************************************
+ proc GetEthernetInterfaces {} {
+ set ifs {}
+- set fp [open "|/sbin/ifconfig" "r"]
++ set fp [open "|/bin/ifconfig" "r"]
+ while {[gets $fp line] >= 0} {
+ if {[regexp {^eth[0-9]+} $line eth]} {
+ lappend ifs $eth
+diff --git a/scripts/pppoe-connect.in b/scripts/pppoe-connect.in
+index 2124422..e7eab32 100755
+--- a/scripts/pppoe-connect.in
++++ b/scripts/pppoe-connect.in
+@@ -28,7 +28,7 @@ exec_prefix=@exec_prefix@
+ localstatedir=/var
+
+ # Paths to programs
+-IFCONFIG=/sbin/ifconfig
++IFCONFIG=/bin/ifconfig
+ PPPD=@PPPD@
+ SETSID=@SETSID@
+ PPPOE=@sbindir@/pppoe
+diff --git a/scripts/pppoe-setup.in b/scripts/pppoe-setup.in
+index b378479..4122084 100755
+--- a/scripts/pppoe-setup.in
++++ b/scripts/pppoe-setup.in
+@@ -17,7 +17,7 @@ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+
+ # Paths to programs
+-IFCONFIG=/sbin/ifconfig
++IFCONFIG=/bin/ifconfig
+ PPPD=@PPPD@
+ PPPOE=@sbindir@/pppoe
+ ECHO=@ECHO@
+diff --git a/scripts/pppoe-start.in b/scripts/pppoe-start.in
+index 7e15804..b9dd7f0 100755
+--- a/scripts/pppoe-start.in
++++ b/scripts/pppoe-start.in
+@@ -29,7 +29,7 @@ exec_prefix=@exec_prefix@
+ # Paths to programs
+ CONNECT=@sbindir@/pppoe-connect
+ ECHO=@ECHO@
+-IFCONFIG=/sbin/ifconfig
++IFCONFIG=/bin/ifconfig
+
+ # Set to "C" locale so we can parse messages from commands
+ LANG=C
+diff --git a/scripts/pppoe-status b/scripts/pppoe-status
+index 9fe89cd..96d6ebd 100755
+--- a/scripts/pppoe-status
++++ b/scripts/pppoe-status
+@@ -73,7 +73,7 @@ for i in /etc/ppp/ppp*.pid /var/run/ppp*.pid ; do
+ exit 1
+ fi
+ echo "pppoe-status: Link is up and running on interface $IF"
+- /sbin/ifconfig $IF
++ /bin/ifconfig $IF
+ exit 0
+ fi
+ fi
diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.12-linux-headers.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.12-linux-headers.patch
new file mode 100644
index 000000000000..961eba396138
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.12-linux-headers.patch
@@ -0,0 +1,28 @@
+the linux headers have started adding shims to not define types or structs
+when C lib headers are active, but in order to work, the C lib headers have
+to be included before the linux headers.
+
+move the netinet/in.h include up above the linux/ includes.
+
+Mike Frysinger <vapier@gentoo.org>
+
+--- a/src/pppoe.h
++++ b/src/pppoe.h
+@@ -47,6 +47,8 @@
+ #include <sys/socket.h>
+ #endif
+
++#include <netinet/in.h>
++
+ /* Ugly header files on some Linux boxes... */
+ #if defined(HAVE_LINUX_IF_H)
+ #include <linux/if.h>
+@@ -84,8 +86,6 @@ typedef unsigned long UINT32_t;
+ #include <linux/if_ether.h>
+ #endif
+
+-#include <netinet/in.h>
+-
+ #ifdef HAVE_NETINET_IF_ETHER_H
+ #include <sys/types.h>
+
diff --git a/net-dialup/rp-pppoe/metadata.xml b/net-dialup/rp-pppoe/metadata.xml
new file mode 100644
index 000000000000..27333730d097
--- /dev/null
+++ b/net-dialup/rp-pppoe/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ </pkgmetadata>
diff --git a/net-dialup/rp-pppoe/rp-pppoe-3.11-r3.ebuild b/net-dialup/rp-pppoe/rp-pppoe-3.11-r3.ebuild
new file mode 100644
index 000000000000..6292f5e54db1
--- /dev/null
+++ b/net-dialup/rp-pppoe/rp-pppoe-3.11-r3.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic autotools readme.gentoo
+
+PPP_P="ppp-2.4.7"
+
+DESCRIPTION="A user-mode PPPoE client and server suite for Linux"
+HOMEPAGE="https://www.roaringpenguin.com/products/pppoe"
+SRC_URI="http://www.roaringpenguin.com/files/download/${P}.tar.gz
+ ftp://ftp.samba.org/pub/ppp/${PPP_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~sh sparc x86"
+IUSE="tk"
+
+RDEPEND="
+ net-dialup/ppp:=
+ tk? ( dev-lang/tk )
+"
+# see bug #230491
+DEPEND="|| ( <sys-kernel/linux-headers-2.6.24 >=sys-kernel/linux-headers-2.6.25 )
+ ${RDEPEND}"
+
+DOC_CONTENTS="Use pppoe-setup to configure your dialup connection"
+
+pkg_setup() {
+ # This is needed in multiple phases
+ PPPD_VER=$(best_version net-dialup/ppp)
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+ PPPD_VER=${PPPD_VER%%-*} #reduce it to ${PV}
+}
+
+src_prepare() {
+ # Patch to enable integration of pppoe-start and pppoe-stop with
+ # baselayout-1.11.x so that the pidfile can be found reliably per interface
+ epatch "${FILESDIR}/${PN}-3.10-gentoo-netscripts.patch"
+
+ epatch "${FILESDIR}/${PN}-3.10-username-charset.patch" # bug 82410
+ epatch "${FILESDIR}/${PN}-3.10-plugin-options.patch"
+ epatch "${FILESDIR}/${PN}-3.10-autotools.patch"
+ epatch "${FILESDIR}/${PN}-3.10-session-offset.patch" # bug 204476
+ has_version '<sys-kernel/linux-headers-2.6.35' && \
+ epatch "${FILESDIR}/${PN}-3.10-linux-headers.patch" #334197
+ epatch "${FILESDIR}/${PN}-3.10-posix-source-sigaction.patch"
+ epatch "${FILESDIR}/${PN}-3.11-gentoo.patch"
+ epatch "${FILESDIR}/${PN}-3.11-kmode.patch" #364941
+
+ cd "${S}"/src || die
+ eautoreconf
+}
+
+src_configure() {
+ addpredict /dev/ppp
+
+ cd "${S}/src" || die
+ econf --enable-plugin=../../ppp-${PPPD_VER}
+}
+
+src_compile() {
+ cd "${S}/src" || die
+ emake
+
+ if use tk; then
+ emake -C "${S}/gui" || die "gui make failed"
+ fi
+}
+
+src_install () {
+ cd "${S}/src" || die
+ emake DESTDIR="${D}" docdir=/usr/share/doc/${PF} install
+
+ #Don't use compiled rp-pppoe plugin - see pkg_preinst below
+ local pppoe_plugin="${D}/etc/ppp/plugins/rp-pppoe.so"
+ if [ -f "${pppoe_plugin}" ] ; then
+ rm "${pppoe_plugin}" || die
+ fi
+
+ if use tk; then
+ emake -C "${S}/gui" \
+ DESTDIR="${D}" \
+ datadir=/usr/share/doc/${PF}/ \
+ install
+ dosym /usr/share/doc/${PF}/tkpppoe /usr/share/tkpppoe
+ fi
+
+ readme.gentoo_create_doc
+}
+
+pkg_preinst() {
+ # Use the rp-pppoe plugin that comes with net-dialup/pppd
+ if [ -n "${PPPD_VER}" ] && [ -f "${ROOT}/usr/lib/pppd/${PPPD_VER}/rp-pppoe.so" ] ; then
+ dosym /usr/lib/pppd/${PPPD_VER}/rp-pppoe.so /etc/ppp/plugins/rp-pppoe.so
+ fi
+}
diff --git a/net-dialup/rp-pppoe/rp-pppoe-3.12-r1.ebuild b/net-dialup/rp-pppoe/rp-pppoe-3.12-r1.ebuild
new file mode 100644
index 000000000000..37f5f632fafc
--- /dev/null
+++ b/net-dialup/rp-pppoe/rp-pppoe-3.12-r1.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils flag-o-matic autotools readme.gentoo-r1
+
+PPP_P="ppp-2.4.7"
+
+DESCRIPTION="A user-mode PPPoE client and server suite for Linux"
+HOMEPAGE="https://www.roaringpenguin.com/products/pppoe"
+SRC_URI="http://www.roaringpenguin.com/files/download/${P}.tar.gz
+ ftp://ftp.samba.org/pub/ppp/${PPP_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~sh sparc x86"
+IUSE="tk"
+
+RDEPEND="
+ net-dialup/ppp:=
+ tk? ( dev-lang/tk:= )
+"
+# see bug #230491
+DEPEND="|| ( <sys-kernel/linux-headers-2.6.24 >=sys-kernel/linux-headers-2.6.25 )
+ ${RDEPEND}"
+
+DOC_CONTENTS="Use pppoe-setup to configure your dialup connection"
+
+pkg_setup() {
+ # This is needed in multiple phases
+ PPPD_VER=$(best_version net-dialup/ppp)
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+ PPPD_VER=${PPPD_VER%%-*} #reduce it to ${PV}
+}
+
+PATCHES=(
+ # Patch to enable integration of pppoe-start and pppoe-stop with
+ # baselayout-1.11.x so that the pidfile can be found reliably per interface
+ "${FILESDIR}/${PN}-3.10-gentoo-netscripts.patch"
+
+ "${FILESDIR}/${PN}-3.10-username-charset.patch" # bug 82410
+ "${FILESDIR}/${PN}-3.10-plugin-options.patch"
+ "${FILESDIR}/${PN}-3.10-autotools.patch"
+ "${FILESDIR}/${PN}-3.10-posix-source-sigaction.patch"
+ "${FILESDIR}/${PN}-3.11-gentoo.patch"
+ "${FILESDIR}/${PN}-3.11-kmode.patch" #364941
+ "${FILESDIR}/${PN}-3.12-linux-headers.patch"
+ "${FILESDIR}/${PN}-3.12-ifconfig-path.patch" #602344
+)
+
+src_prepare() {
+ if has_version '<sys-kernel/linux-headers-2.6.35' ; then
+ PATCHES+=(
+ "${FILESDIR}/${PN}-3.10-linux-headers.patch" #334197
+ )
+ fi
+
+ default
+
+ cd "${S}"/src || die
+ eautoreconf
+}
+
+src_configure() {
+ addpredict /dev/ppp
+
+ cd "${S}/src" || die
+ econf --enable-plugin=../../ppp-${PPPD_VER}
+}
+
+src_compile() {
+ cd "${S}/src" || die
+ emake
+
+ if use tk; then
+ emake -C "${S}/gui" || die "gui make failed"
+ fi
+}
+
+src_install () {
+ cd "${S}/src" || die
+ emake DESTDIR="${D}" docdir=/usr/share/doc/${PF} install
+
+ #Don't use compiled rp-pppoe plugin - see pkg_preinst below
+ local pppoe_plugin="${D}/etc/ppp/plugins/rp-pppoe.so"
+ if [ -f "${pppoe_plugin}" ] ; then
+ rm "${pppoe_plugin}" || die
+ fi
+
+ if use tk; then
+ emake -C "${S}/gui" \
+ DESTDIR="${D}" \
+ datadir=/usr/share/doc/${PF}/ \
+ install
+ dosym /usr/share/doc/${PF}/tkpppoe /usr/share/tkpppoe
+ fi
+
+ readme.gentoo_create_doc
+}
+
+pkg_preinst() {
+ # Use the rp-pppoe plugin that comes with net-dialup/pppd
+ if [ -n "${PPPD_VER}" ] && [ -f "${ROOT}/usr/lib/pppd/${PPPD_VER}/rp-pppoe.so" ] ; then
+ dosym /usr/lib/pppd/${PPPD_VER}/rp-pppoe.so /etc/ppp/plugins/rp-pppoe.so
+ fi
+}
diff --git a/net-dialup/sendpage/Manifest b/net-dialup/sendpage/Manifest
new file mode 100644
index 000000000000..2663c1958266
--- /dev/null
+++ b/net-dialup/sendpage/Manifest
@@ -0,0 +1,7 @@
+AUX 1.1.0-makefile.patch 369 SHA256 1c211aefc44d8534e1077b256ed01f20ba506cafca6eb7668c247f1deb5f7131 SHA512 35d177ce5a3bc0f559204fdbe320c1fe338d057faa9c100785e11b406cfdb06049784fdd434b4760f8dc852460192fdda4ce1cbad4ff35ad553cd748dd693f10 WHIRLPOOL 84e668170bf53512c46d6ee64a89954a5d2000c8a466310df49955897966e0610bdb9741e612f54da9d73dfd38054373e89f7cc63b803468fffc61a16fff0c34
+AUX sendpage.initd 407 SHA256 16d186b7a40a7366a6066c5066da5d32c51aa0cad7a275a62a867bb12a5035ec SHA512 35fcf9afdc289bbd7034733e3a49a4d6891745bbecce8fabf8642ae160a221fbc0e6d795403d8f01399c250c41973bab86e22a9aea307d7e42ffa9ce18f53e9b WHIRLPOOL 6106bd150ae313db4fe8f41d849fca5656d4a298569190bb8685fe42858d11b376c7ea9a7ab43165ea388b88053be2e8a65277c18a9453603d0bbffaad98a82f
+DIST sendpage-1.001.tar.gz 127130 SHA256 2f2d8253b3f94fd3915ae7568a87e1263c416066f2cce7923b6dd3d2d5dc2b0c SHA512 694f7eb8afd3a73d1322d51140b5eb473a3d697613a88d1b90fb0368e9eb25ec4cee8ed018841076fcd8370420d6c9f437f84af873b31cccb36c16f91a01cb3d WHIRLPOOL 8a3426a251eadad5d28c2ca2538d26af8476ea3b5dd497681a5e469f798a8d901aa9d0d2a422766fed485c366b16d46fed431cc60423e4b67c60bca130a1f0a4
+EBUILD sendpage-1.1.0-r3.ebuild 1086 SHA256 7b832fd70695114db59a115d47c26082160f8aebaf89cffcd6207fdb4a3e7f51 SHA512 dfeca4ea70d5b717e48f0726882f95b0ff18c51aa28c109a1dbe2e399a94899f4306bfaf69a0325203d1dabf67796e9ceb675b8ca456576e0a518da9f66555be WHIRLPOOL ad24a3c0f74d5ec58738cec7aa89ecdd5f7a15b6a2fe00c244badcfc7f3bac4503668f937b721b77ff1608cf5f768e94d9a6823130da09ac6d13ea90d7357996
+MISC ChangeLog 2942 SHA256 4da4f57280ef23557dc3e5a4ae3a6b2161713577cf363313f72be449513181b8 SHA512 e1416cba35b6d2148ba40831c719865c8a3ec9bd23f77961f647ad94ad8bd58066f5c8ea90a18b2949fc839e9d398ff35658717997cf804b27b7c247e4cd8356 WHIRLPOOL 4eb68f534a399c77ef072281819066c4e228b87134230d84a5624f67a2536d7c6786673259d3eb774eaf84b419aa4bf36468cc143b5847e142e666d5f9293f59
+MISC ChangeLog-2015 2837 SHA256 6516c7dfc6602e468cdc7fa2240a4a2eb213954e59ca145149437f59ed06e40e SHA512 d193b3418ca5ce3813de171b01333eec6a563813ab2479c41193752721f3963a1a08ab1041d5f431b250005b935ceb18e1a881548c6fcbc09094e609d1bab5fc WHIRLPOOL be7c82608bd4ab657a207a0085c427abfd587ac54dc0aabdda757faf1b9d761494ff91fd5f83d8347b2ea35258c47864376a8c237c9b8823861807b6d6e44fe5
+MISC metadata.xml 643 SHA256 1bbda82cdbd14c30ef9b269cbe0097242fe496331a23ec56cbd914a3321aea52 SHA512 76f748530bdcf74ef12f246ef954f2d334ae8ebab3923752e9fb02c5cb6b5475442c15275b91909555d3f9515a98d1f134b8c16ab3d9e73ac7d61b1cbcb71e83 WHIRLPOOL 772026ed52cfce3c0659898ad3f1571902b37f12cd32345a4f32d15f08b9c18e6ce63911d7d4a203feb922f56432c822e202d999f5ee3645c58dcf72454cced6
diff --git a/net-dialup/sendpage/files/1.1.0-makefile.patch b/net-dialup/sendpage/files/1.1.0-makefile.patch
new file mode 100644
index 000000000000..5b9a647db113
--- /dev/null
+++ b/net-dialup/sendpage/files/1.1.0-makefile.patch
@@ -0,0 +1,11 @@
+--- sendpage-1.001/Makefile.PL.orig 2006-06-14 12:20:10.000000000 -0400
++++ sendpage-1.001/Makefile.PL 2006-06-14 12:20:38.000000000 -0400
+@@ -71,6 +71,8 @@ if (defined($Config{'sitelib_stem'}) &&
+ $opts{'INSTALLSITELIB'} .= $Config{'sitelib_stem'};
+ }
+
++$opts{'DESTDIR'} = $args{'DESTDIR'};
++
+ WriteMakefile(%opts);
+
+ # /* vi:set ai ts=4 sw=4 expandtab: */
diff --git a/net-dialup/sendpage/files/sendpage.initd b/net-dialup/sendpage/files/sendpage.initd
new file mode 100644
index 000000000000..d88854577796
--- /dev/null
+++ b/net-dialup/sendpage/files/sendpage.initd
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+}
+
+start() {
+ ebegin "Starting sendpage"
+ start-stop-daemon --start --exec /usr/bin/sendpage -- -bd
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping sendpage"
+ start-stop-daemon --stop -n sendpage
+ eend ${?}
+}
+
diff --git a/net-dialup/sendpage/metadata.xml b/net-dialup/sendpage/metadata.xml
new file mode 100644
index 000000000000..7a7e31313794
--- /dev/null
+++ b/net-dialup/sendpage/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-needed -->
+ <longdescription>To send alphanumeric pages to a pager, if an email gateway is unavailable or undesirable,
+software is needed to control a modem which will dial a "Paging Central", and deliver the pages using
+an ASCII delivery system known as "TAP".
+Sendpage implements all aspects of this type of software, including an SNPP client, an SNPP server,
+a queuing engine, a modem control engine, a TAP communication system, and an email notification system.</longdescription>
+</pkgmetadata>
diff --git a/net-dialup/sendpage/sendpage-1.1.0-r3.ebuild b/net-dialup/sendpage/sendpage-1.1.0-r3.ebuild
new file mode 100644
index 000000000000..a06e61474b36
--- /dev/null
+++ b/net-dialup/sendpage/sendpage-1.1.0-r3.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit perl-module eutils user
+
+MY_P=${PN}-1.001
+DESCRIPTION="Dialup alphapaging software"
+HOMEPAGE="http://www.sendpage.org/"
+SRC_URI="http://www.sendpage.org/download/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+# This package warrants IUSE doc
+IUSE=""
+
+DEPEND="!net-misc/hylafax
+ >=dev-perl/Device-SerialPort-0.13
+ >=dev-perl/MailTools-1.44
+ >=virtual/perl-libnet-1.11
+ >=dev-perl/Net-SNPP-1.13
+ dev-perl/DBI"
+RDEPEND="${DEPEND}"
+
+mydoc="FEATURES email2page.conf sendpage.cf snpp.conf"
+
+pkg_setup() {
+ enewgroup sms
+ enewuser sendpage -1 -1 /var/spool/sendpage sms
+}
+
+PATCHES=( "${FILESDIR}"/${PV}-makefile.patch )
+
+src_install() {
+ perl-module_src_install
+ insinto /etc
+ doins sendpage.cf
+ newinitd "${FILESDIR}"/sendpage.initd sendpage
+ diropts -o sendpage -g sms -m0770
+ keepdir /var/spool/sendpage
+ # Separate docs/ content from ${mydoc[@]}
+ docompress -x /usr/share/doc/${PF}/text/
+ docinto text/
+ dodoc docs/*
+}
diff --git a/net-dialup/sercd/Manifest b/net-dialup/sercd/Manifest
new file mode 100644
index 000000000000..0f6d72c6913d
--- /dev/null
+++ b/net-dialup/sercd/Manifest
@@ -0,0 +1,8 @@
+AUX sercd.confd 499 SHA256 3324eafa2310d2ce1842970c85d7af114d474874388b5cb2f3ea96e8f7b446b3 SHA512 80c800a719face3ac34d18f2a9194d341c877fa1fc3be2da1ddbcc965858c235176edee7f28cb6025e7d4c9f5373b315bf1bac6bf19aaf668a40a1da6e56e8a2 WHIRLPOOL 5e5b2e798371b8958dce3bc7aa518b7f17a6d3b0cfb4c0458fb25254214763d98a2b4c75774cca94ec72fdf679e0659c4bb87dc6376e994e8955ab3039a69990
+AUX sercd.initd 623 SHA256 28732cb8844879b7b287d46e75955eabb3b27823db6a9bacb950c4e5a4ea483d SHA512 639712dcdd6d44f8b34f24b11b78a85379c5733df5dc7958f4e9cc854d9397395298671be37d7ffe8a3ef9589225e192f02c2bcfb6d4f329ad31070f8f03e861 WHIRLPOOL 7e8610b345d263d9354a8f30360f4bdcaf8553cc9a9fd36f4fba60a4ac50decc32ae48df7ca636be96d6f0a5e0f1af46bfc649dccf27eef202fd78aa82673d0b
+AUX sercd.xinetd 312 SHA256 3fe3b36fae07db2c0e86d294339cd09e5c688fe8c2b1645241ae7675149fdb12 SHA512 c4abd1c8ac3ceeb1ca86f20ced68b4709da53fbd1b80031bcf6c58df8e64c5dccc0ddb62fc72da3e439219bd9d66c27d2e4383195d3ee6c683a69db74a22cbd2 WHIRLPOOL 5185990a3baa7e9760f9419fbc56ee6931098f8e2d54e4ea19c09ce6d7f6c99f109847fd4013e542cba4ca346913e5e7ace95594bbc110939b615da721c67031
+DIST sercd-3.0.0.tar.gz 116284 SHA256 5aa9c93ae436eac206a4d93867e12838dc16ad30192cea451f985421688e4207 SHA512 5b9539466a26ceb7e84738347de2dcc0504462a551599c9d8b6a9b3b4bf8b4759ea9ad378c3073ef5d861effb7584e4bb4871bcd981f80ff2c8542f23952b61f WHIRLPOOL c07add0cf89a313a8c81cc21b7be1b06cdd1f5a67e217973911296a6c7f61693ad6904bb353627968d88a55874117b460772d0ccc8e0fb23aca6cf428cde33da
+EBUILD sercd-3.0.0-r2.ebuild 656 SHA256 cbb5ca9a6b64ea255cd0737ebc9b794c60552f557fbd5d66859a153282ecf8b3 SHA512 e1d039c172bb468b930e4a6f096805be5a584cffde038f7a527405c7f8297bb078bf01adfe9498fd6407635b1c5a7f148df511a8fcf6cda4dbec59e6f8ba0dc6 WHIRLPOOL 43eca22257b2d2fe38240872fbb65f7272a8e8af86777387476266efdeee54884db59b29a6c3e60044ce075f43342e004e0dc7824be1a7942242f20385bf1a24
+MISC ChangeLog 3038 SHA256 5294c62119be6927115231f8633a14c83bae4de646b844caccb883648971f8ca SHA512 6ae3bb0c5a492b0213ce7fc87fb4f16f1eac65fc9d0298b5dfa3f807cc4f1b3508c9735e942ac5ed7b5a13db35272d5c74208416eeea0f5f2c3ff075ffb1feb0 WHIRLPOOL 5216fae1fd7069a00cbbca4e820186356fdb31e653f40dd98d5bcfad71744bd4b3a0a8c63acbd69df72e7e49b3f15b1b5d099aa531cf0bac48f2460e4ecbaa34
+MISC ChangeLog-2015 834 SHA256 3fd5b4aa4a7ead1a7561f76e77b497bde8c16091f0c85809aeed4ecfd72f5e7a SHA512 ca67178ad8bd2925132ecd46bee7274ca80750d92722aed118e21e012b28a6996c0eb5e891c8711e103ccae1fb1171007dba219ff1c497078f7ab12e3a5b9b88 WHIRLPOOL 8d933ba8e84a3b663c19d6f7960a5e3c921dab3863a0a607ed344cf315cd2b716cc1699c319e923964868c7a24cf614d08a601071ec845a9495084e7185a40dd
+MISC metadata.xml 382 SHA256 131f1b647119f415c6e372aad555d0f2ed9969fd027558d54900236c7deb0060 SHA512 a1471081712fa44bad7dac6c6241a9aa51f40cd366b71b51948f0dbd2a32a7288b8d4ac46b6cecdca9fef69c552f0305a39f6425edbe4c3f1b4ef5b2da566d21 WHIRLPOOL fa2a473686e9e5cf26c5588a6784caf6b19edfd9ccbafb0a53e1f2a482a2957955f9438de89bbb02cc026bc6958d26ca874105bf151bbf19c6c0bab6aac2d016
diff --git a/net-dialup/sercd/files/sercd.confd b/net-dialup/sercd/files/sercd.confd
new file mode 100644
index 000000000000..4c6e078489c4
--- /dev/null
+++ b/net-dialup/sercd/files/sercd.confd
@@ -0,0 +1,23 @@
+# sercd service configuration file
+
+# Run daemon as this user:group
+SERCD_USER=uucp:uucp
+
+# Serial port
+SERCD_DEVFILE=/dev/modem
+
+# Lock file
+SERCD_LOCKFILE=/run/lock/LCK..modem
+
+# Address on which this daemon listens on
+SERCD_ADDR=0.0.0.0
+SERCD_PORT=7000
+
+# Log level; available values are from 0 (LOG_EMERG) to 7 (LOG_DEBUG).
+SERCD_LOGLEVEL=5
+
+# Uncomment this if you want compatibility with Cisco IOS
+# SERCD_OPTS="-i"
+
+# Poll interval is in milliseconds. 0 means no polling
+SERCD_POLLINTERV=100
diff --git a/net-dialup/sercd/files/sercd.initd b/net-dialup/sercd/files/sercd.initd
new file mode 100644
index 000000000000..3022a01f1ad6
--- /dev/null
+++ b/net-dialup/sercd/files/sercd.initd
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+PIDFILE=/run/${SVCNAME}.pid
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet --background --make-pidfile \
+ --exec /usr/sbin/sercd --chuid ${SERCD_USER} --pidfile "${PIDFILE}" \
+ -- ${SERCD_OPTS} -p ${SERCD_PORT} -l ${SERCD_ADDR} \
+ ${SERCD_LOGLEVEL} "${SERCD_DEVFILE}" "${SERCD_LOCKFILE}" ${SERCD_POLLINTERV}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --name sercd --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/net-dialup/sercd/files/sercd.xinetd b/net-dialup/sercd/files/sercd.xinetd
new file mode 100644
index 000000000000..8b95a3d08223
--- /dev/null
+++ b/net-dialup/sercd/files/sercd.xinetd
@@ -0,0 +1,15 @@
+# default: on
+# description: RFC 2217 compliant Telnet serial port redirector
+service sredir
+{
+ type = UNLISTED
+ flags = REUSE
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ user = uucp
+ server = /usr/sbin/sercd
+ server_args = 5 /dev/modem /run/lock/LCK..modem 100
+ port = 7000
+ disable = yes
+}
diff --git a/net-dialup/sercd/metadata.xml b/net-dialup/sercd/metadata.xml
new file mode 100644
index 000000000000..f68c8e80442f
--- /dev/null
+++ b/net-dialup/sercd/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-needed -->
+ <longdescription>sercd is an RFC 2217-compliant serial port redirector.
+It lets you share a serial port through network.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">sercd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/sercd/sercd-3.0.0-r2.ebuild b/net-dialup/sercd/sercd-3.0.0-r2.ebuild
new file mode 100644
index 000000000000..7bdbc3d3ffda
--- /dev/null
+++ b/net-dialup/sercd/sercd-3.0.0-r2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+DESCRIPTION="RFC2217-compliant serial port redirector"
+HOMEPAGE="https://sourceforge.net/projects/sercd"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="xinetd"
+
+RDEPEND="xinetd? ( virtual/inetd )"
+
+DOCS=( AUTHORS README )
+
+src_prepare() {
+ eapply_user
+}
+
+src_install () {
+ default
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}/${PN}.xinetd" "${PN}"
+ fi
+}
diff --git a/net-dialup/speedtouch-usb/Manifest b/net-dialup/speedtouch-usb/Manifest
new file mode 100644
index 000000000000..2dbadc050de2
--- /dev/null
+++ b/net-dialup/speedtouch-usb/Manifest
@@ -0,0 +1,6 @@
+AUX README 9246 SHA256 b7b1c920772c76410234b84185beffe02c9d05d8457a04d2bf9dc459bb8e6695 SHA512 5b08cc8323de5bf0c0e528266e18a85c28e13bfaa462b3abeda9a2abaa0063b9872153bc97b2be88e489c949ddabd65f7d19a39600f9c0d2375e40d511c0ee2a WHIRLPOOL 3112962d4b53c4f38fb5d487092eeef6c3c44ae73db40406ac863e67cadf93f8886cdf65c9841534bb7e968fb51dcd98606b20bd723918ec3338f42c5452e18d
+DIST SpeedTouch330_firmware_3012.zip 769125 SHA256 1f4ef294f9ac52fc01781f0bba15ab1e686f692dac11ecdcbfedfbf580b19afc SHA512 d4ec1b609eb58b15b0c569fc2c96e453517f6a8141c706f342549093c2c7bbdc09bbc3f05ecf75f3018e54f03a974b84e625fb9401f02d4f4143b721eee0b3c3 WHIRLPOOL 21771a9412bd0346405ed161cbe201cfb7c58c522caac7eeae0f9ad79f4fd5ef1913a09af6b83c464c177a9445a1ffcb621a913bc95ba1b2b26d80ee1cd2889f
+EBUILD speedtouch-usb-3.0.1.2-r3.ebuild 3092 SHA256 c93a8019fa23ca60b903590cd1daecc94da4242c1c7f6bc399942d10b8f359bf SHA512 d4a316bca29c6d9c6ad3c3f109eb19c1cd951a001245b229cfd88ab586b559d8e27999656ee2663056cb6602a598f6775b52cccd93d9da7f88021f3f011283a6 WHIRLPOOL 9e3bbdf918cd3ffe878e967fea32d10165a98d13064e25eee2094dcc0be2b7eb5b7ee16afc00bb57a99856df3d809b31ea1748634369c01fd98b2b09c8790644
+MISC ChangeLog 2504 SHA256 c7be5ad73b6d2bdcb5374a28af6c51c48098704b425a19174d8afefb4131a07e SHA512 66a49c4b9f6b01ce679f277084cff31b28cbdd251cb62597b2f82940537ba3020fed32e312ae9251b16d6b7c232fa1094de82779890ef06e9d440f596d427826 WHIRLPOOL aceb5fa3377cd106ced23a15ab44102fa082cbc6bc161892d92e4b68bba751e3a6b876227c0c1aee1f341b0ef9539392b896f0a831e55720e5e5e14fb0bad21a
+MISC ChangeLog-2015 2375 SHA256 47a6a38464f50853c8a8f75968fbb6ce222558fccd85edbda1d9f4fb2afeaf2e SHA512 3d934a26f985cfbae00d440697cb753dbe7973998a4c916d7a5be8c27160dddc1828ca1d9deb1cb4605e293b068e474888495bbaede685e360b898718440d253 WHIRLPOOL db4a16133d0b16946fcf32ed4f5d043e6125ff043fde7747241aa61696503f2065ea7c4a798e4bcde6648e1e24c1e76efd78c5d323d6c47405ac76a89711e1c6
+MISC metadata.xml 304 SHA256 d7cc8d2ab2456a68c99add381216f79159d3315ed24d40f409ffeb4d5b6e2e29 SHA512 9618d6334a65643fa426e3074c3ee566a1db0e380dcbf00a432d54c0877efb639ce35b09477d0de3b313ec56ae7d84382382e5d260b2df240dd7eaa32b1e65f7 WHIRLPOOL 8df1fa3b88e7ae30f7dbfa63d0a4b9bd9ef0392656ca188c28c6555f13cd2a17087de63a98619f9ba2228ee1977c61cb29cab7011521f0e3b2feb12b69510b24
diff --git a/net-dialup/speedtouch-usb/files/README b/net-dialup/speedtouch-usb/files/README
new file mode 100644
index 000000000000..8df4e231ed3f
--- /dev/null
+++ b/net-dialup/speedtouch-usb/files/README
@@ -0,0 +1,253 @@
+Introduction
+============
+
+This ebuild enables kernel-space support for Alcatel/Thomson SpeedTouch
+USB modems, which first appeared in kernel 2.6.10.
+
+Configuration
+=============
+
+Most SpeedTouch USB modems are connected via the ATM protocol, rather
+than Ethernet. For ATM, run the following:
+ euse -E atm && emerge net-dialup/ppp net-dialup/speedtouch-usb
+
+It is necessary to choose an interface number for the connection. This
+is arbitrary - the only requirement is that the connection number is
+not already in use. The first available number is 0, and it is usual to
+choose the lowest unused number. For the purposes of this document, 0
+will be chosen.
+
+Add the following lines from the appropriate section below to
+/etc/conf.d/net, then customize them as per the inline comments.
+
+
+a) PPPoATM configuration:
+
+config_ppp0='ppp' # Runs /lib/rcscripts/net/pppd.sh
+# The 2 numbers represent the VPI & VCI of your ISP, and they are separated
+# by a dot. Choose here, or ask your ISP:
+# http://www.linux-usb.org/SpeedTouch/faq/index.html#q12
+link_ppp0='0.38'
+plugins_ppp0='pppoa'
+# 'man pppd' shows other options. Compression is disabled because it is
+# rarely taken advantage of, and may interfere with the connection.
+# Add option 'usepeerdns' to populate /etc/resolv.conf
+pppd_ppp0='updetach noauth debug defaultroute noaccomp nobsdcomp noccp
+ nodeflate nopcomp novj novjccomp child-timeout 60'
+username_ppp0='username@isp.com' # ADSL login, assigned by your ISP
+password_ppp0='password' # ADSL password, assigned by your ISP
+
+# If the kernel modules are not built-in, then they must be loaded
+# before starting the PPP daemon:
+function preup() {
+ if [[ "$1" = "ppp0" ]] ; then
+ modprobe -q speedtch
+ return 0
+ fi
+}
+
+
+b) PPPoE configuration:
+
+# Configure first the RFC2684 bridge interface
+config_nas0='null'
+# Use "-e 0" for LLC mux or "-e 1" for VC mux.
+# The 2 numbers after "-a" represent the VPI & VCI of your ISP, and
+# they are separated by a dot. Ask your ISP about those numbers.
+br2684ctl_nas0='-e 0 -a 0.38'
+
+config_ppp0='ppp' # Runs /lib/rcscripts/net/pppd.sh
+link_ppp0='nas0' # The name of the RFC2684 bridge interface
+plugins_ppp0='pppoe'
+# 'man pppd' shows other options. Compression is disabled because it is
+# rarely taken advantage of, and may interfere with the connection.
+# Add option 'usepeerdns' to populate /etc/resolv.conf
+pppd_ppp0='updetach noauth debug defaultroute noaccomp nobsdcomp noccp
+ nodeflate nopcomp novj novjccomp child-timeout 60'
+username_ppp0='username@isp.com' # ADSL login, assigned by your ISP
+password_ppp0='password' # ADSL password, assigned by your ISP
+
+depend_ppp0() {
+ need net.nas0
+}
+
+# If the kernel modules are not built-in, then they must be loaded
+# before starting the RFC2684 bridge:
+function preup() {
+ if [[ "$1" = "nas0" ]] ; then
+ modprobe -q speedtch
+ return 0
+ fi
+}
+
+
+
+Configuration continued
+=======================
+
+Create a symlink for the new network interface, for it to be enabled by
+baselayout:
+ cd /etc/init.d && ln -sfn net.lo net.ppp0
+If you use PPPoE, you should also create the symlink for the RFC2684
+bridge interface:
+ cd /etc/init.d && ln -sfn net.lo net.nas0
+
+The "debug" option adds some extra commentary from pppd regarding the
+connection to /var/log/messages, e.g.:
+"sent [LCP ConfReq id=0x1 <magic 0x7bea6ef1>]". It is wise to keep the
+option on permanently, due to its usefulness when debugging.
+
+Set RC_NET_STRICT_CHECKING="yes" in /etc/conf.d/rc, to prevent Internet
+services in /etc/init.d/ from starting before the Internet connection
+is established. Other options are to start/stop programs in
+/etc/ppp/ip-{up,down}.local, and to customize initscript dependencies
+as described in:
+ http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=4
+
+
+Starting the Connection
+=======================
+
+To start manually, with the modem connected:
+ /etc/init.d/net.ppp0 start
+
+To start automatically when the PC boots:
+ rc-update add net.ppp0 default
+
+
+Kernel Configuration
+====================
+
+The ebuild, during an emerge, checks that the required kernel modules
+are present.
+
+Note that in the list below, "[*]" means that the option is compiled
+into the kernel, whereas "[M]" means that the option can either be
+compiled into the kernel, or as a module. Compiling them into the
+kernel is recommended, to guarantee that the modules are already loaded
+when they are needed, and it will improve the bootup time by a couple
+of seconds.
+
+In "make menuconfig", you can press "/" and search on e.g. "speedtouch"
+to see exactly where an option is - the location of an option and its
+dependencies can change between kernel versions.
+
+Check that the following kernel options are configured as shown (this
+list includes the prerequisites, e.g. USB_SPEEDTOUCH depends on USB):
+
+ Code maturity level options --->
+ [*] Prompt for development and/or incomplete code/drivers
+ - CONFIG_EXPERIMENTAL
+
+ General setup --->
+ [*] Kernel Userspace Events - CONFIG_KOBJECT_UEVENT
+ (for kernels < 2.6.16 *ONLY*)
+
+ Device Drivers --->
+ Generic Driver Options --->
+ [ ] Select only drivers that don't need compile-time external
+ firmware (*unselected*) - CONFIG_STANDALONE
+ [*] Hotplug firmware loading support - CONFIG_FW_LOADER
+
+ Networking --->
+ [*] Networking support - CONFIG_NET
+ Networking options --->
+ [*] Packet socket - CONFIG_PACKET
+ [M] Asynchronous Transfer Mode (ATM) - CONFIG_ATM
+ [M] RFC1483/2684 Bridged protocols - CONFIG_ATM_BR2684 (only needed for PPPoE)
+
+ Device Drivers --->
+ Network device support --->
+ [*] Network device support - CONFIG_NETDEVICES
+ [*] PPP (point-to-point protocol) support - CONFIG_PPP
+ [M] PPP Deflate compression - CONFIG_PPP_DEFLATE (only useful if
+ compression is supported - rare)
+ [M] PPP BSD-Compress compression - CONFIG_PPP_BSDCOMP (only useful
+ if compression is supported - rare)
+ [M] PPP over Ethernet - CONFIG_PPPOE (only needed for PPPoE)
+ [M] PPP over ATM - CONFIG_PPPOATM (only needed for PPPoATM)
+ USB support --->
+ [*] Support for Host-side USB - CONFIG_USB
+ [*] USB device filesystem - CONFIG_USB_DEVICEFS
+ [M] (O or U)HCI HCD support
+ USB DSL modem support --->
+ [M] USB DSL modem support - CONFIG_USB_ATM
+ [M] Speedtouch USB support - CONFIG_USB_SPEEDTOUCH
+
+
+
+Troubleshooting
+===============
+
+Try "emerge speedtouch-usb" again, because the ebuild checks that the
+required kernel modules are present (showing a warning message if
+appropriate), and creates the firmware files and symlinks in
+/lib/firmware/
+
+If the modem is unresponsive, then run "/etc/init.d/net.ppp0 stop" and
+unplug the modem for 30 seconds, to drain its memory. Then reconnect
+the modem to the PC and run "/etc/init.d/net.ppp0 start"
+
+To check the modem's connection progress, run:
+ tail -f /var/log/messages
+/var/log/messages should show e.g.:
+
+usb n-n: new full speed USB device using xxxx_hcd and address n
+usb n-n: found stage 1 firmware speedtch-1.bin
+usb n-n: found stage 2 firmware speedtch-2.bin
+pppd[nnn]: Plugin pppoatm.so loaded.
+pppd[nnn]: pppd n.n.n started by root, uid 0
+pppd[nnn]: Using interface ppp0
+pppd[nnn]: Connect: ppp0 <--> n.nn
+ADSL line is synchronising
+DSL line goes up
+ADSL line is up (nnn Kib/s down | nnn Kib/s up)
+pppd[nnn]: CHAP authentication succeeded
+pppd[nnn]: local IP address nnn.nnn.nnn.nnn
+pppd[nnn]: remote IP address nnn.nnn.nnn.nnn
+
+
+If the authentification fails, then check username_ppp0 and
+password_ppp0.
+
+If the ADSL connection is not established, then check the options in
+pppd_ppp0. "man pppd" explains all the options in that file.
+
+If the ADSL connection seems to have worked, but no websites can be
+contacted, then check that /etc/resolv.conf is populated, and possibly
+add the "usepeerdns" option (to use the ISP's DNS) to pppd_ppp0 in
+/etc/conf.d/net .
+
+If the problem is still not resolved, post to the Gentoo Forums
+at http://forums.gentoo.org/. If there is no answer, then
+file a bug at http://bugs.gentoo.org/ .
+
+
+Compression
+===========
+
+Some ISPs require compression to be disabled in order for the
+connection to work, so the default configuration described above
+disables compression. Few ISPs support ADSL compression anyway. If you
+are lucky enough to have an ISP which *does* support compression
+(Google is your best friend for determining this), then compression can
+be enabled by following these steps:
+
+* Compile the kernel modules CONFIG_PPP_DEFLATE and CONFIG_PPP_BSDCOMP
+(only one is strictly necessary - pppd prefers "deflate" compression).
+Add them to /etc/modules.autoload.d/kernel-2.6 or /etc/conf.d/net above
+the "pppoatm" line, if they are not built-in.
+* Remove the following options in pppd_ppp0:
+ noaccomp nobsdcomp noccp nodeflate nopcomp novj novjccomp
+* Ensure that "debug" is in the pppd_ppp0 options, to check that
+compression is being utilized. Note that "module registered" in
+/var/log/messages only confirms that the kernel module is loaded -
+it does not indicate that the connection is compressed.
+
+
+Links
+=====
+
+SpeedTouch ebuilds: https://packages.gentoo.org/packages/search?q=speedtouch
+SpeedTouch hardware: http://www.speedtouch.com/support.htm
+SpeedTouch firmware: http://www.speedtouch.com/driver_upgrade_lx_3.0.1.2.htm
diff --git a/net-dialup/speedtouch-usb/metadata.xml b/net-dialup/speedtouch-usb/metadata.xml
new file mode 100644
index 000000000000..f7a6559b0fc3
--- /dev/null
+++ b/net-dialup/speedtouch-usb/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+<longdescription>Firmware and configuration instructions for the kernel-space driver for Alcatel SpeedTouch USB modems.</longdescription>
+</pkgmetadata>
diff --git a/net-dialup/speedtouch-usb/speedtouch-usb-3.0.1.2-r3.ebuild b/net-dialup/speedtouch-usb/speedtouch-usb-3.0.1.2-r3.ebuild
new file mode 100644
index 000000000000..4cbf0542da62
--- /dev/null
+++ b/net-dialup/speedtouch-usb/speedtouch-usb-3.0.1.2-r3.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils linux-info
+
+DESCRIPTION="Firmware and configuration instructions for Alcatel SpeedTouch USB modems"
+HOMEPAGE="http://www.speedtouch.com/"
+SRC_URI="http://www.speedtouch.com/download/drivers/USB/SpeedTouch330_firmware_${PV//./}.zip"
+
+# Taken from http://www.speedtouch.com/driver_upgrade_lx_3.0.1.2.htm
+LICENSE="SpeedTouch-USB-Firmware"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+
+RDEPEND="net-dialup/ppp"
+DEPEND="app-arch/unzip"
+
+S="${WORKDIR}"
+
+src_install() {
+ local FILE_VER="${PV#*.}"
+ FILE_VER="${PV%%.*}.${FILE_VER//./}" # {major_ver}.{minor_digits}
+
+ # Extract the "stage 1" portion of the firmware
+ dd if=KQD6_${FILE_VER} of=speedtch-1.bin.2 \
+ ibs=1 obs=991 count=991 skip=36 &> /dev/null \
+ || die "Extraction of stage 1 firmware (step 1) failed"
+
+ dd if=ZZZL_${FILE_VER} of=speedtch-1.bin.4 \
+ ibs=1 obs=935 count=935 skip=32 &> /dev/null \
+ || die "Extraction of stage 1 firmware (step 2) failed"
+
+ # Extract the "stage 2" portion of the firmware
+ dd if=KQD6_${FILE_VER} of=speedtch-2.bin.2 \
+ ibs=1 obs=762650 count=762650 skip=1027 &> /dev/null \
+ || die "Extraction of stage 2 firmware (step 1) failed"
+
+ dd if=ZZZL_${FILE_VER} of=speedtch-2.bin.4 \
+ ibs=1 obs=775545 count=775545 skip=967 &> /dev/null \
+ || die "Extraction of stage 2 firmware (step 2) failed"
+
+ # Copy to the firmware directory
+ insinto /lib/firmware
+ insopts -m 600
+ doins speedtch-{1,2}.bin.{2,4}
+
+ # Symlinks for other revisions of the modem
+ pushd "${D}/lib/firmware" >/dev/null || die
+ for n in 1 2 ; do
+ for rev in 0 1 ; do
+ ln -sfn speedtch-${n}.bin.2 speedtch-${n}.bin.${rev}
+ done
+ # Seems like a reasonable guess, for revision 3
+ ln -sfn speedtch-${stub}${n}.bin.4 speedtch-${n}.bin.3
+ done
+ popd >/dev/null || die
+
+ # Documentation necessary to complete the setup
+ dodoc "${FILESDIR}/README"
+}
+
+pkg_postinst() {
+ [[ -e /etc/hotplug/usb.usermap ]] && egrep -q " 0x06[bB]9 +0x4061 " /etc/hotplug/usb.usermap && \
+ ewarn "Please remove the SpeedTouch line from /etc/hotplug/usb.usermap"
+
+ # Check kernel configuration
+ local CONFIG_CHECK="~FW_LOADER ~NET ~PACKET ~ATM ~NETDEVICES ~USB_DEVICEFS ~USB_ATM ~USB_SPEEDTOUCH \
+ ~PPP ~PPPOATM ~PPPOE ~ATM_BR2684"
+ local WARNING_PPPOATM="CONFIG_PPPOATM:\t is not set (required for PPPoA links)"
+ local WARNING_PPPOE="CONFIG_PPPOE:\t is not set (required for PPPoE links)"
+ local WARNING_ATM_BR2684="CONFIG_ATM_BR2684:\t is not set (required for PPPoE links)"
+ check_extra_config
+ echo
+
+ # Check user-space for PPPoA support
+ if ! has_version net-dialup/ppp[atm] ; then
+ ewarn "Run the following command if connecting via PPPoA protocol:"
+ ewarn " euse -E atm && emerge net-dialup/ppp"
+ echo
+ fi
+ # Check user-space for PPPoE support
+ if ! has_version net-dialup/linux-atm ; then
+ ewarn "Run the following command if connecting via PPPoE protocol:"
+ ewarn " emerge net-dialup/linux-atm"
+ echo
+ fi
+
+ ewarn "To complete the installation, you must read the documentation in"
+ ewarn " ${ROOT}usr/share/doc/${PF}"
+}
diff --git a/net-dialup/tkvoice/Manifest b/net-dialup/tkvoice/Manifest
new file mode 100644
index 000000000000..c5e253b801b8
--- /dev/null
+++ b/net-dialup/tkvoice/Manifest
@@ -0,0 +1,6 @@
+AUX tkvoice.desktop 118 SHA256 ff6da0a57672e381f7e93a3dfe60c46eb33deebe8560decec6d2a455d02a8c6c SHA512 4270ab8eb89ded5b9a1aacd3ff1901d7f5050dd86e5f6f331330620dff86fa66d789e9d703252f035922dbbd10b5b120abac9a9df47ec3003c4f7112dc7b8bdc WHIRLPOOL 58132fb4e86db7e696abcc5b850988a34596b30896da915f6b96947027d49787b3c7b542a63d21f18df3edf7d6ef59c6ca866a6ff9d46284ae69aa4d9d9ca89f
+DIST tkvoice-1.5.tar.gz 153967 SHA256 ab4cf6f098186fe6efe013f28262c8dcaff187224512c0cbd5668225c953ff25 SHA512 d9b2ead55131ef37a4d2e9d4d3065bb7945bbef7ffc38a336765c0d81cdfba44d6453b92277832ef0c2af4f5b9aff4eb27cfcedf119a74683d1d2a0d2fc8ca0c WHIRLPOOL 27f8ac07e34988d1aa7d29f384262529e7d03ba94cadceffe9f03ebd4404df948eab7464de4516c695dda9d7465c0396ee7dbbd52fcd146b68363f3eb04cb8e5
+EBUILD tkvoice-1.5.ebuild 1249 SHA256 92b536b253c9736551823124f7e09486fd2807e5eb1c4661cb7b69ef96722ecb SHA512 e6b1cf9e2a767698c5af6c19861879eab1483a85cdda957e9ef46b8d57b4413882b49d36b829c4551a8026b768675e7d83d8921a6bff774cb6e549c606022b22 WHIRLPOOL 0c5011b56c7593895a9b8d97e8a62dcb6ff45d53f173b3e45ef293322123d750b53597b69f5866b87032c1ce183960e27142cc0a5f99707af0b74f8a917b21aa
+MISC ChangeLog 2871 SHA256 e8ed6bf051f726b03ba261ff7f2e650b44295013deb08266b7ac914af6507f00 SHA512 3156eedd4fe852c82ecb888c73d0d7c89f1c38adbe79e4c0123154a89e3dd0e5ceeada5665af20d65d332a9669b3ea04f7a7cb97809191fdf29a7531ba16c997 WHIRLPOOL 2f76186ba007badf4185177ca909155ecee1e796827bf113c149081249dfdd34f5e43e5bffc977c74200c0e861f09b7f561011813711e23ce0cf91cdafc860de
+MISC ChangeLog-2015 678 SHA256 b60309eb586e5fd72c9e1e1b67ca1abc6fc2acea369d209a0aa8aaaa7d6919dc SHA512 7eef9faca6b39766b32f304a9cc93c2fdbe2ce2161dffd1392433b039d5cc0f9f820ff51291d3aa185a316334fed5a70aa12ae3a94cdfaa3a58a03417e7ff179 WHIRLPOOL a22164232b4208da218859380c93ac3adab133225df3dd298b97456031567bef5e45f285df30f35dc8732237bb2478d863963c7e6d39fd20d271e45454fc6814
+MISC metadata.xml 327 SHA256 c2650a72735c84e3e11a8b0210c90d24b0f1196ce4a50405cdd98bf0c748611f SHA512 e689657e024b07e16b36aa0e55a2a9a5e74a8dce9f70f16a3f288d6809f2fbf2076d5fdc3cea6e33ff0277a78013e3c8e6f103b5c07e633eb76415a593cafe6f WHIRLPOOL 9e12ab7989d0fe896e44dbc25673d1e859ba20c27246c105c36a215c5300dc57405e719d369cbcf056aed00e1226e0334a61205c41d39d693ce8ac87a4011e2b
diff --git a/net-dialup/tkvoice/files/tkvoice.desktop b/net-dialup/tkvoice/files/tkvoice.desktop
new file mode 100644
index 000000000000..389305340e08
--- /dev/null
+++ b/net-dialup/tkvoice/files/tkvoice.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=TkVoice
+Type=Application
+Comment=Phone/Fax Utility
+Exec=tkvoice
+Icon=tkvoice
+Categories=Utility;
diff --git a/net-dialup/tkvoice/metadata.xml b/net-dialup/tkvoice/metadata.xml
new file mode 100644
index 000000000000..821333d9ba87
--- /dev/null
+++ b/net-dialup/tkvoice/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-needed -->
+ <longdescription>Tk-Voice is a Telephone Answering Machine frontend for vgetty
+and also a Facsimile Answering Machine frontend for mgetty.</longdescription>
+</pkgmetadata>
diff --git a/net-dialup/tkvoice/tkvoice-1.5.ebuild b/net-dialup/tkvoice/tkvoice-1.5.ebuild
new file mode 100644
index 000000000000..f59b8f107568
--- /dev/null
+++ b/net-dialup/tkvoice/tkvoice-1.5.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="Voice mail and Fax frontend program"
+HOMEPAGE="http://tkvoice.netfirms.com"
+SRC_URI="http://tkvoice.netfirms.com/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+RDEPEND="
+ dev-lang/tk
+ media-libs/netpbm
+ media-sound/sox
+ net-dialup/mgetty"
+DEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i -e "s:/usr/local/etc:/etc:g; s:/usr/local/bin:/usr/bin:g; s:/usr/local/tkvoice:/usr/lib/${P}:g" \
+ "${S}/tkvoice" "${S}/TCL/tkvfaq.tcl" "${S}/TCL/tkvsetupvoice.tcl" || die
+ sed -i -e "s:set STARTDIR .*:set STARTDIR /usr/lib/${P}:" \
+ "${S}/tkvoice" || die
+}
+
+src_install() {
+ exeinto /usr/lib/${P}
+ doexe ${PN}
+ dodir /usr/bin
+ dosym /usr/lib/${P}/${PN} /usr/bin/${PN}
+ insinto /usr/lib/${P}/TCL
+ doins TCL/*
+ insinto /usr/lib/${P}/image
+ doins image/*
+
+ domenu "${FILESDIR}/${PN}.desktop"
+ insinto /usr/share/pixmaps
+ doins ${PN}.xpm
+
+ dodoc BUGS FAQ README TODO
+}
+
+pkg_postinst() {
+ elog "${P} has been installed. Run ${EPREFIX}/usr/bin/${PN}."
+ elog "For more information, see the home page, ${HOMEPAGE}"
+ elog "or consult the documentation for this program as well as"
+ elog "for mgetty/vgetty."
+}
diff --git a/net-dialup/ueagle-atm/Manifest b/net-dialup/ueagle-atm/Manifest
new file mode 100644
index 000000000000..0be69d67a3b2
--- /dev/null
+++ b/net-dialup/ueagle-atm/Manifest
@@ -0,0 +1,6 @@
+AUX README 8687 SHA256 af7825923a826b4c65f2c390ae2dd8e282d9c72279323b5428508df1c2fdb402 SHA512 a847cb05b8ab1050257940a717ef32b74b5d92fc280a07b1189274e14e3b0481c6a4ccfb31411350ea7e38360f2f478748ff46fb3214586b9466a6cef7a4a36c WHIRLPOOL 3f2651ee603dcaecdb32df424082156454e75d198a5bdf320ac4a2afe1f8ff39ca4c49fceaae2bd9f43718f4c03af02dbcce2d3070d494245c4a2f1dbe392ce9
+DIST ueagle-data-src-1.1.tar.gz 1270515 SHA256 45b944e5b141591b9a7e64b7e1e704b8507a73f9314dee2f572e4a845f6096c2 SHA512 ce4d54c02da9943d7ee77615142c64c3ec02acea00a3d107dbeaa0dad9f047b5bda5844e8b896596af000bcb9a9fd0f49aa04a9da603760639bd7655933a98fa WHIRLPOOL 0b2d4227f768a2e17e9a0f0aede79ec1cb5f709172f84003dfecdf2473771a6b4207f7007204538c1f707543a748446eee48d50963cda27caef3aee73328f545
+EBUILD ueagle-atm-1.1-r3.ebuild 1727 SHA256 f5b2a331c7c771f588e0854e77c1bbe1e4b07c761fc54504ffade373635d95a2 SHA512 da1e520d8245f9a407ee8b14b6617808c8c00215cc676d6277889f7c7b3685fff6962ea531a7a0d78eb469e462b68a1052174fa78650d518144c87917f4e50ef WHIRLPOOL 041171de2f5f3fd3a85fd5fbc479bfd1bccb9c0b205df51c54eef58b27545ca1b7a4d4aa025dd8d327d5b214fdda12d99f00be7c1e9ccd5e6ecddc4814ec7c5f
+MISC ChangeLog 2877 SHA256 674e3cbc9c90c20327326d9151adfb71ea3100d66af387cc56f7f758fe91ad6c SHA512 255e57096ff185d6e4b13485a9411c45490afa98b3269ca083947e289f54b53d9d8c5a107bde6934eef0ce99a777511843f3e5ce12b4c17b65c4fa2941a04647 WHIRLPOOL 6f6ec1551cda7285b49c97cbd51817b1983881595979a1649b15b68df61196fb75649154ec36de3e2e79b88fa35b4f3713053d9305a9338578d18c9808bae0d0
+MISC ChangeLog-2015 1877 SHA256 742fd9fb364ea62cfdd0b1872398ea477296381a09d266529aa675f388ae8fdb SHA512 74a9fc065a31fc53bdbfd178c0b83955572235502b9588d6d172fa5e2f0f06cefe35ad33491a4a53b8492a9d9006c82e04d34a8b8f5dbe9c6ad780fd309c76e6 WHIRLPOOL dd0d38df0beff179fc9d83ce2ef2da8f8e49985e5c9cf1773d5a4fa49a506636c944086986431a95c598e15897bc7181467cf0b9e36dc52f687de5b1314e847c
+MISC metadata.xml 318 SHA256 93ba08bceca5af252ac69a75ce40f1349e2900f6f8aa81562dbb3cb900abd547 SHA512 cb837defad14a199f7c0ad62a721e08afee90ee05125b8783cd7cf7059f9c7090e3fd18c2cf3d91e6dde78b7cf86a3abd70a3d4e22f9b4a59bee750bda214ced WHIRLPOOL 8aca85048b8c5f94a06001f685ba35b8a536da39fa59def35faecf76a5653908d30230b3ff34133ab91b5f43459eaa54fe1fa3173df083733da0b00949b45713
diff --git a/net-dialup/ueagle-atm/files/README b/net-dialup/ueagle-atm/files/README
new file mode 100644
index 000000000000..ef07b71dadcd
--- /dev/null
+++ b/net-dialup/ueagle-atm/files/README
@@ -0,0 +1,235 @@
+Introduction
+============
+
+This ebuild installs firmware files necessary for ADI 930/Eagle USB ADSL
+Modem driver which first appeared in kernel 2.6.16.
+
+Configuration
+=============
+
+Most ADSL modems are connected via the ATM protocol, rather
+than Ethernet. For ATM, run the following:
+ euse -E atm && emerge net-dialup/ppp net-dialup/ueagle-atm
+
+It is necessary to choose an interface number for the connection. This
+is arbitrary - the only requirement is that the connection number is
+not already in use. The first available number is 0, and it is usual to
+choose the lowest unused number. For the purposes of this document, 0
+will be chosen.
+
+Add the following lines from the appropriate section below to
+/etc/conf.d/net, then customize them as per the inline comments.
+
+
+a) PPPoATM configuration:
+
+config_ppp0='ppp' # Runs /lib/rcscripts/net/pppd.sh
+# The 2 numbers represent the VPI & VCI of your ISP, and they are separated
+# by a dot. Ask your ISP about those numbers.
+link_ppp0='0.38'
+plugins_ppp0='pppoa'
+# 'man pppd' shows other options. Compression is disabled because it is
+# rarely taken advantage of, and may interfere with the connection.
+# Add option 'usepeerdns' to populate /etc/resolv.conf
+pppd_ppp0='updetach noauth debug defaultroute noaccomp nobsdcomp noccp
+ nodeflate nopcomp novj novjccomp child-timeout 60'
+username_ppp0='username@isp.com' # ADSL login, assigned by your ISP
+password_ppp0='password' # ADSL password, assigned by your ISP
+
+# If the kernel modules are not built-in, then they must be loaded
+# before starting the PPP daemon:
+function preup() {
+ if [[ "$1" = "ppp0" ]] ; then
+ modprobe -q ueagle-atm
+ return 0
+ fi
+}
+
+
+b) PPPoE configuration:
+
+# Configure first the RFC2684 bridge interface
+config_nas0='null'
+# Use "-e 0" for LLC mux or "-e 1" for VC mux.
+# The 2 numbers after "-a" represent the VPI & VCI of your ISP, and
+# they are separated by a dot. Ask your ISP about those numbers.
+br2684ctl_nas0='-e 0 -a 0.38'
+
+config_ppp0='ppp' # Runs /lib/rcscripts/net/pppd.sh
+link_ppp0='nas0' # The name of the RFC2684 bridge interface
+plugins_ppp0='pppoe'
+# 'man pppd' shows other options. Compression is disabled because it is
+# rarely taken advantage of, and may interfere with the connection.
+# Add option 'usepeerdns' to populate /etc/resolv.conf
+pppd_ppp0='updetach noauth debug defaultroute noaccomp nobsdcomp noccp
+ nodeflate nopcomp novj novjccomp child-timeout 60'
+username_ppp0='username@isp.com' # ADSL login, assigned by your ISP
+password_ppp0='password' # ADSL password, assigned by your ISP
+
+depend_ppp0() {
+ need net.nas0
+}
+
+# If the kernel modules are not built-in, then they must be loaded
+# before starting the RFC2684 bridge:
+function preup() {
+ if [[ "$1" = "nas0" ]] ; then
+ modprobe -q ueagle-atm
+ return 0
+ fi
+}
+
+
+Configuration continued
+=======================
+
+Create a symlink for the new network interface, for it to be enabled by
+baselayout:
+ cd /etc/init.d && ln -sfn net.lo net.ppp0
+If you use PPPoE, you should also create the symlink for the RFC2684
+bridge interface:
+ cd /etc/init.d && ln -sfn net.lo net.nas0
+
+The "debug" option adds some extra commentary from pppd regarding the
+connection to /var/log/messages, e.g.:
+"sent [LCP ConfReq id=0x1 <magic 0x7bea6ef1>]". It is wise to keep the
+option on permanently, due to its usefulness when debugging.
+
+Set RC_NET_STRICT_CHECKING="yes" in /etc/conf.d/rc, to prevent Internet
+services in /etc/init.d/ from starting before the Internet connection
+is established. Other options are to start/stop programs in
+/etc/ppp/ip-{up,down}.local, and to customize initscript dependencies
+as described in:
+ http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=4
+
+
+Starting the Connection
+=======================
+
+To start manually, with the modem connected:
+ /etc/init.d/net.ppp0 start
+
+To start automatically when the PC boots:
+ rc-update add net.ppp0 default
+
+
+Kernel Configuration
+====================
+
+The ebuild, during an emerge, checks that the required kernel modules
+are present.
+
+Note that in the list below, "[*]" means that the option is compiled
+into the kernel, whereas "[M]" means that the option can either be
+compiled into the kernel, or as a module. Compiling them into the
+kernel is recommended, to guarantee that the modules are already loaded
+when they are needed, and it will improve the bootup time by a couple
+of seconds.
+
+In "make menuconfig", you can press "/" and search on e.g. "eagle"
+to see exactly where an option is - the location of an option and its
+dependencies can change between kernel versions.
+
+Check that the following kernel options are configured as shown (this
+list includes the prerequisites, e.g. USB_UEAGLEATM depends on USB):
+
+ Code maturity level options --->
+ [*] Prompt for development and/or incomplete code/drivers
+ - CONFIG_EXPERIMENTAL
+
+ Device Drivers --->
+ Generic Driver Options --->
+ [ ] Select only drivers that don't need compile-time external
+ firmware (*unselected*) - CONFIG_STANDALONE
+ [*] Hotplug firmware loading support - CONFIG_FW_LOADER
+
+ Networking --->
+ [*] Networking support - CONFIG_NET
+ Networking options --->
+ [*] Packet socket - CONFIG_PACKET
+ [M] Asynchronous Transfer Mode (ATM) - CONFIG_ATM
+ [M] RFC1483/2684 Bridged protocols - CONFIG_ATM_BR2684 (only needed for PPPoE)
+
+ Device Drivers --->
+ Network device support --->
+ [*] Network device support - CONFIG_NETDEVICES
+ [*] PPP (point-to-point protocol) support - CONFIG_PPP
+ [M] PPP Deflate compression - CONFIG_PPP_DEFLATE (only useful if
+ compression is supported - rare)
+ [M] PPP BSD-Compress compression - CONFIG_PPP_BSDCOMP (only useful
+ if compression is supported - rare)
+ [M] PPP over Ethernet - CONFIG_PPPOE (only needed for PPPoE)
+ [M] PPP over ATM - CONFIG_PPPOATM (only needed for PPPoATM)
+ USB support --->
+ [*] Support for Host-side USB - CONFIG_USB
+ [*] USB device filesystem - CONFIG_USB_DEVICEFS
+ [M] (O or U)HCI HCD support
+ USB DSL modem support --->
+ [M] USB DSL modem support - CONFIG_USB_ATM
+ [M] ADI 930 and eagle USB DSL modem - CONFIG_USB_UEAGLEATM
+
+
+
+Troubleshooting
+===============
+
+Try "emerge ueagle-atm" again, because the ebuild checks that the
+required kernel modules are present (showing a warning message if
+appropriate), and creates the firmware files in /lib/firmware/ueagle-atm.
+
+If the modem is unresponsive, then run "/etc/init.d/net.ppp0 stop" and
+unplug the modem for 30 seconds, to drain its memory. Then reconnect
+the modem to the PC and run "/etc/init.d/net.ppp0 start"
+
+To check the modem's connection progress, run:
+ tail -f /var/log/messages
+/var/log/messages should show e.g.:
+
+pppd[nnn]: Plugin pppoatm.so loaded.
+pppd[nnn]: pppd n.n.n started by root, uid 0
+pppd[nnn]: Using interface ppp0
+pppd[nnn]: Connect: ppp0 <--> n.nn
+ADSL line is synchronising
+DSL line goes up
+ADSL line is up (nnn Kib/s down | nnn Kib/s up)
+pppd[nnn]: CHAP authentication succeeded
+pppd[nnn]: local IP address nnn.nnn.nnn.nnn
+pppd[nnn]: remote IP address nnn.nnn.nnn.nnn
+
+
+If the authentification fails, then check username_ppp0 and
+password_ppp0.
+
+If the ADSL connection is not established, then check the options in
+pppd_ppp0. "man pppd" explains all the options in that file.
+
+If the ADSL connection seems to have worked, but no websites can be
+contacted, then check that /etc/resolv.conf is populated, and possibly
+add the "usepeerdns" option (to use the ISP's DNS) to pppd_ppp0 in
+/etc/conf.d/net .
+
+If the problem is still not resolved, post to the Gentoo Forums at
+http://forums.gentoo.org/ and ultimately, if there is no answer,
+file a bug at http://bugs.gentoo.org/ .
+
+
+Compression
+===========
+
+Some ISPs require compression to be disabled in order for the
+connection to work, so the default configuration described above
+disables compression. Few ISPs support ADSL compression anyway. If you
+are lucky enough to have an ISP which *does* support compression
+(Google is your best friend for determining this), then compression can
+be enabled by following these steps:
+
+* Compile the kernel modules CONFIG_PPP_DEFLATE and CONFIG_PPP_BSDCOMP
+(only one is strictly necessary - pppd prefers "deflate" compression).
+Add them to /etc/modules.autoload.d/kernel-2.6 or /etc/conf.d/net above
+the "pppoatm" line, if they are not built-in.
+* Remove the following options in pppd_ppp0:
+ noaccomp nobsdcomp noccp nodeflate nopcomp novj novjccomp
+* Ensure that "debug" is in the pppd_ppp0 options, to check that
+compression is being utilized. Note that "module registered" in
+/var/log/messages only confirms that the kernel module is loaded -
+it does not indicate that the connection is compressed.
diff --git a/net-dialup/ueagle-atm/metadata.xml b/net-dialup/ueagle-atm/metadata.xml
new file mode 100644
index 000000000000..92efb62d35fd
--- /dev/null
+++ b/net-dialup/ueagle-atm/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-needed -->
+ <longdescription>Firmware and configuration instructions for ADI 930/Eagle USB ADSL Modem driver
+available in kernels &gt;= 2.6.16.</longdescription>
+</pkgmetadata>
diff --git a/net-dialup/ueagle-atm/ueagle-atm-1.1-r3.ebuild b/net-dialup/ueagle-atm/ueagle-atm-1.1-r3.ebuild
new file mode 100644
index 000000000000..6143b28417a5
--- /dev/null
+++ b/net-dialup/ueagle-atm/ueagle-atm-1.1-r3.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils linux-info
+
+DESCRIPTION="Firmware and configuration instructions for ADI 930/Eagle USB ADSL Modem driver"
+HOMEPAGE="https://gna.org/projects/ueagleatm/"
+SRC_URI="http://eagle-usb.org/ueagle-atm/non-free/ueagle-data-src-${PV}.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+
+DEPEND=""
+RDEPEND="net-dialup/ppp
+ !sys-kernel/linux-firmware"
+
+S="${WORKDIR}/ueagle-data-src-${PV}"
+
+src_compile() {
+ emake generate
+}
+
+src_install() {
+ # Copy to the firmware directory
+ insinto /lib/firmware/ueagle-atm
+ doins build/*
+
+ # Documentation necessary to complete the setup
+ dodoc "${FILESDIR}/README"
+}
+
+pkg_postinst() {
+ # Check kernel configuration
+ local CONFIG_CHECK="~FW_LOADER ~NET ~PACKET ~ATM ~NETDEVICES ~USB_DEVICEFS ~USB_ATM ~USB_UEAGLEATM \
+ ~PPP ~PPPOATM ~PPPOE ~ATM_BR2684"
+ local WARNING_PPPOATM="CONFIG_PPPOATM:\t is not set (required for PPPoA links)"
+ local WARNING_PPPOE="CONFIG_PPPOE:\t is not set (required for PPPoE links)"
+ local WARNING_ATM_BR2684="CONFIG_ATM_BR2684:\t is not set (required for PPPoE links)"
+ check_extra_config
+ echo
+
+ # Check user-space for PPPoA support
+ if ! has_version net-dialup/ppp[atm] ; then
+ ewarn "Run the following command if connecting via PPPoA protocol:"
+ ewarn " euse -E atm && emerge net-dialup/ppp"
+ echo
+ fi
+ # Check user-space for PPPoE support
+ if ! has_version net-dialup/linux-atm ; then
+ ewarn "Run the following command if connecting via PPPoE protocol:"
+ ewarn " emerge net-dialup/linux-atm"
+ echo
+ fi
+
+ ewarn "To complete the installation, you must read the documentation in"
+ ewarn " ${ROOT}usr/share/doc/${PF}"
+}
diff --git a/net-dialup/ueagle4-atm/Manifest b/net-dialup/ueagle4-atm/Manifest
new file mode 100644
index 000000000000..5af27bf1d589
--- /dev/null
+++ b/net-dialup/ueagle4-atm/Manifest
@@ -0,0 +1,6 @@
+AUX README 8682 SHA256 f2a6ec2f20670e6bef283f032c7c8d63d5fc6868aabcc5a5547b4f45b3ef0b3f SHA512 4441464519b518d3b666df88323624a6ca4ce746b75dcd2d8ba638d0a3b953d9d5a34344e6acdb400b5a4fe5ccd9fec49202bb357a6d9c76b49dd8e0accb265c WHIRLPOOL 2218d6c830bf876f0fa0315df6b6c88ec859c4ca45496ba9d2c1be79625a447d29e69c549cfc13f1ab140534233ef5109dd8dc84eea44573b69faa1f241cc2b9
+DIST ueagle4-data-1.0.tar.gz 217512 SHA256 1e3547821d69b9f576add1e35223df159aadfd9e3dae913b6429a1cbbe1a3691 SHA512 3d47150eb288865432e7201390669262e0d12239f5d45d194da8abe535e69cabcb53ef6b8757ab7e3c495394ecd74b781ac724635918b70c479a1219b3bcaa74 WHIRLPOOL 69926d2f8d4606db044f08f16c0cc274ed3b139db2415773a67b0857ac614f7632d85362c8bbcd189f2394355211d8c26112f1d7214717e6a6b4b41c63a3976f
+EBUILD ueagle4-atm-1.0.ebuild 1673 SHA256 0f1731c6b2bbc1bbba84cac588054c0b574b70693a615d03047a7197a01722e5 SHA512 f6b5c31eb8193aa2812229943f37b48ad8868ec4a692d30cb8a067b0904ea5ce774e4d3b94c633295afae40f868b5449bffb84995b09d56c3535dac9fbc1114d WHIRLPOOL b9a853878bb891f7a98e2622c1891dda3f1cf5edc424e4a4570b974906b3f4fdbc2912b40aeeb9fcb76096371b42042dabed294ec62573824815bd1d0a89189e
+MISC ChangeLog 2874 SHA256 5dd797cc6add40b495be83f8115d02b0a922a9c9406b10b6cc2404ef56bbfacf SHA512 d797d373cde021936f77a762dd5329b1f0d44861ff4e6cd99916ff443ae3f8b2617143241955eb610b45ff0110ee968bdb2c594930e8b397c1572ad92e4d4dd8 WHIRLPOOL 7ca24c755d8532e17382320e33a9a86f10583657f558f739ff7dd802dba72cb77720b32e2c2267a43aeb8f88a93575c4d7839545cbff37231e27cb013b3e0f1d
+MISC ChangeLog-2015 561 SHA256 290c5e1b430fb94c317caee171c37f90d5846413f9822cb2532a753bb63341f0 SHA512 89011834d180773cc8fd1731d9fe73bbbbdef06c1140360aa5c4cd4573d820d88cd187863d4f83a7194f4365c59b988f208ef046ba8393066919caca779b23d0 WHIRLPOOL 66455e50f2c199f58e160880c414816f02ad7847c1225b001106942fd66dfe83c189e807025167a12fb980c19ce606eb5de5878607abb6e7dff6a103540e56a3
+MISC metadata.xml 313 SHA256 c3d37e08ccf7ac07585bdf49c8f50c50808542729ca62d949bb63eac5b0e6683 SHA512 5e82ee1abcd89c42e7519966aae253537495a2b471b479a75a0aa0f9d5c11b57772a0138223abd3edd29c7393f0ad198bd8e7da9c3035660e441c11f21641458 WHIRLPOOL 5c08b8bbbe9f8c1319a35c9335259da452cd6a7dfe6cf23716ef69c47feea0cf7cc50a209038dfc938a0f4cd6275e3bd3aea815b425471f0c74ee346f4469a81
diff --git a/net-dialup/ueagle4-atm/files/README b/net-dialup/ueagle4-atm/files/README
new file mode 100644
index 000000000000..20067824f303
--- /dev/null
+++ b/net-dialup/ueagle4-atm/files/README
@@ -0,0 +1,235 @@
+Introduction
+============
+
+This ebuild installs firmware files necessary for Eagle USB E4 ADSL
+Modem driver which first appeared in kernel 2.6.16.
+
+Configuration
+=============
+
+Most ADSL modems are connected via the ATM protocol, rather
+than Ethernet. For ATM, run the following:
+ euse -E atm && emerge net-dialup/ppp net-dialup/ueagle-atm
+
+It is necessary to choose an interface number for the connection. This
+is arbitrary - the only requirement is that the connection number is
+not already in use. The first available number is 0, and it is usual to
+choose the lowest unused number. For the purposes of this document, 0
+will be chosen.
+
+Add the following lines from the appropriate section below to
+/etc/conf.d/net, then customize them as per the inline comments.
+
+
+a) PPPoATM configuration:
+
+config_ppp0='ppp' # Runs /lib/rcscripts/net/pppd.sh
+# The 2 numbers represent the VPI & VCI of your ISP, and they are separated
+# by a dot. Ask your ISP about those numbers.
+link_ppp0='0.38'
+plugins_ppp0='pppoa'
+# 'man pppd' shows other options. Compression is disabled because it is
+# rarely taken advantage of, and may interfere with the connection.
+# Add option 'usepeerdns' to populate /etc/resolv.conf
+pppd_ppp0='updetach noauth debug defaultroute noaccomp nobsdcomp noccp
+ nodeflate nopcomp novj novjccomp child-timeout 60'
+username_ppp0='username@isp.com' # ADSL login, assigned by your ISP
+password_ppp0='password' # ADSL password, assigned by your ISP
+
+# If the kernel modules are not built-in, then they must be loaded
+# before starting the PPP daemon:
+function preup() {
+ if [[ "$1" = "ppp0" ]] ; then
+ modprobe -q ueagle-atm
+ return 0
+ fi
+}
+
+
+b) PPPoE configuration:
+
+# Configure first the RFC2684 bridge interface
+config_nas0='null'
+# Use "-e 0" for LLC mux or "-e 1" for VC mux.
+# The 2 numbers after "-a" represent the VPI & VCI of your ISP, and
+# they are separated by a dot. Ask your ISP about those numbers.
+br2684ctl_nas0='-e 0 -a 0.38'
+
+config_ppp0='ppp' # Runs /lib/rcscripts/net/pppd.sh
+link_ppp0='nas0' # The name of the RFC2684 bridge interface
+plugins_ppp0='pppoe'
+# 'man pppd' shows other options. Compression is disabled because it is
+# rarely taken advantage of, and may interfere with the connection.
+# Add option 'usepeerdns' to populate /etc/resolv.conf
+pppd_ppp0='updetach noauth debug defaultroute noaccomp nobsdcomp noccp
+ nodeflate nopcomp novj novjccomp child-timeout 60'
+username_ppp0='username@isp.com' # ADSL login, assigned by your ISP
+password_ppp0='password' # ADSL password, assigned by your ISP
+
+depend_ppp0() {
+ need net.nas0
+}
+
+# If the kernel modules are not built-in, then they must be loaded
+# before starting the RFC2684 bridge:
+function preup() {
+ if [[ "$1" = "nas0" ]] ; then
+ modprobe -q ueagle-atm
+ return 0
+ fi
+}
+
+
+Configuration continued
+=======================
+
+Create a symlink for the new network interface, for it to be enabled by
+baselayout:
+ cd /etc/init.d && ln -sfn net.lo net.ppp0
+If you use PPPoE, you should also create the symlink for the RFC2684
+bridge interface:
+ cd /etc/init.d && ln -sfn net.lo net.nas0
+
+The "debug" option adds some extra commentary from pppd regarding the
+connection to /var/log/messages, e.g.:
+"sent [LCP ConfReq id=0x1 <magic 0x7bea6ef1>]". It is wise to keep the
+option on permanently, due to its usefulness when debugging.
+
+Set RC_NET_STRICT_CHECKING="yes" in /etc/conf.d/rc, to prevent Internet
+services in /etc/init.d/ from starting before the Internet connection
+is established. Other options are to start/stop programs in
+/etc/ppp/ip-{up,down}.local, and to customize initscript dependencies
+as described in:
+ http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=4
+
+
+Starting the Connection
+=======================
+
+To start manually, with the modem connected:
+ /etc/init.d/net.ppp0 start
+
+To start automatically when the PC boots:
+ rc-update add net.ppp0 default
+
+
+Kernel Configuration
+====================
+
+The ebuild, during an emerge, checks that the required kernel modules
+are present.
+
+Note that in the list below, "[*]" means that the option is compiled
+into the kernel, whereas "[M]" means that the option can either be
+compiled into the kernel, or as a module. Compiling them into the
+kernel is recommended, to guarantee that the modules are already loaded
+when they are needed, and it will improve the bootup time by a couple
+of seconds.
+
+In "make menuconfig", you can press "/" and search on e.g. "eagle"
+to see exactly where an option is - the location of an option and its
+dependencies can change between kernel versions.
+
+Check that the following kernel options are configured as shown (this
+list includes the prerequisites, e.g. USB_UEAGLEATM depends on USB):
+
+ Code maturity level options --->
+ [*] Prompt for development and/or incomplete code/drivers
+ - CONFIG_EXPERIMENTAL
+
+ Device Drivers --->
+ Generic Driver Options --->
+ [ ] Select only drivers that don't need compile-time external
+ firmware (*unselected*) - CONFIG_STANDALONE
+ [*] Hotplug firmware loading support - CONFIG_FW_LOADER
+
+ Networking --->
+ [*] Networking support - CONFIG_NET
+ Networking options --->
+ [*] Packet socket - CONFIG_PACKET
+ [M] Asynchronous Transfer Mode (ATM) - CONFIG_ATM
+ [M] RFC1483/2684 Bridged protocols - CONFIG_ATM_BR2684 (only needed for PPPoE)
+
+ Device Drivers --->
+ Network device support --->
+ [*] Network device support - CONFIG_NETDEVICES
+ [*] PPP (point-to-point protocol) support - CONFIG_PPP
+ [M] PPP Deflate compression - CONFIG_PPP_DEFLATE (only useful if
+ compression is supported - rare)
+ [M] PPP BSD-Compress compression - CONFIG_PPP_BSDCOMP (only useful
+ if compression is supported - rare)
+ [M] PPP over Ethernet - CONFIG_PPPOE (only needed for PPPoE)
+ [M] PPP over ATM - CONFIG_PPPOATM (only needed for PPPoATM)
+ USB support --->
+ [*] Support for Host-side USB - CONFIG_USB
+ [*] USB device filesystem - CONFIG_USB_DEVICEFS
+ [M] (O or U)HCI HCD support
+ USB DSL modem support --->
+ [M] USB DSL modem support - CONFIG_USB_ATM
+ [M] ADI 930 and eagle USB DSL modem - CONFIG_USB_UEAGLEATM
+
+
+
+Troubleshooting
+===============
+
+Try "emerge ueagle-atm" again, because the ebuild checks that the
+required kernel modules are present (showing a warning message if
+appropriate), and creates the firmware files in /lib/firmware/ueagle-atm.
+
+If the modem is unresponsive, then run "/etc/init.d/net.ppp0 stop" and
+unplug the modem for 30 seconds, to drain its memory. Then reconnect
+the modem to the PC and run "/etc/init.d/net.ppp0 start"
+
+To check the modem's connection progress, run:
+ tail -f /var/log/messages
+/var/log/messages should show e.g.:
+
+pppd[nnn]: Plugin pppoatm.so loaded.
+pppd[nnn]: pppd n.n.n started by root, uid 0
+pppd[nnn]: Using interface ppp0
+pppd[nnn]: Connect: ppp0 <--> n.nn
+ADSL line is synchronising
+DSL line goes up
+ADSL line is up (nnn Kib/s down | nnn Kib/s up)
+pppd[nnn]: CHAP authentication succeeded
+pppd[nnn]: local IP address nnn.nnn.nnn.nnn
+pppd[nnn]: remote IP address nnn.nnn.nnn.nnn
+
+
+If the authentification fails, then check username_ppp0 and
+password_ppp0.
+
+If the ADSL connection is not established, then check the options in
+pppd_ppp0. "man pppd" explains all the options in that file.
+
+If the ADSL connection seems to have worked, but no websites can be
+contacted, then check that /etc/resolv.conf is populated, and possibly
+add the "usepeerdns" option (to use the ISP's DNS) to pppd_ppp0 in
+/etc/conf.d/net .
+
+If the problem is still not resolved, post to the Gentoo Forums at
+http://forums.gentoo.org/ and ultimately, if there is no answer,
+file a bug at http://bugs.gentoo.org/ .
+
+
+Compression
+===========
+
+Some ISPs require compression to be disabled in order for the
+connection to work, so the default configuration described above
+disables compression. Few ISPs support ADSL compression anyway. If you
+are lucky enough to have an ISP which *does* support compression
+(Google is your best friend for determining this), then compression can
+be enabled by following these steps:
+
+* Compile the kernel modules CONFIG_PPP_DEFLATE and CONFIG_PPP_BSDCOMP
+(only one is strictly necessary - pppd prefers "deflate" compression).
+Add them to /etc/modules.autoload.d/kernel-2.6 or /etc/conf.d/net above
+the "pppoatm" line, if they are not built-in.
+* Remove the following options in pppd_ppp0:
+ noaccomp nobsdcomp noccp nodeflate nopcomp novj novjccomp
+* Ensure that "debug" is in the pppd_ppp0 options, to check that
+compression is being utilized. Note that "module registered" in
+/var/log/messages only confirms that the kernel module is loaded -
+it does not indicate that the connection is compressed.
diff --git a/net-dialup/ueagle4-atm/metadata.xml b/net-dialup/ueagle4-atm/metadata.xml
new file mode 100644
index 000000000000..331b50f53b69
--- /dev/null
+++ b/net-dialup/ueagle4-atm/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-needed -->
+ <longdescription>Firmware and configuration instructions for Eagle USB E4 ADSL Modem driver
+available in kernels &gt;= 2.6.16.</longdescription>
+</pkgmetadata>
diff --git a/net-dialup/ueagle4-atm/ueagle4-atm-1.0.ebuild b/net-dialup/ueagle4-atm/ueagle4-atm-1.0.ebuild
new file mode 100644
index 000000000000..80b2ba00625b
--- /dev/null
+++ b/net-dialup/ueagle4-atm/ueagle4-atm-1.0.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils linux-info
+
+DESCRIPTION="Firmware and configuration instructions for Eagle USB E4 ADSL Modem driver"
+HOMEPAGE="https://gna.org/projects/ueagleatm/"
+SRC_URI="http://eagle-usb.org/ueagle-atm/non-free/ueagle4-data-${PV}.tar.gz"
+
+LICENSE="Ikanos"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND=""
+RDEPEND="net-dialup/ppp
+ !sys-kernel/linux-firmware"
+
+S="${WORKDIR}/ueagle4-data-${PV}"
+
+src_install() {
+ # Copy to the firmware directory
+ insinto /lib/firmware/ueagle-atm
+ doins *
+
+ # Documentation necessary to complete the setup
+ dodoc "${FILESDIR}/README"
+}
+
+pkg_postinst() {
+ # Check kernel configuration
+ local CONFIG_CHECK="~FW_LOADER ~NET ~PACKET ~ATM ~NETDEVICES ~USB_DEVICEFS ~USB_ATM ~USB_UEAGLEATM \
+ ~PPP ~PPPOATM ~PPPOE ~ATM_BR2684"
+ local WARNING_PPPOATM="CONFIG_PPPOATM:\t is not set (required for PPPoA links)"
+ local WARNING_PPPOE="CONFIG_PPPOE:\t is not set (required for PPPoE links)"
+ local WARNING_ATM_BR2684="CONFIG_ATM_BR2684:\t is not set (required for PPPoE links)"
+ check_extra_config
+ echo
+
+ # Check user-space for PPPoA support
+ if ! has_version net-dialup/ppp[atm] ; then
+ ewarn "Run the following command if connecting via PPPoA protocol:"
+ ewarn " euse -E atm && emerge net-dialup/ppp"
+ echo
+ fi
+ # Check user-space for PPPoE support
+ if ! has_version net-dialup/linux-atm ; then
+ ewarn "Run the following command if connecting via PPPoE protocol:"
+ ewarn " emerge net-dialup/linux-atm"
+ echo
+ fi
+
+ ewarn "To complete the installation, you must read the documentation in"
+ ewarn " ${ROOT}usr/share/doc/${PF}"
+}
diff --git a/net-dialup/wvdial/Manifest b/net-dialup/wvdial/Manifest
new file mode 100644
index 000000000000..4d4d71cca057
--- /dev/null
+++ b/net-dialup/wvdial/Manifest
@@ -0,0 +1,8 @@
+AUX wvdial-1.61-as-needed.patch 380 SHA256 87c2b863505acad847b93608c1aa242f4b262327fae6bb40eaaa5e53ff11f5f0 SHA512 5913c99a613344566e06c2cbb7402a1e2e92cb34c5eb8cfbef5e105107b6b2a04d067fcf93063ea6afcedacb2099ce8985b197b976877a851301587822d8f495 WHIRLPOOL 3c4399a0ea6ca077e78bede0cf1ed23850bc8ab9904241a66bf8ed00f130f3da406dfcc376f7ff470f05e14b5219420daca69e5881897679d81ebe2353dcdeee
+AUX wvdial-1.61-destdir.patch 782 SHA256 25946f420f3ab348d0d67340013a14dde29c32a5d163280e3d8cf73a8ab5f5a1 SHA512 6f1394922aa75ab97e7a589935157ac2f15ed79cf90fa4a2e3bfa0dbe60a6c3a8e072b152c292d1ff02352c2c230a692d35fe23723e3a8c98558db441f49fa22 WHIRLPOOL a7dcf725c20ef5cf2b3a2dc388b42b0329167a20b58c69e35eca280113430f5fb64e2b063e69646f19e71dd4c71ece5fe72afa184c2314a9275876950ca6c0ea
+AUX wvdial-1.61-parallel-make.patch 617 SHA256 b4e6538c2e1a83203700ae36cd5a44a8ffc8a3ffee34b1f9bd1ea2689df9b8de SHA512 bc8f425b0ca6511729bbe0d3b57d39bbc0fb08aa544d97ba577bc07b67bce3502fcdf86c4e298641e0d61a1432f05aa9dcc7cf3e728daa42944a50363cf2d6b6 WHIRLPOOL 7ad30aa0471841242aae6df2207c831c61c0b34e10a4afdfca572bab7bdd0b2b4b449c84b44cdc8562c5b870c71efd7447868b782ad90159a76b061c94dd3bf3
+DIST wvdial-1.61.tar.gz 94854 SHA256 4fffab9652c760199c074533d1d3929bea55ab4233b11e735b0f1856d1ceec57 SHA512 e949632583d889ad040c284f42c46790d247fffbc2d5e926c4b5836c970002f07741d26d052489bdc9c8144dcbb62a12851a3c275a5cecd5393d2722f43bb49a WHIRLPOOL 158579a1852eb33d6e0cf88b5ef984435d231bdf512246faf8e58891ec8cfa9e546d45f3e4160a151be7b95c9c5ccab66677f4ff077db918d1d0ae8e995e0d5f
+EBUILD wvdial-1.61.ebuild 987 SHA256 4e7a2c7ed605219be721cef2f810d34553392e6116c790509921b2e97052eafc SHA512 26758b6241850f44891d19ca5ab3bc0cc633bd6f15c2dfbd5275bcf390b1d5f829821b89f1bf9c7a28144da4e697c883a6395e4e0136181e4ba5e7b4248cf2f2 WHIRLPOOL 8f13bd848928910d59b8e7f617af53271d03d0d7f1c88f79459d3131a519b99f6a3e6a98d5b97cc406738bdfa647352ca4788623a3bbc0b743f5ed8bf8afc20a
+MISC ChangeLog 3058 SHA256 7cb83c0abdba70f3efa77832bf7c567c83f3ac923a6b44aed2cb89127d1e27dd SHA512 87a46b9dd6be37081fc69330bca9ef51cb5c21147ffb5048844397901476dce0dac154cd9394c64586e75ff970db407c6e2d3ca59c07a2f8388c396ce8d8a538 WHIRLPOOL 66e456c7532d99f85d9e9320cd3b02c33d4331466cbe661a859e6f9d1d14711152aca319db62c09496660854fcaa15cbb3b16a5d223c3d25258a724bdd991138
+MISC ChangeLog-2015 7712 SHA256 6b670e6dcde3e74fba2374453c1d5c38bb2cb5001a6a75f4a7da23438269b922 SHA512 f974965e10de1cf16a21cd2d956d4a2c1ac241580e3f8272963f328bfce25d8bd9c7141aa2ecc18103ba17e1329ac62f936ba7be1fc66bf84d4b2e9fda659492 WHIRLPOOL 55539d95c423b99c8a4e064cd51c572918bac91c19c19a1b025515e846282230b474fd776bb86903b55fb19cc871cf334478afa830ace6fb0d4d29b40b07312b
+MISC metadata.xml 289 SHA256 1a1127010cfc408d1db116ff564448f4de41213c5eca04d38615de7e45ab7994 SHA512 c9e1eca7327950313ac8d39abbf957e364084997857910dfe3653a105537ed0e074bff0b15732583270bace998faa5a1e0d9c572da10edf3c7d6cee20a7f7ab0 WHIRLPOOL 525bdb75a2d4fb9172d22efa474ccbbf1148e7c7207a7a670e3d79da9f58ef62115562a0d486cee7f4d5105dfbf4607844b1750ef7e706e02f6e93178b14dbeb
diff --git a/net-dialup/wvdial/files/wvdial-1.61-as-needed.patch b/net-dialup/wvdial/files/wvdial-1.61-as-needed.patch
new file mode 100644
index 000000000000..06c3ddd58a81
--- /dev/null
+++ b/net-dialup/wvdial/files/wvdial-1.61-as-needed.patch
@@ -0,0 +1,15 @@
+--- wvdial-1.60/Makefile.in 2008-12-14 17:18:25.000000000 +0100
++++ wvdial-1.60/Makefile.in 2008-12-14 17:20:13.000000000 +0100
+@@ -15,10 +15,12 @@
+ ifeq ($(PC_LIBS),)
+ $(error WvStreams does not appear to be installed)
+ endif
+ LIBS+=$(PC_LIBS)
+
++wvdial-LIBS+= -luniconf
++
+ BINDIR=${prefix}/bin
+ MANDIR=${prefix}/share/man
+ PPPDIR=${DESTDIR}/etc/ppp/peers
+
+ include wvrules.mk
diff --git a/net-dialup/wvdial/files/wvdial-1.61-destdir.patch b/net-dialup/wvdial/files/wvdial-1.61-destdir.patch
new file mode 100644
index 000000000000..ceea40054aa4
--- /dev/null
+++ b/net-dialup/wvdial/files/wvdial-1.61-destdir.patch
@@ -0,0 +1,35 @@
+=== modified file 'Makefile.in'
+--- a/Makefile.in 2010-05-27 13:08:26 +0000
++++ b/Makefile.in 2010-05-27 13:08:41 +0000
+@@ -3,7 +3,7 @@
+ WVPACKAGE_TARNAME=@PACKAGE_TARNAME@
+ WVPACKAGE_VERSION=@PACKAGE_VERSION@
+
+-prefix=/usr/local
++prefix=${DESTDIR}/usr
+ WVSTREAMS_INC=
+ WVSTREAMS_LIB=
+ WVSTREAMS_BIN=$(prefix)/bin
+@@ -23,7 +23,7 @@
+
+ BINDIR=${prefix}/bin
+ MANDIR=${prefix}/share/man
+-PPPDIR=/etc/ppp/peers
++PPPDIR=${DESTDIR}/etc/ppp/peers
+
+ include wvrules.mk
+
+
+=== modified file 'config.defaults.mk'
+--- a/config.defaults.mk 2010-05-27 13:08:26 +0000
++++ b/config.defaults.mk 2010-05-27 13:43:03 +0000
+@@ -13,7 +13,7 @@
+ LIBS_PAM=-lpam
+ LIBS_TCL=
+
+-prefix=/usr/local
++prefix=${DESTDIR}/usr
+ datadir=${prefix}/share
+ includedir=${prefix}/include
+ infodir=${prefix}/share/info
+
diff --git a/net-dialup/wvdial/files/wvdial-1.61-parallel-make.patch b/net-dialup/wvdial/files/wvdial-1.61-parallel-make.patch
new file mode 100644
index 000000000000..4c0c83709dd0
--- /dev/null
+++ b/net-dialup/wvdial/files/wvdial-1.61-parallel-make.patch
@@ -0,0 +1,20 @@
+--- wvdial-1.61/wvrules-posix.mk
++++ wvdial-1.61/wvrules-posix.mk
+@@ -85,12 +85,15 @@
+ $(AR) s $1
+ endef
+
+-CC: FORCE
++CC:
+ @CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
+ $(WVSTREAMS_SRC)/gen-cc CC c
+
+-CXX: FORCE
++CXX:
+ @CC="$(CXX)" CFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
+ $(WVSTREAMS_SRC)/gen-cc CXX cc
+
++#All files must depend on the above two rules. This is a godawful hack.
++$(shell find -type f '(' -name '*.c' -o -name '*.cc' ')' ): CC CXX
++
+ wvlink=$(LINK_MSG)$(WVLINK_CC) $(LDFLAGS) $($1-LDFLAGS) -o $1 $(filter %.o %.a %.so, $2) $($1-LIBS) $(XX_LIBS) $(LDLIBS) $(PRELIBS) $(LIBS)
diff --git a/net-dialup/wvdial/metadata.xml b/net-dialup/wvdial/metadata.xml
new file mode 100644
index 000000000000..0d0a7d6c0c4f
--- /dev/null
+++ b/net-dialup/wvdial/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type='person'>
+<email>jer@gentoo.org</email>
+</maintainer>
+ <upstream>
+ <remote-id type="google-code">wvstreams</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/wvdial/wvdial-1.61.ebuild b/net-dialup/wvdial/wvdial-1.61.ebuild
new file mode 100644
index 000000000000..4d9456e912da
--- /dev/null
+++ b/net-dialup/wvdial/wvdial-1.61.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit readme.gentoo-r1
+
+DESCRIPTION="Excellent program to automatically configure PPP sessions"
+HOMEPAGE="https://code.google.com/archive/p/wvstreams/"
+SRC_URI="https://wvstreams.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc sparc x86"
+IUSE=""
+
+COMMON_DEPEND=">=net-libs/wvstreams-4.4"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+"
+RDEPEND="${COMMON_DEPEND}
+ net-dialup/ppp:=
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-destdir.patch"
+ "${FILESDIR}/${P}-as-needed.patch"
+ "${FILESDIR}/${P}-parallel-make.patch"
+)
+
+DOC_CONTENTS="
+ Use wvdialconf to automagically generate a configuration file.
+ Users have to be member of the dialout AND the uucp group to use
+ wvdial
+"
+
+src_configure() {
+ # Hand made configure...
+ ./configure || die
+}
+
+src_install() {
+ default
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}
diff --git a/net-dialup/xc/Manifest b/net-dialup/xc/Manifest
new file mode 100644
index 000000000000..50eb7a23c430
--- /dev/null
+++ b/net-dialup/xc/Manifest
@@ -0,0 +1,10 @@
+AUX xc-4.3.2-add-115200.patch 200 SHA256 27a3c936fb4e76f390214d8ab77998c3c7509ca04486bb62e08dc9a8bb0f20eb SHA512 ac693123b6e7f7b65d23878f88eeae2b867ca931383deb40d2c128c6d2e7222c5a3136f07508cb58b275851e2bf04def86fc663edc25d94c564796df1702a2c8 WHIRLPOOL 2854ddf5503d0c2a408953c143b2408145a75a7e8d7372ac0995a718eedc6b3168631e3e9ee84bd0da37656b4c2091423f111e18385fbae43200d98a8f05a219
+AUX xc-4.3.2-fix-set_bps-overflow.patch 418 SHA256 8b27f756cfc781a432107efb62fb21be8402f97b5810d688c044669bd7562612 SHA512 639f9b062a174e9217a79d3a17d96869635ebea66bcccb63501f57c5f0b0216311772431a7bf850eb38d14726ec7a02cc2affeac1f4f9fd8a0ccc0a7525beb65 WHIRLPOOL bcb7f3269392d6d1adaec2069d1c0882d8ef76deea1cff4613cb382a9a573b7dc587857a737d5e81d65ec4b29d7f8b3aeeb3ad6a215db1a8d4ba947bb4c44bb0
+AUX xc-4.3.2-gentoo.patch 3222 SHA256 d454159eb7ce1a4a4a37fdf5914396b915ab6167201f0d80dca52872aea7a72c SHA512 543d21ff9b6f37bcfcaf9b7d8e700761cc9e3e92cc229d500275c92d7377640293648b48e8d424716bbc0b7b08ec416a75244e6a661b3d54cee68cbd5d838efc WHIRLPOOL 015324eac0d2efb42ab32e0ae0ca0b5db3518505aaaf87c7133cb1b1f307c3e8e87e1df24cb7c562941d8cc0386e59fcef957ea2f1ed4af9f3d239a6a07108b7
+AUX xc-4.3.2-implicit-decl.patch 434 SHA256 685889f442b68bbd59aa04173635d15c7685c3e261aaca16e12a6fa4c2ed6168 SHA512 5c470a0b936576a3c90ca84317f4b1237855e475a5c63b62e94f55f2dc7f1c5561fa512ae1a46fa5b9d9df146abd1e58f04399b6b04c6fadf2a12cd6665855a6 WHIRLPOOL ba31bc1961109d667240b028e07c21632b77011d26e0444e1cd7ae6f67f8995f073dd96b2b049461e770b0ef1e88fc8add9f3b438c76f7dd123d10e436216de8
+DIST xc-4.3.2.tar.gz 162098 SHA256 7e90ff0b89b646e1c8625fc675e6b33d244ab332a052ddd2daed825719e59461 SHA512 89de05a82f54ffd89a6950f9cb4aea732573ac1b15a27aaba4e25293a5d0b763052287700e4499f7f2adf9acc952ecea572239c8403c86c5871efd363d68710a WHIRLPOOL 98a62921c553d7507cdc052d01f50a99d62c8221149ad7a09a25faf6af4d139ee4f0a74433a0f4f8c053c29aafc5f70294551efa13830aa20516a9d40af028b4
+EBUILD xc-4.3.2-r3.ebuild 990 SHA256 e8db99788dc6f5cf075567e20d37b2e7a864b28ff6980067cfdb4f5c62a2a8e0 SHA512 0f14f2cf4c7103fb0db9926496edee7009f60f4aab5f22f4cf37d5e5f2dc667ac5db3cfc8c438eaa07a64c1f9875e13cc10cf3e5ad957d853541e718d4a0d9d5 WHIRLPOOL 09160e6a2289ac23a1fbf53c4eaf2ad68db04fd25fc2a43e0787ea29ca88058df5201f9a7533f2cd4a50ec89e88e76cc5dd3956b79210223eaab175bf4f27d05
+EBUILD xc-4.3.2-r4.ebuild 1044 SHA256 7b4f17860ee747438ab0e5308c7af405c535a646f5d3d8eb6ccc32a93c4fd2a2 SHA512 3b9b605f19d4060b3b4004e50883d75ee8772e35c5afca4b7d1d4d23fd169589cc0ee372a6a8883eec1d6038b52108b8da20623d8091b77a1cb4bdc2b1f66f89 WHIRLPOOL 973e4c64df95d1ba21751bdbff33e568f028f0da8c32998096bbecf928db34e540ad68110e4c6e11f33fc356ed012f990038f726b3d2058f84a2d4773bcffe31
+MISC ChangeLog 3063 SHA256 c6bac8b10aab21ae337564b9cf4d2b0295e02cc0e33c12f13d59fc5b85009e3c SHA512 a7b6ed79465c9c730693312aef934679b67ec1f2a275b12664169cbb27f37b370ec1d8b69a48d2b4a464f456675cbe3626c326ea32f23e4aac6562eab99a61a7 WHIRLPOOL ecd1d9610d03a724f5bda9d5aecdd719d3e4df25dbd5e171408683ea4ace801044759bb6ea93e43d1d71986982337c173625e4bdd6e3b9387e186d6e14523632
+MISC ChangeLog-2015 5127 SHA256 45e3fe31d1d4c1c8dbf88c7cd521f1a04184607874090ee455d4c047b748986a SHA512 7d3b8c2cb8b26ca5ea78af47deb7b8a394e020197dd5b2b446b7e5c86ca2eb9ad253f09335bd8908bcfda37ddbe254cb8262583229fbdb550a4ddec379bec977 WHIRLPOOL a6c1dbbe0ff6f1b80b53f2ea49efe63a6b58e5c8f6c9fa0fc8b695d7a63a4a42f427b2693df84af300a087a3a802fceebc8357141f53c64b14f63c357bca03a6
+MISC metadata.xml 358 SHA256 be6db33cb3af9c2b91ee937b7b82fc0b1fb0544bd52bb1eabae8dad2ad726ee1 SHA512 4d695e92ba66886be964c96cabd894ef44cc93d62f053422f14909b953bf7bcf9321fcb745c33d5af716308f61df3154c1eadb78ce306439463cd2ee6528f6f0 WHIRLPOOL 4945deb3357c8d5f57d06961de84f83c3a9e7beb17cb3a9d27d391bfe82c236bc118f3e2ba7a819645469b7c9a8e335d1820a2e77a1b14c64eeb51256aa7f20e
diff --git a/net-dialup/xc/files/xc-4.3.2-add-115200.patch b/net-dialup/xc/files/xc-4.3.2-add-115200.patch
new file mode 100644
index 000000000000..c8238565ac0b
--- /dev/null
+++ b/net-dialup/xc/files/xc-4.3.2-add-115200.patch
@@ -0,0 +1,12 @@
+add support for 115200 baud
+
+--- xc-4.3.2/xcport.c
++++ xc-4.3.2/xcport.c
+@@ -107,6 +107,7 @@
+ {"38400",38400,B38400},
+ {"57600",57600,B50},
+ #endif
++ {"115200",115200,B115200},
+ {"0", 0, B0}
+ };
+
diff --git a/net-dialup/xc/files/xc-4.3.2-fix-set_bps-overflow.patch b/net-dialup/xc/files/xc-4.3.2-fix-set_bps-overflow.patch
new file mode 100644
index 000000000000..5934aa2f6d77
--- /dev/null
+++ b/net-dialup/xc/files/xc-4.3.2-fix-set_bps-overflow.patch
@@ -0,0 +1,14 @@
+diff -Naurp xc-4.3.2.orig/xcmain.c xc-4.3.2/xcmain.c
+--- xc-4.3.2.orig/xcmain.c 1996-11-24 01:35:41.000000000 -0500
++++ xc-4.3.2/xcmain.c 2014-04-18 19:58:26.267227496 -0400
+@@ -696,8 +696,8 @@ static void
+ SET_bps()
+ {
+ if (statflag){
+- char br[6];
+- sprintf(br, "%d", mrate( NULL ));
++ char br[11];
++ snprintf(br, 11, "%d", mrate( NULL ));
+ fprintf(tfp, statfmt, "bps", "Bits per Second", br);
+ return;
+ }
diff --git a/net-dialup/xc/files/xc-4.3.2-gentoo.patch b/net-dialup/xc/files/xc-4.3.2-gentoo.patch
new file mode 100644
index 000000000000..7c0c559958d9
--- /dev/null
+++ b/net-dialup/xc/files/xc-4.3.2-gentoo.patch
@@ -0,0 +1,122 @@
+--- xc-4.3.2/Makefile
++++ xc-4.3.2/Makefile
+@@ -5,21 +5,24 @@
+
+ SHELL = /bin/sh
+
++DESTDIR =
++
+ #WARN = -Wall -ansi -pedantic -Wshadow -Wmissing-prototypes
+
+ #machine = -m486
+-CC = gcc
+-GCCOPT = -pipe -O2 -fno-strength-reduce -fomit-frame-pointer $(machine)
++#CC = gcc
++GCCOPT = -fno-strength-reduce
+ #GCCOPT = -O -g
+-CDEFS = -D_POSIX_SOURCE=1
++CDEFS = -D_XOPEN_SOURCE
+-CFLAGS = $(WARN) $(CDEFS) $(GCCOPT)
++CFLAGS += $(WARN) $(CDEFS) $(GCCOPT)
+
+-prefix = /usr/local
++prefix = /usr
+ bindir = $(prefix)/bin
+ libdir = $(prefix)/lib/xc
+-mandir = /usr/man/man1
++mandir = /usr/share/man
++man1dir = $(mandir)/man1
+ catdir = /var/catman/cat1
+-manown = -o root -g man
++manown = -o root -g root
+ binown = -o root -g root
+
+ export CC CFLAGS manown binown
+@@ -37,7 +39,7 @@
+ # gs -sDEVICE=ljet4 -dNOPAUSE -sOutputFile=$@ $<
+
+ INSTALL = install
+-LDFLAGS = -ltermcap editline/libedit.a
++LIBS += -lncurses editline/libedit.a
+ NROFF = groff -mandoc
+
+ # defines for use with cextract under Linux
+@@ -56,7 +58,7 @@
+ @echo "Now you may execute 'make install'"
+
+ xc: $(OBJS) eline
+- $(CC) $(CFLAGS) $(OBJS) -o xc $(LDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o xc $(LIBS)
+
+ uninstall:
+ rm -f $(bindir)/xc $(mandir)/xc.1 $(catdir)/xc.1.*
+@@ -64,10 +66,9 @@
+
+ install: ./bin/xc ./bin/crc xc.1 crc.1
+ @echo " "
+- $(INSTALL) $(binown) -m 755 -s ./bin/xc $(bindir)
+- $(INSTALL) $(binown) -m 755 -s ./bin/crc $(bindir)
+- $(INSTALL) $(manown) -m 644 xc.1 $(mandir)
+- $(INSTALL) $(manown) -m 644 crc.1 $(mandir)
++ $(INSTALL) -d -m755 $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
++ $(INSTALL) $(binown) -m 755 xc crc $(DESTDIR)$(bindir)
++ $(INSTALL) $(manown) -m 644 xc.1 crc.1 $(DESTDIR)$(man1dir)
+ @echo " "
+ @echo " "
+ @echo "You will want to manually install 'phonelist' and"
+--- xc-4.3.2/xcsubs.c
++++ xc-4.3.2/xcsubs.c
+@@ -23,7 +23,6 @@
+ *tgetstr(), *tgoto();
+ int LI, /* One less than screen length in termcap entry */
+ CO; /* Screen width */
+-speed_t ospeed; /* Used by termcap lib */
+ static char tc[LG_BUFF]; /* termcap buffer */
+ static char tbuf[LG_BUFF], *CD, *CF, *CL, *CM, *CN, *AE, *SE, *SO, *ME;
+ char *CE, PC; /* used by termcap -- padding character */
+
+limit the 32bit crc to 32bits
+
+add simple usage
+
+--- xc-4.3.2/crc.c
++++ xc-4.3.2/crc.c
+@@ -152,7 +152,7 @@ char *name;
+ }
+ crc32 = oldcrc32; oldcrc = oldcrc32 = ~oldcrc32;
+
+- printf("%08lx %7ld ", oldcrc, charcnt);
++ printf("%08lx %7ld ", oldcrc & 0xffffffff, charcnt);
+ if (Block == 128)
+ printf("%5ld+%3ld ", charcnt/Block, charcnt%Block);
+ if (Block == 1024)
+@@ -170,6 +170,10 @@ char **argv;
+ {
+ register errors = 0;
+
++ if (argc == 1) {
++ puts("Usage: crc [-x|-k] <files>\n -x pad to 128 bytes\n -k pad to 1024 bytes");
++ exit(0);
++ }
+ if (argc > 1) {
+ if (!strcmp(argv[1], "-x")) {
+ Block = 128;
+--- xc-4.3.2/editline/Makefile.orig 2013-03-02 21:15:29.667344872 +0400
++++ xc-4.3.2/editline/Makefile 2013-03-02 21:15:38.434344313 +0400
+@@ -34,7 +34,7 @@
+ LDFLAGS = -ltermcap
+
+ ## Set ranlib as appropriate:
+-RANLIB = ranlib
++RANLIB ?= ranlib
+ #RANLIB = echo
+
+ ## End of configuration.
+@@ -70,6 +70,6 @@
+
+ libedit.a: $(OBJECTS)
+ @rm -f $@
+- ar r $@ $(OBJECTS)
++ $(AR) r $@ $(OBJECTS)
+ $(RANLIB) $@
+
diff --git a/net-dialup/xc/files/xc-4.3.2-implicit-decl.patch b/net-dialup/xc/files/xc-4.3.2-implicit-decl.patch
new file mode 100644
index 000000000000..556392d8b189
--- /dev/null
+++ b/net-dialup/xc/files/xc-4.3.2-implicit-decl.patch
@@ -0,0 +1,22 @@
+--- xc-4.3.2/crc.c
++++ xc-4.3.2/crc.c
+@@ -5,6 +5,8 @@
+ * Crc - 32 BIT ANSI X3.66 CRC checksum files
+ */
+ #include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
+ #define OK 0
+ #define ERROR (-1)
+ #define LINT_ARGS
+--- xc-4.3.2/xcterm.c
++++ xc-4.3.2/xcterm.c
+@@ -4,6 +4,8 @@
+ #define XCTERM_C 1
+
+ #include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
diff --git a/net-dialup/xc/metadata.xml b/net-dialup/xc/metadata.xml
new file mode 100644
index 000000000000..1ee4d878300b
--- /dev/null
+++ b/net-dialup/xc/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>kumba@gentoo.org</email>
+ <name>Joshua Kinard</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>embedded@gentoo.org</email>
+ <name>Embedded Gentoo</name>
+ </maintainer>
+ </pkgmetadata>
diff --git a/net-dialup/xc/xc-4.3.2-r3.ebuild b/net-dialup/xc/xc-4.3.2-r3.ebuild
new file mode 100644
index 000000000000..5b5159d399cc
--- /dev/null
+++ b/net-dialup/xc/xc-4.3.2-r3.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="Modem dialout & serial terminal program"
+HOMEPAGE="http://www.ibiblio.org/pub/Linux/apps/serialcomm/dialout/"
+SRC_URI="http://www.ibiblio.org/pub/Linux/apps/serialcomm/dialout/${P}.tar.gz"
+
+LICENSE="xc-radley"
+SLOT="0"
+KEYWORDS="amd64 ~mips ppc ppc64 sparc x86"
+IUSE=""
+
+RDEPEND="sys-libs/ncurses"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ epatch "${FILESDIR}"/${P}-implicit-decl.patch
+ epatch "${FILESDIR}"/${P}-add-115200.patch
+
+ sed -i \
+ -e "/^libdir/s:/lib/:/$(get_libdir)/:" \
+ -e "/strip/d" \
+ Makefile || die
+ # bug 459796
+ append-libs "$($(tc-getPKG_CONFIG) --libs ncurses)"
+}
+
+src_compile() {
+ tc-export AR CC RANLIB
+ emake WARN="" all
+}
+
+src_install() {
+ default
+ insinto /usr/$(get_libdir)/xc
+ doins phonelist xc.init dotfiles/.[a-z]*
+}
diff --git a/net-dialup/xc/xc-4.3.2-r4.ebuild b/net-dialup/xc/xc-4.3.2-r4.ebuild
new file mode 100644
index 000000000000..18c1e5a746db
--- /dev/null
+++ b/net-dialup/xc/xc-4.3.2-r4.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="Modem dialout & serial terminal program"
+HOMEPAGE="http://www.ibiblio.org/pub/Linux/apps/serialcomm/dialout/"
+SRC_URI="http://www.ibiblio.org/pub/Linux/apps/serialcomm/dialout/${P}.tar.gz"
+
+LICENSE="xc-radley"
+SLOT="0"
+KEYWORDS="amd64 ~mips ppc ppc64 sparc x86"
+IUSE=""
+
+RDEPEND="sys-libs/ncurses"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ epatch "${FILESDIR}"/${P}-implicit-decl.patch
+ epatch "${FILESDIR}"/${P}-add-115200.patch
+ epatch "${FILESDIR}"/${P}-fix-set_bps-overflow.patch
+
+ sed -i \
+ -e "/^libdir/s:/lib/:/$(get_libdir)/:" \
+ -e "/strip/d" \
+ Makefile || die
+ # bug 459796
+ append-libs "$($(tc-getPKG_CONFIG) --libs ncurses)"
+}
+
+src_compile() {
+ tc-export AR CC RANLIB
+ emake WARN="" all
+}
+
+src_install() {
+ default
+ insinto /usr/$(get_libdir)/xc
+ doins phonelist xc.init dotfiles/.[a-z]*
+}
diff --git a/net-dialup/xl2tpd/Manifest b/net-dialup/xl2tpd/Manifest
new file mode 100644
index 000000000000..62d1511f0bf9
--- /dev/null
+++ b/net-dialup/xl2tpd/Manifest
@@ -0,0 +1,22 @@
+AUX xl2tpd-1.3.0-LDFLAGS.patch 387 SHA256 c240a4e47775f8037c840a8b2ccaefb29ecca610f4c5d65e4effebec9694cd5d SHA512 e388638b623cae4464bd6946b81682ef8a41c50dd3b93d64a9888e94ff34a7e97db1b34b2c950b3e73a783024e5542ce4d18e63c2465787cc25c0a4e8f28f39e WHIRLPOOL 216d7824dac75fc2946ca2ee1c481a33a6932770f54f7adf906fb368c58a5b5289ee6d78bf13ed60d4dfd9b375072edf560cfcaa0269135d891887ee8ac4822c
+AUX xl2tpd-1.3.1-CFLAGS.patch 522 SHA256 c3afc76cd539d8b450ebbd2bf29ca5600599e842baa6a1046bde56c13744ffd3 SHA512 f8b9b684f92104d1d3f1db1784d2961b537ef204ba426ff7d277a23b564137a5ab42a3db2f9b9259f45cfadbe528bfb0588fb69cbde2e0193be508d6e1786451 WHIRLPOOL 19bfa625869699e3c631d146bf2900cf11c1bd12df7b87e3e4018ae471354088a4ad573f050d767064c202c558dadb51af3ea1bc3a620a1470638f74536ede94
+AUX xl2tpd-1.3.1-kernelmode.patch 12375 SHA256 5c776962eb66e11f98a96f61a9bc01070b0dc060b92098f5f6ac97f5d7ee7c69 SHA512 05ba1380a96dfc3e9ed90fff2ef3746e5b3f835f77220723a702a7581e2b6638e58d0dde3833c2f4f91043322a14a05f8fb5b412ba13d7f879af9452f3e94696 WHIRLPOOL 3a8487978a6a604dd0cadb60a95604659979aa26adb5558ff021af4e05fea205c07dbaf621a56f8e1f618fcfa97e0f61bb4bc4235d7f264578631514980eb1ee
+AUX xl2tpd-1.3.1-no-type-punning-b119c0da.patch 849 SHA256 20d446b8ad52b18212bbaed3386dc9f1a530252a84d0d5519490307e0d88f8d0 SHA512 3d1229f47bb0b5ea0817f1cacc6870221179d43f1602ca71af6bdbf74d3b36d4267482d0767344c0bde51f0d967ed3b2045adde6e4dc02d4baf11f7977d41b8f WHIRLPOOL a62c1b03d256a00d9bcc56ca9cf9da6074dc902b274cbe2073917dd86f34f80fc955e64eea91e3c7b531fe80c3a5a28bb7a7cb899520b43a9886bdb777d93d67
+AUX xl2tpd-dnsretry.patch 1509 SHA256 ac398be2d5fb67cc7c5e5b7247572d89cde85b2dc988e4e99c470afddfc5860c SHA512 7999c8e990f7bcd620042295e5fc6e12cf4b1e4faf7cd560bdd4ade4103b171e76a06cb11caea0046b8141a4fa9592bd8851f933072c5e7f71d8b1f4b6fb2bbd WHIRLPOOL e584d4b46dc6249d41b8228246f856ca263c9c3b6713bbb953b17d3265653ee4e45a582f1e2c80f3ad33a0369ed59ddfab50e4c1b5bab9e3be22814c3d034880
+AUX xl2tpd-init 617 SHA256 2d1bc2be1860674812ce81a3571e67c988f423a6bfd52ff2bfc5be680f2d4871 SHA512 c1a66ae80ee87e31bb1a1f81ee353d32a454092af4a11948de52a871f79e43b60169b250c3fa79ee8e93d8d3b93a7dd680fc4b9989470e707e9b4fd9534250de WHIRLPOOL 5c9a33eca5c34d26569cba38650416153bd7ca602b71079496368bfc48c55c5aa8c9f76da137ff8c235aa7f627ec66073c69ec49107e1a7cf92434f7460abfa9
+AUX xl2tpd-init-r1 272 SHA256 60309d44bd9256a695d180cba1a88a752c955d2d8c973b77d3fbf1cb03ad0ef5 SHA512 80235d4084963f9285fc11f30ca648ebe4a23e3f74e41fddb81d6fdc08808b1772163192f61f56c677c3003f10809f7d014ddeaa427eabfad490106ac7e14f67 WHIRLPOOL 790bdfffb6bb237f7fe1364411fccd528456e95191555ea6bf72f194dbd8dba1a5593e76ee7576f2dc6f310c93641a6ae3b7538c37665a01ca52a154d083939e
+AUX xl2tpd.conf 18 SHA256 9e6280cf9dbd14036dccc3c40a3f9acc65efe279f6c46d7edc1f786adf6f6e6d SHA512 0b3c6d4784b997d12734fe1e5165dc066269db24608638566c0fc317c1927331ed806fdb7a4f816bd16d1f22046b52badd99c2f0977c157b2b3f3ed42071ae42 WHIRLPOOL baedb7e8e2568dad9953894085d2290ce96b5a7c3393b4b4f69cc439a0e2cfe15bda0c505a83c5d0672fa07c4e83eac72ed80e858a28c371409914e3546904e5
+AUX xl2tpd.service 232 SHA256 fa82928fbd632a1c3f2897f371b178b055cee4dd1e46248fd64887e65c1b8e15 SHA512 184b4f63492c5a09fa61ebf0913a4a47e1cd3b321b80b122f2177ff8f5c9eccdc4a73831dfffc3c2e39325f5cb0b30c4e3f99c1f0fed1f21935be5da38a83579 WHIRLPOOL b5fa9a92fc399fb2126109694f5f9539f5985c082ec32f13b8a0959bd5c9146761fefd8ff2e2ecbbd084c6609d3d7579dc47da0a29852d1936be8d6ad27efd43
+DIST xl2tpd-1.3.1.tar.gz 551923 SHA256 147ea96a957628bc31bba6fd5f5ef5522366691f936ce4c0a0988d9876e3ba14 SHA512 2265a19eda1521fd4314ad1b28cc1bb781d2f0edb06ad619afbb364f5896e23db7e444ac10709c1ae9b9ac648e4354aea7af57bb5bc20b706b00e2a131fc29d6 WHIRLPOOL b5465605ae5c3bbf73227f11958a43c66191bb557447ce224de044358e738331cf8e64e783bb5527517683cbcc59d57df9cc17c990f652fe7aed1ab2cfd7f9b2
+DIST xl2tpd-1.3.10.tar.gz 510777 SHA256 48bbc86b448a51bf167f1e04d10e2b97f9e928da42eb0dd455b419ef0522d1c3 SHA512 304b8cd098608a866d32c65c55ba98a01e10abb473d8bff488c723fd1f6d4a66cf98c6d3044f7986a334739693767608c48999f873e95a51f0fa6c23cb61ecd4 WHIRLPOOL a1912740ebf1aeae3e2133443b92bbe28db91937701796ee8136009522ca1e7416d6a406182a820fee0c68904fb6f07556e618749613f96c7e8b2ae240a1d669
+DIST xl2tpd-1.3.6.tar.gz 553981 SHA256 49b069aa8d873e1d8f615ccc4212351e427bf681ba453fdd211256a8345bb7fb SHA512 868c65660e6a45fb8dc22b95542e9d6ca0dc8e5033cc9df04171a651ef273bc5d711a85f61d4a971d714089f7a10ee67460d8ab9f3c007fcffe0e11e81ae0bfd WHIRLPOOL 92bf661e0ae95bcf80cb8b8c5c9c8648d3aa5375a9dc598f0f4fa3be3bce2bc9a36a60eabf44da3dad24fb3f2b03e30b960d73e6a16c51c8ea25397639766328
+DIST xl2tpd-1.3.9.tar.gz 510538 SHA256 62f683ab4cda2941261e37828f2939b5a2e85b437e9a3cd86bbd660c26e04a1e SHA512 858e342e3f5b9c460c8fd041cb2873c79dbb9fbef1e5caf8c367a6c74ca175c2a020a4b152757892c24950eebf701324c0ba682eafd23cd370d36da7118cb3d9 WHIRLPOOL 186ed1f8729eacbf6aa35ac0af97fdf1124ff85cebd119ba0d7f6d303fbfa3292fb7c247c3308743fd2785de0ebaa8fd7adf7801b6f4db8102abf9211f84732a
+EBUILD xl2tpd-1.3.1-r2.ebuild 1585 SHA256 88c112b2ee71092dfb26cc18e3ef51e45aa8f4092e615e4006fad87516c65015 SHA512 4c98a2b83d51a08045d8921c0f2390b3f79dbcc48b67601e51a13c3a1e047a6fd07db880df53428b7a17dcb4375ca1748f1467b9119ded5954c9f7ddff22df64 WHIRLPOOL 8e863ef51faa4887c535cc1f7de774d6cd3c6ab030300f40a580b5b80248eab2fd63f2858b4e383b1f835ab86afd8ca07c4d979c49b4778546a2051cab4e71d4
+EBUILD xl2tpd-1.3.1-r3.ebuild 1641 SHA256 f99aa027978f0f7ee40e19eae8e381be5e1ae3a133db85a9736f51ae970f724b SHA512 cd6af025e51af02060f5408ee7550bd9af5be0db2d4bcc8c5e37342572a2416e7754f91c6df9c1beea7ba3b077d9aadf2ec4ebb5e64a922d575d46c7bf4db78d WHIRLPOOL 282565842b7035caaba93644f80e1a6eba3458b17422008172734ebc542aafd43e50f1c79c8a85c0558d43b1fe3b0dac2cc74f03b412e5109dcb2acf521312fd
+EBUILD xl2tpd-1.3.1-r4.ebuild 1646 SHA256 92134978feb7f85f8e28fb376d780479c75ea49107df854b76847834fb9fa669 SHA512 10a1cf9ca036b556ae0468846105eb18c197e18b8524cb525e1023d830b398398e9d7c0b88155379c0f4d042a8469f11f336b71f8c48885e3db109baba817273 WHIRLPOOL edb0fffbd355e6c56f9047147668972418f63e373fd9ca7718040979f7fcb6b8e9b0d834ebe7de69ac1206059747a12c6baf33583885a904bb42477643621e50
+EBUILD xl2tpd-1.3.10.ebuild 1428 SHA256 6078f0e68ef0fcbcb61da854b2acffd81e37628a3676507955c74bb6c97f0efb SHA512 468fc0a9222904f2db0f3ea985d146508af6a6e13183703be733317895fe9db0889408743b204d0754f95835c906e9c4451a23c84a172afc720e53ea55420c95 WHIRLPOOL 5f724f33017b320260f4ba343bb16796d29740daa3ead4ea0a8cc075616ccd3b681ba0c4b4507409fbb6e48e0a01bbc37fd399e401507c55135fde0804fe66e1
+EBUILD xl2tpd-1.3.6.ebuild 1344 SHA256 5631346059fcfdf73b43ffb3981b03ca907b4ef9e0b02967b1bc2acd94784a81 SHA512 7f12712ad899f57b32b8533340c0e57cfcb8907f5031715e548c9286b1ae4b77c0486c547355f0beadba267aa945169f9149b078373cbd8f5a82d0547ca1f58b WHIRLPOOL 3055e392467896cb4e3b3e6080c38bff5f3526b3defa61c732cf3f5931c359b41a0dcac1295f5a7f0132610ab9cc93621d7837e4d01274bf3330aee0143ba59c
+EBUILD xl2tpd-1.3.9.ebuild 1429 SHA256 258b5f7afb0ab17f8ff9b20273096e7ff574ec4ac017a23dc0c83ddd37a9cbba SHA512 2e54802e5bd813dbb4e27bb7a474667fef31f6239659780d7eadca93cc331305ddce0df7814f6f7504ee93a1b2cb9d2d0046dd676c72937299c23d121ab0ab90 WHIRLPOOL 61acc26b38ac66f0035b9e0e3e1f444213fba0251538c26a1c8f4e24900b6dd84b60983b0918fb67bbfeb86816f9798be8b5e0822a267c559a1c6612f0a0d477
+MISC ChangeLog 3033 SHA256 7f4d2d32b3494039425dc65483703afcca760d66ec6238cc2d9b9b1277953d07 SHA512 35c61c2a7ecd16762acd245168906b551f817b838a34cd16fe5fc9f88a99f8a8891b560ae2037306d65065075cdb06d214509b54b5dd9261bbc4e04414568e9a WHIRLPOOL 570bff028d7fd04fc5988de2f360e1ff37d2e027364c51202277c270cfe84c05576fc8f0938cb89bb035c0bb3a4cd9c57b0cef4bc6ab54c79672d9d1a0a896c2
+MISC ChangeLog-2015 7995 SHA256 1afc60e0e6060cf9b32bb9ed8c8fd1af5214185937c16efe777d31f05841eb7e SHA512 b263ce817e4b2abc82345b0547623f00f988af611f5853a8b5c23a4a06ba673c3470e6b8513d637bc27c48a3667a5bdcfde809c92e841e0cf670254d610989b9 WHIRLPOOL 32bee86c8cc11ba86d3a941ce10af30329b76b4dc7cb3d688a73c208beef7fcfc570a253c8d6920c47610aeab026ba4bbfe8339d63473971bde8b9172bf1671f
+MISC metadata.xml 956 SHA256 ef85f34123c3666f5377942563a185e14618620553715798ad589e058eba55af SHA512 22a1d2541c0bd7e46a54a75d4199233d216b2678bc7c60b0c0c29d2cfc1c9f6320afb22611e1f4fd1b1801fb2084d565a79cb3eeaa5092d9e836a8fdf3dcc9cb WHIRLPOOL d183aada3327b13bd2b4e8b4bc7ecc6695c0375234d28145776f14c30c3b08e2d23ba16fca1e9dc2b4b8517230099a267560bf06b38692e7a882fac11a22a82a
diff --git a/net-dialup/xl2tpd/files/xl2tpd-1.3.0-LDFLAGS.patch b/net-dialup/xl2tpd/files/xl2tpd-1.3.0-LDFLAGS.patch
new file mode 100644
index 000000000000..8203e51ebc1f
--- /dev/null
+++ b/net-dialup/xl2tpd/files/xl2tpd-1.3.0-LDFLAGS.patch
@@ -0,0 +1,15 @@
+"Submitted" upstream: https://github.com/xelerance/xl2tpd/pull/4
+
+=== modified file 'Makefile'
+--- Makefile 2011-09-20 04:44:23 +0000
++++ Makefile 2011-09-20 04:44:35 +0000
+@@ -114,7 +114,7 @@
+ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
+
+ $(CONTROL_EXEC): $(CONTROL_SRCS)
+- $(CC) $(CONTROL_SRCS) -o $@
++ $(CC) $(LDFLAGS) $(CONTROL_SRCS) -o $@
+
+ pfc:
+ $(CC) $(CFLAGS) -c contrib/pfc.c
+
diff --git a/net-dialup/xl2tpd/files/xl2tpd-1.3.1-CFLAGS.patch b/net-dialup/xl2tpd/files/xl2tpd-1.3.1-CFLAGS.patch
new file mode 100644
index 000000000000..b069a9a4822d
--- /dev/null
+++ b/net-dialup/xl2tpd/files/xl2tpd-1.3.1-CFLAGS.patch
@@ -0,0 +1,19 @@
+commit 898e8541804d0f5a6475b27f8ca5e57cf282208f
+Author: Mike Gilbert <floppym@gentoo.org>
+Date: Tue Dec 25 16:05:33 2012 -0500
+
+ Respect CFLAGS for xl2tpd-control.
+
+diff --git a/Makefile b/Makefile
+index 2a0f341..d694246 100644
+--- a/Makefile
++++ b/Makefile
+@@ -115,7 +115,7 @@ $(EXEC): $(OBJS) $(HDRS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
+
+ $(CONTROL_EXEC): $(CONTROL_SRCS)
+- $(CC) $(LDFLAGS) $(CONTROL_SRCS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) $(CONTROL_SRCS) -o $@
+
+ pfc:
+ $(CC) $(CFLAGS) -c contrib/pfc.c
diff --git a/net-dialup/xl2tpd/files/xl2tpd-1.3.1-kernelmode.patch b/net-dialup/xl2tpd/files/xl2tpd-1.3.1-kernelmode.patch
new file mode 100644
index 000000000000..5ce9b1244c76
--- /dev/null
+++ b/net-dialup/xl2tpd/files/xl2tpd-1.3.1-kernelmode.patch
@@ -0,0 +1,361 @@
+https://bugs.gentoo.org/show_bug.cgi?id=441828
+
+Based on Fedora patch
+http://pkgs.fedoraproject.org/cgit/xl2tpd.git/plain/xl2tpd-1.3.1-kernelmode.patch
+
+Which is based on a patch by Sergey Fionov (sigwall)
+https://github.com/sigwall/overlay/blob/master/net-dialup/xl2tpd/files/xl2tpd-1.3.0-kernel.patch
+
+diff --git a/call.c b/call.c
+index d1b1858..b672f91 100644
+--- a/call.c
++++ b/call.c
+@@ -680,6 +680,8 @@ struct call *get_call (int tunnel, int call, struct in_addr addr, int port,
+ st->peer.sin_port = port;
+ st->refme = refme;
+ st->refhim = refhim;
++ st->udp_fd = -1;
++ st->pppox_fd = -1;
+ bcopy (&addr, &st->peer.sin_addr, sizeof (addr));
+ st->next = tunnels.head;
+ tunnels.head = st;
+diff --git a/control.c b/control.c
+index 6a41143..8937f2e 100644
+--- a/control.c
++++ b/control.c
+@@ -596,6 +596,9 @@ int control_finish (struct tunnel *t, struct call *c)
+ if (gconfig.debug_state)
+ l2tp_log (LOG_DEBUG, "%s: sending SCCCN\n", __FUNCTION__);
+ control_xmit (buf);
++
++ connect_pppol2tp(t);
++
+ /* Schedule a HELLO */
+ tv.tv_sec = HELLO_DELAY;
+ tv.tv_usec = 0;
+@@ -608,6 +611,7 @@ int control_finish (struct tunnel *t, struct call *c)
+ "Connection established to %s, %d. Local: %d, Remote: %d (ref=%u/%u).\n",
+ IPADDY (t->peer.sin_addr),
+ ntohs (t->peer.sin_port), t->ourtid, t->tid, t->refme, t->refhim);
++
+ if (t->lac)
+ {
+ /* This is part of a LAC, so we want to go ahead
+@@ -635,6 +639,9 @@ int control_finish (struct tunnel *t, struct call *c)
+ IPADDY (t->peer.sin_addr),
+ ntohs (t->peer.sin_port), t->ourtid, t->tid, t->refme, t->refhim,
+ t->lns->entname);
++
++ connect_pppol2tp(t);
++
+ /* Schedule a HELLO */
+ tv.tv_sec = HELLO_DELAY;
+ tv.tv_usec = 0;
+diff --git a/l2tp.h b/l2tp.h
+index ac22f3f..0062095 100644
+--- a/l2tp.h
++++ b/l2tp.h
+@@ -167,6 +167,8 @@ struct tunnel
+ int ourrws; /* Receive Window Size */
+ int rxspeed; /* Receive bps */
+ int txspeed; /* Transmit bps */
++ int udp_fd; /* UDP fd */
++ int pppox_fd; /* PPPOX tunnel fd */
+ struct call *self;
+ struct lns *lns; /* LNS that owns us */
+ struct lac *lac; /* LAC that owns us */
+@@ -220,6 +222,7 @@ extern void control_xmit (void *);
+ extern int ppd;
+ extern int switch_io; /* jz */
+ extern int control_fd;
++extern int connect_pppol2tp(struct tunnel *t);
+ extern int start_pppd (struct call *c, struct ppp_opts *);
+ extern void magic_lac_dial (void *);
+ extern int get_entropy (unsigned char *, int);
+diff --git a/network.c b/network.c
+index 82aedd7..8a3fec2 100644
+--- a/network.c
++++ b/network.c
+@@ -22,6 +22,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <sys/ioctl.h>
++#include <sys/wait.h>
+ #ifndef LINUX
+ # include <sys/uio.h>
+ #endif
+@@ -36,7 +37,6 @@ int server_socket; /* Server socket */
+ int kernel_support; /* Kernel Support there or not? */
+ #endif
+
+-
+ int init_network (void)
+ {
+ long arg;
+@@ -45,6 +45,7 @@ int init_network (void)
+ server.sin_family = AF_INET;
+ server.sin_addr.s_addr = gconfig.listenaddr;
+ server.sin_port = htons (gconfig.port);
++ int flags;
+ if ((server_socket = socket (PF_INET, SOCK_DGRAM, 0)) < 0)
+ {
+ l2tp_log (LOG_CRIT, "%s: Unable to allocate socket. Terminating.\n",
+@@ -52,6 +53,10 @@ int init_network (void)
+ return -EINVAL;
+ };
+
++ flags = 1;
++ setsockopt(server_socket, SOL_SOCKET, SO_REUSEADDR, &flags, sizeof(flags));
++ setsockopt(server_socket, SOL_SOCKET, SO_NO_CHECK, &flags, sizeof(flags));
++
+ if (bind (server_socket, (struct sockaddr *) &server, sizeof (server)))
+ {
+ close (server_socket);
+@@ -94,7 +99,7 @@ int init_network (void)
+ int kernel_fd = socket(AF_PPPOX, SOCK_DGRAM, PX_PROTO_OL2TP);
+ if (kernel_fd < 0)
+ {
+- l2tp_log (LOG_INFO, "L2TP kernel support not detected.\n");
++ l2tp_log (LOG_INFO, "L2TP kernel support not detected (try modprobing l2tp_ppp and pppol2tp)\n");
+ kernel_support = 0;
+ }
+ else
+@@ -321,6 +326,11 @@ int build_fdset (fd_set *readfds)
+
+ while (tun)
+ {
++ if (tun->udp_fd > -1) {
++ if (tun->udp_fd > max)
++ max = tun->udp_fd;
++ FD_SET (tun->udp_fd, readfds);
++ }
+ call = tun->call_head;
+ while (call)
+ {
+@@ -390,6 +400,8 @@ void network_thread ()
+ struct iovec iov;
+ char cbuf[256];
+ unsigned int refme, refhim;
++ int * currentfd;
++ int server_socket_processed;
+
+ /* This one buffer can be recycled for everything except control packets */
+ buf = new_buf (MAX_RECV_SIZE);
+@@ -428,7 +440,21 @@ void network_thread ()
+ {
+ do_control ();
+ }
+- if (FD_ISSET (server_socket, &readfds))
++ server_socket_processed = 0;
++ currentfd = NULL;
++ st = tunnels.head;
++ while (st || !server_socket_processed) {
++ if (st && (st->udp_fd == -1)) {
++ st=st->next;
++ continue;
++ }
++ if (st) {
++ currentfd = &st->udp_fd;
++ } else {
++ currentfd = &server_socket;
++ server_socket_processed = 1;
++ }
++ if (FD_ISSET (*currentfd, &readfds))
+ {
+ /*
+ * Okay, now we're ready for reading and processing new data.
+@@ -456,12 +482,19 @@ void network_thread ()
+ msgh.msg_flags = 0;
+
+ /* Receive one packet. */
+- recvsize = recvmsg(server_socket, &msgh, 0);
++ recvsize = recvmsg(*currentfd, &msgh, 0);
+
+ if (recvsize < MIN_PAYLOAD_HDR_LEN)
+ {
+ if (recvsize < 0)
+ {
++ if (errno == ECONNREFUSED) {
++ close(*currentfd);
++ }
++ if ((errno == ECONNREFUSED) ||
++ (errno == EBADF)) {
++ *currentfd = -1;
++ }
+ if (errno != EAGAIN)
+ l2tp_log (LOG_WARNING,
+ "%s: recvfrom returned error %d (%s)\n",
+@@ -566,6 +599,8 @@ void network_thread ()
+ }
+ };
+ }
++ if (st) st=st->next;
++ }
+
+ /*
+ * finished obvious sources, look for data from PPP connections.
+@@ -638,3 +673,82 @@ void network_thread ()
+ }
+
+ }
++
++int connect_pppol2tp(struct tunnel *t) {
++#ifdef USE_KERNEL
++ if (kernel_support) {
++ int ufd = -1, fd2 = -1;
++ int flags;
++ struct sockaddr_pppol2tp sax;
++
++ struct sockaddr_in server;
++ server.sin_family = AF_INET;
++ server.sin_addr.s_addr = gconfig.listenaddr;
++ server.sin_port = htons (gconfig.port);
++ if ((ufd = socket (PF_INET, SOCK_DGRAM, 0)) < 0)
++ {
++ l2tp_log (LOG_CRIT, "%s: Unable to allocate UDP socket. Terminating.\n",
++ __FUNCTION__);
++ return -EINVAL;
++ };
++
++ flags=1;
++ setsockopt(ufd, SOL_SOCKET, SO_REUSEADDR, &flags, sizeof(flags));
++ setsockopt(ufd, SOL_SOCKET, SO_NO_CHECK, &flags, sizeof(flags));
++
++ if (bind (ufd, (struct sockaddr *) &server, sizeof (server)))
++ {
++ close (ufd);
++ l2tp_log (LOG_CRIT, "%s: Unable to bind UDP socket: %s. Terminating.\n",
++ __FUNCTION__, strerror(errno), errno);
++ return -EINVAL;
++ };
++ server = t->peer;
++ flags = fcntl(ufd, F_GETFL);
++ if (flags == -1 || fcntl(ufd, F_SETFL, flags | O_NONBLOCK) == -1) {
++ l2tp_log (LOG_WARNING, "%s: Unable to set UDP socket nonblock.\n",
++ __FUNCTION__);
++ return -EINVAL;
++ }
++ if (connect (ufd, (struct sockaddr *) &server, sizeof(server)) < 0) {
++ l2tp_log (LOG_CRIT, "%s: Unable to connect UDP peer. Terminating.\n",
++ __FUNCTION__);
++ return -EINVAL;
++ }
++
++ t->udp_fd=ufd;
++
++ fd2 = socket(AF_PPPOX, SOCK_DGRAM, PX_PROTO_OL2TP);
++ if (fd2 < 0) {
++ l2tp_log (LOG_WARNING, "%s: Unable to allocate PPPoL2TP socket.\n",
++ __FUNCTION__);
++ return -EINVAL;
++ }
++ flags = fcntl(fd2, F_GETFL);
++ if (flags == -1 || fcntl(fd2, F_SETFL, flags | O_NONBLOCK) == -1) {
++ l2tp_log (LOG_WARNING, "%s: Unable to set PPPoL2TP socket nonblock.\n",
++ __FUNCTION__);
++ return -EINVAL;
++ }
++ sax.sa_family = AF_PPPOX;
++ sax.sa_protocol = PX_PROTO_OL2TP;
++ sax.pppol2tp.pid = 0;
++ sax.pppol2tp.fd = t->udp_fd;
++ sax.pppol2tp.addr.sin_addr.s_addr = t->peer.sin_addr.s_addr;
++ sax.pppol2tp.addr.sin_port = t->peer.sin_port;
++ sax.pppol2tp.addr.sin_family = AF_INET;
++ sax.pppol2tp.s_tunnel = t->ourtid;
++ sax.pppol2tp.s_session = 0;
++ sax.pppol2tp.d_tunnel = t->tid;
++ sax.pppol2tp.d_session = 0;
++ if ((connect(fd2, (struct sockaddr *)&sax, sizeof(sax))) < 0) {
++ l2tp_log (LOG_WARNING, "%s: Unable to connect PPPoL2TP socket. %d %s\n",
++ __FUNCTION__, errno, strerror(errno));
++ close(fd2);
++ return -EINVAL;
++ }
++ t->pppox_fd = fd2;
++ }
++#endif
++ return 0;
++}
+diff --git a/xl2tpd.c b/xl2tpd.c
+index e98c948..8d7d117 100644
+--- a/xl2tpd.c
++++ b/xl2tpd.c
+@@ -278,7 +278,11 @@ void death_handler (int signal)
+ struct tunnel *st, *st2;
+ int sec;
+ l2tp_log (LOG_CRIT, "%s: Fatal signal %d received\n", __FUNCTION__, signal);
++#ifdef USE_KERNEL
++ if (kernel_support || signal != SIGTERM) {
++#else
+ if (signal != SIGTERM) {
++#endif
+ st = tunnels.head;
+ while (st)
+ {
+@@ -349,7 +353,7 @@ int start_pppd (struct call *c, struct ppp_opts *opts)
+ int flags;
+ #endif
+ int pos = 1;
+- int fd2;
++ int fd2 = -1;
+ #ifdef DEBUG_PPPD
+ int x;
+ #endif
+@@ -397,7 +401,7 @@ int start_pppd (struct call *c, struct ppp_opts *opts)
+ sax.sa_family = AF_PPPOX;
+ sax.sa_protocol = PX_PROTO_OL2TP;
+ sax.pppol2tp.pid = 0;
+- sax.pppol2tp.fd = server_socket;
++ sax.pppol2tp.fd = c->container->udp_fd;
+ sax.pppol2tp.addr.sin_addr.s_addr = c->container->peer.sin_addr.s_addr;
+ sax.pppol2tp.addr.sin_port = c->container->peer.sin_port;
+ sax.pppol2tp.addr.sin_family = AF_INET;
+@@ -408,6 +412,7 @@ int start_pppd (struct call *c, struct ppp_opts *opts)
+ if (connect(fd2, (struct sockaddr *)&sax, sizeof(sax)) < 0) {
+ l2tp_log (LOG_WARNING, "%s: Unable to connect PPPoL2TP socket.\n",
+ __FUNCTION__);
++ close(fd2);
+ return -EINVAL;
+ }
+ stropt[pos++] = strdup ("plugin");
+@@ -484,7 +489,7 @@ int start_pppd (struct call *c, struct ppp_opts *opts)
+ dup2 (fd2, 0);
+ dup2 (fd2, 1);
+ close(fd2);
+-
++ }
+ /* close all the calls pty fds */
+ st = tunnels.head;
+ while (st)
+@@ -492,12 +497,17 @@ int start_pppd (struct call *c, struct ppp_opts *opts)
+ sc = st->call_head;
+ while (sc)
+ {
+- close (sc->fd);
++#ifdef USE_KERNEL
++ if (kernel_support) {
++ close(st->udp_fd); /* tunnel UDP fd */
++ close(st->pppox_fd); /* tunnel PPPoX fd */
++ } else
++#endif
++ close (sc->fd); /* call pty fd */
+ sc = sc->next;
+ }
+ st = st->next;
+ }
+- }
+
+ /* close the UDP socket fd */
+ close (server_socket);
+@@ -615,6 +625,10 @@ void destroy_tunnel (struct tunnel *t)
+ the memory pointed to by t->chal_us.vector at some other place */
+ if (t->chal_them.vector)
+ free (t->chal_them.vector);
++ if (t->pppox_fd > -1 )
++ close (t->pppox_fd);
++ if (t->udp_fd > -1 )
++ close (t->udp_fd);
+ free (t);
+ free (me);
+ }
diff --git a/net-dialup/xl2tpd/files/xl2tpd-1.3.1-no-type-punning-b119c0da.patch b/net-dialup/xl2tpd/files/xl2tpd-1.3.1-no-type-punning-b119c0da.patch
new file mode 100644
index 000000000000..681d9a6f94c4
--- /dev/null
+++ b/net-dialup/xl2tpd/files/xl2tpd-1.3.1-no-type-punning-b119c0da.patch
@@ -0,0 +1,23 @@
+commit b119c0daf006dcf9d960e5a98902d619cdfdf485
+Author: Ted Phelps <phelps@gnusto.com>
+Date: Thu Dec 20 17:53:54 2012 +1100
+
+ Avoid type punning: it makes gcc grumpy.
+
+ Compilers don't like it when we write to memory as one type and read from it
+ as another. Use memcpy instead of typecast games to avoid doing that.
+
+diff --git a/md5.c b/md5.c
+index 175edcc..cb056da 100644
+--- a/md5.c
++++ b/md5.c
+@@ -161,8 +161,7 @@ void MD5Final (unsigned char digest[16], struct MD5Context *ctx)
+ byteReverse (ctx->in, 14);
+
+ /* Append length in bits and transform */
+- ((uint32 *) ctx->in)[14] = ctx->bits[0];
+- ((uint32 *) ctx->in)[15] = ctx->bits[1];
++ memcpy(ctx->in + 14 * sizeof(uint32), ctx->bits, sizeof(ctx->bits));
+
+ MD5Transform (ctx->buf, (uint32 *) ctx->in);
+ byteReverse ((unsigned char *) ctx->buf, 4);
diff --git a/net-dialup/xl2tpd/files/xl2tpd-dnsretry.patch b/net-dialup/xl2tpd/files/xl2tpd-dnsretry.patch
new file mode 100644
index 000000000000..b27703fe435e
--- /dev/null
+++ b/net-dialup/xl2tpd/files/xl2tpd-dnsretry.patch
@@ -0,0 +1,42 @@
+https://bugs.gentoo.org/show_bug.cgi?id=307489
+http://homenet.beeline.ru/index.php?showtopic=192551&st=0&p=1063626345&#entry1063626345
+
+--- xl2tpd.c 2010-05-10 22:35:43.000000000 +0200
++++ xl2tpd.c 2010-08-15 22:02:14.000000000 +0200
+@@ -587,9 +587,33 @@
+ hp = gethostbyname (host);
+ if (!hp)
+ {
+- l2tp_log (LOG_WARNING, "Host name lookup failed for %s.\n",
+- host);
+- return NULL;
++ if ( lac->redial )
++ {
++ int imax=lac->rmax;
++ if ( lac->rmax == 0 )
++ imax = 1;
++ while ( imax > 0 )
++ {
++ hp = gethostbyname ( host );
++ if ( hp )
++ break;
++ l2tp_log ( LOG_WARNING, "Y: Host name lookup failed for %s. Trying to look again in %d seconds.\n", host, lac->rtimeout );
++ if ( lac->rtimeout > 0 )
++ sleep ( lac->rtimeout );
++ if ( lac->rmax > 0 )
++ imax--;
++ }
++ if ( ( imax == 0 ) && ( lac->rmax > 0 ) )
++ {
++ l2tp_log ( LOG_WARNING, "Y: Host name lookup failed for %s after %d tries. Lookup stops now.\n", host, lac->rmax );
++ return NULL;
++ }
++ }
++ else
++ {
++ l2tp_log (LOG_WARNING, "Host name lookup failed for %s.\n", host);
++ return NULL;
++ }
+ }
+ bcopy (hp->h_addr, &addr, hp->h_length);
+ /* Force creation of a new tunnel
diff --git a/net-dialup/xl2tpd/files/xl2tpd-init b/net-dialup/xl2tpd/files/xl2tpd-init
new file mode 100644
index 000000000000..7323af64087f
--- /dev/null
+++ b/net-dialup/xl2tpd/files/xl2tpd-init
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -f /etc/xl2tpd/xl2tpd.conf ] ; then
+ eerror "Missing /etc/xl2tpd/xl2tpd.conf configuration file!"
+ eerror "Example configuration file could be found in doc directory."
+ return 1
+ fi
+
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting xl2tpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/xl2tpd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping xl2tpd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/xl2tpd.pid
+ eend $?
+}
diff --git a/net-dialup/xl2tpd/files/xl2tpd-init-r1 b/net-dialup/xl2tpd/files/xl2tpd-init-r1
new file mode 100644
index 000000000000..4e9956a4d13d
--- /dev/null
+++ b/net-dialup/xl2tpd/files/xl2tpd-init-r1
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/sbin/xl2tpd"
+pidfile="/var/run/xl2tpd.pid"
+required_files="/etc/xl2tpd/xl2tpd.conf"
+
+start_pre() {
+ checkpath -d /var/run/xl2tpd
+}
diff --git a/net-dialup/xl2tpd/files/xl2tpd.conf b/net-dialup/xl2tpd/files/xl2tpd.conf
new file mode 100644
index 000000000000..67162b26df06
--- /dev/null
+++ b/net-dialup/xl2tpd/files/xl2tpd.conf
@@ -0,0 +1 @@
+d /var/run/xl2tpd
diff --git a/net-dialup/xl2tpd/files/xl2tpd.service b/net-dialup/xl2tpd/files/xl2tpd.service
new file mode 100644
index 000000000000..37d46cc63493
--- /dev/null
+++ b/net-dialup/xl2tpd/files/xl2tpd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Layer 2 Tunneling Protocol Daemon (L2TP)
+After=syslog.target network.target
+After=ipsec.service
+
+[Service]
+ExecStart=/usr/sbin/xl2tpd -D
+KillSignal=SIGINT
+SuccessExitStatus=1
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dialup/xl2tpd/metadata.xml b/net-dialup/xl2tpd/metadata.xml
new file mode 100644
index 000000000000..8066f7a44b9e
--- /dev/null
+++ b/net-dialup/xl2tpd/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>tee@itc-gmbh.de</email>
+ <name>Torsten Alex</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Gentoo Proxy Maintainers Project</name>
+ </maintainer>
+ <longdescription>xl2tpd is a fork of l2tpd Layer 2 Tunneling Protocol (L2TP) daemon that can be used to transfer frames of OSI layer 2 protocols through an IP tunnel. While it provides authentication via CHAP or PAP it does not provide encryption itself and should therefore be externally secured (via IPSEC).</longdescription>
+ <use>
+ <flag name="dnsretry">Patch for host lookup retries, activated by redial feature</flag>
+ <flag name="kernel">Enable kernel interface for PPPoL2TP</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">xelerance/xl2tpd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/xl2tpd/xl2tpd-1.3.1-r2.ebuild b/net-dialup/xl2tpd/xl2tpd-1.3.1-r2.ebuild
new file mode 100644
index 000000000000..d192d17f4459
--- /dev/null
+++ b/net-dialup/xl2tpd/xl2tpd-1.3.1-r2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils toolchain-funcs vcs-snapshot
+
+DESCRIPTION="A modern version of the Layer 2 Tunneling Protocol (L2TP) daemon"
+HOMEPAGE="http://www.xelerance.com/services/software/xl2tpd/"
+SRC_URI="https://github.com/xelerance/${PN}/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="dnsretry +kernel"
+
+DEPEND="net-libs/libpcap"
+RDEPEND="${DEPEND}
+ net-dialup/ppp"
+DEPEND+=" kernel? ( >=sys-kernel/linux-headers-2.6.23 )"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.3.0-LDFLAGS.patch"
+ epatch "${FILESDIR}/${PN}-1.3.1-CFLAGS.patch"
+ epatch "${FILESDIR}/${PN}-1.3.1-no-type-punning-b119c0da.patch"
+ epatch "${FILESDIR}/${PN}-1.3.1-kernelmode.patch"
+ sed -i Makefile -e 's| -O2||g' || die "sed Makefile"
+ # The below patch is questionable. Why wasn't it submitted upstream? If it
+ # ever breaks, it will just be removed. -darkside 20120914
+ use dnsretry && epatch "${FILESDIR}/${PN}-dnsretry.patch"
+ # Remove bundled headers
+ rm -r linux || die
+}
+
+src_compile() {
+ tc-export CC
+ export OSFLAGS="-DLINUX"
+ use kernel && OSFLAGS+=" -DUSE_KERNEL"
+ emake
+}
+
+src_install() {
+ emake PREFIX=/usr DESTDIR="${D}" install
+
+ dodoc CREDITS README.xl2tpd BUGS CHANGES TODO doc/README.patents doc/rfc2661.txt
+
+ dodir /etc/xl2tpd
+ cp doc/l2tp-secrets.sample "${ED}/etc/xl2tpd/l2tp-secrets" || die
+ cp doc/l2tpd.conf.sample "${ED}/etc/xl2tpd/xl2tpd.conf" || die
+ fperms 0600 /etc/xl2tpd/l2tp-secrets
+ newinitd "${FILESDIR}"/xl2tpd-init-r1 xl2tpd
+}
diff --git a/net-dialup/xl2tpd/xl2tpd-1.3.1-r3.ebuild b/net-dialup/xl2tpd/xl2tpd-1.3.1-r3.ebuild
new file mode 100644
index 000000000000..2988e43fc915
--- /dev/null
+++ b/net-dialup/xl2tpd/xl2tpd-1.3.1-r3.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils systemd toolchain-funcs vcs-snapshot
+
+DESCRIPTION="A modern version of the Layer 2 Tunneling Protocol (L2TP) daemon"
+HOMEPAGE="http://www.xelerance.com/services/software/xl2tpd/"
+SRC_URI="https://github.com/xelerance/${PN}/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="dnsretry +kernel"
+
+DEPEND="net-libs/libpcap"
+RDEPEND="${DEPEND}
+ net-dialup/ppp"
+DEPEND+=" kernel? ( >=sys-kernel/linux-headers-2.6.23 )"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.3.0-LDFLAGS.patch"
+ epatch "${FILESDIR}/${PN}-1.3.1-CFLAGS.patch"
+ epatch "${FILESDIR}/${PN}-1.3.1-no-type-punning-b119c0da.patch"
+ epatch "${FILESDIR}/${PN}-1.3.1-kernelmode.patch"
+ sed -i Makefile -e 's| -O2||g' || die "sed Makefile"
+ # The below patch is questionable. Why wasn't it submitted upstream? If it
+ # ever breaks, it will just be removed. -darkside 20120914
+ use dnsretry && epatch "${FILESDIR}/${PN}-dnsretry.patch"
+ # Remove bundled headers
+ rm -r linux || die
+}
+
+src_compile() {
+ tc-export CC
+ export OSFLAGS="-DLINUX"
+ use kernel && OSFLAGS+=" -DUSE_KERNEL"
+ emake
+}
+
+src_install() {
+ emake PREFIX=/usr DESTDIR="${D}" install
+ dodoc CREDITS README.xl2tpd BUGS CHANGES TODO doc/README.patents doc/rfc2661.txt
+ insinto /etc/xl2tpd
+ newins doc/l2tpd.conf.sample xl2tpd.conf
+ newins doc/l2tp-secrets.sample l2tp-secrets
+ fperms 0600 /etc/xl2tpd/l2tp-secrets
+ newinitd "${FILESDIR}"/xl2tpd-init-r1 xl2tpd
+ systemd_dounit "${FILESDIR}"/xl2tpd.service
+ systemd_dotmpfilesd "${FILESDIR}"/xl2tpd.conf
+}
diff --git a/net-dialup/xl2tpd/xl2tpd-1.3.1-r4.ebuild b/net-dialup/xl2tpd/xl2tpd-1.3.1-r4.ebuild
new file mode 100644
index 000000000000..48cb8655eb27
--- /dev/null
+++ b/net-dialup/xl2tpd/xl2tpd-1.3.1-r4.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils systemd toolchain-funcs vcs-snapshot
+
+DESCRIPTION="A modern version of the Layer 2 Tunneling Protocol (L2TP) daemon"
+HOMEPAGE="http://www.xelerance.com/services/software/xl2tpd/"
+SRC_URI="https://github.com/xelerance/${PN}/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc x86"
+IUSE="dnsretry +kernel"
+
+DEPEND="net-libs/libpcap"
+RDEPEND="${DEPEND}
+ net-dialup/ppp"
+DEPEND+=" kernel? ( >=sys-kernel/linux-headers-2.6.23 )"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.3.0-LDFLAGS.patch"
+ epatch "${FILESDIR}/${PN}-1.3.1-CFLAGS.patch"
+ epatch "${FILESDIR}/${PN}-1.3.1-no-type-punning-b119c0da.patch"
+ epatch "${FILESDIR}/${PN}-1.3.1-kernelmode.patch"
+ sed -i Makefile -e 's| -O2||g' || die "sed Makefile"
+ # The below patch is questionable. Why wasn't it submitted upstream? If it
+ # ever breaks, it will just be removed. -darkside 20120914
+ use dnsretry && epatch "${FILESDIR}/${PN}-dnsretry.patch"
+ # Remove bundled headers
+ rm -r linux || die
+}
+
+src_compile() {
+ tc-export CC
+ export OSFLAGS="-DLINUX"
+ use kernel && OSFLAGS+=" -DUSE_KERNEL"
+ emake
+}
+
+src_install() {
+ emake PREFIX=/usr DESTDIR="${D}" install
+ dodoc CREDITS README.xl2tpd BUGS CHANGES TODO doc/README.patents doc/rfc2661.txt
+ insinto /etc/xl2tpd
+ newins doc/l2tpd.conf.sample xl2tpd.conf
+ newins doc/l2tp-secrets.sample l2tp-secrets
+ fperms 0600 /etc/xl2tpd/l2tp-secrets
+ newinitd "${FILESDIR}"/xl2tpd-init-r1 xl2tpd
+ systemd_dounit "${FILESDIR}"/xl2tpd.service
+ systemd_dotmpfilesd "${FILESDIR}"/xl2tpd.conf
+}
diff --git a/net-dialup/xl2tpd/xl2tpd-1.3.10.ebuild b/net-dialup/xl2tpd/xl2tpd-1.3.10.ebuild
new file mode 100644
index 000000000000..32fb054177dc
--- /dev/null
+++ b/net-dialup/xl2tpd/xl2tpd-1.3.10.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd toolchain-funcs
+
+DESCRIPTION="A modern version of the Layer 2 Tunneling Protocol (L2TP) daemon"
+HOMEPAGE="http://www.xelerance.com/services/software/xl2tpd/"
+SRC_URI="https://github.com/xelerance/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86"
+IUSE="dnsretry"
+
+DEPEND="
+ net-libs/libpcap
+ >sys-kernel/linux-headers-2.6"
+
+RDEPEND="
+ ${DEPEND}
+ net-dialup/ppp"
+
+DOCS=(CREDITS README.xl2tpd BUGS CHANGES TODO doc/README.patents)
+
+src_prepare() {
+ default
+ # The below patch is questionable. Why wasn't it submitted upstream? If it
+ # ever breaks, it will just be removed. -darkside 20120914
+ # Patch has been discussed with upstream and is marked as feature by now:
+ # https://github.com/xelerance/xl2tpd/issues/134 // -- tenX 2017-08-06
+ use dnsretry && eapply -p0 "${FILESDIR}/${PN}-dnsretry.patch"
+}
+
+src_compile() {
+ tc-export CC
+ emake OSFLAGS="-DLINUX"
+}
+
+src_install() {
+ emake PREFIX=/usr DESTDIR="${D}" install
+
+ insinto /etc/xl2tpd
+ newins doc/l2tpd.conf.sample xl2tpd.conf
+ newins doc/l2tp-secrets.sample l2tp-secrets
+ fperms 0600 /etc/xl2tpd/l2tp-secrets
+
+ newinitd "${FILESDIR}"/xl2tpd-init-r1 xl2tpd
+
+ systemd_dounit "${FILESDIR}"/xl2tpd.service
+ systemd_dotmpfilesd "${FILESDIR}"/xl2tpd.conf
+
+ einstalldocs
+}
diff --git a/net-dialup/xl2tpd/xl2tpd-1.3.6.ebuild b/net-dialup/xl2tpd/xl2tpd-1.3.6.ebuild
new file mode 100644
index 000000000000..d341d3479b51
--- /dev/null
+++ b/net-dialup/xl2tpd/xl2tpd-1.3.6.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils systemd toolchain-funcs
+
+DESCRIPTION="A modern version of the Layer 2 Tunneling Protocol (L2TP) daemon"
+HOMEPAGE="http://www.xelerance.com/services/software/xl2tpd/"
+SRC_URI="https://github.com/xelerance/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ppc64 ~x86"
+IUSE="dnsretry"
+
+DEPEND="net-libs/libpcap"
+RDEPEND="${DEPEND}
+ net-dialup/ppp"
+DEPEND+=" >=sys-kernel/linux-headers-2.6.23"
+
+src_prepare() {
+ sed -i Makefile -e 's| -O2||g' || die "sed Makefile"
+ # The below patch is questionable. Why wasn't it submitted upstream? If it
+ # ever breaks, it will just be removed. -darkside 20120914
+ use dnsretry && epatch "${FILESDIR}/${PN}-dnsretry.patch"
+}
+
+src_compile() {
+ tc-export CC
+ export OSFLAGS="-DLINUX"
+ emake
+}
+
+src_install() {
+ emake PREFIX=/usr DESTDIR="${D}" install
+ dodoc CREDITS README.xl2tpd BUGS CHANGES TODO doc/README.patents doc/rfc2661.txt
+ insinto /etc/xl2tpd
+ newins doc/l2tpd.conf.sample xl2tpd.conf
+ newins doc/l2tp-secrets.sample l2tp-secrets
+ fperms 0600 /etc/xl2tpd/l2tp-secrets
+ newinitd "${FILESDIR}"/xl2tpd-init-r1 xl2tpd
+ systemd_dounit "${FILESDIR}"/xl2tpd.service
+ systemd_dotmpfilesd "${FILESDIR}"/xl2tpd.conf
+}
diff --git a/net-dialup/xl2tpd/xl2tpd-1.3.9.ebuild b/net-dialup/xl2tpd/xl2tpd-1.3.9.ebuild
new file mode 100644
index 000000000000..e5b9615f9ca9
--- /dev/null
+++ b/net-dialup/xl2tpd/xl2tpd-1.3.9.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd toolchain-funcs
+
+DESCRIPTION="A modern version of the Layer 2 Tunneling Protocol (L2TP) daemon"
+HOMEPAGE="http://www.xelerance.com/services/software/xl2tpd/"
+SRC_URI="https://github.com/xelerance/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86"
+IUSE="dnsretry"
+
+DEPEND="
+ net-libs/libpcap
+ >sys-kernel/linux-headers-2.6"
+
+RDEPEND="
+ ${DEPEND}
+ net-dialup/ppp"
+
+DOCS=( CREDITS README.xl2tpd BUGS CHANGES TODO doc/README.patents)
+
+src_prepare() {
+ default
+ # The below patch is questionable. Why wasn't it submitted upstream? If it
+ # ever breaks, it will just be removed. -darkside 20120914
+ # Patch has been discussed with upstream and is marked as feature by now:
+ # https://github.com/xelerance/xl2tpd/issues/134 // -- tenX 2017-08-06
+ use dnsretry && eapply -p0 "${FILESDIR}/${PN}-dnsretry.patch"
+}
+
+src_compile() {
+ tc-export CC
+ emake OSFLAGS="-DLINUX"
+}
+
+src_install() {
+ emake PREFIX=/usr DESTDIR="${D}" install
+
+ insinto /etc/xl2tpd
+ newins doc/l2tpd.conf.sample xl2tpd.conf
+ newins doc/l2tp-secrets.sample l2tp-secrets
+ fperms 0600 /etc/xl2tpd/l2tp-secrets
+
+ newinitd "${FILESDIR}"/xl2tpd-init-r1 xl2tpd
+
+ systemd_dounit "${FILESDIR}"/xl2tpd.service
+ systemd_dotmpfilesd "${FILESDIR}"/xl2tpd.conf
+
+ einstalldocs
+}