summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Savchenko <bircoph@gentoo.org>2019-03-22 12:14:40 +0300
committerAndrew Savchenko <bircoph@gentoo.org>2019-03-22 12:14:40 +0300
commit1dd75d1fd7792bc465d4c3b13fd631742361b970 (patch)
tree57d54b4a3244357b8bb1d8955147fa3ef8ae3300 /net-proxy
parentpackage.mask: Last rite net-vpn/aiccu (diff)
downloadgentoo-1dd75d1fd7792bc465d4c3b13fd631742361b970.tar.gz
gentoo-1dd75d1fd7792bc465d4c3b13fd631742361b970.tar.bz2
gentoo-1dd75d1fd7792bc465d4c3b13fd631742361b970.zip
net-proxy/tsocks: fix configure options handling
As reported in bug 672644, --enable(disable)-envconf option is not properly handled due to autoconf script mishandling. Review shown other options are not handled properly as well. This revision bump contains fix for all configure options. Closes: https://bugs.gentoo.org/672644 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
Diffstat (limited to 'net-proxy')
-rw-r--r--net-proxy/tsocks/Manifest1
-rw-r--r--net-proxy/tsocks/files/tsocks-1.8_beta5-options.patch47
-rw-r--r--net-proxy/tsocks/tsocks-1.8_beta5-r9.ebuild83
3 files changed, 131 insertions, 0 deletions
diff --git a/net-proxy/tsocks/Manifest b/net-proxy/tsocks/Manifest
index 122b1e0f9672..6bb30d322194 100644
--- a/net-proxy/tsocks/Manifest
+++ b/net-proxy/tsocks/Manifest
@@ -1,2 +1,3 @@
DIST tsocks-1.8b5-tordns1-gentoo-r3.patch.xz 18468 BLAKE2B 6e786a2a5cbf37bce743aa2f934884fd7ba3abcb0c675d9cb61a0c8ab078cde1eb96a11bf8b2acf102a9637c78654e519e186a7558a3af496eaf86c0d65bd51c SHA512 86cbc7a8733e9f9e19e0924d2a2b8481a66eb67a8d548b90c7bd02cc6ae42064a295ee6a002cf19a7b3d7d811388db2a34b641d9dbe239f4c0bc8a1f78c90682
+DIST tsocks-1.8b5-tordns1-gentoo-r4.patch.xz 18464 BLAKE2B 99bd4c210c2fa4c797c4d827df4ae53d13198b91083975b9f6d327bd762193663c1a0c8530ea5e65e82d54ccf6900a11aba50e19a2fb6209e0e8f1131985374b SHA512 711b2e3f5ac9b1a4fd63e32b6cb8090066ece8882e2ec0048bee6cba868712c80ca7f601f79405be40404af625c2ff6fefa8cba98b8a6ced95abe6becf34954f
DIST tsocks-1.8beta5.tar.gz 83928 BLAKE2B a58b4866154deb72b551961578f90b270a7cc1fd2c5b4c08a5ddf99472e3c8e338cc9116c0c9d2d2e1e1c350a077b46cd08fb24390156eb1e60c4d7a10510e6d SHA512 b41636ea6b77abf0d1e3cda7bbca4e7ee96f3cdb1843f3a2c530650931e5567f67921de67b28ba9bab0f51df39770a3f7fb458cf7ac78aad7aa861923df2c4a9
diff --git a/net-proxy/tsocks/files/tsocks-1.8_beta5-options.patch b/net-proxy/tsocks/files/tsocks-1.8_beta5-options.patch
new file mode 100644
index 000000000000..d1f524b3147c
--- /dev/null
+++ b/net-proxy/tsocks/files/tsocks-1.8_beta5-options.patch
@@ -0,0 +1,47 @@
+--- tsocks-1.8/configure.in.orig 2002-07-16 02:51:03.000000000 +0400
++++ tsocks-1.8/configure.in 2019-03-22 01:38:19.065438275 +0300
+@@ -154,36 +154,36 @@
+ ])
+ ])
+
+-if test "${enable_socksdns}" = "yes"; then
++if test "x${enable_socksdns}" = "xyes"; then
+ AC_DEFINE(USE_SOCKS_DNS)
+ fi
+
+-if test "x${enable_envconf}" = "x"; then
++if test "x${enable_envconf}" = "xyes"; then
+ AC_DEFINE(ALLOW_ENV_CONFIG)
+ fi
+
+-if test "${enable_oldmethod}" = "yes"; then
++if test "x${enable_oldmethod}" = "xyes"; then
+ AC_DEFINE(USE_OLD_DLSYM)
+ oldmethod="yes"
+ fi
+
+-if test "x${enable_debug}" = "x"; then
++if test "x${enable_debug}" = "xyes"; then
+ AC_DEFINE(ALLOW_MSG_OUTPUT)
+ fi
+
+-if test "x${enable_hostnames}" = "x"; then
++if test "x${enable_hostnames}" = "xyes"; then
+ AC_DEFINE(HOSTNAMES)
+ fi
+
+-if test "${enable_socksdns}" = "yes" -a \
+- "x${enable_hostnames}" = "x" ; then
++if test "x${enable_socksdns}" = "xyes" -a \
++ "x${enable_hostnames}" != "xno" ; then
+ AC_MSG_ERROR("--enable-socksdns is not valid without --disable-hostnames")
+ fi
+
+ dnl If we have to use the old method of overriding connect (i.e no
+ dnl RTLD_NEXT) we need to know the location of the library that
+ dnl contains connect(), select(), poll() and close()
+-if test "${oldmethod}" = "yes"; then
++if test "x${oldmethod}" = "xyes"; then
+ dnl We need to find the path to the library, to do
+ dnl this we use find on the usual suspects, i.e /lib and
+ dnl /usr/lib
diff --git a/net-proxy/tsocks/tsocks-1.8_beta5-r9.ebuild b/net-proxy/tsocks/tsocks-1.8_beta5-r9.ebuild
new file mode 100644
index 000000000000..63bfc1fbe7c9
--- /dev/null
+++ b/net-proxy/tsocks/tsocks-1.8_beta5-r9.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools toolchain-funcs multilib-minimal
+
+DESCRIPTION="Transparent SOCKS v4 proxying library"
+HOMEPAGE="http://tsocks.sourceforge.net/"
+SRC_URI="mirror://sourceforge/tsocks/${PN}-${PV/_}.tar.gz
+ tordns? ( https://dev.gentoo.org/~bircoph/patches/${PN}-${PV/_beta/b}-tordns1-gentoo-r4.patch.xz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="debug dns envconf tordns server-lookups"
+
+REQUIRED_USE="
+ dns? ( !tordns !server-lookups )
+ tordns? ( !dns !server-lookups )
+"
+
+S="${WORKDIR}/${P%%_*}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-flags.patch"
+ "${FILESDIR}/${P}-ld_preload.patch"
+ "${FILESDIR}/${P}-rename.patch"
+ "${FILESDIR}/${P}-bsd.patch"
+ "${FILESDIR}/${P}-poll.patch"
+ "${FILESDIR}/${P}-options.patch"
+)
+
+src_prepare() {
+ default
+ use tordns && eapply "../${PN}-${PV/_beta/b}-tordns1-gentoo-r4.patch"
+
+ sed -i 's/TSOCKS_CONFFILE/TSOCKS_CONF_FILE/' tsocks.8 || die "sed tsocks.8 failed"
+
+ mv configure.in configure.ac || die
+ eautoreconf
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ tc-export CC
+
+ # NOTE: the docs say to install it into /lib. If you put it into
+ # /usr/lib and add it to /etc/ld.so.preload on many systems /usr isn't
+ # mounted in time :-( (Ben Lutgens) <lamer@gentoo.org>
+ econf \
+ $(use_enable debug) \
+ $(use_enable dns socksdns) \
+ $(use_enable envconf) \
+ $(use_enable server-lookups hostnames) \
+ --with-conf="${EPREFIX}"/etc/socks/tsocks.conf \
+ --libdir="${EPREFIX}"/$(get_libdir)
+}
+
+multilib_src_compile() {
+ # Fix QA notice lack of SONAME
+ emake DYNLIB_FLAGS=-Wl,--soname,libtsocks.so.${PV/_beta*}
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+ if multilib_is_native_abi; then
+ newbin validateconf tsocks-validateconf
+ newbin saveme tsocks-saveme
+ dobin inspectsocks
+ insinto /etc/socks
+ doins tsocks.conf.*.example
+ dodoc FAQ
+ use tordns && dodoc README*
+ fi
+}
+
+pkg_postinst() {
+ einfo "Make sure you create /etc/socks/tsocks.conf from one of the examples in that directory"
+ einfo "The following executables have been renamed:"
+ einfo " /usr/bin/saveme renamed to tsocks-saveme"
+ einfo " /usr/bin/validateconf renamed to tsocks-validateconf"
+}