From f27f837a9f5fae97af6e86d7d5f1f645e7c12186 Mon Sep 17 00:00:00 2001 From: George Joseph Date: Mon, 31 Oct 2016 15:12:57 -0600 Subject: pjproject_bundled: Fix compile of pjsua so it handles audio In order for pjsua and its python binding to actually negotiate audio for the testsuite tests, it needs g711 and resample. The pj* libraries themselves do not. Unfortunately, pjproject relies on a brand new libresample that most distros don't ship so we need to use the libresample already bundled with pjproject. Only the pjsua executable and the _pjsua.so python library are linked with it so it shouldn't interfere with asterisk itself. Also it was pointed out that apply_patches couldn't handle multiple patches that depended on each other during the dry-run, so the dry-run was removed. Change-Id: I24f397462b486dcdde0dcafe40e6c55a6593f098 --- third-party/pjproject/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'third-party/pjproject/Makefile') diff --git a/third-party/pjproject/Makefile b/third-party/pjproject/Makefile index 07a6c9cd6..209e681cd 100644 --- a/third-party/pjproject/Makefile +++ b/third-party/pjproject/Makefile @@ -125,11 +125,17 @@ libpj%.a: .rebuild_needed source/build.mak $(CMD_PREFIX) $(MAKE) -C $(dir $(shell dirname $@))/build $(@F) $(REALLY_QUIET) -@rm -rf .rebuild_needed +# pjsua needs resample and g711 to successfully run the testsuite +libresample%.a: .rebuild_needed source/build.mak + $(ECHO_PREFIX) Compiling lib $(@F) + $(CMD_PREFIX) $(MAKE) -C $(dir $(shell dirname $@))/build/resample all $(REALLY_QUIET) + -@rm -rf .rebuild_needed + # We need to compile pjlib, then pjlib-util, then the rest # so we separate them out and create the dependencies PJLIB_LIB_FILES = $(foreach lib,$(PJ_LIB_FILES),$(if $(findstring libpj-,$(lib)),$(lib),)) PJLIB_UTIL_LIB_FILES = $(foreach lib,$(PJ_LIB_FILES),$(if $(findstring libpjlib-util,$(lib)),$(lib),)) -PJSIP_LIB_FILES = $(filter-out $(PJLIB_LIB_FILES) $(PJLIB_UTIL_LIB_FILES),$(PJ_LIB_FILES)) +PJSIP_LIB_FILES = $(filter-out $(PJLIB_LIB_FILES) $(PJLIB_UTIL_LIB_FILES) $(APP_THIRD_PARTY_LIB_FILES),$(PJ_LIB_FILES)) ALL_LIB_FILES = $(PJLIB_LIB_FILES) $(PJLIB_UTIL_LIB_FILES) $(PJSIP_LIB_FILES) $(PJLIB_UTIL_LIB_FILES): $(PJLIB_LIB_FILES) @@ -152,7 +158,7 @@ source/pjsip-apps/lib/libasterisk_malloc_debug.a: source/pjsip-apps/lib/asterisk $(CMD_PREFIX) ar qs $@ $< >/dev/null 2>&1 $(apps): APP = $(filter pj%,$(subst -, ,$(notdir $@))) -$(apps): pjproject.symbols +$(apps): pjproject.symbols $(APP_THIRD_PARTY_LIB_FILES) $(ECHO_PREFIX) Compiling $(APP) $(CMD_PREFIX) +$(MAKE) -C source/pjsip-apps/build $(filter pj%,$(subst -, ,$(notdir $@))) $(REALLY_QUIET) -- cgit v1.2.3