summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadpilot <madpilot@FreeBSD.org>2017-06-20 14:43:44 +0000
committermadpilot <madpilot@FreeBSD.org>2017-06-20 14:43:44 +0000
commitb5b8bf3cd69836e50a3516d331c97908ac2bf9c6 (patch)
treed49c680759c0dcc169473f222be2028c9df24264
parentf9a1d789f0d1a966b75967ef31bfaf56a6a31255 (diff)
downloadFreeBSD-ports-b5b8bf3cd69836e50a3516d331c97908ac2bf9c6.zip
FreeBSD-ports-b5b8bf3cd69836e50a3516d331c97908ac2bf9c6.tar.gz
MFH: r443953
- Prevent asterisk build system from unconditionally using -march=native [1] - Add an OPTIMIZED_CFLAGS option, disabled by default, to allow enabling the native flag - While here, convert to option target helpers. Reported by: "Andrey V. Elsukov" <bu7cher at yandex.ru> (via email) [1] Approved by: ports-secteam (feld)
-rw-r--r--net/asterisk11/Makefile34
1 files changed, 19 insertions, 15 deletions
diff --git a/net/asterisk11/Makefile b/net/asterisk11/Makefile
index ebedb0b..95a915a 100644
--- a/net/asterisk11/Makefile
+++ b/net/asterisk11/Makefile
@@ -2,6 +2,7 @@
PORTNAME= asterisk
PORTVERSION= 11.25.1
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://downloads.asterisk.org/pub/telephony/%SUBDIR%/:DEFAULT,g729
MASTER_SITE_SUBDIR= asterisk/ \
@@ -51,7 +52,7 @@ CONFLICTS_BUILD= linuxthreads-* pjsip-*
CONFLICTS_INSTALL= asterisk*-1.8* asterisk*-13*
OPTIONS_DEFINE= BACKTRACE CURL EXCHANGE FREETDS LDAP LUA \
- MP3PLAYER OOH323 RADIUS SNMP SPANDSP SRTP \
+ MP3PLAYER OOH323 OPTIMIZED_CFLAGS RADIUS SNMP SPANDSP SRTP \
SYSINFO UUID XMPP
OPTIONS_DEFAULT= BACKTRACE CURL FREETDS GSM LUA MP3PLAYER \
NEWT MYSQL ODBC PGSQL RADIUS SNMP SPANDSP SPEEX \
@@ -215,40 +216,43 @@ PLIST_SUB+= ASTERISK_USER=${ASTERISK_USER} \
post-extract:
@${FIND} ${WRKSRC} -name '*.d' -delete
-.if ${PORT_OPTIONS:MG729}
+post-extract-G729-on:
${CP} ${DISTDIR}/${ASTERISK_CORE_G729_SOUNDS} ${WRKSRC}/sounds
${CP} ${DISTDIR}/${ASTERISK_MOH_G729_SOUNDS} ${WRKSRC}/sounds
-.endif
post-patch:
@${REINPLACE_CMD} -e 's|/var/lib|${PREFIX}/share|g' ${WRKSRC}/configs/musiconhold.conf.sample
@${REINPLACE_CMD} -e 's/-liconv/${ICONV_LIB}/' ${WRKSRC}/configure
-.if ${PORT_OPTIONS:MSYSINFO}
- @${REINPLACE_CMD} -e 's/%%LIBSYSINFO%%/-lsysinfo/' ${WRKSRC}/main/Makefile
-.else
- @${REINPLACE_CMD} -e '/#define HAVE_SYSINFO 1/d' ${WRKSRC}/configure
- @${REINPLACE_CMD} -e '/%%LIBSYSINFO%%/d' ${WRKSRC}/main/Makefile
-.endif
.if exists(${FILESDIR}/.asterisk.makeopts)
${CP} ${FILESDIR}/.asterisk.makeopts ${WRKSRC}/menuselect.makeopts
.endif
+post-patch-SYSINFO-on:
+ @${REINPLACE_CMD} -e 's/%%LIBSYSINFO%%/-lsysinfo/' ${WRKSRC}/main/Makefile
+
+post-patch-SYSINFO-off:
+ @${REINPLACE_CMD} -e '/#define HAVE_SYSINFO 1/d' ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e '/%%LIBSYSINFO%%/d' ${WRKSRC}/main/Makefile
+
post-configure:
@cd ${WRKSRC} && ${MAKE_CMD} menuselect.makeopts
@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
-.if ${PORT_OPTIONS:MMYSQL}
+
+post-configure-MYSQL-on:
@cd ${WRKSRC} && ./menuselect/menuselect --enable res_config_mysql menuselect.makeopts
@cd ${WRKSRC} && ./menuselect/menuselect --enable app_mysql menuselect.makeopts
@cd ${WRKSRC} && ./menuselect/menuselect --enable cdr_mysql menuselect.makeopts
-.endif
-.if ${PORT_OPTIONS:MOOH323}
+
+post-configure-OOH323-on:
@cd ${WRKSRC} && ./menuselect/menuselect --enable chan_ooh323 menuselect.makeopts
-.endif
-.if ${PORT_OPTIONS:MNEWG711}
+
+post-configure-NEWG711-on:
@cd ${WRKSRC} && ./menuselect/menuselect --enable G711_NEW_ALGORITHM menuselect.makeopts
-.endif
+
+post-configure-OPTIMIZED_CFLAGS-off:
+ @cd ${WRKSRC} && ./menuselect/menuselect --disable BUILD_NATIVE menuselect.makeopts
pre-build:
@${MKDIR} ${WRKSRC}/res/pjproject/pjnath/lib ${WRKSRC}/res/pjproject/pjlib-util/lib \
OpenPOWER on IntegriCloud