summaryrefslogtreecommitdiff
path: root/comms/asterisk
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2015-11-02 00:03:59 +0000
committertnn <tnn@pkgsrc.org>2015-11-02 00:03:59 +0000
commit4aa816454356be4b20c120243cc591e026e2a717 (patch)
treee77d6f6366cdf2a4c22d465bb12ecd36ac65aa6a /comms/asterisk
parentba4e9fecae7d6fce27905e5be60e15553dd92e59 (diff)
downloadpkgsrc-4aa816454356be4b20c120243cc591e026e2a717.tar.gz
Use ${COMPILER_INCLUDE_DIRS} instead of hardcoded /usr/include
Diffstat (limited to 'comms/asterisk')
-rw-r--r--comms/asterisk/Makefile24
1 files changed, 17 insertions, 7 deletions
diff --git a/comms/asterisk/Makefile b/comms/asterisk/Makefile
index 48cdeb0595a..3595eb34c33 100644
--- a/comms/asterisk/Makefile
+++ b/comms/asterisk/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.129 2015/10/27 08:49:01 jnemeth Exp $
+# $NetBSD: Makefile,v 1.130 2015/11/02 00:03:59 tnn Exp $
#
# NOTE: when updating this package, there are two places that sound
# tarballs need to be checked
@@ -107,17 +107,23 @@ BUILDLINK_TRANSFORM+= rm:-march=i386
.endif
PLIST_VARS+= kqueue
-.if exists(/usr/include/sys/event.h)
+.for _dir_ in ${COMPILER_INCLUDE_DIRS}
+. if exists(${_dir_}/sys/event.h)
PLIST.kqueue= yes
-.endif
+. endif
+.endfor
PLIST_VARS+= mgcp
# NOSIGPIPE is a temp variable, since PLIST.mgcp MUST remain undefined
# if the grep fails
-NOSIGPIPE!= ${GREP} SO_NOSIGPIPE /usr/include/sys/socket.h || echo ""
-.if ${NOSIGPIPE} != ""
+.for _dir_ in ${COMPILER_INCLUDE_DIRS}
+. if(exists(${_dir_}/sys/socket.h))
+NOSIGPIPE!= ${GREP} SO_NOSIGPIPE ${_dir_}/sys/socket.h || echo ""
+. if ${NOSIGPIPE} != ""
PLIST.mgcp= yes
-.endif
+. endif
+. endif
+.endfor
.include "options.mk"
@@ -216,9 +222,13 @@ CONF_FILES_PERMS+= ${ASTEXAMPLEDIR}/${f:Q} ${PKG_SYSCONFDIR}/${f:Q} ${ASTERISK_
PTHREAD_OPTS+= require native
-.if (${OPSYS} == "Darwin" && exists(/usr/include/sys/poll.h))
post-patch:
+.if ${OPSYS} == "Darwin"
+. for _dir_ in ${COMPILER_INCLUDE_DIRS}
+. if exists(${_dir_}/sys/poll.h))
${ECHO} "#include <sys/poll.h>" > ${WRKSRC}/include/asterisk/poll-compat.h
+. endif
+. endfor
.endif
post-install: