Skip to content

Commit

Permalink
chore: Bump Versions
Browse files Browse the repository at this point in the history
GraphViz 10.0.1

Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
  • Loading branch information
GordonSmith committed Feb 11, 2024
1 parent 749ade3 commit 5a737d9
Show file tree
Hide file tree
Showing 10 changed files with 407 additions and 253 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
/tmp
/types
/wasi-sdk*
/wit-bindgen
/vcpkg
.coveralls.yml
*.tsbuildinfo
12 changes: 11 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,24 @@
}
},
{
"name": "vcpkg-emscripten-debug",
"name": "vcpkg-emscripten-Debug",
"inherits": [
"vcpkg-emscripten"
],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "vcpkg-emscripten-MinSizeRel",
"inherits": [
"vcpkg-emscripten"
],
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "MinSizeRel"
}
}
]
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
This repository contains a collection of useful c++ libraries compiled to WASM for (re)use in Node JS, Web Browsers and JavaScript Libraries:
- [base91](https://base91.sourceforge.net/) - v0.6.0
- [expat](https://libexpat.github.io/) - v2.5.0
- [graphviz](https://www.graphviz.org/) - v10.0.0-dev.0
- [graphviz](https://www.graphviz.org/) - v10.0.1
- [zstd](https://github.com/facebook/zstd) - v1.5.5
- ...more to follow...

Built with:
- [emsdk](https://github.com/emscripten-core/emsdk) - v3.1.52
- [emsdk](https://github.com/emscripten-core/emsdk) - v3.1.53

## Homepage and Documents

Expand Down
445 changes: 232 additions & 213 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"install-vcpkg:linux": "./scripts/cpp-install-vcpkg.sh",
"install-vcpkg:win32": "wsl -e ./scripts/cpp-install-vcpkg.sh",
"install-build-deps": "run-s install-emsdk install-vcpkg",
"uninstall-build-deps": "rimraf ./emsdk ./vcpkg ./src-expat ./src-vcpkg",
"uninstall-build-deps": "rimraf ./emsdk ./vcpkg ./src-expat ./src-vcpkg ./wasi-sdk ./wit-bindgen",
"clean-build": "rimraf .nyc_output bin build coverage dist* lib* output-* tmp types *.tsbuildinfo vcpkg/vcpkg",
"clean-docs": "rimraf docs/.vitepress/dist docs/classes docs/interfaces docs/modules docs/.nojekyll docs/README.md",
"clean": "run-p clean-build clean-docs",
Expand Down Expand Up @@ -133,12 +133,12 @@
"@types/chai": "4.3.11",
"@types/emscripten": "1.39.10",
"@types/mocha": "10.0.6",
"@types/node": "20.11.6",
"@types/node": "20.11.17",
"@types/yargs": "17.0.32",
"@typescript-eslint/eslint-plugin": "6.19.1",
"@typescript-eslint/parser": "6.19.1",
"assemblyscript": "0.27.23",
"chai": "5.0.0",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
"assemblyscript": "0.27.24",
"chai": "5.0.3",
"coveralls": "3.1.1",
"eslint": "8.56.0",
"fzstd": "0.1.0",
Expand All @@ -149,19 +149,19 @@
"karma-mocha": "2.0.1",
"karma-spec-reporter": "0.0.36",
"local-web-server": "5.3.1",
"mocha": "10.2.0",
"mocha": "10.3.0",
"npm-run-all": "4.1.5",
"nyc": "15.1.0",
"rimraf": "5.0.5",
"rollup": "4.9.6",
"rollup": "4.10.0",
"rollup-plugin-sourcemaps": "0.6.3",
"run-script-os": "1.1.6",
"standard-version": "9.5.0",
"tslib": "2.6.2",
"typedoc": "0.25.7",
"typedoc": "0.25.8",
"typedoc-plugin-markdown": "3.17.1",
"typescript": "5.3.3",
"vitepress": "1.0.0-rc.40"
"vitepress": "1.0.0-rc.42"
},
"repository": {
"type": "git",
Expand All @@ -174,4 +174,4 @@
"url": "https://github.com/hpcc-systems/hpcc-js-wasm/issues"
},
"homepage": "https://hpcc-systems.github.io/hpcc-js-wasm/"
}
}
2 changes: 1 addition & 1 deletion scripts/cpp-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
source ./emsdk/emsdk_env.sh
if [ ! -d "./build" ]
then
cmake -S . -B ./build --preset vcpkg-emscripten
cmake -S . -B ./build --preset vcpkg-emscripten-MinSizeRel
fi

cmake --build ./build --parallel
2 changes: 1 addition & 1 deletion scripts/cpp-install-emsdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# List of current vertsion can be found in https://github.com/emscripten-core/emsdk/tags ---
# UPDATE README.md
VERSION=3.1.52
VERSION=3.1.53

if [ ! -d "./emsdk" ]
then
Expand Down
1 change: 1 addition & 0 deletions src-cpp/graphviz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ add_graphviz_library(pack)
add_graphviz_library(sparse)
add_graphviz_library(pathplan)
add_graphviz_library(xdot)
add_graphviz_library(vpsc)

target_link_libraries(graphvizlib PRIVATE
${EXPAT_LIBRARIES}
Expand Down
160 changes: 138 additions & 22 deletions vcpkg-overlays/graphviz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,25 @@ project(Graphviz)
include(FeatureSummary)

# =============================== Build options ================================
option(enable_ltdl "Support on-demand plugin loading" OFF )
option(with_expat "Support HTML-like labels through expat" ON )
set(enable_ltdl AUTO CACHE STRING "Support on-demand plugin loading")
set_property(CACHE enable_ltdl PROPERTY STRINGS AUTO ON OFF)
set(with_expat AUTO CACHE STRING "Support HTML-like labels through expat")
set_property(CACHE with_expat PROPERTY STRINGS AUTO ON OFF)
option(with_digcola "DIGCOLA features in neato layout engine" ON )
option(with_gvedit "GVEdit interactive graph editor" OFF )
option(with_ipsepcola "IPSEPCOLA features in neato layout engine (disabled by default - C++ portability issues)." OFF )
set(with_gvedit AUTO CACHE STRING "GVEdit interactive graph editor")
set_property(CACHE with_gvedit PROPERTY STRINGS AUTO ON OFF)
option(with_ipsepcola "IPSEPCOLA features in neato layout engine" ON )
option(with_ortho "ORTHO features in neato layout engine." ON )
option(with_sfdp "sfdp layout engine." ON )
option(with_smyrna "SMYRNA large graph viewer (disabled by default - experimental)" OFF )
option(with_zlib "Support raster image compression through zlib" OFF )
set(with_smyrna AUTO CACHE STRING "SMYRNA large graph viewer")
set_property(CACHE with_smyrna PROPERTY STRINGS AUTO ON OFF)
set(with_zlib AUTO CACHE STRING "Support raster image compression through zlib")
set_property(CACHE with_zlib PROPERTY STRINGS AUTO ON OFF)
option(use_coverage "enables analyzing code coverage" OFF )
option(with_cxx_api "enables building the C++ API" OFF )
option(with_cxx_tests "enables building the C++ tests" OFF )
option(use_win_pre_inst_libs "enables building using pre-installed Windows libraries" OFF )
option(use_win_pre_inst_libs "enables building using pre-installed Windows libraries" ON)
option(BUILD_SHARED_LIBS "Build in shared lib mode" ON)

if(WIN32)
# Build dynamic-link libraries on Windows, including MinGW. The
Expand Down Expand Up @@ -108,23 +114,107 @@ endif()
find_package(ANN)
find_package(CAIRO)

if(with_expat)
if(NOT with_expat STREQUAL "OFF")
find_package(EXPAT)
if(with_expat STREQUAL "AUTO")
if(EXPAT_FOUND)
message(STATUS "setting -Dwith_expat=ON")
set(with_expat ON)
else()
message(STATUS "setting -Dwith_expat=OFF")
set(with_expat OFF)
endif()
elseif(NOT EXPAT_FOUND)
message(FATAL_ERROR "-Dwith_expat=ON and expat not found")
endif()
endif()

if(NOT with_smyrna STREQUAL "OFF")
find_package(Freetype)
find_package(GLUT)
find_package(GTK2)
find_package(PkgConfig)
if(PkgConfig_FOUND)
pkg_check_modules(FONTCONFIG fontconfig)
pkg_check_modules(GTKGLEXT gtkglext-1.0)
pkg_check_modules(GTS gts)
pkg_check_modules(XRENDER xrender)
endif()
if(Freetype_FOUND AND GLUT_FOUND AND GTK2_FOUND AND FONTCONFIG_FOUND AND
GTKGLEXT_FOUND AND GTS_FOUND AND XRENDER_FOUND)
if(with_smyrna STREQUAL "AUTO")
message(STATUS "setting -Dwith_smyrna=ON")
set(with_smyrna ON)
endif()
else()
if(with_smyrna STREQUAL "AUTO")
message(STATUS "setting -Dwith_smyrna=OFF")
set(with_smyrna OFF)
else()
message(FATAL_ERROR "-Dwith_smyrna=ON and dependencies not found")
endif()
endif()
endif()

find_package(GD)
find_package(GS)
find_package(GTS)

if(enable_ltdl)
if(NOT enable_ltdl STREQUAL "OFF")
find_package(LTDL)
if(LTDL_FOUND)
add_definitions(-DENABLE_LTDL)
if(enable_ltdl STREQUAL "AUTO")
if(LTDL_FOUND)
message(STATUS "setting -Denable_ltdl=ON")
set(enable_ltdl ON)
else()
message(STATUS "setting -Denable_ltdl=OFF")
set(enable_ltdl OFF)
endif()
elseif(NOT LTDL_FOUND)
message(FATAL_ERROR "-Denable_ltdl=ON and ltdl not found")
endif()
endif()
if(enable_ltdl)
add_definitions(-DENABLE_LTDL)
endif()

find_package(DevIL)
find_package(Freetype)
find_package(PANGOCAIRO)
find_package(PkgConfig)
if(PkgConfig_FOUND)
pkg_check_modules(GDK gdk-2.0)
pkg_check_modules(GDK_PIXBUF gdk-pixbuf-2.0)
pkg_check_modules(LASI lasi)
pkg_check_modules(POPPLER poppler-glib)
pkg_check_modules(RSVG librsvg-2.0)
pkg_check_modules(WEBP libwebp)
pkg_check_modules(X11 x11)
pkg_check_modules(XRENDER xrender)
else()
set(GDK_FOUND 0)
set(GDK_PIXBUF_FOUND 0)
set(LASI_FOUND 0)
set(POPPLER_FOUND 0)
set(RSVG_FOUND 0)
set(WEBP_FOUND 0)
set(X11_FOUND 0)
set(XRENDER_FOUND 0)
endif()

if(with_zlib)
if(NOT with_zlib STREQUAL "OFF")
find_package(ZLIB)
if(with_zlib STREQUAL "AUTO")
if(ZLIB_FOUND)
message(STATUS "setting -Dwith_zlib=ON")
set(with_zlib ON)
else()
message(STATUS "setting -Dwith_zlib=OFF")
set(with_zlib OFF)
endif()
elseif(NOT ZLIB_FOUND)
message(FATAL_ERROR "-Dwith_zlib=ON and zlib not found")
endif()
endif()

if(UNIX)
Expand All @@ -136,7 +226,9 @@ if(WIN32)
# Find Windows specific dependencies

# Find DLLs on Windows
find_program(EXPAT_RUNTIME_LIBRARIES NAMES libexpat.dll expat.dll msys-expat-1.dll)
if(with_expat)
find_program(EXPAT_RUNTIME_LIBRARIES NAMES libexpat.dll expat.dll msys-expat-1.dll)
endif()
if(CMAKE_CL_64)
find_program(MSYS_RUNTIME_LIBRARIES NAMES msys-2.0.dll)
endif()
Expand Down Expand Up @@ -220,6 +312,16 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

# enable LTO in release builds
include(CheckIPOSupported)
check_ipo_supported(RESULT HAVE_IPO)
if(CMAKE_BUILD_TYPE STREQUAL "Release" OR
CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
if(HAVE_IPO)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
endif()
endif()

if(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
# MSVC warning C4996 mostly fires on completely valid code. The changes
# proposed in the warning text often seriously compromise the code
Expand All @@ -232,6 +334,19 @@ else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
endif()
include(CheckCCompilerFlag)
check_c_compiler_flag(-Wformat-overflow=2 HAVE_C_WFORMAT_OVERFLOW_2)
if(HAVE_C_WFORMAT_OVERFLOW_2)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat-overflow=2")
endif()
check_c_compiler_flag(-Wshadow HAVE_C_WSHADOW)
if(HAVE_C_WSHADOW)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wshadow")
endif()
check_c_compiler_flag(-Wundef HAVE_C_WUNDEF)
if(HAVE_C_WUNDEF)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wundef")
endif()

if(use_coverage)
add_compile_options("-coverage")
Expand All @@ -258,6 +373,7 @@ if(with_cxx_tests)
# add_subdirectory(tests)
endif()

# === hpcc-js-wasm ===
add_library(graphviz INTERFACE)

target_include_directories(graphviz
Expand All @@ -267,26 +383,26 @@ target_include_directories(graphviz
)

install(
TARGETS common gvplugin_core gvplugin_dot_layout gvplugin_neato_layout ortho gvc cdt cgraph dotgen neatogen fdpgen sfdpgen twopigen circogen label osage patchwork pack sparse pathplan xdot
TARGETS common gvplugin_core gvplugin_dot_layout gvplugin_neato_layout ortho gvc cdt cgraph dotgen neatogen fdpgen sfdpgen twopigen circogen label osage patchwork pack sparse pathplan xdot vpsc
RUNTIME DESTINATION ${BINARY_INSTALL_DIR}
LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR}
ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR}
)
# === hpcc-js-wasm ===

MATH(EXPR GRAPHVIZ_PLUGIN_VERSION "${GRAPHVIZ_PLUGIN_VERSION}+1")
set(GVPLUGIN_VERSION "${GRAPHVIZ_PLUGIN_VERSION}")
set(VERSION "${GRAPHVIZ_VERSION_STRING}")
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "${CMAKE_INSTALL_PREFIX}")
set(PACKAGE "graphviz")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/cdt/libcdt.pc.in ${CMAKE_CURRENT_SOURCE_DIR}/libcdt.pc @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/cgraph/libcgraph.pc.in ${CMAKE_CURRENT_SOURCE_DIR}/libcgraph.pc @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/gvc/libgvc.pc.in ${CMAKE_CURRENT_SOURCE_DIR}/libgvc.pc @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/gvpr/libgvpr.pc.in ${CMAKE_CURRENT_SOURCE_DIR}/libgvpr.pc @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/edgepaint/liblab_gamut.pc.in ${CMAKE_CURRENT_SOURCE_DIR}/liblab_gamut.pc @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/pathplan/libpathplan.pc.in ${CMAKE_CURRENT_SOURCE_DIR}/libpathplan.pc @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/xdot/libxdot.pc.in ${CMAKE_CURRENT_SOURCE_DIR}/libxdot.pc @ONLY)
file(GLOB pcfiles "${CMAKE_CURRENT_SOURCE_DIR}/*.pc")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/cdt/libcdt.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libcdt.pc @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/cgraph/libcgraph.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libcgraph.pc @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/gvc/libgvc.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libgvc.pc @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/gvpr/libgvpr.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libgvpr.pc @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/pathplan/libpathplan.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libpathplan.pc @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib/xdot/libxdot.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libxdot.pc @ONLY)
file(GLOB pcfiles "${CMAKE_CURRENT_BINARY_DIR}/*.pc")
foreach(file "${pcfiles}")
install(FILES ${file} DESTINATION "${PKGCONFIG_DIR}")
endforeach(file)
Expand Down
11 changes: 9 additions & 2 deletions vcpkg-overlays/graphviz/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ vcpkg_from_gitlab(
GITLAB_URL https://gitlab.com
OUT_SOURCE_PATH SOURCE_PATH
REPO graphviz/graphviz
REF 1cfb01454ca543f307c33bd8c34f20ee2004ddb6
SHA512 7ec8e8fd7ea0fece8f65d217cee84ea6081844a941716c8182ad5a8c5c95fc627cbef1e0164eecc322626247e8eb839cd6d4246e193c70ecb4d909bca49779bf
REF 1c6cb9d3de553bd3e3caeea9a61ebe04034d07ee
SHA512 8cee6e7b403c2516d4fd17b9806fa96b46e0791368b8411fa6245e5c30b680fc4e22c4ef59d6d56aaa0dfa449d356a59d4c712e250259ca049c0ceeb1f89b943
HEAD_REF main
)

Expand All @@ -12,6 +12,13 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-Denable_ltdl=OFF
-Dwith_gvedit=OFF
-Dwith_smyrna=OFF
-Dwith_zlib=OFF
-Duse_win_pre_inst_libs=OFF
-DBUILD_SHARED_LIBS=OFF
)
vcpkg_cmake_install()
# vcpkg_cmake_config_fixup(PACKAGE_NAME "graphviz" CONFIG_PATH "share/cmake/graphviz")
Expand Down

0 comments on commit 5a737d9

Please sign in to comment.