diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index eb5e4c39a..2a0c9837f 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 8f5b795eaa4bc414d2d6041c1dbd1a7f7bf1fc99-1 -Build-Depends: zlib, expat +Version: 8f5b795eaa4bc414d2d6041c1dbd1a7f7bf1fc99-2 +Build-Depends: zlib, expat, libiconv Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index 93d16690c..c6fc7bbac 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -13,6 +13,11 @@ vcpkg_configure_cmake( PREFER_NINJA ) +vcpkg_apply_patches( + SOURCE_PATH "${SOURCE_PATH}" + PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-iconv.patch" +) + vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH "share/exiv2/cmake") diff --git a/ports/exiv2/use-iconv.patch b/ports/exiv2/use-iconv.patch new file mode 100644 index 000000000..4305ec550 --- /dev/null +++ b/ports/exiv2/use-iconv.patch @@ -0,0 +1,37 @@ +diff --git a/config/FindIconv.cmake b/config/FindIconv.cmake +index 15a0e39..53718bf 100644 +--- a/config/FindIconv.cmake ++++ b/config/FindIconv.cmake +@@ -36,12 +36,13 @@ if(NOT ICONV_INCLUDE_DIR STREQUAL "ICONV_INCLUDE_DIR-NOTFOUND") + endif() + + if(NOT ICONV_IN_GLIBC) +- find_library(ICONV_LIBRARY NAMES iconv) ++ find_library(ICONV_LIBRARY NAMES iconv libiconv) + set(ICONV_TEST ${ICONV_LIBRARY}) + else() + set(ICONV_TEST "In glibc") + endif() + ++set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) + set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY}) + check_cxx_source_compiles( + "#include +@@ -59,7 +60,8 @@ else(ICONV_FOUND) + set(ICONV_LIBRARIES) + endif(ICONV_FOUND) + +-if(ICONV_FOUND) ++if(ICONV_FOUND) ++ set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) + set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) + check_cxx_source_compiles( + "#include +@@ -69,6 +71,7 @@ if(ICONV_FOUND) + }" + ICONV_ACCEPTS_NONCONST_INPUT) + ++ set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) + set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) + check_cxx_source_compiles( + "#include