/usr/bin/sb2-build-libtool is in scratchbox2 2.2.4-1debian1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | #!/bin/bash
# sb2-build-libtool - Copyright (C) 2007 Lauri Leukkunen <lle@rahina.org>
# Licensed under GPL version 2
prog="$0"
progbase=`basename $0`
# test that we're inside sb2
function error_not_inside_sb2()
{
echo "Please run this script inside sb2, like this:
$ sb2 $0"
exit 1
}
if [ -z "$SBOX_SESSION_DIR" ]; then
error_not_inside_sb2
fi
. $SBOX_SESSION_DIR/sb2-session.conf
TARGET="$sbox_target"
set -e
NAME=libtool
VERSION=1.5.26
DLHOST="http://ftp.funet.fi/pub/mirrors/ftp.gnu.org/pub/gnu/libtool"
SOURCEFILE=$NAME-$VERSION.tar.gz
LOCAL_SOURCEFILE=$HOME/.scratchbox2/$SOURCEFILE
COMPILERDIR=
WORKDIR=$HOME/.scratchbox2/libtool_build
rm -rf $WORKDIR
mkdir -p $WORKDIR
cd $WORKDIR
# $LOCAL_SOURCEFILE must exist and have size greater than zero
# (a failed or interrupted wget might create a zero-sized file)
if [ ! -s $LOCAL_SOURCEFILE ]; then
wget $DLHOST/$SOURCEFILE -O $LOCAL_SOURCEFILE
fi
tar zxf $LOCAL_SOURCEFILE --strip-components=1
./configure --prefix=$HOME/.scratchbox2/$TARGET --build=$(uname -m)-unknown-linux-gnu
# The system libtool script in Debian must be able to support
# invoking gcc as cc (Debian specific)
echo '# ### BEGIN LIBTOOL TAG CONFIG: BINCC' >> libtool
sed -n -e '/^# ### BEGIN LIBTOOL CONFIG/,/^# ### END LIBTOOL CONFIG/p' < libtool \
| grep -B 2 -A 1 -e '^LTCC=' -e '^CC=' \
| sed -e 's/gcc/cc/g' >> libtool
echo '# ### END LIBTOOL TAG CONFIG: BINCC' >> libtool
echo >> libtool
# The system libtool script in Debian must be able to support
# invoking g++ both by the g++ and c++ names. (Debian specific)
sed -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: CXX$$/,/^# ### END LIBTOOL TAG CONFIG: CXX$$/p' < libtool \
| sed -e 's/CONFIG: CXX/CONFIG: BINCXX/g' \
-e 's/g++/c++/g' >> libtool
echo >> libtool
# Add our BINCC and BINCXX tags (Debian specific)
sed -e 's/^\(available_tags\)=\"\(.*\)\"/\1=\"\2 BINCC BINCXX\"/' \
< libtool > libtool.tags
mv libtool.tags libtool
# Make libtool executable again
chmod 755 libtool
make
# create these directories to work around ppc host issues
mkdir -p $HOME/.scratchbox2/$TARGET/share/aclocal
mkdir -p $HOME/.scratchbox2/$TARGET/share/libtool/libltdl
mkdir -p $HOME/.scratchbox2/$TARGET/lib
mkdir -p $HOME/.scratchbox2/$TARGET/include
make install
cd ..
# cleanup
rm -rf $WORKDIR
|