-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/candidate-9.6.x'
Signed-off-by: Jake Smith <[email protected]>
- Loading branch information
Showing
20 changed files
with
604 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index f922d5ab..70466bc7 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -599,15 +599,5 @@ if(LIBXML2_WITH_PYTHON) | ||
endif() | ||
|
||
-install(FILES doc/xml2-config.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT documentation) | ||
-install(FILES doc/xmlcatalog.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT documentation) | ||
-install(FILES doc/xmllint.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT documentation) | ||
-install(DIRECTORY doc/ DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT documentation | ||
- PATTERN "Makefile.*" EXCLUDE | ||
- PATTERN "*.1" EXCLUDE | ||
- PATTERN "*.py" EXCLUDE | ||
- PATTERN "*.res" EXCLUDE | ||
- PATTERN "*.xml" EXCLUDE | ||
- PATTERN "*.xsl" EXCLUDE) | ||
|
||
configure_package_config_file( | ||
libxml2-config.cmake.cmake.in libxml2-config.cmake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index f922d5ab..685964b3 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -420,15 +420,15 @@ endif() | ||
if(LIBXML2_WITH_ICU) | ||
target_link_libraries(LibXml2 PRIVATE ICU::data ICU::i18n ICU::uc) | ||
if(WIN32) | ||
- set(ICU_LIBS "-licudt -licuin -licuuc") | ||
+ set(ICU_LIBS "icu-i18n") | ||
else() | ||
- set(ICU_LIBS "-licudata -licui18n -licuuc") | ||
+ set(ICU_LIBS "icu-i18n") | ||
endif() | ||
endif() | ||
|
||
if(LIBXML2_WITH_LZMA) | ||
target_link_libraries(LibXml2 PRIVATE LibLZMA::LibLZMA) | ||
- set(LZMA_LIBS "-llzma") | ||
+ set(LZMA_LIBS "liblzma") | ||
endif() | ||
|
||
if(LIBXML2_WITH_THREADS) | ||
@@ -438,7 +438,7 @@ endif() | ||
|
||
if(LIBXML2_WITH_ZLIB) | ||
target_link_libraries(LibXml2 PRIVATE ZLIB::ZLIB) | ||
- set(Z_LIBS "-lz") | ||
+ set(Z_LIBS "zlib") | ||
endif() | ||
|
||
set_target_properties( | ||
@@ -490,23 +490,9 @@ set_target_properties( | ||
SOVERSION ${LIBXML_MAJOR_VERSION} | ||
) | ||
|
||
+set(XML_LIB_NAME xml2) | ||
if(MSVC) | ||
- if(BUILD_SHARED_LIBS) | ||
- set_target_properties( | ||
- LibXml2 | ||
- PROPERTIES | ||
- DEBUG_POSTFIX d | ||
- ) | ||
- else() | ||
- set_target_properties( | ||
- LibXml2 | ||
- PROPERTIES | ||
- DEBUG_POSTFIX sd | ||
- MINSIZEREL_POSTFIX s | ||
- RELEASE_POSTFIX s | ||
- RELWITHDEBINFO_POSTFIX s | ||
- ) | ||
- endif() | ||
+ set(XML_LIB_NAME libxml2) | ||
endif() | ||
|
||
install(FILES ${LIBXML2_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libxml2/libxml COMPONENT development) | ||
@@ -654,30 +640,30 @@ install(DIRECTORY doc/ DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/libxml2 COMPONEN | ||
|
||
configure_package_config_file( | ||
libxml2-config.cmake.cmake.in libxml2-config.cmake | ||
- INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2-${PROJECT_VERSION} | ||
+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2 | ||
) | ||
|
||
install( | ||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config.cmake | ||
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2-${PROJECT_VERSION} | ||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2 | ||
COMPONENT development | ||
) | ||
|
||
write_basic_package_version_file( | ||
${CMAKE_CURRENT_BINARY_DIR}/libxml2-config-version.cmake | ||
VERSION ${PROJECT_VERSION} | ||
- COMPATIBILITY ExactVersion | ||
+ COMPATIBILITY SameMinorVersion | ||
) | ||
|
||
install( | ||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config-version.cmake | ||
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2-${PROJECT_VERSION} | ||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2 | ||
COMPONENT development | ||
) | ||
|
||
install( | ||
EXPORT LibXml2 | ||
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2-${PROJECT_VERSION} | ||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2 | ||
NAMESPACE LibXml2:: | ||
FILE libxml2-export.cmake | ||
COMPONENT development | ||
diff --git a/libxml-2.0.pc.in b/libxml-2.0.pc.in | ||
index 2653a7c5..2eb2f362 100644 | ||
--- a/libxml-2.0.pc.in | ||
+++ b/libxml-2.0.pc.in | ||
@@ -8,6 +8,7 @@ Name: libXML | ||
Version: @VERSION@ | ||
Description: libXML library version2. | ||
Requires: | ||
-Libs: -L${libdir} @XML_LIBS@ | ||
-Libs.private: @XML_PRIVATE_LIBS@ @LIBS@ | ||
+Requires.private: @ICU_LIBS@ @Z_LIBS@ @LZMA_LIBS@ | ||
+Libs: -L${libdir} -l@XML_LIB_NAME@ | ||
+Libs.private: @THREAD_LIBS@ @ICONV_LIBS@ @LIBM@ @WIN32_EXTRA_LIBADD@ @LIBS@ | ||
Cflags: @XML_INCLUDEDIR@ @XML_CFLAGS@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
vcpkg_from_gitlab( | ||
GITLAB_URL https://gitlab.gnome.org/ | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO GNOME/libxml2 | ||
REF f507d167f1755b7eaea09fb1a44d29aab828b6d1 | ||
SHA512 2ac3dcab31111f608a3fe33dde492c9653ad2bd49a792373acdd03d2787e1a4ef70eeb7a3d47cf67eefd43aee2ab75ec50b36cdcd124445ca206de924abb6021 | ||
HEAD_REF master | ||
PATCHES | ||
disable-docs.patch | ||
fix_cmakelist.patch | ||
) | ||
|
||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS | ||
FEATURES | ||
"ftp" LIBXML2_WITH_FTP | ||
"http" LIBXML2_WITH_HTTP | ||
"iconv" LIBXML2_WITH_ICONV | ||
"legacy" LIBXML2_WITH_LEGACY | ||
"lzma" LIBXML2_WITH_LZMA | ||
"zlib" LIBXML2_WITH_ZLIB | ||
"tools" LIBXML2_WITH_PROGRAMS | ||
) | ||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
OPTIONS | ||
${FEATURE_OPTIONS} | ||
-DLIBXML2_WITH_TESTS=OFF | ||
-DLIBXML2_WITH_HTML=ON | ||
-DLIBXML2_WITH_C14N=ON | ||
-DLIBXML2_WITH_CATALOG=ON | ||
-DLIBXML2_WITH_DEBUG=ON | ||
-DLIBXML2_WITH_ISO8859X=ON | ||
-DLIBXML2_WITH_ICU=OFF # Culprit of linkage issues? Solving this is probably another PR | ||
-DLIBXML2_WITH_MEM_DEBUG=OFF | ||
-DLIBXML2_WITH_MODULES=ON | ||
-DLIBXML2_WITH_OUTPUT=ON | ||
-DLIBXML2_WITH_PATTERN=ON | ||
-DLIBXML2_WITH_PUSH=ON | ||
-DLIBXML2_WITH_PYTHON=OFF | ||
-DLIBXML2_WITH_READER=ON | ||
-DLIBXML2_WITH_REGEXPS=ON | ||
-DLIBXML2_WITH_RUN_DEBUG=OFF | ||
-DLIBXML2_WITH_SAX1=ON | ||
-DLIBXML2_WITH_SCHEMAS=ON | ||
-DLIBXML2_WITH_SCHEMATRON=ON | ||
-DLIBXML2_WITH_THREADS=ON | ||
-DLIBXML2_WITH_THREAD_ALLOC=OFF | ||
-DLIBXML2_WITH_TREE=ON | ||
-DLIBXML2_WITH_VALID=ON | ||
-DLIBXML2_WITH_WRITER=ON | ||
-DLIBXML2_WITH_XINCLUDE=ON | ||
-DLIBXML2_WITH_XPATH=ON | ||
-DLIBXML2_WITH_XPTR=ON | ||
) | ||
|
||
vcpkg_cmake_install() | ||
|
||
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/libxml2") | ||
vcpkg_fixup_pkgconfig() | ||
|
||
vcpkg_copy_pdbs() | ||
|
||
if("tools" IN_LIST FEATURES) | ||
vcpkg_copy_tools(TOOL_NAMES xmllint xmlcatalog AUTO_CLEAN) | ||
endif() | ||
|
||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") | ||
endif() | ||
|
||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static) | ||
set(_file "${CURRENT_PACKAGES_DIR}/include/libxml2/libxml/xmlexports.h") | ||
file(READ "${_file}" _contents) | ||
string(REPLACE "#ifdef LIBXML_STATIC" "#undef LIBXML_STATIC\n#define LIBXML_STATIC\n#ifdef LIBXML_STATIC" _contents "${_contents}") | ||
file(WRITE "${_file}" "${_contents}") | ||
endif() | ||
|
||
file(COPY "${CURRENT_PACKAGES_DIR}/include/libxml2/" DESTINATION "${CURRENT_PACKAGES_DIR}/include") # TODO: Fix usage in all dependent ports hardcoding the wrong include path. | ||
|
||
# Cleanup | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/xml2Conf.sh" "${CURRENT_PACKAGES_DIR}/debug/lib/xml2Conf.sh") | ||
|
||
file(COPY | ||
"${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" | ||
"${CMAKE_CURRENT_LIST_DIR}/usage" | ||
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" | ||
) | ||
file(INSTALL "${SOURCE_PATH}/Copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) |
Oops, something went wrong.