anchor.diff:  
   OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
   
  +# base on debian/rules
  +EXTRA_OECONF = " \
  +    --enable-layout=Debian \
  +    --includedir=${includedir}/apr-1.0 \
  +    --with-installbuilddir=${datadir}/apr-1.0/build \
  +    --enable-nonportable-atomics \
  +    --enable-allocator-uses-mmap \
  +"
  +CACHED_CONFIGUREVARS += "ac_cv_prog_AWK=mawk"
  +
  +# apr_cv_mutex_robust_shared causes hangs in procmutex test on arm(el|hf) and alpha
  +CACHED_CONFIGUREVARS_append_arm = " apr_cv_mutex_robust_shared=no"
  +CACHED_CONFIGUREVARS_append_alpha = " apr_cv_mutex_robust_shared=no"
  +
  +# some minimal cross-building support
  +CACHED_CONFIGUREVARS_append_class-target = " \
  +    ac_cv_file__dev_zero=yes \
  +    ac_cv_func_setpgrp_void=yes \
  +    apr_cv_epoll=yes \
  +    ac_cv_struct_rlimit=yes \
  +    apr_cv_tcp_nodelay_with_cork=yes \
  +    apr_cv_process_shared_works=yes \
  +"
  +CACHED_CONFIGUREVARS_append_class-target = " \
  +    ${@base_conditional('SITEINFO_BITS','32','ac_cv_sizeof_struct_iovec=8','',d)}"
  +CACHED_CONFIGUREVARS_append_class-target = " \
  +    ${@base_conditional('SITEINFO_BITS','64','ac_cv_sizeof_struct_iovec=16','',d)}"
  +
   # Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928
   CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes"
   
  -do_configure_prepend() {
  +do_configure() {
   	cd ${S}
   	./buildconf
  +
  +	# We need to force the use of bash here. Otherwise, if apr is built with
  +	# /bin/sh -> /bin/bash, the resulting libtool will not work on systems
  +	# where /bin/sh -> /bin/dash.
  +	${CACHED_CONFIGUREVARS} CONFIG_SHELL=/bin/bash \
  +		/bin/bash ${CONFIGURE_SCRIPT} ${CONFIGUREOPTS} ${EXTRA_OECONF}
   }
   
  -FILES_${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*"
  +FILES_${PN}-dev += "${libdir}/apr.exp ${datadir}/apr-1.0/build/*"
  +RDEPENDS_${PN}-dev = "bash"
   
   #for some reason, build/libtool.m4 handled by buildconf still be overwritten
   #when autoconf, so handle it again.
  
positive.code: }
  
  do_install_append() {
  	oe_multilib_header apr.h
  	install -d ${D}${datadir}/apr
  	cp ${S}/${HOST_SYS}-libtool ${D}${datadir}/build-1/libtool
  }
  
  SSTATE_SCAN_FILES += "apr_rules.mk libtool"
  
  SYSROOT_PREPROCESS_FUNCS += "apr_sysroot_preprocess"
  
  apr_sysroot_preprocess () {
  	d=${SYSROOT_DESTDIR}${datadir}/apr
  	install -d $d/
  	cp ${S}/build/apr_rules.mk $d/
  	sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk
  	sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk
  	sed -i s,LIBTOOL=.*,LIBTOOL=${HOST_SYS}-libtool,g $d/apr_rules.mk
  	sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk
  	cp ${S}/build/mkdir.sh $d/
  	cp ${S}/build/make_exports.awk $d/
  	cp ${S}/build/make_var_export.awk $d/
  }
  
  do_compile_ptest() {
  	cd ${S}/test
  
negative.code: # base branch: daisy
  #
  
  SUMMARY = "Apache Portable Runtime Library"
  DESCRIPTION = "APR is Apache's Portable Runtime Library, designed to be a support library \
  that provides a predictable and consistent interface to underlying \
  platform-specific implementations."
  HOMEPAGE = "http://apr.apache.org/"
  
  PR = "r1"
  
  inherit debian-package
  
  