CVSROOT: /cvsroot/lilypond Module name: lilypond Branch: Changes by: Jan Nieuwenhuizen <[EMAIL PROTECTED]> 05/10/09 08:05:05
Modified files: scripts : GNUmakefile 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. Backportme. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scripts/GNUmakefile.diff?tr1=1.28&tr2=1.29&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/flower/file-name.cc.diff?tr1=1.14&tr2=1.15&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/cygwin/mknetrel.split.diff?tr1=1.6&tr2=1.7&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/cygwin/mknetrel.libtool.diff?tr1=1.1&tr2=1.2&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/cygwin/mknetrel.doc.diff?tr1=1.6&tr2=1.7&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/cygwin/mknetrel.diff?tr1=1.43&tr2=1.44&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.4163&tr2=1.4164&r1=text&r2=text Patches: Index: lilypond/ChangeLog diff -u lilypond/ChangeLog:1.4163 lilypond/ChangeLog:1.4164 --- lilypond/ChangeLog:1.4163 Fri Oct 7 11:57:33 2005 +++ lilypond/ChangeLog Sun Oct 9 08:05:05 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. Backportme. + 2005-10-07 Han-Wen Nienhuys <[EMAIL PROTECTED]> * input/regression/figured-bass-continuation-center.ly: new file. Index: lilypond/cygwin/mknetrel diff -u lilypond/cygwin/mknetrel:1.43 lilypond/cygwin/mknetrel:1.44 --- lilypond/cygwin/mknetrel:1.43 Mon May 30 19:58:23 2005 +++ lilypond/cygwin/mknetrel Sun Oct 9 08:05:05 2005 @@ -50,13 +50,7 @@ $src/configure --prefix=$prefix --enable-config=for-build) fi - if [ "$cygwin" == "mingw" ]; then - cp /usr/include/FlexLexer.h . - mkdir python2.3 - cp /usr/include/python2.3/Python.h python2.3 - fi - - GUILE=$($cygwin_prefix/bin/guile-config --version 2>&1 | awk '{print $NF}') + 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" @@ -68,13 +62,36 @@ build_cxx="$build_cxx -I$(pwd)" if [ "$cygwin" == "mingw" ]; then CONFIGOPTS="--without-kpathsea $CONFIGOPTS" - CPPFLAGS="-DARGV0_RELOCATION=1 $CPPFLAGS" + #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 + : } @@ -83,8 +100,12 @@ # shortcircuit python for mingw if [ "$cygwin" == "mingw" ]; then - mkdir -p python/out + #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 @@ -103,14 +124,28 @@ CXX=$HOST_CXX \ LDFLAGS="" \ eval make conf=for-build $args) || exit 1 - - mkdir -p mf/out - cp -pv mf/out-for-build/* mf/out + # 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" ' ' @@ -129,8 +164,25 @@ } 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 @@ -172,15 +224,15 @@ } extra_split () { - mkdir -p # should be in devel... mkdir -p ./$prefix/share/lilypond/$v for i in make python tex vim; do - mv $inst/$prefix/share/lilypond/$v/$i ./$prefix/share/lilypond/ + #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/fonts + mv $inst/$prefix/share/lilypond/$v/fonts/$i ./$prefix/share/lilypond/$v/fonts done mkdir -p ./$prefix/share Index: lilypond/cygwin/mknetrel.doc diff -u lilypond/cygwin/mknetrel.doc:1.6 lilypond/cygwin/mknetrel.doc:1.7 --- lilypond/cygwin/mknetrel.doc:1.6 Mon May 30 19:58:23 2005 +++ lilypond/cygwin/mknetrel.doc Sun Oct 9 08:05:05 2005 @@ -10,7 +10,7 @@ cygdocdir=$docdir/$Cygwin infodir=$docprefix/info mandir=$docprefix/man -packagedocdir=$docdir/$base-$ver +packagedocdir=$docdir/$base fixdoc () { # @@ -28,5 +28,10 @@ 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 lilypond/cygwin/mknetrel.libtool:1.1 lilypond/cygwin/mknetrel.libtool:1.2 --- lilypond/cygwin/mknetrel.libtool:1.1 Mon May 30 19:58:23 2005 +++ lilypond/cygwin/mknetrel.libtool Sun Oct 9 08:05:05 2005 @@ -37,8 +37,16 @@ for j in $(ls -1 *.la); do sed -i~ \ -e 's/ *-L *[^"'"'"' ][^"'"'"' ]*//g'\ - -e "[EMAIL PROTECTED]( \|=\)\(/usr/lib/lib\)@[EMAIL PROTECTED]"\ + -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 @@ -49,7 +57,9 @@ # more libtool fixups. I love libtool. sed -i~ \ -e "[EMAIL PROTECTED]@dlname='../bin/$dll_prefix$base-$sover.dll'@" \ - -e "[EMAIL PROTECTED]@library_names='$dll_prefix$base.dll.a'@" \ - -e "[EMAIL PROTECTED]@old_library='$dll_prefix$base.a'@" \ + -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 lilypond/cygwin/mknetrel.split:1.6 lilypond/cygwin/mknetrel.split:1.7 --- lilypond/cygwin/mknetrel.split:1.6 Mon May 30 19:58:23 2005 +++ lilypond/cygwin/mknetrel.split Sun Oct 9 08:05:05 2005 @@ -105,11 +105,11 @@ 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 - install -m644 $cygwin/changelog $inst/$cygdocdir/changelog.$Cygwin cd $src || exit 1 install -m644 $cygwin/README $inst/$packagedocdir/README.$Cygwin @@ -119,17 +119,64 @@ 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: "$subname" -ldesc: "$subname - no description (missing $package/$(dirname $shint) file)" +sdesc: "$name" +ldesc: "$name - no description (missing $package/$cygwin/$(basename $shint) file)" EOF fi grep ^requires: $hint || echo "requires: $depends" >> $hint - grep ^build-requires: $hint || echo "build-requires: $build_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 () { @@ -174,7 +221,8 @@ echo creating $tarstem.tar.bz2 cd $inst || exit 1 - shint=$src/$cygwin/setup.hint + 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 @@ -189,9 +237,10 @@ 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 - cd $inst-$i 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 @@ -200,8 +249,8 @@ 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$' | 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$' --owner=0 --group=0 -f "$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 } Index: lilypond/flower/file-name.cc diff -u lilypond/flower/file-name.cc:1.14 lilypond/flower/file-name.cc:1.15 --- lilypond/flower/file-name.cc:1.14 Mon Sep 12 12:46:47 2005 +++ lilypond/flower/file-name.cc Sun Oct 9 08:05:05 2005 @@ -40,12 +40,14 @@ static String dos_to_posix (String file_name) { - char buf[PATH_MAX]; + char buf[PATH_MAX] = ""; char *s = file_name.get_copy_str0 (); - /* urg, wtf? char const* argument gets modified! */ - cygwin_conv_to_posix_path (s, buf); + /* ugh: char const* argument gets modified. */ + int fail = cygwin_conv_to_posix_path (s, buf); delete s; - return buf; + if (!fail) + return buf; + return file_name; } #endif /* __CYGWIN__ */ Index: lilypond/scripts/GNUmakefile diff -u lilypond/scripts/GNUmakefile:1.28 lilypond/scripts/GNUmakefile:1.29 --- lilypond/scripts/GNUmakefile:1.28 Tue Sep 20 07:15:33 2005 +++ lilypond/scripts/GNUmakefile Sun Oct 9 08:05:05 2005 @@ -1,6 +1,6 @@ depth = .. -SEXECUTABLES=convert-ly lilypond-book abc2ly etf2ly mup2ly midi2ly lilypond-invoke-editor +SEXECUTABLES=convert-ly lilypond-book abc2ly etf2ly mup2ly midi2ly lilypond-invoke-editor STEPMAKE_TEMPLATES=script help2man po LOCALSTEPMAKE_TEMPLATES = lilypond _______________________________________________ Lilypond-cvs mailing list Lilypond-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-cvs