diff options
author | Guido Falsi <madpilot@FreeBSD.org> | 2020-04-18 09:50:28 +0000 |
---|---|---|
committer | Guido Falsi <madpilot@FreeBSD.org> | 2020-04-18 09:50:28 +0000 |
commit | c26aff92502fe0275e1e14bc5e1dd85f9bd94c02 (patch) | |
tree | 2b75c1fdeaafa7475e39f41cca34d8b75439c4ed /net/asterisk16 | |
parent | 1a9a0228e2b2877e54b8dc57d529a9403ccae489 (diff) | |
download | ports-c26aff92502fe0275e1e14bc5e1dd85f9bd94c02.tar.gz ports-c26aff92502fe0275e1e14bc5e1dd85f9bd94c02.zip |
Make asterisk16 port use the bundled pjproject(pjsip) library, as
suggested by upstream.
Force the bundled pjproject to use external srtp library provided
by ports to ensure it and asterisk itself link to the same library.
This decouples asterisk from the pjsip port, allowing it to be
upsdaated without breaking asterisk. [1]
PR: 245607 [1]
Submitted by: yuri
Notes
Notes:
svn path=/head/; revision=532013
Diffstat (limited to 'net/asterisk16')
-rw-r--r-- | net/asterisk16/Makefile | 26 | ||||
-rw-r--r-- | net/asterisk16/distinfo | 4 | ||||
-rw-r--r-- | net/asterisk16/files/patch-third-party_pjproject_Makefile | 11 | ||||
-rw-r--r-- | net/asterisk16/files/patch-third-party_pjproject_Makefile.rules | 11 | ||||
-rw-r--r-- | net/asterisk16/pkg-plist | 3 |
5 files changed, 39 insertions, 16 deletions
diff --git a/net/asterisk16/Makefile b/net/asterisk16/Makefile index f7ce60704a81..aa032191ba2b 100644 --- a/net/asterisk16/Makefile +++ b/net/asterisk16/Makefile @@ -2,13 +2,16 @@ PORTNAME= asterisk PORTVERSION= 16.9.0 +PORTREVISION= 1 CATEGORIES= net -MASTER_SITES= https://downloads.asterisk.org/pub/telephony/%SUBDIR%/:DEFAULT,g729 +MASTER_SITES= https://downloads.asterisk.org/pub/telephony/%SUBDIR%/:DEFAULT,g729 \ + http://www.pjsip.org/release/${PJSIP_VERSION}/:PJSIP MASTER_SITE_SUBDIR= asterisk/ \ asterisk/old-releases/ \ sounds/releases/:g729 PKGNAMESUFFIX= 16 -DISTFILES= ${DISTNAME}${EXTRACT_SUFX} +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ + pjproject-${PJSIP_VERSION}.tar.bz2:PJSIP DIST_SUBDIR= ${PORTNAME} MAINTAINER= madpilot@FreeBSD.org @@ -26,18 +29,18 @@ EXTRACT_ONLY:= ${DISTNAME}${EXTRACT_SUFX} USES= bison compiler:c11 cpe gmake gnome iconv libedit localbase \ shebangfix sqlite ssl ncurses -USE_CSTD= gnu89 USE_GNOME= libxml2 USE_LDCONFIG= yes USE_RC_SUBR= asterisk USE_GITHUB= nodefault +PJSIP_VERSION= 2.9 GNU_CONFIGURE= yes CONFIGURE_ARGS= --datarootdir=${DATADIR} \ --with-ilbc=internal \ --with-crypto=${OPENSSLBASE} \ - --with-pjproject-bundled=no \ - --with-ssl=${OPENSSLBASE} + --with-ssl=${OPENSSLBASE} \ + --with-externals-cache=${DISTDIR}/${DIST_SUBDIR} CPE_VENDOR= digium @@ -163,9 +166,10 @@ OPUS_GH_TUPLE= traud:asterisk-opus:83e1b458c77e0e287adeca494eeb79edb077b0ff:opu PGSQL_CONFIGURE_WITH= postgres PGSQL_USES= pgsql -PJSIP_CONFIGURE_WITH= pjproject +PJSIP_CONFIGURE_WITH= pjproject pjproject-bundled PJSIP_USES= pkgconfig -PJSIP_LIB_DEPENDS= libspeex.so:audio/speex \ +PJSIP_LIB_DEPENDS= libsrtp2.so:net/libsrtp2 \ + libspeex.so:audio/speex \ libspeexdsp.so:audio/speexdsp PORTAUDIO_CONFIGURE_WITH= portaudio @@ -207,14 +211,6 @@ ASTERISK_GROUP?= asterisk USERS= ${ASTERISK_USER} GROUPS= ${ASTERISK_GROUP} dahdi -.include <bsd.port.options.mk> - -.if ${PORT_OPTIONS:MPJSIP} && ${PORT_OPTIONS:MSRTP} -LIB_DEPENDS+= libpj.so:net/pjsip-extsrtp -.elif ${PORT_OPTIONS:MPJSIP} && ! ${PORT_OPTIONS:MSRTP} -LIB_DEPENDS+= libpj.so:net/pjsip -.endif - .include <bsd.port.pre.mk> .if empty(ICONV_LIB) diff --git a/net/asterisk16/distinfo b/net/asterisk16/distinfo index d9d8871c2da6..cd10bd296555 100644 --- a/net/asterisk16/distinfo +++ b/net/asterisk16/distinfo @@ -1,9 +1,11 @@ -TIMESTAMP = 1584043543 +TIMESTAMP = 1586803682 SHA256 (asterisk/asterisk-16.9.0.tar.gz) = 723441daf477db2468baeb0981522c9f2361e9b73493aeed4a247046abec123a SIZE (asterisk/asterisk-16.9.0.tar.gz) = 27674324 SHA256 (asterisk/asterisk-core-sounds-en-g729-1.5.tar.gz) = 8b28a59cfa53b59c76e0a191704f0708e3d83acffab8c5e6f25dfc599f0123f9 SIZE (asterisk/asterisk-core-sounds-en-g729-1.5.tar.gz) = 1551123 SHA256 (asterisk/asterisk-moh-opsound-g729-2.03.tar.gz) = 0147ca9a97f0c550227aacb7793499057c4d2c64e021c95f93722f27d5549585 SIZE (asterisk/asterisk-moh-opsound-g729-2.03.tar.gz) = 1103000 +SHA256 (asterisk/pjproject-2.9.tar.bz2) = d185ef7855c8ec07191dde92f54b65a7a4b7a6f7bf8c46f7af35ceeb1da2a636 +SIZE (asterisk/pjproject-2.9.tar.bz2) = 5009546 SHA256 (asterisk/traud-asterisk-opus-83e1b458c77e0e287adeca494eeb79edb077b0ff_GH0.tar.gz) = 572a3c956371ed62b44a4bcd973db10eb4c84f3040cf7156e3acfad3b6bf3ded SIZE (asterisk/traud-asterisk-opus-83e1b458c77e0e287adeca494eeb79edb077b0ff_GH0.tar.gz) = 24044 diff --git a/net/asterisk16/files/patch-third-party_pjproject_Makefile b/net/asterisk16/files/patch-third-party_pjproject_Makefile new file mode 100644 index 000000000000..b86d313cb028 --- /dev/null +++ b/net/asterisk16/files/patch-third-party_pjproject_Makefile @@ -0,0 +1,11 @@ +--- third-party/pjproject/Makefile.orig 2020-03-12 14:44:05 UTC ++++ third-party/pjproject/Makefile +@@ -155,7 +155,7 @@ $(PJSIP_LIB_FILES): $(PJLIB_UTIL_LIB_FILES) + + pjproject.symbols: $(ALL_LIB_FILES) + $(ECHO_PREFIX) Generating symbols +- $(CMD_PREFIX) $(NM) -Pog $(ALL_LIB_FILES) | $(SED) -n -r -e "s/.+: ([pP][jJ][^ ]+) .+/\1/gp" | sort -u > pjproject.symbols ++ $(CMD_PREFIX) $(NM) -Pog $(ALL_LIB_FILES) | $(SED) -n -r -e "s/^([pP][jJ][^ ]+) .+/\1/gp" | sort -u > pjproject.symbols + + source/pjsip-apps/src/asterisk_malloc_debug.c: patches/asterisk_malloc_debug.c + $(ECHO_PREFIX) Copying $< to $@ diff --git a/net/asterisk16/files/patch-third-party_pjproject_Makefile.rules b/net/asterisk16/files/patch-third-party_pjproject_Makefile.rules new file mode 100644 index 000000000000..0be34a5dce36 --- /dev/null +++ b/net/asterisk16/files/patch-third-party_pjproject_Makefile.rules @@ -0,0 +1,11 @@ +--- third-party/pjproject/Makefile.rules.orig 2020-03-12 14:44:05 UTC ++++ third-party/pjproject/Makefile.rules +@@ -37,7 +37,7 @@ PJPROJECT_CONFIG_OPTS = $(PJPROJECT_CONFIGURE_OPTS) -- + --disable-ipp \ + --disable-libwebrtc \ + --without-external-pa \ +- --without-external-srtp ++ --with-external-srtp + + ifneq ($(AST_DEVMODE),yes) + PJPROJECT_CONFIG_OPTS += --disable-resample --disable-g711-codec diff --git a/net/asterisk16/pkg-plist b/net/asterisk16/pkg-plist index b37c55165a65..d79ff0b64025 100644 --- a/net/asterisk16/pkg-plist +++ b/net/asterisk16/pkg-plist @@ -332,6 +332,8 @@ include/asterisk/version.h include/asterisk/xml.h include/asterisk/xmldoc.h include/asterisk/xmpp.h +%%PJSIP%%lib/libasteriskpj.so +%%PJSIP%%lib/libasteriskpj.so.2 lib/libasteriskssl.so lib/libasteriskssl.so.1 man/man8/astdb2bdb.8.gz @@ -394,6 +396,7 @@ sbin/safe_asterisk @dir %%DATADIR%%/moh @dir %%DATADIR%%/sounds @dir %%DATADIR%%/third-party +%%PJSIP%%@dir %%DATADIR%%/third-party/pjproject @owner %%ASTERISK_USER%% @group %%ASTERISK_GROUP%% @dir %%VARDIR%%/log/asterisk/cdr-csv |