Skip to content

Instantly share code, notes, and snippets.

@dmcbane
Last active May 15, 2018 00:16
Show Gist options
  • Save dmcbane/48de4dfb4d114e9656818e691cbc0904 to your computer and use it in GitHub Desktop.
Save dmcbane/48de4dfb4d114e9656818e691cbc0904 to your computer and use it in GitHub Desktop.
Build and install Guile 2.2 under Cygwin
#! /usr/bin/env bash
# install apt-cyg
lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
install apt-cyg /bin
rm apt-cyg
# install dependencies
apt-cyg install gcc-g++ binutils flex bison autoconf automake libtool \
pkg-config gettext texinfo gdb git libunistring-devel libgc-devel \
libgmp-devel libiconv-devel libffi-devel libreadline-devel libintl-devel \
gettext-devel
# optional
apt-cyg install libmysqlclient-devel libsqlite3-devel libpq-devel
# clone the source repo
if [ ! -d ~/src ]; then
mkdir -p ~/src
fi
cd ~/src
git clone git://git.sv.gnu.org/guile.git
# create a branch for the release tag
cd guile
git branch branch2.2.3 v2.2.3
git checkout branch2.2.3
# configure and build
./autogen.sh --no-configure && ./configure --prefix=/usr --disable-static \
--docdir=/usr/share/doc/guile-2.2.3 && make && make html && makeinfo \
--plaintext -o doc/r5rs/r5rs.txt doc/r5rs/r5rs.texi && makeinfo --plaintext \
-o doc/ref/guile.txt doc/ref/guile.texi && ./check-guile
# install
make install && make install-html && mv /usr/lib/libguile-*-gdb.scm \
/usr/share/gdb/auto-load/usr/lib && \
mv /usr/share/doc/guile-2.2.3/{guile.html,ref} && \
mv /usr/share/doc/guile-2.2.3/r5rs{.html,} && \
find examples -name "Makefile*" -delete && \
cp -vR examples /usr/share/doc/guile-2.2.3
for DIRNAME in r5rs ref; do
install -v -m644 doc/${DIRNAME}/*.txt \
/usr/share/doc/guile-2.2.3/${DIRNAME}
done &&
unset DIRNAME
# cleanup
make clean
# optional guile-dbi build and install
cd ~/src
git clone https://github.com/eestrada/guile-dbi.git
cd guile-dbi/guile-dbi && ./autogen.sh --no-configure && mkdir build && cd \
build && ../configure --prefix=/usr && make && make install && make clean
cd ~/src/guile-dbi/guile-dbd-mysql && ./autogen.sh --no-configure && mkdir \
build && cd build && ../configure --prefix=/usr && make && make install \
&& make clean
if [ ! -f /usr/include/postgresql/libpq-fe.h ]; then
ln -s /usr/include/libpq-fe.h /usr/include/postgresql/libpq-fe.h
fi
cd ~/src/guile-dbi/guile-dbd-postgresql && ./autogen.sh --no-configure && \
mkdir build && cd build && ../configure --prefix=/usr && make && make \
install && make clean
cd ~/src/guile-dbi/guile-dbd-sqlite3 && ./autogen.sh --no-configure && mkdir \
build && cd build && ../configure --prefix=/usr && make && make install \
&& make clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment