summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Popov <pinkbyte@gentoo.org>2020-07-08 12:30:29 +0300
committerSergey Popov <pinkbyte@gentoo.org>2020-07-08 12:43:38 +0300
commit79eb49c4b63ab163c6633247610596195f237bda (patch)
tree48d3636adb3b9a8019f2dcc6e4bbcf7eb25eddaa /net-vpn
parentnet-proxy/haproxy: Bump to 2.0.15, 2.2.0 and 2.2.9999 (diff)
downloadgentoo-79eb49c4b63ab163c6633247610596195f237bda.tar.gz
gentoo-79eb49c4b63ab163c6633247610596195f237bda.tar.bz2
gentoo-79eb49c4b63ab163c6633247610596195f237bda.zip
net-vpn/pptpd: revision bump
Fix library path for plugins Fix building with Musl Closes: https://bugs.gentoo.org/716210 Closes: https://bugs.gentoo.org/730068 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Sergey Popov <pinkbyte@gentoo.org>
Diffstat (limited to 'net-vpn')
-rw-r--r--net-vpn/pptpd/files/pptpd-1.4.0-libdir.patch24
-rw-r--r--net-vpn/pptpd/files/pptpd-1.4.0-musl.patch16
-rw-r--r--net-vpn/pptpd/pptpd-1.4.0-r3.ebuild81
3 files changed, 121 insertions, 0 deletions
diff --git a/net-vpn/pptpd/files/pptpd-1.4.0-libdir.patch b/net-vpn/pptpd/files/pptpd-1.4.0-libdir.patch
new file mode 100644
index 000000000000..898c3aea89dc
--- /dev/null
+++ b/net-vpn/pptpd/files/pptpd-1.4.0-libdir.patch
@@ -0,0 +1,24 @@
+diff -r -U 3 pptpd-1.4.0.orig/Makefile.am pptpd-1.4.0/Makefile.am
+--- pptpd-1.4.0.orig/Makefile.am 2020-06-29 00:24:23.301857353 +0300
++++ pptpd-1.4.0/Makefile.am 2020-06-29 00:25:16.072686760 +0300
+@@ -11,7 +11,7 @@
+ ## warning with -Wmissing-prototypes).
+ ## -Wmissing-prototypes removed (eg, Linux 2.2.6 headers
+ ## aren't up to it).
+-CFLAGS += -fno-builtin -Wall -DSBINDIR='"$(sbindir)"'
++CFLAGS += -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -DLIBDIR='"$(libdir)"'
+ #CFLAGS = -O2 -fno-builtin -Wall -ansi -DSBINDIR='"$(sbindir)"'
+ #CFLAGS = -O2 -fno-builtin -Wall -ansi -pedantic -Wmissing-prototypes -Werror -DSBINDIR='"$(sbindir)"'
+
+diff -r -U 3 pptpd-1.4.0.orig/pptpctrl.c pptpd-1.4.0/pptpctrl.c
+--- pptpd-1.4.0.orig/pptpctrl.c 2013-10-23 08:53:19.000000000 +0400
++++ pptpd-1.4.0/pptpctrl.c 2020-06-29 00:25:23.356525131 +0300
+@@ -786,7 +786,7 @@
+
+ if (pptp_logwtmp) {
+ pppd_argv[an++] = "plugin";
+- pppd_argv[an++] = "/usr/lib/pptpd/pptpd-logwtmp.so";
++ pppd_argv[an++] = LIBDIR "/pptpd/pptpd-logwtmp.so";
+ pppd_argv[an++] = "pptpd-original-ip";
+ pppd_argv[an++] = inet_ntoa(inetaddrs[1]);
+ }
diff --git a/net-vpn/pptpd/files/pptpd-1.4.0-musl.patch b/net-vpn/pptpd/files/pptpd-1.4.0-musl.patch
new file mode 100644
index 000000000000..998a07acf7e9
--- /dev/null
+++ b/net-vpn/pptpd/files/pptpd-1.4.0-musl.patch
@@ -0,0 +1,16 @@
+Modified patch from Alpine Linux
+https://git.alpinelinux.org/aports/plain/main/pptpd/fix_MSG_TRYHARD.patch
+
+--- a/bcrelay.c
++++ b/bcrelay.c
+@@ -103,6 +103,10 @@
+ #include "our_syslog.h"
+ #include "our_getopt.h"
+
++#ifndef MSG_TRYHARD
++ #define MSG_TRYHARD MSG_DONTROUTE
++#endif
++
+ //#define VERSION "1.0"
+
+ /* uncomment if you compile this without poptop's configure script */
diff --git a/net-vpn/pptpd/pptpd-1.4.0-r3.ebuild b/net-vpn/pptpd/pptpd-1.4.0-r3.ebuild
new file mode 100644
index 000000000000..17768c52b760
--- /dev/null
+++ b/net-vpn/pptpd/pptpd-1.4.0-r3.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools eutils flag-o-matic toolchain-funcs
+
+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 )
+
+PATCHES=(
+ "${FILESDIR}/${P}-gentoo.patch"
+ "${FILESDIR}/${P}-sandbox-fix.patch"
+ "${FILESDIR}/${P}-pidfile.patch"
+ "${FILESDIR}/${P}-libdir.patch"
+ "${FILESDIR}/${P}-musl.patch"
+)
+
+src_prepare() {
+ # 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
+
+ # configure.in is actually configure.ac
+ mv configure.in configure.ac || die
+
+ # Automake 1.13 compatibility, bug #469476
+ sed -i -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADER/' configure.ac || 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
+
+ # Call to default src_prepare to apply patches
+ default
+
+ 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
+}