aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorwen <wen@FreeBSD.org>2011-06-16 16:42:28 +0800
committerwen <wen@FreeBSD.org>2011-06-16 16:42:28 +0800
commit309b970b2b790418d9144dc68ed28913af77cce3 (patch)
treec37af9ba3c2a3c516a77b0b65259f04b9a6ea8e9 /sysutils
parent668e7ff03313c568db16487c6f93fdad5d284a4b (diff)
downloadfreebsd-ports-gnome-309b970b2b790418d9144dc68ed28913af77cce3.tar.gz
freebsd-ports-gnome-309b970b2b790418d9144dc68ed28913af77cce3.tar.zst
freebsd-ports-gnome-309b970b2b790418d9144dc68ed28913af77cce3.zip
- Fix build when CFLAGS is set in /etc/make.conf
PR: ports/157918 Submitted by: Grzegorz Blach <magik@roorback.net>
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/tmux/Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/sysutils/tmux/Makefile b/sysutils/tmux/Makefile
index 30059b8639f2..7e9dd5ee50d5 100644
--- a/sysutils/tmux/Makefile
+++ b/sysutils/tmux/Makefile
@@ -7,7 +7,7 @@
PORTNAME= tmux
PORTVERSION= 1.4
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= sysutils
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
@@ -35,14 +35,14 @@ OPTIONS= KQUEUE "Build without define HAVE_BROKEN_KQUEUE " On \
.include <bsd.port.pre.mk>
.if defined(WITH_LIBEVENT2)
-CFLAGS+= -I${LOCALBASE}/include/event2/compat -I${LOCALBASE}/include
+EXTRA_CPPFLAGS+= -I${LOCALBASE}/include/event2/compat -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib/event2
.else
-CFLAGS+= -I${LOCALBASE}/include
+EXTRA_CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
.endif
-MAKE_ENV+= LDFLAGS="${LDFLAGS}"
+MAKE_ENV+= EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}" LDFLAGS="${LDFLAGS}"
.if defined(WITH_LIBEVENT_STATIC)
. if defined(WITH_LIBEVENT2)
@@ -81,6 +81,7 @@ post-patch:
${WRKSRC}/tmux.1 ${WRKSRC}/tmux.h
@${REINPLACE_CMD} -e 's|-I/usr/local/include||g' \
-e 's|/usr/local|${LOCALBASE}|g' \
+ -e 's|$${CPPFLAGS}$$|${CPPFLAGS} ${EXTRA_CPPFLAGS}|g' \
-e 's|LDFLAGS+=|#LDFLAGS+=|g' \
${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's|-levent|${_LEVENT_LIB}|g' \