Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Apr 2020 09:50:29 +0000 (UTC)
From:      Guido Falsi <madpilot@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r532013 - in head/net/asterisk16: . files
Message-ID:  <202004180950.03I9oTDW008374@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: madpilot
Date: Sat Apr 18 09:50:28 2020
New Revision: 532013
URL: https://svnweb.freebsd.org/changeset/ports/532013

Log:
  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

Added:
  head/net/asterisk16/files/patch-third-party_pjproject_Makefile   (contents, props changed)
  head/net/asterisk16/files/patch-third-party_pjproject_Makefile.rules   (contents, props changed)
Modified:
  head/net/asterisk16/Makefile
  head/net/asterisk16/distinfo
  head/net/asterisk16/pkg-plist

Modified: head/net/asterisk16/Makefile
==============================================================================
--- head/net/asterisk16/Makefile	Sat Apr 18 09:49:54 2020	(r532012)
+++ head/net/asterisk16/Makefile	Sat Apr 18 09:50:28 2020	(r532013)
@@ -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:83e1b458c77e0e287a
 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
@@ -206,14 +210,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>
 

Modified: head/net/asterisk16/distinfo
==============================================================================
--- head/net/asterisk16/distinfo	Sat Apr 18 09:49:54 2020	(r532012)
+++ head/net/asterisk16/distinfo	Sat Apr 18 09:50:28 2020	(r532013)
@@ -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

Added: head/net/asterisk16/files/patch-third-party_pjproject_Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/asterisk16/files/patch-third-party_pjproject_Makefile	Sat Apr 18 09:50:28 2020	(r532013)
@@ -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 $@

Added: head/net/asterisk16/files/patch-third-party_pjproject_Makefile.rules
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/asterisk16/files/patch-third-party_pjproject_Makefile.rules	Sat Apr 18 09:50:28 2020	(r532013)
@@ -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

Modified: head/net/asterisk16/pkg-plist
==============================================================================
--- head/net/asterisk16/pkg-plist	Sat Apr 18 09:49:54 2020	(r532012)
+++ head/net/asterisk16/pkg-plist	Sat Apr 18 09:50:28 2020	(r532013)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004180950.03I9oTDW008374>