mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
78 lines
2.7 KiB
Bash
78 lines
2.7 KiB
Bash
# 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)
|
|
_qtver=6.0.0
|
|
pkgver=${_qtver/-/}
|
|
pkgrel=2
|
|
arch=('any')
|
|
url='https://www.qt.io'
|
|
license=(GPL3 LGPL3 FDL custom)
|
|
makedepends=(cmake mariadb-libs unixodbc postgresql alsa-lib gst-plugins-base-libs
|
|
gtk3 libpulse cups freetds vulkan-headers clang python llvm qt6-tools)
|
|
groups=(qt6)
|
|
_pkgfn="qt-everywhere-src-${_qtver}"
|
|
source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/single/${_pkgfn}.tar.xz"
|
|
qt6-doc-bindir.patch
|
|
qt6-doc-fix-qch-dir.patch::"https://code.qt.io/cgit/qt/qtbase.git/patch/cmake?id=062d42e3")
|
|
sha256sums=('d39a1a557a0dc8dc5ea2eaaee0fa015c71dcbb79c25a6aea421c594227565296'
|
|
'60eebdf88559fefdb2b7c65b5f4ec091942aa1ffa371bedb4080545383b46109'
|
|
'40c1537152a4e386e63a1afd67ba83b536f1c6436bd2263afb7f4e8e37a3f1e7')
|
|
|
|
prepare() {
|
|
patch -d $_pkgfn/qtbase -p1 -i ../../qt6-doc-bindir.patch # Use installed tools
|
|
patch -d $_pkgfn/qtbase -p1 -i ../../qt6-doc-fix-qch-dir.patch # Fix QCH install dir
|
|
}
|
|
|
|
build() {
|
|
[[ $CARCH == "arm" || $CARCH == "armv6h" ]] && echo "target_link_libraries(Core PRIVATE atomic)" >> ${_pkgfn}/qtbase/src/corelib/CMakeLists.txt
|
|
cmake -B build -S $_pkgfn \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-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
|
|
}
|