]> git.donarmstrong.com Git - lilypond.git/blob - buildscripts/guile-gnome.sh
More editing.
[lilypond.git] / buildscripts / guile-gnome.sh
1 #!@BASH@
2 # guile-gnome.sh -- download, compile, install g-wrap, guile-gnome TLA and
3 # pango CVS
4
5 # LilyPond has an experimental gnome canvas output backend -- hackers
6 # only.  This depends on unreleased version of guile-gnome, which
7 # depends on an unreleased, forked version of g-wrap.  We also need
8 # pango CVS > 2004-06-12
9
10 # Note: this install information is volatile, you'll probably want to
11 # pull all from from guile-gnome-devel@gnu.org--2004 soon.
12
13 set -ex
14
15 # Where user built stuff will be installed
16 OPT=$HOME/usr/pkg
17
18 # What extra modules to pull (eg: EXTRA="libgnomecanvas libwnck")
19 EXTRA=${EXTRA-libgnomecanvas}
20
21 export AUTOMAKE=automake-1.8
22 export ACLOCAL=aclocal-1.8
23 export AUTOCONF=$(which autoconf2.50)
24 export AUTOHEADER=$(which autoheader2.50)
25
26 if [ -z "$AUTOCONF" ]; then
27     unset AUTOCONF
28 fi
29 if [ -z "$AUTOHEADER" ]; then
30     unset AUTOHEADER
31 fi
32
33
34 # test: the name of our download and build directory
35 rm -rf test
36 mkdir test
37 cd test
38
39 ## 1.  install gnome-devel
40 ##     - Debian/unstable: apt-get install gnome-devel
41 ##     - ...
42
43 ## 2.  get pango CVS
44
45 if [ ! -d $HOME/usr/pkg/pango ] ; then
46
47         mkdir -p gnome/CVS
48         cd gnome
49         echo ":pserver:anonymous@anoncvs.gnome.org:/cvs/gnome" > CVS/Root
50         echo "." > CVS/Repository
51         cvs -z3 checkout -P pango
52         cd pango
53         rm -rf $OPT/pango
54         ./autogen.sh --help
55         ./configure --prefix=$OPT/pango --enable-maintainer-mode --enable-gtk-doc
56         make XFT_LIBS="-L/usr/lib -lXft -L/usr/X11R6/lib -lfreetype -lz -lXrender -lX11 -lfontconfig" install
57
58         cd ../..
59 fi 
60
61 export PKG_CONFIG_PATH=$OPT/pango/lib/pkgconfig:$PKG_CONFIG_PATH
62
63 # 3. Not for the faint of heart: GUILE CVS seems to be OK 
64 ## PATH=/usr/bin:$PATH
65
66 if [ -d $OPT/libffi/ ]; then
67     export LDFLAGS=-L$OPT/libffi/lib
68     export CPPFLAGS=-I$OPT/libffi/include
69 fi
70
71 ## 4.  get g-wrap 2.0
72 tla register-archive a.rottmann@gmx.at--2004-main \
73     http://people.debian.org/~rotty/arch/a.rottmann@gmx.at/2004-main || true
74
75 rm -rf g-wrap
76 if false; then
77     ## pull latest g-wrap from janneke -- this step is probably no longer
78     ## necessary when you read this
79     tla register-archive janneke@gnu.org--2004-gnome \
80         http://lilypond.org/~janneke/{arch}/2004-gnome || true
81     tla get janneke@gnu.org--2004-gnome/g-wrap--janneke g-wrap
82 else
83     ## tla get a.rottmann@gmx.at--2004-main/g-wrap--tng g-wrap
84     tla get a.rottmann@gmx.at--2004-main/g-wrap--mainline--1.9.0 g-wrap
85 fi
86 cd g-wrap
87
88 rm -rf $OPT/g-wrap
89 sh autogen.sh --noconfigure
90 mkdir =build
91 cd =build
92 ../configure --prefix=$OPT/g-wrap --enable-maintainer-mode
93 make install
94
95 # not a good idea
96 ## cp srfi-34.scm from CVS head ?  --hwn
97 #(cd $OPT/g-wrap/share/guile/site
98 # mv srfi-34.scm srfi-34.scm-g-wrap
99 # cp $OPT/guile/share/guile-1.7/srfi/srfi-34.scm .)
100
101 cd ../..
102
103 ## 5.  get guile-gnome
104 tla register-archive guile-gnome-devel@gnu.org--2004 \
105     http://people.debian.org/~rotty/arch/guile-gnome-devel@gnu.org/2004/ || true
106 rm -rf guile-gnome
107 tla get guile-gnome-devel@gnu.org--2004/dists--dev guile-gnome
108 cd guile-gnome
109 tla build-config -r configs/gnu.org/dev
110 cd src
111
112 ## 6.  get extra modules (gnome canvas)
113 for i in $EXTRA; do
114     tla get guile-gnome-devel@gnu.org--2004/$i--dev $i
115 done
116
117 rm -rf $OPT/guile-gnome
118 sh autogen.sh --noconfigure
119 mkdir ../=build
120 cd ../=build
121
122 export GUILE_LOAD_PATH=$OPT/g-wrap/share/guile/site:$GUILE_LOAD_PATH
123 export LD_LIBRARY_PATH=$OPT/g-wrap/lib:$LD_LIBRARY_PATH
124 PKG_CONFIG_PATH=$OPT/g-wrap/lib/pkgconfig:$PKG_CONFIG_PATH
125
126 # Using libtool < 1.6.0 together with gcc-3.4 may trigger this problem:
127 #
128 #    If a tag has not been given, and we're using a compiler which is
129 #    not one of the ones with which libtool was built, attempt to
130 #    infer the compiler from the first word of the command line passed
131 #    to libtool.
132 #
133 if [ -z "$GCC34" ]; then
134     # Use libtool-1.5.6, gcc-3.{2,3} without -O2,
135     CFLAGS='-O -g' ../src/configure --prefix=$OPT/guile-gnome --enable-maintainer-mode
136 else
137     # or use gcc-3.4 with libtool-1.6.0
138     CC=$GCC34 ../src/configure --prefix=$OPT/guile-gnome --enable-maintainer-mode
139 fi
140 make install G_WRAP_MODULE_DIR=$OPT/g-wrap/share/guile/site
141
142 GUILE_LOAD_PATH=$OPT/guile-gnome/share/guile:$GUILE_LOAD_PATH
143 LD_LIBRARY_PATH=$OPT/guile-gnome/lib:$LD_LIBRARY_PATH
144
145 # simple test -- fails atm
146 # guile -s ../src/libgnomecanvas/examples/canvas.scm