aboutsummaryrefslogtreecommitdiff
path: root/security/racoon2
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2018-12-21 02:09:30 +0000
committerCy Schubert <cy@FreeBSD.org>2018-12-21 02:09:30 +0000
commit6fe9356dacf07454dcdca76a1a17b84079d2e6f7 (patch)
tree677e4860f3f4b6dca9970f0e892b8a377ae8f1c4 /security/racoon2
parent684598feb69c329edc8fd4e9c5062043fe85e012 (diff)
downloadports-6fe9356dacf07454dcdca76a1a17b84079d2e6f7.tar.gz
ports-6fe9356dacf07454dcdca76a1a17b84079d2e6f7.zip
Notes
Diffstat (limited to 'security/racoon2')
-rw-r--r--security/racoon2/Makefile55
-rw-r--r--security/racoon2/distinfo5
-rw-r--r--security/racoon2/files/patch-configure20
-rw-r--r--security/racoon2/files/patch-kinkd-Makefile.in38
-rw-r--r--security/racoon2/files/patch-kinkd-configure11
-rw-r--r--security/racoon2/files/patch-kinkd_pathnames.h11
-rw-r--r--security/racoon2/files/patch-lib-cfparse.y11
-rw-r--r--security/racoon2/files/patch-lib-cftoken.l17
-rw-r--r--security/racoon2/files/patch-lib_if__pfkkeyv2.h10
-rw-r--r--security/racoon2/files/patch-pskgen-Makefile.in17
-rw-r--r--security/racoon2/files/patch-pskgen-pskgen.in13
-rw-r--r--security/racoon2/files/patch-samples-Makefile.in19
-rw-r--r--security/racoon2/files/patch-samples-rc.d-iked.in9
-rw-r--r--security/racoon2/files/patch-samples-rc.d-kinkd.in4
-rw-r--r--security/racoon2/files/patch-samples-rc.d-spmd.in9
-rw-r--r--security/racoon2/files/patch-samples_Makefile.in33
-rw-r--r--security/racoon2/files/patch-samples_hook_Makefile.in45
-rw-r--r--security/racoon2/files/patch-samples_hook_child-down.d_Makefile.in17
-rw-r--r--security/racoon2/files/patch-samples_hook_child-up.d_Makefile.in19
-rw-r--r--security/racoon2/files/patch-samples_hook_ikesa-up.d_Makefile.in13
-rw-r--r--security/racoon2/files/patch-samples_rc.d_Makefile.in19
-rw-r--r--security/racoon2/files/patch-spmd-Makefile.in89
-rw-r--r--security/racoon2/pkg-plist9
23 files changed, 360 insertions, 133 deletions
diff --git a/security/racoon2/Makefile b/security/racoon2/Makefile
index c2c77ff6f4f1..fa8dbd810c4e 100644
--- a/security/racoon2/Makefile
+++ b/security/racoon2/Makefile
@@ -2,49 +2,54 @@
# $FreeBSD$
PORTNAME= racoon2
-PORTVERSION= 20100526a
-PORTREVISION= 13
+PORTVERSION= ${RACOON2_COMMIT_DATE}
CATEGORIES= security net ipv6
-MASTER_SITES= ftp://ftp.racoon2.wide.ad.jp/pub/racoon2/
+HASH= 5c4af73
+RACOON2_COMMIT_DATE=20181215
MAINTAINER= cy@FreeBSD.org
COMMENT= Racoon2 IPsec daemon
-USES= perl5 tar:tgz ssl
-CONFIGURE_ARGS+= --disable-kinkd
-PLIST_SUB+= KINK="@comment "
+USE_GITHUB= yes
+GH_ACCOUNT= zoulasc
+GH_TAGNAME= ${HASH}
+
+USES= autoreconf:build perl5 tar:tgz ssl
+CONFIGURE_ARGS+= --enable-natt \
+ --prefix=${PREFIX}
GNU_CONFIGURE= yes
CONFIGURE_ENV= YACC=/usr/bin/yacc perl_bindir=${LOCALBASE}/bin/perl5
+# MAKE_ENV= DESTDIR=${DESTDIR}
+
+CFLAGS= -DHAVE_CONFIG_H
+
OPTIONS_DEFINE= DOCS
-OPTIONS_RADIO= KERBEROS
-OPTIONS_RADIO_KERBEROS= KRB5 KRB5_114 \
- HEIMDAL_PORTS HEIMDAL_BASE
+OPTIONS_DEFAULT= DOCS NO_KRB
+OPTIONS_SINGLE= KERBEROS
+OPTIONS_SINGLE_KERBEROS= NO_KRB KRB5 HEIMDAL_PORT HEIMDAL_BASE
+NO_KRB_DESC= No Kerberos support
KRB5_DESC= Build with Kerberos (security/krb5)
-KRB5_114_DESC= Build with Kerberos (security/krb5-114)
-HEIM_AL_PORTS_DESC= Build with Heimdal in ports (security/heimdal)
+HEIMDAL_PORT_DESC= Build with Heimdal in ports (security/heimdal)
HEIMDAL_BASE_DESC= Build with Heimdal in base
+NO_KRB_CONFIGURE_ON= --disable-kinkd
+NO_KRB_MAKE_ENV= WITH_KINK=no
+NO_KRB_PLIST_SUB= KINK="@comment "
+NO_KRB_VARS= KINK=no
+
KRB5_USES= gssapi:mit
KRB5_CONFIGURE_ON= --enable-kinkd
-KRB5_MAKE_ENV= WITH_KINK=yes
+KRB5_MAKE_ENV= WITH_KINK=yes
KRB5_PLIST_SUB= KINK=""
KRB5_LIB_DEPENDS= libkrb5support.so:security/krb5
KRB5_RUN_DEPENDS= kinit:security/krb5
KRB5_VARS= KINK=yes
-KRB5_114_USES= gssapi:mit
-KRB5_114_CONFIGURE_ON= --enable-kinkd
-KRB5_114_MAKE_ENV= WITH_KINK=yes
-KRB5_114_PLIST_SUB= KINK=""
-KRB5_114_LIB_DEPENDS= libkrb5support.so:security/krb5-114
-KRB5_114_RUN_DEPENDS= kinit:security/krb5-114
-KRB5_114_VARS= KINK=yes
-
HEIMDAL_PORT_USES= gssapi:heimdal
-HEIMDAL_PORTS_CONFIGURE_ON= --enable-kinkd
-HEIMDAL_PORTS_MAKE_ENV= WITH_KINK=yes
+HEIMDAL_PORT_CONFIGURE_ON= --enable-kinkd
+HEIMDAL_PORT_MAKE_ENV= WITH_KINK=yes
HEIMDAL_PORT_PLIST_SUB= KINK=""
HEIMDAL_PORT_VARS= KINK=yes
@@ -67,11 +72,9 @@ PORTDOCS+= kinkd-install.ja.txt kinkd-state-txn.obj
.endif
post-patch:
- @${FIND} ${WRKSRC} -name Makefile.in -exec ${REINPLACE_CMD} \
- -e '/INSTALL/s|\$$([a-z0-9]*dir)|$$(DESTDIR)&|' \
- -e '/INSTALL/s|\$$(prefix)|$$(DESTDIR)&|' {} +
- @${REINPLACE_CMD} 's|/var/run/racoon2|$$(DESTDIR)&|' \
+ # @${REINPLACE_CMD} 's|/var/run/racoon2|$$(STAGEDIR)&|' \
${WRKSRC}/samples/Makefile.in
+ @${LN} -sf ${LOCALBASE}/share/automake-1.16/ylwrap ${WRKSRC}/lib
post-patch-DOCS-on:
.for FILE in ${PORTDOCS}
diff --git a/security/racoon2/distinfo b/security/racoon2/distinfo
index c1330d84af32..9abd99624c9e 100644
--- a/security/racoon2/distinfo
+++ b/security/racoon2/distinfo
@@ -1,2 +1,3 @@
-SHA256 (racoon2-20100526a.tgz) = f23773e4d97cec823ec634085b5e60a7884a13467ff1bffc17daac14d02f9caa
-SIZE (racoon2-20100526a.tgz) = 1017077
+TIMESTAMP = 1539958190
+SHA256 (zoulasc-racoon2-20181215-5c4af73_GH0.tar.gz) = 9cce3857e0c16e284d2b4141ff2e6a3acf11f8401536a258bd9a1bec484bedb3
+SIZE (zoulasc-racoon2-20181215-5c4af73_GH0.tar.gz) = 1365031
diff --git a/security/racoon2/files/patch-configure b/security/racoon2/files/patch-configure
index 7aeabe270233..cf0943fe3d4b 100644
--- a/security/racoon2/files/patch-configure
+++ b/security/racoon2/files/patch-configure
@@ -1,19 +1,19 @@
---- configure.orig 2008-07-06 02:41:34 UTC
-+++ configure
-@@ -785,7 +785,7 @@ if test x"$enable_startup_scripts" = xyes; then
+--- configure.orig 2018-08-15 21:36:53.000000000 -0700
++++ configure 2018-10-19 07:12:40.370712000 -0700
+@@ -3740,7 +3740,7 @@
netbsd*1.[56]*|netbsd*[2-9].*)
- startup_scripts=rc-d
+ startup_scripts=rc.d
;;
- freebsd[5-9].*)
+ freebsd[5-9].*|freebsd[1-4][0-9].*)
- startup_scripts=rc-d
+ startup_scripts=rc.d
;;
*)
-@@ -1126,6 +1126,7 @@ rm -fr confdefs* $ac_clean_files
- test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
+@@ -5132,6 +5132,7 @@
+ # CONFIG_SUBDIRS section.
+ #
if test "$no_recursion" != yes; then
+ac_given_INSTALL="$INSTALL"
- # Remove --cache-file and --srcdir arguments so they do not pile up.
- ac_sub_configure_args=
+ # Remove --cache-file, --srcdir, and --disable-option-checking arguments
+ # so they do not pile up.
diff --git a/security/racoon2/files/patch-kinkd-Makefile.in b/security/racoon2/files/patch-kinkd-Makefile.in
index 99db513fcbae..51598a007316 100644
--- a/security/racoon2/files/patch-kinkd-Makefile.in
+++ b/security/racoon2/files/patch-kinkd-Makefile.in
@@ -1,9 +1,35 @@
---- kinkd/Makefile.in~ 2006-01-11 11:38:55.000000000 +0900
-+++ kinkd/Makefile.in 2009-11-22 10:39:25.000000000 +0900
-@@ -68,3 +68,7 @@
-
- .PHONY: .depend
- @IF_GMAKE@-include .depend
+--- kinkd/Makefile.in.orig 2018-08-15 21:36:53.000000000 -0700
++++ kinkd/Makefile.in 2018-12-15 13:47:35.410335000 -0800
+@@ -109,7 +109,7 @@
+ PROGRAMS = $(sbin_PROGRAMS)
+ am_kinkd_OBJECTS = main.$(OBJEXT) kink_fmt.$(OBJEXT) \
+ kink_crypto.$(OBJEXT) bbkk_common.$(OBJEXT) \
+- bbkk_heimdal.$(OBJEXT) session.$(OBJEXT) base.$(OBJEXT) \
++ bbkk_$(KRB5_TYPE).$(OBJEXT) session.$(OBJEXT) base.$(OBJEXT) \
+ dpd.$(OBJEXT) peer.$(OBJEXT) handle.$(OBJEXT) \
+ algorithm.$(OBJEXT) crypto_openssl.$(OBJEXT) oakley.$(OBJEXT) \
+ ipsec_doi.$(OBJEXT) isakmp.$(OBJEXT) isakmp_quick.$(OBJEXT) \
+@@ -333,7 +333,7 @@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ kinkd_SOURCES = main.c \
+- kink_fmt.c kink_crypto.c bbkk_common.c bbkk_heimdal.c \
++ kink_fmt.c kink_crypto.c bbkk_common.c bbkk_$(KRB5_TYPE).c \
+ session.c base.c dpd.c peer.c handle.c \
+ algorithm.c crypto_openssl.c oakley.c \
+ ipsec_doi.c isakmp.c isakmp_quick.c isakmp_inf.c proposal.c \
+@@ -457,6 +457,7 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bbkk_common.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bbkk_heimdal.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bbkk_mit.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypto_openssl.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dpd.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/etchosts.Po@am__quote@
+@@ -902,3 +903,7 @@
+ # 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:
+
+# override default .c.o rule in case it doesn't include CPPFLAGS (FreeBSD)
+.c.o:
diff --git a/security/racoon2/files/patch-kinkd-configure b/security/racoon2/files/patch-kinkd-configure
deleted file mode 100644
index 961ac1713751..000000000000
--- a/security/racoon2/files/patch-kinkd-configure
+++ /dev/null
@@ -1,11 +0,0 @@
---- kinkd/configure- 2009-11-22 10:28:45.000000000 +0900
-+++ kinkd/configure 2009-11-22 10:28:56.000000000 +0900
-@@ -2055,7 +2055,7 @@
-
- else
- echo "$ac_t""no" 1>&6
--LIBS="$LIBS -ldes"; cat >> confdefs.h <<\EOF
-+LIBS="$LIBS -lhx509"; cat >> confdefs.h <<\EOF
- #define HAVE_LIBDES 1
- EOF
-
diff --git a/security/racoon2/files/patch-kinkd_pathnames.h b/security/racoon2/files/patch-kinkd_pathnames.h
new file mode 100644
index 000000000000..01d1ea0f80ce
--- /dev/null
+++ b/security/racoon2/files/patch-kinkd_pathnames.h
@@ -0,0 +1,11 @@
+--- kinkd/pathnames.h.orig 2018-08-15 21:36:53.000000000 -0700
++++ kinkd/pathnames.h 2018-12-15 10:53:06.611652000 -0800
+@@ -30,7 +30,7 @@
+
+ #define PIDFILE_DIR "/var/run"
+ #define CACHE_DIR "/var/run" /* or "/var/db" */
+-#define RACOON2_CONFIG_FILE SYSCONFDIR "/racoon2.conf"
++#define RACOON2_CONFIG_FILE "SYSCONFDIR/racoon2.conf"
+
+ #ifdef MAKE_KINK_LIST_FILE
+ #define KINK_LIST_FILE "/var/run/kink-handle.list"
diff --git a/security/racoon2/files/patch-lib-cfparse.y b/security/racoon2/files/patch-lib-cfparse.y
deleted file mode 100644
index f154166d428f..000000000000
--- a/security/racoon2/files/patch-lib-cfparse.y
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/cfparse.y- 2013-12-21 11:29:53.328819029 +0900
-+++ lib/cfparse.y 2013-12-21 11:30:25.058283579 +0900
-@@ -1712,7 +1712,7 @@
- int n;
- char *bp;
- struct cf_list *new;
-- rcf_t type;
-+ rc_type type;
-
- n = strtoll(str, &bp, 10);
-
diff --git a/security/racoon2/files/patch-lib-cftoken.l b/security/racoon2/files/patch-lib-cftoken.l
index b6d49a03adf6..ff592024978e 100644
--- a/security/racoon2/files/patch-lib-cftoken.l
+++ b/security/racoon2/files/patch-lib-cftoken.l
@@ -1,17 +1,8 @@
---- lib/cftoken.l- 2013-12-21 11:31:18.701191439 +0900
-+++ lib/cftoken.l 2013-12-21 11:33:51.653300338 +0900
-@@ -53,7 +53,7 @@
- extern int yyget_lineno (void);
- extern FILE *yyget_in (void);
- extern FILE *yyget_out (void);
--extern int yyget_leng (void);
-+extern yy_size_t yyget_leng (void);
- extern char *yyget_text (void);
- extern void yyset_lineno (int);
- extern void yyset_in (FILE *);
-@@ -78,7 +78,7 @@
+--- lib/cftoken.l.orig 2018-08-15 21:36:53.000000000 -0700
++++ lib/cftoken.l 2018-10-19 12:15:39.256861000 -0700
+@@ -81,7 +81,7 @@
if (cf_debug) { \
- fprintf(CF_ERRDEV, "%s:%d:%d[%s] len=%d\n", \
+ fprintf(CF_ERRDEV, "%s:%d:%d[%s] len=%zu\n", \
rcf_istk[rcf_istkp].path, rcf_istk[rcf_istkp].lineno, \
- yy_start, yytext, yyleng); \
+ yy_start, yytext, (int)yyleng); \
diff --git a/security/racoon2/files/patch-lib_if__pfkkeyv2.h b/security/racoon2/files/patch-lib_if__pfkkeyv2.h
new file mode 100644
index 000000000000..2c0630a7375e
--- /dev/null
+++ b/security/racoon2/files/patch-lib_if__pfkkeyv2.h
@@ -0,0 +1,10 @@
+--- lib/if_pfkeyv2.h.orig 2018-08-15 21:36:53.000000000 -0700
++++ lib/if_pfkeyv2.h 2018-10-19 12:48:45.115311000 -0700
+@@ -29,6 +29,7 @@
+ * SUCH DAMAGE.
+ */
+
++#include "config.h"
+ #include <sys/socket.h>
+ #ifdef HAVE_NET_PFKEYV2_H
+ # include <net/pfkeyv2.h>
diff --git a/security/racoon2/files/patch-pskgen-Makefile.in b/security/racoon2/files/patch-pskgen-Makefile.in
index d2c90bb0941d..dee94d5a3d14 100644
--- a/security/racoon2/files/patch-pskgen-Makefile.in
+++ b/security/racoon2/files/patch-pskgen-Makefile.in
@@ -1,10 +1,11 @@
---- pskgen/Makefile.in.orig 2007-12-11 23:12:22.000000000 -0800
-+++ pskgen/Makefile.in 2014-07-04 13:38:23.919692384 -0700
-@@ -21,7 +21,6 @@
- $(INSTALL_SCRIPT) $(PROG) $(sbindir)
- $(INSTALL_DATA) $(PROG).8 $(mandir)/man8
- $(INSTALL) -d $(prefix)/etc/racoon2
-- sh ./autogen.spmd.pwd
+--- pskgen/Makefile.in.orig 2018-08-15 21:36:53.000000000 -0700
++++ pskgen/Makefile.in 2018-12-19 23:35:20.908316000 -0800
+@@ -530,8 +530,6 @@
+
- depend:
+ install-exec-hook:
+- $(INSTALL) -d $(sysconfdir)
+- sh ./autogen.spmd.pwd
+ # 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.
diff --git a/security/racoon2/files/patch-pskgen-pskgen.in b/security/racoon2/files/patch-pskgen-pskgen.in
deleted file mode 100644
index 4326c9fdd20d..000000000000
--- a/security/racoon2/files/patch-pskgen-pskgen.in
+++ /dev/null
@@ -1,13 +0,0 @@
---- pskgen/pskgen.in.orig 2005-09-15 23:52:20.000000000 -0700
-+++ pskgen/pskgen.in 2016-07-18 12:59:05.207263000 -0700
-@@ -59,8 +59,8 @@
- exit 0;
- }
-
--require 'getopts.pl';
--do Getopts('rs:o:di:he:d');
-+use Getopt::Std;
-+getopts('rs:o:di:he:d') or &usage;
- $output = '-';
- $output = $opt_o if ($opt_o);
-
diff --git a/security/racoon2/files/patch-samples-Makefile.in b/security/racoon2/files/patch-samples-Makefile.in
deleted file mode 100644
index 471732166552..000000000000
--- a/security/racoon2/files/patch-samples-Makefile.in
+++ /dev/null
@@ -1,19 +0,0 @@
---- samples/Makefile.in.orig 2007-12-27 10:08:52.000000000 +0900
-+++ samples/Makefile.in 2008-04-17 19:06:11.000000000 +0900
-@@ -29,11 +29,11 @@
- $(INSTALL) -d -m 700 $(sysconfdir)/cert
-
- install-startup-rc-d:
-- $(INSTALL) -d $(sysconfdir)/rc.d
-- $(INSTALL_SCRIPT) rc.d-iked $(sysconfdir)/rc.d/iked
-- $(INSTALL_SCRIPT) rc.d-kinkd $(sysconfdir)/rc.d/kinkd
-- $(INSTALL_SCRIPT) rc.d-spmd $(sysconfdir)/rc.d/spmd
-- $(INSTALL_SCRIPT) rc.d-racoon2 $(sysconfdir)/rc.d/racoon2
-+ $(INSTALL_SCRIPT) rc.d-iked $(prefix)/etc/rc.d/iked
-+.if defined (WITH_KINK)
-+ $(INSTALL_SCRIPT) rc.d-kinkd $(prefix)/etc/rc.d/kinkd
-+.endif
-+ $(INSTALL_SCRIPT) rc.d-spmd $(prefix)/etc/rc.d/spmd
-
- install-startup-init-d:
- $(INSTALL) -d $(sysconfdir)/init.d
diff --git a/security/racoon2/files/patch-samples-rc.d-iked.in b/security/racoon2/files/patch-samples-rc.d-iked.in
index 84878d92325e..653f2dc0afa7 100644
--- a/security/racoon2/files/patch-samples-rc.d-iked.in
+++ b/security/racoon2/files/patch-samples-rc.d-iked.in
@@ -1,14 +1,11 @@
---- samples/rc.d-iked.in.orig 2005-10-28 06:33:16 UTC
-+++ samples/rc.d-iked.in
-@@ -10,14 +10,16 @@
+--- samples/rc.d/iked.in.orig 2018-08-15 21:36:53.000000000 -0700
++++ samples/rc.d/iked.in 2018-10-19 12:32:15.579253000 -0700
+@@ -10,11 +10,13 @@
. /etc/rc.subr
+: ${iked_enable="NO"}
+
- prefix=@prefix@
- exec_prefix=@exec_prefix@
-
name="iked"
-rcvar=$name
+rcvar=iked_enable
diff --git a/security/racoon2/files/patch-samples-rc.d-kinkd.in b/security/racoon2/files/patch-samples-rc.d-kinkd.in
index 1db90288a603..70ab9e4a278b 100644
--- a/security/racoon2/files/patch-samples-rc.d-kinkd.in
+++ b/security/racoon2/files/patch-samples-rc.d-kinkd.in
@@ -1,5 +1,5 @@
---- samples/rc.d-kinkd.in.orig 2005-10-28 15:33:16.000000000 +0900
-+++ samples/rc.d-kinkd.in 2008-04-17 15:11:55.000000000 +0900
+--- samples/rc.d/kinkd.in.orig 2005-10-28 15:33:16.000000000 +0900
++++ samples/rc.d/kinkd.in 2008-04-17 15:11:55.000000000 +0900
@@ -14,10 +14,10 @@
exec_prefix=@exec_prefix@
diff --git a/security/racoon2/files/patch-samples-rc.d-spmd.in b/security/racoon2/files/patch-samples-rc.d-spmd.in
index 2f29224c436e..a39c5672aaae 100644
--- a/security/racoon2/files/patch-samples-rc.d-spmd.in
+++ b/security/racoon2/files/patch-samples-rc.d-spmd.in
@@ -1,14 +1,11 @@
---- samples/rc.d-spmd.in.orig 2007-07-11 00:59:30 UTC
-+++ samples/rc.d-spmd.in
-@@ -9,11 +9,13 @@
+--- samples/rc.d/spmd.in.orig 2018-08-15 21:36:53.000000000 -0700
++++ samples/rc.d/spmd.in 2018-10-19 12:35:43.735681000 -0700
+@@ -9,8 +9,10 @@
. /etc/rc.subr
+: ${spmd_enable="NO"}
+
- prefix=@prefix@
- exec_prefix=@exec_prefix@
-
name="spmd"
-rcvar=$name
+rcvar=spmd_enable
diff --git a/security/racoon2/files/patch-samples_Makefile.in b/security/racoon2/files/patch-samples_Makefile.in
new file mode 100644
index 000000000000..18429dfb2d88
--- /dev/null
+++ b/security/racoon2/files/patch-samples_Makefile.in
@@ -0,0 +1,33 @@
+--- samples/Makefile.in.orig 2018-12-19 18:42:30.245769000 -0800
++++ samples/Makefile.in 2018-12-19 18:49:43.857886000 -0800
+@@ -594,18 +594,18 @@
+
+ install-exec-hook:
+ $(INSTALL) -d -o 0 -g 0 -m 700 $(DESTDIR)/var/run/racoon2
+- $(INSTALL) -d $(sysconfdir)
+- $(INSTALL) -m 600 racoon2.conf $(sysconfdir)/racoon2.conf.sample
+- $(INSTALL) -m 600 vals.conf $(sysconfdir)/vals.conf.sample
+- $(INSTALL) -m 600 default.conf $(sysconfdir)/default.conf.sample
+- $(INSTALL) -m 600 transport_ike.conf $(sysconfdir)/transport_ike.conf.sample
+- $(INSTALL) -m 600 tunnel_ike.conf $(sysconfdir)/tunnel_ike.conf.sample
+- $(INSTALL) -m 600 tunnel_ike_natt.conf $(sysconfdir)/tunnel_ike_natt.conf.sample
+- $(INSTALL) -m 600 transport_kink.conf $(sysconfdir)/transport_kink.conf.sample
+- $(INSTALL) -m 600 tunnel_kink.conf $(sysconfdir)/tunnel_kink.conf.sample
+- $(INSTALL) -m 600 local-test.conf $(sysconfdir)/local-test.conf.sample
+- $(INSTALL) -d -m 700 $(sysconfdir)/psk
+- $(INSTALL) -d -m 700 $(sysconfdir)/cert
++ $(INSTALL) -d $(DESTDIR)/$(sysconfdir)
++ $(INSTALL) -m 600 racoon2.conf $(DESTDIR)/$(sysconfdir)/racoon2.conf.sample
++ $(INSTALL) -m 600 vals.conf $(DESTDIR)/$(sysconfdir)/vals.conf.sample
++ $(INSTALL) -m 600 default.conf $(DESTDIR)/$(sysconfdir)/default.conf.sample
++ $(INSTALL) -m 600 transport_ike.conf $(DESTDIR)/$(sysconfdir)/transport_ike.conf.sample
++ $(INSTALL) -m 600 tunnel_ike.conf $(DESTDIR)/$(sysconfdir)/tunnel_ike.conf.sample
++ $(INSTALL) -m 600 tunnel_ike_natt.conf $(DESTDIR)/$(sysconfdir)/tunnel_ike_natt.conf.sample
++ $(INSTALL) -m 600 transport_kink.conf $(DESTDIR)/$(sysconfdir)/transport_kink.conf.sample
++ $(INSTALL) -m 600 tunnel_kink.conf $(DESTDIR)/$(sysconfdir)/tunnel_kink.conf.sample
++ $(INSTALL) -m 600 local-test.conf $(DESTDIR)/$(sysconfdir)/local-test.conf.sample
++ $(INSTALL) -d -m 700 $(DESTDIR)/$(sysconfdir)/psk
++ $(INSTALL) -d -m 700 $(DESTDIR)/$(sysconfdir)/cert
+
+ # 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.
diff --git a/security/racoon2/files/patch-samples_hook_Makefile.in b/security/racoon2/files/patch-samples_hook_Makefile.in
new file mode 100644
index 000000000000..18ce98a3b836
--- /dev/null
+++ b/security/racoon2/files/patch-samples_hook_Makefile.in
@@ -0,0 +1,45 @@
+--- samples/hook/Makefile.in.orig 2018-08-15 21:36:53.000000000 -0700
++++ samples/hook/Makefile.in 2018-12-19 20:28:41.411352000 -0800
+@@ -611,22 +611,26 @@
+
+
+ install-exec-hook:
+- $(INSTALL) -d $(sysconfdir)/hook
+- $(INSTALL_DATA) functions $(sysconfdir)/hook
+- $(INSTALL) -d $(sysconfdir)/hook/ikesa-up.d
+- $(INSTALL_SCRIPT) ikesa-up $(sysconfdir)/hook
+- $(INSTALL) -d $(sysconfdir)/hook/ikesa-down.d
+- $(INSTALL_SCRIPT) ikesa-down $(sysconfdir)/hook
+- $(INSTALL) -d $(sysconfdir)/hook/ikesa-rekey.d
+- $(INSTALL_SCRIPT) ikesa-rekey $(sysconfdir)/hook
+- $(INSTALL) -d $(sysconfdir)/hook/child-up.d
+- $(INSTALL_SCRIPT) child-up $(sysconfdir)/hook
+- $(INSTALL) -d $(sysconfdir)/hook/child-down.d
+- $(INSTALL_SCRIPT) child-down $(sysconfdir)/hook
+- $(INSTALL) -d $(sysconfdir)/hook/child-rekey.d
+- $(INSTALL_SCRIPT) child-rekey $(sysconfdir)/hook
+- $(INSTALL) -d $(sysconfdir)/hook/migration.d
+- $(INSTALL_SCRIPT) migration $(sysconfdir)/hook
++ $(INSTALL) -d $(DESTDIR)/$(sysconfdir)/hook
++ $(INSTALL_DATA) functions $(DESTDIR)/$(sysconfdir)/hook
++ $(INSTALL) -d $(DESTDIR)/$(sysconfdir)/hook/ikesa-up.d
++ $(INSTALL_SCRIPT) ikesa-up $(DESTDIR)/$(sysconfdir)/hook
++ $(INSTALL) -d $(DESTDIR)/$(sysconfdir)/hook/ikesa-down.d
++ $(INSTALL_SCRIPT) ikesa-down $(DESTDIR)/$(sysconfdir)/hook
++ $(INSTALL) -d $(DESTDIR)/$(sysconfdir)/hook/ikesa-rekey.d
++ $(INSTALL_SCRIPT) ikesa-rekey $(DESTDIR)/$(sysconfdir)/hook
++ $(INSTALL) -d $(DESTDIR)/$(sysconfdir)/hook/child-up.d
++ $(INSTALL_SCRIPT) child-up $(DESTDIR)/$(sysconfdir)/hook
++ $(INSTALL) -d $(DESTDIR)/$(sysconfdir)/hook/child-down.d
++ $(INSTALL_SCRIPT) child-down $(DESTDIR)/$(sysconfdir)/hook
++ $(INSTALL) -d $(DESTDIR)/$(sysconfdir)/hook/child-rekey.d
++ $(INSTALL_SCRIPT) child-rekey $(DESTDIR)/$(sysconfdir)/hook
++ $(INSTALL) -d $(DESTDIR)/$(sysconfdir)/hook/migration.d
++ $(INSTALL_SCRIPT) migration $(DESTDIR)/$(sysconfdir)/hook
++ $(INSTALL) -d $(DESTDIR)/$(sysconfdir)/hook/ph1-down.d
++ $(INSTALL_SCRIPT) ph1-down $(DESTDIR)/$(sysconfdir)/hook
++ $(INSTALL) -d $(DESTDIR)/$(sysconfdir)/hook/ph1-up.d
++ $(INSTALL_SCRIPT) ph1-up $(DESTDIR)/$(sysconfdir)/hook
+
+ # 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.
diff --git a/security/racoon2/files/patch-samples_hook_child-down.d_Makefile.in b/security/racoon2/files/patch-samples_hook_child-down.d_Makefile.in
new file mode 100644
index 000000000000..a956cd22d9f3
--- /dev/null
+++ b/security/racoon2/files/patch-samples_hook_child-down.d_Makefile.in
@@ -0,0 +1,17 @@
+--- samples/hook/child-down.d/Makefile.in.orig 2018-08-15 21:36:53.000000000 -0700
++++ samples/hook/child-down.d/Makefile.in 2018-12-19 22:39:38.279682000 -0800
+@@ -405,10 +405,10 @@
+
+
+ install-exec-hook:
+- $(INSTALL) -d $(sysconfdir)/hook/child-down.d
+- $(INSTALL_DATA) 01setkey $(sysconfdir)/hook/child-down.d
+- $(INSTALL_DATA) 02ifconfig-gif $(sysconfdir)/hook/child-down.d
+- $(INSTALL_DATA) 03arp $(sysconfdir)/hook/child-down.d
++ $(INSTALL) -d $(DESTDIR)/$(sysconfdir)/hook/child-down.d
++ $(INSTALL_DATA) 01setkey $(DESTDIR)/$(sysconfdir)/hook/child-down.d
++ $(INSTALL_DATA) 02ifconfig-gif $(DESTDIR)/$(sysconfdir)/hook/child-down.d
++ $(INSTALL_DATA) 03arp $(DESTDIR)/$(sysconfdir)/hook/child-down.d
+
+ # 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.
diff --git a/security/racoon2/files/patch-samples_hook_child-up.d_Makefile.in b/security/racoon2/files/patch-samples_hook_child-up.d_Makefile.in
new file mode 100644
index 000000000000..02b6c68f1484
--- /dev/null
+++ b/security/racoon2/files/patch-samples_hook_child-up.d_Makefile.in
@@ -0,0 +1,19 @@
+--- samples/hook/child-up.d/Makefile.in.orig 2018-08-15 21:36:53.000000000 -0700
++++ samples/hook/child-up.d/Makefile.in 2018-12-19 19:18:25.771791000 -0800
+@@ -405,11 +405,11 @@
+
+
+ install-exec-hook:
+- $(INSTALL) -d $(sysconfdir)/hook/child-up.d
+- $(INSTALL_DATA) 00childup_sample $(sysconfdir)/hook/child-up.d
+- $(INSTALL_DATA) 01setkey $(sysconfdir)/hook/child-up.d
+- $(INSTALL_DATA) 02ifconfig-gif $(sysconfdir)/hook/child-up.d
+- $(INSTALL_DATA) 03arp $(sysconfdir)/hook/child-up.d
++ $(INSTALL) -d $(DESTDIR)/$(sysconfdir)/hook/child-up.d
++ $(INSTALL_DATA) 00childup_sample $(DESTDIR)/$(sysconfdir)/hook/child-up.d
++ $(INSTALL_DATA) 01setkey $(DESTDIR)/$(sysconfdir)/hook/child-up.d
++ $(INSTALL_DATA) 02ifconfig-gif $(DESTDIR)/$(sysconfdir)/hook/child-up.d
++ $(INSTALL_DATA) 03arp $(DESTDIR)/$(sysconfdir)/hook/child-up.d
+
+ # 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.
diff --git a/security/racoon2/files/patch-samples_hook_ikesa-up.d_Makefile.in b/security/racoon2/files/patch-samples_hook_ikesa-up.d_Makefile.in
new file mode 100644
index 000000000000..b305357a5780
--- /dev/null
+++ b/security/racoon2/files/patch-samples_hook_ikesa-up.d_Makefile.in
@@ -0,0 +1,13 @@
+--- samples/hook/ikesa-up.d/Makefile.in.orig 2018-08-15 21:36:53.000000000 -0700
++++ samples/hook/ikesa-up.d/Makefile.in 2018-12-19 20:22:29.223583000 -0800
+@@ -405,8 +405,8 @@
+
+
+ install-exec-hook:
+- $(INSTALL) -d $(sysconfdir)/hook/ikesa-up.d
+- $(INSTALL_DATA) 00ikesaup_sample $(sysconfdir)/hook/ikesa-up.d
++ $(INSTALL) -d $(DESTDIR)/$(sysconfdir)/hook/ikesa-up.d
++ $(INSTALL_DATA) 00ikesaup_sample $(DESTDIR)/$(sysconfdir)/hook/ikesa-up.d
+
+ # 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.
diff --git a/security/racoon2/files/patch-samples_rc.d_Makefile.in b/security/racoon2/files/patch-samples_rc.d_Makefile.in
new file mode 100644
index 000000000000..829946633df6
--- /dev/null
+++ b/security/racoon2/files/patch-samples_rc.d_Makefile.in
@@ -0,0 +1,19 @@
+--- samples/rc.d/Makefile.in.orig 2018-08-15 21:36:53.000000000 -0700
++++ samples/rc.d/Makefile.in 2018-12-18 20:45:22.072125000 -0800
+@@ -414,11 +414,11 @@
+
+
+ install-exec-hook:
+- $(INSTALL) -d $(sysconfdir)/rc.d
+- $(INSTALL_SCRIPT) iked $(sysconfdir)/rc.d/iked
+- $(INSTALL_SCRIPT) kinkd $(sysconfdir)/rc.d/kinkd
+- $(INSTALL_SCRIPT) spmd $(sysconfdir)/rc.d/spmd
+- $(INSTALL_SCRIPT) racoon2 $(sysconfdir)/rc.d/racoon2
++ $(INSTALL) -d $(DESTDIR)/${PREFIX}/etc/rc.d
++ $(INSTALL_SCRIPT) iked $(DESTDIR)/${PREFIX}/etc/rc.d/iked
++ $(INSTALL_SCRIPT) kinkd $(DESTDIR)/${PREFIX}/etc/rc.d/kinkd
++ $(INSTALL_SCRIPT) spmd $(DESTDIR)/${PREFIX}/etc/rc.d/spmd
++ $(INSTALL_SCRIPT) racoon2 $(DESTDIR)/${PREFIX}/etc/rc.d/racoon2
+
+ # 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.
diff --git a/security/racoon2/files/patch-spmd-Makefile.in b/security/racoon2/files/patch-spmd-Makefile.in
new file mode 100644
index 000000000000..28eed3e9e1a4
--- /dev/null
+++ b/security/racoon2/files/patch-spmd-Makefile.in
@@ -0,0 +1,89 @@
+--- spmd/Makefile.in.orig 2018-08-15 21:36:53.000000000 -0700
++++ spmd/Makefile.in 2018-12-19 13:07:42.520771000 -0800
+@@ -70,6 +70,9 @@
+ test $$has_opt = yes
+ am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+ am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
++am__base_list = \
++ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
++ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+ pkgdatadir = $(datadir)/@PACKAGE@
+ pkgincludedir = $(includedir)/@PACKAGE@
+ pkglibdir = $(libdir)/@PACKAGE@
+@@ -140,6 +143,7 @@
+ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+ am__v_CCLD_0 = @echo " CCLD " $@;
+ am__v_CCLD_1 =
++man8dir = $(mandir)/man8
+ SOURCES = $(spmd_SOURCES) spmdctl.c
+ DIST_SOURCES = $(spmd_SOURCES) spmdctl.c
+ am__can_run_installinfo = \
+@@ -284,7 +288,7 @@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ AM_CPPFLAGS = -DSYSCONFDIR=\"${sysconfdir}\"
+-MAN_MANS = spmd.8 spmdctl.8
++man_MANS = spmd.8 spmdctl.8
+ spmd_SOURCES = main.c dns.c udp.c query.c task.c signal.c shell.c utils.c cache.c spmd_pfkey.c fqdn_query.c
+ spmdctl_SOURCE = spmdctl.c
+ all: config.h
+@@ -672,6 +676,41 @@
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
++
++install-man8: $(man_MANS)
++ @$(NORMAL_INSTALL)
++ @list1=''; \
++ list2='$(man_MANS)'; \
++ test -n "$(man8dir)" \
++ && test -n "`echo $$list1$$list2`" \
++ || exit 0; \
++ echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
++ $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
++ { for i in $$list1; do echo "$$i"; done; \
++ if test -n "$$list2"; then \
++ for i in $$list2; do echo "$$i"; done \
++ | sed -n '/\.8[a-z]*$$/p'; \
++ fi; \
++ } | while read p; do \
++ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
++ echo "$$d$$p"; echo "$$p"; \
++ done | \
++ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
++ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
++ sed 'N;N;s,\n, ,g' | { \
++ list=; while read file base inst; do \
++ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
++ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
++ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
++ fi; \
++ done; \
++ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
++ while read files; do \
++ test -z "$$files" || { \
++ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
++ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
++ done; }
++
+ mostlyclean-generic:
+
+ clean-generic:
+@@ -706,7 +745,7 @@
+
+ info-am:
+
+-install-data-am:
++install-data-am: install-man
+
+ install-dvi: install-dvi-am
+
+@@ -722,7 +761,7 @@
+
+ install-info-am:
+
+-install-man:
++install-man: install-man8
+
+ install-pdf: install-pdf-am
+
diff --git a/security/racoon2/pkg-plist b/security/racoon2/pkg-plist
index 3d1939e792b1..5307af7783b1 100644
--- a/security/racoon2/pkg-plist
+++ b/security/racoon2/pkg-plist
@@ -18,13 +18,20 @@ etc/racoon2/hook/ikesa-up
etc/racoon2/hook/ikesa-down
etc/racoon2/hook/ikesa-rekey
etc/racoon2/hook/child-up.d/00childup_sample
+etc/racoon2/hook/child-up.d/01setkey
+etc/racoon2/hook/child-up.d/02ifconfig-gif
+etc/racoon2/hook/child-up.d/03arp
etc/racoon2/hook/child-up
+etc/racoon2/hook/child-down.d/01setkey
+etc/racoon2/hook/child-down.d/02ifconfig-gif
+etc/racoon2/hook/child-down.d/03arp
etc/racoon2/hook/child-down
etc/racoon2/hook/child-rekey
etc/racoon2/hook/migration
etc/racoon2/hook/ph1-up
etc/racoon2/hook/ph1-down
etc/rc.d/iked
+etc/rc.d/racoon2
etc/rc.d/spmd
%%KINK%%etc/rc.d/kinkd
%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT
@@ -43,7 +50,9 @@ man/man8/iked.8.gz
@dir etc/racoon2/hook/ikesa-down.d
@dir etc/racoon2/hook/child-rekey.d
@dir etc/racoon2/hook/child-down.d
+@dir etc/racoon2/hook/child-up.d
@dir etc/racoon2/cert
+@dir etc/racoon2
@postexec [ ! -e %D/%%ETCDIR%%/spmd.pwd ] || mv %D/%%ETCDIR%%/spmd.pwd %D/%%ETCDIR%%/spmd.pwd.bak
@postexec %D/sbin/pskgen -r -o %D/%%ETCDIR%%/spmd.pwd
@rmtry %%ETCDIR%%/spmd.pwd