+2005-10-09 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * 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 <hanwen@xs4all.nl>
* input/regression/figured-bass-continuation-center.ly: new file.
$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"
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
+
:
}
# 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
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" ' '
}
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
}
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
cygdocdir=$docdir/$Cygwin
infodir=$docprefix/info
mandir=$docprefix/man
-packagedocdir=$docdir/$base-$ver
+packagedocdir=$docdir/$base
fixdoc () {
#
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
}
for j in $(ls -1 *.la); do
sed -i~ \
-e 's/ *-L *[^"'"'"' ][^"'"'"' ]*//g'\
- -e "s@\( \|=\)\(/usr/lib/lib\)@\1$cygwin_root\2@g"\
+ -e "s@\( \|=\|'\)\(/[^ ]*usr/lib/lib\)\([^ ']*\)\.\(a\|la\|so\)[^ ']*@\1-l\3@g"\
$j
+## -e "s@\( \|=\|'\)\(cyg\)\([^ ']*\)\(\.dll.a\|.a\)[^ ']*@\1lib\3\4@g"\
+## -e "s@\( \|=\|'\)\(/usr/lib/lib\)\([^ ']*\)\.\(a\|la\|so\)[^ ']*@\1-l\3@g"\
+## -e "s@\( \|=\|'\)\(/usr/lib/lib\)\([^.]*\)\.\(a\|la\|so\)[^ ']*@\1-l\3@g"\
+## -e "s@\( \|=\|'\)\(/usr/lib/lib\)\([^.]*\)[^ ']*@\1-l\3@g"\
+## -e "s@\( \|=\|'\)\(/usr/lib/\)\(lib\)@\1\3@g"\
+## -e "s@\( \|=\)\(/usr/lib/lib\)@\1$cygwin_root\2@g"\
+## -e "s@\( \|=\)\(/usr/lib/lib\)@\1$cygwin_root\2@g"\
+## -e "s@\( \|=\)\(/usr/lib/lib\)\([^ ]*\)[.]\(a\|dll\|la\|so[^ ]*\)@-l\2@g"\
done
fi
done
# more libtool fixups. I love libtool.
sed -i~ \
-e "s@^dlname=.*@dlname='../bin/$dll_prefix$base-$sover.dll'@" \
- -e "s@^library_names=.*@library_names='$dll_prefix$base.dll.a'@" \
- -e "s@^old_library=.*@old_library='$dll_prefix$base.a'@" \
+ -e "s@^library_names=.*@library_names='lib$base.dll.a'@" \
+ -e "s@^old_library=.*@old_library='lib$base.a'@" \
$inst/$prefix/lib/lib$base.la
+## -e "s@^library_names=.*@library_names='$dll_prefix$base.dll.a'@" \
+## -e "s@^old_library=.*@old_library='$dll_prefix$base.a'@" \
}
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
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 's@.*\\@@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 's@.*bin\\@@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 () {
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
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
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
}
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__ */
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