1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Andrea Scarpino <andrea@archlinux.org>
5 pkgname=(qt5-base qt5-xcb-private-headers)
9 _commit=84152777a48af444a902bbf4df8b38146171c20d
11 url='https://www.qt.io'
12 license=('GPL3' 'LGPL3' 'FDL' 'custom')
13 pkgdesc='A cross-platform application and UI framework'
14 depends=('libjpeg-turbo' 'xcb-util-keysyms' 'xcb-util-renderutil' 'libgl' 'fontconfig' 'xdg-utils'
15 'shared-mime-info' 'xcb-util-wm' 'libxrender' 'libxi' 'sqlite' 'xcb-util-image' 'mesa'
16 'tslib' 'libinput' 'libxkbcommon-x11' 'libproxy' 'libcups' 'double-conversion' 'md4c')
17 makedepends=('libfbclient' 'mariadb-libs' 'unixodbc' 'postgresql-libs' 'alsa-lib' 'gst-plugins-base-libs'
18 'gtk3' 'libpulse' 'cups' 'freetds' 'vulkan-headers' 'git')
19 optdepends=('qt5-svg: to use SVG icon themes'
20 'qt5-wayland: to run Qt applications in a Wayland session'
21 'postgresql-libs: PostgreSQL driver'
22 'mariadb-libs: MariaDB driver'
23 'unixodbc: ODBC driver'
24 'libfbclient: Firebird/iBase driver'
25 'freetds: MS SQL driver'
26 'gtk3: GTK platform plugin'
27 'perl: for fixqt4headers and syncqt')
28 conflicts=('qtchooser')
30 _pkgfqn=${pkgbase/5-/}
31 source=(git+https://invent.kde.org/qt/qt/$_pkgfqn#commit=$_commit
35 '5411edbe215c24b30448fac69bd0ba7c882f545e8cf05027b2b6e2227abc5e78'
36 '4abc22150fa3e06b2fdcec32146abc9be4e316692aa4d5bd5aa53b4b726783fa')
40 echo "$_basever+kde+r"`git rev-list --count v$_basever-lts-lgpl..$_commit` | sed -e 's|+kde+r0||'
45 patch -p1 < ../qmake-cflags.patch # Use system CFLAGS in qmake
46 patch -p1 < ../qmake-config.patch # Don't strip binaries with qmake and use -ltcg, cf. QTBUG-73834
52 ./configure -confirm-license -opensource -v \
54 -docdir /usr/share/doc/qt \
55 -headerdir /usr/include/qt \
56 -archdatadir /usr/lib/qt \
57 -datadir /usr/share/qt \
58 -sysconfdir /etc/xdg \
59 -examplesdir /usr/share/doc/qt/examples \
60 -plugin-sql-{psql,mysql,sqlite,odbc,ibase} \
68 -no-mimetype-database \
70 -no-reduce-relocations \
73 # No configure flag for fat static libs with lto
74 bin/qmake CONFIG+=fat-static-lto -- -redo
79 pkgdesc='A cross-platform application and UI framework'
80 depends+=(qt5-translations)
83 make INSTALL_ROOT="${pkgdir}" install
85 install -Dm644 LICENSE* -t "$pkgdir"/usr/share/licenses/$pkgbase
87 # Drop QMAKE_PRL_BUILD_DIR because reference the build dir
88 find "${pkgdir}/usr/lib" -type f -name '*.prl' \
89 -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
91 # Fix wrong qmake path in pri file
92 sed -i "s|${srcdir}/${_pkgfqn}|/usr|" \
93 "${pkgdir}"/usr/lib/qt/mkspecs/modules/qt_lib_bootstrap_private.pri
95 # Symlinks for backwards compatibility
96 for b in "${pkgdir}"/usr/bin/*; do
97 ln -s $(basename $b) "${pkgdir}"/usr/bin/$(basename $b)-qt5
101 package_qt5-xcb-private-headers() {
102 pkgdesc='Private headers for Qt5 Xcb'
104 depends=("qt5-base=$pkgver")
110 install -d -m755 "$pkgdir"/usr/include/qtxcb-private
111 cp -r src/plugins/platforms/xcb/*.h "$pkgdir"/usr/include/qtxcb-private/