mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
8325570: Update to Graphviz 9.0.0
Reviewed-by: erikj, pminborg, ihse, mchung, iris
This commit is contained in:
@@ -92,6 +92,8 @@ id="toc-build-tools-requirements">Build Tools Requirements</a>
|
|||||||
<li><a href="#autoconf" id="toc-autoconf">Autoconf</a></li>
|
<li><a href="#autoconf" id="toc-autoconf">Autoconf</a></li>
|
||||||
<li><a href="#gnu-make" id="toc-gnu-make">GNU Make</a></li>
|
<li><a href="#gnu-make" id="toc-gnu-make">GNU Make</a></li>
|
||||||
<li><a href="#gnu-bash" id="toc-gnu-bash">GNU Bash</a></li>
|
<li><a href="#gnu-bash" id="toc-gnu-bash">GNU Bash</a></li>
|
||||||
|
<li><a href="#graphviz-and-pandoc" id="toc-graphviz-and-pandoc">Graphviz
|
||||||
|
and Pandoc</a></li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
<li><a href="#running-configure" id="toc-running-configure">Running
|
<li><a href="#running-configure" id="toc-running-configure">Running
|
||||||
Configure</a>
|
Configure</a>
|
||||||
@@ -862,6 +864,13 @@ e.g. <code>configure MAKE=/opt/gnu/make</code>.</p>
|
|||||||
href="https://www.gnu.org/software/bash">GNU Bash</a>. No other shells
|
href="https://www.gnu.org/software/bash">GNU Bash</a>. No other shells
|
||||||
are supported.</p>
|
are supported.</p>
|
||||||
<p>At least version 3.2 of GNU Bash must be used.</p>
|
<p>At least version 3.2 of GNU Bash must be used.</p>
|
||||||
|
<h3 id="graphviz-and-pandoc">Graphviz and Pandoc</h3>
|
||||||
|
<p>In order to build the full docs (see the
|
||||||
|
<code>--enable-full-docs</code> configure option) <a
|
||||||
|
href="https://www.graphviz.org">Graphviz</a> and <a
|
||||||
|
href="https://pandoc.org">Pandoc</a> are required. Any recent versions
|
||||||
|
should work. For reference, and subject to change, Oracle builds use
|
||||||
|
Graphviz 9.0.0 and Pandoc 2.19.2.</p>
|
||||||
<h2 id="running-configure">Running Configure</h2>
|
<h2 id="running-configure">Running Configure</h2>
|
||||||
<p>To build the JDK, you need a "configuration", which consists of a
|
<p>To build the JDK, you need a "configuration", which consists of a
|
||||||
directory where to store the build output, coupled with information
|
directory where to store the build output, coupled with information
|
||||||
|
|||||||
@@ -685,6 +685,14 @@ shells are supported.
|
|||||||
|
|
||||||
At least version 3.2 of GNU Bash must be used.
|
At least version 3.2 of GNU Bash must be used.
|
||||||
|
|
||||||
|
### Graphviz and Pandoc
|
||||||
|
|
||||||
|
In order to build the full docs (see the `--enable-full-docs`
|
||||||
|
configure option) [Graphviz](https://www.graphviz.org) and
|
||||||
|
[Pandoc](https://pandoc.org) are required. Any recent versions should
|
||||||
|
work. For reference, and subject to change, Oracle builds use Graphviz
|
||||||
|
9.0.0 and Pandoc 2.19.2.
|
||||||
|
|
||||||
## Running Configure
|
## Running Configure
|
||||||
|
|
||||||
To build the JDK, you need a "configuration", which consists of a directory
|
To build the JDK, you need a "configuration", which consists of a directory
|
||||||
|
|||||||
@@ -441,7 +441,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
|||||||
"macosx-x64": {
|
"macosx-x64": {
|
||||||
target_os: "macosx",
|
target_os: "macosx",
|
||||||
target_cpu: "x64",
|
target_cpu: "x64",
|
||||||
dependencies: ["devkit", "gtest", "pandoc"],
|
dependencies: ["devkit", "gtest", "graphviz", "pandoc"],
|
||||||
configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
|
configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
|
||||||
"--with-macosx-version-max=11.00.00",
|
"--with-macosx-version-max=11.00.00",
|
||||||
"--enable-compatible-cds-alignment",
|
"--enable-compatible-cds-alignment",
|
||||||
@@ -453,7 +453,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
|||||||
"macosx-aarch64": {
|
"macosx-aarch64": {
|
||||||
target_os: "macosx",
|
target_os: "macosx",
|
||||||
target_cpu: "aarch64",
|
target_cpu: "aarch64",
|
||||||
dependencies: ["devkit", "gtest", "pandoc"],
|
dependencies: ["devkit", "gtest", "graphviz", "pandoc"],
|
||||||
configure_args: concat(common.configure_args_64bit,
|
configure_args: concat(common.configure_args_64bit,
|
||||||
"--with-macosx-version-max=11.00.00"),
|
"--with-macosx-version-max=11.00.00"),
|
||||||
},
|
},
|
||||||
@@ -486,7 +486,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
|||||||
"linux-aarch64": {
|
"linux-aarch64": {
|
||||||
target_os: "linux",
|
target_os: "linux",
|
||||||
target_cpu: "aarch64",
|
target_cpu: "aarch64",
|
||||||
dependencies: ["devkit", "gtest", "build_devkit", "pandoc"],
|
dependencies: ["devkit", "gtest", "build_devkit", "graphviz", "pandoc"],
|
||||||
configure_args: [
|
configure_args: [
|
||||||
"--with-zlib=system",
|
"--with-zlib=system",
|
||||||
"--disable-dtrace",
|
"--disable-dtrace",
|
||||||
@@ -1237,7 +1237,7 @@ var getJibProfilesDependencies = function (input, common) {
|
|||||||
graphviz: {
|
graphviz: {
|
||||||
organization: common.organization,
|
organization: common.organization,
|
||||||
ext: "tar.gz",
|
ext: "tar.gz",
|
||||||
revision: "2.38.0-1+1.1",
|
revision: "9.0.0+1.0",
|
||||||
module: "graphviz-" + input.target_platform,
|
module: "graphviz-" + input.target_platform,
|
||||||
configure_args: "DOT=" + input.get("graphviz", "install_path") + "/dot",
|
configure_args: "DOT=" + input.get("graphviz", "install_path") + "/dot",
|
||||||
environment_path: input.get("graphviz", "install_path")
|
environment_path: input.get("graphviz", "install_path")
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -26,38 +26,106 @@
|
|||||||
# Create a bundle in the current directory, containing what's needed to run
|
# Create a bundle in the current directory, containing what's needed to run
|
||||||
# the 'dot' program from the graphviz suite by the OpenJDK build.
|
# the 'dot' program from the graphviz suite by the OpenJDK build.
|
||||||
|
|
||||||
TMPDIR=`mktemp -d -t graphvizbundle-XXXX`
|
set -eux
|
||||||
trap "rm -rf \"$TMPDIR\"" EXIT
|
|
||||||
|
|
||||||
ORIG_DIR=`pwd`
|
mydir="$(cd -- $(dirname ${BASH_SOURCE[0]}) && pwd)"
|
||||||
cd "$TMPDIR"
|
me="${mydir}/$(basename ${BASH_SOURCE[0]})"
|
||||||
GRAPHVIZ_VERSION=2.38.0-1
|
|
||||||
PACKAGE_VERSION=1.1
|
|
||||||
TARGET_PLATFORM=linux_x64
|
|
||||||
BUNDLE_NAME=graphviz-$TARGET_PLATFORM-$GRAPHVIZ_VERSION+$PACKAGE_VERSION.tar.gz
|
|
||||||
wget http://www.graphviz.org/pub/graphviz/stable/redhat/el6/x86_64/os/graphviz-$GRAPHVIZ_VERSION.el6.x86_64.rpm
|
|
||||||
wget http://www.graphviz.org/pub/graphviz/stable/redhat/el6/x86_64/os/graphviz-libs-$GRAPHVIZ_VERSION.el6.x86_64.rpm
|
|
||||||
wget http://www.graphviz.org/pub/graphviz/stable/redhat/el6/x86_64/os/graphviz-plugins-core-$GRAPHVIZ_VERSION.el6.x86_64.rpm
|
|
||||||
wget http://www.graphviz.org/pub/graphviz/stable/redhat/el6/x86_64/os/graphviz-plugins-x-$GRAPHVIZ_VERSION.el6.x86_64.rpm
|
|
||||||
wget http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/getPackage/libtool-ltdl-2.2.6-15.5.el6.x86_64.rpm
|
|
||||||
|
|
||||||
mkdir graphviz
|
EXPAT_VERSION="2.6.0"
|
||||||
cd graphviz
|
EXPAT_URL="https://github.com/libexpat/libexpat/releases/download/R_${EXPAT_VERSION//./_}/expat-${EXPAT_VERSION}.tar.gz"
|
||||||
for rpm in ../*.rpm; do
|
EXPAT_SHA256="a13447b9aa67d7c860783fdf6820f33ebdea996900d6d8bbc50a628f55f099f7"
|
||||||
rpm2cpio $rpm | cpio --extract --make-directories
|
|
||||||
done
|
|
||||||
|
|
||||||
cat > dot << EOF
|
GRAPHVIZ_VERSION="9.0.0"
|
||||||
|
GRAPHVIZ_URL="https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/${GRAPHVIZ_VERSION}/graphviz-${GRAPHVIZ_VERSION}.tar.xz"
|
||||||
|
GRAPHVIZ_SHA256="6c9afda06a732af7658c2619ee713d2545818c3ff19b7b8fd48effcd06d57bf6"
|
||||||
|
|
||||||
|
uname_s="$(uname -s)"
|
||||||
|
case ${uname_s} in
|
||||||
|
Linux)
|
||||||
|
bundle_os="linux"
|
||||||
|
shacmd="sha256sum --strict --check -"
|
||||||
|
lib_path_var="LD_LIBRARY_PATH"
|
||||||
|
;;
|
||||||
|
Darwin)
|
||||||
|
bundle_os="macosx"
|
||||||
|
shacmd="shasum -a 256 --strict --check -"
|
||||||
|
lib_path_var="DYLD_LIBRARY_PATH"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown OS: ${uname_s}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
uname_m="$(uname -m)"
|
||||||
|
case ${uname_m} in
|
||||||
|
aarch64|arm64)
|
||||||
|
bundle_cpu="aarch64"
|
||||||
|
;;
|
||||||
|
x86_64)
|
||||||
|
bundle_cpu="x64"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
bundle_platform="${bundle_os}_${bundle_cpu}"
|
||||||
|
|
||||||
|
build_dir="${mydir}/../../build/graphviz"
|
||||||
|
download_dir="${build_dir}/download"
|
||||||
|
install_dir="${build_dir}/result/graphviz-${bundle_platform}-${GRAPHVIZ_VERSION}"
|
||||||
|
bundle_file="${install_dir}.tar.gz"
|
||||||
|
|
||||||
|
expat_dir="${build_dir}/expat"
|
||||||
|
expat_src_dir="${expat_dir}/src"
|
||||||
|
|
||||||
|
graphviz_dir="${build_dir}/graphviz"
|
||||||
|
graphviz_src_dir="${graphviz_dir}/src"
|
||||||
|
graphviz_doc_dir="${install_dir}/doc"
|
||||||
|
|
||||||
|
mkdir -p "${build_dir}"
|
||||||
|
cd "${build_dir}"
|
||||||
|
|
||||||
|
download_and_unpack() {
|
||||||
|
local url="$1"
|
||||||
|
local sha256="$2"
|
||||||
|
local file="$3"
|
||||||
|
local dir="$4"
|
||||||
|
|
||||||
|
mkdir -p "$(dirname "${file}")"
|
||||||
|
if [ ! -f "${file}" ]; then
|
||||||
|
curl -L -o "${file}" "${url}"
|
||||||
|
fi
|
||||||
|
echo "${sha256} ${file}" | ${shacmd}
|
||||||
|
if [ ! -d "${dir}" ]; then
|
||||||
|
mkdir -p "${dir}"
|
||||||
|
tar --extract --file "${file}" --directory "${dir}" --strip-components 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
download_and_unpack "${EXPAT_URL}" "${EXPAT_SHA256}" "${download_dir}/expat.tar.gz" "${expat_src_dir}"
|
||||||
|
download_and_unpack "${GRAPHVIZ_URL}" "${GRAPHVIZ_SHA256}" "${download_dir}/graphviz.tar.gz" "${graphviz_src_dir}"
|
||||||
|
|
||||||
|
(
|
||||||
|
cd "${expat_src_dir}"
|
||||||
|
./configure --prefix="${install_dir}"
|
||||||
|
make -j install
|
||||||
|
)
|
||||||
|
|
||||||
|
(
|
||||||
|
cd "${graphviz_src_dir}"
|
||||||
|
./configure --prefix="${install_dir}" EXPAT_CFLAGS="-I${install_dir}/include" EXPAT_LIBS="-L${install_dir}/lib -lexpat"
|
||||||
|
make -j install
|
||||||
|
)
|
||||||
|
|
||||||
|
cat > "${install_dir}/dot" << EOF
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Get an absolute path to this script
|
# Get an absolute path to this script
|
||||||
this_script_dir=\`dirname \$0\`
|
this_script_dir="\$(dirname \$0)"
|
||||||
this_script_dir=\`cd \$this_script_dir > /dev/null && pwd\`
|
this_script_dir="\$(cd \${this_script_dir} > /dev/null && pwd)"
|
||||||
export LD_LIBRARY_PATH="\$this_script_dir/usr/lib64:\$LD_LIBRARY_PATH"
|
export ${lib_path_var}="\${this_script_dir}/lib:\${this_script_dir}/lib/graphviz"
|
||||||
exec \$this_script_dir/usr/bin/dot "\$@"
|
exec "\${this_script_dir}/bin/dot" "\$@"
|
||||||
EOF
|
EOF
|
||||||
chmod +x dot
|
chmod +x "${install_dir}/dot"
|
||||||
export LD_LIBRARY_PATH="$TMPDIR/graphviz/usr/lib64:$LD_LIBRARY_PATH"
|
|
||||||
# create config file
|
# create config file
|
||||||
./dot -c
|
"${install_dir}/dot" -c
|
||||||
tar -cvzf ../$BUNDLE_NAME *
|
|
||||||
cp ../$BUNDLE_NAME "$ORIG_DIR"
|
cp "${me}" "${install_dir}"
|
||||||
|
|
||||||
|
tar --create --gzip --file "${bundle_file}" -C "${install_dir}" .
|
||||||
|
|||||||
Reference in New Issue
Block a user