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
This commit is contained in:
George Joseph
2016-04-30 16:52:47 -06:00
parent 9c4c4a7d0d
commit e61716b774
9 changed files with 102 additions and 29 deletions

View File

@@ -29,13 +29,15 @@ PACKAGES_DEBIAN="$PACKAGES_DEBIAN libopenh323-dev libvpb-dev libgtk2.0-dev libmy
PACKAGES_DEBIAN="$PACKAGES_DEBIAN libsnmp-dev libiksemel-dev libcorosync-dev libnewt-dev libpopt-dev libical-dev libspandsp-dev libjack-dev"
PACKAGES_DEBIAN="$PACKAGES_DEBIAN libresample-dev libc-client-dev binutils-dev libsrtp-dev libgsm1-dev libedit-dev doxygen libjansson-dev libldap-dev"
PACKAGES_DEBIAN="$PACKAGES_DEBIAN subversion git libxslt1-dev automake libsrtp-dev libncurses5-dev python-dev"
PACKAGES_RH="automake gcc gcc-c++ ncurses-devel openssl-devel libxml2-devel unixODBC-devel libcurl-devel libogg-devel libvorbis-devel speex-devel"
PACKAGES_RH="automake bzip2 gcc gcc-c++ patch ncurses-devel openssl-devel libxml2-devel unixODBC-devel libcurl-devel libogg-devel libvorbis-devel speex-devel"
PACKAGES_RH="$PACKAGES_RH spandsp-devel freetds-devel net-snmp-devel iksemel-devel corosynclib-devel newt-devel popt-devel libtool-ltdl-devel lua-devel"
PACKAGES_RH="$PACKAGES_RH sqlite-devel libsqlite3x-devel radiusclient-ng-devel portaudio-devel postgresql-devel libresample-devel neon-devel libical-devel"
PACKAGES_RH="$PACKAGES_RH openldap-devel gmime22-devel sqlite2-devel mysql-devel bluez-libs-devel jack-audio-connection-kit-devel gsm-devel libedit-devel libuuid-devel"
PACKAGES_RH="$PACKAGES_RH jansson-devel libsrtp-devel pjproject-devel subversion git libxslt-devel python-devel"
PACKAGES_OBSD="popt gmake wget libxml libogg libvorbis curl iksemel spandsp speex iodbc freetds-0.63p1-msdblib mysql-client gmime sqlite sqlite3 jack libxslt"
PACKAGES_FBSD="autoconf gcc binutils popt gmake wget libxml2 libogg libvorbis curl iksemel spandsp speex unixODBC freetds-devel mysql55-client gmime2 sqlite"
PACKAGES_FBSD="$PACKAGES_FBSD sqlite3 libxslt jansson e2fsprogs-libuuid gsm libsrtp libsamplerate"
KVERS=`uname -r`
@@ -95,23 +97,45 @@ check_installed_pkgs() {
done
}
check_installed_fpkgs() {
for pack in "$@"
do
if [ `pkg info -a | grep $pack | wc -l` = 0 ]; then
echo $pack
fi
done
}
handle_debian() {
if ! [ -x "$(command -v aptitude)" ]; then
apt-get install aptitude
fi
extra_packs=`check_installed_debs $PACKAGES_DEBIAN`
$testcmd aptitude update
$testcmd aptitude install -y $extra_packs
if [ x"$extra_packs" != "x" ] ; then
$testcmd aptitude install -y $extra_packs
fi
}
handle_rh() {
extra_packs=`check_installed_rpms $PACKAGES_RH`
$testcmd yum install -y $extra_packs
if [ x"$extra_packs" != "x" ] ; then
$testcmd yum install -y $extra_packs
fi
}
handle_obsd() {
extra_packs=`check_installed_pkgs $PACKAGES_OBSD`
$testcmd pkg_add $extra_packs
if [ x"$extra_packs" != "x" ] ; then
$testcmd pkg_add $extra_packs
fi
}
handle_fbsd() {
extra_packs=`check_installed_fpkgs $PACKAGES_FBSD`
if [ x"$extra_packs" != "x" ] ; then
$testcmd pkg install -y $extra_packs
fi
}
install_unpackaged() {
@@ -188,7 +212,7 @@ OS=`uname -s`
unsupported_distro=''
# A number of distributions we don't (yet?) support.
if [ "$OS" != 'Linux' -a "$OS" != 'OpenBSD' ]; then
if [ "$OS" != 'Linux' -a "$OS" != 'OpenBSD' -a "$OS" != 'FreeBSD' ]; then
echo >&2 "$0: Your OS ($OS) is currently not supported. Aborting."
exit 1
fi
@@ -221,6 +245,8 @@ elif [ -r /etc/redhat-release ]; then
handle_rh
elif [ "$OS" = 'OpenBSD' ]; then
handle_obsd
elif [ "$OS" = 'FreeBSD' ]; then
handle_fbsd
fi
if ! in_test_mode; then