PKGBUILDs/extra/qt5-doc/PKGBUILD

90 lines
2.8 KiB
Bash
Raw Normal View History

2017-06-09 12:24:22 +00:00
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Michael Hansen <zrax0111 gmail com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2018-01-12 04:53:57 +00:00
# - skip qtwebengine on v5
2017-06-09 12:24:22 +00:00
2019-07-01 02:03:15 +00:00
pkgbase=qt5-doc
pkgname=(qt5-doc qt5-examples)
2020-11-22 17:35:36 +00:00
_qtver=5.15.2
2017-06-09 12:24:22 +00:00
pkgver=${_qtver/-/}
2021-10-16 23:20:36 +00:00
pkgrel=2
2017-06-09 12:24:22 +00:00
arch=('any')
2019-02-04 13:33:54 +00:00
url='https://www.qt.io'
2017-06-09 12:24:22 +00:00
license=('GPL3' 'LGPL3' 'FDL' 'custom')
2021-10-16 23:20:36 +00:00
makedepends=('qt5-tools' 'python' 'pciutils' 'libxtst' 'libxcursor' 'libxrandr' 'libxss' 'libxcomposite'
2018-05-25 18:40:05 +00:00
'gperf' 'nss' 'clang')
2017-06-09 12:24:22 +00:00
groups=('qt' 'qt5')
2017-12-13 21:16:06 +00:00
_pkgfqn="qt-everywhere-src-${_qtver}"
2021-10-16 23:20:36 +00:00
source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/single/${_pkgfqn}.tar.xz"
https://invent.kde.org/qt/qt/qtbase/-/commit/8252ef5f.patch
https://invent.kde.org/qt/qt/qtbase/-/commit/cb2da673.patch
qt5-webengine-python3.patch)
sha256sums=('3a530d1b243b5dec00bc54937455471aaa3e56849d2593edb8ded07228202240'
'8ab742b991ed5c43e8da4b1ce1982fd38fe611aaac3d57ee37728b59932b518a'
'33304570431c0dd3becc22f3f0911ccfc781a1ce6c7926c3acb08278cd2e60c3'
'54de45621463a7c07f87482fbcbb9eacbc60d840bb69b34bc6c776d1df720453')
2017-06-09 12:24:22 +00:00
prepare() {
cd ${_pkgfqn}
ln -s /usr/bin qttools/
ln -s /usr/bin/{rcc,uic,moc} qtbase/bin/
2021-10-16 23:20:36 +00:00
patch -d qtbase -p1 < "$srcdir"/8252ef5f.patch # Fix build with GCC 11
patch -d qtbase -p1 < "$srcdir"/cb2da673.patch
patch -d qtwebengine -p1 < "$srcdir"/qt5-webengine-python3.patch # Fix build with Python 3
2017-06-09 12:24:22 +00:00
}
build() {
cd ${_pkgfqn}
2018-01-12 04:53:57 +00:00
[[ $CARCH == "arm" ]] && CONFIG="-skip qtwebengine"
2021-10-16 23:20:36 +00:00
./configure -confirm-license -opensource \
2017-06-09 12:24:22 +00:00
-prefix /usr \
-docdir /usr/share/doc/qt \
-headerdir /usr/include/qt \
-archdatadir /usr/lib/qt \
-datadir /usr/share/qt \
-sysconfdir /etc/xdg \
2019-06-17 12:36:03 +00:00
-nomake examples $CONFIG
2017-06-09 12:24:22 +00:00
make docs
}
2019-07-01 02:03:15 +00:00
package_qt5-doc() {
pkgdesc='A cross-platform application and UI framework (Documentation)'
depends=('qt5-base')
2017-06-09 12:24:22 +00:00
cd ${_pkgfqn}
2019-07-01 02:03:15 +00:00
make INSTALL_ROOT="$pkgdir" install_docs
2017-06-09 12:24:22 +00:00
install -d "$pkgdir"/usr/share/licenses
ln -s /usr/share/licenses/qt5-base "$pkgdir"/usr/share/licenses/${pkgname}
}
2019-07-01 02:03:15 +00:00
package_qt5-examples() {
pkgdesc='Examples and demos from qt5 documentation'
depends=('qt5-doc')
_base="$pkgdir"/usr/share/doc/qt/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 ${_pkgfqn}/qtbase/examples/examples.pro $_base
_fdirs=$(find "${_pkgfqn}" -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
}