View | Details | Raw Unified | Return to bug 185701
Collapse All | Expand All

(-)net/poptop/Makefile (-18 / +26 lines)
Lines 2-38 Link Here
2
# $FreeBSD: head/net/poptop/Makefile 327755 2013-09-20 22:10:23Z bapt $
2
# $FreeBSD: head/net/poptop/Makefile 327755 2013-09-20 22:10:23Z bapt $
3
3
4
PORTNAME=	poptop
4
PORTNAME=	poptop
5
PORTVERSION=	1.3.4
5
PORTVERSION=	1.4.0
6
PORTREVISION=	3
7
CATEGORIES=	net
6
CATEGORIES=	net
8
MASTER_SITES=	SF/${PORTNAME}/pptpd/pptpd-${PORTVERSION}
7
MASTER_SITES=	SF/${PORTNAME}/pptpd/pptpd-${PORTVERSION} \
9
DISTNAME=	pptpd-${PORTVERSION:S/.b/-b/}
8
		SAMBA/ppp:pppd
9
DISTFILES=	pptpd-${PORTVERSION}${EXTRACT_SUFX} \
10
		${PPPD_DISTNAME}${EXTRACT_SUFX}:pppd
10
11
11
MAINTAINER=	ports@FreeBSD.org
12
MAINTAINER=	ports@FreeBSD.org
12
COMMENT=	Windows 9x compatible PPTP (VPN) server
13
COMMENT=	Windows 9x compatible PPTP (VPN) server
13
14
14
USE_GMAKE=	yes
15
LICENSE=	GPLv2
16
LICENSE_DISTFILES=	pptpd-${PORTVERSION}${EXTRACT_SUFX}
17
18
OPTIONS_DEFINE=	KERNPPP
19
KERNPPP_DESC=	Use kernel-space PPP
20
21
WRKSRC=		${WRKDIR}/pptpd-${PORTVERSION}
22
23
USES=		gmake
15
GNU_CONFIGURE=	yes
24
GNU_CONFIGURE=	yes
16
MAKE_ARGS=	ACLOCAL="${TRUE}" AUTOCONF="${TRUE}" AUTOMAKE="${TRUE}" \
25
CONFIGURE_ARGS=	--with-libwrap
17
		AUTOHEADER="${TRUE}"
18
26
19
USE_RC_SUBR=	pptpd
27
USE_RC_SUBR=	pptpd
20
28
21
MAN5=		pptpd.conf.5
29
CFLAGS+=	-I${WRKDIR}/${PPPD_DISTNAME}
22
MAN8=		pptpd.8 pptpctrl.8
30
31
KERNPPP_CONFIGURE_OFF=	--with-bsdppp
32
33
PPPD_DISTNAME=	ppp-2.4.5
23
34
24
.if !defined(WITH_KERNPPP)
35
.include <bsd.port.options.mk>
25
CONFIGURE_ARGS+=	--with-bsdppp
26
.endif
27
36
28
NO_STAGE=	yes
29
post-patch:
37
post-patch:
30
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/pptpctrl.c
38
.for i in pptpctrl.c pptpd.8 pptpd.conf.5
31
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/pptpd.8
39
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/${i}
32
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/pptpd.conf.5
40
.endfor
33
41
34
post-install:
42
post-install:
35
	${INSTALL_DATA} ${WRKSRC}/samples/pptpd.conf \
43
	(cd ${WRKSRC}/samples && ${INSTALL_DATA} pptpd.conf \
36
		${PREFIX}/etc/pptpd.conf.sample
44
		${STAGEDIR}${PREFIX}/etc/pptpd.conf.sample)
37
45
38
.include <bsd.port.mk>
46
.include <bsd.port.mk>
(-)net/poptop/distinfo (-2 / +4 lines)
Lines 1-2 Link Here
1
SHA256 (pptpd-1.3.4.tar.gz) = c23a9bdd219a0a36ae7ca20e7c9749f2efdcdbf108aabeeeb5066ba442ec88b6
1
SHA256 (pptpd-1.4.0.tar.gz) = 8fcd8b8a42de2af59e9fe8cbaa9f894045c977f4d038bbd6346a8522bb7f06c0
2
SIZE (pptpd-1.3.4.tar.gz) = 240942
2
SIZE (pptpd-1.4.0.tar.gz) = 252167
3
SHA256 (ppp-2.4.5.tar.gz) = 43317afec9299f9920b96f840414c977f0385410202d48e56d2fdb8230003505
4
SIZE (ppp-2.4.5.tar.gz) = 684342
(-)net/poptop/files/patch-Makefile.in (-9 / +9 lines)
Lines 1-6 Link Here
1
--- Makefile.in.orig	Mon Apr 16 03:10:27 2007
1
--- Makefile.in.orig	2013-10-23 16:02:37.000000000 +0900
2
+++ Makefile.in	Sat Jun 16 11:21:50 2007
2
+++ Makefile.in	2013-10-25 01:27:18.000000000 +0900
3
@@ -35,7 +35,7 @@
3
@@ -50,7 +50,7 @@
4
 PRE_UNINSTALL = :
4
 PRE_UNINSTALL = :
5
 POST_UNINSTALL = :
5
 POST_UNINSTALL = :
6
 EXTRA_PROGRAMS =
6
 EXTRA_PROGRAMS =
Lines 9-15 Link Here
9
 subdir = .
9
 subdir = .
10
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
10
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
11
 	$(srcdir)/Makefile.in $(srcdir)/config.h.in \
11
 	$(srcdir)/Makefile.in $(srcdir)/config.h.in \
12
@@ -75,8 +75,8 @@
12
@@ -90,8 +90,8 @@
13
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
13
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
14
 CCLD = $(CC)
14
 CCLD = $(CC)
15
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
15
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
Lines 17-30 Link Here
17
-DIST_SOURCES = $(bcrelay_SOURCES) $(pptpctrl_SOURCES) $(pptpd_SOURCES)
17
-DIST_SOURCES = $(bcrelay_SOURCES) $(pptpctrl_SOURCES) $(pptpd_SOURCES)
18
+SOURCES = $(pptpctrl_SOURCES) $(pptpd_SOURCES)
18
+SOURCES = $(pptpctrl_SOURCES) $(pptpd_SOURCES)
19
+DIST_SOURCES = $(pptpctrl_SOURCES) $(pptpd_SOURCES)
19
+DIST_SOURCES = $(pptpctrl_SOURCES) $(pptpd_SOURCES)
20
 man5dir = $(mandir)/man5
20
 am__can_run_installinfo = \
21
 man8dir = $(mandir)/man8
21
   case $$AM_UPDATE_INFO_DIR in \
22
 NROFF = nroff
22
     n|no|NO) false;; \
23
@@ -182,6 +182,7 @@
23
@@ -241,6 +241,7 @@
24
 # We have our own, simpler dependencies stuff in 'reconf'
24
 # We have our own, simpler dependencies stuff in 'reconf'
25
 AUTOMAKE_OPTIONS = no-dependencies foreign
25
 AUTOMAKE_OPTIONS = no-dependencies foreign
26
 INCLUDES = -I.
26
 INCLUDES = -I.
27
+CFLAGS= @CFLAGS@ -fno-builtin -DSBINDIR='"$(sbindir)"' -DETCDIR='"$(sysconfdir)"'
27
+CFLAGS= @CFLAGS@ -fno-builtin -DSBINDIR='"$(sbindir)"' -DETCDIR='"$(sysconfdir)"'
28
 #CFLAGS = -O2 -fno-builtin -Wall -ansi -DSBINDIR='"$(sbindir)"'
28
 #CFLAGS = -O2 -fno-builtin -Wall -ansi -DSBINDIR='"$(sbindir)"'
29
 #CFLAGS = -O2 -fno-builtin -Wall -ansi -pedantic -Wmissing-prototypes -Werror -DSBINDIR='"$(sbindir)"'
29
 #CFLAGS = -O2 -fno-builtin -Wall -ansi -pedantic -Wmissing-prototypes -Werror -DSBINDIR='"$(sbindir)"'
30
 man_MANS = pptpctrl.8 pptpd.8 pptpd.conf.5
30
 man_MANS = pptpctrl.8 pptpd.8 pptpd.conf.5 bcrelay.8
(-)net/poptop/files/patch-defaults.h (-7 / +8 lines)
Lines 1-17 Link Here
1
--- defaults.h.orig	Thu Mar  7 19:09:42 2002
1
--- defaults.h.orig	Thu Mar  7 19:09:42 2002
2
+++ defaults.h	Sun Sep  8 10:19:58 2002
2
+++ defaults.h	Sun Sep  8 10:19:58 2002
3
@@ -40,10 +40,14 @@
3
@@ -38,11 +38,15 @@
4
 #endif
4
 #endif
5
 
5
 
6
 #define PPP_SPEED_DEFAULT		"115200"
6
 #define PPP_SPEED_DEFAULT               "115200"
7
+#ifdef __FreeBSD__
7
+#ifdef __FreeBSD__
8
+#define PPTPD_CONFIG_FILE_DEFAULT	ETCDIR "/pptpd.conf"
8
+#define PPTPD_CONFIG_FILE_DEFAULT       ETCDIR "/pptpd.conf"
9
+#else
9
+#else
10
 #if EMBED
10
 #if EMBED
11
 #define PPTPD_CONFIG_FILE_DEFAULT	"/etc/config/pptpd.conf"
11
 #define PPTPD_CONFIG_FILE_DEFAULT       "/etc/config/pptpd.conf"
12
 #else
12
 #else
13
 #define PPTPD_CONFIG_FILE_DEFAULT	"/etc/pptpd.conf"
13
 #define PPTPD_CONFIG_FILE_DEFAULT       "/etc/pptpd.conf"
14
+#endif
15
 #endif
14
 #endif
16
 #define PIDFILE_DEFAULT			"/var/run/pptpd.pid"
15
+#endif
16
 #define PIDFILE_DEFAULT                 "/var/run/pptpd.pid"
17
 
17
 
18
 #define STIMEOUT_DEFAULT                10 /* seconds */
(-)net/poptop/files/patch-plugins_Makefile (-2 / +19 lines)
Lines 3-16 Link Here
3
@@ -1,10 +1,10 @@
3
@@ -1,10 +1,10 @@
4
-CC	= gcc
4
-CC	= gcc
5
-COPTS	= -O2 -g
5
-COPTS	= -O2 -g
6
-CFLAGS	= $(COPTS) -I.. -I../../include -fPIC
6
+CC	?= gcc
7
+CC	?= gcc
7
+CPP	?= $(CXX)
8
+CPP	?= $(CXX)
8
 CFLAGS	= $(COPTS) -I.. -I../../include -fPIC
9
+CFLAGS	+= $(COPTS) -I.. -I../../include -fPIC
9
 LDFLAGS	= -shared
10
 LDFLAGS	= -shared
10
 LDADD   = -lutil
11
 LDADD   = -lutil
11
 INSTALL	= install -o root
12
-INSTALL	= install -o root
12
-prefix  = /usr/local
13
-prefix  = /usr/local
14
+INSTALL	?= install -o root
13
+prefix  = $(PREFIX)
15
+prefix  = $(PREFIX)
14
 
16
 
15
 PLUGINS = pptpd-logwtmp.so
17
 PLUGINS = pptpd-logwtmp.so
16
 
18
 
19
@@ -18,11 +18,11 @@
20
 %.so: %.c
21
 	$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ $(LDADD)
22
 
23
-LIBDIR	?= $(DESTDIR)$(prefix)/lib/pptpd
24
+LIBDIR	?= $(prefix)/lib/pptpd
25
 
26
 install: $(PLUGINS)
27
-	$(INSTALL) -d $(LIBDIR)
28
-	$(INSTALL) $? $(LIBDIR)
29
+	$(INSTALL) -d $(DESTDIR)$(LIBDIR)
30
+	$(INSTALL) $? $(DESTDIR)$(LIBDIR)
31
 
32
 uninstall:
33
 	rm -f $(LIBDIR)$(PLUGINS)
(-)net/poptop/files/patch-plugins_pptpd-logwtmp.c (-1 / +1 lines)
Lines 6-10 Link Here
6
 #include <unistd.h>
6
 #include <unistd.h>
7
-#include <utmp.h>
7
-#include <utmp.h>
8
 #include <string.h>
8
 #include <string.h>
9
 #include "pppd.h"
9
 #include <pppd/pppd.h>
10
 
10
 
(-)net/poptop/files/patch-pptpctrl.c (-44 / +31 lines)
Lines 1-52 Link Here
1
--- pptpctrl.c.orig	Fri Dec  8 01:01:40 2006
1
--- pptpctrl.c.orig	Fri Dec  8 01:01:40 2006
2
+++ pptpctrl.c	Tue Jul 31 07:56:19 2007
2
+++ pptpctrl.c	Tue Jul 31 07:56:19 2007
3
@@ -150,8 +150,13 @@
3
@@ -163,8 +163,13 @@
4
 			syslog(LOG_DEBUG, "CTRL: remote address = %s", pppRemote);
4
                         syslog(LOG_DEBUG, "CTRL: remote address = %s", pppRemote);
5
 		if (*speed)
5
                 if (*speed)
6
 			syslog(LOG_DEBUG, "CTRL: pppd speed = %s", speed);
6
                         syslog(LOG_DEBUG, "CTRL: pppd speed = %s", speed);
7
+#if BSDUSER_PPP
7
+#if BSDUSER_PPP
8
+		if (*pppdxfig)
8
+                if (*pppdxfig)
9
+			syslog(LOG_DEBUG, "CTRL: BSD userland ppp system label = %s", pppdxfig);
9
+                        syslog(LOG_DEBUG, "CTRL: BSD userland ppp system label = %s", pppdxfig);
10
+#else
10
+#else
11
 		if (*pppdxfig)
11
                 if (*pppdxfig)
12
 			syslog(LOG_DEBUG, "CTRL: pppd options file = %s", pppdxfig);
12
                         syslog(LOG_DEBUG, "CTRL: pppd options file = %s", pppdxfig);
13
+#endif
13
+#endif
14
 	}
14
         }
15
 
15
 
16
 	addrlen = sizeof(addr);
16
         addrlen = sizeof(addr);
17
@@ -693,14 +698,19 @@
17
@@ -708,14 +713,19 @@
18
 
18
 
19
 	/* options for BSDUSER_PPP
19
         /* options for BSDUSER_PPP
20
 	 *
20
          *
21
-	 * ignores IP addresses, config file option, speed
21
-         * ignores IP addresses, config file option, speed
22
-	 * fix usage info in pptpd.c and configure script if this changes
22
-         * fix usage info in pptpd.c and configure script if this changes
23
+	 * Ignore IP addresses and line speed
23
+         * Ignore IP addresses and line speed
24
+	 * Use -o or --option string as PPP system label
24
+         * Use -o or --option string as PPP system label
25
+	 * Usage info in pptpd.c and configure script have been updated to
25
+         * Usage info in pptpd.c and configure script have been updated to
26
+	 * reflect this change
26
+         * reflect this change
27
 	 *
27
          *
28
 	 * IP addresses can be specified in /etc/ppp/ppp.secret per user
28
          * IP addresses can be specified in /etc/ppp/ppp.secret per user
29
 	 */
29
          */
30
 	pppd_argv[an++] = "-direct";
30
         pppd_argv[an++] = "-direct";
31
-	pppd_argv[an++] = "pptp";	/* XXX this is the system name */
31
-        pppd_argv[an++] = "pptp";       /* XXX this is the system name */
32
-	/* should be dynamic - PMG */
32
-        /* should be dynamic - PMG */
33
+	if (*pppdxfig) {
33
+        if (*pppdxfig) {
34
+		pppd_argv[an++] = pppdxfig;
34
+                pppd_argv[an++] = pppdxfig;
35
+	} else {
35
+        } else {
36
+		pppd_argv[an++] = "pptp";       /* XXX this is the system label */
36
+                pppd_argv[an++] = "pptp";       /* XXX this is the system label */
37
+	}
37
+        }
38
 
38
 
39
 #elif SLIRP
39
 #elif SLIRP
40
 
40
 
41
@@ -764,7 +774,6 @@
41
@@ -786,7 +796,7 @@
42
 		sprintf(pppInterfaceIPs, "%s:%s", pppaddrs[0], pppaddrs[1]);
43
 		pppd_argv[an++] = pppInterfaceIPs;
44
 	}
45
-#endif
46
 
47
         if (!noipparam) {
48
                  pppd_argv[an++] = "ipparam";
49
@@ -773,10 +782,12 @@
50
 
42
 
51
         if (pptp_logwtmp) {
43
         if (pptp_logwtmp) {
52
                  pppd_argv[an++] = "plugin";
44
                  pppd_argv[an++] = "plugin";
Lines 55-62 Link Here
55
                  pppd_argv[an++] = "pptpd-original-ip";
47
                  pppd_argv[an++] = "pptpd-original-ip";
56
                  pppd_argv[an++] = inet_ntoa(inetaddrs[1]);
48
                  pppd_argv[an++] = inet_ntoa(inetaddrs[1]);
57
         }
49
         }
58
+
59
+#endif
60
 
61
 	/* argv arrays must always be NULL terminated */
62
 	pppd_argv[an++] = NULL;
(-)net/poptop/files/patch-pptpd.c (-31 / +33 lines)
Lines 1-45 Link Here
1
--- pptpd.c.orig	2006-09-05 01:17:25.000000000 +0200
1
--- pptpd.c.orig	2006-09-05 01:17:25.000000000 +0200
2
+++ pptpd.c	2008-11-27 22:09:53.000000000 +0100
2
+++ pptpd.c	2008-11-27 22:09:53.000000000 +0100
3
@@ -98,18 +98,21 @@
3
@@ -110,18 +110,21 @@
4
 	printf(" [-i] [--noipparam]        Suppress the passing of the client's IP address\n");
4
 #define OPT_VRFA ""
5
 	printf("                           to PPP, which is done by default otherwise.\n");
5
 #define OPT_VRF ""
6
 	printf(" [-l] [--listen x.x.x.x]   Specifies IP of local interface to listen to.\n");
6
 #endif
7
-#if !defined(BSDUSER_PPP)
7
-#if !defined(BSDUSER_PPP)
8
+#ifdef BSDUSER_PPP
8
+#ifdef BSDUSER_PPP
9
+	printf(" [-o] [--option file]      Specifies the userland PPP system label to use\n");
9
+        printf(" [-o] [--option file]      Specifies the userland PPP system label to use\n");
10
+	printf("                           (default is pptp).\n");
10
+        printf("                           (default is pptp).\n");
11
+#else
11
+#else
12
 	printf(" [-o] [--option file]      Specifies the PPP options file to use\n");
12
         printf(" [-o] [--option file]      Specifies the PPP options file to use\n");
13
 	printf("                           (default is /etc/ppp/options).\n");
13
         printf("                           (default is /etc/ppp/options).\n");
14
 #endif
14
 #endif
15
 	printf(" [-p] [--pidfile file]     Specifies the file to write the process ID to\n");
15
         printf(" [-p] [--pidfile file]     Specifies the file to write the process ID to\n");
16
-	printf("                           (default is /var/run/pptpd.pid).\n");
16
-        printf("                           (default is /var/run/pptpd.pid).\n");
17
+	printf("                           (default is %s).\n",PIDFILE_DEFAULT);
17
+        printf("                           (default is %s).\n",PIDFILE_DEFAULT);
18
 #if !defined(BSDUSER_PPP)
18
 #if !defined(BSDUSER_PPP)
19
 	printf(" [-s] [--speed baud]       Specifies the baud speed for the PPP daemon\n");
19
         printf(" [-s] [--speed baud]       Specifies the baud speed for the PPP daemon\n");
20
-	printf("                           (default is 115200).\n");
20
-        printf("                           (default is 115200).\n");
21
+	printf("                           (default is %s).\n",PPP_SPEED_DEFAULT);
21
+        printf("                           (default is %s).\n",PPP_SPEED_DEFAULT);
22
 #endif
22
 #endif
23
 	printf(" [-t] [--stimeout seconds] Specifies the timeout for the first packet. This is a DOS protection\n");
23
         printf(" [-t] [--stimeout seconds] Specifies the timeout for the first packet. This is a DOS protection\n");
24
-	printf("                           (default is 10).\n");
24
-        printf("                           (default is 10).\n");
25
+	printf("                           (default is %d).\n",STIMEOUT_DEFAULT);
25
+        printf("                           (default is %s).\n",STIMEOUT_DEFAULT);
26
 	printf(" [-v] [--version]          Displays the pptpd version number.\n");
26
         printf(" [-v] [--version]          Displays the pptpd version number.\n");
27
 	printf(" [-w] [--logwtmp]          Update wtmp as users login.\n");
27
         printf(" [-w] [--logwtmp]          Update wtmp as users login.\n");
28
 	printf(" [-C] [--connections n]    Limit on number of connections.\n");
28
         printf(" [-C] [--connections n]    Limit on number of connections.\n");
29
@@ -375,11 +378,16 @@
29
@@ -395,12 +398,18 @@
30
 		return 1;
30
                        ppp_binary);
31
 	}
31
                 return 1;
32
 	/* check that the PPP options file is readable */
32
         }
33
+
34
         /* check that the PPP options file is readable */
33
+        /* If -o or --option is being used to specify BSD userland
35
+        /* If -o or --option is being used to specify BSD userland
34
+           PPP system label, it makes no sense to check the option string to
36
+           PPP system label, it makes no sense to check the option string to
35
+           see if it is the name of a readable file. */
37
+           see if it is the name of a readable file. */
36
+#if !defined(BSDUSER_PPP)
38
+#if !defined(BSDUSER_PPP)
37
 	if (pppdoptstr && access(pppdoptstr, R_OK) < 0) {
39
         if (pppdoptstr && access(pppdoptstr, R_OK) < 0) {
38
 		syslog(LOG_ERR, "MGR: PPP options file %s not readable",
40
                 syslog(LOG_ERR, "MGR: PPP options file %s not readable",
39
 		       pppdoptstr);
41
                        pppdoptstr);
40
 		return 1;
42
                 return 1;
41
 	}
43
         }
42
+#endif
44
+#endif
43
 #ifdef BCRELAY
45
 #ifdef BCRELAY
44
 	/* check that the bcrelay binary is executable */
46
         /* check that the bcrelay binary is executable */
45
 	if (bcrelay && access(BCRELAY_BIN, X_OK) < 0) {
47
         if (bcrelay && access(BCRELAY_BIN, X_OK) < 0) {
(-)net/poptop/pkg-descr (+2 lines)
Lines 1-2 Link Here
1
PoPToP is a PPTP daemon. It is compatible with the Microsoft Windows
1
PoPToP is a PPTP daemon. It is compatible with the Microsoft Windows
2
VPN adapter.
2
VPN adapter.
3
4
WWW: http://poptop.sourceforge.net/
(-)net/poptop/pkg-plist (-5 / +8 lines)
Lines 1-6 Link Here
1
@unexec %D/etc/rc.d/pptpd.sh stop > /dev/null 2>&1 || true
2
sbin/pptpd
3
sbin/pptpctrl
4
lib/pptpd/pptpd-logwtmp.so
5
etc/pptpd.conf.sample
1
etc/pptpd.conf.sample
6
@dirrmtry lib/pptpd
2
lib/pptpd/pptpd-logwtmp.so
3
man/man5/pptpd.conf.5.gz
4
man/man8/bcrelay.8.gz
5
man/man8/pptpctrl.8.gz
6
man/man8/pptpd.8.gz
7
sbin/pptpctrl
8
sbin/pptpd
9
@dirrm lib/pptpd

Return to bug 185701