]> granicus.if.org Git - graphviz/log
graphviz
3 years agogvc: CMake: remove now obsolete linking to xdot
Magnus Jacobsson [Sat, 28 Aug 2021 05:32:33 +0000 (07:32 +0200)]
gvc: CMake: remove now obsolete linking to xdot

The core plugin that previously relied on this now explicitly links to
xdot itself.

The gvc source files do not refer to xdot explicitly and any implicit
references are now resolved by the transitive dependency through
common.

3 years agoplugin/core: add linking to xdot
Magnus Jacobsson [Sat, 28 Aug 2021 05:26:25 +0000 (07:26 +0200)]
plugin/core: add linking to xdot

E.g. plugin/core/gvrender_core_dot.c uses parseXDot from
lib/xdot/xdot.c.

This will allow removal of unecessary linking to xdot in gvc in an
upcoming commit.

3 years agocommon: add linking to xdot
Magnus Jacobsson [Wed, 25 Aug 2021 18:15:41 +0000 (20:15 +0200)]
common: add linking to xdot

E.g. lib/common/emit.c. uses parseXDotF from lib/xdot/xdot.c.

This removes the need to link to xdot for downstream libraries that do
not explicitly use xdot.

3 years agogvc: CMake: replace now obsolete linking to expat
Magnus Jacobsson [Wed, 25 Aug 2021 21:38:40 +0000 (23:38 +0200)]
gvc: CMake: replace now obsolete linking to expat

The gvc source files do not refer to expat explicitly and any implicit
references are now resolved through common.

3 years agocommon: add linking to expat if we have it
Magnus Jacobsson [Wed, 25 Aug 2021 03:59:12 +0000 (05:59 +0200)]
common: add linking to expat if we have it

E.g. lib/common/htmllex.c uses XML_ParserCreate from
/usr/include/expat.h when we have expat.

This removes the need to link to expat for downstream libraries that
do not explicitly use expat.

3 years agoMerge branch 'clean-up-cgraph-linking' into 'main'
Magnus Jacobsson [Sun, 29 Aug 2021 21:03:02 +0000 (21:03 +0000)]
Merge branch 'clean-up-cgraph-linking' into 'main'

Clean up cgraph linking

See merge request graphviz/graphviz!2124

3 years agogvc: change to link to cgraph privately
Magnus Jacobsson [Sat, 28 Aug 2021 06:42:59 +0000 (08:42 +0200)]
gvc: change to link to cgraph privately

Downstream libraries that explicitly use cgraph now link to cgraph
themselves and no longer rely on a transitive dependency to cgraph
through gvc.

3 years agoplugin/neato_layout: remove now obsolete linking to cgraph
Magnus Jacobsson [Sat, 28 Aug 2021 08:12:04 +0000 (10:12 +0200)]
plugin/neato_layout: remove now obsolete linking to cgraph

The neato_layout source files do not refer to cgraph explicitly and
dependencies that need cgraph now all link to cgraph themselves.

3 years agoosage: add linking to cgraph
Magnus Jacobsson [Sat, 28 Aug 2021 17:44:05 +0000 (19:44 +0200)]
osage: add linking to cgraph

E.g. osageinit.c uses agfstnode from lib/cgraph/node.c.

This removes the need to link to cgraph for downstream libraries that
do not explicitly use cgraph.

3 years agopatchwork: add linking to cgraph
Magnus Jacobsson [Sat, 28 Aug 2021 17:39:29 +0000 (19:39 +0200)]
patchwork: add linking to cgraph

E.g. patchwork.c uses agfstnode from lib/cgraph/node.c.

This removes the need to link to cgraph for downstream libraries that
do not explicitly use cgraph.

3 years agotwopigen: add linking to cgraph
Magnus Jacobsson [Sat, 28 Aug 2021 17:32:22 +0000 (19:32 +0200)]
twopigen: add linking to cgraph

E.g. twopiinit.c uses agnode from lib/cgraph/node.c.

This removes the need to link to cgraph for downstream libraries that
do not explicitly use cgraph.

3 years agoneatogen: add linking to cgraph
Magnus Jacobsson [Sat, 28 Aug 2021 17:22:00 +0000 (19:22 +0200)]
neatogen: add linking to cgraph

E.g. constraint.c uses agopen from lib/cgraph/graph.c.

This removes the need to link to cgraph for downstream libraries that
do not explicitly use cgraph.

3 years agofdpgen: add linking to cgraph
Magnus Jacobsson [Sat, 28 Aug 2021 09:31:12 +0000 (11:31 +0200)]
fdpgen: add linking to cgraph

E.g. layout.c uses agopen from lib/cgraph/graph.c.

This removes the need to link to cgraph for downstream libraries that
do not explicitly use cgraph.

3 years agocircogen: add linking to cgraph
Magnus Jacobsson [Sat, 28 Aug 2021 07:47:21 +0000 (09:47 +0200)]
circogen: add linking to cgraph

E.g. circularinit.c uses agopen from lib/cgraph/graph.c.

This removes the need to link to cgraph for downstream libraries that
do not explicitly use cgraph.

3 years agoplugin/dot_layout: CMake: remove now obsolete linking to cgraph
Magnus Jacobsson [Sat, 28 Aug 2021 07:37:33 +0000 (09:37 +0200)]
plugin/dot_layout: CMake: remove now obsolete linking to cgraph

The dot_layout source files do not refer to cgraph explicitly and
dependencies that need cgraph now all link to cgraph themselves.

3 years agodotgen: add linking to cgraph
Magnus Jacobsson [Sat, 28 Aug 2021 07:35:39 +0000 (09:35 +0200)]
dotgen: add linking to cgraph

E.g. cluster.c uses agfstnode from lib/cgraph/node.c.

This removes the need to link to cgraph for downstream libraries that
do not explicitly use cgraph.

3 years agocmd/gvpr: explicitly include cgraph.h in gvprmain.c
Magnus Jacobsson [Sat, 28 Aug 2021 07:25:45 +0000 (09:25 +0200)]
cmd/gvpr: explicitly include cgraph.h in gvprmain.c

gvprmain.c uses e.g. agread from cgraph.h and should not rely on an
implicit include through other header files.

3 years agodot: explicitly include cgraph.h in dot.c
Magnus Jacobsson [Sat, 28 Aug 2021 07:18:02 +0000 (09:18 +0200)]
dot: explicitly include cgraph.h in dot.c

dot.c uses e.g. agopen from cgraph.h and should not rely on an
implicit include through other header files.

3 years agoplugin/pango: add linking to cgraph
Magnus Jacobsson [Sat, 28 Aug 2021 06:09:16 +0000 (08:09 +0200)]
plugin/pango: add linking to cgraph

E.g. plugin/pango/gvgetfontlist_pango.c uses agxbinit from
lib/cgraph/agxbuf.c.

This removes the need to link to cgraph for downstream libraries that
do not explicitly use cgraph.

3 years agocommon: add linking to cgraph
Magnus Jacobsson [Wed, 25 Aug 2021 03:59:12 +0000 (05:59 +0200)]
common: add linking to cgraph

E.g. lib/common/args.c uses agerr from lib/cgraph/agerror.c.

This removes the need to link to cgraph for downstream libraries that
do not explicitly use cgraph.

3 years agoMerge branch 'smattr/54AF45E5-AEC5-41BC-A85B-896646F2E566' into 'main'
Matthew Fernandez [Sun, 29 Aug 2021 19:12:41 +0000 (19:12 +0000)]
Merge branch 'smattr/54AF45E5-AEC5-41BC-A85B-896646F2E566' into 'main'

clean up Python configuration in Autotools

See merge request graphviz/graphviz!2122

3 years agoinline config_python.py into configure.ac
Matthew Fernandez [Sat, 28 Aug 2021 18:53:34 +0000 (11:53 -0700)]
inline config_python.py into configure.ac

This allows removing parts of this script that were unused. configure.ac was
already calling snippets of Python inline, so this is slightly more consistent.
Supersedes !1801.

3 years agoremove $PYTHON_VERSION_SHORT in Autotools
Matthew Fernandez [Sat, 28 Aug 2021 18:45:18 +0000 (11:45 -0700)]
remove $PYTHON_VERSION_SHORT in Autotools

This string is already available in $PYTHON_VERSION.

3 years agoremove a commented out Autotools line
Matthew Fernandez [Sat, 28 Aug 2021 18:44:25 +0000 (11:44 -0700)]
remove a commented out Autotools line

3 years agoremove Autotools probing of Python ≤ 2
Matthew Fernandez [Sat, 28 Aug 2021 18:40:53 +0000 (11:40 -0700)]
remove Autotools probing of Python ≤ 2

Final Python 2 support was removed in 61ae0419198465b457df875881a2dae0aadc8bfd.
But this configure logic was still attempting to discriminate between minor
Python 2 and Python 1 versions. After this change, we just simply reject
anything < Python 3.

Related to #1992.

3 years agoMerge branch 'upgrade-windows-libraries-to-rx-spencer-removal' into 'main'
Magnus Jacobsson [Sun, 29 Aug 2021 10:40:04 +0000 (10:40 +0000)]
Merge branch 'upgrade-windows-libraries-to-rx-spencer-removal' into 'main'

Update windows libraries submodule to get removal of rxSpencer

See merge request graphviz/graphviz!2121

3 years agoMerge branch 'pathplan-cmake-linking-cleanup' into 'main'
Magnus Jacobsson [Sat, 28 Aug 2021 19:04:20 +0000 (19:04 +0000)]
Merge branch 'pathplan-cmake-linking-cleanup' into 'main'

Clean up pathplan linking in CMake

See merge request graphviz/graphviz!2116

3 years agoUpdate windows libraries submodule to get removal of rxSpencer
Magnus Jacobsson [Sat, 28 Aug 2021 18:17:57 +0000 (20:17 +0200)]
Update windows libraries submodule to get removal of rxSpencer

3 years agoplugin/neato_layout: CMake: remove now obsolete linking to pathplan
Magnus Jacobsson [Fri, 27 Aug 2021 11:04:39 +0000 (13:04 +0200)]
plugin/neato_layout: CMake: remove now obsolete linking to pathplan

The neato_layout source files do not refer to pathplan explicitly and
any implicit references are now resolved by its dependencies
themselves.

3 years agofdpgen: CMake: add linking to pathplan
Magnus Jacobsson [Fri, 27 Aug 2021 10:55:31 +0000 (12:55 +0200)]
fdpgen: CMake: add linking to pathplan

E.g. lib/fdpgen/clusteredges.c uses Pobsopen from
lib/pathplan/vispath.h.

This removes the need to link to pathplan for downstream libraries
that do not explicitly use pathplan.

3 years agoplugin/dot_layout: CMake: remove now obsolete linking to pathplan
Magnus Jacobsson [Fri, 27 Aug 2021 07:22:21 +0000 (09:22 +0200)]
plugin/dot_layout: CMake: remove now obsolete linking to pathplan

The dot_layout source files do not refer to pathplan explicitly and
any implicit references are now resolved by its dependcies themselves.

3 years agomm2gv: CMake: remove now obsolete linking to pathplan
Magnus Jacobsson [Fri, 27 Aug 2021 07:22:21 +0000 (09:22 +0200)]
mm2gv: CMake: remove now obsolete linking to pathplan

The mm2gv source files do not refer to pathplan explicitly and any
implicit references are now resolved by its dependencies themselves.

3 years agogvc: CMake: replace now obsolete linking to pathplan with linking to common
Magnus Jacobsson [Wed, 25 Aug 2021 21:38:40 +0000 (23:38 +0200)]
gvc: CMake: replace now obsolete linking to pathplan with linking to common

The gvc source files do not refer to pathplan explicitly and any
implicit references are now resolved through common.

3 years agocommon: CMake: add linking to pathplan
Magnus Jacobsson [Wed, 25 Aug 2021 03:59:12 +0000 (05:59 +0200)]
common: CMake: add linking to pathplan

E.g. lib/common/emit.c uses freePath from lib/pathplan/util.c.

This removes the need to link to pathplan for downstream libraries
that do not explicitly use pathplan.

3 years agoMerge branch 'smattr/7E3E9771-0DB2-434D-8F36-9A9A7FE35055' into 'main'
Matthew Fernandez [Sat, 28 Aug 2021 18:04:29 +0000 (18:04 +0000)]
Merge branch 'smattr/7E3E9771-0DB2-434D-8F36-9A9A7FE35055' into 'main'

Start 2.49 development series

See merge request graphviz/graphviz!2120

3 years agoStart 2.49 development series
Matthew Fernandez [Sat, 28 Aug 2021 17:05:55 +0000 (10:05 -0700)]
Start 2.49 development series

3 years agoMerge branch 'smattr/455AF9C3-D61B-4F88-8BB9-50A67C6EF77D' into 'main' 2.49.0
Matthew Fernandez [Sat, 28 Aug 2021 17:03:42 +0000 (17:03 +0000)]
Merge branch 'smattr/455AF9C3-D61B-4F88-8BB9-50A67C6EF77D' into 'main'

Stable Release 2.49.0

See merge request graphviz/graphviz!2109

3 years agoStable Release 2.49.0
Matthew Fernandez [Tue, 24 Aug 2021 02:55:31 +0000 (19:55 -0700)]
Stable Release 2.49.0

3 years agoMerge branch 'smattr/494AC848-5CEA-4C42-9C10-C1F7AC93BDDC' into 'main'
Matthew Fernandez [Sat, 28 Aug 2021 15:04:28 +0000 (15:04 +0000)]
Merge branch 'smattr/494AC848-5CEA-4C42-9C10-C1F7AC93BDDC' into 'main'

fix dangerous-default-value issues in gvtest.py test suite support

See merge request graphviz/graphviz!2117

3 years agofix dangerous-default-value issues in gvtest.py test suite support
Matthew Fernandez [Fri, 27 Aug 2021 15:00:16 +0000 (08:00 -0700)]
fix dangerous-default-value issues in gvtest.py test suite support

Pylint warns that using `[]` as a default is dangerous due to modifications to
the parameter unintentionally persisting across calls. I do not believe that
happens in this case, but it is better to rephrase this code to pacify Pylint
and make it clearer to readers that this is not happening.

3 years agoMerge branch 'cleanup-useless-expat-referencing' into 'main'
Magnus Jacobsson [Thu, 26 Aug 2021 16:09:27 +0000 (16:09 +0000)]
Merge branch 'cleanup-useless-expat-referencing' into 'main'

Cleanup useless expat referencing

See merge request graphviz/graphviz!2114

3 years agomm2gv: remove unused expat include dir
Magnus Jacobsson [Wed, 25 Aug 2021 20:52:17 +0000 (22:52 +0200)]
mm2gv: remove unused expat include dir

3 years agogvpack: remove unused expat include dir
Magnus Jacobsson [Wed, 25 Aug 2021 20:51:56 +0000 (22:51 +0200)]
gvpack: remove unused expat include dir

3 years agogvgen: remove unused expat include dir
Magnus Jacobsson [Wed, 25 Aug 2021 20:51:50 +0000 (22:51 +0200)]
gvgen: remove unused expat include dir

3 years agogvcolor: remove unused expat include dir
Magnus Jacobsson [Wed, 25 Aug 2021 20:51:07 +0000 (22:51 +0200)]
gvcolor: remove unused expat include dir

3 years agogml2gv: remove unused expat include dir
Magnus Jacobsson [Wed, 25 Aug 2021 20:50:57 +0000 (22:50 +0200)]
gml2gv: remove unused expat include dir

3 years agodijkstra: remove unused expat include dir
Magnus Jacobsson [Wed, 25 Aug 2021 20:50:30 +0000 (22:50 +0200)]
dijkstra: remove unused expat include dir

3 years agosimple tools: remove unused expat include dir
Magnus Jacobsson [Wed, 25 Aug 2021 20:50:16 +0000 (22:50 +0200)]
simple tools: remove unused expat include dir

3 years agosccmap: remove unused expat as a dependency
Magnus Jacobsson [Wed, 25 Aug 2021 20:49:42 +0000 (22:49 +0200)]
sccmap: remove unused expat as a dependency

3 years agoMerge branch 'smattr/47F92637-628D-4E62-846C-499A66503C2F' into 'main'
Matthew Fernandez [Thu, 26 Aug 2021 14:52:25 +0000 (14:52 +0000)]
Merge branch 'smattr/47F92637-628D-4E62-846C-499A66503C2F' into 'main'

a few trivial clean up pieces

See merge request graphviz/graphviz!2113

3 years agoremove stamp-h* .gitignore rules
Matthew Fernandez [Thu, 26 Aug 2021 00:01:27 +0000 (17:01 -0700)]
remove stamp-h* .gitignore rules

These appear to be a generated artifacts stemming from Autotools ~1.9.2. The
last vestiges of this were removed in 5cbd4ebcd8254e51569b7209cb964f7d260319fb.

3 years agoremove commented out .gitignore content
Matthew Fernandez [Thu, 26 Aug 2021 00:01:08 +0000 (17:01 -0700)]
remove commented out .gitignore content

3 years agoMerge branch 'cleanup-drand48-declarations' into 'main'
Magnus Jacobsson [Wed, 25 Aug 2021 17:11:23 +0000 (17:11 +0000)]
Merge branch 'cleanup-drand48-declarations' into 'main'

Cleanup of drand48 declarations

See merge request graphviz/graphviz!2112

3 years agoneatogen: remove duplicate declaration of drand48 in stress.c
Magnus Jacobsson [Sun, 1 Aug 2021 12:56:03 +0000 (14:56 +0200)]
neatogen: remove duplicate declaration of drand48 in stress.c

drand48 is already declared in lib/common/utils.h.

Removes this warning:

C:/Users/magja/graphviz/lib/neatogen/stress.c:27:15: warning: 'drand48' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
   27 | extern double drand48(void);
      |               ^~~~~~~

3 years agoneatogen: remove duplicate declaration of drand48 in neatosplines.c
Magnus Jacobsson [Sun, 1 Aug 2021 11:54:56 +0000 (13:54 +0200)]
neatogen: remove duplicate declaration of drand48 in neatosplines.c

drand48 is already declared in lib/common/utils.h.

Removes this warning:

C:/Users/magja/graphviz/lib/neatogen/neatosplines.c:20:15: warning: 'drand48' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
   20 | extern double drand48(void);
      |               ^~~~~~~

3 years agofdpgen: remove duplicate declaration of drand48 tlayout.c
Magnus Jacobsson [Sun, 1 Aug 2021 11:49:58 +0000 (13:49 +0200)]
fdpgen: remove duplicate declaration of drand48 tlayout.c

drand48 is already declared in lib/common/utils.h.

Removes this warning:

C:/Users/magja/graphviz/lib/fdpgen/tlayout.c:47:15: warning: 'drand48' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
   47 | extern double drand48(void);
      |               ^~~~~~~

3 years agocommon: add declaration of drand48 to utils.h when the system doesn't have it
Magnus Jacobsson [Mon, 26 Jul 2021 14:51:16 +0000 (16:51 +0200)]
common: add declaration of drand48 to utils.h when the system doesn't have it

This function is implemented in utils.c when not available otherwise.

Removes this warning with MinGW:

C:/Users/magja/graphviz/lib/fdpgen/tlayout.c:597:33: warning: implicit declaration of function 'drand48'; did you mean 'srand48'? [-Wimplicit-function-declaration]
  597 |       double angle = PItimes2 * drand48();
      |                                 ^~~~~~~
      |                                 srand48

3 years agocommon: remove weak declaration of drand48 that causes it to be undefined with MinGW
Magnus Jacobsson [Sat, 24 Jul 2021 10:57:04 +0000 (12:57 +0200)]
common: remove weak declaration of drand48 that causes it to be undefined with MinGW

Fixes this error with MinGW:

C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot export drand48: symbol not defined
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../ortho/CMakeFiles/ortho_obj.dir/partition.c.obj:partition.c:(.text+0x4de): undefined reference to `drand48'

Towards https://gitlab.com/graphviz/graphviz/-/issues/2102.

3 years agoMerge branch 'smattr/66a8130b-4609-4d82-bc52-368bd7d754eb' into 'main'
Matthew Fernandez [Tue, 24 Aug 2021 14:34:00 +0000 (14:34 +0000)]
Merge branch 'smattr/66a8130b-4609-4d82-bc52-368bd7d754eb' into 'main'

make expr’s exparse.h a static checked-in file

See merge request graphviz/graphviz!2110

3 years agomake expr’s exparse.h a static checked-in file
Matthew Fernandez [Tue, 24 Aug 2021 03:14:41 +0000 (20:14 -0700)]
make expr’s exparse.h a static checked-in file

There is no need to generate this file. It contains statically known content.
Generating it was proving a maintenance headache across the three build systems.
Related to #2102.

3 years agoremove MSBuild references to non-existent files
Matthew Fernandez [Tue, 24 Aug 2021 03:13:22 +0000 (20:13 -0700)]
remove MSBuild references to non-existent files

3 years agoMerge branch 'smattr/f11c8e0f-8730-4991-b987-9add10cfb217' into 'main'
Matthew Fernandez [Tue, 24 Aug 2021 02:39:11 +0000 (02:39 +0000)]
Merge branch 'smattr/f11c8e0f-8730-4991-b987-9add10cfb217' into 'main'

Visio plugin modernization

See merge request graphviz/graphviz!2101

3 years agoMerge branch 'smattr/4F9C9838-F62D-4437-A2E8-AF318CE4D110' into 'main'
Matthew Fernandez [Tue, 24 Aug 2021 00:58:12 +0000 (00:58 +0000)]
Merge branch 'smattr/4F9C9838-F62D-4437-A2E8-AF318CE4D110' into 'main'

quartz plugin: Fix the graph rotation

See merge request graphviz/graphviz!2108

3 years agoadd a CHANGELOG entry for the prior quartz fix
Matthew Fernandez [Tue, 24 Aug 2021 00:08:23 +0000 (17:08 -0700)]
add a CHANGELOG entry for the prior quartz fix

3 years agoquartz plugin: Fix the graph rotation
Graph [Mon, 16 Aug 2021 16:19:41 +0000 (00:19 +0800)]
quartz plugin: Fix the graph rotation

When graph is set to be landscape (rotate = 90), quartz renderer seems to rotate
the image incorrectly. In order to make a top-to-bottom image left-to-right
(i.e. landscape), we will need to:

  1. Set the anchor point to the left-bottom corner.
  2. Rotate counterclockwise by 90 degrees around the anchor point.
  3. Translate from left to right by original height of the image.

In step 2, the second parameter of the CGContextRotateCTM should be positive
according to the documentation.¹

¹ https://developer.apple.com/documentation/coregraphics/1456228-cgcontextrotatectm

3 years agoVisio plugin: replace some typedefs with more modern using directives
Matthew Fernandez [Sun, 15 Aug 2021 20:45:11 +0000 (13:45 -0700)]
Visio plugin: replace some typedefs with more modern using directives

3 years agoVisio plugin: remove an unused typedef
Matthew Fernandez [Sun, 15 Aug 2021 20:44:52 +0000 (13:44 -0700)]
Visio plugin: remove an unused typedef

3 years agoVisio plugin: manage Texts by value instead of pointer
Matthew Fernandez [Sun, 15 Aug 2021 20:38:04 +0000 (13:38 -0700)]
Visio plugin: manage Texts by value instead of pointer

The Text class does not participate in any inheritance hierarchy and Text
objects that are constructed have a well-defined lifetime. So we can manage them
as objects instead of pointers to heap-allocated data. This simplifies some code
and allows avoiding some manual memory management.

3 years agoRender::PrintEdgeShape: rewrite center box calculation into something simpler
Matthew Fernandez [Sun, 15 Aug 2021 20:25:37 +0000 (13:25 -0700)]
Render::PrintEdgeShape: rewrite center box calculation into something simpler

3 years agoMerge branch 'fix-cmake-options-and-add-minimal-build' into 'main'
Magnus Jacobsson [Mon, 23 Aug 2021 20:57:54 +0000 (20:57 +0000)]
Merge branch 'fix-cmake-options-and-add-minimal-build' into 'main'

Fix CMake options and add minimal build

See merge request graphviz/graphviz!2106

3 years agoCI: add ubuntu21-04-cmake-minimal-build job
Magnus Jacobsson [Sun, 15 Aug 2021 10:00:44 +0000 (12:00 +0200)]
CI: add ubuntu21-04-cmake-minimal-build job

This job tests that it is possible to build Graphviz without any of
the optional libraries.

3 years agodotgen: fix: defined but unused 'setEdgeLabelPos' function in builds without ortho
Magnus Jacobsson [Tue, 17 Aug 2021 04:43:44 +0000 (06:43 +0200)]
dotgen: fix: defined but unused 'setEdgeLabelPos' function in builds without ortho

Fixes this warning when building without ortho.

lib/dotgen/dotsplines.c:278:1: warning: ‘setEdgeLabelPos’ defined but not used [-Wunused-function]
  278 | setEdgeLabelPos (graph_t * g)
      | ^~~~~~~~~~~~~~~

3 years agodotgen: fix: defined but unused label 'finish' in builds without ortho
Magnus Jacobsson [Tue, 17 Aug 2021 04:36:16 +0000 (06:36 +0200)]
dotgen: fix: defined but unused label 'finish' in builds without ortho

Fixes this warning when building without ortho.

lib/dotgen/dotsplines.c: In function ‘_dot_splines’:
lib/dotgen/dotsplines.c:530:1: warning: label ‘finish’ defined but not used [-Wunused-label]
  530 | finish :
      | ^~~~~~

3 years agoCMake: add with_zlib option
Magnus Jacobsson [Sat, 14 Aug 2021 09:23:28 +0000 (11:23 +0200)]
CMake: add with_zlib option

The zlib library is already optional. This option allows the user to
explictly not use it even if they have it.

This will be used in an upcoming commit to add a minimal CMake build
job to CI which will test that it is possible to build Graphviz
without any of the optional libraries.

3 years agogvc: CMake: fix: link to zlib only if we have it
Magnus Jacobsson [Fri, 13 Aug 2021 12:39:12 +0000 (14:39 +0200)]
gvc: CMake: fix: link to zlib only if we have it

Fixes the following error when we don't have zlib:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ZLIB_LIBRARY
    linked by target "gvc" in directory C:/Users/magja/graphviz/lib/gvc

3 years agoCMake: add with_expat option
Magnus Jacobsson [Sat, 14 Aug 2021 09:23:09 +0000 (11:23 +0200)]
CMake: add with_expat option

The expat library is already optional. This option allows the user to
explictly not use it even if they have it.

This will be used in an upcoming commit to add a minimal CMake build
job to CI which will test that it is possible to build Graphviz
without any of the optional libraries.

3 years agoCMake: FindLTDL: remove useless misspelled name of libltdl
Magnus Jacobsson [Tue, 3 Aug 2021 14:03:11 +0000 (16:03 +0200)]
CMake: FindLTDL: remove useless misspelled name of libltdl

The name libtldl was clearly a misspelling of libltdl introduced
already when this file was created in commit
3b567c4bd938e2e70478b22d5efae98bedf9ed8f.

There's however no need to specify anything more then the ltdl name
itself since CMake does this kind of magic automatically. From
https://cmake.org/cmake/help/latest/command/find_library.html:

"Each library name given to the NAMES option is first considered as a
library file name and then considered with platform-specific prefixes
(e.g. lib) and suffixes (e.g. .so)."

3 years agoCMake: fix: define ENABLE_LTDL only if LTDL is found
Magnus Jacobsson [Fri, 13 Aug 2021 13:32:22 +0000 (15:32 +0200)]
CMake: fix: define ENABLE_LTDL only if LTDL is found

Fixes errors like this when we dont't have ltdl:

/c/Users/magja/graphviz/lib/gvc/gvplugin.c:24:10: fatal error: ltdl.h: No such file or directory
   24 | #include <ltdl.h>
      |          ^~~~~~~~

3 years agoCMake: fix: find the LTDL package only if the enable_ltdl option is ON
Magnus Jacobsson [Fri, 13 Aug 2021 13:32:22 +0000 (15:32 +0200)]
CMake: fix: find the LTDL package only if the enable_ltdl option is ON

Fixes this error when we don't have ltdl:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
C:/Users/magja/graphviz/lib/gvc/LTDL_INCLUDE_DIR
   used as include directory in directory C:/Users/magja/graphviz/lib/gvc

There is another problem when the LTDL library is not available that
will be fixed in an upcoming commit, hence no changelog entry yet.

3 years agogvc: CMake: fix: use the ltdl include dir only if we have it
Magnus Jacobsson [Mon, 16 Aug 2021 17:42:48 +0000 (19:42 +0200)]
gvc: CMake: fix: use the ltdl include dir only if we have it

Fixes this error when we don't have ltdl:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
C:/Users/magja/graphviz/lib/gvc/LTDL_INCLUDE_DIR
   used as include directory in directory C:/Users/magja/graphviz/lib/gvc

On Windows, we currently only use the ltdl compatibility header
introduced in d70cdba7937724c19393d97bd280320cdf8c3c8f, not the link
library itself. Hence the WIN32 OR MINGW guard for the link library,
but not for the include directory.

There are other problems when the LTDL library is not available that
will be fixed in upcoming commits, hence no changelog entry yet.

3 years agogvc: CMake: fix: link to the ltdl lib only if we have it
Magnus Jacobsson [Wed, 4 Aug 2021 10:01:58 +0000 (12:01 +0200)]
gvc: CMake: fix: link to the ltdl lib only if we have it

Before this we tried to use the ltdl link library when not on Windows,
regardless of whether we found it or not. On Windows, we currently
only use the ltdl compatibility header introduced in
d70cdba7937724c19393d97bd280320cdf8c3c8f, not the link library itself.

Fixes the LTDL_LIBRARY part of the following error on non-Windows
systems when we don't have ltdl:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/home/magjac/graphviz/lib/gvc/LTDL_INCLUDE_DIR
   used as include directory in directory /home/magjac/graphviz/lib/gvc
LTDL_LIBRARY (ADVANCED)
    linked by target "gvc" in directory /home/magjac/graphviz/lib/gvc

There are other problems when the LTDL library is not available that
will be fixed in upcoming commits, hence no changelog entry yet.

3 years agoMerge branch 'smattr/cae6572b-a6e5-457d-bdcf-143a961eb47d' into 'main'
Matthew Fernandez [Mon, 23 Aug 2021 15:46:43 +0000 (15:46 +0000)]
Merge branch 'smattr/cae6572b-a6e5-457d-bdcf-143a961eb47d' into 'main'

fix incorrect allocation calculation, remove dynamic allocations in gvmap

See merge request graphviz/graphviz!2097

3 years agogvmap: remove some unnecessary bracketing
Matthew Fernandez [Sat, 14 Aug 2021 21:35:58 +0000 (14:35 -0700)]
gvmap: remove some unnecessary bracketing

3 years agogvmap: remove dynamic allocation for opacity
Matthew Fernandez [Sat, 14 Aug 2021 21:29:02 +0000 (14:29 -0700)]
gvmap: remove dynamic allocation for opacity

After the prior type signature changes, this string no longer needs to be
dynamically allocated. This also fixes a memory leak that would occur when
passing the -c command line argument multiple times.

3 years agoplot_dot_map: take a const pointer for a string that is not modified
Matthew Fernandez [Sat, 14 Aug 2021 21:28:15 +0000 (14:28 -0700)]
plot_dot_map: take a const pointer for a string that is not modified

3 years agoplot_dot_polygons: take a const pointer for a string that is not modified
Matthew Fernandez [Sat, 14 Aug 2021 21:27:12 +0000 (14:27 -0700)]
plot_dot_polygons: take a const pointer for a string that is not modified

3 years agorgb2hex: take a const pointer for a string that is not modified
Matthew Fernandez [Sat, 14 Aug 2021 21:26:42 +0000 (14:26 -0700)]
rgb2hex: take a const pointer for a string that is not modified

3 years agogvmap: remove dynamic allocation for line color
Matthew Fernandez [Sat, 14 Aug 2021 21:23:13 +0000 (14:23 -0700)]
gvmap: remove dynamic allocation for line color

Following the prior type signature changes, there is no need to dynamically
allocate this.

3 years agoplot_dot_map: take a const pointer for a string that is not modified
Matthew Fernandez [Sat, 14 Aug 2021 21:19:09 +0000 (14:19 -0700)]
plot_dot_map: take a const pointer for a string that is not modified

3 years agoplot_dot_polygons: take a const pointer for a string that is not modified
Matthew Fernandez [Sat, 14 Aug 2021 21:15:50 +0000 (14:15 -0700)]
plot_dot_polygons: take a const pointer for a string that is not modified

3 years agodot_one_poly: take a const pointer for a string that is not modified
Matthew Fernandez [Sat, 14 Aug 2021 21:13:46 +0000 (14:13 -0700)]
dot_one_poly: take a const pointer for a string that is not modified

3 years agodot_polygon: take a const pointer for a string that is not modified
Matthew Fernandez [Sat, 14 Aug 2021 21:09:40 +0000 (14:09 -0700)]
dot_polygon: take a const pointer for a string that is not modified

3 years agopolytess.c: remove unused return values
Matthew Fernandez [Sat, 14 Aug 2021 21:06:53 +0000 (14:06 -0700)]
polytess.c: remove unused return values

3 years agoRender_Contour2: allocate vertices as a single block
Matthew Fernandez [Sat, 14 Aug 2021 20:59:21 +0000 (13:59 -0700)]
Render_Contour2: allocate vertices as a single block

Rather than an array of pointers and then individual allocations for each
vertex, we can simply allocate a single block ahead of time. This decreases
memory requirements and increases cache locality. Note that this does nothing
about the fairly egregious memory leak in this code.

3 years agoRender_Contour2: fix incorrect allocation calculation
Matthew Fernandez [Sat, 14 Aug 2021 20:53:12 +0000 (13:53 -0700)]
Render_Contour2: fix incorrect allocation calculation

It is clear from surrounding code that this was attempting to allocate an array
of GLdouble *pointers*, not an array of GLdoubles. It is unlikely this would
have caused any noticeable issues as sizeof(GLdouble) is typically greater than
sizeof(GLdouble*), but nevertheless the calculation was incorrect. This change
not only corrects this, but uses the more appropriate calloc instead of malloc
for array allocation.

3 years agoattr_value_edited_cb: remove unused 'row' variable
Matthew Fernandez [Sat, 14 Aug 2021 20:50:48 +0000 (13:50 -0700)]
attr_value_edited_cb: remove unused 'row' variable

3 years agoMerge branch 'smattr/d9bdea2a-6c61-49fb-988e-2b4f61ee06dd' into 'main'
Matthew Fernandez [Mon, 23 Aug 2021 04:05:54 +0000 (04:05 +0000)]
Merge branch 'smattr/d9bdea2a-6c61-49fb-988e-2b4f61ee06dd' into 'main'

fix path to which CMake install man pages

Closes #1936

See merge request graphviz/graphviz!2102

3 years agofix path to which CMake install man pages
Matthew Fernandez [Sun, 15 Aug 2021 21:06:47 +0000 (14:06 -0700)]
fix path to which CMake install man pages

The CMake build system was setup to unconditionally install man pages to man3.
This is only correct for libraries, whose man pages have the extension .3.
Binaries have man pages with the extension .1 and were intended to be installed
in man1. Now both go to the correct man subdirectory. Fixes #1936.

3 years agoMerge branch 'smattr/F6BCF86C-44CC-4894-94B5-E3DE88B8EB93' into 'main'
Matthew Fernandez [Mon, 23 Aug 2021 02:57:18 +0000 (02:57 +0000)]
Merge branch 'smattr/F6BCF86C-44CC-4894-94B5-E3DE88B8EB93' into 'main'

merge disto_notes.txt into DEVELOPERS.md

See merge request graphviz/graphviz!2104

3 years agomerge disto_notes.txt into DEVELOPERS.md
Matthew Fernandez [Mon, 16 Aug 2021 15:09:04 +0000 (08:09 -0700)]
merge disto_notes.txt into DEVELOPERS.md

Most of this was out of date, but the SUSE entry may still be relevant.