rtpengine: prevent use of host dpkg utilities 532/head
authorSebastian Kemper <sebastian_ml@gmx.net>
Sun, 17 May 2020 10:55:16 +0000 (12:55 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Sun, 17 May 2020 10:56:01 +0000 (12:56 +0200)
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
net/rtpengine/Makefile

index 01b36bce2c5fc1722120999587e01aeaa82b6072..1875738d7b86fe95c31836017aef0f9f0e099c15 100644 (file)
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=rtpengine
 PKG_VERSION:=mr8.3.1.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/sipwise/rtpengine/tar.gz/$(PKG_VERSION)?
@@ -213,6 +213,18 @@ ifeq ($(BUILD_VARIANT),no-transcode)
   MAKE_VARS+=with_transcoding=no
 endif
 
+# 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/' {}
+endif
+endef
+
 define Build/Configure
 endef