diff options
author | Corey Farrell <git@cfware.com> | 2016-10-14 01:18:50 -0400 |
---|---|---|
committer | George Joseph <gjoseph@digium.com> | 2016-10-14 07:48:32 -0500 |
commit | ce4cfd2ecafb2abca9e6b8d9e1f74a5708b27c87 (patch) | |
tree | 7ba438aa9556bff5487a204ab4f6837d693f0b09 /third-party | |
parent | 3633c7926cdc102570a5f179aae8a9017bd0a034 (diff) |
Fix issues with bundled pjproject cached download.
Previously when testing I had a preexisting makeopts in ASTTOPDIR. The
ordering of configure.ac causes --with-externals-cache to be processed
after third-party configure. In cases where the Asterisk clone is
cleaned it would cause pjproject to be downloaded to /tmp. This
moves processing of the externals cache and sounds cache to happen
before third-party configure.
This also addresses a possible issue with the third-party Makefile. If
TMPDIR is set by the environment it would override the path given to
--with-externals-cache.
ASTERISK-26416
Change-Id: Ifab7f35bfcd5a31a31a3a4353cc26a68c8c6592d
Diffstat (limited to 'third-party')
-rw-r--r-- | third-party/pjproject/Makefile | 6 | ||||
-rw-r--r-- | third-party/pjproject/configure.m4 | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/third-party/pjproject/Makefile b/third-party/pjproject/Makefile index 3fd3be735..65875224f 100644 --- a/third-party/pjproject/Makefile +++ b/third-party/pjproject/Makefile @@ -74,13 +74,13 @@ ECHO_PREFIX := $(ECHO_PREFIX) echo '[pjproject] ' _all: $(TARGETS) -TMPDIR ?= $(or $(EXTERNALS_CACHE_DIR),$(wildcard /tmp),.) +EXTERNALS_CACHE_DIR ?= $(or $(TMPDIR),$(wildcard /tmp),.) -$(TMPDIR)/pjproject-$(PJPROJECT_VERSION).tar.bz2 : ../versions.mak +$(EXTERNALS_CACHE_DIR)/pjproject-$(PJPROJECT_VERSION).tar.bz2 : ../versions.mak $(ECHO_PREFIX) Downloading $(PJPROJECT_URL)/$(@F) to $@ $(CMD_PREFIX) $(DOWNLOAD_TO_STDOUT) $(PJPROJECT_URL)/$(@F) > $@ -source/.unpacked: $(TMPDIR)/pjproject-$(PJPROJECT_VERSION).tar.bz2 +source/.unpacked: $(EXTERNALS_CACHE_DIR)/pjproject-$(PJPROJECT_VERSION).tar.bz2 $(ECHO_PREFIX) Unpacking $< -@rm -rf source >/dev/null 2>&1 -@mkdir source >/dev/null 2>&1 diff --git a/third-party/pjproject/configure.m4 b/third-party/pjproject/configure.m4 index 386035bac..7b62c0f16 100644 --- a/third-party/pjproject/configure.m4 +++ b/third-party/pjproject/configure.m4 @@ -9,7 +9,7 @@ AC_DEFUN([_PJPROJECT_CONFIGURE], AC_MSG_CHECKING(for embedded pjproject (may have to download)) AC_MSG_RESULT(configuring) - + if test "x${DOWNLOAD_TO_STDOUT}" = "x" ; then AC_MSG_ERROR(A download utility (wget, curl or fetch) is required to download bundled pjproject) fi @@ -28,7 +28,7 @@ AC_DEFUN([_PJPROJECT_CONFIGURE], if test "${NM}" = ":" ; then AC_MSG_ERROR(nm is required to build bundled pjproject) fi - + export TAR PATCH SED NM EXTERNALS_CACHE_DIR DOWNLOAD_TO_STDOUT ${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} configure if test $? -ne 0 ; then @@ -42,7 +42,7 @@ AC_DEFUN([_PJPROJECT_CONFIGURE], PJPROJECT_INCLUDE=$(${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} echo_cflags) PJPROJECT_CFLAGS="$PJPROJECT_INCLUDE" PBX_PJPROJECT=1 - + AC_DEFINE([HAVE_PJPROJECT], 1, [Define if your system has PJPROJECT]) AC_DEFINE([HAVE_PJPROJECT_BUNDLED], 1, [Define if your system has PJPROJECT_BUNDLED]) @@ -70,4 +70,3 @@ AC_DEFUN([PJPROJECT_CONFIGURE], _PJPROJECT_CONFIGURE() fi ]) -
\ No newline at end of file |