aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authormadpilot <madpilot@FreeBSD.org>2016-09-04 03:24:48 +0800
committermadpilot <madpilot@FreeBSD.org>2016-09-04 03:24:48 +0800
commit036154be5ce1f0ba42d0d3a55e9d77e02b7e9fff (patch)
tree3bec0a0c4cdb227600a1c28f6dae646ea6c0aeb8 /net
parent88e4c88ab7ac56aa9801b1f72ab367a0ebcefbca (diff)
downloadfreebsd-ports-gnome-036154be5ce1f0ba42d0d3a55e9d77e02b7e9fff.tar.gz
freebsd-ports-gnome-036154be5ce1f0ba42d0d3a55e9d77e02b7e9fff.tar.zst
freebsd-ports-gnome-036154be5ce1f0ba42d0d3a55e9d77e02b7e9fff.zip
- Prevent asterisk build system from unconditionally using
-march=native - Add an OPTIMIZED_CFLAGS option, disabled by default, to allow enabling the native flag - While here, convert to option target helpers.
Diffstat (limited to 'net')
-rw-r--r--net/asterisk13/Makefile34
1 files changed, 19 insertions, 15 deletions
diff --git a/net/asterisk13/Makefile b/net/asterisk13/Makefile
index 12beef3d4901..0c42125eff50 100644
--- a/net/asterisk13/Makefile
+++ b/net/asterisk13/Makefile
@@ -2,6 +2,7 @@
PORTNAME= asterisk
PORTVERSION= 13.11.0
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://downloads.asterisk.org/pub/telephony/%SUBDIR%/:DEFAULT,g729
MASTER_SITE_SUBDIR= asterisk/ \
@@ -57,7 +58,7 @@ CONFLICTS_BUILD= linuxthreads-*
CONFLICTS_INSTALL= asterisk*-1.8* asterisk*-11*
OPTIONS_DEFINE= ASTVERSION BACKTRACE CURL EXCHANGE FREETDS LDAP LUA \
- MP3PLAYER OOH323 PJSIP PORTAUDIO RADIUS SNMP \
+ MP3PLAYER OOH323 OPTIMIZED_CFLAGS PJSIP PORTAUDIO RADIUS SNMP \
SPANDSP SRTP SYSINFO XMPP
OPTIONS_DEFAULT= CURL FREETDS GSM LUA MP3PLAYER NEWT ODBC MYSQL PGSQL PJSIP \
PORTAUDIO RADIUS SNMP SPANDSP SPEEX SQLITE2 VORBIS
@@ -237,19 +238,19 @@ 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/samples/musiconhold.conf.sample
-.if ${PORT_OPTIONS:MSYSINFO}
+
+post-patch-SYSINFO-on:
@${REINPLACE_CMD} -e 's/%%LIBSYSINFO%%/-lsysinfo/' ${WRKSRC}/main/Makefile
-.else
+
+post-patch-SYSINFO-off:
@${REINPLACE_CMD} -e '/#define HAVE_SYSINFO 1/d' ${WRKSRC}/configure
@${REINPLACE_CMD} -e '/%%LIBSYSINFO%%/d' ${WRKSRC}/main/Makefile
-.endif
.if exists(${FILESDIR}/.asterisk.makeopts)
USER_MAKEOPTS_FILE=${FILESDIR}/.asterisk.makeopts
@@ -262,23 +263,23 @@ 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
-.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
post-install:
@${RM} ${STAGEDIR}${ETCDIR}/*.conf ${STAGEDIR}${ETCDIR}/extensions.ael ${STAGEDIR}${ETCDIR}/extensions.lua
-.if ! ${PORT_OPTIONS:MASTVERSION}
- @${RM} ${STAGEDIR}${PREFIX}/sbin/astversion
-.endif
${FIND} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/modules -type f -name '*.so' | ${SED} "s,^${STAGEDIR}${PREFIX}/,," >> ${TMPPLIST}
${FIND} ${STAGEDIR}${DATADIR}/sounds -type f | ${SED} "s,^${STAGEDIR}${DATADIR},${DATADIR}," >> ${TMPPLIST}
${FIND} ${STAGEDIR}${DATADIR}/moh -type f | ${SED} "s,^${STAGEDIR}${DATADIR},${DATADIR}," >> ${TMPPLIST}
@@ -291,4 +292,7 @@ post-install:
${ECHO} "@owner" >> ${TMPPLIST} && \
${ECHO} "@group" >> ${TMPPLIST});
+post-install-ASTVERSION-off:
+ @${RM} ${STAGEDIR}${PREFIX}/sbin/astversion
+
.include <bsd.port.post.mk>