1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Andrea Scarpino <andrea@archlinux.org>
3 # Contributor: Michael Hansen <zrax0111 gmail com>
6 pkgname=(qt5-doc qt5-examples)
11 url='https://www.qt.io'
12 license=('GPL3' 'LGPL3' 'FDL' 'custom')
13 makedepends=('qt5-tools' 'python' 'pciutils' 'libxtst' 'libxcursor' 'libxrandr' 'libxss' 'libxcomposite'
14 'gperf' 'nss' 'clang')
16 _pkgfqn="qt-everywhere-src-${_qtver}"
17 source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/single/${_pkgfqn}.tar.xz"
18 https://invent.kde.org/qt/qt/qtbase/-/commit/8252ef5f.patch
19 https://invent.kde.org/qt/qt/qtbase/-/commit/cb2da673.patch
20 qt5-webengine-python3.patch)
21 sha256sums=('3a530d1b243b5dec00bc54937455471aaa3e56849d2593edb8ded07228202240'
22 '8ab742b991ed5c43e8da4b1ce1982fd38fe611aaac3d57ee37728b59932b518a'
23 '33304570431c0dd3becc22f3f0911ccfc781a1ce6c7926c3acb08278cd2e60c3'
24 '54de45621463a7c07f87482fbcbb9eacbc60d840bb69b34bc6c776d1df720453')
29 ln -s /usr/bin qttools/
30 ln -s /usr/bin/{rcc,uic,moc} qtbase/bin/
32 patch -d qtbase -p1 < "$srcdir"/8252ef5f.patch # Fix build with GCC 11
33 patch -d qtbase -p1 < "$srcdir"/cb2da673.patch
34 patch -d qtwebengine -p1 < "$srcdir"/qt5-webengine-python3.patch # Fix build with Python 3
40 ./configure -confirm-license -opensource \
42 -docdir /usr/share/doc/qt \
43 -headerdir /usr/include/qt \
44 -archdatadir /usr/lib/qt \
45 -datadir /usr/share/qt \
46 -sysconfdir /etc/xdg \
52 pkgdesc='A cross-platform application and UI framework (Documentation)'
56 make INSTALL_ROOT="$pkgdir" install_docs
58 install -d "$pkgdir"/usr/share/licenses
59 ln -s /usr/share/licenses/qt5-base "$pkgdir"/usr/share/licenses/${pkgname}
62 package_qt5-examples() {
63 pkgdesc='Examples and demos from qt5 documentation'
66 _base="$pkgdir"/usr/share/doc/qt/examples
68 # The various example dirs have conflicting .pro files, but
69 # QtCreator requires them to be in the same top-level directory.
70 # Matching the Qt5 installer, only the qtbase project is kept.
72 cp ${_pkgfqn}/qtbase/examples/examples.pro $_base
74 _fdirs=$(find "${_pkgfqn}" -maxdepth 2 -type d -name examples)
75 for _dir in $_fdirs; do
76 _mod=$(basename ${_dir%/examples})
78 if [ -e "$_dir/README" ]; then
79 cp $_dir/README $_dir/README.$_mod