[graphviz] Update to 7.0.0 (#27471)

* Update to 7.0.0

* Update versions
This commit is contained in:
Kai Pastor 2022-11-09 18:37:41 +01:00 committed by GitHub
parent e79c0d2b5d
commit ce4fb05591
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 156 additions and 134 deletions

View File

@ -1,94 +0,0 @@
diff --git a/cmake/FindCairo.cmake b/cmake/FindCairo.cmake
index dce05ea96..cbd879fee 100644
--- a/cmake/FindCairo.cmake
+++ b/cmake/FindCairo.cmake
@@ -1,6 +1,6 @@
include(FindPackageHandleStandardArgs)
-if (WIN32)
+if (false)
find_path(Cairo_INCLUDE_DIR cairo/cairo.h)
find_library(Cairo_LIBRARY NAMES cairo)
diff --git a/cmake/FindPangoCairo.cmake b/cmake/FindPangoCairo.cmake
index 0937e41ef..bb876ce46 100644
--- a/cmake/FindPangoCairo.cmake
+++ b/cmake/FindPangoCairo.cmake
@@ -1,6 +1,6 @@
include(FindPackageHandleStandardArgs)
-if (WIN32)
+if (false)
find_path(PangoCairo_INCLUDE_DIR pango/pangocairo.h PATH_SUFFIXES pango-1.0)
find_path(GLIB_INCLUDE_DIR glib.h PATH_SUFFIXES glib-2.0)
find_path(GLIBCONFIG_INCLUDE_DIR glibconfig.h PATH_SUFFIXES glib-2.0/include)
@@ -69,6 +69,9 @@ if (WIN32)
else()
find_package(PkgConfig)
pkg_check_modules(PangoCairo pangocairo)
+ list(REMOVE_ITEM PangoCairo_LINK_LIBRARIES ffi)
+ find_library(ACTUAL_FFI libffi PangoCairo_LIBRARY_DIRS)
+ list(APPEND PangoCairo_LINK_LIBRARIES ${ACTUAL_FFI})
# prior to CMake 3.12, PkgConfig does not set *_LINK_LIBRARIES, so do it
# manually
diff --git a/cmd/tools/CMakeLists.txt b/cmd/tools/CMakeLists.txt
index 8d7b88484..58f8d80fe 100644
--- a/cmd/tools/CMakeLists.txt
+++ b/cmd/tools/CMakeLists.txt
@@ -392,14 +392,14 @@ tool_defaults(sccmap)
# ===================== Install third party DLLs on Windows ====================
-if (WIN32 AND EXPAT_FOUND)
+if (false)
install(
FILES ${EXPAT_RUNTIME_LIBRARIES}
DESTINATION ${BINARY_INSTALL_DIR}
)
-endif(WIN32 AND EXPAT_FOUND)
+endif(false)
-if (WIN32)
+if (false)
install(
FILES ${Getopt_RUNTIME_LIBRARIES}
DESTINATION ${BINARY_INSTALL_DIR}
diff --git a/lib/common/CMakeLists.txt b/lib/common/CMakeLists.txt
index 144c442ae..fa56739b0 100644
--- a/lib/common/CMakeLists.txt
+++ b/lib/common/CMakeLists.txt
@@ -93,6 +93,7 @@ target_include_directories(common_obj PRIVATE
${GRAPHVIZ_LIB_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
+ ${EXPAT_INCLUDE_DIRS}
${GRAPHVIZ_LIB_DIR}/cdt
${GRAPHVIZ_LIB_DIR}/cgraph
${GRAPHVIZ_LIB_DIR}/gvc
diff --git a/lib/gvc/CMakeLists.txt b/lib/gvc/CMakeLists.txt
index 745841176..57e2dd32b 100644
--- a/lib/gvc/CMakeLists.txt
+++ b/lib/gvc/CMakeLists.txt
@@ -134,7 +134,7 @@ set_target_properties(gvc PROPERTIES
)
# Include DLLs with this library on Windows
-if (WIN32 AND EXPAT_FOUND)
+if (false)
install(
FILES
${EXPAT_RUNTIME_LIBRARIES}
diff --git a/plugin/gd/CMakeLists.txt b/plugin/gd/CMakeLists.txt
index fe7ed264d..dce635185 100644
--- a/plugin/gd/CMakeLists.txt
+++ b/plugin/gd/CMakeLists.txt
@@ -36,7 +36,7 @@ install(
)
# Include DLLs with this library on Windows
-if (WIN32)
+if (false)
install(
FILES
${GD_RUNTIME_LIBRARIES}

View File

@ -0,0 +1,61 @@
diff --git a/cmake/FindCAIRO.cmake b/cmake/FindCAIRO.cmake
index a92916e..799fa68 100644
--- a/cmake/FindCAIRO.cmake
+++ b/cmake/FindCAIRO.cmake
@@ -1,6 +1,6 @@
include(FindPackageHandleStandardArgs)
-if(WIN32)
+if(0)
find_path(CAIRO_INCLUDE_DIR cairo/cairo.h)
find_library(CAIRO_LIBRARY NAMES cairo)
diff --git a/cmake/FindGD.cmake b/cmake/FindGD.cmake
index d7e0cc9..2322fcd 100644
--- a/cmake/FindGD.cmake
+++ b/cmake/FindGD.cmake
@@ -1,3 +1,11 @@
+find_package(PkgConfig)
+pkg_check_modules(GD gdlib IMPORTED_TARGET)
+set(GD_LIBRARIES PkgConfig::GD)
+foreach(item IN ITEMS FONTCONFIG FREETYPE GIF JPEG PNG)
+ set(HAVE_GD_${item} 1)
+endforeach()
+return()
+
find_path(GD_INCLUDE_DIR gd.h)
find_library(GD_LIBRARY NAMES gd libgd)
find_program(GD_RUNTIME_LIBRARY libgd.dll)
diff --git a/cmake/FindLTDL.cmake b/cmake/FindLTDL.cmake
index a1ee8c2..08b7f50 100644
--- a/cmake/FindLTDL.cmake
+++ b/cmake/FindLTDL.cmake
@@ -16,3 +16,6 @@ mark_as_advanced(LTDL_INCLUDE_DIR LTDL_LIBRARY)
set(LTDL_INCLUDE_DIRS ${LTDL_INCLUDE_DIR})
set(LTDL_LIBRARIES ${LTDL_LIBRARY})
+if(CMAKE_DL_LIBS AND NOT BUILD_SHARED_LIBS)
+ set(LTDL_LIBRARIES "${LTDL_LIBRARIES};${CMAKE_DL_LIBS}")
+endif()
diff --git a/cmake/FindPANGOCAIRO.cmake b/cmake/FindPANGOCAIRO.cmake
index b92e5be..225589e 100644
--- a/cmake/FindPANGOCAIRO.cmake
+++ b/cmake/FindPANGOCAIRO.cmake
@@ -1,6 +1,6 @@
include(FindPackageHandleStandardArgs)
-if(WIN32)
+if(0)
find_path(PANGOCAIRO_INCLUDE_DIR pango/pangocairo.h PATH_SUFFIXES pango-1.0)
find_path(GLIB_INCLUDE_DIR glib.h PATH_SUFFIXES glib-2.0)
find_path(GLIBCONFIG_INCLUDE_DIR glibconfig.h
@@ -78,7 +78,8 @@ if(WIN32)
)
else()
find_package(PkgConfig)
- pkg_check_modules(PANGOCAIRO pangocairo)
+ pkg_check_modules(PANGOCAIRO pangocairo IMPORTED_TARGET)
+ set(PANGOCAIRO_LINK_LIBRARIES PkgConfig::PANGOCAIRO) # https://gitlab.kitware.com/cmake/cmake/-/issues/16154
find_package_handle_standard_args(PANGOCAIRO DEFAULT_MSG
PANGOCAIRO_INCLUDE_DIRS

View File

@ -1,38 +1,39 @@
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
vcpkg_from_gitlab(
GITLAB_URL https://gitlab.com
OUT_SOURCE_PATH SOURCE_PATH
REPO graphviz/graphviz
REF 2.49.1
SHA512 ac14303f67d0840b260c5f2f99c53049a1e444a963d31387ae7a44ffc24757bd44f1c40ddd3fdb6a8d0e0bb1dde0e15d320f613729fb631efd4f078fcb3a4f62
REF "${VERSION}"
SHA512 5872db8aefb9bebf6fea91dbe96759c42fa82dbe811238c7d6de8db5a0c6af77749083af60fc21f8e42c4fc159a2cbfefcc304967edda3d2832ef396c457530a
HEAD_REF main
PATCHES
0001-Fix-build.patch
fix-dependencies.patch
select-plugins.patch
)
if(VCPKG_TARGET_IS_OSX)
message("${PORT} currently requires the following libraries from the system package manager:\n libtool\n\nThey can be installed with brew install libtool")
elseif(VCPKG_TARGET_IS_LINUX)
message("${PORT} currently requires the following libraries from the system package manager:\n libtool\n\nThey can be installed with apt-get install libtool")
else()
endif()
vcpkg_list(SET OPTIONS)
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
vcpkg_download_distfile(
LTDL_H_PATH
URLS "https://gitlab.com/graphviz/graphviz-windows-dependencies/-/raw/141d3a21be904fa8dc2ae3ed01d36684db07a35d/${VCPKG_TARGET_ARCHITECTURE}/include/ltdl.h"
FILENAME ltdl.h
FILENAME graphviz-ltdl-141d3a21.h
SHA512 f2d20e849e35060536265f47014c40eb70e57dacd600a9db112fc465fbfa6a66217b44a8c3dc33039c260a27f09d9034b329b03cc28c32a22ec503fcd17b78cd
)
file(COPY ${LTDL_H_PATH} DESTINATION ${SOURCE_PATH}/lib/common)
set(EXTRA_CMAKE_OPTION "-DLTDL_INCLUDE_DIR=${SOURCE_PATH}/lib/common")
endif()
if(NOT VCPKG_TARGET_IS_WINDOWS)
set(EXTRA_CMAKE_OPTION "-DCMAKE_INSTALL_RPATH=${CURRENT_INSTALLED_DIR}/lib")
file(INSTALL "${LTDL_H_PATH}" DESTINATION "${SOURCE_PATH}/libltdl" RENAME ltdl.h)
vcpkg_list(APPEND OPTIONS "-DLTDL_INCLUDE_DIR=${SOURCE_PATH}/libltdl")
endif()
if(VCPKG_HOST_IS_WINDOWS)
vcpkg_acquire_msys(MSYS_ROOT PACKAGES gawk)
vcpkg_add_to_path("${MSYS_ROOT}/usr/bin")
unset(ENV{MSYSTEM_PREFIX})
endif()
vcpkg_find_acquire_program(BISON)
@ -44,36 +45,57 @@ vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
"-DVERSION=${VERSION}"
"-DBISON_EXECUTABLE=${BISON}"
"-DFLEX_EXECUTABLE=${FLEX}"
"-DGIT_EXECUTABLE=${GIT}"
"-DGIT=${GIT}"
"-DPython3_EXECUTABLE=${PYTHON3}"
"-DPKG_CONFIG_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/pkgconf/pkgconf"
${EXTRA_CMAKE_OPTION}
-Dinstall_win_dependency_dlls=OFF
-Duse_win_pre_inst_libs=OFF
-Dwith_smyrna=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_ANN=ON
-DCMAKE_REQUIRE_FIND_PACKAGE_CAIRO=ON
-DCMAKE_REQUIRE_FIND_PACKAGE_EXPAT=ON
-DCMAKE_REQUIRE_FIND_PACKAGE_GD=ON
-DCMAKE_REQUIRE_FIND_PACKAGE_LTDL=ON
-DCMAKE_REQUIRE_FIND_PACKAGE_PANGOCAIRO=ON
${OPTIONS}
MAYBE_UNUSED_VARIABLES
install_win_dependency_dlls
)
vcpkg_cmake_install(ADD_BIN_TO_PATH)
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/share/man"
)
vcpkg_cmake_install()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
foreach(script_or_link IN ITEMS "dot2gxl${VCPKG_TARGET_EXECUTABLE_SUFFIX}" gvmap.sh)
if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/${script_or_link}")
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/${script_or_link}" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/${script_or_link}")
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${script_or_link}")
endif()
endforeach()
vcpkg_copy_tools(
TOOL_NAMES acyclic bcomps ccomps circo dijkstra dot fdp gc gml2gv graphml2gv gv2gml gvcolor gvgen gvpack gvpr gxl2gv mm2gv neato nop osage patchwork sccmap sfdp tred twopi unflatten
TOOL_NAMES acyclic bcomps ccomps circo diffimg dijkstra dot edgepaint fdp gc gml2gv graphml2gv gv2gml gvcolor gvgen gvmap gvpack gvpr gxl2gv mm2gv neato nop osage patchwork sccmap sfdp tred twopi unflatten
AUTO_CLEAN
)
if(VCPKG_TARGET_IS_WINDOWS)
file(GLOB PLUGINS "${CURRENT_PACKAGES_DIR}/bin/gvplugin_*")
file(COPY ${PLUGINS} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
vcpkg_execute_required_process(
COMMAND dot -c
WORKING_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}"
LOGNAME configure-plugins
file(GLOB plugin_config "${CURRENT_PACKAGES_DIR}/lib/graphviz/config*" "${CURRENT_PACKAGES_DIR}/bin/config*")
if(NOT plugin_config)
message(WARNING
"In order to create the plugin configuration file, "
"you must run `dot -c` on the target system."
)
file(COPY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/config6" DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
endif()
# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
if(VCPKG_TARGET_IS_WINDOWS)
file(GLOB plugins "${CURRENT_PACKAGES_DIR}/bin/gvplugin_*")
file(COPY ${plugins} ${plugin_config} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
endif()
vcpkg_fixup_pkgconfig()
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -0,0 +1,16 @@
diff --git a/plugin/CMakeLists.txt b/plugin/CMakeLists.txt
index 6f40f27..420ad0f 100644
--- a/plugin/CMakeLists.txt
+++ b/plugin/CMakeLists.txt
@@ -1,4 +1,11 @@
add_subdirectory(core)
+add_subdirectory(dot_layout)
+add_subdirectory(gdiplus)
+add_subdirectory(neato_layout)
+add_subdirectory(pango)
+add_subdirectory(quartz)
+add_subdirectory(gd)
+return()
add_subdirectory(devil)
add_subdirectory(dot_layout)
add_subdirectory(gd)

View File

@ -1,16 +1,27 @@
{
"name": "graphviz",
"version-semver": "2.49.1",
"port-version": 4,
"version-semver": "7.0.0",
"description": "Graph Visualization Tools",
"homepage": "https://graphviz.org/",
"license": "EPL-1.0",
"supports": "!(windows & arm64)",
"supports": "!staticcrt",
"dependencies": [
"cairo",
{
"name": "cairo",
"default-features": false
},
"getopt",
"libffi",
"libgd",
{
"name": "libgd",
"default-features": false,
"features": [
"fontconfig",
"freetype",
"jpeg",
"png",
"tiff"
]
},
"pango",
{
"name": "pkgconf",
@ -19,6 +30,7 @@
{
"name": "vcpkg-cmake",
"host": true
}
},
"zlib"
]
}

View File

@ -2753,8 +2753,8 @@
"port-version": 4
},
"graphviz": {
"baseline": "2.49.1",
"port-version": 4
"baseline": "7.0.0",
"port-version": 0
},
"greatest": {
"baseline": "1.5.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b726ae0118ef489c3588be36c8542274c1233a05",
"version-semver": "7.0.0",
"port-version": 0
},
{
"git-tree": "14f5333a2eb91b052b2691132f48aefced3bf1df",
"version-semver": "2.49.1",