From 0e9e7a3b81cebd609e677b002367ec6a96f2f43c Mon Sep 17 00:00:00 2001 From: John Date: Wed, 15 May 2019 16:11:49 +0200 Subject: [PATCH] xapian-core: fix config.cmake for cross compiling --- .../patches/cross-config.cmake.patch | 18 ++++++++++++++++++ srcpkgs/xapian-core/template | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/xapian-core/patches/cross-config.cmake.patch diff --git a/srcpkgs/xapian-core/patches/cross-config.cmake.patch b/srcpkgs/xapian-core/patches/cross-config.cmake.patch new file mode 100644 index 0000000000..4993b67d5a --- /dev/null +++ b/srcpkgs/xapian-core/patches/cross-config.cmake.patch @@ -0,0 +1,18 @@ +--- cmake/xapian-config.cmake.in 2019-03-02 02:45:31.000000000 +0100 ++++ - 2019-05-15 15:59:12.059370469 +0200 +@@ -1,4 +1,14 @@ +-SET(prefix "@prefix@") ++get_filename_component(prefix "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE) ++# Use original install prefix when loaded through a "/usr move" ++# cross-prefix symbolic link such as /lib -> /usr/lib. ++get_filename_component(_realCurr "${CMAKE_CURRENT_LIST_DIR}" REALPATH) ++get_filename_component(_realOrig "@prefix@/lib/cmake/xapian" REALPATH) ++if(_realCurr STREQUAL _realOrig) ++ set(prefix "@prefix@") ++endif() ++unset(_realOrig) ++unset(_realCurr) ++ + SET(exec_prefix "@exec_prefix@") + SET(XAPIAN_LIBRARIES "@libdir@/libxapian@LIBRARY_VERSION_SUFFIX@@SHLIBEXT@" CACHE FILEPATH "Libraries for Xapian") + SET(XAPIAN_INCLUDE_DIR "@incdir@" CACHE PATH "Include path for Xapian") diff --git a/srcpkgs/xapian-core/template b/srcpkgs/xapian-core/template index 441eac48aa..89f0af55c8 100644 --- a/srcpkgs/xapian-core/template +++ b/srcpkgs/xapian-core/template @@ -1,7 +1,7 @@ # Template file for 'xapian-core' pkgname=xapian-core version=1.4.11 -revision=1 +revision=2 build_style=gnu-configure configure_args="--disable-static" makedepends="zlib-devel libuuid-devel"