Created
May 4, 2018 10:03
-
-
Save dmcbane/19253f54c5b9a83d676bf031419a55df to your computer and use it in GitHub Desktop.
Build and Install Guile 2.2 under MSYS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
# install dependencies | |
pacman -S --noconfirm gcc binutils flex bison autoconf automake-wrapper libtool \ | |
pkg-config gettext texinfo gdb git libunistring-devel libgc-devel \ | |
gmp-devel libiconv-devel libffi-devel libreadline-devel intltool \ | |
gettext-devel | |
# optional | |
pacman -S --noconfirm libsqlite-devel # 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
Run the MSYS bash shell as Admin and then execute this script. It will install dependencies, build guile, and install it under /usr. The other Guile 2.2 build gists that I have created recently install guile-dbi with SQLite, MySQL and PostgreSQL support. This one only support SQLite.