summaryrefslogtreecommitdiff
path: root/comms/asterisk18
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/asterisk18
parentba4e9fecae7d6fce27905e5be60e15553dd92e59 (diff)
downloadpkgsrc-4aa816454356be4b20c120243cc591e026e2a717.tar.gz
Use ${COMPILER_INCLUDE_DIRS} instead of hardcoded /usr/include
Diffstat (limited to 'comms/asterisk18')
-rw-r--r--comms/asterisk18/Makefile24
1 files changed, 17 insertions, 7 deletions
diff --git a/comms/asterisk18/Makefile b/comms/asterisk18/Makefile
index 9c4275db387..28633a98b17 100644
--- a/comms/asterisk18/Makefile
+++ b/comms/asterisk18/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.100 2015/10/10 01:58:01 ryoon Exp $
+# $NetBSD: Makefile,v 1.101 2015/11/02 00:04:00 tnn Exp $
#
# NOTE: when updating this package, there are two places that sound
# tarballs need to be checked
@@ -96,17 +96,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"
@@ -195,9 +201,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: