<commit_before>DESCRIPTION = "Apache Portable Runtime (APR) library"
SECTION = "libs"
LICENSE = "Apache License, Version 2.0"

PR = "r1"

# apache mirrors?
SRC_URI = "${APACHE_MIRROR}/apr/${P}.tar.bz2 \
           file://configure_fixes.patch"

inherit autotools lib_package binconfig

OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
EXTRA_OEMAKE = " LIBTOOL=\"${S}/${TARGET_PREFIX}libtool\" "

do_configure_prepend() {
	rm -f ${S}/build/libtool.m4
}

do_stage() {
  autotools_stage_all
  install -d ${STAGING_DATADIR}/apr
  cp ${S}/build/apr_rules.mk ${STAGING_DATADIR}/apr/
  sed -i s,apr_builddir=.*,apr_builddir=,g ${STAGING_DATADIR}/apr/apr_rules.mk
  sed -i s,apr_builders=.*,apr_builders=,g ${STAGING_DATADIR}/apr/apr_rules.mk
  sed -i s,LIBTOOL=.*,LIBTOOL=\$\(SHELL\)\ ${TARGET_PREFIX}libtool,g ${STAGING_DATADIR}/apr/apr_rules.mk
  sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g ${STAGING_DATADIR}/apr/apr_rules.mk
  cp ${S}/build/mkdir.sh ${STAGING_DATADIR}/apr/
  cp ${S}/build/make_exports.awk ${STAGING_DATADIR}/apr/
  cp ${S}/build/make_var_export.awk ${STAGING_DATADIR}/apr/<commit_msg>apr 1.2.12: Switch to getting libtool from PATH<commit_after>DESCRIPTION = "Apache Portable Runtime (APR) library"
SECTION = "libs"
LICENSE = "Apache License, Version 2.0"

PR = "r2"

# apache mirrors?
SRC_URI = "${APACHE_MIRROR}/apr/${P}.tar.bz2 \
           file://configure_fixes.patch"

inherit autotools lib_package binconfig

OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"

LIBTOOL = "${HOST_SYS}-libtool"
EXTRA_OEMAKE = "'LIBTOOL=${LIBTOOL}'"

do_configure_prepend() {
	rm -f ${S}/build/libtool.m4
}

do_stage() {
  autotools_stage_all
  install -d ${STAGING_DATADIR}/apr
  cp ${S}/build/apr_rules.mk ${STAGING_DATADIR}/apr/
  sed -i s,apr_builddir=.*,apr_builddir=,g ${STAGING_DATADIR}/apr/apr_rules.mk
  sed -i s,apr_builders=.*,apr_builders=,g ${STAGING_DATADIR}/apr/apr_rules.mk
  sed -i s,LIBTOOL=.*,LIBTOOL=\$\(SHELL\)\ ${TARGET_PREFIX}libtool,g ${STAGING_DATADIR}/apr/apr_rules.mk
  sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g ${STAGING_DATADIR}/apr/apr_rules.mk
  cp ${S}/build/mkdir.sh ${STAGING_DATADIR}/apr/
  cp ${S}/build/make_exports.awk ${STAGING_DATADIR}/apr/
  cp ${S}/build/make_var_export.awk ${STAGING_DATADIR}/apr/
{'fraction_non_alphanumeric': 0.17552961521833116, 'fraction_numerical': 0.0060527453523562475, 'mean_word_length': 5.057591623036649, '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': '1042917', 'n_tokens_mistral': 1038, 'n_tokens_neox': 1005, 'n_words': 142}