<commit_before>SUMMARY = "TrouSerS - An open-source TCG Software Stack implementation."
DESCRIPTION = "\
Trousers is an open-source TCG Software Stack (TSS), released under the \
Common Public License. Trousers aims to be compliant with the current (1.1b) \
and upcoming (1.2) TSS specifications available from the Trusted Computing \
Group website: http://www.trustedcomputinggroup.org. \
"
HOMEPAGE = "https://sourceforge.net/projects/trousers"
SECTION = "security/tpm"

LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=8031b2ae48ededc9b982c08620573426"

DEPENDS = "openssl"
PROVIDES = "${PACKAGES}"

PV = "0.3.14+git${SRCPV}"

SRC_URI = "\
    git://git.code.sf.net/p/trousers/trousers \
    file://fix-deadlock-and-potential-hung.patch \
    file://fix-event-log-parsing-problem.patch \
    file://fix-incorrect-report-of-insufficient-buffer.patch \
    file://trousers-conditional-compile-DES-related-code.patch \
    file://Fix-segment-fault-if-client-hostname-cannot-be-retri.patch \
    file://get-user-ps-path-use-POSIX-getpwent-instead-of-getpwe.patch \
    file://trousers.init.sh \
    file://trousers-udev.rules \
    file://tcsd.service \
    file://tcsd.conf \
"
SRCREV = "e74dd1d96753b0538192143adf58d04fcd3b242b"

S = "${WORKDIR}/git"

inherit autotools pkgconfig useradd update-rc.d \
    ${@bb.<EMAIL>.contains('VIRTUAL-RUNTIME_init_manager', 'systemd', 'systemd', '', d)}

EXTRA_OECONF="--with-gui=none"

PACKAGECONFIG ?= "gmp "
PACKAGECONFIG[gmp] = "--with-gmp, --with-gmp=no, gmp"
PACKAGECONFIG[gtk] = "--with-gui=gtk, --with-gui=none, gtk+"

INITSCRIPT_NAME = "trousers"
INITSCRIPT_PARAMS = "start 99 2 3 4 5 . stop 19 0 1 6 ."

USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "--system tss"
USERADD_PARAM_${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss"<commit_msg>trousers: fix build failure for gcc-10<commit_after>SUMMARY = "TrouSerS - An open-source TCG Software Stack implementation."
DESCRIPTION = "\
Trousers is an open-source TCG Software Stack (TSS), released under the \
Common Public License. Trousers aims to be compliant with the current (1.1b) \
and upcoming (1.2) TSS specifications available from the Trusted Computing \
Group website: http://www.trustedcomputinggroup.org. \
"
HOMEPAGE = "https://sourceforge.net/projects/trousers"
SECTION = "security/tpm"

LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=8031b2ae48ededc9b982c08620573426"

DEPENDS = "openssl"
PROVIDES = "${PACKAGES}"

PV = "0.3.14+git${SRCPV}"

SRC_URI = "\
    git://git.code.sf.net/p/trousers/trousers \
    file://fix-deadlock-and-potential-hung.patch \
    file://fix-event-log-parsing-problem.patch \
    file://fix-incorrect-report-of-insufficient-buffer.patch \
    file://trousers-conditional-compile-DES-related-code.patch \
    file://Fix-segment-fault-if-client-hostname-cannot-be-retri.patch \
    file://get-user-ps-path-use-POSIX-getpwent-instead-of-getpwe.patch \
    file://trousers.init.sh \
    file://trousers-udev.rules \
    file://tcsd.service \
    file://tcsd.conf \
"
SRCREV = "e74dd1d96753b0538192143adf58d04fcd3b242b"

S = "${WORKDIR}/git"

inherit autotools pkgconfig useradd update-rc.d \
    ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager', 'systemd', 'systemd', '', d)}

EXTRA_OECONF="--with-gui=none"

# Fix build failure for gcc-10
CFLAGS_append = " -fcommon"

PACKAGECONFIG ?= "gmp "
PACKAGECONFIG[gmp] = "--with-gmp, --with-gmp=no, gmp"
PACKAGECONFIG[gtk] = "--with-gui=gtk, --with-gui=none, gtk+"

INITSCRIPT_NAME = "trousers"
INITSCRIPT_PARAMS = "start 99 2 3 4 5 . stop 19 0 1 6 ."

USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "--system tss"
USERADD_PARAM_${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss"
{'fraction_non_alphanumeric': 0.16032388663967612, 'fraction_numerical': 0.037786774628879895, 'mean_word_length': 3.7881136950904395, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '3622206', 'n_tokens_mistral': 1539, 'n_tokens_neox': 1432, 'n_words': 259}