<commit_before>SUMMARY = "Go package providing a key/value store"
HOMEPAGE = "https://github.com/boltdb/bolt"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=13b2a308eefa10d841e3bf2467dbe07a"

PKG_NAME = "github.com/boltdb/bolt"
SRC_URI = "git://${PKG_NAME}.git"
SRCREV = "be4e606bc48012421bc90eda58a8aad7a95aaf83"

SYSROOT_PREPROCESS_FUNCS += "bolt_sysroot_preprocess"

inherit golang

do_compile_append() {
    go install github.com/boltdb/bolt/cmd/bolt
}

bolt_sysroot_preprocess () {
    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
    cp -a ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
    install -d ${SYSROOT_DESTDIR}${prefix}/bin
    cp -a ${D}${prefix}/bin/* ${SYSROOT_DESTDIR}${prefix}/bin/
}

CLEANBROKEN = "1"
<commit_msg>bolt: fix build failure due to GOROOT<commit_after>SUMMARY = "Go package providing a key/value store"
HOMEPAGE = "https://github.com/boltdb/bolt"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=13b2a308eefa10d841e3bf2467dbe07a"

PKG_NAME = "github.com/boltdb/bolt"
SRC_URI = "git://${PKG_NAME}.git"
SRCREV = "be4e606bc48012421bc90eda58a8aad7a95aaf83"

SYSROOT_PREPROCESS_FUNCS += "bolt_sysroot_preprocess"

inherit golang

do_compile_prepend() {
    export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
}

do_compile_append() {
    go install github.com/boltdb/bolt/cmd/bolt
}

bolt_sysroot_preprocess () {
    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
    cp -a ${D}${prefix}/local/go/src/${PKG_NAME} ${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
    install -d ${SYSROOT_DESTDIR}${prefix}/bin
    cp -a ${D}${prefix}/bin/* ${SYSROOT_DESTDIR}${prefix}/bin/
}

CLEANBROKEN = "1"

{'fraction_non_alphanumeric': 0.16562677254679523, 'fraction_numerical': 0.0476460578559274, 'mean_word_length': 5.533333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5616738', 'n_tokens_mistral': 798, 'n_tokens_neox': 747, 'n_words': 99}