libraries/tsocks: fix incorrect LD_PRELOAD paths on x86_64

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
mancha 2013-10-30 23:23:58 -05:00 committed by Robby Workman
parent 88b213ed9d
commit 0979f839ec
2 changed files with 51 additions and 2 deletions

View file

@ -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 ]

View file

@ -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