This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
Re: ITP: Guile 1.5.6
Nicholas Wourms <nwourms@netscape.net> writes:
>> You're actually *developing* on Windows? Amazing.
> Yes, developing under Cygwin is a pleasure, a far cry from using
> command.com. It is almost to the point of being transparent from a
> linux developer's perspective. As we speak, I am currently running
> OpenBox on X11 in another window, in which I am looking at your
> package through an rxvt terminal. Cygwin isn't just a dll anymore,
> it's becoming a full-fledged OS now. Heck, it even has a /proc and
> /dev! The point is that I prefer to think I am developing inside
> Cygwin, not Windows... There is a difference.
Sure, Cygwin is great, and gets better all the time. If there's no
alternative and you must use Windows, Cygwin makes life bearable
(email without a mouse!). At least, that was my experience, some
three years, and I'm still very impressed by the progress Cygwin
makes.
Otoh, any 'reasons' for not replacing Windows by Linux get less valid
all the time too. And using Windows (even when mostly seen through
Cygwin), just 'feels' a bit awkward to me; it's as if Microsoft is in
control of your pc, instead of you. You're still stuck with the
irritating unconfigurable, unprogrammable Window's window manager,
hopeless Windows' device access/control (keyboard, mouse, disks,
printer), endless CRLF issues with Windows programs, and you have to
cope with Windows all-gui administration stuff. How do you manage?
Maybe I'm just spoiled.
Some of these things may even get fixed before too long, if the window
manager can be replaced, explorer can be dropped, and there's rootless
X, and a Cygwin Emacs... dreaming on ... and learning native Windows
programs about Cygwin paths and real cut and paste, by using some DLLs
from WINE. Did I miss any obvious important or impossible wishes?
> Ok, but this is *NOT* what the readme says. It tells people to run
> the script.
Hmm, yes. I've changed the readme text a bit, and included a native
Cygwin script. In -2 it still had a silly bug, but that's fixed for
the upcoming (and hopefully to be released) -3.
Greetings,
Jan.
#!/bin/sh
set -x
# Generic Cygwin build script -- modified for guile-1.5.6
# Jan Nieuwenhuizen <janneke@gnu.org>
#
# Note: guile-1.5.6 has not been built using this script,
# but rather using the cross build scripts at:
#
# http://lilypond.org/cygwin/cygwin-cross.tar.gz
#
# that process has been captured in cross-guile-1.5.6-2.sh
#
# TODO:
#
# * Shell scripts should start with: set -e
# * More generic sub-package handling
# find out where the build script is located
tdir=`echo "$0" | sed 's%[\\/][^\\/][^\\/]*$%%'`
test "x$tdir" = "x$0" && tdir=.
scriptdir=`cd $tdir; pwd`
# find src directory.
# If scriptdir ends in SPECS, then topdir is $scriptdir/..
# If scriptdir ends in CYGWIN-PATCHES, then topdir is $scriptdir/../..
# Otherwise, we assume that topdir = scriptdir
topdir1=`echo ${scriptdir} | sed 's%/SPECS$%%'`
topdir2=`echo ${scriptdir} | sed 's%/CYGWIN-PATCHES$%%'`
if [ "x$topdir1" != "x$scriptdir" ] ; then # SPECS
topdir=`cd ${scriptdir}/..; pwd`
else
if [ "x$topdir2" != "x$scriptdir" ] ; then # CYGWIN-PATCHES
topdir=`cd ${scriptdir}/../..; pwd`
else
topdir=`cd ${scriptdir}; pwd`
fi
fi
tscriptname=`basename $0 .sh`
export PKG=`echo $tscriptname | sed -e 's/\-[^\-]*\-[^\-]*$//'`
export VER=`echo $tscriptname | sed -e 's/^[^\-]*\-//' -e 's/\-[^\-]*$//'`
export REL=`echo $tscriptname | sed -e 's/^[^\-]*\-[^\-]*\-//'`
export FULLPKG=${PKG}-${VER}-${REL}
# if the orig src package is bzip2'ed, remember to
# change 'z' to 'j' in the 'tar xvzf' commands in the
# prep) and mkpatch) sections
export src_orig_pkg_name=${FULLPKG}-orig.tar.bz2
export src_pkg_name=${FULLPKG}-src.tar.bz2
export src_patch_name=${FULLPKG}.patch
export bin_pkg_name=${FULLPKG}.tar.bz2
export src_orig_pkg=${topdir}/${src_orig_pkg_name}
export src_pkg=${topdir}/${src_pkg_name}
export src_patch=${topdir}/${src_patch_name}
export bin_pkg=${topdir}/${bin_pkg_name}
export srcdir=${topdir}/${PKG}-${VER}
export objdir=${srcdir}/.build
export instdir=${srcdir}/.inst
export srcinstdir=${srcdir}/.sinst
export checkfile=${topdir}/${FULLPKG}.check
# run on
host=`gcc -dumpmachine`
# if this package creates binaries, they run on
target=$host
prefix=/usr
sysconfdir=/etc
MY_CFLAGS="-O2 -g"
MY_LDFLAGS=
mkdirs() {
(cd ${topdir} && \
mkdir -p ${objdir} && \
mkdir -p ${instdir} && \
mkdir -p ${srcinstdir} )
}
prep() {
(cd ${topdir} && \
tar xvjf ${src_orig_pkg} ; \
cd ${topdir}/$PKG-$VER && \
patch -p0 < ${src_patch} \
&& mkdirs )
}
conf() {
(cd ${objdir} && \
CFLAGS="${MY_CFLAGS}" LDFLAGS="${MY_LDFLAGS}" \
${srcdir}/configure --host=${host} --target=${target} \
--srcdir=${srcdir} --prefix=${prefix} \
--exec-prefix=${prefix} --sysconfdir=${sysconfdir} \
--libdir=${prefix}/lib --includedir=${prefix}/include \
--libexecdir='${sbindir}' --localstatedir=/var \
--datadir='${prefix}/share'
)
}
build() {
(export SED=sed # libtool fix
cd ${objdir} && \
CFLAGS="${MY_CFLAGS}" make )
}
check() {
(cd ${objdir} && \
make test | tee ${checkfile} 2>&1 )
}
clean() {
(cd ${objdir} && \
make clean )
}
install() {
(export SED=sed # libtool fix
cd ${objdir} && \
make install DESTDIR=${instdir}
if [ -f ${instdir}${prefix}/info/dir ] ; then \
rm ${instdir}${prefix}/info/dir ; \
fi && \
if [ ! -d ${instdir}${prefix}/doc/${PKG}-${VER} ]; then \
mkdir -p ${instdir}${prefix}/doc/${PKG}-${VER} ; \
fi && \
if [ ! -d ${instdir}${prefix}/doc/Cygwin ]; then \
mkdir -p ${instdir}${prefix}/doc/Cygwin ; \
fi && \
templist=""; \
for f in ${srcdir}/ANNOUNCE ${srcdir}/CHANGES ${srcdir}/INSTALL \
${srcdir}/KNOWNBUG ${srcdir}/LICENSE ${srcdir}/README \
${srcdir}/TODO ; do \
if [ -f $f ] ; then \
templist="$templist $f"; \
fi ; \
done && \
if [ ! "x$templist" = "x" ]; then \
/usr/bin/install -m 644 $templist \
${instdir}${prefix}/doc/${PKG}-${VER} ;
fi && \
if [ -f ${srcdir}/CYGWIN-PATCHES/${PKG}.README ]; then \
/usr/bin/install -m 644 ${srcdir}/CYGWIN-PATCHES/${PKG}.README \
${instdir}${prefix}/doc/Cygwin/${PKG}-${VER}.README ; \
else \
if [ -f ${srcdir}/CYGWIN-PATCHES/README ]; then \
/usr/bin/install -m 644 ${srcdir}/CYGWIN-PATCHES/README \
${instdir}${prefix}/doc/Cygwin/${PKG}-${VER}.README ; \
fi ;\
fi ; \
if [ -f ${srcdir}/CYGWIN-PATCHES/${PKG}.changelog ]; then \
/usr/bin/install -m 644 ${srcdir}/CYGWIN-PATCHES/changelog \
${instdir}${prefix}/doc/${PKG}-${VER}/changelog.Cygwin ; \
fi ; \
if [ -f ${srcdir}/CYGWIN-PATCHES/postinstall.sh ]; then \
if [ ! -d ${instdir}${sysconfdir}/postinstall ]; then \
mkdir -p ${instdir}${sysconfdir}/postinstall ; \
fi ; \
/usr/bin/install -m 755 ${srcdir}/CYGWIN-PATCHES/postinstall.sh \
${instdir}${sysconfdir}/postinstall/${PKG}.sh; \
fi
)
}
strip() {
(cd ${instdir} && \
find . -name "*.dll" | xargs strip > /dev/null 2>&1
find . -name "*.exe" | xargs strip > /dev/null 2>&1 ) || true # for Linux
}
simplepkg() {
(cd ${instdir} && \
tar cvjf ${bin_pkg} * )
}
split() {
# this all very package-specific
# setup compatibility vars
cyggz=.bz2
cygtargz=.tar$cyggz
czf="--owner=0 --group=0 -cjf"
name=$PKG
cygpack=$FULLPKG
tardir=$topdir
sourcedir=$srcdir
installroot=$instdir
### BEGIN imported from cygwin-cross/stage/guile-1.5.6.postinstall
## this fixes suffixes, already done here
## . $stagedir/native.postinstall
## Cygwin doesn't adhere to FHS (and why should they?)
##docdir=$prefix/share/doc/$name-$version
docdir=$prefix/doc/$name-$version
# guile
(cd $sourcedir
## already done here
## strip $installroot/$prefix/bin/guile.exe
mkdir -p $installroot/$docdir
## cp -p ANON-CVS AUTHORS BUGS COPYING ChangeLog HACKING INSTALL LICENSE NEWS README SNAPSHOTS THANKS $installroot/$docdir
cp -p ANON-CVS AUTHORS BUGS COPYING ChangeLog HACKING INSTALL NEWS README SNAPSHOTS THANKS $installroot/$docdir
cp -p CYGWIN-PATCHES/README $installroot/$docdir/README.Cygwin
cp -p CYGWIN-PATCHES/changelog $installroot/$docdir/changelog.Cygwin
mkdir -p $installroot/$prefix/doc/Cygwin
cp -p CYGWIN-PATCHES/README $installroot/$prefix/doc/Cygwin/$cygpack.README
mkdir -p $installroot/$prefix/man/man1
cp -p doc/guile.1 $installroot/$prefix/man/man1)
# libguileX
rm -rf $installroot-lib$name$SO
mkdir -p $installroot-lib$name$SO
(cd $installroot-lib$name$SO
mkdir -p ./$prefix/bin
mv $installroot/$prefix/bin/*.dll ./$prefix/bin
# mkdir -p ./$prefix/man/man1
# mv $installroot/$prefix/man/man1/guile-* ./$prefix/man/man1
mkdir -p ./$prefix/share
mv $installroot/$prefix/share/guile ./$prefix/share)
# libguile-devel
rm -rf $installroot-lib$name-devel
mkdir -p $installroot-lib$name-devel
(cd $installroot-lib$name-devel
mkdir -p ./$prefix/bin
mv $installroot/$prefix/bin/guile-* ./$prefix/bin
mv $installroot/$prefix/include ./$prefix/include
mkdir -p ./$prefix/lib
mv $installroot/$prefix/lib/*.a ./$prefix/lib
mv $installroot/$prefix/lib/*.la ./$prefix/lib
mkdir -p ./$prefix/share
mv $installroot/$prefix/share/aclocal ./$prefix/share)
# guile-doc
rm -rf $installroot-$name-doc
mkdir -p $installroot-$name-doc
(cd $installroot-$name-doc
mkdir -p ./$prefix
mv $installroot/$prefix/info ./$prefix)
### END imported from cygwin-cross/stage/guile-1.5.6.postinstall
}
pkg() {
# this all very package-specific
# setup compatibility vars
cyggz=.bz2
cygtargz=.tar$cyggz
czf="--owner=0 --group=0 -cjf"
name=$PKG
cygpack=$FULLPKG
tardir=$topdir
sourcedir=$srcdir
installroot=$instdir
### BEGIN imported from cygwin-cross/stage/guile-1.5.6.tar
# guile
mkdir -p $tardir/$name
# ugh, automate and fix this
chmod -R a-s+rX $installroot
chmod -R g-w $installroot
(cd $installroot/ && tar $czf $tardir/$name/$cygpack$cygtargz *)
cp -pv $sourcedir/CYGWIN-PATCHES/$name.hint $tardir/$name/setup.hint
# libguileX libguile-devel guile-doc
for i in lib$name$SO lib$name-devel $name-doc; do
mkdir -p $tardir/$name/$i
cygpacki=$i-$version-$build
# ugh, automate and fix this
chmod -R a-s+rX $installroot-$i
chmod -R g-w $installroot-$i
(cd $installroot-$i/ && tar $czf $tardir/$name/$i/$cygpacki$cygtargz *)
cp -pv $sourcedir/CYGWIN-PATCHES/$i.hint $tardir/$name/$i/setup.hint
done
## hmm? already in template.dowload...
## binball=$(ls -utr1 $tardir/$name/$cygpack$cygtargz 2>/dev/null | tail -1)
### END imported from cygwin-cross/stage/guile-1.5.6.tar
}
mkpatch() {
(cd ${srcdir} && \
tar xvjf ${src_orig_pkg} ;\
mv ${PKG}-${VER} ../${PKG}-${VER}-orig && \
cd ${topdir} && \
rm -f autom4te.cache config.cache && \
diff -urN -x '.build' -x '.inst' -x '.sinst' \
${PKG}-${VER}-orig ${PKG}-${VER} > \
${srcinstdir}/${src_patch_name} ; \
rm -rf ${PKG}-${VER}-orig )
}
spkg() {
(mkpatch && \
cp ${src_orig_pkg} ${srcinstdir}/${src_orig_pkg_name} && \
cp $0 ${srcinstdir}/`basename $0` && \
cd ${srcinstdir} && \
tar cvjf ${src_pkg} * )
}
finish() {
rm -rf ${srcdir}
}
echo "$0"
case $1 in
prep) prep ; STATUS=$? ;;
mkdirs) mkdirs; STATUS=$? ;;
conf) conf ; STATUS=$? ;;
build) build ; STATUS=$? ;;
check) check ; STATUS=$? ;;
clean) clean ; STATUS=$? ;;
install) install ; STATUS=$? ;;
strip) strip ; STATUS=$? ;;
split) split ; STATUS=$? ;;
package) pkg ; STATUS=$? ;;
pkg) pkg ; STATUS=$? ;;
mkpatch) mkpatch ; STATUS=$? ;;
src-package) spkg ; STATUS=$? ;;
spkg) spkg ; STATUS=$? ;;
finish) finish ; STATUS=$? ;;
all) prep && conf && build && install && \
strip && split && pkg && spkg && finish ; \
STATUS=$? ;;
*) cat <<EOF
Usage:
$0 STAGE
Where
STAGE: all prep conf build install strip split pkg spkg finish
EOF
# Usage error
exit 2 ;;
esac
exit ${STATUS}
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org