mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 18:43:02 +01:00
Fixed issue with wrong soname of libtommath
This commit is contained in:
parent
ba38086613
commit
88d5b899e6
@ -505,6 +505,17 @@ CorrectLibDir() {
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Validate library name
|
||||
|
||||
checkLibName() {
|
||||
libName=${1}
|
||||
grepFlag=-v
|
||||
[ "@CPU_TYPE@" = "amd64" ] && grepFlag=
|
||||
ldconfig -p | grep -w "$libName" | grep $grepFlag 'x86-64'
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Checks for presence of libName in OS
|
||||
|
||||
@ -512,14 +523,29 @@ haveLibrary() {
|
||||
libName=${1}
|
||||
[ -z "$libName" ] && return 1
|
||||
|
||||
ldconfig -p | grep -w "$libName" >/dev/null 2>/dev/null && return 0
|
||||
fixTommath=fixTomMath
|
||||
|
||||
checkLibName "$libName" >/dev/null 2>/dev/null && return 0
|
||||
|
||||
libName="lib${libName}"
|
||||
ldconfig -p | grep -w "$libName" >/dev/null 2>/dev/null
|
||||
checkLibName "$libName" >/dev/null 2>/dev/null
|
||||
|
||||
return $?
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Fix .so version of libtommath
|
||||
|
||||
fixTomMath() {
|
||||
tm1=`checkLibName libtommath.so.1 | awk '{print $4}'`
|
||||
[ -z "$tm1" ] && return
|
||||
tm0=`basename $tm1 .1`.0
|
||||
[ -e "$tm0" ] && return
|
||||
ln -s $tm1 $tm0
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# refresh cache of dynamic loader after add/delete files in system libdir
|
||||
|
||||
|
@ -221,7 +221,9 @@ checkLibrary() {
|
||||
checkLibraries() {
|
||||
if [ "@TOMMATH_BUILD@" != "Y" ]
|
||||
then
|
||||
fixTommath=
|
||||
checkLibrary tommath
|
||||
haveLibrary libtommath.so.0 || [ "$fixTommath" ] && $fixTommath
|
||||
fi
|
||||
|
||||
if [ "@TOMCRYPT_BUILD@" != "Y" ]
|
||||
|
Loading…
Reference in New Issue
Block a user