mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 05:49:08 +08:00
[libxml2,libxslt] Revise dependency handling (#24935)
* Update mingw support expressions * Update versions * Use pkg-config for complete libgcrypt dependencies * Remove crypto from default features Align with CMake build system defaults. * Drop unused liblzma dependency * Update versions * Skip installation of docs * Update versions * Restructure patches * Update versions * CI [skip actions] * Revise libxml2 wrapper * Omit CONFIG from find_package(LibXml2) * Test libxml2 with, and fix for, CMake 3.7 * Update versions * More libxml2 wrapper changes * libxslt gcrypt variable name changes * Install usage * Trim portfile * [openscap] Use vcpkg pkg-config database * [openscap] Unbreak find_package(Threads) * Update versions * Update CI baseline * REQUIRED is a literal * Update versions * Always load libxml2 config instead of find module [skip actions] * [libxmlmm] Fix linking to libxml2 libxml2 needs iconv include dir on Windows. * [libxmlmm] License field and processing * [libxmlmm] Export unofficial CMake config * [libxmlmm] Change target prefix, not global default * Revert cmake-user changes * Set LIBXML2_FOUND * Update versions * Fix xslt-config * Update versions * Adjust tidy-html5 * Update versions Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
parent
99021f98b1
commit
5a8ff0088a
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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",
|
||||
|
@ -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
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libxmlmm>
|
||||
$<INSTALL_INTERFACE:include/libxmlmm>)
|
||||
|
||||
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
|
||||
)
|
||||
|
@ -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}")
|
||||
|
3
ports/libxmlmm/unofficial-libxmlmm-config.cmake
Normal file
3
ports/libxmlmm/unofficial-libxmlmm-config.cmake
Normal file
@ -0,0 +1,3 @@
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(LibXml2)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/unofficial-libxmlmm-config.cmake")
|
@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -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@
|
45
ports/libxslt/fix-gcrypt-deps.patch
Normal file
45
ports/libxslt/fix-gcrypt-deps.patch
Normal file
@ -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()
|
14
ports/libxslt/libexslt-pkgconfig.patch
Normal file
14
ports/libxslt/libexslt-pkgconfig.patch
Normal file
@ -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@
|
22
ports/libxslt/msvc-no-suffix.patch
Normal file
22
ports/libxslt/msvc-no-suffix.patch
Normal file
@ -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
|
@ -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")
|
||||
|
16
ports/libxslt/python3.patch
Normal file
16
ports/libxslt/python3.patch
Normal file
@ -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)
|
17
ports/libxslt/skip-install-docs.patch
Normal file
17
ports/libxslt/skip-install-docs.patch
Normal file
@ -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)
|
12
ports/libxslt/usage
Normal file
12
ports/libxslt/usage
Normal file
@ -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.
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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": [
|
||||
|
@ -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")
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "e1262b96218e08ee3cc877999c759e658cca8273",
|
||||
"version": "2.9.14",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "454c94726c33c2893c30afbe34243d69dc4d91e0",
|
||||
"version": "2.9.14",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "5f54a7f6dadcf5781a5d48d22a113f5f37af0956",
|
||||
"version": "0.6.0",
|
||||
"port-version": 3
|
||||
},
|
||||
{
|
||||
"git-tree": "869d2ab96342804f872b8d56ad8ccd5e80b274b6",
|
||||
"version": "0.6.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "3febc2931430356214f9a15ec06f7863ad4825d9",
|
||||
"version": "1.1.35",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "d6fe77f9ea62ee9e22769ffd1ae0f28229df2a50",
|
||||
"version": "1.1.35",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "cbc6ed45cdfd68efd53ee939bed2440e2971730f",
|
||||
"version": "1.3.1",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "ecbc2e72085ae6324948b52314de3b7e701376a5",
|
||||
"version-string": "1.3.1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "2e4c85fc988591dc5b25baac22c4e83dde7b7f64",
|
||||
"version": "5.7.28",
|
||||
"port-version": 6
|
||||
},
|
||||
{
|
||||
"git-tree": "bf333a8afdee1d7e0129928022e228cc092ed5de",
|
||||
"version": "5.7.28",
|
||||
|
Loading…
Reference in New Issue
Block a user