1 # Maintainer: Antonio Rojas <arojas@archlinux.org>
2 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 # Contributor: Andrea Scarpino <andrea@archlinux.org>
6 pkgname=(qt6-doc qt6-examples)
11 url='https://www.qt.io'
12 license=(GPL3 LGPL3 FDL custom)
13 makedepends=(cmake ninja mariadb-libs unixodbc postgresql alsa-lib gst-plugins-base-libs
14 gtk3 libpulse cups freetds vulkan-headers clang python llvm qt6-tools qt6-declarative)
16 _pkgfn=qt-everywhere-src-$_qtver
17 source=(https://download.qt.io/official_releases/qt/${pkgver%.*}/$_qtver/single/$_pkgfn.tar.xz)
18 sha256sums=('dba376e110e53895c7c827eea389dc12aa9c45862cd197d2f0d37ee472baf0b0')
21 cmake -B build -S $_pkgfn -G Ninja \
22 -DCMAKE_INSTALL_PREFIX=/usr \
24 -DINSTALL_BINDIR=lib/qt6/bin \
25 -DINSTALL_DOCDIR=share/doc/qt6 \
26 -DINSTALL_ARCHDATADIR=lib/qt6 \
27 -DINSTALL_DATADIR=share/qt6 \
28 -DINSTALL_INCLUDEDIR=include/qt6 \
29 -DINSTALL_MKSPECSDIR=lib/qt6/mkspecs \
30 -DINSTALL_EXAMPLESDIR=share/doc/qt6/examples \
31 -DQT_FEATURE_journald=ON \
32 -DQT_FEATURE_openssl_linked=ON \
33 -DCMAKE_MESSAGE_LOG_LEVEL=STATUS
34 cmake --build build --target docs
38 pkgdesc='A cross-platform application and UI framework (Documentation)'
39 DESTDIR="$pkgdir" cmake --build build --target install_docs
41 install -Dm644 $_pkgfn/LICENSE* -t "$pkgdir"/usr/share/licenses/$pkgbase
44 package_qt6-examples() {
45 pkgdesc='Examples and demos from qt6 documentation'
48 _base="$pkgdir"/usr/share/doc/qt6/examples
50 # The various example dirs have conflicting .pro files, but
51 # QtCreator requires them to be in the same top-level directory.
52 # Matching the Qt5 installer, only the qtbase project is kept.
54 cp ${_pkgfn}/qtbase/examples/examples.pro $_base
56 _fdirs=$(find "${_pkgfn}" -maxdepth 2 -type d -name examples)
57 for _dir in $_fdirs; do
58 _mod=$(basename ${_dir%/examples})
59 if [ -e "$_dir/README" ]; then
60 cp $_dir/README $_dir/README.$_mod
63 cp -rn $_dir/* $_base/$_mod