anchor.diff:  # it was disabled for cross-compiling.
   CPPFLAGS_append = " -D_GNU_SOURCE -DURANDOM_DEVICE=\'/dev/urandom\'"
   
  +LDFLAGS += "-pthread"
  +
   do_configure() {
       cp ${STAGING_DATADIR_NATIVE}/libtool/build-aux/ltmain.sh ${S}/build
       rm -f ${S}/libtool
  
positive.code: PACKAGES += "${PN}-slapd ${PN}-slurpd ${PN}-bin"
  
  # Package contents - shift most standard contents to -bin
  FILES_${PN} = "${libdir}/lib*.so.* ${sysconfdir}/openldap/ldap.* ${localstatedir}/openldap-data"
  FILES_${PN}-slapd = "${sysconfdir}/init.d ${libexecdir}/slapd ${sbindir} ${localstatedir}/run ${localstatedir}/volatile/run \
      ${sysconfdir}/openldap/slapd.* ${sysconfdir}/openldap/schema \
      ${sysconfdir}/openldap/DB_CONFIG.example ${systemd_unitdir}/system/*"
  
negative.code: 
  PACKAGES_DYNAMIC += "^${PN}-backends.* ^${PN}-backend-.*"
  
  # The modules require their .so to be dynamicaly loaded
  INSANE_SKIP_${PN}-backend-dnssrv  += "dev-so"
  INSANE_SKIP_${PN}-backend-ldap    += "dev-so"
  INSANE_SKIP_${PN}-backend-meta    += "dev-so"
  INSANE_SKIP_${PN}-backend-mdb     += "dev-so"
  INSANE_SKIP_${PN}-backend-monitor += "dev-so"
  INSANE_SKIP_${PN}-backend-null    += "dev-so"
  INSANE_SKIP_${PN}-backend-passwd  += "dev-so"
  INSANE_SKIP_${PN}-backend-shell   += "dev-so"
  
  
  python populate_packages_prepend () {
      backend_dir    = d.expand('${libexecdir}/openldap')
      do_split_packages(d, backend_dir, 'back_([a-z]*)\.so$', 'openldap-backend-%s', 'OpenLDAP %s backend', prepend=True, extra_depends='', allow_links=True)
      do_split_packages(d, backend_dir, 'back_([a-z]*)\-.*\.so\..*$', 'openldap-backend-%s', 'OpenLDAP %s backend', extra_depends='', allow_links=True)
  
      metapkg = "${PN}-backends"
  