<commit_before>SUMMARY = "Generic client/server library for SASL authentication"
SECTION = "console/network"
DEPENDS = "openssl virtual/db"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=3f55e0974e3d6db00ca6f57f2d206396"

SRC_URI = "ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-${PV}.tar.gz \
	   file://avoid-to-call-AC_TRY_RUN.patch \
	   file://Fix-hardcoded-libdir.patch \
	   file://debian_patches_0009_sasldb_al.diff \
	   file://debian_patches_0014_avoid_pic_overwrite.diff \
	   file://sasl.h-include-stddef.h-for-size_t-on-NetBSD.patch \
	   "

inherit autotools-brokensep pkgconfig useradd

EXTRA_OECONF += "--with-dblib=berkeley \
                 --with-bdb-libdir=${STAGING_LIBDIR} \
                 --with-bdb-incdir=${STAGING_INCDIR} \
                 --with-bdb=db-5.3 \
                 --with-plugindir="${libdir}/sasl2/" \
                 andrew_cv_runpath_switch=none"

PACKAGECONFIG ??= "ntlm \
        ${@base_contains('DISTRO_FEATURES', 'ldap', 'ldap', '', d)} \
        ${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
        "
PACKAGECONFIG[gssapi] = "--enable-gssapi=yes,--enable-gssapi=no,krb5,"
PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,"
PACKAGECONFIG[opie] = "--with-opie,--without-opie,opie,"
PACKAGECONFIG[des] = "--with-des,--without-des,,"
PACKAGECONFIG[ldap] = "--with-ldap=${STAGING_LIBDIR} --enable-ldapdb,--without-ldap --disable-ldapdb,openldap,"
PACKAGECONFIG[ntlm] = "--with-ntlm,--without-ntlm,,"

CFLAGS += "-fPIC"

do_configure_prepend () {
    rm -f acinclude.m4 config/libtool.m4

    # make it be able to work with db 5.0 version
    local sed_files="sasldb/db_berkeley.c utils/dbconverter-2.c"
    for sed_file in $sed_files; do
        sed -i 's#DB_VERSION_MAJOR == 4.*#(&) || DB_VERSION_MAJOR == 5#' $sed_file<commit_msg>cyrus-sasl: remove trailing slash from  plugin directory path<commit_after>SUMMARY = "Generic client/server library for SASL authentication"
SECTION = "console/network"
DEPENDS = "openssl virtual/db"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=3f55e0974e3d6db00ca6f57f2d206396"

SRC_URI = "ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-${PV}.tar.gz \
	   file://avoid-to-call-AC_TRY_RUN.patch \
	   file://Fix-hardcoded-libdir.patch \
	   file://debian_patches_0009_sasldb_al.diff \
	   file://debian_patches_0014_avoid_pic_overwrite.diff \
	   file://sasl.h-include-stddef.h-for-size_t-on-NetBSD.patch \
	   "

inherit autotools-brokensep pkgconfig useradd

EXTRA_OECONF += "--with-dblib=berkeley \
                 --with-bdb-libdir=${STAGING_LIBDIR} \
                 --with-bdb-incdir=${STAGING_INCDIR} \
                 --with-bdb=db-5.3 \
                 --with-plugindir="${libdir}/sasl2" \
                 andrew_cv_runpath_switch=none"

PACKAGECONFIG ??= "ntlm \
        ${@base_contains('DISTRO_FEATURES', 'ldap', 'ldap', '', d)} \
        ${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
        "
PACKAGECONFIG[gssapi] = "--enable-gssapi=yes,--enable-gssapi=no,krb5,"
PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,"
PACKAGECONFIG[opie] = "--with-opie,--without-opie,opie,"
PACKAGECONFIG[des] = "--with-des,--without-des,,"
PACKAGECONFIG[ldap] = "--with-ldap=${STAGING_LIBDIR} --enable-ldapdb,--without-ldap --disable-ldapdb,openldap,"
PACKAGECONFIG[ntlm] = "--with-ntlm,--without-ntlm,,"

CFLAGS += "-fPIC"

do_configure_prepend () {
    rm -f acinclude.m4 config/libtool.m4

    # make it be able to work with db 5.0 version
    local sed_files="sasldb/db_berkeley.c utils/dbconverter-2.c"
    for sed_file in $sed_files; do
        sed -i 's#DB_VERSION_MAJOR == 4.*#(&) || DB_VERSION_MAJOR == 5#' $sed_file
{'fraction_non_alphanumeric': 0.17126468178093418, 'fraction_numerical': 0.022398251843758536, 'mean_word_length': 3.2433371958285053, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '4554522', 'n_tokens_mistral': 1532, 'n_tokens_neox': 1466, 'n_words': 186}