From 21683445369f024f0fdcaf182e2bdb0e0c3577f9 Mon Sep 17 00:00:00 2001 From: Chris Brannon Date: Mon, 13 Feb 2017 16:13:59 -0800 Subject: [PATCH] pjproject: update to 2.6. (#5699) --- srcpkgs/pjproject/patches/libressl.patch | 38 ++++++++++++++++++++++++ srcpkgs/pjproject/template | 23 +++++++------- 2 files changed, 49 insertions(+), 12 deletions(-) create mode 100644 srcpkgs/pjproject/patches/libressl.patch diff --git a/srcpkgs/pjproject/patches/libressl.patch b/srcpkgs/pjproject/patches/libressl.patch new file mode 100644 index 00000000000..00970092ec4 --- /dev/null +++ b/srcpkgs/pjproject/patches/libressl.patch @@ -0,0 +1,38 @@ +--- pjlib/src/pj/ssl_sock_ossl.c.orig 2017-02-08 18:48:12.031664919 -0800 ++++ pjlib/src/pj/ssl_sock_ossl.c 2017-02-08 18:50:04.302064334 -0800 +@@ -112,7 +112,7 @@ + #endif + + +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + # define OPENSSL_NO_SSL2 /* seems to be removed in 1.1.0 */ + # define M_ASN1_STRING_data(x) ASN1_STRING_get0_data(x) + # define M_ASN1_STRING_length(x) ASN1_STRING_length(x) +@@ -452,7 +452,7 @@ + + SSL_set_session(ssl, SSL_SESSION_new()); + +-#if !defined(OPENSSL_NO_EC) && OPENSSL_VERSION_NUMBER >= 0x1000200fL ++#if !defined(OPENSSL_NO_EC) && OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined(LIBRESSL_VERSION_NUMBER) + openssl_curves_num = SSL_get_shared_curve(ssl,-1); + if (openssl_curves_num > PJ_ARRAY_SIZE(openssl_curves)) + openssl_curves_num = PJ_ARRAY_SIZE(openssl_curves); +@@ -1069,7 +1069,7 @@ + + static pj_status_t set_curves_list(pj_ssl_sock_t *ssock) + { +-#if !defined(OPENSSL_NO_EC) && OPENSSL_VERSION_NUMBER >= 0x1000200fL ++#if !defined(OPENSSL_NO_EC) && OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined(LIBRESSL_VERSION_NUMBER) + int ret; + int curves[PJ_SSL_SOCK_MAX_CURVES]; + unsigned cnt; +@@ -1100,7 +1100,7 @@ + + static pj_status_t set_sigalgs(pj_ssl_sock_t *ssock) + { +-#if OPENSSL_VERSION_NUMBER >= 0x1000200fL ++#if OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined(LIBRESSL_VERSION_NUMBER) + int ret; + + if (ssock->param.sigalgs.ptr && ssock->param.sigalgs.slen) { diff --git a/srcpkgs/pjproject/template b/srcpkgs/pjproject/template index 2cacbf0a04e..7fc87356081 100644 --- a/srcpkgs/pjproject/template +++ b/srcpkgs/pjproject/template @@ -2,18 +2,20 @@ # no-third-party.patch comes from Alpine, # and this template is heavily based on Alpine's APKBUILD. pkgname=pjproject -version=2.5.5 -revision=2 +version=2.6 +revision=1 +disable_parallel_build=yes build_style=gnu-configure configure_args="--enable-shared \ --enable-libsamplerate \ --with-external-speex \ --with-external-gsm \ --with-external-srtp \ - --disable-libyuv" - # Disable libyuv for now. Seems to be optional. - # We don't have this packaged separately for Void, and I don't - # want pjproject including its own libyuv.so in the build. + --disable-libyuv --disable-libwebrtc" +# Disable libyuv and webrtc echo cancelation. Optional. We don't have +# libyuv packaged for Void. Thought I could be smart and use +# webrtc-audio-processing, but it doesn't have what I need. Using the +# bundled versions would also pollute build with libyuv and libwebrtc (yuck). makedepends="libressl-devel alsa-lib-devel libgsm-devel speex-devel speexdsp-devel libsrtp-devel libsamplerate-devel" short_desc="Open source SIP and media stack" @@ -21,9 +23,10 @@ maintainer="Christopher Brannon " license="GPL-2" homepage="http://www.pjsip.org/pjsua.htm" distfiles="http://www.pjsip.org/release/${version}/${pkgname}-${version}.tar.bz2" -checksum=ab39207b761d3485199cd881410afeb2d171dff7c2bf75e8caae91c6dca508f3 +checksum=2f5a1da1c174d845871c758bd80fbb580fca7799d3cfaa0d3c4e082b5161c7b4 pre_configure() { + export LD="${CC}" # Remove target name from lib names sed -i -e 's/-$(TARGET_NAME)//g' \ -e 's/= $(TARGET_NAME).a/= .a/g' \ @@ -42,11 +45,7 @@ pre_configure() { # Use libsamplerate instead of bundled resample sed -i -e "s/resample//" third_party/build/Makefile sed -i -e "s#../../third_party/libsamplerate/src/samplerate.h#samplerate.h#" pjmedia/src/pjmedia/resample_libsamplerate.c -} - -do_build() { - make dep LD=$CC - make -j1 LD=$CC + echo "#define PJ_HAS_IPV6 1" >> "pjlib/include/pj/config_site.h" } post_install() {