-
-
Save nshtg/8acad63cd9f983935738ac9c30393a44 to your computer and use it in GitHub Desktop.
Missing Cygwin/MSYS2 packages
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 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