before_install_linux.sh 1.06 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
dpkg --list imagemagick
sudo apt-get update
sudo apt-get remove -y imagemagick
sudo apt-get install -y build-essential libx11-dev libxext-dev zlib1g-dev libpng12-dev libjpeg-dev libfreetype6-dev libxml2-dev
sudo apt-get build-dep -y imagemagick
case $IMAGEMAGICK_VERSION in
    latest)
        wget http://www.imagemagick.org/download/ImageMagick.tar.xz
        tar -xf ImageMagick.tar.xz
        cd ImageMagick-*
    ;;
    *)
        wget http://www.imagemagick.org/download/releases/ImageMagick-${IMAGEMAGICK_VERSION}.tar.xz
        tar -xf ImageMagick-${IMAGEMAGICK_VERSION}.tar.xz
        cd ImageMagick-${IMAGEMAGICK_VERSION}
    ;;
esac
./configure --prefix=/usr $CONFIGURE_OPTIONS
sudo make install
cd ..
sudo ldconfig

if [[ $TRAVIS_RUBY_VERSION =~ ^1.8 ]]; then
    echo "Set the stack size to unlimited to avoid segfault for Ruby 1.8"
    ulimit -s unlimited
fi
27 28 29 30 31 32

# Fixes this error:
# NoMethodError: undefined method `spec' for nil:NilClass
# Travis uses Bundler 1.7.6 by default and it has this bug
# https://github.com/rubygems/rubygems/issues/1419
gem install bundler