aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormancha <mancha1@hush.com>2013-10-30 23:23:58 -0500
committerRobby Workman <rworkman@slackbuilds.org>2013-10-30 23:24:54 -0500
commit59940d1bdcc0c0d5643f5a4c047a5986e8bd48f8 (patch)
treed6f3b2bfba4d810347de788a396f5a285ba7d01b
parentfc0a0ba723dc737661da95ec0776c4eeecba6769 (diff)
libraries/tsocks: fix incorrect LD_PRELOAD paths on x86_64
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
-rw-r--r--libraries/tsocks/tsocks-1.8beta5-64bit.diff43
-rw-r--r--libraries/tsocks/tsocks.SlackBuild10
2 files changed, 51 insertions, 2 deletions
diff --git a/libraries/tsocks/tsocks-1.8beta5-64bit.diff b/libraries/tsocks/tsocks-1.8beta5-64bit.diff
new file mode 100644
index 0000000000000..d6ba3361086d4
--- /dev/null
+++ b/libraries/tsocks/tsocks-1.8beta5-64bit.diff
@@ -0,0 +1,43 @@
+From 433c41f4a23130a079ed6e681e7016c0b187fb61 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@hush.com>
+Date: Thu, 26 Sep 2013
+Subject: Use appropriate path on x86_64 systems
+
+ tsocks | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+--- a/tsocks 2013-09-26
++++ b/tsocks 2013-09-26
+@@ -46,14 +46,14 @@ case "$1" in
+ on)
+ if [ -z "$LD_PRELOAD" ]
+ then
+- export LD_PRELOAD="/usr/lib/libtsocks.so"
++ export LD_PRELOAD="/usr/lib64/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 "/usr/lib64/libtsocks\.so" || \
++ export LD_PRELOAD="/usr/lib64/libtsocks.so $LD_PRELOAD"
+ fi
+ ;;
+ off)
+- export LD_PRELOAD=`echo -n $LD_PRELOAD | sed 's/\/usr\/lib\/libtsocks.so \?//'`
++ export LD_PRELOAD=`echo -n $LD_PRELOAD | sed 's/\/usr\/lib64\/libtsocks.so \?//'`
+ if [ -z "$LD_PRELOAD" ]
+ then
+ unset LD_PRELOAD
+@@ -68,10 +68,10 @@ case "$1" in
+ *)
+ if [ -z "$LD_PRELOAD" ]
+ then
+- export LD_PRELOAD="/usr/lib/libtsocks.so"
++ export LD_PRELOAD="/usr/lib64/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 "/usr/lib64/libtsocks\.so" || \
++ export LD_PRELOAD="/usr/lib64/libtsocks.so $LD_PRELOAD"
+ fi
+
+ if [ $# = 0 ]
diff --git a/libraries/tsocks/tsocks.SlackBuild b/libraries/tsocks/tsocks.SlackBuild
index 7b4f6ff42a4dc..21473cebb48cc 100644
--- a/libraries/tsocks/tsocks.SlackBuild
+++ b/libraries/tsocks/tsocks.SlackBuild
@@ -25,7 +25,7 @@
PRGNAM=tsocks
VERSION=${VERSION:-1.8beta5}
SRCVERSION=${SRCVERSION:-1.8}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
# Automatically determine the architecture we're building on:
@@ -43,7 +43,7 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-DOCS="COPYING ChangeLog FAQ"
+DOCS="COPYING ChangeLog FAQ tsocks.conf.{simple,complex}.example"
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
@@ -74,6 +74,10 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+if [ "$ARCH" = "x86_64" ]; then
+ patch -p1 --verbose < $CWD/tsocks-1.8beta5-64bit.diff || exit 1
+fi
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -87,6 +91,8 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
+install -m 0755 inspectsocks validateconf $PKG/usr/bin
+
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true