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' 'libxkbfile'
14 'gperf' 'nss' 'clang' 'nodejs')
16 _pkgfqn="qt-everywhere-opensource-src-${pkgver}"
17 source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/single/${_pkgfqn}.tar.xz"
18 qt5-webengine-python3.patch
20 sha256sums=('776a9302c336671f9406a53bd30b8e36f825742b2ec44a57c08217bff0fa86b9'
21 '398c996cb5b606695ac93645143df39e23fa67e768b09e0da6dbd37342a43f32'
22 '7893df4981d6611c5aaeb4cc69bc77d14b4251842b205591a563f9a7184dfb0a')
25 cd ${_pkgfqn/opensource-/}
27 ln -s /usr/bin qttools/
28 ln -s /usr/bin/{rcc,uic,moc,qmake} qtbase/bin/
30 patch -d qtbase -p1 < "$srcdir"/no-qmake.patch # Use system qmake
31 patch -d qtwebengine -p1 < "$srcdir"/qt5-webengine-python3.patch # Fix build with Python 3
35 cd ${_pkgfqn/opensource-/}
37 ./configure -confirm-license -opensource \
39 -docdir /usr/share/doc/qt \
40 -headerdir /usr/include/qt \
41 -archdatadir /usr/lib/qt \
42 -datadir /usr/share/qt \
43 -sysconfdir /etc/xdg \
49 pkgdesc='A cross-platform application and UI framework (Documentation)'
52 cd ${_pkgfqn/opensource-/}
53 make INSTALL_ROOT="$pkgdir" install_docs
55 install -d "$pkgdir"/usr/share/licenses
56 ln -s /usr/share/licenses/qt5-base "$pkgdir"/usr/share/licenses/${pkgname}
59 package_qt5-examples() {
60 pkgdesc='Examples and demos from qt5 documentation'
63 _base="$pkgdir"/usr/share/doc/qt/examples
65 # The various example dirs have conflicting .pro files, but
66 # QtCreator requires them to be in the same top-level directory.
67 # Matching the Qt5 installer, only the qtbase project is kept.
69 cp ${_pkgfqn/opensource-/}/qtbase/examples/examples.pro $_base
71 _fdirs=$(find "${_pkgfqn/opensource-/}" -maxdepth 2 -type d -name examples)
72 for _dir in $_fdirs; do
73 _mod=$(basename ${_dir%/examples})
75 if [ -e "$_dir/README" ]; then
76 cp $_dir/README $_dir/README.$_mod