# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=kdiff3
pkgver=1.9.3
pkgrel=1
pkgdesc='A file comparator/merge tool'
arch=(x86_64)
url='https://kde.org/applications/development/kdiff3/'
license=(GPL)
depends=(kparts hicolor-icon-theme)
makedepends=(extra-cmake-modules kdoctools boost)
source=(https://download.kde.org/stable/$pkgname/$pkgname-$pkgver.tar.xz{,.sig}
        https://invent.kde.org/sdk/kdiff3/-/commit/0476b1da.patch)
sha256sums=('317bf5c7e27cba81bce7e1a7a579105443133b633cbb71bc1f169e86a235af9c'
            'SKIP'
            'ff2b8f3548c61cc6a4155a0297e79f434ac861455a0673dd339da22a60bc0577')
validpgpkeys=(EE56D710885D36FB1E4D21F3F442B36D614B06BC) # Michael Reeves <reeves.87@gmail.com>

prepare() {
  patch -d $pkgname-$pkgver -p1 < 0476b1da.patch # Fix build with GCC 11
}

build() {
  cmake -B build -S $pkgname-$pkgver
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
