mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-03 15:43:09 +00:00
build-system: fix libgit2 detection
Usually ldconfig isn't in the user's path. Suggested-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
1d6c1db4a5
commit
86396e9904
1 changed files with 6 additions and 3 deletions
|
@ -265,10 +265,13 @@ else
|
||||||
# maybe there's a system version that's new enough?
|
# maybe there's a system version that's new enough?
|
||||||
# Ugh that's uggly - read the ultimate filename, split at the last 'o' which gets us ".0.26.3" or ".1.0.0"
|
# Ugh that's uggly - read the ultimate filename, split at the last 'o' which gets us ".0.26.3" or ".1.0.0"
|
||||||
# since that starts with a dot, the field numbers in the cut need to be one higher
|
# since that starts with a dot, the field numbers in the cut need to be one higher
|
||||||
LIBGIT=$(realpath $(ldconfig -p | grep libgit2\\.so\\. | cut -d\ -f4) | awk -Fo '{ print $NF }')
|
LDCONFIG=$(PATH=/sbin:/usr/sbin:$PATH which ldconfig)
|
||||||
|
if [ ! -z "$LDCONFIG" ] ; then
|
||||||
|
LIBGIT=$(realpath $("$LDCONFIG" -p | grep libgit2\\.so\\. | cut -d\ -f4) | awk -Fo '{ print $NF }')
|
||||||
LIBGITMAJ=$(echo $LIBGIT | cut -d. -f2)
|
LIBGITMAJ=$(echo $LIBGIT | cut -d. -f2)
|
||||||
LIBGIT=$(echo $LIBGIT | cut -d. -f3)
|
LIBGIT=$(echo $LIBGIT | cut -d. -f3)
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $PLATFORM = Darwin && "$BUILD_DEPS" == "1" ]] ; then
|
if [[ $PLATFORM = Darwin && "$BUILD_DEPS" == "1" ]] ; then
|
||||||
|
|
Loading…
Reference in a new issue