]> git.donarmstrong.com Git - lilypond.git/blobdiff - buildscripts/guile-gnome.sh
(ic_p.make_include_option): set error_p for
[lilypond.git] / buildscripts / guile-gnome.sh
index f1f78383a6743c97a8a1c23e1377ecdd862829a6..24e88aedce6a1281b0abbd3b4f6c5847abe6469d 100644 (file)
@@ -1,19 +1,19 @@
 #!@BASH@
-# guile-gnome.sh -- download, compile, install guile-gnome
+# guile-gnome.sh -- download, compile, install g-wrap, guile-gnome TLA and
+# pango CVS
 
 # LilyPond has an experimental gnome canvas output backend -- hackers
 # only.  This depends on unreleased version of guile-gnome, which
-# depends on an unreleased, forked version of g-wrap.
+# depends on an unreleased, forked version of g-wrap.  We also need
+# pango CVS > 2004-06-12
 
 # Note: this install information is volatile, you'll probably want to
 # pull all from from guile-gnome-devel@gnu.org--2004 soon.
 
 set -ex
 
-if  [ -d $HOME/usr/pkg/libffi/ ]; then
-    export LDFLAGS=-L$HOME/usr/pkg/libffi/lib
-    export CPPFLAGS=-I$HOME/usr/pkg/libffi/include
-fi
+# Where user built stuff will be installed
+OPT=$HOME/usr/pkg
 
 if [ -x /usr/bin/gcc34 ] ;then
     export GCC=gcc34
@@ -24,10 +24,25 @@ if [ -x /usr/bin/gcc-3.4 ] ;then
 fi
 
 export AUTOMAKE=automake-1.8
-export AUTOCONF=`which autoconf2.50 `
+export ACLOCAL=aclocal-1.8
+export AUTOCONF=$(which autoconf2.50)
+export AUTOHEADER=$(which autoheader2.50)
+
+MY_LIBTOOL=$(dpkg -l libtool | tail -1 | awk '{ print $3 }')
+PANGO_LIBTOOL=1.5.6-1
+
+# Please state your love for the autotools today
+if [ "$I_LOVE_AUTOTOOLS" = "" ] ; then
+    I_LOVE_AUTOTOOLS=no
+else
+    I_LOVE_AUTOTOOLS=yes
+fi
 
-if [ "" = "$AUTOCONF" ] ; then
- unset AUTOCONF
+if [ -z "$AUTOCONF" ]; then
+    unset AUTOCONF
+fi
+if [ -z "$AUTOHEADER" ]; then
+    unset AUTOHEADER
 fi
 
 
@@ -40,40 +55,74 @@ cd test
 ##     - Debian/unstable: apt-get install gnome-devel
 ##     - ...
 
+## 2.  get pango CVS
+
+
+mkdir -p gnome/CVS
+cd gnome
+echo ":pserver:anonymous@anoncvs.gnome.org:/cvs/gnome" > CVS/Root
+echo "." > CVS/Repository
+cvs -z3 checkout -P pango
+cd pango
+rm -rf $OPT/pango
+if [ "$I_LOVE_AUTOTOOLS" = "no" ]; then
+    sudo apt-get --yes --force-yes install libtool=$PANGO_LIBTOOL
+fi    
+./autogen.sh --help
+./configure --prefix=$OPT/pango --enable-maintainer-mode --enable-gtk-doc
+make XFT_LIBS="-L/usr/lib -lXft -L/usr/X11R6/lib -lfreetype -lz -lXrender -lX11 -lfontconfig" install
+if [ "$I_LOVE_AUTOTOOLS" = "no" ]; then
+    sudo apt-get --yes --force-yes install libtool=$MY_LIBTOOL
+fi    
+
+cd ../..
+
+export PKG_CONFIG_PATH=$OPT/pango/lib/pkgconfig:$PKG_CONFIG_PATH
 
-## 2.  *** NOTE: use guile-1.6 for g-wrap and guile-gnome ***
+
+## 3.  *** NOTE: use guile-1.6 for g-wrap and guile-gnome ***
 ## using GUILE CVS g-wrap/guile-gnome is experimental (read: segfaults)
 ## Assuming that system has guile-1.6 installed in /usr/bin 
 PATH=/usr/bin:$PATH
 
-## 3.  get g-wrap 2.0
+if [ -d $OPT/libffi/ ]; then
+    export LDFLAGS=-L$OPT/libffi/lib
+    export CPPFLAGS=-I$OPT/libffi/include
+fi
+
+## 4.  get g-wrap 2.0
 tla register-archive a.rottmann@gmx.at--2004-main \
     http://people.debian.org/~rotty/arch/a.rottmann@gmx.at/2004-main || true
 
 rm -rf g-wrap
-## tla get a.rottmann@gmx.at--2004-main/g-wrap--tng g-wrap
-## pull latest g-wrap from janneke -- this step is probably no longer
-## necessary when you read this
-tla register-archive janneke@gnu.org--2004-gnome \
-    http://lilypond.org/~janneke/{arch}/2004-gnome || true
-tla get janneke@gnu.org--2004-gnome/g-wrap--janneke g-wrap
+if true; then
+    ## pull latest g-wrap from janneke -- this step is probably no longer
+    ## necessary when you read this
+    tla register-archive janneke@gnu.org--2004-gnome \
+       http://lilypond.org/~janneke/{arch}/2004-gnome || true
+    tla get janneke@gnu.org--2004-gnome/g-wrap--janneke g-wrap
+else
+    ## tla get a.rottmann@gmx.at--2004-main/g-wrap--tng g-wrap
+    tla get a.rottmann@gmx.at--2004-main/g-wrap--mainline--1.9.0 g-wrap
+fi
 cd g-wrap
 
-rm -rf $HOME/usr/pkg/g-wrap
+rm -rf $OPT/g-wrap
 sh autogen.sh --noconfigure
 mkdir =build
 cd =build
-../configure --prefix=$HOME/usr/pkg/g-wrap
+../configure --prefix=$OPT/g-wrap
 make install
 
-# cp srfi-34.scm from CVS head ?  --hwn
-(cd $HOME/usr/pkg/g-wrap/share/guile/site
- mv srfi-34.scm srfi-34.scm-g-wrap
- cp $HOME/usr/pkg/guile/share/guile-1.7/srfi/srfi-34.scm .)
+# not a good idea
+## cp srfi-34.scm from CVS head ?  --hwn
+#(cd $OPT/g-wrap/share/guile/site
+# mv srfi-34.scm srfi-34.scm-g-wrap
+# cp $OPT/guile/share/guile-1.7/srfi/srfi-34.scm .)
 
 cd ../..
 
-## 4.  get guile-gnome
+## 5.  get guile-gnome
 tla register-archive guile-gnome-devel@gnu.org--2004 \
     http://people.debian.org/~rotty/arch/guile-gnome-devel@gnu.org/2004/ || true
 rm -rf guile-gnome
@@ -82,33 +131,39 @@ cd guile-gnome
 tla build-config -r configs/gnu.org/dev
 cd src
 
-## 5.  get the gnome canvas module
+## 6.  get the gnome canvas module
 tla get guile-gnome-devel@gnu.org--2004/libgnomecanvas--dev libgnomecanvas
 
-rm -rf $HOME/usr/pkg/guile-gnome
+rm -rf $OPT/guile-gnome
+if false; then
+    libtoolize --copy --force
+    $AUTOHEADER
+    $ACLOCAL
+    $AUTOMAKE --copy --force
+    $AUTOCONF
+fi
 sh autogen.sh --noconfigure
 mkdir ../=build
 cd ../=build
 
-export GUILE_LOAD_PATH=$HOME/usr/pkg/g-wrap/share/guile/site:$GUILE_LOAD_PATH
-export LD_LIBRARY_PATH=$HOME/usr/pkg/g-wrap/lib:$LD_LIBRARY_PATH
-export PKG_CONFIG_PATH=$HOME/usr/pkg/g-wrap/lib/pkgconfig:$PKG_CONFIG_PATH
-
-# ugh
-# pango CVS wants libtool 1.5.6 (barfs with 1.6.0)
-# guile-gnome wants libtool 1.6.0 (barfs with 1.5.6)
-if  [ -d $HOME/usr/pkg/pango/ ]; then
-    export PKG_CONFIG_PATH=$HOME/usr/pkg/pango/lib/pkgconfig:$PKG_CONFIG_PATH
-    export LDFLAGS=-L$HOME/usr/pkg/pango/lib
-    export CPPFLAGS=-I$HOME/usr/pkg/pango/include/pango-1.0
-fi 
+export GUILE_LOAD_PATH=$OPT/g-wrap/share/guile/site:$GUILE_LOAD_PATH
+export LD_LIBRARY_PATH=$OPT/g-wrap/lib:$LD_LIBRARY_PATH
+PKG_CONFIG_PATH=$OPT/g-wrap/lib/pkgconfig:$PKG_CONFIG_PATH
 
-../src/configure --prefix=$HOME/usr/pkg/guile-gnome
+../src/configure --prefix=$OPT/guile-gnome
 
-G_WRAP_MODULE_DIR=$HOME/usr/pkg/g-wrap/share/guile/site make install CC=$GCC
+# Using libtool < 1.6.0 together with gcc-3.4 may trigger this problem:
+#
+#    If a tag has not been given, and we're using a compiler which is
+#    not one of the ones with which libtool was built, attempt to
+#    infer the compiler from the first word of the command line passed
+#    to libtool.
+#
+# Use gcc-3.3 or libtool-1.6.0
+make install CC=$GCC G_WRAP_MODULE_DIR=$OPT/g-wrap/share/guile/site
 
-export GUILE_LOAD_PATH=$HOME/usr/pkg/guile-gnome/share/guile:$GUILE_LOAD_PATH
-export LD_LIBRARY_PATH=$HOME/usr/pkg/guile-gnome/lib:$LD_LIBRARY_PATH
+GUILE_LOAD_PATH=$OPT/guile-gnome/share/guile:$GUILE_LOAD_PATH
+LD_LIBRARY_PATH=$OPT/guile-gnome/lib:$LD_LIBRARY_PATH
 
 # simple test
 guile -s ../src/libgnomecanvas/examples/canvas.scm