2019-06-28 02:08:20 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO GNOME/libxslt
|
2022-09-10 02:56:55 +08:00
|
|
|
REF v1.1.37
|
|
|
|
SHA512 4e7a57cbe02ceea34404213a88bdbb63a756edfab63063ce3979b670816ae3f6fb3637a49508204e6e46b936628e0a3b8b77e9201530a1184225bd68da403b25
|
2019-06-28 02:08:20 +08:00
|
|
|
HEAD_REF master
|
2019-09-06 01:43:09 +08:00
|
|
|
PATCHES
|
2022-07-07 05:30:42 +08:00
|
|
|
python3.patch
|
|
|
|
msvc-no-suffix.patch
|
|
|
|
libexslt-pkgconfig.patch
|
|
|
|
fix-gcrypt-deps.patch
|
|
|
|
skip-install-docs.patch
|
2016-11-22 05:40:45 +08:00
|
|
|
)
|
|
|
|
|
2022-05-20 05:38:14 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
"python" LIBXSLT_WITH_PYTHON
|
|
|
|
"crypto" LIBXSLT_WITH_CRYPTO
|
|
|
|
)
|
|
|
|
if("python" IN_LIST FEATURES)
|
|
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
|
|
list(APPEND FEATURE_OPTIONS "-DPYTHON_EXECUTABLE=${PYTHON3}")
|
|
|
|
list(APPEND FEATURE_OPTIONS_RELEASE "-DLIBXSLT_PYTHON_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib/site-packages")
|
|
|
|
list(APPEND FEATURE_OPTIONS_DEBUG "-DLIBXSLT_PYTHON_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib/site-packages")
|
|
|
|
endif()
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
-DLIBXSLT_WITH_TESTS:BOOL=OFF
|
|
|
|
-DLIBXSLT_WITH_THREADS:BOOL=ON
|
|
|
|
OPTIONS_RELEASE
|
|
|
|
${FEATURE_OPTIONS_RELEASE}
|
|
|
|
-DLIBXSLT_WITH_XSLT_DEBUG:BOOL=OFF
|
|
|
|
-DLIBXSLT_WITH_MEM_DEBUG:BOOL=OFF
|
|
|
|
-DLIBXSLT_WITH_DEBUGGER:BOOL=OFF
|
|
|
|
OPTIONS_DEBUG
|
|
|
|
${FEATURE_OPTIONS_DEBUG}
|
|
|
|
-DLIBXSLT_WITH_XSLT_DEBUG:BOOL=ON
|
|
|
|
-DLIBXSLT_WITH_MEM_DEBUG:BOOL=ON
|
|
|
|
-DLIBXSLT_WITH_DEBUGGER:BOOL=ON
|
2021-11-16 10:50:07 +08:00
|
|
|
)
|
2022-05-20 05:38:14 +08:00
|
|
|
vcpkg_cmake_install()
|
2022-07-07 05:30:42 +08:00
|
|
|
file(GLOB config_path RELATIVE "${CURRENT_PACKAGES_DIR}" "${CURRENT_PACKAGES_DIR}/lib/cmake/libxslt-*")
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "${config_path}")
|
2022-05-20 05:38:14 +08:00
|
|
|
|
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/xsltConf.sh" "${CURRENT_PACKAGES_DIR}/debug/lib/xsltConf.sh")
|
|
|
|
|
2022-07-07 05:30:42 +08:00
|
|
|
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)]])
|
2022-05-20 05:38:14 +08:00
|
|
|
if(NOT VCPKG_BUILD_TYPE)
|
2022-07-07 05:30:42 +08:00
|
|
|
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]])
|
2016-11-22 05:40:45 +08:00
|
|
|
endif()
|
2024-06-20 05:07:05 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/libxslt/xsltconfig.h" "#define LIBXSLT_DEFAULT_PLUGINS_PATH() \"${CURRENT_INSTALLED_DIR}/lib/libxslt-plugins\"" "" IGNORE_UNCHANGED)
|
2022-05-20 05:38:14 +08:00
|
|
|
vcpkg_copy_tools(TOOL_NAMES xsltproc AUTO_CLEAN)
|
2021-11-16 10:50:07 +08:00
|
|
|
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2016-11-22 05:40:45 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
2023-01-09 13:38:28 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/libxslt/xsltexports.h" "ifdef LIBXSLT_STATIC" "if 1")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/libexslt/exsltexports.h" "ifdef LIBEXSLT_STATIC" "if 1")
|
2016-11-22 05:40:45 +08:00
|
|
|
endif()
|
|
|
|
|
2023-06-01 10:55:03 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libxslt.pc" " -lxslt" " -llibxslt")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libexslt.pc" " -lexslt" " -llibexslt")
|
|
|
|
if(NOT VCPKG_BUILD_TYPE)
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libxslt.pc" " -lxslt" " -llibxslt")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libexslt.pc" " -lexslt" " -llibexslt")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2021-11-16 10:50:07 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2016-11-22 05:40:45 +08:00
|
|
|
|
2022-07-07 05:30:42 +08:00
|
|
|
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}")
|
2021-11-16 10:50:07 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/Copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|