summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2007-05-03 12:27:00 +0000
committerPeter Volkov <pva@gentoo.org>2007-05-03 12:27:00 +0000
commit5f91d9ecb9d459e3c3ae9ce3390b589f300cef6c (patch)
tree5bee57a86db6566ce32ba86cb204ab523f7f73bb /net-dialup
parentnew pptpd version for one day testing... (diff)
downloadpva-5f91d9ecb9d459e3c3ae9ce3390b589f300cef6c.tar.gz
pva-5f91d9ecb9d459e3c3ae9ce3390b589f300cef6c.tar.bz2
pva-5f91d9ecb9d459e3c3ae9ce3390b589f300cef6c.zip
And now in the right place.
svn path=/; revision=15
Diffstat (limited to 'net-dialup')
-rw-r--r--net-dialup/ChangeLog119
-rw-r--r--net-dialup/Manifest32
-rw-r--r--net-dialup/files/digest-pptpd-1.3.43
-rw-r--r--net-dialup/files/pptpd-1.3.4-gentoo.patch57
-rw-r--r--net-dialup/files/pptpd-1.3.4-more-reodering-fixes.patch58
-rw-r--r--net-dialup/files/pptpd-confd5
-rwxr-xr-xnet-dialup/files/pptpd-init20
-rw-r--r--net-dialup/metadata.xml5
-rw-r--r--net-dialup/pptpd-1.3.4.ebuild58
9 files changed, 357 insertions, 0 deletions
diff --git a/net-dialup/ChangeLog b/net-dialup/ChangeLog
new file mode 100644
index 0000000..d64cbdf
--- /dev/null
+++ b/net-dialup/ChangeLog
@@ -0,0 +1,119 @@
+# ChangeLog for net-dialup/pptpd
+# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/pptpd/ChangeLog,v 1.26 2007/04/22 00:13:15 mrness Exp $
+
+ 22 Apr 2007; Alin Năstac <mrness@gentoo.org> pptpd-1.3.3.ebuild:
+ Use newinitd and newconfd (#174266).
+
+ 10 Feb 2007; Alin Năstac <mrness@gentoo.org>
+ -files/pptpd-1.3.0-gentoo.patch, -files/pptpd-1.3.1-gentoo.patch,
+ -files/pptpd-1.3.2-connections-arg.patch, -files/pptpd-1.3.2-gentoo.patch,
+ -pptpd-1.2.3-r1.ebuild, -pptpd-1.3.0.ebuild, -pptpd-1.3.1.ebuild,
+ -pptpd-1.3.2.ebuild:
+ Remove obsolete versions.
+
+ 18 Nov 2006; Alin Nastac <mrness@gentoo.org> pptpd-1.3.3.ebuild:
+ Stable on x86.
+
+*pptpd-1.3.3 (08 Sep 2006)
+
+ 08 Sep 2006; Alin Nastac <mrness@gentoo.org>
+ +files/pptpd-1.3.3-gentoo.patch, +pptpd-1.3.3.ebuild:
+ Version bump. Add gre-extreme-debug USE flag which enables logging of every
+ accepted GRE package (#127388).
+
+*pptpd-1.3.2 (12 May 2006)
+
+ 12 May 2006; Alin Nastac <mrness@gentoo.org>
+ +files/pptpd-1.3.2-connections-arg.patch, +files/pptpd-1.3.2-gentoo.patch,
+ +pptpd-1.3.2.ebuild:
+ Version bump. Fix segfault when -C option is specified on command line
+ (#132898).
+
+*pptpd-1.3.1 (26 Mar 2006)
+
+ 26 Mar 2006; Alin Nastac <mrness@gentoo.org>
+ +files/pptpd-1.3.1-gentoo.patch, +pptpd-1.3.1.ebuild:
+ Version bump. Fix syslog flood with messages like "GRE: accepting packet"
+ (#127388).
+
+*pptpd-1.3.0 (10 Mar 2006)
+
+ 10 Mar 2006; Alin Nastac <mrness@gentoo.org>
+ +files/pptpd-1.3.0-gentoo.patch, +pptpd-1.3.0.ebuild:
+ Version bump (#125464). Fix compile warnings and CFLAGS.
+
+ 06 Oct 2005; Alin Nastac <mrness@gentoo.org> pptpd-1.2.3-r1.ebuild:
+ Remove COPYING and INSTALL from docs.
+
+ 26 May 2005; Alin Nastac <mrness@gentoo.org> -pptpd-1.2.1.ebuild:
+ Remove old version.
+
+ 13 May 2005; Alin Nastac <mrness@gentoo.org> pptpd-1.2.3-r1.ebuild:
+ Stable on x86
+
+*pptpd-1.2.3-r1 (21 Apr 2005)
+
+ 21 Apr 2005; Alin Nastac <mrness@gentoo.org> -pptpd-1.2.3.ebuild,
+ +pptpd-1.2.3-r1.ebuild:
+ Match version of pptpd-logwtmp with current version of pppd (#89895)
+
+*pptpd-1.2.3 (16 Apr 2005)
+
+ 16 Apr 2005; Alin Nastac <mrness@gentoo.org> +pptpd-1.2.3.ebuild:
+ Version bump
+
+ 12 Feb 2005; Alin Nastac <mrness@gentoo.org> -pptpd-1.1.4_beta4.ebuild,
+ pptpd-1.2.1.ebuild:
+ Mark stable on x86 and remove old ebuild.
+
+*pptpd-1.2.1 (30 Dec 2004)
+
+ 30 Dec 2004; Jared Hudson <jhhudso@gentoo.org> : Version bump.
+
+ 23 Dec 2004; Alin Nastac <mrness@gentoo.org> -files/options.pptpd,
+ -files/pptpd.conf, -files/1.1.3/options.pptpd, -files/1.1.3/pptpd.conf,
+ -files/1.1.4_beta3/options.pptpd, -files/1.1.4_beta3/pptpd.conf,
+ -pptpd-1.1.2.ebuild, -pptpd-1.1.3.20030409.ebuild, -pptpd-1.1.3.ebuild,
+ -pptpd-1.1.4_beta3.ebuild, pptpd-1.1.4_beta4.ebuild:
+ Remove obsolete ebuilds.
+
+ 19 Dec 2004; Alin Nastac <mrness@gentoo.org> pptpd-1.1.4_beta4.ebuild:
+ Fix autotools generated files (#72744) and mark it stable on x86.
+
+ 25 Aug 2004; Sven Wegener <swegener@gentoo.org> pptpd-1.1.3.ebuild:
+ Changed SRC_URI to use mirror:// syntax.
+
+ 01 Jul 2004; Jeremy Huddleston <eradicator@gentoo.org> pptpd-1.1.2.ebuild,
+ pptpd-1.1.3.20030409.ebuild, pptpd-1.1.3.ebuild, pptpd-1.1.4_beta3.ebuild,
+ pptpd-1.1.4_beta4.ebuild:
+ virtual/glibc -> virtual/libc
+
+*pptpd-1.1.4_beta4 (10 Aug 2003)
+
+ 10 Aug 2003; Jared Hudson <jhhudso@gentoo.org> : Version bump and bug fix.
+ Fixed bug in /etc/init.d/pptpd. Ebuild and bugfix credit goes to
+ Ross Dougherty <theklone@optusnet.com.au> Bug id #23961 and #20041.
+
+*pptpd-1.1.4_beta3 (28 Jun 2003)
+
+ 28 Jun 2003; Jared Hudson <jhhudso@gentoo.org> : Version bump.
+
+*pptpd-1.1.3.20030409 (28 Apr 2003)
+
+ 23 May 2003; Chuck Brewer <killian@gentoo.org>:
+ Added manifest.
+
+*pptpd-1.1.3.20030409 (28 Apr 2003)
+
+ 28 Apr 2003; Daniel Ahlberg <aliz@gentoo.org> pptpd-1.1.3.20030409.ebuild :
+ Security update.
+
+*pptpd-1.1.3 (6 Nov 2002)
+
+ 6 Nov 2002; Jared Hudson <jhhudso@gentoo.org> : Revision bump in regard to
+ bug #5154. Credit goes to: Frederic Mangeant <frederic.mangeant@free.fr>
+
+*pptpd-1.1.2 (22 May 2002)
+
+ 5 May 2002; Mike Jones <ashmodai@gentoo.org> ChangeLog, pptpd-1.1.2.ebuild:
diff --git a/net-dialup/Manifest b/net-dialup/Manifest
new file mode 100644
index 0000000..84daef5
--- /dev/null
+++ b/net-dialup/Manifest
@@ -0,0 +1,32 @@
+AUX pptpd-1.3.4-gentoo.patch 2139 RMD160 316f9335050084280431e00ae5b977653846beb7 SHA1 a8b067b0a7e7ab53eb64b00f4e24a7e305affc91 SHA256 e9f6a4c461538f6dc8580c7fec086b12945976cc55b6dfe9c6a3ef4a02333cb7
+MD5 0df06dc0588985217fc5fed766e90394 files/pptpd-1.3.4-gentoo.patch 2139
+RMD160 316f9335050084280431e00ae5b977653846beb7 files/pptpd-1.3.4-gentoo.patch 2139
+SHA256 e9f6a4c461538f6dc8580c7fec086b12945976cc55b6dfe9c6a3ef4a02333cb7 files/pptpd-1.3.4-gentoo.patch 2139
+AUX pptpd-1.3.4-more-reodering-fixes.patch 2340 RMD160 9322b15ead0ac585e7bb1a7bae8536e09f52c0ba SHA1 361099c9b2997d552744f383fea259312590eb0f SHA256 4540048186b1c1805b02d7d4740b89c498ea5e71a313b6592e469087bb4f0e9f
+MD5 09e151f3b14f0d0c0cc73d6afeb45bfa files/pptpd-1.3.4-more-reodering-fixes.patch 2340
+RMD160 9322b15ead0ac585e7bb1a7bae8536e09f52c0ba files/pptpd-1.3.4-more-reodering-fixes.patch 2340
+SHA256 4540048186b1c1805b02d7d4740b89c498ea5e71a313b6592e469087bb4f0e9f files/pptpd-1.3.4-more-reodering-fixes.patch 2340
+AUX pptpd-confd 131 RMD160 cd7483c023adbb5d5e1aa6ed3b14114af5035790 SHA1 208d224be1e91f6e7d13b1c4cb451f92bbc55b94 SHA256 4d69da546e36439dc1a7cb5abb949ad48046155752c047babb5472decdfa1958
+MD5 bff575819b8997e7bbe743b95cb134cb files/pptpd-confd 131
+RMD160 cd7483c023adbb5d5e1aa6ed3b14114af5035790 files/pptpd-confd 131
+SHA256 4d69da546e36439dc1a7cb5abb949ad48046155752c047babb5472decdfa1958 files/pptpd-confd 131
+AUX pptpd-init 386 RMD160 e496308edea338dfbd89016ae02aeb11db4fb0e0 SHA1 6b7c053a76c6e95f26b792e7b88b490e8ec433eb SHA256 17e78d810690dbbe0738d9f146b6b58e7b45f19ec545be630f1bf338869a86f4
+MD5 96fed26a1a72e947d12edda983f74d16 files/pptpd-init 386
+RMD160 e496308edea338dfbd89016ae02aeb11db4fb0e0 files/pptpd-init 386
+SHA256 17e78d810690dbbe0738d9f146b6b58e7b45f19ec545be630f1bf338869a86f4 files/pptpd-init 386
+DIST pptpd-1.3.4.tar.gz 240942 RMD160 1c6c748bf9e81d223087998ee0cca821814d19f9 SHA1 3d1faf99055e420bafa96c96e8871a888c50b4e8 SHA256 c23a9bdd219a0a36ae7ca20e7c9749f2efdcdbf108aabeeeb5066ba442ec88b6
+EBUILD pptpd-1.3.4.ebuild 1586 RMD160 5a854bb6619efcff876050f51734a34a1f6c053e SHA1 7ee0a51dbdc7be80372180e98c56deacf97967f3 SHA256 7ecf74da81ed95b8051c0a58987f8294babce2ef38ad2b22da99072bf0aff02c
+MD5 984159a26c8dca623000dd7b0adba630 pptpd-1.3.4.ebuild 1586
+RMD160 5a854bb6619efcff876050f51734a34a1f6c053e pptpd-1.3.4.ebuild 1586
+SHA256 7ecf74da81ed95b8051c0a58987f8294babce2ef38ad2b22da99072bf0aff02c pptpd-1.3.4.ebuild 1586
+MISC ChangeLog 4184 RMD160 30e118bb7468a50a1d8febc7c60d513990536066 SHA1 f325f92fbfbd714bd000ed48ce3cf6da91f0041c SHA256 2b70ce38af0bc6731d3288ec5fbce5ff7d4efa35beb28c586e9ba9e05aec4758
+MD5 8c73c4709c21e68ca09696a6d29d2acb ChangeLog 4184
+RMD160 30e118bb7468a50a1d8febc7c60d513990536066 ChangeLog 4184
+SHA256 2b70ce38af0bc6731d3288ec5fbce5ff7d4efa35beb28c586e9ba9e05aec4758 ChangeLog 4184
+MISC metadata.xml 163 RMD160 df94c60cc0bb7abe5913b464a33966b142b2fe1e SHA1 d8332605fd22c32f15438bbdf24aa622c3d2738a SHA256 1137a0fd866641cf719b0c2e9e77ca9fa4541a42f2cc851fe4659cf2677acca3
+MD5 ec2f84816306825d125d0c01bd86758d metadata.xml 163
+RMD160 df94c60cc0bb7abe5913b464a33966b142b2fe1e metadata.xml 163
+SHA256 1137a0fd866641cf719b0c2e9e77ca9fa4541a42f2cc851fe4659cf2677acca3 metadata.xml 163
+MD5 e5ddeb1570473fa562efe63fd712e4cc files/digest-pptpd-1.3.4 235
+RMD160 d7e10bd24879d0f28b3cbfce99cb781b721719b0 files/digest-pptpd-1.3.4 235
+SHA256 399c7e4355eb78a8d2fff6feaeba1f33866a507c48b8137dfb02102832c754ce files/digest-pptpd-1.3.4 235
diff --git a/net-dialup/files/digest-pptpd-1.3.4 b/net-dialup/files/digest-pptpd-1.3.4
new file mode 100644
index 0000000..4030abc
--- /dev/null
+++ b/net-dialup/files/digest-pptpd-1.3.4
@@ -0,0 +1,3 @@
+MD5 b38df9c431041922c997c1148bedf591 pptpd-1.3.4.tar.gz 240942
+RMD160 1c6c748bf9e81d223087998ee0cca821814d19f9 pptpd-1.3.4.tar.gz 240942
+SHA256 c23a9bdd219a0a36ae7ca20e7c9749f2efdcdbf108aabeeeb5066ba442ec88b6 pptpd-1.3.4.tar.gz 240942
diff --git a/net-dialup/files/pptpd-1.3.4-gentoo.patch b/net-dialup/files/pptpd-1.3.4-gentoo.patch
new file mode 100644
index 0000000..36ebea7
--- /dev/null
+++ b/net-dialup/files/pptpd-1.3.4-gentoo.patch
@@ -0,0 +1,57 @@
+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
+-COPTS = -O2 -g
+-CFLAGS = $(COPTS) -I.. -I../../include -fPIC
++CFLAGS += -I.. -I../../include -fPIC
+ 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
+@@ -405,9 +405,11 @@
+ }
+ /* check for out-of-order sequence number */
+ if (seq == gre.seq_recv + 1) {
++#ifdef LOG_DEBUG_GRE_ACCEPTING_PACKET
+ if (pptpctrl_debug)
+ syslog(LOG_DEBUG, "GRE: accepting packet #%d",
+ seq);
++#endif
+ stats.rx_accepted++;
+ gre.seq_recv = seq;
+ return cb(cl, buffer + ip_len + headersize, payload_len);
+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/files/pptpd-1.3.4-more-reodering-fixes.patch b/net-dialup/files/pptpd-1.3.4-more-reodering-fixes.patch
new file mode 100644
index 0000000..67da66e
--- /dev/null
+++ b/net-dialup/files/pptpd-1.3.4-more-reodering-fixes.patch
@@ -0,0 +1,58 @@
+diff -Naur pptpd-1.3.4.orig/ChangeLog pptpd-1.3.4/ChangeLog
+--- pptpd-1.3.4.orig/ChangeLog 2007-04-16 04:32:45.000000000 +0400
++++ pptpd-1.3.4/ChangeLog 2007-05-01 21:42:12.000000000 +0400
+@@ -1,3 +1,17 @@
++Tue Apr 24 13:11:28 2007 Phil Oester <kernel@linuxace.com>
++
++ * pptpgre.c (decaps_gre): further testing has revealed a couple
++ more problems with the packet reordering/buffering code:
++
++ 1) Some clients (notably the PPTP client) start their sequence
++ numbers at 1 instead of 0 as the RFC mandates. My previous fix
++ caused problems with these clients.
++
++ 2) Duplicate packets were causing corruption when they were placed
++ on the queue but never used -or- when they were placed on the
++ queue but already existed on the queue (i.e. they previously
++ arrived out of order).
++
+ Mon Apr 16 10:32:40 2007 James Cameron <quozl@us.netrek.org>
+
+ * pptpd-1.3.4.tar.gz: released.
+diff -Naur pptpd-1.3.4.orig/NEWS pptpd-1.3.4/NEWS
+--- pptpd-1.3.4.orig/NEWS 2007-04-16 04:32:20.000000000 +0400
++++ pptpd-1.3.4/NEWS 2007-05-01 21:42:15.000000000 +0400
+@@ -1,3 +1,5 @@
++- fix reordering some more [Oester]
++
+ 1.3.4: released 2007-04-16
+
+ - fix two release critical packet reordering bugs [Oester]
+diff -Naur pptpd-1.3.4.orig/pptpgre.c pptpd-1.3.4/pptpgre.c
+--- pptpd-1.3.4.orig/pptpgre.c 2007-05-01 21:35:31.000000000 +0400
++++ pptpd-1.3.4/pptpgre.c 2007-05-01 21:41:17.000000000 +0400
+@@ -403,8 +403,13 @@
+ stats.rx_truncated++;
+ return 0;
+ }
+- /* check for out-of-order sequence number */
+- if (seq == gre.seq_recv + 1) {
++ /* check for out-of-order sequence number
++ * N.B.: some client implementations violate RFC 2637
++ * and start their sequence numbers at 1 instead of 0,
++ * so we have to introduce a kludge to deal with it.
++ * on wrap we may allow an out of order packet to pass
++ */
++ if (seq == gre.seq_recv + 1 || seq == 1) {
+ #ifdef LOG_DEBUG_GRE_ACCEPTING_PACKET
+ if (pptpctrl_debug)
+ syslog(LOG_DEBUG, "GRE: accepting packet #%d",
+@@ -413,7 +418,7 @@
+ stats.rx_accepted++;
+ gre.seq_recv = seq;
+ return cb(cl, buffer + ip_len + headersize, payload_len);
+- } else if (seq == gre.seq_recv) {
++ } else if (!seq_greater(seq, gre.seq_recv)) {
+ if (pptpctrl_debug)
+ syslog(LOG_DEBUG,
+ "GRE: discarding duplicate or old packet #%d (expecting #%d)",
diff --git a/net-dialup/files/pptpd-confd b/net-dialup/files/pptpd-confd
new file mode 100644
index 0000000..1169e57
--- /dev/null
+++ b/net-dialup/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/files/pptpd-init b/net-dialup/files/pptpd-init
new file mode 100755
index 0000000..117e324
--- /dev/null
+++ b/net-dialup/files/pptpd-init
@@ -0,0 +1,20 @@
+#!/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 /var/run/pptpd.pid
+ result=$?
+ start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/pptpctrl
+ result=$(( $result + $? ))
+ eend $result
+}
diff --git a/net-dialup/metadata.xml b/net-dialup/metadata.xml
new file mode 100644
index 0000000..1e11e7b
--- /dev/null
+++ b/net-dialup/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/pptpd-1.3.4.ebuild b/net-dialup/pptpd-1.3.4.ebuild
new file mode 100644
index 0000000..5634762
--- /dev/null
+++ b/net-dialup/pptpd-1.3.4.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/pptpd/pptpd-1.3.3.ebuild,v 1.3 2007/04/22 00:13:15 mrness Exp $
+
+inherit eutils autotools flag-o-matic
+
+DESCRIPTION="Linux Point-to-Point Tunnelling Protocol Server"
+SRC_URI="mirror://sourceforge/poptop/${P}.tar.gz"
+HOMEPAGE="http://www.poptop.org/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE="tcpd gre-extreme-debug"
+
+DEPEND="net-dialup/ppp
+ tcpd? ( sys-apps/tcp-wrappers )"
+
+src_unpack() {
+ unpack ${A}
+
+ epatch "${FILESDIR}/${P}-gentoo.patch"
+ epatch "${FILESDIR}/${P}-more-reodering-fixes.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}\":" "${S}/plugins/patchlevel.h"
+
+ eautomake
+}
+
+src_compile() {
+ use gre-extreme-debug && append-flags "-DLOG_DEBUG_GRE_ACCEPTING_PACKET"
+ local myconf
+ use tcpd && myconf="--with-libwrap"
+ econf --enable-bcrelay \
+ ${myconf} || die "configure failed"
+ emake COPTS="${CFLAGS}" || die "make failed"
+}
+
+src_install () {
+ einstall || die "make install failed"
+
+ insinto /etc
+ doins samples/pptpd.conf
+
+ insinto /etc/ppp
+ doins samples/options.pptpd
+
+ newinitd "${FILESDIR}/pptpd-init" pptpd
+ newconfd "${FILESDIR}/pptpd-confd" pptpd
+
+ dodoc AUTHORS ChangeLog NEWS README* TODO
+ docinto samples
+ dodoc samples/*
+}