blob: da40f702f3b31dbf56141e79d54ac5c9d228b355 (
plain)
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
|
#!@BUILDLINK_SHELL@
#
# $NetBSD: fake-la,v 1.1 2002/09/18 00:46:59 jlam Exp $
BASENAME="@BASENAME@"
CC="@CC@"
CP="@CP@"
DIRNAME="@DIRNAME@"
ECHO="@ECHO@"
LIBTOOL="@LIBTOOL@ --quiet"
MKDIR="@MKDIR@"
MV="@MV@"
RM="@RM@"
SED="@SED@"
BUILDLINK_DIR="@BUILDLINK_DIR@"
reallib="$1"
realdir=`${DIRNAME} $reallib`
libname=`${BASENAME} $reallib`
tmpdir=${BUILDLINK_DIR}/.tmp
if [ ! -f $tmpdir/inst/$libbase.la ]; then
case $libname in
*.so.[0-9]*)
libbase=`${ECHO} $libname | ${SED} -e "s/\.so\.[0-9.]*$//"`
version=`${ECHO} $libname | ${SED} -e "s/.*\.so\.//;s/\./:/g"`
;;
*[0-9].dylib)
libbase=`${ECHO} $libname | ${SED} -e "s/\.[0-9.]*\.dylib$//"`
version=`${ECHO} $libname | ${SED} -e "s/^[^.]*\.\([0-9]*\.[0-9]*\)\.dylib/\1/;s/\./:/g"`
;;
esac
${MKDIR} $tmpdir/inst
cd $tmpdir
${LIBTOOL} ${CC} -o $libbase.la -rpath $tmpdir/inst -version-info $version
${LIBTOOL} --mode=install ${CP} $libbase.la $tmpdir/inst >/dev/null
fi
${SED} -e "s,$tmpdir/inst,$realdir,g" $tmpdir/inst/$libbase.la
|