+# rtpengine uses Debian's dpkg utility programs if it can find them. But
+# we don't want build host flags to leak into our cross-compile.
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ifeq ($(QUILT),)
+ cd "$(PKG_BUILD_DIR)" && \
+ $(FIND) . -maxdepth 2 -name "*Makefile" | \
+ xargs -I{} $(SED) \
+ '/shell which dpkg-/s/dpkg/OpenWrt-has-no-dpkg/' {} && \
+ $(SED) 's|#!/usr/bin/perl|#!$(STAGING_DIR_HOSTPKG)/usr/bin/perl|' \
+ utils/const_str_hash
+endif
+endef
+