summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2011-11-08 07:36:18 +0000
committerTim Harder <radhermit@gentoo.org>2011-11-08 07:36:18 +0000
commitf23c5cb07ccd329cf78492473cd20157a6bbb3d3 (patch)
treec152ad56874ab4fdd0ca906278c9a1354ce50415 /net-misc/proxychains
parentRemove old version. (diff)
downloadgentoo-2-f23c5cb07ccd329cf78492473cd20157a6bbb3d3.tar.gz
gentoo-2-f23c5cb07ccd329cf78492473cd20157a6bbb3d3.tar.bz2
gentoo-2-f23c5cb07ccd329cf78492473cd20157a6bbb3d3.zip
Apply fix for glibc-2.14 (bug #375065), add bdep on xz-utils, and use autotools-utils eclass.
(Portage version: 2.2.0_alpha72/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/proxychains')
-rw-r--r--net-misc/proxychains/ChangeLog9
-rw-r--r--net-misc/proxychains/files/proxychains-3.1_p20110225-glibc214.patch127
-rw-r--r--net-misc/proxychains/files/proxychains-3.1_p20110225-sysconf.patch11
-rw-r--r--net-misc/proxychains/proxychains-3.1_p20110225.ebuild21
4 files changed, 159 insertions, 9 deletions
diff --git a/net-misc/proxychains/ChangeLog b/net-misc/proxychains/ChangeLog
index df70ec19eea5..69cbcecbe7f7 100644
--- a/net-misc/proxychains/ChangeLog
+++ b/net-misc/proxychains/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-misc/proxychains
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/proxychains/ChangeLog,v 1.15 2011/03/11 09:18:45 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/proxychains/ChangeLog,v 1.16 2011/11/08 07:36:18 radhermit Exp $
+
+ 08 Nov 2011; Tim Harder <radhermit@gentoo.org>
+ proxychains-3.1_p20110225.ebuild,
+ +files/proxychains-3.1_p20110225-glibc214.patch,
+ +files/proxychains-3.1_p20110225-sysconf.patch:
+ Apply fix for glibc-2.14 (bug #375065), add bdep on xz-utils, and use
+ autotools-utils eclass.
*proxychains-3.1_p20110225 (11 Mar 2011)
diff --git a/net-misc/proxychains/files/proxychains-3.1_p20110225-glibc214.patch b/net-misc/proxychains/files/proxychains-3.1_p20110225-glibc214.patch
new file mode 100644
index 000000000000..762f4e436b08
--- /dev/null
+++ b/net-misc/proxychains/files/proxychains-3.1_p20110225-glibc214.patch
@@ -0,0 +1,127 @@
+--- proxychains-3.1_p20110225.orig/proxychains/libproxychains.c
++++ proxychains-3.1_p20110225/proxychains/libproxychains.c
+@@ -261,124 +261,3 @@
+ *proxy_count=count;
+ proxychains_got_chain_data=1;
+ }
+-
+-
+-
+-int connect (int sock, const struct sockaddr *addr, unsigned int len)
+-{
+- int socktype=0,optlen=0,flags=0,ret=0;
+- char str[256];
+- struct in_addr *p_addr_in;
+- size_t i;
+-
+- if(!init_l)
+- init_lib();
+- optlen=sizeof(socktype);
+- getsockopt(sock,SOL_SOCKET,SO_TYPE,&socktype,&optlen);
+- if (! (SOCKFAMILY(*addr)==AF_INET && socktype==SOCK_STREAM))
+- return true_connect(sock,addr,len);
+-
+- p_addr_in = &((struct sockaddr_in *)addr)->sin_addr;
+-
+- //PDEBUG("localnet: %s; ", inet_ntop(AF_INET,&in_addr_localnet, str, sizeof(str)));
+- //PDEBUG("netmask: %s; " , inet_ntop(AF_INET, &in_addr_netmask, str, sizeof(str)));
+- //PDEBUG("target: %s\n", inet_ntop(AF_INET, p_addr_in, str, sizeof(str)));
+-
+- for (i = 0; i < num_localnet_addr; i++) {
+- if ((localnet_addr[i].in_addr.s_addr & localnet_addr[i].netmask.s_addr)
+- == (p_addr_in->s_addr & localnet_addr[i].netmask.s_addr))
+- {
+- PDEBUG("accessing localnet using true_connect\n");
+- return true_connect(sock,addr,len);
+- }
+- }
+-
+- flags=fcntl(sock, F_GETFL, 0);
+- if(flags & O_NONBLOCK)
+- fcntl(sock, F_SETFL, !O_NONBLOCK);
+- ret=connect_proxy_chain(
+- sock,
+- SOCKADDR(*addr),
+- SOCKPORT(*addr),
+- proxychains_pd,
+- proxychains_proxy_count,
+- proxychains_ct,
+- proxychains_max_chain );
+- fcntl(sock, F_SETFL, flags);
+- if(ret!=SUCCESS)
+- errno=ECONNREFUSED;
+- return ret;
+-}
+-
+-struct hostent *gethostbyname(const char *name)
+-{
+- PDEBUG("gethostbyname: %s\n",name);
+- if(!init_l)
+- init_lib();
+- if(proxychains_resolver)
+- return proxy_gethostbyname(name);
+- else
+- return true_gethostbyname(name);
+-
+- return NULL;
+-}
+-int getaddrinfo(const char *node, const char *service,
+- const struct addrinfo *hints,
+- struct addrinfo **res)
+-{
+- int ret = 0;
+- PDEBUG("getaddrinfo: %s %s\n",node ,service);
+- if(!init_l)
+- init_lib();
+- if(proxychains_resolver)
+- ret = proxy_getaddrinfo(node, service, hints, res);
+- else
+- ret = true_getaddrinfo(node, service, hints, res);
+-
+- return ret;
+-}
+-void freeaddrinfo(struct addrinfo *res)
+-{
+- PDEBUG("freeaddrinfo %p \n",res);
+- if(!init_l)
+- init_lib();
+- if(!proxychains_resolver)
+- true_freeaddrinfo(res);
+- else {
+- free(res->ai_addr);
+- free(res);
+- }
+- return;
+-}
+-
+-int getnameinfo (const struct sockaddr * sa,
+- socklen_t salen, char * host,
+- socklen_t hostlen, char * serv,
+- socklen_t servlen, unsigned int flags)
+-{
+- int ret = 0;
+- if(!init_l)
+- init_lib();
+- if(!proxychains_resolver) {
+- ret = true_getnameinfo(sa,salen,host,hostlen,
+- serv,servlen,flags);
+- } else {
+- if(hostlen)
+- strncpy(host, inet_ntoa(SOCKADDR_2(*sa)),hostlen);
+- if(servlen)
+- snprintf(serv, servlen,"%d",ntohs(SOCKPORT(*sa)));
+- }
+- PDEBUG("getnameinfo: %s %s\n", host, serv);
+- return ret;
+-}
+-
+-struct hostent *gethostbyaddr (const void *addr, socklen_t len, int type)
+-{
+- PDEBUG("TODO: gethostbyaddr hook\n");
+- if(!init_l)
+- init_lib();
+- if(!proxychains_resolver)
+- return true_gethostbyaddr(addr,len,type);
+- return NULL;
+-}
+-
diff --git a/net-misc/proxychains/files/proxychains-3.1_p20110225-sysconf.patch b/net-misc/proxychains/files/proxychains-3.1_p20110225-sysconf.patch
new file mode 100644
index 000000000000..0db2e70e6842
--- /dev/null
+++ b/net-misc/proxychains/files/proxychains-3.1_p20110225-sysconf.patch
@@ -0,0 +1,11 @@
+--- proxychains-3.1_p20110225/proxychains/Makefile.am.orig
++++ proxychains-3.1_p20110225/proxychains/Makefile.am
+@@ -2,7 +2,7 @@
+
+ EXTRA_DIST = proxychains.conf core.c core.h libproxychains.c
+
+-sysconf_DATA=$(srcdir)/proxychains.conf
++sysconf_DATA=proxychains.conf
+
+ install-data-local:
+ $(mkinstalldirs) ${DESTDIR}${bindir}
diff --git a/net-misc/proxychains/proxychains-3.1_p20110225.ebuild b/net-misc/proxychains/proxychains-3.1_p20110225.ebuild
index d297a1f0cc81..7cee4ab95fb0 100644
--- a/net-misc/proxychains/proxychains-3.1_p20110225.ebuild
+++ b/net-misc/proxychains/proxychains-3.1_p20110225.ebuild
@@ -1,25 +1,30 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/proxychains/proxychains-3.1_p20110225.ebuild,v 1.1 2011/03/11 09:18:45 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/proxychains/proxychains-3.1_p20110225.ebuild,v 1.2 2011/11/08 07:36:18 radhermit Exp $
EAPI=4
+inherit autotools-utils
+
DESCRIPTION="force any tcp connections to flow through a proxy (or proxy chain)"
HOMEPAGE="http://proxychains.sourceforge.net/
https://github.com/haad/proxychains/tree/proxychain_fixes"
-SRC_URI="mirror://gentoo/${P}.tar.xz"
+SRC_URI="http://dev.gentoo.org/~radhermit/distfiles/${P}.tar.xz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
IUSE="static-libs"
-DEPEND=""
+DEPEND="app-arch/xz-utils"
RDEPEND="net-dns/bind-tools"
-src_configure() {
- econf \
- --disable-dependency-tracking \
- --enable-shared \
- $(use_enable static-libs static)
+PATCHES=(
+ "${FILESDIR}"/${P}-glibc214.patch
+ "${FILESDIR}"/${P}-sysconf.patch
+)
+
+src_prepare() {
+ autotools-utils_src_prepare
+ eautoreconf
}