./installdeps: support Fedora Linux

Detect and install deps for Fedora Linux in ./installdeps . On 64 bit
intel hosts install both 32 and 64 bit dev libs. Also update README.md
to note that Fedora is supported.

MISC: add nasm to all dep lists for various dists
This commit is contained in:
Rafael Kitover 2016-12-28 08:48:30 -08:00
parent f641620a6c
commit b258c004af
2 changed files with 43 additions and 6 deletions

View File

@ -21,8 +21,8 @@ cmake ..
make -j10 make -j10
``` ```
`./installdeps` is supported on MSys2, Linux (Debian/Ubuntu or Arch Linux) and `./installdeps` is supported on MSys2, Linux (Debian/Ubuntu, Fedora or Arch
Mac OS X (homebrew, macports or fink.) Linux) and Mac OS X (homebrew, macports or fink.)
If your OS is not supported, you will need the following: If your OS is not supported, you will need the following:

View File

@ -127,8 +127,20 @@ countdown() {
} }
linux_installdeps() { linux_installdeps() {
# detect host architecture
case "$(uname -a)" in
*x86_64*)
amd64=1
;;
*i686*)
i686=1
;;
esac
if [ -f /etc/debian_version ]; then if [ -f /etc/debian_version ]; then
debian_installdeps debian_installdeps
elif [ -f /etc/fedora-release ]; then
fedora_installdeps
elif [ -f /etc/arch-release ]; then elif [ -f /etc/arch-release ]; then
archlinux_installdeps archlinux_installdeps
else else
@ -185,7 +197,7 @@ debian_installdeps() {
if [ -z "$target" ]; then if [ -z "$target" ]; then
check sudo apt-get -qq update check sudo apt-get -qq update
check sudo apt-get -qy install build-essential g++ zlib1g-dev libgl1-mesa-dev cmake libavcodec-dev libavformat-dev libswscale-dev libavutil-dev libgettextpo-dev libjpeg-dev libpng16-dev libtiff5-dev libsdl2-dev libsfml-dev libopenal-dev libwxgtk3.0-dev check sudo apt-get -qy install build-essential g++ nasm cmake zlib1g-dev libgl1-mesa-dev libavcodec-dev libavformat-dev libswscale-dev libavutil-dev libgettextpo-dev libjpeg-dev libpng16-dev libtiff5-dev libsdl2-dev libsfml-dev libopenal-dev libwxgtk3.0-dev
else else
case "$target" in case "$target" in
mingw-w64-i686) mingw-w64-i686)
@ -223,6 +235,31 @@ debian_installdeps() {
build_instructions build_instructions
} }
fedora_installdeps() {
fedora=1
check_cross
installing
# make sure rpmfusion is installed for ffmpeg
check sudo su -c 'dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm'
# non-multiarch packages first
check sudo dnf -y install gcc gcc-c++ make cmake git nasm
# install both 64bit and 32bit versions on 64 bit hosts
set --
for pkg in pkgconfig zlib-devel mesa-libGL-devel ffmpeg-devel gettext-devel libjpeg-turbo-devel libpng-devel libtiff-devel SDL2-devel SFML-devel openal-soft-devel wxGTK3-devel; do
if [ -n "$amd64" ]; then
set -- "$@" "${pkg}.x86_64" "${pkg}.i686"
else
set -- "$@" "$pkg"
fi
done
check sudo dnf -y install "$@"
build_instructions
}
archlinux_installdeps() { archlinux_installdeps() {
arch_linux=1 arch_linux=1
@ -381,7 +418,7 @@ brew_installdeps() {
check brew -v update check brew -v update
set -- set --
for f in cairo cmake ffmpeg gettext jpeg libpng libtiff pkg-config sdl2 sfml wxmac; do for f in cairo nasm cmake ffmpeg gettext jpeg libpng libtiff pkg-config sdl2 sfml wxmac; do
if brew info "$f" | grep -Eq '^Not installed$'; then if brew info "$f" | grep -Eq '^Not installed$'; then
set -- "$@" "$f" set -- "$@" "$f"
fi fi
@ -398,7 +435,7 @@ macports_installdeps() {
installing installing
check sudo port -v selfupdate check sudo port -v selfupdate
check sudo port -v install cairo cmake ffmpeg gettext jpeg libpng tiff pkgconfig libsdl2 sfml wxWidgets-3.0 libiconv check sudo port -v install cairo cmake nasm ffmpeg gettext jpeg libpng tiff pkgconfig libsdl2 sfml wxWidgets-3.0 libiconv
check sudo port select wxWidgets wxWidgets-3.0 check sudo port select wxWidgets wxWidgets-3.0
build_instructions build_instructions
@ -409,7 +446,7 @@ fink_installdeps() {
installing installing
check sudo fink -vy selfupdate check sudo fink -vy selfupdate
check sudo fink -vy install cairo cmake ffmpeg libgettext8-dev gettext-tools libjpeg9 libpng16 libtiff5 pkgconfig sdl2 wxwidgets300-osxcocoa libiconv-dev check sudo fink -vy install cairo cmake nasm ffmpeg libgettext8-dev gettext-tools libjpeg9 libpng16 libtiff5 pkgconfig sdl2 wxwidgets300-osxcocoa libiconv-dev
warning 'SFML is required for LINK support, there is currently no SFML package for Fink, if you want LINK support you will need to install it manually' warning 'SFML is required for LINK support, there is currently no SFML package for Fink, if you want LINK support you will need to install it manually'