mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 06:15:26 +00:00
android-build: Remove old libgit2 special handling
And replace it with something that works on a modern cmake. The upside with using the right linker, we get the symbols resolved correctly so we don't need to regex the code. Signed-off-by: Anton Lundin <glance@acc.umu.se>
This commit is contained in:
parent
75205240df
commit
a2065334bb
1 changed files with 3 additions and 4 deletions
|
@ -297,12 +297,11 @@ fi
|
|||
if [ ! -e "$PKG_CONFIG_LIBDIR/libgit2.pc" ] ; then
|
||||
# We don't want to find the HTTP_Parser package of the build host by mistake
|
||||
perl -pi -e 's/FIND_PACKAGE\(HTTP_Parser\)/#FIND_PACKAGE(HTTP_Parser)/' libgit2-${LIBGIT2_VERSION}/CMakeLists.txt
|
||||
# also, with libgit-0.25.1 and ndk-14b we see an odd build failure with a missing rand() symbol
|
||||
# trivial workaround is to just call lrand48()
|
||||
perl -pi -e 's/seed = rand/seed = (int)lrand48/' libgit2-${LIBGIT2_VERSION}/src/cache.c
|
||||
mkdir -p libgit2-build-"$ARCH"
|
||||
pushd libgit2-build-"$ARCH"
|
||||
cmake -DCMAKE_SYSTEM_NAME=Android -DSHA1_TYPE=builtin \
|
||||
cmake \
|
||||
-DCMAKE_C_COMPILER="$CC" \
|
||||
-DCMAKE_LINKER="$CC" \
|
||||
-DBUILD_CLAR=OFF -DBUILD_SHARED_LIBS=OFF \
|
||||
-DCMAKE_INSTALL_PREFIX="$PREFIX" \
|
||||
-DCURL=OFF \
|
||||
|
|
Loading…
Add table
Reference in a new issue