summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormicmac1 <sebastian_ml@gmx.net>2020-05-18 20:05:23 +0200
committerGitHub <noreply@github.com>2020-05-18 20:05:23 +0200
commitc7cef81e63719982c8d2d6496901f391891bb49f (patch)
treeee734e48eb26adb4dc70591643a23f12153d3433
parentfffc4678c8700e69238606c7f91548c0533ecee8 (diff)
parente4f1bac168748c27628019adf220f520126d9777 (diff)
Merge pull request #532 from micmac1/rtpecfl
rtpengine: prevent picking up host system flags
-rw-r--r--net/rtpengine/Makefile14
-rw-r--r--net/rtpengine/patches/04-prevent-systemd-detection.patch17
2 files changed, 30 insertions, 1 deletions
diff --git a/net/rtpengine/Makefile b/net/rtpengine/Makefile
index 01b36bc..1875738 100644
--- a/net/rtpengine/Makefile
+++ b/net/rtpengine/Makefile
@@ -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
diff --git a/net/rtpengine/patches/04-prevent-systemd-detection.patch b/net/rtpengine/patches/04-prevent-systemd-detection.patch
new file mode 100644
index 0000000..33c1727
--- /dev/null
+++ b/net/rtpengine/patches/04-prevent-systemd-detection.patch
@@ -0,0 +1,17 @@
+--- a/lib/lib.Makefile
++++ b/lib/lib.Makefile
+@@ -35,10 +35,10 @@ ifeq ($(RTPENGINE_VERSION),)
+ endif
+ CFLAGS+= -DRTPENGINE_VERSION="\"$(RTPENGINE_VERSION)\""
+
+-# look for libsystemd
+-ifeq ($(shell pkg-config --exists libsystemd && echo yes),yes)
+-have_libsystemd := yes
+-endif
++# No libsystemd in OpenWrt, but pkg-config could find build host's.
++#ifeq ($(shell pkg-config --exists libsystemd && echo yes),yes)
++have_libsystemd := no
++#endif
+ ifeq ($(have_libsystemd),yes)
+ CFLAGS+= $(shell pkg-config --cflags libsystemd)
+ CFLAGS+= -DHAVE_LIBSYSTEMD