Link programs using user selected LDFLAGS (#209703). Fix library path in tsocks script.
authorAlin Năstac <mrness@gentoo.org>
Wed, 13 Feb 2008 16:17:50 +0000 (16:17 +0000)
committerAlin Năstac <mrness@gentoo.org>
Wed, 13 Feb 2008 16:17:50 +0000 (16:17 +0000)
Package-Manager: portage-2.1.3.19

net-proxy/tsocks/ChangeLog
net-proxy/tsocks/Manifest
net-proxy/tsocks/files/tsocks-1.8_beta5-gentoo-r1.patch [new file with mode: 0644]
net-proxy/tsocks/tsocks-1.8_beta5-r3.ebuild [new file with mode: 0644]

index eee2a8789c04d7c2870090dd556b7ccc23dba395..3c1353b35f87447d7b460c493ff7efb7ed55ca44 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for net-proxy/tsocks
-# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-proxy/tsocks/ChangeLog,v 1.21 2007/06/17 16:03:03 mrness Exp $
+# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/tsocks/ChangeLog,v 1.22 2008/02/13 16:17:49 mrness Exp $
+
+*tsocks-1.8_beta5-r3 (13 Feb 2008)
+
+  13 Feb 2008; Alin Năstac <mrness@gentoo.org>
+  +files/tsocks-1.8_beta5-gentoo-r1.patch, +tsocks-1.8_beta5-r3.ebuild:
+  Link programs using user selected LDFLAGS (#209703). Fix library path in
+  tsocks script.
 
   17 Jun 2007; Alin Năstac <mrness@gentoo.org> -tsocks-1.8_beta5.ebuild,
   -tsocks-1.8_beta5-r1.ebuild:
index f390408affa8dfa47c1187ec6720b4813ed8c6da..6ecaaa9f7aa67b4f3f9b81254a06083750763e8b 100644 (file)
@@ -1,7 +1,20 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
 AUX tsocks-1.8_beta5-bsd.patch 932 RMD160 d17f6927c4e18b25505139a9893c59afc39775aa SHA1 98b77ce698a8a9ad072f1c7275a3aeb8e2177f86 SHA256 c49851ca7581684788945f0c5cca17536459975b966b65bccb4f0588fc85a42d
+AUX tsocks-1.8_beta5-gentoo-r1.patch 5655 RMD160 8d4908a8a3ddd60493c45f62b8498046623ed915 SHA1 def7eb78180930cefb2e85d554dd416871014dd2 SHA256 678daeb7683a8ded19bf14c665271158f452a715c92d855dee47d78838723b2a
 AUX tsocks-1.8_beta5-gentoo.patch 3291 RMD160 5008f683ead3a900af4a73a9ad3a35c4f0c1548f SHA1 0c1696184bf8cf9ac9e178dd5b2993949b24e38c SHA256 53e0dd75a776fdd75c23f5dd193bff5065fcc94b2c4cc797fd77315ca2641463
+DIST tsocks-1.8b5-tordns1-gentoo-r1.patch.gz 20060 RMD160 5c77013987262331c9285e9d53738f9f7a3ecf45 SHA1 df0474aedd7ae9639053ec11968b10a68b4f82ed SHA256 d49f0eede6cf59a2e911ddf3ec14e880626369e94037c9ad853cf530ce5971dd
 DIST tsocks-1.8b5-tordns1-gentoo.patch.gz 21543 RMD160 cb584dfcc0fc0fdf382a641689a9ddf25dc184fc SHA1 f57d1550a56f4de425ef94787a0f4b6f705191d6 SHA256 7b222a5edb1d68c0046e9f1e8bef06a4508fe1bec35f846f97f4af51db67b916
 DIST tsocks-1.8beta5.tar.gz 83928 RMD160 12e3eeeafaf7f3be21dd8901da38d5890659b09e SHA1 489f88c5df999ba21b27cdaa7836d9426d062aec SHA256 849d7ef5af80d03e76cc05ed9fb8fa2bcc2b724b51ebfd1b6be11c7863f5b347
 EBUILD tsocks-1.8_beta5-r2.ebuild 1951 RMD160 dbaed04bb98fc05fc07ae7d67ea9db89282f4b7d SHA1 c2e401d1ca34626156269f67fd1804f8f68a4aac SHA256 9419142723493f42bbfae0595cf51bbe6cbe69c8192471d700a9004c1ff3a324
-MISC ChangeLog 4128 RMD160 db946b60d9a17d959143168b3d6d3f2290e3b939 SHA1 eb853e183d3556059ccc4237ac187002ba04fa0f SHA256 2b92bf5147556ca93beee014f8e1d6be633cf28c0c13cb8d6cec3eb15112283e
+EBUILD tsocks-1.8_beta5-r3.ebuild 1823 RMD160 0042bf3276ddbf02e8e94be6e2af3bd810fdd865 SHA1 45d78a7e08bf6ee0db85e9b27421efbbec8a4be5 SHA256 203f5caefe8b3c86fdaf5d2904b8866caceca8d968d7d378b6432f8acd1d118e
+MISC ChangeLog 4377 RMD160 e50fe73e07b7b1171727daada9625f91d28469ef SHA1 086d1c8d882073426252d400167bbf0c4583f506 SHA256 f1ddcd53c7cd610c9dc1216b8f724c49778c85da71d6d9b4d1d4ee19b592aa12
 MISC metadata.xml 471 RMD160 dee402e8fb1b0a17d03af1f2589e924ac4c73380 SHA1 75450d9c85ab5ac179ce651eb077ea46ef4e21b6 SHA256 c40bbba952834ddbeeda24dfee44d7b115e05a70ac381daad972df60d9ce96bd
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.8 (GNU/Linux)
+
+iEYEARECAAYFAkezGDkACgkQ+fWpoTWIA9EEtgCfY7/KVpseTlfjIT18UOd54K9l
+fVUAnioXcv2siMj6xIiz7XpVG0rF6bm+
+=yxfH
+-----END PGP SIGNATURE-----
diff --git a/net-proxy/tsocks/files/tsocks-1.8_beta5-gentoo-r1.patch b/net-proxy/tsocks/files/tsocks-1.8_beta5-gentoo-r1.patch
new file mode 100644 (file)
index 0000000..21065ad
--- /dev/null
@@ -0,0 +1,128 @@
+diff -Nru tsocks-1.8.orig/Makefile.in tsocks-1.8/Makefile.in
+--- tsocks-1.8.orig/Makefile.in        2002-03-16 12:12:40.000000000 +0200
++++ tsocks-1.8/Makefile.in     2008-02-13 18:06:05.000000000 +0200
+@@ -28,6 +28,7 @@
+ INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ CFLAGS = @CFLAGS@
++LDFLAGS = @LDFLAGS@
+ INCLUDES = -I.
+ LIBS = @LIBS@
+ SPECIALLIBS = @SPECIALLIBS@
+@@ -41,16 +42,16 @@
+ all: ${TARGETS}
+ 
+ ${VALIDATECONF}: ${VALIDATECONF}.c ${COMMON}.o ${PARSER}.o
+-      ${SHCC} ${CFLAGS} ${INCLUDES} -o ${VALIDATECONF} ${VALIDATECONF}.c ${COMMON}.o ${PARSER}.o ${LIBS}
++      ${SHCC} ${LDFLAGS} ${INCLUDES} -o ${VALIDATECONF} ${VALIDATECONF}.c ${COMMON}.o ${PARSER}.o ${LIBS}
+ 
+ ${INSPECT}: ${INSPECT}.c ${COMMON}.o
+-      ${SHCC} ${CFLAGS} ${INCLUDES} -o ${INSPECT} ${INSPECT}.c ${COMMON}.o ${LIBS} 
++      ${SHCC} ${LDFLAGS} ${INCLUDES} -o ${INSPECT} ${INSPECT}.c ${COMMON}.o ${LIBS} 
+ 
+ ${SAVE}: ${SAVE}.c
+-      ${SHCC} ${CFLAGS} ${INCLUDES} -static -o ${SAVE} ${SAVE}.c
++      ${SHCC} ${LDFLAGS} ${INCLUDES} -static -o ${SAVE} ${SAVE}.c
+ 
+ ${SHLIB}: ${OBJS} ${COMMON}.o ${PARSER}.o
+-      ${SHCC} ${CFLAGS} ${INCLUDES} -nostdlib -shared -o ${SHLIB} ${OBJS} ${COMMON}.o ${PARSER}.o ${DYNLIB_FLAGS} ${SPECIALLIBS} ${LIBS}
++      ${SHCC} ${LDFLAGS} ${INCLUDES} -nostdlib -shared -o ${SHLIB} ${OBJS} ${COMMON}.o ${PARSER}.o ${DYNLIB_FLAGS} ${SPECIALLIBS} ${LIBS}
+       ln -sf ${SHLIB} ${LIB_NAME}.so
+ 
+ %.so: %.c
+diff -Nru tsocks-1.8.orig/tsocks tsocks-1.8/tsocks
+--- tsocks-1.8.orig/tsocks     2002-03-16 12:27:18.000000000 +0200
++++ tsocks-1.8/tsocks  2008-02-13 18:05:11.000000000 +0200
+@@ -46,10 +46,10 @@
+       on)
+               if [ -z "$LD_PRELOAD" ]
+                       then
+-                              export LD_PRELOAD="/usr/lib/libtsocks.so"
++                              export LD_PRELOAD="/lib/libtsocks.so"
+                       else
+-                              echo $LD_PRELOAD | grep -q "/usr/lib/libtsocks\.so" || \
+-                              export LD_PRELOAD="/usr/lib/libtsocks.so $LD_PRELOAD"
++                              echo $LD_PRELOAD | grep -q "/lib/libtsocks\.so" || \
++                              export LD_PRELOAD="/lib/libtsocks.so $LD_PRELOAD"
+               fi
+       ;;
+       off)
+@@ -68,10 +68,10 @@
+       *)
+               if [ -z "$LD_PRELOAD" ]
+               then
+-                      export LD_PRELOAD="/usr/lib/libtsocks.so"
++                      export LD_PRELOAD="/lib/libtsocks.so"
+               else
+-                      echo $LD_PRELOAD | grep -q "/usr/lib/libtsocks\.so" || \
+-                      export LD_PRELOAD="/usr/lib/libtsocks.so $LD_PRELOAD"
++                      echo $LD_PRELOAD | grep -q "/lib/libtsocks\.so" || \
++                      export LD_PRELOAD="/lib/libtsocks.so $LD_PRELOAD"
+               fi
+ 
+               if [ $# = 0 ]
+diff -Nru tsocks-1.8.orig/tsocks.8 tsocks-1.8/tsocks.8
+--- tsocks-1.8.orig/tsocks.8   2002-03-16 12:20:51.000000000 +0200
++++ tsocks-1.8/tsocks.8        2008-02-13 18:06:05.000000000 +0200
+@@ -127,8 +127,8 @@
+ libtsocks in /etc/ld.so.preload. Please make sure you correctly enter the
+ full path to the library in this file if you do this. If you get it wrong,
+ you will be UNABLE TO DO ANYTHING with the machine and will have to boot
+-it with a rescue disk and remove the file (or try the saveme program, see
+-the INSTALL file for more info).  THIS IS A ***WARNING***, please be
++it with a rescue disk and remove the file (or try the tsocks-saveme program,
++simply unlinks /etc/ld.so.preload ). THIS IS A ***WARNING***, please be
+ careful. Also be sure the library is in the root filesystem as all hell
+ will break loose if the directory it is in is not available at boot time.
+ 
+diff -Nru tsocks-1.8.orig/tsocks.conf.5 tsocks-1.8/tsocks.conf.5
+--- tsocks-1.8.orig/tsocks.conf.5      2002-05-18 05:13:08.000000000 +0300
++++ tsocks-1.8/tsocks.conf.5   2008-02-13 18:06:05.000000000 +0200
+@@ -139,21 +139,20 @@
+ the version that server supports. 
+ 
+ .TP
+-validateconf
+-validateconf can be used to verify the configuration file. It checks the format
+-of the file and also the contents for errors. Having read the file it dumps 
+-the configuration to the screen in a formatted, readable manner. This can be 
+-extremely useful in debugging problems.
+-
+-validateconf can read a configuration file from a location other than the 
+-location specified at compile time with the -f <filename> command line 
+-option.
+-
+-Normally validateconf simply dumps the configuration read to the screen (in
+-a nicely readable format), however it also has a useful 'test' mode. When
+-passed a hostname/ip on the command line like -t <hostname/ip>, validateconf 
+-determines which of the SOCKS servers specified in the configuration file 
+-would be used by tsocks to access the specified host. 
++tsocks-validateconf
++tsocks-validateconf can be used to verify the configuration file. It checks
++the format of the file and also the contents for errors. Having read the file 
++it dumps the configuration to the screen in a formatted, readable manner.
++This can be extremely useful in debugging problems.
++
++tsocks-validateconf can read a configuration file from a location other than the 
++location specified at compile time with the -f <filename> command line option.
++
++Normally tsocks-validateconf simply dumps the configuration read to the screen 
++(in a nicely readable format), however it also has a useful 'test' mode. When
++passed a hostname/ip on the command line like -t <hostname/ip>, 
++tsocks-validateconf determines which of the SOCKS servers specified in the 
++configuration file would be used by tsocks to access the specified host. 
+ 
+ .SH SEE ALSO
+ tsocks(8)
+diff -Nru tsocks-1.8.orig/validateconf.c tsocks-1.8/validateconf.c
+--- tsocks-1.8.orig/validateconf.c     2002-02-07 12:49:59.000000000 +0200
++++ tsocks-1.8/validateconf.c  2008-02-13 18:06:05.000000000 +0200
+@@ -23,7 +23,7 @@
+ */
+ 
+ /* Global configuration variables */ 
+-char *progname = "validateconf";            /* Name for error msgs      */
++char *progname = "tsocks-validateconf";             /* Name for error msgs      */
+ 
+ /* Header Files */
+ #include <config.h>
diff --git a/net-proxy/tsocks/tsocks-1.8_beta5-r3.ebuild b/net-proxy/tsocks/tsocks-1.8_beta5-r3.ebuild
new file mode 100644 (file)
index 0000000..9ee1a3b
--- /dev/null
@@ -0,0 +1,58 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/tsocks/tsocks-1.8_beta5-r3.ebuild,v 1.1 2008/02/13 16:17:49 mrness Exp $
+
+inherit multilib eutils autotools toolchain-funcs
+
+DESCRIPTION="Transparent SOCKS v4 proxying library"
+HOMEPAGE="http://tsocks.sourceforge.net/"
+SRC_URI="mirror://sourceforge/tsocks/${PN}-${PV/_}.tar.gz
+       tordns? ( mirror://gentoo/${PN}-${PV/_beta/b}-tordns1-gentoo-r1.patch.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="tordns"
+
+S="${WORKDIR}/${P%%_*}"
+
+src_unpack() {
+       unpack ${A}
+       cd "${S}"
+
+       epatch "${FILESDIR}/${P}-gentoo-r1.patch"
+       epatch "${FILESDIR}/${P}-bsd.patch"
+       use tordns && epatch "../${PN}-${PV/_beta/b}-tordns1-gentoo-r1.patch"
+       eautoconf
+}
+
+src_compile() {
+       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 \
+               --with-conf=/etc/socks/tsocks.conf \
+               --libdir=/$(get_libdir) || die "configure failed"
+       # Fix QA notice lack of SONAME
+       emake DYNLIB_FLAGS=-Wl,--soname,libtsocks.so.${PV/_beta*} || die "emake failed"
+}
+
+src_install() {
+       emake DESTDIR="${D}" install || die "make install failed"
+       newbin validateconf tsocks-validateconf
+       newbin saveme tsocks-saveme
+       dobin inspectsocks
+       insinto /etc/socks
+       doins tsocks.conf.*.example
+       dodoc FAQ
+       use tordns && dodoc README*
+}
+
+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"
+}