[The system for doing this was completely rewritten/restructured in March 2010 so previous code/canvas versions have been archived.]
To use Gnomes foocanvas widget for ZMap we have to make a number of modifications and additions. You will need to install this altered version of foocanvas in order to build and use zmap. This directory contains the source files, diff files and scripts used to construct our version of the foocanvas. This is not straight forward because:
We manage this using diff and patch to merge our code into the standard foocanvas.
There are two separate processes, the whole thing has to be "boot-strapped", i.e. you can't make a diff between the zmap version and the original until you have a zmap version, from then on it's an "updating" process of downloading the latest foocanvas from gnome and merging our changes into it.
There are a set of scripts that download, diff, patch and package files to produce the zmap version of foocanvas.
The scripts require a certain directory structure and should be run from the cvs directory where they are found (the root directory for the zmap version of foocanvas):
----- gnome_foocanvas (contains latest gnome foocanvas, this remains an | unaltered copy for reference when the merge goes wrong) | foocanvas ---|----- merged_foocanvas (after processing contains the merge of the latest | gnome foocanvas with the zmap foocanvas code) | ----- zmap_foocanvas (held in CVS, contains diffs and all source files that are new or modified for zmap foocanvas, this remains unaltered by the merge but is updated once the merge is successful)
The scripts are:
This needed to be done initially but shouldn't need to be done again unless either zmap or foocanvas change radically in which case a remerge by hand may be appropriate.
This is the standard procedure for either updating the version of gnome foocanvas or adding new zmap code to the merged foocanvas.
The output of "makedist" is a gzip'd file that can be moved to a system and used to build zmap foocanvas on that system. The build requires that the system has the autoconf tools installed and will not work without them. It also requires that the user has the right permissions to install the zmap foocanvas into the chosen install directories (e.g. for /usr the user may need to able to use sudo).
The build install steps are:
export ACLOCAL_FLAGS=" -I <path to autoconf tools>" # NOTE the spaces !!!!! e.g. export ACLOCAL_FLAGS=" -I /opt/local/share/aclocal" # NOTE the spaces !!!!!
./autogen.sh --prefix=<directory where you will want to install foocanvas> e.g. ./autogen.sh --prefix=/opt/local
make
make install
We use a combination of diff and patch to manage the merge of zmap foocanvas code into gnome foocanvas code. It is possible to add versioning to diff files to stop the wrong diff's being applied. The Prereq flag can be used for this purpose:
Prereq: 1.1.1 --- old.txt 2010-03-05 09:43:46.000000000 +0000 +++ new.txt 2010-03-05 09:43:05.000000000 +0000 @@ -1,5 +1,5 @@ -line 1 of target +first line of target second line of target
All files in zmap_source would need to have the version number that follows "Prereq:" embedded in them and then patch would not do the merge unless the user forced it. Currently this is not implemented because it would be tedious.
Notes from the previous system which may be useful if there are problems.
Creating the tar.gz ------------------- $ gcvs co -d libfoocanvas-VERSION foocanvas *** additional files fix *** now we have additional files this step is a little more difficult and makes me think we should just distribute a fully patched tar.gz. $ cd libfoocanvas-VERSION/libfoocanvas/ $ patch -p0 -u < ../path/to/additional_files/Makefile.am.patch $ cp ../path/to/additional_files/*.{c,h} . **************************** now make all the autoconf stuff. I had to do this first. NOT $ export AUTOMAKE=~/bin/automake try this... $ export AUTOMAKE=/nfs/team71/acedb/zmap/prefix/LINUX/bin/automake aclocal needs to be told where it's m4 files are. ~zmap/prefix/LINUX/share/aclocal ~zmap/prefix/LINUX/share/aclocal-1.9 are good bets at the moment. glib-gettext.m4 seems to be a dependancy which breaks everything silently.... NOT $ export ACLOCAL_FLAGS="-I ~/share/aclocal -I ~/share/aclocal-1.9" try this... $ export ACLOCAL_FLAGS='-I /nfs/team71/acedb/zmap/prefix/LINUX/share/aclocal -I /nfs/team71/acedb/zmap/prefix/LINUX/share/aclocal-1.9' autogen.sh also requires gnome-common $ gcvs co gnome-common; ./configure; make; make install For the last build (20060326) I had to modify autogen.sh and configure.in as per build.patch. Unsure as to why, possibly a broken autotools setup. $ ./autogen.sh $ make dist-gzip this uses VERSION from configure.in (currently 0.1), I was using YYYYMMDD, who knows what's best. to change this edit the Makefile -distdir = $(PACKAGE)-$(VERSION) +distdir = $(PACKAGE)-YYYYMMDD $ mv libfoocanvas-VERSION.tar.gz ZMap/foocanvas/support/ $ cvs add -ko -m'message' libfoocanvas-VERSION.tar.gz $ cvs commit -m'message' libfoocanvas-VERSION.tar.gz Should alter untar_patch.sh to set the version variable to VERSION and tag the files as libfoocanvas-VERSION. Test by running ./untar_patch.sh and seeing no errors in patch and a complete build