mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
chore(build): update simple_make for Fedora
In addition to a package-list refresh, enhance simple_make to: - also add `/usr/local/lib64/` to `/etc/ld.so.conf.d/` - export a corresponding `PKG_CONFIG_PATH` before running builds - run `bootstrap.sh --without-sqlcipher`, which is preinstalled
This commit is contained in:
parent
bb26d4a086
commit
7ef7b0e1f9
|
@ -86,20 +86,25 @@ dnf_install() {
|
||||||
git
|
git
|
||||||
glib2-devel
|
glib2-devel
|
||||||
gtk2-devel
|
gtk2-devel
|
||||||
|
kf5-sonnet-devel
|
||||||
|
libconfig-devel
|
||||||
|
libexif-devel
|
||||||
libsodium-devel
|
libsodium-devel
|
||||||
libtool
|
|
||||||
libvpx-devel
|
libvpx-devel
|
||||||
libXScrnSaver-devel
|
libXScrnSaver-devel
|
||||||
openal-soft-devel
|
openal-soft-devel
|
||||||
openssl-devel
|
openssl-devel
|
||||||
opus-devel
|
opus-devel
|
||||||
qrencode-devel
|
qrencode-devel
|
||||||
|
qt5-devel
|
||||||
|
qt5-qtdoc
|
||||||
qt5-qtsvg
|
qt5-qtsvg
|
||||||
qt5-qtsvg-devel
|
qt5-qtsvg-devel
|
||||||
qt5-qttools-devel
|
qt5-qttools-devel
|
||||||
qt-creator
|
qtsingleapplication-qt5
|
||||||
qt-devel
|
readline-devel
|
||||||
qt-doc
|
sqlcipher-devel
|
||||||
|
sqlite-devel
|
||||||
)
|
)
|
||||||
sudo dnf install "${dnf_packages[@]}"
|
sudo dnf install "${dnf_packages[@]}"
|
||||||
}
|
}
|
||||||
|
@ -107,17 +112,19 @@ dnf_install() {
|
||||||
# Fedora by default doesn't include libs in /usr/local/lib so add it
|
# Fedora by default doesn't include libs in /usr/local/lib so add it
|
||||||
fedora_locallib() {
|
fedora_locallib() {
|
||||||
local llib_file="/etc/ld.so.conf.d/locallib.conf"
|
local llib_file="/etc/ld.so.conf.d/locallib.conf"
|
||||||
local llib_line="/usr/local/lib/"
|
local llib_lines=("/usr/local/lib/" "/usr/local/lib64/")
|
||||||
|
|
||||||
# check whether needed line already exists
|
# check whether needed line already exists
|
||||||
is_locallib() {
|
is_locallib() {
|
||||||
grep -q "^$llib_line\$" "$llib_file"
|
grep -q "^$1\$" "$llib_file"
|
||||||
}
|
}
|
||||||
|
|
||||||
# proceed only if line doesn't exist
|
# add each line only if it doesn't exist
|
||||||
is_locallib \
|
for llib_line in "${llib_lines[@]}"; do\
|
||||||
|| echo "$llib_line" \
|
is_locallib "$llib_line" \
|
||||||
| sudo tee -a "$llib_file"
|
|| echo "$llib_line" \
|
||||||
|
| sudo tee -a "$llib_file";
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
zypper_install() {
|
zypper_install() {
|
||||||
|
@ -153,6 +160,7 @@ zypper_install() {
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
local BOOTSTRAP_ARGS=""
|
||||||
if command -v zypper && [ -f /etc/products.d/openSUSE.prod ]
|
if command -v zypper && [ -f /etc/products.d/openSUSE.prod ]
|
||||||
then
|
then
|
||||||
zypper_install
|
zypper_install
|
||||||
|
@ -166,11 +174,13 @@ main() {
|
||||||
then
|
then
|
||||||
dnf_install
|
dnf_install
|
||||||
fedora_locallib
|
fedora_locallib
|
||||||
|
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH-}:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig"
|
||||||
|
BOOTSTRAP_ARGS="--without-sqlcipher"
|
||||||
else
|
else
|
||||||
echo "Unknown package manager, attempting to compile anyways"
|
echo "Unknown package manager, attempting to compile anyways"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
./bootstrap.sh
|
./bootstrap.sh ${BOOTSTRAP_ARGS}
|
||||||
mkdir -p _build
|
mkdir -p _build
|
||||||
cd _build
|
cd _build
|
||||||
cmake ../
|
cmake ../
|
||||||
|
|
Loading…
Reference in New Issue
Block a user