Index: head/net/socat/Makefile
===================================================================
--- head/net/socat/Makefile	(revision 414483)
+++ head/net/socat/Makefile	(revision 414484)
@@ -1,51 +1,53 @@
 # Created by: ijliao
 # $FreeBSD$
 
 PORTNAME=	socat
 PORTVERSION=	1.7.3.1
 PORTREVISION=	0
 CATEGORIES=	net ipv6
 MASTER_SITES=	http://www.dest-unreach.org/socat/download/ \
 		LOCAL/ehaupt
 
 MAINTAINER=	ehaupt@FreeBSD.org
 COMMENT=	Multipurpose relay and more
 
 LICENSE=	GPLv2
 
-USES=		compiler tar:bzip2 cpe
+USES=		compiler cpe tar:bzip2
 GNU_CONFIGURE=	yes
 USE_RC_SUBR=	socat
 USE_OPENSSL=	yes
+
+CPE_VENDOR=	dest-unreach
 
 PORTSCOUT=	skipv:2.0.0-b2
 
 PLIST_FILES=	bin/filan bin/procan bin/socat man/man1/socat.1.gz
 PORTDOCS=	EXAMPLES README SECURITY FAQ
 
 OPTIONS_DEFINE=	DOCS
 
 .include <bsd.port.pre.mk>
 
 .if defined(WITH_OPENSSL_PORT)
 CFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 .endif
 
 .if ${COMPILER_TYPE} == "clang"
 CFLAGS+=	-Wno-unused-comparison
 .endif
 
 do-install:
 .for f in filan procan socat
 	${INSTALL_PROGRAM} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/bin
 .endfor
 	${INSTALL_MAN} ${WRKSRC}/doc/${PORTNAME}.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
 
 .if ${ARCH} == "arm"
 BROKEN=		Does not configure on arm
 .endif
 
 .include <bsd.port.post.mk>
Index: head/net/socat/files/patch-sslcls.c
===================================================================
--- head/net/socat/files/patch-sslcls.c	(revision 414483)
+++ head/net/socat/files/patch-sslcls.c	(revision 414484)
@@ -1,29 +1,53 @@
---- sslcls.c.orig	2015-01-24 11:15:22.000000000 +0100
+--- sslcls.c.orig	2015-01-24 10:15:22 UTC
 +++ sslcls.c
-@@ -55,6 +55,7 @@
+@@ -55,6 +55,7 @@ const SSL_METHOD *sycSSLv2_server_method
  }
  #endif
  
 +#if HAVE_SSLv3_client_method
  const SSL_METHOD *sycSSLv3_client_method(void) {
     const SSL_METHOD *result;
     Debug("SSLv3_client_method()");
-@@ -62,7 +63,9 @@
+@@ -62,7 +63,9 @@ const SSL_METHOD *sycSSLv3_client_method
     Debug1("SSLv3_client_method() -> %p", result);
     return result;
  }
 +#endif
  
 +#if HAVE_SSLv3_server_method
  const SSL_METHOD *sycSSLv3_server_method(void) {
     const SSL_METHOD *result;
     Debug("SSLv3_server_method()");
-@@ -70,6 +73,7 @@
+@@ -70,6 +73,7 @@ const SSL_METHOD *sycSSLv3_server_method
     Debug1("SSLv3_server_method() -> %p", result);
     return result;
  }
 +#endif
  
  const SSL_METHOD *sycSSLv23_client_method(void) {
     const SSL_METHOD *result;
-
+@@ -331,6 +335,7 @@ void sycSSL_free(SSL *ssl) {
+    return;
+ }
+ 
++#ifndef OPENSSL_NO_EGD
+ int sycRAND_egd(const char *path) {
+    int result;
+    Debug1("RAND_egd(\"%s\")", path);
+@@ -338,6 +343,7 @@ int sycRAND_egd(const char *path) {
+    Debug1("RAND_egd() -> %d", result);
+    return result;
+ }
++#endif
+ 
+ DH *sycPEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u) {
+    DH *result;
+@@ -375,7 +381,7 @@ int sycFIPS_mode_set(int onoff) {
+ }
+ #endif /* WITH_FIPS */
+ 
+-#if OPENSSL_VERSION_NUMBER >= 0x00908000L
++#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined OPENSSL_NO_COMP
+ const COMP_METHOD *sycSSL_get_current_compression(SSL *ssl) {
+    const COMP_METHOD *result;
+    Debug1("SSL_get_current_compression(%p)", ssl);
Index: head/net/socat/files/patch-sslcls.h
===================================================================
--- head/net/socat/files/patch-sslcls.h	(nonexistent)
+++ head/net/socat/files/patch-sslcls.h	(revision 414484)
@@ -0,0 +1,11 @@
+--- sslcls.h.orig	2015-01-24 10:15:22 UTC
++++ sslcls.h
+@@ -55,7 +55,7 @@ BIO *sycBIO_new_file(const char *filenam
+ 
+ int sycFIPS_mode_set(int onoff);
+ 
+-#if OPENSSL_VERSION_NUMBER >= 0x00908000L
++#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
+ const COMP_METHOD *sycSSL_get_current_compression(SSL *ssl);
+ const COMP_METHOD *sycSSL_get_current_expansion(SSL *ssl);
+ const char *sycSSL_COMP_get_name(const COMP_METHOD *comp);

Property changes on: head/net/socat/files/patch-sslcls.h
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: head/net/socat/files/patch-xio-openssl.c
===================================================================
--- head/net/socat/files/patch-xio-openssl.c	(nonexistent)
+++ head/net/socat/files/patch-xio-openssl.c	(revision 414484)
@@ -0,0 +1,79 @@
+--- xio-openssl.c.orig	2016-01-29 10:28:38 UTC
++++ xio-openssl.c
+@@ -108,9 +108,11 @@ const struct optdesc opt_openssl_key    
+ const struct optdesc opt_openssl_dhparam     = { "openssl-dhparam",     "dh",    OPT_OPENSSL_DHPARAM,     GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
+ const struct optdesc opt_openssl_cafile      = { "openssl-cafile",     "cafile", OPT_OPENSSL_CAFILE,      GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
+ const struct optdesc opt_openssl_capath      = { "openssl-capath",     "capath", OPT_OPENSSL_CAPATH,      GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
++#ifndef OPENSSL_NO_EGD
+ const struct optdesc opt_openssl_egd         = { "openssl-egd",        "egd",    OPT_OPENSSL_EGD,         GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC };
++#endif
+ const struct optdesc opt_openssl_pseudo      = { "openssl-pseudo",     "pseudo", OPT_OPENSSL_PSEUDO,      GROUP_OPENSSL, PH_SPEC, TYPE_BOOL,     OFUNC_SPEC };
+-#if OPENSSL_VERSION_NUMBER >= 0x00908000L
++#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined OPENSSL_NO_COMP
+ const struct optdesc opt_openssl_compress    = { "openssl-compress",   "compress", OPT_OPENSSL_COMPRESS,  GROUP_OPENSSL, PH_SPEC, TYPE_STRING,   OFUNC_SPEC };
+ #endif
+ #if WITH_FIPS
+@@ -147,7 +149,7 @@ int xio_reset_fips_mode(void) {
+ static void openssl_conn_loginfo(SSL *ssl) {
+    Notice1("SSL connection using %s", SSL_get_cipher(ssl));
+ 
+-#if OPENSSL_VERSION_NUMBER >= 0x00908000L
++#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined OPENSSL_NO_COMP
+    {
+       const COMP_METHOD *comp, *expansion;
+ 
+@@ -651,7 +653,7 @@ int _xioopen_openssl_listen(struct singl
+ #endif /* WITH_LISTEN */
+ 
+ 
+-#if OPENSSL_VERSION_NUMBER >= 0x00908000L
++#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined OPENSSL_NO_COMP
+ /* In OpenSSL 0.9.7 compression methods could be added using
+  * SSL_COMP_add_compression_method(3), but the implemntation is not compatible
+  * with the standard (RFC3749).
+@@ -722,8 +724,10 @@ int
+    char *opt_dhparam = NULL;	/* file name of DH params */
+    char *opt_cafile = NULL;	/* certificate authority file */
+    char *opt_capath = NULL;	/* certificate authority directory */
++#ifndef OPENSSL_NO_EGD
+    char *opt_egd = NULL;	/* entropy gathering daemon socket path */
+-#if OPENSSL_VERSION_NUMBER >= 0x00908000L
++#endif
++#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined OPENSSL_NO_COMP
+    char *opt_compress = NULL;	/* compression method */
+ #endif
+    bool opt_pseudo = false;	/* use pseudo entropy if nothing else */
+@@ -741,9 +745,11 @@ int
+    retropt_string(opts, OPT_OPENSSL_CAPATH, &opt_capath);
+    retropt_string(opts, OPT_OPENSSL_KEY, &opt_key);
+    retropt_string(opts, OPT_OPENSSL_DHPARAM, &opt_dhparam);
++#ifndef OPENSSL_NO_EGD
+    retropt_string(opts, OPT_OPENSSL_EGD, &opt_egd);
++#endif
+    retropt_bool(opts,OPT_OPENSSL_PSEUDO, &opt_pseudo);
+-#if OPENSSL_VERSION_NUMBER >= 0x00908000L
++#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined OPENSSL_NO_COMP
+    retropt_string(opts, OPT_OPENSSL_COMPRESS, &opt_compress);
+ #endif
+ #if WITH_FIPS
+@@ -877,9 +883,11 @@ int
+       }
+    }
+ 
++#ifndef OPENSSL_NO_EGD
+    if (opt_egd) {
+       sycRAND_egd(opt_egd);
+    }
++#endif
+ 
+    if (opt_pseudo) {
+       long int randdata;
+@@ -991,7 +999,7 @@ int
+    }
+ #endif /* !defined(EC_KEY) */
+ 
+-#if OPENSSL_VERSION_NUMBER >= 0x00908000L
++#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined OPENSSL_NO_COMP
+    if (opt_compress) {
+       int result;
+       result = openssl_setup_compression(*ctx, opt_compress);

Property changes on: head/net/socat/files/patch-xio-openssl.c
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: head/net/socat/files/patch-xioopts.c
===================================================================
--- head/net/socat/files/patch-xioopts.c	(revision 414483)
+++ head/net/socat/files/patch-xioopts.c	(revision 414484)
@@ -1,73 +1,107 @@
 --- xioopts.c.orig	2015-01-24 10:15:22 UTC
 +++ xioopts.c
-@@ -2971,6 +2971,25 @@ int retropt_bind(struct opt *opts,
+@@ -296,7 +296,7 @@ const struct optname optionnames[] = {
+ #if WITH_EXT2 && defined(EXT2_COMPR_FL)
+ 	IF_ANY    ("compr",	&opt_ext2_compr)
+ #endif
+-#if OPENSSL_VERSION_NUMBER >= 0x00908000L
++#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined OPENSSL_NO_COMP
+ 	IF_OPENSSL("compress",	&opt_openssl_compress)
+ #endif
+ #ifdef TCP_CONN_ABORT_THRESHOLD  /* HP_UX */
+@@ -412,7 +412,9 @@ const struct optname optionnames[] = {
+ #ifdef ECHOPRT
+ 	IF_TERMIOS("echoprt",	&opt_echoprt)
+ #endif
++#ifndef OPENSSL_NO_EGD
+ 	IF_OPENSSL("egd",	&opt_openssl_egd)
++#endif
+ 	IF_ANY    ("end-close",	&opt_end_close)
+ 	IF_TERMIOS("eof",	&opt_veof)
+ 	IF_TERMIOS("eol",	&opt_veol)
+@@ -1098,11 +1100,13 @@ const struct optname optionnames[] = {
+ 	IF_OPENSSL("openssl-certificate",	&opt_openssl_certificate)
+ 	IF_OPENSSL("openssl-cipherlist",	&opt_openssl_cipherlist)
+ 	IF_OPENSSL("openssl-commonname",	&opt_openssl_commonname)
+-#if OPENSSL_VERSION_NUMBER >= 0x00908000L
++#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined OPENSSL_NO_COMP
+ 	IF_OPENSSL("openssl-compress",	&opt_openssl_compress)
+ #endif
+ 	IF_OPENSSL("openssl-dhparam",	&opt_openssl_dhparam)
++#ifndef OPENSSL_NO_EGD
+ 	IF_OPENSSL("openssl-egd",	&opt_openssl_egd)
++#endif
+ #if WITH_FIPS
+ 	IF_OPENSSL("openssl-fips",	&opt_openssl_fips)
+ #endif
+@@ -2971,6 +2975,25 @@ int retropt_bind(struct opt *opts,
     OFUNC_TERMIOS_FLAG, OFUNC_TERMIOS_PATTERN, and some OFUNC_SPEC */
  int applyopts(int fd, struct opt *opts, enum e_phase phase) {
     struct opt *opt;
 +#ifdef HAVE_TERMIOS_ISPEED
 +   int ispeed_major = -1, ospeed_major = -1;
 +   unsigned int ispeed_value, ospeed_value;
 +   bool speed_done = false;
 +
 +   opt = opts; while (opt && opt->desc != ODESC_END) {
 +      if (opt->desc == ODESC_DONE ||
 +          (phase != PH_ALL && opt->desc->phase != phase)) {
 +         ++opt; continue; }
 +         if (opt->desc->optcode == OPT_ISPEED) {
 +           ispeed_major = opt->desc->major;
 +           ispeed_value = opt->value.u_uint; }
 +         if (opt->desc->optcode == OPT_OSPEED) {
 +           ospeed_major = opt->desc->major;
 +           ospeed_value = opt->value.u_uint; }
 +      ++opt;
 +      continue;
 +   }
 +#endif /* HAVE_TERMIOS_ISPEED */
  
     opt = opts; while (opt && opt->desc != ODESC_END) {
        if (opt->desc == ODESC_DONE ||
-@@ -3605,21 +3624,29 @@ int applyopts(int fd, struct opt *opts, 
+@@ -3605,21 +3628,29 @@ int applyopts(int fd, struct opt *opts, 
  
  #ifdef HAVE_TERMIOS_ISPEED
        } else if (opt->desc->func == OFUNC_TERMIOS_SPEED) {
 -	 union {
 -	    struct termios termarg;
 -	    speed_t speeds[sizeof(struct termios)/sizeof(speed_t)];
 -	 } tdata;
 -	 if (Tcgetattr(fd, &tdata.termarg) < 0) {
 -	    Error3("tcgetattr(%d, %p): %s",
 -		   fd, &tdata.termarg, strerror(errno));
 -	    opt->desc = ODESC_ERROR; ++opt; continue;
 -	 }
 -	 tdata.speeds[opt->desc->major] = opt->value.u_uint;
 -	 if (Tcsetattr(fd, TCSADRAIN, &tdata.termarg) < 0) {
 -	    Error3("tcsetattr(%d, TCSADRAIN, %p): %s",
 -		   fd, &tdata.termarg, strerror(errno));
 -	    opt->desc = ODESC_ERROR; ++opt; continue;
 -	 }
 +         if (speed_done == false) {
 +           union {
 +              struct termios termarg;
 +              speed_t speeds[sizeof(struct termios)/sizeof(speed_t)];
 +           } tdata;
 +           if (Tcgetattr(fd, &tdata.termarg) < 0) {
 +              Error3("tcgetattr(%d, %p): %s",
 +                     fd, &tdata.termarg, strerror(errno));
 +              opt->desc = ODESC_ERROR; ++opt; continue;
 +           }
 +           if (ispeed_major < 0 || ospeed_major < 0)
 +             tdata.speeds[opt->desc->major] = opt->value.u_uint;
 +           else{ 
 +             tdata.speeds[ispeed_major] = ispeed_value;
 +             tdata.speeds[ospeed_major] = ospeed_value;
 +             speed_done = true;
 +           }
 +           if (Tcsetattr(fd, TCSADRAIN, &tdata.termarg) < 0) {
 +             Error3("tcsetattr(%d, TCSADRAIN, %p): %s",
 +                     fd, &tdata.termarg, strerror(errno));
 +              opt->desc = ODESC_ERROR; ++opt; continue;
 +           }
 +         }
  #endif /* HAVE_TERMIOS_ISPEED */
  
        } else if (opt->desc->func == OFUNC_TERMIOS_SPEC) {