PKGBUILDs/extra/qt6-doc/PKGBUILD

71 lines
2.3 KiB
Bash
Raw Normal View History

2020-12-09 15:17:49 +00:00
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - explicitly link v5/v6 with libatomic
pkgbase=qt6-doc
pkgname=(qt6-doc qt6-examples)
2021-12-01 14:14:09 +00:00
_qtver=6.2.2
2020-12-09 15:17:49 +00:00
pkgver=${_qtver/-/}
2021-02-03 14:06:55 +00:00
pkgrel=1
2020-12-09 15:17:49 +00:00
arch=('any')
url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom)
2021-10-01 13:05:46 +00:00
makedepends=(cmake ninja mariadb-libs unixodbc postgresql alsa-lib gst-plugins-base-libs
2020-12-09 15:17:49 +00:00
gtk3 libpulse cups freetds vulkan-headers clang python llvm qt6-tools)
groups=(qt6)
2021-05-07 12:22:40 +00:00
_pkgfn="qt-everywhere-src-$_qtver"
2021-10-01 13:05:46 +00:00
source=(https://download.qt.io/official_releases/qt/${pkgver%.*}/$_qtver/single/$_pkgfn.tar.xz)
2021-12-01 14:14:09 +00:00
sha256sums=('907994f78d42b30bdea95e290e91930c2d9b593f3f8dd994f44157e387feee0f')
2020-12-09 15:17:49 +00:00
build() {
[[ $CARCH == "arm" || $CARCH == "armv6h" ]] && echo "target_link_libraries(Core PRIVATE atomic)" >> ${_pkgfn}/qtbase/src/corelib/CMakeLists.txt
2021-10-01 13:05:46 +00:00
cmake -B build -S $_pkgfn -G Ninja \
2020-12-09 15:17:49 +00:00
-DCMAKE_INSTALL_PREFIX=/usr \
2021-05-07 12:22:40 +00:00
-DQT_HOST_PATH=/usr \
2020-12-09 15:17:49 +00:00
-DINSTALL_BINDIR=lib/qt6/bin \
-DINSTALL_DOCDIR=share/doc/qt6 \
-DINSTALL_ARCHDATADIR=lib/qt6 \
-DINSTALL_DATADIR=share/qt6 \
-DINSTALL_INCLUDEDIR=include/qt6 \
-DINSTALL_MKSPECSDIR=lib/qt6/mkspecs \
-DINSTALL_EXAMPLESDIR=share/doc/qt6/examples \
-DQT_FEATURE_journald=ON \
-DQT_FEATURE_openssl_linked=ON
cmake --build build --target docs
}
package_qt6-doc() {
pkgdesc='A cross-platform application and UI framework (Documentation)'
DESTDIR="$pkgdir" cmake --build build --target install_docs
install -Dm644 $_pkgfn/LICENSE* -t "$pkgdir"/usr/share/licenses/$pkgbase
}
package_qt6-examples() {
pkgdesc='Examples and demos from qt6 documentation'
depends=('qt6-doc')
_base="$pkgdir"/usr/share/doc/qt6/examples
# The various example dirs have conflicting .pro files, but
# QtCreator requires them to be in the same top-level directory.
# Matching the Qt5 installer, only the qtbase project is kept.
mkdir -p $_base
cp ${_pkgfn}/qtbase/examples/examples.pro $_base
_fdirs=$(find "${_pkgfn}" -maxdepth 2 -type d -name examples)
for _dir in $_fdirs; do
_mod=$(basename ${_dir%/examples})
if [ -e "$_dir/README" ]; then
cp $_dir/README $_dir/README.$_mod
fi
# mkdir $_base/$_mod
cp -rn $_dir/* $_base
done
}