Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Missing Cygwin/MSYS2 packages
#!/usr/bin/env bash
# Install re2c
cd /tmp &&
git clone --depth 1 https://github.com/skvadrik/re2c.git &&
cd re2c/re2c &&
./autogen.sh &&
./configure --prefix=/usr &&
make -j$(nproc) && make install &&
rm -rf /tmp/re2c
# Install ninja
cd /tmp &&
git clone --depth 1 https://github.com/ninja-build/ninja.git &&
cd ninja &&
./configure.py --bootstrap &&
mv ninja.exe /usr/bin &&
rm -rf /tmp/ninja
# Install ragel
cd /tmp &&
wget http://www.colm.net/files/ragel/ragel-6.9.tar.gz &&
tar -zxvf ragel-6.9.tar.gz &&
cd ragel-* &&
./configure --prefix=/usr CXXFLAGS="$CXXFLAGS -std=gnu++98" &&
make -j$(nproc) && make install &&
rm -rf /tmp/ragel-*
if command grep -q CYGWIN_NT /proc/version; then
# Install gyp [only needed by Cygwin]
cd /tmp &&
git clone --depth 1 https://chromium.googlesource.com/external/gyp &&
cd gyp &&
python2 setup.py install &&
rm -rf /tmp/gyp
elif command grep -q MSYS_NT /proc/version ; then
# Install libjpeg [only needed by MSYS2]
cd /tmp &&
wget http://downloads.sourceforge.net/project/libjpeg/libjpeg/6b/jpegsr6.zip &&
unzip jpegsr6 &&
cd jpeg* &&
sed -i 's@\r@@g' configure &&
./configure --prefix=/usr &&
make -j$(nproc) && make install-lib &&
rm -rf /tmp/jpeg*
fi
# Install rst2pdf
cd /tmp &&
wget https://bootstrap.pypa.io/get-pip.py &&
python2 get-pip.py &&
pip install rst2pdf &&
rm -f /tmp/get-pip.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment