summaryrefslogtreecommitdiff
path: root/net-dialup
diff options
context:
space:
mode:
Diffstat (limited to 'net-dialup')
-rw-r--r--net-dialup/accel-ppp/Manifest1
-rw-r--r--net-dialup/accel-ppp/accel-ppp-1.8.0-r1.ebuild71
-rw-r--r--net-dialup/accel-ppp/files/accel-ppp.confd10
-rw-r--r--net-dialup/accel-ppp/files/accel-ppp.initd53
-rw-r--r--net-dialup/accel-ppp/metadata.xml16
-rw-r--r--net-dialup/capi4k-utils/Manifest3
-rw-r--r--net-dialup/capi4k-utils/capi4k-utils-20050718-r6.ebuild182
-rw-r--r--net-dialup/capi4k-utils/files/README.gentoo86
-rw-r--r--net-dialup/capi4k-utils/files/capi-isdn18
-rw-r--r--net-dialup/capi4k-utils/files/capi.blacklist30
-rw-r--r--net-dialup/capi4k-utils/files/capi.conf86
-rw-r--r--net-dialup/capi4k-utils/files/capi.confd36
-rw-r--r--net-dialup/capi4k-utils/files/capi.hotplug189
-rw-r--r--net-dialup/capi4k-utils/files/capi.initd180
-rw-r--r--net-dialup/capi4k-utils/files/capi.pcmcia31
-rw-r--r--net-dialup/capi4k-utils/files/capi.pcmcia.conf36
-rw-r--r--net-dialup/capi4k-utils/files/capi.usermap23
-rw-r--r--net-dialup/capi4k-utils/files/config8
-rw-r--r--net-dialup/capi4k-utils/files/rcapid.xinetd13
-rw-r--r--net-dialup/capi4k-utils/metadata.xml17
-rw-r--r--net-dialup/capidivert/Manifest1
-rw-r--r--net-dialup/capidivert/capidivert-0.0.2.ebuild19
-rw-r--r--net-dialup/capidivert/metadata.xml8
-rw-r--r--net-dialup/capifwd/Manifest1
-rw-r--r--net-dialup/capifwd/capifwd-0.6.3-r1.ebuild42
-rw-r--r--net-dialup/capifwd/files/capifwd-0.6.3-amd64.patch136
-rw-r--r--net-dialup/capifwd/files/capifwd-0.6.3.patch42
-rw-r--r--net-dialup/capifwd/files/capifwd.conf6
-rw-r--r--net-dialup/capifwd/files/capifwd.init22
-rw-r--r--net-dialup/capifwd/metadata.xml9
-rw-r--r--net-dialup/capisuite/Manifest1
-rw-r--r--net-dialup/capisuite/capisuite-0.4.5-r8.ebuild82
-rw-r--r--net-dialup/capisuite/files/capisuite-0.4.5-as-needed.patch11
-rw-r--r--net-dialup/capisuite/files/capisuite-0.4.5-automake-1.11.patch12
-rw-r--r--net-dialup/capisuite/files/capisuite-0.4.5-capi4linux_v3.diff103
-rw-r--r--net-dialup/capisuite/files/capisuite-0.4.5-date-header.patch26
-rw-r--r--net-dialup/capisuite/files/capisuite-0.4.5-gcc43.patch21
-rw-r--r--net-dialup/capisuite/files/capisuite-0.4.5-python25.patch49
-rw-r--r--net-dialup/capisuite/files/capisuite-0.4.5-respect-ar.patch10
-rw-r--r--net-dialup/capisuite/files/capisuite-0.4.5-sox.patch12
-rw-r--r--net-dialup/capisuite/files/capisuite-0.4.5-syntax.patch133
-rw-r--r--net-dialup/capisuite/files/capisuite-fax-compatibility.patch12
-rw-r--r--net-dialup/capisuite/files/capisuite.initd58
-rw-r--r--net-dialup/capisuite/files/capisuite.logrotated39
-rw-r--r--net-dialup/capisuite/metadata.xml5
-rw-r--r--net-dialup/cistronradius/Manifest1
-rw-r--r--net-dialup/cistronradius/cistronradius-1.6.8-r1.ebuild49
-rw-r--r--net-dialup/cistronradius/files/cistronradius-1.6.8-gcc41.patch11
-rw-r--r--net-dialup/cistronradius/files/cistronradius.rc35
-rw-r--r--net-dialup/cistronradius/metadata.xml8
-rw-r--r--net-dialup/cutecom/Manifest1
-rw-r--r--net-dialup/cutecom/cutecom-0.22.0-r1.ebuild40
-rw-r--r--net-dialup/cutecom/metadata.xml7
-rw-r--r--net-dialup/dgcmodem/Manifest1
-rw-r--r--net-dialup/dgcmodem/dgcmodem-1.10.ebuild60
-rw-r--r--net-dialup/dgcmodem/metadata.xml8
-rw-r--r--net-dialup/dial/Manifest1
-rw-r--r--net-dialup/dial/dial-1.2-r1.ebuild28
-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/Manifest1
-rw-r--r--net-dialup/diald/diald-1.0-r2.ebuild59
-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-init30
-rw-r--r--net-dialup/diald/files/diald.conf39
-rw-r--r--net-dialup/diald/files/diald.filter139
-rw-r--r--net-dialup/diald/metadata.xml10
-rw-r--r--net-dialup/drdsl/Manifest2
-rw-r--r--net-dialup/drdsl/drdsl-1.2.0.ebuild45
-rw-r--r--net-dialup/drdsl/files/README87
-rw-r--r--net-dialup/drdsl/metadata.xml5
-rw-r--r--net-dialup/dtrace/Manifest2
-rw-r--r--net-dialup/dtrace/dtrace-2.01-r2.ebuild35
-rw-r--r--net-dialup/dtrace/metadata.xml14
-rw-r--r--net-dialup/dwun/Manifest1
-rw-r--r--net-dialup/dwun/dwun-0.96e-r2.ebuild42
-rw-r--r--net-dialup/dwun/dwun-0.96e-r3.ebuild46
-rw-r--r--net-dialup/dwun/files/dwun23
-rw-r--r--net-dialup/dwun/metadata.xml8
-rw-r--r--net-dialup/fbgetty/Manifest1
-rw-r--r--net-dialup/fbgetty/fbgetty-0.1.698-r1.ebuild29
-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/fcpci/Manifest1
-rw-r--r--net-dialup/fcpci/fcpci-0.1-r3.ebuild87
-rw-r--r--net-dialup/fcpci/files/fcpci-kernel-2.6.34.patch126
-rw-r--r--net-dialup/fcpci/files/fcpci-kernel-2.6.39-amd64.patch53
-rw-r--r--net-dialup/fcpci/files/fcpci-kernel-2.6.39.patch24
-rw-r--r--net-dialup/fcpci/files/fcpci-kernel-3.10.0.patch22
-rw-r--r--net-dialup/fcpci/files/fcpci-kernel-3.2.0.patch10
-rw-r--r--net-dialup/fcpci/files/fcpci-kernel-3.4.0.patch11
-rw-r--r--net-dialup/fcpci/files/fcpci-kernel-3.8.0.patch65
-rw-r--r--net-dialup/fcpci/files/kernel-2.6.34.patch129
-rw-r--r--net-dialup/fcpci/files/kernel-2.6.39.patch24
-rw-r--r--net-dialup/fcpci/metadata.xml5
-rw-r--r--net-dialup/freeradius-client/Manifest1
-rw-r--r--net-dialup/freeradius-client/freeradius-client-1.1.6.ebuild33
-rw-r--r--net-dialup/freeradius-client/metadata.xml16
-rw-r--r--net-dialup/freeradius/Manifest3
-rw-r--r--net-dialup/freeradius/files/freeradius-2.2.5-gentoo.patch104
-rw-r--r--net-dialup/freeradius/files/radius.conf-r316
-rw-r--r--net-dialup/freeradius/files/radius.init-r331
-rw-r--r--net-dialup/freeradius/freeradius-2.2.5.ebuild195
-rw-r--r--net-dialup/freeradius/freeradius-3.0.3.ebuild215
-rw-r--r--net-dialup/freeradius/metadata.xml10
-rw-r--r--net-dialup/globespan-adsl/Manifest2
-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.ebuild49
-rw-r--r--net-dialup/globespan-adsl/globespan-adsl-0.12.ebuild47
-rw-r--r--net-dialup/globespan-adsl/metadata.xml6
-rw-r--r--net-dialup/gnuradius/Manifest1
-rw-r--r--net-dialup/gnuradius/files/gnuradius-1.5-gcc41.patch23
-rw-r--r--net-dialup/gnuradius/files/gnuradius-1.5-implicit-decl.patch66
-rw-r--r--net-dialup/gnuradius/files/gnuradius-1.6.1-qa-false-positives.patch27
-rw-r--r--net-dialup/gnuradius/gnuradius-1.6.1-r1.ebuild69
-rw-r--r--net-dialup/gnuradius/metadata.xml5
-rw-r--r--net-dialup/gtkterm/Manifest1
-rw-r--r--net-dialup/gtkterm/files/gtkterm-0.99.7_rc1-configure.patch14
-rw-r--r--net-dialup/gtkterm/files/ru.po678
-rw-r--r--net-dialup/gtkterm/gtkterm-0.99.7_rc1.ebuild71
-rw-r--r--net-dialup/gtkterm/metadata.xml6
-rw-r--r--net-dialup/hcfpcimodem/Manifest3
-rw-r--r--net-dialup/hcfpcimodem/files/hcfpcimodem-1.20-gentoo.patch29
-rw-r--r--net-dialup/hcfpcimodem/hcfpcimodem-1.20.ebuild92
-rw-r--r--net-dialup/hcfpcimodem/hcfpcimodem-1.21.ebuild91
-rw-r--r--net-dialup/hcfpcimodem/metadata.xml5
-rw-r--r--net-dialup/intel-536ep/Manifest1
-rw-r--r--net-dialup/intel-536ep/files/intel536ep.confd5
-rw-r--r--net-dialup/intel-536ep/files/intel536ep.initd37
-rw-r--r--net-dialup/intel-536ep/intel-536ep-4.71.ebuild45
-rw-r--r--net-dialup/intel-536ep/metadata.xml6
-rw-r--r--net-dialup/isdn-firmware/Manifest1
-rw-r--r--net-dialup/isdn-firmware/isdn-firmware-2005.8.15.2.ebuild27
-rw-r--r--net-dialup/isdn-firmware/metadata.xml8
-rw-r--r--net-dialup/itund/Manifest1
-rw-r--r--net-dialup/itund/itund-0.3.1.ebuild33
-rw-r--r--net-dialup/itund/metadata.xml10
-rw-r--r--net-dialup/kpnadsl4linux/Manifest1
-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.ebuild47
-rw-r--r--net-dialup/kpnadsl4linux/metadata.xml5
-rw-r--r--net-dialup/linux-atm/Manifest2
-rw-r--r--net-dialup/linux-atm/files/linux-atm-2.4.1-declarations.patch266
-rw-r--r--net-dialup/linux-atm/files/linux-atm-2.4.1-gcc4.patch161
-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.ebuild49
-rw-r--r--net-dialup/linux-atm/linux-atm-2.5.2.ebuild46
-rw-r--r--net-dialup/linux-atm/metadata.xml9
-rw-r--r--net-dialup/lrzsz/Manifest1
-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.ebuild62
-rw-r--r--net-dialup/lrzsz/metadata.xml6
-rw-r--r--net-dialup/martian-modem/Manifest1
-rw-r--r--net-dialup/martian-modem/files/martian-modem-20100123-linux-3.10.patch70
-rw-r--r--net-dialup/martian-modem/files/martian-modem-20100123-linux-3.8.patch87
-rw-r--r--net-dialup/martian-modem/files/martian-modem-20100123-makefile.patch34
-rw-r--r--net-dialup/martian-modem/files/martian-modem.conf.d45
-rw-r--r--net-dialup/martian-modem/files/martian-modem.init.d50
-rw-r--r--net-dialup/martian-modem/martian-modem-20100123-r1.ebuild91
-rw-r--r--net-dialup/martian-modem/metadata.xml14
-rw-r--r--net-dialup/metadata.xml35
-rw-r--r--net-dialup/mgetty/Manifest1
-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-gentoo.patch170
-rw-r--r--net-dialup/mgetty/files/mgetty-1.1.36-nofax.patch110
-rw-r--r--net-dialup/mgetty/files/mgetty-1.1.36-qa-fixes.patch175
-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.ebuild164
-rw-r--r--net-dialup/mingetty/Manifest1
-rw-r--r--net-dialup/mingetty/files/mingetty-1.08-utf8.patch156
-rw-r--r--net-dialup/mingetty/metadata.xml11
-rw-r--r--net-dialup/mingetty/mingetty-1.08.ebuild29
-rw-r--r--net-dialup/minicom/Manifest2
-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/minirc.dfl1
-rw-r--r--net-dialup/minicom/metadata.xml9
-rw-r--r--net-dialup/minicom/minicom-2.6.ebuild53
-rw-r--r--net-dialup/minicom/minicom-2.7.ebuild49
-rw-r--r--net-dialup/moserial/Manifest2
-rw-r--r--net-dialup/moserial/metadata.xml11
-rw-r--r--net-dialup/moserial/moserial-3.0.8.ebuild25
-rw-r--r--net-dialup/moserial/moserial-3.0.9.ebuild28
-rw-r--r--net-dialup/mwavem/Manifest1
-rwxr-xr-xnet-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.ebuild64
-rw-r--r--net-dialup/mwavem/mwavem-2.0-r2.ebuild53
-rw-r--r--net-dialup/neocon/Manifest1
-rw-r--r--net-dialup/neocon/metadata.xml8
-rw-r--r--net-dialup/neocon/neocon-20110228.ebuild25
-rw-r--r--net-dialup/picocom/Manifest1
-rw-r--r--net-dialup/picocom/metadata.xml11
-rw-r--r--net-dialup/picocom/picocom-1.7.ebuild37
-rw-r--r--net-dialup/ppp-scripts/Manifest1
-rw-r--r--net-dialup/ppp-scripts/metadata.xml5
-rw-r--r--net-dialup/ppp-scripts/ppp-scripts-0.ebuild28
-rw-r--r--net-dialup/ppp/Manifest10
-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.xml30
-rw-r--r--net-dialup/ppp/ppp-2.4.4-r25.ebuild311
-rw-r--r--net-dialup/ppp/ppp-2.4.5-r3.ebuild223
-rw-r--r--net-dialup/ppp/ppp-2.4.6-r3.ebuild223
-rw-r--r--net-dialup/ppp/ppp-2.4.7-r1.ebuild216
-rw-r--r--net-dialup/ppp/ppp-2.4.7.ebuild224
-rw-r--r--net-dialup/pppconfig/Manifest2
-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.17-r1.ebuild56
-rw-r--r--net-dialup/pppconfig/pppconfig-2.3.21.ebuild55
-rw-r--r--net-dialup/pptpclient/Manifest3
-rw-r--r--net-dialup/pptpclient/files/pptp_fe.pl370
-rw-r--r--net-dialup/pptpclient/files/pptpclient-1.7.2-ip-path.patch29
-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.ebuild53
-rw-r--r--net-dialup/pptpclient/pptpclient-1.8.0.ebuild53
-rw-r--r--net-dialup/pptpd/Manifest1
-rw-r--r--net-dialup/pptpd/files/pptpd-1.4.0-gentoo.patch59
-rw-r--r--net-dialup/pptpd/files/pptpd-1.4.0-sandbox-fix.patch21
-rw-r--r--net-dialup/pptpd/files/pptpd-confd5
-rw-r--r--net-dialup/pptpd/files/pptpd-init-r219
-rw-r--r--net-dialup/pptpd/metadata.xml12
-rw-r--r--net-dialup/pptpd/pptpd-1.4.0.ebuild74
-rw-r--r--net-dialup/qtwvdialer/Manifest1
-rw-r--r--net-dialup/qtwvdialer/metadata.xml8
-rw-r--r--net-dialup/qtwvdialer/qtwvdialer-0.4.4_p20091228.ebuild32
-rw-r--r--net-dialup/radiusclient-ng/Manifest1
-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.ebuild36
-rw-r--r--net-dialup/radiusclient/Manifest1
-rw-r--r--net-dialup/radiusclient/files/pkgsysconfdir-install.patch16
-rw-r--r--net-dialup/radiusclient/files/radiusclient-0.3.2-64bit-compat.patch19
-rw-r--r--net-dialup/radiusclient/metadata.xml9
-rw-r--r--net-dialup/radiusclient/radiusclient-0.3.2-r1.ebuild28
-rw-r--r--net-dialup/radiusclient/radiusclient-0.3.2.ebuild32
-rw-r--r--net-dialup/rp-l2tp/Manifest1
-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-init20
-rw-r--r--net-dialup/rp-l2tp/metadata.xml8
-rw-r--r--net-dialup/rp-l2tp/rp-l2tp-0.4-r3.ebuild36
-rw-r--r--net-dialup/rp-pppoe/Manifest4
-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.8-autoheader.patch46
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.8-configure.patch70
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.8-gentoo-netscripts.patch150
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.8-plugin-options.patch33
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.8-session-offset.patch21
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.8-username-charset.patch58
-rw-r--r--net-dialup/rp-pppoe/metadata.xml5
-rw-r--r--net-dialup/rp-pppoe/rp-pppoe-3.11-r2.ebuild92
-rw-r--r--net-dialup/rp-pppoe/rp-pppoe-3.11-r3.ebuild99
-rw-r--r--net-dialup/rp-pppoe/rp-pppoe-3.8-r2.ebuild81
-rw-r--r--net-dialup/sendpage/Manifest1
-rw-r--r--net-dialup/sendpage/files/1.1.0-makefile.patch11
-rw-r--r--net-dialup/sendpage/files/sendpage.initd21
-rw-r--r--net-dialup/sendpage/metadata.xml10
-rw-r--r--net-dialup/sendpage/sendpage-1.1.0-r2.ebuild49
-rw-r--r--net-dialup/sercd/Manifest1
-rw-r--r--net-dialup/sercd/files/sercd.confd23
-rw-r--r--net-dialup/sercd/files/sercd.initd25
-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-r1.ebuild36
-rw-r--r--net-dialup/speedtouch-usb/Manifest1
-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.ebuild101
-rw-r--r--net-dialup/tkvoice/Manifest1
-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.ebuild54
-rw-r--r--net-dialup/ueagle-atm/Manifest1
-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.ebuild79
-rw-r--r--net-dialup/ueagle4-atm/Manifest1
-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.ebuild75
-rw-r--r--net-dialup/wvdial/Manifest1
-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.xml8
-rw-r--r--net-dialup/wvdial/wvdial-1.61.ebuild47
-rw-r--r--net-dialup/xc/Manifest1
-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.xml6
-rw-r--r--net-dialup/xc/xc-4.3.2-r3.ebuild44
-rw-r--r--net-dialup/xc/xc-4.3.2-r4.ebuild45
-rw-r--r--net-dialup/xl2tpd/Manifest2
-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-init32
-rw-r--r--net-dialup/xl2tpd/files/xl2tpd-init-r112
-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.xml17
-rw-r--r--net-dialup/xl2tpd/xl2tpd-1.3.1-r2.ebuild53
-rw-r--r--net-dialup/xl2tpd/xl2tpd-1.3.1-r3.ebuild53
-rw-r--r--net-dialup/xl2tpd/xl2tpd-1.3.1-r4.ebuild53
-rw-r--r--net-dialup/xl2tpd/xl2tpd-1.3.6.ebuild46
343 files changed, 16224 insertions, 0 deletions
diff --git a/net-dialup/accel-ppp/Manifest b/net-dialup/accel-ppp/Manifest
new file mode 100644
index 00000000000..89bbc924795
--- /dev/null
+++ b/net-dialup/accel-ppp/Manifest
@@ -0,0 +1 @@
+DIST accel-ppp-1.8.0.tar.bz2 1566401 SHA256 a90becf1d8a579b55a95d927a35f6f83ce9a3ee1f6a6d67128a29b2fa4fd71b7 SHA512 d78c0ed4a3c51ae5f07c580b813694376fc42484a907d65164bb14409392365e2d8a876b16b15e55a7a7178cf9e573d42e578e6739f1fe9d62887e7316c816c0 WHIRLPOOL cfeb6807e2b8734a263ad3450dce07859e12783015d6f315e09d6868c06dc8680da55df8e06a4b5ddb3c014f8423ca0b08b877f465a2649167955b7c4790f648
diff --git a/net-dialup/accel-ppp/accel-ppp-1.8.0-r1.ebuild b/net-dialup/accel-ppp/accel-ppp-1.8.0-r1.ebuild
new file mode 100644
index 00000000000..0a6c68d35a4
--- /dev/null
+++ b/net-dialup/accel-ppp/accel-ppp-1.8.0-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils linux-info multilib
+
+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 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"
+
+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'
+
+ epatch_user
+}
+
+src_configure() {
+ local libdir="$(get_libdir)"
+ # There must be also dev-libs/tomcrypt (TOMCRYPT) as crypto alternative to OpenSSL
+ # IPoE driver does not build properly :-(
+ local mycmakeargs=(
+ -DLIB_PATH_SUFFIX="${libdir#lib}"
+ -DBUILD_PPTP_DRIVER=FALSE
+ -DBUILD_IPOE_DRIVER=FALSE
+ -DCRYPTO=OPENSSL
+ $(cmake-utils_use debug MEMDEBUG)
+ $(cmake-utils_use postgres LOG_PGSQL)
+ $(cmake-utils_use radius RADIUS)
+ $(cmake-utils_use shaper SHAPER)
+ $(cmake-utils_use snmp NETSNMP)
+ $(cmake-utils_use valgrind VALGRIND)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ 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.confd b/net-dialup/accel-ppp/files/accel-ppp.confd
new file mode 100644
index 00000000000..7b95dfaf46b
--- /dev/null
+++ b/net-dialup/accel-ppp/files/accel-ppp.confd
@@ -0,0 +1,10 @@
+# Config file for /etc/init.d/accel-pppd
+
+# Pid file
+PID="/var/run/accel-ppp/accel-pppd.pid"
+
+# Directory for radius attributes
+RADATTR_DIR="/var/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 00000000000..d3f3891cd7a
--- /dev/null
+++ b/net-dialup/accel-ppp/files/accel-ppp.initd
@@ -0,0 +1,53 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+extra_started_commands="reload"
+
+depend() {
+ need net
+}
+
+check_dir() {
+# Check for directory existance, try to create it(if it's not exist yet)
+# and throw error if it can not be done.
+# Parameters:
+# $1 - directory to check
+# $2 - error message
+ if [[ ! -d $1 ]]; then
+ mkdir "$1" 2>/dev/null
+ if [[ $? != 0 ]]; then
+ eerror "$2"
+ exit 1
+ fi
+ fi
+}
+
+start() {
+ # Create directory for PID file
+ local piddir=$(dirname ${PID})
+ check_dir "${piddir}" "Can not create directory $piddir for PID file"
+ # Create default directory for radius attributes
+ check_dir "${RADATTR_DIR}" "Can not create directory ${RADATTR_DIR} for radius attributes"
+
+ ebegin "Starting accel-pppd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/accel-pppd -- ${ACCEL_PPPD_OPTS} -p ${PID}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping accel-pppd"
+ start-stop-daemon --stop --quiet --pidfile ${PID}
+ eend $?
+}
+
+reload() {
+ if [ ! -f ${PID} ]; then
+ eerror "accel-pppd isn't running"
+ return 1
+ fi
+ ebegin "Reloading configuration"
+ start-stop-daemon --signal USR1 --pidfile ${PID}
+ eend $?
+}
diff --git a/net-dialup/accel-ppp/metadata.xml b/net-dialup/accel-ppp/metadata.xml
new file mode 100644
index 00000000000..6890878e999
--- /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>
+ <herd>net-dialup</herd>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <use>
+ <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/capi4k-utils/Manifest b/net-dialup/capi4k-utils/Manifest
new file mode 100644
index 00000000000..ea99332f069
--- /dev/null
+++ b/net-dialup/capi4k-utils/Manifest
@@ -0,0 +1,3 @@
+DIST capi4k-files-20050718-r5.tar.xz 3864 SHA256 ffeb2985c5eea7b64f95ac94e7f1065921b141a07b1b3c1e79f660edf20176a8 SHA512 df65fa9f8dd0a1286391dd5a7ec077b492b2d486904b2baae9b78726299e24bca677baa17d243dc9e712e4f591b21a8b4314b52f302f1171454024428e999557 WHIRLPOOL 4b96683d2a68fb25c09e8288c8d81a73a521b50b5f91410dd4e7afd29b1569480fe54c59e95a85bb0c72929bd27c9989c944f29d9fc89889c3cbb898b2e5be85
+DIST capi4k-patches-20050718-r5.tar.xz 12564 SHA256 e390c9a87b9b31a6934198a2c6e9e99f0dea43daa8a04ce604f13ae72c1ee24b SHA512 68f3643d39e2fe1814ab65235402fb310c751a0ea142debc9f03df56790982673b1e5a47cbecb02e96ea922be124c09d3c52db4720f1fdc1434b150d1532c337 WHIRLPOOL 2f7a6ab5c72e699a2210806f33ead77128bacbe1c7ecd1f47b7f077c3815663adb7a9a8abba9c621eff2beb32024d65f1be52598d2165ac7687e6862cf920418
+DIST capi4k-utils-2005-07-18.tar.gz 862826 SHA256 b162d726a31310fc29e7c0a25a4f82a590457f6a95c1b1168bcd72b6497b5746 SHA512 9493f2d81cb6cf39dc97a119b5133834019c7570c58c2e8aac8abff3c8ab0b37ec0630da535eadc58bc5111f70887f34d88729ddf2832dbfaf993013c40e8e47 WHIRLPOOL f69da2bfc814702ab87fadb4ce55bcc70b35866f2b47f03bc4ad89237cccd7bbd1fc583b616b364f51751ffbc41e1282aa4c2e07d6cc04c175ca2276c445b5f7
diff --git a/net-dialup/capi4k-utils/capi4k-utils-20050718-r6.ebuild b/net-dialup/capi4k-utils/capi4k-utils-20050718-r6.ebuild
new file mode 100644
index 00000000000..30681a97411
--- /dev/null
+++ b/net-dialup/capi4k-utils/capi4k-utils-20050718-r6.ebuild
@@ -0,0 +1,182 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils linux-info multilib versionator
+
+YEAR_PV="${PV:0:4}"
+MON_PV="${PV:4:2}"
+DAY_PV="${PV:6:2}"
+MY_P="${PN}-${YEAR_PV}-${MON_PV}-${DAY_PV}"
+
+PATCHVER="5"
+TARBALL_FILES="capi4k-files-${PV}-r${PATCHVER}.tar.xz"
+TARBALL_PATCHES="capi4k-patches-${PV}-r${PATCHVER}.tar.xz"
+
+DESCRIPTION="CAPI4Linux Utils"
+HOMEPAGE="ftp://ftp.in-berlin.de/pub/capi4linux/"
+SRC_URI="ftp://ftp.in-berlin.de/pub/capi4linux/${MY_P}.tar.gz
+ ftp://ftp.in-berlin.de/pub/capi4linux/OLD/${MY_P}.tar.gz
+ http://sbriesen.de/gentoo/distfiles/${TARBALL_FILES}
+ http://sbriesen.de/gentoo/distfiles/${TARBALL_PATCHES}"
+
+LICENSE="GPL-2"
+SLOT="0/3.0.4"
+KEYWORDS="~alpha amd64 ppc x86"
+IUSE="fax +pppd rcapid"
+
+COMMON_DEP="pppd? ( net-dialup/ppp:= )"
+
+DEPEND="${COMMON_DEP}
+ virtual/linux-sources
+ virtual/os-headers
+ app-arch/xz-utils
+ >=sys-apps/sed-4"
+
+RDEPEND="${COMMON_DEP}
+ dev-lang/perl"
+
+S="${WORKDIR}/${PN}"
+
+pkg_setup() {
+ # check kernel config
+ CONFIG_CHECK="~ISDN ~ISDN_CAPI ~ISDN_CAPI_CAPI20"
+ use pppd && CONFIG_CHECK="${CONFIG_CHECK} ~ISDN_CAPI_MIDDLEWARE ~ISDN_CAPI_CAPIFS_BOOL"
+ get_version # config checked later in pkg_postinst
+
+ # find installed pppd version
+ if use pppd; then
+ local INSTALLED_PPP="$(best_version net-dialup/ppp)"
+ PPPVERSION="${INSTALLED_PPP#net-dialup/ppp-}"
+ PPPVERSION="$(version_format_string '$1.$2.$3' ${PPPVERSION})"
+ if [ -z "${PPPVERSION}" ]; then
+ die "No pppd installation found"
+ fi
+ fi
+}
+
+src_prepare() {
+ # add ppp-2.4.4 support
+ epatch "${WORKDIR}/capi4k-patches/pppd244.diff"
+
+ # add ppp-2.4.5 support
+ epatch "${WORKDIR}/capi4k-patches/pppd245.diff"
+
+ # apply rcapid patches
+ epatch "${WORKDIR}/capi4k-patches/rcapid.diff"
+
+ # apply msg2str-safety patch (see bug #170870)
+ epatch "${WORKDIR}/capi4k-patches/msg2str-safety.diff"
+
+ # apply capi20.h patches (needed for glibc-2.7)
+ epatch "${WORKDIR}/capi4k-patches/capi20-include.diff"
+
+ # set our config
+ cp -f "${WORKDIR}/capi4k-files/config" .config
+ # patch all Makefile.* and Rules.make to use our CFLAGS
+ sed -i -e "s:^\(CFLAGS.*\)-O2:\1${CFLAGS}:g" */Makefile.* */Rules.make || die "sed failed"
+ # patch capi20/Makefile.* to use -fPIC for shared library
+ sed -i -e "s:^\(CFLAGS.*\):\1 -fPIC:g" capi20/Makefile.* || die "sed failed"
+ # patch pppdcapiplugin/Makefile to use only the ppp versions we want
+ sed -i -e "s:^\(PPPVERSIONS = \).*$:\1${PPPVERSION}:g" pppdcapiplugin/Makefile || die "sed failed"
+ # patch capiinit/capiinit.c to look also in /lib/firmware
+ sed -i -e "s:\(\"/lib/firmware/isdn\",\):\1 \"/lib/firmware\",:g" capiinit/capiinit.c || die "sed failed"
+ # no, we don't need any devices nodes
+ sed -i -e "s:\(sh scripts/makedev.sh\):echo \1:g" Makefile || die "sed failed"
+ # add --libdir to configure call in Makefile
+ sed -i -e "s:\(\./configure \):\1--libdir=/usr/$(get_libdir) :g" Makefile || die "sed failed"
+ # patch /usr/lib/pppd in pppdcapiplugin tree
+ sed -i -e "s:/usr/lib/pppd:/usr/$(get_libdir)/pppd:g" \
+ pppdcapiplugin/ppp-*/Makefile pppdcapiplugin/{README,*.8} || die "sed failed"
+ # respecting LDFLAGS (see bug #293209)
+ sed -i -e "s:^LDFLAGS\s\(\s*\)=:LDFLAGS+\1=:g" \
+ {capiinfo,capiinit,capifax,rcapid,avmb1}/Makefile* pppdcapiplugin/Rules.make || die
+ # build rcapid
+ if ! use rcapid; then
+ sed -i -e "s:^\(CONFIG_RCAPID=.*\)$:# \1:g" .config || die
+ fi
+ # build pppdcapiplugin
+ if use pppd; then
+ # workaround for bug #511800
+ if has_version \>=net-dialup/ppp-2.4.6; then
+ pushd pppdcapiplugin &>/dev/null || die
+ mv ppp-2.4.5 "ppp-${PPPVERSION}" || die
+ popd &>/dev/null
+ fi
+ else
+ sed -i -e "s:^\(CONFIG_PPPDCAPIPLUGIN=.*\)$:# \1:g" .config || die
+ fi
+ # build capifax
+ if ! use fax; then
+ sed -i -e "s:^\(CONFIG_CAPIFAX=.*\)$:# \1:g" .config || die
+ fi
+
+ epatch_user
+}
+
+src_configure() {
+ # bug 468662 - we NEED to redefine AR and CC both with tc-export and at compile phase
+ tc-export AR CC
+ emake subconfig
+}
+
+src_compile() {
+ # bug 468662 - we NEED to redefine AR and CC both with tc-export and at compile phase
+ emake AR="$(tc-getAR)" CC="$(tc-getCC)"
+}
+
+src_install() {
+ default_src_install
+ prune_libtool_files
+
+ # install base
+ dobin scripts/isdncause
+ newinitd "${WORKDIR}/capi4k-files/capi.initd" capi
+ newconfd "${WORKDIR}/capi4k-files/capi.confd" capi
+ insinto /etc
+ doins "${WORKDIR}/capi4k-files/capi.conf"
+ dodoc "${WORKDIR}/capi4k-files/README.gentoo" scripts/makedev.sh
+
+ # install rcapid stuff
+ if use rcapid; then
+ insinto /etc/xinetd.d
+ newins "${WORKDIR}/capi4k-files/rcapid.xinetd" rcapid
+ newdoc rcapid/README README.rcapid
+ fi
+
+ # install pppdcapiplugin stuff
+ if use pppd; then
+ insinto /etc/ppp/peers
+ doins pppdcapiplugin/peers/t-dsl
+ docinto pppdcapiplugin
+ dodoc pppdcapiplugin/README pppdcapiplugin/examples/*
+ # fixing permissions (see bug #136120)
+ fperms 0644 /usr/share/man/man8/capiplugin.8
+ fi
+}
+
+pkg_postinst() {
+ elog
+ elog "Please read the instructions in README.gentoo in:"
+ elog "/usr/share/doc/${PF}/"
+ elog
+ elog "Annotation for active AVM ISDN boards (B1 ISA/PCI, ...):"
+ elog "If you run"
+ elog " emerge isdn-firmware"
+ elog "you will probably find your board's firmware in /lib/firmware."
+ elog
+ elog "If you have another active ISDN board, you should create"
+ elog "/lib/firmware and copy there your board's firmware."
+ elog
+ ewarn "If you're upgrading from an older capi4k-utils, you must recompile"
+ ewarn "the other packages on your system that link with libcapi after the"
+ ewarn "upgrade completes. To perform this action, please run revdep-rebuild"
+ ewarn "in package app-portage/gentoolkit."
+ elog
+ elog "If any of the following kernel configuration options is missing, you"
+ elog "should reconfigure and rebuild your kernel before using capi4k-utils."
+ linux-info_pkg_setup
+ elog
+}
diff --git a/net-dialup/capi4k-utils/files/README.gentoo b/net-dialup/capi4k-utils/files/README.gentoo
new file mode 100644
index 00000000000..e809a58c84a
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/README.gentoo
@@ -0,0 +1,86 @@
+####################################################################
+# CAPI4Linux / Gentoo usage instructions #
+####################################################################
+
+First edit /etc/capi.conf to match your configuration.
+
+here an example for the AVM B1 PCI card:
+
+ # card file proto io irq mem cardnr options
+ b1pci b1.t4 DSS1 - - - -
+
+First option is the name of the kernel driver, second is the firmware
+file which will be uploaded to the card. All firmware files for active
+ISDN controllers have to be placed in /lib/firmware.
+
+The 'cardnr' option can be left '-' if you only have one card.
+Otherwise fill in the card number you want to assign to this card.
+
+'options' is a list of options which are passed via 'modprobe' to
+the card driver. You can also set them somewhere in /etc/modules.d
+but this is only recommended for USB based cards, where capi.conf
+is normally not used/needed.
+
+Then you should check /etc/conf.d/capi and change it to your needs.
+
+Now you can start the CAPI with
+
+ /etc/init.d/capi start
+
+It should show the loaded drivers/cards after the initialization.
+You can check the CAPI with the 'capiinfo' command.
+
+So, if all runs smoothly, then fixate it
+
+ rc-update add capi boot
+
+You can now install the package net-dialup/isdn4k-utils if you
+want to use all the legacy ISDN apps, such as 'isdnlog'.
+
+
+modules oder static?
+~~~~~~~~~~~~~~~~~~~~
+In general it's ok to compile all ISDN/CAPI stuff into the kernel.
+But I suggest to compile at least all card drivers as a module.
+That includes the 'capidrv' driver! That way it's much easier to
+change a card and/or unload the driver if needed.
+
+
+hotplug or hardwired?
+~~~~~~~~~~~~~~~~~~~~~
+Gentoo supports hotplug for CAPI-Cards. Just plug in your card,
+wait for the beep (if enabled in /etc/conf.d/capi) and check with
+'capiinfo' if your card is available to the CAPI subsystem.
+
+If you have more than one card and/or depend on services like
+'capi4hylafax' or 'isdnlog', it's better to disable hotplug in
+/etc/conf.d/capi and configure your card(s) in /etc/capi.conf.
+
+You can always check what card(s) are loaded with
+
+ /etc/init.d/capi info
+
+If you stopped CAPI with
+
+ /etc/init.d/capi stop
+
+you have to unplug all USB-cards to re-initialize them again.
+Ok, reboot is another option. ;-) Using only hotplug, you can
+plug in and out your card as often as you want.
+
+
+pppdcapiplugin
+~~~~~~~~~~~~~~
+please read the README and have a look at the examples.
+You obviously need net-dialup/ppp to make this work.
+
+
+rcapid
+~~~~~~
+if you want to use 'rcapid' (remote capi daemon), then install
+sys-apps/xinetd and configure it in /etc/xinetd.d/rcapid
+and read the rcapid documentation.
+
+
+--
+Stefan Briesenick <sbriesen@gmx.de> 2005-04-09
diff --git a/net-dialup/capi4k-utils/files/capi-isdn b/net-dialup/capi4k-utils/files/capi-isdn
new file mode 100644
index 00000000000..97f298b9f29
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/capi-isdn
@@ -0,0 +1,18 @@
+#
+# ISDN connection using CAPI interface
+#
+plugin capiplugin.so
+sync
+protocol hdlc
+/dev/null
+
+# Plugin passwordfd enables us to pipe the password to pppd, thus we
+# don't have to put it into pap-secrets and chap-secrets.
+#
+plugin passwordfd.so
+
+noauth
+
+# this is recommended
+noccp
+noipx
diff --git a/net-dialup/capi4k-utils/files/capi.blacklist b/net-dialup/capi4k-utils/files/capi.blacklist
new file mode 100644
index 00000000000..88e52a73006
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/capi.blacklist
@@ -0,0 +1,30 @@
+# /etc/hotplug/blacklist.d/capi
+
+# CAPI USB is handled via /etc/hotplug/usb/capi.usermap
+fcusb
+fcusb2
+fxusb
+fxusb_CZ
+fcdslusb
+bfusb
+
+# CAPI modules are loaded via /etc/init.d/capi
+b1isa
+b1pci
+b1pcmcia
+c4
+t1isa
+t1pci
+fcpci
+fcclassic
+fcdsl
+fcdsl2
+fcdslsl
+
+# mISDN modules (experimental)
+avmfritz
+hfcpci
+hfcsusb
+hfcmulti
+sedlfax
+w6692pci
diff --git a/net-dialup/capi4k-utils/files/capi.conf b/net-dialup/capi4k-utils/files/capi.conf
new file mode 100644
index 00000000000..c2e3864e169
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/capi.conf
@@ -0,0 +1,86 @@
+# /etc/capi.conf - CAPI configuration file
+
+# card file proto io irq mem cardnr options
+#
+
+##############################
+# ISA/PCI devices #
+##############################
+
+# These are examples! You have do setup your card correctly. 'P2P' means
+# 'point-to-point' (leased line) and has nothing to do with PPP. If you
+# don't have a leased line, then you must not set it.
+
+### AVM B1 (you also have to install the firmware)
+#b1isa b1.t4 DSS1 0x150 7 - - P2P
+#b1pci b1.t4 DSS1 - - - -
+
+### AVM C2 (you also have to install the firmware)
+#c2 c2.bin DSS1 - - - -
+#c2 - DSS1 - - - -
+
+### AVM C4 (you also have to install the firmware)
+#c4 c4.bin DSS1 - - - -
+#c4 - DSS1 - - - -
+#c4 - DSS1 - - - - P2P
+#c4 - DSS1 - - - - P2P
+
+### AVM t1 (you also have to install the firmware)
+#t1isa t1.t4 DSS1 0x340 9 - 0
+#t1pci t1.t4 DSS1 - - - -
+
+### AVM FritzCard ISA (A1)
+#fcclassic - - 0x200 7 - -
+
+### AVM FritzCard PCI
+#fcpci - - - - - -
+
+### AVM DSL controllers
+#fcdsl fdslbase.bin - - - - -
+#fcdsl2 fds2base.bin - - - - -
+#fcdslsl fdssbase.bin - - - - -
+
+
+##############################
+# USB devices #
+##############################
+
+# If you're using hotplug, you shouldn't configure your devices in this config.
+# USB devices are detected automatically. If you don't want to use hotplug, then
+# set CAPI_HOTPLUG_USB="no" in /etc/conf.d/capi and uncomment your card(s) below.
+
+### AVM FRITZCARD!USB
+#fcusb - - - - - -
+
+### AVM FRITZX!USB
+#fxusb - - - - - -
+
+### AVM FRITZX!USB OEM
+#fxusb_CZ - - - - - -
+
+### AVM FRITZCARD!USB v2.0
+#fcusb2 fus2base.frm - - - - -
+
+### AVM FRITZCARD!USB v2.1
+#fcusb2 fus3base.frm - - - - -
+
+### AVM BlueFRITZ!USB
+#bfusb - - - - - -
+
+### AVM FRITZDSL!USB (DSL/ISDN)
+#fcdslusb fdsubase.frm - - - - -
+
+### AVM FRITZDSL!USB SL (DSL only)
+#fcdslslusb fdlubase.frm - - - - -
+
+
+##############################
+# mISDN (experimental) #
+##############################
+
+#avmfritz - - - - - -
+#hfcpci - - - - - -
+#hfcsusb - - - - - -
+#hfcmulti - - - - - -
+#sedlfax - - - - - -
+#w6692pci - - - - - -
diff --git a/net-dialup/capi4k-utils/files/capi.confd b/net-dialup/capi4k-utils/files/capi.confd
new file mode 100644
index 00000000000..d7e7af590cb
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/capi.confd
@@ -0,0 +1,36 @@
+# configuraton file for /etc/init.d/capi
+
+###
+### Common settings
+###
+
+# should 'capidrv' be loaded?
+CAPI_LOAD_CAPIDRV="no"
+
+# deactivate cards on stop (USB-Cards have to be re-plugged then)?
+CAPI_UNLOAD_CARDS="yes"
+
+###
+### USB Hotplug
+###
+
+# do you want to use USB hotplug?
+# if disabled, you have to configure your device in /etc/capi.conf
+CAPI_HOTPLUG_USB="yes"
+
+# should via hotplug added cards generate a beep?
+CAPI_HOTPLUG_BEEP="yes"
+
+# should capi-usb handle hotplug-events for mISDN cards?
+CAPI_HOTPLUG_MISDN="yes"
+
+###
+### Bluetooth CIP
+###
+
+# blank-seperated list of CIP devices to connect. You need
+# started Bluez stack and already peered devices to make
+# this work. Bluetooth devices will be connected after
+# ISA/PCI/(USB) devices. Leave empty to disable feature.
+#CAPI_CIP_DEVICES="00:11:22:33:44:55 DE:AD:BE:EF:47:11"
+
diff --git a/net-dialup/capi4k-utils/files/capi.hotplug b/net-dialup/capi4k-utils/files/capi.hotplug
new file mode 100644
index 00000000000..593db81f9ac
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/capi.hotplug
@@ -0,0 +1,189 @@
+#!/bin/bash
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+. /etc/conf.d/capi
+
+[ "${CAPI_HOTPLUG_USB}" = "yes" ] || exit 0
+
+# possible firmware locations (list and order taken from 'capiinit')
+FWDIRS=(/lib/firmware/isdn /lib/firmware /usr/share/isdn /usr/lib/isdn /lib/isdn)
+
+# Syslog output
+syslog() { # <msg>
+ /usr/bin/logger -t "capi-usb" "$@"
+}
+
+# OK beep
+beep_ok() {
+ [ "${CAPI_HOTPLUG_BEEP}" = "yes" ] && \
+ echo -en "\033[10;1200]\a\033[10;262]" > /dev/console
+}
+
+# Error beep
+beep_error() {
+ [ "${CAPI_HOTPLUG_BEEP}" = "yes" ] && \
+ echo -en "\033[10;300]\a\033[10;262]" > /dev/console
+}
+
+# Driver lookup
+cardinfo() { # <driver>
+ # /proc/capi/controller: <controller> <drivername> <state> <cardname> <controllerinfo>
+ /bin/sed -n "s:^\([1-9][0-9]*\) \+${1} \+\([^ ]\+\) \+\([^ ]\+\) \+\([^ ]\+\):\1 \3 \2 \4:p" \
+ /proc/capi/controller 2>/dev/null
+}
+
+# Firmware search
+findfw() { # <fw_name>
+ local DIR
+ for DIR in ${FWDIRS[*]}; do
+ if [ -f "${DIR}/${1}" ]; then
+ echo "${DIR}/${1}"; return 0
+ fi
+ done
+ return 1
+}
+
+# AVM firmware loader
+avmusb() { # <driver> <usbdev> <firmware>
+ local CARD NAME STATUS TYPE VER DEV FIRMWARE
+ while read CARD NAME STATUS TYPE VER DEV; do # AVM cardinfo
+ if [ "${STATUS}" = "detected" -a ${DEV} -eq ${2} ]; then
+ syslog "loading firmware '${3##*/}' onto controller ${CARD} (${NAME})"
+ /usr/sbin/avmcapictrl load "${3}" "${CARD}" || return 1
+ break
+ fi
+ done < <(cardinfo "${1}")
+ return 0
+}
+
+# Split and normalize product code and device
+IFS="/"
+_D=(${DEVICE})
+_P=(${PRODUCT})
+_N=($(printf "%04x/%04x/%04x" 0x${_P[0]} 0x${_P[1]} 0x${_P[2]}))
+unset IFS
+
+# Setup variables
+VENDID="${_N[0]}/${_N[1]}"
+USBBUS="${_D[4]}"
+USBDEV="${_D[5]}"
+
+# Make sure we're not running multiple instances at once.
+# Try twice to lock, otherwise give up.
+LOCK="/var/run/capi-usb-${USBBUS}-${USBDEV}"
+for ((i = 0; i < 2; i = i + 1)); do
+ /bin/ln 2>/dev/null -sn $$ ${LOCK} && break
+ LOCKPID=$(/bin/readlink 2>/dev/null ${LOCK}) || continue
+ [[ $(</proc/${LOCKPID}/cmdline) == $(</proc/$$/cmdline) ]] 2>/dev/null && exit 0
+ /bin/rm -f ${LOCK}
+done
+
+# Check to make sure locking was successful
+if [ ! -L "${LOCK}" ]; then
+ syslog "could not create lock ${LOCK}"
+ beep_error
+ exit 1
+fi
+
+# Set a trap to remove the lockfile when we're finished
+trap "/bin/rm -f ${LOCK}" 0 1 2 3 15
+
+# Select driver and firmware
+LOADER=""
+DRIVER=""
+FIRMWARE=""
+case "${VENDID}" in
+ "057c/0c00") # FRITZCARD!USB
+ DRIVER="fcusb";;
+ "057c/1000") # FRITZCARD!USB v2.0
+ DRIVER="fcusb2"; LOADER="avmusb"; FIRMWARE="fus2base.frm";;
+ "057c/1900") # FRITZCARD!USB v2.1
+ DRIVER="fcusb2"; LOADER="avmusb"; FIRMWARE="fus3base.frm";;
+ "057c/2000") # FRITZX!USB
+ DRIVER="fxusb";;
+ "057c/2200") # BlueFRITZ!USB
+ DRIVER="bfusb"; LOADER="avmusb"; FIRMWARE="bfubase.frm";;
+ "057c/2300") # FRITZDSL!USB
+ DRIVER="fcdslusb"; LOADER="avmusb"; FIRMWARE="fdsubase.frm";;
+ "057c/2800") # FRITZX!USB OEM
+ DRIVER="fxusb_CZ";;
+ "057c/3500") # FRITZDSL!USB SL
+ DRIVER="fcdslslusb"; LOADER="avmusb"; FIRMWARE="fdlubase.frm";;
+ "0959/2bd0") # ISDN USB TA (Cologne Chip HFC-S USB based)
+ DRIVER="hfcsusb";;
+ "0675/1688") # DrayTek miniVigor 128 USB ISDN TA
+ DRIVER="hfcsusb";;
+ "07b0/0007") # Billion tiny USB ISDN TA 128
+ DRIVER="hfcsusb";;
+ "0742/2008") # Stollmann USB TA
+ DRIVER="hfcsusb";;
+ "0742/2009") # Aceex USB ISDN TA
+ DRIVER="hfcsusb";;
+ "0742/200a") # OEM USB ISDN TA
+ DRIVER="hfcsusb";;
+ "08e3/0301") # Olitec USB RNIS
+ DRIVER="hfcsusb";;
+ "07fa/0846") # Bewan Modem RNIS USB
+ DRIVER="hfcsusb";;
+ "07fa/0847") # Djinn Numeris USB
+ DRIVER="hfcsusb";;
+ "07b0/0006") # Twister ISDN TA
+ DRIVER="hfcsusb";;
+ *) # unknown card
+ syslog "unknown USB product: ${VENDID}"
+ exit 1;;
+esac
+
+if [ "${DRIVER}" = "hfcsusb" -a "${CAPI_HOTPLUG_MISDN}" != "yes" ]; then
+ syslog "ignore mISDN card: ${DRIVER} (${VENDID})"
+ exit 0
+fi
+
+case "${ACTION}" in
+ add)
+ # loading capi
+ if ! ( [ -f /proc/capi/capi20 ] || /sbin/modprobe -sq capi ); then
+ syslog "could not load CAPI!"
+ beep_error; exit 1
+ fi
+
+ # loading driver
+ if ! /sbin/modprobe -sq ${DRIVER}; then
+ syslog "could not load driver ${DRIVER}!"
+ beep_error; exit 1
+ fi
+
+ # loading firmware
+ if [ -n "${LOADER}" -a -n "${FIRMWARE}" ]; then
+ CNT=0 # wait for udev (max 10s)
+ while [ ! -c /dev/capi20 -a ${CNT} -lt 40 ]; do
+ sleep 0.25; : $((CNT++))
+ done
+ FW=$(findfw "${FIRMWARE}")
+ if [ -n "${FW}" ]; then
+ if ! ${LOADER} ${DRIVER} ${USBDEV} ${FW}; then
+ syslog "could not load firmware!"
+ beep_error; exit 1
+ fi
+ else
+ syslog "firmware '${FIRMWARE}' not found in ${FWDIRS[0]}"
+ beep_error; exit 1
+ fi
+ fi
+
+ # loading capidrv (should be loaded *after* card driver)
+ if ! ( [ -f /proc/capi/capidrv -o "${CAPI_LOAD_CAPIDRV}" != "yes" ] \
+ || /sbin/modprobe -sq capidrv ); then
+ syslog "could not load CAPIDRV!"
+ fi
+
+ beep_ok
+ ;;
+
+ remove)
+ /sbin/modprobe -sqr ${DRIVER}
+ ;;
+esac
+exit 0
diff --git a/net-dialup/capi4k-utils/files/capi.initd b/net-dialup/capi4k-utils/files/capi.initd
new file mode 100644
index 00000000000..6ed53648ece
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/capi.initd
@@ -0,0 +1,180 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+opts="info showconfig"
+
+depend() {
+ after isapnp pcmcia bluetooth
+}
+
+# possible firmware locations (list and order taken from 'capiinit')
+FWDIRS="/lib/firmware/isdn /lib/firmware /usr/share/isdn /usr/lib/isdn /lib/isdn"
+
+# Firmware search
+findfw() { # <fw_name>
+ local DIR
+ for DIR in ${FWDIRS}; do
+ if [ -f "${DIR}/${1}" ]; then
+ echo "${DIR}/${1}"; return 0
+ fi
+ done
+ return 1
+}
+
+# looking for 'detected' cards (currently only 'sedlfax')
+detected() { # <driver>
+ # /proc/capi/controller: <controller> <drivername> <state> <cardname> <controllerinfo>
+ sed -n "s:^\([1-9][0-9]*\) \+${1} \+detected \+.*:\1:p" \
+ /proc/capi/controller 2>/dev/null
+}
+
+# detecting loaded mISDN modules
+misdn_modules() {
+ sed -n "s:^mISDN_core \+[0-9]\+ \+[0-9]\+ \+\([^ ]\+\).*\$:\1:p" \
+ /proc/modules 2>/dev/null | tr "," " "
+}
+
+# detecting loaded CAPI drivers
+capi_drivers() {
+ local DRV MISDN=0
+ for DRV in $(sed -n "s:^[0-9]\+ \+\([^ ]\+\).*\$:\1:p" /proc/capi/controller 2>/dev/null); do
+ case "${DRV}" in
+ mISDN) MISDN=1;;
+ ?*) echo "${DRV}";;
+ esac
+ done
+ # dirty hack to find loaded mISDN modules
+ if [ ${MISDN} -gt 0 ]; then
+ for DRV in $(misdn_modules); do
+ case "${DRV}" in
+ mISDN_*|l3udss1|faxl3) continue;;
+ ?*) echo "${DRV}";;
+ esac
+ done
+ fi
+}
+
+# detecting bluetooth CIP connections
+bluez_cip() {
+ [ -x /usr/bin/ciptool ] && \
+ sed -n "s:[0-9]\+ \+cmtp \+[^ ]\+ \+\([0-9A-F:]\+\) \+.*\$:\1:p" \
+ /proc/capi/controller 2>/dev/null
+}
+
+
+
+start() {
+ if [ ! -e /etc/capi.conf ] ; then
+ eerror "You're missing /etc/capi.conf (comes with a capi-driver)."
+ eerror "Emerge net-dialup/fritzcapi if you're having an AVM Fritz!Card"
+ return 1
+ fi
+
+ ebegin "Loading CAPI"
+ [ -f /proc/capi/capi20 ] || /sbin/modprobe -s capi
+ eend $? || return 1
+
+ local CNT=0 # wait for udev (max 10s)
+ while [ ! -c /dev/capi20 -a ${CNT} -lt 40 ]; do
+ sleep 0.25; : $((CNT++))
+ done
+
+ ebegin "Starting CAPI"
+ /usr/sbin/capiinit activate 2>/dev/null
+ if eend $?; then
+ local CIP MSG INFO FW CARD MISDN
+
+ # HACK: loading ISAR.BIN onto 'sedlfax' cards
+ # shouldn't be necessary, but mISDN is crappy
+ MISDN=$(detected "mISDN")
+ if [ -n "${MISDN}" ]; then
+ FW=$(findfw "ISAR.BIN")
+ if [ -n "${FW}" ]; then
+ for CARD in ${MISDN}; do
+ ebegin "Loading firmware '${FW##*/}' onto controller ${CARD}"
+ /usr/sbin/avmcapictrl load "${FW}" "${CARD}" 2>&1 >/dev/null
+ eend $?
+ done
+ else
+ eerror "Firmware 'ISAR.BIN' not found in ${FWDIRS%% *}"
+ fi
+ fi
+
+ # connect to CIP devices
+ if [ -n "${CAPI_CIP_DEVICES}" -a -x /usr/bin/ciptool ]; then
+ for CIP in ${CAPI_CIP_DEVICES}; do
+ ebegin "CIP connect to ${CIP}"
+ INFO=$(/usr/bin/ciptool connect "${CIP}" 2>&1)
+ if ! eend $?; then
+ [ -n "${INFO}" ] && \
+ echo "${INFO}" | while read line MSG; do eerror " ${MSG}"; done
+ fi
+ done
+ sleep 0.3 # give subsystems time to initialize
+ fi
+
+ # load 'capidrv'
+ [ -f /proc/capi/capidrv -o "${CAPI_LOAD_CAPIDRV}" != "yes" ] || /sbin/modprobe -s capidrv
+
+ # show controllers
+ INFO=$(cat /proc/capi/controller)
+ if [ -n "${INFO}" ]; then
+ einfo "Available CAPI controllers:"
+ echo "${INFO}" | while read MSG; do einfo " ${MSG}"; done
+ fi
+ fi
+ return 0 # never fail
+}
+
+stop() {
+ local DRV CIP RET FCNT=0 DRIVERS=$(capi_drivers | sort -u)
+
+ # if some CAPI applications are still running, kill 'em
+ if fuser -s /dev/capi20 2>/dev/null; then
+ ebegin "Stopping CAPI applications"
+ fuser -ks /dev/capi20; RET=$?
+ while [ ${RET} -eq 0 -a ${FCNT} -lt 10 ]; do
+ : $((FCNT++)); sleep 0.5; fuser -s /dev/capi20; RET=$?
+ done
+ [ ${RET} -ne 0 ]
+ eend $?
+ fi
+
+ # release bluetooth CIP connections
+ for CIP in $(bluez_cip); do
+ ebegin "Release CIP connection to ${CIP}"
+ /usr/bin/ciptool release "${CIP}"
+ eend
+ done
+
+ ebegin "Stopping CAPI"
+ [ "${CAPI_LOAD_CAPIDRV}" = "yes" ] && /sbin/modprobe -sqr capidrv
+ [ "${CAPI_UNLOAD_CARDS}" = "yes" ] && /usr/sbin/capiinit stop &>/dev/null
+ for DRV in ${DRIVERS}; do
+ /sbin/modprobe -sqr "${DRV}"
+ done
+ /sbin/modprobe -sqr capi
+ eend 0 # ignore errors
+}
+
+info() {
+ if [ -f /proc/capi/controller ]; then
+ local MSG
+ while read MSG; do einfo "${MSG}"; done < /proc/capi/controller
+ else
+ eerror "ERROR: CAPI not loaded"
+ return 1
+ fi
+}
+
+showconfig() {
+ local MSG INFO
+ if INFO=$(/usr/sbin/capiinit show 2>&1); then
+ echo "${INFO}" | while read MSG; do einfo "${MSG}"; done
+ return 0
+ fi
+ echo "${INFO}" | while read MSG; do eerror "${MSG}"; done
+ return 1
+}
diff --git a/net-dialup/capi4k-utils/files/capi.pcmcia b/net-dialup/capi4k-utils/files/capi.pcmcia
new file mode 100644
index 00000000000..77a2a760f75
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/capi.pcmcia
@@ -0,0 +1,31 @@
+#!/bin/bash
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+. /etc/pcmcia/shared
+. /etc/conf.d/capi
+
+# Syslog output
+syslog() { # <msg>
+ /usr/bin/logger -t "capi-pcmcia" "$@"
+}
+
+case "${ACTION}" in
+ start)
+ # loading capi
+ if ! ( [ -f /proc/capi/capi20 ] || /sbin/modprobe -sq capi ); then
+ syslog "could not load CAPI!"
+ exit 1
+ fi
+
+ # loading capidrv (should be loaded *after* card driver)
+ if ! ( [ -f /proc/capi/capidrv -o "${CAPI_LOAD_CAPIDRV}" != "yes" ] \
+ || /sbin/modprobe -sq capidrv ); then
+ syslog "could not load CAPIDRV!"
+ fi
+ ;;
+ stop)
+ ;;
+esac
+exit 0
diff --git a/net-dialup/capi4k-utils/files/capi.pcmcia.conf b/net-dialup/capi4k-utils/files/capi.pcmcia.conf
new file mode 100644
index 00000000000..8a6072b2f72
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/capi.pcmcia.conf
@@ -0,0 +1,36 @@
+###############################################################################
+# Device driver definitions for AVM cards (CAPI) #
+# Please read "man 5 pcmcia" for detailed informations. #
+###############################################################################
+
+# needs net-dialup/fritzcapi
+device "fcpcmcia_cs"
+ class "capi" module "fcpcmcia_cs"
+
+# active controller, driver included in kernel
+device "avm_cs"
+ class "capi" module "avm_cs"
+# class "capi" module "b1pcmcia" module "avm_cs"
+# class "capi" module "avm_cs" opts "irq_list=15,12,11,10,9,7"
+
+
+###############################################################################
+# Card definitions #
+###############################################################################
+
+card "AVM ISDN-Controller A1"
+ version "AVM", "ISDN A"
+ bind "fcpcmcia_cs"
+
+card "AVM ISDN-Controller B1"
+ version "AVM", "ISDN-Controller B1"
+ bind "avm_cs"
+
+card "AVM Mobile ISDN-Controller M1"
+ version "AVM", "Mobile ISDN-Controller M1"
+ bind "avm_cs"
+
+card "AVM Mobile ISDN-Controller M2"
+ version "AVM", "Mobile ISDN-Controller M2"
+ bind "avm_cs"
+
diff --git a/net-dialup/capi4k-utils/files/capi.usermap b/net-dialup/capi4k-utils/files/capi.usermap
new file mode 100644
index 00000000000..32adec7c791
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/capi.usermap
@@ -0,0 +1,23 @@
+# /etc/hotplug/usb/capi.usermap
+
+# AVM USB cards (ISDN/DSL)
+capi 0x0003 0x057c 0x0c00 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x1000 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x1900 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x2000 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x2200 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x2300 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x2800 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x3500 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+
+# mISDN HFC-S USB
+capi 0x0003 0x0959 0x2bd0 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x0675 0x1688 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x07b0 0x0007 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x0742 0x2008 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x0742 0x2009 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x0742 0x200a 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x08e3 0x0301 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x07fa 0x0846 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x07fa 0x0847 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x07b0 0x0006 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
diff --git a/net-dialup/capi4k-utils/files/config b/net-dialup/capi4k-utils/files/config
new file mode 100644
index 00000000000..970991b2295
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/config
@@ -0,0 +1,8 @@
+CONFIG_KERNELDIR='/usr/src/linux'
+CONFIG_BINDIR='/usr/bin'
+CONFIG_SBINDIR='/usr/sbin'
+CONFIG_MANDIR='/usr/share/man'
+CONFIG_AVMCAPICTRL=y
+CONFIG_CAPIFAX=y
+CONFIG_RCAPID=y
+CONFIG_PPPDCAPIPLUGIN=y
diff --git a/net-dialup/capi4k-utils/files/rcapid.xinetd b/net-dialup/capi4k-utils/files/rcapid.xinetd
new file mode 100644
index 00000000000..01208331873
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/rcapid.xinetd
@@ -0,0 +1,13 @@
+service rcapid
+{
+ port = 2662
+ socket_type = stream
+ wait = no
+ user = root
+ type = unlisted
+ server = /usr/sbin/rcapid
+ server_args = -l 5
+ log_on_success += USERID
+ log_on_failure += USERID
+ disable = yes
+}
diff --git a/net-dialup/capi4k-utils/metadata.xml b/net-dialup/capi4k-utils/metadata.xml
new file mode 100644
index 00000000000..6ba78ea422b
--- /dev/null
+++ b/net-dialup/capi4k-utils/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-dialup</herd>
+ <longdescription lang="en">
+ This package contains the CAPI 2.0 library, which is needed for all
+ CAPI applications. It also contains programs to show information about
+ installed CAPI controllers and for the receiving and sending of FAX
+ messages. CAPI 2.0 drivers for Linux are available for a growing
+ number of ISDN devices.
+ </longdescription>
+ <use>
+ <flag name='fax'>Install capi-fax demo programs</flag>
+ <flag name='pppd'>Installs pppdcapiplugin modules</flag>
+ <flag name='rcapid'>Installs rcapid daemon</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-dialup/capidivert/Manifest b/net-dialup/capidivert/Manifest
new file mode 100644
index 00000000000..10e8cf6f7f3
--- /dev/null
+++ b/net-dialup/capidivert/Manifest
@@ -0,0 +1 @@
+DIST capidivert-0.0.2.tar.gz 24971 SHA256 94dd5fdc2649eff955192292973a8d94c46b60b58e98d8c82ff1c5f5f8b3feef SHA512 e6c2e749814ae63d566c2de33014f37ec65bf9e2c3bab32ba9bb2062d9db01272b4cc3a4185273fe1702edd5616521edc5007221fb87df0b955e3fa11e60b9fe WHIRLPOOL efe41ae3cb9a444a082fdd20ee8e0d3946b792f8e5d4c32b4c87b7d5e476c6670f9d3a1d60196a13d8d4e29735342f0da46b4ceb965a4279d56720369084de83
diff --git a/net-dialup/capidivert/capidivert-0.0.2.ebuild b/net-dialup/capidivert/capidivert-0.0.2.ebuild
new file mode 100644
index 00000000000..1d4b7555bd6
--- /dev/null
+++ b/net-dialup/capidivert/capidivert-0.0.2.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="CAPI based utility to control ISDN diversion facilities"
+HOMEPAGE="http://www.tp1.ruhr-uni-bochum.de/~kai/i4l/capidivert/"
+SRC_URI="http://www.tp1.ruhr-uni-bochum.de/~kai/i4l/capidivert/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="net-dialup/capi4k-utils"
+RDEPEND="${DEPEND}"
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+}
diff --git a/net-dialup/capidivert/metadata.xml b/net-dialup/capidivert/metadata.xml
new file mode 100644
index 00000000000..b61d2af8a9f
--- /dev/null
+++ b/net-dialup/capidivert/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-dialup</herd>
+ <longdescription lang="en">
+ CAPI based utility to control ISDN diversion facilities.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-dialup/capifwd/Manifest b/net-dialup/capifwd/Manifest
new file mode 100644
index 00000000000..02c73ec283c
--- /dev/null
+++ b/net-dialup/capifwd/Manifest
@@ -0,0 +1 @@
+DIST capifwd-0.6.3.tar.bz2 82604 SHA256 8c838eeab438cdbf7b70655f984e70833ccf71796ad618b9616fd5dcc517b058
diff --git a/net-dialup/capifwd/capifwd-0.6.3-r1.ebuild b/net-dialup/capifwd/capifwd-0.6.3-r1.ebuild
new file mode 100644
index 00000000000..e7593c5ef9f
--- /dev/null
+++ b/net-dialup/capifwd/capifwd-0.6.3-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils autotools
+
+DESCRIPTION="A daemon forwarding CAPI messages to capi20proxy clients"
+HOMEPAGE="http://capi20proxy.sourceforge.net/"
+SRC_URI="mirror://sourceforge/capi20proxy/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE=""
+
+DEPEND="net-dialup/capi4k-utils"
+
+S="${WORKDIR}/linux-server"
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ epatch "${FILESDIR}/${P}.patch"
+ epatch "${FILESDIR}/${P}-amd64.patch"
+
+ #Replace obsolete sys_errlist with strerror
+ sed -i -e 's:sys_errlist *\[ *errno *\]:strerror(errno):' \
+ src/capifwd.c src/capi/waitforsignal.c src/auth/auth.c || \
+ die "failed to replace sys_errlist"
+
+ eautoreconf
+}
+
+src_install() {
+ einstall || die "einstall failed"
+ dodoc AUTHORS ChangeLog README
+
+ # install init-script
+ newinitd "${FILESDIR}/capifwd.init" capifwd
+ newconfd "${FILESDIR}/capifwd.conf" capifwd
+}
diff --git a/net-dialup/capifwd/files/capifwd-0.6.3-amd64.patch b/net-dialup/capifwd/files/capifwd-0.6.3-amd64.patch
new file mode 100644
index 00000000000..c387b567be5
--- /dev/null
+++ b/net-dialup/capifwd/files/capifwd-0.6.3-amd64.patch
@@ -0,0 +1,136 @@
+--- src/protocol.h 2002-10-30 16:16:06.000000000 +0100
++++ src/protocol.h 2007-02-03 01:27:40.000000000 +0100
+@@ -53,6 +53,7 @@
+ #ifndef __PROTOCOL_H__
+ #define __PROTOCOL_H__
+ #include <time.h>
++#include <sys/types.h>
+
+ // Operating System types
+
+@@ -109,20 +110,20 @@
+ #define revision "$Revision: 1.1 $"
+
+ struct __version_t {
+- unsigned long major; // major version for incompatible versions
+- unsigned long minor; // minor version for compatible versions
++ uint32_t major; // major version for incompatible versions
++ uint32_t minor; // minor version for compatible versions
+ };
+
+ // CLIENT REQUESTS //
+ // protocol specific
+ struct REQUEST_PROXY_HELO { // type number: 99
+- char name[64]; // name of the client (for logging)
+- int os; // operating system of the client
++ uint8_t name[64]; // name of the client (for logging)
++ uint32_t os; // operating system of the client
+ struct __version_t version; // version of the client
+ };
+
+ struct REQUEST_PROXY_AUTH { // type number: 98
+- unsigned long auth_type; // authentication type desired
++ uint32_t auth_type; // authentication type desired
+ };
+
+ struct REQUEST_PROXY_KEEPALIVE { // type number: 97
+@@ -171,11 +172,11 @@
+
+ // protocol specific
+ struct ANSWER_PROXY_HELO { // type number: 99
+- char name[64]; // some kind of name for the server (zero-terminated)
+- int os; // the operating system of the server
++ int8_t name[64]; // some kind of name for the server (zero-terminated)
++ int32_t os; // the operating system of the server
+ struct __version_t version; // the version of the server
+- unsigned long auth_type; // the server tells the client which auth-methods it supports (each bit represents one method) !changed!
+- int timeout; // in seconds, -1 means no timeout
++ int32_t auth_type; // the server tells the client which auth-methods it supports (each bit represents one method) !changed!
++ int32_t timeout; // in seconds, -1 means no timeout
+ };
+
+ struct ANSWER_PROXY_AUTH { // type number: 98
+@@ -185,7 +186,7 @@
+ };
+
+ struct ANSWER_PROXY_SHUTDOWN { // type number: 96
+- char reason[128];
++ int8_t reason[128];
+ // z.B. "Ich muss dringend aufs Klo!"; :-)
+ // no answer from the client expected
+ };
+@@ -208,7 +209,7 @@
+ };
+
+ struct ANSWER_CAPI_MANUFACTURER { // type number: 6
+- char manufacturer[64];
++ int8_t manufacturer[64];
+ };
+
+ struct ANSWER_CAPI_VERSION { // type number: 7
+@@ -217,11 +218,11 @@
+ };
+
+ struct ANSWER_CAPI_SERIAL { // type number: 8
+- char serial[8];
++ int8_t serial[8];
+ };
+
+ struct ANSWER_CAPI_PROFILE { // type number: 9
+- char profile[64];
++ int8_t profile[64];
+ };
+
+ struct ANSWER_CAPI_INSTALLED { // type number: 10
+@@ -229,30 +230,30 @@
+
+
+ struct REQUEST_HEADER {
+- unsigned message_len;
+- unsigned header_len;
+- unsigned body_len;
+- unsigned data_len;
+-
+- unsigned message_id;
+- unsigned message_type;
+- unsigned long app_id; // must be long!
+- unsigned controller_id;
+- unsigned session_id;
++ int32_t message_len;
++ int32_t header_len;
++ int32_t body_len;
++ int32_t data_len;
++
++ int32_t message_id;
++ int32_t message_type;
++ int32_t app_id;
++ int32_t controller_id;
++ int32_t session_id;
+ };
+
+
+ struct ANSWER_HEADER {
+- unsigned message_len;
+- unsigned header_len;
+- unsigned body_len;
+- unsigned data_len;
+-
+- unsigned message_id;
+- unsigned message_type;
+- unsigned long app_id; // must be long!
+- unsigned session_id;
+- unsigned proxy_error;
+- unsigned long capi_error;
++ int32_t message_len;
++ int32_t header_len;
++ int32_t body_len;
++ int32_t data_len;
++
++ int32_t message_id;
++ int32_t message_type;
++ int32_t app_id;
++ int32_t session_id;
++ int32_t proxy_error;
++ int32_t capi_error;
+ };
+ #endif
diff --git a/net-dialup/capifwd/files/capifwd-0.6.3.patch b/net-dialup/capifwd/files/capifwd-0.6.3.patch
new file mode 100644
index 00000000000..66efa7c07cd
--- /dev/null
+++ b/net-dialup/capifwd/files/capifwd-0.6.3.patch
@@ -0,0 +1,42 @@
+--- src/config/cmdline.c.orig 2002-12-29 16:41:02.000000000 +0100
++++ src/config/cmdline.c 2004-11-20 02:01:38.821706921 +0100
+@@ -57,17 +57,17 @@
+ else if ( !strcmp("-v",argv[i]) || !strcmp("-h",argv[1]) ||
+ !strcmp("--version", argv[1]) || !strcmp("--help", argv[i]) )
+ {
+- printf("
+-%s version %s
+-Copyright (C) 2002: F. Lindenberg, A. Szalkowski
+-Usage:
+-\t%s [options]\n\n Where options is one of:
+--h --help or
+--v --version\tprint this info and quit.
+--f --file\tdefine the configuration file (makes no
+-\t\tsense without config file support).
+--p --port\tdefine the port number.
+-", _progname_long, _version, argv[0]);
++ printf(
++"%s version %s\n"
++"Copyright (C) 2002: F. Lindenberg, A. Szalkowski\n"
++"Usage:\n"
++"\t%s [options]\n\n Where options is one of:\n"
++"-h --help or\n"
++"-v --version\tprint this info and quit.\n"
++"-f --file\tdefine the configuration file (makes no\n"
++"\t\tsense without config file support).\n"
++"-p --port\tdefine the port number.\n\n",
++_progname_long, _version, argv[0]);
+ exit ( 0 );
+ }
+
+--- src/capifwd.c.orig 2006-09-23 10:39:30.000000000 +0300
++++ src/capifwd.c 2006-09-23 10:41:32.836443500 +0300
+@@ -13,7 +13,7 @@
+ ssize_t n = recv(fd, buf, left, 0);
+ if (n <= 0)
+ return n;
+- (char*)buf += n;
++ buf = (char*)buf + n;
+ left -= n;
+ }
+ return size;
diff --git a/net-dialup/capifwd/files/capifwd.conf b/net-dialup/capifwd/files/capifwd.conf
new file mode 100644
index 00000000000..07a36972202
--- /dev/null
+++ b/net-dialup/capifwd/files/capifwd.conf
@@ -0,0 +1,6 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# define the port number
+PORT=6674
diff --git a/net-dialup/capifwd/files/capifwd.init b/net-dialup/capifwd/files/capifwd.init
new file mode 100644
index 00000000000..0c339f35eec
--- /dev/null
+++ b/net-dialup/capifwd/files/capifwd.init
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+opts="start stop"
+
+depend() {
+ need capi
+}
+
+start() {
+ ebegin "Starting capi forwarding daemon"
+ start-stop-daemon --start --quiet --exec /usr/sbin/capifwd -- -p ${PORT}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping capi forwarding daemon"
+ start-stop-daemon --stop --quiet --retry 5 --exec /usr/sbin/capifwd
+ eend $?
+}
diff --git a/net-dialup/capifwd/metadata.xml b/net-dialup/capifwd/metadata.xml
new file mode 100644
index 00000000000..dac0bf21fe8
--- /dev/null
+++ b/net-dialup/capifwd/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-dialup</herd>
+ <longdescription>A daemon forwarding CAPI messages to capi20proxy clients</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">capi20proxy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/capisuite/Manifest b/net-dialup/capisuite/Manifest
new file mode 100644
index 00000000000..6022714831d
--- /dev/null
+++ b/net-dialup/capisuite/Manifest
@@ -0,0 +1 @@
+DIST capisuite-0.4.5.tar.gz 1184603 SHA256 3e94e42eae6477a222c608c2cd040568fd9fcfa4e8eb0b06a538175d44cbae96 SHA512 f52a0a687443562d514f2d485724208b4a0d856b87c202190fdbf520f5c11929c3c7ddf9fed73ed64b02fdfab19631973c5a54d7301d290d339bcb12274fceaa WHIRLPOOL 163c9d6cedf9966fd3ada091e42534f16d2dccfbdd1cfa383c74543af422ec66697db110c1be76eb124669e19fc19bb7f751c77b06f1428bf1392bf54a629c40
diff --git a/net-dialup/capisuite/capisuite-0.4.5-r8.ebuild b/net-dialup/capisuite/capisuite-0.4.5-r8.ebuild
new file mode 100644
index 00000000000..7fbc8b9ae73
--- /dev/null
+++ b/net-dialup/capisuite/capisuite-0.4.5-r8.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+AUTOTOOLS_PRUNE_LIBTOOL_FILES=none # bugs 468292 and 468380
+PYTHON_COMPAT=( python2_7 )
+inherit autotools-utils flag-o-matic python-single-r1
+
+DESCRIPTION="ISDN telecommunication suite providing fax and voice services"
+HOMEPAGE="http://www.capisuite.org"
+SRC_URI="http://www.capisuite.org/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+
+DEPEND="${PYTHON_DEPS}
+ media-sound/sox
+ >=media-libs/tiff-3.7.1
+ media-gfx/jpeg2ps
+ media-gfx/sfftobmp
+ app-text/ghostscript-gpl
+ net-dialup/capi4k-utils"
+RDEPEND="${DEPEND}
+ virtual/mta"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+PATCHES=(
+ "${FILESDIR}/${P}-as-needed.patch"
+ # taken from capisuite-0.4.5-5.src.rpm (SuSE-9.3)
+ "${FILESDIR}/${P}-capi4linux_v3.diff"
+ # patched scripts/cs_helpers.pyin (bug #96540)
+ "${FILESDIR}/${P}-date-header.patch"
+ # patched src/backend/connection.cpp (bug #69522)
+ "${FILESDIR}/${PN}-fax-compatibility.patch"
+ # patched scripts/{incoming,idle}.py (bug #147854)
+ "${FILESDIR}/${P}-syntax.patch"
+ # GCC 4.3 patches (bug #236777)
+ "${FILESDIR}/${P}-gcc43.patch"
+ # Python 2.5 patches (bug #232734)
+ "${FILESDIR}/${P}-python25.patch"
+ # Compability with current SOX (bug #250320)
+ "${FILESDIR}/${P}-sox.patch"
+ # Compatibility with automake >= 1.11.2 (bug #424892)
+ "${FILESDIR}/${P}-automake-1.11.patch"
+ # Respect AR (bug #467222)
+ "${FILESDIR}/${P}-respect-ar.patch"
+)
+
+src_configure() {
+ strip-flags # see bug #90901
+
+ local myeconfargs=(
+ --localstatedir="/var"
+ --with-docdir="/usr/share/doc/${PF}"
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ rm -f "${D}"/usr/{lib,share}/capisuite/README
+ rmdir -p --ignore-fail-on-non-empty "${D}/var/log"
+ rm -f "${D}/usr/share/doc/${PF}"/{COPYING,manual.pdf}
+ keepdir /var/spool/capisuite/{done,failed,sendq,users}
+
+ newinitd "${FILESDIR}/capisuite.initd" capisuite
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/capisuite.logrotated" capisuite
+
+ exeinto /etc/cron.daily
+ doexe capisuite.cron
+
+ insinto /etc/capisuite
+ doins cronjob.conf
+}
diff --git a/net-dialup/capisuite/files/capisuite-0.4.5-as-needed.patch b/net-dialup/capisuite/files/capisuite-0.4.5-as-needed.patch
new file mode 100644
index 00000000000..d740366ddca
--- /dev/null
+++ b/net-dialup/capisuite/files/capisuite-0.4.5-as-needed.patch
@@ -0,0 +1,11 @@
+--- acinclude.m4.old 2007-08-02 21:34:26.000000000 +0200
++++ acinclude.m4 2007-08-02 21:42:36.000000000 +0200
+@@ -155,7 +155,7 @@
+ _python_libbasemod=`grep '^BASEMODLIBS=' $python_configdir/Makefile | sed 's/^.*=//'`
+
+ pgac_tab=" " # tab character
+-python_libspec=`echo X"$_python_libs $_python_libc $_python_libm -lpython$python_version $_python_liblocalmod $_python_libbasemod" | sed -e 's/^X//' -e "s/[[ $pgac_tab]][[ $pgac_tab]]*/ /g"`
++python_libspec=`echo X"-lpython$python_version $_python_liblocalmod $_python_libbasemod $_python_libm $_python_libs $_python_libc" | sed -e 's/^X//' -e "s/[[ $pgac_tab]][[ $pgac_tab]]*/ /g"`
+ LIBS="$LIBS $python_libspec"
+ LDFLAGS="$LDFLAGS -L$python_configdir $python_linkforshared"
+ AC_MSG_RESULT([${python_libspec}])
diff --git a/net-dialup/capisuite/files/capisuite-0.4.5-automake-1.11.patch b/net-dialup/capisuite/files/capisuite-0.4.5-automake-1.11.patch
new file mode 100644
index 00000000000..4abd3265194
--- /dev/null
+++ b/net-dialup/capisuite/files/capisuite-0.4.5-automake-1.11.patch
@@ -0,0 +1,12 @@
+--- scripts/Makefile.am.orig 2012-07-05 14:10:56.725746439 +0200
++++ scripts/Makefile.am 2012-07-05 14:12:00.840861325 +0200
+@@ -1,7 +1,8 @@
+ spooldir = @localstatedir@/spool/capisuite
+ pkgsysconfdir = @sysconfdir@/capisuite
+
+-dist_pkglib_DATA = idle.py incoming.py README
++scriptdatadir=$(pkglibdir)
++dist_scriptdata_DATA = idle.py incoming.py README
+ python_module_DATA = cs_helpers.py
+ EXTRA_DIST = cs_helpers.pyin fax.confin answering_machine.confin capisuitefax.in
+
diff --git a/net-dialup/capisuite/files/capisuite-0.4.5-capi4linux_v3.diff b/net-dialup/capisuite/files/capisuite-0.4.5-capi4linux_v3.diff
new file mode 100644
index 00000000000..1f4e50199ae
--- /dev/null
+++ b/net-dialup/capisuite/files/capisuite-0.4.5-capi4linux_v3.diff
@@ -0,0 +1,103 @@
+diff -urN capisuite-0.4.5.org/acinclude.m4 capisuite-0.4.5/acinclude.m4
+--- capisuite-0.4.5.org/acinclude.m4 2004-11-28 14:35:28.000000000 +0100
++++ capisuite-0.4.5/acinclude.m4 2005-03-08 07:31:42.130970593 +0100
+@@ -72,6 +72,21 @@
+ )
+ ]) dnl CS_TEST_CAPI4LINUX
+
++#
++# old capiutils.h missed the Globalconfiguration in BProtocol
++# in library version 3 this was added to the API
++#
++AC_DEFUN([CS_TEST_CAPI4LINUX_V3],
++[AC_MSG_CHECKING([for capi20 ALERT with sending complete])
++AC_TRY_COMPILE([#include <capiutils.h>],
++ [_cmsg cm;void *p; p=CONNECT_REQ_GLOBALCONFIGURATION(&cm);],
++ [
++ AC_DEFINE([HAVE_CAPI4LINUX_V3],1,[we have GLOBALCONFIGURATION in BProtocol])
++ AC_MSG_RESULT([yes])
++ ],
++ [AC_MSG_RESULT([no])]
++)]) dnl CS_TEST_CAPI4LINUX_V3
++
+ # PGAC_CHECK_PYTHON_DIRS
+ # -----------------------
+ # Determine the name of various directory of a given Python installation.
+diff -urN capisuite-0.4.5.org/config.h.in capisuite-0.4.5/config.h.in
+--- capisuite-0.4.5.org/config.h.in 2004-11-28 14:36:20.000000000 +0100
++++ capisuite-0.4.5/config.h.in 2005-03-08 07:31:42.135969715 +0100
+@@ -18,6 +18,9 @@
+ /* we have new ALERT_REQ implementation */
+ #undef HAVE_NEW_CAPI4LINUX
+
++/* we have GLOBALCONFIGURATION in BProtocol */
++#undef HAVE_CAPI4LINUX_V3
++
+ /* we can #include<ostream> instead of ostream.h - new gcc3 feature */
+ #undef HAVE_OSTREAM
+
+diff -urN capisuite-0.4.5.org/configure.in capisuite-0.4.5/configure.in
+--- capisuite-0.4.5.org/configure.in 2004-11-28 14:35:16.000000000 +0100
++++ capisuite-0.4.5/configure.in 2005-03-08 07:31:42.141968662 +0100
+@@ -18,6 +18,7 @@
+ CS_TEST_GCC3
+ CS_TEST_SFFTOBMP
+ CS_TEST_CAPI4LINUX
++CS_TEST_CAPI4LINUX_V3
+
+ CS_SET_DOCDIR
+
+diff -urN capisuite-0.4.5.org/src/backend/capi.cpp capisuite-0.4.5/src/backend/capi.cpp
+--- capisuite-0.4.5.org/src/backend/capi.cpp 2004-11-28 14:35:25.000000000 +0100
++++ capisuite-0.4.5/src/backend/capi.cpp 2005-03-08 07:35:02.553782154 +0100
+@@ -148,7 +148,15 @@
+ << " CIPValue 0x" << CIPValue << ", B1proto 0x" << B1protocol << ", B2proto 0x" << B2protocol <<", B3proto 0x" << B3protocol << endl;
+ }
+ unsigned info=CONNECT_REQ(&CMSG, applId, messageNumber, controller, CIPValue, calledPartyNumber, callingPartyNumber, NULL, NULL,
+- B1protocol, B2protocol, B3protocol, B1configuration, B2configuration, B3configuration, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
++ B1protocol, B2protocol, B3protocol, B1configuration, B2configuration, B3configuration,
++ #ifdef HAVE_CAPI4LINUX_V3
++ NULL,
++ #endif
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL
++ #ifdef HAVE_CAPI4LINUX_V3
++ ,NULL
++ #endif
++ );
+ if (debug_level >= 2) {
+ debug << prefix() << "info: " << info << endl;
+ }
+@@ -181,7 +189,12 @@
+
+ if (debug_level >= 2) debug << prefix() << ">SELECT_B_PROTOCOL_REQ: ApplId 0x" << hex << applId << ", MsgNr 0x" << messageNumber << ", PLCI 0x" << plci
+ << ", B1protocol " << B1protocol << ", B2protocol " << B2protocol << ", B3protocol " << B3protocol << endl;
+- unsigned info=SELECT_B_PROTOCOL_REQ(&CMSG, applId, messageNumber++, plci, B1protocol, B2protocol, B3protocol, B1configuration, B2configuration, B3configuration);
++ unsigned info=SELECT_B_PROTOCOL_REQ(&CMSG, applId, messageNumber++, plci, B1protocol, B2protocol, B3protocol,
++ B1configuration, B2configuration, B3configuration
++ #ifdef HAVE_CAPI4LINUX_V3
++ ,NULL
++ #endif
++ );
+ if (debug_level >= 2)
+ debug << prefix() << "info: " << info << endl;
+
+@@ -295,12 +308,17 @@
+ << reject << ", B1proto 0x" << B1protocol << ", B2proto 0x" << B2protocol << ", B3proto 0x" << B3protocol << endl;
+
+ _cmsg new_message;
+- unsigned info=CONNECT_RESP(&new_message, applId, messageNumber, plci, reject, B1protocol, B2protocol, B3protocol, B1configuration, B2configuration, B3configuration, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
++ unsigned info=CONNECT_RESP(&new_message, applId, messageNumber, plci, reject, B1protocol, B2protocol, B3protocol,
++ B1configuration, B2configuration, B3configuration,
++ #ifdef HAVE_CAPI4LINUX_V3
++ NULL,
++ #endif
++ NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ if (debug_level >= 2)
+ debug << prefix() << "info: " << info << endl;
+
+ if (info != 0)
+- throw(CapiMsgError(info,"Error while CONNECT_REQ: "+Capi::describeParamInfo(info),"Capi::connect_resp()"));
++ throw(CapiMsgError(info,"Error while CONNECT_RESP: "+Capi::describeParamInfo(info),"Capi::connect_resp()"));
+
+ }
+
diff --git a/net-dialup/capisuite/files/capisuite-0.4.5-date-header.patch b/net-dialup/capisuite/files/capisuite-0.4.5-date-header.patch
new file mode 100644
index 00000000000..76738fb78a7
--- /dev/null
+++ b/net-dialup/capisuite/files/capisuite-0.4.5-date-header.patch
@@ -0,0 +1,26 @@
+--- scripts/cs_helpers.pyin.orig 2004-11-28 14:35:23.000000000 +0100
++++ scripts/cs_helpers.pyin 2005-06-19 20:55:49.000000000 +0200
+@@ -10,6 +10,7 @@
+ # (at your option) any later version.
+
+ import os
++import time
+
+ # the name of the config file read by the scripts; see there for options and
+ # descriptions
+@@ -170,6 +171,7 @@
+ msg['Subject']=mail_subject
+ msg['From']=mail_from
+ msg['To']=mail_to
++ msg['Date']=time.strftime('%a, %d %b %Y %H:%M:%S %z')
+
+ msg.preamble = 'This is a Multipart-MIME-message. Please use a capable mailer.\n'
+ msg.epilogue = '' # To guarantee the message ends with a newline
+@@ -267,6 +269,7 @@
+ msg['Subject'] = mail_subject
+ msg['From'] = mail_from
+ msg['To'] = mail_to
++ msg['Date'] = time.strftime('%a, %d %b %Y %H:%M:%S %z')
+
+ try:
+ server = smtplib.SMTP('localhost')
diff --git a/net-dialup/capisuite/files/capisuite-0.4.5-gcc43.patch b/net-dialup/capisuite/files/capisuite-0.4.5-gcc43.patch
new file mode 100644
index 00000000000..51326c30af6
--- /dev/null
+++ b/net-dialup/capisuite/files/capisuite-0.4.5-gcc43.patch
@@ -0,0 +1,21 @@
+--- src/backend/connection.cpp.orig 2008-09-05 08:53:19.000000000 +0200
++++ src/backend/connection.cpp 2008-09-05 08:54:08.000000000 +0200
+@@ -20,6 +20,7 @@
+ #include <pthread.h>
+ #include <errno.h> // for errno
+ #include <iconv.h> // for iconv(), iconv_open(), iconv_close()
++#include <cstring>
+ #include "capi.h"
+ #include "callinterface.h"
+ #include "connection.h"
+
+--- src/backend/capi.cpp.orig 2008-09-05 09:01:18.000000000 +0200
++++ src/backend/capi.cpp 2008-09-05 09:01:38.000000000 +0200
+@@ -16,6 +16,7 @@
+
+ #include <iostream>
+ #include <sstream>
++#include <cstdlib>
+ #include "connection.h"
+ #include "applicationinterface.h"
+ #include "capi.h"
diff --git a/net-dialup/capisuite/files/capisuite-0.4.5-python25.patch b/net-dialup/capisuite/files/capisuite-0.4.5-python25.patch
new file mode 100644
index 00000000000..e86919a2336
--- /dev/null
+++ b/net-dialup/capisuite/files/capisuite-0.4.5-python25.patch
@@ -0,0 +1,49 @@
+--- src/application/pythonscript.cpp.orig 2004-11-28 14:35:24.000000000 +0100
++++ src/application/pythonscript.cpp 2008-08-03 17:12:45.000000000 +0200
+@@ -99,14 +99,14 @@
+ if ( !(py_traceback=cStringIO->cgetvalue(catch_stderr)) )
+ throw ApplicationError("unable to get traceback","PythonScript::run()");
+
+- int length;
++ Py_ssize_t length;
+ char *traceback;
+ if (PyString_AsStringAndSize(py_traceback, &traceback, &length))
+ throw ApplicationError("unable to convert traceback to char*","PythonScript::run()");
+
+ error << prefix() << "A python error occured. See traceback below." << endl;
+ error << prefix(false) << "Python traceback: ";
+- for (int i=0;i<length-1;i++) {
++ for (Py_ssize_t i=0;i<length-1;i++) {
+ error << traceback[i];
+ if (traceback[i]=='\n')
+ error << prefix(false) << "Traceback: ";
+--- src/application/idlescript.cpp.orig 2004-11-28 14:35:24.000000000 +0100
++++ src/application/idlescript.cpp 2008-08-03 17:13:55.000000000 +0200
+@@ -28,6 +28,7 @@
+ IdleScript *instance=static_cast<IdleScript*>(arg);
+ instance->run();
+ pthread_cleanup_pop(1); // run the cleanup_handler and then deregister it
++ return NULL;
+ }
+
+ void idlescript_cleanup_handler(void* arg)
+--- src/application/incomingscript.cpp.orig 2004-11-28 14:35:24.000000000 +0100
++++ src/application/incomingscript.cpp 2008-08-03 17:14:36.000000000 +0200
+@@ -31,6 +31,7 @@
+ IncomingScript *instance=static_cast<IncomingScript*>(arg);
+ instance->run();
+ pthread_cleanup_pop(1); // run the cleanup_handler and then deregister it
++ return NULL;
+ }
+
+ void incomingscript_cleanup_handler(void* arg)
+--- src/backend/capi.cpp.orig 2008-08-03 17:10:41.000000000 +0200
++++ src/backend/capi.cpp 2008-08-03 17:21:37.000000000 +0200
+@@ -30,6 +30,7 @@
+
+ Capi *instance=static_cast<Capi*>(arg);
+ instance->run();
++ return NULL;
+ }
+
+ Capi::Capi (ostream& debug, unsigned short debug_level, ostream &error, unsigned short DDILength, unsigned short DDIBaseLength, vector<string> DDIStopNumbers, unsigned maxLogicalConnection, unsigned maxBDataBlocks,unsigned maxBDataLen) throw (CapiError, CapiMsgError)
diff --git a/net-dialup/capisuite/files/capisuite-0.4.5-respect-ar.patch b/net-dialup/capisuite/files/capisuite-0.4.5-respect-ar.patch
new file mode 100644
index 00000000000..caadae69643
--- /dev/null
+++ b/net-dialup/capisuite/files/capisuite-0.4.5-respect-ar.patch
@@ -0,0 +1,10 @@
+--- configure.in.orig 2013-04-26 12:48:19.758668706 +0400
++++ configure.in 2013-04-26 12:48:27.147668235 +0400
+@@ -6,6 +6,7 @@
+ AC_PROG_CC
+ AC_PROG_CXX
+ AC_PROG_INSTALL
++AM_PROG_AR
+ AC_PROG_RANLIB
+ AC_PROG_MAKE_SET
+ AC_PATH_PROG(doxygen,doxygen)
diff --git a/net-dialup/capisuite/files/capisuite-0.4.5-sox.patch b/net-dialup/capisuite/files/capisuite-0.4.5-sox.patch
new file mode 100644
index 00000000000..ef58325ff6e
--- /dev/null
+++ b/net-dialup/capisuite/files/capisuite-0.4.5-sox.patch
@@ -0,0 +1,12 @@
+diff -ur capisuite-0.4.5.orig/scripts/cs_helpers.pyin capisuite-0.4.5/scripts/cs_helpers.pyin
+--- capisuite-0.4.5.orig/scripts/cs_helpers.pyin 2004-11-28 15:35:23.000000000 +0200
++++ capisuite-0.4.5/scripts/cs_helpers.pyin 2009-05-12 20:58:34.000000000 +0300
+@@ -227,7 +227,7 @@
+ elif (mail_type=="la"): # voice file
+ # la -> wav
+ # don't use stdout as sox needs a file to be able to seek in it otherwise the header will be incomplete
+- ret = os.spawnlp(os.P_WAIT,"sox","sox",attachment,"-w",basename+"wav")
++ ret = os.spawnlp(os.P_WAIT,"sox","sox",attachment,"-2",basename+"wav")
+ if (ret or not os.access(basename+"wav",os.R_OK)):
+ raise "conv-error","Error while calling sox. Not installed?"
+ filepart = email.MIMEAudio.MIMEAudio(open(basename+"wav").read(),"x-wav",email.Encoders.encode_base64,name=os.path.basename(basename)+"wav")
diff --git a/net-dialup/capisuite/files/capisuite-0.4.5-syntax.patch b/net-dialup/capisuite/files/capisuite-0.4.5-syntax.patch
new file mode 100644
index 00000000000..0a0725f9b6b
--- /dev/null
+++ b/net-dialup/capisuite/files/capisuite-0.4.5-syntax.patch
@@ -0,0 +1,133 @@
+--- scripts/incoming.py.orig 2004-11-28 14:35:23.000000000 +0100
++++ scripts/incoming.py 2006-09-22 15:17:28.000000000 +0200
+@@ -1,3 +1,4 @@
++# -*- coding: UTF-8 -*-
+ # incoming.py - standard incoming script for capisuite
+ # ----------------------------------------------------
+ # copyright : (C) 2002 by Gernot Hillier
+@@ -48,7 +49,7 @@
+ if config.has_option(u,'fax_numbers'):
+ numbers=config.get(u,'fax_numbers')
+ if (call_to in numbers.split(',') or numbers=="*"):
+- if (service in (capisuite.SERVICE_FAXG3,capisuite.SERVICE_VOICE)):
++ if (service in (capisuite.SERVICE_FAXG3,capisuite.SERVICE_VOICE)):
+ curr_user=u
+ curr_service=capisuite.SERVICE_FAXG3
+ break
+@@ -133,8 +134,8 @@
+
+ if (os.access(filename,os.R_OK)):
+ cs_helpers.writeDescription(filename,
+- "call_from=\""+call_from+"\"\ncall_to=\""+call_to+"\"\ntime=\""
+- +time.ctime()+"\"\ncause=\"0x%x/0x%x\"\n" % (cause,causeB3))
++ "call_from=\""+call_from+"\"\ncall_to=\""+call_to+"\"\ntime=\""
++ +time.ctime()+"\"\ncause=\"0x%x/0x%x\"\n" % (cause,causeB3))
+ userdata=pwd.getpwnam(curr_user)
+ os.chmod(filename,0600)
+ os.chown(filename,userdata[2],userdata[3])
+@@ -153,8 +154,8 @@
+ action="saveonly"
+ if (action=="mailandsave"):
+ cs_helpers.sendMIMEMail(fromaddress, mailaddress, "Fax received from "+call_from+" to "+call_to, faxFormat,
+- "You got a fax from "+call_from+" to "+call_to+"\nDate: "+time.ctime()+"\n\n"
+- +"See attached file.\nThe original file was saved to file://"+filename+"\n\n", filename)
++ "You got a fax from "+call_from+" to "+call_to+"\nDate: "+time.ctime()+"\n\n"
++ +"See attached file.\nThe original file was saved to file://"+filename+"\n\n", filename)
+
+ # @brief called by callIncoming when an incoming voice call is received
+ #
+@@ -234,8 +235,8 @@
+
+ if (os.access(filename,os.R_OK)):
+ cs_helpers.writeDescription(filename,
+- "call_from=\""+call_from+"\"\ncall_to=\""+call_to+"\"\ntime=\""
+- +time.ctime()+"\"\ncause=\"0x%x/0x%x\"\n" % (cause,causeB3))
++ "call_from=\""+call_from+"\"\ncall_to=\""+call_to+"\"\ntime=\""
++ +time.ctime()+"\"\ncause=\"0x%x/0x%x\"\n" % (cause,causeB3))
+ userdata=pwd.getpwnam(curr_user)
+ os.chmod(filename,0600)
+ os.chown(filename,userdata[2],userdata[3])
+@@ -250,8 +251,8 @@
+ mailaddress=curr_user
+ if (action=="mailandsave"):
+ cs_helpers.sendMIMEMail(fromaddress, mailaddress, "Voice call received from "+call_from+" to "+call_to, "la",
+- "You got a voice call from "+call_from+" to "+call_to+"\nDate: "+time.ctime()+"\n\n"
+- +"See attached file.\nThe original file was saved to file://"+filename+"\n\n", filename)
++ "You got a voice call from "+call_from+" to "+call_to+"\nDate: "+time.ctime()+"\n\n"
++ +"See attached file.\nThe original file was saved to file://"+filename+"\n\n", filename)
+
+
+ # @brief remote inquiry function (uses german wave snippets!)
+@@ -418,7 +419,7 @@
+ #
+ # Revision 1.9 2003/06/27 07:51:09 gernot
+ # - replaced german umlaut in filename "nachricht-gelscht.la", can cause
+-# problems on Redhat, thx to Herbert Hübner for reporting
++# problems on Redhat, thx to Herbert Hübner for reporting
+ #
+ # Revision 1.8 2003/06/16 10:21:05 gernot
+ # - define filename in any case (thx to Axel Schneck for reporting and
+--- scripts/idle.py.orig 2004-11-28 14:35:16.000000000 +0100
++++ scripts/idle.py 2006-09-22 15:33:50.000000000 +0200
+@@ -1,3 +1,4 @@
++# -*- coding: UTF-8 -*-
+ # idle.py - default script for capisuite
+ # ---------------------------------------------
+ # copyright : (C) 2002 by Gernot Hillier
+@@ -105,13 +106,13 @@
+ movejob(job_fax,sendq,done,user)
+ capisuite.log("job "+job_fax+": finished successfully",1)
+ mailtext="Your fax job to "+addressee+" ("+dialstring+") was sent successfully.\n\n" \
+- +"Subject: "+subject+"\nFilename: "+job_fax \
+- +"\nNeeded tries: "+str(tries) \
+- +("\nLast result: 0x%x/0x%x" % (result,resultB3)) \
+- +"\n\nIt was moved to file://"+done+user+"-"+job_fax
++ +"Subject: "+subject+"\nFilename: "+job_fax \
++ +"\nNeeded tries: "+str(tries) \
++ +("\nLast result: 0x%x/0x%x" % (result,resultB3)) \
++ +"\n\nIt was moved to file://"+done+user+"-"+job_fax
+ cs_helpers.sendSimpleMail(fromaddress,mailaddress,
+- "Fax to "+addressee+" ("+dialstring+") sent successfully.",
+- mailtext)
++ "Fax to "+addressee+" ("+dialstring+") sent successfully.",
++ mailtext)
+ else:
+ max_tries=int(cs_helpers.getOption(config,"","send_tries","10"))
+ delays=cs_helpers.getOption(config,"","send_delays","60,60,60,300,300,3600,3600,18000,36000").split(",")
+@@ -123,19 +124,19 @@
+ starttime=time.time()+next_delay
+ capisuite.log("job "+job_fax+": delayed for "+str(next_delay)+" seconds",2)
+ cs_helpers.writeDescription(sendq+job_fax,"dialstring=\""+dialstring+"\"\n"
+- +"starttime=\""+time.ctime(starttime)+"\"\ntries=\""+str(tries)+"\"\n"
+- +"user=\""+user+"\"\naddressee=\""+addressee+"\"\nsubject=\""+subject+"\"\n")
++ +"starttime=\""+time.ctime(starttime)+"\"\ntries=\""+str(tries)+"\"\n"
++ +"user=\""+user+"\"\naddressee=\""+addressee+"\"\nsubject=\""+subject+"\"\n")
+ if (tries>=max_tries):
+ movejob(job_fax,sendq,failed,user)
+ capisuite.log("job "+job_fax+": failed finally",1)
+ mailtext="I'm sorry, but your fax job to "+addressee+" ("+dialstring \
+- +") failed finally.\n\nSubject: "+subject \
+- +"\nFilename: "+job_fax+"\nTries: "+str(tries) \
+- +"\nLast result: 0x%x/0x%x" % (result,resultB3) \
+- +"\n\nIt was moved to file://"+failed+user+"-"+job_fax
++ +") failed finally.\n\nSubject: "+subject \
++ +"\nFilename: "+job_fax+"\nTries: "+str(tries) \
++ +"\nLast result: 0x%x/0x%x" % (result,resultB3) \
++ +"\n\nIt was moved to file://"+failed+user+"-"+job_fax
+ cs_helpers.sendSimpleMail(fromaddress,mailaddress,
+- "Fax to "+addressee+" ("+dialstring+") FAILED.",
+- mailtext)
++ "Fax to "+addressee+" ("+dialstring+") FAILED.",
++ mailtext)
+
+ fcntl.lockf(lockfile,fcntl.LOCK_UN)
+ lockfile.close()
+@@ -149,7 +150,7 @@
+ if (stationID==None):
+ capisuite.error("Warning: fax_stationID for user "+user+" not set")
+ stationID=""
+- headline=cs_helpers.getOption(config,user,"fax_headline","")
++ headline=cs_helpers.getOption(config,user,"fax_headline","")
+ (call,result)=capisuite.call_faxG3(capi,controller,outgoing_nr,dialstring,timeout,stationID,headline)
+ if (result!=0):
+ return(result,0)
diff --git a/net-dialup/capisuite/files/capisuite-fax-compatibility.patch b/net-dialup/capisuite/files/capisuite-fax-compatibility.patch
new file mode 100644
index 00000000000..859ca889764
--- /dev/null
+++ b/net-dialup/capisuite/files/capisuite-fax-compatibility.patch
@@ -0,0 +1,12 @@
+diff -r -u -b -B src.orig/backend/connection.cpp src/backend/connection.cpp
+--- src.orig/backend/connection.cpp 2003-07-20 14:08:44.000000000 -0500
++++ src/backend/connection.cpp 2004-11-12 20:35:22.035045216 -0600
+@@ -85,7 +85,7 @@
+ CIPvalue=16;
+ break;
+ case FAXG3:
+- CIPvalue=17;
++ CIPvalue=4;
+ break;
+ default:
+ throw CapiExternalError("unsupported service given","Connection::Connection()");
diff --git a/net-dialup/capisuite/files/capisuite.initd b/net-dialup/capisuite/files/capisuite.initd
new file mode 100644
index 00000000000..679bb428388
--- /dev/null
+++ b/net-dialup/capisuite/files/capisuite.initd
@@ -0,0 +1,58 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+opts="reload"
+
+depend() {
+ need capi
+}
+
+checkconfig() {
+ local conf_fax conf_voice sec rest
+ # Check if there are configured users for fax or
+ # answering machine. Otherwise exit.
+ # IMPORTANT: Change this or comment it out if you want to use
+ # your own CapiSuite scripts.
+ while read -r sec rest; do
+ if [ "${sec:0:1}" = "[" -a "$sec" != "[GLOBAL]" ]; then
+ conf_fax=yes
+ break
+ fi
+ done < /etc/capisuite/fax.conf
+ while read -r sec rest; do
+ if [ "${sec:0:1}" = "[" -a "$sec" != "[GLOBAL]" ]; then
+ conf_voice=yes
+ break
+ fi
+ done < /etc/capisuite/answering_machine.conf
+ # end check for configured users
+
+ if ! [ "$conf_fax" -o "$conf_voice" ]; then
+ eerror "Please configure CapiSuite first!"
+ return 1
+ fi
+
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting CapiSuite"
+ start-stop-daemon --start --quiet --exec /usr/sbin/capisuite -- -d
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping CapiSuite"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/capisuite --retry 10 --signal TERM >/dev/null
+ eend $?
+}
+
+reload() {
+ ebegin "Reload CapiSuite"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/capisuite --signal HUP
+ eend $?
+}
diff --git a/net-dialup/capisuite/files/capisuite.logrotated b/net-dialup/capisuite/files/capisuite.logrotated
new file mode 100644
index 00000000000..9298cc5078d
--- /dev/null
+++ b/net-dialup/capisuite/files/capisuite.logrotated
@@ -0,0 +1,39 @@
+/var/log/capisuite.log {
+ weekly
+ missingok
+ rotate 52
+ compress
+ delaycompress
+ notifempty
+ create 640 root adm
+ sharedscripts
+ postrotate
+ if [ -f /var/run/capisuite.pid ]; then \
+ if [ -x /usr/sbin/invoke-rc.d ]; then \
+ invoke-rc.d capisuite restart > /dev/null; \
+ else \
+ /etc/init.d/capisuite restart > /dev/null; \
+ fi; \
+ fi;
+ endscript
+}
+
+/var/log/capisuite.error {
+ weekly
+ missingok
+ rotate 52
+ compress
+ delaycompress
+ notifempty
+ create 640 root adm
+ sharedscripts
+ postrotate
+ if [ -f /var/run/capisuite.pid ]; then \
+ if [ -x /usr/sbin/invoke-rc.d ]; then \
+ invoke-rc.d capisuite restart > /dev/null; \
+ else \
+ /etc/init.d/capisuite restart > /dev/null; \
+ fi; \
+ fi;
+ endscript
+}
diff --git a/net-dialup/capisuite/metadata.xml b/net-dialup/capisuite/metadata.xml
new file mode 100644
index 00000000000..1e11e7bbd01
--- /dev/null
+++ b/net-dialup/capisuite/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-dialup</herd>
+</pkgmetadata>
diff --git a/net-dialup/cistronradius/Manifest b/net-dialup/cistronradius/Manifest
new file mode 100644
index 00000000000..4938a6e55d6
--- /dev/null
+++ b/net-dialup/cistronradius/Manifest
@@ -0,0 +1 @@
+DIST radiusd-cistron-1.6.8.tar.gz 199459 SHA256 ed08ff8fb3f49ac5a921c2e23b639e9b87db85e3e6105953c5a921b9a2cc6150
diff --git a/net-dialup/cistronradius/cistronradius-1.6.8-r1.ebuild b/net-dialup/cistronradius/cistronradius-1.6.8-r1.ebuild
new file mode 100644
index 00000000000..01de59512f8
--- /dev/null
+++ b/net-dialup/cistronradius/cistronradius-1.6.8-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Authentication and accounting server for terminal servers that speak the RADIUS protocol"
+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 00000000000..7600df739c7
--- /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 00000000000..cc4b7d3deb9
--- /dev/null
+++ b/net-dialup/cistronradius/files/cistronradius.rc
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+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 00000000000..1930bc3c4e1
--- /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>
+<herd>net-dialup</herd>
+<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 00000000000..eae60100422
--- /dev/null
+++ b/net-dialup/cutecom/Manifest
@@ -0,0 +1 @@
+DIST cutecom-0.22.0.tar.gz 23208 SHA256 1b6620a6159cf3d50bb36cce544e91486817df7f1d553bf239d6db6108dd2ea5 SHA512 507b42b943f20d07429c3629ebdf358ca6551a57a2addc4c8560993b7c2d1304ef258f7d2ac8c62b13bcdfc797574b7e1dfac8b0c0086072407de7f71a2d0a26 WHIRLPOOL f74aea1478de99e9e3d2232451097b3090aff4ba685969cf4363aa2b0c76db079000a7e2991d790548c52bf79f31a3a11d193d1dc781aed2e34555cf2a68dd13
diff --git a/net-dialup/cutecom/cutecom-0.22.0-r1.ebuild b/net-dialup/cutecom/cutecom-0.22.0-r1.ebuild
new file mode 100644
index 00000000000..51c73689e1c
--- /dev/null
+++ b/net-dialup/cutecom/cutecom-0.22.0-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils eutils
+
+DESCRIPTION="CuteCom is a serial terminal, like minicom, written in qt"
+HOMEPAGE="http://cutecom.sourceforge.net"
+SRC_URI="http://cutecom.sourceforge.net/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND="dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qt3support:4"
+RDEPEND="${DEPEND}
+ net-dialup/lrzsz"
+
+src_prepare() {
+ sed -i \
+ -e '/Path/d' \
+ -e '/TerminalOptions/d' \
+ -e '/BinaryPattern/d' \
+ -e '/Terminal/s/0/false/' \
+ ${PN}.desktop || die 'sed on desktop file failed'
+
+ cmake-utils_src_prepare
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # desktop icon does not installed by cmake without KDE3
+ domenu ${PN}.desktop
+}
diff --git a/net-dialup/cutecom/metadata.xml b/net-dialup/cutecom/metadata.xml
new file mode 100644
index 00000000000..4beb36871cb
--- /dev/null
+++ b/net-dialup/cutecom/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version = '1.0' encoding = 'UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-dialup</herd>
+ <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>
+</pkgmetadata>
diff --git a/net-dialup/dgcmodem/Manifest b/net-dialup/dgcmodem/Manifest
new file mode 100644
index 00000000000..00af5da9284
--- /dev/null
+++ b/net-dialup/dgcmodem/Manifest
@@ -0,0 +1 @@
+DIST dgcmodem-1.10.tar.gz 73685 SHA256 90762bef97ac3972d76d2d0152177ea6930130e7bb3a79889511222b48dce80d
diff --git a/net-dialup/dgcmodem/dgcmodem-1.10.ebuild b/net-dialup/dgcmodem/dgcmodem-1.10.ebuild
new file mode 100644
index 00000000000..09390ae410a
--- /dev/null
+++ b/net-dialup/dgcmodem/dgcmodem-1.10.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..5b12ed78d92
--- /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>
+ <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 00000000000..c092a378e6c
--- /dev/null
+++ b/net-dialup/dial/Manifest
@@ -0,0 +1 @@
+DIST dial-1.2.tar.gz 48400 SHA256 bc9827b5204f86e556c5bba88825317a68eb06df658649a79eea2c4246f2ffe8
diff --git a/net-dialup/dial/dial-1.2-r1.ebuild b/net-dialup/dial/dial-1.2-r1.ebuild
new file mode 100644
index 00000000000..aa5bd4e1e83
--- /dev/null
+++ b/net-dialup/dial/dial-1.2-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils
+
+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"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-gcc3.3.patch"
+}
+
+src_install() {
+ einstall || die "install failed."
+ dodoc AUTHORS ChangeLog README TODO
+}
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 00000000000..18cacbf4916
--- /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 00000000000..deda4864010
--- /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>
+ <herd>net-dialup</herd>
+ <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 00000000000..8b95dd67c27
--- /dev/null
+++ b/net-dialup/diald/Manifest
@@ -0,0 +1 @@
+DIST diald-1.0.tar.gz 199698 SHA256 dd7630811006ad0f49512de9f2fa6705e50fb475c5bb12e2dde77e198a863bd0
diff --git a/net-dialup/diald/diald-1.0-r2.ebuild b/net-dialup/diald/diald-1.0-r2.ebuild
new file mode 100644
index 00000000000..e7f4a423149
--- /dev/null
+++ b/net-dialup/diald/diald-1.0-r2.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils 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_unpack() {
+ unpack ${A}
+
+ epatch "${FILESDIR}/${P}-posix.patch"
+ epatch "${FILESDIR}/${P}-gentoo.patch"
+ if ! use pam; then
+ epatch "${FILESDIR}/${P}-nopam.patch"
+ rm "${S}"/README.pam
+ cd "${S}"
+ eautoconf
+ fi
+}
+
+src_install() {
+ make \
+ 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 || die "make failed"
+ 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"
+ prepalldocs
+
+ 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 00000000000..0e6f538ef76
--- /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 00000000000..7fb78b5631a
--- /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 00000000000..3ff13ab9bdb
--- /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 00000000000..6eefde3d579
--- /dev/null
+++ b/net-dialup/diald/files/diald-init
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..51b882d570e
--- /dev/null
+++ b/net-dialup/diald/files/diald.conf
@@ -0,0 +1,39 @@
+# sample diald.conf
+# $Id$
+
+# 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 00000000000..7d494956f80
--- /dev/null
+++ b/net-dialup/diald/files/diald.filter
@@ -0,0 +1,139 @@
+# sample diald.filter
+# $Id$
+#
+# 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 00000000000..8569d812c70
--- /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>
+ <herd>net-dialup</herd>
+ <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/drdsl/Manifest b/net-dialup/drdsl/Manifest
new file mode 100644
index 00000000000..6bdd1d25106
--- /dev/null
+++ b/net-dialup/drdsl/Manifest
@@ -0,0 +1,2 @@
+DIST drdsl-1.0-1.i586.rpm 25869 RMD160 61234b7a325bb0633b02837fef1923137ca5e05f SHA1 1b435450d4658e2733e8761ad8a1953569298303 SHA256 e4c4e1e246521b080ff61d08de9c6b584897c7d952c956e13803a6f8f905b750
+DIST drdsl-1.0-1.x86_64.rpm 30406 RMD160 7d8baa6dbf19a60e6ed1b76e9196901a2f3eafc7 SHA1 5ea5ee52cfb8d69544649fe52919cdfb4dc6b73b SHA256 7690a76942efa7f0218faeb8f6d59b4c9c4df04a73abcc900834e7ba273ce960
diff --git a/net-dialup/drdsl/drdsl-1.2.0.ebuild b/net-dialup/drdsl/drdsl-1.2.0.ebuild
new file mode 100644
index 00000000000..208eedf3b7a
--- /dev/null
+++ b/net-dialup/drdsl/drdsl-1.2.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils rpm
+
+REL="10_3/2.6.22.13_0.3"
+
+DESCRIPTION="AVM DSL Assistant for autodetecting DSL values (VPI, VCI, VPP) for 'fcdsl' based cards"
+HOMEPAGE="http://opensuse.foehr-it.de/"
+SRC_URI="x86? ( http://opensuse.foehr-it.de/rpms/${REL}/32bit/${PN}-1.0-1.i586.rpm )
+ amd64? ( http://opensuse.foehr-it.de/rpms/${REL}/64bit/${PN}-1.0-1.x86_64.rpm )"
+
+LICENSE="AVM-FC"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE="unicode"
+
+DEPEND="unicode? ( virtual/libiconv )"
+RDEPEND="net-dialup/capi4k-utils"
+
+RESTRICT="mirror strip test"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ rpm_src_unpack ${A}
+ cd "${S}"
+
+ # convert 'latin1' to 'utf8'
+ if use unicode; then
+ for i in etc/drdsl/drdsl.ini; do
+ echo ">>> Converting '${i##*/}' to UTF-8"
+ iconv -f LATIN1 -t UTF8 -o "${i}~" "${i}" && mv -f "${i}~" "${i}" || rm -f "${i}~"
+ done
+ fi
+}
+
+src_install() {
+ into /
+ dosbin sbin/drdsl
+ insinto /etc/drdsl
+ doins etc/drdsl/drdsl.ini
+ dodoc "${FILESDIR}"/README
+}
diff --git a/net-dialup/drdsl/files/README b/net-dialup/drdsl/files/README
new file mode 100644
index 00000000000..6ef005040ef
--- /dev/null
+++ b/net-dialup/drdsl/files/README
@@ -0,0 +1,87 @@
+
+------------------------------------------------------------------------------
+
+WHAT IS DRDSL
+For a DSL internet connection to work, the DSL values (VPI, VCI, VPP) of
+the DSLAM are required. The DSLAM is the counterpart of the DSL modem on
+the access provider end. The values thus are generally
+provided by your Internet Service Provider (ISP).
+
+It is possible to enter the requested values from the ISP manually, but
+it is much more convenient to detect them automatically with drdsl. drdsl tests
+different values taken from the file drdsl.ini. Once the working
+values and the corresponding controller number are found, they are written
+to the adsl.conf, located in the file /etc/drdsl/adsl.conf.
+
+Each time the pppd capi plugin is started with the "avmadsl" parameter,
+the adsl.conf supplies the driver with all of the values detected and a
+successfull dsl connection can be established.
+
+
+REQUIREMENTS
+drdsl requires an AVM DSL controller with a CAPI driver running, plus the
+drdsl.ini file located at /etc/drdsl. The drdsl.ini is also
+included in every DSL-Controller driver package.
+
+
+COMMAND LINE OPTIONS
+-c path of the drdsl.ini file
+-q quiet mode
+-r remove the files generated by drdsl
+-h short help
+
+
+UPDATES AND PACKAGES
+Updates and packages are available at ftp.in-berlin.de/pub/capi4linux/drdsl
+drdsl is included in every linux driver package for DSL-Controllers at
+ftp.avm.de/cardware
+
+FURTHER INFORMATION
+For more details on CAPI4Linux, visit AVM at www.avm.de/linux
+
+
+Copyright (C) 2005, AVM GmbH. All rights reserved.
+
+------------------------------------------------------------------------------
+
+COPYRIGHT NOTICE
+This Software is object of a license agreement. You may only use the Software
+in accordance with the license conditions mentioned therein. As licensee you
+bear all risk in regard to hazards and impairments of quality which may arise
+in connection with the use of this Software.
+
+You may not transmit, reproduce or alter this Software in whole or in part,
+in any form, by any means, nor may you translate the Software into any other
+natural or computer language. The creation of a backup copy for personal use
+is excepted. The information hereby made available to you may be communicated
+to third parties only with the written permission of AVM GmbH.
+
+This Software has been produced with due care and checked for correctness in
+accordance with available technology. The information in this Software is
+subject to change without notice for the purpose of technical improvement.
+
+THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE
+LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU.
+SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
+SERVICING, REPAIR OR CORRECTION.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
+ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
+THE SOFTWARE AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE
+OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA
+OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES
+OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH
+HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+
+CONTACT
+AVM GmbH
+Alt-Moabit 95
+10559 Berlin
+Germany
+Email: info@avm.de
diff --git a/net-dialup/drdsl/metadata.xml b/net-dialup/drdsl/metadata.xml
new file mode 100644
index 00000000000..1e11e7bbd01
--- /dev/null
+++ b/net-dialup/drdsl/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-dialup</herd>
+</pkgmetadata>
diff --git a/net-dialup/dtrace/Manifest b/net-dialup/dtrace/Manifest
new file mode 100644
index 00000000000..df218bc0302
--- /dev/null
+++ b/net-dialup/dtrace/Manifest
@@ -0,0 +1,2 @@
+DIST dtrace-2.01-readme.txt 2720 SHA256 6f199e32d3d5ffedb2a15d893afbc4fe8c6675145d4ffe470524768cea709334 SHA512 1c8129ce59e7a997789873cb0d97b72938695ab56034878bb785c1227869e40b5dfb94448791fb5b95105d28b376c6b2e6bb4662a99eaecf72e6438611bb82a8 WHIRLPOOL 5cfa2ae1c3c531fb40599b9c39b2c83600ddd7a4f97b69860338900bb7983341ac112f34898a940d61d354439c99c5a59198b697a3d48090e71580201e696cb0
+DIST dtrace-2.01.static 596114 SHA256 3718b3ad6de37c089a698abc771431a4916c58c67f1e9eefd016b128897b5a78 SHA512 d711ca6fa0870fabd22424d2480642e3e4b966eae6f3ab6d1f835e348d282c369c436a742db7e9a9d6c3cfdaeb07a5fe97bebdb76baec4aa1c83ba710c2e32e9 WHIRLPOOL 14eda2bb4e60a80b61adc06b39b58155759a5f4cd4c1acab367a00d92dae48eb706f673b7585e7b1c506b1e0149155ce6d6ce5d3caad47b1b4d038dc2b100903
diff --git a/net-dialup/dtrace/dtrace-2.01-r2.ebuild b/net-dialup/dtrace/dtrace-2.01-r2.ebuild
new file mode 100644
index 00000000000..8c32f3b4704
--- /dev/null
+++ b/net-dialup/dtrace/dtrace-2.01-r2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="DTRACE traces ISDN messages with AVM ISDN-controllers"
+HOMEPAGE="ftp://ftp.avm.de/develper/d3trace/"
+SRC_URI="ftp://ftp.avm.de/develper/d3trace/linux/dtrace.static -> ${P}.static
+ ftp://ftp.avm.de/develper/d3trace/linux/readme.txt -> ${P}-readme.txt"
+
+LICENSE="AVM-dtrace"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+RESTRICT="mirror bindist"
+
+RDEPEND="net-dialup/capi4k-utils"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}"/${P}.static "${DISTDIR}"/${P}-readme.txt . || die
+}
+
+src_prepare() {
+ edos2unix ${P}-readme.txt
+}
+
+src_install() {
+ exeinto /opt/bin
+ newexe ${P}.static dtrace-avm
+ newdoc ${P}-readme.txt README
+}
diff --git a/net-dialup/dtrace/metadata.xml b/net-dialup/dtrace/metadata.xml
new file mode 100644
index 00000000000..3017626ca0d
--- /dev/null
+++ b/net-dialup/dtrace/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-dialup</herd>
+ <maintainer>
+ <email>sbriesen@gentoo.org</email>
+ <name>Stefan Briesenick</name>
+ </maintainer>
+ <longdescription lang="en">
+ DTRACE is a console application for Linux and traces ISDN messages with
+ AVM ISDN-controllers. The program uses manufacturer specific functions
+ for tracing and does not work with ISDN cards from other manufacturers.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-dialup/dwun/Manifest b/net-dialup/dwun/Manifest
new file mode 100644
index 00000000000..0e30c3251b1
--- /dev/null
+++ b/net-dialup/dwun/Manifest
@@ -0,0 +1 @@
+DIST dwun-0.96e.tar.gz 147960 SHA256 43aafb4e3dcb9f0aebe54661e880e04f8764da23539621beead29bcaf618d887 SHA512 6763acd60192f18ffd81edd4f4e18ccfb8c5ac3882db96f9b7d2d032e9a0c61cb843094222744525a9927981c8cc7a603fd0aa1e1d4309d3f7fab21fec028115 WHIRLPOOL 81a102494a9a2279bfae3e7ef8609869dbe9076fef5be60ca90f8bd0dce32f4a424ea4e779560fcb7f1d88722272e44fa112fb641e1b367de8883c59197814db
diff --git a/net-dialup/dwun/dwun-0.96e-r2.ebuild b/net-dialup/dwun/dwun-0.96e-r2.ebuild
new file mode 100644
index 00000000000..e16a3285f10
--- /dev/null
+++ b/net-dialup/dwun/dwun-0.96e-r2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+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"
+IUSE=""
+
+src_prepare() {
+ sed -i -e "s:TODO QUICKSTART README UPGRADING ChangeLog COPYING AUTHORS::" "${S}/Makefile.in"
+}
+
+src_configure() {
+ econf --with-docdir=share/doc/${PF} || die "econf failed."
+}
+
+src_install() {
+ einstall || die "install failed."
+
+ insinto /etc
+ newins doc/examples/complete-rcfile dwunrc
+ newins debian/dwunauth dwunauth
+ newinitd "${FILESDIR}/dwun" dwun
+
+ dodoc AUTHORS ChangeLog QUICKSTART README TODO UPGRADING
+}
+
+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/dwun-0.96e-r3.ebuild b/net-dialup/dwun/dwun-0.96e-r3.ebuild
new file mode 100644
index 00000000000..4c14de3b3de
--- /dev/null
+++ b/net-dialup/dwun/dwun-0.96e-r3.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils 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
+
+ epatch_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 00000000000..a645220c7e1
--- /dev/null
+++ b/net-dialup/dwun/files/dwun
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..deda4864010
--- /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>
+ <herd>net-dialup</herd>
+ <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 00000000000..0ad17d7be68
--- /dev/null
+++ b/net-dialup/fbgetty/Manifest
@@ -0,0 +1 @@
+DIST fbgetty-0.1.698.tar.gz 279751 SHA256 332cbffa7c489b39a7d13d12d581c27dfc57ba098041431a6845b44785cf2d35 SHA512 942304ac00ecfaad59419a0994331e59d91269ee015e3bd38faa85db0b205e6e88e1958b65e503f59b81f050a1e110aeea6534eecb3ba010096a6b5173fd1ac5 WHIRLPOOL a2a6cfd2c1cadc60e941922229cfd642f054a3221fb95dad2d63f4d44f8ebd7268fc7761b36d926b591433e4e9da3e4ea49dee6ba499ee2dfb446232c960cd37
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 00000000000..a52f622391b
--- /dev/null
+++ b/net-dialup/fbgetty/fbgetty-0.1.698-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+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 00000000000..a9722f12c11
--- /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 00000000000..1e11e7bbd01
--- /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>
+<herd>net-dialup</herd>
+</pkgmetadata>
diff --git a/net-dialup/fcpci/Manifest b/net-dialup/fcpci/Manifest
new file mode 100644
index 00000000000..32ebbbed689
--- /dev/null
+++ b/net-dialup/fcpci/Manifest
@@ -0,0 +1 @@
+DIST fcpci-0.1-0.src-11_2.rpm 1419782 SHA256 f39c7cb83b21fa9ba1de71f357c72552aa1c5327d7ad4ac55274e71e9da3f8e4 SHA512 fa6277e138d44fbf7865cbb035f11a6a1244827c3b1197a6d33a05c8de41366d3f1765a9d6a6c2b5281b8f11e74eabaec827825425b572e8bbf4982cb009e85a WHIRLPOOL f15ce2f094b5abb254b935b323576367c6069004db7cabb0d3615dd32ac31bdfa5140e3e80a67cb07bad6356eb53a389c0dca6823a3b82128ec867ecdba529f8
diff --git a/net-dialup/fcpci/fcpci-0.1-r3.ebuild b/net-dialup/fcpci/fcpci-0.1-r3.ebuild
new file mode 100644
index 00000000000..5c9db8db60d
--- /dev/null
+++ b/net-dialup/fcpci/fcpci-0.1-r3.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils linux-mod rpm
+
+DESCRIPTION="AVM kernel modules for Fritz!Card PCI"
+HOMEPAGE="http://opensuse.foehr-it.de/"
+SRC_URI="http://opensuse.foehr-it.de/rpms/11_2/src/${P}-0.src.rpm -> ${P}-0.src-11_2.rpm"
+
+LICENSE="AVM-FC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="!net-dialup/fritzcapi"
+RDEPEND="${DEPEND}
+ net-dialup/capi4k-utils"
+
+RESTRICT="mirror primaryuri"
+
+S="${WORKDIR}/fritz"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+
+ if kernel_is le 3 0 ; then
+ die "This package works only with 3.x kernels!"
+ fi
+
+ BUILD_TARGETS="all"
+ BUILD_PARAMS="KDIR=${KV_DIR} LIBDIR=${S}/src V=1"
+ MODULE_NAMES="${PN}(net:${S}/src)"
+}
+
+src_unpack() {
+ local BIT=""
+ use amd64 && BIT="64bit-"
+ rpm_unpack ${A}
+ DISTDIR="${WORKDIR}" unpack ${PN}-suse[0-9][0-9]-${BIT}[0-9].[0-9]*-[0-9]*.tar.gz
+}
+
+src_prepare() {
+ local PAT="012345"
+ use amd64 && PAT="1234"
+ PAT="${PAT}67"
+
+ epatch $(sed -n "s|^Patch[${PAT}]:\s*\(.*\)|../\1|p" "${WORKDIR}/${PN}.spec")
+
+ epatch "${FILESDIR}"/fcpci-kernel-2.6.34.patch
+
+ if use amd64; then
+ epatch "${FILESDIR}"/fcpci-kernel-2.6.39-amd64.patch
+ else
+ epatch "${FILESDIR}"/fcpci-kernel-2.6.39.patch
+ fi
+
+ if kernel_is ge 3 2 0 ; then
+ epatch "${FILESDIR}"/fcpci-kernel-3.2.0.patch
+ fi
+ if kernel_is ge 3 4 0 ; then
+ epatch "${FILESDIR}"/fcpci-kernel-3.4.0.patch
+ fi
+ if kernel_is ge 3 8 0 ; then
+ epatch "${FILESDIR}"/fcpci-kernel-3.8.0.patch
+ fi
+ if kernel_is ge 3 10 0 ; then
+ epatch "${FILESDIR}"/fcpci-kernel-3.10.0.patch
+ fi
+
+ epatch_user
+
+ convert_to_m src/Makefile
+
+ for i in lib/*-lib.o; do
+ einfo "Localize symbols in ${i##*/} ..."
+ objcopy -L memcmp -L memcpy -L memmove -L memset -L strcat \
+ -L strcmp -L strcpy -L strlen -L strncmp -L strncpy "${i}"
+ done
+}
+
+src_install() {
+ linux-mod_src_install
+ dodoc CAPI*.txt
+ dohtml *.html
+}
diff --git a/net-dialup/fcpci/files/fcpci-kernel-2.6.34.patch b/net-dialup/fcpci/files/fcpci-kernel-2.6.34.patch
new file mode 100644
index 00000000000..ea20ac5176e
--- /dev/null
+++ b/net-dialup/fcpci/files/fcpci-kernel-2.6.34.patch
@@ -0,0 +1,126 @@
+--- fritz/src/driver.c.orig 2010-12-09 16:47:24.552314553 +0100
++++ fritz/src/driver.c 2010-12-09 16:53:16.040981703 +0100
+@@ -48,6 +48,8 @@
+ #include "defs.h"
+ #include "lib.h"
+ #include "driver.h"
++#include <linux/proc_fs.h>
++#include <linux/seq_file.h>
+
+ /*---------------------------------------------------------------------------*\
+ \*---------------------------------------------------------------------------*/
+@@ -220,16 +220,6 @@
+ } /* kill_version */
+
+ /*---------------------------------------------------------------------------*\
+-\*---------------------------------------------------------------------------*/
+-static void pprintf (char * page, int * len, const char * fmt, ...) {
+- va_list args;
+-
+- va_start (args, fmt);
+- *len += vsprintf (page + *len, fmt, args);
+- va_end (args);
+-} /* pprintf */
+-
+-/*---------------------------------------------------------------------------*\
+ \*-C-------------------------------------------------------------------------*/
+ static inline int in_critical (void) {
+
+@@ -490,39 +480,33 @@
+
+ /*---------------------------------------------------------------------------*\
+ \*---------------------------------------------------------------------------*/
+-static int __kcapi ctr_info (
+- char * page,
+- char ** start,
+- off_t ofs,
+- int count,
+- int * eof,
+- struct capi_ctr * ctrl
+-) {
++static int __kcapi ctr_info (struct seq_file *m, void *v)
++{
++ struct capi_ctr *ctrl = m->private;
+ card_t * card;
+ char * temp;
+ unsigned char flag;
+- int len = 0;
+
+ assert (ctrl != NULL);
+ card = (card_t *) ctrl->driverdata;
+ assert (card != NULL);
+- pprintf (page, &len, "%-16s %s\n", "name", SHORT_LOGO);
+- pprintf (page, &len, "%-16s 0x%04x\n", "io", card->base);
+- pprintf (page, &len, "%-16s %d\n", "irq", card->irq);
++ seq_printf(m, "%-16s %s\n", "name", SHORT_LOGO);
++ seq_printf(m, "%-16s 0x%04x\n", "io", card->base);
++ seq_printf(m, "%-16s %d\n", "irq", card->irq);
+ temp = card->version ? card->string[1] : "A1";
+- pprintf (page, &len, "%-16s %s\n", "type", temp);
++ seq_printf(m, "%-16s %s\n", "type", temp);
+ temp = card->version ? card->string[0] : "-";
+ #if defined (__fcclassic__) || defined (__fcpcmcia__)
+- pprintf (page, &len, "%-16s 0x%04x\n", "revision", card->info);
++ seq_printf(m, "%-16s 0x%04x\n", "revision", card->info);
+ #elif defined (__fcpci__)
+- pprintf (page, &len, "%-16s %d\n", "class", card_id);
++ seq_printf(m, "%-16s %d\n", "class", card_id);
+ #endif
+- pprintf (page, &len, "%-16s %s\n", "ver_driver", temp);
+- pprintf (page, &len, "%-16s %s\n", "ver_cardtype", SHORT_LOGO);
++ seq_printf(m, "%-16s %s\n", "ver_driver", temp);
++ seq_printf(m, "%-16s %s\n", "ver_cardtype", SHORT_LOGO);
+
+ flag = ((unsigned char *) (ctrl->profile.manu))[3];
+ if (flag) {
+- pprintf(page, &len, "%-16s%s%s%s%s%s%s%s\n", "protocol",
++ seq_printf(m, "%-16s%s%s%s%s%s%s%s\n", "protocol",
+ (flag & 0x01) ? " DSS1" : "",
+ (flag & 0x02) ? " CT1" : "",
+ (flag & 0x04) ? " VN3" : "",
+@@ -534,21 +518,29 @@
+ }
+ flag = ((unsigned char *) (ctrl->profile.manu))[5];
+ if (flag) {
+- pprintf(page, &len, "%-16s%s%s%s%s\n", "linetype",
++ seq_printf(m, "%-16s%s%s%s%s\n", "linetype",
+ (flag & 0x01) ? " point to point" : "",
+ (flag & 0x02) ? " point to multipoint" : "",
+ (flag & 0x08) ? " leased line without D-channel" : "",
+ (flag & 0x04) ? " leased line with D-channel" : ""
+ );
+ }
+- if (len < ofs) {
+- return 0;
+- }
+- *eof = 1;
+- *start = page - ofs;
+- return ((count < len - ofs) ? count : len - ofs);
++ return 0;
+ } /* ctr_info */
+
++static int ctr_proc_open(struct inode *inode, struct file *file)
++{
++ return single_open(file, ctr_info, PDE(inode)->data);
++}
++
++const struct file_operations ctr_proc_fops = {
++ .owner = THIS_MODULE,
++ .open = ctr_proc_open,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
+ /*---------------------------------------------------------------------------*\
+ \*---------------------------------------------------------------------------*/
+ static void __kcapi reset_ctrl (struct capi_ctr * ctrl) {
+@@ -626,7 +618,7 @@
+ ctrl->release_appl = release_appl;
+ ctrl->send_message = send_msg;
+ ctrl->procinfo = proc_info;
+- ctrl->ctr_read_proc = ctr_info;
++ ctrl->proc_fops = &ctr_proc_fops;
+ if (0 != (res = attach_capi_ctr (ctrl))) {
+ dec_use_count ();
+ stop (card);
diff --git a/net-dialup/fcpci/files/fcpci-kernel-2.6.39-amd64.patch b/net-dialup/fcpci/files/fcpci-kernel-2.6.39-amd64.patch
new file mode 100644
index 00000000000..10e36e2d01b
--- /dev/null
+++ b/net-dialup/fcpci/files/fcpci-kernel-2.6.39-amd64.patch
@@ -0,0 +1,53 @@
+--- fritz/src/driver.c_orig 2011-09-04 16:54:30.000000000 +0200
++++ fritz/src/driver.c 2011-09-04 16:55:02.000000000 +0200
+@@ -101,7 +101,8 @@
+ static unsigned long crit_flags;
+ static atomic_t scheduler_enabled = ATOMIC_INIT (0);
+ static atomic_t scheduler_id = ATOMIC_INIT (-1);
+-static spinlock_t stack_lock = SPIN_LOCK_UNLOCKED;
++//static spinlock_t stack_lock = SPIN_LOCK_UNLOCKED;
++static DEFINE_SPINLOCK(sched_lock);
+ #if !defined (__fcclassic__)
+ static int card_id = 0;
+ #endif
+@@ -815,7 +816,7 @@
+
+ UNUSED_ARG (data);
+ atomic_set (&scheduler_id, smp_processor_id ());
+- if (spin_trylock (&stack_lock)) {
++ if (spin_trylock (&sched_lock)) {
+ while (!atomic_read (&dont_sched)) {
+ atomic_set (&dont_sched, 1);
+ os_timer_poll ();
+@@ -823,7 +824,7 @@
+ scheduler_control (TRUE);
+ }
+ }
+- spin_unlock (&stack_lock);
++ spin_unlock (&sched_lock);
+ }
+ atomic_set (&scheduler_id, -1);
+ } /* scheduler */
+@@ -839,9 +840,9 @@
+ if (atomic_read (&scheduler_id) == smp_processor_id ()) {
+ res = IRQ_RETVAL ((*capi_lib->cm_handle_events) ());
+ } else {
+- spin_lock (&stack_lock);
++ spin_lock (&sched_lock);
+ res = IRQ_RETVAL ((*capi_lib->cm_handle_events) ());
+- spin_unlock (&stack_lock);
++ spin_unlock (&sched_lock);
+ }
+ if (res == IRQ_HANDLED) {
+ atomic_set (&dont_sched, 0);
+--- fritz/src/tools.c_orig 2011-09-04 16:54:36.000000000 +0200
++++ fritz/src/tools.c 2011-09-04 16:55:06.000000000 +0200
+@@ -529,7 +529,7 @@
+ ERROR("Could not allocate lock structure!!!\n");
+ return 0;
+ }
+- tmp->lock = SPIN_LOCK_UNLOCKED;
++ spin_lock_init(&tmp->lock);
+ *plock = tmp;
+ return 1;
+ } /* lock_init */
diff --git a/net-dialup/fcpci/files/fcpci-kernel-2.6.39.patch b/net-dialup/fcpci/files/fcpci-kernel-2.6.39.patch
new file mode 100644
index 00000000000..ecc48521898
--- /dev/null
+++ b/net-dialup/fcpci/files/fcpci-kernel-2.6.39.patch
@@ -0,0 +1,24 @@
+--- fritz/src/driver.c~ 2011-06-15 21:18:25.792662667 +0200
++++ fritz/src/driver.c 2011-06-15 21:22:15.307420952 +0200
+@@ -101,7 +101,8 @@
+ static unsigned long crit_flags;
+ static atomic_t scheduler_enabled = ATOMIC_INIT (0);
+ static atomic_t scheduler_id = ATOMIC_INIT (-1);
+-static spinlock_t sched_lock = SPIN_LOCK_UNLOCKED;
++//static spinlock_t sched_lock = SPIN_LOCK_UNLOCKED;
++static DEFINE_SPINLOCK(sched_lock);
+ #if !defined (__fcclassic__)
+ static int card_id = 0;
+ #endif
+--- fritz/src/tools.c~ 2011-06-15 21:18:32.336741325 +0200
++++ fritz/src/tools.c 2011-06-15 21:22:23.899524196 +0200
+@@ -529,7 +529,8 @@
+ ERROR("Could not allocate lock structure!!!\n");
+ return 0;
+ }
+- tmp->lock = SPIN_LOCK_UNLOCKED;
++// tmp->lock = SPIN_LOCK_UNLOCKED;
++ spin_lock_init(&tmp->lock);
+ *plock = tmp;
+ return 1;
+ } /* lock_init */
diff --git a/net-dialup/fcpci/files/fcpci-kernel-3.10.0.patch b/net-dialup/fcpci/files/fcpci-kernel-3.10.0.patch
new file mode 100644
index 00000000000..d7cbddaa0cd
--- /dev/null
+++ b/net-dialup/fcpci/files/fcpci-kernel-3.10.0.patch
@@ -0,0 +1,22 @@
+--- fritz/src/driver.c.old 2013-07-15 18:29:24.311278403 +0200
++++ fritz/src/driver.c 2013-07-15 18:34:30.139297718 +0200
+@@ -37,6 +37,7 @@
+ #include <linux/ctype.h>
+ #include <linux/string.h>
+ #include <linux/list.h>
++#include <linux/proc_fs.h>
+ #include <linux/capi.h>
+ #include <linux/isdn/capilli.h>
+ #include <linux/isdn/capiutil.h>
+@@ -534,7 +535,10 @@ static int __kcapi ctr_info (struct seq_
+
+ static int ctr_proc_open(struct inode *inode, struct file *file)
+ {
+- return single_open(file, ctr_info, PDE(inode)->data);
++ return single_open(file, ctr_info, PDE_DATA(inode));
++
++/* > = kernel 3.10.0 rename PDE to PDE_DATE without pointer to data in linux/proc_fs.h
++ Arnd Feldmueller <arnd.feldmueller@web.de> */
+ }
+
+ const struct file_operations ctr_proc_fops = {
diff --git a/net-dialup/fcpci/files/fcpci-kernel-3.2.0.patch b/net-dialup/fcpci/files/fcpci-kernel-3.2.0.patch
new file mode 100644
index 00000000000..45b9b094daf
--- /dev/null
+++ b/net-dialup/fcpci/files/fcpci-kernel-3.2.0.patch
@@ -0,0 +1,10 @@
+--- fritz/src/driver.c_old 2012-01-10 17:10:26.000000000 +0100
++++ fritz/src/driver.c 2012-01-10 17:10:35.000000000 +0100
+@@ -28,6 +28,7 @@
+ #include <linux/ioport.h>
+ #include <linux/sched.h>
+ #include <linux/interrupt.h>
++#include <linux/export.h>
+ #include <linux/spinlock.h>
+ #include <linux/netdevice.h>
+ #include <linux/skbuff.h>
diff --git a/net-dialup/fcpci/files/fcpci-kernel-3.4.0.patch b/net-dialup/fcpci/files/fcpci-kernel-3.4.0.patch
new file mode 100644
index 00000000000..dacae28a407
--- /dev/null
+++ b/net-dialup/fcpci/files/fcpci-kernel-3.4.0.patch
@@ -0,0 +1,11 @@
+--- fritz/src/driver.c_old 2012-05-21 20:58:44.000000000 +0200
++++ fritz/src/driver.c 2012-05-21 20:58:59.000000000 +0200
+@@ -23,7 +23,7 @@
+ #include <asm/io.h>
+ #include <asm/irq.h>
+ #include <asm/atomic.h>
+-#include <asm/system.h>
++#include <asm/switch_to.h>
+ #include <linux/version.h>
+ #include <linux/ioport.h>
+ #include <linux/sched.h>
diff --git a/net-dialup/fcpci/files/fcpci-kernel-3.8.0.patch b/net-dialup/fcpci/files/fcpci-kernel-3.8.0.patch
new file mode 100644
index 00000000000..9fec4ecc359
--- /dev/null
+++ b/net-dialup/fcpci/files/fcpci-kernel-3.8.0.patch
@@ -0,0 +1,65 @@
+--- src/main.c.old 2013-02-28 18:00:31.303958236 +0100
++++ src/main.c 2013-02-28 18:01:22.563203394 +0100
+@@ -154,7 +154,7 @@
+ \*---------------------------------------------------------------------------*/
+ #if defined (__fcclassic__)
+
+-static int __devinit isa_start (
++static int isa_start (
+ unsigned short io_arg,
+ unsigned short irq_arg
+ ) {
+@@ -191,7 +191,7 @@
+ \*---------------------------------------------------------------------------*/
+ #if defined (__fcpnp__)
+
+-static int __devinit fritz_probe (
++static int fritz_probe (
+ struct pnp_dev * dev,
+ const struct pnp_device_id * id
+ ) {
+@@ -229,7 +229,7 @@
+ \*---------------------------------------------------------------------------*/
+ #if defined (__fcpnp__)
+
+-static void __devexit fritz_remove (struct pnp_dev * dev) {
++static void fritz_remove (struct pnp_dev * dev) {
+ card_t * card;
+
+ card = (card_t *) pnp_get_drvdata (dev);
+@@ -253,7 +253,7 @@
+ \*---------------------------------------------------------------------------*/
+ #if defined (__fcpci__)
+
+-static int __devinit fritz_probe (
++static int fritz_probe (
+ struct pci_dev * dev,
+ const struct pci_device_id * id
+ ) {
+@@ -294,7 +294,7 @@
+ \*---------------------------------------------------------------------------*/
+ #if defined (__fcpci__)
+
+-static void __devexit fritz_remove (struct pci_dev * dev) {
++static void fritz_remove (struct pci_dev * dev) {
+ card_t * card;
+
+ card = (card_t *) pci_get_drvdata (dev);
+@@ -322,7 +322,7 @@
+ .name = TARGET,
+ .id_table = fcpci_id_table,
+ .probe = fritz_probe,
+- .remove = __devexit_p(fritz_remove),
++ .remove = fritz_remove,
+ } ;
+
+ #elif defined (__fcpnp__)
+@@ -332,7 +332,7 @@
+ .name = TARGET,
+ .id_table = fcpnp_id_table,
+ .probe = fritz_probe,
+- .remove = __devexit_p(fritz_remove),
++ .remove = fritz_remove,
+ } ;
+
+ #endif
diff --git a/net-dialup/fcpci/files/kernel-2.6.34.patch b/net-dialup/fcpci/files/kernel-2.6.34.patch
new file mode 100644
index 00000000000..26b638147aa
--- /dev/null
+++ b/net-dialup/fcpci/files/kernel-2.6.34.patch
@@ -0,0 +1,129 @@
+--- driver.c~ 2010-05-17 11:51:30.315940940 +0200
++++ driver.c 2010-05-17 11:51:30.362264370 +0200
+@@ -48,6 +48,8 @@
+ #include "defs.h"
+ #include "lib.h"
+ #include "driver.h"
++#include <linux/proc_fs.h>
++#include <linux/seq_file.h>
+
+ /*---------------------------------------------------------------------------*\
+ \*---------------------------------------------------------------------------*/
+@@ -490,39 +492,34 @@
+
+ /*---------------------------------------------------------------------------*\
+ \*---------------------------------------------------------------------------*/
+-static int __kcapi ctr_info (
+- char * page,
+- char ** start,
+- off_t ofs,
+- int count,
+- int * eof,
+- struct capi_ctr * ctrl
++
++static int __kcapi ctr_info (struct seq_file *m, void *v
+ ) {
++ struct capi_ctr *ctrl = m->private;
+ card_t * card;
+ char * temp;
+ unsigned char flag;
+- int len = 0;
+
+ assert (ctrl != NULL);
+ card = (card_t *) ctrl->driverdata;
+ assert (card != NULL);
+- pprintf (page, &len, "%-16s %s\n", "name", SHORT_LOGO);
+- pprintf (page, &len, "%-16s 0x%04x\n", "io", card->base);
+- pprintf (page, &len, "%-16s %d\n", "irq", card->irq);
++ seq_printf(m, "%-16s %s\n", "name", SHORT_LOGO);
++ seq_printf(m, "%-16s 0x%04x\n", "io", card->base);
++ seq_printf(m, "%-16s %d\n", "irq", card->irq);
+ temp = card->version ? card->string[1] : "A1";
+- pprintf (page, &len, "%-16s %s\n", "type", temp);
++ seq_printf(m, "%-16s %s\n", "type", temp);
+ temp = card->version ? card->string[0] : "-";
+ #if defined (__fcclassic__) || defined (__fcpcmcia__)
+- pprintf (page, &len, "%-16s 0x%04x\n", "revision", card->info);
++ seq_printf(m, "%-16s 0x%04x\n", "revision", card->info);
+ #elif defined (__fcpci__)
+- pprintf (page, &len, "%-16s %d\n", "class", card_id);
++ seq_printf(m, "%-16s %d\n", "class", card_id);
+ #endif
+- pprintf (page, &len, "%-16s %s\n", "ver_driver", temp);
+- pprintf (page, &len, "%-16s %s\n", "ver_cardtype", SHORT_LOGO);
++ seq_printf(m, "%-16s %s\n", "ver_driver", temp);
++ seq_printf(m, "%-16s %s\n", "ver_cardtype", SHORT_LOGO);
+
+ flag = ((unsigned char *) (ctrl->profile.manu))[3];
+ if (flag) {
+- pprintf(page, &len, "%-16s%s%s%s%s%s%s%s\n", "protocol",
++ seq_printf(m, "%-16s%s%s%s%s%s%s%s\n", "protocol",
+ (flag & 0x01) ? " DSS1" : "",
+ (flag & 0x02) ? " CT1" : "",
+ (flag & 0x04) ? " VN3" : "",
+@@ -534,21 +531,30 @@
+ }
+ flag = ((unsigned char *) (ctrl->profile.manu))[5];
+ if (flag) {
+- pprintf(page, &len, "%-16s%s%s%s%s\n", "linetype",
++ seq_printf(m, "%-16s%s%s%s%s\n", "linetype",
+ (flag & 0x01) ? " point to point" : "",
+ (flag & 0x02) ? " point to multipoint" : "",
+ (flag & 0x08) ? " leased line without D-channel" : "",
+ (flag & 0x04) ? " leased line with D-channel" : ""
+ );
+ }
+- if (len < ofs) {
+- return 0;
+- }
+- *eof = 1;
+- *start = page - ofs;
+- return ((count < len - ofs) ? count : len - ofs);
++
++ return 0;
+ } /* ctr_info */
+
++static int ctr_proc_open(struct inode *inode, struct file *file)
++{
++ return single_open(file, ctr_info, PDE(inode)->data);
++}
++
++const struct file_operations ctr_proc_fops = {
++ .owner = THIS_MODULE,
++ .open = ctr_proc_open,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
+ /*---------------------------------------------------------------------------*\
+ \*---------------------------------------------------------------------------*/
+ static void __kcapi reset_ctrl (struct capi_ctr * ctrl) {
+--- driver.c~ 2010-05-17 19:55:09.158499792 +0200
++++ driver.c 2010-05-17 19:55:09.190784099 +0200
+@@ -222,16 +222,6 @@
+ } /* kill_version */
+
+ /*---------------------------------------------------------------------------*\
+-\*---------------------------------------------------------------------------*/
+-static void pprintf (char * page, int * len, const char * fmt, ...) {
+- va_list args;
+-
+- va_start (args, fmt);
+- *len += vsprintf (page + *len, fmt, args);
+- va_end (args);
+-} /* pprintf */
+-
+-/*---------------------------------------------------------------------------*\
+ \*-C-------------------------------------------------------------------------*/
+ static inline int in_critical (void) {
+
+@@ -632,7 +622,7 @@
+ ctrl->release_appl = release_appl;
+ ctrl->send_message = send_msg;
+ ctrl->procinfo = proc_info;
+- ctrl->ctr_read_proc = ctr_info;
++ ctrl->proc_fops = &ctr_proc_fops;
+ if (0 != (res = attach_capi_ctr (ctrl))) {
+ dec_use_count ();
+ stop (card);
diff --git a/net-dialup/fcpci/files/kernel-2.6.39.patch b/net-dialup/fcpci/files/kernel-2.6.39.patch
new file mode 100644
index 00000000000..a77a1121da4
--- /dev/null
+++ b/net-dialup/fcpci/files/kernel-2.6.39.patch
@@ -0,0 +1,24 @@
+--- driver.c~ 2011-06-15 21:18:25.792662667 +0200
++++ driver.c 2011-06-15 21:22:15.307420952 +0200
+@@ -101,7 +101,8 @@
+ static unsigned long crit_flags;
+ static atomic_t scheduler_enabled = ATOMIC_INIT (0);
+ static atomic_t scheduler_id = ATOMIC_INIT (-1);
+-static spinlock_t sched_lock = SPIN_LOCK_UNLOCKED;
++//static spinlock_t sched_lock = SPIN_LOCK_UNLOCKED;
++static DEFINE_SPINLOCK(sched_lock);
+ #if !defined (__fcclassic__)
+ static int card_id = 0;
+ #endif
+--- tools.c~ 2011-06-15 21:18:32.336741325 +0200
++++ tools.c 2011-06-15 21:22:23.899524196 +0200
+@@ -529,7 +529,8 @@
+ ERROR("Could not allocate lock structure!!!\n");
+ return 0;
+ }
+- tmp->lock = SPIN_LOCK_UNLOCKED;
++// tmp->lock = SPIN_LOCK_UNLOCKED;
++ spin_lock_init(&tmp->lock);
+ *plock = tmp;
+ return 1;
+ } /* lock_init */
diff --git a/net-dialup/fcpci/metadata.xml b/net-dialup/fcpci/metadata.xml
new file mode 100644
index 00000000000..756ddd4a622
--- /dev/null
+++ b/net-dialup/fcpci/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-dialup</herd>
+</pkgmetadata>
diff --git a/net-dialup/freeradius-client/Manifest b/net-dialup/freeradius-client/Manifest
new file mode 100644
index 00000000000..03485b8e64d
--- /dev/null
+++ b/net-dialup/freeradius-client/Manifest
@@ -0,0 +1 @@
+DIST freeradius-client-1.1.6.tar.bz2 297916 SHA256 a3c9522ed6d9bc795794595a8f3eebada868ea11a0c046637500faf257f9688f
diff --git a/net-dialup/freeradius-client/freeradius-client-1.1.6.ebuild b/net-dialup/freeradius-client/freeradius-client-1.1.6.ebuild
new file mode 100644
index 00000000000..4105214a827
--- /dev/null
+++ b/net-dialup/freeradius-client/freeradius-client-1.1.6.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+DESCRIPTION="FreeRADIUS Client framework"
+HOMEPAGE="http://wiki.freeradius.org/Radiusclient"
+SRC_URI="ftp://ftp.freeradius.org/pub/freeradius/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="scp shadow"
+
+DEPEND="!net-dialup/radiusclient
+ !net-dialup/radiusclient-ng"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ econf \
+ $(use_enable scp) \
+ $(use_enable shadow) \
+ --with-secure-path || die "econf failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ dodoc BUGS README* doc/ChangeLog doc/login.example doc/release-method.txt
+ 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 00000000000..1c0b9d808f6
--- /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>
+<herd>net-dialup</herd>
+<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 00000000000..a2dffed40d8
--- /dev/null
+++ b/net-dialup/freeradius/Manifest
@@ -0,0 +1,3 @@
+DIST freeradius-2.2.0-patches-4.tar.xz 3140 SHA256 9fd7b6f7e1501d63a073e6279b20eb6d8154e7898d81c85a5c548543ab33c1af SHA512 38ebd65d9ad8ce8f513f2f5c7fd9ff43b81cf468038a49f9eb7f4a54d13783e88866c3031e7abc0fc8b65d2aec4f347efa358b9e7e2aadb2d15567ce7e125d1d WHIRLPOOL a532444f6bfebe260a6b4bf43157fa1624ce9920a86635172ac94e0f757263904bac6ca6a472e12df73e32a8d25d6f7b094272bd743d13c566f23bfcbff6df27
+DIST freeradius-server-2.2.5.tar.gz 4415950 SHA256 8c4c2a0b600a8d85d2235589a5e80d4fefd1f52317e9daf8193731566fa9d012 SHA512 511599b4f4f5906441d0cda61946341f2226b9aae69b6f68b03a19898b6385499a8221933c191232d50f736cab93f0f6f271e4defe4552e7738cb21e2415f053 WHIRLPOOL 629ac42749b736a7cd606c97fb149ea6f3b11d0e77bc5fc69785e4c7956f073131eb16420f276de5664e977a37a6784d0bbff08a15c1c23389f5369320a4cb12
+DIST freeradius-server-3.0.3.tar.gz 4387083 SHA256 57e9932e5401670d0f0000080b942aee2cd6ca80422f76acd21f13a4be46335e SHA512 a4fbb0a19f5946182c0cac6d62270db378674e48350c7c3b8f7d8a2a1b16c95c9b205af8d7ed22009b6392d4ab7cb251694d2593a39d9e4efc8eec9ff736bd01 WHIRLPOOL 2f263e096e3ace00feb39f68662d5f3346ce35dfd7a451b23ebfffd5abef4a881ca2e7115eb274a8c10fef965c4e82a3d3144595c226307995703875d7133ef5
diff --git a/net-dialup/freeradius/files/freeradius-2.2.5-gentoo.patch b/net-dialup/freeradius/files/freeradius-2.2.5-gentoo.patch
new file mode 100644
index 00000000000..c51597cbb92
--- /dev/null
+++ b/net-dialup/freeradius/files/freeradius-2.2.5-gentoo.patch
@@ -0,0 +1,104 @@
+--- a/raddb/radiusd.conf.in
++++ b/raddb/radiusd.conf.in
+@@ -103,7 +103,7 @@
+ # make
+ # make install
+ #
+-libdir = @libdir@
++libdir = @libdir@/freeradius
+
+ # pidfile: Where to place the PID of the RADIUS server.
+ #
+--- a/src/modules/Makefile
++++ b/src/modules/Makefile
+@@ -12,7 +12,7 @@
+ @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
+
+ install:
+- $(INSTALL) -d -m 755 $(R)$(libdir)
++ $(INSTALL) -d -m 755 $(R)$(pkglibdir)
+ @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
+
+ clean:
+--- a/src/modules/rules.mak
++++ b/src/modules/rules.mak
+@@ -122,7 +122,7 @@
+ $(TARGET).la: $(RLM_SUBDIRS) $(LT_OBJS)
+ $(LIBTOOL) --mode=link --tag=CC $(CC) -release $(RADIUSD_VERSION_STRING) \
+ -module $(LINK_MODE) $(LDFLAGS) $(RLM_LDFLAGS) -o $@ \
+- -rpath $(libdir) $^ $(LIBRADIUS) $(RLM_LIBS) $(LIBS)
++ -rpath $(pkglibdir) $^ $(LIBRADIUS) $(RLM_LIBS) $(LIBS)
+
+ #######################################################################
+ #
+@@ -163,13 +163,11 @@
+ # Do any module-specific installation.
+ #
+ # If there isn't a TARGET defined, then don't do anything.
+-# Otherwise, install the libraries into $(libdir)
++# Otherwise, install the libraries into $(pkglibdir)
+ #
+ install:
+ @[ "x$(RLM_INSTALL)" = "x" ] || $(MAKE) $(MFLAGS) $(RLM_INSTALL)
+ if [ "x$(TARGET)" != "x" ]; then \
+ $(LIBTOOL) --mode=install $(INSTALL) -c \
+- $(TARGET).la $(R)$(libdir)/$(TARGET).la || exit $$?; \
+- rm -f $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION_STRING).la; \
+- ln -s $(TARGET).la $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION_STRING).la || exit $$?; \
++ $(TARGET).la $(R)$(pkglibdir)/$(TARGET).la || exit $$?; \
+ fi
+--- a/src/modules/rlm_sql/drivers/rules.mak
++++ b/src/modules/rlm_sql/drivers/rules.mak
+@@ -103,7 +103,7 @@
+ $(TARGET).la: $(LT_OBJS)
+ $(LIBTOOL) --mode=link --tag=CC $(CC) -release $(RADIUSD_VERSION_STRING) \
+ -module $(LINK_MODE) $(LDFLAGS) $(RLM_SQL_LDFLAGS) -o $@ \
+- -rpath $(libdir) $^ $(RLM_SQL_LIBS)
++ -rpath $(pkglibdir) $^ $(RLM_SQL_LIBS)
+
+ #######################################################################
+ #
+@@ -141,12 +141,10 @@
+ # Do any module-specific installation.
+ #
+ # If there isn't a TARGET defined, then don't do anything.
+-# Otherwise, install the libraries into $(libdir)
++# Otherwise, install the libraries into $(pkglibdir)
+ #
+ install:
+ if [ "x$(TARGET)" != "x" ]; then \
+ $(LIBTOOL) --mode=install $(INSTALL) -c \
+- $(TARGET).la $(R)$(libdir)/$(TARGET).la || exit $$?; \
+- rm -f $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION_STRING).la; \
+- ln -s $(TARGET).la $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION_STRING).la || exit $$?; \
++ $(TARGET).la $(R)$(pkglibdir)/$(TARGET).la || exit $$?; \
+ fi
+--- a/src/lib/Makefile
++++ b/src/lib/Makefile
+@@ -42,7 +42,7 @@
+
+ $(TARGET).la: $(LT_OBJS)
+ $(LIBTOOL) --mode=link --tag=CC $(CC) -release $(RADIUSD_VERSION) \
+- $(LDFLAGS) $(LINK_MODE) -o $@ -rpath $(libdir) $^
++ $(LDFLAGS) $(LINK_MODE) -o $@ -rpath $(libdir) $^ $(LIBS)
+
+ $(LT_OBJS): $(INCLUDES)
+
+@@ -54,7 +54,5 @@
+ $(INSTALL) -d -m 755 $(R)$(libdir)
+ $(LIBTOOL) --mode=install $(INSTALL) -c $(TARGET).la \
+ $(R)$(libdir)/$(TARGET).la
+- rm -f $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la;
+- ln -s $(TARGET).la $(R)$(libdir)/$(TARGET)-$(RADIUSD_VERSION).la
+
+ reconfig:
+--- a/Make.inc.in
++++ b/Make.inc.in
+@@ -10,6 +10,7 @@
+ sysconfdir = @sysconfdir@
+ localstatedir = @localstatedir@
+ libdir = @libdir@
++pkglibdir = @libdir@/freeradius
+ bindir = @bindir@
+ sbindir = @sbindir@
+ docdir = @docdir@
diff --git a/net-dialup/freeradius/files/radius.conf-r3 b/net-dialup/freeradius/files/radius.conf-r3
new file mode 100644
index 00000000000..3c1bf3228cb
--- /dev/null
+++ b/net-dialup/freeradius/files/radius.conf-r3
@@ -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 00000000000..e5e607ce18e
--- /dev/null
+++ b/net-dialup/freeradius/files/radius.init-r3
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2014 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-2.2.5.ebuild b/net-dialup/freeradius/freeradius-2.2.5.ebuild
new file mode 100644
index 00000000000..6d7d8881203
--- /dev/null
+++ b/net-dialup/freeradius/freeradius-2.2.5.ebuild
@@ -0,0 +1,195 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit autotools eutils pam python-any-r1 user
+
+PATCHSET=4
+
+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
+ http://dev.gentoo.org/~flameeyes/${PN}/${PN}-2.2.0-patches-${PATCHSET}.tar.xz
+
+"
+HOMEPAGE="http://www.freeradius.org/"
+
+KEYWORDS="amd64 ~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="firebird? ( bindist )"
+
+RDEPEND="!net-dialup/cistronradius
+ !net-dialup/gnuradius
+ sys-devel/libtool
+ dev-lang/perl
+ sys-libs/gdbm
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline )
+ pcap? ( net-libs/libpcap )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ firebird? ( dev-db/firebird )
+ pam? ( virtual/pam )
+ ssl? ( dev-libs/openssl )
+ 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}"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup radius
+ enewuser radius -1 -1 /var/log/radius radius
+
+ python-any-r1_pkg_setup
+ export PYTHONBIN="${EPYTHON}"
+}
+
+src_prepare() {
+ epatch \
+ "${WORKDIR}"/patches/0002*patch \
+ "${WORKDIR}"/patches/0004*patch \
+ "${FILESDIR}"/${P}-gentoo.patch
+
+ # 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}
+ use ldap || rm -r src/modules/rlm_ldap
+ use kerberos || rm -r src/modules/rlm_krb5
+ use pam || rm -r src/modules/rlm_pam
+ use python || rm -r src/modules/rlm_python
+ # Do not install ruby rlm module, bug #483108
+ rm -r src/modules/rlm_ruby
+
+ # 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 # requires TNCS library
+ rm -r src/modules/rlm_eap/types/rlm_eap_ikev2 # requires libeap-ikev2
+ rm -r src/modules/rlm_opendirectory # requires some membership.h
+ rm -r src/modules/rlm_redis{,who} # requires redis
+ rm -r src/modules/rlm_sql/drivers/rlm_sql_{db2,freetds,sybase}
+
+ # 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
+ }
+
+ usesqldriver mysql
+ usesqldriver postgres postgresql
+ usesqldriver firebird
+ usesqldriver iodbc
+ usesqldriver odbc unixodbc
+ usesqldriver oracle
+ usesqldriver sqlite
+
+ # remove bundled ltdl to avoid conflicts
+ rm -r libltdl
+
+ epatch_user
+
+ eautoreconf
+}
+
+src_configure() {
+ # fix bug #77613
+ if has_version app-crypt/heimdal; then
+ myconf="${myconf} --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.
+ econf \
+ --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) \
+ ${myconf}
+}
+
+src_compile() {
+ emake LIBTOOL=libtool
+}
+
+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
+
+ emake LIBTOOL=libtool R="${D}" install
+
+ fowners -R root:radius /etc/raddb
+
+ sed -i \
+ -e 's:/var/run/radiusd:/run/radiusd:' \
+ "${D}"/etc/raddb/radiusd.conf || die
+
+ pamd_mimic_system radiusd auth account password session
+
+ dodoc CREDITS
+
+ rm "${D}/usr/sbin/rc.radiusd"
+
+ newinitd "${FILESDIR}/radius.init-r3" radiusd
+ newconfd "${FILESDIR}/radius.conf-r3" radiusd
+}
+
+pkg_config() {
+ if use ssl; then
+ cd "${ROOT}"/etc/raddb/certs
+ ./bootstrap
+ 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.3.ebuild b/net-dialup/freeradius/freeradius-3.0.3.ebuild
new file mode 100644
index 00000000000..8aec7fe5c18
--- /dev/null
+++ b/net-dialup/freeradius/freeradius-3.0.3.ebuild
@@ -0,0 +1,215 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit autotools eutils pam python-any-r1 user
+
+PATCHSET=4
+
+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=""
+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
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline )
+ pcap? ( net-libs/libpcap )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ firebird? ( dev-db/firebird )
+ pam? ( virtual/pam )
+ ssl? ( dev-libs/openssl )
+ 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}"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup radius
+ enewuser radius -1 -1 /var/log/radius radius
+
+ python-any-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}
+ use ldap || rm -r src/modules/rlm_ldap
+ use kerberos || rm -r src/modules/rlm_krb5
+ use pam || rm -r src/modules/rlm_pam
+ use python || rm -r src/modules/rlm_python
+ # Do not install ruby rlm module, bug #483108
+ rm -r src/modules/rlm_ruby
+
+ # 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 # requires TNCS library
+ rm -r src/modules/rlm_eap/types/rlm_eap_ikev2 # requires libeap-ikev2
+ rm -r src/modules/rlm_opendirectory # requires some membership.h
+ rm -r src/modules/rlm_redis{,who} # requires redis
+ rm -r src/modules/rlm_sql/drivers/rlm_sql_{db2,freetds}
+
+ # 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:/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
+
+ epatch_user
+
+ eautoreconf
+}
+
+src_configure() {
+ # fix bug #77613
+ if has_version app-crypt/heimdal; then
+ myconf="${myconf} --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.
+ econf \
+ --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) \
+ ${myconf}
+}
+
+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
+ 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"
+
+ newinitd "${FILESDIR}/radius.init-r3" radiusd
+ newconfd "${FILESDIR}/radius.conf-r3" radiusd
+
+ prune_libtool_files
+}
+
+pkg_config() {
+ if use ssl; then
+ cd "${ROOT}"/etc/raddb/certs
+ ./bootstrap
+ 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 00000000000..381ec90e597
--- /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>
+ <herd>net-dialup</herd>
+ <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 00000000000..b3650d48933
--- /dev/null
+++ b/net-dialup/globespan-adsl/Manifest
@@ -0,0 +1,2 @@
+DIST eciadsl-usermode-0.11.tar.gz 323391 SHA256 2382f315fda4241a0043bac1dfc669f006d8e93e87fa382b263b1672972f4077
+DIST eciadsl-usermode-0.12.tar.gz 338548 SHA256 7159b80bb2ad6185c1d3eb183777ad54af2d0e40d735fc9f4dda9d16276c2947
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 00000000000..dcb2141197c
--- /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 00000000000..344ec3ddbd2
--- /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 00000000000..efed6932725
--- /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 00000000000..b381b276421
--- /dev/null
+++ b/net-dialup/globespan-adsl/globespan-adsl-0.11-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..c152e11f15e
--- /dev/null
+++ b/net-dialup/globespan-adsl/globespan-adsl-0.12.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..58a624c08f7
--- /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>
+<herd>net-dialup</herd>
+<longdescription>ADSL modem driver for Globespan/ECI chipsets.</longdescription>
+</pkgmetadata>
diff --git a/net-dialup/gnuradius/Manifest b/net-dialup/gnuradius/Manifest
new file mode 100644
index 00000000000..82da391db54
--- /dev/null
+++ b/net-dialup/gnuradius/Manifest
@@ -0,0 +1 @@
+DIST radius-1.6.1.tar.gz 2602368 SHA256 3053b670704aa2fbcb6235d9a8f2e31329849faa5eca8c2b9a55cb35ff0993d0 SHA512 55a3273075eb74ad708b8808ec56e7df24cd442b6d36070ab0dc076136919bf18beb24cb3ee2dcd33d672f983e9439f5cd60932c64b1e490111726eecc43fcf0 WHIRLPOOL 1a7b12d3767697235fa5e040cfb14a1f0334504deb08cae83d7e4af4740d24dce2bc707b486af1bd2a0a41b0643d67f68f9cc60d8ca66c75103ac0c8e758d60e
diff --git a/net-dialup/gnuradius/files/gnuradius-1.5-gcc41.patch b/net-dialup/gnuradius/files/gnuradius-1.5-gcc41.patch
new file mode 100644
index 00000000000..a269dfc993b
--- /dev/null
+++ b/net-dialup/gnuradius/files/gnuradius-1.5-gcc41.patch
@@ -0,0 +1,23 @@
+diff -Nru radius-1.5.orig/include/radiusd.h radius-1.5/include/radiusd.h
+--- radius-1.5.orig/include/radiusd.h 2007-06-27 15:54:21.000000000 +0300
++++ radius-1.5/include/radiusd.h 2007-07-14 09:17:16.000000000 +0300
+@@ -340,7 +340,6 @@
+ extern int max_threads;
+ extern int num_threads;
+ #ifdef USE_SERVER_GUILE
+-extern unsigned scheme_gc_interval;
+ extern u_int scheme_task_timeout;
+ #endif
+ #ifdef USE_SNMP
+diff -Nru radius-1.5.orig/radiusd/log.c radius-1.5/radiusd/log.c
+--- radius-1.5.orig/radiusd/log.c 2007-06-27 15:54:22.000000000 +0300
++++ radius-1.5/radiusd/log.c 2007-07-14 09:17:16.000000000 +0300
+@@ -185,7 +185,7 @@
+ if (rewrite_invoke(String,
+ &val,
+ hook_name,
+- req,
++ (grad_request_t *)req,
+ "isi",
+ req->code,
+ grad_nas_request_to_name(req,
diff --git a/net-dialup/gnuradius/files/gnuradius-1.5-implicit-decl.patch b/net-dialup/gnuradius/files/gnuradius-1.5-implicit-decl.patch
new file mode 100644
index 00000000000..2e4b509b9c2
--- /dev/null
+++ b/net-dialup/gnuradius/files/gnuradius-1.5-implicit-decl.patch
@@ -0,0 +1,66 @@
+diff -Nru radius-1.5.orig/lib/getgr.c radius-1.5/lib/getgr.c
+--- radius-1.5.orig/lib/getgr.c 2007-07-14 09:23:17.000000000 +0300
++++ radius-1.5/lib/getgr.c 2007-07-14 09:20:52.000000000 +0300
+@@ -23,6 +23,7 @@
+ #endif
+ #include <sys/types.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <grp.h>
+
+ #include <radius/mem.h>
+diff -Nru radius-1.5.orig/lib/getpw_r.c radius-1.5/lib/getpw_r.c
+--- radius-1.5.orig/lib/getpw_r.c 2007-07-14 09:23:17.000000000 +0300
++++ radius-1.5/lib/getpw_r.c 2007-07-14 09:20:52.000000000 +0300
+@@ -24,6 +24,7 @@
+
+ #include <sys/types.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <pwd.h>
+
+ LOCK_DECLARE(lock)
+diff -Nru radius-1.5.orig/lib/numtostr.c radius-1.5/lib/numtostr.c
+--- radius-1.5.orig/lib/numtostr.c 2007-06-27 15:53:52.000000000 +0300
++++ radius-1.5/lib/numtostr.c 2007-07-14 09:23:56.000000000 +0300
+@@ -22,6 +22,7 @@
+
+ #include <sys/types.h>
+ #include <unistd.h>
++#include <string.h>
+ #include "intprops.h"
+
+ size_t
+diff -Nru radius-1.5.orig/radscm/rscm_lib.c radius-1.5/radscm/rscm_lib.c
+--- radius-1.5.orig/radscm/rscm_lib.c 2007-07-14 09:23:17.000000000 +0300
++++ radius-1.5/radscm/rscm_lib.c 2007-07-14 09:20:52.000000000 +0300
+@@ -22,6 +22,7 @@
+ #endif
+
+ #include <libguile.h>
++#include <string.h>
+ #include <radius/radius.h>
+ #include <radius/radscm.h>
+
+diff -Nru radius-1.5.orig/radscm/rscm_utmp.c radius-1.5/radscm/rscm_utmp.c
+--- radius-1.5.orig/radscm/rscm_utmp.c 2007-07-14 09:23:17.000000000 +0300
++++ radius-1.5/radscm/rscm_utmp.c 2007-07-14 09:20:52.000000000 +0300
+@@ -23,6 +23,7 @@
+ #endif
+
+ #include <stdlib.h>
++#include <string.h>
+ #include <sys/types.h>
+ #include <netinet/in.h>
+
+diff -Nru radius-1.5.orig/scripts/mktypes.c radius-1.5/scripts/mktypes.c
+--- radius-1.5.orig/scripts/mktypes.c 2007-07-14 09:23:17.000000000 +0300
++++ radius-1.5/scripts/mktypes.c 2007-07-14 09:20:52.000000000 +0300
+@@ -25,6 +25,7 @@
+ #ifdef HAVE_STDINT_H
+ # include <stdint.h>
+ #endif
++#include <stdio.h>
+
+ #ifndef DEF_AUTH_PORT
+ # define DEF_AUTH_PORT 1812
diff --git a/net-dialup/gnuradius/files/gnuradius-1.6.1-qa-false-positives.patch b/net-dialup/gnuradius/files/gnuradius-1.6.1-qa-false-positives.patch
new file mode 100644
index 00000000000..8f48ff67260
--- /dev/null
+++ b/net-dialup/gnuradius/files/gnuradius-1.6.1-qa-false-positives.patch
@@ -0,0 +1,27 @@
+--- a/radscripts/Makefile.in
++++ b/radscripts/Makefile.in
+@@ -854,19 +854,19 @@
+
+
+ radctl: $(srcdir)/radctl.m4
+- $(M4) $(M4_DEFINES) $(srcdir)/radctl.m4 > radctl
++ @$(M4) $(M4_DEFINES) $(srcdir)/radctl.m4 > radctl
+
+ radgrep: $(srcdir)/radgrep.m4
+- $(M4) $(M4_DEFINES) $(srcdir)/radgrep.m4 > radgrep
++ @$(M4) $(M4_DEFINES) $(srcdir)/radgrep.m4 > radgrep
+
+ radping: $(srcdir)/radping.m4
+- $(M4) $(M4_DEFINES) $(srcdir)/radping.m4 > radping
++ @$(M4) $(M4_DEFINES) $(srcdir)/radping.m4 > radping
+
+ radauth: $(srcdir)/radauth.m4
+- $(M4) $(M4_DEFINES) $(srcdir)/radauth.m4 > radauth
++ @$(M4) $(M4_DEFINES) $(srcdir)/radauth.m4 > radauth
+
+ builddbm: $(srcdir)/builddbm.m4
+- $(M4) $(M4_DEFINES) $(srcdir)/builddbm.m4 > builddbm
++ @$(M4) $(M4_DEFINES) $(srcdir)/builddbm.m4 > builddbm
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
diff --git a/net-dialup/gnuradius/gnuradius-1.6.1-r1.ebuild b/net-dialup/gnuradius/gnuradius-1.6.1-r1.ebuild
new file mode 100644
index 00000000000..4f938c5e0ca
--- /dev/null
+++ b/net-dialup/gnuradius/gnuradius-1.6.1-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib pam
+
+MY_P="${P#gnu}"
+
+DESCRIPTION="GNU radius authentication server"
+HOMEPAGE="http://www.gnu.org/software/radius/radius.html"
+SRC_URI="mirror://gnu/radius/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE="
+ dbm debug guile mysql nls odbc postgres readline snmp static-libs
+"
+
+DEPEND="
+ !net-dialup/cistronradius
+ !net-dialup/freeradius
+ dbm? ( sys-libs/gdbm )
+ guile? ( >=dev-scheme/guile-1.4 )
+ mysql? ( virtual/mysql )
+ odbc? ( || ( dev-db/unixODBC dev-db/libiodbc ) )
+ postgres? ( dev-db/postgresql[server] )
+ readline? ( sys-libs/readline )
+ snmp? ( net-analyzer/net-snmp )
+ virtual/pam
+"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+RESTRICT="test"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-qa-false-positives.patch
+}
+
+src_configure() {
+ econf \
+ --disable-maintainer-mode \
+ --enable-client \
+ --enable-pam \
+ --enable-server \
+ --libdir=/usr/$(get_libdir) \
+ --with-pamdir=/usr/$(getpam_mod_dir) \
+ $(use_enable dbm) \
+ $(use_enable debug) \
+ $(use_enable nls) \
+ $(use_enable snmp) \
+ $(use_enable static-libs static) \
+ $(use_with guile) \
+ $(use_with guile server-guile) \
+ $(use_with mysql) \
+ $(use_with odbc) \
+ $(use_with postgres) \
+ $(use_with readline)
+}
+
+src_install() {
+ default
+
+ prune_libtool_files
+}
diff --git a/net-dialup/gnuradius/metadata.xml b/net-dialup/gnuradius/metadata.xml
new file mode 100644
index 00000000000..1e11e7bbd01
--- /dev/null
+++ b/net-dialup/gnuradius/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-dialup</herd>
+</pkgmetadata>
diff --git a/net-dialup/gtkterm/Manifest b/net-dialup/gtkterm/Manifest
new file mode 100644
index 00000000000..b95cdbe5afb
--- /dev/null
+++ b/net-dialup/gtkterm/Manifest
@@ -0,0 +1 @@
+DIST gtkterm-0.99.7-rc1.tar.gz 172866 SHA256 91f555af0e0e8bf1fd73744a5486587a8a743ac7e6111e462763cf43def623d0 SHA512 9d629bb9b4700a9976f9bfc8c6bdfb170e06d38828e24747e2cb4cb7ab4908e030b3ba175ca7376929955c892843b6a6dae4e0cd4d67c80a6d959e4f6614424d WHIRLPOOL b6afaca868c1147c44d099202f82ee4222a8635019e5a633f964d76cb4ef0343e16acef9c86b217f0fbb2d3388cd653cd7e1fa1ccc8f41b2cce891dbeb42b411
diff --git a/net-dialup/gtkterm/files/gtkterm-0.99.7_rc1-configure.patch b/net-dialup/gtkterm/files/gtkterm-0.99.7_rc1-configure.patch
new file mode 100644
index 00000000000..795025623ac
--- /dev/null
+++ b/net-dialup/gtkterm/files/gtkterm-0.99.7_rc1-configure.patch
@@ -0,0 +1,14 @@
+diff -urN gtkterm-0.99.7-rc1.old/configure.in gtkterm-0.99.7-rc1/configure.in
+--- gtkterm-0.99.7-rc1.old/configure.in 2012-03-02 14:05:29.842885142 -0800
++++ gtkterm-0.99.7-rc1/configure.in 2012-03-02 14:11:20.242419122 -0800
+@@ -32,8 +32,8 @@
+ dnl Checks for GTK+ and Imlib and libvte
+ PKG_CHECK_MODULES(VTE, vte >= 0.20, , AC_MSG_ERROR([*** vte >= 0.20 not installed ***]))
+
+-AC_SUBST(VTE_CFLAGS)
+-AC_SUBST(VTE_LIBS)
++AC_SUBST(TERMINAL_WIDGET_CFLAGS)
++AC_SUBST(TERMINAL_WIDGET_LIBS)
+
+ PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.16, , AC_MSG_ERROR([*** GTK >= 2.16 not installed ***]))
+
diff --git a/net-dialup/gtkterm/files/ru.po b/net-dialup/gtkterm/files/ru.po
new file mode 100644
index 00000000000..5d20449b941
--- /dev/null
+++ b/net-dialup/gtkterm/files/ru.po
@@ -0,0 +1,678 @@
+# Russian translations for gtkterm package
+# Copyright (C) 2007 Alexander Shiyan
+# This file is distributed under the same license as the gtkterm package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gtkterm 0.99.5\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-01-10 07:44+0300\n"
+"PO-Revision-Date: 2007-01-10 07:47+0300\n"
+"Last-Translator: Alexander Shiyan <shc@users.sourceforge.net>\n"
+"Language-Team: Russian <ru@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: src/buffer.c:92
+msgid "ERROR : Buffer is not initialized !\n"
+msgstr "ОШИБКР: Буфер не инициализирован!\n"
+
+#: src/cmdline.c:36
+#, c-format
+msgid ""
+"\n"
+"GTKTerm version %s\n"
+msgstr ""
+"\n"
+"GTKTerm верÑÐ¸Ñ %s\n"
+
+#: src/cmdline.c:37
+msgid "\t (c) Julien Schmitt - julien@jls-info.com\n"
+msgstr "\t (c) Julien Schmitt - julien@jls-info.com\n"
+
+#: src/cmdline.c:38
+msgid "\t http://www.jls-info.com/julien/linux\n"
+msgstr "\t http://www.jls-info.com/julien/linux/index_fr.html\n"
+
+#: src/cmdline.c:39
+msgid ""
+"\n"
+"This program is released under the terms of the GPL V.2\n"
+msgstr ""
+"\n"
+"Программа раÑпроÑтранÑетÑÑ Ð½Ð° уÑловиÑÑ… лицензии GPL V.2\n"
+
+#: src/cmdline.c:40
+msgid "\t ** Use at your own risks ! **\n"
+msgstr "\t ** ИÑпользуйте на Ñвой риÑк ! **\n"
+
+#: src/cmdline.c:41
+msgid ""
+"\n"
+"Command line options\n"
+msgstr ""
+"\n"
+"Опции командной Ñтроки\n"
+
+#: src/cmdline.c:42
+msgid "--help or -h : this help screen\n"
+msgstr "--help or -h : показать Ñто окно помощи\n"
+
+#: src/cmdline.c:43
+msgid "--config <configuration> or -c : load configuration\n"
+msgstr "--config <configuration> или -c : загрузка конфигурации\n"
+
+#: src/cmdline.c:44
+msgid "--port <device> or -p : serial port device (default /dev/ttyS0)\n"
+msgstr "--port <device> или -p : поÑледовательный порт (/dev/ttyS0 по умолчанию)\n"
+
+#: src/cmdline.c:45
+msgid "--speed <speed> or -s : serial port speed (default 9600)\n"
+msgstr "--speed <speed> или -s : ÑкороÑÑ‚ÑŒ порта (9600 по умолчанию)\n"
+
+#: src/cmdline.c:46
+msgid "--bits <bits> or -b : number of bits (default 8)\n"
+msgstr "--bits <bits> или -b : чиÑло бит (8 по умолчанию)\n"
+
+#: src/cmdline.c:47
+msgid "--stopbits <stopbits> or -t : number of stopbits (default 1)\n"
+msgstr "--stopbits <stopbits> или -t : чиÑло Ñтоповых бит (1 по умолчанию)\n"
+
+#: src/cmdline.c:48
+msgid "--parity <odd | even> or -a : partity (default none)\n"
+msgstr "--parity <odd | even> или -a : чётноÑÑ‚ÑŒ (нет по умолчанию)\n"
+
+#: src/cmdline.c:49
+msgid "--flow <Xon | CTS> or -w : flow control (default none)\n"
+msgstr "--flow <Xon | CTS> или -w : контроль потока (нет по умолчанию)\n"
+
+#: src/cmdline.c:50
+msgid "--delay <ms> or -d : end of line delay in ms (default none)\n"
+msgstr "--delay <ms> или -d : задержка Ð¾ÐºÐ¾Ð½Ñ‡Ð°Ð½Ð¸Ñ Ñтроки в ms (нет по умолчанию)\n"
+
+#: src/cmdline.c:51
+msgid ""
+"--char <char> or -r : wait for a special char at end of line (default none)\n"
+msgstr ""
+"--char <char> или -r : ожидание Ñпециального Ñимвола Ð´Ð»Ñ Ð¾ÐºÐ¾Ð½Ñ‡Ð°Ð½Ð¸Ñ Ñтроки (нет "
+"по умолчанию)\n"
+
+#: src/cmdline.c:52
+msgid "--file <filename> or -f : default file to send (default none)\n"
+msgstr ""
+"--file <filename> или -f : файл Ð´Ð»Ñ Ð¾Ñ‚Ð¿Ñ€Ð°Ð²ÐºÐ¸ (нет по умолчанию)\n"
+
+#: src/cmdline.c:53
+msgid "--echo or -e : switch on local echo\n"
+msgstr "--echo или -e : локальное Ñхо\n"
+
+#: src/cmdline.c:144
+msgid "Misunderstood command line option\n"
+msgstr "ÐеизвеÑтный параметр командной Ñтроки\n"
+
+#: src/config.c:173
+msgid ""
+"No valid serial device found in /dev, sorry !\n"
+"You should have at least one of these :\n"
+"/dev/ttyS*\n"
+"/dev/tts/*\n"
+"/dev/ttyUSB*\n"
+"/dev/usb/tts/*\n"
+msgstr ""
+"Ðет доÑтупных поÑледовательных уÑтройÑтв в /dev, извините !\n"
+"Ðеобходимо иметь Ñ…Ð¾Ñ‚Ñ Ð±Ñ‹ один порт:\n"
+"/dev/ttyS*\n"
+"/dev/tts/*\n"
+"/dev/ttyUSB*\n"
+"/dev/usb/tts/*\n"
+
+#: src/config.c:178
+msgid "Configuration"
+msgstr "КонфигурациÑ"
+
+#: src/config.c:181
+msgid "Serial port"
+msgstr "ПоÑледовательный порт"
+
+#: src/config.c:187
+msgid "Port :"
+msgstr "Порт :"
+
+#: src/config.c:189
+msgid "Speed :"
+msgstr "СкороÑÑ‚ÑŒ :"
+
+#: src/config.c:191
+msgid "Parity :"
+msgstr "ЧётноÑÑ‚ÑŒ :"
+
+#: src/config.c:252
+msgid "Bits :"
+msgstr "Бит :"
+
+#: src/config.c:254
+msgid "Stopbits :"
+msgstr "Стоповых бит:"
+
+#: src/config.c:256
+msgid "Flow control :"
+msgstr "Контроль передачи :"
+
+#: src/config.c:317
+msgid "ASCII file transfer"
+msgstr "Передача файла ASCII"
+
+#: src/config.c:323
+msgid "End of line delay (milliseconds) :"
+msgstr "Задержка конца Ñтроки в милиÑекундах :"
+
+#: src/config.c:337
+msgid "Wait for this special character before passing to next line :"
+msgstr "Ожидание Ñпециального Ñимвола до начала Ñледующей Ñтроки :"
+
+#: src/config.c:395 src/config.c:715
+msgid "No open port"
+msgstr "Ðет открытых портов"
+
+#: src/config.c:421
+msgid "Font selection"
+msgstr "Выбор шрифта"
+
+#: src/config.c:464
+msgid "Load configuration"
+msgstr "Загрузить конфигурацию"
+
+#: src/config.c:470
+msgid "Delete configuration"
+msgstr "Удалить конфигурацию"
+
+#: src/config.c:501
+msgid "Cannot read configuration file !\n"
+msgstr "Ðе могу прочитать файл конфигурации !\n"
+
+#: src/config.c:507
+msgid "Configurations"
+msgstr "КонфигурациÑ"
+
+#: src/config.c:572
+msgid "Save configuration"
+msgstr "Сохранить конфигурацию"
+
+#: src/config.c:581
+msgid "Configuration name : "
+msgstr "Ð˜Ð¼Ñ ÐºÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ð¸ : "
+
+#: src/config.c:626
+msgid "Cannot overwrite section !"
+msgstr "Ðевозможно перезапиÑать Ñекцию !"
+
+#: src/config.c:631
+msgid "Cannot read configuration file !"
+msgstr "Ðе могу прочитать файл конфигурации !"
+
+#: src/config.c:641
+#, c-format
+msgid "Configuration [%s] saved\n"
+msgstr "ÐšÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ [%s] Ñохранена\n"
+
+#: src/config.c:667
+msgid "Warning !"
+msgstr "Внимание !"
+
+#: src/config.c:676
+#, c-format
+msgid ""
+"\n"
+"Section [%s] already exists\n"
+"Do you want to overwrite it ?\n"
+msgstr ""
+"\n"
+"Ð¡ÐµÐºÑ†Ð¸Ñ [%s] уже ÑущеÑтвует.\n"
+"Ð’Ñ‹ хотите её перезапиÑать ?\n"
+
+#: src/config.c:734
+msgid "Cannot delete section !"
+msgstr "Ðевозможно удалить Ñекцию !"
+
+#: src/config.c:905
+#, c-format
+msgid "No section \"%s\" in configuration file\n"
+msgstr "Ð¡ÐµÐºÑ†Ð¸Ñ \"%s\" отÑутÑтвует в файле конфигурации\n"
+
+#: src/config.c:942
+#, c-format
+msgid ""
+"Unknown speed : %d bauds\n"
+"Falling back to default speed : %d bauds\n"
+msgstr ""
+"ÐÐµÐ²ÐµÑ€Ð½Ð°Ñ ÑкороÑÑ‚ÑŒ : %d\n"
+"ИÑпользуетÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ðµ по умолчанию : %d\n"
+
+#: src/config.c:950
+#, c-format
+msgid ""
+"Impossible stopbits number : %d\n"
+"Falling back to default stop bits number : %d\n"
+msgstr ""
+"Ðеверное чиÑло Ñтоповых бит : %d\n"
+"ИÑпользуетÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ðµ по умолчанию : %d\n"
+
+#: src/config.c:958
+#, c-format
+msgid ""
+"Impossible bits number : %d\n"
+"Falling back to default stop bits : %d\n"
+msgstr ""
+"Ðеверное чиÑло бит : %d\n"
+"ИÑпользуетÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ðµ по умолчанию : %d\n"
+
+#: src/config.c:966
+#, c-format
+msgid ""
+"Impossible delay : %d ms\n"
+"Falling back to default delay : %d ms\n"
+msgstr ""
+"ÐÐµÐ²ÐµÑ€Ð½Ð°Ñ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ð° задержки : %d ms\n"
+"ИÑпользуетÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ðµ по умолчанию : %d ms\n"
+
+#: src/config.c:996
+#, c-format
+msgid ""
+"Configuration file (%s) with\n"
+"[default] configuration has been created.\n"
+msgstr ""
+"Файл конфигурации %s по умолчанию\n"
+"[default] Ñоздан.\n"
+
+#: src/config.c:1228
+#, c-format
+msgid "Cannot find section %s\n"
+msgstr "Ðе могу найти Ñекцию %s\n"
+
+#: src/config.c:1265
+msgid "Terminal configuration"
+msgstr "ÐšÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ñ‚ÐµÑ€Ð¼Ð¸Ð½Ð°Ð»Ð°"
+
+#: src/fichier.c:74
+msgid "File selection"
+msgstr "Выбор файла"
+
+#: src/fichier.c:104
+msgid "Error opening file\n"
+msgstr "Ошибка Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð°\n"
+
+#: src/fichier.c:112
+#, c-format
+msgid "%s : transfer in progress..."
+msgstr "%s : передача..."
+
+#: src/fichier.c:129
+msgid "%v / %u Kb (%p %%)"
+msgstr "%v / %u Кб (%p %%)"
+
+#: src/fichier.c:135
+msgid "%v / %u bytes (%p %%)"
+msgstr "%v / %u байт (%p %%)"
+
+#: src/fichier.c:140
+msgid "Cancel"
+msgstr "Отмена"
+
+#: src/fichier.c:156
+#, c-format
+msgid "Cannot read file %s : %s\n"
+msgstr "Ðе могу прочитать файл %s : %s\n"
+
+#: src/fichier.c:205
+#, c-format
+msgid "Cannot write file %s\n"
+msgstr "Ðе могу запиÑать файл %s\n"
+
+#: src/fichier.c:293
+msgid "File error\n"
+msgstr "Ошибка файла\n"
+
+#: src/fichier.c:301
+#, c-format
+msgid "Cannot open file %s : %s\n"
+msgstr "Ðе могу открыть файл %s : %s\n"
+
+#: src/macros.c:143
+#, c-format
+msgid "Macro \"%s\" sent !"
+msgstr "ÐœÐ°ÐºÑ€Ð¾Ñ \"%s\" отправлен !"
+
+#: src/macros.c:274
+msgid "Shortcut"
+msgstr "БыÑÑ‚Ñ€Ð°Ñ ÐºÐ»Ð°Ð²Ð¸ÑˆÐ°"
+
+#: src/macros.c:426
+msgid "Help on macros"
+msgstr "Справка по макроÑам"
+
+#: src/macros.c:433
+msgid ""
+"The \"action\" field of a macro is the data to be sent on the port. Text can "
+"be entered, but also special chars, like \\n, \\t, \\r, etc. You can also "
+"enter hexadecimal data preceded by a '\\'. The hexadecimal data should not "
+"begin with a letter (eg. use \\0FF and not \\FF)\n"
+"Examples :\n"
+"\t\"Hello\\n\" sends \"Hello\" followed by a Line Feed\n"
+"\t\"Hello\\0A\" does the same thing but the LF is entered in hexadecimal"
+msgstr ""
+"Поле \"action\" Ñто данные Ð´Ð»Ñ Ð¾Ñ‚Ð¿Ñ€Ð°Ð²ÐºÐ¸ в порт. Может Ñодержать текÑÑ‚ и "
+"Ñпециальные Ñимволы, такие как \\n, \\t, \\r, и.Ñ‚.д. Также возможно "
+"иÑпользование двоичных данных Ñ Ñимволом '\\'. Двоичные данные не должны "
+"начинатьÑÑ Ñ Ð±ÑƒÐºÐ²Ñ‹, Ñ‚.е. иÑпользуйте \\0FF вмеÑто \\FF\n"
+"Примеры :\n"
+"\t\"Привет\\n\" отправлÑет \"Привет\" Ð·Ð°Ð²ÐµÑ€ÑˆÐ°Ñ Ñимволом конца Ñтроки\n"
+"\t\"Привет\\0A\" тот же Ñамы пример, но Ñимвол конца Ñтроки введен как "
+"двоичное чиÑло."
+
+#: src/macros.c:460
+msgid "Configure Macros"
+msgstr "Конфигурирование макроÑов"
+
+#: src/macros.c:496
+msgid "_Add"
+msgstr "_Добавить"
+
+#: src/macros.c:500
+msgid "_Delete"
+msgstr "_Удалить"
+
+#: src/macros.c:504
+msgid "_Capture Shortcut"
+msgstr "_УÑтановить быÑтрую клавишу"
+
+#: src/parsecfg.c:335
+#, c-format
+msgid "Cannot open configuration file `%s'.\n"
+msgstr "Ðе могу открыть файл конфигурации `%s'.\n"
+
+#: src/parsecfg.c:338
+#, c-format
+msgid "Cannot create configuration file `%s'.\n"
+msgstr "Ðе могу Ñоздать файл конфигурации `%s'.\n"
+
+#: src/parsecfg.c:341
+#, c-format
+msgid ""
+"%s(%d): %s\n"
+"Syntax error\n"
+msgstr ""
+"%s(%d): %s\n"
+"СинтакÑичеÑÐºÐ°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°\n"
+
+#: src/parsecfg.c:344
+#, c-format
+msgid ""
+"%s(%d): %s\n"
+"Unrecognized parameter\n"
+msgstr ""
+"%s(%d): %s\n"
+"ÐеизвеÑтный параметр\n"
+
+#: src/parsecfg.c:347
+#, c-format
+msgid ""
+"%s(%d): %s\n"
+"Internal error\n"
+msgstr ""
+"%s(%d): %s\n"
+"ВнутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ°\n"
+
+#: src/parsecfg.c:350
+#, c-format
+msgid ""
+"%s(%d): %s\n"
+"Invalid number\n"
+msgstr ""
+"%s(%d): %s\n"
+"Ðеверный номер\n"
+
+#: src/parsecfg.c:353
+#, c-format
+msgid ""
+"%s(%d): %s\n"
+"Out of range\n"
+msgstr ""
+"%s(%d): %s\n"
+"Выход за пределы\n"
+
+#: src/parsecfg.c:356
+#, c-format
+msgid ""
+"%s(%d): %s\n"
+"Cannot allocate memory.\n"
+msgstr ""
+"%s(%d): %s\n"
+"Ðевозвожно выделить памÑÑ‚ÑŒ.\n"
+
+#: src/parsecfg.c:359
+#, c-format
+msgid ""
+"%s(%d): %s\n"
+"It must be specified TRUE or FALSE.\n"
+msgstr ""
+"%s(%d): %s\n"
+"Должно быть указано TRUE или FALSE.\n"
+
+#: src/parsecfg.c:362
+#, c-format
+msgid ""
+"%s(%d): %s\n"
+"The section name is already used.\n"
+msgstr ""
+"%s(%d): %s\n"
+"Ð˜Ð¼Ñ Ñекции уже иÑпользуетÑÑ.\n"
+
+#: src/parsecfg.c:365
+#, c-format
+msgid ""
+"%s(%d)\n"
+"There is no closing brace.\n"
+msgstr ""
+"%s(%d)\n"
+"Ðе закрыты кавычки.\n"
+
+#: src/parsecfg.c:370
+#, c-format
+msgid ""
+"%s(%d): %s\n"
+"Unexplained error\n"
+msgstr ""
+"%s(%d): %s\n"
+"ÐеизвеÑÑ‚Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°\n"
+
+#: src/serie.c:212
+#, c-format
+msgid "Cannot open %s : %s\n"
+msgstr "Ðе могу открыть %s : %s\n"
+
+#: src/serie.c:357 src/serie.c:392
+msgid "Control signals read"
+msgstr "Чтение Ñигналов управлениÑ"
+
+#: src/serie.c:369
+msgid "DTR write"
+msgstr "УÑтановка DTR"
+
+#: src/serie.c:379
+msgid "RTS write"
+msgstr "УÑтановка RTS"
+
+#: src/serie.c:470
+msgid "Lockfile is stale. Overriding it..\n"
+msgstr "Lockfile уÑтарел. ПерезапиÑÑŒ...\n"
+
+#: src/serie.c:480
+#, c-format
+msgid "Device %s is locked.\n"
+msgstr "УÑтройÑтво %s залочено.\n"
+
+#: src/serie.c:492
+msgid "Cannot create lockfile. Sorry.\n"
+msgstr "Ðе могу Ñоздать Lockfile, извините\n"
+
+#: src/widgets.c:122
+msgid "/_File"
+msgstr "_Файл"
+
+#: src/widgets.c:123
+msgid "/File/Clear screen"
+msgstr "/Файл/ОчиÑтить _Ñкран"
+
+#: src/widgets.c:124
+msgid "/File/Send _raw file"
+msgstr "/Файл/_Отправить файл"
+
+#: src/widgets.c:125
+msgid "/File/_Save raw file"
+msgstr "/Файл/_Сохранить в файл"
+
+#: src/widgets.c:126
+msgid "/File/Separator"
+msgstr "/Файл/Separator"
+
+#: src/widgets.c:127
+msgid "/File/E_xit"
+msgstr "/Файл/_Выход"
+
+#: src/widgets.c:128
+msgid "/_Configuration"
+msgstr "/_КонфигурациÑ"
+
+#: src/widgets.c:129
+msgid "/Configuration/_Port"
+msgstr "/КонфигурациÑ/_Порт"
+
+#: src/widgets.c:131
+msgid "/Configuration/Local _echo"
+msgstr "/КонфигурациÑ/_Локальное Ñхо"
+
+#: src/widgets.c:133
+msgid "/Configuration/_Macros"
+msgstr "/КонфигурациÑ/_МакроÑÑ‹"
+
+#: src/widgets.c:134
+msgid "/Configuration/Separator"
+msgstr "/КонфигурациÑ/Separator"
+
+#: src/widgets.c:135
+msgid "/Configuration/_Load configuration"
+msgstr "/КонфигурациÑ/_Загрузить конфигурацию"
+
+#: src/widgets.c:136
+msgid "/Configuration/_Save configuration"
+msgstr "/КонфигурациÑ/_Сохранить конфигурацию"
+
+#: src/widgets.c:137
+msgid "/Configuration/_Delete configuration"
+msgstr "/КонфигурациÑ/_Удалить конфигурацию"
+
+#: src/widgets.c:138
+msgid "/Control _signals"
+msgstr "/_Сигналы управлениÑ"
+
+#: src/widgets.c:139
+msgid "/Control signals/Send break"
+msgstr "/Сигналы управлениÑ/ПоÑлать BREAK"
+
+#: src/widgets.c:140
+msgid "/Control signals/Toggle DTR"
+msgstr "/Сигналы управлениÑ/Переключить DTR"
+
+#: src/widgets.c:141
+msgid "/Control signals/Toggle RTS"
+msgstr "/Сигналы управлениÑ/Переключить RTS"
+
+#: src/widgets.c:142
+msgid "/_View"
+msgstr "/_Вид"
+
+#: src/widgets.c:143
+msgid "/View/_ASCII"
+msgstr "/Вид/_ASCII"
+
+#: src/widgets.c:144
+msgid "/View/_Hexadecimal"
+msgstr "/Вид/_Двоичное"
+
+#: src/widgets.c:145
+msgid "/View/Hexadecimal _chars"
+msgstr "/Вид/_Размер двоичных данных"
+
+#: src/widgets.c:146
+msgid "/View/Hexadecimal chars/_8"
+msgstr "/Вид/Размер двоичных данных/_8"
+
+#: src/widgets.c:147
+msgid "/View/Hexadecimal chars/1_0"
+msgstr "/Вид/Размер двоичных данных/1_0"
+
+#: src/widgets.c:148
+msgid "/View/Hexadecimal chars/_16"
+msgstr "/Вид/Размер двоичных данных/_16"
+
+#: src/widgets.c:149
+msgid "/View/Hexadecimal chars/_24"
+msgstr "/Вид/Размер двоичных данных/_24"
+
+#: src/widgets.c:150
+msgid "/View/Hexadecimal chars/_32"
+msgstr "/Вид/Размер двоичных данных/_32"
+
+#: src/widgets.c:151
+msgid "/View/Show _index"
+msgstr "/Вид/Показать _адреÑ"
+
+#: src/widgets.c:152
+msgid "/View/Separator"
+msgstr "/Вид/Separator"
+
+#: src/widgets.c:153
+msgid "/View/_Send hexadecimal data"
+msgstr "/Вид/Отправка _двоичных данных"
+
+#: src/widgets.c:154
+msgid "/_Help"
+msgstr "_Справка"
+
+#: src/widgets.c:155
+msgid "/Help/_About..."
+msgstr "/Справка/_О программе..."
+
+#: src/widgets.c:307
+msgid "Hexadecimal data to send (separator : ';' or space) : "
+msgstr "Отправка двоичных данных (разделитель : ';' или пробел) : "
+
+#: src/widgets.c:502
+msgid "About..."
+msgstr "О программе..."
+
+#: src/widgets.c:510
+#, c-format
+msgid ""
+"\n"
+" <big><i> GTKTerm V. %s </i></big> \n"
+"\n"
+"\t(c) Julien Schmitt : julien@jls-info.com \n"
+"\thttp://www.jls-info.com/julien/linux\n"
+msgstr ""
+"\n"
+" <big><i> GTKTerm V. %s </i></big> \n"
+"\n"
+"\t(c) Julien Schmitt : julien@jls-info.com \n"
+"\thttp://www.jls-info.com/julien/linux/index_fr.html\n"
+
+#: src/widgets.c:554
+msgid "Break signal sent !"
+msgstr "Отправлен Ñигнал BREAK !"
+
+#: src/widgets.c:636
+#, c-format
+msgid "\"%s\" : %d byte(s) sent !"
+msgstr "\"%s\" : %d байт отправлено !"
diff --git a/net-dialup/gtkterm/gtkterm-0.99.7_rc1.ebuild b/net-dialup/gtkterm/gtkterm-0.99.7_rc1.ebuild
new file mode 100644
index 00000000000..0af5bf73243
--- /dev/null
+++ b/net-dialup/gtkterm/gtkterm-0.99.7_rc1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+MY_P="${P/_/-}"
+DESCRIPTION="A serial port terminal written in GTK+, similar to Windows' HyperTerminal"
+HOMEPAGE="https://fedorahosted.org/gtkterm/"
+SRC_URI="https://fedorahosted.org/released/gtkterm/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="nls"
+
+inherit eutils autotools
+
+RDEPEND=">=x11-libs/gtk+-2.16:2
+ >=x11-libs/vte-0.20:0"
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.40
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+# Supported languages and translated documentation
+# Be sure all languages are prefixed with a single space!
+MY_AVAILABLE_LINGUAS=" fr hu"
+IUSE="${IUSE} ${MY_AVAILABLE_LINGUAS// / linguas_}"
+
+S=${WORKDIR}/${P/_/-}
+
+src_prepare() {
+ # Fix test
+ echo "src/term_config.c" >> po/POTFILES.in || die
+
+ epatch "${FILESDIR}/${P}-configure.patch"
+ sed -i -e "s/AM_SYS_POSIX_TERMIOS/AC_SYS_POSIX_TERMIOS/" \
+ configure.in || die #bug #483346
+
+ eautoreconf
+}
+
+src_install() {
+ default
+ make_desktop_entry "${PN}"
+
+ if use nls; then
+ cd "${S}/po"
+ local MY_LINGUAS="" lang
+
+ for lang in ${MY_AVAILABLE_LINGUAS} ; do
+ if use linguas_${lang} ; then
+ MY_LINGUAS="${MY_LINGUAS} ${lang}"
+ fi
+ done
+ if [[ "${MY_LINGUAS}" ]] ; then
+
+ elog "Locale messages will be installed for following languages:"
+ elog " ${MY_LINGUAS}"
+
+ for lang in ${MY_LINGUAS}; do
+ msgfmt -o ${lang}.mo ${lang}.po && \
+ insinto /usr/share/locale/${lang}/LC_MESSAGES && \
+ newins ${lang}.mo gtkterm.mo || \
+ die "failed to install locale messages for ${lang} language"
+ done
+ fi
+ fi
+}
diff --git a/net-dialup/gtkterm/metadata.xml b/net-dialup/gtkterm/metadata.xml
new file mode 100644
index 00000000000..cd1e3d75e80
--- /dev/null
+++ b/net-dialup/gtkterm/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-dialup</herd>
+<longdescription>A simplified "clone" of the famous Hyperterminal, without support for X/Y/ZMODEM protocols.</longdescription>
+</pkgmetadata>
diff --git a/net-dialup/hcfpcimodem/Manifest b/net-dialup/hcfpcimodem/Manifest
new file mode 100644
index 00000000000..ca0770ffd52
--- /dev/null
+++ b/net-dialup/hcfpcimodem/Manifest
@@ -0,0 +1,3 @@
+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
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 00000000000..11ce09abfbb
--- /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 00000000000..de7b6d5d414
--- /dev/null
+++ b/net-dialup/hcfpcimodem/hcfpcimodem-1.20.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..af03738ae57
--- /dev/null
+++ b/net-dialup/hcfpcimodem/hcfpcimodem-1.21.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..1e11e7bbd01
--- /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>
+<herd>net-dialup</herd>
+</pkgmetadata>
diff --git a/net-dialup/intel-536ep/Manifest b/net-dialup/intel-536ep/Manifest
new file mode 100644
index 00000000000..298d3714d64
--- /dev/null
+++ b/net-dialup/intel-536ep/Manifest
@@ -0,0 +1 @@
+DIST intel-536ep-4.71.tgz 487685 RMD160 d85ac0e36251ba9a90bac4e822f36fa8f1a1ff70 SHA1 b7980b65840184fbcb8f3d3ccdf77ff7f84d7aa6 SHA256 3843f764f82877f8300fd48ba6f7b3b9016cfd95c27633a7eb26da19c542a9db
diff --git a/net-dialup/intel-536ep/files/intel536ep.confd b/net-dialup/intel-536ep/files/intel536ep.confd
new file mode 100644
index 00000000000..de5f8b19c9e
--- /dev/null
+++ b/net-dialup/intel-536ep/files/intel536ep.confd
@@ -0,0 +1,5 @@
+#Node name of the device
+DEV_NAME=536ep
+
+#Which group will have the permission to use this modem
+DEV_GROUP=tty
diff --git a/net-dialup/intel-536ep/files/intel536ep.initd b/net-dialup/intel-536ep/files/intel536ep.initd
new file mode 100644
index 00000000000..53b9049fbf7
--- /dev/null
+++ b/net-dialup/intel-536ep/files/intel536ep.initd
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+
+#NB: Config is in /etc/conf.d/intel536ep
+
+depend() {
+ need localmount modules
+}
+
+start() {
+ local device=${DEV_NAME:-536ep}
+
+ ebegin "Starting Intel 536EP modem"
+
+ if ! modprobe -f Intel536 &>/dev/null ; then
+ eend $?
+ eerror "Failed to load Intel536 module"
+ return 1
+ fi
+
+ major=`cat /proc/devices | awk "\\$2==\"$device\" {print \\$1}"`
+ [ -e "/dev/$device" ] && rm -f /dev/$device
+ mknod -m 0660 /dev/$device c $major 1
+ chgrp ${DEV_GROUP:-tty} /dev/$device
+ [ -e /dev/modem ] || ln -sf $device /dev/modem
+
+ start-stop-daemon --start --quiet --background --make-pidfile --pidfile /var/run/hamregistry.pid --exec /usr/sbin/hamregistry
+ eend ${?}
+}
+
+stop () {
+ ebegin "Stopping Intel 536EP modem"
+ start-stop-daemon --stop --quiet --pidfile /var/run/hamregistry.pid
+ eend ${?}
+}
diff --git a/net-dialup/intel-536ep/intel-536ep-4.71.ebuild b/net-dialup/intel-536ep/intel-536ep-4.71.ebuild
new file mode 100644
index 00000000000..27aca97d72f
--- /dev/null
+++ b/net-dialup/intel-536ep/intel-536ep-4.71.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit linux-mod
+
+DESCRIPTION="Driver for Intel 536EP modem"
+HOMEPAGE="http://developer.intel.com/design/modems/products/536ep.htm"
+SRC_URI="ftp://aiedownload.intel.com/df-support/9266/eng/${P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+
+S="${WORKDIR}/Intel-536"
+MODULE_NAMES="Intel536(:${S}/coredrv)"
+
+pkg_setup() {
+ if kernel_is ge 2 6 16; then
+ eerror "This driver is not supported by kernels >= 2.6.16."
+ eerror "Please see http://bugs.gentoo.org/show_bug.cgi?id=127464 for more info."
+ die "unsupported kernel version"
+ elif kernel_is 2 4; then
+ BUILD_TARGETS="536core"
+ BUILD_PARAMS="KERNEL_SOURCE_PATH='${KV_DIR}' TARGET=TARGET_SELAH"
+ else
+ BUILD_TARGETS="536core_26"
+ BUILD_PARAMS="KERNEL_SOURCE_PATH='${KV_DIR}'"
+ fi
+
+ linux-mod_pkg_setup
+}
+
+src_install() {
+ linux-mod_src_install
+
+ #install hamregistry executable
+ exeinto /usr/sbin
+ doexe "${S}/hamregistry"
+
+ #install boot script and its config
+ newinitd "${FILESDIR}/intel536ep.initd" intel536ep
+ newconfd "${FILESDIR}/intel536ep.confd" intel536ep
+}
diff --git a/net-dialup/intel-536ep/metadata.xml b/net-dialup/intel-536ep/metadata.xml
new file mode 100644
index 00000000000..377c67c87c7
--- /dev/null
+++ b/net-dialup/intel-536ep/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-dialup</herd>
+<longdescription>Driver for Intel 536EP modem</longdescription>
+</pkgmetadata>
diff --git a/net-dialup/isdn-firmware/Manifest b/net-dialup/isdn-firmware/Manifest
new file mode 100644
index 00000000000..5728590e42c
--- /dev/null
+++ b/net-dialup/isdn-firmware/Manifest
@@ -0,0 +1 @@
+DIST i4lfirm-2005.8.15-2.i586.rpm 2530426 SHA256 6a63b534886af59301e7ff6ab83f2cac1ebdc25df0206e2ff79405d1fe18f7d0 SHA512 fe943d33b38fa4f2d1c87b31cfe0fd1a99fc930660b88b8e5a138ca8be4c8abcfb7f09f7cd39ed7d12da34b61b0b60bec22b84a38818b478a802eba8a2191153 WHIRLPOOL f96b46f84a258de4d1ffe93c3c404887def1297d457bc999364d97abc008121493499029c3a5b62635f449e028a5144be10624dacbd0d20d7f41f98cd8651d28
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 00000000000..31b60f8abe1
--- /dev/null
+++ b/net-dialup/isdn-firmware/isdn-firmware-2005.8.15.2.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit 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 00000000000..e86609b3d54
--- /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>
+ <herd>net-dialup</herd>
+ <longdescription lang="en">
+ ISDN firmware for active ISDN cards (AVM, Eicon, etc.)
+ </longdescription>
+</pkgmetadata>
diff --git a/net-dialup/itund/Manifest b/net-dialup/itund/Manifest
new file mode 100644
index 00000000000..19c93d808a8
--- /dev/null
+++ b/net-dialup/itund/Manifest
@@ -0,0 +1 @@
+DIST itund-0.3.1.tgz 35047 SHA256 8ff83aa09346b40e1b481b8b018acb42358bd792a78c036c2d52d060c57d151f
diff --git a/net-dialup/itund/itund-0.3.1.ebuild b/net-dialup/itund/itund-0.3.1.ebuild
new file mode 100644
index 00000000000..ea6dbfc9875
--- /dev/null
+++ b/net-dialup/itund/itund-0.3.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="ItunD (ISDN tunnel Daemon) provides a network tunnel over ISDN lines using CAPI"
+HOMEPAGE="http://www.melware.org/ISDN_Tunnel_Daemon"
+SRC_URI="ftp://ftp.melware.net/itund/${P}.tgz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+DEPEND="sys-libs/zlib
+ net-dialup/capi4k-utils"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # patch Makefile to use our CFLAGS
+ sed -i -e "s:^\(CFLAGS=.*\) -O2 :\1 ${CFLAGS} :g" Makefile
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die "emake failed"
+}
+
+src_install() {
+ dosbin itund
+ dodoc CHANGES README
+}
diff --git a/net-dialup/itund/metadata.xml b/net-dialup/itund/metadata.xml
new file mode 100644
index 00000000000..80845ef05e9
--- /dev/null
+++ b/net-dialup/itund/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-dialup</herd>
+ <longdescription lang="en">
+ ItunD (ISDN tunnel Daemon) provides a network tunnel over ISDN lines
+ using the CAPI interface. The ISDN4Linux isdn-net (rawIP) devices are
+ supported.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-dialup/kpnadsl4linux/Manifest b/net-dialup/kpnadsl4linux/Manifest
new file mode 100644
index 00000000000..db567bd319f
--- /dev/null
+++ b/net-dialup/kpnadsl4linux/Manifest
@@ -0,0 +1 @@
+DIST kpnadsl4linux-1.11.tar.gz 15068 SHA256 45be6dfd6c11a4327da622efd947c077bd04c8ae0f812731c9cd3bd9f992d7c3 SHA512 050c879aff115169e6cb0f0bf081a8172a3f4735f7231d1e5d1f245b34a1b522691e7640d146eac3c894a17c2901e59f1f942f7be5a2eed5ce1eb8c96bfef201 WHIRLPOOL ff8bd2d8db5490f1c1d5f47bf21f122c505851f2b48676745c17ba5573efbf5ec14f8a363608e6387ed782f92e411d9ec5afb54b4bb7ef6910ba27085ff55061
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 00000000000..f7d20bf348a
--- /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 00000000000..439528e14f4
--- /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 00000000000..51d54d075ea
--- /dev/null
+++ b/net-dialup/kpnadsl4linux/kpnadsl4linux-1.11.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils 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 00000000000..1e11e7bbd01
--- /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>
+<herd>net-dialup</herd>
+</pkgmetadata>
diff --git a/net-dialup/linux-atm/Manifest b/net-dialup/linux-atm/Manifest
new file mode 100644
index 00000000000..ef17c2e589a
--- /dev/null
+++ b/net-dialup/linux-atm/Manifest
@@ -0,0 +1,2 @@
+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
diff --git a/net-dialup/linux-atm/files/linux-atm-2.4.1-declarations.patch b/net-dialup/linux-atm/files/linux-atm-2.4.1-declarations.patch
new file mode 100644
index 00000000000..77ed766f032
--- /dev/null
+++ b/net-dialup/linux-atm/files/linux-atm-2.4.1-declarations.patch
@@ -0,0 +1,266 @@
+diff -Nru linux-atm-2.4.1.orig/src/arpd/io.c linux-atm-2.4.1/src/arpd/io.c
+--- linux-atm-2.4.1.orig/src/arpd/io.c 2001-09-03 21:41:05.000000000 +0300
++++ linux-atm-2.4.1/src/arpd/io.c 2007-04-14 18:30:54.000000000 +0300
+@@ -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 */
+diff -Nru linux-atm-2.4.1.orig/src/debug/svctor.c linux-atm-2.4.1/src/debug/svctor.c
+--- linux-atm-2.4.1.orig/src/debug/svctor.c 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/debug/svctor.c 2007-04-14 18:37:01.000000000 +0300
+@@ -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>
+diff -Nru linux-atm-2.4.1.orig/src/ilmid/asn1/asn_bits.c linux-atm-2.4.1/src/ilmid/asn1/asn_bits.c
+--- linux-atm-2.4.1.orig/src/ilmid/asn1/asn_bits.c 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/ilmid/asn1/asn_bits.c 2007-04-14 18:31:56.000000000 +0300
+@@ -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"
+diff -Nru linux-atm-2.4.1.orig/src/ilmid/asn1/asn_list.c linux-atm-2.4.1/src/ilmid/asn1/asn_list.c
+--- linux-atm-2.4.1.orig/src/ilmid/asn1/asn_list.c 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/ilmid/asn1/asn_list.c 2007-04-14 18:42:38.000000000 +0300
+@@ -20,6 +20,7 @@
+ #include <config.h>
+ #endif
+
++#include <stdlib.h>
+ #include "asn_config.h"
+ #include "asn_list.h"
+
+diff -Nru linux-atm-2.4.1.orig/src/ilmid/asn1/asn_octs.c linux-atm-2.4.1/src/ilmid/asn1/asn_octs.c
+--- linux-atm-2.4.1.orig/src/ilmid/asn1/asn_octs.c 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/ilmid/asn1/asn_octs.c 2007-04-14 18:32:06.000000000 +0300
+@@ -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"
+diff -Nru linux-atm-2.4.1.orig/src/ilmid/asn1/asn_oid.c linux-atm-2.4.1/src/ilmid/asn1/asn_oid.c
+--- linux-atm-2.4.1.orig/src/ilmid/asn1/asn_oid.c 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/ilmid/asn1/asn_oid.c 2007-04-14 18:32:54.000000000 +0300
+@@ -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"
+diff -Nru linux-atm-2.4.1.orig/src/ilmid/asn1/nibble_alloc.c linux-atm-2.4.1/src/ilmid/asn1/nibble_alloc.c
+--- linux-atm-2.4.1.orig/src/ilmid/asn1/nibble_alloc.c 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/ilmid/asn1/nibble_alloc.c 2007-04-14 18:43:04.000000000 +0300
+@@ -20,6 +20,7 @@
+ #include <config.h>
+ #endif
+
++#include <stdlib.h>
+ #include <memory.h>
+ #include "asn_config.h"
+ #include "nibble_alloc.h"
+diff -Nru linux-atm-2.4.1.orig/src/ilmid/atmf_uni.c linux-atm-2.4.1/src/ilmid/atmf_uni.c
+--- linux-atm-2.4.1.orig/src/ilmid/atmf_uni.c 2007-04-14 18:30:41.000000000 +0300
++++ linux-atm-2.4.1/src/ilmid/atmf_uni.c 2007-04-14 18:43:35.000000000 +0300
+@@ -25,6 +25,7 @@
+ #include <config.h>
+ #endif
+
++#include <stdlib.h>
+ #include "atmf_uni.h"
+ #include "atmd.h"
+ #include "util.h"
+diff -Nru linux-atm-2.4.1.orig/src/ilmid/ilmid.c linux-atm-2.4.1/src/ilmid/ilmid.c
+--- linux-atm-2.4.1.orig/src/ilmid/ilmid.c 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/ilmid/ilmid.c 2007-04-14 18:33:47.000000000 +0300
+@@ -34,6 +34,7 @@
+ #endif
+
+ #include <unistd.h>
++#include <stdlib.h>
+ #include <sys/time.h>
+ #include <errno.h>
+ #include "asn_incl.h"
+diff -Nru linux-atm-2.4.1.orig/src/ilmid/io.c linux-atm-2.4.1/src/ilmid/io.c
+--- linux-atm-2.4.1.orig/src/ilmid/io.c 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/ilmid/io.c 2007-04-14 18:44:42.000000000 +0300
+@@ -25,6 +25,7 @@
+ #include <config.h>
+ #endif
+
++#include <unistd.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <sys/ioctl.h>
+diff -Nru linux-atm-2.4.1.orig/src/ilmid/mib.c linux-atm-2.4.1/src/ilmid/mib.c
+--- linux-atm-2.4.1.orig/src/ilmid/mib.c 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/ilmid/mib.c 2007-04-14 18:45:49.000000000 +0300
+@@ -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() */
+diff -Nru linux-atm-2.4.1.orig/src/lane/lecs_db.l linux-atm-2.4.1/src/lane/lecs_db.l
+--- linux-atm-2.4.1.orig/src/lane/lecs_db.l 2001-09-03 21:41:05.000000000 +0300
++++ linux-atm-2.4.1/src/lane/lecs_db.l 2007-04-14 18:35:17.000000000 +0300
+@@ -7,6 +7,7 @@
+ /*Standard includes*/
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+
+ /* Local includes */
+ #include "lecs_load.h"
+diff -Nru linux-atm-2.4.1.orig/src/lane/load_lex.l linux-atm-2.4.1/src/lane/load_lex.l
+--- linux-atm-2.4.1.orig/src/lane/load_lex.l 2001-09-03 21:41:05.000000000 +0300
++++ linux-atm-2.4.1/src/lane/load_lex.l 2007-04-14 18:34:51.000000000 +0300
+@@ -4,6 +4,7 @@
+ #include <config.h>
+ #endif
+
++#include <string.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+
+diff -Nru linux-atm-2.4.1.orig/src/lane/mem_lecs.c linux-atm-2.4.1/src/lane/mem_lecs.c
+--- linux-atm-2.4.1.orig/src/lane/mem_lecs.c 2001-09-03 21:41:05.000000000 +0300
++++ linux-atm-2.4.1/src/lane/mem_lecs.c 2007-04-14 18:35:47.000000000 +0300
+@@ -13,6 +13,7 @@
+ /* System includes */
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <sys/types.h>
+
+ /* Local includes */
+diff -Nru linux-atm-2.4.1.orig/src/mpoad/k_interf.c linux-atm-2.4.1/src/mpoad/k_interf.c
+--- linux-atm-2.4.1.orig/src/mpoad/k_interf.c 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/mpoad/k_interf.c 2007-04-14 18:36:40.000000000 +0300
+@@ -3,6 +3,7 @@
+ #endif
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <unistd.h>
+ #include <string.h>
+ #include <errno.h>
+diff -Nru linux-atm-2.4.1.orig/src/qgen/ql_y.y linux-atm-2.4.1/src/qgen/ql_y.y
+--- linux-atm-2.4.1.orig/src/qgen/ql_y.y 2001-09-03 21:41:05.000000000 +0300
++++ linux-atm-2.4.1/src/qgen/ql_y.y 2007-04-14 19:10:07.000000000 +0300
+@@ -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)
+ {
+diff -Nru linux-atm-2.4.1.orig/src/sigd/cfg_y.y linux-atm-2.4.1/src/sigd/cfg_y.y
+--- linux-atm-2.4.1.orig/src/sigd/cfg_y.y 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/sigd/cfg_y.y 2007-04-14 19:10:56.000000000 +0300
+@@ -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;
+diff -Nru linux-atm-2.4.1.orig/src/switch/cfg_y.y linux-atm-2.4.1/src/switch/cfg_y.y
+--- linux-atm-2.4.1.orig/src/switch/cfg_y.y 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/switch/cfg_y.y 2007-04-14 19:11:34.000000000 +0300
+@@ -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 {
+diff -Nru linux-atm-2.4.1.orig/src/test/ispl_y.y linux-atm-2.4.1/src/test/ispl_y.y
+--- linux-atm-2.4.1.orig/src/test/ispl_y.y 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/test/ispl_y.y 2007-04-14 19:08:33.000000000 +0300
+@@ -19,6 +19,7 @@
+
+ static struct atmsvc_msg msg;
+
++int yylex ( void );
+
+ %}
+
+diff -Nru linux-atm-2.4.1.orig/src/test/ttcp.c linux-atm-2.4.1/src/test/ttcp.c
+--- linux-atm-2.4.1.orig/src/test/ttcp.c 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/test/ttcp.c 2007-04-14 18:30:54.000000000 +0300
+@@ -54,7 +54,11 @@
+ /* #define BSD41a */
+ /* #define SYSV */ /* required on SGI IRIX releases before 3.3 */
+
++#include <stdlib.h>
++#include <unistd.h>
++#include <string.h>
+ #include <stdio.h>
++#include <sys/select.h>
+ #include <signal.h>
+ #include <ctype.h>
+ #include <errno.h>
+@@ -120,7 +124,6 @@
+ static struct rusage ru0; /* Resource utilization at the start */
+
+ struct hostent *addr;
+-extern int errno;
+ extern int optind;
+ extern char *optarg;
+
diff --git a/net-dialup/linux-atm/files/linux-atm-2.4.1-gcc4.patch b/net-dialup/linux-atm/files/linux-atm-2.4.1-gcc4.patch
new file mode 100644
index 00000000000..a761250408f
--- /dev/null
+++ b/net-dialup/linux-atm/files/linux-atm-2.4.1-gcc4.patch
@@ -0,0 +1,161 @@
+diff -Nru linux-atm-2.4.1.orig/src/ilmid/atmf_uni.c linux-atm-2.4.1/src/ilmid/atmf_uni.c
+--- linux-atm-2.4.1.orig/src/ilmid/atmf_uni.c 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/ilmid/atmf_uni.c 2007-04-14 18:03:27.000000000 +0300
+@@ -187,7 +187,7 @@
+ newPrefix->name = alloc_t(AsnOid);
+ newPrefix->name->octs = alloc(varBindName->octetLen);
+ AsnOidCopy(newPrefix->name, varBindName);
+- Q_INSERT_BEFORE((NetPrefixNode *) var->value, newPrefix, prefix);
++ Q_INSERT_BEFORE((*((NetPrefixNode **)&var->value)), newPrefix, prefix);
+ if(atmNetPrefix.octs == NULL)
+ {
+ atmNetPrefix.octetLen = varBindName->octetLen - NETPREFIX_LEN - 2;
+@@ -197,7 +197,7 @@
+ }
+ else if (varbind->value->a.simple->a.number == INVALID && cmp == AsnOidEqual)
+ {
+- Q_REMOVE((NetPrefixNode *) var->value, prefix);
++ Q_REMOVE((*((NetPrefixNode **) &var->value)), prefix);
+ }
+
+ return NOERROR;
+diff -Nru linux-atm-2.4.1.orig/src/lib/sapequal.c linux-atm-2.4.1/src/lib/sapequal.c
+--- linux-atm-2.4.1.orig/src/lib/sapequal.c 2001-09-03 21:41:05.000000000 +0300
++++ linux-atm-2.4.1/src/lib/sapequal.c 2007-04-14 18:03:23.000000000 +0300
+@@ -65,6 +65,7 @@
+ CHECK(l2.itu.window,a.l2.itu.window > b.l2.itu.window);
+ break;
+ default:
++ ;
+ }
+ switch (a.l3_proto) {
+ case ATM_L3_X25:
+@@ -83,6 +84,7 @@
+ if (a.l3.user != b.l3.user) return 0;
+ break;
+ default:
++ ;
+ }
+ return 1;
+ }
+diff -Nru linux-atm-2.4.1.orig/src/maint/atmtcp.c linux-atm-2.4.1/src/maint/atmtcp.c
+--- linux-atm-2.4.1.orig/src/maint/atmtcp.c 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/maint/atmtcp.c 2007-04-14 18:03:27.000000000 +0300
+@@ -60,7 +60,7 @@
+ static IN *inputs = NULL;
+ static fd_set in_set;
+ static int fds = 0;
+-static int debug = 0;
++int debug = 0;
+ static int links = 0;
+
+
+diff -Nru linux-atm-2.4.1.orig/src/maint/enitune.c linux-atm-2.4.1/src/maint/enitune.c
+--- linux-atm-2.4.1.orig/src/maint/enitune.c 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/maint/enitune.c 2007-04-14 18:03:23.000000000 +0300
+@@ -44,6 +44,7 @@
+ if (*end || mult.rx <= 100) usage(name);
+ break;
+ default:
++ ;
+ }
+ if (argc != optind+1) usage(name);
+ sioc.number = strtol(argv[optind],&end,0);
+diff -Nru linux-atm-2.4.1.orig/src/mpoad/p_factory.c linux-atm-2.4.1/src/mpoad/p_factory.c
+--- linux-atm-2.4.1.orig/src/mpoad/p_factory.c 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/mpoad/p_factory.c 2007-04-14 18:03:27.000000000 +0300
+@@ -31,16 +31,17 @@
+ * beginning at location "addr".
+ */
+ uint32_t sum = 0;
++ uint16_t *addr16 = addr;
+
+ while( count > 1 ) {
+ /* This is the inner loop */
+- sum += * ((uint16_t *) addr)++;
++ sum += * addr16++;
+ count -= 2;
+ }
+
+ /* Add left-over byte, if any */
+ if( count > 0 )
+- sum += * (unsigned char *) addr;
++ sum += * (unsigned char *) addr16;
+
+ /* Fold 32-bit sum to 16 bits */
+ while (sum>>16)
+diff -Nru linux-atm-2.4.1.orig/src/qgen/qlib.c linux-atm-2.4.1/src/qgen/qlib.c
+--- linux-atm-2.4.1.orig/src/qgen/qlib.c 2001-09-03 21:41:05.000000000 +0300
++++ linux-atm-2.4.1/src/qgen/qlib.c 2007-04-14 18:03:27.000000000 +0300
+@@ -26,8 +26,6 @@
+ #include "op.h"
+
+
+-static int debug = 0;
+-
+
+ void PREFIX(report)(int severity,const char *msg,...)
+ {
+@@ -830,6 +828,8 @@
+
+ #ifdef STANDALONE
+
++int debug = 0;
++
+ int main(int argc,const char **argv)
+ {
+ unsigned char msg[5000]; /* should be large enough for that */
+diff -Nru linux-atm-2.4.1.orig/src/qgen/qlib.h linux-atm-2.4.1/src/qgen/qlib.h
+--- linux-atm-2.4.1.orig/src/qgen/qlib.h 2001-09-03 21:41:05.000000000 +0300
++++ linux-atm-2.4.1/src/qgen/qlib.h 2007-04-14 18:03:27.000000000 +0300
+@@ -23,7 +23,6 @@
+ #define Q_FATAL -1
+
+
+-extern int q_dump;
+ extern void q_report(int severity,const char *msg,...);
+
+ #ifdef DUMP_MODE
+diff -Nru linux-atm-2.4.1.orig/src/sigd/proto.c linux-atm-2.4.1/src/sigd/proto.c
+--- linux-atm-2.4.1.orig/src/sigd/proto.c 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/sigd/proto.c 2007-04-14 18:03:23.000000000 +0300
+@@ -259,6 +259,7 @@
+ break;
+ }
+ default:
++ ;
+ }
+ va_end(ap);
+ if ((size = q_close(&dsc)) >= 0) to_signaling(sock->sig,q_buffer,size);
+@@ -288,6 +289,7 @@
+ }
+ break;
+ default:
++ ;
+ }
+ va_end(ap);
+ }
+diff -Nru linux-atm-2.4.1.orig/src/switch/debug/debug.c linux-atm-2.4.1/src/switch/debug/debug.c
+--- linux-atm-2.4.1.orig/src/switch/debug/debug.c 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/switch/debug/debug.c 2007-04-14 18:03:27.000000000 +0300
+@@ -18,7 +18,7 @@
+ #define COMPONENT "FAB(debug)"
+
+
+-#define PRV(call) ((FAB *) (call)->fab)
++#define PRV(call) (*((FAB **) &(call)->fab))
+
+
+ typedef struct _fab {
+diff -Nru linux-atm-2.4.1.orig/src/switch/tcp/tcpsw.c linux-atm-2.4.1/src/switch/tcp/tcpsw.c
+--- linux-atm-2.4.1.orig/src/switch/tcp/tcpsw.c 2001-09-03 21:41:06.000000000 +0300
++++ linux-atm-2.4.1/src/switch/tcp/tcpsw.c 2007-04-14 18:03:27.000000000 +0300
+@@ -27,7 +27,7 @@
+
+ #define COMPONENT "FAB(tcp)"
+
+-#define PRV(call) ((FAB *) (call)->fab)
++#define PRV(call) (*((FAB **) &(call)->fab))
+
+ #define MAX_VCI 1024
+
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 00000000000..f422c9c35e9
--- /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 00000000000..692f3163dea
--- /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 00000000000..7097384f037
--- /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 00000000000..edfb38d68b7
--- /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 00000000000..13132488025
--- /dev/null
+++ b/net-dialup/linux-atm/linux-atm-2.5.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..c6e943a2973
--- /dev/null
+++ b/net-dialup/linux-atm/linux-atm-2.5.2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..cf1b28ef7a1
--- /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>
+ <herd>net-dialup</herd>
+ <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 00000000000..acde0854107
--- /dev/null
+++ b/net-dialup/lrzsz/Manifest
@@ -0,0 +1 @@
+DIST lrzsz-0.12.20.tar.gz 280938 SHA256 c28b36b14bddb014d9e9c97c52459852f97bd405f89113f30bee45ed92728ff1 SHA512 9bce64036f1f1c65f5910f19802aecaf3dc5ffeab0feeca10fa8d2fe1b83e212391cce23056d22fd0eda52df89e12ede68eb5d22ffcf22f935910d2af7399f12 WHIRLPOOL 17934730db44d11c08b700cd68d8a1e619612bf158db106ef8e7fc54e623b0c5e98a133870cf8cd0b8f824c3cf24b24f7102725dcf438d307a2e1d3839e0d1d5
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 00000000000..c5ecdee208d
--- /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 00000000000..a0d67c9f014
--- /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 00000000000..704af801559
--- /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 00000000000..9b1decdba85
--- /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 00000000000..ee978ff393e
--- /dev/null
+++ b/net-dialup/lrzsz/lrzsz-0.12.20-r3.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~x86-freebsd ~amd64-linux ~ia64-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 00000000000..a46ef861b0c
--- /dev/null
+++ b/net-dialup/lrzsz/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-dialup</herd>
+<longdescription>Communication package providing the X, Y, and ZMODEM file transfer protocols</longdescription>
+</pkgmetadata>
diff --git a/net-dialup/martian-modem/Manifest b/net-dialup/martian-modem/Manifest
new file mode 100644
index 00000000000..5774fade3a4
--- /dev/null
+++ b/net-dialup/martian-modem/Manifest
@@ -0,0 +1 @@
+DIST martian-full-20100123.tar.gz 275365 SHA256 bf3ad369dc90e3ef7952e6bb7873b3121ce79a855060a1b4b4e3a1d8e7d08ac3 SHA512 bcd51103792bd1d477ab81f8bbb591f3eb5341920e6b0b35e8ba066a50b8a6ddf076c0bc0d21cf686c8137f8164221635b3c296185283f6e20ce2d04709f69ec WHIRLPOOL b38fb4ea1e7282cf51547c4d6ab3423350dabe717ebe89efa20cc92148347d7e1b2fcc32085d3edc677768f7286715087034bace7f51415ce31a24d840c85c59
diff --git a/net-dialup/martian-modem/files/martian-modem-20100123-linux-3.10.patch b/net-dialup/martian-modem/files/martian-modem-20100123-linux-3.10.patch
new file mode 100644
index 00000000000..27daed03792
--- /dev/null
+++ b/net-dialup/martian-modem/files/martian-modem-20100123-linux-3.10.patch
@@ -0,0 +1,70 @@
+diff -urN martian-full-20100123.orig/kmodule/martian.c martian-full-20100123/kmodule/martian.c
+--- martian-full-20100123.orig/kmodule/martian.c 2015-03-21 16:21:21.228514759 -0400
++++ martian-full-20100123/kmodule/martian.c 2015-03-21 16:29:23.402126727 -0400
+@@ -184,8 +184,12 @@
+ static int martian_open (struct inode *inode, struct file *filp)
+ {
+ // allow single open
+- struct proc_dir_entry *entry = PDE (inode);
+- struct martian *mdev = (struct martian *) entry->data;
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++ struct martian *mdev = (struct martian *) PDE_DATA (inode);
++ #else
++ struct proc_dir_entry *entry = PDE (inode);
++ struct martian *mdev = (struct martian *) entry->data;
++ #endif
+
+ if (test_and_set_bit (MARTIAN_STATE_OPEN, &mdev->state)) {
+ // already opened
+@@ -736,20 +740,37 @@
+ // create proc entry for this device
+ name[ strlen(name) - 1 ] = '0' + dev_idx;
+
+- mdev->entry = create_proc_entry (name, 0400, NULL);
+- if (! mdev->entry) {
+- MERROR ("martian: failed to create /proc/%s\n", name);
+- ret = -ENOMEM;
+- goto err_free_irq;
+- }
+-
+- martian_init_mcb(mdev);
+-
+- // set an index
+- mdev->index = dev_idx;
+-
+- mdev->entry->proc_fops = & martian_fops;
+- mdev->entry->data = mdev;
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++ // initialize data before 3.10-style proc create call
++ martian_init_mcb(mdev);
++
++ // set an index
++ mdev->index = dev_idx;
++
++ mdev->entry = proc_create_data (name, 0400, NULL, & martian_fops, mdev);
++ if (! mdev->entry) {
++ MERROR ("martian: failed to create /proc/%s\n", name);
++ ret = -ENOMEM;
++ goto err_free_irq;
++ }
++
++ #else
++
++ mdev->entry = create_proc_entry (name, 0400, NULL);
++ if (! mdev->entry) {
++ MERROR ("martian: failed to create /proc/%s\n", name);
++ ret = -ENOMEM;
++ goto err_free_irq;
++ }
++
++ martian_init_mcb(mdev);
++
++ // set an index
++ mdev->index = dev_idx;
++
++ mdev->entry->proc_fops = & martian_fops;
++ mdev->entry->data = mdev;
++ #endif
+
+ pr_info("martian: added device %x:%x "
+ "BaseAddress = 0x%x, CommAddres = 0x%x, irq = %d%s\n",
diff --git a/net-dialup/martian-modem/files/martian-modem-20100123-linux-3.8.patch b/net-dialup/martian-modem/files/martian-modem-20100123-linux-3.8.patch
new file mode 100644
index 00000000000..07793685704
--- /dev/null
+++ b/net-dialup/martian-modem/files/martian-modem-20100123-linux-3.8.patch
@@ -0,0 +1,87 @@
+diff -urN martian-full-20100123.orig/kmodule/martian.c martian-full-20100123/kmodule/martian.c
+--- martian-full-20100123.orig/kmodule/martian.c 2015-03-21 16:15:55.498819336 -0400
++++ martian-full-20100123/kmodule/martian.c 2015-03-21 16:17:03.769752308 -0400
+@@ -592,7 +592,7 @@
+
+ static int dev_idx = 0;
+
+-static void __devinit
++static void
+ martian_configure_isr (struct martian *mdev)
+ {
+ struct martian_common *mcb = mdev->common;
+@@ -614,7 +614,7 @@
+ mcb->dp_bamil_rd7 = 0xff;
+ }
+
+-static void __devinit
++static void
+ martian_configure_params (struct martian *mdev)
+ {
+ mdev->params.dsp_mars = mdev->metrics.dsp_mars;
+@@ -792,7 +792,7 @@
+
+ /***** PCI Driver Interface *****/
+
+-static int __devinit
++static int
+ martian_device_gatherinfo (const struct pci_dev *dev, const struct pci_device_id *ent, struct martian_metrics *metrics)
+ {
+ int bar;
+@@ -997,7 +997,7 @@
+ return 0;
+ }
+
+-static int __devinit
++static int
+ mars_device_probe (struct pci_dev *dev, const struct pci_device_id *ent)
+ {
+ int ret;
+@@ -1036,7 +1036,7 @@
+ }
+
+
+-static void __devexit mars_remove (struct pci_dev *dev)
++static void mars_remove (struct pci_dev *dev)
+ {
+ martian_del (pci_get_drvdata (dev));
+ pci_disable_device (dev);
+@@ -1048,7 +1048,7 @@
+ struct pci_driver martian_driver = {
+ .name = "martian",
+ .probe = mars_device_probe,
+- .remove = __devexit_p (mars_remove),
++ .remove = mars_remove,
+ .id_table = martian_ids
+ };
+
+@@ -1062,7 +1062,7 @@
+
+ #define SERIAL_DRIVER "serial"
+
+-static void __devinit detach_from_serial_class (unsigned int class, unsigned int mask)
++static void detach_from_serial_class (unsigned int class, unsigned int mask)
+ {
+ struct pci_dev *dev = NULL;
+ const struct pci_device_id *entry;
+@@ -1083,7 +1083,7 @@
+ }
+ }
+
+-static void __devinit detach_from_serial(void)
++static void detach_from_serial(void)
+ {
+ detach_from_serial_class (PCI_CLASS_COMMUNICATION_SERIAL << 8, 0xffff00);
+ detach_from_serial_class (PCI_CLASS_COMMUNICATION_MODEM << 8, 0xffff00);
+diff -urN martian-full-20100123.orig/kmodule/martian_ids.c martian-full-20100123/kmodule/martian_ids.c
+--- martian-full-20100123.orig/kmodule/martian_ids.c 2015-03-21 16:15:48.461826345 -0400
++++ martian-full-20100123/kmodule/martian_ids.c 2015-03-21 16:17:17.167739363 -0400
+@@ -8,7 +8,7 @@
+ .subvendor = (_subvendor), \
+ .subdevice = PCI_ANY_ID
+
+-__devinitdata static struct pci_device_id martian_ids[] = {
++static struct pci_device_id martian_ids[] = {
+ { PCI_DEVICE (PCI_VENDOR_ID_ATT, 0x440) },
+ { PCI_DEVICE (PCI_VENDOR_ID_ATT, 0x441) },
+ { PCI_DEVICE (PCI_VENDOR_ID_ATT, 0x442) },
diff --git a/net-dialup/martian-modem/files/martian-modem-20100123-makefile.patch b/net-dialup/martian-modem/files/martian-modem-20100123-makefile.patch
new file mode 100644
index 00000000000..e6ce7ca7e52
--- /dev/null
+++ b/net-dialup/martian-modem/files/martian-modem-20100123-makefile.patch
@@ -0,0 +1,34 @@
+--- martian-full-20100123/Makefile 2008-07-02 15:42:48.000000000 -0800
++++ martian-full-20100123.new/Makefile 2012-10-08 12:14:33.284275312 -0800
+@@ -1,10 +1,10 @@
+
+-KERNEL_DIR:=/lib/modules/$(shell uname -r)/build
+-SUBLEVEL:=$(shell echo $(KERNEL_DIR) | cut -d. -f3 | cut -d. -f1 | cut -d- -f1)
+-# support begins at SUBLEVEL 20
+-after20:=$(shell if [ "$(SUBLEVEL)" -gt 20 ] ;then echo OK; fi)
++#KERNEL_DIR:=/lib/modules/$(shell uname -r)/build
++#SUBLEVEL:=$(shell echo $(KERNEL_DIR) | cut -d. -f3 | cut -d. -f1 | cut -d- -f1)
++## support begins at SUBLEVEL 20
++#after20:=$(shell if [ "$(SUBLEVEL)" -gt 20 ] ;then echo OK; fi)
+
+-ifdef after20
++#ifdef after20
+ all:
+ $(MAKE) -C kmodule/ modules
+ $(MAKE) -C modem/ all
+@@ -14,11 +14,11 @@
+ $(MAKE) -C kmodule/ install
+ $(MAKE) -C modem/ install
+
+-else
+-20less:
+- @echo "The martian_dev.ko driver and the complementary helper martian_helper are for use with kernels after 2.6.20. Use the martian-20080407.tar.gz for earlier kernels."
++#else
++#20less:
++# @echo "The martian_dev.ko driver and the complementary helper martian_helper are for use with kernels after 2.6.20. Use the martian-20080407.tar.gz for earlier kernels."
+
+-endif
++#endif
+
+ clean:
+ $(MAKE) -C kmodule/ clean
diff --git a/net-dialup/martian-modem/files/martian-modem.conf.d b/net-dialup/martian-modem/files/martian-modem.conf.d
new file mode 100644
index 00000000000..73bcce3baf7
--- /dev/null
+++ b/net-dialup/martian-modem/files/martian-modem.conf.d
@@ -0,0 +1,45 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+#
+### Configuration for martian-modem initscript
+#
+### DEVICE
+# Device that will martian-modem daemon create to act as modem device.
+# Default is /dev/ttySM0.
+#DEVICE="/dev/ttySM0"
+#
+#
+### USER/GROUP
+# User and group that will have access to the modem device.
+# Default values are nobody/dialout.
+# Note: the daemon itself needs to be run as root!
+#USER="nobody"
+#GROUP="dialout"
+#
+#
+### MARTIAN_OPTS
+# Other options to be passed to the daemon, see description below.
+# Defaults to empty.
+# --realtime - raise priority of threads to realtime.
+# --smp - true smp (symmetric multiprocessing) mode.
+# --country=<country> - two-letter code for the country.
+# Run `/usr/sbin/martian_modem --info countries` for list.
+# --no-cdclose - keep working with client when carrier lost.
+# --hide-pty - save pty from others as soon its open. Client
+# should notify it's here writing to device. For callback feature.
+#MARTIAN_OPTS=""
+#
+#
+### LOGGING
+# Should we log to syslog [YES/NO]
+# Default to YES. If you do not want this, say NO here to use LOGFILE instead.
+#USE_SYSLOG="YES"
+# Alternatively, you can log to a separate file. The default location is below.
+#LOGFILE="/var/log/martian-modem.log"
+#
+#
+### DEBUG
+# How verbose should the log be [1-5]
+# Default debug_level=1; debug_level=3 is suitable for normal debugging.
+#DEBUG_LEVEL=1
diff --git a/net-dialup/martian-modem/files/martian-modem.init.d b/net-dialup/martian-modem/files/martian-modem.init.d
new file mode 100644
index 00000000000..8830b98827c
--- /dev/null
+++ b/net-dialup/martian-modem/files/martian-modem.init.d
@@ -0,0 +1,50 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+daemon=/usr/sbin/martian_modem
+description="Initscript to run the userspace daemon for winmodems supported by martian-modem driver"
+
+: ${device:=${DEVICE:-/dev/ttySM0}}
+: ${logfile:=${LOGFILE:-/var/log/martian-modem.log}}
+: ${user:=${USER:-nobody}}
+: ${group:=${GROUP:-dialout}}
+: ${debug_level:=${DEBUG_LEVEL:-1}}
+: ${use_syslog:=${USE_SYSLOG:-YES}}
+pidfile=/var/run/${SVCNAME}.pid
+
+depend() {
+ need localmount
+ [ "${use_syslog}" = "YES" ] && use syslog
+}
+
+start() {
+ if [ -e /proc/modules ] ; then
+ local modem=
+ for modem in /dev/modem /dev/ttySM[0-9]* ; do
+ [ -e "${modem}" ] && break
+ done
+ fi
+ if [ ! -e "${modem}" ] ; then
+ modprobe martian-dev || eerror $? "Error loading martian-dev module"
+ fi
+
+ if ! yesno "${use_syslog}" ; then
+ martian_opts="${MARTIAN_OPTS} --log=${logfile}"
+ else
+ martian_opts="${MARTIAN_OPTS} --syslog"
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec ${daemon} --user ${user}:${group} \
+ --pidfile ${pidfile} --make-pidfile --background \
+ -- ${martian_opts} --debug=${debug_level} ${device}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --pidfile ${pidfile}
+ eend $?
+}
diff --git a/net-dialup/martian-modem/martian-modem-20100123-r1.ebuild b/net-dialup/martian-modem/martian-modem-20100123-r1.ebuild
new file mode 100644
index 00000000000..8c6bc7c7179
--- /dev/null
+++ b/net-dialup/martian-modem/martian-modem-20100123-r1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit linux-mod eutils
+
+MY_P="martian-full-${PV}"
+DESCRIPTION="ltmodem alternative driver providing support for Agere Systems winmodems"
+HOMEPAGE="http://packages.debian.org/sid/martian-modem-source http://phep2.technion.ac.il/linmodems/packages/ltmodem/kernel-2.6/martian"
+#SRC_URI="mirror://debian/pool/non-free/m/martian-modem/${MY_P}.tar.gz"
+#SRC_URI="http://phep2.technion.ac.il/linmodems/packages/ltmodem/kernel-2.6/martian/${MY_P}.tar.gz"
+SRC_URI="http://linmodems.technion.ac.il/packages/ltmodem/kernel-2.6/martian/${MY_P}.tar.gz"
+
+LICENSE="GPL-2 AgereSystems-WinModem"
+KEYWORDS="~amd64 ~x86 -*"
+IUSE=""
+
+DEPEND="!net-dialup/ltmodem"
+RDEPEND="${DEPEND}"
+
+# Do NOT remove this. Stripping results in broken communication
+# with core state communication channel (also see QA_* stuff below)
+RESTRICT="strip"
+
+# contains proprietary precompiled 32 bit ltmdmobj.o
+QA_PREBUILT="usr/sbin/martian_modem"
+
+S="${WORKDIR}/${P/modem/full}"
+MODULE_NAMES="martian_dev(ltmodem::kmodule)"
+CONFIG_CHECK="SERIAL_8250"
+SERIAL_8250_ERROR="This driver requires you to compile your kernel with serial core (CONFIG_SERIAL_8250) support."
+
+src_prepare() {
+ # Exclude Makefile kernel version check, we used kernel_is above.
+ # TODO: More exactly, martian-modem-full-20100123 is for >kernel-2.6.20!
+ epatch "${FILESDIR}/${P}-makefile.patch"
+
+ # Per Gentoo Bug #543702, CONFIG_HOTPLUG is going away as an option. As of
+ # Linux Kernel 3.8, the __dev* markings need to be removed. This patch removes
+ # the use of __devinit, __devexit_p, and __devexit as the type cast simply isn't
+ # needed any longer.
+ if kernel_is -ge 3 8; then
+ epatch "${FILESDIR}/${P}-linux-3.8.patch"
+ fi
+
+ # Per Gentoo Bug #543702, "proc_dir_entry" and "create_proc_entry" Linux
+ # Kernel header definition was moved and only accessible internally as of
+ # Linux Kernel 3.10. This patch originates from Paul McClay (2014.05.28)
+ # and posted to Ubuntu Launchpad.
+ if kernel_is -ge 3 10; then
+ epatch "${FILESDIR}/${P}-linux-3.10.patch"
+ fi
+
+ # fix compile on amd64
+ sed -i -e "/^HOST.*$/s:uname -i:uname -m:" modem/Makefile || die "sed failed"
+
+ BUILD_TARGETS="all"
+ BUILD_PARAMS="KERNEL_DIR='${KV_DIR}' SUBLEVEL='${KV_PATCH}'"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ # userspace daemon and initscripts stuff
+ dosbin modem/martian_modem
+ newconfd "${FILESDIR}/${PN}.conf.d" ${PN}
+ newinitd "${FILESDIR}/${PN}.init.d" ${PN}
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ if linux_chkconfig_present SMP ; then
+ elog "You have SMP (symmetric multi processor) support enabled in kernel."
+ elog "You should run martian-modem with --smp enabled in MARTIAN_OPTS."
+ fi
+ if ! has_version net-dialup/martian-modem; then
+ elog "See /etc/conf.d/${PN} for configuration options."
+ elog "After you have finished the configuration, you need to run /etc/init.d/${PN} start"
+ elog
+ fi
+ if [ "$(rc-config list default | grep martian-modem)" = "" ]; then
+ elog "To run the userspace daemon automatically on every boot, just add it to a runlevel:"
+ elog "rc-update add ${PN} default"
+ elog
+ fi
+ if has_version net-dialup/wvdial; then
+ elog "If using net-dialup/wvdial, you need \"Carrier Check = no\" line."
+ fi
+}
diff --git a/net-dialup/martian-modem/metadata.xml b/net-dialup/martian-modem/metadata.xml
new file mode 100644
index 00000000000..bb68c349bea
--- /dev/null
+++ b/net-dialup/martian-modem/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>proxy-maintainers</herd>
+<maintainer>
+ <email>rogerx.oss@gmail.com</email>
+ <name>Roger</name>
+ <description>Please assign bugs</description>
+</maintainer>
+<maintainer>
+ <email>pacho@gentoo.org</email>
+ <description>proxy-maintainer, please CC on bugs</description>
+</maintainer>
+</pkgmetadata>
diff --git a/net-dialup/metadata.xml b/net-dialup/metadata.xml
new file mode 100644
index 00000000000..313bfd552fa
--- /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 00000000000..6140bbf22a7
--- /dev/null
+++ b/net-dialup/mgetty/Manifest
@@ -0,0 +1 @@
+DIST mgetty1.1.37-Jun05.tar.gz 1057939 SHA256 6ff8cbc4f8aacd3dd7f247ff96715141bc6173745ea916dd98b8381a85ecdf0e SHA512 577d740c7d209b830bf8e783bf71edb666cb8bbfe8e7dceaa51dda6095d88724715394bcbd24eacfb1c377999f5779b547a7ec79cd9cdc13de6de18c4d857188 WHIRLPOOL f00d22ab213cd00f392ead46804ad1c3b192ae816b7518f1a73b4d65c180ba78fb2f193ceacf1f5aa88aeca4431eecb87e0960f0b6196a7e00247690083e937e
diff --git a/net-dialup/mgetty/files/Lucent.c.patch b/net-dialup/mgetty/files/Lucent.c.patch
new file mode 100644
index 00000000000..35b4b3e0b61
--- /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 00000000000..fcd4e0e2cd4
--- /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-gentoo.patch b/net-dialup/mgetty/files/mgetty-1.1.36-gentoo.patch
new file mode 100644
index 00000000000..12de205d76c
--- /dev/null
+++ b/net-dialup/mgetty/files/mgetty-1.1.36-gentoo.patch
@@ -0,0 +1,170 @@
+diff -Nru mgetty-1.1.36.orig/callback/Makefile mgetty-1.1.36/callback/Makefile
+--- mgetty-1.1.36.orig/callback/Makefile 2007-09-14 23:03:32.000000000 +0300
++++ mgetty-1.1.36/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.36.orig/doc/mgetty.texi-in mgetty-1.1.36/doc/mgetty.texi-in
+--- mgetty-1.1.36.orig/doc/mgetty.texi-in 2007-09-14 23:03:32.000000000 +0300
++++ mgetty-1.1.36/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.36.orig/fax/faxspool.in mgetty-1.1.36/fax/faxspool.in
+--- mgetty-1.1.36.orig/fax/faxspool.in 2007-09-14 23:03:32.000000000 +0300
++++ mgetty-1.1.36/fax/faxspool.in 2007-09-14 23:02:58.000000000 +0300
+@@ -380,7 +380,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)
+@@ -391,7 +391,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.36.orig/frontends/X11/viewfax/Makefile mgetty-1.1.36/frontends/X11/viewfax/Makefile
+--- mgetty-1.1.36.orig/frontends/X11/viewfax/Makefile 2007-09-14 23:03:32.000000000 +0300
++++ mgetty-1.1.36/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.36.orig/g3/Makefile mgetty-1.1.36/g3/Makefile
+--- mgetty-1.1.36.orig/g3/Makefile 2007-09-14 23:03:32.000000000 +0300
++++ mgetty-1.1.36/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.36.orig/Makefile mgetty-1.1.36/Makefile
+--- mgetty-1.1.36.orig/Makefile 2007-09-14 23:03:32.000000000 +0300
++++ mgetty-1.1.36/Makefile 2007-09-14 23:02:58.000000000 +0300
+@@ -275,7 +275,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
+
+@@ -584,10 +584,8 @@
+ $(INSTALL) -m 755 newslock $(BINDIR)
+
+ -test -d $(SBINDIR) || ( ./mkidirs $(SBINDIR) ; chmod 755 $(SBINDIR) )
+- -mv -f $(SBINDIR)/mgetty $(SBINDIR)/mgetty.old
+- -mv -f $(SBINDIR)/sendfax $(SBINDIR)/sendfax.old
+- $(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
+ #
+@@ -649,7 +647,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.36.orig/mgetty.cfg.in mgetty-1.1.36/mgetty.cfg.in
+--- mgetty-1.1.36.orig/mgetty.cfg.in 2003-11-17 21:09:41.000000000 +0200
++++ mgetty-1.1.36/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.36.orig/voice/Makefile mgetty-1.1.36/voice/Makefile
+--- mgetty-1.1.36.orig/voice/Makefile 2007-09-14 23:03:32.000000000 +0300
++++ mgetty-1.1.36/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.36.orig/voice/voice.conf-dist mgetty-1.1.36/voice/voice.conf-dist
+--- mgetty-1.1.36.orig/voice/voice.conf-dist 2005-03-19 18:10:20.000000000 +0200
++++ mgetty-1.1.36/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.36-nofax.patch b/net-dialup/mgetty/files/mgetty-1.1.36-nofax.patch
new file mode 100644
index 00000000000..a65f867edf6
--- /dev/null
+++ b/net-dialup/mgetty/files/mgetty-1.1.36-nofax.patch
@@ -0,0 +1,110 @@
+diff -Nru mgetty-1.1.36.orig/doc/Makefile mgetty-1.1.36/doc/Makefile
+--- mgetty-1.1.36.orig/doc/Makefile 2007-11-25 09:31:56.000000000 +0200
++++ mgetty-1.1.36/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.36.orig/Makefile mgetty-1.1.36/Makefile
+--- mgetty-1.1.36.orig/Makefile 2007-11-25 09:31:58.000000000 +0200
++++ mgetty-1.1.36/Makefile 2007-11-25 09:34:45.000000000 +0200
+@@ -317,7 +317,7 @@
+
+ all: bin-all doc-all
+
+-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
+
+@@ -362,9 +362,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
+@@ -585,7 +583,6 @@
+
+ -test -d $(SBINDIR) || ( ./mkidirs $(SBINDIR) ; chmod 755 $(SBINDIR) )
+ $(INSTALL) -m 700 mgetty $(SBINDIR)
+- $(INSTALL) -m 755 sendfax $(SBINDIR)
+ #
+ # data files + directories
+ #
+@@ -597,12 +594,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
+ #
+@@ -614,34 +607,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.36.orig/t/Makefile mgetty-1.1.36/t/Makefile
+--- mgetty-1.1.36.orig/t/Makefile 2006-09-26 01:32:10.000000000 +0300
++++ mgetty-1.1.36/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.36-qa-fixes.patch b/net-dialup/mgetty/files/mgetty-1.1.36-qa-fixes.patch
new file mode 100644
index 00000000000..69ae072fd69
--- /dev/null
+++ b/net-dialup/mgetty/files/mgetty-1.1.36-qa-fixes.patch
@@ -0,0 +1,175 @@
+diff -Nru mgetty-1.1.36.orig/doc/Makefile mgetty-1.1.36/doc/Makefile
+--- mgetty-1.1.36.orig/doc/Makefile 2006-02-22 18:35:02.000000000 +0100
++++ mgetty-1.1.36/doc/Makefile 2009-08-31 20:31:01.000000000 +0200
+@@ -63,7 +63,7 @@
+ *.man *.[1-9] mgetty.texi
+
+ install: $(MANSRC) mgetty.info
+- -mkdir `dirname $(MAN1DIR)` $(MAN1DIR) $(MAN4DIR) $(MAN5DIR) $(MAN8DIR) 2>/dev/null
++ mkdir -p $(MAN1DIR) $(MAN4DIR) $(MAN5DIR) $(MAN8DIR)
+ for i in $(MAN1PAGES) ; do \
+ $(INSTALL) -m 644 $$i $(MAN1DIR) ; \
+ done
+@@ -120,16 +120,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.36.orig/fax/Makefile mgetty-1.1.36/fax/Makefile
+--- mgetty-1.1.36.orig/fax/Makefile 2006-02-22 18:25:30.000000000 +0100
++++ mgetty-1.1.36/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.36.orig/fax_lib.h mgetty-1.1.36/fax_lib.h
+--- mgetty-1.1.36.orig/fax_lib.h 2007-06-15 08:44:36.000000000 +0200
++++ mgetty-1.1.36/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.36.orig/frontends/www/Makefile mgetty-1.1.36/frontends/www/Makefile
+--- mgetty-1.1.36.orig/frontends/www/Makefile 2006-02-22 18:25:32.000000000 +0100
++++ mgetty-1.1.36/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.36.orig/logfile.c mgetty-1.1.36/logfile.c
+--- mgetty-1.1.36.orig/logfile.c 2005-11-26 14:48:16.000000000 +0100
++++ mgetty-1.1.36/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.36.orig/Makefile mgetty-1.1.36/Makefile
+--- mgetty-1.1.36.orig/Makefile 2009-08-31 20:30:33.000000000 +0200
++++ mgetty-1.1.36/Makefile 2009-08-31 20:32:08.000000000 +0200
+@@ -361,7 +361,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
+@@ -617,15 +617,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.36.orig/t/t_g3f_c.c mgetty-1.1.36/t/t_g3f_c.c
+--- mgetty-1.1.36.orig/t/t_g3f_c.c 2007-05-05 14:03:03.000000000 +0200
++++ mgetty-1.1.36/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.36.orig/t/t_ring.c mgetty-1.1.36/t/t_ring.c
+--- mgetty-1.1.36.orig/t/t_ring.c 2005-03-23 10:56:21.000000000 +0100
++++ mgetty-1.1.36/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/files/mgetty-1.1.36-tmpfile.patch b/net-dialup/mgetty/files/mgetty-1.1.36-tmpfile.patch
new file mode 100644
index 00000000000..68f6f58868d
--- /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 00000000000..8f0c004d601
--- /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 00000000000..6636526b691
--- /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 00000000000..e803b424315
--- /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 00000000000..54960dabdfb
--- /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>
+<herd>net-dialup</herd>
+<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 00000000000..eca4b48304d
--- /dev/null
+++ b/net-dialup/mgetty/mgetty-1.1.37-r1.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic toolchain-funcs 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 00000000000..1af854b5c2f
--- /dev/null
+++ b/net-dialup/mingetty/Manifest
@@ -0,0 +1 @@
+DIST mingetty-1.08.tar.gz 13476 SHA256 0f55c90ba4faa913d91ef99cbf5cb2eb4dbe2780314c3bb17953f849c8cddd17
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 00000000000..c57bc0b6ad4
--- /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 00000000000..2bf5f6e1fab
--- /dev/null
+++ b/net-dialup/mingetty/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-dialup</herd>
+ <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.ebuild b/net-dialup/mingetty/mingetty-1.08.ebuild
new file mode 100644
index 00000000000..7e382a426aa
--- /dev/null
+++ b/net-dialup/mingetty/mingetty-1.08.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="A compact getty program for virtual consoles only"
+HOMEPAGE="http://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"
+
+src_unpack() {
+ unpack ${A}
+
+ use unicode && epatch "${FILESDIR}"/${P}-utf8.patch
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS} -Wall -W -pipe -D_GNU_SOURCE" CC="$(tc-getCC)" || die "compile failed"
+}
+
+src_install () {
+ dodir /sbin /usr/share/man/man8
+ emake DESTDIR="${D}" install || die "install failed"
+}
diff --git a/net-dialup/minicom/Manifest b/net-dialup/minicom/Manifest
new file mode 100644
index 00000000000..6a7bb67ca2a
--- /dev/null
+++ b/net-dialup/minicom/Manifest
@@ -0,0 +1,2 @@
+DIST minicom-2.6.tar.gz 830255 SHA256 ea5fe79c22dcb115cf5ed287b0e7a69e069bedd39889aa89b1a23f64f53fceb3 SHA512 96345e0c7b5991d3320fb4478b26717efdcdde307cd1cd065be424456bd90e528405c889a8aebaf6a67f3c614e4858825ec7f32769f2069f1b2e3ec5a2556023 WHIRLPOOL 7bfcb9a9609dc85585c808c8027f14406c1ff72771262d3c5beee9209078db9a58396d272333eb1ec6f97c0013b6a3792e0a1444cb737db4c202ccc90b8b1483
+DIST minicom-2.7.tar.gz 863544 SHA256 9ac3a663b82f4f5df64114b4792b9926b536c85f59de0f2d2b321c7626a904f4 SHA512 eb9679ac3a3d3585ea06c54407567898e50b981378656e7f8a241071c91054ff0928cc9023d2c79d1936588cdffa9426f4962b556e8daa1783add0c5ac59b5af WHIRLPOOL f93642d6cc3c8dee987d461a67e4a98b55d0ebea1a0c1b2dc8564a9af66dbf9aaad3e4cb2e161d127b965d955637882eda601034b863b32ee776925db969418e
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 00000000000..ff72db966b8
--- /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 00000000000..2dd01963c44
--- /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/minirc.dfl b/net-dialup/minicom/files/minirc.dfl
new file mode 100644
index 00000000000..42e9d8fe464
--- /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 00000000000..f5d48b82306
--- /dev/null
+++ b/net-dialup/minicom/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version = '1.0' encoding = 'UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-dialup</herd>
+ <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 00000000000..157a5efed5b
--- /dev/null
+++ b/net-dialup/minicom/minicom-2.6.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~ia64-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.ebuild b/net-dialup/minicom/minicom-2.7.ebuild
new file mode 100644
index 00000000000..407593752d7
--- /dev/null
+++ b/net-dialup/minicom/minicom-2.7.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+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 ~ia64-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 00000000000..9116400cff8
--- /dev/null
+++ b/net-dialup/moserial/Manifest
@@ -0,0 +1,2 @@
+DIST moserial-3.0.8.tar.xz 1067152 SHA256 baa53fb046485653d16ea879072a2f29b138faeced92f7d1ff045ba8db752073 SHA512 c4dc0f471487ecfca15aaf7a53074719693f6851dab4ba2560d62c292ac82d308d61aa07a70572f964802119a8d4c785210f0ef1b0b8cf0f22acd1948b1cf984 WHIRLPOOL 750bc3a7ffc0a25fb0b7176c104dfd80f4c35483a6ff1888a0a663c12c9cf1b282eaea7d0c87c4e5ac5ad6165695645afd3819baaedf101016ef60eba3dbe706
+DIST moserial-3.0.9.tar.xz 1079512 SHA256 6bba85ae6367d9ecfe6a72af9fc354b3ce840ac42ad6e4dcb18b01088fc874cd SHA512 0f405303a060d33f7479a6b690bc57517af981f981139da70a353358c5a927d5fb9b3c38002f0a447e1206eb4d7fb818509ab71b0926fe644a86a8999be4772f WHIRLPOOL fe87a154160b0866bf3b4663e6f321c20f220dbf1dcf5bad04b1d2fbc431871685555ea0804a1df75fef5488f46a18744fd59149bbd84a47bb46da39591d925e
diff --git a/net-dialup/moserial/metadata.xml b/net-dialup/moserial/metadata.xml
new file mode 100644
index 00000000000..8b49a280b79
--- /dev/null
+++ b/net-dialup/moserial/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>gnome</herd>
+<maintainer>
+ <email>steev@gentoo.org</email>
+</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.8.ebuild b/net-dialup/moserial/moserial-3.0.8.ebuild
new file mode 100644
index 00000000000..6d317cc53a1
--- /dev/null
+++ b/net-dialup/moserial/moserial-3.0.8.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2
+
+DESCRIPTION="A clean and friendly gtk-based serial terminal"
+HOMEPAGE="https://live.gnome.org/moserial"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+RDEPEND=">=dev-libs/glib-2.16:2
+ gnome-base/gsettings-desktop-schemas
+ >=x11-libs/gtk+-3.0.0:3"
+DEPEND="${RDEPEND}
+ app-text/scrollkeeper
+ >=app-text/gnome-doc-utils-0.3.2
+ >=dev-util/intltool-0.35
+ virtual/pkgconfig"
diff --git a/net-dialup/moserial/moserial-3.0.9.ebuild b/net-dialup/moserial/moserial-3.0.9.ebuild
new file mode 100644
index 00000000000..0adcbe5427c
--- /dev/null
+++ b/net-dialup/moserial/moserial-3.0.9.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2
+
+DESCRIPTION="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
+ gnome-base/gsettings-desktop-schemas
+ >=x11-libs/gtk+-3.0.0:3
+"
+DEPEND="${RDEPEND}
+ app-text/scrollkeeper
+ >=app-text/gnome-doc-utils-0.3.2
+ >=dev-util/intltool-0.35
+ virtual/pkgconfig
+"
diff --git a/net-dialup/mwavem/Manifest b/net-dialup/mwavem/Manifest
new file mode 100644
index 00000000000..de988bcb45d
--- /dev/null
+++ b/net-dialup/mwavem/Manifest
@@ -0,0 +1 @@
+DIST mwavem-2.0.tar.gz 1443167 SHA256 4b3da6be3ec44caee70ef041f58054ac15ddc12c95455a068ef44edf633329ee SHA512 e1bb3c7e5511abc784b0359b844498389a9cb970fe46752775aaae6146d8cf25998a6e12dfc70df5c5f4287fd57abb49252f81a00528db5f7c2c96e3e7efb516 WHIRLPOOL 4d4728ffe824ae0b9ab77ea89f047d420404dafe0fe999d1378695e5ff4cbef6464091709f6b413522477d432043e99e19cbe120191669c2d9ac98118a04241d
diff --git a/net-dialup/mwavem/files/mwave-dev-handler b/net-dialup/mwavem/files/mwave-dev-handler
new file mode 100755
index 00000000000..3ba51ff75db
--- /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 00000000000..67ba1e527ab
--- /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 00000000000..613eef5c77a
--- /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 00000000000..ca86b503944
--- /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 00000000000..fa867986ec2
--- /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 00000000000..acee6b7963a
--- /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>
+<herd>net-dialup</herd>
+<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 00000000000..5c6478f86ae
--- /dev/null
+++ b/net-dialup/mwavem/mwavem-2.0-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..180e692a38b
--- /dev/null
+++ b/net-dialup/mwavem/mwavem-2.0-r2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..fc2d7a9573f
--- /dev/null
+++ b/net-dialup/neocon/Manifest
@@ -0,0 +1 @@
+DIST neocon-20110228.tar.bz2 3800 RMD160 510e70f7c7f9b3e707f48bab783db69053c71690 SHA1 11d42f2f0c5b436e5fd2eebb73fb416e2edbdc35 SHA256 e07ec16b98bc1495eb3ce22905d5a4fa0dfc3ab1363bb9884707763e341b1414
diff --git a/net-dialup/neocon/metadata.xml b/net-dialup/neocon/metadata.xml
new file mode 100644
index 00000000000..157326a7e89
--- /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>
+ <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 00000000000..e768f6b16d4
--- /dev/null
+++ b/net-dialup/neocon/neocon-20110228.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="http://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 00000000000..df6fb7cc414
--- /dev/null
+++ b/net-dialup/picocom/Manifest
@@ -0,0 +1 @@
+DIST picocom-1.7.tar.gz 42857 SHA256 d0f31c8f7a215a76922d30c81a52b9a2348c89e02a84935517002b3bc2c1129e SHA512 a222cc61be1e3e9759d8d6269348f6ac13159089e41b5a6aade3dc15abab8d76571a91c970f14af89244055f8bb9adf1ad5b336d7a9b4db5a9449558b86577ec WHIRLPOOL 1bb3b05e2fa111a55611e2586d93b16adeca397f368f1c6f3309f36490405afabbc9875dce262e548aa105c5f128ee004eaa7ec47772908e69689ff1ef68838f
diff --git a/net-dialup/picocom/metadata.xml b/net-dialup/picocom/metadata.xml
new file mode 100644
index 00000000000..418d529e8a6
--- /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>
+ <herd>net-dialup</herd>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">picocom</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/picocom/picocom-1.7.ebuild b/net-dialup/picocom/picocom-1.7.ebuild
new file mode 100644
index 00000000000..1cb7da3d6d2
--- /dev/null
+++ b/net-dialup/picocom/picocom-1.7.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="minimal dumb-terminal emulation program"
+HOMEPAGE="http://code.google.com/p/picocom/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~sparc x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND=""
+
+src_prepare() {
+ sed -i -e 's:\./picocom:picocom:' pcasc || die
+}
+
+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.8
+ dohtml picocom.8.html
+ dodoc CHANGES CHANGES.old CONTRIBUTORS README TODO
+}
diff --git a/net-dialup/ppp-scripts/Manifest b/net-dialup/ppp-scripts/Manifest
new file mode 100644
index 00000000000..5da09938930
--- /dev/null
+++ b/net-dialup/ppp-scripts/Manifest
@@ -0,0 +1 @@
+DIST ppp-scripts-0.tar.xz 1824 SHA256 41c9c8321ccc5a4b07079164528a83f9194c1640ac26cbf09894c493ab7394da SHA512 a36e6180b0acc8081b192602a2a5dbe765f1ba26e2cca8dc80d1dbc0e405b86acd6fe0cf655fb520c9f45373528773e64545876fd3370ce3514ffd9858916971 WHIRLPOOL 828b4488ccf996ef3c62bbae9d322fc185a26da16bf335da576e7092657b159c3248526669074aa9968577babda653e3716d0262a36585436b0d4bc9afae2cfa
diff --git a/net-dialup/ppp-scripts/metadata.xml b/net-dialup/ppp-scripts/metadata.xml
new file mode 100644
index 00000000000..a34223d15ce
--- /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>
+ <herd>net-dialup</herd>
+</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 00000000000..747d88f321c
--- /dev/null
+++ b/net-dialup/ppp-scripts/ppp-scripts-0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Common set of scripts for various PPP implementations"
+HOMEPAGE="http://gentoo.org/"
+SRC_URI="http://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 00000000000..ba16254d579
--- /dev/null
+++ b/net-dialup/ppp/Manifest
@@ -0,0 +1,10 @@
+DIST ppp-2.4.4-gentoo-20091116.tar.gz 54932 SHA256 52f174b3df36110d14c522869c507f64aef4d2d01db2dec2936cc9917c9fa716 SHA512 6669294cac124f78f197558f28872adaf08cb6ba3344093946c02d3581e70efea6992b30b0be726637a4122d8354bb1e25e73af71f1e7da8bdbf63db5aa0eeb6 WHIRLPOOL ff633a5e740f38bc665bec435613eb423de0f8370d119fc3cf36dee100cb02e5ec78eb88f2b530498bd49c76a792d97c76dd188b7ce02c8eb4efe85d9af67938
+DIST ppp-2.4.4.tar.gz 688763 SHA256 58af45fc07e5f326eea2408df770ea40e4626d1a15e7d564dd054d74880e91ea SHA512 70bde7121a0a2e150a7eec85731ca1055a2741da7886a8b8734c075637703d223bb579c3d14ad32a009488e07deaa62e7948e2d3e73077e6fb3db076841f7270 WHIRLPOOL 12aa49200253afd3958c7fc078ac7333080c6d0ca96c541e39e70b05d6b8c8e90fe98553d4cbef7804cf66c74b2798e1839b44db9e0cc0e6093d87b53bf24b6f
+DIST ppp-2.4.5-patches-3.tar.xz 37000 SHA256 9e251b0339f665054c24692396115b1f9afb7fdb8593242b1a5bc369dce642bf SHA512 e0d0d077050e97ea88d08fd15a7597393ff7842a1bf3129e2fd7eb182d4fc49a625635cf24fc1798efde2250d4c2ae013b3ae143ef245fe87f764fcf752e5c27 WHIRLPOOL 11e2d4529dd0ddfca11574bbc64459f553674b3b78f63e265dcb1247b611732ee1d6e2dc43e33d0e8371e1fcb7f9282930be1a05c147e2f141f7806dd32e4269
+DIST ppp-2.4.5.tar.gz 684342 SHA256 43317afec9299f9920b96f840414c977f0385410202d48e56d2fdb8230003505 SHA512 3688720a0f9ee47802e72dc6aa3d47c7312c195007f37a6ceb087fdb6f1f77ad75e922a568cffed6d1a857f06d79460d6d38b56e179310e493a0380a0c5a4f6e WHIRLPOOL 210dbcfc754256e5317cffa0b6f51e7ae9e45d88815e4952e893ab85d024daef8131747624e355b97225f0b365e677fa4bd82ee2a7890810bc25c5521324b83f
+DIST ppp-2.4.6-patches-4.tar.xz 36692 SHA256 63caf7687a6345d880eaf915e2ad814ff73d46b3fecfd56c75807e34c6d28cc4 SHA512 b3d0e7c296074a0317d818a46898116c927d504b8500567e7f8667ed209bfe63e59d260d2154fe18503abe1595ef23ddbf69f6f0b46910da4816b8aff11fb440 WHIRLPOOL 1ff47be7ebf76e1131adf90f294670307d90aea05902d2bef8d6f009ec4815b7f44cd904442725638bb7d54bc3c1054a1e21b262cd0d82fa0f2a0815cca7282b
+DIST ppp-2.4.6.tar.gz 687744 SHA256 1b33181a03962c8a092c055fb9980e9722728a8d98a4bb7ec7acda17c1b1b49d SHA512 65d6967ba43cd8b4d3f63f52ff69f6fed964f748fc780dff982629668213c2cd1891671f6f4a0c1c22118a382e282fabdd2328e60a120d9b984d3c17f9355cc6 WHIRLPOOL 1f83ca8383486d76779c28ba0b107887584b2991c7d6fd4e86d6fecb7988e0422ec1f7e35d092f410b462a97f006cc11121c1a7cc00f7e35d856dd3861cdd828
+DIST ppp-2.4.7-patches-1.tar.xz 38852 SHA256 442e619ab33afe4c8d9999295a221699917604dbc55171cdef6fb2094bf0aaf6 SHA512 105c68cbabcc860498bdb583598fc5838de5f523875ef3e7c35ce3c367d89072b0a52d97c2d500cd225407e2b6d806b45054c19ff1203dd1fad10515980d56da WHIRLPOOL d57aef8666b5189d4d9a69de3097eda41233dfdc07d87ac7a91d5e03bb070f372665d7c39912fc7196504ca079220efd5103cfecc3e5f97136d089e7c4f4e44d
+DIST ppp-2.4.7-patches-2.tar.xz 37484 SHA256 ca2a58bb2af2c2a728cfaefab31386239bda2e750765141f9aae65bde38d58f1 SHA512 91d91820a7171dbe93fc4d9235456dd6eaa821b79fd0d34691bd95ecfeec2f571ed69ef07fa5839c78132dbbcb0f6b347e2ac5f794a0a1385055c7bf9a4637b6 WHIRLPOOL 6ba77ffdcf51fd792439c56dd43bab51cb978db395c1a409019e549fb1481a33f0cd8b8b3aaed93dbecb3b5e4b6916e4ef5a5425a6509b05b874add936632173
+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
diff --git a/net-dialup/ppp/files/README.mpls b/net-dialup/ppp/files/README.mpls
new file mode 100644
index 00000000000..1ae7ae46057
--- /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 00000000000..e936041c6bb
--- /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 00000000000..a80d7e96c23
--- /dev/null
+++ b/net-dialup/ppp/metadata.xml
@@ -0,0 +1,30 @@
+<?xml version = '1.0' encoding = 'UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-dialup</herd>
+ <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="mppe-mppc">Enables support for MPPC (Microsoft Point-to-Point
+ Compression) - NEEDS A PATCHED KERNEL &lt;=2.6.14 (see
+ http://mppe-mppc.alphacron.de)</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.4-r25.ebuild b/net-dialup/ppp/ppp-2.4.4-r25.ebuild
new file mode 100644
index 00000000000..2fbef131730
--- /dev/null
+++ b/net-dialup/ppp/ppp-2.4.4-r25.ebuild
@@ -0,0 +1,311 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils multilib toolchain-funcs linux-info pam
+
+DESCRIPTION="Point-to-Point Protocol (PPP)"
+HOMEPAGE="http://www.samba.org/ppp"
+SRC_URI="ftp://ftp.samba.org/pub/ppp/${P}.tar.gz
+ mirror://gentoo/${P}-gentoo-20091116.tar.gz
+ dhcp? ( http://www.netservers.co.uk/gpl/ppp-dhcpc.tgz )"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="activefilter atm dhcp eap-tls gtk ipv6 mppe-mppc pam radius"
+
+DEPEND="activefilter? ( >=net-libs/libpcap-0.9.4 )
+ atm? ( net-dialup/linux-atm )
+ pam? ( virtual/pam )
+ gtk? ( >=x11-libs/gtk+-2.8:2 )
+ eap-tls? ( net-misc/curl >=dev-libs/openssl-0.9.7 )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ if use mppe-mppc; then
+ echo
+ ewarn "The mppe-mppc flag overwrites the pppd native MPPE support with MPPE-MPPC"
+ ewarn "patch developed by Jan Dubiec."
+ ewarn "The resulted pppd will work only with patched kernels with version <= 2.6.14."
+ ewarn "You could obtain the kernel patch from MPPE-MPPC homepage:"
+ ewarn " http://mppe-mppc.alphacron.de/"
+ ewarn "CAUTION: MPPC is a U.S. patented algorithm!"
+ ewarn "Ask yourself if you really need it and, if you do, consult your lawyer first."
+ ebeep
+ fi
+}
+
+src_prepare() {
+ epatch "${WORKDIR}/patch/make-vars.patch"
+ epatch "${WORKDIR}/patch/mpls.patch"
+ epatch "${WORKDIR}/patch/killaddr-smarter.patch"
+ epatch "${WORKDIR}/patch/wait-children.patch"
+ epatch "${WORKDIR}/patch/maxoctets-2Glimit.patch"
+ epatch "${WORKDIR}/patch/defaultgateway.patch"
+ epatch "${WORKDIR}/patch/mschapv2-initialize-response.patch"
+ epatch "${WORKDIR}/patch/linkpidfile.patch"
+ epatch "${WORKDIR}/patch/qa-fixes.patch"
+ epatch "${WORKDIR}/patch/kill-pg.patch"
+ epatch "${WORKDIR}/patch/auth-fail.patch"
+ epatch "${WORKDIR}/patch/defaultmetric.patch"
+ epatch "${WORKDIR}/patch/dev-ppp.patch"
+ epatch "${WORKDIR}/patch/gtk2.patch"
+ epatch "${WORKDIR}/patch/pppoe-lcp-timeout.patch"
+ epatch "${WORKDIR}/patch/passwordfd-read-early.patch"
+ epatch "${WORKDIR}/patch/pppd-usepeerwins.patch"
+ epatch "${WORKDIR}/patch/connect-errors.patch"
+ epatch "${WORKDIR}/patch/ppp-pppoe-mac.patch"
+
+ use eap-tls && {
+ # see http://eaptls.spe.net/index.html for more info
+ einfo "Enabling EAP-TLS support"
+ epatch "${WORKDIR}/patch/eaptls-0.7-gentoo.patch"
+ use mppe-mppc || epatch "${WORKDIR}/patch/eaptls-mppe-0.7.patch"
+ }
+
+ use mppe-mppc && {
+ einfo "Enabling MPPE-MPPC support"
+ epatch "${WORKDIR}/patch/mppe-mppc-1.1.patch"
+ use eap-tls && epatch "${WORKDIR}/patch/eaptls-mppe-0.7-with-mppc.patch"
+ }
+
+ use atm && {
+ einfo "Enabling PPPoATM support"
+ sed -i "s/^#HAVE_LIBATM=yes/HAVE_LIBATM=yes/" pppd/plugins/pppoatm/Makefile.linux
+ }
+
+ use activefilter || {
+ einfo "Disabling active filter"
+ sed -i "s/^FILTER=y/#FILTER=y/" pppd/Makefile.linux
+ }
+
+ use pam && {
+ einfo "Enabling PAM"
+ sed -i "s/^#USE_PAM=y/USE_PAM=y/" pppd/Makefile.linux
+ }
+
+ use ipv6 && {
+ einfo "Enabling IPv6"
+ sed -i "s/#HAVE_INET6/HAVE_INET6/" pppd/Makefile.linux
+ }
+
+ einfo "Enabling CBCP"
+ sed -i "s/^#CBCP=y/CBCP=y/" pppd/Makefile.linux
+
+ use dhcp && {
+ # copy the ppp-dhcp plugin files
+ einfo "Copying ppp-dhcp plugin files..."
+ tar -xzf "${DISTDIR}/ppp-dhcpc.tgz" -C pppd/plugins/ \
+ && sed -i -e 's/SUBDIRS := rp-pppoe/SUBDIRS := rp-pppoe dhcp/' pppd/plugins/Makefile.linux \
+ || die "ppp-dhcp plugin addition failed"
+ epatch "${WORKDIR}/patch/dhcp-make-vars.patch"
+ epatch "${WORKDIR}/patch/dhcp-sys_error_to_strerror.patch"
+ }
+
+ # Set correct libdir
+ sed -i -e "s:/lib/pppd:/$(get_libdir)/pppd:" \
+ pppd/{pathnames.h,pppd.8}
+
+ 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
+ #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/*
+ else
+ einfo "Disabling radius"
+ sed -i -e '/+= radius/s:^:#:' pppd/plugins/Makefile.linux
+ fi
+}
+
+src_configure() {
+ export CC="$(tc-getCC)"
+ export AR="$(tc-getAR)"
+ econf || die "econf failed"
+}
+
+src_compile() {
+ emake COPTS="${CFLAGS} -D_GNU_SOURCE" || die "compile failed"
+
+ #build pppgetpass
+ cd contrib/pppgetpass
+ if use gtk; then
+ emake -f Makefile.linux || die "failed to build pppgetpass"
+ else
+ emake pppgetpass.vt || die "failed to build pppgetpass"
+ fi
+}
+
+src_install() {
+ local i
+ for i in chat pppd pppdump pppstats ; do
+ doman ${i}/${i}.8
+ dosbin ${i}/${i} || die
+ done
+ fperms u+s-w /usr/sbin/pppd
+
+ # Install pppd header files
+ pushd pppd >/dev/null
+ emake INSTROOT="${D}" install-devel || die
+ popd >/dev/null
+
+ dosbin pppd/plugins/rp-pppoe/pppoe-discovery || die
+
+ 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
+
+ exeinto /etc/ppp
+ for i in ip-up ip-down ; do
+ doexe "${WORKDIR}/scripts/${i}" || die "failed to install ${i} script"
+ insinto /etc/ppp/${i}.d
+ use ipv6 && dosym ${i} /etc/ppp/${i/ip/ipv6}
+ doins "${WORKDIR}/scripts/${i}.d"/* || die "failed to install ${i}.d scripts"
+ done
+
+ pamd_mimic_system ppp auth account session
+
+ local PLUGINS_DIR=/usr/$(get_libdir)/pppd/$(awk -F '"' '/VERSION/ {print $2}' pppd/patchlevel.h)
+ #closing " for syntax coloring
+ insinto "${PLUGINS_DIR}"
+ insopts -m0755
+ doins pppd/plugins/minconn.so || die "minconn.so not build"
+ doins pppd/plugins/passprompt.so || die "passprompt.so not build"
+ doins pppd/plugins/passwordfd.so || die "passwordfd.so not build"
+ doins pppd/plugins/winbind.so || die "winbind.so not build"
+ doins pppd/plugins/rp-pppoe/rp-pppoe.so || die "rp-pppoe.so not build"
+ if use atm; then
+ doins pppd/plugins/pppoatm/pppoatm.so || die "pppoatm.so not build"
+ fi
+ if use dhcp; then
+ doins pppd/plugins/dhcp/dhcpc.so || die "dhcpc.so not build"
+ fi
+ if use radius; then
+ doins pppd/plugins/radius/radius.so || die "radius.so not build"
+ doins pppd/plugins/radius/radattr.so || die "radattr.so not build"
+ doins pppd/plugins/radius/radrealms.so || die "radrealms.so not build"
+
+ #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-radius.8
+ doman pppd/plugins/radius/pppd-radattr.8
+ fi
+
+ insinto /etc/modprobe.d
+ insopts -m0644
+ newins "${FILESDIR}/modules.ppp" ppp.conf
+ if use mppe-mppc; then
+ sed -i -e 's/ppp_mppe/ppp_mppe_mppc/' "${D}/etc/modprobe.d/ppp.conf"
+ fi
+
+ dodoc PLUGINS README* SETUP Changes-2.3 FAQ
+ dodoc "${FILESDIR}/README.mpls"
+
+ dosbin scripts/pon && \
+ dosbin scripts/poff && \
+ dosbin scripts/plog && \
+ doman scripts/pon.1 || die "failed to install pon&poff scripts"
+
+ # Adding misc. specialized scripts to doc dir
+ insinto /usr/share/doc/${PF}/scripts/chatchat
+ doins scripts/chatchat/* || die "failed to install chat scripts in doc dir"
+ insinto /usr/share/doc/${PF}/scripts
+ doins scripts/* || die "failed to install scripts in doc dir"
+
+ 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"
+ 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)"
+ if use mppe-mppc ; then
+ CONFIG_CHECK="${CONFIG_CHECK} ~PPP_MPPE_MPPC"
+ local WARNING_PPP_MPPE_MPPC="CONFIG_PPP_MPPE_MPPC:\t missing MPPE/MPPC encryption/compression (optional, mostly used by PPTP links)"
+ else
+ CONFIG_CHECK="${CONFIG_CHECK} ~PPP_MPPE"
+ local WARNING_PPP_MPPE="CONFIG_PPP_MPPE:\t missing MPPE encryption (optional, mostly used by PPTP links)"
+ fi
+ 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
+
+ if [ ! -e "${ROOT}/dev/.devfsd" ] && [ ! -e "${ROOT}/dev/.udev" ] && [ ! -e "${ROOT}/dev/ppp" ]; then
+ mknod "${ROOT}/dev/ppp" c 108 0
+ fi
+ if [ "$ROOT" = "/" ]; then
+ if [ -x /sbin/update-modules ]; then
+ /sbin/update-modules
+ else
+ /sbin/modules-update
+ fi
+ 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"
+
+ if use radius && [[ $previous_less_than_2_4_3_r5 = 0 ]] ; then
+ echo
+ ewarn "As of ${PN}-2.4.3-r5, the RADIUS configuration files have moved from"
+ ewarn " /etc/radiusclient to /etc/ppp/radius."
+ einfo "For your convenience, radiusclient directory was copied to the new location."
+ fi
+
+ 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."
+
+ # move the old user-defined files into ip-{up,down}.d directories
+ # TO BE REMOVED AFTER SEPT 2008
+ local i
+ for i in ip-up ip-down; do
+ if [ -f "${ROOT}"/etc/ppp/${i}.local ]; then
+ mv /etc/ppp/${i}.local /etc/ppp/${i}.d/90-local.sh && \
+ ewarn "/etc/ppp/${i}.local has been moved to /etc/ppp/${i}.d/90-local.sh"
+ fi
+ done
+}
diff --git a/net-dialup/ppp/ppp-2.4.5-r3.ebuild b/net-dialup/ppp/ppp-2.4.5-r3.ebuild
new file mode 100644
index 00000000000..1cf091c4257
--- /dev/null
+++ b/net-dialup/ppp/ppp-2.4.5-r3.ebuild
@@ -0,0 +1,223 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils multilib toolchain-funcs linux-info pam
+
+PATCH_VER="3"
+DESCRIPTION="Point-to-Point Protocol (PPP)"
+HOMEPAGE="http://www.samba.org/ppp"
+SRC_URI="ftp://ftp.samba.org/pub/ppp/${P}.tar.gz
+ http://dev.gentoo.org/~floppym/dist/${P}-patches-${PATCH_VER}.tar.xz
+ http://www.netservers.co.uk/gpl/ppp-dhcpc.tgz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="activefilter atm dhcp eap-tls gtk ipv6 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 dev-libs/openssl )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # Use the headers from the kernel #427684
+ rm include/linux/if_pppol2tp.h || die
+
+ 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}
+
+ 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
+ #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/*
+ else
+ einfo "Disabling radius"
+ sed -i -e '/+= radius/s:^:#:' pppd/plugins/Makefile.linux
+ fi
+}
+
+src_compile() {
+ tc-export AR CC
+ emake COPTS="${CFLAGS} -D_GNU_SOURCE"
+
+ # build pppgetpass
+ cd contrib/pppgetpass
+ 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
+
+ exeinto /etc/ppp
+ for i in ip-up ip-down ; do
+ doexe "${WORKDIR}/scripts/${i}"
+ insinto /etc/ppp/${i}.d
+ use ipv6 && dosym ${i} /etc/ppp/${i/ip/ipv6}
+ doins "${WORKDIR}/scripts/${i}.d"/*
+ done
+
+ pamd_mimic_system ppp auth account session
+
+ local PLUGINS_DIR=/usr/$(get_libdir)/pppd/$(awk -F '"' '/VERSION/ {print $2}' pppd/patchlevel.h)
+ # 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"
+
+ 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.6-r3.ebuild b/net-dialup/ppp/ppp-2.4.6-r3.ebuild
new file mode 100644
index 00000000000..d50963d485a
--- /dev/null
+++ b/net-dialup/ppp/ppp-2.4.6-r3.ebuild
@@ -0,0 +1,223 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+ http://dev.gentoo.org/~pinkbyte/distfiles/patches/${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 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="activefilter atm dhcp eap-tls gtk ipv6 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 dev-libs/openssl:0 )"
+RDEPEND="${DEPEND}"
+
+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
+}
+
+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
+
+ exeinto /etc/ppp
+ for i in ip-up ip-down ; do
+ doexe "${WORKDIR}/scripts/${i}"
+ insinto /etc/ppp/${i}.d
+ use ipv6 && dosym ${i} /etc/ppp/${i/ip/ipv6}
+ doins "${WORKDIR}/scripts/${i}.d"/*
+ done
+
+ 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-r1.ebuild b/net-dialup/ppp/ppp-2.4.7-r1.ebuild
new file mode 100644
index 00000000000..3c6acf66f02
--- /dev/null
+++ b/net-dialup/ppp/ppp-2.4.7-r1.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils linux-info multilib pam toolchain-funcs
+
+PATCH_VER="2"
+DESCRIPTION="Point-to-Point Protocol (PPP)"
+HOMEPAGE="http://www.samba.org/ppp"
+SRC_URI="ftp://ftp.samba.org/pub/ppp/${P}.tar.gz
+ http://dev.gentoo.org/~pinkbyte/distfiles/patches/${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 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 dev-libs/openssl:0 )"
+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
+}
+
+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.ebuild b/net-dialup/ppp/ppp-2.4.7.ebuild
new file mode 100644
index 00000000000..ebb3b85358e
--- /dev/null
+++ b/net-dialup/ppp/ppp-2.4.7.ebuild
@@ -0,0 +1,224 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils linux-info multilib pam toolchain-funcs
+
+PATCH_VER="1"
+DESCRIPTION="Point-to-Point Protocol (PPP)"
+HOMEPAGE="http://www.samba.org/ppp"
+SRC_URI="ftp://ftp.samba.org/pub/ppp/${P}.tar.gz
+ http://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 pam radius"
+
+DEPEND="!net-dialup/ppp-scripts
+ activefilter? ( net-libs/libpcap )
+ atm? ( net-dialup/linux-atm )
+ pam? ( virtual/pam )
+ gtk? ( x11-libs/gtk+:2 )
+ eap-tls? ( net-misc/curl dev-libs/openssl:0 )"
+RDEPEND="${DEPEND}"
+
+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
+}
+
+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
+
+ exeinto /etc/ppp
+ for i in ip-up ip-down ; do
+ doexe "${WORKDIR}/scripts/${i}"
+ insinto /etc/ppp/${i}.d
+ use ipv6 && dosym ${i} /etc/ppp/${i/ip/ipv6}
+ doins "${WORKDIR}/scripts/${i}.d"/*
+ done
+
+ 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 00000000000..bd1257f204b
--- /dev/null
+++ b/net-dialup/pppconfig/Manifest
@@ -0,0 +1,2 @@
+DIST pppconfig_2.3.17.tar.gz 377665 SHA256 8c9d6598c6f353d1bfbccc48be06f63d6c5111fa11e6734ce2120a085ca93585 SHA512 9761242fa255afeccf4caf9a31fc57e49c5b2db43a4c8a5e228de2d6bc48f6458acfdf4c77005445a44fb71dda33f12e388cbfed9fcd00e0fa6bf8f03fa8a523 WHIRLPOOL c7b50acdc7d645576fba4ef426cb1ef3ee33bd8b17e8756158f738da5e885826986b00b09d45af88f22fed4978db8141aeefb9f0a245d65f62c1c21ff333243b
+DIST pppconfig_2.3.21.tar.gz 397243 SHA256 cc8bd046aa8c9495b589ec87d5051a237ba89d0dcb7b1924a50a72dfac6f20f8 SHA512 e6297a6834eb806d591aee44343c6e64536e260ea8e637f3a4d4b5a752e26ae90d467ca12dd83022e071f7c2c4f111660418a6b953c4a02f5618fc54a89c2893 WHIRLPOOL d02d0c1da782ede453633086497d51cf8ae456601694e782337b39cc33efad88f57cf4dee7df15020a40144dbd9f2d384fb4801d2b182ddb131f93ecef3a0e19
diff --git a/net-dialup/pppconfig/files/pppconfig b/net-dialup/pppconfig/files/pppconfig
new file mode 100644
index 00000000000..606300f2026
--- /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 00000000000..1e11e7bbd01
--- /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>
+<herd>net-dialup</herd>
+</pkgmetadata>
diff --git a/net-dialup/pppconfig/pppconfig-2.3.17-r1.ebuild b/net-dialup/pppconfig/pppconfig-2.3.17-r1.ebuild
new file mode 100644
index 00000000000..7ff4345cbb6
--- /dev/null
+++ b/net-dialup/pppconfig/pppconfig-2.3.17-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="A text menu based utility for configuring ppp"
+HOMEPAGE="http://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 )"
+
+# Supported languages and translated documentation
+# Be sure all languages are prefixed with a single space!
+MY_AVAILABLE_LINGUAS=" ca cs da de el es eu fi fr gl he id it ja ko lt nb nl nn pt_BR pt ro ru sk sv tl tr vi zh_CN zh_TW"
+IUSE="${IUSE} ${MY_AVAILABLE_LINGUAS// / linguas_}"
+
+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
+ cd "${S}/po"
+ local MY_LINGUAS="" lang
+
+ for lang in ${MY_AVAILABLE_LINGUAS} ; do
+ if use linguas_${lang} ; then
+ MY_LINGUAS="${MY_LINGUAS} ${lang}"
+ fi
+ done
+ if [[ -z "${MY_LINGUAS}" ]] ; then
+ #If no language is selected, install 'em all
+ MY_LINGUAS="${MY_AVAILABLE_LINGUAS}"
+ fi
+
+ einfo "Locale messages will be installed for following languages:"
+ einfo " ${MY_LINGUAS}"
+
+ for lang in ${MY_LINGUAS}; do
+ msgfmt -o ${lang}.mo ${lang}.po && \
+ insinto /usr/share/locale/${lang}/LC_MESSAGES && \
+ newins ${lang}.mo pppconfig.mo || \
+ die "failed to install locale messages for ${lang} language"
+ done
+ fi
+}
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 00000000000..7815330f4d1
--- /dev/null
+++ b/net-dialup/pppconfig/pppconfig-2.3.21.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="A text menu based utility for configuring ppp"
+HOMEPAGE="http://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 00000000000..5d87072b55a
--- /dev/null
+++ b/net-dialup/pptpclient/Manifest
@@ -0,0 +1,3 @@
+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
diff --git a/net-dialup/pptpclient/files/pptp_fe.pl b/net-dialup/pptpclient/files/pptp_fe.pl
new file mode 100644
index 00000000000..01d291c9ade
--- /dev/null
+++ b/net-dialup/pptpclient/files/pptp_fe.pl
@@ -0,0 +1,370 @@
+#!/usr/bin/perl
+#
+# $Id$
+#
+# 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-ip-path.patch b/net-dialup/pptpclient/files/pptpclient-1.7.2-ip-path.patch
new file mode 100644
index 00000000000..0e5902113f4
--- /dev/null
+++ b/net-dialup/pptpclient/files/pptpclient-1.7.2-ip-path.patch
@@ -0,0 +1,29 @@
+diff -Nru pptp-1.7.2.orig/routing.c pptp-1.7.2/routing.c
+--- pptp-1.7.2.orig/routing.c 2008-05-14 08:33:55.000000000 +0200
++++ pptp-1.7.2/routing.c 2009-09-16 23:28:11.000000000 +0200
+@@ -55,7 +55,7 @@
+
+ void routing_init(char *ip) {
+ char buf[256];
+- snprintf(buf, 255, "/bin/ip route get %s", ip);
++ snprintf(buf, 255, "/sbin/ip route get %s", ip);
+ FILE *p = popen(buf, "r");
+ fgets(buf, 255, p);
+ /* TODO: check for failure of fgets */
+@@ -66,14 +66,14 @@
+
+ void routing_start() {
+ char buf[256];
+- snprintf(buf, 255, "/bin/ip route replace %s", route);
++ snprintf(buf, 255, "/sbin/ip route replace %s", route);
+ FILE *p = popen(buf, "r");
+ pclose(p);
+ }
+
+ void routing_end() {
+ char buf[256];
+- snprintf(buf, 255, "/bin/ip route delete %s", route);
++ snprintf(buf, 255, "/sbin/ip route delete %s", route);
+ FILE *p = popen(buf, "r");
+ pclose(p);
+ }
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 00000000000..b0051f81bde
--- /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 00000000000..92657476249
--- /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 00000000000..c43a93abc8c
--- /dev/null
+++ b/net-dialup/pptpclient/files/xpptp_fe.pl
@@ -0,0 +1,255 @@
+#!/usr/bin/perl -w
+#
+# $Id$
+#
+# 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 00000000000..65fb9b5c3f7
--- /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>
+ <herd>net-dialup</herd>
+ <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 00000000000..8634505757e
--- /dev/null
+++ b/net-dialup/pptpclient/pptpclient-1.7.2-r3.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils 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
+ http://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/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 00000000000..603c3dc8e0a
--- /dev/null
+++ b/net-dialup/pptpclient/pptpclient-1.8.0.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit 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
+ http://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/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/pptpd/Manifest b/net-dialup/pptpd/Manifest
new file mode 100644
index 00000000000..5a62976fcde
--- /dev/null
+++ b/net-dialup/pptpd/Manifest
@@ -0,0 +1 @@
+DIST pptpd-1.4.0.tar.gz 252167 SHA256 8fcd8b8a42de2af59e9fe8cbaa9f894045c977f4d038bbd6346a8522bb7f06c0 SHA512 cfb4caef3025c0721e7fabf8b7bf595739f2d3048555b30616cdadc37e70ba9e1c50561c25091dd617b5448da2816aeaf83aea0fc2ef6b0dd5e3fe35d9591484 WHIRLPOOL 8296818e05cb01339b83a68d149413fd5bd76b435cfa56c3e16a8136b531743468953279d44339fd0f8125fb25172a3ee9a10ec14bb9f801eb54133b665dab3b
diff --git a/net-dialup/pptpd/files/pptpd-1.4.0-gentoo.patch b/net-dialup/pptpd/files/pptpd-1.4.0-gentoo.patch
new file mode 100644
index 00000000000..9e7db7ea345
--- /dev/null
+++ b/net-dialup/pptpd/files/pptpd-1.4.0-gentoo.patch
@@ -0,0 +1,59 @@
+diff -Naur pptpd-1.3.4.orig/Makefile.am pptpd-1.3.4/Makefile.am
+--- pptpd-1.3.4.orig/Makefile.am 2007-04-16 04:53:53.000000000 +0400
++++ pptpd-1.3.4/Makefile.am 2007-05-01 21:29:15.000000000 +0400
+@@ -11,7 +11,7 @@
+ ## warning with -Wmissing-prototypes).
+ ## -Wmissing-prototypes removed (eg, Linux 2.2.6 headers
+ ## aren't up to it).
+-CFLAGS = -O2 -fno-builtin -Wall -DSBINDIR='"$(sbindir)"'
++CFLAGS += -fno-builtin -Wall -DSBINDIR='"$(sbindir)"'
+ #CFLAGS = -O2 -fno-builtin -Wall -ansi -DSBINDIR='"$(sbindir)"'
+ #CFLAGS = -O2 -fno-builtin -Wall -ansi -pedantic -Wmissing-prototypes -Werror -DSBINDIR='"$(sbindir)"'
+
+diff -Naur pptpd-1.3.4.orig/plugins/Makefile pptpd-1.3.4/plugins/Makefile
+--- pptpd-1.3.4.orig/plugins/Makefile 2006-08-03 06:02:01.000000000 +0400
++++ pptpd-1.3.4/plugins/Makefile 2007-05-01 21:29:15.000000000 +0400
+@@ -1,6 +1,5 @@
+-CC = gcc
++CC ?= gcc
+-COPTS = -O2 -g
+-CFLAGS = $(COPTS) -I.. -I../../include -fPIC
++CFLAGS += -I.. -I../../include -fPIC
+-LDFLAGS = -shared
++LDFLAGS += -shared
+ LDADD = -lutil
+ INSTALL = install -o root
+diff -Naur pptpd-1.3.4.orig/pptpgre.c pptpd-1.3.4/pptpgre.c
+--- pptpd-1.3.4.orig/pptpgre.c 2007-04-16 04:21:02.000000000 +0400
++++ pptpd-1.3.4/pptpgre.c 2007-05-01 21:29:50.000000000 +0400
+@@ -326,9 +326,11 @@
+ "GRE: timeout waiting for %d packets",
+ head->seq - gre.seq_recv - 1);
+ }
++#ifdef LOG_DEBUG_GRE_ACCEPTING_PACKET
+ if (pptpctrl_debug)
+ syslog(LOG_DEBUG, "GRE: accepting #%d from queue",
+ head->seq);
++#endif
+ gre.seq_recv = head->seq;
+ status = callback(cl, head->packet, head->packlen);
+ pqueue_del(head);
+diff -Naur pptpd-1.3.4.orig/pqueue.c pptpd-1.3.4/pqueue.c
+--- pptpd-1.3.4.orig/pqueue.c 2005-08-03 12:53:22.000000000 +0400
++++ pptpd-1.3.4/pqueue.c 2007-05-01 21:29:15.000000000 +0400
+@@ -7,13 +7,11 @@
+ #include "pqueue.h"
+
+ #ifdef DEBUG_PQUEUE
+-#define DEBUG_ON 1
++# define DEBUG_CMD(_a) { _a }
+ #else
+-#define DEBUG_ON 0
++# define DEBUG_CMD(_a)
+ #endif
+
+-#define DEBUG_CMD(_a) if (DEBUG_ON) { _a }
+-
+ #define MIN_CAPACITY 128 /* min allocated buffer for a packet */
+
+ static int pqueue_alloc (int seq, unsigned char *packet, int packlen, pqueue_t **new);
diff --git a/net-dialup/pptpd/files/pptpd-1.4.0-sandbox-fix.patch b/net-dialup/pptpd/files/pptpd-1.4.0-sandbox-fix.patch
new file mode 100644
index 00000000000..de91753f33f
--- /dev/null
+++ b/net-dialup/pptpd/files/pptpd-1.4.0-sandbox-fix.patch
@@ -0,0 +1,21 @@
+--- plugins/Makefile.orig 2013-05-15 14:36:33.994231829 +0400
++++ plugins/Makefile 2013-05-15 14:37:06.686234429 +0400
+@@ -17,14 +17,14 @@
+ %.so: %.c
+ $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ $(LDADD)
+
+-LIBDIR ?= $(DESTDIR)$(prefix)/lib/pptpd
++LIBDIR ?= $(prefix)/lib/pptpd
+
+ install: $(PLUGINS)
+- $(INSTALL) -d $(LIBDIR)
+- $(INSTALL) $? $(LIBDIR)
++ $(INSTALL) -d $(DESTDIR)$(LIBDIR)
++ $(INSTALL) $? $(DESTDIR)$(LIBDIR)
+
+ uninstall:
+- rm -f $(LIBDIR)$(PLUGINS)
++ rm -f $(DESTDIR)$(LIBDIR)$(PLUGINS)
+
+ clean:
+ rm -f *.o *.so *.a
diff --git a/net-dialup/pptpd/files/pptpd-confd b/net-dialup/pptpd/files/pptpd-confd
new file mode 100644
index 00000000000..1169e57f1c7
--- /dev/null
+++ b/net-dialup/pptpd/files/pptpd-confd
@@ -0,0 +1,5 @@
+# Config file for /etc/init.d/pptpd
+
+# Any extra options you want to pass to pptpd
+# on start-up should be put here.
+PPTPD_OPTS=""
diff --git a/net-dialup/pptpd/files/pptpd-init-r2 b/net-dialup/pptpd/files/pptpd-init-r2
new file mode 100644
index 00000000000..b1f8d293183
--- /dev/null
+++ b/net-dialup/pptpd/files/pptpd-init-r2
@@ -0,0 +1,19 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting pptpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/pptpd -- ${PPTPD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping pptpd"
+ start-stop-daemon --stop --quiet --pidfile /run/pptpd.pid
+ result=$?
+ killall -SIGTERM pptpctrl &>/dev/null
+ eend $result
+}
diff --git a/net-dialup/pptpd/metadata.xml b/net-dialup/pptpd/metadata.xml
new file mode 100644
index 00000000000..c068ca384f2
--- /dev/null
+++ b/net-dialup/pptpd/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-dialup</herd>
+ <use>
+ <flag name="gre-extreme-debug">Log all GRE accepted packages when in debug
+ mode (required if you want upstream support)</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">poptop</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/pptpd/pptpd-1.4.0.ebuild b/net-dialup/pptpd/pptpd-1.4.0.ebuild
new file mode 100644
index 00000000000..86da5937c32
--- /dev/null
+++ b/net-dialup/pptpd/pptpd-1.4.0.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="Linux Point-to-Point Tunnelling Protocol Server"
+HOMEPAGE="http://poptop.sourceforge.net/"
+SRC_URI="mirror://sourceforge/poptop/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc x86"
+IUSE="gre-extreme-debug tcpd"
+
+DEPEND="net-dialup/ppp:=
+ tcpd? ( sys-apps/tcp-wrappers )"
+RDEPEND="${DEPEND}"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-gentoo.patch"
+ epatch "${FILESDIR}/${P}-sandbox-fix.patch"
+
+ # Match pptpd-logwtmp.so's version with pppd's version (#89895)
+ local PPPD_VER=`best_version net-dialup/ppp`
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+ PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
+ sed -i -e "s:\\(#define[ \\t]*VERSION[ \\t]*\\)\".*\":\\1\"${PPPD_VER}\":" plugins/patchlevel.h || die
+
+ # Automake 1.13, compatibility, bug #469476
+ sed -i -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADER/' configure.in || die 'sed on configure.ac failed'
+
+ # remove 'missing' script to prevent warnings
+ rm missing || die 'remove missing script failed'
+
+ # respect compiler, bug #461722
+ tc-export CC
+
+ # Apply user patches
+ epatch_user
+
+ eautoreconf
+}
+
+src_configure() {
+ use gre-extreme-debug && append-cppflags "-DLOG_DEBUG_GRE_ACCEPTING_PACKET"
+ econf \
+ --enable-bcrelay \
+ $(use tcpd && echo "--with-libwrap")
+}
+
+src_compile() {
+ emake COPTS="${CFLAGS}"
+}
+
+src_install () {
+ default
+
+ insinto /etc
+ doins samples/pptpd.conf
+
+ insinto /etc/ppp
+ doins samples/options.pptpd
+
+ newinitd "${FILESDIR}/pptpd-init-r2" pptpd
+ newconfd "${FILESDIR}/pptpd-confd" pptpd
+
+ dodoc README.*
+ dodoc -r samples
+}
diff --git a/net-dialup/qtwvdialer/Manifest b/net-dialup/qtwvdialer/Manifest
new file mode 100644
index 00000000000..5f10d15f043
--- /dev/null
+++ b/net-dialup/qtwvdialer/Manifest
@@ -0,0 +1 @@
+DIST qtwvdialer-0.4.4_p20091228.tar.bz2 166522 SHA256 0549ff5353189728474e9843feb3797e0ba8bc662b268a1306b5ac46a4d36c25
diff --git a/net-dialup/qtwvdialer/metadata.xml b/net-dialup/qtwvdialer/metadata.xml
new file mode 100644
index 00000000000..9bd11a373d6
--- /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>
+ <herd>net-dialup</herd>
+ <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 00000000000..8554b844805
--- /dev/null
+++ b/net-dialup/qtwvdialer/qtwvdialer-0.4.4_p20091228.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils qt4-r2
+
+DESCRIPTION="Qt4 frontend for wvdial"
+HOMEPAGE="http://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 00000000000..624b5a8547b
--- /dev/null
+++ b/net-dialup/radiusclient-ng/Manifest
@@ -0,0 +1 @@
+DIST radiusclient-ng-0.5.6.tar.gz 383882 SHA256 282a9f1355f190efbb06c0d7c4e062eaa652caf342ed3ad361ac595f72f09f14 SHA512 3096519cb2029a216ac9a613c8c0721d9154b0b82c219f5528423bd1157333101137064cb2363e9cfd646a1719b06b1cec78eaf24fafb2f780fec41f40bcae88 WHIRLPOOL c50a0840a63081d1f1da86c523f57f0af6da9329553b7bd45f379e91d738b80dcccb07ffce1ce791c4ce4570610ca03ee022ee2ee5ada9a646f6c7eb697ff282
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 00000000000..ff11d841bce
--- /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 00000000000..fe3761bbc56
--- /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>
+ <herd>net-dialup</herd>
+ <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 00000000000..4bc9341573c
--- /dev/null
+++ b/net-dialup/radiusclient-ng/radiusclient-ng-0.5.6-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils eutils toolchain-funcs
+
+DESCRIPTION="RadiusClient NextGeneration - library for RADIUS clients accompanied with several client utilities"
+HOMEPAGE="http://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/radiusclient/Manifest b/net-dialup/radiusclient/Manifest
new file mode 100644
index 00000000000..bfb0913133a
--- /dev/null
+++ b/net-dialup/radiusclient/Manifest
@@ -0,0 +1 @@
+DIST radiusclient-0.3.2.tar.gz 147004 SHA256 ebf5efdd6efe385faba39f48b39ebc4ee6857ccf59adf5174a5865ac7c05b6fe SHA512 42a796eb099fdea3df3601fa23ead32b75434ff1c6fa4bd09a1af6ca3fb73cd3957537b22cede5d1b03c9189d230dda0612252466865c251829cea510642e7aa WHIRLPOOL 9c5e609232e8a89c3b0b30b98da4c83e4ac1845dd95eb5e5ab4234fe761c98192d69f79cb17989153d9adf9860610e313504a89c67ee38624bb5cfd9385d8299
diff --git a/net-dialup/radiusclient/files/pkgsysconfdir-install.patch b/net-dialup/radiusclient/files/pkgsysconfdir-install.patch
new file mode 100644
index 00000000000..3c9544a460e
--- /dev/null
+++ b/net-dialup/radiusclient/files/pkgsysconfdir-install.patch
@@ -0,0 +1,16 @@
+diff -Nru radiusclient-0.3.2.orig/etc/Makefile.am radiusclient-0.3.2/etc/Makefile.am
+--- radiusclient-0.3.2.orig/etc/Makefile.am 1998-06-28 03:08:16.000000000 +0300
++++ radiusclient-0.3.2/etc/Makefile.am 2004-11-21 09:49:57.556532216 +0200
+@@ -26,9 +26,9 @@
+ <$(srcdir)/radiusclient.conf.in >radiusclient.conf
+
+ install-data-local: servers
+- $(mkinstalldirs) $(pkgsysconfdir); \
+- echo " $(INSTALL) -m600 $(srcdir)/servers $(pkgsysconfdir)/servers"; \
+- $(INSTALL) -m600 $(srcdir)/servers $(pkgsysconfdir)/servers
++ $(mkinstalldirs) $(DESTDIR)$(pkgsysconfdir); \
++ echo " $(INSTALL) -m600 $(srcdir)/servers $(DESTDIR)$(pkgsysconfdir)/servers"; \
++ $(INSTALL) -m600 $(srcdir)/servers $(DESTDIR)$(pkgsysconfdir)/servers
+
+ uninstall-local:
+ rm -f $(pkgsysconfdir)/servers
diff --git a/net-dialup/radiusclient/files/radiusclient-0.3.2-64bit-compat.patch b/net-dialup/radiusclient/files/radiusclient-0.3.2-64bit-compat.patch
new file mode 100644
index 00000000000..49f6afc9624
--- /dev/null
+++ b/net-dialup/radiusclient/files/radiusclient-0.3.2-64bit-compat.patch
@@ -0,0 +1,19 @@
+Gentoo bug report - https://bugs.gentoo.org/show_bug.cgi?id=399433
+Patch from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=321229
+
+--- include/radiusclient.h.orig 2005-08-04 10:50:19.636354682 +0200
++++ include/radiusclient.h 2005-08-04 10:48:47.955569910 +0200
+@@ -38,8 +38,13 @@
+ # define __P(protos) ()
+ #endif
+
++#if !(defined(__x86_64__))
+ typedef unsigned long UINT4;
+ typedef long INT4;
++#else
++typedef unsigned int UINT4;
++typedef int INT4;
++#endif
+
+ #define AUTH_VECTOR_LEN 16
+ #define AUTH_PASS_LEN (3 * 16) /* multiple of 16 */
diff --git a/net-dialup/radiusclient/metadata.xml b/net-dialup/radiusclient/metadata.xml
new file mode 100644
index 00000000000..3f6ad1322e7
--- /dev/null
+++ b/net-dialup/radiusclient/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-dialup</herd>
+ <longdescription>A library for writing RADIUS clients accompanied with several client utilities</longdescription>
+ <upstream>
+ <remote-id type="freshmeat">radiusclient</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/radiusclient/radiusclient-0.3.2-r1.ebuild b/net-dialup/radiusclient/radiusclient-0.3.2-r1.ebuild
new file mode 100644
index 00000000000..669b90e70e6
--- /dev/null
+++ b/net-dialup/radiusclient/radiusclient-0.3.2-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils
+
+DESCRIPTION="A library for writing RADIUS clients accompanied with several client utilities"
+HOMEPAGE="http://freshmeat.net/projects/radiusclient/"
+SRC_URI="ftp://ftp.cityline.net/pub/radiusclient/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="static-libs"
+
+DEPEND="!net-dialup/radiusclient-ng
+ !net-dialup/freeradius-client"
+RDEPEND="${DEPEND}"
+
+DOCS=( BUGS CHANGES README )
+HTML_DOCS=( doc/instop.html )
+PATCHES=(
+ "${FILESDIR}/pkgsysconfdir-install.patch"
+ "${FILESDIR}/${P}-64bit-compat.patch" # bug #399433
+)
diff --git a/net-dialup/radiusclient/radiusclient-0.3.2.ebuild b/net-dialup/radiusclient/radiusclient-0.3.2.ebuild
new file mode 100644
index 00000000000..827557304a9
--- /dev/null
+++ b/net-dialup/radiusclient/radiusclient-0.3.2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils autotools
+
+DESCRIPTION="A library for writing RADIUS clients accompanied with several client utilities"
+HOMEPAGE="http://freshmeat.net/projects/radiusclient/"
+SRC_URI="ftp://ftp.cityline.net/pub/radiusclient/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND="!net-dialup/radiusclient-ng
+ !net-dialup/freeradius-client"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ epatch "${FILESDIR}/pkgsysconfdir-install.patch"
+ eautoreconf
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+ dodoc README BUGS CHANGES COPYRIGHT
+ dohtml doc/instop.html
+}
diff --git a/net-dialup/rp-l2tp/Manifest b/net-dialup/rp-l2tp/Manifest
new file mode 100644
index 00000000000..6a0c9c1e567
--- /dev/null
+++ b/net-dialup/rp-l2tp/Manifest
@@ -0,0 +1 @@
+DIST rp-l2tp-0.4.tar.gz 198869 SHA256 1b5bfbd130867e55018a4e64c720c09d821688c81e6e687858948837e137d555 SHA512 43a1ce8728323ed25f8b92c981731b21db8714f8d157343deb1da49f2c7b25e1833de5012238098ad9d1add7daec228a48f2cb8d6d0b60afbcc1c385ae79d3c9 WHIRLPOOL 1f3ef1841629f6f5a2d1bd199b8a86af69ee39998e424a6259798bd510700206d6a8ab4fe4f00349e9c0f825e9f48788bccdc100f21330dd80a1f2685c4b7286
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 00000000000..7bb534b6794
--- /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 00000000000..bf5d0cf82b3
--- /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 00000000000..1138b37b20e
--- /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 00000000000..a541255f590
--- /dev/null
+++ b/net-dialup/rp-l2tp/files/rp-l2tpd-init
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting 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 00000000000..72249d8a629
--- /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>
+ <herd>net-dialup</herd>
+ <upstream>
+ <remote-id type="sourceforge">rp-l2tp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/rp-l2tp/rp-l2tp-0.4-r3.ebuild b/net-dialup/rp-l2tp/rp-l2tp-0.4-r3.ebuild
new file mode 100644
index 00000000000..06058b99357
--- /dev/null
+++ b/net-dialup/rp-l2tp/rp-l2tp-0.4-r3.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="User-space implementation of L2TP for Linux and other UNIX systems"
+HOMEPAGE="http://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 00000000000..df03efafcfb
--- /dev/null
+++ b/net-dialup/rp-pppoe/Manifest
@@ -0,0 +1,4 @@
+DIST ppp-2.4.3.tar.gz 688092 SHA256 1e0fddb5f53613dd14ab10b25435e88092fed1eff09b4ac4448d5be01f3b0b11 SHA512 221f0925ec8bb73df740cd563a34f387ce8bf2417d2797e7f360563d8de6524e1cdf058c185eaefc9cb3703828d32c6f1b74595916683e08168ce792c5f8333e WHIRLPOOL c6a7538f107adca4f7fcdfccec5aef4ebba248958c05b94badcf0f1a2ebde667cf55f9adf3bd8eae8c0e6a37ed54c1f836117412d1135363bdfa279197981c6e
+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.8.tar.gz 212931 SHA256 d916e9cfe1e62395f63a5361936fa855f6d0f0a37dc7227b394cdb725f553479 SHA512 fd929978790645639800164ad1855862f2b2ec4597a2c4c76ea7691aafd7f6ab5797fc64034eefb574dcf6dd51c51eda91c461f70bf4f557d46fee656143effc WHIRLPOOL 048789a83cfcd50d95779c2eb5f31553500288138e70c6daa511e91edcf4010e17d9d106e8f1338741b1be7b5a9bf058a6bfafea0ff27665d2e53667d5bf3427
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 00000000000..265d15db093
--- /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 00000000000..f45557a0d6f
--- /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 00000000000..47e504bf783
--- /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 00000000000..0d447748a1b
--- /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 00000000000..bd19170a99c
--- /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
+
+http://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 00000000000..303ecfa9e4b
--- /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 00000000000..8ef99a4b7aa
--- /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 00000000000..9f03a0cf8b1
--- /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 00000000000..039abd48779
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.11-kmode.patch
@@ -0,0 +1,10 @@
+--- src/configure.in.old 2015-01-07 13:08:18.929959937 +0100
++++ src/configure.in 2015-01-07 13:08:38.253406302 +0100
+@@ -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.8-autoheader.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.8-autoheader.patch
new file mode 100644
index 00000000000..1c902600afc
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.8-autoheader.patch
@@ -0,0 +1,46 @@
+diff -Nru rp-pppoe-3.8.orig/src/configure.in rp-pppoe-3.8/src/configure.in
+--- rp-pppoe-3.8.orig/src/configure.in 2008-06-15 16:59:01.000000000 +0300
++++ rp-pppoe-3.8/src/configure.in 2008-06-15 17:12:02.000000000 +0300
+@@ -44,7 +44,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
+@@ -55,7 +55,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)
+@@ -100,13 +100,13 @@
+ 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
+
+ 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)
+@@ -248,7 +248,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 --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.8-configure.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.8-configure.patch
new file mode 100644
index 00000000000..054d419bb1a
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.8-configure.patch
@@ -0,0 +1,70 @@
+diff -Nru rp-pppoe-3.8.orig/gui/Makefile.in rp-pppoe-3.8/gui/Makefile.in
+--- rp-pppoe-3.8.orig/gui/Makefile.in 2006-09-23 18:05:31.000000000 +0300
++++ rp-pppoe-3.8/gui/Makefile.in 2006-09-23 18:16:02.623018000 +0300
+@@ -46,7 +46,7 @@
+ -mkdir -p $(RPM_INSTALL_ROOT)$(sbindir)
+ -mkdir -p $(RPM_INSTALL_ROOT)$(bindir)
+ -mkdir -p $(RPM_INSTALL_ROOT)/etc/ppp/rp-pppoe-gui
+- $(install) -m 4755 -s pppoe-wrapper $(RPM_INSTALL_ROOT)$(sbindir)
++ $(install) -m 4755 pppoe-wrapper $(RPM_INSTALL_ROOT)$(sbindir)
+ $(install) -m 755 tkpppoe $(RPM_INSTALL_ROOT)$(bindir)
+ -mkdir -p $(RPM_INSTALL_ROOT)$(mandir)/man1
+ $(install) -m 644 pppoe-wrapper.1 $(RPM_INSTALL_ROOT)$(mandir)/man1
+diff -Nru rp-pppoe-3.8.orig/src/configure.in rp-pppoe-3.8/src/configure.in
+--- rp-pppoe-3.8.orig/src/configure.in 2006-04-02 17:29:42.000000000 +0300
++++ rp-pppoe-3.8/src/configure.in 2007-01-05 00:12:48.000000000 +0200
+@@ -145,15 +145,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>
+@@ -180,7 +180,7 @@
+
+ dnl GCC warning level
+ if test "$GCC" = yes; then
+- CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -ansi"
++ CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -D_GNU_SOURCE"
+ fi
+
+ dnl If we couldn't find pppd, die
+diff -Nru rp-pppoe-3.8.orig/src/plugin.c rp-pppoe-3.8/src/plugin.c
+--- rp-pppoe-3.8.orig/src/plugin.c 2006-04-02 17:29:42.000000000 +0300
++++ rp-pppoe-3.8/src/plugin.c 2007-01-05 00:08:41.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.8.orig/src/relay.c rp-pppoe-3.8/src/relay.c
+--- rp-pppoe-3.8.orig/src/relay.c 2006-04-02 17:29:42.000000000 +0300
++++ rp-pppoe-3.8/src/relay.c 2007-01-05 00:08:46.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.8-gentoo-netscripts.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.8-gentoo-netscripts.patch
new file mode 100644
index 00000000000..c39e2014bd6
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.8-gentoo-netscripts.patch
@@ -0,0 +1,150 @@
+diff -Nru rp-pppoe-3.8.orig/configs/pppoe.conf rp-pppoe-3.8/configs/pppoe.conf
+--- rp-pppoe-3.8.orig/configs/pppoe.conf 2006-04-02 17:29:41.000000000 +0300
++++ rp-pppoe-3.8/configs/pppoe.conf 2006-04-21 10:04:20.369308000 +0300
+@@ -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.8.orig/scripts/pppoe-connect.in rp-pppoe-3.8/scripts/pppoe-connect.in
+--- rp-pppoe-3.8.orig/scripts/pppoe-connect.in 2006-04-02 17:29:42.000000000 +0300
++++ rp-pppoe-3.8/scripts/pppoe-connect.in 2006-04-21 10:04:20.369308000 +0300
+@@ -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.8.orig/scripts/pppoe-start.in rp-pppoe-3.8/scripts/pppoe-start.in
+--- rp-pppoe-3.8.orig/scripts/pppoe-start.in 2006-04-02 17:29:42.000000000 +0300
++++ rp-pppoe-3.8/scripts/pppoe-start.in 2006-04-21 10:04:20.369308000 +0300
+@@ -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.8.orig/scripts/pppoe-status rp-pppoe-3.8/scripts/pppoe-status
+--- rp-pppoe-3.8.orig/scripts/pppoe-status 2006-04-02 17:29:42.000000000 +0300
++++ rp-pppoe-3.8/scripts/pppoe-status 2006-04-21 10:04:20.369308000 +0300
+@@ -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.8.orig/scripts/pppoe-stop.in rp-pppoe-3.8/scripts/pppoe-stop.in
+--- rp-pppoe-3.8.orig/scripts/pppoe-stop.in 2006-04-02 17:29:42.000000000 +0300
++++ rp-pppoe-3.8/scripts/pppoe-stop.in 2006-04-21 10:04:20.369308000 +0300
+@@ -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.8-plugin-options.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.8-plugin-options.patch
new file mode 100644
index 00000000000..dec2276aa0d
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.8-plugin-options.patch
@@ -0,0 +1,33 @@
+diff -Nru rp-pppoe-3.8.orig/configs/pppoe.conf rp-pppoe-3.8/configs/pppoe.conf
+--- rp-pppoe-3.8.orig/configs/pppoe.conf 2006-04-02 17:29:41.000000000 +0300
++++ rp-pppoe-3.8/configs/pppoe.conf 2006-04-21 10:06:46.170420000 +0300
+@@ -115,7 +115,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 -Nru rp-pppoe-3.8.orig/scripts/pppoe-connect.in rp-pppoe-3.8/scripts/pppoe-connect.in
+--- rp-pppoe-3.8.orig/scripts/pppoe-connect.in 2006-04-02 17:29:42.000000000 +0300
++++ rp-pppoe-3.8/scripts/pppoe-connect.in 2006-04-21 10:06:58.951218750 +0300
+@@ -197,7 +197,7 @@
+
+ # 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
+@@ -295,7 +295,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.8-session-offset.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.8-session-offset.patch
new file mode 100644
index 00000000000..8f53a1af423
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.8-session-offset.patch
@@ -0,0 +1,21 @@
+diff -Nru rp-pppoe-3.8.orig/src/pppoe-server.c rp-pppoe-3.8/src/pppoe-server.c
+--- rp-pppoe-3.8.orig/src/pppoe-server.c 2006-04-02 17:29:42.000000000 +0300
++++ rp-pppoe-3.8/src/pppoe-server.c 2008-01-06 14:43:39.000000000 +0200
+@@ -1693,7 +1693,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;
+@@ -1776,7 +1776,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.8-username-charset.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.8-username-charset.patch
new file mode 100644
index 00000000000..b504e849cf3
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.8-username-charset.patch
@@ -0,0 +1,58 @@
+diff -Nru rp-pppoe-3.8.orig/scripts/pppoe-setup.in rp-pppoe-3.8/scripts/pppoe-setup.in
+--- rp-pppoe-3.8.orig/scripts/pppoe-setup.in 2006-04-02 17:29:42.000000000 +0300
++++ rp-pppoe-3.8/scripts/pppoe-setup.in 2006-04-21 10:09:08.411309500 +0300
+@@ -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/metadata.xml b/net-dialup/rp-pppoe/metadata.xml
new file mode 100644
index 00000000000..1e11e7bbd01
--- /dev/null
+++ b/net-dialup/rp-pppoe/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-dialup</herd>
+</pkgmetadata>
diff --git a/net-dialup/rp-pppoe/rp-pppoe-3.11-r2.ebuild b/net-dialup/rp-pppoe/rp-pppoe-3.11-r2.ebuild
new file mode 100644
index 00000000000..8e8b122dd67
--- /dev/null
+++ b/net-dialup/rp-pppoe/rp-pppoe-3.11-r2.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic autotools
+
+PPP_P="ppp-2.4.7"
+
+DESCRIPTION="A user-mode PPPoE client and server suite for Linux"
+HOMEPAGE="http://www.roaringpenguin.com/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 ~hppa ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
+IUSE="X"
+
+RDEPEND="net-dialup/ppp
+ X? ( dev-lang/tk )"
+# see bug #230491
+DEPEND="|| ( <sys-kernel/linux-headers-2.6.24 >=sys-kernel/linux-headers-2.6.25 )
+ ${RDEPEND}"
+
+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"
+
+ cd "${S}"/src || die
+ eautoreconf
+}
+
+src_configure() {
+ addpredict /dev/ppp
+
+ cd "${S}/src" || die
+ econf --enable-plugin=../../${PPP_P}
+}
+
+src_compile() {
+ cd "${S}/src" || die
+ emake
+
+ if use X; then
+ make -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 X; then
+ emake -C "${S}/gui" \
+ DESTDIR="${D}" \
+ datadir=/usr/share/doc/${PF}/ \
+ install
+ dosym /usr/share/doc/${PF}/tkpppoe /usr/share/tkpppoe
+ fi
+}
+
+pkg_preinst() {
+ # Use the rp-pppoe plugin that comes with net-dialup/pppd
+ local PPPD_VER=$(best_version net-dialup/ppp)
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+ PPPD_VER=${PPPD_VER%%-*} #reduce it to ${PV}
+ 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
+}
+
+pkg_postinst() {
+ elog "Use pppoe-setup to configure your dialup connection."
+}
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 00000000000..d86143f91be
--- /dev/null
+++ b/net-dialup/rp-pppoe/rp-pppoe-3.11-r3.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic autotools readme.gentoo
+
+PPP_P="ppp-2.4.7"
+
+DESCRIPTION="A user-mode PPPoE client and server suite for Linux"
+HOMEPAGE="http://www.roaringpenguin.com/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.8-r2.ebuild b/net-dialup/rp-pppoe/rp-pppoe-3.8-r2.ebuild
new file mode 100644
index 00000000000..75b928e8271
--- /dev/null
+++ b/net-dialup/rp-pppoe/rp-pppoe-3.8-r2.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils flag-o-matic autotools
+
+DESCRIPTION="A user-mode PPPoE client and server suite for Linux"
+HOMEPAGE="http://www.roaringpenguin.com/pppoe/"
+SRC_URI="http://www.roaringpenguin.com/penguin/pppoe/${P}.tar.gz
+ ftp://ftp.samba.org/pub/ppp/ppp-2.4.3.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ~mips ppc ppc64 sh sparc x86"
+IUSE="X"
+
+RDEPEND="net-dialup/ppp
+ X? ( dev-lang/tk )"
+# see bug #230491
+DEPEND="|| ( <sys-kernel/linux-headers-2.6.24 >=sys-kernel/linux-headers-2.6.25 )
+ ${RDEPEND}"
+
+src_unpack() {
+ unpack ${A} || die "failed to unpack"
+
+ # 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}/${P}-gentoo-netscripts.patch"
+
+ epatch "${FILESDIR}/${P}-username-charset.patch" # bug 82410
+ epatch "${FILESDIR}/${P}-plugin-options.patch"
+ epatch "${FILESDIR}/${P}-configure.patch"
+ epatch "${FILESDIR}/${P}-autoheader.patch"
+ epatch "${FILESDIR}/${P}-session-offset.patch" # bug 204476
+
+ cd "${S}"/src
+ eautoreconf
+}
+
+src_compile() {
+ addpredict /dev/ppp
+
+ cd "${S}/src"
+ econf --enable-plugin=../../ppp-2.4.3 || die "econf failed"
+ emake || die "emake failed"
+
+ if use X; then
+ make -C "${S}/gui" || die "gui make failed"
+ fi
+}
+
+src_install () {
+ cd "${S}/src"
+ make RPM_INSTALL_ROOT="${D}" docdir=/usr/share/doc/${PF} install \
+ || die "install failed"
+
+ #Don't use compiled rp-pppoe plugin - see pkg_preinst below
+ rm "${D}/etc/ppp/plugins/rp-pppoe.so"
+
+ prepalldocs
+
+ if use X; then
+ make -C "${S}/gui" install RPM_INSTALL_ROOT="${D}" \
+ datadir=/usr/share/doc/${PF}/ || die "gui install failed"
+ dosym /usr/share/doc/${PF}/tkpppoe /usr/share/tkpppoe
+ fi
+}
+
+pkg_preinst() {
+ # Use the rp-pppoe plugin that comes with net-dialup/pppd
+ local PPPD_VER=`best_version net-dialup/ppp`
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+ PPPD_VER=${PPPD_VER%%-*} #reduce it to ${PV}
+ 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
+}
+
+pkg_postinst() {
+ elog "Use pppoe-setup to configure your dialup connection."
+}
diff --git a/net-dialup/sendpage/Manifest b/net-dialup/sendpage/Manifest
new file mode 100644
index 00000000000..33a5fed0684
--- /dev/null
+++ b/net-dialup/sendpage/Manifest
@@ -0,0 +1 @@
+DIST sendpage-1.001.tar.gz 127130 SHA256 2f2d8253b3f94fd3915ae7568a87e1263c416066f2cce7923b6dd3d2d5dc2b0c SHA512 694f7eb8afd3a73d1322d51140b5eb473a3d697613a88d1b90fb0368e9eb25ec4cee8ed018841076fcd8370420d6c9f437f84af873b31cccb36c16f91a01cb3d WHIRLPOOL 8a3426a251eadad5d28c2ca2538d26af8476ea3b5dd497681a5e469f798a8d901aa9d0d2a422766fed485c366b16d46fed431cc60423e4b67c60bca130a1f0a4
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 00000000000..5b9a647db11
--- /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 00000000000..2fcf217a3df
--- /dev/null
+++ b/net-dialup/sendpage/files/sendpage.initd
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..f444241a55d
--- /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>
+ <herd>net-dialup</herd>
+ <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-r2.ebuild b/net-dialup/sendpage/sendpage-1.1.0-r2.ebuild
new file mode 100644
index 00000000000..4c18f6e8d31
--- /dev/null
+++ b/net-dialup/sendpage/sendpage-1.1.0-r2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit 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 00000000000..5d8b12526ed
--- /dev/null
+++ b/net-dialup/sercd/Manifest
@@ -0,0 +1 @@
+DIST sercd-3.0.0.tar.gz 116284 SHA256 5aa9c93ae436eac206a4d93867e12838dc16ad30192cea451f985421688e4207
diff --git a/net-dialup/sercd/files/sercd.confd b/net-dialup/sercd/files/sercd.confd
new file mode 100644
index 00000000000..4c6e078489c
--- /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 00000000000..c36ac1f81cf
--- /dev/null
+++ b/net-dialup/sercd/files/sercd.initd
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..8b95a3d0822
--- /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 00000000000..7a12fc3fa39
--- /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>
+ <herd>net-dialup</herd>
+ <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-r1.ebuild b/net-dialup/sercd/sercd-3.0.0-r1.ebuild
new file mode 100644
index 00000000000..ba2204b78b8
--- /dev/null
+++ b/net-dialup/sercd/sercd-3.0.0-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="RFC2217-compliant serial port redirector"
+HOMEPAGE="http://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() {
+ epatch_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 00000000000..b17a45eadfd
--- /dev/null
+++ b/net-dialup/speedtouch-usb/Manifest
@@ -0,0 +1 @@
+DIST SpeedTouch330_firmware_3012.zip 769125 SHA256 1f4ef294f9ac52fc01781f0bba15ab1e686f692dac11ecdcbfedfbf580b19afc
diff --git a/net-dialup/speedtouch-usb/files/README b/net-dialup/speedtouch-usb/files/README
new file mode 100644
index 00000000000..77fed14ab52
--- /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: http://packages.gentoo.org/search/?sstring=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 00000000000..ad910508489
--- /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>
+<herd>net-dialup</herd>
+<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 00000000000..01fe498767d
--- /dev/null
+++ b/net-dialup/speedtouch-usb/speedtouch-usb-3.0.1.2-r3.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils linux-info
+
+DESCRIPTION="Firmware, kernel driver 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"
+IUSE=""
+
+RDEPEND="net-dialup/ppp"
+DEPEND="app-arch/unzip"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ linux-info_pkg_setup
+
+ if kernel_is lt 2 6 10 ; then
+ eerror "The kernel-space driver exists only in kernels >= 2.6.10."
+ eerror "Please upgrade the kernel."
+ die "Unsupported kernel version"
+ fi
+}
+
+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} || die "doins firmware failed"
+
+ # Symlinks for other revisions of the modem
+ cd "${D}/lib/firmware"
+ 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
+
+ # Documentation necessary to complete the setup
+ dodoc "${FILESDIR}/README" || die "dodoc failed"
+}
+
+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 ! built_with_use 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-2.5.0 ; 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 00000000000..46886e0a158
--- /dev/null
+++ b/net-dialup/tkvoice/Manifest
@@ -0,0 +1 @@
+DIST tkvoice-1.5.tar.gz 153967 SHA256 ab4cf6f098186fe6efe013f28262c8dcaff187224512c0cbd5668225c953ff25 SHA512 d9b2ead55131ef37a4d2e9d4d3065bb7945bbef7ffc38a336765c0d81cdfba44d6453b92277832ef0c2af4f5b9aff4eb27cfcedf119a74683d1d2a0d2fc8ca0c WHIRLPOOL 27f8ac07e34988d1aa7d29f384262529e7d03ba94cadceffe9f03ebd4404df948eab7464de4516c695dda9d7465c0396ee7dbbd52fcd146b68363f3eb04cb8e5
diff --git a/net-dialup/tkvoice/files/tkvoice.desktop b/net-dialup/tkvoice/files/tkvoice.desktop
new file mode 100644
index 00000000000..389305340e0
--- /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 00000000000..30ff1aec809
--- /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>
+ <herd>net-dialup</herd>
+ <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 00000000000..bc380c4f1ea
--- /dev/null
+++ b/net-dialup/tkvoice/tkvoice-1.5.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+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 00000000000..78b285ee48a
--- /dev/null
+++ b/net-dialup/ueagle-atm/Manifest
@@ -0,0 +1 @@
+DIST ueagle-data-src-1.1.tar.gz 1270515 RMD160 fc16fd4fa9151351b192c724c92d3d3491bcb8e7 SHA1 9995b4892e1ea91f299282b3f986f9dcb925afad SHA256 45b944e5b141591b9a7e64b7e1e704b8507a73f9314dee2f572e4a845f6096c2
diff --git a/net-dialup/ueagle-atm/files/README b/net-dialup/ueagle-atm/files/README
new file mode 100644
index 00000000000..ef07b71dadc
--- /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 00000000000..a8d7ab325f2
--- /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>
+ <herd>net-dialup</herd>
+ <longdescription>Firmware and configuration instructions for ADI 930/Eagle USB ADSL Modem driver
+available in kernels >= 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 00000000000..f7f70c003fb
--- /dev/null
+++ b/net-dialup/ueagle-atm/ueagle-atm-1.1-r3.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+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"
+IUSE=""
+
+DEPEND=""
+RDEPEND="net-dialup/ppp
+ !sys-kernel/linux-firmware"
+
+S="${WORKDIR}/ueagle-data-src-${PV}"
+
+pkg_setup() {
+ linux-info_pkg_setup
+
+ if kernel_is lt 2 6 16 ; then
+ eerror "The kernel-space driver exists only in kernels >= 2.6.16."
+ eerror "Please emerge net-dialup/eagle-usb instead or upgrade the kernel."
+ die "Unsupported kernel version"
+ fi
+
+ if ! has_version '>=sys-apps/baselayout-1.12.0' ; then
+ ewarn "The best way of using this driver is through the PPP net module of the"
+ ewarn " >=sys-apps/baselayout-1.12.0"
+ ewarn "which is also the only documented mode of using ${PN} driver."
+ ewarn "Please install baselayout-1.12.0 or else you will be on your own!"
+ fi
+}
+
+src_compile() {
+ emake generate
+}
+
+src_install() {
+ # Copy to the firmware directory
+ insinto /lib/firmware/ueagle-atm
+ doins build/* || die "doins firmware failed"
+
+ # Documentation necessary to complete the setup
+ dodoc "${FILESDIR}/README" || die "dodoc failed"
+}
+
+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 ! built_with_use 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-2.5.0 ; 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 00000000000..6e2d76104b6
--- /dev/null
+++ b/net-dialup/ueagle4-atm/Manifest
@@ -0,0 +1 @@
+DIST ueagle4-data-1.0.tar.gz 217512 RMD160 9eb8783e1dfe87ef5c55165c531046a026db8d99 SHA1 d05581c95a54aa66cc214a7e4bee0eea1b8fd691 SHA256 1e3547821d69b9f576add1e35223df159aadfd9e3dae913b6429a1cbbe1a3691
diff --git a/net-dialup/ueagle4-atm/files/README b/net-dialup/ueagle4-atm/files/README
new file mode 100644
index 00000000000..20067824f30
--- /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 00000000000..ba54a509f95
--- /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>
+ <herd>net-dialup</herd>
+ <longdescription>Firmware and configuration instructions for Eagle USB E4 ADSL Modem driver
+available in kernels >= 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 00000000000..98218469ee7
--- /dev/null
+++ b/net-dialup/ueagle4-atm/ueagle4-atm-1.0.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+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"
+IUSE=""
+
+DEPEND=""
+RDEPEND="net-dialup/ppp
+ !sys-kernel/linux-firmware"
+
+S="${WORKDIR}/ueagle4-data-${PV}"
+
+pkg_setup() {
+ linux-info_pkg_setup
+
+ if kernel_is lt 2 6 16 ; then
+ eerror "The kernel-space driver exists only in kernels >= 2.6.16."
+ eerror "Please emerge net-dialup/eagle-usb instead or upgrade the kernel."
+ die "Unsupported kernel version"
+ fi
+
+ if ! has_version '>=sys-apps/baselayout-1.12.0' ; then
+ ewarn "The best way of using this driver is through the PPP net module of the"
+ ewarn " >=sys-apps/baselayout-1.12.0"
+ ewarn "which is also the only documented mode of using ${PN} driver."
+ ewarn "Please install baselayout-1.12.0 or else you will be on your own!"
+ fi
+}
+
+src_install() {
+ # Copy to the firmware directory
+ insinto /lib/firmware/ueagle-atm
+ doins * || die "doins firmware failed"
+
+ # Documentation necessary to complete the setup
+ dodoc "${FILESDIR}/README" || die "dodoc failed"
+}
+
+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 ! built_with_use 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-2.5.0 ; 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 00000000000..011d21c3df1
--- /dev/null
+++ b/net-dialup/wvdial/Manifest
@@ -0,0 +1 @@
+DIST wvdial-1.61.tar.gz 94854 RMD160 ac16a09f9f039bb79a7c05f4f910cbcd1f316cd6 SHA1 2878cae3aaf067989eebc7313ccd2cec59893345 SHA256 4fffab9652c760199c074533d1d3929bea55ab4233b11e735b0f1856d1ceec57
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 00000000000..06c3ddd58a8
--- /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 00000000000..61f8cf74264
--- /dev/null
+++ b/net-dialup/wvdial/files/wvdial-1.61-destdir.patch
@@ -0,0 +1,35 @@
+=== modified file 'Makefile.in'
+--- Makefile.in 2010-05-27 13:08:26 +0000
++++ 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'
+--- config.defaults.mk 2010-05-27 13:08:26 +0000
++++ 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 00000000000..4c0c83709dd
--- /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 00000000000..ed5cc4c7268
--- /dev/null
+++ b/net-dialup/wvdial/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-dialup</herd>
+ <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 00000000000..e1c34def09c
--- /dev/null
+++ b/net-dialup/wvdial/wvdial-1.61.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils
+
+DESCRIPTION="Excellent program to automatically configure PPP sessions"
+HOMEPAGE="http://alumnit.ca/wiki/?WvDial"
+SRC_URI="http://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"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-destdir.patch"
+ epatch "${FILESDIR}/${P}-as-needed.patch"
+ epatch "${FILESDIR}/${P}-parallel-make.patch"
+}
+
+src_configure() {
+ # Hand made configure...
+ ./configure || die
+}
+
+src_install() {
+ emake "DESTDIR=${ED}" install || die "make install failed"
+ dodoc CHANGES FAQ MENUS README TODO || die
+}
+
+pkg_postinst() {
+ elog
+ elog "Use wvdialconf to automagically generate a configuration file."
+ elog
+ elog "Users have to be member of the dialout AND the uucp group"
+ elog "to use wvdial!"
+ elog
+}
diff --git a/net-dialup/xc/Manifest b/net-dialup/xc/Manifest
new file mode 100644
index 00000000000..ed67e15da47
--- /dev/null
+++ b/net-dialup/xc/Manifest
@@ -0,0 +1 @@
+DIST xc-4.3.2.tar.gz 162098 SHA256 7e90ff0b89b646e1c8625fc675e6b33d244ab332a052ddd2daed825719e59461 SHA512 89de05a82f54ffd89a6950f9cb4aea732573ac1b15a27aaba4e25293a5d0b763052287700e4499f7f2adf9acc952ecea572239c8403c86c5871efd363d68710a WHIRLPOOL 98a62921c553d7507cdc052d01f50a99d62c8221149ad7a09a25faf6af4d139ee4f0a74433a0f4f8c053c29aafc5f70294551efa13830aa20516a9d40af028b4
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 00000000000..c8238565ac0
--- /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 00000000000..5934aa2f6d7
--- /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 00000000000..7c0c559958d
--- /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 00000000000..556392d8b18
--- /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 00000000000..946425b89ea
--- /dev/null
+++ b/net-dialup/xc/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-dialup</herd>
+
+</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 00000000000..4bd01b85a68
--- /dev/null
+++ b/net-dialup/xc/xc-4.3.2-r3.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..ea3c9accb43
--- /dev/null
+++ b/net-dialup/xc/xc-4.3.2-r4.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit 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 00000000000..fd7f44773ff
--- /dev/null
+++ b/net-dialup/xl2tpd/Manifest
@@ -0,0 +1,2 @@
+DIST xl2tpd-1.3.1.tar.gz 551923 SHA256 147ea96a957628bc31bba6fd5f5ef5522366691f936ce4c0a0988d9876e3ba14 SHA512 2265a19eda1521fd4314ad1b28cc1bb781d2f0edb06ad619afbb364f5896e23db7e444ac10709c1ae9b9ac648e4354aea7af57bb5bc20b706b00e2a131fc29d6 WHIRLPOOL b5465605ae5c3bbf73227f11958a43c66191bb557447ce224de044358e738331cf8e64e783bb5527517683cbcc59d57df9cc17c990f652fe7aed1ab2cfd7f9b2
+DIST xl2tpd-1.3.6.tar.gz 553981 SHA256 49b069aa8d873e1d8f615ccc4212351e427bf681ba453fdd211256a8345bb7fb SHA512 868c65660e6a45fb8dc22b95542e9d6ca0dc8e5033cc9df04171a651ef273bc5d711a85f61d4a971d714089f7a10ee67460d8ab9f3c007fcffe0e11e81ae0bfd WHIRLPOOL 92bf661e0ae95bcf80cb8b8c5c9c8648d3aa5375a9dc598f0f4fa3be3bce2bc9a36a60eabf44da3dad24fb3f2b03e30b960d73e6a16c51c8ea25397639766328
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 00000000000..8203e51ebc1
--- /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 00000000000..b069a9a4822
--- /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 00000000000..5ce9b1244c7
--- /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 00000000000..681d9a6f94c
--- /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 00000000000..b27703fe435
--- /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 00000000000..f8b5a1a26bd
--- /dev/null
+++ b/net-dialup/xl2tpd/files/xl2tpd-init
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..4e381e79591
--- /dev/null
+++ b/net-dialup/xl2tpd/files/xl2tpd-init-r1
@@ -0,0 +1,12 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+command="/usr/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 00000000000..67162b26df0
--- /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 00000000000..37d46cc6349
--- /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 00000000000..0c7e5f5bfb4
--- /dev/null
+++ b/net-dialup/xl2tpd/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-dialup</herd>
+ <maintainer>
+ <email>floppym@gentoo.org</email>
+ <name>Mike Gilbert</name>
+ </maintainer>
+ <longdescription>The Layer 2 Tunneling Protocol (L2TP) daemon mantained by Xelerance Corporation.</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 00000000000..d65acad3457
--- /dev/null
+++ b/net-dialup/xl2tpd/xl2tpd-1.3.1-r2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..71c44661929
--- /dev/null
+++ b/net-dialup/xl2tpd/xl2tpd-1.3.1-r3.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 00000000000..a769eee35ad
--- /dev/null
+++ b/net-dialup/xl2tpd/xl2tpd-1.3.1-r4.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit 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.6.ebuild b/net-dialup/xl2tpd/xl2tpd-1.3.6.ebuild
new file mode 100644
index 00000000000..c245ef30ba9
--- /dev/null
+++ b/net-dialup/xl2tpd/xl2tpd-1.3.6.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils 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 ~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
+}