From 1d66a1f07ec6b3d5f76aad2c4ab056bef215a0e8 Mon Sep 17 00:00:00 2001 From: dcoppa Date: Tue, 4 Jul 2017 16:38:53 +0000 Subject: [PATCH] include/libxml2/libxml/encoding.h wants iconv.h, so teach FindLibXml2.cmake how to find the libiconv include directory. Problem spotted by landry@ while porting geo/pgpointcloud --- devel/cmake/Makefile | 4 +-- .../patches/patch-Modules_FindLibXml2_cmake | 27 +++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 devel/cmake/patches/patch-Modules_FindLibXml2_cmake diff --git a/devel/cmake/Makefile b/devel/cmake/Makefile index 089028cdc9c..6d5744db5c9 100644 --- a/devel/cmake/Makefile +++ b/devel/cmake/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.156 2017/04/21 18:37:43 kurt Exp $ +# $OpenBSD: Makefile,v 1.157 2017/07/04 16:38:53 dcoppa Exp $ DPB_PROPERTIES =parallel @@ -7,7 +7,7 @@ COMMENT = portable build system VER = 3.7.2 DISTNAME = cmake-${VER} CATEGORIES = devel -REVISION = 0 +REVISION = 1 HOMEPAGE = https://www.cmake.org/ diff --git a/devel/cmake/patches/patch-Modules_FindLibXml2_cmake b/devel/cmake/patches/patch-Modules_FindLibXml2_cmake new file mode 100644 index 00000000000..2e2719dca6b --- /dev/null +++ b/devel/cmake/patches/patch-Modules_FindLibXml2_cmake @@ -0,0 +1,27 @@ +$OpenBSD: patch-Modules_FindLibXml2_cmake,v 1.1 2017/07/04 16:38:53 dcoppa Exp $ + +include/libxml2/libxml/encoding.h wants iconv.h + +Index: Modules/FindLibXml2.cmake +--- Modules/FindLibXml2.cmake.orig ++++ Modules/FindLibXml2.cmake +@@ -18,6 +18,8 @@ + # LIBXML2_XMLLINT_EXECUTABLE - The XML checking tool xmllint coming with LibXml2 + # LIBXML2_VERSION_STRING - the version of LibXml2 found (since CMake 2.8.8) + ++include(FindIconv) ++ + # use pkg-config to get the directories and then use these values + # in the find_path() and find_library() calls + find_package(PkgConfig QUIET) +@@ -50,6 +52,10 @@ elseif(LIBXML2_INCLUDE_DIR AND EXISTS "${LIBXML2_INCLU + string(REGEX REPLACE "^#define[\t ]+LIBXML_DOTTED_VERSION[\t ]+\"([^\"]*)\".*" "\\1" + LIBXML2_VERSION_STRING "${libxml2_version_str}") + unset(libxml2_version_str) ++endif() ++ ++if(ICONV_FOUND) ++ list(INSERT LIBXML2_INCLUDE_DIR 0 ${ICONV_INCLUDE_DIR}) + endif() + + # handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if