diff options
author | Anton Lundin <glance@acc.umu.se> | 2018-05-14 23:24:13 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-05-17 07:36:44 -0700 |
commit | a2065334bbfd0dfc91e27a6b7df766408015f5a7 (patch) | |
tree | 8c0caaa40516cde46aae29318c4946174148a772 | |
parent | 75205240dfe42a35622b5a07569d06cd88cc8b34 (diff) | |
download | subsurface-a2065334bbfd0dfc91e27a6b7df766408015f5a7.tar.gz |
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>
-rwxr-xr-x | packaging/android/build.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/packaging/android/build.sh b/packaging/android/build.sh index 7c153865e..ecad191bc 100755 --- a/packaging/android/build.sh +++ b/packaging/android/build.sh @@ -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 \ |