diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-dialup/rp-pppoe |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-dialup/rp-pppoe')
15 files changed, 782 insertions, 0 deletions
diff --git a/net-dialup/rp-pppoe/Manifest b/net-dialup/rp-pppoe/Manifest new file mode 100644 index 000000000000..6392cf882aec --- /dev/null +++ b/net-dialup/rp-pppoe/Manifest @@ -0,0 +1,19 @@ +AUX rp-pppoe-3.10-autotools.patch 4038 SHA256 aa9bc0e6c529e59c00cc35b66f3db57ab02f015810da4e21b5b0a05efafe833d SHA512 a6269e86c8b4d693fc8b0f501103bd3308394040d35ea9a163ce4f89b9a4a571178b0f52e693ab2189648309f136760d15d9247f4f17305582376507e26ea393 WHIRLPOOL 3a25ca4c234c166685c34be44228d1ac0b4907ca985fbf6e6680e7c324395db8d9be3498f9ee1920f7af471b278bce7a2df4a5774b7bcb375ba1035d9ee97c9e +AUX rp-pppoe-3.10-gentoo-netscripts.patch 5238 SHA256 c9c4997c3db1d0d350d285f371575b12cb15f15dfeac920b2fe573bff85754dc SHA512 b479de56886e30c40cf707ed9edcef5ff3bc08448d8084c7f96b26fc20594ed2a5a61a9706d992fb1ddab5f7d6b4d68ce90b9a1dee606bf9b02843322eaa451f WHIRLPOOL 766283107d9ac2c2f3fbb3c03e28fca60802da4b694d0aa9c11ad4b29a4316d3e9f4ecaa664a4fd2fd2c2812812ec6a32e30291f965c8edf47c1fb184b7d347d +AUX rp-pppoe-3.10-linux-headers.patch 823 SHA256 39c854283b6a3d4ef382fb8aa1339b6a64be42c0922fa48ecc9b0c19e2a103e6 SHA512 f4cdbeb16af670c3674cf965c3fb43bed1e7716e6ff737b2592a8aa33453adc9dfff0466805bb8c84b6395adaa4c47e2b145cb073c0fb109456c27fd35bf0a96 WHIRLPOOL d6121e14c8b7ff029c9d41977bdcd7e7580381f4710f5b9cf8fc1c17a198580eb7127f13412ab1837a9e60baa674269ff6e947f600e1f079f4ed5601131d5e1a +AUX rp-pppoe-3.10-plugin-options.patch 1491 SHA256 dc3fe5aa64c1880a701940e5636964eb90a3afec8ddf739aa4046fdf771d0374 SHA512 d25e64e6fa167271a425d0414254b9ba21e33eaaf2623027c586527a7c3be176be0166f9a1dd50885dfbef2e0cc57c9a228e74c736bcfe684add91c9cfb56792 WHIRLPOOL 4b07d32fd062cab31a744aa2c5cf297a82db0b154d2f0fc2ab9ab2825eb311eeeff1b9d78f5fdce17a43ea18c2aa7bf513d50e4925b59c05ce7b2fd66bda17b4 +AUX rp-pppoe-3.10-posix-source-sigaction.patch 513 SHA256 77d96c8a032e51d78649b55bcffe9dc0a146259fb82e37801623d801824bdd2f SHA512 52164a8194dbe160df3c16028ba3720cf801b94ab0d14e471b1fbff6db91e1e88be25fff3ece7571b49cc0befcbbe9aad2cd72da9d63cfcf16a9c365dc78d4ba WHIRLPOOL bb23a2e62f0085ae9be1abbce7737774dc29921d0ff08f79016ec5392971a2c38d57fd56dded2754539188120fe9dc6a38f55ccee50a8ba009109fa09e9376c0 +AUX rp-pppoe-3.10-session-offset.patch 832 SHA256 66499b084aab890c61399c703e21ba00a46d93da1f36e87674a27026b0c2f013 SHA512 20d169a27d7fc52c53e8ed06652c8db22c4b8b7d44a137c6f3beece41a408ca71b6aeb441a3bbcac76275382b40633f4a1c75dc95212402aa3ebf378dc3cb052 WHIRLPOOL b8406150e1fa63f8cca6092de65a323c2bbdb2ebe0a29b77488ac66c7480d0e639e00fd17ecc286036dfe6a7d63954b1ba3996f4dfe9e0f08ffa2b874d73f001 +AUX rp-pppoe-3.10-username-charset.patch 1950 SHA256 1a6df9197e108e310e90ca52f1d8b14b59fb368f59184aed3dc30abb9ca77417 SHA512 849cd9d0b59b844b2def6b49a203f3af0ec551a09235004b13541f14812517a651327e5694502a32f259b0eee7bc4b708800deabd93eaf3a01771bd47dd43e3f WHIRLPOOL 6382ce336a5b4782b5300ce4838088d082529f58e43d9127b50b6357c61eb58b4e7da87f898d94bad90933b920c9a9ec02a1ad008f8786848aca69500cc24cad +AUX rp-pppoe-3.11-gentoo.patch 333 SHA256 336e22cc8202b572929ee36d8342ad1b4b0feb7a45a8291b6cb1630dd50a5104 SHA512 76a79224e9d2b12c7a580f66e1ccc2ae4f2b655b2e54a10ec791e49d806d5afc6f2e8b6dd9128c1eb6222d3bdc0ed6787ddfd7775f4c3df42d05033e35ae65b1 WHIRLPOOL 9b9071f1ef4083877fb76360484bbbb5e887c592c2344b4a3c0518bfb99c24e4e1c23621a63623fd97b0d272bc546ceda28bd9cb4b182907a157b49b88170f8a +AUX rp-pppoe-3.11-kmode.patch 232 SHA256 5163e3d8b4019785af948d1b4b0d860ce8cd092daa98dcadca10b41764ca8e88 SHA512 4481d6ba933a8d400acacab1147de5d7675ee898ead8ddee9a24fa065a1e701569e83ae68a08c9bc0ea4ff5c909aa256e5c75fed7229ff288bd99cbbabdf2c59 WHIRLPOOL 0c3c6b3a4619943c0ac17ef3ae0bd67044f306ba81a6291b5ca3a245eb473cc190e280649295a43f26210db09dadfca4946538ba6a5ac517735e9da6ab8ecf91 +AUX rp-pppoe-3.12-ifconfig-path.patch 1892 SHA256 8fdd811eb4a71a6b61f305e79add2840992f4fc9b131b82158861d54410adc94 SHA512 9fc96ff573f8973ca864de9bc017d75d6bd01b7080adef14f5cc8f3ed253efa8cfbb850327e769400994c5208a4ffcc8d72cf693d2fb6cf678e3305a5ce3f5e4 WHIRLPOOL 90c293266aad0cec07ee06289c99fb7180219db1e423cfb12c6ce91c3dd34ca362cb3b5c2bd1476180495dbc5b00aaf8ac14d6c5eef5fc19f5eb1ce2cb876205 +AUX rp-pppoe-3.12-linux-headers.patch 681 SHA256 99761e5f84535d02e2004000567cab009ef49ed96f0534a5937e63d15dbed184 SHA512 b4d25bfd060e8ab63978ac243516c92d889a2a00b1cb786c0c3bc9ca892c43e0e76c24964aa3165a5a4bb3eb56af8df20be4f99accb8bfb812a4678e8bf9980c WHIRLPOOL 8e4a18c75c6e7589452e6364ff2679e72f65da67636da910a24872b88b2dae5bfcc0d29be1fd25511749cfc843f58df36bc542e0363504c22565387bab4c2345 +DIST ppp-2.4.7.tar.gz 688117 SHA256 02e0a3dd3e4799e33103f70ec7df75348c8540966ee7c948e4ed8a42bbccfb30 SHA512 e34ce24020af6a73e7a26c83c4f73a9c83fa455b7b363794dba27bf01f70368be06bff779777843949bd77f4bc9385d6ad455ea48bf8fff4e0d73cc8fef16ae2 WHIRLPOOL 48f3251e6b955ecfdaf9260b9ea5220d9e355fff836e2f5217ee0b15bf2c93e43f8207005f58bf1f97fb8ff0c76c56df8ecd8536f63c4d84d5940458ba0ba5c3 +DIST rp-pppoe-3.11.tar.gz 223234 SHA256 86a1a4d92fcea74fa6dd45516c5975933fa978b36fafe71f76ea70b4b4747720 SHA512 cb9579ad94f6b6cfd709e8061aacac0a007f1f58ffd50bd0603f5a2b612c0cf4831febdbfeee290b97932fd30f8ae7f707d532a291124c4aeae2333131d53905 WHIRLPOOL 5e0580b469973726696adc8754f4490877b748e04395873b63a7f6b87b682e0fe4d75f53b1cab674932fe7dcf4d7c99458979926f74589e6d4e15b07505720f6 +DIST rp-pppoe-3.12.tar.gz 224125 SHA256 00794e04031546b0e9b8cf286f2a6d1ccfc4a621b2a3abb2d7ef2a7ab7cc86c2 SHA512 1b9e4c806fcbad1bc21f7b74a780ae98682b10a69d91fb08df6dbd1fff86f6271995ebded43f926f8249a17cdddb541edccbbb3ee28e1a2dc89173ad61cd3de1 WHIRLPOOL 3285578003c1f03037517e468829e72cc4bbaeeb78f40bbcaf27a077ab3437fa4139bb7b141311658dbff55597da42d66c31155a180ed9acfefdc73dab1fffaf +EBUILD rp-pppoe-3.11-r3.ebuild 2686 SHA256 3a3bd0b2ee0eefa4747b9f0eb53ccec2686e9975545521c0df089c1447ebffdf SHA512 6a2ea94d70648156b548090c743696e836d46ce0b85e29b7bc966fea831589ed3936ec75168d30242328ad5999088acebe7b4ba1b87623033ba6e1b60c12267c WHIRLPOOL a41629e48731dd87442c4c71c68ad759a61b5ff56615021d98654188498c569d9418a27479bcef1055169bde0bf025252d020931711d40ec0caf8d9ac152b4bc +EBUILD rp-pppoe-3.12-r1.ebuild 2718 SHA256 0ba3ac93440987eb5fb52ae67d8f36579067f882f782f672e284a9ac13405a54 SHA512 d0072e6c08f62b7cce9982248ff9c23227cf5661ba5ef8255b9016708d48a4f434671f61de7e475e9efa024fc49639dd58985edc24d7eb2f4fb090962f427dd6 WHIRLPOOL f7850081149b207dfab4fdde53a3c61b9d48c7eac751067c9d7c69193f60adc4ed192a2088e847f81ff54d8babb49b92dad274b3619359bdb1ccdf0a8695ee2f +MISC ChangeLog 6630 SHA256 11fa3a56cebf4e77cb6d1a7e352c1cde47a83e34cdc7d072ed4b66e4c67ea751 SHA512 c5fbac8014f51699848391dcff13b04d8e230df6630937efafd32a1a07e2cce3a55b11cca04ec6d18406da66badec16b518019ca5a3818fc7ecb7dad7e476751 WHIRLPOOL 1583dea45c682510271b6f57ae1fb0c2f50dc45b388a7eec581d27e024d9aa04ca916f66ae6cf62e3ea9ee9cbca31411daee8fbc01b9382f1cbf44b6685409fd +MISC ChangeLog-2015 16938 SHA256 801fb20d1529fd194faf8c52adc8aa1f57fe36fb7bf95118bcae61872396338c SHA512 72c94301763ebce4f1c184915ddb08411b8a55bd7e7430e99fb96a718f785b3df2f94b09eba0bce2a44acd7fb5a52c0506b49661bf83a4bfa5352e76e155347a WHIRLPOOL 15ef14ead9f2cb627495a306b7c6de26f9b4b2f10e1740975be0ac37a1decf059bc8debeb623d09099cf500441722058838d5d9c991df6838e7d99e7ff6ba715 +MISC metadata.xml 370 SHA256 66f55e4ce20939e8b03120d8e3a767e9a1e2decf66d8c44df5c3ef1c91e019f5 SHA512 ebfae7addd585ee6f01b45921b1ba6a1c824c6e34f8f6a3c6d2fd917d7b17aceffca5f6a4ca1c7b135a34c679394417b73a23e067daed8a2c4b71fa63536c849 WHIRLPOOL 8f6c1769536a8cbd07d48306c2f3f102ac32c9216109a97522bb78ebdc14badac2d4e5971d42264d7527dd881f552cd083d392195f1ebc0ffbdd0632ad822e6f diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-autotools.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-autotools.patch new file mode 100644 index 000000000000..265d15db0936 --- /dev/null +++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-autotools.patch @@ -0,0 +1,115 @@ +diff -Nru rp-pppoe-3.10.orig/gui/Makefile.in rp-pppoe-3.10/gui/Makefile.in +--- rp-pppoe-3.10.orig/gui/Makefile.in 2008-06-30 16:00:41.000000000 +0200 ++++ rp-pppoe-3.10/gui/Makefile.in 2008-06-30 22:30:56.000000000 +0200 +@@ -46,7 +46,7 @@ + -mkdir -p $(DESTDIR)$(sbindir) + -mkdir -p $(DESTDIR)$(bindir) + -mkdir -p $(DESTDIR)/etc/ppp/rp-pppoe-gui +- $(install) -m 4755 -s pppoe-wrapper $(DESTDIR)$(sbindir) ++ $(install) -m 4755 pppoe-wrapper $(DESTDIR)$(sbindir) + $(install) -m 755 tkpppoe $(DESTDIR)$(bindir) + -mkdir -p $(DESTDIR)$(mandir)/man1 + $(install) -m 644 pppoe-wrapper.1 $(DESTDIR)$(mandir)/man1 +diff -Nru rp-pppoe-3.10.orig/src/configure.in rp-pppoe-3.10/src/configure.in +--- rp-pppoe-3.10.orig/src/configure.in 2008-06-30 16:00:42.000000000 +0200 ++++ rp-pppoe-3.10/src/configure.in 2008-06-30 22:29:53.000000000 +0200 +@@ -45,7 +45,7 @@ + AC_MSG_RESULT($ac_cv_struct_sockaddr_ll) + + if test "$ac_cv_struct_sockaddr_ll" = yes ; then +-AC_DEFINE(HAVE_STRUCT_SOCKADDR_LL) ++AC_DEFINE(HAVE_STRUCT_SOCKADDR_LL, 1, [Define if you have struct sockaddr_ll]) + fi + + dnl Check for N_HDLC line discipline +@@ -56,7 +56,7 @@ + ac_cv_n_hdlc=no) + AC_MSG_RESULT($ac_cv_n_hdlc) + if test "$ac_cv_n_hdlc" = yes ; then +-AC_DEFINE(HAVE_N_HDLC) ++AC_DEFINE(HAVE_N_HDLC, 1, [Define if you have the N_HDLC line discipline in linux/termios.h]) + fi + + AC_ARG_ENABLE(plugin, [ --enable-plugin=pppd_src_path build pppd plugin], ac_cv_pluginpath=$enableval, ac_cv_pluginpath=no) +@@ -104,7 +104,7 @@ + if test "$ac_cv_header_linux_if_pppox_h" = yes ; then + if test "$ac_cv_pluginpath" != no ; then + LINUX_KERNELMODE_PLUGIN=rp-pppoe.so +- AC_DEFINE(HAVE_LINUX_KERNEL_PPPOE) ++ AC_DEFINE(HAVE_LINUX_KERNEL_PPPOE, 1, [Define if you have kernel-mode PPPoE in Linux file]) + PPPD_INCDIR=$ac_cv_pluginpath + fi + fi +@@ -114,7 +114,7 @@ + fi + + if test "$ac_cv_debugging" = "yes" ; then +- AC_DEFINE(DEBUGGING_ENABLED) ++ AC_DEFINE(DEBUGGING_ENABLED, 1, [Define to include debugging code]) + fi + + AC_SUBST(LINUX_KERNELMODE_PLUGIN) +@@ -154,15 +154,15 @@ + AC_MSG_CHECKING(for Linux 2.4.X kernel-mode PPPoE support) + AC_CACHE_VAL(ac_cv_linux_kernel_pppoe,[ + if test "`uname -s`" = "Linux" ; then +-if test $cross_compiling = "no"; then ++dnl if test $cross_compiling = "no"; then + + dnl Do a bunch of modprobes. Can't hurt; might help. +-modprobe ppp_generic > /dev/null 2>&1 +-modprobe ppp_async > /dev/null 2>&1 +-modprobe n_hdlc > /dev/null 2>&1 +-modprobe ppp_synctty > /dev/null 2>&1 +-modprobe pppoe > /dev/null 2>&1 +-fi ++dnl modprobe ppp_generic > /dev/null 2>&1 ++dnl modprobe ppp_async > /dev/null 2>&1 ++dnl modprobe n_hdlc > /dev/null 2>&1 ++dnl modprobe ppp_synctty > /dev/null 2>&1 ++dnl modprobe pppoe > /dev/null 2>&1 ++dnl fi + AC_TRY_RUN([#include <sys/socket.h> + #include <net/ethernet.h> + #include <linux/if.h> +@@ -204,7 +204,7 @@ + dnl Figure out pppd version. 2.3.7 to 2.3.9 -- issue warning. Less than + dnl 2.3.7 -- stop + +-PPPD_VERSION=`$PPPD --version 2>&1 | awk ' /version/ {print $NF}'` ++PPPD_VERSION=2.4.4 + + case "$PPPD_VERSION" in + 1.*|2.0.*|2.1.*|2.2.*|2.3.0|2.3.1|2.3.2|2.3.3|2.3.4|2.3.5|2.3.6) +@@ -258,7 +258,7 @@ + + if test "$rpppoe_cv_pack_bitfields" = "rev" ; then + AC_MSG_RESULT(reversed) +- AC_DEFINE(PACK_BITFIELDS_REVERSED) ++ AC_DEFINE(PACK_BITFIELDS_REVERSED, 1, [Define if bitfields are packed in reverse order]) + else + AC_MSG_RESULT(normal) + fi +diff -Nru rp-pppoe-3.10.orig/src/plugin.c rp-pppoe-3.10/src/plugin.c +--- rp-pppoe-3.10.orig/src/plugin.c 2008-06-30 16:00:43.000000000 +0200 ++++ rp-pppoe-3.10/src/plugin.c 2008-06-30 22:27:18.000000000 +0200 +@@ -27,7 +27,6 @@ + static char const RCSID[] = + "$Id$"; + +-#define _GNU_SOURCE 1 + #include "pppoe.h" + + #include "pppd/pppd.h" +diff -Nru rp-pppoe-3.10.orig/src/relay.c rp-pppoe-3.10/src/relay.c +--- rp-pppoe-3.10.orig/src/relay.c 2008-06-30 16:00:43.000000000 +0200 ++++ rp-pppoe-3.10/src/relay.c 2008-06-30 22:27:18.000000000 +0200 +@@ -17,8 +17,6 @@ + static char const RCSID[] = + "$Id$"; + +-#define _GNU_SOURCE 1 /* For SA_RESTART */ +- + #include "relay.h" + + #include <signal.h> diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-gentoo-netscripts.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-gentoo-netscripts.patch new file mode 100644 index 000000000000..f45557a0d6f0 --- /dev/null +++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-gentoo-netscripts.patch @@ -0,0 +1,150 @@ +diff -Nru rp-pppoe-3.10.orig/configs/pppoe.conf rp-pppoe-3.10/configs/pppoe.conf +--- rp-pppoe-3.10.orig/configs/pppoe.conf 2008-06-30 16:00:42.000000000 +0200 ++++ rp-pppoe-3.10/configs/pppoe.conf 2008-06-30 22:22:32.000000000 +0200 +@@ -21,6 +21,9 @@ + # When you configure a variable, DO NOT leave spaces around the "=" sign. + + # Ethernet card connected to DSL modem ++# ++# NB: Gentoo overrides ETH when pppoe-start is called from the ++# networking scripts. This setting has no effect in that case. + ETH=eth1 + + # PPPoE user name. You may have to supply "@provider.com" Sympatico +@@ -86,8 +89,10 @@ + # $PIDFILE contains PID of pppoe-connect script + # $PIDFILE.pppoe contains PID of pppoe process + # $PIDFILE.pppd contains PID of pppd process +-CF_BASE=`basename $CONFIG` +-PIDFILE="/var/run/$CF_BASE-pppoe.pid" ++# ++# NB: Gentoo overrides PIDFILE when pppoe-start is run from the ++# networking scripts. This setting has no effect in that case. ++PIDFILE="/var/run/rp-pppoe.pid" + + # Do you want to use synchronous PPP? "yes" or "no". "yes" is much + # easier on CPU usage, but may not work for you. It is safer to use +diff -Nru rp-pppoe-3.10.orig/scripts/pppoe-connect.in rp-pppoe-3.10/scripts/pppoe-connect.in +--- rp-pppoe-3.10.orig/scripts/pppoe-connect.in 2008-06-30 16:00:42.000000000 +0200 ++++ rp-pppoe-3.10/scripts/pppoe-connect.in 2008-06-30 22:22:32.000000000 +0200 +@@ -62,12 +62,17 @@ + ;; + esac + +-if test ! -f "$CONFIG" -o ! -r "$CONFIG" ; then ++# In Gentoo, CONFIG is a named pipe when pppoe is started by the ++# network scripts. Testing -r is allowed; testing -f is not. ++if test ! -r "$CONFIG" ; then + echo "$0: Cannot read configuration file '$CONFIG'" >& 2 + exit 1 + fi +-export CONFIG +-. $CONFIG ++ ++# Read the named pipe (/dev/fd/foo) into a variable so we can use it ++# again later (since reading once from the pipe will exhaust it) ++CONFREAD=$(<$CONFIG) ++eval "$CONFREAD" + + PPPOE_PIDFILE="$PIDFILE.pppoe" + PPPD_PIDFILE="$PIDFILE.pppd" +diff -Nru rp-pppoe-3.10.orig/scripts/pppoe-start.in rp-pppoe-3.10/scripts/pppoe-start.in +--- rp-pppoe-3.10.orig/scripts/pppoe-start.in 2008-06-30 16:00:42.000000000 +0200 ++++ rp-pppoe-3.10/scripts/pppoe-start.in 2008-06-30 22:22:32.000000000 +0200 +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + # @configure_input@ + #*********************************************************************** + # +@@ -113,12 +113,17 @@ + ;; + esac + +-if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then ++# In Gentoo, CONFIG is a named pipe when pppoe is started by the ++# network scripts. Testing -r is allowed; testing -f is not. ++if [ ! -r "$CONFIG" ] ; then + $ECHO "$ME: Cannot read configuration file '$CONFIG'" >& 2 + exit 1 + fi +-export CONFIG +-. $CONFIG ++ ++# Read the named pipe (/dev/fd/foo) into a variable so we can use it ++# again later (since reading once from the pipe will exhaust it) ++CONFREAD=$(<$CONFIG) ++eval "$CONFREAD" + + # Check for command-line overriding of ETH and USER + case "$#" in +@@ -145,11 +150,11 @@ + + # Start the connection in the background unless we're debugging + if [ "$DEBUG" != "" ] ; then +- $CONNECT "$@" ++ $CONNECT <(echo "$CONFREAD") + exit 0 + fi + +-$CONNECT "$@" > /dev/null 2>&1 & ++$CONNECT <(echo "$CONFREAD") >/dev/null 2>&1 & + CONNECT_PID=$! + + if [ "$CONNECT_TIMEOUT" = "" -o "$CONNECT_TIMEOUT" = 0 ] ; then +@@ -164,7 +169,7 @@ + # Monitor connection + TIME=0 + while [ true ] ; do +- @sbindir@/pppoe-status $CONFIG > /dev/null 2>&1 ++ @sbindir@/pppoe-status <(echo "$CONFREAD") >/dev/null 2>&1 + + # Looks like the interface came up + if [ $? = 0 ] ; then +diff -Nru rp-pppoe-3.10.orig/scripts/pppoe-status rp-pppoe-3.10/scripts/pppoe-status +--- rp-pppoe-3.10.orig/scripts/pppoe-status 2008-06-30 16:00:42.000000000 +0200 ++++ rp-pppoe-3.10/scripts/pppoe-status 2008-06-30 22:22:32.000000000 +0200 +@@ -28,12 +28,17 @@ + ;; + esac + +-if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then ++# In Gentoo, CONFIG is a named pipe when pppoe is started by the ++# network scripts. Testing -r is allowed; testing -f is not. ++if [ ! -r "$CONFIG" ] ; then + echo "$0: Cannot read configuration file '$CONFIG'" >& 2 + exit 1 + fi + +-. $CONFIG ++# Read the named pipe (/dev/fd/foo) into a variable so we can use it ++# again later (since reading once from the pipe will exhaust it) ++CONFREAD=$(<$CONFIG) ++eval "$CONFREAD" + + PPPOE_PIDFILE="$PIDFILE.pppoe" + PPPD_PIDFILE="$PIDFILE.pppd" +diff -Nru rp-pppoe-3.10.orig/scripts/pppoe-stop.in rp-pppoe-3.10/scripts/pppoe-stop.in +--- rp-pppoe-3.10.orig/scripts/pppoe-stop.in 2008-06-30 16:00:42.000000000 +0200 ++++ rp-pppoe-3.10/scripts/pppoe-stop.in 2008-06-30 22:22:32.000000000 +0200 +@@ -31,12 +31,17 @@ + CONFIG=/etc/ppp/pppoe.conf + fi + +-if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then ++# In Gentoo, CONFIG is a named pipe when pppoe is started by the ++# network scripts. Testing -r is allowed; testing -f is not. ++if [ ! -r "$CONFIG" ] ; then + echo "$ME: Cannot read configuration file '$CONFIG'" >& 2 + exit 1 + fi +-export CONFIG +-. $CONFIG ++ ++# Read the named pipe (/dev/fd/foo) into a variable so we can use it ++# again later (since reading once from the pipe will exhaust it) ++CONFREAD=$(<$CONFIG) ++eval "$CONFREAD" + + PPPOE_PIDFILE="$PIDFILE.pppoe" + PPPD_PIDFILE="$PIDFILE.pppd" diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-linux-headers.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-linux-headers.patch new file mode 100644 index 000000000000..47e504bf7835 --- /dev/null +++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-linux-headers.patch @@ -0,0 +1,31 @@ +diff -Nru rp-pppoe-3.10.orig/src/pppoe.h rp-pppoe-3.10/src/pppoe.h +--- rp-pppoe-3.10.orig/src/pppoe.h 2008-06-30 16:00:43.000000000 +0200 ++++ rp-pppoe-3.10/src/pppoe.h 2008-06-30 23:25:54.000000000 +0200 +@@ -19,6 +19,13 @@ + + extern int IsSetID; + ++/* Ugly header files on some Linux boxes... */ ++#if defined(HAVE_LINUX_IF_H) ++#include <linux/if.h> ++#elif defined(HAVE_NET_IF_H) ++#include <net/if.h> ++#endif ++ + #if defined(HAVE_NETPACKET_PACKET_H) || defined(HAVE_LINUX_IF_PACKET_H) + #define _POSIX_SOURCE 1 /* For sigaction defines */ + #endif +@@ -51,13 +58,6 @@ + #include <sys/socket.h> + #endif + +-/* Ugly header files on some Linux boxes... */ +-#if defined(HAVE_LINUX_IF_H) +-#include <linux/if.h> +-#elif defined(HAVE_NET_IF_H) +-#include <net/if.h> +-#endif +- + #ifdef HAVE_NET_IF_TYPES_H + #include <net/if_types.h> + #endif diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-plugin-options.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-plugin-options.patch new file mode 100644 index 000000000000..0d447748a1bc --- /dev/null +++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-plugin-options.patch @@ -0,0 +1,39 @@ +diff -ur rp-pppoe-3.10.orig/configs/pppoe.conf rp-pppoe-3.10/configs/pppoe.conf +--- rp-pppoe-3.10.orig/configs/pppoe.conf 2008-08-23 03:40:56.000000000 +0000 ++++ rp-pppoe-3.10/configs/pppoe.conf 2008-08-23 03:42:20.000000000 +0000 +@@ -120,7 +120,7 @@ + FIREWALL=NONE + + # Linux kernel-mode plugin for pppd. If you want to try the kernel-mode +-# plugin, use LINUX_PLUGIN=/etc/ppp/plugins/rp-pppoe.so ++# plugin, use LINUX_PLUGIN=rp-pppoe.so + LINUX_PLUGIN= + + # Any extra arguments to pass to pppoe. Normally, use a blank string +diff -ur rp-pppoe-3.10.orig/scripts/pppoe-connect.in rp-pppoe-3.10/scripts/pppoe-connect.in +--- rp-pppoe-3.10.orig/scripts/pppoe-connect.in 2008-08-23 03:40:56.000000000 +0000 ++++ rp-pppoe-3.10/scripts/pppoe-connect.in 2008-08-23 03:45:43.000000000 +0000 +@@ -202,10 +202,13 @@ + + # If we're using kernel-mode PPPoE on Linux... + if test "$LINUX_PLUGIN" != "" ; then +- PLUGIN_OPTS="plugin $LINUX_PLUGIN nic-$ETH" ++ PLUGIN_OPTS="plugin $LINUX_PLUGIN" + if test -n "$SERVICENAME" ; then + PLUGIN_OPTS="$PLUGIN_OPTS rp_pppoe_service $SERVICENAME" + fi ++ ++ # Interface name MUST BE LAST!! ++ PLUGIN_OPTS="$PLUGIN_OPTS $ETH" + modprobe pppoe > /dev/null 2>&1 + fi + +@@ -297,7 +300,7 @@ + $SETSID $OVERRIDE_PPPD_COMMAND & + echo "$!" > $PPPD_PIDFILE + elif test "$LINUX_PLUGIN" != "" ; then +- $SETSID $PPPD $PPP_STD_OPTIONS $DEMAND & ++ $SETSID $PPPD $DEMAND $PPP_STD_OPTIONS & + echo "$!" > $PPPD_PIDFILE + else + $SETSID $PPPD pty "$PPPOE_CMD" \ diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-posix-source-sigaction.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-posix-source-sigaction.patch new file mode 100644 index 000000000000..7ed4b98c7213 --- /dev/null +++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-posix-source-sigaction.patch @@ -0,0 +1,18 @@ +glibc does not define SA_RESTART when _POSIX_SOURCE is defined, so we +have to just assume the default signal.h include defines SA_RESTART + +https://sourceware.org/bugzilla/show_bug.cgi?id=12252 + +--- rp-pppoe-3.10/src/pppoe.h ++++ rp-pppoe-3.10/src/pppoe.h +@@ -19,10 +19,6 @@ + + extern int IsSetID; + +-#if defined(HAVE_NETPACKET_PACKET_H) || defined(HAVE_LINUX_IF_PACKET_H) +-#define _POSIX_SOURCE 1 /* For sigaction defines */ +-#endif +- + #include <stdio.h> /* For FILE */ + #include <sys/types.h> /* For pid_t */ + diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-session-offset.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-session-offset.patch new file mode 100644 index 000000000000..303ecfa9e4b7 --- /dev/null +++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-session-offset.patch @@ -0,0 +1,21 @@ +diff -Nru rp-pppoe-3.10.orig/src/pppoe-server.c rp-pppoe-3.10/src/pppoe-server.c +--- rp-pppoe-3.10.orig/src/pppoe-server.c 2008-06-30 16:00:43.000000000 +0200 ++++ rp-pppoe-3.10/src/pppoe-server.c 2008-06-30 22:35:11.000000000 +0200 +@@ -1751,7 +1751,7 @@ + } + if (PassUnitOptionToPPPD) { + argv[c++] = "unit"; +- sprintf(buffer, "%u", (unsigned int) (ntohs(session->sess) - 1 - SessOffset)); ++ sprintf(buffer, "%u", (unsigned int) (ntohs(session->sess) - 1)); + argv[c++] = buffer; + } + argv[c++] = NULL; +@@ -1834,7 +1834,7 @@ + argv[c++] = "default-asyncmap"; + if (PassUnitOptionToPPPD) { + argv[c++] = "unit"; +- sprintf(buffer, "%u", (unsigned int) (ntohs(session->sess) - 1 - SessOffset)); ++ sprintf(buffer, "%u", (unsigned int) (ntohs(session->sess) - 1)); + argv[c++] = buffer; + } + argv[c++] = NULL; diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.10-username-charset.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-username-charset.patch new file mode 100644 index 000000000000..8ef99a4b7aa9 --- /dev/null +++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.10-username-charset.patch @@ -0,0 +1,58 @@ +diff -Nru rp-pppoe-3.10.orig/scripts/pppoe-setup.in rp-pppoe-3.10/scripts/pppoe-setup.in +--- rp-pppoe-3.10.orig/scripts/pppoe-setup.in 2008-06-30 16:00:42.000000000 +0200 ++++ rp-pppoe-3.10/scripts/pppoe-setup.in 2008-06-30 22:23:40.000000000 +0200 +@@ -86,11 +86,13 @@ + $ECHO "USER NAME" + $ECHO "" + printf "%s" ">>> Enter your PPPoE user name (default $USER): " +- read U ++ read Uu + +- if [ "$U" = "" ] ; then +- U="$USER" ++ if [ "$Uu" = "" ] ; then ++ Uu="$USER" + fi ++ ++ U=`echo $Uu | sed -e "s/&/\\\\\&/g"` + + # Under Linux, "fix" the default interface if eth1 is not available + if test `uname -s` = "Linux" ; then +@@ -221,7 +223,7 @@ + $ECHO "** Summary of what you entered **" + $ECHO "" + $ECHO "Ethernet Interface: $E" +- $ECHO "User name: $U" ++ $ECHO "User name: $Uu" + if [ "$D" = "no" ] ; then + $ECHO "Activate-on-demand: No" + else +@@ -288,7 +290,12 @@ + fi + + # Some #$(*& ISP's use a slash in the user name... +-sed -e "s&^USER=.*&USER='$U'&" \ ++for SEP in ':' ';' '/' '!' '|' '_' '-' '@' ; do ++ if [ "$U" = `echo $U | sed "sI${SEP}II"` ]; then ++ break; ++ fi ++done ++sed -e "s${SEP}^USER=.*${SEP}USER='$U'${SEP}"\ + -e "s&^ETH=.*Ð='$E'&" \ + -e "s&^PIDFILE=.*&PIDFILE=\"$VARRUN/\$CF_BASE-pppoe.pid\"&" \ + -e "s/^FIREWALL=.*/FIREWALL=$FIREWALL/" \ +@@ -337,10 +344,10 @@ + cp /dev/null /etc/ppp/chap-secrets-bak + fi + +-egrep -v "^$U|^\"$U\"" /etc/ppp/pap-secrets-bak > /etc/ppp/pap-secrets +-$ECHO "\"$U\" * \"$PWD1\"" >> /etc/ppp/pap-secrets +-egrep -v "^$U|^\"$U\"" /etc/ppp/chap-secrets-bak > /etc/ppp/chap-secrets +-$ECHO "\"$U\" * \"$PWD1\"" >> /etc/ppp/chap-secrets ++egrep -v "^$Uu|^\"$Uu\"" /etc/ppp/pap-secrets-bak > /etc/ppp/pap-secrets ++$ECHO "\"$Uu\" * \"$PWD1\"" >> /etc/ppp/pap-secrets ++egrep -v "^$Uu|^\"$Uu\"" /etc/ppp/chap-secrets-bak > /etc/ppp/chap-secrets ++$ECHO "\"$Uu\" * \"$PWD1\"" >> /etc/ppp/chap-secrets + + $ECHO "" + $ECHO "" diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.11-gentoo.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.11-gentoo.patch new file mode 100644 index 000000000000..9f03a0cf8b1f --- /dev/null +++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.11-gentoo.patch @@ -0,0 +1,11 @@ +--- rp-pppoe-3.11/gui/Makefile.in ++++ rp-pppoe-3.11/gui/Makefile.in +@@ -37,7 +37,7 @@ + @echo "Type 'make install' as root to install the software." + + pppoe-wrapper: wrapper.o +- @CC@ -o pppoe-wrapper wrapper.o ++ @CC@ $(CFLAGS) $(LDFLAGS) -o pppoe-wrapper wrapper.o + + wrapper.o: wrapper.c + @CC@ $(CFLAGS) -c -o wrapper.o wrapper.c diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.11-kmode.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.11-kmode.patch new file mode 100644 index 000000000000..78a6a3b67541 --- /dev/null +++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.11-kmode.patch @@ -0,0 +1,10 @@ +--- a/src/configure.in ++++ b/src/configure.in +@@ -26,6 +26,7 @@ + #include<net/ethernet.h> + #include<linux/if.h> + #include<linux/in.h> ++#include <linux/in6.h> + ]) + + dnl Checks for typedefs, structures, and compiler characteristics. diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.12-ifconfig-path.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.12-ifconfig-path.patch new file mode 100644 index 000000000000..2a56d40fabcf --- /dev/null +++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.12-ifconfig-path.patch @@ -0,0 +1,65 @@ +diff --git a/gui/tkpppoe.in b/gui/tkpppoe.in +index 148c8c8..1d952d4 100755 +--- a/gui/tkpppoe.in ++++ b/gui/tkpppoe.in +@@ -1573,7 +1573,7 @@ proc SetButtonStates {} { + #*********************************************************************** + proc GetEthernetInterfaces {} { + set ifs {} +- set fp [open "|/sbin/ifconfig" "r"] ++ set fp [open "|/bin/ifconfig" "r"] + while {[gets $fp line] >= 0} { + if {[regexp {^eth[0-9]+} $line eth]} { + lappend ifs $eth +diff --git a/scripts/pppoe-connect.in b/scripts/pppoe-connect.in +index 2124422..e7eab32 100755 +--- a/scripts/pppoe-connect.in ++++ b/scripts/pppoe-connect.in +@@ -28,7 +28,7 @@ exec_prefix=@exec_prefix@ + localstatedir=/var + + # Paths to programs +-IFCONFIG=/sbin/ifconfig ++IFCONFIG=/bin/ifconfig + PPPD=@PPPD@ + SETSID=@SETSID@ + PPPOE=@sbindir@/pppoe +diff --git a/scripts/pppoe-setup.in b/scripts/pppoe-setup.in +index b378479..4122084 100755 +--- a/scripts/pppoe-setup.in ++++ b/scripts/pppoe-setup.in +@@ -17,7 +17,7 @@ prefix=@prefix@ + exec_prefix=@exec_prefix@ + + # Paths to programs +-IFCONFIG=/sbin/ifconfig ++IFCONFIG=/bin/ifconfig + PPPD=@PPPD@ + PPPOE=@sbindir@/pppoe + ECHO=@ECHO@ +diff --git a/scripts/pppoe-start.in b/scripts/pppoe-start.in +index 7e15804..b9dd7f0 100755 +--- a/scripts/pppoe-start.in ++++ b/scripts/pppoe-start.in +@@ -29,7 +29,7 @@ exec_prefix=@exec_prefix@ + # Paths to programs + CONNECT=@sbindir@/pppoe-connect + ECHO=@ECHO@ +-IFCONFIG=/sbin/ifconfig ++IFCONFIG=/bin/ifconfig + + # Set to "C" locale so we can parse messages from commands + LANG=C +diff --git a/scripts/pppoe-status b/scripts/pppoe-status +index 9fe89cd..96d6ebd 100755 +--- a/scripts/pppoe-status ++++ b/scripts/pppoe-status +@@ -73,7 +73,7 @@ for i in /etc/ppp/ppp*.pid /var/run/ppp*.pid ; do + exit 1 + fi + echo "pppoe-status: Link is up and running on interface $IF" +- /sbin/ifconfig $IF ++ /bin/ifconfig $IF + exit 0 + fi + fi diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.12-linux-headers.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.12-linux-headers.patch new file mode 100644 index 000000000000..961eba396138 --- /dev/null +++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.12-linux-headers.patch @@ -0,0 +1,28 @@ +the linux headers have started adding shims to not define types or structs +when C lib headers are active, but in order to work, the C lib headers have +to be included before the linux headers. + +move the netinet/in.h include up above the linux/ includes. + +Mike Frysinger <vapier@gentoo.org> + +--- a/src/pppoe.h ++++ b/src/pppoe.h +@@ -47,6 +47,8 @@ + #include <sys/socket.h> + #endif + ++#include <netinet/in.h> ++ + /* Ugly header files on some Linux boxes... */ + #if defined(HAVE_LINUX_IF_H) + #include <linux/if.h> +@@ -84,8 +86,6 @@ typedef unsigned long UINT32_t; + #include <linux/if_ether.h> + #endif + +-#include <netinet/in.h> +- + #ifdef HAVE_NETINET_IF_ETHER_H + #include <sys/types.h> + diff --git a/net-dialup/rp-pppoe/metadata.xml b/net-dialup/rp-pppoe/metadata.xml new file mode 100644 index 000000000000..27333730d097 --- /dev/null +++ b/net-dialup/rp-pppoe/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>polynomial-c@gentoo.org</email> + <name>Lars Wendler</name> + </maintainer> + <maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> + </maintainer> + </pkgmetadata> diff --git a/net-dialup/rp-pppoe/rp-pppoe-3.11-r3.ebuild b/net-dialup/rp-pppoe/rp-pppoe-3.11-r3.ebuild new file mode 100644 index 000000000000..6292f5e54db1 --- /dev/null +++ b/net-dialup/rp-pppoe/rp-pppoe-3.11-r3.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils flag-o-matic autotools readme.gentoo + +PPP_P="ppp-2.4.7" + +DESCRIPTION="A user-mode PPPoE client and server suite for Linux" +HOMEPAGE="https://www.roaringpenguin.com/products/pppoe" +SRC_URI="http://www.roaringpenguin.com/files/download/${P}.tar.gz + ftp://ftp.samba.org/pub/ppp/${PPP_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~sh sparc x86" +IUSE="tk" + +RDEPEND=" + net-dialup/ppp:= + tk? ( dev-lang/tk ) +" +# see bug #230491 +DEPEND="|| ( <sys-kernel/linux-headers-2.6.24 >=sys-kernel/linux-headers-2.6.25 ) + ${RDEPEND}" + +DOC_CONTENTS="Use pppoe-setup to configure your dialup connection" + +pkg_setup() { + # This is needed in multiple phases + PPPD_VER=$(best_version net-dialup/ppp) + PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR} + PPPD_VER=${PPPD_VER%%-*} #reduce it to ${PV} +} + +src_prepare() { + # Patch to enable integration of pppoe-start and pppoe-stop with + # baselayout-1.11.x so that the pidfile can be found reliably per interface + epatch "${FILESDIR}/${PN}-3.10-gentoo-netscripts.patch" + + epatch "${FILESDIR}/${PN}-3.10-username-charset.patch" # bug 82410 + epatch "${FILESDIR}/${PN}-3.10-plugin-options.patch" + epatch "${FILESDIR}/${PN}-3.10-autotools.patch" + epatch "${FILESDIR}/${PN}-3.10-session-offset.patch" # bug 204476 + has_version '<sys-kernel/linux-headers-2.6.35' && \ + epatch "${FILESDIR}/${PN}-3.10-linux-headers.patch" #334197 + epatch "${FILESDIR}/${PN}-3.10-posix-source-sigaction.patch" + epatch "${FILESDIR}/${PN}-3.11-gentoo.patch" + epatch "${FILESDIR}/${PN}-3.11-kmode.patch" #364941 + + cd "${S}"/src || die + eautoreconf +} + +src_configure() { + addpredict /dev/ppp + + cd "${S}/src" || die + econf --enable-plugin=../../ppp-${PPPD_VER} +} + +src_compile() { + cd "${S}/src" || die + emake + + if use tk; then + emake -C "${S}/gui" || die "gui make failed" + fi +} + +src_install () { + cd "${S}/src" || die + emake DESTDIR="${D}" docdir=/usr/share/doc/${PF} install + + #Don't use compiled rp-pppoe plugin - see pkg_preinst below + local pppoe_plugin="${D}/etc/ppp/plugins/rp-pppoe.so" + if [ -f "${pppoe_plugin}" ] ; then + rm "${pppoe_plugin}" || die + fi + + if use tk; then + emake -C "${S}/gui" \ + DESTDIR="${D}" \ + datadir=/usr/share/doc/${PF}/ \ + install + dosym /usr/share/doc/${PF}/tkpppoe /usr/share/tkpppoe + fi + + readme.gentoo_create_doc +} + +pkg_preinst() { + # Use the rp-pppoe plugin that comes with net-dialup/pppd + if [ -n "${PPPD_VER}" ] && [ -f "${ROOT}/usr/lib/pppd/${PPPD_VER}/rp-pppoe.so" ] ; then + dosym /usr/lib/pppd/${PPPD_VER}/rp-pppoe.so /etc/ppp/plugins/rp-pppoe.so + fi +} diff --git a/net-dialup/rp-pppoe/rp-pppoe-3.12-r1.ebuild b/net-dialup/rp-pppoe/rp-pppoe-3.12-r1.ebuild new file mode 100644 index 000000000000..37f5f632fafc --- /dev/null +++ b/net-dialup/rp-pppoe/rp-pppoe-3.12-r1.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils flag-o-matic autotools readme.gentoo-r1 + +PPP_P="ppp-2.4.7" + +DESCRIPTION="A user-mode PPPoE client and server suite for Linux" +HOMEPAGE="https://www.roaringpenguin.com/products/pppoe" +SRC_URI="http://www.roaringpenguin.com/files/download/${P}.tar.gz + ftp://ftp.samba.org/pub/ppp/${PPP_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~sh sparc x86" +IUSE="tk" + +RDEPEND=" + net-dialup/ppp:= + tk? ( dev-lang/tk:= ) +" +# see bug #230491 +DEPEND="|| ( <sys-kernel/linux-headers-2.6.24 >=sys-kernel/linux-headers-2.6.25 ) + ${RDEPEND}" + +DOC_CONTENTS="Use pppoe-setup to configure your dialup connection" + +pkg_setup() { + # This is needed in multiple phases + PPPD_VER=$(best_version net-dialup/ppp) + PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR} + PPPD_VER=${PPPD_VER%%-*} #reduce it to ${PV} +} + +PATCHES=( + # Patch to enable integration of pppoe-start and pppoe-stop with + # baselayout-1.11.x so that the pidfile can be found reliably per interface + "${FILESDIR}/${PN}-3.10-gentoo-netscripts.patch" + + "${FILESDIR}/${PN}-3.10-username-charset.patch" # bug 82410 + "${FILESDIR}/${PN}-3.10-plugin-options.patch" + "${FILESDIR}/${PN}-3.10-autotools.patch" + "${FILESDIR}/${PN}-3.10-posix-source-sigaction.patch" + "${FILESDIR}/${PN}-3.11-gentoo.patch" + "${FILESDIR}/${PN}-3.11-kmode.patch" #364941 + "${FILESDIR}/${PN}-3.12-linux-headers.patch" + "${FILESDIR}/${PN}-3.12-ifconfig-path.patch" #602344 +) + +src_prepare() { + if has_version '<sys-kernel/linux-headers-2.6.35' ; then + PATCHES+=( + "${FILESDIR}/${PN}-3.10-linux-headers.patch" #334197 + ) + fi + + default + + cd "${S}"/src || die + eautoreconf +} + +src_configure() { + addpredict /dev/ppp + + cd "${S}/src" || die + econf --enable-plugin=../../ppp-${PPPD_VER} +} + +src_compile() { + cd "${S}/src" || die + emake + + if use tk; then + emake -C "${S}/gui" || die "gui make failed" + fi +} + +src_install () { + cd "${S}/src" || die + emake DESTDIR="${D}" docdir=/usr/share/doc/${PF} install + + #Don't use compiled rp-pppoe plugin - see pkg_preinst below + local pppoe_plugin="${D}/etc/ppp/plugins/rp-pppoe.so" + if [ -f "${pppoe_plugin}" ] ; then + rm "${pppoe_plugin}" || die + fi + + if use tk; then + emake -C "${S}/gui" \ + DESTDIR="${D}" \ + datadir=/usr/share/doc/${PF}/ \ + install + dosym /usr/share/doc/${PF}/tkpppoe /usr/share/tkpppoe + fi + + readme.gentoo_create_doc +} + +pkg_preinst() { + # Use the rp-pppoe plugin that comes with net-dialup/pppd + if [ -n "${PPPD_VER}" ] && [ -f "${ROOT}/usr/lib/pppd/${PPPD_VER}/rp-pppoe.so" ] ; then + dosym /usr/lib/pppd/${PPPD_VER}/rp-pppoe.so /etc/ppp/plugins/rp-pppoe.so + fi +} |