Skip to content

Adding support for Fedora based distros to the deps installation script #203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 67 additions & 3 deletions tools/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ dpkg_all_installed() {
return 0
}

rpm_all_installed() {
for arg; do
if ! rpm -q "$arg" >/dev/null 2>&1; then
return 1
fi
done
return 0
}

if command -v lsb_release > /dev/null ; then
case $(lsb_release -i -s) in
Ubuntu|Debian)
Expand All @@ -39,9 +48,9 @@ if command -v lsb_release > /dev/null ; then
libjpeg-dev
libpng-dev
libwebp-dev
libx11-xcb-dev
libxcb-xkb-dev
xcb
libx11-xcb-dev
libxcb-xkb-dev
xcb
EOF
)
if [ $(lsb_release -r -s) = '14.04' ] ; then
Expand All @@ -52,8 +61,63 @@ if command -v lsb_release > /dev/null ; then
fi
exit
;;
Fedora|CentOS|RedHatEnterprise*|Rocky*|AlmaLinux*)
PACKAGES=$(cat<<-EOF
gcc-c++
freeglut-devel
fontconfig-devel
freetype-devel
mesa-libGL-devel
mesa-libGLU-devel
harfbuzz-devel
libicu-devel
libjpeg-turbo-devel
libpng-devel
libwebp-devel
libxcb-devel
xcb-util-keysyms-devel
ninja-build
EOF
)
if ! rpm_all_installed $PACKAGES; then
if command -v dnf > /dev/null 2>&1; then
sudo dnf $1 install $PACKAGES
else
sudo yum $1 install $PACKAGES
fi
fi
exit
;;
esac
fi

if [ -f /etc/redhat-release ]; then
PACKAGES=$(cat<<-EOF
gcc-c++
freeglut-devel
fontconfig-devel
freetype-devel
mesa-libGL-devel
mesa-libGLU-devel
harfbuzz-devel
libicu-devel
libjpeg-turbo-devel
libpng-devel
libwebp-devel
libxcb-devel
xcb-util-keysyms-devel
ninja-build
EOF
)
if ! rpm_all_installed $PACKAGES; then
if command -v dnf > /dev/null 2>&1; then
sudo dnf install $PACKAGES
else
sudo yum install $PACKAGES
fi
fi
exit
fi

echo 'unknown system'
exit 1