From 1c4f928f92df39846624e25cc718028a6813d692 Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Sat, 18 Nov 2017 20:41:39 +0100 Subject: [PATCH] libiio: add patch to fix build on buildbots On buildbots, the building directory seems to be not a subdir of a git repo, so a variable expands into an empty string which in turn results in a syntax error: --snip-- -- Looking for in6addr_any - found -- Found Git: /data/bowl-builder/arm_cortex-a5/build/sdk/staging_dir/host/bin/git (found version "2.1.4") fatal: Not a git repository (or any parent up to mount point /data) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). CMake Error at CMakeLists.txt:114 (if): if given arguments: "STREQUAL" "/data/bowl-builder/arm_cortex-a5/build/sdk/build_dir/target-arm_cortex-a5_musl_eabi/libiio-0.11" Unknown arguments specified -- Configuring incomplete, errors occurred! --snap-- The patch quotes the if arguments and thus fixes the build. Signed-off-by: Michael Heimpold --- libs/libiio/patches/001-quote-strequal.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 libs/libiio/patches/001-quote-strequal.patch diff --git a/libs/libiio/patches/001-quote-strequal.patch b/libs/libiio/patches/001-quote-strequal.patch new file mode 100644 index 000000000..d8b91f89b --- /dev/null +++ b/libs/libiio/patches/001-quote-strequal.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt 2017-10-23 22:24:46.000000000 +0200 ++++ b/CMakeLists.txt 2017-11-18 20:31:27.943838662 +0100 +@@ -111,7 +111,7 @@ + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + +- if (${LIBIIO_GIT_REPO} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) ++ if ("${LIBIIO_GIT_REPO}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") + execute_process( + COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}