diff options
author | George Joseph <gjoseph@digium.com> | 2016-04-30 16:52:47 -0600 |
---|---|---|
committer | George Joseph <gjoseph@digium.com> | 2016-05-03 06:54:29 -0600 |
commit | f39089f17cc3df6f795914d664c5ddbe41027498 (patch) | |
tree | f73392efbce6ae58f4836f115ee699564e8cdbd4 /third-party | |
parent | 69ced86c6c1847e5c4b683e35ccd407f3eff594a (diff) |
pjproject_bundled: Various fixes discovered during testing of OSes
For all OSes:
* Disabled third-party codecs in pjproject and added
'--disable-speex-codec --disable-speex-aec --disable-gsm-codec' to the
configure options since we don't use the pjsip codec capability.
FreeBSD:
* Added FreeBSD support to install_prereq.
* Changed pjproject/configure.m4 to use $GNU_MAKE instead of hardcoding "make".
* Added __progname and environ to asterisk.exports.in.
* Reverted the use of ldconfig to create shared library symlinks to ln.
* Only enable epoll in pjproject if `uname -s` is Linux.
* Added a patch to pjproject to take the name of the 'make' command from
an environment variable if supplied. This is needed for the python bindings.
(merged by Teluu into pjproject trunk 5/3/2016)
FreeBSD support isn't complete. Still some general issues regarding
make/gmake having nothing to do with pjproject. With some handholding it DOES
build successfully.
CentOS:
Added 'patch' and 'bzip2' to install_prereq PACKAGES_RH.
CentOS 6/7 32/64 build and run the pjsip testsuite successfully.
Ubuntu:
No changes required.
Ubuntu 15/16 32/64 build and run the pjsip testsuite successfully.
Debian:
No changes required.
Debian 6/7/8 32/64 build and run the pjsip testsuite successfully.
There will utimately be a follow-up patch to create an install_prereq for
the testsuite as I've discovered a few missing requirements.
ASTERISK-25968 #close
Change-Id: I5756a07facfc63798115a5e73a8709382fe9259c
Diffstat (limited to 'third-party')
-rw-r--r-- | third-party/pjproject/Makefile | 3 | ||||
-rw-r--r-- | third-party/pjproject/Makefile.rules | 11 | ||||
-rwxr-xr-x | third-party/pjproject/apply_patches | 4 | ||||
-rw-r--r-- | third-party/pjproject/configure.m4 | 6 | ||||
-rw-r--r-- | third-party/pjproject/patches/0001-pjsip-apps-src-python-setup.py-Take-make-from-the-en.patch | 51 |
5 files changed, 64 insertions, 11 deletions
diff --git a/third-party/pjproject/Makefile b/third-party/pjproject/Makefile index 5810a65dc..7fa3902ba 100644 --- a/third-party/pjproject/Makefile +++ b/third-party/pjproject/Makefile @@ -115,8 +115,7 @@ source/pjsip-apps/bin/pjsua-$(TARGET_NAME): source/pjlib/lib/libpj-$(TARGET_NAME source/pjsip-apps/src/python/build/_pjsua.so: source/pjlib/lib/libpj-$(TARGET_NAME).a $(ECHO_PREFIX) Compiling python bindings - $(CMD_PREFIX) (cd source/pjsip-apps/src/python ; python setup.py build --build-platlib=./build $(REALLY_QUIET)) - + $(CMD_PREFIX) (cd source/pjsip-apps/src/python ; MAKE=$(MAKE) python setup.py build --build-platlib=./build $(REALLY_QUIET)) _all: pjproject.symbols source/pjsip-apps/bin/pjsua-$(TARGET_NAME) source/pjsip-apps/src/python/build/_pjsua.so diff --git a/third-party/pjproject/Makefile.rules b/third-party/pjproject/Makefile.rules index 062793f12..6b51c2f2a 100644 --- a/third-party/pjproject/Makefile.rules +++ b/third-party/pjproject/Makefile.rules @@ -1,7 +1,10 @@ PJPROJECT_URL = http://www.pjsip.org/release/$(PJPROJECT_VERSION) # Even though we're not installing pjproject, we're setting prefix to /opt/pjproject to be safe -PJPROJECT_CONFIG_OPTS = --prefix=/opt/pjproject --with-external-speex --with-external-gsm --with-external-srtp \ - --disable-video --disable-v4l2 --disable-sound --disable-opencore-amr --disable-ilbc-codec \ - --without-libyuv --disable-g7221-codec \ - --enable-epoll +PJPROJECT_CONFIG_OPTS = --prefix=/opt/pjproject --disable-speex-codec --disable-speex-aec \ + --disable-gsm-codec --disable-video --disable-v4l2 --disable-sound --disable-opencore-amr \ + --disable-ilbc-codec --without-libyuv --disable-g7221-codec + +ifeq ($(shell uname -s),Linux) + PJPROJECT_CONFIG_OPTS += --enable-epoll +endif diff --git a/third-party/pjproject/apply_patches b/third-party/pjproject/apply_patches index 1b72d14b0..5dfdd2a3c 100755 --- a/third-party/pjproject/apply_patches +++ b/third-party/pjproject/apply_patches @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh if [ "$1" = "-q" ] ; then quiet=1 @@ -27,7 +27,7 @@ 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 diff --git a/third-party/pjproject/configure.m4 b/third-party/pjproject/configure.m4 index 743222774..2cc18bfa8 100644 --- a/third-party/pjproject/configure.m4 +++ b/third-party/pjproject/configure.m4 @@ -21,14 +21,14 @@ AC_DEFUN([PJPROJECT_CONFIGURE], [ AC_MSG_CHECKING(for embedded pjproject (may have to download)) AC_MSG_RESULT(configuring) - make --quiet --no-print-directory -C $1 configure + ${GNU_MAKE} --quiet --no-print-directory -C $1 configure if test $? -ne 0 ; then AC_MSG_RESULT(failed) AC_MSG_NOTICE(Unable to configure $1) - AC_MSG_ERROR(Run "make -C $1 NOISY_BUILD=yes configure" to see error details.) + AC_MSG_ERROR(Run "${GNU_MAKE} -C $1 NOISY_BUILD=yes configure" to see error details.) fi - PJPROJECT_INCLUDE=$(make --quiet --no-print-directory -C $1 echo_cflags) + PJPROJECT_INCLUDE=$(${GNU_MAKE} --quiet --no-print-directory -C $1 echo_cflags) PJPROJECT_CFLAGS="$PJPROJECT_INCLUDE" PBX_PJPROJECT=1 PJPROJECT_BUNDLED=yes diff --git a/third-party/pjproject/patches/0001-pjsip-apps-src-python-setup.py-Take-make-from-the-en.patch b/third-party/pjproject/patches/0001-pjsip-apps-src-python-setup.py-Take-make-from-the-en.patch new file mode 100644 index 000000000..80f8bc0b3 --- /dev/null +++ b/third-party/pjproject/patches/0001-pjsip-apps-src-python-setup.py-Take-make-from-the-en.patch @@ -0,0 +1,51 @@ +From 61668b8fcaa0f2a8a05100097284c0c427600033 Mon Sep 17 00:00:00 2001 +From: George Joseph <george.joseph@fairview5.com> +Date: Mon, 2 May 2016 17:08:15 -0600 +Subject: [PATCH] pjsip-apps/src/python/setup.py: Take "make" from the + environment + +With "make" hard coded in setup.py, it chokes on FreeBSD because the system +make command isn't GNU compatibile. This patch allows setup.py to take the +name of the make command from the MAKE environment variable if it exists. +If it doesn't, it defaults to "make". +--- + pjsip-apps/src/python/setup.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/pjsip-apps/src/python/setup.py b/pjsip-apps/src/python/setup.py +index 69a9859..ea1427d 100644 +--- a/pjsip-apps/src/python/setup.py ++++ b/pjsip-apps/src/python/setup.py +@@ -60,25 +60,25 @@ if pj_version_suffix: + pj_version += "-" + pj_version_suffix + + #print 'PJ_VERSION = "'+ pj_version + '"' +- ++MAKE = os.environ.get('MAKE') or "make" + + # Fill in pj_inc_dirs + pj_inc_dirs = [] +-f = os.popen("make -f helper.mak inc_dir") ++f = os.popen("%s -f helper.mak inc_dir" % MAKE) + for line in f: + pj_inc_dirs.append(line.rstrip("\r\n")) + f.close() + + # Fill in pj_lib_dirs + pj_lib_dirs = [] +-f = os.popen("make -f helper.mak lib_dir") ++f = os.popen("%s -f helper.mak lib_dir" % MAKE) + for line in f: + pj_lib_dirs.append(line.rstrip("\r\n")) + f.close() + + # Fill in pj_libs + pj_libs = [] +-f = os.popen("make -f helper.mak libs") ++f = os.popen("%s -f helper.mak libs" % MAKE) + for line in f: + pj_libs.append(line.rstrip("\r\n")) + f.close() +-- +2.5.5 + |