mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 20:03:02 +08:00
[tidy-html5] Update to 5.8.0, dynamic linkage, unique link lib name (#25478)
* Update to 5.8.0 * Revise portfile * Disable doc * Enable shared linkage * Fix debug pc file * Fix PDB installation * Update versions * Revert lost version
This commit is contained in:
parent
5955c45dcf
commit
b01fbe8d6f
25
ports/tidy-html5/debug-postfix.patch
Normal file
25
ports/tidy-html5/debug-postfix.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 979ae25..4eb88a1 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -210,7 +210,9 @@ if(WIN32 AND MSVC)
|
||||||
|
set( MSVC_FLAGS "-DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS" )
|
||||||
|
|
||||||
|
# to distinguish between debug and release lib in windows
|
||||||
|
+ if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
|
||||||
|
set( CMAKE_DEBUG_POSTFIX "d" ) # little effect in unix
|
||||||
|
+ endif()
|
||||||
|
else()
|
||||||
|
# add any gcc flags
|
||||||
|
endif()
|
||||||
|
diff --git a/tidy.pc.cmake.in b/tidy.pc.cmake.in
|
||||||
|
index 7d819f1..cbdd299 100644
|
||||||
|
--- a/tidy.pc.cmake.in
|
||||||
|
+++ b/tidy.pc.cmake.in
|
||||||
|
@@ -7,5 +7,5 @@ Name: @LIB_NAME@
|
||||||
|
Description: @LIBTIDY_DESCRIPTION@
|
||||||
|
URL: @LIBTIDY_URL@
|
||||||
|
Version: @LIBTIDY_VERSION@
|
||||||
|
-Libs: -L${libdir} -l@LIB_NAME@
|
||||||
|
+Libs: -L${libdir} -l@LIB_NAME@@CMAKE_DEBUG_POSTFIX@
|
||||||
|
Cflags: -I${includedir}
|
13
ports/tidy-html5/disable-doc.patch
Normal file
13
ports/tidy-html5/disable-doc.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 8efec25..d2edac2 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -508,7 +508,7 @@ endif ()
|
||||||
|
# Create man pages
|
||||||
|
#################################################
|
||||||
|
|
||||||
|
-if (UNIX AND SUPPORT_CONSOLE_APP)
|
||||||
|
+if (0)
|
||||||
|
find_program( XSLTPROC_FOUND xsltproc )
|
||||||
|
if (XSLTPROC_FOUND)
|
||||||
|
## NOTE: man name must match exe ie currently `${LIB_NAME}.1` not `tidy.1`
|
@ -1,35 +1,32 @@
|
|||||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
||||||
|
|
||||||
vcpkg_from_github(
|
vcpkg_from_github(
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
REPO htacg/tidy-html5
|
REPO htacg/tidy-html5
|
||||||
REF d1b906991a7587688d384b648c55731f9be52506
|
REF 5.8.0
|
||||||
SHA512 ac1229f95db9ab6367d7650e27b87e76a0874e01c9d404e8c5fb75ba2761318218b658a4f7522188fda8008974393a333a8a5fbed8e3a472c98445f13e459ad5
|
SHA512 f352165bdda5d1fca7bba3365560b64d6f70a4e010821cd246cde43bed5c23cea3408d461d3f889110fd35ec9b68aa2b4e95412b07775eb852b7ee1745007a44
|
||||||
HEAD_REF master
|
HEAD_REF master
|
||||||
|
PATCHES
|
||||||
|
disable-doc.patch
|
||||||
|
static-vs-shared.patch
|
||||||
|
debug-postfix.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIB)
|
||||||
vcpkg_cmake_configure(
|
vcpkg_cmake_configure(
|
||||||
SOURCE_PATH "${SOURCE_PATH}"
|
SOURCE_PATH "${SOURCE_PATH}"
|
||||||
NO_CHARSET_FLAG
|
NO_CHARSET_FLAG
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-DBUILD_SHARED_LIB=OFF
|
-DBUILD_SHARED_LIB=${BUILD_SHARED_LIB}
|
||||||
-DTIDY_CONSOLE_SHARED=OFF
|
-DTIDY_CONSOLE_SHARED=${BUILD_SHARED_LIB}
|
||||||
)
|
)
|
||||||
vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/libxslt")
|
|
||||||
vcpkg_cmake_install()
|
vcpkg_cmake_install()
|
||||||
|
vcpkg_copy_pdbs()
|
||||||
|
vcpkg_fixup_pkgconfig()
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
file(REMOVE_RECURSE
|
||||||
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
||||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/tidyd.exe")
|
"${CURRENT_PACKAGES_DIR}/debug/bin/tidyd${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
|
||||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/tidyd")
|
)
|
||||||
|
|
||||||
vcpkg_copy_tools(TOOL_NAMES tidy AUTO_CLEAN)
|
vcpkg_copy_tools(TOOL_NAMES tidy AUTO_CLEAN)
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
file(INSTALL "${SOURCE_PATH}/README/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
file(INSTALL "${SOURCE_PATH}/README/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
||||||
|
|
||||||
vcpkg_fixup_pkgconfig()
|
|
||||||
|
34
ports/tidy-html5/static-vs-shared.patch
Normal file
34
ports/tidy-html5/static-vs-shared.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index d2edac2..979ae25 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -395,11 +395,11 @@ endif ()
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
# Static Library
|
||||||
|
-# The static library always builds.
|
||||||
|
+if(NOT BUILD_SHARED_LIB)
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
set(name tidy-static)
|
||||||
|
add_library ( ${name} STATIC ${CFILES} ${HFILES} ${LIBHFILES} )
|
||||||
|
-if (WIN32)
|
||||||
|
+if (0)
|
||||||
|
set_target_properties( ${name} PROPERTIES
|
||||||
|
OUTPUT_NAME ${LIB_NAME}_static )
|
||||||
|
else ()
|
||||||
|
@@ -415,12 +415,14 @@ install(TARGETS ${name}
|
||||||
|
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
||||||
|
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||||
|
)
|
||||||
|
-install( FILES ${HFILES} DESTINATION ${INCLUDE_INSTALL_DIR} )
|
||||||
|
if(MSVC)
|
||||||
|
# install(FILES $<TARGET_PDB_FILE:${name}> DESTINATION lib OPTIONAL)
|
||||||
|
INSTALL(FILES ${PROJECT_BINARY_DIR}/${name}.dir/Debug/${name}.pdb
|
||||||
|
+ OPTIONAL
|
||||||
|
DESTINATION lib CONFIGURATIONS Debug )
|
||||||
|
endif()
|
||||||
|
+endif()
|
||||||
|
+install( FILES ${HFILES} DESTINATION ${INCLUDE_INSTALL_DIR} )
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
# Dynamic Library
|
@ -1,15 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "tidy-html5",
|
"name": "tidy-html5",
|
||||||
"version": "5.7.28",
|
"version": "5.8.0",
|
||||||
"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.",
|
"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",
|
"homepage": "https://www.html-tidy.org",
|
||||||
"license": null,
|
"license": null,
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
{
|
|
||||||
"name": "libxslt",
|
|
||||||
"host": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "vcpkg-cmake",
|
"name": "vcpkg-cmake",
|
||||||
"host": true
|
"host": true
|
||||||
|
@ -7033,8 +7033,8 @@
|
|||||||
"port-version": 0
|
"port-version": 0
|
||||||
},
|
},
|
||||||
"tidy-html5": {
|
"tidy-html5": {
|
||||||
"baseline": "5.7.28",
|
"baseline": "5.8.0",
|
||||||
"port-version": 6
|
"port-version": 0
|
||||||
},
|
},
|
||||||
"tiff": {
|
"tiff": {
|
||||||
"baseline": "4.4.0",
|
"baseline": "4.4.0",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "e16455cbec8214de37e3deb0ad41fe57323a7dd0",
|
||||||
|
"version": "5.8.0",
|
||||||
|
"port-version": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "2e4c85fc988591dc5b25baac22c4e83dde7b7f64",
|
"git-tree": "2e4c85fc988591dc5b25baac22c4e83dde7b7f64",
|
||||||
"version": "5.7.28",
|
"version": "5.7.28",
|
||||||
|
Loading…
Reference in New Issue
Block a user