summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild_tools/list_valid_installed_externals2
-rwxr-xr-xconfigure50
-rw-r--r--configure.ac1
-rw-r--r--makeopts.in1
-rw-r--r--third-party/Makefile.rules2
-rw-r--r--third-party/pjproject/Makefile13
-rwxr-xr-xthird-party/pjproject/apply_patches3
-rw-r--r--third-party/pjproject/configure.m48
8 files changed, 68 insertions, 12 deletions
diff --git a/build_tools/list_valid_installed_externals b/build_tools/list_valid_installed_externals
index ed362743c..c37102208 100755
--- a/build_tools/list_valid_installed_externals
+++ b/build_tools/list_valid_installed_externals
@@ -6,7 +6,7 @@ fi
set -e
ASTTOPDIR=${ASTTOPDIR:-.}
-export make=`sed -n -r -e "s/^MAKE\s*=\s*//gp" ${ASTTOPDIR}/makeopts`
+export make=`sed -n -e "s/^MAKE\s*=\s*//gp" ${ASTTOPDIR}/makeopts`
getvar() {
$make --quiet --no-print-directory -f- <<EOF
diff --git a/configure b/configure
index f64883be1..8c13476e5 100755
--- a/configure
+++ b/configure
@@ -1249,6 +1249,7 @@ COMPRESS
FIND
PYTHON
FLEX
+CUT
CAT
CMP
BISON
@@ -6826,6 +6827,47 @@ $as_echo "no" >&6; }
fi
+# Extract the first word of "cut", so it can be a program name with args.
+set dummy cut; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_CUT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $CUT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_CUT" && ac_cv_path_CUT=":"
+ ;;
+esac
+fi
+CUT=$ac_cv_path_CUT
+if test -n "$CUT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
+$as_echo "$CUT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -9304,6 +9346,12 @@ $as_echo "configuring" >&6; }
if test "${CAT}" = ":" ; then
as_fn_error $? "cat is required to build bundled pjproject" "$LINENO" 5
fi
+ if test "${CUT}" = ":" ; then
+ as_fn_error $? "cut is required to build bundled pjproject" "$LINENO" 5
+ fi
+ if test "${GREP}" = ":" ; then
+ as_fn_error $? "grep is required to build bundled pjproject" "$LINENO" 5
+ fi
this_host=$(./config.sub $(./config.guess))
@@ -9314,7 +9362,7 @@ $as_echo "configuring" >&6; }
PJPROJECT_CONFIGURE_OPTS+=" --host=$host"
fi
- export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT
+ export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT CUT GREP
export NOISY_BUILD
${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} \
PJPROJECT_CONFIGURE_OPTS="$PJPROJECT_CONFIGURE_OPTS" \
diff --git a/configure.ac b/configure.ac
index 30ff4ac31..8f164a297 100644
--- a/configure.ac
+++ b/configure.ac
@@ -265,6 +265,7 @@ AC_SUBST(GNU_LD)
AC_PATH_PROG([BISON], [bison], :)
AC_PATH_PROG([CMP], [cmp], :)
AC_PATH_PROG([CAT], [cat], :)
+AC_PATH_PROG([CUT], [cut], :)
AC_PATH_PROG([FLEX], [flex], :)
AC_PATH_PROG([GREP], [grep], :)
AC_PATH_PROG([PYTHON], [python], :)
diff --git a/makeopts.in b/makeopts.in
index b79df04c3..45eada26b 100644
--- a/makeopts.in
+++ b/makeopts.in
@@ -49,6 +49,7 @@ PATCH=@PATCH@
SED=@SED@
NM=@NM@
CAT=@CAT@
+CUT=@CUT@
BUILD_PLATFORM=@BUILD_PLATFORM@
BUILD_CPU=@BUILD_CPU@
diff --git a/third-party/Makefile.rules b/third-party/Makefile.rules
index f8b72ba6d..8306869f9 100644
--- a/third-party/Makefile.rules
+++ b/third-party/Makefile.rules
@@ -28,6 +28,8 @@ export SED
export NM
export MD5
export CAT
+export CUT
+export GREP
export DOWNLOAD
export DOWNLOAD_TO_STDOUT
export DOWNLOAD_TIMEOUT
diff --git a/third-party/pjproject/Makefile b/third-party/pjproject/Makefile
index 7a42edcde..6ebd685b2 100644
--- a/third-party/pjproject/Makefile
+++ b/third-party/pjproject/Makefile
@@ -93,9 +93,9 @@ endef
define verify_tarball
($(SHELL_ECHO_PREFIX) Verifying $(TARBALL) &&\
- tarball_sum=$$($(CAT) $(TARBALL) | $(MD5) | $(SED) -n -r -e "s/^([^ ]+)\s+.*/\1/gp") ;\
- required_sum=$$($(SED) -n -r -e "s/^([^ ]+)\s+$(TARBALL_FILE)/\1/gp" $(PJMD5SUM)) ;\
- if [ "$$tarball_sum" != "$$required_sum" ] ; then $(SHELL_ECHO_PREFIX) Verify failed ; exit 1 ;\
+ tarball_sum=$$($(CAT) $(TARBALL) | $(MD5) | $(CUT) -d' ' -f1) ;\
+ required_sum=$$($(GREP) -e $(TARBALL_FILE) $(PJMD5SUM) | $(CUT) -d' ' -f1) ;\
+ if [ -z "$$required_sum" -o "$$tarball_sum" != "$$required_sum" ] ; then $(SHELL_ECHO_PREFIX) Verify failed ; exit 1 ;\
else $(SHELL_ECHO_PREFIX) Verify successful ; exit 0 ; fi; )
endef
@@ -127,8 +127,8 @@ source/.unpacked: $(DOWNLOAD_DIR)/pjproject-$(PJPROJECT_VERSION).tar.bz2
-@rm -rf source pjproject-* >/dev/null 2>&1
$(CMD_PREFIX) $(TAR) -xjf $<
@mv pjproject-$(PJPROJECT_VERSION) source
- $(ECHO_PREFIX) Applying patches
- $(CMD_PREFIX) ./apply_patches $(QUIET_CONFIGURE) patches source
+ $(ECHO_PREFIX) Applying patches "$(realpath patches)" "$(realpath .)/source"
+ $(CMD_PREFIX) ./apply_patches $(QUIET_CONFIGURE) "$(realpath patches)" "$(realpath .)/source"
-@touch source/.unpacked
source/version.mak: source/.unpacked
@@ -150,7 +150,8 @@ source/build.mak: Makefile.rules source/version.mak source/user.mak $(addprefix
$(CMD_PREFIX) (cd source ; ./aconfigure $(QUIET_CONFIGURE) $(PJPROJECT_CONFIG_OPTS))
build.mak: source/build.mak
- $(CMD_PREFIX) $(SED) -r -e "/prefix|export PJ_SHARED_LIBRARIES|MACHINE_NAME|OS_NAME|HOST_NAME|CC_NAME|CROSS_COMPILE|LINUX_POLL/d" source/build.mak > build.mak
+ $(CMD_PREFIX) $(GREP) -v -e prefix -e "export PJ_SHARED_LIBRARIES" -e MACHINE_NAME \
+ -e OS_NAME -e HOST_NAME -e CC_NAME -e CROSS_COMPILE -e LINUX_POLL $< > $@
configure: source/build.mak
diff --git a/third-party/pjproject/apply_patches b/third-party/pjproject/apply_patches
index 5f9fde283..134bd306f 100755
--- a/third-party/pjproject/apply_patches
+++ b/third-party/pjproject/apply_patches
@@ -10,9 +10,6 @@ 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
diff --git a/third-party/pjproject/configure.m4 b/third-party/pjproject/configure.m4
index 2d3353476..73887041c 100644
--- a/third-party/pjproject/configure.m4
+++ b/third-party/pjproject/configure.m4
@@ -39,6 +39,12 @@ AC_DEFUN([_PJPROJECT_CONFIGURE],
if test "${CAT}" = ":" ; then
AC_MSG_ERROR(cat is required to build bundled pjproject)
fi
+ if test "${CUT}" = ":" ; then
+ AC_MSG_ERROR(cut is required to build bundled pjproject)
+ fi
+ if test "${GREP}" = ":" ; then
+ AC_MSG_ERROR(grep is required to build bundled pjproject)
+ fi
AC_ARG_VAR([PJPROJECT_CONFIGURE_OPTS],[Additional configure options to pass to bundled pjproject])
this_host=$(./config.sub $(./config.guess))
@@ -49,7 +55,7 @@ AC_DEFUN([_PJPROJECT_CONFIGURE],
PJPROJECT_CONFIGURE_OPTS+=" --host=$host"
fi
- export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT
+ export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT CUT GREP
export NOISY_BUILD
${GNU_MAKE} --quiet --no-print-directory -C ${PJPROJECT_DIR} \
PJPROJECT_CONFIGURE_OPTS="$PJPROJECT_CONFIGURE_OPTS" \