summaryrefslogtreecommitdiff
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
parentba4e9fecae7d6fce27905e5be60e15553dd92e59 (diff)
downloadpkgsrc-4aa816454356be4b20c120243cc591e026e2a717.tar.gz
Use ${COMPILER_INCLUDE_DIRS} instead of hardcoded /usr/include
-rw-r--r--comms/asterisk/Makefile24
-rw-r--r--comms/asterisk18/Makefile24
2 files changed, 34 insertions, 14 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:
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: