]> granicus.if.org Git - graphviz/log
graphviz
3 years agofullArea: remove micro-optimization of 0 value of 'm'
Matthew Fernandez [Sat, 4 Sep 2021 01:23:05 +0000 (18:23 -0700)]
fullArea: remove micro-optimization of 0 value of 'm'

This is no longer necessary on modern compilers/processors where square root is
less expensive and this code is not on a hot path.

3 years agosparse cmp: remove some unnecessary casts
Matthew Fernandez [Sat, 4 Sep 2021 01:08:33 +0000 (18:08 -0700)]
sparse cmp: remove some unnecessary casts

These pointers coerce implicitly.

3 years agosparse cmp: rephrase a comparison to avoid a -Wfloat-equal warning
Matthew Fernandez [Sat, 4 Sep 2021 01:07:41 +0000 (18:07 -0700)]
sparse cmp: rephrase a comparison to avoid a -Wfloat-equal warning

Simply makes it clearer to the compiler what this code is doing.

3 years agooverlapSeg: rephrase the order of comparisons to avoid a -Wfloat-equal warning
Matthew Fernandez [Sat, 4 Sep 2021 01:02:22 +0000 (18:02 -0700)]
overlapSeg: rephrase the order of comparisons to avoid a -Wfloat-equal warning

Simply makes it clearer to the compiler what this code is doing.

3 years agoMerge branch 'smattr/24E8A935-AED9-4957-8832-B2EFADDDED5F' into 'main'
Matthew Fernandez [Fri, 10 Sep 2021 15:46:52 +0000 (15:46 +0000)]
Merge branch 'smattr/24E8A935-AED9-4957-8832-B2EFADDDED5F' into 'main'

-Wmissing-field-initializer warning squashing

See merge request graphviz/graphviz!2139

3 years agop_tab: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 4 Sep 2021 03:12:37 +0000 (20:12 -0700)]
p_tab: squash -Wmissing-field-initializer warning

3 years agop_note: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 4 Sep 2021 03:11:15 +0000 (20:11 -0700)]
p_note: squash -Wmissing-field-initializer warning

3 years agop_octagon: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 4 Sep 2021 03:10:24 +0000 (20:10 -0700)]
p_octagon: squash -Wmissing-field-initializer warning

3 years agop_septagon: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 4 Sep 2021 03:09:40 +0000 (20:09 -0700)]
p_septagon: squash -Wmissing-field-initializer warning

3 years agop_hexagon: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 4 Sep 2021 03:09:08 +0000 (20:09 -0700)]
p_hexagon: squash -Wmissing-field-initializer warning

3 years agop_pentagon: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 4 Sep 2021 03:08:28 +0000 (20:08 -0700)]
p_pentagon: squash -Wmissing-field-initializer warning

3 years agop_house: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 4 Sep 2021 03:07:56 +0000 (20:07 -0700)]
p_house: squash -Wmissing-field-initializer warning

3 years agop_parallelogram: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 4 Sep 2021 03:07:08 +0000 (20:07 -0700)]
p_parallelogram: squash -Wmissing-field-initializer warning

3 years agop_trapezium: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 4 Sep 2021 03:05:48 +0000 (20:05 -0700)]
p_trapezium: squash -Wmissing-field-initializer warning

3 years agop_diamond: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 4 Sep 2021 03:02:12 +0000 (20:02 -0700)]
p_diamond: squash -Wmissing-field-initializer warning

3 years agoMerge branch 'smattr/B7DB66F6-0A3B-4F6B-B334-2888ADA7BFBE' into 'main'
Matthew Fernandez [Fri, 10 Sep 2021 01:23:06 +0000 (01:23 +0000)]
Merge branch 'smattr/B7DB66F6-0A3B-4F6B-B334-2888ADA7BFBE' into 'main'

some graphml2gv, gxl2gv clean up

See merge request graphviz/graphviz!2141

3 years agogxl2gv: remove unnecessary casts of 'userdata' pointers
Matthew Fernandez [Sat, 4 Sep 2021 19:35:15 +0000 (12:35 -0700)]
gxl2gv: remove unnecessary casts of 'userdata' pointers

These implicitly coerce.

3 years agogxl2gv: remove unused struct name
Matthew Fernandez [Sat, 4 Sep 2021 19:35:04 +0000 (12:35 -0700)]
gxl2gv: remove unused struct name

3 years agocharacterDataHandler: remove unnecessary casts of `agxbput_n` arguments
Matthew Fernandez [Sat, 4 Sep 2021 19:34:38 +0000 (12:34 -0700)]
characterDataHandler: remove unnecessary casts of `agxbput_n` arguments

3 years agographml2gv: remove unnecessary casts of `userdata` pointers
Matthew Fernandez [Sat, 4 Sep 2021 19:34:15 +0000 (12:34 -0700)]
graphml2gv: remove unnecessary casts of `userdata` pointers

These implicitly coerce.

3 years agographml2gv: remove unused struct name
Matthew Fernandez [Sat, 4 Sep 2021 19:33:53 +0000 (12:33 -0700)]
graphml2gv: remove unused struct name

3 years agoMerge branch 'smattr/bb628679-594c-4502-a50b-9e32e5ed7316' into 'main'
Matthew Fernandez [Thu, 9 Sep 2021 15:28:45 +0000 (15:28 +0000)]
Merge branch 'smattr/bb628679-594c-4502-a50b-9e32e5ed7316' into 'main'

neatogen warning squashing

See merge request graphviz/graphviz!2146

3 years agoneatogen multispline freeIpair: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:41:25 +0000 (12:41 -0700)]
neatogen multispline freeIpair: squash a -Wunused-parameter compiler warning

3 years agoneatogen multispline newIpair: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:40:49 +0000 (12:40 -0700)]
neatogen multispline newIpair: squash a -Wunused-parameter compiler warning

3 years agoneatogen multispline freeItem: squash -Wunused-parameter compiler warnings
Matthew Fernandez [Mon, 6 Sep 2021 19:39:34 +0000 (12:39 -0700)]
neatogen multispline freeItem: squash -Wunused-parameter compiler warnings

3 years agoneatogen multipline newItem: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:38:42 +0000 (12:38 -0700)]
neatogen multipline newItem: squash a -Wunused-parameter compiler warning

3 years agoneatogen multispline swap_ends_p: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:37:49 +0000 (12:37 -0700)]
neatogen multispline swap_ends_p: squash a -Wunused-parameter compiler warning

3 years agoneatogen multispline spline_merge: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:37:00 +0000 (12:37 -0700)]
neatogen multispline spline_merge: squash a -Wunused-parameter compiler warning

3 years agoneatogen multispline: squash a -Wmissing-field-initializer warning
Matthew Fernandez [Mon, 6 Sep 2021 19:36:02 +0000 (12:36 -0700)]
neatogen multispline: squash a -Wmissing-field-initializer warning

3 years agomakeObstacle: squash a spurious -Wswitch-default compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:56:58 +0000 (12:56 -0700)]
makeObstacle: squash a spurious -Wswitch-default compiler warning

The surrounding context ensures that the cases in this switch cover every
possibility.

3 years agoneatogen cmpitems: squash -Wunused-parameter compiler warnings
Matthew Fernandez [Mon, 6 Sep 2021 19:55:15 +0000 (12:55 -0700)]
neatogen cmpitems: squash -Wunused-parameter compiler warnings

3 years agoneatogen cmpitems: rephrase to avoid double→int conversion
Matthew Fernandez [Mon, 6 Sep 2021 19:53:39 +0000 (12:53 -0700)]
neatogen cmpitems: rephrase to avoid double→int conversion

This had a number of problems with respect to possible overflow and loss of
precision. This commit rephrases the comparison into something that does not
rely on any coercion or conversion.

3 years agoneatogen freeitem: squash -Wunused-parameter compiler warnings
Matthew Fernandez [Mon, 6 Sep 2021 19:49:57 +0000 (12:49 -0700)]
neatogen freeitem: squash -Wunused-parameter compiler warnings

3 years agoneatogen newitem: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:49:28 +0000 (12:49 -0700)]
neatogen newitem: squash a -Wunused-parameter compiler warning

3 years agoneatogen swap_ends_p: squash a -Wunused-parameter warning
Matthew Fernandez [Mon, 6 Sep 2021 19:48:08 +0000 (12:48 -0700)]
neatogen swap_ends_p: squash a -Wunused-parameter warning

3 years agoneatogen spline_merge: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:47:40 +0000 (12:47 -0700)]
neatogen spline_merge: squash a -Wunused-parameter compiler warning

3 years agofind_closest_pairs: squash a -Wmissing-field-initializer compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:26:35 +0000 (12:26 -0700)]
find_closest_pairs: squash a -Wmissing-field-initializer compiler warning

3 years agoneatogen splineInfo: squash a -Wmissing-field-initializer compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:24:17 +0000 (12:24 -0700)]
neatogen splineInfo: squash a -Wmissing-field-initializer compiler warning

3 years agodotgen splineInfo: squash a -Wmissing-field-initializer compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:22:30 +0000 (12:22 -0700)]
dotgen splineInfo: squash a -Wmissing-field-initializer compiler warning

3 years agoMerge branch 'smattr/659C49B6-0A1A-4490-B1DD-DE326B38C850' into 'main'
Matthew Fernandez [Thu, 9 Sep 2021 04:24:54 +0000 (04:24 +0000)]
Merge branch 'smattr/659C49B6-0A1A-4490-B1DD-DE326B38C850' into 'main'

clean up in tcldot

See merge request graphviz/graphviz!2145

3 years agotcldot-io.c: remove unnecessary bracketing
Matthew Fernandez [Mon, 6 Sep 2021 18:26:55 +0000 (11:26 -0700)]
tcldot-io.c: remove unnecessary bracketing

3 years agotcldot myiodisc_memiofread: remove unnecessary cast
Matthew Fernandez [Mon, 6 Sep 2021 18:25:32 +0000 (11:25 -0700)]
tcldot myiodisc_memiofread: remove unnecessary cast

This pointer implicitly coerces.

3 years agotcldot-io.c: remove commented out code
Matthew Fernandez [Mon, 6 Sep 2021 18:25:12 +0000 (11:25 -0700)]
tcldot-io.c: remove commented out code

3 years agotcldot myiddisc_idregister: squash a spurious -Wswitch-default compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 18:21:20 +0000 (11:21 -0700)]
tcldot myiddisc_idregister: squash a spurious -Wswitch-default compiler warning

3 years agotcldot-id.c: remove unnecessary casts of state pointers
Matthew Fernandez [Mon, 6 Sep 2021 18:20:11 +0000 (11:20 -0700)]
tcldot-id.c: remove unnecessary casts of state pointers

These pointers implicitly coerce.

3 years agotcldot: myiddisc_free: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 18:19:11 +0000 (11:19 -0700)]
tcldot: myiddisc_free: squash a -Wunused-parameter compiler warning

3 years agotcldot myiddisc_map: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 18:18:51 +0000 (11:18 -0700)]
tcldot myiddisc_map: squash a -Wunused-parameter compiler warning

3 years agotcldot myagxset: use a 'size_t' for string length instead of 'int'
Matthew Fernandez [Mon, 6 Sep 2021 18:15:37 +0000 (11:15 -0700)]
tcldot myagxset: use a 'size_t' for string length instead of 'int'

Squashes a -Wconversion compiler warning.

3 years agotcldot deleteNode: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 18:14:42 +0000 (11:14 -0700)]
tcldot deleteNode: squash a -Wunused-parameter compiler warning

3 years agotcldot deleteEdge: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 18:14:05 +0000 (11:14 -0700)]
tcldot deleteEdge: squash a -Wunused-parameter compiler warning

3 years agotcldot obj2cmd: squash a spurious -Wswitch-default compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 18:12:30 +0000 (11:12 -0700)]
tcldot obj2cmd: squash a spurious -Wswitch-default compiler warning

3 years agoTcldot_string_writer: remove unnecessary cast
Matthew Fernandez [Mon, 6 Sep 2021 18:12:13 +0000 (11:12 -0700)]
Tcldot_string_writer: remove unnecessary cast

This pointer implicitly coerces.

3 years agoMerge branch 'smattr/DD0814CF-B2A0-4318-A2E6-A7F84616387A' into 'main'
Matthew Fernandez [Thu, 9 Sep 2021 03:13:07 +0000 (03:13 +0000)]
Merge branch 'smattr/DD0814CF-B2A0-4318-A2E6-A7F84616387A' into 'main'

fix remaining Pylint warnings; enabling gating Pylint CI check

See merge request graphviz/graphviz!2140

3 years agomake final Pylint step fail for any non-FIXME warning/error
Matthew Fernandez [Sat, 4 Sep 2021 16:50:03 +0000 (09:50 -0700)]
make final Pylint step fail for any non-FIXME warning/error

The gating Pylint check now fails if any warning or error is detected, excluding
FIXME comments. This should hopefully lead to improved code quality in Python
introduced into the code base in future.

3 years agodisable Pylint duplicate-code warning
Matthew Fernandez [Sat, 4 Sep 2021 17:12:05 +0000 (10:12 -0700)]
disable Pylint duplicate-code warning

This triggers for a lot of Graphviz Python code because, by its nature of being
used to write test cases in Graphviz, there is inherently always going to be a
lot of similar looking code.

3 years agovuln.py: address a Pylint missing-function-docstring warning
Matthew Fernandez [Sat, 4 Sep 2021 16:47:28 +0000 (09:47 -0700)]
vuln.py: address a Pylint missing-function-docstring warning

3 years agoshapes.py: address a Pylint missing-function-docstring warning
Matthew Fernandez [Sat, 4 Sep 2021 16:47:12 +0000 (09:47 -0700)]
shapes.py: address a Pylint missing-function-docstring warning

3 years agosilence Pylint import-errors about regression_test_helpers
Matthew Fernandez [Sat, 4 Sep 2021 16:45:17 +0000 (09:45 -0700)]
silence Pylint import-errors about regression_test_helpers

I do not know why, but Pylint does not understand this import while Python
itself does. I have tried different variations, but Pylint complains about all
of them.

3 years agoregression_test_helpers.py: address a Pylint missing-function-docstring warning
Matthew Fernandez [Sat, 4 Sep 2021 16:38:41 +0000 (09:38 -0700)]
regression_test_helpers.py: address a Pylint missing-function-docstring warning

3 years agovuln.py: remove variable shadowing
Matthew Fernandez [Sat, 4 Sep 2021 16:32:48 +0000 (09:32 -0700)]
vuln.py: remove variable shadowing

3 years agoaddress Pylint missing-module-docstring warnings
Matthew Fernandez [Sat, 4 Sep 2021 16:32:26 +0000 (09:32 -0700)]
address Pylint missing-module-docstring warnings

3 years agotest_regression.py: remove unused 'stdout' variable
Matthew Fernandez [Sat, 4 Sep 2021 16:28:25 +0000 (09:28 -0700)]
test_regression.py: remove unused 'stdout' variable

3 years agochkPos: remove strcmp micro-optimization
Matthew Fernandez [Sat, 4 Sep 2021 16:24:19 +0000 (09:24 -0700)]
chkPos: remove strcmp micro-optimization

3 years agoMerge branch 'smattr/7890fb90-8b73-4677-a4f3-0f3a17dcf0ca' into 'main'
Matthew Fernandez [Thu, 9 Sep 2021 02:10:41 +0000 (02:10 +0000)]
Merge branch 'smattr/7890fb90-8b73-4677-a4f3-0f3a17dcf0ca' into 'main'

more SWIG bindings clean up

See merge request graphviz/graphviz!2147

3 years agoOCaml bindings: fix: only pass -fpermissive when compiling C++
Matthew Fernandez [Mon, 6 Sep 2021 22:11:19 +0000 (15:11 -0700)]
OCaml bindings: fix: only pass -fpermissive when compiling C++

The `-fpermissive` flag is only valid for Objective-C and C++, but was being set
for C and C++. When compiling the C part of these bindings, this was generating
the warning:

  cc1: warning: command line option ‘-fpermissive’ is valid for C++/ObjC++ but
    not for C

This flag was introduced in 8f4667edb410a6d11b53746849304fb953b5c6ae to work
around non-conformant code generation by SWIG. In future, it might be worth
investigating whether the underlying issue has been fixed in SWIG and this work
around can be removed.

3 years agoJava bindings gv_channel_writer: suppress -Wunused-parameter compiler warnings
Matthew Fernandez [Mon, 6 Sep 2021 22:07:14 +0000 (15:07 -0700)]
Java bindings gv_channel_writer: suppress -Wunused-parameter compiler warnings

3 years agoGo bindings: suppress -Wunused-function compiler warnings
Matthew Fernandez [Mon, 6 Sep 2021 22:02:58 +0000 (15:02 -0700)]
Go bindings: suppress -Wunused-function compiler warnings

SWIG generates some functions that go unused in the Graphviz bindings. There is
no value to warning about these.

3 years agoMerge branch 'smattr/ab033750-c4e7-4e83-930b-4c85fa29cdb3' into 'main'
Matthew Fernandez [Thu, 9 Sep 2021 01:04:00 +0000 (01:04 +0000)]
Merge branch 'smattr/ab033750-c4e7-4e83-930b-4c85fa29cdb3' into 'main'

BinaryHeap clean up

See merge request graphviz/graphviz!2148

3 years agoBinaryHeap: switch 'mask' in sanity check to 0 vs 1
Matthew Fernandez [Mon, 6 Sep 2021 23:53:11 +0000 (16:53 -0700)]
BinaryHeap: switch 'mask' in sanity check to 0 vs 1

Using this instead of -1 vs 1 allows slightly more efficient code.

3 years agoBinaryHeap: use 'size_t' to track heap sizes/positions instead of 'int'
Matthew Fernandez [Mon, 6 Sep 2021 23:47:36 +0000 (16:47 -0700)]
BinaryHeap: use 'size_t' to track heap sizes/positions instead of 'int'

3 years agoBinaryHeap: use 'calloc' instead of 'malloc' when allocating arrays
Matthew Fernandez [Mon, 6 Sep 2021 23:08:58 +0000 (16:08 -0700)]
BinaryHeap: use 'calloc' instead of 'malloc' when allocating arrays

There is not much we can do about the `realloc` calls, but we can at least do
initial allocation in a less error prone way.

3 years agoBinaryHeap: rephrase 'sizeof(type)' code to 'sizeof(arr[0])'
Matthew Fernandez [Mon, 6 Sep 2021 22:58:55 +0000 (15:58 -0700)]
BinaryHeap: rephrase 'sizeof(type)' code to 'sizeof(arr[0])'

This has no effect on functionality, but it makes it clearer what this code is
doing and makes it more robust against changing the underlying types.

3 years agoBinaryHeap_realloc: rephrase division by 5 code
Matthew Fernandez [Mon, 6 Sep 2021 22:39:12 +0000 (15:39 -0700)]
BinaryHeap_realloc: rephrase division by 5 code

This makes the intent of this code clearer as well as squashing a
-Wfloat-conversion compiler warning.

3 years agoMerge branch 'add-ubuntu21-04-static-build-job-to-CI' into 'main'
Magnus Jacobsson [Wed, 8 Sep 2021 20:16:24 +0000 (20:16 +0000)]
Merge branch 'add-ubuntu21-04-static-build-job-to-CI' into 'main'

Add static build for Ubuntu 21.04 to CI

See merge request graphviz/graphviz!2134

3 years agoCI: add ubuntu21-04-static-build job
Magnus Jacobsson [Sat, 7 Aug 2021 15:22:44 +0000 (17:22 +0200)]
CI: add ubuntu21-04-static-build job

3 years agoCI: remove incorrect path to .gz file in deb build template
Magnus Jacobsson [Sat, 4 Sep 2021 16:53:24 +0000 (18:53 +0200)]
CI: remove incorrect path to .gz file in deb build template

No .gz file is produced by the builds that use this template anyway.

3 years agoci/build.sh: add support for static builds using configure options
Magnus Jacobsson [Mon, 30 Aug 2021 13:48:10 +0000 (15:48 +0200)]
ci/build.sh: add support for static builds using configure options

3 years agotclpkg: install .so files only when linking dynamically
Magnus Jacobsson [Sat, 4 Sep 2021 13:55:54 +0000 (15:55 +0200)]
tclpkg: install .so files only when linking dynamically

Fixes errors like this when using static linking:

cp: cannot stat '/home/magjac/graphviz/build/lib/graphviz/ruby/libgv_ruby.so': No such file or directory

3 years agogvpack_static: force the C++ compiler to be used also for static linking
Magnus Jacobsson [Wed, 1 Sep 2021 05:27:25 +0000 (07:27 +0200)]
gvpack_static: force the C++ compiler to be used also for static linking

The trick to force the C++ compiler to be used for linking was applied
only for gvpack, not for gvpack_static.

Fixes many errors like this:

/usr/bin/ld: ../../lib/vpsc/.libs/libvpsc_C.a(csolve_VPSC.o): in function `newVariable':
csolve_VPSC.cpp:(.text+0x20): undefined reference to `operator new(unsigned long)'

3 years agoMerge branch 'add-cygwin-cmake-build-to-ci' into 'main'
Magnus Jacobsson [Wed, 8 Sep 2021 19:08:04 +0000 (19:08 +0000)]
Merge branch 'add-cygwin-cmake-build-to-ci' into 'main'

Add Cygwin CMake build to CI

See merge request graphviz/graphviz!2137

3 years agoCI: add windows-cygwin-cmake-build job
Magnus Jacobsson [Sat, 21 Aug 2021 09:09:58 +0000 (11:09 +0200)]
CI: add windows-cygwin-cmake-build job

3 years agoCPack: silence CPACK_CYGWIN_PATCH_NUMBER not set warning
Magnus Jacobsson [Thu, 2 Sep 2021 22:19:22 +0000 (00:19 +0200)]
CPack: silence CPACK_CYGWIN_PATCH_NUMBER not set warning

Silences this warning:

CPack Warning: CPACK_CYGWIN_PATCH_NUMBER not specified using 1

3 years agoCPack: generate Cygwin binary installer on Cygwin
Magnus Jacobsson [Thu, 2 Sep 2021 22:14:02 +0000 (00:14 +0200)]
CPack: generate Cygwin binary installer on Cygwin

3 years agotools: add workaround for cpack problem with Cygwin
Magnus Jacobsson [Thu, 2 Sep 2021 21:50:51 +0000 (23:50 +0200)]
tools: add workaround for cpack problem with Cygwin

Copy the gml2gv executable to to the gv2gml alias instead of
symlinking it. Creating a symlink to gml2gv works fine in itself, but
results in an error like this when running cpack:

CPack Error: Problem while adding file </home/magja/graphviz/build/_CPack_Packages/CYGWIN/ZIP/Graphviz-2.49.1~dev.20210902.2049-CYGWIN/bin/gv2gml> to archive </home/magja/graphviz/build/_CPack_Packages/CYGWIN/ZIP/Graphviz-2.49.1~dev.20210902.2049-CYGWIN.zip>, ERROR = Unable to read from file 'Graphviz-2.49.1~dev.20210902.2049-CYGWIN/bin/gv2gml': Couldn't list extended attributes

gv2gml is a symlink. Trying to read the extended attributes manually gives:

attr -l /cygdrive/c/Users/magja/graphviz/build/_CPack_Packages/CYGWIN/ZIP/Graphviz-2.49.1~dev.20210902.2049-CYGWIN/bin/gv2gml
attr_list: Permission denied
Could not list /cygdrive/c/Users/magja/graphviz/build/_CPack_Packages/CYGWIN/ZIP/Graphviz-2.49.1~dev.20210902.2049-CYGWIN/bin/gv2gml

3 years agodot: add workaround for cpack problem with Cygwin
Magnus Jacobsson [Thu, 2 Sep 2021 21:50:51 +0000 (23:50 +0200)]
dot: add workaround for cpack problem with Cygwin

Copy the dot executable to its alias commands instead of symlinking
it. Creating symlinks to dot works fine in itself, but results in an
error like this when running cpack:

CPack Error: Problem while adding file </cygdrive/c/Users/magja/graphviz/build/_CPack_Packages/CYGWIN/ZIP/Graphviz-2.49.0~dev.20210812.2025-CYGWIN/bin/circo> to archive </cygdrive/c/Users/magja/graphviz/build/_CPack_Packages/CYGWIN/ZIP/Graphviz-2.49.0~dev.20210812.2025-CYGWIN.zip>, ERROR = Unable to read from file 'Graphviz-2.49.0~dev.20210812.2025-CYGWIN/bin/circo': Couldn't list extended attributes

circo is a symlink. Trying to read the extended attributes manually gives:

attr -l /cygdrive/c/Users/magja/graphviz/build/_CPack_Packages/CYGWIN/ZIP/Graphviz-2.49.0~dev.20210812.2025-CYGWIN/bin/circo
attr_list: Permission denied
Could not list /cygdrive/c/Users/magja/graphviz/build/_CPack_Packages/CYGWIN/ZIP/Graphviz-2.49.0~dev.20210812.2025-CYGWIN/bin/circo

3 years agoadd ci/cygwin-build.sh script
Magnus Jacobsson [Wed, 1 Sep 2021 18:01:09 +0000 (20:01 +0200)]
add ci/cygwin-build.sh script

3 years agoci/build.sh: remove trailing text after actual version ID
Magnus Jacobsson [Tue, 7 Sep 2021 17:44:57 +0000 (19:44 +0200)]
ci/build.sh: remove trailing text after actual version ID

Fixes a problem on Cygwin where 'uname -r' gives:

3.2.0(0.340/5/3)

which, when used as the name of a directory, actually represents a
directory named '3.2.0(0.340', containing a subdirectory named '5'
containing a subdirectory named '3)'.

3 years agoci/build.sh: add support for Cygwin
Magnus Jacobsson [Thu, 12 Aug 2021 12:22:53 +0000 (14:22 +0200)]
ci/build.sh: add support for Cygwin

The /etc/os-release file does not exist on Cygwin so we use the more
reliable built-in bash variable OSTYPE instead.

3 years agoplugin/core: make awk crlf agnostic when generating ps.h
Magnus Jacobsson [Thu, 12 Aug 2021 20:02:48 +0000 (22:02 +0200)]
plugin/core: make awk crlf agnostic when generating ps.h

Fixes errors like this with Cygwin in a crlf environment with
SHELLOPTS=igncr:

/cygdrive/c/Users/magja/graphviz/build/plugin/core/ps.h:2:1: error: missing terminating " character
    2 | "%%BeginProlog ",
      | ^~~~~~~~~~~~~~

Although not shown in the error message, this line actually contained
a carriage return after %%BeginProlog:

"%%BeginProlog\r",

3 years agocommon: make awk crlf agnostic when generating svgcolor_lib
Magnus Jacobsson [Thu, 12 Aug 2021 19:57:44 +0000 (21:57 +0200)]
common: make awk crlf agnostic when generating svgcolor_lib

Fixes errors like this with Cygwin in a crlf environment with
SHELLOPTS=igncr:

/cygdrive/c/Users/magja/graphviz/build/lib/common/common/colortbl.h:1524:2: error: missing terminating " character
 1524 | {"/svg/ ",0,255,255,255,0,0,0},
      |  ^~~~~~

Although not shown in the error message, this line actually contained
a carriage return after /svg/:

{"/svg/\r",0,255,255,255,0,0,0},

3 years agoMerge branch 'smattr/C617D6FE-BA39-4D70-BF6F-7FAAFAEA2A69' into 'main'
Matthew Fernandez [Wed, 8 Sep 2021 14:23:55 +0000 (14:23 +0000)]
Merge branch 'smattr/C617D6FE-BA39-4D70-BF6F-7FAAFAEA2A69' into 'main'

fix: write Graphviz build version to GRAPHVIZ_VERSION file instead of VERSION

Closes #2122

See merge request graphviz/graphviz!2149

3 years agofix: write Graphviz build version to GRAPHVIZ_VERSION file instead of VERSION
Matthew Fernandez [Wed, 8 Sep 2021 03:53:51 +0000 (20:53 -0700)]
fix: write Graphviz build version to GRAPHVIZ_VERSION file instead of VERSION

C++20 standardizes a new `version` header.¹ A side effect of this is that
Autotools-driven Graphviz compilation fails when using both (1) a C++20-capable
compiler and (2) a case-insensitive file system:

  Making all in vpsc
  CXX      block.lo
  In file included from block.cpp:20:
  In file included from …/include/c++/v1/memory:667:
  In file included from …/include/c++/v1/type_traits:417:
  In file included from …/include/c++/v1/cstddef:37:
  ../../version:1:1: error: expected unqualified-id
  2.49.1~dev.20210907.1517
  ^

The core problem is that the root of the repository checkout (or unpacked
tarball) is in the compiler’s include path in order to allow including
`config.h`. But the generated `VERSION` file is also in this same directory.
Nothing in Graphviz attempts to include the C++20 `version` header, but some of
the other stdlib headers transitively include `version`.

To avoid this confusion, we rename Graphviz’ generated file.

Fixes #2122.

¹ https://en.cppreference.com/w/cpp/header/version

3 years agoautogen.sh: remove computation of GRAPHVIZ_VERSION
Matthew Fernandez [Wed, 8 Sep 2021 03:40:01 +0000 (20:40 -0700)]
autogen.sh: remove computation of GRAPHVIZ_VERSION

As of commit 46fadbefa1c7810513129051c8fa01a506316e6e, this is not longer used.

3 years agoMerge branch 'smattr/960bee28-a488-4e56-90bf-10b4b3408ad8' into 'main'
Matthew Fernandez [Tue, 7 Sep 2021 15:17:33 +0000 (15:17 +0000)]
Merge branch 'smattr/960bee28-a488-4e56-90bf-10b4b3408ad8' into 'main'

clean up of SWIG bindings code

See merge request graphviz/graphviz!2135

3 years agoclang-format tclpkg/gv/gv.cpp
Matthew Fernandez [Thu, 2 Sep 2021 02:07:22 +0000 (19:07 -0700)]
clang-format tclpkg/gv/gv.cpp

3 years agouse C++ way of #including C headers in SWIG bindings
Matthew Fernandez [Thu, 2 Sep 2021 02:08:28 +0000 (19:08 -0700)]
use C++ way of #including C headers in SWIG bindings

3 years agorephrase some integer to boolean conversions in the SWIG bindings code
Matthew Fernandez [Thu, 2 Sep 2021 02:03:12 +0000 (19:03 -0700)]
rephrase some integer to boolean conversions in the SWIG bindings code

3 years agofix comment typo in SWIG bindings code
Matthew Fernandez [Thu, 2 Sep 2021 01:59:54 +0000 (18:59 -0700)]
fix comment typo in SWIG bindings code

3 years agomove declarations closer to their usage in SWIG bindings code
Matthew Fernandez [Thu, 2 Sep 2021 01:53:31 +0000 (18:53 -0700)]
move declarations closer to their usage in SWIG bindings code

3 years agorephrase some nullptr tests in the SWIG bindings code
Matthew Fernandez [Thu, 2 Sep 2021 01:50:53 +0000 (18:50 -0700)]
rephrase some nullptr tests in the SWIG bindings code