X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=buildscripts%2Fguile-gnome.sh;h=194dad2c27e649bccdaa49c6724e4b306c593efe;hb=5fb7bb9dc69cb508cf5d737a4359048237ea5984;hp=65c80db1da1bd08c0ecf59cb6b75834dc6f65123;hpb=147af47bfca077bf568dfc07bdcc82e0dcf0d779;p=lilypond.git diff --git a/buildscripts/guile-gnome.sh b/buildscripts/guile-gnome.sh index 65c80db1da..194dad2c27 100644 --- a/buildscripts/guile-gnome.sh +++ b/buildscripts/guile-gnome.sh @@ -1,112 +1,210 @@ #!@BASH@ -# guile-gnome.sh -- download, compile, install guile-gnome -# 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. +# guile-gnome.sh -- download, compile, install g-wrap, guile-gnome, +# pango -# Note: this install information is volatile, you'll probably want to -# pull all from from guile-gnome-devel@gnu.org--2004 soon. +# LilyPond has an experimental gnome canvas output backend -- hackers +# only. This depends on rather new versions of guile-gnome, g-wrap +# and pango. 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 +# When using GUILE CVS, make a slib/require like so +cat > /dev/null < CVS/Root + echo "." > CVS/Repository + cvs -z3 checkout -P pango + else + $WGET ftp://ftp.gtk.org/pub/gtk/v2.5/pango-1.5.2.tar.gz + tar -xzf pango-1.5.2.tar.gz + ln -s pango-1.5.2 pango + fi + cd pango + rm -rf $OPT/pango + if [ ! -f configure ]; then + ./autogen.sh --help + fi + ./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 + cd ../.. +fi -## 2. *** 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 +## 3. Currently (2004-9-15) GUILE CVS works somewhat +## But there's a guile/g-wrap problem with integer parameters +unset GUILE_LOAD_PATH PATH=/usr/bin:$PATH -## 3. 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 -cd g-wrap - -rm -rf $HOME/usr/pkg/g-wrap -sh autogen.sh --noconfigure -mkdir =build -cd =build -../configure --prefix=$HOME/usr/pkg/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 .) - -cd ../.. - -## 4. 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 -tla get guile-gnome-devel@gnu.org--2004/dists--dev guile-gnome -cd guile-gnome -tla build-config -r configs/gnu.org/dev -cd src - -## 5. get the gnome canvas module -tla get guile-gnome-devel@gnu.org--2004/libgnomecanvas--dev libgnomecanvas - -rm -rf $HOME/usr/pkg/guile-gnome -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 - -../src/configure --prefix=$HOME/usr/pkg/guile-gnome - -if [ -x /usr/bin/gcc-3.4 ]; then - G_WRAP_MODULE_DIR=$HOME/usr/pkg/g-wrap/share/guile/site make install CC=gcc-3.4 -else - ## requires 800mb RAM with -O2 -- are you sure that's not for ./gtk ? - (cd libgnomecanvas/gnome/gw; perl -i~ -pe 's/-O2//g' Makefile) - G_WRAP_MODULE_DIR=$HOME/usr/pkg/g-wrap/share/guile/site make install +if [ -d $OPT/libffi/ ]; then + export LDFLAGS=-L$OPT/libffi/lib + export CPPFLAGS=-I$OPT/libffi/include +fi + +PKG_CONFIG_PATH=$OPT/g-wrap/lib/pkgconfig:$PKG_CONFIG_PATH +LD_LIBRARY_PATH=$OPT/g-wrap/lib:$LD_LIBRARY_PATH +GUILE_LOAD_PATH=$OPT/g-wrap/share/guile/site:$GUILE_LOAD_PATH:$SLIB_PATH + + +## 4. get g-wrap 2.0 +## note that bleeding edge (2004-9-13) g-wrap breaks guile-gnome. +if ! pkg-config --exact-version=1.9.1 g-wrap-2.0-guile; then + if [ -n "$BLOEDIGE_RAND" ]; then + tla register-archive a.rottmann@gmx.at--2004-main \ + http://people.debian.org/~rotty/arch/a.rottmann@gmx.at/2004-main || true + + ## 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 + tla get a.rottmann@gmx.at--2004-main/g-wrap--dev--0 g-wrap + ## ughr: + mkdir -p g-wrap/libffi + else + $WGET http://savannah.nongnu.org/download/g-wrap/g-wrap-$GWRAPVERSION.tar.gz + tar xzf $download/g-wrap-$GWRAPVERSION.tar.gz + ln -s g-wrap-$GWRAPVERSION g-wrap + fi + cd g-wrap + + rm -rf $OPT/g-wrap + if [ ! -f configure ]; then + sh autogen.sh --noconfigure + fi + mkdir =build + cd =build + ../configure --prefix=$OPT/g-wrap --enable-maintainer-mode + make install + cd ../.. +fi + + +# 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 .) + +PKG_CONFIG_PATH=$OPT/guile-gnome/lib/pkgconfig:$PKG_CONFIG_PATH +LD_LIBRARY_PATH=$OPT/guile-gnome/lib:$LD_LIBRARY_PATH +GUILE_LOAD_PATH=$OPT/guile-gnome/share/guile:$GUILE_LOAD_PATH +## 5. get guile-gnome +if ! pkg-config --atleast-version=$GGVERSION guile-gnome-glib; then + if [ -n "$BLOEDIGE_RAND" ]; then + + if false; then # rotty + tla register-archive guile-gnome-devel@gnu.org--2004 \ + http://people.debian.org/~rotty/arch/guile-gnome-devel@gnu.org/2004/ || true + tla get guile-gnome-devel@gnu.org--2004/dists--dev guile-gnome + cd guile-gnome + tla build-config -r configs/gnu.org/dev + cd src + + # 5a. get extra modules (gnome canvas) + for i in $EXTRA; do + tla get guile-gnome-devel@gnu.org--2004/$i--dev $i + done + else # andy + tla register-archive wingo@pobox.com--2004-main \ + http://ambient.2y.net/wingo/arch/wingo@pobox.com--2004-main || true + + tla get wingo@pobox.com--2004-main/guile-gnome-dists--release guile-gnome + cd guile-gnome + tla build-config -r configs/gnu.org/guile-gnome-platform-$GGVERSION + cd src + EXTRA="pkg atk defs glib gstreamer gtk gtksourceview libgda libglade libgnome libgnomeui pango libgnomecanvas" + EXTRA= + + # 5a. get extra modules (gnome canvas) + for i in $EXTRA; do + tla get wingo@pobox.com--2004-main/guile-gnome-$i--release $i + done + + cd libgnomecanvas + cd .. + fi + + if [ ! -f configure ]; then + sh autogen.sh --noconfigure + fi + cd .. + else + $WGET http://download.gna.org/guile-gnome/releases/guile-gnome-platform-$GGVERSION.tar.gz + tar xzf $download/guile-gnome-platform-$GGVERSION.tar.gz + ln -s guile-gnome-platform-$GGVERSION guile-gnome + cd guile-gnome + ln -s . src + fi + + rm -rf $OPT/guile-gnome + mkdir =build + cd =build + +# 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. +# + if [ -z "$GCC34" ]; then + # Use libtool-1.5.6, gcc-3.{2,3} without -O2, + CFLAGS='-O -g' ../src/configure --prefix=$OPT/guile-gnome --enable-maintainer-mode + else + # or use gcc-3.4 with libtool-1.6.0 + CC=$GCC34 ../src/configure --prefix=$OPT/guile-gnome --enable-maintainer-mode + fi + make install G_WRAP_MODULE_DIR=$OPT/g-wrap/share/guile/site fi -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 +# simple test -- fails atm +# guile -s ../src/libgnomecanvas/examples/canvas.scm -# simple test -guile -s ../src/libgnomecanvas/examples/canvas.scm