CVSROOT: /cvsroot/lilypond
Module name: lilypond
Branch: lilypond_2_6
Changes by: Jan Nieuwenhuizen <[EMAIL PROTECTED]> 05/10/09 08:02:16
Modified files:
flower : file-name.cc
cygwin : mknetrel.split mknetrel.libtool mknetrel.doc
mknetrel
. : ChangeLog
Log message:
(dos_to_posix)[__CYGWIN__]: Return
unconverted value if cygwin_conv_to_posix_path () fails. Fixes
absolute file name bug.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/flower/file-name.cc.diff?only_with_tag=lilypond_2_6&tr1=1.12&tr2=1.12.2.1&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/cygwin/mknetrel.split.diff?only_with_tag=lilypond_2_6&tr1=1.6&tr2=1.6.2.1&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/cygwin/mknetrel.libtool.diff?only_with_tag=lilypond_2_6&tr1=1.1&tr2=1.1.2.1&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/cygwin/mknetrel.doc.diff?only_with_tag=lilypond_2_6&tr1=1.6&tr2=1.6.2.1&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/cygwin/mknetrel.diff?only_with_tag=lilypond_2_6&tr1=1.43&tr2=1.43.2.1&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?only_with_tag=lilypond_2_6&tr1=1.3836.2.36&tr2=1.3836.2.37&r1=text&r2=text
Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3836.2.36 lilypond/ChangeLog:1.3836.2.37
--- lilypond/ChangeLog:1.3836.2.36 Fri Sep 23 21:22:27 2005
+++ lilypond/ChangeLog Sun Oct 9 08:02:16 2005
@@ -1,3 +1,9 @@
+2005-10-09 Jan Nieuwenhuizen <[EMAIL PROTECTED]>
+
+ * flower/file-name.cc (dos_to_posix)[__CYGWIN__]: Return
+ unconverted value if cygwin_conv_to_posix_path () fails. Fixes
+ absolute file name bug.
+
2005-09-23 Han-Wen Nienhuys <[EMAIL PROTECTED]>
* ly/engraver-init.ly (AncientRemoveEmptyStaffContext): remove
Index: lilypond/cygwin/mknetrel
diff -u /dev/null lilypond/cygwin/mknetrel:1.43.2.1
--- /dev/null Sun Oct 9 08:02:17 2005
+++ lilypond/cygwin/mknetrel Sun Oct 9 08:02:16 2005
@@ -0,0 +1,244 @@
+# -*- shell-script -*-
+
+sub_packages="doc"
+
+[ "$cygwin" == "mingw" ] && sub_packages="doc extra"
+
+depends="libfontconfig1 libfreetype6 libguile16 libintl3 libpango1"
+build_depends="mingw-devel gettext-devel guile-devel pango-devel"
+
+v=$(expr "$ver" : "\(.*\)-[0-9]*")
+
+save_PATH="$PATH"
+
+# copy and include extra mknetrel stuff
+. $src/$cygwin/mknetrel.extras || . $mknetrel/extras
+
+doc () {
+ # doc works, but take too long to build each time
+ [ "$cygwin" == "mingw" ] && return 1
+ #return 0
+ # doc needs > 2h to build with 2.6.3-CVS, guile-1.6.7 and only 512MB ram
+ return 1
+}
+
+preconfig () {
+ extras_preconfig
+
+ [ "$cygwin" == "mingw" ] && if grep 'PYTHON_DEVEL(REQUIRED)'
$src/configure.in; then
+ sed -i~ -e 's/PYTHON_DEVEL(REQUIRED)/PYTHON_DEVEL(OPTIONAL)/' \
+ $src/configure.in
+ fi
+ [ "$cygwin" == "mingw" ] && cd $src && ./autogen.sh --noconfigure
+
+ cd $build || exit 1
+ # cross-compiling: configure for build-host
+ if ! iscygwin; then
+ rm -f config.cache
+ export HOST_CC=${HOST_CC:-gcc}
+ export HOST_CXX=${HOST_CXX:-g++}
+ export HOST_PKG_CONFIG=${HOST_PKG_CONFIG:-pkg-config}
+ export HOST_PKG_CONFIG_PATH=${HOST_PKG_CONFIG_PATH:-}
+ export HOST_FREETYPE_CONFIG=${HOST_FREETYPE_CONFIG:-freetype-config}
+ (PATH="$build:$save_PATH" \
+ CFLAGS="-O2 -g" \
+ CPPFLAGS="" \
+ CC=$HOST_CC \
+ CXX=$HOST_CXX \
+ LDFLAGS="" \
+ PKG_CONFIG=$HOST_PKG_CONFIG \
+ PKG_CONFIG_PATH=$HOST_PKG_CONFIG_PATH \
+ FREETYPE_CONFIG=$HOST_FREETYPE_CONFIG \
+ $src/configure --prefix=$prefix --enable-config=for-build)
+ fi
+
+ GUILE=$(GUILE_LOAD_PATH=$cygwin_prefix/share/guile/*
$cygwin_prefix/bin/guile-config --version 2>&1 | awk '{print $NF}')
+ cat > $target-guile-config <<EOF
+[ "\$1" == "--version" ] && echo "$target-guile-config - Guile version $GUILE"
+[ "\$1" == "compile" ] && echo "-I$cygwin_prefix/include"
+[ "\$1" == "link" ] && echo "-L$cygwin_prefix/lib -lguile -lgmp"
+exit 0
+EOF
+ chmod 755 $target-guile-config
+ export PATH=.:$PATH
+ build_cxx="$build_cxx -I$(pwd)"
+ if [ "$cygwin" == "mingw" ]; then
+ CONFIGOPTS="--without-kpathsea $CONFIGOPTS"
+ #CPPFLAGS="-DARGV0_RELOCATION=1 $CPPFLAGS"
+ CONFIGOPTS="--enable-relocation $CONFIGOPTS"
+ # There's a problem with inlining the string utils.
+ # The -O2 flag is still passed by default through opt.
+ CONFIGOPTS="--disable-optimising $CONFIGOPTS"
+ ## debugging
+ ##opt='-g'
+ fi
+
+ if [ "$cygwin" == "mingw" ]; then
+ cp /usr/include/FlexLexer.h .
+ mkdir python2.3
+ cp /usr/include/python2.3/Python.h python2.3
+
+ CXX="$(echo $build_cxx | sed 's/ -mwindows//')" \
+ CXX_FOR_TARGET="${build_cxx}" \
+ CC="${build_cc}" \
+ CC_FOR_TARGET="${build_cc}" \
+ GCC_FOR_TARGET="${build_cc}" \
+ RANLIB="${build_ranlib}" \
+ RANLIB_FOR_TARGET="${build_ranlib}" \
+ DLLWRAP="${build_dllwrap}" \
+ AR="${build_ar}" NM="${build_nm}" \
+ LD=$(${build_cc} -print-prog-name=ld) \
+ $src/configure --enable-config=console $CONFIGOPTS
+
+ rm -f config.cache
+ iscygwin || crosscache
+ fi
+
+ :
+}
+
+prebuild () {
+ extras_prebuild
+
+ # shortcircuit python for mingw
+ if [ "$cygwin" == "mingw" ]; then
+ #sed -e s/-mwindows// < config.make > config-console.make
+ #cp config.hh config-console.hh
+
+ mkdir -p python/out python/out-console
+ touch python/out/midi.lo python/out/midi.so python/out/midi.dll
+ touch python/out-console/midi.lo python/out-console/midi.so
python/out-console/midi.dll
+ fi
+
+ # cross-compiling: build for build-host, generate doc
+ if ! iscygwin; then
+ cd $build || exit 1
+
+ if doc; then
+ args="all doc web"
+ else
+ args="all"
+ fi
+ (PATH="$build:$save_PATH" \
+ CFLAGS="-O2 -g" \
+ CPPFLAGS="" \
+ CC=$HOST_CC \
+ CXX=$HOST_CXX \
+ LDFLAGS="" \
+ eval make conf=for-build $args) || exit 1
+
+ # fake mf and texi
+ mkdir -p mf/out
+ cp -pv mf/out-for-build/* mf/out
+ mkdir -p Documentation/user/out
+ cp -pv Documentation/user/out-for-build/*{tely,texi}
Documentation/user/out
+ fi
+
+ if [ "$cygwin" == "mingw" ]; then
+ # fake mf and texi
+ mkdir -p mf/out-console
+ cp -pv mf/out-for-build/* mf/out-console
+ mkdir -p Documentation/user/out-console
+ cp -pv Documentation/user/out-for-build/*{tely,texi}
Documentation/user/out-console
+ # fake manual pages, only works without --enable-config
+ mkdir -p scripts/out-console
+ cp scripts/out-for-build/*.1 scripts/out-console
+ mkdir -p lily/out-console
+ cp lily/out-for-build/*.1 lily/out-console
+ make conf=console || exit 1
+ fi
+
+ addmakeflags "target=$target" ' '
+ if [ -f "$cygwin_prefix/bin/libpython2.4.dll" ]; then
+ addmakeflags LDFLAGS="$cygwin_prefix/bin/libpython2.4.dll" ' '
+ fi
+
+ if iscygwin && doc; then
+ addmakeflags all ' ' doc ' ' web ' '
+ fi
+}
+
+preinstall () {
+ extras_preinstall
+ if iscygwin && doc; then
+ addmakeflags webdir="$inst-doc/$packagedocdir" ' ' web-install
+ fi
+}
+
+postinstall () {
+ if [ "$cygwin" == "mingw" ]; then
+ cp $inst/usr/share/lilypond/$v/python/* $inst/usr/bin
+ install -m755 $build/lily/out/lilypond $inst/usr/bin/lilypond-windows
+ install -m755 $build/lily/out-console/lilypond $inst/usr/bin/
+ fi
+
+ extras_postinstall
+
+ if [ "$cygwin" == "mingw" ]; then
+ for i in $inst/usr/bin/*; do
+ m=$(file -b $i)
+ if echo "$m" | grep "guile"; then
+ mv $i $i.scm
+ elif echo "$m" | grep "python"; then
+ mv $i $i.py
+ fi
+ done
+ fi
+
+ cd $build || exit 1
+ if ! iscygwin && doc; then
+ make conf=for-build webdir=$inst-doc/$packagedocdir web-install
+ fi
+
+ # txt files reside elsewhere
+ cd $build/Documentation/topdocs/out
+ install -m644 AUTHORS.txt INSTALL.txt NEWS.txt README.txt
$inst/$packagedocdir
+ ## copy examples
+ cd $src || exit 1
+ cp -prv input $inst/$packagedocdir
+ rm -rf $(find $inst/$packagedocdir -name 'CVS')
+ rm -f $(find $inst/$packagedocdir -name 'SCons*')
+ rm -f $(find $inst/$packagedocdir -name 'GNUmakefile*')
+
+ rm -rf $(find $inst/usr/share/lilypond -name '*.pyc')
+ rm -f $inst/usr/share/lilypond/$v/tex/texinfo.tex
+
+ if [ "$cygwin" == "mingw" ]; then
+ find $inst -name '*ly' | xargs unix2dos
+ fi
+
+ install -d -m755 $inst-doc/$infodir/lilypond
+ if doc; then
+ cd $inst-doc/$infodir/lilypond && ln -sf
../../doc/$base-$ver/Documentation/user/out-www/*png .
+ fi
+}
+
+doc_split () {
+ extras_doc_split
+ mkdir -p ./$packagedocdir/input
+ mv $inst/$packagedocdir/input/{no-notation,regression,test,tutorial}
./$packagedocdir/input
+ mkdir -p ./$prefix/share/lilypond/$v/fonts
+ mv $inst/$prefix/share/lilypond/$v/fonts/source
./$prefix/share/lilypond/$v/fonts
+}
+
+extra_name () {
+ echo lilypond-extra
+}
+
+extra_split () {
+ # should be in devel...
+ mkdir -p ./$prefix/share/lilypond/$v
+ for i in make python tex vim; do
+ #for i in make tex vim; do
+ mv $inst/$prefix/share/lilypond/$v/$i ./$prefix/share/lilypond/$v
+ done
+ mkdir -p ./$prefix/share/lilypond/$v/fonts
+ for i in source svg tfm; do
+ mv $inst/$prefix/share/lilypond/$v/fonts/$i
./$prefix/share/lilypond/$v/fonts
+ done
+
+ mkdir -p ./$prefix/share
+ for i in locale omf; do
+ mv $inst/$prefix/share/$i ./$prefix/share
+ done
+}
Index: lilypond/cygwin/mknetrel.doc
diff -u /dev/null lilypond/cygwin/mknetrel.doc:1.6.2.1
--- /dev/null Sun Oct 9 08:02:17 2005
+++ lilypond/cygwin/mknetrel.doc Sun Oct 9 08:02:16 2005
@@ -0,0 +1,37 @@
+# -*- shell-script -*-
+
+#
+# mknetrel.doc -- fixup doc
+#
+
+docprefix=$prefix/share
+docdir=$docprefix/doc
+
+cygdocdir=$docdir/$Cygwin
+infodir=$docprefix/info
+mandir=$docprefix/man
+packagedocdir=$docdir/$base
+
+fixdoc () {
+ #
+ cd $inst || exit 1
+ mkdir -p $inst/$docprefix
+ for i in info man doc; do
+ #if [ -d $inst/$docprefix/$i ]; then
+ if [ -d $inst/$prefix/$i ]; then
+ cd $inst/$prefix
+ tar -cf - $i | tar -C $inst/$docprefix -xf -
+ rm -rf $inst/$prefix/$i
+ fi
+ done
+ if [ -f $inst/$docprefix/$base ]; then
+ mkdir -p $packagedocdir
+ tar -C $inst/$docprefix/$base -cf - . | tar -C $inst/$packagedocdir -xf
-
+ fi
+ for i in $inst/$docprefix/info/*.info \
+ $inst/$docprefix/info/*.info-[0-9] \
+ $inst/$docprefix/info/*.info-[0-9][0-9]; do
+ gzip $i
+ done
+ true
+}
Index: lilypond/cygwin/mknetrel.libtool
diff -u /dev/null lilypond/cygwin/mknetrel.libtool:1.1.2.1
--- /dev/null Sun Oct 9 08:02:17 2005
+++ lilypond/cygwin/mknetrel.libtool Sun Oct 9 08:02:16 2005
@@ -0,0 +1,65 @@
+# -*- shell-script -*-
+# mknetrel.libtool -- libtool fixups
+
+fix_libtool_dltool () {
+ sed -i~ \
+ -e "s/^DLLTOOL=.*/DLLTOOL='$target-dlltool'/" \
+ -e "s/^DLLTOOL=/HOST_CC=gcc\nDLLTOOL=/" \
+ -e "s/^HOST_CC=/SED=sed\nHOST_CC=/" \
+ -e "s/^allow_undefined_flag=.*/allow_undefined_flag=/" \
+ $1
+## -e "[EMAIL PROTECTED]@sys_lib_dlsearch_path_spec='$cygwin_prefix/lib'@"
+}
+
+fix_libtool_dlopen_undefined () {
+ for i in $(find $build -name libtool); do
+ sed -i~ -e 's/\(allow_undefined_flag=.*\)unsupported/\1/' $i
+ done
+}
+
+fix_libtool_script () {
+ [ $base != "libtool" ] || return 0
+ for i in $mknetrel_root/bin/$target-libtool \
+ $cygwin_prefix/bin/$target-libtool; do
+ [ -x "$i" ] && fixtool=$i
+ done
+ for i in $(find $build -name libtool); do
+ [ -n "$fixtool" ] || exit 1
+ cp --backup $fixtool $i
+ done
+}
+
+fix_libtool_la () {
+ # fix libtool's .la dependency_libs output for dlopen
+ for i in $inst/lib $inst/$prefix/lib; do
+ if [ -d "$i" ]; then
+ cd $i || exit 1
+ for j in $(ls -1 *.la); do
+ sed -i~ \
+ -e 's/ *-L *[^"'"'"' ][^"'"'"' ]*//g'\
+ -e "[EMAIL PROTECTED]( \|=\|'\)\(/[^ ]*usr/lib/lib\)\([^
']*\)\.\(a\|la\|so\)[^ '[EMAIL PROTECTED]@g"\
+ $j
+## -e "[EMAIL PROTECTED]( \|=\|'\)\(cyg\)\([^
']*\)\(\.dll.a\|.a\)[^ '[EMAIL PROTECTED]@g"\
+## -e "[EMAIL PROTECTED]( \|=\|'\)\(/usr/lib/lib\)\([^
']*\)\.\(a\|la\|so\)[^ '[EMAIL PROTECTED]@g"\
+## -e "[EMAIL PROTECTED](
\|=\|'\)\(/usr/lib/lib\)\([^.]*\)\.\(a\|la\|so\)[^ '[EMAIL PROTECTED]@g"\
+## -e "[EMAIL PROTECTED]( \|=\|'\)\(/usr/lib/lib\)\([^.]*\)[^
'[EMAIL PROTECTED]@g"\
+## -e "[EMAIL PROTECTED]( \|=\|'\)\(/usr/lib/\)\(lib\)@[EMAIL
PROTECTED]"\
+## -e "[EMAIL PROTECTED]( \|=\)\(/usr/lib/lib\)@[EMAIL
PROTECTED]"\
+## -e "[EMAIL PROTECTED]( \|=\)\(/usr/lib/lib\)@[EMAIL
PROTECTED]"\
+## -e "[EMAIL PROTECTED]( \|=\)\(/usr/lib/lib\)\([^
]*\)[.]\(a\|dll\|la\|so[^ ]*\)@[EMAIL PROTECTED]"\
+ done
+ fi
+ done
+
+ # fix some libtool's .dll name
+ mv $inst/$prefix/lib/$dll_prefix$base-$sover
$inst/$prefix/bin/$dll_prefix$base-$sover.dll
+
+ # more libtool fixups. I love libtool.
+ sed -i~ \
+ -e "[EMAIL PROTECTED]@dlname='../bin/$dll_prefix$base-$sover.dll'@" \
+ -e "[EMAIL PROTECTED]@library_names='lib$base.dll.a'@" \
+ -e "[EMAIL PROTECTED]@old_library='lib$base.a'@" \
+ $inst/$prefix/lib/lib$base.la
+## -e "[EMAIL PROTECTED]@library_names='$dll_prefix$base.dll.a'@" \
+## -e "[EMAIL PROTECTED]@old_library='$dll_prefix$base.a'@" \
+}
Index: lilypond/cygwin/mknetrel.split
diff -u /dev/null lilypond/cygwin/mknetrel.split:1.6.2.1
--- /dev/null Sun Oct 9 08:02:17 2005
+++ lilypond/cygwin/mknetrel.split Sun Oct 9 08:02:16 2005
@@ -0,0 +1,275 @@
+# -*- shell-script -*-
+# mknetrel.split -- split subpackages
+
+extras_preinstall () {
+ :;
+}
+
+extras_presplit () {
+ :;
+}
+
+presplit () {
+ :;
+}
+
+devel_name () {
+ if ! libdev 2> /dev/null ; then
+ echo $base-devel
+ else
+ if expr "$base" : "\(lib\)" > /dev/null 2>&1; then
+ echo $base-dev
+ else
+ echo lib$base-dev
+ fi
+ fi
+}
+
+doc_name () {
+ echo $base-doc
+}
+
+lib_name () {
+ if expr "$base" : "\(lib\)" > /dev/null 2>&1; then
+ echo $base$sover
+ else
+ echo lib$base$sover
+ fi
+}
+
+extras_lib_split () {
+ mkdir -p ./$prefix/bin || exit 1
+ mv $inst/$prefix/bin/*.dll ./$prefix/bin
+ # better move dlls to bin, see gmp
+ mkdir -p ./$prefix/lib || exit 1
+ mv $inst/$prefix/lib/*.dll ./$prefix/lib
+ mkdir -p ./$prefix/lib || exit 1
+ mv $inst/$prefix/lib/lib*.la ./$prefix/lib
+ mkdir -p ./$prefix/share || exit 1
+ mv $inst/$prefix/share/$base ./$prefix/share
+ rmdir $inst/$prefix/bin || true
+ rmdir $inst/$prefix/lib || true
+ rmdir $inst/$prefix/share || true
+ true
+}
+
+extras_devel_split () {
+ mkdir -p ./$prefix/bin || exit 1
+ mv $inst/bin/*-config ./$prefix/bin
+ tar -C $inst -cf - ./$prefix/include | tar -xf -
+ rm -rf $inst/$prefix/include
+ # Only static .a libs in devel, load time .la files go in LIB or
+ # BIN package.
+ mkdir -p ./$prefix/lib || exit 1
+ mv $inst/$prefix/lib/*.a ./$prefix/lib
+ mv $inst/$prefix/lib/pkgconfig ./$prefix/lib
+ mkdir -p ./$prefix/share || exit 1
+ tar -C $inst -cf - ./$prefix/share/aclocal | tar -xf -
+ rm -rf $inst/$prefix/share/aclocal
+ tar -C $inst -cf - ./$prefix/share/libtool | tar -xf -
+ rm -rf $inst/$prefix/share/libtool
+ rmdir $inst/$prefix/lib || true
+ rmdir $inst/$prefix/share || true
+ true
+}
+
+extras_doc_split () {
+ mkdir -p ./$docprefix || exit 1
+ mkdir -p ./$infodir || exit 1
+ tar -C $inst -cf - ./$infodir | tar -xf -
+ rm -rf $inst/$infodir
+ if [ "$cygwin" == "mingw" ]; then
+ mkdir -p ./$mandir || exit 1
+ tar -C $inst -cf - ./$mandir | tar -xf -
+ rm -rf $inst/$mandir
+ fi
+ true
+}
+
+extras_prebuild () {
+ for i in $sub_packages; do
+ rm -rf $inst-$i
+ mkdir -p $inst-$i || exit 1
+ done
+}
+
+extras_postinstall () {
+ fixdoc
+ fix_libtool_la
+
+ mkdir -p $inst-doc/$docprefix
+ cd $build || exit 1
+
+ cd $src || exit 1
+ install -d -m755 $inst/$packagedocdir
+
+ readmes="$(find . -maxdepth 1 -type f -a -name '[A-Z]*' | egrep -v
'Makefile|GNUmakefile')"
+ install -m644 $readmes $inst/$packagedocdir
+ install -m644 $cygwin/changelog $inst/$packagedocdir/changelog.$Cygwin
+
+ ## Cygwin readmes
+ cd $src || exit 1
+ install -d -m755 $inst/$cygdocdir
+
+ cd $src || exit 1
+ install -m644 $cygwin/README $inst/$packagedocdir/README.$Cygwin
+ install -m644 $cygwin/README $inst/$cygdocdir/$package.README
+ cd $build || exit 1
+ install -m644 $cygwin/out/README $inst/$packagedocdir/README.$Cygwin
+ install -m644 $cygwin/out/README $inst/$cygdocdir/$package.README
+}
+
+auto_requires () {
+ dlls=
+ requires=
+ dlls=$(find . -name '*dll' -o -name '*.exe' \
+ | xargs $cygcheck 2>&1 | grep '^ [^ ]' \
+ | tr -d '[ \r]' | sed '[EMAIL PROTECTED]@@g' | sort -u)
+ for x in $(ls -1 bin/* sbin/*); do
+ case $x in
+ *.exeXXX|*.dllXXX)
+ dlls="$($cygcheck $x 2>&1 | grep '^ [^ ]' | tr -d '[ \r]' |
sed '[EMAIL PROTECTED]@@g') $dlls"
+ ;;
+ esac
+ case "$(file -b $x)" in
+ "*Bourne shell script*")
+ requires="bash\n$requires"
+ ;;
+ "*guile*script*")
+ requires="guile\n$requires"
+ ;;
+ "*perl*script*")
+ requires="perl\n$requires"
+ ;;
+ "*python*script*")
+ requires="python\n$requires"
+ ;;
+ esac
+ done
+ for x in $dlls; do
+ requires="$(cyg-apt find $x | sed 's/:.*//')\n$requires"
+ done
+ requires=$(echo -e "$requires" | sort -u)
+ echo $requires
+}
+
+hint () {
+ if [ -r $shint ]; then
+ cp $shint $hint
+ else
+ cat > $hint <<EOF
+sdesc: "$name"
+ldesc: "$name - no description (missing $package/$cygwin/$(basename $shint)
file)"
+EOF
+ fi
+ grep ^requires: $hint || echo "requires: $depends" >> $hint
+ if [ "$cygwin" == "cygwin" ]; then
+ if grep ^build-requires: $hint; then
+ mv $hint $hint~
+ grep -v build-requires $hint~ > $hint
+ fi
+ if iscygwin; then
+ cygcheck=cygcheck.exe
+ else
+ cygcheck="wine $cygwin_prefix/bin/cygcheck.exe"
+ fi
+ echo "#auto-requires: $(cd usr; auto_requires)" >> $hint
+ else
+ grep ^build-requires: $hint || echo "build-requires: $build_depends" >>
$hint
+ fi
+}
+
+domkdist () {
+ #
+ # Fix up installation slightly
+ #
+ cd $inst || exit 1
+ chmod -R u+w,og-w,a+rX .
+ cd usr 2>/dev/null && dousrstuff
+
+ # Split off any sub-packages. The actual splitting is handled by
+ # a package's specific code in extra/.
+
+ # To package `foo' in foo, foo-doc and foo-devel, set
+ # sub_packages='doc devel'.
+
+ # Then provide functions doc_name and devel_name, that return the
+ # full name of the sub-package. Also provide functions doc_split
+ # and devel_split, that mv part of foo's installation in $inst to
+ # the sub-packages' installation roots $inst-doc and $inst-devel.
+
+ cd $inst || exit 1
+ presplit
+
+ for i in $sub_packages; do
+ subname=$(${i}_name)
+ cd $inst-$i || exit 1
+ ${i}_split || exit 1
+ done
+
+ cd $inst || exit 1
+ prepackage
+
+ cd $inst || exit 1
+ hard2soft
+
+ #
+ # Make tar balls
+ #
+
+ # The base package
+ echo creating $tarstem.tar.bz2
+ cd $inst || exit 1
+
+ name=$base
+ shint=$src/$cygwin/$name.hint
+ hint=$uploads/setup.hint
+ hint
+ find * -print | egrep -v
'\.cvsignore|\.bak$|\.orig$|\.o$|\.rej$|~$|^.#|CVS|/tags$' | sort | tar -T -
--no-recursion --owner=0 --group=0 -cjf $tarstem.tar.bz2
+
+ # Any sub-packages
+ for i in $sub_packages; do
+ subname=$(${i}_name)
+ subload=$uploads/$subname
+ subtarstem=$subload/$subname-$ver
+ shint=$src/$cygwin/$subname.hint
+ hint=$subload/setup.hint
+ depends=$(eval echo '$'${i}_depends)
+ mkdir -p $subload || exit 1
+ echo creating $subtarstem.tar.bz2
+ name=$subname
+ cd $inst-$i
+ hint
+ grep ^external-source: $hint || echo "external-source: $base" >> $hint
+ hard2soft
+ find * -print | egrep -v
'\.cvsignore|\.bak$|\.orig$|\.o$|\.rej$|~$|^.#|CVS|/tags$' | sort | tar -T -
--no-recursion --owner=0 --group=0 -cjf $subtarstem.tar.bz2
+ done
+
+ # The source package
+ cd $src/.. || exit 1
+ echo creating "$tarstem"-src.tar.bz2
+ ##find $package_src/* -print -follow | egrep -v
'\.cvsignore|\.bak$|\.orig$|\.o$|~$|^.#|CVS|%redact|/tags$' | egrep -v
"$src_exclude" | sort | tar -T - --no-recursion --owner=0 --group=0 -cjf
"$tarstem"-src.tar.bz2
+ find $package_src/* -print | egrep -v
'\.cvsignore|\.bak$|\.orig$|\.o$|\.rej$|~$|^.#|CVS|%redact|/tags$|/TAGS$|autom4te.cache$'
| egrep -v "$src_exclude" | sort | tar -T - --no-recursion --owner=0 --group=0
-cjf "$tarstem"-src.tar.bz2
+ ##cd $package_src && tar -cj --exclude='\.cvsignore' --exclude='\.bak$'
--exclude='\.orig$' --exclude='\.o$' --exclude='~$' --exclude='^.#'
--exclude='CVS' --exclude='%redact' --exclude='/tags$' --exclude='/TAGS$'
--exclude='autom4te.cache' --owner=0 --group=0 -f "$tarstem"-src.tar.bz2 .
+ postpackage
+}
+
+devel_split () {
+ extras_devel_split
+}
+
+doc_split () {
+ extras_doc_split
+}
+
+lib_split () {
+ extras_lib_split
+}
+
+prebuild () {
+ extras_prebuild
+}
+
+postinstall () {
+ extras_postinstall
+}
Index: lilypond/flower/file-name.cc
diff -u /dev/null lilypond/flower/file-name.cc:1.12.2.1
--- /dev/null Sun Oct 9 08:02:17 2005
+++ lilypond/flower/file-name.cc Sun Oct 9 08:02:15 2005
@@ -0,0 +1,119 @@
+/*
+ file-name.cc - implement File_name
+
+ source file of the Flower Library
+
+ (c) 1997--2005 Han-Wen Nienhuys <[EMAIL PROTECTED]>
+ Jan Nieuwenhuizen <[EMAIL PROTECTED]>
+*/
+
+#include "file-name.hh"
+
+#include <cstdio>
+#include <cerrno>
+
+#include "config.hh"
+
+#if HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
+#ifdef __CYGWIN__
+#include <sys/cygwin.h>
+#endif
+
+/* We don't have multiple roots, set this to '\0'? */
+#ifndef ROOTSEP
+#define ROOTSEP ':'
+#endif
+
+#ifndef DIRSEP
+#define DIRSEP '/'
+#endif
+
+#ifndef EXTSEP
+#define EXTSEP '.'
+#endif
+
+#ifdef __CYGWIN__
+static String
+dos_to_posix (String file_name)
+{
+ char buf[PATH_MAX] = "";
+ char *s = file_name.get_copy_str0 ();
+ /* ugh: char const* argument gets modified. */
+ int fail = cygwin_conv_to_posix_path (s, buf);
+ delete s;
+ if (!fail)
+ return buf;
+ return file_name;
+}
+#endif /* __CYGWIN__ */
+
+#ifdef __MINGW32__
+/** Use slash as directory separator. On Windows, they can pretty
+ much be exchanged. */
+static String
+slashify (String file_name)
+{
+ file_name.substitute ('\\', '/');
+ file_name.substitute ("//", "/");
+ return file_name;
+}
+#endif /* __MINGW32__ */
+
+/* Join components to full file_name. */
+String
+File_name::to_string () const
+{
+ String s;
+ if (!root_.is_empty ())
+ s = root_ + ::to_string (ROOTSEP);
+ if (!dir_.is_empty ())
+ {
+ s += dir_;
+ if (!base_.is_empty () || !ext_.is_empty ())
+ s += ::to_string (DIRSEP);
+ }
+ s += base_;
+ if (!ext_.is_empty ())
+ s += ::to_string (EXTSEP) + ext_;
+ return s;
+}
+
+
+File_name::File_name (String file_name)
+{
+#ifdef __CYGWIN__
+ /* All system functions would work, even if we do not convert to
+ posix file_name, but we would think that \foe\bar\baz.ly is in
+ the cwd. */
+ file_name = dos_to_posix (file_name);
+#endif
+#ifdef __MINGW32__
+ file_name = slashify (file_name);
+#endif
+
+ int i = file_name.index (ROOTSEP);
+ if (i >= 0)
+ {
+ root_ = file_name.left_string (i);
+ file_name = file_name.right_string (file_name.length () - i - 1);
+ }
+
+ i = file_name.index_last (DIRSEP);
+ if (i >= 0)
+ {
+ dir_ = file_name.left_string (i);
+ file_name = file_name.right_string (file_name.length () - i - 1);
+ }
+
+ i = file_name.index_last ('.');
+ if (i >= 0)
+ {
+ base_ = file_name.left_string (i);
+ ext_ = file_name.right_string (file_name.length () - i - 1);
+ }
+ else
+ base_ = file_name;
+}
_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs