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

pkgname=kdevelop
pkgver=5.4.2
_clangver=8.0.1
pkgrel=1
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=('52e253da4892428ef3059568a93263bf7f9dec5ddeb17b0e5d258726492dc6c4'
            'SKIP')
validpgpkeys=('329FD02C5AA48FCC77A4BBF0AC44AC6DB29779E6'  # Sven Brauch <mail@svenbrauch.de>
              '364EFA5F639572907D392999C64CF56B13CACE5D'  # Kevin Funk <kfunk@kde.org>
              'E191FD5BE6F46870F09E82B2024E7FB43D015474') # Friedrich W. H. Kossebau <kossebau@kde.org>

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../$pkgname-$pkgver
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
}
