5 [ "$cygwin" == "mingw" ] && sub_packages="doc extra"
7 depends="libfontconfig1 libfreetype6 libguile16 libintl3 libpango1"
8 build_depends="mingw-devel gettext-devel guile-devel pango-devel"
10 v=$(expr "$ver" : "\(.*\)-[0-9]*")
14 # copy and include extra mknetrel stuff
15 . $src/$cygwin/mknetrel.extras || . $mknetrel/extras
18 # doc works, but take too long to build each time
19 [ "$cygwin" == "mingw" ] && return 1
26 [ "$cygwin" == "mingw" ] && if grep 'PYTHON_DEVEL(REQUIRED)' $src/configure.in; then
27 sed -i~ -e 's/PYTHON_DEVEL(REQUIRED)/PYTHON_DEVEL(OPTIONAL)/' \
30 [ "$cygwin" == "mingw" ] && cd $src && ./autogen.sh --noconfigure
33 # cross-compiling: configure for build-host
36 export HOST_CC=${HOST_CC:-gcc}
37 export HOST_CXX=${HOST_CXX:-g++}
38 export HOST_PKG_CONFIG=${HOST_PKG_CONFIG:-pkg-config}
39 export HOST_PKG_CONFIG_PATH=${HOST_PKG_CONFIG_PATH:-}
40 export HOST_FREETYPE_CONFIG=${HOST_FREETYPE_CONFIG:-freetype-config}
41 (PATH="$build:$save_PATH" \
47 PKG_CONFIG=$HOST_PKG_CONFIG \
48 PKG_CONFIG_PATH=$HOST_PKG_CONFIG_PATH \
49 FREETYPE_CONFIG=$HOST_FREETYPE_CONFIG \
50 $src/configure --prefix=$prefix --enable-config=for-build)
53 if [ "$cygwin" == "mingw" ]; then
54 cp /usr/include/FlexLexer.h .
56 cp /usr/include/python2.3/Python.h python2.3
59 GUILE=$($cygwin_prefix/bin/guile-config --version 2>&1 | awk '{print $NF}')
60 cat > $target-guile-config <<EOF
61 [ "\$1" == "--version" ] && echo "$target-guile-config - Guile version $GUILE"
62 [ "\$1" == "compile" ] && echo "-I$cygwin_prefix/include"
63 [ "\$1" == "link" ] && echo "-L$cygwin_prefix/lib -lguile -lgmp"
66 chmod 755 $target-guile-config
68 build_cxx="$build_cxx -I$(pwd)"
69 if [ "$cygwin" == "mingw" ]; then
70 CONFIGOPTS="--without-kpathsea $CONFIGOPTS"
71 CPPFLAGS="-DARGV0_RELOCATION=1 $CPPFLAGS"
72 # There's a problem with inlining the string utils.
73 # The -O2 flag is still passed by default through opt.
74 CONFIGOPTS="--disable-optimising $CONFIGOPTS"
84 # shortcircuit python for mingw
85 if [ "$cygwin" == "mingw" ]; then
87 touch python/out/midi.lo python/out/midi.so python/out/midi.dll
90 # cross-compiling: build for build-host, generate doc
99 (PATH="$build:$save_PATH" \
105 eval make conf=for-build $args) || exit 1
108 cp -pv mf/out-for-build/* mf/out
110 mkdir -p Documentation/user/out
111 cp -pv Documentation/user/out-for-build/*{tely,texi} Documentation/user/out
114 addmakeflags "target=$target" ' '
115 if [ -f "$cygwin_prefix/bin/libpython2.4.dll" ]; then
116 addmakeflags LDFLAGS="$cygwin_prefix/bin/libpython2.4.dll" ' '
119 if iscygwin && doc; then
120 addmakeflags all ' ' doc ' ' web ' '
126 if iscygwin && doc; then
127 addmakeflags webdir="$inst-doc/$packagedocdir" ' ' web-install
135 if ! iscygwin && doc; then
136 make conf=for-build webdir=$inst-doc/$packagedocdir web-install
139 # txt files reside elsewhere
140 cd $build/Documentation/topdocs/out
141 install -m644 AUTHORS.txt INSTALL.txt NEWS.txt README.txt $inst/$packagedocdir
144 cp -prv input $inst/$packagedocdir
145 rm -rf $(find $inst/$packagedocdir -name 'CVS')
146 rm -f $(find $inst/$packagedocdir -name 'SCons*')
147 rm -f $(find $inst/$packagedocdir -name 'GNUmakefile*')
149 rm -rf $(find $inst/usr/share/lilypond -name '*.pyc')
150 rm -f $inst/usr/share/lilypond/$v/tex/texinfo.tex
152 if [ "$cygwin" == "mingw" ]; then
153 find $inst -name '*ly' | xargs unix2dos
156 install -d -m755 $inst-doc/$infodir/lilypond
158 cd $inst-doc/$infodir/lilypond && ln -sf ../../doc/$base-$ver/Documentation/user/out-www/*png .
164 mkdir -p ./$packagedocdir/input
165 mv $inst/$packagedocdir/input/{no-notation,regression,test,tutorial} ./$packagedocdir/input
166 mkdir -p ./$prefix/share/lilypond/$v/fonts
167 mv $inst/$prefix/share/lilypond/$v/fonts/source ./$prefix/share/lilypond/$v/fonts
176 # should be in devel...
177 mkdir -p ./$prefix/share/lilypond/$v
178 for i in make python tex vim; do
179 mv $inst/$prefix/share/lilypond/$v/$i ./$prefix/share/lilypond/
181 mkdir -p ./$prefix/share/lilypond/$v/fonts
182 for i in source svg tfm; do
183 mv $inst/$prefix/share/lilypond/$v/fonts/$i ./$prefix/share/lilypond/fonts
186 mkdir -p ./$prefix/share
187 for i in locale omf; do
188 mv $inst/$prefix/share/$i ./$prefix/share