From 1451bc91ed1aba83de467c805f1f4f85ca8f0bb4 Mon Sep 17 00:00:00 2001 From: "Martin Haase (FDTech)" Date: Fri, 3 Jun 2022 13:44:55 +0200 Subject: [PATCH] devel/git: add cross-compilation support just for cross-compilation: set some ac_cv_ variables statically in the same way buildroot did too assume yes for these tests, configure will bail out otherwise saying error: cannot run test program while cross compiling .FIXES #142 --- recipes/devel/git.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/recipes/devel/git.yaml b/recipes/devel/git.yaml index 8a5d4aee..3d0d5dbd 100644 --- a/recipes/devel/git.yaml +++ b/recipes/devel/git.yaml @@ -21,9 +21,17 @@ checkoutSCM: digestSHA256: "405d4a0ff6e818d1f12b3e92e1ac060f612adcb454f6299f70583058cb508370" extract: False -buildTools: [target-toolchain, curl] -buildVars: [AUTOCONF_HOST, PKG_VERSION] +buildTools: [target-toolchain, curl, host-toolchain] +buildVars: [AUTOCONF_BUILD, AUTOCONF_HOST, PKG_VERSION] buildScript: | + + EXTRA=( ) + if cpackageCrossCompiling ; then + export ac_cv_fread_reads_directories=yes + export ac_cv_snprintf_returns_bogus=yes + EXTRA+=( "--build=${AUTOCONF_BUILD}" ) + fi + mkdir -p install tar -xf $1/git-${PKG_VERSION}.tar.xz @@ -32,7 +40,9 @@ buildScript: | --prefix=/usr \ --with-curl=${BOB_DEP_PATHS[net::curl-dev]}/usr \ --without-python \ - --without-expat + --without-expat \ + --without-iconv \ + ${EXTRA:+"${EXTRA[@]}"} makeParallel LIB_4_CRYPTO="$(pkg-config --libs libssl libcrypto)" make DESTDIR=${PWD}/../install install popd