From 97d943c0f6290c7e94e34faa6782bd3c06bc613a Mon Sep 17 00:00:00 2001 From: yopito Date: Thu, 5 Oct 2017 23:08:19 +0200 Subject: [PATCH] evolution-data-server: unbreak crossbuild Closes: #8001 [via git-merge-pr] --- .../files/disableRuntimeTests.cmake | 39 +++++++++++++++++++ .../files/iconv-detect.h | 5 +++ srcpkgs/evolution-data-server/template | 25 +++++++----- srcpkgs/evolution-data-server/update | 2 - 4 files changed, 60 insertions(+), 11 deletions(-) create mode 100644 srcpkgs/evolution-data-server/files/disableRuntimeTests.cmake create mode 100644 srcpkgs/evolution-data-server/files/iconv-detect.h delete mode 100644 srcpkgs/evolution-data-server/update diff --git a/srcpkgs/evolution-data-server/files/disableRuntimeTests.cmake b/srcpkgs/evolution-data-server/files/disableRuntimeTests.cmake new file mode 100644 index 00000000000..14d48ed6143 --- /dev/null +++ b/srcpkgs/evolution-data-server/files/disableRuntimeTests.cmake @@ -0,0 +1,39 @@ +# 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) + + +# 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) + diff --git a/srcpkgs/evolution-data-server/files/iconv-detect.h b/srcpkgs/evolution-data-server/files/iconv-detect.h new file mode 100644 index 00000000000..46f476d5bc9 --- /dev/null +++ b/srcpkgs/evolution-data-server/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-data-server/template b/srcpkgs/evolution-data-server/template index 904b4256246..139699dd81f 100644 --- a/srcpkgs/evolution-data-server/template +++ b/srcpkgs/evolution-data-server/template @@ -1,7 +1,7 @@ # Template file for 'evolution-data-server' pkgname=evolution-data-server version=3.26.0 -revision=1 +revision=2 build_style=cmake configure_args="-DENABLE_GOOGLE_AUTH=OFF -DENABLE_UOA=OFF" hostmakedepends="pkg-config intltool flex glib-devel gperf $(vopt_if gir gobject-introspection)" @@ -15,7 +15,6 @@ license="GPL-2" homepage="https://wiki.gnome.org/Apps/Evolution" distfiles="${GNOME_SITE}/$pkgname/${version%.*}/$pkgname-$version.tar.xz" checksum=7776ef431e58a07b32e5b678b8df4ae5e85f99003a933dafa6bb73842ccff067 -nocross=yes build_options="gir" if [ -z "$CROSS_BUILD" ]; then @@ -26,15 +25,23 @@ if [ ! -z "$build_option_gir" ]; then configure_args+=" -DENABLE_INTROSPECTION=ON -DENABLE_VALA_BINDINGS=ON" 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() { - if [ ! -d "build" ]; then - mkdir build + mkdir -p build + cp ${FILESDIR}/iconv-detect.h ${wrksrc}/build/. + if [ "$CROSS_BUILD" ]; then + cp ${FILESDIR}/disableRuntimeTests.cmake ${wrksrc}/build/. fi - echo '/* This is an auto-generated header, DO NOT EDIT! */' > build/iconv-detect.h - echo >> build/iconv-detect.h - echo '#define ICONV_ISO_D_FORMAT "iso-%d-%d"' >> build/iconv-detect.h - echo '#define ICONV_ISO_S_FORMAT "iso-%d-%s"' >> build/iconv-detect.h - echo '#define ICONV_10646 "iso-10646"' >> build/iconv-detect.h } post_install() { # Fix broken pkg-config diff --git a/srcpkgs/evolution-data-server/update b/srcpkgs/evolution-data-server/update deleted file mode 100644 index a84fbbad8b1..00000000000 --- a/srcpkgs/evolution-data-server/update +++ /dev/null @@ -1,2 +0,0 @@ -site="${GNOME_SITE}/$pkgname/cache.json" -ignore="3.*[13579].*"