From nobody Tue Aug 30 08:13:03 2022 X-Original-To: dev-commits-ports-all@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 4MH0Rg5SYZz4Zg63; Tue, 30 Aug 2022 08:13:03 +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 4MH0Rg4wCPz3QjT; Tue, 30 Aug 2022 08:13:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661847183; 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=Yq6LIzlGgVfWWl6hoO4DYkmP/IDgXi7SJOxo5AK+7uU=; b=IT7drTY5u9km22mUUspP5mxmCy8br54hk3Oh9aGcDw18GSA5+9MWIZsYMeEE0pbdQLKV1E wbAy80/o+d/H4rr9D4jsmC2MkCuaI5fJ7uzwrKMOk+FYwxYVgjYap6ZMKSPVdILF1D/5xW S4HfAPmETAkR+4vQX8fNxxZjy2ISnOr0A0bUgStyWR5bTQlE1PPL0gx4S0fubcSYp6nYUO pTn5HnpV0hhVCRx0rfUSHYh8R+w78xa2kdtELGlulEHbHnq99tBsVp/MXWPhWqSyli5h3L nTkDkrPlliQhPJeou19T7xLPomsC4eiZL7NH6icfzBjcEKoAVBT9U9Gq0S3yrw== 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 4MH0Rg3zqGzjmj; Tue, 30 Aug 2022 08:13:03 +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 27U8D3Eb041229; Tue, 30 Aug 2022 08:13:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27U8D3kh041228; Tue, 30 Aug 2022 08:13:03 GMT (envelope-from git) Date: Tue, 30 Aug 2022 08:13:03 GMT Message-Id: <202208300813.27U8D3kh041228@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: e32f5ab610e4 - main - net/asterisk18: Add red_geolocation support List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@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: e32f5ab610e49d510e70a9e5d8851a8b436fc18c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661847183; 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=Yq6LIzlGgVfWWl6hoO4DYkmP/IDgXi7SJOxo5AK+7uU=; b=IJgZJQP9jV20MEndv0jSZjw8fS5uXS5B1vMMT+cO4PXcOkO0dLfdVusgRIdckie3Bl6QOV MGOLEFdsXkTsdP0Yo3iPJkKXhplCMz7/KG1KvxicgaftWvj4tCqaUKyTrMWb6Tw/zSlz6S 7hK2DsbT7TAC6sQGGutLNGbCl9WaiK/R14BNHIZQJS0m+WF5FOrym87GeDLjsQtzdnw8WF YWPxtpnwlFROgd8aDoqrt+fN6HOW2aBoO81ltamYXFW+2zu5apCJTQIQwV0Z69YbCZxumr D98S63mIJcCygS1wYRIcOSEbAq8jJYWOJrfI8inw9pG8+tAbEFBTPa7Mxs5Ctg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661847183; a=rsa-sha256; cv=none; b=JOBVkczrqw+JN341EIqFk55SuVLFVLlKJ84F4HYWPQkGxW/FA/zqdAWmhHAvNSUAwJlkzB 6Jhz6wy7DJz+Ws8TQYGOIyt3rauifYff+C56b84MZSm8kiknmVbJgqYD1Aaw8rVVyZ1QL+ cHmxUxrHsz6qp1Kkkz90KGonHO40z7W5ioVtYAOqi+f+xmFt4OeZh7CM/aU27XWQh5kFCn 1N6bKgU7x0cibWs/YRiOQEOLpGTZVp7jO1Ljt+MumkKVmDWTFATjCqjYwObCsEFMqfIH1N oawN5YpfKhxBsqzKwf0R9Zbz7jEpkBs1Urs2Tvqr3fArw8s8lwLYD8A/gMBckQ== 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=e32f5ab610e49d510e70a9e5d8851a8b436fc18c commit e32f5ab610e49d510e70a9e5d8851a8b436fc18c Author: Guido Falsi AuthorDate: 2022-08-30 08:06:58 +0000 Commit: Guido Falsi CommitDate: 2022-08-30 08:06:58 +0000 net/asterisk18: 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/asterisk18/Makefile | 28 ++++++++++++++++++++++++++-- net/asterisk18/files/patch-Makefile.rules | 27 +++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 2 deletions(-) diff --git a/net/asterisk18/Makefile b/net/asterisk18/Makefile index b354d93cc05b..77335cc6ee26 100644 --- a/net/asterisk18/Makefile +++ b/net/asterisk18/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 @@ -250,6 +265,9 @@ post-patch: ${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 @@ -263,6 +281,12 @@ post-configure: @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/asterisk18/files/patch-Makefile.rules b/net/asterisk18/files/patch-Makefile.rules new file mode 100644 index 000000000000..3bebe8ad02de --- /dev/null +++ b/net/asterisk18/files/patch-Makefile.rules @@ -0,0 +1,27 @@ +--- Makefile.rules.orig 2022-08-18 15:18:29 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