tumblr hit tracking tool

gv for Mac OS X

gv is useful for displaying Postscript files, such as those created with GMT, from the command line and can be included easily in plotting scripts.

gv requires the Xaw3d libraries and header files, which are not included in Apple's Xcode developer suite. One must therefore install Xaw3d first.

Installing Xaw3d (version 1.6 and beyond)

The distribution of Xaw3d was recently taken over by freedesktop.org. The source code has been suitably updated as of version 1.6 so as not to require the antiquated imake (or xmkmf) utility. It may now be installed using a standard configure-and-make routine described below. Information for installing Xaw3d up to version 1.5E can still be viewed on the old page here.

There appears to be a problem with the latest Xaw3d source code versions (1.6.1 and 1.6.2) when opening gv, so I recommend installing version 1.6 for use with gv. The version 1.6 source code may be downloaded as a bzip'd or gzip'd tar-file. Unzip and expand the tar-file in an appropriate directory. Change to the newly created libXaw3d-1.6/ directory.

To avoid having to install and use the pkg-config utility, add explicit environment variables to the configure command to call the necessary X11 headers and libraries:

./configure X11_CFLAGS='-I/usr/X11/include/X11' X11_LIBS='-L/usr/X11/lib -lX11 -lXext -lXmu -lXt'

followed by the usual sequence of make commands, e.g.

make
sudo make install
make clean

This will install Xaw3d headers in /usr/local/include/X11/Xaw3d/ and libraries in /usr/local/lib/, which should make these available through the system's default paths.

Installing gv

With Xaw3d installed, one may now install gv from source. The source code is available here (latest version is 3.7.3). Unzip and expand the tar-file, and change to the newly created directory as before.

There seems to be an (easily corrected) error in the source code of Scrollbar.c. A patch report suggests a solution by editing src/Scrollbar.c at line 1009:

(*swclass->threeD_class.shadowdraw) (w, event, region, FALSE);

to read

(*swclass->threeD_class.shadowdraw) (w, event, region, sbw->threeD.relief, FALSE);

On Mac, the configuration also seems to require the addition of the --enable-SIGCHLD-fallback flag (I also include the X libraries and includes although I don't know if these are really necessary), e.g.

./configure --x-includes=/usr/X11/include/X11 --x-libraries=/usr/X11/lib --enable-SIGCHLD-fallback

followed by the usual sequence of make commands, e.g.

make
sudo make install
make clean

This will install gv in /usr/local/bin/, which should make gv available through the system's default paths.