parlay

yet another gentoo overlay
git clone https://git.parazyd.org/parlay
Log | Files | Refs | README

commit c79be9591f13fc64b757dfd3933b2f73691ffd58
parent 94f329730c8207e247b84247efd84ed3ea6b7a4d
Author: parazyd <parazyd@dyne.org>
Date:   Mon, 10 Oct 2016 22:49:11 +0200

net-proxy/torsocks: Move 2.1.0 to 9999 and apply musl-libc patch.

Diffstat:
Dnet-proxy/torsocks/Manifest | 1-
Mnet-proxy/torsocks/files/musl-fix.patch | 123+++++++++++++++++++++++++++-----------------------------------------------------
Dnet-proxy/torsocks/torsocks-2.1.0-r99.ebuild | 49-------------------------------------------------
Anet-proxy/torsocks/torsocks-9999.ebuild | 49+++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 90 insertions(+), 132 deletions(-)

diff --git a/net-proxy/torsocks/Manifest b/net-proxy/torsocks/Manifest @@ -1 +0,0 @@ -DIST torsocks-2.1.0.tar.gz 106339 SHA256 a72c3ea757f5fe81d1ab91e0d5f0d83f195e235aae66d4df2f88a20db7028104 SHA512 5bdec6fd6c2d99effb73e418acd37ee135b3c912fad7811bfc8c724282370beea23149c6e94b995cfed0e61be43e63ac11d8c6ef420ba0137a19b96d8ac370e5 WHIRLPOOL 4511c9bff51ec25efb9b6f211d4b37931ba9c23ad89b1b272adf6b60351308e59a5e3d5157ba4adfab9e085deba435a9a1a8b4c69ec98514069c42561799c25c diff --git a/net-proxy/torsocks/files/musl-fix.patch b/net-proxy/torsocks/files/musl-fix.patch @@ -1,85 +1,44 @@ -diff -u -r torsocks-2.1.0.orig/src/common/compat.c torsocks-2.1.0/src/common/compat.c ---- torsocks-2.1.0.orig/src/common/compat.c 2015-12-06 19:44:47.251991190 +0100 -+++ torsocks-2.1.0/src/common/compat.c 2015-12-06 19:44:58.871959984 +0100 -@@ -19,8 +19,6 @@ - - #include "compat.h" - --#if (defined(__GLIBC__) || defined(__FreeBSD__) || defined(__darwin__) || defined(__NetBSD__)) -- - /* - * Initialize a pthread mutex. This never fails. +diff --git a/src/lib/syscall.c b/src/lib/syscall.c +index 9495a64..95525e2 100644 +--- a/src/lib/syscall.c ++++ b/src/lib/syscall.c +@@ -15,13 +15,14 @@ + * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -@@ -95,5 +93,3 @@ - } - tsocks_mutex_unlock(&o->mutex); - } -- --#endif /* __GLIBC__, __darwin__, __FreeBSD__, __NetBSD__ */ -diff -u -r torsocks-2.1.0.orig/src/common/compat.h torsocks-2.1.0/src/common/compat.h ---- torsocks-2.1.0.orig/src/common/compat.h 2015-12-06 19:44:47.251991190 +0100 -+++ torsocks-2.1.0/src/common/compat.h 2015-12-06 19:44:51.538646345 +0100 -@@ -22,8 +22,6 @@ - #define __darwin__ 1 - #endif - --#if (defined(__GLIBC__) || defined(__FreeBSD__) || defined(__darwin__) || defined(__NetBSD__)) -- - #define RTLD_NEXT ((void *) -1) - - #include <pthread.h> -@@ -53,10 +51,6 @@ - - void tsocks_once(tsocks_once_t *o, void (*init_routine)(void)); - --#else --#error "OS not supported." --#endif /* __GLIBC__, __darwin__, __FreeBSD__, __NetBSD__ */ -- - #if defined(__linux__) - #include <unistd.h> - #include <sys/syscall.h> -diff -u -r torsocks-2.1.0.orig/src/common/ref.h torsocks-2.1.0/src/common/ref.h ---- torsocks-2.1.0.orig/src/common/ref.h 2015-12-06 19:44:47.251991190 +0100 -+++ torsocks-2.1.0/src/common/ref.h 2015-12-06 19:44:51.538646345 +0100 -@@ -26,8 +26,6 @@ - long count; - }; - --#if (defined(__GLIBC__) || defined(__FreeBSD__) || defined(__darwin__) || defined(__NetBSD__)) -- - /* - * Get a reference by incrementing the refcount. - */ -@@ -55,8 +53,4 @@ - } - } - --#else --#error "OS not supported" --#endif /* __GLIBC__, __FreeBSD__, __darwin__ */ -- - #endif /* TORSOCKS_REF_H */ -diff -u -r torsocks-2.1.0.orig/src/lib/torsocks.h torsocks-2.1.0/src/lib/torsocks.h ---- torsocks-2.1.0.orig/src/lib/torsocks.h 2015-12-06 19:44:47.251991190 +0100 -+++ torsocks-2.1.0/src/lib/torsocks.h 2015-12-06 19:44:51.538646345 +0100 -@@ -33,8 +33,6 @@ - #define TSOCKS_DECL(name, type, sig) \ - extern type tsocks_##name(sig); - --#if (defined(__GLIBC__) || defined(__FreeBSD__) || defined(__darwin__) || defined(__NetBSD__)) -- - /* connect(2) */ - #include <sys/types.h> - #include <sys/socket.h> -@@ -205,9 +203,6 @@ - int sockfd, int backlog - #define LIBC_LISTEN_ARGS sockfd, backlog - --#else --#error "OS not supported." --#endif /* __GLIBC__ , __FreeBSD__, __darwin__, __NetBSD__ */ - + ++#include "torsocks.h" ++ + #include <assert.h> + #include <stdarg.h> + #include <sys/mman.h> + + #include <common/log.h> + +-#include "torsocks.h" + + /* syscall(2) */ + TSOCKS_LIBC_DECL(syscall, LIBC_SYSCALL_RET_TYPE, LIBC_SYSCALL_SIG) +diff --git a/src/lib/torsocks.h b/src/lib/torsocks.h +index bcaf92b..490fce4 100644 +--- a/src/lib/torsocks.h ++++ b/src/lib/torsocks.h +@@ -20,6 +20,10 @@ + #ifndef TORSOCKS_H + #define TORSOCKS_H + ++#if (defined(__linux__)) ++#define _GNU_SOURCE 1 ++#endif ++ + #include <common/compat.h> + #include <common/config-file.h> + +@@ -233,7 +237,7 @@ struct hostent **result, int *h_errnop + #if (defined(__linux__)) - +-#define _GNU_SOURCE ++/* #define _GNU_SOURCE */ + + /* syscall(2) */ + #define LIBC_SYSCALL_NAME syscall diff --git a/net-proxy/torsocks/torsocks-2.1.0-r99.ebuild b/net-proxy/torsocks/torsocks-2.1.0-r99.ebuild @@ -1,49 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -inherit autotools eutils multilib versionator - -MY_PV="$(replace_version_separator 3 -)" -MY_PF="${PN}-${MY_PV}" -S=${WORKDIR}/${MY_PF} - -DESCRIPTION="Use most socks-friendly applications with Tor" -HOMEPAGE="https://github.com/dgoulet/torsocks" -SRC_URI="https://github.com/dgoulet/torsocks/archive/v${MY_PV}.tar.gz -> ${MY_PF}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~x86" -IUSE="static-libs" - -# We do not depend on tor which might be running on a different box -DEPEND="" -RDEPEND="${DEPEND}" - -src_prepare() { - sed -i -e "/dist_doc_DATA/s/^/#/" Makefile.am doc/Makefile.am || die - - # Disable tests requiring network access. - sed -i -e '/^\.\/test_dns$/d' tests/test_list || \ - die "failed to disable network tests" - - eautoreconf -} - -src_configure() { - epatch "${FILESDIR}/musl-fix.patch" - econf $(use_enable static-libs static) -} - -src_install() { - default - - dodoc ChangeLog README.md TODO doc/notes/DEBUG doc/socks/{SOCKS5,socks-extensions.txt} - - #Remove libtool .la files - cd "${D}"/usr/$(get_libdir)/torsocks || die - rm -f *.la -} diff --git a/net-proxy/torsocks/torsocks-9999.ebuild b/net-proxy/torsocks/torsocks-9999.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils multilib versionator git-r3 + +MY_PV="$(replace_version_separator 3 -)" +MY_PF="${PN}-${MY_PV}" +S=${WORKDIR}/${MY_PF} + +DESCRIPTION="Use most socks-friendly applications with Tor" +HOMEPAGE="https://gitweb.torproject.org/torsocks.git" +EGIT_REPO_URI="https://git.torproject.org/torsocks.git" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="static-libs" + +# We do not depend on tor which might be running on a different box +DEPEND="" +RDEPEND="${DEPEND}" + +src_prepare() { + sed -i -e "/dist_doc_DATA/s/^/#/" Makefile.am doc/Makefile.am || die + + # Disable tests requiring network access. + #sed -i -e '/^\.\/test_dns$/d' tests/test_list || \ + # die "failed to disable network tests" + + eautoreconf +} + +src_configure() { + epatch "${FILESDIR}/musl-fix.patch" + econf $(use_enable static-libs static) +} + +src_install() { + default + + dodoc ChangeLog README.md TODO doc/notes/DEBUG doc/socks/{SOCKS5,socks-extensions.txt} + + #Remove libtool .la files + cd "${D}"/usr/$(get_libdir)/torsocks || die + rm -f *.la +}