#!/usr/bin/env bash

#
# install-dependencies-yum
#
# Copyright (C) 2009-20 by RStudio, PBC
#
# Unless you have received this program directly from RStudio pursuant
# to the terms of a commercial license agreement with RStudio, then
# this program is licensed to you under the terms of version 3 of the
# GNU Affero General Public License. This program is distributed WITHOUT
# ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
# AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
#
#

set -e

# build/development tools
sudo yum install -y make
sudo yum install -y gcc
sudo yum install -y gcc-c++
sudo yum install -y cmake
sudo yum install -y rpmdevtools
sudo yum install -y wget

# core system libraries
sudo yum install -y libuuid-devel
sudo yum install -y openssl-devel
sudo yum install -y bzip2-devel
sudo yum install -y zlib-devel
sudo yum install -y pam-devel

# pandoc dependencies
sudo yum install -y libffi

# boost
sudo yum install -y boost-devel

# pango cairo
sudo yum install -y pango-devel

# gwt prereqs
sudo yum install -y java-1.8.0-openjdk
sudo yum install -y java-1.8.0-openjdk-devel
sudo yum install -y ant
sudo yum install -y xml-commons-apis

# required for Qt
sudo yum install -y libxslt-devel
sudo yum install -y mesa-libGL-devel
sudo yum install -y libXScrnSaver-devel
sudo yum install -y fakeroot
sudo yum install -y postgresql-devel

# overlay
if [ -e install-overlay-yum ]
then
  ./install-overlay-yum
fi

# common
cd ../common
./install-common --install-crashpad-sudo
cd ../linux

