#!/bin/sh -e for patch in *.patch; do patch -p1 < "$patch" done # Without this folder, Qt can't find its header files. mkdir .git # Don't link against execinfo.h. sed -i 's/define QLOG/define N/g' \ ./src/corelib/global/qlogging.cpp export CFLAGS="-DOPENSSL_NO_PSK -DOPENSSL_NO_NEXTPROTONEG" export LDFLAGS="-pthread -ldl -fPIE -Wl,-z,stack-size=2097152" export CXXFLAGS="${CFLAGS} -Wno-deprecated-declarations -Wno-class-memaccess -Wno-packed-not-aligned" export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/lib/pkgconfig" ./configure \ -confirm-license \ -opensource \ -prefix /usr \ -docdir /usr/share/doc/qt \ -headerdir /usr/include/qt \ -archdatadir /usr/lib/qt \ -datadir /usr/share/qt \ -sysconfdir /etc/xdg \ -examplesdir /usr/share/doc/qt/examples \ -nomake examples \ -nomake tests \ -optimized-qmake \ -no-libudev \ -no-separate-debug-info \ -no-pch \ -no-dbus \ -no-dtls \ -no-accessibility \ -no-gtk \ -no-glib \ -system-libjpeg \ -system-libpng \ -system-sqlite \ -system-zlib \ -system-freetype \ -system-harfbuzz \ -platform linux-clang make make INSTALL_ROOT="$1" install install -Dm755 qt.conf "$1/usr/bin/qt.conf"