From nobody Tue Aug 30 08:13:02 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MH0Rf4sHRz4Zfsg; Tue, 30 Aug 2022 08:13:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MH0Rf4HkKz3QSk; Tue, 30 Aug 2022 08:13:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661847182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YlU3CvQIU+0KSMVNMUR66W2h4p3uZVBZn/Ixisr/WQI=; b=bn8OSbxMDAocC0t4KKcVPm7LGvIfOh/UoTxRcvkNHAfYYwVVlY7oWTC+qpGtzs+o+PbYW7 aF4mwDT5IIE3oMiDmNfDv0I8pCXB58Jxt6HTjAhZOO1UZXWGEcWPKYjWlU7TVmJW/sbFMG j+p72NRu7HOhq87zDFFj90tmtaGNRvdXJ7jxQi9XRI+VqZ6x0fK6Y1QpL03JgYswYmyg+7 /6F/VVojQcYpbb12prH/A83W25ojd2w+BhOKaA+KUXNTYQQEI1w9C60DjOm2sBsHG1lEO2 lNptp4/DZzvECvD3tozTXRlTyVtIcqh4P9sut/dT0khSTr6urU/mbnk9PyNJLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MH0Rf3LK8zjhS; Tue, 30 Aug 2022 08:13:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27U8D2la041205; Tue, 30 Aug 2022 08:13:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27U8D2FS041204; Tue, 30 Aug 2022 08:13:02 GMT (envelope-from git) Date: Tue, 30 Aug 2022 08:13:02 GMT Message-Id: <202208300813.27U8D2FS041204@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Guido Falsi Subject: git: 103c97c2f57a - main - net/asterisk16: Add red_geolocation support List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: madpilot X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 103c97c2f57a0b959c68f69650dc98648f2dd908 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661847182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YlU3CvQIU+0KSMVNMUR66W2h4p3uZVBZn/Ixisr/WQI=; b=DBbJHWszd1/IGSSeGHjqQcIqBZ9lUrYEeHzicFL4yVWhoEE7lWsQMtZDPtfL9VQtRjzG+y H5jUhi5ImKzQb6Tf5QgZTqosIOfjj6bCdUcf0A41hTrRm9eB6+NUWzLzGoBrsAjJWj37tL 2K1xjHrb2icI/WGLoh3ID52u+F/V6mXfp2Fm4SHTFeRbTmtVb2Jz2AcDTnKQ1GIWty16Rs 84teubY7i2PaKa+adM9V0mds0kBCsu9SS5/rIH/wqD+yhvI5qhftWaNUkxsfwCBEazOCAS l4Y14K8HcF3lUoLhiVfk6G4MjHSYnVXZJFi27aG0Bq9wIc/c24MtATCisna2ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661847182; a=rsa-sha256; cv=none; b=BZJnVc95S43+3/oz31IOkJDMWhKgMzBI5Gznay3yiNIHb4YLgFy3iww//Nn7U3re2F/7lg +XEK6ZeUBlbo4hUi4Cgk/JmMXTqehwzMGP6LCU6CFiHrzZuzGOxvfKP+Pwl5EGFll9I3uQ f/BC6c3ITHFg7qu6G0GWuOX26K7Zq2fPdL5hUs4U+T/fq0lcj3WX6sWD+8KwK8wOE8uarz JkK7p2mjo/G0oE8/d2CzIfLlfJIFo9JkUDMzAAC3eyVQBt5f767BACNfg9aRqCFSLq4/L6 9vzV9JXLcoBZ+coG+xB7Fayf1AQSLeU9q04xv/o3l/4XIMHf9guIkBnkL2BcjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by madpilot: URL: https://cgit.FreeBSD.org/ports/commit/?id=103c97c2f57a0b959c68f69650dc98648f2dd908 commit 103c97c2f57a0b959c68f69650dc98648f2dd908 Author: Guido Falsi AuthorDate: 2022-08-30 08:06:02 +0000 Commit: Guido Falsi CommitDate: 2022-08-30 08:06:02 +0000 net/asterisk16: Add red_geolocation support Add a GEOLOCATION option (off by default) to allow building the new res_geolocation module, which allows to use geolocation information in SIP protocol (upstream provider support required). Since it requires architecture specific flags to be passed to ld, I've enabled it only for tier 1 architectures at present. PR: 266053 Tested by: Seneca Cunningham --- net/asterisk16/Makefile | 28 ++++++++++++++++++++++++++-- net/asterisk16/files/patch-Makefile.rules | 27 +++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 2 deletions(-) diff --git a/net/asterisk16/Makefile b/net/asterisk16/Makefile index c903cc3420fe..0bbe2850d433 100644 --- a/net/asterisk16/Makefile +++ b/net/asterisk16/Makefile @@ -62,8 +62,9 @@ OPTIONS_DEFAULT= CURL FREETDS GSM LUA MACRO MP3PLAYER NEWT ODBC OPUS MYSQL PGSQ PJSIP PORTAUDIO RADIUS SNMP SPANDSP SPEEX SRTP URIPARSER \ VORBIS XMLDOC -OPTIONS_DEFINE_i386= DAHDI -OPTIONS_DEFINE_amd64= DAHDI +OPTIONS_DEFINE_i386= DAHDI GEOLOCATION +OPTIONS_DEFINE_amd64= DAHDI GEOLOCATION +OPTIONS_DEFINE_aarch64= GEOLOCATION OPTIONS_DEFINE_sparc64= DAHDI OPTIONS_DEFINE_powerpc= DAHDI OPTIONS_DEFINE_powerpc64= DAHDI @@ -99,6 +100,7 @@ BACKTRACE_DESC?= Stack backtrace support via (lib)execinfo DAHDI_DESC?= DAHDI support EXCHANGE_DESC?= Exchange calendar support G729_DESC?= Install G.729 format sounds for Music-on-Hold (MoH) +GEOLOCATION_DESC?= Enable SIP Geolocation support MACRO_DESC?= Enable app_macro (deprecated) MP3PLAYER_DESC= Install MP3 Player for Music-On-Hold (mpg123) NEWG711_DESC?= New G711 Codec @@ -134,6 +136,8 @@ FREETDS_CONFIGURE_ON= --with-tds=${LOCALBASE} FREETDS_CONFIGURE_OFF= --without-tds FREETDS_LIB_DEPENDS= libsybdb.so:databases/freetds +GEOLOCATION_USE= GNOME=libxslt + GSM_CONFIGURE_WITH= gsm GSM_LIB_DEPENDS= libgsm.so:audio/gsm @@ -212,6 +216,7 @@ ASTERISK_GROUP?= asterisk USERS= ${ASTERISK_USER} GROUPS= ${ASTERISK_GROUP} dahdi +.include .include .if empty(ICONV_LIB) @@ -230,6 +235,16 @@ PLIST_SUB+= ASTERISK_USER=${ASTERISK_USER} \ ASTERISK_GROUP=${ASTERISK_GROUP} \ VARDIR=${VARDIR} +.if ${PORT_OPTIONS:MGEOLOCATION} +.if ${ARCH} == i386 +LLD_EMULATION= elf_i386 +.elif ${ARCH} == amd64 +LLD_EMULATION= elf_x86_64 +.elif ${ARCH} == aarch64 +LLD_EMULATION= aarch64elf +.endif +.endif + post-extract: @${FIND} ${WRKSRC} -name '*.d' -delete @@ -249,6 +264,9 @@ post-patch: .if exists(${FILESDIR}/.asterisk.makeopts) ${CP} ${FILESDIR}/.asterisk.makeopts ${WRKSRC}/menuselect.makeopts .endif + +post-patch-GEOLOCATION-on: + @${REINPLACE_CMD} -e 's/%%LLD_EMULATION%%/${LLD_EMULATION}/' ${WRKSRC}/Makefile.rules post-patch-SYSINFO-on: @${REINPLACE_CMD} -e 's/%%LIBSYSINFO%%/-lsysinfo/' ${WRKSRC}/main/Makefile @@ -262,6 +280,12 @@ post-configure: @cd ${WRKSRC} && ./menuselect/menuselect --disable res_timing_kqueue menuselect.makeopts @cd ${WRKSRC} && ./menuselect/menuselect --enable chan_mgcp menuselect.makeopts @cd ${WRKSRC} && ./menuselect/menuselect --enable res_pktccops menuselect.makeopts + +post-configure-GEOLOCATION-on: + @cd ${WRKSRC} && ./menuselect/menuselect --enable res_geolocation menuselect.makeopts + +post-configure-GEOLOCATION-off: + @cd ${WRKSRC} && ./menuselect/menuselect --disable res_geolocation menuselect.makeopts post-configure-MACRO-on: @cd ${WRKSRC} && ./menuselect/menuselect --enable app_macro menuselect.makeopts diff --git a/net/asterisk16/files/patch-Makefile.rules b/net/asterisk16/files/patch-Makefile.rules new file mode 100644 index 000000000000..9815b1524554 --- /dev/null +++ b/net/asterisk16/files/patch-Makefile.rules @@ -0,0 +1,27 @@ +--- Makefile.rules.orig 2022-08-18 15:13:55 UTC ++++ Makefile.rules +@@ -107,6 +107,11 @@ ifeq ($(C_COMPILER_FAMILY),clang) + # Clang -Werror warning suppressions + ifeq ($(C_COMPILER_FAMILY),clang) + CC_CFLAGS+=-Wno-unused-value -Wno-parentheses-equality ++ BINARY_LLD_FLAGS= -z noexecstack ++ LLD_EMULATION=%%LLD_EMULATION%% ++else ++ BINARY_LLD_FLAGS= ++ LLD_EMULATION= + endif + + ifeq ($(GNU_LD),1) +@@ -213,10 +218,10 @@ endif + # extern const size_t _binary_abc_def_xml_size; + %.o: %.xml + $(ECHO_PREFIX) echo " [LD] $^ -> $@" +- $(CMD_PREFIX) $(CC) -g -nostartfiles -nodefaultlibs -nostdlib -r -Wl,-b,binary -o $@ $^ ++ $(CMD_PREFIX) $(CC) -g -nostartfiles -nodefaultlibs -nostdlib $(BINARY_LLD_FLAGS) -r -Wl,-b,binary,-m,$(LLD_EMULATION) -o $@ $^ + + %.o: %.xslt + $(ECHO_PREFIX) echo " [LD] $^ -> $@" +- $(CMD_PREFIX) $(CC) -g -nostartfiles -nodefaultlibs -nostdlib -r -Wl,-b,binary -o $@ $^ ++ $(CMD_PREFIX) $(CC) -g -nostartfiles -nodefaultlibs -nostdlib $(BINARY_LLD_FLAGS) -r -Wl,-b,binary,-m,$(LLD_EMULATION) -o $@ $^ + + dist-clean:: clean