Skip to content

Commit

Permalink
Merge pull request The-OpenROAD-Project#5635 from vvbandeira/dep-fmt
Browse files Browse the repository at this point in the history
etc: format DependencyInstaller
  • Loading branch information
vvbandeira authored Aug 22, 2024
2 parents f0626be + bc2d953 commit 4c3c3a7
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions etc/DependencyInstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ _installCommonDev() {

# Check if pcre2 is installed
if [[ -z $(pcre2-config --version) ]]; then
tarName="pcre2-${pcreVersion}.tar.gz"
wget https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${pcreVersion}/${tarName}
md5sum -c <(echo "${pcreChecksum} ${tarName}") || exit 1
./Tools/pcre-build.sh
tarName="pcre2-${pcreVersion}.tar.gz"
wget https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${pcreVersion}/${tarName}
md5sum -c <(echo "${pcreChecksum} ${tarName}") || exit 1
./Tools/pcre-build.sh
fi
./autogen.sh
./configure --prefix=${swigPrefix}
Expand Down Expand Up @@ -243,8 +243,8 @@ _installCommonDev() {
rm -rf "${baseDir}"

if [[ ! -z ${PREFIX} ]]; then
# Emit an environment setup script
cat > ${PREFIX}/env.sh <<EOF
# Emit an environment setup script
cat > ${PREFIX}/env.sh <<EOF
depRoot="\$(dirname \$(readlink -f "\${BASH_SOURCE[0]}"))"
PATH=\${depRoot}/bin:\${PATH}
LD_LIBRARY_PATH=\${depRoot}/lib64:\${depRoot}/lib:\${LD_LIBRARY_PATH}
Expand Down Expand Up @@ -334,7 +334,7 @@ _installUbuntuPackages() {
tcllib \
wget \
zlib1g-dev \
ccache \
ccache

packages=()
# Chose Python version
Expand Down Expand Up @@ -422,8 +422,8 @@ _installRHELPackages() {
http://repo.okay.com.mx/centos/8/x86_64/release/bison-3.0.4-10.el8.x86_64.rpm \
https://forensics.cert.org/centos/cert/7/x86_64/flex-2.6.1-9.el7.x86_64.rpm

wget https://github.com/jgm/pandoc/releases/download/${version}/pandoc-${version}-linux-${arch}.tar.gz &&\
tar xvzf pandoc-${version}-linux-${arch}.tar.gz --strip-components 1 -C /usr/local/ &&\
wget https://github.com/jgm/pandoc/releases/download/${version}/pandoc-${version}-linux-${arch}.tar.gz
tar xvzf pandoc-${version}-linux-${arch}.tar.gz --strip-components 1 -C /usr/local/
rm -rf pandoc-${version}-linux-${arch}.tar.gz
}

Expand Down Expand Up @@ -478,7 +478,7 @@ _installCentosPackages() {
wget \
ccache \
zlib-devel
}
}

_installOpenSuseCleanUp() {
zypper -n clean --all
Expand Down Expand Up @@ -522,6 +522,7 @@ _installOpenSusePackages() {
tcllib \
wget \
zlib-devel

update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 50
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 50
}
Expand Down Expand Up @@ -551,18 +552,18 @@ _installHomebrewPackage() {

_installDarwin() {
if ! command -v brew &> /dev/null; then
echo "Homebrew is not found. Please install homebrew before continuing."
exit 1
fi
echo "Homebrew is not found. Please install homebrew before continuing."
exit 1
fi
if ! xcode-select -p &> /dev/null; then
# xcode-select does not pause execution, so the user must handle it
cat <<EOF
# xcode-select does not pause execution, so the user must handle it
cat <<EOF
Xcode command line tools not installed.
Run the following command to install them:
xcode-select --install
Then, rerun this script.
EOF
exit 1
exit 1
fi
brew install bison boost cmake eigen flex fmt groff libomp or-tools pandoc pyqt5 python spdlog tcl-tk zlib

Expand Down Expand Up @@ -619,6 +620,7 @@ _installDebianPackages() {
apt-get install -y --no-install-recommends \
libpython3.7 \
qt5-default

else
apt-get install -y --no-install-recommends \
libpython3.8 \
Expand All @@ -644,6 +646,7 @@ _installCI() {
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg \
-o /etc/apt/keyrings/docker.asc

chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
Expand Down

0 comments on commit 4c3c3a7

Please sign in to comment.