summaryrefslogtreecommitdiff
path: root/net-misc/socat
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/socat
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/socat')
-rw-r--r--net-misc/socat/Manifest13
-rw-r--r--net-misc/socat/files/socat-1.7.3.0-filan-build.patch30
-rw-r--r--net-misc/socat/files/socat-1.7.3.1-stddef_h.patch38
-rw-r--r--net-misc/socat/files/socat-2.0.0_beta9-libressl.patch267
-rw-r--r--net-misc/socat/metadata.xml8
-rw-r--r--net-misc/socat/socat-1.7.3.1.ebuild52
-rw-r--r--net-misc/socat/socat-1.7.3.2.ebuild70
-rw-r--r--net-misc/socat/socat-2.0.0_beta9.ebuild74
-rw-r--r--net-misc/socat/socat-9999.ebuild74
9 files changed, 626 insertions, 0 deletions
diff --git a/net-misc/socat/Manifest b/net-misc/socat/Manifest
new file mode 100644
index 000000000000..96e20e0cecc4
--- /dev/null
+++ b/net-misc/socat/Manifest
@@ -0,0 +1,13 @@
+AUX socat-1.7.3.0-filan-build.patch 1164 SHA256 1916386401f633c4d4e74aa61ca3039580cb69b6d89e69e73e0eaf9d463c1c15 SHA512 479a189bbc0546e8838f40e770902c0c82d5fd042e1d94731d0036f66448810dd5ffcd5297b3ad4e474db8e037d211e65648a5f35f41827d7a320d6b2b8208bf WHIRLPOOL 187535c491bb3ba7b83df865077038a054c7aa7ba3a39ad3ba868db62db113bc876f4bf3da6cdffc5cfc03ac6f4ac5ceb5058cf8185622a3dce290772306fa41
+AUX socat-1.7.3.1-stddef_h.patch 1272 SHA256 3401aaadd8b837fea293105431d8f939bf8ee15cc76039726fd7c91add16063f SHA512 294acc9f05526eb47bc2cc01603b1c5bc553c4a2ffaaf63b87b66eb653930c0f8139fb8c4d72ddec10482e35ae3a6ba144a6555c8ba64066c30cc4132f10f2bf WHIRLPOOL 89bad00d356003fbbb17e00d73f6d2cf7f07a3aa08a4447e421ac31b965ce7fbc4db16d220d0835813b2574bf33a24c5383216cce4212087f699654ed5206430
+AUX socat-2.0.0_beta9-libressl.patch 9738 SHA256 46630195ffceab6aa72995a3f44449cae0893e89183d3dc8c4bcc94c9ec72197 SHA512 183972f5354872557a6ad131f1c8276b0250729aaa6659cd202dcf534d8b4bc41dd19cc6525bc888c325c670922ba382c684103ecdd8a385e5d27f52f321c7ed WHIRLPOOL 7c1b368d56d18b6eb076f78a311017e272ccf2ac07145d8422cff0f65f61c71a5e25e0b5c775f1e7978b8235716698e934b21142c2bba23bf163d1dd87af343c
+DIST socat-1.7.3.1.tar.bz2 488467 SHA256 d2da659540c38139f388e9437bfaae16bb458d174d056cb3228432a8f489fbaa SHA512 463340f578d4d1d54458b8ef9573ad3eff51dbcc736205e1b62e9a4782770d4bb76e6a07506350fd35405b130660559aaa79dfa2664c53ea268d7d64231f9b32 WHIRLPOOL 09f0fc537eaad194cac97cce73971c9f69047c648f03788fa69ac3444673ff73f143b2657d0ed28d082e2cfc36829304ed7bf0ff79c7ed75e96c991292f94dd4
+DIST socat-1.7.3.2.tar.bz2 493324 SHA256 e3561f808739383eb10fada1e5d4f26883f0311b34fd0af7837d0c95ef379251 SHA512 9ed4911deb09c36955b62a2efbcdfdff0e9d963fa30110e32396e49133d395afd7e61a19ca6a1a23e6e98ded4f603bcbb68c8eb3da4ce870f1450b8b6f7dd293 WHIRLPOOL d5b25ee77fd9ac77fd2a0dd33c39ae636cfe380608b8cee0d14f4d2e042bd53f9269edb466ae6c5403ccd5f5e2bff48b5f1ab15504957419f5ec759fc84a84f4
+DIST socat-2.0.0-b9.tar.bz2 516673 SHA256 49efb0a5c66b94b279014addc2851faf8ebbd1ec4b7e31c1de7e912d7b4983d2 SHA512 f728bd634feeeacd2f0e4020c1c6aafdadaef3ba9da818d9ae1195e9f48fb693b2bea8dbbb208af8daddd8d6405217113d5ce31d05c2e9b27f5d2fba6b1cc834 WHIRLPOOL e293f9da0fed9573a02658b79ae87c24e2d88c57f6d8b1ddaeecd52e035b5012eaebbfa82da80f8442da666114d14e1c2767cf929e57b634f762e198ed4e3b50
+EBUILD socat-1.7.3.1.ebuild 1183 SHA256 7e52656464953dc40cc5dffd01544efe6be7fc907ca701d66e582f31866ec856 SHA512 e74c8df05fbda264927cfa59c1e35c596c64088dae51a193823967c23a121929cbc7d2d719d7ecc998279f8ce81dcd8e61be5abe5701280b0ad26f2eaf77c4c2 WHIRLPOOL 6bd015928731712d96b837b409a68f8b9120dab73ddb1a50ff7ce2d2515810a70f57fbdfc38cf1642fb635a4e37f57557da06cf928d98694a638a23e2acb7b0d
+EBUILD socat-1.7.3.2.ebuild 1528 SHA256 72158b812e2ea985bf4579ad3ee8ce104385ed82ac2dd24882a9a3089fe85f04 SHA512 96b94e4973e9336e081fcd41139e30c20c31cbdc75b787d9f10d24280a7a2be678aba43a6b5611e009ad985d2e59cd500b7e59aa5b30e0c85ca6e3076002473e WHIRLPOOL 048720b5c5cba9c586e44c7c5f624297c652d816ad1978e8afa76337346fd5dc6e06fdb934adf38863452bd94c5f0115a9b9795a4537b72b47277fb0cf6f5a54
+EBUILD socat-2.0.0_beta9.ebuild 1512 SHA256 c76a144514a134654b34ee41fc87dbf4cb9462f4e83cbc3dd0bbfd31c5619b38 SHA512 859b4a4732bf418f5e517e6345b484c6fcb2ff2e4b42f59824dbfe51943c5432ba7fdce610501bc673c7b51399115b3b60af78441c5932739c5597219fed8705 WHIRLPOOL ade1f0e71041c4293c28b0ed3b8da72d032370db4a0e442f5f564bf26c700c989d9f0927588fbc9112a4e4171d6f0a7ca5f2b6301eb142ce83d607495e6d2cfa
+EBUILD socat-9999.ebuild 1430 SHA256 e944c6ca929cb4cf7d1e1c626e946cff13d1aee7da627160be7900fb9f641e8f SHA512 b4d6de5f62b6131efcfede03b81357abcc8201c609fad8b28b3527e0a5a956cb4e495493918005816bb83ab6cf1c07ac45fcddd770f0b4579624cd41d2fe5802 WHIRLPOOL f41c1a0e19d971820ea68fbeaf350951a0f95d53993ad099f7733c9ffb320e729ff6a58ba370e9a886055fb95e2ee2f46667aed348cb7a71b22ac583f7bb93b8
+MISC ChangeLog 6221 SHA256 e67dc843031754b15d485d5ead008c2394ec16ad6385204ef2b1bd93579f45be SHA512 1b20bd90a3c71c85b62f6d13d587de0700fcb8bd98c7bee597aa61156a80fd43eafd9bb768c825b95e4cd1eb156a9f801942d23b9760a7ed219053e809d37b3b WHIRLPOOL a2ecc961b8f3d7ac766a4c853a2cc6730549d602eb614a529e338107c9e2e291defea2a82def15ff1872662c3173fc8e5c71d06af8b563b2232e1a4131915a78
+MISC ChangeLog-2015 19923 SHA256 d0348859fac57da6b07b7fe97fef4b91f0b7de949074d1f449b64a65bb1acbf4 SHA512 8495e5fb70a62a43fe847edd30e29c0446f376bf9553662ca9937349e16726e9fdac550ed7d63902af76302ac6ed7d26d3f9716944f61b7201dc8b60b8dd2ae3 WHIRLPOOL 40d1f4ecfa998af5feacf50711e3ee0c385b0eee84e57778fb6cff50fbcce6f9e0ffcc3a89ee216fbfac035d52b3a8dec3bdc49984f6d93a182b09b5d6c27d91
+MISC metadata.xml 280 SHA256 b04c5b9d91f6c4d6e36583488fd032751034d1e035085609c9bdf7677cf1e83f SHA512 8b56802e5524808b11ab857779ce04fb2d07cae87376f67490178601a9aecf7ad9f95743709b46048a425598d4cf8dcf01ef78cc97009d78e26a7728453150ef WHIRLPOOL 6f3756b9ac748acccb6ac5a4de133cf93988e8c904f606376fecbb6a21ce038e86437fecca43b2521538da2570d33ff1a6a1e0cab290a3d71a9b4f2734f16328
diff --git a/net-misc/socat/files/socat-1.7.3.0-filan-build.patch b/net-misc/socat/files/socat-1.7.3.0-filan-build.patch
new file mode 100644
index 000000000000..861c673ad91d
--- /dev/null
+++ b/net-misc/socat/files/socat-1.7.3.0-filan-build.patch
@@ -0,0 +1,30 @@
+From aae2ea107b543fa908956f2fdcdf6db684e4a2e6 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@chromium.org>
+Date: Fri, 24 Apr 2015 23:06:37 -0400
+Subject: [PATCH] filan: fix depend list
+
+The link line contains more objects than the depend line; sync them like
+procan does. Otherwise, parallel builds randomly fail.
+---
+ Makefile.in | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index f2a6edb..0c00459 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -118,8 +118,9 @@ PROCAN_OBJS=procan_main.o procan.o procan-cdefs.o hostan.o error.o sycls.o sysut
+ procan: $(PROCAN_OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(PROCAN_OBJS) $(CLIBS)
+
+-filan: filan_main.o filan.o fdname.o error.o sycls.o sysutils.o utils.o
+- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ filan_main.o filan.o fdname.o error.o sycls.o sysutils.o utils.o vsnprintf_r.o snprinterr.o $(CLIBS)
++FILAN_OBJS=filan_main.o filan.o fdname.o error.o sycls.o sysutils.o utils.o vsnprintf_r.o snprinterr.o
++filan: $(FILAN_OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(FILAN_OBJS) $(CLIBS)
+
+ libxio.a: $(XIOOBJS) $(UTLOBJS)
+ $(AR) r $@ $(XIOOBJS) $(UTLOBJS)
+--
+2.3.5
+
diff --git a/net-misc/socat/files/socat-1.7.3.1-stddef_h.patch b/net-misc/socat/files/socat-1.7.3.1-stddef_h.patch
new file mode 100644
index 000000000000..c914a817ceca
--- /dev/null
+++ b/net-misc/socat/files/socat-1.7.3.1-stddef_h.patch
@@ -0,0 +1,38 @@
+When disabling OpenSSL support, nestlex.c still needs stddef.h which is
+magically included through the OpenSSL headers otherwise.
+
+--- a/configure.in
++++ b/configure.in
+@@ -61,7 +61,7 @@
+ AC_CHECK_HEADERS(inttypes.h)
+ AC_HEADER_SYS_WAIT
+ AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/param.h sys/ioctl.h sys/time.h syslog.h unistd.h)
+-AC_CHECK_HEADERS(pwd.h grp.h stdint.h sys/types.h poll.h sys/poll.h sys/socket.h sys/uio.h sys/stat.h netdb.h sys/un.h)
++AC_CHECK_HEADERS(pwd.h grp.h stddef.h stdint.h sys/types.h poll.h sys/poll.h sys/socket.h sys/uio.h sys/stat.h netdb.h sys/un.h)
+ AC_CHECK_HEADERS(pty.h)
+ AC_CHECK_HEADERS(netinet/in.h netinet/in_systm.h)
+ AC_CHECK_HEADERS(netinet/ip.h, [], [], [AC_INCLUDES_DEFAULT
+--- a/config.h.in
++++ b/config.h.in
+@@ -189,6 +189,9 @@
+ /* Define if you have the <grp.h> header file. */
+ #undef HAVE_GRP_H
+
++/* Define if you have the <stddef.h> header file. */
++#undef HAVE_STDDEF_H
++
+ /* Define if you have the <stdint.h> header file. */
+ #undef HAVE_STDINT_H
+
+--- a/sysincludes.h
++++ b/sysincludes.h
+@@ -51,6 +51,9 @@
+ #if HAVE_SYS_TIME_H
+ #include <sys/time.h> /* select(); OpenBSD: struct timespec */
+ #endif
++#if HAVE_STDDEF_H
++#include <stddef.h>
++#endif
+ #if HAVE_STDINT_H
+ #include <stdint.h> /* uint8_t */
+ #endif
diff --git a/net-misc/socat/files/socat-2.0.0_beta9-libressl.patch b/net-misc/socat/files/socat-2.0.0_beta9-libressl.patch
new file mode 100644
index 000000000000..535297c04b06
--- /dev/null
+++ b/net-misc/socat/files/socat-2.0.0_beta9-libressl.patch
@@ -0,0 +1,267 @@
+From fbb0cc3b65a2ead522019fb461ae520371cc3ede Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marek=20Beh=C3=BAn?= <kabel@blackhole.sk>
+Date: Mon, 6 Jun 2016 18:41:30 +0200
+Subject: [PATCH] Support compiling with LibreSSL 2.4.0
+
+This patch checks for macros OPENSSL_NO_COMP, OPENSSL_NO_EGD, and
+if disables those features if they are.
+
+Also add ifdef for HAVE_SSLv3_{client/server}_method in sslcls.c,
+since these were removed from LibreSSL 2.4.0.
+---
+ sslcls.c | 8 +++++++-
+ sslcls.h | 4 +++-
+ xio-openssl.c | 24 ++++++++++++++++++------
+ xio-openssl.h | 4 +++-
+ xioopts.c | 8 ++++++--
+ xioopts.h | 4 +++-
+ 6 files changed, 40 insertions(+), 12 deletions(-)
+
+diff --git a/sslcls.c b/sslcls.c
+index ea4c303..5011ef2 100644
+--- a/sslcls.c
++++ b/sslcls.c
+@@ -55,6 +55,7 @@ const SSL_METHOD *sycSSLv2_server_method(void) {
+ }
+ #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 @@ const SSL_METHOD *sycSSLv3_client_method(void) {
+ 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 @@ const SSL_METHOD *sycSSLv3_server_method(void) {
+ Debug1("SSLv3_server_method() -> %p", result);
+ return result;
+ }
++#endif
+
+ const SSL_METHOD *sycSSLv23_client_method(void) {
+ const SSL_METHOD *result;
+@@ -347,6 +351,7 @@ void sycSSL_free(SSL *ssl) {
+ return;
+ }
+
++#ifndef OPENSSL_NO_EGD
+ int sycRAND_egd(const char *path) {
+ int result;
+ Debug1("RAND_egd(\"%s\")", path);
+@@ -354,6 +359,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;
+@@ -391,7 +397,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);
+diff --git a/sslcls.h b/sslcls.h
+index 152fe5b..9fd8ef2 100644
+--- a/sslcls.h
++++ b/sslcls.h
+@@ -49,7 +49,9 @@ X509 *sycSSL_get_peer_certificate(SSL *ssl);
+ int sycSSL_shutdown(SSL *ssl);
+ void sycSSL_CTX_free(SSL_CTX *ctx);
+ void sycSSL_free(SSL *ssl);
++#ifndef OPENSSL_NO_EGD
+ int sycRAND_egd(const char *path);
++#endif
+
+ DH *sycPEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u);
+
+@@ -57,7 +59,7 @@ BIO *sycBIO_new_file(const char *filename, const char *mode);
+
+ 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);
+diff --git a/xio-openssl.c b/xio-openssl.c
+index c7f283c..38dc20d 100644
+--- a/xio-openssl.c
++++ b/xio-openssl.c
+@@ -181,9 +181,11 @@ const struct optdesc opt_openssl_key = { "openssl-key", "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
+@@ -220,7 +222,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;
+
+@@ -786,7 +788,7 @@ int _xioopen_openssl_listen(struct single *xfd,
+ #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).
+@@ -857,8 +859,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 */
+@@ -875,9 +879,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
+@@ -1010,9 +1016,11 @@ int
+ }
+ }
+
++#ifndef OPENSSL_NO_EGD
+ if (opt_egd) {
+ sycRAND_egd(opt_egd);
+ }
++#endif
+
+ if (opt_pseudo) {
+ long int randdata;
+@@ -1124,7 +1132,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);
+@@ -1238,7 +1246,11 @@ static int openssl_SSL_ERROR_SSL(int level, const char *funcname) {
+ if (e == ((ERR_LIB_RAND<<24)|
+ (RAND_F_SSLEAY_RAND_BYTES<<12)|
+ (RAND_R_PRNG_NOT_SEEDED)) /*0x24064064*/) {
++#ifdef OPENSSL_NO_EGD
++ Error("too few entropy; use option \"pseudo\"");
++#else
+ Error("too few entropy; use options \"egd\" or \"pseudo\"");
++#endif
+ stat = STAT_NORETRY;
+ } else {
+ Msg2(level, "%s(): %s", funcname, ERR_error_string(e, buf));
+diff --git a/xio-openssl.h b/xio-openssl.h
+index 62586fc..f10ee0c 100644
+--- a/xio-openssl.h
++++ b/xio-openssl.h
+@@ -21,9 +21,11 @@ extern const struct optdesc opt_openssl_key;
+ extern const struct optdesc opt_openssl_dhparam;
+ extern const struct optdesc opt_openssl_cafile;
+ extern const struct optdesc opt_openssl_capath;
++#ifndef OPENSSL_NO_EGD
+ extern const struct optdesc opt_openssl_egd;
++#endif
+ extern const struct optdesc opt_openssl_pseudo;
+-#if OPENSSL_VERSION_NUMBER >= 0x00908000L
++#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
+ extern const struct optdesc opt_openssl_compress;
+ #endif
+ #if WITH_FIPS
+diff --git a/xioopts.c b/xioopts.c
+index 6c231f4..9a56298 100644
+--- a/xioopts.c
++++ b/xioopts.c
+@@ -303,7 +303,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 */
+@@ -419,7 +419,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)
+@@ -1062,11 +1064,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
+diff --git a/xioopts.h b/xioopts.h
+index 2a165f5..37d6883 100644
+--- a/xioopts.h
++++ b/xioopts.h
+@@ -478,11 +478,13 @@ enum e_optcode {
+ OPT_OPENSSL_CERTIFICATE,
+ OPT_OPENSSL_CIPHERLIST,
+ OPT_OPENSSL_COMMONNAME,
+-#if OPENSSL_VERSION_NUMBER >= 0x00908000L
++#if OPENSSL_VERSION_NUMBER >= 0x00908000L && !defined(OPENSSL_NO_COMP)
+ OPT_OPENSSL_COMPRESS,
+ #endif
+ OPT_OPENSSL_DHPARAM,
++#ifndef OPENSSL_NO_EGD
+ OPT_OPENSSL_EGD,
++#endif
+ OPT_OPENSSL_FIPS,
+ OPT_OPENSSL_KEY,
+ OPT_OPENSSL_METHOD,
+--
+2.7.3
+
diff --git a/net-misc/socat/metadata.xml b/net-misc/socat/metadata.xml
new file mode 100644
index 000000000000..2c2a7923cfc8
--- /dev/null
+++ b/net-misc/socat/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>netmon@gentoo.org</email>
+ <name>Gentoo network monitoring and analysis project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/socat/socat-1.7.3.1.ebuild b/net-misc/socat/socat-1.7.3.1.ebuild
new file mode 100644
index 000000000000..63c88ab0a5be
--- /dev/null
+++ b/net-misc/socat/socat-1.7.3.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit autotools eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Multipurpose relay (SOcket CAT)"
+HOMEPAGE="http://www.dest-unreach.org/socat/"
+MY_P=${P/_beta/-b}
+S="${WORKDIR}/${MY_P}"
+SRC_URI="http://www.dest-unreach.org/socat/download/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="ssl readline ipv6 tcpd"
+
+DEPEND="
+ ssl? ( dev-libs/openssl:0= )
+ readline? ( sys-libs/readline:= )
+ tcpd? ( sys-apps/tcp-wrappers )
+"
+RDEPEND="${DEPEND}"
+
+RESTRICT="test"
+
+DOCS=(
+ BUGREPORTS CHANGES DEVELOPMENT EXAMPLES FAQ FILES PORTING README SECURITY
+)
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.7.3.0-filan-build.patch
+ epatch "${FILESDIR}"/${PN}-1.7.3.1-stddef_h.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ filter-flags '-Wno-error*' #293324
+ tc-export AR
+ econf \
+ $(use_enable ssl openssl) \
+ $(use_enable readline) \
+ $(use_enable ipv6 ip6) \
+ $(use_enable tcpd libwrap)
+}
+
+src_install() {
+ default
+
+ dohtml doc/*.html doc/*.css
+}
diff --git a/net-misc/socat/socat-1.7.3.2.ebuild b/net-misc/socat/socat-1.7.3.2.ebuild
new file mode 100644
index 000000000000..ba6cc50d964b
--- /dev/null
+++ b/net-misc/socat/socat-1.7.3.2.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic toolchain-funcs
+
+DESCRIPTION="Multipurpose relay (SOcket CAT)"
+HOMEPAGE="http://www.dest-unreach.org/socat/"
+MY_P=${P/_beta/-b}
+S="${WORKDIR}/${MY_P}"
+SRC_URI="http://www.dest-unreach.org/socat/download/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="bindist libressl ssl readline ipv6 tcpd"
+
+DEPEND="
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ readline? ( sys-libs/readline:= )
+ tcpd? ( sys-apps/tcp-wrappers )
+"
+RDEPEND="${DEPEND}"
+
+RESTRICT="test
+ ssl? ( readline? ( bindist ) )"
+
+DOCS=(
+ BUGREPORTS CHANGES DEVELOPMENT EXAMPLES FAQ FILES PORTING README SECURITY
+)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.7.3.0-filan-build.patch
+)
+
+pkg_setup() {
+ # bug #587740
+ if use readline && use ssl; then
+ elog "You are enabling both readline and openssl USE flags, the licenses"
+ elog "for these packages conflict. You may not be able to legally"
+ elog "redistribute the resulting binary."
+ fi
+}
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ filter-flags '-Wno-error*' #293324
+ tc-export AR
+ econf \
+ $(use_enable ssl openssl) \
+ $(use_enable readline) \
+ $(use_enable ipv6 ip6) \
+ $(use_enable tcpd libwrap)
+}
+
+src_install() {
+ default
+
+ docinto html
+ dodoc doc/*.html doc/*.css
+}
diff --git a/net-misc/socat/socat-2.0.0_beta9.ebuild b/net-misc/socat/socat-2.0.0_beta9.ebuild
new file mode 100644
index 000000000000..f8881af9ed21
--- /dev/null
+++ b/net-misc/socat/socat-2.0.0_beta9.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic toolchain-funcs
+
+DESCRIPTION="Multipurpose relay (SOcket CAT)"
+HOMEPAGE="http://www.dest-unreach.org/socat/"
+MY_P=${P/_beta/-b}
+S="${WORKDIR}/${MY_P}"
+SRC_URI="http://www.dest-unreach.org/socat/download/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="libressl ssl readline ipv6 tcpd"
+
+DEPEND="
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ readline? ( sys-libs/readline:= )
+ tcpd? ( sys-apps/tcp-wrappers )
+"
+RDEPEND="${DEPEND}"
+
+RESTRICT="test
+ ssl? ( readline? ( bindist ) )"
+
+DOCS=(
+ BUGREPORTS CHANGES DEVELOPMENT EXAMPLES FAQ FILES PORTING README SECURITY
+)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.7.3.0-filan-build.patch
+ "${FILESDIR}"/${PN}-1.7.3.1-stddef_h.patch
+ "${FILESDIR}"/${PN}-2.0.0_beta9-libressl.patch
+)
+
+pkg_setup() {
+ # bug #587740
+ if use readline && use ssl; then
+ elog "You are enabling both readline and openssl USE flags, the licenses"
+ elog "for these packages conflict. You may not be able to legally"
+ elog "redistribute the resulting binary."
+ fi
+}
+
+src_prepare() {
+ default
+
+ touch doc/${PN}.1 || die
+
+ eautoreconf
+}
+
+src_configure() {
+ filter-flags -Wall '-Wno-error*' #293324
+ tc-export AR
+ econf \
+ $(use_enable ssl openssl) \
+ $(use_enable readline) \
+ $(use_enable ipv6 ip6) \
+ $(use_enable tcpd libwrap)
+}
+
+src_install() {
+ default
+
+ docinto html
+ dodoc doc/*.html doc/*.css
+}
diff --git a/net-misc/socat/socat-9999.ebuild b/net-misc/socat/socat-9999.ebuild
new file mode 100644
index 000000000000..52fde25ab3f0
--- /dev/null
+++ b/net-misc/socat/socat-9999.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic git-r3 toolchain-funcs
+
+DESCRIPTION="Multipurpose relay (SOcket CAT)"
+HOMEPAGE="http://www.dest-unreach.org/socat/"
+MY_P=${P/_beta/-b}
+S="${WORKDIR}/${MY_P}"
+EGIT_REPO_URI="git://repo.or.cz/${PN}.git"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="libressl ssl readline ipv6 tcpd"
+
+DEPEND="
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ readline? ( sys-libs/readline:= )
+ tcpd? ( sys-apps/tcp-wrappers )
+"
+DEPEND="
+ ${RDEPEND}
+ app-text/yodl
+"
+
+RESTRICT="test
+ ssl? ( readline? ( bindist ) )"
+
+DOCS=(
+ BUGREPORTS CHANGES DEVELOPMENT EXAMPLES FAQ FILES PORTING README SECURITY
+)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.7.3.0-filan-build.patch
+ "${FILESDIR}"/${PN}-1.7.3.1-stddef_h.patch
+)
+
+pkg_setup() {
+ # bug #587740
+ if use readline && use ssl; then
+ elog "You are enabling both readline and openssl USE flags, the licenses"
+ elog "for these packages conflict. You may not be able to legally"
+ elog "redistribute the resulting binary."
+ fi
+}
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ filter-flags '-Wno-error*' #293324
+ tc-export AR
+ econf \
+ $(use_enable ssl openssl) \
+ $(use_enable readline) \
+ $(use_enable ipv6 ip6) \
+ $(use_enable tcpd libwrap)
+}
+
+src_install() {
+ default
+
+ docinto html
+ dodoc doc/*.html doc/*.css
+}