<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/9528">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Enable bundling of jansson.<br><br>Change-Id: Ib3111b151d37cbda40768cf2a8a9c6cf6c5c7cbd<br>---<br>M configure<br>M configure.ac<br>M makeopts.in<br>M third-party/Makefile<br>M third-party/Makefile.rules<br>R third-party/apply_patches<br>M third-party/configure.m4<br>A third-party/jansson/.gitignore<br>A third-party/jansson/Makefile<br>A third-party/jansson/Makefile.rules<br>A third-party/jansson/configure.m4<br>A third-party/jansson/jansson-2.11.tar.bz2.md5<br>A third-party/jansson/patches/0001-Improve-test-coverage.patch<br>A third-party/jansson/patches/0017-Fix-error-handling-in-json_pack.patch<br>M third-party/pjproject/Makefile<br>M third-party/pjproject/Makefile.rules<br>A third-party/pjproject/pjproject-2.7.2.tar.bz2.md5<br>M third-party/versions.mak<br>18 files changed, 621 insertions(+), 51 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/configure b/configure</span><br><span>index 6c399da..b0623fd 100755</span><br><span>--- a/configure</span><br><span>+++ b/configure</span><br><span>@@ -1058,10 +1058,7 @@</span><br><span> URIPARSER_DIR</span><br><span> URIPARSER_INCLUDE</span><br><span> URIPARSER_LIB</span><br><span style="color: hsl(0, 100%, 40%);">-PBX_JANSSON</span><br><span> JANSSON_DIR</span><br><span style="color: hsl(0, 100%, 40%);">-JANSSON_INCLUDE</span><br><span style="color: hsl(0, 100%, 40%);">-JANSSON_LIB</span><br><span> PBX_JACK</span><br><span> JACK_DIR</span><br><span> JACK_INCLUDE</span><br><span>@@ -1172,6 +1169,11 @@</span><br><span> PJPROJECT_DIR</span><br><span> PJPROJECT_BUNDLED</span><br><span> PJPROJECT_CONFIGURE_OPTS</span><br><span style="color: hsl(120, 100%, 40%);">+JANSSON_INCLUDE</span><br><span style="color: hsl(120, 100%, 40%);">+JANSSON_LIB</span><br><span style="color: hsl(120, 100%, 40%);">+PBX_JANSSON</span><br><span style="color: hsl(120, 100%, 40%);">+JANSSON_BUNDLED</span><br><span style="color: hsl(120, 100%, 40%);">+JANSSON_CONFIGURE_OPTS</span><br><span> AST_C_COMPILER_FAMILY</span><br><span> AST_CLANG_BLOCKS</span><br><span> AST_CLANG_BLOCKS_LIBS</span><br><span>@@ -1338,6 +1340,7 @@</span><br><span> with_sounds_cache</span><br><span> with_externals_cache</span><br><span> enable_coverage</span><br><span style="color: hsl(120, 100%, 40%);">+with_jansson_bundled</span><br><span> with_pjproject_bundled</span><br><span> with_asound</span><br><span> with_bfd</span><br><span>@@ -1433,6 +1436,7 @@</span><br><span> CXXFLAGS</span><br><span> CCC</span><br><span> CXXCPP</span><br><span style="color: hsl(120, 100%, 40%);">+JANSSON_CONFIGURE_OPTS</span><br><span> PJPROJECT_CONFIGURE_OPTS</span><br><span> PKG_CONFIG</span><br><span> PKG_CONFIG_PATH</span><br><span>@@ -2085,6 +2089,7 @@</span><br><span> use cached sound tarfiles in PATH</span><br><span> --with-externals-cache=PATH</span><br><span> use cached external module tarfiles in PATH</span><br><span style="color: hsl(120, 100%, 40%);">+ --with-jansson-bundled Use bundled jansson library</span><br><span> --with-pjproject-bundled</span><br><span> Use bundled pjproject libraries</span><br><span> --with-asound=PATH use Advanced Linux Sound Architecture files in PATH</span><br><span>@@ -2180,6 +2185,8 @@</span><br><span> CXX C++ compiler command</span><br><span> CXXFLAGS C++ compiler flags</span><br><span> CXXCPP C++ preprocessor</span><br><span style="color: hsl(120, 100%, 40%);">+ JANSSON_CONFIGURE_OPTS</span><br><span style="color: hsl(120, 100%, 40%);">+ Additional configure options to pass to bundled jansson</span><br><span> PJPROJECT_CONFIGURE_OPTS</span><br><span> Additional configure options to pass to bundled pjproject</span><br><span> PKG_CONFIG path to pkg-config utility</span><br><span>@@ -9127,6 +9134,17 @@</span><br><span> CFLAGS="$save_CFLAGS"</span><br><span> </span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+JANSSON_BUNDLED=no</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# Check whether --with-jansson-bundled was given.</span><br><span style="color: hsl(120, 100%, 40%);">+if test "${with_jansson_bundled+set}" = set; then :</span><br><span style="color: hsl(120, 100%, 40%);">+ withval=$with_jansson_bundled; case "${withval}" in</span><br><span style="color: hsl(120, 100%, 40%);">+ y|yes) JANSSON_BUNDLED=yes ;;</span><br><span style="color: hsl(120, 100%, 40%);">+ *) JANSSON_BUNDLED=no ;;</span><br><span style="color: hsl(120, 100%, 40%);">+ esac</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> PJPROJECT_BUNDLED=no</span><br><span> </span><br><span> </span><br><span>@@ -9142,6 +9160,92 @@</span><br><span> </span><br><span> </span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if test "$JANSSON_BUNDLED" = "yes" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${ac_mandatory_list#*JANSSON*}" != "$ac_mandatory_list" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ as_fn_error $? "--with-jansson and --with-jansson-bundled can't both be specified" "$LINENO" 5</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ac_mandatory_list="$ac_mandatory_list JANSSON"</span><br><span style="color: hsl(120, 100%, 40%);">+ JANSSON_DIR="${ac_pwd}/third-party/jansson"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for embedded jansson (may have to download)" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo_n "checking for embedded jansson (may have to download)... " >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: configuring" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo "configuring" >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "x${DOWNLOAD_TO_STDOUT}" = "x" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ as_fn_error $? "A download utility (wget, curl, or fetch) is required to download bundled jansson" "$LINENO" 5</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${BZIP2}" = ":" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ as_fn_error $? "bzip2 is required to extract the jansson tar file" "$LINENO" 5</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${TAR}" = ":" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ as_fn_error $? "tar is required to extract the jansson tar file" "$LINENO" 5</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${PATCH}" = ":" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ as_fn_error $? "patch is required to configure bundled jansson" "$LINENO" 5</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${SED}" = ":" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ as_fn_error $? "sed is required to configure bundled jansson" "$LINENO" 5</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${NM}" = ":" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ as_fn_error $? "nm is required to build bundled jansson" "$LINENO" 5</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${MD5}" = ":" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ as_fn_error $? "md5sum is required to build bundled jansson" "$LINENO" 5</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${CAT}" = ":" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ as_fn_error $? "cat is required to build bundled jansson" "$LINENO" 5</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${CUT}" = ":" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ as_fn_error $? "cut is required to build bundled jansson" "$LINENO" 5</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${GREP}" = ":" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ as_fn_error $? "grep is required to build bundled jansson" "$LINENO" 5</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ this_host=$(./config.sub $(./config.guess))</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "$build" != "$this_host" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ JANSSON_CONFIGURE_OPTS+=" --build=$build"</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "$host" != "$this_host" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ JANSSON_CONFIGURE_OPTS+=" --host=$host"</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT CUT GREP</span><br><span style="color: hsl(120, 100%, 40%);">+ export NOISY_BUILD</span><br><span style="color: hsl(120, 100%, 40%);">+ ${GNU_MAKE} --quiet --no-print-directory -C ${JANSSON_DIR} \</span><br><span style="color: hsl(120, 100%, 40%);">+ JANSSON_CONFIGURE_OPTS="$JANSSON_CONFIGURE_OPTS" \</span><br><span style="color: hsl(120, 100%, 40%);">+ EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR:-${AST_DOWNLOAD_CACHE}}" \</span><br><span style="color: hsl(120, 100%, 40%);">+ configure</span><br><span style="color: hsl(120, 100%, 40%);">+ if test $? -ne 0 ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo "failed" >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: Unable to configure ${JANSSON_DIR}" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo "$as_me: Unable to configure ${JANSSON_DIR}" >&6;}</span><br><span style="color: hsl(120, 100%, 40%);">+ as_fn_error $? "Re-run the ./configure command with 'NOISY_BUILD=yes' appended to see error details." "$LINENO" 5</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bundled jansson" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo_n "checking for bundled jansson... " >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ JANSSON_INCLUDE=-I${JANSSON_DIR}/dest/include</span><br><span style="color: hsl(120, 100%, 40%);">+ JANSSON_CFLAGS="$JANSSON_INCLUDE"</span><br><span style="color: hsl(120, 100%, 40%);">+ JANSSON_LIB="-L${JANSSON_DIR}/dest/lib -ljansson"</span><br><span style="color: hsl(120, 100%, 40%);">+ PBX_JANSSON=1</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo "yes" >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if test "$PJPROJECT_BUNDLED" = "yes" ; then</span><br><span> </span><br><span> if test "${ac_mandatory_list#*PJPROJECT*}" != "$ac_mandatory_list" ; then</span><br><span>@@ -14074,7 +14178,8 @@</span><br><span> </span><br><span> </span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-# Find required JSON support.</span><br><span style="color: hsl(120, 100%, 40%);">+# Find required JSON support if bundled is not enabled.</span><br><span style="color: hsl(120, 100%, 40%);">+if test "$JANSSON_BUNDLED" = "no" ; then</span><br><span> </span><br><span> if test "x${PBX_JANSSON}" != "x1" -a "${USE_JANSSON}" != "no"; then</span><br><span> pbxlibdir=""</span><br><span>@@ -14172,8 +14277,17 @@</span><br><span> </span><br><span> </span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-if test "${PBX_JANSSON}" != 1; then</span><br><span style="color: hsl(0, 100%, 40%);">- as_fn_error $? "*** JSON support not found (this typically means the libjansson development package is missing)" "$LINENO" 5</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${PBX_JANSSON}" != 1; then</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Asterisk requires libjansson and no system copy was found." >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo "$as_me: *** Asterisk requires libjansson and no system copy was found." >&6;}</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Please install the 'libjansson' development package or" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo "$as_me: *** Please install the 'libjansson' development package or" >&6;}</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** use './configure --with-jansson-bundled'" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo "$as_me: *** use './configure --with-jansson-bundled'" >&6;}</span><br><span style="color: hsl(120, 100%, 40%);">+ exit 1</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+else</span><br><span style="color: hsl(120, 100%, 40%);">+ PBX_JANSSON=1</span><br><span> fi</span><br><span> </span><br><span> # See if clock_gettime is in librt</span><br><span>diff --git a/configure.ac b/configure.ac</span><br><span>index 601548d..e7920c8 100644</span><br><span>--- a/configure.ac</span><br><span>+++ b/configure.ac</span><br><span>@@ -424,6 +424,15 @@</span><br><span> AST_CHECK_RAII()</span><br><span> AST_CHECK_STRSEP_ARRAY_BOUNDS()</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+JANSSON_BUNDLED=no</span><br><span style="color: hsl(120, 100%, 40%);">+AC_ARG_WITH([jansson-bundled],</span><br><span style="color: hsl(120, 100%, 40%);">+ [AS_HELP_STRING([--with-jansson-bundled],</span><br><span style="color: hsl(120, 100%, 40%);">+ [Use bundled jansson library])],</span><br><span style="color: hsl(120, 100%, 40%);">+ [case "${withval}" in</span><br><span style="color: hsl(120, 100%, 40%);">+ y|yes) JANSSON_BUNDLED=yes ;;</span><br><span style="color: hsl(120, 100%, 40%);">+ *) JANSSON_BUNDLED=no ;;</span><br><span style="color: hsl(120, 100%, 40%);">+ esac])</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> PJPROJECT_BUNDLED=no</span><br><span> AH_TEMPLATE(m4_bpatsubst([[HAVE_PJPROJECT_BUNDLED]], [(.*)]), [Define to 1 when using the bundled pjproject.])</span><br><span> </span><br><span>@@ -663,11 +672,18 @@</span><br><span> AC_SUBST(UUID_INCLUDE)</span><br><span> AC_SUBST(UUID_LIB)</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-# Find required JSON support.</span><br><span style="color: hsl(0, 100%, 40%);">-AST_EXT_LIB_CHECK([JANSSON], [jansson], [json_dumps], [jansson.h])</span><br><span style="color: hsl(120, 100%, 40%);">+# Find required JSON support if bundled is not enabled.</span><br><span style="color: hsl(120, 100%, 40%);">+if test "$JANSSON_BUNDLED" = "no" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ AST_EXT_LIB_CHECK([JANSSON], [jansson], [json_dumps], [jansson.h])</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-if test "${PBX_JANSSON}" != 1; then</span><br><span style="color: hsl(0, 100%, 40%);">- AC_MSG_ERROR([*** JSON support not found (this typically means the libjansson development package is missing)])</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${PBX_JANSSON}" != 1; then</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_NOTICE(*** Asterisk requires libjansson and no system copy was found.)</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_NOTICE(*** Please install the 'libjansson' development package or)</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_NOTICE(*** use './configure --with-jansson-bundled')</span><br><span style="color: hsl(120, 100%, 40%);">+ exit 1</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+else</span><br><span style="color: hsl(120, 100%, 40%);">+ PBX_JANSSON=1</span><br><span> fi</span><br><span> </span><br><span> # See if clock_gettime is in librt</span><br><span>diff --git a/makeopts.in b/makeopts.in</span><br><span>index 17a4d27..42128ab 100644</span><br><span>--- a/makeopts.in</span><br><span>+++ b/makeopts.in</span><br><span>@@ -186,6 +186,7 @@</span><br><span> JACK_INCLUDE=@JACK_INCLUDE@</span><br><span> JACK_LIB=@JACK_LIB@</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+JANSSON_BUNDLED=@JANSSON_BUNDLED@</span><br><span> JANSSON_INCLUDE=@JANSSON_INCLUDE@</span><br><span> JANSSON_LIB=@JANSSON_LIB@</span><br><span> </span><br><span>diff --git a/third-party/Makefile b/third-party/Makefile</span><br><span>index 3ea84d1..7b2afda 100644</span><br><span>--- a/third-party/Makefile</span><br><span>+++ b/third-party/Makefile</span><br><span>@@ -1,10 +1,10 @@</span><br><span> </span><br><span> include Makefile.rules</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-TP_SUBDIRS := pjproject</span><br><span style="color: hsl(120, 100%, 40%);">+TP_SUBDIRS := pjproject jansson</span><br><span> # Sub directories that contain special install/uninstall targets must be explicitly listed</span><br><span> # to prevent accidentally running the package's default install target.</span><br><span style="color: hsl(0, 100%, 40%);">-TP_INSTALL_SUBDIRS := pjproject</span><br><span style="color: hsl(120, 100%, 40%);">+TP_INSTALL_SUBDIRS := pjproject jansson</span><br><span> </span><br><span> .PHONY: all dist-clean distclean install clean moduleinfo makeopts uninstall $(TP_SUBDIRS)</span><br><span> </span><br><span>diff --git a/third-party/Makefile.rules b/third-party/Makefile.rules</span><br><span>index 8306869..f02ddb1 100644</span><br><span>--- a/third-party/Makefile.rules</span><br><span>+++ b/third-party/Makefile.rules</span><br><span>@@ -33,3 +33,25 @@</span><br><span> export DOWNLOAD</span><br><span> export DOWNLOAD_TO_STDOUT</span><br><span> export DOWNLOAD_TIMEOUT</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+DOWNLOAD_DIR := $(or $(EXTERNALS_CACHE_DIR),$(TMPDIR),$(wildcard /tmp),.)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# These depend on the subpackage defining TARBALL_FILE.</span><br><span style="color: hsl(120, 100%, 40%);">+TARBALL_EXISTS = test -f $(DOWNLOAD_DIR)/$(TARBALL_FILE) -a -f $(TARBALL_MD5)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+define TARBALL_VERIFY</span><br><span style="color: hsl(120, 100%, 40%);">+ ($(SHELL_ECHO_PREFIX) Verifying $(DOWNLOAD_DIR)/$(TARBALL_FILE) &&\</span><br><span style="color: hsl(120, 100%, 40%);">+ tarball_sum=$$($(CAT) $(DOWNLOAD_DIR)/$(TARBALL_FILE) | $(MD5) | $(CUT) -d' ' -f1) ;\</span><br><span style="color: hsl(120, 100%, 40%);">+ required_sum=$$($(GREP) -e $(TARBALL_FILE) $(TARBALL_MD5) | $(CUT) -d' ' -f1) ;\</span><br><span style="color: hsl(120, 100%, 40%);">+ if [ -z "$$required_sum" -o "$$tarball_sum" != "$$required_sum" ] ; then $(SHELL_ECHO_PREFIX) Verify failed ; exit 1 ;\</span><br><span style="color: hsl(120, 100%, 40%);">+ else $(SHELL_ECHO_PREFIX) Verify successful ; exit 0 ; fi; )</span><br><span style="color: hsl(120, 100%, 40%);">+endef</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+define TARBALL_DOWNLOAD</span><br><span style="color: hsl(120, 100%, 40%);">+ ($(SHELL_ECHO_PREFIX) Downloading $(TARBALL_URL) to $(DOWNLOAD_DIR)/$(TARBALL_FILE) ;\</span><br><span style="color: hsl(120, 100%, 40%);">+ $(DOWNLOAD_TO_STDOUT) $(call DOWNLOAD_TIMEOUT,5,60) $(TARBALL_URL) > $(DOWNLOAD_DIR)/$(TARBALL_FILE) &&\</span><br><span style="color: hsl(120, 100%, 40%);">+ $(TARBALL_VERIFY))</span><br><span style="color: hsl(120, 100%, 40%);">+endef</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+TARBALL_URL = $(PACKAGE_URL)/$(TARBALL_FILE)</span><br><span style="color: hsl(120, 100%, 40%);">+TARBALL_MD5 = $(TARBALL_FILE).md5</span><br><span>diff --git a/third-party/pjproject/apply_patches b/third-party/apply_patches</span><br><span>similarity index 100%</span><br><span>rename from third-party/pjproject/apply_patches</span><br><span>rename to third-party/apply_patches</span><br><span>diff --git a/third-party/configure.m4 b/third-party/configure.m4</span><br><span>index 6367722..fa4736d 100644</span><br><span>--- a/third-party/configure.m4</span><br><span>+++ b/third-party/configure.m4</span><br><span>@@ -5,5 +5,6 @@</span><br><span> </span><br><span> AC_DEFUN([THIRD_PARTY_CONFIGURE],</span><br><span> [</span><br><span style="color: hsl(120, 100%, 40%);">+ JANSSON_CONFIGURE()</span><br><span> PJPROJECT_CONFIGURE()</span><br><span> ])</span><br><span>diff --git a/third-party/jansson/.gitignore b/third-party/jansson/.gitignore</span><br><span>new file mode 100644</span><br><span>index 0000000..b7bfd2b</span><br><span>--- /dev/null</span><br><span>+++ b/third-party/jansson/.gitignore</span><br><span>@@ -0,0 +1,4 @@</span><br><span style="color: hsl(120, 100%, 40%);">+source/</span><br><span style="color: hsl(120, 100%, 40%);">+dest/</span><br><span style="color: hsl(120, 100%, 40%);">+**.bz2</span><br><span style="color: hsl(120, 100%, 40%);">+.rebuild_needed</span><br><span>diff --git a/third-party/jansson/Makefile b/third-party/jansson/Makefile</span><br><span>new file mode 100644</span><br><span>index 0000000..a85efa0</span><br><span>--- /dev/null</span><br><span>+++ b/third-party/jansson/Makefile</span><br><span>@@ -0,0 +1,99 @@</span><br><span style="color: hsl(120, 100%, 40%);">+.PHONY: _all all _install install clean distclean configure</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+.NOTPARALLEL:</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+include ../versions.mak</span><br><span style="color: hsl(120, 100%, 40%);">+export JANSSON_DIR := $(shell pwd -P)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+SPECIAL_TARGETS :=</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ifneq ($(findstring configure,$(MAKECMDGOALS)),)</span><br><span style="color: hsl(120, 100%, 40%);">+# Run from $(ASTTOPDIR)/configure</span><br><span style="color: hsl(120, 100%, 40%);">+ SPECIAL_TARGETS += configure</span><br><span style="color: hsl(120, 100%, 40%);">+endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ifeq ($(findstring clean,$(MAKECMDGOALS)),clean)</span><br><span style="color: hsl(120, 100%, 40%);">+# clean or distclean</span><br><span style="color: hsl(120, 100%, 40%);">+ SPECIAL_TARGETS += clean</span><br><span style="color: hsl(120, 100%, 40%);">+endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ifeq ($(findstring uninstall,$(MAKECMDGOALS)),uninstall)</span><br><span style="color: hsl(120, 100%, 40%);">+ SPECIAL_TARGETS += uninstall</span><br><span style="color: hsl(120, 100%, 40%);">+endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ifneq ($(wildcard ../../makeopts),)</span><br><span style="color: hsl(120, 100%, 40%);">+ include ../../makeopts</span><br><span style="color: hsl(120, 100%, 40%);">+endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ifeq ($(SPECIAL_TARGETS),)</span><br><span style="color: hsl(120, 100%, 40%);">+# Run locally or from $(ASTTOPDIR)/Makefile. All include files should be present</span><br><span style="color: hsl(120, 100%, 40%);">+ ifeq ($(wildcard ../../makeopts),)</span><br><span style="color: hsl(120, 100%, 40%);">+ $(error ASTTOPDIR/configure hasn't been run)</span><br><span style="color: hsl(120, 100%, 40%);">+ endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ifeq ($(JANSSON_BUNDLED),yes)</span><br><span style="color: hsl(120, 100%, 40%);">+ ifneq ($(wildcard ../../menuselect.makeopts),)</span><br><span style="color: hsl(120, 100%, 40%);">+ include ../../menuselect.makeopts</span><br><span style="color: hsl(120, 100%, 40%);">+ else</span><br><span style="color: hsl(120, 100%, 40%);">+ $(warning ASTTOPDIR/menuselect hasn't been run yet. Can't find debug options.)</span><br><span style="color: hsl(120, 100%, 40%);">+ endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ all: _all</span><br><span style="color: hsl(120, 100%, 40%);">+ install: _install</span><br><span style="color: hsl(120, 100%, 40%);">+ else</span><br><span style="color: hsl(120, 100%, 40%);">+ all install:</span><br><span style="color: hsl(120, 100%, 40%);">+ endif</span><br><span style="color: hsl(120, 100%, 40%);">+endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+include ../../Makefile.rules</span><br><span style="color: hsl(120, 100%, 40%);">+include ../Makefile.rules</span><br><span style="color: hsl(120, 100%, 40%);">+include Makefile.rules</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ECHO_PREFIX := $(ECHO_PREFIX) echo '[jansson] '</span><br><span style="color: hsl(120, 100%, 40%);">+SHELL_ECHO_PREFIX := echo '[jansson] '</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+_all: source/config.status</span><br><span style="color: hsl(120, 100%, 40%);">+ $(ECHO_PREFIX) Building bundled jansson.</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CMD_PREFIX) (cd source; make)</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CMD_PREFIX) (cd source; make install)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+.DELETE_ON_ERROR:</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+$(DOWNLOAD_DIR)/$(TARBALL_FILE): ../versions.mak</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CMD_PREFIX) ($(TARBALL_EXISTS) && $(TARBALL_VERIFY) && touch $@) || (rm -rf $@ ;\</span><br><span style="color: hsl(120, 100%, 40%);">+ $(TARBALL_DOWNLOAD)) || (rm -rf $@ ;\</span><br><span style="color: hsl(120, 100%, 40%);">+ $(SHELL_ECHO_PREFIX) Retrying download ; $(TARBALL_DOWNLOAD))</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+source/.unpacked: $(DOWNLOAD_DIR)/$(TARBALL_FILE)</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CMD_PREFIX) $(TARBALL_VERIFY) || (rm -rf $@ ;\</span><br><span style="color: hsl(120, 100%, 40%);">+ $(SHELL_ECHO_PREFIX) Retrying download ; $(TARBALL_DOWNLOAD))</span><br><span style="color: hsl(120, 100%, 40%);">+ $(ECHO_PREFIX) Unpacking $<</span><br><span style="color: hsl(120, 100%, 40%);">+ -@rm -rf source jansson-*/ >/dev/null 2>&1</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CMD_PREFIX) $(TAR) -xjf $<</span><br><span style="color: hsl(120, 100%, 40%);">+ @mv jansson-$(JANSSON_VERSION) source</span><br><span style="color: hsl(120, 100%, 40%);">+ $(ECHO_PREFIX) Applying patches "$(realpath patches)" "$(realpath .)/source"</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CMD_PREFIX) ../apply_patches $(QUIET_CONFIGURE) "$(realpath patches)" "$(realpath .)/source"</span><br><span style="color: hsl(120, 100%, 40%);">+ -@touch source/.unpacked</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+.rebuild_needed: $(wildcard ../../.lastclean)</span><br><span style="color: hsl(120, 100%, 40%);">+ $(ECHO_PREFIX) Rebuilding</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CMD_PREFIX) $(MAKE) clean $(REALLY_QUIET)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+source/config.status: source/.unpacked Makefile.rules .rebuild_needed</span><br><span style="color: hsl(120, 100%, 40%);">+ $(ECHO_PREFIX) Configuring</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CMD_PREFIX) (cd source ; ./configure $(QUIET_CONFIGURE) $(JANSSON_CONFIG_OPTS) --disable-shared --enable-static --prefix=$(JANSSON_DIR)/dest)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+configure: source/config.status</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+_install: _all</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+uninstall:</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+clean:</span><br><span style="color: hsl(120, 100%, 40%);">+ $(ECHO_PREFIX) Cleaning</span><br><span style="color: hsl(120, 100%, 40%);">+ +-$(CMD_PREFIX) test -d source dest && $(SUBMAKE) -C source clean || :</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+distclean:</span><br><span style="color: hsl(120, 100%, 40%);">+ $(ECHO_PREFIX) Distcleaning</span><br><span style="color: hsl(120, 100%, 40%);">+ -$(CMD_PREFIX) rm -rf source jansson-*.tar.bz2 .rebuild_needed</span><br><span>diff --git a/third-party/jansson/Makefile.rules b/third-party/jansson/Makefile.rules</span><br><span>new file mode 100644</span><br><span>index 0000000..39112eb</span><br><span>--- /dev/null</span><br><span>+++ b/third-party/jansson/Makefile.rules</span><br><span>@@ -0,0 +1,16 @@</span><br><span style="color: hsl(120, 100%, 40%);">+# We switched download locations so Asterisk users don't bombard the Digip</span><br><span style="color: hsl(120, 100%, 40%);">+# site with download requests.</span><br><span style="color: hsl(120, 100%, 40%);">+#</span><br><span style="color: hsl(120, 100%, 40%);">+# For future reference when upgrading bundled JANSSON the next time</span><br><span style="color: hsl(120, 100%, 40%);">+# JANSSON is released.</span><br><span style="color: hsl(120, 100%, 40%);">+# Digip's download URL.</span><br><span style="color: hsl(120, 100%, 40%);">+# PACKAGE_URL ?= http://www.digip.org/jansson/releases/</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+PACKAGE_URL ?= https://raw.githubusercontent.com/asterisk/third-party/master/jansson/$(JANSSON_VERSION)</span><br><span style="color: hsl(120, 100%, 40%);">+TARBALL_FILE = jansson-$(JANSSON_VERSION).tar.bz2</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# JANSSON_CONFIGURE_OPTS could come from the command line or could be</span><br><span style="color: hsl(120, 100%, 40%);">+# set/modified by configure.m4 if the build or host tuples aren't the same</span><br><span style="color: hsl(120, 100%, 40%);">+# as the current build environment (cross-compile).</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+JANSSON_CONFIG_OPTS = $(JANSSON_CONFIGURE_OPTS)</span><br><span>diff --git a/third-party/jansson/configure.m4 b/third-party/jansson/configure.m4</span><br><span>new file mode 100644</span><br><span>index 0000000..d59d861</span><br><span>--- /dev/null</span><br><span>+++ b/third-party/jansson/configure.m4</span><br><span>@@ -0,0 +1,89 @@</span><br><span style="color: hsl(120, 100%, 40%);">+#</span><br><span style="color: hsl(120, 100%, 40%);">+# If this file is changed, be sure to run ASTTOPDIR/bootstrap.sh</span><br><span style="color: hsl(120, 100%, 40%);">+# before committing.</span><br><span style="color: hsl(120, 100%, 40%);">+#</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+AC_DEFUN([_JANSSON_CONFIGURE],</span><br><span style="color: hsl(120, 100%, 40%);">+[</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${ac_mandatory_list#*JANSSON*}" != "$ac_mandatory_list" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_ERROR(--with-jansson and --with-jansson-bundled can't both be specified)</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ac_mandatory_list="$ac_mandatory_list JANSSON"</span><br><span style="color: hsl(120, 100%, 40%);">+ JANSSON_DIR="${ac_pwd}/third-party/jansson"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_CHECKING(for embedded jansson (may have to download))</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_RESULT(configuring)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "x${DOWNLOAD_TO_STDOUT}" = "x" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_ERROR(A download utility (wget, curl, or fetch) is required to download bundled jansson)</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${BZIP2}" = ":" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_ERROR(bzip2 is required to extract the jansson tar file)</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${TAR}" = ":" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_ERROR(tar is required to extract the jansson tar file)</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${PATCH}" = ":" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_ERROR(patch is required to configure bundled jansson)</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${SED}" = ":" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_ERROR(sed is required to configure bundled jansson)</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${NM}" = ":" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_ERROR(nm is required to build bundled jansson)</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${MD5}" = ":" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_ERROR(md5sum is required to build bundled jansson)</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${CAT}" = ":" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_ERROR(cat is required to build bundled jansson)</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${CUT}" = ":" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_ERROR(cut is required to build bundled jansson)</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${GREP}" = ":" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_ERROR(grep is required to build bundled jansson)</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_ARG_VAR([JANSSON_CONFIGURE_OPTS],[Additional configure options to pass to bundled jansson])</span><br><span style="color: hsl(120, 100%, 40%);">+ this_host=$(./config.sub $(./config.guess))</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "$build" != "$this_host" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ JANSSON_CONFIGURE_OPTS+=" --build=$build"</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "$host" != "$this_host" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ JANSSON_CONFIGURE_OPTS+=" --host=$host"</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT CUT GREP</span><br><span style="color: hsl(120, 100%, 40%);">+ export NOISY_BUILD</span><br><span style="color: hsl(120, 100%, 40%);">+ ${GNU_MAKE} --quiet --no-print-directory -C ${JANSSON_DIR} \</span><br><span style="color: hsl(120, 100%, 40%);">+ JANSSON_CONFIGURE_OPTS="$JANSSON_CONFIGURE_OPTS" \</span><br><span style="color: hsl(120, 100%, 40%);">+ EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR:-${AST_DOWNLOAD_CACHE}}" \</span><br><span style="color: hsl(120, 100%, 40%);">+ configure</span><br><span style="color: hsl(120, 100%, 40%);">+ if test $? -ne 0 ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_RESULT(failed)</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_NOTICE(Unable to configure ${JANSSON_DIR})</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_ERROR(Re-run the ./configure command with 'NOISY_BUILD=yes' appended to see error details.)</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_CHECKING(for bundled jansson)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ JANSSON_INCLUDE=-I${JANSSON_DIR}/dest/include</span><br><span style="color: hsl(120, 100%, 40%);">+ JANSSON_CFLAGS="$JANSSON_INCLUDE"</span><br><span style="color: hsl(120, 100%, 40%);">+ JANSSON_LIB="-L${JANSSON_DIR}/dest/lib -ljansson"</span><br><span style="color: hsl(120, 100%, 40%);">+ PBX_JANSSON=1</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_SUBST([JANSSON_BUNDLED])</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_SUBST([PBX_JANSSON])</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_SUBST([JANSSON_LIB])</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_SUBST([JANSSON_INCLUDE])</span><br><span style="color: hsl(120, 100%, 40%);">+ AC_MSG_RESULT(yes)</span><br><span style="color: hsl(120, 100%, 40%);">+])</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+AC_DEFUN([JANSSON_CONFIGURE],</span><br><span style="color: hsl(120, 100%, 40%);">+[</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "$JANSSON_BUNDLED" = "yes" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ _JANSSON_CONFIGURE()</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+])</span><br><span>diff --git a/third-party/jansson/jansson-2.11.tar.bz2.md5 b/third-party/jansson/jansson-2.11.tar.bz2.md5</span><br><span>new file mode 100644</span><br><span>index 0000000..db4326c</span><br><span>--- /dev/null</span><br><span>+++ b/third-party/jansson/jansson-2.11.tar.bz2.md5</span><br><span>@@ -0,0 +1 @@</span><br><span style="color: hsl(120, 100%, 40%);">+289ca8cbd2df31de9bda7e5220754d25 jansson-2.11.tar.bz2</span><br><span>diff --git a/third-party/jansson/patches/0001-Improve-test-coverage.patch b/third-party/jansson/patches/0001-Improve-test-coverage.patch</span><br><span>new file mode 100644</span><br><span>index 0000000..226c404</span><br><span>--- /dev/null</span><br><span>+++ b/third-party/jansson/patches/0001-Improve-test-coverage.patch</span><br><span>@@ -0,0 +1,128 @@</span><br><span style="color: hsl(120, 100%, 40%);">+From 73c22de51672cb40fdc29c95331923d4dcebb6fa Mon Sep 17 00:00:00 2001</span><br><span style="color: hsl(120, 100%, 40%);">+From: Corey Farrell <git@cfware.com></span><br><span style="color: hsl(120, 100%, 40%);">+Date: Tue, 13 Feb 2018 04:35:37 -0500</span><br><span style="color: hsl(120, 100%, 40%);">+Subject: [PATCH 01/22] Improve test coverage.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Changes to test/ removed for bundled use in Asterisk.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+* Test equality of different length strings.</span><br><span style="color: hsl(120, 100%, 40%);">+* Add tab to json_pack whitespace test.</span><br><span style="color: hsl(120, 100%, 40%);">+* Test json_sprintf with empty result and invalid UTF.</span><br><span style="color: hsl(120, 100%, 40%);">+* Test json_get_alloc_funcs with NULL arguments.</span><br><span style="color: hsl(120, 100%, 40%);">+* Test invalid arguments.</span><br><span style="color: hsl(120, 100%, 40%);">+* Add test_chaos to test allocation failure code paths.</span><br><span style="color: hsl(120, 100%, 40%);">+* Remove redundant json_is_string checks from json_string_equal and</span><br><span style="color: hsl(120, 100%, 40%);">+ json_string_copy. Both functions are static and can only be called</span><br><span style="color: hsl(120, 100%, 40%);">+ with a json string.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Fixes to issues found by test_chaos:</span><br><span style="color: hsl(120, 100%, 40%);">+* Fix crash on OOM in pack_unpack.c:read_string().</span><br><span style="color: hsl(120, 100%, 40%);">+* Unconditionally free string in string_create upon allocation failure.</span><br><span style="color: hsl(120, 100%, 40%);">+ Update load.c:parse_value() to reflect this. This resolves a leak on</span><br><span style="color: hsl(120, 100%, 40%);">+ allocation failure for pack_unpack.c:pack_string() and</span><br><span style="color: hsl(120, 100%, 40%);">+ value.c:json_sprintf().</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Although not visible from CodeCoverage these changes significantly</span><br><span style="color: hsl(120, 100%, 40%);">+increase branch coverage. Especially in src/value.c where we previously</span><br><span style="color: hsl(120, 100%, 40%);">+covered 67.4% of branches and now cover 96.3% of branches.</span><br><span style="color: hsl(120, 100%, 40%);">+---</span><br><span style="color: hsl(120, 100%, 40%);">+ CMakeLists.txt | 1 +</span><br><span style="color: hsl(120, 100%, 40%);">+ src/load.c | 6 +-</span><br><span style="color: hsl(120, 100%, 40%);">+ src/pack_unpack.c | 5 +-</span><br><span style="color: hsl(120, 100%, 40%);">+ src/value.c | 9 +-</span><br><span style="color: hsl(120, 100%, 40%);">+ test/.gitignore | 1 +</span><br><span style="color: hsl(120, 100%, 40%);">+ test/suites/api/Makefile.am | 2 +</span><br><span style="color: hsl(120, 100%, 40%);">+ test/suites/api/test_array.c | 73 +++++++++++++++++</span><br><span style="color: hsl(120, 100%, 40%);">+ test/suites/api/test_chaos.c | 115 ++++++++++++++++++++++++++</span><br><span style="color: hsl(120, 100%, 40%);">+ test/suites/api/test_equal.c | 7 ++</span><br><span style="color: hsl(120, 100%, 40%);">+ test/suites/api/test_memory_funcs.c | 7 ++</span><br><span style="color: hsl(120, 100%, 40%);">+ test/suites/api/test_number.c | 36 ++++++++</span><br><span style="color: hsl(120, 100%, 40%);">+ test/suites/api/test_object.c | 122 ++++++++++++++++++++++++++++</span><br><span style="color: hsl(120, 100%, 40%);">+ test/suites/api/test_pack.c | 10 ++-</span><br><span style="color: hsl(120, 100%, 40%);">+ test/suites/api/test_simple.c | 52 ++++++++++++</span><br><span style="color: hsl(120, 100%, 40%);">+ test/suites/api/test_sprintf.c | 12 +++</span><br><span style="color: hsl(120, 100%, 40%);">+ 15 files changed, 444 insertions(+), 14 deletions(-)</span><br><span style="color: hsl(120, 100%, 40%);">+ create mode 100644 test/suites/api/test_chaos.c</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+diff --git a/CMakeLists.txt b/CMakeLists.txt</span><br><span style="color: hsl(120, 100%, 40%);">+index 16cf552..2f6cfec 100644</span><br><span style="color: hsl(120, 100%, 40%);">+--- a/CMakeLists.txt</span><br><span>++++ b/CMakeLists.txt</span><br><span style="color: hsl(120, 100%, 40%);">+@@ -487,6 +487,7 @@ if (NOT JANSSON_WITHOUT_TESTS)</span><br><span style="color: hsl(120, 100%, 40%);">+ set(api_tests</span><br><span style="color: hsl(120, 100%, 40%);">+ test_array</span><br><span style="color: hsl(120, 100%, 40%);">+ test_copy</span><br><span style="color: hsl(120, 100%, 40%);">++ test_chaos</span><br><span style="color: hsl(120, 100%, 40%);">+ test_dump</span><br><span style="color: hsl(120, 100%, 40%);">+ test_dump_callback</span><br><span style="color: hsl(120, 100%, 40%);">+ test_equal</span><br><span style="color: hsl(120, 100%, 40%);">+diff --git a/src/load.c b/src/load.c</span><br><span style="color: hsl(120, 100%, 40%);">+index deb36f3..25efe2e 100644</span><br><span style="color: hsl(120, 100%, 40%);">+--- a/src/load.c</span><br><span>++++ b/src/load.c</span><br><span style="color: hsl(120, 100%, 40%);">+@@ -829,10 +829,8 @@ static json_t *parse_value(lex_t *lex, size_t flags, json_error_t *error)</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+ json = jsonp_stringn_nocheck_own(value, len);</span><br><span style="color: hsl(120, 100%, 40%);">+- if(json) {</span><br><span style="color: hsl(120, 100%, 40%);">+- lex->value.string.val = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+- lex->value.string.len = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+- }</span><br><span style="color: hsl(120, 100%, 40%);">++ lex->value.string.val = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">++ lex->value.string.len = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ break;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+diff --git a/src/pack_unpack.c b/src/pack_unpack.c</span><br><span style="color: hsl(120, 100%, 40%);">+index 153f64d..19dbf93 100644</span><br><span style="color: hsl(120, 100%, 40%);">+--- a/src/pack_unpack.c</span><br><span>++++ b/src/pack_unpack.c</span><br><span style="color: hsl(120, 100%, 40%);">+@@ -159,7 +159,10 @@ static char *read_string(scanner_t *s, va_list *ap,</span><br><span style="color: hsl(120, 100%, 40%);">+ return (char *)str;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+- strbuffer_init(&strbuff);</span><br><span style="color: hsl(120, 100%, 40%);">++ if(strbuffer_init(&strbuff)) {</span><br><span style="color: hsl(120, 100%, 40%);">++ set_error(s, "<internal>", json_error_out_of_memory, "Out of memory");</span><br><span style="color: hsl(120, 100%, 40%);">++ s->has_error = 1;</span><br><span style="color: hsl(120, 100%, 40%);">++ }</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+ while(1) {</span><br><span style="color: hsl(120, 100%, 40%);">+ str = va_arg(*ap, const char *);</span><br><span style="color: hsl(120, 100%, 40%);">+diff --git a/src/value.c b/src/value.c</span><br><span style="color: hsl(120, 100%, 40%);">+index b3b3141..29a978c 100644</span><br><span style="color: hsl(120, 100%, 40%);">+--- a/src/value.c</span><br><span>++++ b/src/value.c</span><br><span style="color: hsl(120, 100%, 40%);">+@@ -652,8 +652,7 @@ static json_t *string_create(const char *value, size_t len, int own)</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+ string = jsonp_malloc(sizeof(json_string_t));</span><br><span style="color: hsl(120, 100%, 40%);">+ if(!string) {</span><br><span style="color: hsl(120, 100%, 40%);">+- if(!own)</span><br><span style="color: hsl(120, 100%, 40%);">+- jsonp_free(v);</span><br><span style="color: hsl(120, 100%, 40%);">++ jsonp_free(v);</span><br><span style="color: hsl(120, 100%, 40%);">+ return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ json_init(&string->json, JSON_STRING);</span><br><span style="color: hsl(120, 100%, 40%);">+@@ -768,9 +767,6 @@ static int json_string_equal(const json_t *string1, const json_t *string2)</span><br><span style="color: hsl(120, 100%, 40%);">+ {</span><br><span style="color: hsl(120, 100%, 40%);">+ json_string_t *s1, *s2;</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+- if(!json_is_string(string1) || !json_is_string(string2))</span><br><span style="color: hsl(120, 100%, 40%);">+- return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+-</span><br><span style="color: hsl(120, 100%, 40%);">+ s1 = json_to_string(string1);</span><br><span style="color: hsl(120, 100%, 40%);">+ s2 = json_to_string(string2);</span><br><span style="color: hsl(120, 100%, 40%);">+ return s1->length == s2->length && !memcmp(s1->value, s2->value, s1->length);</span><br><span style="color: hsl(120, 100%, 40%);">+@@ -780,9 +776,6 @@ static json_t *json_string_copy(const json_t *string)</span><br><span style="color: hsl(120, 100%, 40%);">+ {</span><br><span style="color: hsl(120, 100%, 40%);">+ json_string_t *s;</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+- if(!json_is_string(string))</span><br><span style="color: hsl(120, 100%, 40%);">+- return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+-</span><br><span style="color: hsl(120, 100%, 40%);">+ s = json_to_string(string);</span><br><span style="color: hsl(120, 100%, 40%);">+ return json_stringn_nocheck(s->value, s->length);</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+-- </span><br><span style="color: hsl(120, 100%, 40%);">+2.17.1</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>diff --git a/third-party/jansson/patches/0017-Fix-error-handling-in-json_pack.patch b/third-party/jansson/patches/0017-Fix-error-handling-in-json_pack.patch</span><br><span>new file mode 100644</span><br><span>index 0000000..affa6c9</span><br><span>--- /dev/null</span><br><span>+++ b/third-party/jansson/patches/0017-Fix-error-handling-in-json_pack.patch</span><br><span>@@ -0,0 +1,103 @@</span><br><span style="color: hsl(120, 100%, 40%);">+From 15105b66b4df387037b670ac713584194ea10c2f Mon Sep 17 00:00:00 2001</span><br><span style="color: hsl(120, 100%, 40%);">+From: Maxim Zhukov <mussitantesmortem@gmail.com></span><br><span style="color: hsl(120, 100%, 40%);">+Date: Mon, 12 Mar 2018 17:39:04 +0300</span><br><span style="color: hsl(120, 100%, 40%);">+Subject: [PATCH 17/22] Fix error handling in json_pack</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Changes to test/ removed.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Fixed a bug where the error message was not filled if an empty object</span><br><span style="color: hsl(120, 100%, 40%);">+was passed to the json_pack.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Fixes #271</span><br><span style="color: hsl(120, 100%, 40%);">+---</span><br><span style="color: hsl(120, 100%, 40%);">+ src/pack_unpack.c | 64 ++++++++++++++++++-------------------</span><br><span style="color: hsl(120, 100%, 40%);">+ test/suites/api/test_pack.c | 8 +++++</span><br><span style="color: hsl(120, 100%, 40%);">+ 2 files changed, 40 insertions(+), 32 deletions(-)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+diff --git a/src/pack_unpack.c b/src/pack_unpack.c</span><br><span style="color: hsl(120, 100%, 40%);">+index 4026fd9..6461c06 100644</span><br><span style="color: hsl(120, 100%, 40%);">+--- a/src/pack_unpack.c</span><br><span>++++ b/src/pack_unpack.c</span><br><span style="color: hsl(120, 100%, 40%);">+@@ -348,6 +348,36 @@ static json_t *pack_string(scanner_t *s, va_list *ap)</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">++static json_t *pack_object_inter(scanner_t *s, va_list *ap, int need_incref)</span><br><span style="color: hsl(120, 100%, 40%);">++{</span><br><span style="color: hsl(120, 100%, 40%);">++ json_t *json;</span><br><span style="color: hsl(120, 100%, 40%);">++ char ntoken;</span><br><span style="color: hsl(120, 100%, 40%);">++</span><br><span style="color: hsl(120, 100%, 40%);">++ next_token(s);</span><br><span style="color: hsl(120, 100%, 40%);">++ ntoken = token(s);</span><br><span style="color: hsl(120, 100%, 40%);">++</span><br><span style="color: hsl(120, 100%, 40%);">++ if (ntoken != '?')</span><br><span style="color: hsl(120, 100%, 40%);">++ prev_token(s);</span><br><span style="color: hsl(120, 100%, 40%);">++</span><br><span style="color: hsl(120, 100%, 40%);">++ json = va_arg(*ap, json_t *);</span><br><span style="color: hsl(120, 100%, 40%);">++</span><br><span style="color: hsl(120, 100%, 40%);">++ if (json)</span><br><span style="color: hsl(120, 100%, 40%);">++ return need_incref ? json_incref(json) : json;</span><br><span style="color: hsl(120, 100%, 40%);">++</span><br><span style="color: hsl(120, 100%, 40%);">++ switch (ntoken) {</span><br><span style="color: hsl(120, 100%, 40%);">++ case '?':</span><br><span style="color: hsl(120, 100%, 40%);">++ return json_null();</span><br><span style="color: hsl(120, 100%, 40%);">++ case '*':</span><br><span style="color: hsl(120, 100%, 40%);">++ return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">++ default:</span><br><span style="color: hsl(120, 100%, 40%);">++ break;</span><br><span style="color: hsl(120, 100%, 40%);">++ }</span><br><span style="color: hsl(120, 100%, 40%);">++</span><br><span style="color: hsl(120, 100%, 40%);">++ set_error(s, "<args>", json_error_null_value, "NULL object key");</span><br><span style="color: hsl(120, 100%, 40%);">++ s->has_error = 1;</span><br><span style="color: hsl(120, 100%, 40%);">++ return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">++}</span><br><span style="color: hsl(120, 100%, 40%);">++</span><br><span style="color: hsl(120, 100%, 40%);">+ static json_t *pack(scanner_t *s, va_list *ap)</span><br><span style="color: hsl(120, 100%, 40%);">+ {</span><br><span style="color: hsl(120, 100%, 40%);">+ switch(token(s)) {</span><br><span style="color: hsl(120, 100%, 40%);">+@@ -376,40 +406,10 @@ static json_t *pack(scanner_t *s, va_list *ap)</span><br><span style="color: hsl(120, 100%, 40%);">+ return json_real(va_arg(*ap, double));</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+ case 'O': /* a json_t object; increments refcount */</span><br><span style="color: hsl(120, 100%, 40%);">+- {</span><br><span style="color: hsl(120, 100%, 40%);">+- int nullable;</span><br><span style="color: hsl(120, 100%, 40%);">+- json_t *json;</span><br><span style="color: hsl(120, 100%, 40%);">+-</span><br><span style="color: hsl(120, 100%, 40%);">+- next_token(s);</span><br><span style="color: hsl(120, 100%, 40%);">+- nullable = token(s) == '?';</span><br><span style="color: hsl(120, 100%, 40%);">+- if (!nullable)</span><br><span style="color: hsl(120, 100%, 40%);">+- prev_token(s);</span><br><span style="color: hsl(120, 100%, 40%);">+-</span><br><span style="color: hsl(120, 100%, 40%);">+- json = va_arg(*ap, json_t *);</span><br><span style="color: hsl(120, 100%, 40%);">+- if (!json && nullable) {</span><br><span style="color: hsl(120, 100%, 40%);">+- return json_null();</span><br><span style="color: hsl(120, 100%, 40%);">+- } else {</span><br><span style="color: hsl(120, 100%, 40%);">+- return json_incref(json);</span><br><span style="color: hsl(120, 100%, 40%);">+- }</span><br><span style="color: hsl(120, 100%, 40%);">+- }</span><br><span style="color: hsl(120, 100%, 40%);">++ return pack_object_inter(s, ap, 1);</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+ case 'o': /* a json_t object; doesn't increment refcount */</span><br><span style="color: hsl(120, 100%, 40%);">+- {</span><br><span style="color: hsl(120, 100%, 40%);">+- int nullable;</span><br><span style="color: hsl(120, 100%, 40%);">+- json_t *json;</span><br><span style="color: hsl(120, 100%, 40%);">+-</span><br><span style="color: hsl(120, 100%, 40%);">+- next_token(s);</span><br><span style="color: hsl(120, 100%, 40%);">+- nullable = token(s) == '?';</span><br><span style="color: hsl(120, 100%, 40%);">+- if (!nullable)</span><br><span style="color: hsl(120, 100%, 40%);">+- prev_token(s);</span><br><span style="color: hsl(120, 100%, 40%);">+-</span><br><span style="color: hsl(120, 100%, 40%);">+- json = va_arg(*ap, json_t *);</span><br><span style="color: hsl(120, 100%, 40%);">+- if (!json && nullable) {</span><br><span style="color: hsl(120, 100%, 40%);">+- return json_null();</span><br><span style="color: hsl(120, 100%, 40%);">+- } else {</span><br><span style="color: hsl(120, 100%, 40%);">+- return json;</span><br><span style="color: hsl(120, 100%, 40%);">+- }</span><br><span style="color: hsl(120, 100%, 40%);">+- }</span><br><span style="color: hsl(120, 100%, 40%);">++ return pack_object_inter(s, ap, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+ default:</span><br><span style="color: hsl(120, 100%, 40%);">+ set_error(s, "<format>", json_error_invalid_format, "Unexpected format character '%c'",</span><br><span style="color: hsl(120, 100%, 40%);">+-- </span><br><span style="color: hsl(120, 100%, 40%);">+2.17.1</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>diff --git a/third-party/pjproject/Makefile b/third-party/pjproject/Makefile</span><br><span>index dbd2a88..c1548c9 100644</span><br><span>--- a/third-party/pjproject/Makefile</span><br><span>+++ b/third-party/pjproject/Makefile</span><br><span>@@ -86,49 +86,22 @@</span><br><span> </span><br><span> _all: $(TARGETS)</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-define tarball_exists</span><br><span style="color: hsl(0, 100%, 40%);">- (if [ -f $(TARBALL) -a -f $(PJMD5SUM) ] ; then exit 0 ;\</span><br><span style="color: hsl(0, 100%, 40%);">- else exit 1; fi; )</span><br><span style="color: hsl(0, 100%, 40%);">-endef</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-define verify_tarball</span><br><span style="color: hsl(0, 100%, 40%);">- ($(SHELL_ECHO_PREFIX) Verifying $(TARBALL) &&\</span><br><span style="color: hsl(0, 100%, 40%);">- tarball_sum=$$($(CAT) $(TARBALL) | $(MD5) | $(CUT) -d' ' -f1) ;\</span><br><span style="color: hsl(0, 100%, 40%);">- required_sum=$$($(GREP) -e $(TARBALL_FILE) $(PJMD5SUM) | $(CUT) -d' ' -f1) ;\</span><br><span style="color: hsl(0, 100%, 40%);">- if [ -z "$$required_sum" -o "$$tarball_sum" != "$$required_sum" ] ; then $(SHELL_ECHO_PREFIX) Verify failed ; exit 1 ;\</span><br><span style="color: hsl(0, 100%, 40%);">- else $(SHELL_ECHO_PREFIX) Verify successful ; exit 0 ; fi; )</span><br><span style="color: hsl(0, 100%, 40%);">-endef</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-define download_from_pjproject</span><br><span style="color: hsl(0, 100%, 40%);">- ($(SHELL_ECHO_PREFIX) Downloading $(TARBALL_URL) to $(TARBALL) ;\</span><br><span style="color: hsl(0, 100%, 40%);">- $(DOWNLOAD_TO_STDOUT) $(call DOWNLOAD_TIMEOUT,5,60) $(TARBALL_URL) > $(TARBALL) &&\</span><br><span style="color: hsl(0, 100%, 40%);">- $(SHELL_ECHO_PREFIX) Downloading $(PJPROJECT_URL)/MD5SUM.TXT to $(PJMD5SUM) &&\</span><br><span style="color: hsl(0, 100%, 40%);">- $(DOWNLOAD_TO_STDOUT) $(call DOWNLOAD_TIMEOUT,5,60) $(PJPROJECT_URL)/MD5SUM.TXT > $(PJMD5SUM) &&\</span><br><span style="color: hsl(0, 100%, 40%);">- $(verify_tarball))</span><br><span style="color: hsl(0, 100%, 40%);">-endef</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> .DELETE_ON_ERROR:</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-DOWNLOAD_DIR := $(or $(EXTERNALS_CACHE_DIR),$(TMPDIR),$(wildcard /tmp),.)</span><br><span style="color: hsl(0, 100%, 40%);">-TARBALL_FILE = pjproject-$(PJPROJECT_VERSION).tar.bz2</span><br><span style="color: hsl(0, 100%, 40%);">-TARBALL = $(DOWNLOAD_DIR)/$(TARBALL_FILE)</span><br><span style="color: hsl(0, 100%, 40%);">-TARBALL_URL = $(PJPROJECT_URL)/$(TARBALL_FILE)</span><br><span style="color: hsl(0, 100%, 40%);">-PJMD5SUM = $(patsubst %.tar.bz2,%.md5,$(TARBALL))</span><br><span style="color: hsl(120, 100%, 40%);">+$(DOWNLOAD_DIR)/$(TARBALL_FILE): ../versions.mak</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CMD_PREFIX) ($(TARBALL_EXISTS) && $(TARBALL_VERIFY) && touch $@) || (rm -rf $@ ;\</span><br><span style="color: hsl(120, 100%, 40%);">+ $(TARBALL_DOWNLOAD)) || (rm -rf $@ ;\</span><br><span style="color: hsl(120, 100%, 40%);">+ $(SHELL_ECHO_PREFIX) Retrying download ; $(TARBALL_DOWNLOAD))</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-$(TARBALL): ../versions.mak</span><br><span style="color: hsl(0, 100%, 40%);">- $(CMD_PREFIX) ($(tarball_exists) && $(verify_tarball) && touch $@) || (rm -rf $@ ;\</span><br><span style="color: hsl(0, 100%, 40%);">- $(download_from_pjproject)) || (rm -rf $@ ;\</span><br><span style="color: hsl(0, 100%, 40%);">- $(SHELL_ECHO_PREFIX) Retrying download ; $(download_from_pjproject))</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-source/.unpacked: $(DOWNLOAD_DIR)/pjproject-$(PJPROJECT_VERSION).tar.bz2</span><br><span style="color: hsl(0, 100%, 40%);">- $(CMD_PREFIX) $(verify_tarball) || (rm -rf $@ ;\</span><br><span style="color: hsl(0, 100%, 40%);">- $(SHELL_ECHO_PREFIX) Retrying download ; $(download_from_pjproject))</span><br><span style="color: hsl(120, 100%, 40%);">+source/.unpacked: $(DOWNLOAD_DIR)/$(TARBALL_FILE)</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CMD_PREFIX) $(TARBALL_VERIFY) || (rm -rf $@ ;\</span><br><span style="color: hsl(120, 100%, 40%);">+ $(SHELL_ECHO_PREFIX) Retrying download ; $(TARBALL_DOWNLOAD))</span><br><span> $(ECHO_PREFIX) Unpacking $<</span><br><span style="color: hsl(0, 100%, 40%);">- -@rm -rf source pjproject-* >/dev/null 2>&1</span><br><span style="color: hsl(120, 100%, 40%);">+ -@rm -rf source pjproject-*/ >/dev/null 2>&1</span><br><span> $(CMD_PREFIX) $(TAR) -xjf $<</span><br><span> @mv pjproject-$(PJPROJECT_VERSION) source</span><br><span> $(ECHO_PREFIX) Applying patches "$(realpath patches)" "$(realpath .)/source"</span><br><span style="color: hsl(0, 100%, 40%);">- $(CMD_PREFIX) ./apply_patches $(QUIET_CONFIGURE) "$(realpath patches)" "$(realpath .)/source"</span><br><span style="color: hsl(120, 100%, 40%);">+ $(CMD_PREFIX) ../apply_patches $(QUIET_CONFIGURE) "$(realpath patches)" "$(realpath .)/source"</span><br><span> -@touch source/.unpacked</span><br><span> </span><br><span> source/version.mak: source/.unpacked</span><br><span>diff --git a/third-party/pjproject/Makefile.rules b/third-party/pjproject/Makefile.rules</span><br><span>index ef1a702..e38024a 100644</span><br><span>--- a/third-party/pjproject/Makefile.rules</span><br><span>+++ b/third-party/pjproject/Makefile.rules</span><br><span>@@ -4,9 +4,10 @@</span><br><span> # For future reference when upgrading bundled PJPROJECT the next time</span><br><span> # PJPROJECT is released.</span><br><span> # Teluu's download URL.</span><br><span style="color: hsl(0, 100%, 40%);">-# PJPROJECT_URL ?= http://www.pjsip.org/release/$(PJPROJECT_VERSION)</span><br><span style="color: hsl(120, 100%, 40%);">+# PACKAGE_URL ?= http://www.pjsip.org/release/$(PJPROJECT_VERSION)</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-PJPROJECT_URL ?= https://raw.githubusercontent.com/asterisk/third-party/master/pjproject/$(PJPROJECT_VERSION)</span><br><span style="color: hsl(120, 100%, 40%);">+PACKAGE_URL ?= https://raw.githubusercontent.com/asterisk/third-party/master/pjproject/$(PJPROJECT_VERSION)</span><br><span style="color: hsl(120, 100%, 40%);">+TARBALL_FILE = pjproject-$(PJPROJECT_VERSION).tar.bz2</span><br><span> </span><br><span> # PJPROJECT_CONFIGURE_OPTS could come from the command line or could be</span><br><span> # set/modified by configure.m4 if the build or host tuples aren't the same</span><br><span>diff --git a/third-party/pjproject/pjproject-2.7.2.tar.bz2.md5 b/third-party/pjproject/pjproject-2.7.2.tar.bz2.md5</span><br><span>new file mode 100644</span><br><span>index 0000000..2ea6b42</span><br><span>--- /dev/null</span><br><span>+++ b/third-party/pjproject/pjproject-2.7.2.tar.bz2.md5</span><br><span>@@ -0,0 +1,2 @@</span><br><span style="color: hsl(120, 100%, 40%);">+8119f0d91a00b6f553099e6ee5358ade *pjproject-2.7.2.zip</span><br><span style="color: hsl(120, 100%, 40%);">+fa3f0bc098c4bff48ddd92db1c016a7a pjproject-2.7.2.tar.bz2</span><br><span>diff --git a/third-party/versions.mak b/third-party/versions.mak</span><br><span>index b6daf19..faf7aec 100644</span><br><span>--- a/third-party/versions.mak</span><br><span>+++ b/third-party/versions.mak</span><br><span>@@ -1,2 +1,2 @@</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(120, 100%, 40%);">+JANSSON_VERSION = 2.11</span><br><span> PJPROJECT_VERSION = 2.7.2</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/9528">change 9528</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/9528"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ib3111b151d37cbda40768cf2a8a9c6cf6c5c7cbd </div>
<div style="display:none"> Gerrit-Change-Number: 9528 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>