Installing Shapes
Shapes is written to be as platform independent as possible, but the system is developed on Macintosh and Linux and has not been tested under Windows. As a concequence, the instructions given here might need to be adjusted in order to get Shapes running in Windows.
This install guide will guide you obtaining shapes, making sure all dependencies are available, and finally compile and install the program.
The source code can be downloaded from the Shapes
project area at SourceForge. The source is available in files named
shapes-w-x-y-z.tar.gz, where a change in
z is a pure bug fix without new functionality, a change in
y should be only backwards compatible feature fixes, and
x is used to indicate backwards incompatible changes. The
w will remain at 0 as long as the are plans for substantial changes to the core language.
In order to build the Shapes compiler from the downloaded source, the following software need to be installed on your system:
These libraries need to be present on your computer in order to install Shapes:
zlib, the compression library. The source and install instructions can be obtained from the
zlib homepage.
The
GNU libiconv library, for conversions between various character encodings. Refer to the
library homepage to get the software.
The GNU Scientific Library (
GSL) v 1.9 or later, for mathematical algorithms. Obtain
GSL from its
homepage.
A working
LaTeX installation is optional, but to produce labels with beautifully formatted math you need it. Other libraries enable Shapes to deal with raster image files and font files. To test whether a Shapes compiler has been built with a particular optional library, one can use the
--version command line option, and check the list of build options.
LaTeX, the typesetting language. There are many
TeX distributions available, one free and suitable is
TeX Live, download the latest
TeX Live distribution form
tug.org.
libpng, the reference implementation of the
Portable Network Graphics standard. Enables import of raster image files in the
png format. Version 1.2.37 or higher is recommended for security reasons, but any old version which comes with
libpng-config will probably do. Sources can be ontained from the
libpng homepage. Name of build option in the compiler version information:
PNG.
libjpeg, the reference implementation of the
Joint Photographic Expers Group standard. Enables import of raster image files in the
jpeg format. Sources can be ontained from the
Independent jpeg Group. Name of build option in the compiler version information:
JPEG.
Freetype 2, a font engine. Without it, Shapes is limited to the 14 standard fonts mentioned in the
pdf standard (using
LaTeX does not count as using fonts with respect to install dependencies). FreeType 2 should already be installed on most platforms, but in case it is not, it can be obtained from the
FreetType project's homepage. Library version 10 or higher is required to allow font embedding (this is not the same as the FreeType version; use
freetype-config --version
to determine the library version). Name of build option in the compiler version information:
FreeType.
OpenSSL, providing a full-strength general purpose cryptography library. Enables high quality generation of
pdf document identity strings. Sources can be ontained from
The OpenSSL Project. Name of build option in the compiler version information:
OpenSSL.
Assuming the downloaded file was called shapes-x-y-z.tar.gz, the standard procedure below contains the necessary steps.
tar zxf shapes-x-y-z.tar.gz
cd shapes-x-y-z
./configure
make
make check
sudo make install
You may omit the “make check” part if you like, but it won't save you much time. Also, the “sudo” word at the beginning of the last line may not be appropriate for your system, or not required if the installation was configured to install somewhere where your user has permission to write files.
To see for yourself that the program is installed, run
shapes --version
and shapes should reply with just installed version of Shapes. You can also try to view the online help:
man shapes
To help out develop Shapes some more packages are needed, depending on which part of Shapes you are interested in, you need different tools as outlined below. Any and all improvements are very welcome and should be sent by e-mail to
tiddeweb@gmail.com.
First you should get a hold of the very latest version of the Shapes soure. To do this you need to use git.
With git installed, Shapes can be cloned from git://repo.or.cz/shapes.git.
To further compile the obtained source, the GNU Autoconf-Automake-Libtool toolchain is needed in combination with Flex and Bison.
GNU Autoconf can be downloaded from its
homepage.
GNU Libtool (GNU Portable Library Tool) is available from
GNU.
Bison 2.3, needed only if you want to change the way Shapes parse source code. Obtain a current verson of
Bison from
GNU.
Flex 2.5.33, needed to modify the scanners used by Shapes. Download a sufficiently new version of
Flex from
Sourceforge.
To run the Shapes test suit, convert from ImageMagick is needed to compare the generated images.
ImageMagick 6.4.0, download it from
here.
Saxon is used to transform the documentation from the xml format it is written in to man-pages and html. In this process ImageMagick is used too.
Saxon 9.0.0.2 is available from its homepage at
Sourceforge. To tell
configure where it can be found, you may either set the environment variable SAXON_PATH, or use the option
--with-saxon-path=. The indicated directory shall contain the file
saxon9.jar.
To check the documentation before making it available online, it is recommended to use LinkChecker. The use of such a tool is optional (but recommended) unless you are a project maintainer.
LinkChecker can be installed from a clone of the repository at
GitHub. Note that both Python requirements and the installed LinkChecker Python files must be on the
PYTHONPATH.
With the required tools installed, the following example shows how to build the branch next in the main repository (note the autoreconf step, which produces the configure script).
git clone git://repo.or.cz/shapes.git shapes
cd shapes
git co -b next origin/next
autoreconf -ivfs
./configure
make
make check
sudo make install
Additional documents detailing the development and maintenance of the project are located in the doc/procedures directory of the repository.