summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2009-05-02 16:27:01 +0000
committerJeroen Roovers <jer@gentoo.org>2009-05-02 16:27:01 +0000
commitf2e978a9d9cc6bdde137dee02a706b5581660b62 (patch)
tree2060a22c4c641f3272feff0dbb4bd71b42e7a25d /net-misc/socat
parentppc stable #268258 (diff)
downloadgentoo-2-f2e978a9d9cc6bdde137dee02a706b5581660b62.tar.gz
gentoo-2-f2e978a9d9cc6bdde137dee02a706b5581660b62.tar.bz2
gentoo-2-f2e978a9d9cc6bdde137dee02a706b5581660b62.zip
Apply patch provided by Todd Stansell to fix crashes on systems without setenv().
(Portage version: 2.2_rc31/cvs/Linux i686)
Diffstat (limited to 'net-misc/socat')
-rw-r--r--net-misc/socat/ChangeLog12
-rw-r--r--net-misc/socat/files/socat-1.7.1.0-fixsetenv.patch30
-rw-r--r--net-misc/socat/socat-1.7.1.0-r1.ebuild49
3 files changed, 90 insertions, 1 deletions
diff --git a/net-misc/socat/ChangeLog b/net-misc/socat/ChangeLog
index b9e1e959bea1..4347bd0e4337 100644
--- a/net-misc/socat/ChangeLog
+++ b/net-misc/socat/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for net-misc/socat
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/socat/ChangeLog,v 1.45 2009/05/02 16:17:10 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/socat/ChangeLog,v 1.46 2009/05/02 16:27:01 jer Exp $
+
+ 02 May 2009; Jeroen Roovers <jer@gentoo.org> +socat-1.7.1.0-r1.ebuild,
+ +files/socat-1.7.1.0-fixsetenv.patch:
+ Apply patch provided by Todd Stansell to fix crashes on systems without
+ setenv().
+
+*socat-1.7.1.0-r1 (02 May 2009)
+
+ 02 May 2009; <> socat-1.7.1.0-r1.ebuild
+ # INSERT ENTRY HERE
02 May 2009; Jeroen Roovers <jer@gentoo.org> socat-1.7.0.0.ebuild:
Stable for HPPA (bug #267878).
diff --git a/net-misc/socat/files/socat-1.7.1.0-fixsetenv.patch b/net-misc/socat/files/socat-1.7.1.0-fixsetenv.patch
new file mode 100644
index 000000000000..79923bdc23fb
--- /dev/null
+++ b/net-misc/socat/files/socat-1.7.1.0-fixsetenv.patch
@@ -0,0 +1,30 @@
+diff -r -N -U 3 socat-1.7.1.0/CHANGES socat-1.7.1.0+fixsetenv/CHANGES
+--- socat-1.7.1.0/CHANGES 2009-04-02 21:20:24.000000000 +0200
++++ socat-1.7.1.0+fixsetenv/CHANGES 2009-04-03 08:42:04.000000000 +0200
+@@ -1,4 +1,8 @@
+
++corrections:
++ socat crashed on systems without setenv() (esp. SunOS up to Solaris 9);
++ thanks to Todd Stansell for reporting this bug
++
+ ####################### V 1.7.1.0:
+
+ new features:
+diff -r -N -U 3 socat-1.7.1.0/VERSION socat-1.7.1.0+fixsetenv/VERSION
+--- socat-1.7.1.0/VERSION 2009-04-02 21:18:17.000000000 +0200
++++ socat-1.7.1.0+fixsetenv/VERSION 2009-04-03 08:38:34.000000000 +0200
+@@ -1 +1 @@
+-"1.7.1.0"
++"1.7.1.0+fixsetenv"
+diff -r -N -U 3 socat-1.7.1.0/utils.c socat-1.7.1.0+fixsetenv/utils.c
+--- socat-1.7.1.0/utils.c 2009-04-02 09:32:48.000000000 +0200
++++ socat-1.7.1.0+fixsetenv/utils.c 2009-04-03 08:37:21.000000000 +0200
+@@ -75,7 +75,7 @@
+ if (!overwrite) {
+ if (getenv(name)) return 0; /* already exists */
+ }
+- if ((env = Malloc(strlen(name)+strlen(value)+2)) != NULL) {
++ if ((env = Malloc(strlen(name)+strlen(value)+2)) == NULL) {
+ return -1;
+ }
+ sprintf(env, "%s=%s", name, value);
diff --git a/net-misc/socat/socat-1.7.1.0-r1.ebuild b/net-misc/socat/socat-1.7.1.0-r1.ebuild
new file mode 100644
index 000000000000..82d2ad1f8407
--- /dev/null
+++ b/net-misc/socat/socat-1.7.1.0-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/socat/socat-1.7.1.0-r1.ebuild,v 1.1 2009/05/02 16:27:01 jer Exp $
+
+EAPI="2"
+
+inherit eutils
+
+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 ~hppa ~ia64 ~mips ~ppc ~sparc ~x86"
+IUSE="ssl readline ipv6 tcpd"
+
+DEPEND="ssl? ( >=dev-libs/openssl-0.9.6 )
+ readline? ( >=sys-libs/ncurses-5.1 >=sys-libs/readline-4.1 )
+ tcpd? ( sys-apps/tcp-wrappers )
+ virtual/libc"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-fixsetenv.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable ssl openssl) \
+ $(use_enable readline) \
+ $(use_enable ipv6 ip6) \
+ $(use_enable tcpd libwrap)
+}
+
+src_test() {
+ TMPDIR="${T}" emake test || die 'self test failed'
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "emake install failed"
+
+ dodoc BUGREPORTS CHANGES DEVELOPMENT EXAMPLES \
+ FAQ FILES PORTING README SECURITY VERSION
+ docinto examples
+ dodoc *.sh
+ dohtml doc/*.html doc/*.css
+}