# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>

pkgname=kdevelop
pkgver=5.6.2
_clangver=12.0.1
pkgrel=5
pkgdesc='C++ IDE using KDE technologies'
arch=(x86_64)
url='http://www.kdevelop.org/'
license=(GPL)
depends=(clang=$_clangver libksysguard kitemmodels knotifyconfig ktexteditor grantlee libkomparediff2
         kcmutils threadweaver knewstuff)
makedepends=(extra-cmake-modules kdoctools kdevelop-pg-qt llvm qt5-tools plasma-framework krunner okteta boost purpose subversion astyle)
optdepends=('konsole: embedded terminal'
            'git: Git support' 'subversion: SVN support'
            'gdb: GNU debugger support' 'lldb: LLDB debugger support'
            'qt5-doc: Qt documentation integration'
            'cmake: cmake integration'
            'meson: meson integration'
            'qt5-tools: qthelp plugin'
            'okteta: GNU debugger support'
            'plasma-framework: for the plasma addons'
            'purpose: patch review plugin'
            'astyle: astyle plugin'
            'cppcheck: code analyzer' 'heaptrack: memory profiler'
            'clazy: clazy analyzer plugin')
conflicts=(kdevelop-qmljs kdevplatform)
replaces=(kdevelop-qmljs kdevplatform kdevelop-clang-tidy)
source=("https://download.kde.org/stable/$pkgname/$pkgver/src/$pkgname-$pkgver.tar.xz"{,.sig})
sha256sums=('0f86bc3fe53f761c1e3e3f7544577a0c41433be8bff310cf2e729f76f4363bf6'
            'SKIP')
validpgpkeys=('329FD02C5AA48FCC77A4BBF0AC44AC6DB29779E6'  # Sven Brauch <mail@svenbrauch.de>
              '364EFA5F639572907D392999C64CF56B13CACE5D'  # Kevin Funk <kfunk@kde.org>
              'E191FD5BE6F46870F09E82B2024E7FB43D015474'  # Friedrich W. H. Kossebau <kossebau@kde.org>
              '0A48BC961075B4BA8523E3790A345FB086E797D9'  # https://share.kde.org/s/8dKaJTw8pR8iiwJ
              'C51B45A532F17FA401D099A0A0C6B72C4F1C5E7C') # Milian Wolff <mail@milianw.de>

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DBUILD_TESTING=OFF
  cmake --build build
}

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