3 # guile-gnome.sh -- download, compile, install g-wrap, guile-gnome,
6 # LilyPond has an experimental gnome canvas output backend -- hackers
7 # only. This depends on rather new versions of guile-gnome, g-wrap
12 # Where user built stuff will be installed
14 # When using GUILE CVS, make a slib/require like so
16 cd ~/usr/pkg/guile/share/guile/1.7 && ln -s /usr/share/guile/1.6/slib .
17 cd && guile -c "(use-modules (ice-9 slib)) (require 'new-catalog)"
19 # otherwise, this may fix it...
20 SLIB_PATH=`locate slib/require.scm | head -1 | sed -s 's/require.scm//g'`
22 # What extra modules to pull (eg: EXTRA="libgnomecanvas libwnck")
23 EXTRA=${EXTRA-libgnomecanvas}
27 download=$HOME/usr/src/releases
28 [ -d $download ] || mkdir -p $download
29 WGET="wget -N -P $download"
31 export AUTOMAKE=automake-1.8
32 export ACLOCAL=aclocal-1.8
33 export AUTOCONF=$(which autoconf2.50)
34 export AUTOHEADER=$(which autoheader2.50)
36 export PKG_CONFIG_PATH
37 export LD_LIBRARY_PATH
38 export GUILE_LOAD_PATH
40 if [ -z "$AUTOCONF" ]; then
43 if [ -z "$AUTOHEADER" ]; then
48 # test: the name of our download and build directory
53 ## 1. install gnome-devel
54 ## - Debian/unstable: apt-get install gnome-devel
59 PKG_CONFIG_PATH=$OPT/pango/lib/pkgconfig:$PKG_CONFIG_PATH
60 LD_LIBRARY_PATH=$OPT/pango/lib:$LD_LIBRARY_PATH
63 if ! pkg-config --atleast-version=1.5.1 pango; then
65 if [ -n "$BLOEDIGE_RAND" ]; then
66 echo ":pserver:anonymous@anoncvs.gnome.org:/cvs/gnome" > CVS/Root
67 echo "." > CVS/Repository
68 cvs -z3 checkout -P pango
70 $WGET ftp://ftp.gtk.org/pub/gtk/v2.5/pango-1.5.2.tar.gz
71 tar -xzf pango-1.5.2.tar.gz
72 ln -s pango-1.5.2 pango
76 if [ ! -f configure ]; then
79 ./configure --prefix=$OPT/pango --enable-maintainer-mode --enable-gtk-doc
80 make XFT_LIBS="-L/usr/lib -lXft -L/usr/X11R6/lib -lfreetype -lz -lXrender -lX11 -lfontconfig" all install
84 ## 3. Currently (2004-9-15) GUILE CVS works somewhat
85 ## But there's a guile/g-wrap problem with integer parameters
89 if [ -d $OPT/libffi/ ]; then
90 export LDFLAGS=-L$OPT/libffi/lib
91 export CPPFLAGS=-I$OPT/libffi/include
94 PKG_CONFIG_PATH=$OPT/g-wrap/lib/pkgconfig:$PKG_CONFIG_PATH
95 LD_LIBRARY_PATH=$OPT/g-wrap/lib:$LD_LIBRARY_PATH
96 GUILE_LOAD_PATH=$OPT/g-wrap/share/guile/site:$GUILE_LOAD_PATH:$SLIB_PATH
100 ## note that bleeding edge (2004-9-13) g-wrap breaks guile-gnome.
101 if ! pkg-config --atleast-version=$GWRAPVERSION g-wrap-2.0-guile; then
102 if [ -n "$BLOEDIGE_RAND" ]; then
103 tla register-archive a.rottmann@gmx.at--2004-main \
104 http://people.debian.org/~rotty/arch/a.rottmann@gmx.at/2004-main || true
106 ## tla get a.rottmann@gmx.at--2004-main/g-wrap--tng g-wrap
107 ## tla get a.rottmann@gmx.at--2004-main/g-wrap--mainline--1.9.0 g-wrap
108 tla get a.rottmann@gmx.at--2004-main/g-wrap--dev--0 g-wrap
110 mkdir -p g-wrap/libffi
112 $WGET http://savannah.nongnu.org/download/g-wrap/g-wrap-$GWRAPVERSION.tar.gz
113 tar xzf $download/g-wrap-$GWRAPVERSION.tar.gz
114 ln -s g-wrap-$GWRAPVERSION g-wrap
119 if [ ! -f configure ]; then
120 sh autogen.sh --noconfigure
124 ../configure --prefix=$OPT/g-wrap --enable-maintainer-mode
131 ## cp srfi-34.scm from CVS head ? --hwn
132 #(cd $OPT/g-wrap/share/guile/site
133 # mv srfi-34.scm srfi-34.scm-g-wrap
134 # cp $OPT/guile/share/guile-1.7/srfi/srfi-34.scm .)
136 PKG_CONFIG_PATH=$OPT/guile-gnome/lib/pkgconfig:$PKG_CONFIG_PATH
137 LD_LIBRARY_PATH=$OPT/guile-gnome/lib:$LD_LIBRARY_PATH
138 GUILE_LOAD_PATH=$OPT/guile-gnome/share/guile:$GUILE_LOAD_PATH
139 ## 5. get guile-gnome
140 if ! pkg-config --atleast-version=$GGVERSION guile-gnome-glib; then
141 if [ -n "$BLOEDIGE_RAND" ]; then
143 if false; then # rotty
144 tla register-archive guile-gnome-devel@gnu.org--2004 \
145 http://people.debian.org/~rotty/arch/guile-gnome-devel@gnu.org/2004/ || true
146 tla get guile-gnome-devel@gnu.org--2004/dists--dev guile-gnome
148 tla build-config -r configs/gnu.org/dev
151 # 5a. get extra modules (gnome canvas)
153 tla get guile-gnome-devel@gnu.org--2004/$i--dev $i
156 tla register-archive wingo@pobox.com--2004-main \
157 http://ambient.2y.net/wingo/arch/wingo@pobox.com--2004-main || true
159 tla get wingo@pobox.com--2004-main/guile-gnome-dists--release guile-gnome
161 tla build-config -r configs/gnu.org/guile-gnome-platform-$GGVERSION
163 EXTRA="pkg atk defs glib gstreamer gtk gtksourceview libgda libglade libgnome libgnomeui pango libgnomecanvas"
166 # 5a. get extra modules (gnome canvas)
168 tla get wingo@pobox.com--2004-main/guile-gnome-$i--release $i
175 if [ ! -f configure ]; then
176 sh autogen.sh --noconfigure
181 $WGET http://download.gna.org/guile-gnome/releases/guile-gnome-platform-$GGVERSION.tar.gz
182 tar xzf $download/guile-gnome-platform-$GGVERSION.tar.gz
183 ln -s guile-gnome-platform-$GGVERSION guile-gnome
188 rm -rf $OPT/guile-gnome
192 # Using libtool < 1.6.0 together with gcc-3.4 may trigger this problem:
194 # If a tag has not been given, and we're using a compiler which is
195 # not one of the ones with which libtool was built, attempt to
196 # infer the compiler from the first word of the command line passed
199 if [ -z "$GCC34" ]; then
200 # Use libtool-1.5.6, gcc-3.{2,3} without -O2,
201 CFLAGS='-O -g' $srcdir/configure --prefix=$OPT/guile-gnome --enable-maintainer-mode
203 # or use gcc-3.4 with libtool-1.6.0
204 CC=$GCC34 $srcdir/configure --prefix=$OPT/guile-gnome --enable-maintainer-mode
206 make all install G_WRAP_MODULE_DIR=$OPT/g-wrap/share/guile/site
209 # simple test -- fails atm
210 # guile -s ../src/libgnomecanvas/examples/canvas.scm