aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>2021-08-03 07:44:53 +0800
committerGitHub <noreply@github.com>2021-08-02 16:44:53 -0700
commitfb24bdc58be7791fcf31baa8476eb6561010b06a (patch)
treea5f193203dd76ef9c2489c7c1a482099c29bf19f
parent2f573976e68cc1ededbfa811adb4475dea321872 (diff)
downloadvcpkg-fb24bdc58be7791fcf31baa8476eb6561010b06a.tar.gz
vcpkg-fb24bdc58be7791fcf31baa8476eb6561010b06a.zip
[libxml2] Fix build error on uwp (#19221)
* [libxml2] Fix build error on uwp * Update versions
-rw-r--r--ports/libxml2/fix-uwp.patch12
-rw-r--r--ports/libxml2/portfile.cmake10
-rw-r--r--ports/libxml2/vcpkg.json11
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/l-/libxml2.json5
5 files changed, 32 insertions, 8 deletions
diff --git a/ports/libxml2/fix-uwp.patch b/ports/libxml2/fix-uwp.patch
new file mode 100644
index 000000000..ce57a9ed1
--- /dev/null
+++ b/ports/libxml2/fix-uwp.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9b45d62..ba8bfec 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -129,6 +129,7 @@ endif()
+
+ if(MSVC)
+ configure_file(include/win32config.h config.h COPYONLY)
++ add_compile_options(/wd4996)
+ else()
+ check_c_source_compiles("
+ void __attribute__((destructor))
diff --git a/ports/libxml2/portfile.cmake b/ports/libxml2/portfile.cmake
index a176d6871..931dc7756 100644
--- a/ports/libxml2/portfile.cmake
+++ b/ports/libxml2/portfile.cmake
@@ -7,6 +7,7 @@ vcpkg_from_gitlab(
HEAD_REF master
PATCHES
fix_cmakelist.patch
+ fix-uwp.patch
)
if (VCPKG_TARGET_IS_UWP)
@@ -18,11 +19,10 @@ endif()
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
- "tools" LIBXML2_WITH_PROGRAMS
+ "tools" LIBXML2_WITH_PROGRAMS
)
-vcpkg_configure_cmake(
+vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA
OPTIONS
${FEATURE_OPTIONS}
-DLIBXML2_WITH_TESTS=OFF
@@ -61,9 +61,9 @@ vcpkg_configure_cmake(
-DLIBXML2_WITH_XPTR=ON
)
-vcpkg_install_cmake()
+vcpkg_cmake_install()
-vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libxml2)
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libxml2)
vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()
diff --git a/ports/libxml2/vcpkg.json b/ports/libxml2/vcpkg.json
index bb9b73883..0483b7f92 100644
--- a/ports/libxml2/vcpkg.json
+++ b/ports/libxml2/vcpkg.json
@@ -1,13 +1,20 @@
{
"name": "libxml2",
"version-semver": "2.9.12",
- "port-version": 1,
+ "port-version": 2,
"description": "Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform).",
"homepage": "https://xmlsoft.org/",
- "supports": "!uwp",
"dependencies": [
"libiconv",
"liblzma",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ },
"zlib"
],
"features": {
diff --git a/versions/baseline.json b/versions/baseline.json
index ba5baae9e..30a4f3834 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -3754,7 +3754,7 @@
},
"libxml2": {
"baseline": "2.9.12",
- "port-version": 1
+ "port-version": 2
},
"libxmlmm": {
"baseline": "0.6.0",
diff --git a/versions/l-/libxml2.json b/versions/l-/libxml2.json
index d88953a5a..ea8950c96 100644
--- a/versions/l-/libxml2.json
+++ b/versions/l-/libxml2.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "f86cd2ab2c75dcd8e97ee18191b343f0b31bfb7c",
+ "version-semver": "2.9.12",
+ "port-version": 2
+ },
+ {
"git-tree": "a68bece41619060ca2e212b916dcc60c65ca3603",
"version-semver": "2.9.12",
"port-version": 1