summaryrefslogtreecommitdiff
path: root/branding/thirdparty/qt5/build-qt5-static.sh
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2020-09-15 16:36:56 +0200
committerkali kaneko (leap communications) <kali@leap.se>2020-09-25 12:36:10 +0200
commita487a3070cf0f390525a90f052e1ff8070d0f3e0 (patch)
treedb10d3f8d7531ee9f67809d88324fb6c70e5e704 /branding/thirdparty/qt5/build-qt5-static.sh
parent6d234d0e6cde42917ee3477062e136fc73aff92f (diff)
[pkg] keep track of efforts to have an usable qt5 static build
Diffstat (limited to 'branding/thirdparty/qt5/build-qt5-static.sh')
-rwxr-xr-xbranding/thirdparty/qt5/build-qt5-static.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/branding/thirdparty/qt5/build-qt5-static.sh b/branding/thirdparty/qt5/build-qt5-static.sh
new file mode 100755
index 0000000..878e5bd
--- /dev/null
+++ b/branding/thirdparty/qt5/build-qt5-static.sh
@@ -0,0 +1,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