language: ruby
rvm:
  - 1.9.3
  - 2.1.2
  - jruby-19mode
notifications:
  email: false
script: xvfb-run rake
env:
  global:
    - BUNDLE_JOBS=4
    - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
matrix:
  include:
    - rvm: 1.9.3
      gemfile: gemfiles/2.3.gemfile
      env: QMAKE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake
    - rvm: 1.9.3
      gemfile: gemfiles/2.4.gemfile
      env: QMAKE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake
gemfile:
  - gemfiles/2.3.gemfile
  - gemfiles/2.4.gemfile
before_install:
  - sudo apt-add-repository -y ppa:ubuntu-sdk-team/ppa
  - sudo apt-get update
  - sudo apt-get install libqt5webkit5-dev qtdeclarative5-dev qtlocation5-dev qtsensors5-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev qt4-default
install: bundle

language: ruby
rvm:
  - 1.9.3
  - 2.1
  - jruby-19mode
notifications:
  email: false
script: xvfb-run rake
env:
  global:
    - BUNDLE_JOBS=4
    - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
matrix:
  include:
    - rvm: 1.9.3
      gemfile: gemfiles/2.3.gemfile
      env: QMAKE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake
    - rvm: 1.9.3
      gemfile: gemfiles/2.4.gemfile
      env: QMAKE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake
gemfile:
  - gemfiles/2.3.gemfile
  - gemfiles/2.4.gemfile
before_install:
  - sh -c 'if [ -n "$QMAKE" ]; then sudo apt-add-repository -y ppa:ubuntu-sdk-team/ppa && sudo apt-get update && sudo apt-get install libqt5webkit5-dev qtdeclarative5-dev; fi'
install: bundle

Clean up Travis before install script
Clean up Travis before install script

Only install Qt 5 when building against Qt 5.

Remove unnecessary explicit dependencies.
