aboutsummaryrefslogtreecommitdiff
path: root/ports/expat
diff options
context:
space:
mode:
authorNancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>2020-08-17 23:33:44 +0800
committerGitHub <noreply@github.com>2020-08-17 08:33:44 -0700
commitd6285bc24b2e48da2f5e057fc759aff7c2b3b0af (patch)
tree0ae728a70e64d9758f6a918e515171f83424116b /ports/expat
parent5dd2b6736b7397e740d54ec2d748b56bd56350e9 (diff)
downloadvcpkg-d6285bc24b2e48da2f5e057fc759aff7c2b3b0af.tar.gz
vcpkg-d6285bc24b2e48da2f5e057fc759aff7c2b3b0af.zip
[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 <mazzucan@outlook.com>
Diffstat (limited to 'ports/expat')
-rw-r--r--ports/expat/CONTROL5
-rw-r--r--ports/expat/fix-find-package-by-cmake.patch40
-rw-r--r--ports/expat/portfile.cmake47
-rw-r--r--ports/expat/usage4
4 files changed, 67 insertions, 29 deletions
diff --git a/ports/expat/CONTROL b/ports/expat/CONTROL
index 9007da6cd..53474ae2b 100644
--- a/ports/expat/CONTROL
+++ b/ports/expat/CONTROL
@@ -1,5 +1,4 @@
Source: expat
-Version: 2.2.7
+Version: 2.2.9
Homepage: https://github.com/libexpat/libexpat
-Description: XML parser library written in C
-Supports: !uwp \ No newline at end of file
+Description: XML parser library written in C \ No newline at end of file
diff --git a/ports/expat/fix-find-package-by-cmake.patch b/ports/expat/fix-find-package-by-cmake.patch
new file mode 100644
index 000000000..830327944
--- /dev/null
+++ b/ports/expat/fix-find-package-by-cmake.patch
@@ -0,0 +1,40 @@
+diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt
+index 2084424..f3b9207 100644
+--- a/expat/CMakeLists.txt
++++ b/expat/CMakeLists.txt
+@@ -269,6 +269,10 @@ if(EXPAT_WITH_LIBBSD)
+ target_link_libraries(${_EXPAT_TARGET} ${LIB_BSD})
+ endif()
+
++target_include_directories(${_EXPAT_TARGET} INTERFACE
++ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
++ $<INSTALL_INTERFACE:include>)
++
+ set(LIBCURRENT 7) # sync
+ set(LIBREVISION 11) # with
+ set(LIBAGE 6) # configure.ac!
+@@ -490,7 +494,7 @@ configure_package_config_file(
+ cmake/expat-config.cmake.in
+ cmake/expat-config.cmake
+ INSTALL_DESTINATION
+- ${CMAKE_INSTALL_LIBDIR}/cmake/expat-${PROJECT_VERSION}/
++ ${CMAKE_INSTALL_LIBDIR}/cmake/expat/
+ )
+ write_basic_package_version_file(
+ cmake/expat-config-version.cmake
+@@ -507,13 +511,13 @@ expat_install(
+ ${CMAKE_CURRENT_BINARY_DIR}/cmake/expat-config.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/cmake/expat-config-version.cmake
+ DESTINATION
+- ${CMAKE_INSTALL_LIBDIR}/cmake/expat-${PROJECT_VERSION}/
++ ${CMAKE_INSTALL_LIBDIR}/cmake/expat/
+ )
+ expat_install(
+ EXPORT
+ expat
+ DESTINATION
+- ${CMAKE_INSTALL_LIBDIR}/cmake/expat-${PROJECT_VERSION}/
++ ${CMAKE_INSTALL_LIBDIR}/cmake/expat/
+ NAMESPACE
+ expat::
+ )
diff --git a/ports/expat/portfile.cmake b/ports/expat/portfile.cmake
index 7b97fb3de..1414344be 100644
--- a/ports/expat/portfile.cmake
+++ b/ports/expat/portfile.cmake
@@ -1,14 +1,12 @@
-if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
-message(FATAL_ERROR "${PORT} does not currently support UWP")
-endif()
-
-include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libexpat/libexpat
- REF R_2_2_7
- SHA512 11b1f9a135c4501ef0112e17da8381e956366165a11a384daedd4cdef9a00c3112c8f6ff8c8f6d3b5e7b71b9a73041f23beac0f27e9cfafe1ec0266d95870408
- HEAD_REF master)
+ REF a7bc26b69768f7fb24f0c7976fae24b157b85b13 #tag 2.2.9
+ SHA512 18842d5c9ff89654c5beeb9daba7ff5a911da318d419735fb14a5acbe0d1b4ac07077822c70cfa5c845892bcec2d72f8f265b9a259fe459092864f4d1754f8dd
+ HEAD_REF master
+ PATCHES
+ fix-find-package-by-cmake.patch
+)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
set(EXPAT_LINKAGE ON)
@@ -20,28 +18,33 @@ vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/expat
PREFER_NINJA
OPTIONS
- -DBUILD_examples=OFF
- -DBUILD_tests=OFF
- -DBUILD_tools=OFF
- -DBUILD_shared=${EXPAT_LINKAGE}
+ -DEXPAT_BUILD_EXAMPLES=OFF
+ -DEXPAT_BUILD_TESTS=OFF
+ -DEXPAT_BUILD_TOOLS=OFF
+ -DEXPAT_SHARED_LIBS=${EXPAT_LINKAGE}
)
vcpkg_install_cmake()
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
-file(INSTALL ${SOURCE_PATH}/expat/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/expat RENAME copyright)
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/expat)
-vcpkg_copy_pdbs()
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
-# CMake's FindExpat currently doesn't look for expatd.lib
-if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/expatd.lib)
- file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/expatd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/expat.lib)
+file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe)
+file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
+if(EXE OR DEBUG_EXE)
+ file(REMOVE ${EXE} ${DEBUG_EXE})
endif()
-file(READ ${CURRENT_PACKAGES_DIR}/include/expat_external.h EXPAT_EXTERNAL_H)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
- string(REPLACE "!defined(XML_STATIC)" "/* vcpkg static build !defined(XML_STATIC) */ 0" EXPAT_EXTERNAL_H "${EXPAT_EXTERNAL_H}")
+ vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/expat_external.h
+ "! defined(XML_STATIC)"
+ "/* vcpkg static build ! defined(XML_STATIC) */ 0"
+ )
endif()
-file(WRITE ${CURRENT_PACKAGES_DIR}/include/expat_external.h "${EXPAT_EXTERNAL_H}")
-file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/expat)
+vcpkg_copy_pdbs()
+
+#Handle copyright
+file(INSTALL ${SOURCE_PATH}/expat/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file
diff --git a/ports/expat/usage b/ports/expat/usage
deleted file mode 100644
index a2d35a66e..000000000
--- a/ports/expat/usage
+++ /dev/null
@@ -1,4 +0,0 @@
-The package expat is compatible with built-in CMake targets:
-
- find_package(EXPAT REQUIRED)
- target_link_libraries(main PRIVATE EXPAT::EXPAT)