From 04476ffc07e50fe8ab66953bc1ca1906f1e04e00 Mon Sep 17 00:00:00 2001 From: Dominik Honnef Date: Wed, 13 Jan 2016 19:16:57 +0100 Subject: [PATCH] ledger: fix cross-compile I have absolutely no idea why find_path fails when cross-compiling. The file we're looking for is bundled in the tarball and doesn't change place when we cross-compile, and we're looking in the right place for it. If someone wants to fix this properly, go ahead. In the meantime, we hardcode the result. --- srcpkgs/ledger/patches/cmake_wtf.patch | 28 ++++++++++++++++++++++++++ srcpkgs/ledger/template | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/ledger/patches/cmake_wtf.patch diff --git a/srcpkgs/ledger/patches/cmake_wtf.patch b/srcpkgs/ledger/patches/cmake_wtf.patch new file mode 100644 index 00000000000..71c492e75eb --- /dev/null +++ b/srcpkgs/ledger/patches/cmake_wtf.patch @@ -0,0 +1,28 @@ +--- cmake/FindUtfcpp.cmake.old 2016-01-13 19:14:05.737426666 +0100 ++++ cmake/FindUtfcpp.cmake 2016-01-13 19:13:28.952877141 +0100 +@@ -1,22 +1,8 @@ +-# - Try to find utfcpp +-# Once done, this will define +-# +-# UTFCPP_FOUND - system has utfcpp's utf8.h +-# UTFCPP_PATH - the utfcpp include directories +- + include(CheckCXXSourceCompiles) + +-set(UTFCPP_FOUND FALSE) +- +-find_path(UTFCPP_INCLUDE_DIR +- NAMES utf8.h +- HINTS "${UTFCPP_PATH}" "${PROJECT_SOURCE_DIR}/lib/utfcpp/v2_0/source" +-) +- +-if (UTFCPP_INCLUDE_DIR) +- set(CMAKE_REQUIRED_INCLUDES "${UTFCPP_INCLUDE_DIR}") +- set(UTFCPP_FOUND TRUE) +-endif() ++set(UTFCPP_FOUND TRUE) ++set(UTFCPP_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lib/utfcpp/v2_0/source") ++set(CMAKE_REQUIRED_INCLUDES "${UTFCPP_INCLUDE_DIR}") + + check_cxx_source_compiles(" + #include diff --git a/srcpkgs/ledger/template b/srcpkgs/ledger/template index cd45de409e7..82fe141bb9a 100644 --- a/srcpkgs/ledger/template +++ b/srcpkgs/ledger/template @@ -1,7 +1,7 @@ # Template file for 'ledger' pkgname=ledger version=3.1.1 -revision=1 +revision=2 build_style=cmake maintainer="Dominik Honnef " hostmakedepends="cmake"