mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
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
(cherry picked from commit e6b0053d75
)
42 lines
904 B
Bash
Executable File
42 lines
904 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ "$1" = "-q" ] ; then
|
|
quiet=1
|
|
shift
|
|
fi
|
|
|
|
PATCH=${PATCH:-patch}
|
|
|
|
patchdir=${1:?You must supply a patches directory}
|
|
sourcedir=${2?:You must supply a source directory}
|
|
|
|
patchdir=`readlink -f $patchdir`
|
|
sourcedir=`readlink -f $sourcedir`
|
|
|
|
if [ ! -d "$patchdir" ] ; then
|
|
echo "$patchdir is not a directory" >&2
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -d "$sourcedir" ] ; then
|
|
echo "$sourcedir is not a directory" >&2
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! "$(ls -A $patchdir/*.patch 2>/dev/null)" ] ; then
|
|
echo "No patches in $patchdir" >&2
|
|
exit 0
|
|
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
|
|
done
|
|
|
|
for patchfile in "$patchdir"/*.patch ; do
|
|
[ -z $quiet ] && echo "Applying patch $(basename $patchfile)"
|
|
${PATCH} -d "$sourcedir" -p1 -s -i "$patchfile" || exit 1
|
|
done
|
|
|
|
exit 0
|
|
|