diff --git a/ports/libxml2/CMakeLists.txt b/ports/libxml2/CMakeLists.txt index bdc3939bff1325..cd6de43260917e 100644 --- a/ports/libxml2/CMakeLists.txt +++ b/ports/libxml2/CMakeLists.txt @@ -1,8 +1,44 @@ cmake_minimum_required(VERSION 3.8) project(libxml2 C) +set(WITH_TRIO 0 CACHE BOOL "Add trio support") +set(WITH_THREADS 1 CACHE BOOL "Add multithread support") +set(WITH_THREAD_ALLOC 0 CACHE BOOL "Add per-thread memory") +set(WITH_TREE 1 CACHE BOOL "Add the DOM like tree manipulation APIs") +set(WITH_OUTPUT 1 CACHE BOOL "Add the serialization support") +set(WITH_PUSH 1 CACHE BOOL "Add the PUSH parser interfaces") +set(WITH_READER 1 CACHE BOOL "Add the xmlReader parsing interface") +set(WITH_PATTERN 1 CACHE BOOL "Add the xmlPattern selection interface") +set(WITH_WRITER 1 CACHE BOOL "Add the xmlWriter saving interface") +set(WITH_SAX1 1 CACHE BOOL "Add the older SAX1 interface") +set(WITH_VALID 1 CACHE BOOL "Add the DTD validation support") +set(WITH_HTML 1 CACHE BOOL "Add the HTML support") +set(WITH_LEGACY 1 CACHE BOOL "Add deprecated APIs for compatibility") +set(WITH_C14N 1 CACHE BOOL "Add the Canonicalization support") +set(WITH_CATALOG 1 CACHE BOOL "Add the Catalog support") +set(WITH_DOCB 1 CACHE BOOL "Add Docbook SGML support") +set(WITH_XPATH 1 CACHE BOOL "Add the XPATH support") +set(WITH_XPTR 1 CACHE BOOL "Add the XPointer support") +set(WITH_XINCLUDE 1 CACHE BOOL "Add the XInclude support") +set(WITH_ICONV 1 CACHE BOOL "Add ICONV support") +set(WITH_ICU 0 CACHE BOOL "Add ICU support") +set(WITH_ISO8859X 1 CACHE BOOL "Add ISO8859X support if no iconv") +set(WITH_DEBUG 1 CACHE BOOL "Add the memory debugging module") +set(WITH_MEM_DEBUG 0 CACHE BOOL "Add the memory debugging module") +set(WITH_RUN_DEBUG 0 CACHE BOOL "Add the runtime debugging module") +set(WITH_REGEXPS 1 CACHE BOOL "Add Regular Expressions support") +set(WITH_SCHEMAS 1 CACHE BOOL "Add Relax-NG and Schemas support") +set(WITH_SCHEMATRON 1 CACHE BOOL "Add Schematron support") +set(WITH_MODULES 1 CACHE BOOL "Add the dynamic modules support") +set(WITH_ZLIB 1 CACHE BOOL "Add zlib support") +set(WITH_LZMA 1 CACHE BOOL "Add liblzma support") +set(WITH_HTTP 1 CACHE BOOL "Add the HTTP support") +set(WITH_FTP 1 CACHE BOOL "Add the FTP support") + option(INSTALL_HEADERS "Install public header files" ON) +set(MODULE_EXTENSION ".so") + set(CMAKE_SHARED_LIBRARY_PREFIX) set(CMAKE_STATIC_LIBRARY_PREFIX) @@ -55,41 +91,6 @@ message(STATUS "LIBXML_MICRO_VERSION: ${LIBXML_MICRO_VERSION}") message(STATUS "VERSION: ${VERSION}") message(STATUS "LIBXML_VERSION_NUMBER: ${LIBXML_VERSION_NUMBER}") -set(WITH_TRIO 0) -set(WITH_THREADS 1) -set(WITH_THREAD_ALLOC 0) -set(WITH_TREE 1) -set(WITH_OUTPUT 1) -set(WITH_PUSH 1) -set(WITH_READER 1) -set(WITH_PATTERN 1) -set(WITH_WRITER 1) -set(WITH_SAX1 1) -set(WITH_FTP 1) -set(WITH_HTTP 1) -set(WITH_VALID 1) -set(WITH_HTML 1) -set(WITH_LEGACY 1) -set(WITH_C14N 1) -set(WITH_CATALOG 1) -set(WITH_DOCB 1) -set(WITH_XPATH 1) -set(WITH_XPTR 1) -set(WITH_XINCLUDE 1) -set(WITH_ICONV 1) -set(WITH_ICU 0) -set(WITH_ISO8859X 1) -set(WITH_DEBUG 1) -set(WITH_MEM_DEBUG 0) -set(WITH_RUN_DEBUG 0) -set(WITH_REGEXPS 1) -set(WITH_SCHEMAS 1) -set(WITH_SCHEMATRON 1) -set(WITH_MODULES 1) -set(MODULE_EXTENSION ".so") -set(WITH_ZLIB 1) -set(WITH_LZMA 1) - if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set(WITH_CATALOG 0) set(WITH_MODULES 0) diff --git a/ports/libxml2/CONTROL b/ports/libxml2/CONTROL deleted file mode 100644 index fe8dec589f3cac..00000000000000 --- a/ports/libxml2/CONTROL +++ /dev/null @@ -1,6 +0,0 @@ -Source: libxml2 -Version: 2.9.10 -Port-Version: 2 -Homepage: https://xmlsoft.org/ -Description: Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform) -Build-Depends: zlib, libiconv, liblzma diff --git a/ports/libxml2/portfile.cmake b/ports/libxml2/portfile.cmake index 43aae1de5a4b20..8130761ece9813 100644 --- a/ports/libxml2/portfile.cmake +++ b/ports/libxml2/portfile.cmake @@ -10,11 +10,22 @@ vcpkg_from_github( file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +if (VCPKG_TARGET_IS_UWP) + message(WARNING "Feature network couldn't be enabled on UWP, disable http and ftp automatically.") + set(ENABLE_NETWORK 0) +else() + set(ENABLE_NETWORK 1) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DPORT_DIR=${CMAKE_CURRENT_LIST_DIR} - OPTIONS_DEBUG -DINSTALL_HEADERS=OFF + OPTIONS + -DPORT_DIR=${CMAKE_CURRENT_LIST_DIR} + -DWITH_HTTP=${ENABLE_NETWORK} + -DWITH_FTP=${ENABLE_NETWORK} + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF ) vcpkg_install_cmake() diff --git a/ports/libxml2/vcpkg.json b/ports/libxml2/vcpkg.json new file mode 100644 index 00000000000000..c5ac7c0fd32aa1 --- /dev/null +++ b/ports/libxml2/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "libxml2", + "version-semver": "2.9.10", + "port-version": 3, + "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/", + "dependencies": [ + "libiconv", + "liblzma", + "zlib" + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index bda4d83f9055b5..4a9278c1ac2512 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3558,7 +3558,7 @@ }, "libxml2": { "baseline": "2.9.10", - "port-version": 2 + "port-version": 3 }, "libxmlmm": { "baseline": "0.6.0", diff --git a/versions/l-/libxml2.json b/versions/l-/libxml2.json index d2b8fcddc73084..e7a5c70f798a24 100644 --- a/versions/l-/libxml2.json +++ b/versions/l-/libxml2.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "7aa5a9ea1742082d57eb67708f107ade65f94c12", + "version-semver": "2.9.10", + "port-version": 3 + }, { "git-tree": "873d78549fd9c4fa3cb7f0296a1f9a50dbf9f13e", "version-string": "2.9.10",