summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a1962b0613da0cb44b6b5c40a6fc55f14650e399 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
# Contributor: coolingtool <coolingtool-backup@outlook.com>
# Contributor: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=qt5-wayland-decorations
_basever=5.15.16
pkgver=5.15.16+kde+r60
pkgrel=1
_commit=84870d539c396a7f202a2e14013dd13657ff5573
arch=('x86_64')
url='https://www.qt.io'
license=('GPL3' 'LGPL3' 'FDL' 'custom')
pkgdesc='Provides APIs for Wayland - using QAdwaitaDecorations'
depends=('qt5-declarative' 'libxcomposite')
makedepends=('vulkan-headers' 'git')
provides=('qt5-wayland')
conflicts=('qt5-wayland')

# Fedora patches: https://src.fedoraproject.org/rpms/qt5-qtwayland/tree
_frepourl="https://src.fedoraproject.org/rpms/qt5-qtwayland"
_frepobranch=rawhide
_fcommit=4c0014ad41e10146a4025de2298987100684838c
_fpatchfile100='qtwayland-use-adwaita-decorations-by-default.patch'
_fpatchfile101='qtwayland-decoration-support-backports-from-qt6.patch'
_fpatchfile102='qtwayland-client-fix-window-margin-calculation.patch'

source=("git+https://invent.kde.org/qt/qt/qtwayland#commit=${_commit}"
        "${_fpatchfile100}-${_fcommit}::${_frepourl}/raw/${_fcommit}/f/${_fpatchfile100}"
        "${_fpatchfile101}-${_fcommit}::${_frepourl}/raw/${_fcommit}/f/${_fpatchfile101}"
        "${_fpatchfile102}-${_fcommit}::${_frepourl}/raw/${_fcommit}/f/${_fpatchfile102}")
sha256sums=('76c2fc033531ec3573b3cf3bda591d7ee7def6e727486d465ecdbfe0b1beab8e'
            '5b606c5526b44c0db9f5f7fd4be91c95bcb73bd06af304589c9f8c1922607fca'
            '4d8c5d686666cbaae7550ec3defee66ea56ca624152c56c51ff945693706c29d'
            '569ae734860335b72a0fc04e3418bc87086f574baf8db22c0dc5ba0846e22d4f')

pkgver() {
  cd qtwayland
  echo "${_basever}+kde+r$(git rev-list --count v${_basever}-lts-lgpl..${_commit})" | sed -e 's|+kde+r0||'
}

prepare() {
  mkdir -p build

  cd qtwayland

  # Use QAdwaitaDecorations by default
  patch -p1 -i "../${_fpatchfile100}-${_fcommit}"
  patch -p1 -i "../${_fpatchfile101}-${_fcommit}"
  patch -p1 -i "../${_fpatchfile102}-${_fcommit}"
}

build() {
  cd build

  qmake ../qtwayland
  make
}

package() {
  cd build

  make INSTALL_ROOT="$pkgdir" install

  # Drop QMAKE_PRL_BUILD_DIR because reference the build dir
  find "$pkgdir/usr/lib" -type f -name '*.prl' \
    -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;

  install -d "$pkgdir"/usr/share/licenses
  ln -s /usr/share/licenses/qt5-base "$pkgdir/usr/share/licenses/$pkgname"
}