Skip to content
Snippets Groups Projects
Commit 2403aef7 authored by edgrif's avatar edgrif
Browse files

add option to create a patched foocanvas just from our cvs copy.

parent 8d4ad285
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,15 @@ autogen.sh --prefix=<directory where you will want to install foocanvas>
when that has finished you can simply type 'make' and 'make install'
Alternatively if you simply want to do a build with the current patch and the
version of foocanvas that the patch was created from (stored in cvs with the
patch) then you use the -b flag:
make_working_foocanvas -b
This produces the same directory structure as before and you run autogen.sh as
before.
make_cvs_foocanvas
------------------
......
......@@ -7,6 +7,30 @@
scriptname=`basename $0`
# set up usage strings.
cmdstring='[ -b ]'
descstring='
-b build copy only, do not check out latest foocanvas from gnome site but instead
use copy of foocanvas code in cvs to do patch and build.'
usage ()
{
if [ -n "$3" ]
then
echo
echo "Warning: $3"
fi
echo
echo "Usage: $scriptname $1"
echo
echo "$2"
echo
exit 1
}
msgAndExit ()
{
errmsg="$scriptname - Fatal Error: $1 !!"
......@@ -21,6 +45,15 @@ working_dir='foocanvas.working'
latest_dir='foocanvas.latest'
support_dir='support'
our_src_dir='additional_files'
buildonly=''
while getopts ":b" opt ; do
case $opt in
b ) buildonly='TRUE' ;;
\? ) usage "$cmdstring" "$descstring" "Bad command line flag"
esac
done
......@@ -35,12 +68,6 @@ mkdir $patch_dir || msgAndExit "could not make $patch_dir"
cd $patch_dir || msgAndExit "could not cd to $patch_dir"
# Get the latest foo canvas....
svn co http://svn.gnome.org/svn/foocanvas/trunk $latest_dir || msgAndExit "cannot get latest foocanvas source, check settings in $HOME/.subversion"
cp -r $latest_dir $working_dir || msgAndExit "cannot make working copy of latest canvas source"
# Get the last patch file...relies on naming convention for patch files keeping them in date order.
for i in `ls ../$support_dir/libfoocanvas-*.patch`
do
......@@ -49,6 +76,34 @@ done
cp "../$support_dir/$patch_file" . || msgAndExit "copy of ../$support_dir/$patch_file failed"
# decide which version of foocanvas to use...
if [ -z "$buildonly" ] ; then
# Get the latest foo canvas....
svn co http://svn.gnome.org/svn/foocanvas/trunk $latest_dir || msgAndExit "cannot get latest foocanvas source, check settings in $HOME/.subversion"
else
# use foocanvas version in cvs, note we use same trick to get latest file as above for patch file.
for i in `ls ../$support_dir/libfoocanvas-*.tar.gz`
do
tar_file=$i
done
tar_file=`basename $tar_file`
cp "../$support_dir/$tar_file" . || msgAndExit "copy of ../$support_dir/$tar_file failed"
tar -zxf$tar_file
tar_base=`basename $tar_file .tar.gz`
mv $tar_base $latest_dir
rm -f $tar_file
fi
cp -r $latest_dir $working_dir || msgAndExit "cannot make working copy of latest canvas source"
# Get our source files.
cp ../$our_src_dir/*.[ch] $working_dir/libfoocanvas || msgAndExit "copy of .c and .h files failed"
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment