git: 9267d1fb2f64 - main - net/asterisk18: Fix build when textproc/xmlstarlet is installed

From: Guido Falsi <madpilot_at_FreeBSD.org>
Date: Sat, 12 Feb 2022 14:28:11 UTC
The branch main has been updated by madpilot:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9267d1fb2f64b42c306d51453d71cdf4ca5ecf6b

commit 9267d1fb2f64b42c306d51453d71cdf4ca5ecf6b
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2022-02-12 14:26:59 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2022-02-12 14:28:05 +0000

    net/asterisk18: Fix build when textproc/xmlstarlet is installed
    
    Asterisk build system checks for presence of xmlstarlet as "xml"
    binary on the system.
    
    If found it triggers part of the build system trying to download
    some external files during the install phase which even uses a
    command line tool not available on FreeBSD.
    
    Such code is not necessary for the port, as all supported modules
    are downloaded using ports tree provided functionality. Furthermore
    downloading files from the internet is forbidden during the install
    phase.
    
    This patch forces the variable used by the Makefiles to identify
    xmlstarlet presence to be empty. so the code path described above
    is not triggered.
    
    PR:             261884
---
 net/asterisk18/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/asterisk18/Makefile b/net/asterisk18/Makefile
index 6994a0ba002a..87531fafcc95 100644
--- a/net/asterisk18/Makefile
+++ b/net/asterisk18/Makefile
@@ -240,6 +240,7 @@ post-extract-OPUS-on:
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|/var/lib|${PREFIX}/share|g' ${WRKSRC}/configs/samples/musiconhold.conf.sample
+	@${REINPLACE_CMD} -e 's/@XMLSTARLET@//' ${WRKSRC}/makeopts.in
 .if exists(${FILESDIR}/.asterisk.makeopts)
 	${CP} ${FILESDIR}/.asterisk.makeopts ${WRKSRC}/menuselect.makeopts
 .endif