Emden R. Gansner [Tue, 14 Mar 2017 21:39:47 +0000 (17:39 -0400)]
Remove duplicate declaration of gd fonts; re-add extern. Without extern, thesewill be defined locally and uninitialized. We want these to bind to gdFontPtrs
defined in libgd.
Erwin Janssen [Sun, 5 Mar 2017 12:26:36 +0000 (13:26 +0100)]
Enable JSON on Windows build
The JSON module was not included in the Windows build because of some
errors. These errors were caused by two function from gvc not being added
to the Windows definition file. This is now resolved and JSON is added.
Erwin Janssen [Fri, 10 Feb 2017 09:57:03 +0000 (10:57 +0100)]
Use <type>_MAX instead of <type>_SIZE, rectangle.c
Instead of using the custom defined <type>_SIZE defines in
lib/label/rectangle.c function RectAra, we now use the defines
<type>_MAX from the standard library. The meaning is the same, but it is
more portable and requires less checks.
Erwin Janssen [Thu, 9 Feb 2017 06:57:08 +0000 (07:57 +0100)]
Remove `#ifdef _UWIN` block with hard path include
The header globals.h had an `#ifdef _UWIN` block at the top. This block
had an include with a hard path, which is a bad idea. Since it has
been 12 years since this block has been modified an UWIN isn't used in
the current build, we remove this block.
Erwin Janssen [Wed, 8 Feb 2017 19:36:35 +0000 (20:36 +0100)]
Remove `AC_HEADER_DIRENT` from configure.ac
The check `AC_HEADER_DIRENT` is no longer needed, as all current UNIX
systems have the correct version of this header. The checks and
corresponding define can be removed.
Erwin Janssen [Mon, 6 Feb 2017 17:12:22 +0000 (18:12 +0100)]
Remove HAVE_STDBOOL_H check from common/logic.h
This header check was removed earlier, but this one was missed. The C++
check can also be removed, because the stdbool.h header files includes is
check by itself.
Erwin Janssen [Sat, 4 Feb 2017 10:21:18 +0000 (11:21 +0100)]
Don't use path as variable name in colortbl.awk
Instead of using `argv[1]` to name the variable, we now always call it
`color_lib` in awk/colortbl.awk. The reason for this, is in some build
configurations, like the Visual Studio and CMake build, the full path to
the color_lib file is used. This resulted in the variable conaining
slashes, etc. Since the rest of the code already assumes this variable is
called `color_lib`, there is no problem with hard coding it in
colortbl.awk
Erwin Janssen [Tue, 31 Jan 2017 15:57:32 +0000 (16:57 +0100)]
Remove email address from .travis.yml
Notifications about the build were now always send to John, even when
someone else, in their own fork, was using Travis. This should send the
emails to the one that issued the build.
Erwin Janssen [Tue, 31 Jan 2017 13:29:46 +0000 (14:29 +0100)]
Made libgvpr a dynamic library on Windows
libgvpr is a dynamic library with the Autotools build, but was for some
reason a static library on Windows. Since Autotools is considered the
default, this commit makes libgvpr a dynamic library on Windows as well.
The added define "GVPR_API", is used for linking, so a seperate gvpr.def
file is not needed. On non-Windows platforms, this define is set to
"extern", so nothing changes there.
Emden Gansner [Wed, 1 Mar 2017 19:54:27 +0000 (14:54 -0500)]
Fix rtest.sh to use test data based on system running the tests;
add test data for Ubuntu;
remove absolute paths containing dperry-make relative to the rtest directory.
Erwin Janssen [Sat, 11 Feb 2017 10:33:37 +0000 (11:33 +0100)]
Update test reference files after indent change
The recent change in the indentation of the dot output, caused tests
regarding gv and xdot output to fail. A minor difference in indentation
was the cause (a single space), but the indentation is now better aligned.
We update the rest reference files to reflect this update.
Erwin Janssen [Thu, 26 Jan 2017 12:56:15 +0000 (13:56 +0100)]
Use awk to generate colortbl.h on Windows
Instead of using the pregenerated colortbl.h in windows/include, we now
include awk in windows/dependencies/graphviz-build-utilities and use this
to generate colortbl.h
Erwin Janssen [Fri, 20 Jan 2017 18:02:04 +0000 (19:02 +0100)]
Add lib/sfdpgen to CMake build
The static library 'sfdpgen' has no dependencies, but the `WITH_SFDP`
option had to be added, for this is also done in the Autotools build.
If WITH_SFDP is set, the define SFDP is also added (also added this for
ORTHO, this was missing).
Erwin Janssen [Fri, 20 Jan 2017 16:55:41 +0000 (17:55 +0100)]
Add lib/vpsc to CMake build
The static library 'vpsc' has no dependencies, but the `WITH_IPSEPCOLA`
option had to be added, for this is also done in the Autotools build. This
library is disabled by default due to C++ portability issues.
Erwin Janssen [Thu, 5 Jan 2017 09:07:48 +0000 (10:07 +0100)]
Replace "." with "${CMAKE_CURRENT_SOURCE_DIR}"
When specifying the current source directory as an include directory, both
"." and "${CMAKE_CURRENT_SOURCE_DIR}" mean the same, but the latter is
more descriptive.
Erwin Janssen [Tue, 3 Jan 2017 12:35:12 +0000 (13:35 +0100)]
Modify files generated by Bison and Flex, to match the Autotools build.
- Replace "yy" with "aag" in all three files
- Replace "unsigned long int" with "uint64_t" in grammar.h and grammar.c
- Replace "unsigned long" with "uint64_t" in grammar.h and grammar.c
- Remove declaration of the "isatty()" function from scan.c
Erwin Janssen [Sun, 1 Jan 2017 16:12:21 +0000 (17:12 +0100)]
Add lib/cgraph to the CMake build
Before lib/cgraph can be build, a few checks have to be done for available
headers and functions. This is done in the main CMakeLists.txt.
The generate the required files with BISON and FLEX, the build-in CMake
modules for BISON and FLEX can be used.
Erwin Janssen [Sat, 31 Dec 2016 12:55:00 +0000 (13:55 +0100)]
Add (so)version specification to cdt CMake build
The `set_target_properties` function can be used to set the version and
soversion properties. The versions are set to the current Autotools
version numbers.
Erwin Janssen [Sat, 31 Dec 2016 12:05:14 +0000 (13:05 +0100)]
Add 'uninstall' target to CMake build
When CMake performs the 'install' step, it keeps track of the installed
files by listing them in the `install_manifest.txt` file. The 'uninstall'
step reverses the installation by removing the files listed in the
manifest. This solution is taken directly from the CMake FAQ:
https://cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3://cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F
Erwin Janssen [Thu, 29 Dec 2016 11:41:06 +0000 (12:41 +0100)]
Add install target and initial packaging to CMake
The installation locations are identical to the Autotools install step,
but the pdf version of the manpages aren't generated yet.
With CPack, packages can be generated based on the `install` commands. For
now only the basic ZIP package generator is added.
Added the new CMake commands to the Travis and Appveyor scripts.
Erwin Janssen [Tue, 20 Dec 2016 19:38:45 +0000 (20:38 +0100)]
CMake: Add Graphviz version information
Adds version numbers to the main CMakeLists.txt. The build version is set
to the date and time of the most recent commit, similar to the Autotools
build.
- Add CMake installation to Centos 7 dockerfile
- New build script for CMake
- Add `BUILD_SYSTEM` variable to Travis: perform Autotools and CMake build, both on native Travis and Docker.
Erwin Janssen [Mon, 19 Dec 2016 15:03:57 +0000 (16:03 +0100)]
Initial minimal CMake project
A CMake project consists of CMakeLists.txt files. The primary file in the
root of the project specifies global project information and
configuration. CMakeLists.txt files in subdirectories can contain
configuration for how to build to binaries.
This configuration minimal configuration only builds lib/cdt as a shared
(dynamic) library. CMake supports out of source builds, which is the
recommended way of building:
mkdir build
cd build
cmake ..
cmake --build .
The `cmake ..` generates the build files. On Unix based systems, it
gerenates makefiles, on Windows it generates Visual Studio projects. The
used generated can be specified with -G.
Erwin Janssen [Tue, 17 Jan 2017 16:41:06 +0000 (17:41 +0100)]
Use prebuild libgd from windows deps submodule
Instead of building libgd manually before Graphviz can be build, we
included a prebuild version of libgd in the graphviz windows dependencies
submodule. The doc/winbuild.html is updated to reflect this.
Erwin Janssen [Mon, 16 Jan 2017 12:50:05 +0000 (13:50 +0100)]
Merge Windows dependencies into one submodule
Instead of using a submodule for every Windows dependency with a lot of
extra files, we now use a single submodule that only contains those files
that are required. This means fewer submodules and shorter download time
(because of the reduction in size and number of files).
Also removed some unused links in Smyrna.
Erwin Janssen [Wed, 11 Jan 2017 13:59:11 +0000 (14:59 +0100)]
Replace checks for `WIN32` with `_WIN32`
The preprocesser macro `WIN32` is defined by the user, while `_WIN32` is
defined by the compiler. To improve consistantcy, and prevent errors
caused by forgetting to define `WIN32` somewhere, it is better to use
`_WIN32` to check for Windows.
Erwin Janssen [Mon, 9 Jan 2017 17:54:44 +0000 (18:54 +0100)]
Remove mmap code from sfio
There are multiple reasons to remove this code:
- The define that guards all the mmap code (_mmap_worthy) is rarely set.
When building local or on Travis, the define isn't set.
On Windows, it is never set.
- If a 'binary compatibility package' of sfio is build (when _SFBINARY_H
is defined), `_sys_mann` is `undef`ed, excluding mmap code from the build.
Instead of keeping the code that is rarely included, we can reduce code
complexity by removing it.
Erwin Janssen [Mon, 9 Jan 2017 12:11:52 +0000 (13:11 +0100)]
Assume default memchr and memcpy are fast enough
`features/sfio` contains some test that check if the default memchr and
memcpy are "fast enough". These days we can safely assume that this is the
case, also because this define is always enabled when running the tests.
Erwin Janssen [Mon, 9 Jan 2017 11:50:49 +0000 (12:50 +0100)]
Remove checks bcopy and bzero from features/sfio
The code contains several checks regarding these functions, but they are
never actually used in lib/sfio. It is therefore not needed to test their
availability.
Erwin Janssen [Mon, 9 Jan 2017 12:56:29 +0000 (13:56 +0100)]
Remove disabled vt_threaded code from lib/sfio
The threaded part of sfio and vthread is disabled for Graphviz by setting
various defines. This commit removes the disabled code entirely, to make
it more clear which code is actually part of the compilation.
Erwin Janssen [Sun, 8 Jan 2017 23:45:02 +0000 (00:45 +0100)]
Remove usage of _ast_int and _ast_flt defines
The definition of these defines was removed in a previous commit
(2ee0993a22db6faa8506ac1c69164a5120dbd76c) but the usage was still
present. This is corrected by removing the usage as well.
Erwin Janssen [Sat, 7 Jan 2017 18:19:40 +0000 (19:19 +0100)]
Fix incorrect assignment in gvCloneGVC function
The function `gvCloneGVC` creates a new `GVC_t` object and copies the values
from gvc0 to gvc. In the last assignment, gvc->packages is given the value
of itself: gvc->pckages. This should be gvc0 instead.
Erwin Janssen [Sat, 7 Jan 2017 11:51:01 +0000 (12:51 +0100)]
Fixed use of unitialized variable in lefty
In the file cmd/lefty/ws/x11/gquery.c, function Gqwpopaction:
THe char c is declared without initializer, giving it a unpredictable
value. If the next if statement takes the false branch, the function where
c is set is not executed. The next if statement then checks `c != 13`, but
because C could have any value, the behavior is unpredictable.
Initializing c with a known value, such as 0, fixes the problem.
Erwin Janssen [Fri, 6 Jan 2017 14:06:42 +0000 (15:06 +0100)]
Replace Windows' pragma linking with VS linking
In various places, mostly the projects in `cmd` and `plugin`, had a
`#pragma comment( lib, "libname.lib" )` in the source code for linking
under Windows. Were possible, these have been removed and replaced link
specifications in the Visual Studio project files.
This seperates the linking from the source code and makes transitioning to
other build systems easier.
Erwin Janssen [Thu, 5 Jan 2017 23:59:09 +0000 (00:59 +0100)]
Made vmalloc a static library on Windows
vmalloc is a static library with the Autotools build, but was for some
reason a dynamic library on Windows. Since Autotools is considered the
default, this commit makes vmalloc a static library on Windows as well.
To disable the function export that is required for a dynamic library,
but not for a static one, various define checks were removed.
Erwin Janssen [Thu, 5 Jan 2017 14:00:38 +0000 (15:00 +0100)]
Remove usage of features/vmalloc
The only check left in features/vmalloc, checks if the return type of
malloc is the old `char *`. Because we are using standard C, we can
always assume the returntype of malloc is `void *`, this define is
there never set. We can remove this check and with it the usage of
features/vmalloc and FEATURE/vmalloc.