<commit_before>SUMMARY = "Cross-platform IDE for C, C++, Python, QML/JavaScript and PHP"
LICENSE = "GPL-2.0 & GFDL-1.2 & LGPL-2.0"
LIC_FILES_CHKSUM = " \
    file://COPYING;md5=7974e16b472f00bbbadf2d006aa00c50 \
    file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
    file://COPYING.DOC;md5=ad1419ecc56e060eccf8184a87c4285f \
"

inherit kde-base gettext pkgconfig gtk-icon-cache mime mime-xdg bash-completion

python() {
    if 'clang-layer' not in d.getVar('BBFILE_COLLECTIONS').split():
        raise bb.parse.SkipRecipe('Requires meta-clang to be present due to qttools-native - see extends-meta-qt5/qttools_git.bbappend.')
}

DEPENDS += " \
    kauth-native \
    kconfig-native \
    kcoreaddons-native \
    kdevelop-pg-qt-native \
    kdoctools-native \
    ki18n-native \
    kpackage-native \
    shared-mime-info-native \
    \
    qtbase \
    qtdeclarative \
    qtwebengine \
    grantlee \
    libkomparediff2 \
    libksysguard \
    karchive \
    kcmutils \
    kconfig \
    kcrash \
    kdeclarative \
    kdevelop-pg-qt \
    kguiaddons \
    kiconthemes \
    kitemmodels \
    kitemviews \
    kjobwidgets \
    kio \
    knewstuff \
    knotifications \
    knotifyconfig \
    kparts \
    krunner \
    kservice \
    ktexteditor \
    kxmlgui \
    kwindowsystem \
    okteta \
    purpose \
    threadweaver \
"

PV = "5.6.1"
SRC_URI = "${KDE_MIRROR}/stable/${BPN}/${PV}/src/${BPN}-${PV}.tar.xz"
SRC_URI[sha256sum] = "9e4488522275ebef9d68eebb68523a99e1c58d35e8d75127f7d749784c2e370a"

EXTRA_OECMAKE += "-DBUILD_TESTING=OFF"

do_configure_append() {
    # although the name is missleading I still love cmake_extra_sanity.bbclass...
    sed -i 's:${STAGING_DIR_NATIVE}::g' ${B}/plugins/clang/libclang_include_path.h
}

# Yeah nasty but...
FILES_SOLIBSDEV = "${libdir}/libKDevC*so ${libdir}/libKDevPlatform*so"

FILES_${PN} += " \
    ${datadir}/kdev* \
    ${datadir}/k*5 \
    ${datadir}/knsrcfiles \
    ${datadir}/knotifications5 \
    ${datadir}/mime \
    ${datadir}/plasma \
    ${libdir}/libKDevelopSessionsWatch.so \<commit_msg>kdevelop: Fix sysroot path in source properly<commit_after>SUMMARY = "Cross-platform IDE for C, C++, Python, QML/JavaScript and PHP"
LICENSE = "GPL-2.0 & GFDL-1.2 & LGPL-2.0"
LIC_FILES_CHKSUM = " \
    file://COPYING;md5=7974e16b472f00bbbadf2d006aa00c50 \
    file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
    file://COPYING.DOC;md5=ad1419ecc56e060eccf8184a87c4285f \
"

inherit kde-base gettext pkgconfig gtk-icon-cache mime mime-xdg bash-completion

python() {
    if 'clang-layer' not in d.getVar('BBFILE_COLLECTIONS').split():
        raise bb.parse.SkipRecipe('Requires meta-clang to be present due to qttools-native - see extends-meta-qt5/qttools_git.bbappend.')
}

DEPENDS += " \
    kauth-native \
    kconfig-native \
    kcoreaddons-native \
    kdevelop-pg-qt-native \
    kdoctools-native \
    ki18n-native \
    kpackage-native \
    shared-mime-info-native \
    \
    qtbase \
    qtdeclarative \
    qtwebengine \
    grantlee \
    libkomparediff2 \
    libksysguard \
    karchive \
    kcmutils \
    kconfig \
    kcrash \
    kdeclarative \
    kdevelop-pg-qt \
    kguiaddons \
    kiconthemes \
    kitemmodels \
    kitemviews \
    kjobwidgets \
    kio \
    knewstuff \
    knotifications \
    knotifyconfig \
    kparts \
    krunner \
    kservice \
    ktexteditor \
    kxmlgui \
    kwindowsystem \
    okteta \
    purpose \
    threadweaver \
"

PV = "5.6.1"
SRC_URI = "${KDE_MIRROR}/stable/${BPN}/${PV}/src/${BPN}-${PV}.tar.xz"
SRC_URI[sha256sum] = "9e4488522275ebef9d68eebb68523a99e1c58d35e8d75127f7d749784c2e370a"

EXTRA_OECMAKE += "-DBUILD_TESTING=OFF"

do_configure_append() {
    # although the name is missleading I still love cmake_extra_sanity.bbclass...
    sed -i \
        -e 's:${STAGING_DIR_NATIVE}::g' \
        -e 's:${STAGING_DIR_HOST}::g' \
        ${B}/plugins/clang/libclang_include_path.h
}

# Yeah nasty but...
FILES_SOLIBSDEV = "${libdir}/libKDevC*so ${libdir}/libKDevPlatform*so"

FILES_${PN} += " \
    ${datadir}/kdev* \
    ${datadir}/k*5 \
    ${datadir}/knsrcfiles \
    ${datadir}/knotifications5 \
    ${datadir}/mime \
    ${datadir}/plasma \
    ${libdir}/libKDevelopSessionsWatch.so \
{'fraction_non_alphanumeric': 0.13075289119660136, 'fraction_numerical': 0.05711588388010385, 'mean_word_length': 2.7110332749562174, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2122410', 'n_tokens_mistral': 1892, 'n_tokens_neox': 1720, 'n_words': 245}