diff options
| author | Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> | 2021-03-23 06:52:17 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-22 15:52:17 -0700 |
| commit | 00150f5bba4970c4b4a2389e0944313d0a2b5a0f (patch) | |
| tree | edfc161d673f541c323e39becc189e21f1427f68 /ports/libxml2 | |
| parent | 749763277385710c4514d7bcc4609c08e2fbe37c (diff) | |
| download | vcpkg-00150f5bba4970c4b4a2389e0944313d0a2b5a0f.tar.gz vcpkg-00150f5bba4970c4b4a2389e0944313d0a2b5a0f.zip | |
[libxml2] Disable http and ftp on UWP (#16726)
* [libxml2] Disable http and ftp on UWP
* add version record
* Replace option to set
* fix typo
* update version record
Diffstat (limited to 'ports/libxml2')
| -rw-r--r-- | ports/libxml2/CMakeLists.txt | 71 | ||||
| -rw-r--r-- | ports/libxml2/CONTROL | 6 | ||||
| -rw-r--r-- | ports/libxml2/portfile.cmake | 15 | ||||
| -rw-r--r-- | ports/libxml2/vcpkg.json | 12 |
4 files changed, 61 insertions, 43 deletions
diff --git a/ports/libxml2/CMakeLists.txt b/ports/libxml2/CMakeLists.txt index bdc3939bf..cd6de4326 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 fe8dec589..000000000 --- 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 43aae1de5..8130761ec 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 000000000..c5ac7c0fd --- /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" + ] +} |
