From b5cd6341f12ba350f4b568f245f916731042710a Mon Sep 17 00:00:00 2001 From: Johannes Date: Sat, 27 Oct 2018 16:49:34 +0200 Subject: [PATCH] evolution: fix cross adopt fixes from evolution-data-server --- .../evolution/files/disableRuntimeTests.cmake | 45 +++++++++++++++++++ srcpkgs/evolution/files/iconv-detect.h | 5 +++ srcpkgs/evolution/template | 20 ++++++++- 3 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/evolution/files/disableRuntimeTests.cmake create mode 100644 srcpkgs/evolution/files/iconv-detect.h diff --git a/srcpkgs/evolution/files/disableRuntimeTests.cmake b/srcpkgs/evolution/files/disableRuntimeTests.cmake new file mode 100644 index 00000000000..8be55b42070 --- /dev/null +++ b/srcpkgs/evolution/files/disableRuntimeTests.cmake @@ -0,0 +1,45 @@ +# 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). + + +# _correct_iconv_EXITCODE +# indicates whether the executable would have been able to run on its +# target platform. If so, set _correct_iconv_EXITCODE to +# the exit code (in many cases 0 for success), otherwise enter "FAILED_TO_RUN". +# The _correct_iconv_COMPILED variable holds the build result for this TRY_RUN(). +# +# Source file : /builddir/evolution-data-server-3.26.0/build/CMakeFiles/CMakeTmp/src.c +# Executable : /builddir/evolution-data-server-3.26.0/build/CMakeFiles/cmTC_315ee-_correct_iconv_EXITCODE +# Run arguments : +# Called from: [2] /usr/share/cmake-3.9/Modules/CheckCSourceRuns.cmake +# [1] /builddir/evolution-data-server-3.26.0/CMakeLists.txt + +set( _correct_iconv_EXITCODE + 0 + CACHE INTERNAL "Result from TRY_RUN" FORCE) +set(_correct_iconv_EXITCODE__TRYRUN_OUTPUT + 0 + CACHE INTERNAL "Result from TRY_RUN" FORCE) + + +# HAVE_LKSTRFTIME_EXITCODE +# indicates whether the executable would have been able to run on its +# target platform. If so, set HAVE_LKSTRFTIME_EXITCODE to +# the exit code (in many cases 0 for success), otherwise enter "FAILED_TO_RUN". +# The HAVE_LKSTRFTIME_COMPILED variable holds the build result for this TRY_RUN(). +# +# Source file : /builddir/evolution-data-server-3.26.0/build/CMakeFiles/CMakeTmp/src.c +# Executable : /builddir/evolution-data-server-3.26.0/build/CMakeFiles/cmTC_d2897-HAVE_LKSTRFTIME_EXITCODE +# Run arguments : +# Called from: [2] /usr/share/cmake-3.9/Modules/CheckCSourceRuns.cmake +# [1] /builddir/evolution-data-server-3.26.0/CMakeLists.txt + +set( HAVE_LKSTRFTIME_EXITCODE + 0 + CACHE INTERNAL "Result from TRY_RUN" FORCE) +set( HAVE_LKSTRFTIME_EXITCODE__TRYRUN_OUTPUT + 0 + CACHE INTERNAL "Result from TRY_RUN" FORCE) + diff --git a/srcpkgs/evolution/files/iconv-detect.h b/srcpkgs/evolution/files/iconv-detect.h new file mode 100644 index 00000000000..46f476d5bc9 --- /dev/null +++ b/srcpkgs/evolution/files/iconv-detect.h @@ -0,0 +1,5 @@ +/* This is an auto-generated header, DO NOT EDIT! */ + +#define ICONV_ISO_D_FORMAT "iso-%d-%d" +#define ICONV_ISO_S_FORMAT "iso-%d-%s" +#define ICONV_10646 "iso-10646" diff --git a/srcpkgs/evolution/template b/srcpkgs/evolution/template index d0a0009fea3..ccf70628950 100644 --- a/srcpkgs/evolution/template +++ b/srcpkgs/evolution/template @@ -27,9 +27,27 @@ if [ -z "$CROSS_BUILD" ]; then build_options_default="gir" else hostmakedepends+=" glib-devel" - configure_args+=" -D_correct_iconv_EXITCODE=0" fi +# cmake perfomrms 2 checks using binary runtime, about iconv and sfrtime. +# musl (1.1.16) does not support "ISO-2022-JP" encoding (see its roadmap), +# although evolution-data-server is fine with musl. +# If crossbuild, cmake let disabling runtime checks via specific directives. +# test iconv-detect.c also generates iconv-detect.h that is required for build. +# So completly disable test from iconv-detect.c (cmake.patch file) and +# use a cmake cache file on crossbuild to disable sfrtime running test. +if [ "$CROSS_BUILD" ]; then + configure_args+=" -C disableRuntimeTests.cmake" +fi + +pre_configure() { + mkdir -p build + cp ${FILESDIR}/iconv-detect.h ${wrksrc}/build/. + if [ "$CROSS_BUILD" ]; then + cp ${FILESDIR}/disableRuntimeTests.cmake ${wrksrc}/build/. + fi +} + evolution-devel_package() { depends="GConf-devel gtkhtml-devel>=4.6.0 evolution-data-server-devel gnome-desktop-devel ${sourcepkg}>=${version}_${revision}"