Re: Bug#159286: tetex-bin is not a native Debian package
From: Adrian Bunk <bunk@fs.tum.de>
Subject: Re: Bug#159286: tetex-bin is not a native Debian package
Date: Wed, 4 Sep 2002 09:10:33 +0200 (CEST)
> FYI some observations I made with 20020901 pretest:
Thanks for your information. I am not sure but have a
question.
> - libkpathsea lost it's so-name
I found the following modification of the current package
in tetex-bin_1.0.7+20011202-7.diff.gz Is this irrelevant?
(I don't know library mechanism at all.)
Best regards, 2002/9/5
--
Debian Developer & Debian JP Developer - much more I18N of Debian
Atsuhito Kohda <kohda@debian.org>
Department of Math., Univ. of Tokushima
--- tetex-bin-1.0.7+20011202.orig/texk/klibtool
+++ tetex-bin-1.0.7+20011202/texk/klibtool
@@ -30,6 +30,7 @@
install-lib DIR LIBNAME... INSTALL_DATA
install-prog DIR PROGNAME... INSTALL_PROGRAM
version
+soname
Options:
--source-dir DIR
@@ -61,7 +62,7 @@
# program correctly until somebody besides me uses this.
while test $# -gt 0; do
case "$1" in
- configure|compile|archive|link|install-lib|install-prog|version)
+ configure|compile|archive|link|install-lib|install-prog|version|soname)
mode=$1; break;;
--source-dir) # --source-dir
shift; source_dir=$1;;
@@ -257,7 +258,8 @@
) >conftest.c
if eval "$CC -E conftest.c" | grep yes >/dev/null 2>&1; then
compiler=gcc
- args_SHARED_compile=-fPIC # should we have an option for -fpic?
+ args_SHARED_compile='-D_REENTRANT -fPIC' # should we have an option for -fpic?
+ args_STATIC_compile='-D_REENTRANT'
args_SHARED_archive=-shared
else
compiler=cc
@@ -409,8 +411,11 @@
verstring=`$0 version $newarg`
$verbose "$0: got version $verstring."
libname=`echo $newarg | sed 's/\.a$/\.'$shared_ext$verstring/`
+ soname="-Wl,-soname -Wl,`$0 soname $arg`"
+ $verbose "$0: soname is $soname."
else
libname=$newarg
+ soname=''
fi
if echo $libname | grep / >/dev/null; then
lib_dir=`echo $libname | sed 's,/[^/]*$,,'`
@@ -419,6 +424,7 @@
fi
lib_basename=`basename $libname`
lib_base=`echo $lib_basename | sed 's/[.0-9]*$//'`
+ lib_base_soname=`echo $lib_basename | sed 's/\(\.[0-9]\)[.0-9]*$/\1/'`
# We might have to run a command after making the library.
post=
@@ -426,7 +432,7 @@
# If it supports shared libraries, it supports symlinks.
# Although this is unnecessary on (e.g.) SunOS, it
# doesn't hurt, and it is necessary on (e.g.) Solaris.
- post="&& rm -f $lib_base && ln -s $lib_basename $lib_base"
+ post="&& rm -f $lib_base && ln -s $lib_basename $lib_base && rm -f $lib_base_soname && ln -s $lib_basename $lib_base_soname"
elif test $ot = STATIC; then
ranlib=`eval echo '$'${ot}_ranlib`
$verbose "${ot}_ranlib = $ranlib."
@@ -453,7 +459,7 @@
# and the user can't necessarily know the library name. We remove
# both $lib_base and $lib_base* because on MS-DOS the latter may not
# match the former.
- cmd="cd $lib_dir/$ot && rm -f $lib_base $lib_base* && $cmdname $args $post"
+ cmd="cd $lib_dir/$ot && rm -f $lib_base $lib_base* && $cmdname $args $soname $post"
$show $cmd
$chicken eval "($cmd)"
status=$?
@@ -625,8 +631,11 @@
if test $ot = SHARED; then
# Link libfoo.so to libfoo.so.1.2.3.
lib_base=`echo $lib_basename | sed 's/[.0-9]*$//'`
+ lib_base_soname=`echo $lib_basename | sed 's/\(\.[0-9]\)[.0-9]*$/\1/'`
$verbose "$0: linking $libdir/$lib_base to $lib_basename"
(cd $libdir && rm -f $lib_base && ln -s $lib_basename $lib_base)
+ $verbose "$0: linking $libdir/$lib_base_soname to $lib_basename"
+ (cd $libdir && rm -f $lib_base_soname && ln -s $lib_basename $lib_base_soname)
fi
#
# Run ldconfig, etc.
@@ -696,6 +705,29 @@
;;
+ # soname mode
+ soname)
+ if test $# -ne 1; then
+ echo "$0 version: Exactly one argument needed, not $# ($*)." >&2
+ exit 1
+ fi
+ # Strip directory name, `lib' prefix, and any .suffix.
+ dir=`echo $1 | sed 's,/[^/]*$,,'`
+ test "x$dir" = "x$1" && dir=.
+ libname=`basename $1 | sed -e 's,^lib,,' -e s',\..*$,,'`
+ verfile=$dir/klibtool.version
+ if test ! -r $verfile; then
+ echo "$0 version: No file $verfile for $libname version info." >&2
+ echo "$0 version: Original argument was $1." >&2
+ exit 1
+ fi
+ $verbose "$0: dir = $dir, libname = $libname."
+ version=`awk '$1 == "'$libname'" { print "." $2 }' $verfile`
+ $verbose "$0: version for $libname = $version."
+ echo lib$libname.$shared_ext$version
+ ;;
+
+
# unknown mode
*)
echo "$0: Impossible mode \`$mode'!" >&2
Reply to: