Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libxml2] Disable http and ftp on UWP #16726

Merged
merged 5 commits into from
Mar 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 36 additions & 35 deletions ports/libxml2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)

Expand Down Expand Up @@ -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)
Expand Down
6 changes: 0 additions & 6 deletions ports/libxml2/CONTROL

This file was deleted.

15 changes: 13 additions & 2 deletions ports/libxml2/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
12 changes: 12 additions & 0 deletions ports/libxml2/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3558,7 +3558,7 @@
},
"libxml2": {
"baseline": "2.9.10",
"port-version": 2
"port-version": 3
},
"libxmlmm": {
"baseline": "0.6.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libxml2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "7aa5a9ea1742082d57eb67708f107ade65f94c12",
"version-semver": "2.9.10",
"port-version": 3
},
{
"git-tree": "873d78549fd9c4fa3cb7f0296a1f9a50dbf9f13e",
"version-string": "2.9.10",
Expand Down