From d6285bc24b2e48da2f5e057fc759aff7c2b3b0af Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Mon, 17 Aug 2020 23:33:44 +0800 Subject: [expat] Update the version to 2.2.9 (add support for uwp) (#9146) * [expat] Update the version to 2.2.9(support uwp) * [readosm] Fix expat.lib cannot be found * Remove expat:arm-uwp and expat:x64-uwp from fail list in ci.baseline.txt * [apr-util,io2d,skia] Fix expat cannot be found and also update expat * [many ports] Add supports and fix the regressions * Fix new regressions * Fix typo * [io2d] Update expat patch * [io2d,libkml,skia] Fix expat cannot find and also fix typo * [expat] Remove usage * [libkml,vtk] Update expat patch and fix static build * [wxwidgets] Fix static build caused by expat cannot found * Update as review suggestion * Add Port-Version * Remove evpp:x64-osx=fail from ci.baseline.txt * [wxwidgest] Remove unnecessary spaces * [itk] Fix expat cannot be found * fix cmake test port * [wxwidgets] Update Port-Version Co-authored-by: Nicole Mazzuca --- ports/libkml/CONTROL | 5 +++-- ports/libkml/fix-expat.patch | 20 ++++++++++++++++++++ ports/libkml/portfile.cmake | 9 ++++----- 3 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 ports/libkml/fix-expat.patch (limited to 'ports/libkml') diff --git a/ports/libkml/CONTROL b/ports/libkml/CONTROL index 3783e0d3d..06dbb7bde 100644 --- a/ports/libkml/CONTROL +++ b/ports/libkml/CONTROL @@ -1,5 +1,6 @@ Source: libkml -Version: 1.3.0-4 +Version: 1.3.0 +Port-Version: 5 Homepage: https://github.com/libkml/libkml Description: Reference implementation of OGC KML 2.2 -Build-Depends: zlib, expat, minizip[bzip2], uriparser, boost-smart-ptr +Build-Depends: zlib, expat, minizip[bzip2], uriparser, boost-smart-ptr \ No newline at end of file diff --git a/ports/libkml/fix-expat.patch b/ports/libkml/fix-expat.patch new file mode 100644 index 000000000..e4a09d187 --- /dev/null +++ b/ports/libkml/fix-expat.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9728ead..f9e8051 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -93,8 +93,13 @@ set(MINIZIP_DEPENDS "" CACHE INTERNAL "MINIZIP_DEPENDS") + + set(LIBKML_TARGETS) + +-find_package(EXPAT) +-if(EXPAT_FOUND) ++find_package(expat CONFIG REQUIRED) ++if(WIN32 AND NOT MINGW) ++ set(EXPAT_LIBRARY expat::libexpat) ++else() ++ set(EXPAT_LIBRARY expat::expat) ++endif() ++if(EXPAT_LIBRARY) + include_directories(${EXPAT_INCLUDE_DIR}) + else() + include(External_expat) diff --git a/ports/libkml/portfile.cmake b/ports/libkml/portfile.cmake index a6e23b863..4370aa40e 100644 --- a/ports/libkml/portfile.cmake +++ b/ports/libkml/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libkml/libkml @@ -8,6 +6,7 @@ vcpkg_from_github( HEAD_REF master PATCHES patch_empty_literal_on_vc.patch + fix-expat.patch ) file(REMOVE ${SOURCE_PATH}/cmake/External_boost.cmake) @@ -22,11 +21,11 @@ vcpkg_copy_pdbs() if (VCPKG_TARGET_IS_WINDOWS) vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) -elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") +elseif (VCPKG_TARGET_IS_LINUX) vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libkml) -elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") +elseif (VCPKG_TARGET_IS_OSX) vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libkml) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libkml RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file -- cgit v1.2.3