aboutsummaryrefslogtreecommitdiff
path: root/net/asterisk11
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2015-04-18 23:10:07 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2015-04-18 23:10:07 +0000
commit8e7866129ea2ceb7af850469c8698ecccd9a4551 (patch)
tree00fef4836cc6b65ba7cfef273ad379c83c809623 /net/asterisk11
parent863bb399c13abeb7ab6189fcabc9e8c9b6929160 (diff)
Notes
Diffstat (limited to 'net/asterisk11')
-rw-r--r--net/asterisk11/Makefile14
-rw-r--r--net/asterisk11/files/patch-main__Makefile16
2 files changed, 23 insertions, 7 deletions
diff --git a/net/asterisk11/Makefile b/net/asterisk11/Makefile
index 0966ad64dadd..6d2c0329d352 100644
--- a/net/asterisk11/Makefile
+++ b/net/asterisk11/Makefile
@@ -43,7 +43,7 @@ CONFLICTS_BUILD= linuxthreads-*
CONFLICTS_INSTALL= asterisk*-1.8* asterisk*-13*
OPTIONS_DEFINE= VORBIS PGSQL MYSQL ODBC RADIUS SNMP FREETDS XMPP SQLITE GSM \
- CURL SPANDSP EXCHANGE NEWG711 SRTP LUA LDAP OOH323 UUID
+ CURL SPANDSP EXCHANGE NEWG711 SRTP LUA LDAP OOH323 UUID SYSINFO
OPTIONS_DEFAULT= VORBIS ODBC PGSQL RADIUS SNMP FREETDS \
XMPP GSM SQLITE CURL LUA UUID
@@ -62,6 +62,7 @@ OOH323_DESC?= ooh323 support
DAHDI_DESC?= DAHDI support
XMPP_DESC?= XMPP/GTALK support
UUID_DESC?= libuuid support (required for ICE and TURN in RTP)
+SYSINFO_DESC?= Use devel/libsysinfo to get system information
OPTIONS_SUB= yes
OOH323_LIB_DEPENDS= libpt_r.so:${PORTSDIR}/devel/pwlib \
@@ -114,6 +115,7 @@ UUID_LIB_DEPENDS= libuuid.so:${PORTSDIR}/misc/e2fsprogs-libuuid
UUID_CONFIGURE_ON= --with-uuid=${LOCALBASE}
UUID_CONFIGURE_OFF= --disable-uuid
UUID_CONFLICTS= ossp-uuid-[0-9]*
+SYSINFO_LIB_DEPENDS= libsysinfo.so:${PORTSDIR}/devel/libsysinfo
ASTERISK_USER?= asterisk
ASTERISK_GROUP?= asterisk
@@ -135,10 +137,16 @@ PLIST_SUB+= ASTERISK_GROUP=${ASTERISK_GROUP}
PLIST_SUB+= VARDIR=${VARDIR}
post-extract:
- ${FIND} ${WRKSRC} -name '*.d' -delete
+ @${FIND} ${WRKSRC} -name '*.d' -delete
post-patch:
- ${REINPLACE_CMD} -e 's|/var/lib|${PREFIX}/share|g' ${WRKSRC}/configs/musiconhold.conf.sample
+ @${REINPLACE_CMD} -e 's|/var/lib|${PREFIX}/share|g' ${WRKSRC}/configs/musiconhold.conf.sample
+.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
post-configure:
@cd ${WRKSRC} && ${MAKE_CMD} menuselect.makeopts
diff --git a/net/asterisk11/files/patch-main__Makefile b/net/asterisk11/files/patch-main__Makefile
index 442c12157623..a0e3ebc7cf42 100644
--- a/net/asterisk11/files/patch-main__Makefile
+++ b/net/asterisk11/files/patch-main__Makefile
@@ -1,6 +1,14 @@
---- main/Makefile.orig 2013-02-26 20:19:51.000000000 +0100
-+++ main/Makefile 2014-05-16 11:48:55.545963341 +0200
-@@ -215,9 +215,9 @@
+--- main/Makefile.orig 2015-03-12 12:26:57 UTC
++++ main/Makefile
+@@ -76,6 +76,7 @@ ifeq ($(OSARCH),FreeBSD)
+ BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
+ AST_LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
+ AST_LIBS+=-lcrypto
++ AST_LIBS+=%%LIBSYSINFO%%
+ endif
+
+ ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
+@@ -218,9 +219,9 @@ ifeq ($(GNU_LD),1)
endif
$(ECHO_PREFIX) echo " [LD] $^ -> $@"
$(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(CC_LDFLAGS_SO) $^ $(CC_LIBS)
@@ -13,7 +21,7 @@
$(ASTSSL_LIB): $(ASTSSL_LIB).$(ASTSSL_SO_VERSION)
$(LN) -sf $< $@
-@@ -266,9 +266,9 @@
+@@ -269,9 +270,9 @@ ifeq ($(findstring darwin,$(OSARCH)),) #
else # Darwin
$(INSTALL) -m 755 $(ASTSSL_LIB) "$(DESTDIR)$(ASTLIBDIR)/"
endif