summaryrefslogtreecommitdiff
path: root/branding/thirdparty/qt5/build-qt5-static.sh
blob: 878e5bd496ce7fd10fa9cac234e88338d4f94a1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh

# Downloads qt5 source file and compiles it statically.
# See https://wohlsoft.ru/pgewiki/Building_static_Qt_5 for tips

QT5_V="5.12"
QT5_VER="5.12.9"
QT5_DIR="qt-everywhere-src-$QT5_VER"
QT5_TAR="$QT5_DIR.tar.xz"
QT5_URL="https://download.qt.io/archive/qt/$QT5_V/$QT5_VER/single/$QT5_TAR"


# TODO we could use -qt-freetype, but then we have to ship our own fonts.

CONFIG_FLAGS="-prefix $PWD/../qt5-static -release -opensource -confirm-license -platform linux-g++ \
              -fontconfig -system-freetype \
              -opengl \
              -no-ssl \
              --doubleconversion=qt \
              --zlib=qt \
              --libjpeg=no \
              --icu=no \
              --libpng=qt --pcre=qt --xcb=qt --harfbuzz=qt \
              -skip wayland -skip purchasing -skip serialbus -skip qtserialport -skip script -skip scxml -skip speech \
              -static \
              -optimize-size -nomake examples -nomake tests"

# --xcb=system

if [ -f "$QT5_TAR" ]; then
    echo "[+] $QT5_TAR already downloaded."
else
    echo "[+] Qt5 source tarball does not exist. Attempting to download..."
    wget -c $QT5_URL
fi

tar xf "$QT5_TAR"
cd $QT5_DIR

./configure ${CONFIG_FLAGS}
make -j 8 && make install