summaryrefslogtreecommitdiff
path: root/third-party/pjproject/apply_patches
diff options
context:
space:
mode:
authorGeorge Joseph <gjoseph@digium.com>2016-10-03 10:30:43 -0600
committerGeorge Joseph <gjoseph@digium.com>2016-10-09 17:36:34 -0600
commite6b0053d7561032b7adbf6f3afaecf30f5046605 (patch)
treeafb3e87885e5f5a51b9c37f49a37bda94c65fbfd /third-party/pjproject/apply_patches
parent0dc0356e39e19b480db4549b892f775d105ae8e0 (diff)
bundled_pjproject: Add tests for programs used by the Makefile, et al.
Added tests for bzip2, tar, patch, sed and nm to configure.ac. Set DOWNLOAD_TO_STDOUT to a working command line regardless of whether the download program is wget, curl or fetch. Added a 'configure.m4' file to the third-party directory which takes care of calling any third-party project setup. Had to move some pjproject_bundled stuff up in configure.ac so it was called before the third-party configure macro. The pjproject tarball is now downloaded to the externals_cache_dir if it was specified on the ./configure command line Removed regeneration of the pjproject aconfigure file. It was only needed for an old patch that no longer applies. Converted the tests for symbols to explicit tests since we know that they're now available in the bundled version. Saves a little time during configure. ASTERISK-26416 #close Reported-by: Corey Farrell Change-Id: Id1d94251c0155f8dd41b7de7067f35cfbaafbb9b
Diffstat (limited to 'third-party/pjproject/apply_patches')
-rwxr-xr-xthird-party/pjproject/apply_patches6
1 files changed, 4 insertions, 2 deletions
diff --git a/third-party/pjproject/apply_patches b/third-party/pjproject/apply_patches
index 5dfdd2a3c..c28f40301 100755
--- a/third-party/pjproject/apply_patches
+++ b/third-party/pjproject/apply_patches
@@ -5,6 +5,8 @@ if [ "$1" = "-q" ] ; then
shift
fi
+PATCH=${PATCH:-patch}
+
patchdir=${1:?You must supply a patches directory}
sourcedir=${2?:You must supply a source directory}
@@ -27,12 +29,12 @@ if [ ! "$(ls -A $patchdir/*.patch 2>/dev/null)" ] ; then
fi
for patchfile in $patchdir/*.patch ; do
- patch -d $sourcedir -p1 -s -r- -f -N --dry-run -i "$patchfile" || (echo "Patchfile $(basename $patchfile) failed to apply" >&2 ; exit 1) || exit 1
+ ${PATCH} -d $sourcedir -p1 -s -r- -f -N --dry-run -i "$patchfile" || (echo "Patchfile $(basename $patchfile) failed to apply" >&2 ; exit 1) || exit 1
done
for patchfile in "$patchdir"/*.patch ; do
[ -z $quiet ] && echo "Applying patch $(basename $patchfile)"
- patch -d "$sourcedir" -p1 -s -i "$patchfile" || exit 1
+ ${PATCH} -d "$sourcedir" -p1 -s -i "$patchfile" || exit 1
done
exit 0