mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 03:10:57 +08:00
[graphviz] new port (#20564)
* Add graphviz * Address bot feedback * Add python3 dep and fix pkgconf var * Acquire python3 program * Specify python3 executable * Move bison earlier in path * Add bison executable as var * Add other deps as var * Fix formatting * Apply suggestions from code review Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com> * Update to 2.49.1 Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
This commit is contained in:
parent
193880f0a8
commit
e1f8d3a5f4
94
ports/graphviz/0001-Fix-build.patch
Normal file
94
ports/graphviz/0001-Fix-build.patch
Normal file
@ -0,0 +1,94 @@
|
||||
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}
|
44
ports/graphviz/portfile.cmake
Normal file
44
ports/graphviz/portfile.cmake
Normal file
@ -0,0 +1,44 @@
|
||||
vcpkg_from_gitlab(
|
||||
GITLAB_URL https://gitlab.com
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO graphviz/graphviz
|
||||
REF 2.49.1
|
||||
SHA512 ac14303f67d0840b260c5f2f99c53049a1e444a963d31387ae7a44ffc24757bd44f1c40ddd3fdb6a8d0e0bb1dde0e15d320f613729fb631efd4f078fcb3a4f62
|
||||
HEAD_REF main
|
||||
PATCHES
|
||||
0001-Fix-build.patch
|
||||
)
|
||||
|
||||
vcpkg_acquire_msys(MSYS_ROOT PACKAGES gawk)
|
||||
vcpkg_add_to_path("${MSYS_ROOT}/usr/bin")
|
||||
|
||||
vcpkg_find_acquire_program(BISON)
|
||||
vcpkg_find_acquire_program(FLEX)
|
||||
vcpkg_find_acquire_program(GIT)
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
|
||||
DISABLE_PARALLEL_CONFIGURE
|
||||
OPTIONS
|
||||
-DBISON_EXECUTABLE=${BISON}
|
||||
-DFLEX_EXECUTABLE=${FLEX}
|
||||
-DGIT_EXECUTABLE=${GIT}
|
||||
-DPython3_EXECUTABLE=${PYTHON3}
|
||||
-DPKG_CONFIG_EXECUTABLE=${CURRENT_INSTALLED_DIR}/tools/pkgconf/pkgconf
|
||||
-Denable_ltdl=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
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
|
||||
AUTO_CLEAN
|
||||
)
|
||||
|
||||
# # Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
18
ports/graphviz/vcpkg.json
Normal file
18
ports/graphviz/vcpkg.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "graphviz",
|
||||
"version-semver": "2.49.1",
|
||||
"description": "Graph Visualization Tools",
|
||||
"homepage": "https://graphviz.org/",
|
||||
"dependencies": [
|
||||
"cairo",
|
||||
"getopt",
|
||||
"libffi",
|
||||
"libgd",
|
||||
"pango",
|
||||
"pkgconf",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
@ -2524,6 +2524,10 @@
|
||||
"baseline": "0.7.0",
|
||||
"port-version": 2
|
||||
},
|
||||
"graphviz": {
|
||||
"baseline": "2.49.1",
|
||||
"port-version": 0
|
||||
},
|
||||
"greatest": {
|
||||
"baseline": "1.5.0",
|
||||
"port-version": 0
|
||||
|
9
versions/g-/graphviz.json
Normal file
9
versions/g-/graphviz.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "3d90393fc2bdb3a481e1a371fbbb8e816d0317b6",
|
||||
"version-semver": "2.49.1",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user