mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
chore(build): add missing dependencies and fix make path
This commit adds the following fixes to simple_make.sh - cmake -H -B is undocumented and not officially supported, so replace it with the standard way Fixes #4267 - fix build via "opensuse" docker image + zypper in sudo (if not installed) + replace external program "which" with shell built-in "command -v" + update and sorte depencies for OpenSUSE + improve the distro test, as OpenSUSE may have apt installed, but not necessarily lsb_release. Note: OpenSUSE has no package called ffmpeg-devel in the official repos, but it it has ffmpeg2-devel.
This commit is contained in:
parent
c7202c8b24
commit
9b3d919d27
|
@ -117,51 +117,59 @@ fedora_locallib() {
|
||||||
|
|
||||||
zypper_install() {
|
zypper_install() {
|
||||||
local zypper_packages=(
|
local zypper_packages=(
|
||||||
|
automake
|
||||||
cmake
|
cmake
|
||||||
|
ffmpeg2-devel
|
||||||
git
|
git
|
||||||
|
libopus-devel
|
||||||
libQt5Concurrent-devel
|
libQt5Concurrent-devel
|
||||||
|
libqt5-linguist
|
||||||
|
libqt5-linguist-devel
|
||||||
libQt5Network-devel
|
libQt5Network-devel
|
||||||
libQt5OpenGL-devel
|
libQt5OpenGL-devel
|
||||||
libQt5Sql-devel
|
|
||||||
libQt5Sql5-sqlite
|
|
||||||
libQt5Xml-devel
|
|
||||||
libXScrnSaver-devel
|
|
||||||
libffmpeg-devel
|
|
||||||
libopus-devel
|
|
||||||
libqt5-linguist
|
|
||||||
libqt5-qtbase-common-devel
|
libqt5-qtbase-common-devel
|
||||||
libqt5-qtsvg-devel
|
libqt5-qtsvg-devel
|
||||||
|
libQt5Sql5-sqlite
|
||||||
|
libQt5Sql-devel
|
||||||
|
libQt5Test-devel
|
||||||
|
libQt5Xml-devel
|
||||||
libsodium-devel
|
libsodium-devel
|
||||||
libvpx-devel
|
libvpx-devel
|
||||||
|
libXScrnSaver-devel
|
||||||
openal-soft-devel
|
openal-soft-devel
|
||||||
patterns-openSUSE-devel_basis
|
patterns-openSUSE-devel_basis
|
||||||
patterns-openSUSE-devel_basis
|
|
||||||
qrencode-devel
|
qrencode-devel
|
||||||
sqlcipher-devel
|
sqlcipher-devel
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# if not sudo is installed, e.g. in docker image, install it
|
||||||
|
command -v sudo || zypper in sudo
|
||||||
|
|
||||||
sudo zypper in "${zypper_packages[@]}"
|
sudo zypper in "${zypper_packages[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
if which apt-get
|
if command -v zypper && [ -f /etc/products.d/openSUSE.prod ]
|
||||||
|
then
|
||||||
|
zypper_install
|
||||||
|
elif command -v apt-get
|
||||||
then
|
then
|
||||||
apt_install
|
apt_install
|
||||||
elif which pacman
|
elif command -v pacman
|
||||||
then
|
then
|
||||||
pacman_install
|
pacman_install
|
||||||
elif which dnf
|
elif command -v dnf
|
||||||
then
|
then
|
||||||
dnf_install
|
dnf_install
|
||||||
fedora_locallib
|
fedora_locallib
|
||||||
elif which zypper
|
|
||||||
then
|
|
||||||
zypper_install
|
|
||||||
else
|
else
|
||||||
echo "Unknown package manager, attempting to compile anyways"
|
echo "Unknown package manager, attempting to compile anyways"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
cmake -H. -B_build
|
mkdir -p _build
|
||||||
|
cd _build
|
||||||
|
cmake ../
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
}
|
}
|
||||||
main
|
main
|
||||||
|
|
Loading…
Reference in New Issue
Block a user