From 7928bd1462edd0346fba6b033f392765cb5607b5 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Sun, 20 Mar 2016 07:27:58 +0100 Subject: [PATCH] vigra: fix cross --- srcpkgs/vigra/files/TryRunResults.cmake | 30 +++++++++++++++++++++++++ srcpkgs/vigra/template | 8 ++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/vigra/files/TryRunResults.cmake diff --git a/srcpkgs/vigra/files/TryRunResults.cmake b/srcpkgs/vigra/files/TryRunResults.cmake new file mode 100644 index 00000000000..7fb7400f825 --- /dev/null +++ b/srcpkgs/vigra/files/TryRunResults.cmake @@ -0,0 +1,30 @@ +# This file was generated by CMake because it detected TRY_RUN() commands +# in crosscompiling mode. It will be overwritten by the next CMake run. +# Copy it to a safe location, set the variables to appropriate values +# and use it then to preset the CMake cache (using -C). + + +# RUN_RESULT +# indicates whether the executable would have been able to run on its +# target platform. If so, set RUN_RESULT to +# the exit code (in many cases 0 for success), otherwise enter "FAILED_TO_RUN". +# RUN_RESULT__TRYRUN_OUTPUT +# contains the text the executable would have printed on stdout and stderr. +# If the executable would not have been able to run, set RUN_RESULT__TRYRUN_OUTPUT empty. +# Otherwise check if the output is evaluated by the calling CMake code. If so, +# check what the source file would have printed when called with the given arguments. +# The COMPILE_SUCCEEDED variable holds the build result for this TRY_RUN(). +# +# Source file : /builddir/vigra-Version-1-11-0/config/output_cplusplus_version.cxx +# Executable : /builddir/vigra-Version-1-11-0/build/CMakeFiles/cmTryCompileExec2883594344-RUN_RESULT +# Run arguments : +# Called from: [1] /builddir/vigra-Version-1-11-0/CMakeLists.txt + +set( RUN_RESULT + "0" + CACHE STRING "Result from TRY_RUN" FORCE) + +set( RUN_RESULT__TRYRUN_OUTPUT + "%OUTPUT%" + CACHE STRING "Output from TRY_RUN" FORCE) + diff --git a/srcpkgs/vigra/template b/srcpkgs/vigra/template index b9d4a9e48cc..0d37b536107 100644 --- a/srcpkgs/vigra/template +++ b/srcpkgs/vigra/template @@ -15,7 +15,13 @@ distfiles="https://github.com/ukoethe/vigra/archive/Version-${version//./-}.tar. checksum=cae4838a2cc92ca52eafa621ab848df2e61399bbd77b2b945db35068fb50c86b wrksrc=$pkgname-Version-${version//./-} -nocross="http://build.voidlinux.eu/builders/armv7l_builder/builds/22835/steps/shell_3/logs/stdio" +pre_configure() { + if [ "$CROSS_BUILD" ]; then + g++ config/output_cplusplus_version.cxx -o gccbugcheck + sed "s#%OUTPUT%#$(./gccbugcheck)#" $FILESDIR/TryRunResults.cmake > TryRunResults.cmake + configure_args+=" -C $PWD/TryRunResults.cmake" + fi +} post_install() { vmkdir usr/share/$pkgname