diff --git a/ports/libxml2/portfile.cmake b/ports/libxml2/portfile.cmake index a9e869bd92..2a7dd29fa3 100644 --- a/ports/libxml2/portfile.cmake +++ b/ports/libxml2/portfile.cmake @@ -69,8 +69,6 @@ vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() -configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) - if("tools" IN_LIST FEATURES) vcpkg_copy_tools(TOOL_NAMES xmllint xmlcatalog AUTO_CLEAN) endif() @@ -91,5 +89,9 @@ 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}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +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) diff --git a/ports/libxml2/usage b/ports/libxml2/usage index c77cdbce5d..c7a4878e9b 100644 --- a/ports/libxml2/usage +++ b/ports/libxml2/usage @@ -1,4 +1,4 @@ The package libxml2 is compatible with built-in CMake targets: - find_package(LibXml2 CONFIG REQUIRED) + find_package(LibXml2 REQUIRED) target_link_libraries(main PRIVATE LibXml2::LibXml2) diff --git a/ports/libxml2/vcpkg-cmake-wrapper.cmake b/ports/libxml2/vcpkg-cmake-wrapper.cmake index dede4c8316..705f22c6a3 100644 --- a/ports/libxml2/vcpkg-cmake-wrapper.cmake +++ b/ports/libxml2/vcpkg-cmake-wrapper.cmake @@ -1,49 +1,3 @@ -_find_package(${ARGS}) -if(LibXml2_FOUND) - list(APPEND LIBXML2_INCLUDE_DIRS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") - list(APPEND LIBXML2_INCLUDE_DIR "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") # This is wrong but downstream doesn't correctly use _DIR vs _DIRS variables - if(TARGET LibXml2::LibXml2) - target_include_directories(LibXml2::LibXml2 INTERFACE "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include") - endif() -endif() -if(LibXml2_FOUND AND "@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT ${ARGV0}_CONFIG) - find_package(LibLZMA) - find_package(ZLIB) - find_package(Iconv) - include(SelectLibraryConfigurations) - find_library(LIBXML2_LIBRARY_DEBUG NAMES xml2 libxml2 xml2s libxml2s xml2d libxml2d xml2sd libxml2sd NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_INSTALLED_DIR}/debug" NO_DEFAULT_PATH) - find_library(LIBXML2_LIBRARY_RELEASE NAMES xml2 libxml2 xml2s libxml2s NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) - unset(LIBXML2_LIBRARIES) - unset(LIBXML2_LIBRARY CACHE) - select_library_configurations(LIBXML2) - list(APPEND LIBXML2_LIBRARIES ${LIBLZMA_LIBRARIES} ${ZLIB_LIBRARIES}) - if(Iconv_LIBRARIES) - list(APPEND LIBXML2_LIBRARIES ${Iconv_LIBRARIES}) - endif() - if(TARGET LibXml2::LibXml2 AND LIBXML2_LIBRARY_RELEASE) - set_target_properties(LibXml2::LibXml2 PROPERTIES IMPORTED_LOCATION_RELEASE "${LIBXML2_LIBRARY_RELEASE}") - endif() - if(TARGET LibXml2::LibXml2 AND LIBXML2_LIBRARY_DEBUG) - set_target_properties(LibXml2::LibXml2 PROPERTIES IMPORTED_LOCATION_DEBUG "${LIBXML2_LIBRARY_DEBUG}") - endif() - cmake_policy(PUSH) - cmake_policy(SET CMP0079 NEW) - if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - list(APPEND LIBXML2_LIBRARIES m) - if(TARGET LibXml2::LibXml2) - set_property(TARGET LibXml2::LibXml2 APPEND PROPERTY INTERFACE_LINK_LIBRARIES "m") - endif() - elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") - list(APPEND LIBXML2_LIBRARIES ws2_32) - if(TARGET LibXml2::LibXml2) - set_property(TARGET LibXml2::LibXml2 APPEND PROPERTY INTERFACE_LINK_LIBRARIES "ws2_32") - endif() - endif() - if(TARGET LibXml2::LibXml2) - set_property(TARGET LibXml2::LibXml2 APPEND PROPERTY INTERFACE_LINK_LIBRARIES "LibLZMA::LibLZMA" "ZLIB::ZLIB") - if(TARGET Iconv::Iconv) - set_property(TARGET LibXml2::LibXml2 APPEND PROPERTY INTERFACE_LINK_LIBRARIES "Iconv::Iconv") - endif() - endif() - cmake_policy(POP) -endif() +list(REMOVE_ITEM ARGS "NO_MODULE" "CONFIG" "MODULE") +_find_package(${ARGS} CONFIG) +set(LIBXML2_FOUND "${LibXml2_FOUND}") # fphsa compatibility diff --git a/ports/libxml2/vcpkg.json b/ports/libxml2/vcpkg.json index 117810665d..752c331adb 100644 --- a/ports/libxml2/vcpkg.json +++ b/ports/libxml2/vcpkg.json @@ -1,6 +1,7 @@ { "name": "libxml2", "version": "2.9.14", + "port-version": 1, "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/", "license": "MIT", diff --git a/ports/libxmlmm/CMakeLists.txt b/ports/libxmlmm/CMakeLists.txt index 721641a64b..e423c6df73 100644 --- a/ports/libxmlmm/CMakeLists.txt +++ b/ports/libxmlmm/CMakeLists.txt @@ -1,9 +1,6 @@ cmake_minimum_required(VERSION 3.8) project(libxmlmm CXX) -set(CMAKE_SHARED_LIBRARY_PREFIX) -set(CMAKE_STATIC_LIBRARY_PREFIX) - find_package(LibXml2 REQUIRED) set(HEADERS_LIBXMLMM @@ -38,22 +35,26 @@ set(SOURCES_LIBXMLMM ) add_library(libxmlmm ${SOURCES_LIBXMLMM}) -include_directories(${LIBXML2_INCLUDE_DIR}) -target_link_libraries (libxmlmm ${LIBXML2_LIBRARIES}) +target_link_libraries (libxmlmm PUBLIC LibXml2::LibXml2) set_target_properties(libxmlmm PROPERTIES CXX_STANDARD 17 PUBLIC_HEADER "${HEADERS_LIBXMLMM}" + PREFIX "" ) target_include_directories(libxmlmm PUBLIC $ $) -install(TARGETS ${PROJECT_NAME} - EXPORT litehtmlTargets +install(TARGETS libxmlmm + EXPORT unofficial-libxmlmm-targets RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib PUBLIC_HEADER DESTINATION include/libxmlmm ) +install(EXPORT unofficial-libxmlmm-targets + NAMESPACE unofficial::libxmlmm:: + DESTINATION share/unofficial-libxmlmm +) diff --git a/ports/libxmlmm/portfile.cmake b/ports/libxmlmm/portfile.cmake index 24ff58d0e0..b676af2f12 100644 --- a/ports/libxmlmm/portfile.cmake +++ b/ports/libxmlmm/portfile.cmake @@ -16,7 +16,11 @@ vcpkg_cmake_install() vcpkg_copy_pdbs() +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/unofficial-libxmlmm-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-libxmlmm") +vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-libxmlmm) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -# Handle copyright -file(INSTALL "${SOURCE_PATH}/README.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(READ "${SOURCE_PATH}/README.md" readme) +string(REGEX REPLACE "^.*## Copying\n" "" copyright "${readme}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "${copyright}") diff --git a/ports/libxmlmm/unofficial-libxmlmm-config.cmake b/ports/libxmlmm/unofficial-libxmlmm-config.cmake new file mode 100644 index 0000000000..16a46deec0 --- /dev/null +++ b/ports/libxmlmm/unofficial-libxmlmm-config.cmake @@ -0,0 +1,3 @@ +include(CMakeFindDependencyMacro) +find_dependency(LibXml2) +include("${CMAKE_CURRENT_LIST_DIR}/unofficial-libxmlmm-config.cmake") diff --git a/ports/libxmlmm/vcpkg.json b/ports/libxmlmm/vcpkg.json index b4469246a6..2de6d14465 100644 --- a/ports/libxmlmm/vcpkg.json +++ b/ports/libxmlmm/vcpkg.json @@ -1,14 +1,19 @@ { "name": "libxmlmm", "version": "0.6.0", - "port-version": 2, + "port-version": 3, "description": "Libxmlmm is a C++ wrapper for libxml 2.0 that only relies on standard C++ and libxml2.", "homepage": "https://github.com/rioki/libxmlmm", + "license": "MIT", "dependencies": [ "libxml2", { "name": "vcpkg-cmake", "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true } ] } diff --git a/ports/libxslt/cmake.patch b/ports/libxslt/cmake.patch deleted file mode 100644 index 71655e166b..0000000000 --- a/ports/libxslt/cmake.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d8679fb7f..ca21a7a3d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -36,10 +36,10 @@ if(LIBXSLT_WITH_PYTHON) - if(HAVE_UNISTD_H AND HAVE_F_GETFL) - find_package(Python COMPONENTS Interpreter Development REQUIRED) - else() -- find_package(Python2 COMPONENTS Interpreter Development REQUIRED) -- add_library(Python::Python ALIAS Python2::Python) -- set(Python_EXECUTABLE ${Python2_EXECUTABLE}) -- set(Python_SITEARCH ${Python2_SITEARCH}) -+ find_package(Python3 COMPONENTS Interpreter Development REQUIRED) -+ add_library(Python::Python ALIAS Python3::Python) -+ set(Python_EXECUTABLE ${Python3_EXECUTABLE}) -+ set(Python_SITEARCH ${Python3_SITEARCH}) - endif() - set(LIBXSLT_PYTHON_INSTALL_DIR ${Python_SITEARCH} CACHE PATH "Python bindings install directory") - endif() -@@ -244,7 +244,7 @@ set_target_properties( - VERSION ${PROJECT_VERSION} - ) - --if(MSVC) -+if(0) # Never add suffixes which are not added by the autotools build or the nmake makefiles - if(BUILD_SHARED_LIBS) - set_target_properties( - LibXslt -@@ -327,7 +327,7 @@ set_target_properties( - VERSION ${LIBEXSLT_VERSION} - ) - --if(MSVC) -+if(0) # same reason as above - if(BUILD_SHARED_LIBS) - set_target_properties( - LibExslt -diff --git a/libexslt.pc.in b/libexslt.pc.in -index 1d605639a..c3a1edb00 100644 ---- a/libexslt.pc.in -+++ b/libexslt.pc.in -@@ -7,7 +7,7 @@ includedir=@includedir@ - Name: libexslt - Version: @LIBEXSLT_VERSION@ - Description: EXSLT Extension library --Requires: libxml-2.0, libxslt -+Requires: libxml-2.0 libxslt - Cflags: @EXSLT_INCLUDEDIR@ - Libs: @EXSLT_LIBDIR@ -lexslt - Libs.private: @EXSLT_PRIVATE_LIBS@ diff --git a/ports/libxslt/fix-gcrypt-deps.patch b/ports/libxslt/fix-gcrypt-deps.patch new file mode 100644 index 0000000000..681e15cf84 --- /dev/null +++ b/ports/libxslt/fix-gcrypt-deps.patch @@ -0,0 +1,45 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6dc6501..d36a049 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -317,7 +317,9 @@ target_include_directories( + + if(LIBXSLT_WITH_CRYPTO) + target_link_libraries(LibExslt PRIVATE Gcrypt::Gcrypt) +- set(LIBGCRYPT_LIBS "-lgcrypt") ++ # For libexslt.pc ++ set(LIBGCRYPT_LIBS "") ++ string(APPEND EXSLT_PRIVATE_REQUIRES " libgcrypt") + endif() + + target_link_libraries(LibExslt PUBLIC LibXslt LibXml2::LibXml2) +diff --git a/FindGcrypt.cmake b/FindGcrypt.cmake +index 781113d..a78fa84 100644 +--- a/FindGcrypt.cmake ++++ b/FindGcrypt.cmake +@@ -1,3 +1,20 @@ ++cmake_policy(PUSH) ++cmake_policy(SET CMP0012 NEW) ++cmake_policy(SET CMP0057 NEW) ++find_package(PkgConfig) ++if("REQUIRED" IN_LIST ${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED) ++ pkg_check_modules(libxslt_gcrypt REQUIRED IMPORTED_TARGET libgcrypt) ++else() ++ pkg_check_modules(libxslt_gcrypt IMPORTED_TARGET libgcrypt) ++endif() ++set(Gcrypt_FOUND "${libxslt_gcrypt_FOUND}") # CMake standard, needed for find_dependency ++set(GCRYPT_FOUND "${libxslt_gcrypt_FOUND}") # libxslt usage ++if(libxslt_gcrypt_FOUND AND NOT TARGET Gcrypt::Gcrypt) ++ add_library(Gcrypt::Gcrypt INTERFACE IMPORTED) ++ set_target_properties(Gcrypt::Gcrypt PROPERTIES INTERFACE_LINK_LIBRARIES PkgConfig::libxslt_gcrypt) ++endif() ++cmake_policy(POP) ++if(0) + include(FindPackageHandleStandardArgs) + include(SelectLibraryConfigurations) + +@@ -38,3 +53,4 @@ if(GCRYPT_FOUND AND NOT TARGET Gcrypt::Gcrypt) + INTERFACE_INCLUDE_DIRECTORIES "${GCRYPT_INCLUDE_DIRS}" + ) + endif() ++endif() diff --git a/ports/libxslt/libexslt-pkgconfig.patch b/ports/libxslt/libexslt-pkgconfig.patch new file mode 100644 index 0000000000..b500a8108c --- /dev/null +++ b/ports/libxslt/libexslt-pkgconfig.patch @@ -0,0 +1,14 @@ +diff --git a/libexslt.pc.in b/libexslt.pc.in +index 1d60563..50089e8 100644 +--- a/libexslt.pc.in ++++ b/libexslt.pc.in +@@ -7,7 +7,8 @@ includedir=@includedir@ + Name: libexslt + Version: @LIBEXSLT_VERSION@ + Description: EXSLT Extension library +-Requires: libxml-2.0, libxslt ++Requires: libxslt ++Requires.private: @EXSLT_PRIVATE_REQUIRES@ + Cflags: @EXSLT_INCLUDEDIR@ + Libs: @EXSLT_LIBDIR@ -lexslt + Libs.private: @EXSLT_PRIVATE_LIBS@ diff --git a/ports/libxslt/msvc-no-suffix.patch b/ports/libxslt/msvc-no-suffix.patch new file mode 100644 index 0000000000..243687fc57 --- /dev/null +++ b/ports/libxslt/msvc-no-suffix.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d8679fb..6dc6501 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -244,7 +249,7 @@ set_target_properties( + VERSION ${PROJECT_VERSION} + ) + +-if(MSVC) ++if(0) # Never add suffixes which are not added by the autotools build or the nmake makefiles + if(BUILD_SHARED_LIBS) + set_target_properties( + LibXslt +@@ -327,7 +332,7 @@ set_target_properties( + VERSION ${LIBEXSLT_VERSION} + ) + +-if(MSVC) ++if(0) # same reason as above + if(BUILD_SHARED_LIBS) + set_target_properties( + LibExslt diff --git a/ports/libxslt/portfile.cmake b/ports/libxslt/portfile.cmake index 7b94c792b3..1320051ab9 100644 --- a/ports/libxslt/portfile.cmake +++ b/ports/libxslt/portfile.cmake @@ -1,14 +1,15 @@ -# Get this value from configure.ac:21 -set(LIBEXSLT_VERSION 0.8.20) -set(VERSION 1.1.35) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO GNOME/libxslt - REF v${VERSION} + REF v1.1.35 SHA512 1ab264a8d3996d74a89a22e4062950ef968b9252736e0b5f975e6f45d63a6484993fe383b85831cef0e4b9c9c90f9b2b3d5432c15ee9381dbaeb2fa681ab9b46 HEAD_REF master PATCHES - cmake.patch + python3.patch + msvc-no-suffix.patch + libexslt-pkgconfig.patch + fix-gcrypt-deps.patch + skip-install-docs.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS @@ -40,17 +41,19 @@ vcpkg_cmake_configure( -DLIBXSLT_WITH_DEBUGGER:BOOL=ON ) vcpkg_cmake_install() -vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}-${VERSION}") +file(GLOB config_path RELATIVE "${CURRENT_PACKAGES_DIR}" "${CURRENT_PACKAGES_DIR}/lib/cmake/libxslt-*") +vcpkg_cmake_config_fixup(CONFIG_PATH "${config_path}") file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/xsltConf.sh" "${CURRENT_PACKAGES_DIR}/debug/lib/xsltConf.sh") -file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/libxslt/bin") -file(RENAME "${CURRENT_PACKAGES_DIR}/bin/xslt-config" "${CURRENT_PACKAGES_DIR}/tools/libxslt/bin/xslt-config") -vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/libxslt/bin/xslt-config" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../../../") +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/libxslt") +file(RENAME "${CURRENT_PACKAGES_DIR}/bin/xslt-config" "${CURRENT_PACKAGES_DIR}/tools/libxslt/xslt-config") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/libxslt/xslt-config" [[$(cd "$(dirname "$0")"; pwd -P)/..]] [[$(cd "$(dirname "$0")/../.."; pwd -P)]]) if(NOT VCPKG_BUILD_TYPE) - file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/libxslt/debug/bin") - file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/xslt-config" "${CURRENT_PACKAGES_DIR}/tools/libxslt/debug/bin/xslt-config") - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/libxslt/debug/bin/xslt-config" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../../../../") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/libxslt/debug") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/xslt-config" "${CURRENT_PACKAGES_DIR}/tools/libxslt/debug/xslt-config") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/libxslt/debug/xslt-config" [[$(cd "$(dirname "$0")"; pwd -P)/..]] [[$(cd "$(dirname "$0")/../../../debug"; pwd -P)]]) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/libxslt/debug/xslt-config" [[${prefix}/include]] [[${prefix}/../include]]) endif() vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/libxslt/xsltconfig.h" "#define LIBXSLT_DEFAULT_PLUGINS_PATH() \"${CURRENT_INSTALLED_DIR}/lib/libxslt-plugins\"" "") vcpkg_copy_tools(TOOL_NAMES xsltproc AUTO_CLEAN) @@ -58,26 +61,16 @@ vcpkg_copy_tools(TOOL_NAMES xsltproc AUTO_CLEAN) vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() -# You have to define LIB(E)XSLT_STATIC or not, depending on how you link -file(READ "${CURRENT_PACKAGES_DIR}/include/libxslt/xsltexports.h" XSLTEXPORTS_H) +set(not_static 1) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - string(REPLACE "!defined(LIBXSLT_STATIC)" "0" XSLTEXPORTS_H "${XSLTEXPORTS_H}") -else() - string(REPLACE "!defined(LIBXSLT_STATIC)" "1" XSLTEXPORTS_H "${XSLTEXPORTS_H}") + set(not_static 0) endif() -file(WRITE "${CURRENT_PACKAGES_DIR}/include/libxslt/xsltexports.h" "${XSLTEXPORTS_H}") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/libxslt/xsltexports.h" "!defined(LIBXSLT_STATIC)" "${not_static}") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/libexslt/exsltexports.h" "!defined(LIBEXSLT_STATIC)" "${not_static}") -file(READ "${CURRENT_PACKAGES_DIR}/include/libexslt/exsltexports.h" EXSLTEXPORTS_H) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - string(REPLACE "!defined(LIBEXSLT_STATIC)" "0" EXSLTEXPORTS_H "${EXSLTEXPORTS_H}") -else() - string(REPLACE "!defined(LIBEXSLT_STATIC)" "1" EXSLTEXPORTS_H "${EXSLTEXPORTS_H}") -endif() -file(WRITE "${CURRENT_PACKAGES_DIR}/include/libexslt/exsltexports.h" "${EXSLTEXPORTS_H}") - -# Remove tools and debug include directories file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/libxslt") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") file(INSTALL "${SOURCE_PATH}/Copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) -file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/libxslt") diff --git a/ports/libxslt/python3.patch b/ports/libxslt/python3.patch new file mode 100644 index 0000000000..fc86d1fc56 --- /dev/null +++ b/ports/libxslt/python3.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d8679fb..6dc6501 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -35,6 +35,11 @@ if(LIBXSLT_WITH_PYTHON) + check_symbol_exists(F_GETFL fcntl.h HAVE_F_GETFL) + if(HAVE_UNISTD_H AND HAVE_F_GETFL) + find_package(Python COMPONENTS Interpreter Development REQUIRED) ++ elseif(1) ++ find_package(Python3 COMPONENTS Interpreter Development REQUIRED) ++ add_library(Python::Python ALIAS Python3::Python) ++ set(Python_EXECUTABLE ${Python3_EXECUTABLE}) ++ set(Python_SITEARCH ${Python3_SITEARCH}) + else() + find_package(Python2 COMPONENTS Interpreter Development REQUIRED) + add_library(Python::Python ALIAS Python2::Python) diff --git a/ports/libxslt/skip-install-docs.patch b/ports/libxslt/skip-install-docs.patch new file mode 100644 index 0000000000..542cae3b80 --- /dev/null +++ b/ports/libxslt/skip-install-docs.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6dc6501..d36a049 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -432,10 +434,12 @@ if(LIBXSLT_WITH_PYTHON) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libxslt.py DESTINATION ${LIBXSLT_PYTHON_INSTALL_DIR} COMPONENT runtime) + endif() + ++if(VCPKG_INSTALL_DOCS) + install(FILES libexslt/libexslt.3 DESTINATION ${CMAKE_INSTALL_MANDIR}/man3 COMPONENT documentation) + install(FILES libxslt/libxslt.3 DESTINATION ${CMAKE_INSTALL_MANDIR}/man3 COMPONENT documentation) + install(FILES doc/xsltproc.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT documentation) + install(DIRECTORY doc/ DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/libxslt COMPONENT documentation PATTERN Makefile.* EXCLUDE) ++endif() + + if(LIBXSLT_WITH_CRYPTO) + install(FILES FindGcrypt.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxslt-${PROJECT_VERSION} COMPONENT development) diff --git a/ports/libxslt/usage b/ports/libxslt/usage new file mode 100644 index 0000000000..91daf3461c --- /dev/null +++ b/ports/libxslt/usage @@ -0,0 +1,12 @@ +The package libxslt is compatible with built-in CMake targets: + + # xslt library + find_package(LibXslt REQUIRED) + target_link_libraries(main PRIVATE LibXslt::LibXslt) + + # exslt library + find_package(LibXslt REQUIRED) + target_link_libraries(main PRIVATE LibXslt::LibExslt) + +In order to use modules, you must set environment variable LIBXSLT_PLUGINS_PATH +at runtime. diff --git a/ports/libxslt/vcpkg.json b/ports/libxslt/vcpkg.json index d40c692820..8d63754719 100644 --- a/ports/libxslt/vcpkg.json +++ b/ports/libxslt/vcpkg.json @@ -1,12 +1,12 @@ { "name": "libxslt", "version": "1.1.35", + "port-version": 1, "description": "Libxslt is a XSLT library implemented in C for XSLT 1.0 and most of EXSLT", "homepage": "https://github.com/GNOME/libxslt", "license": null, "supports": "!uwp", "dependencies": [ - "liblzma", "libxml2", { "name": "vcpkg-cmake", @@ -23,26 +23,13 @@ "features": { "crypto": { "description": "Build with crypto support", - "supports": "mingw | !windows", + "supports": "!windows", "dependencies": [ - { - "name": "libgcrypt", - "platform": "!mingw" - } + "libgcrypt" ] }, "default-features": { - "description": "default features for the current platform", - "dependencies": [ - { - "name": "libxslt", - "default-features": false, - "features": [ - "crypto" - ], - "platform": "mingw | !windows" - } - ] + "description": "default features for the current platform" }, "plugins": { "description": "(deprecated)", @@ -50,7 +37,7 @@ }, "python": { "description": "Builds with python support", - "supports": "mingw | !windows" + "supports": "!windows" } } } diff --git a/ports/openscap/fix-build.patch b/ports/openscap/fix-build.patch index 57d22946b6..e40932ecbe 100644 --- a/ports/openscap/fix-build.patch +++ b/ports/openscap/fix-build.patch @@ -27,7 +27,7 @@ index 4de5b57..5f483a3 100644 + check_library_exists(pthread pthread_setname_np "" HAVE_PTHREAD_SETNAME_NP) + check_library_exists(pthread pthread_getname_np "" HAVE_PTHREAD_GETNAME_NP) +else() -+ set(THREADS_USE_PTHREADS_WIN32 -pthread) ++ find_package(Threads REQUIRED) +endif() + +# OpenSSL diff --git a/ports/openscap/portfile.cmake b/ports/openscap/portfile.cmake index 70f55be565..db1d5e448e 100644 --- a/ports/openscap/portfile.cmake +++ b/ports/openscap/portfile.cmake @@ -7,6 +7,7 @@ vcpkg_from_github( PATCHES fix-build.patch ) +file(REMOVE "${SOURCE_PATH}/cmake/FindThreads.cmake") if ("python" IN_LIST FEATURES) vcpkg_find_acquire_program(PYTHON3) @@ -33,6 +34,7 @@ vcpkg_configure_cmake( -DENABLE_OSCAP_UTIL_VM=OFF -DENABLE_OSCAP_UTIL_PODMAN=OFF -DENABLE_OSCAP_UTIL_CHROOT=OFF + -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=ON ) vcpkg_install_cmake() diff --git a/ports/openscap/vcpkg.json b/ports/openscap/vcpkg.json index 3bab620ed2..c75a5d80ac 100644 --- a/ports/openscap/vcpkg.json +++ b/ports/openscap/vcpkg.json @@ -1,7 +1,7 @@ { "name": "openscap", - "version-string": "1.3.1", - "port-version": 1, + "version": "1.3.1", + "port-version": 2, "description": "The oscap program is a command line tool that allows users to load, scan, validate, edit, and export SCAP documents.", "homepage": "https://github.com/OpenSCAP/openscap", "dependencies": [ diff --git a/ports/tidy-html5/portfile.cmake b/ports/tidy-html5/portfile.cmake index 350d988596..40bdbb35c6 100644 --- a/ports/tidy-html5/portfile.cmake +++ b/ports/tidy-html5/portfile.cmake @@ -15,7 +15,7 @@ vcpkg_cmake_configure( -DBUILD_SHARED_LIB=OFF -DTIDY_CONSOLE_SHARED=OFF ) -vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/libxslt/bin") +vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/libxslt") vcpkg_cmake_install() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/tidy-html5/vcpkg.json b/ports/tidy-html5/vcpkg.json index 1c16d8657d..40bf229b92 100644 --- a/ports/tidy-html5/vcpkg.json +++ b/ports/tidy-html5/vcpkg.json @@ -1,7 +1,7 @@ { "name": "tidy-html5", "version": "5.7.28", - "port-version": 5, + "port-version": 6, "description": "Tidy tidies HTML and XML. It can tidy your documents by itself, and developers can easily integrate its features into even more powerful tools.", "homepage": "https://github.com/htacg/tidy-html5", "license": null, diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 31fa7eca7c..299b8ff4d9 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -788,7 +788,6 @@ openmesh:arm-uwp=fail openmesh:x64-uwp=fail openni2:x64-uwp=fail openni2:x64-windows-static=fail -openscap:x64-linux=fail openscap:x64-osx=fail openvpn3:x64-osx=fail openvr:arm64-windows=fail diff --git a/versions/baseline.json b/versions/baseline.json index 9f09ac9948..ced03ba0d9 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4234,11 +4234,11 @@ }, "libxml2": { "baseline": "2.9.14", - "port-version": 0 + "port-version": 1 }, "libxmlmm": { "baseline": "0.6.0", - "port-version": 2 + "port-version": 3 }, "libxmlpp": { "baseline": "5.0.0", @@ -4250,7 +4250,7 @@ }, "libxslt": { "baseline": "1.1.35", - "port-version": 0 + "port-version": 1 }, "libyaml": { "baseline": "0.2.5", @@ -5222,7 +5222,7 @@ }, "openscap": { "baseline": "1.3.1", - "port-version": 1 + "port-version": 2 }, "openssl": { "baseline": "3.0.4", @@ -7034,7 +7034,7 @@ }, "tidy-html5": { "baseline": "5.7.28", - "port-version": 5 + "port-version": 6 }, "tiff": { "baseline": "4.4.0", diff --git a/versions/l-/libxml2.json b/versions/l-/libxml2.json index 0f5e6419ae..208073dff5 100644 --- a/versions/l-/libxml2.json +++ b/versions/l-/libxml2.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "e1262b96218e08ee3cc877999c759e658cca8273", + "version": "2.9.14", + "port-version": 1 + }, { "git-tree": "454c94726c33c2893c30afbe34243d69dc4d91e0", "version": "2.9.14", diff --git a/versions/l-/libxmlmm.json b/versions/l-/libxmlmm.json index 4a3298fbc8..a002ea62a4 100644 --- a/versions/l-/libxmlmm.json +++ b/versions/l-/libxmlmm.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "5f54a7f6dadcf5781a5d48d22a113f5f37af0956", + "version": "0.6.0", + "port-version": 3 + }, { "git-tree": "869d2ab96342804f872b8d56ad8ccd5e80b274b6", "version": "0.6.0", diff --git a/versions/l-/libxslt.json b/versions/l-/libxslt.json index 76b4113230..86b53c81b5 100644 --- a/versions/l-/libxslt.json +++ b/versions/l-/libxslt.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "3febc2931430356214f9a15ec06f7863ad4825d9", + "version": "1.1.35", + "port-version": 1 + }, { "git-tree": "d6fe77f9ea62ee9e22769ffd1ae0f28229df2a50", "version": "1.1.35", diff --git a/versions/o-/openscap.json b/versions/o-/openscap.json index 7a5ee2f30e..a91fbc8afa 100644 --- a/versions/o-/openscap.json +++ b/versions/o-/openscap.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "cbc6ed45cdfd68efd53ee939bed2440e2971730f", + "version": "1.3.1", + "port-version": 2 + }, { "git-tree": "ecbc2e72085ae6324948b52314de3b7e701376a5", "version-string": "1.3.1", diff --git a/versions/t-/tidy-html5.json b/versions/t-/tidy-html5.json index 8a48d8d421..c701d381b4 100644 --- a/versions/t-/tidy-html5.json +++ b/versions/t-/tidy-html5.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "2e4c85fc988591dc5b25baac22c4e83dde7b7f64", + "version": "5.7.28", + "port-version": 6 + }, { "git-tree": "bf333a8afdee1d7e0129928022e228cc092ed5de", "version": "5.7.28",