]> git.armaanb.net Git - asd-repo.git/blob - desktop/qt5/build
327664fe2f6b7c13eac377b3aa8656edbdf8aafe
[asd-repo.git] / desktop / qt5 / build
1 #!/bin/sh -e
2
3 for patch in *.patch; do
4     patch -p1 < "$patch"
5 done
6
7 # Without this folder, Qt can't find its header files.
8 mkdir .git
9
10 # Don't link against execinfo.h.
11 sed -i 's/define QLOG/define N/g' \
12     ./src/corelib/global/qlogging.cpp
13
14 export CFLAGS="-DOPENSSL_NO_PSK -DOPENSSL_NO_NEXTPROTONEG"
15 export LDFLAGS="-pthread -ldl -fPIE -Wl,-z,stack-size=2097152"
16 export CXXFLAGS="${CFLAGS} -Wno-deprecated-declarations -Wno-class-memaccess -Wno-packed-not-aligned"
17 export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/lib/pkgconfig"
18
19
20 ./configure \
21     -confirm-license \
22     -opensource \
23     -prefix /usr \
24     -docdir /usr/share/doc/qt \
25     -headerdir /usr/include/qt \
26     -archdatadir /usr/lib/qt \
27     -datadir /usr/share/qt \
28     -sysconfdir /etc/xdg \
29     -examplesdir /usr/share/doc/qt/examples \
30     -nomake examples \
31     -nomake tests \
32     -optimized-qmake \
33     -no-libudev \
34     -no-separate-debug-info \
35     -no-pch \
36     -no-dbus \
37     -no-dtls \
38     -no-accessibility \
39     -no-gtk \
40     -no-glib \
41     -system-libjpeg \
42     -system-libpng \
43     -system-sqlite \
44     -system-zlib \
45     -system-freetype \
46     -system-harfbuzz \
47     -platform linux-clang
48
49 make
50 make INSTALL_ROOT="$1" install
51
52 install -Dm755 qt.conf "$1/usr/bin/qt.conf"