interfasys
Verified User
doPhp() contains this block
which will trigger the re-installation of unnecessary libraries on FreeBSD for people who get their libraries from ports.
A simple ls command should be enough to get the location in most cases, starting with local libs or on FreeBSD, you could try something like this
As for the version, CB has this
which doesn't return a version number on FreeBSD.
Maybe readelf should be used?
EDIT: On FreeBSD, stat works differently and you could use this to get the version number. But you only the major version most of the time.
Code:
if [ ! -e /usr/local/lib/libxslt.so ]; then
if [ ! -e /usr/lib/libxslt.so ]; then
doLibxslt;
fi
fi
A simple ls command should be enough to get the location in most cases, starting with local libs or on FreeBSD, you could try something like this
Code:
# ldconfig -r | grep libxslt.so.2 | awk '{print $3}' | cut -d/ -f3
As for the version, CB has this
Code:
stat /usr/local/lib/libxslt.so | head -n1 | awk '{print $4}' | cut -d. -f 3,4,5 | cut -d\' -f1
Maybe readelf should be used?
EDIT: On FreeBSD, stat works differently and you could use this to get the version number. But you only the major version most of the time.
Code:
# stat -l /usr/local/lib/libxslt.so | awk '{print $12}' | cut -d. -f3,4,5
2
# stat -l /usr/local/lib/libvpx.so | awk '{print $12}' | cut -d. -f3,4,5
1.3.0
Last edited: