aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/tmux
diff options
context:
space:
mode:
authorgahr <gahr@FreeBSD.org>2012-08-06 16:16:31 +0800
committergahr <gahr@FreeBSD.org>2012-08-06 16:16:31 +0800
commit91582410e12e1c8b5445314f1f63525d318d6c6d (patch)
tree348ea5704710eb25e228a1cd6a79761e4dcbd2d2 /sysutils/tmux
parentb9731479236d9ace8f7a9210d73fd2d54e8d8502 (diff)
downloadfreebsd-ports-gnome-91582410e12e1c8b5445314f1f63525d318d6c6d.tar.gz
freebsd-ports-gnome-91582410e12e1c8b5445314f1f63525d318d6c6d.tar.zst
freebsd-ports-gnome-91582410e12e1c8b5445314f1f63525d318d6c6d.zip
- Simplify libevent flags [1]
- Use new OPTIONS framework PR: 170064 [1] Submitted by: Jan Beich <jbeich@tormail.org>
Diffstat (limited to 'sysutils/tmux')
-rw-r--r--sysutils/tmux/Makefile32
1 files changed, 16 insertions, 16 deletions
diff --git a/sysutils/tmux/Makefile b/sysutils/tmux/Makefile
index 1a3d0b244be6..a9f3de19f5f8 100644
--- a/sysutils/tmux/Makefile
+++ b/sysutils/tmux/Makefile
@@ -15,7 +15,7 @@ COMMENT= A Terminal Multiplexer
LICENSE= BSD
-USE_AUTOTOOLS= autoconf
+GNU_CONFIGURE= yes
MAN1= tmux.1
@@ -26,32 +26,29 @@ PLIST_DIRSTRY= etc/bash_completion.d
PORTDOCS= CHANGES FAQ NOTES
PORTEXAMPLES= *
-OPTIONS= LIBEVENT2 "Use libevent version 2" Off \
- LIBEVENT_STATIC "Build with static libevent" Off \
- BACKSPACE "Build with tty/keys patch" Off
+OPTIONS_DEFINE= LIBEVENT2 LIBEVENT_STATIC BACKSPACE
-CONFIGURE_ENV+= "LIBEVENT_CFLAGS=${CFLAGS}" \
- "LIBEVENT_LIBS=${LDFLAGS} -levent"
+LIBEVENT2_DESC= Use libevent version 2
+LIBEVENT_STATIC_DESC= Build with static libevent
+BACKSPACE_DESC= Build wiht tty/keys patch
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
-.if defined(WITH_LIBEVENT2)
+.if ${PORT_OPTIONS:MLIBEVENT2}
LIB_DEPENDS= event-2.0:${PORTSDIR}/devel/libevent2
-CFLAGS+= -I${LOCALBASE}/include/event2/compat -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib/event2
-. if defined(WITH_LIBEVENT_STATIC)
+. if ${PORT_OPTIONS:MLIBEVENT_STATIC}
LESTATIC= ${LOCALBASE}/lib/event2/libevent.a
. endif
.else
LIB_DEPENDS= event-1.4:${PORTSDIR}/devel/libevent
-CFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib
+CONFIGURE_ENV+= LIBEVENT_CFLAGS="-I${LOCALBASE}/include" \
+ LIBEVENT_LIBS="-L${LOCALBASE}/lib -levent"
. if defined(WITH_LIBEVENT_STATIC)
LESTATIC= ${LOCALBASE}/lib/libevent.a
. endif
.endif
-.if defined(WITH_BACKSPACE)
+.if ${PORT_OPTIONS:MBACKSPACE}
EXTRA_PATCHES= ${PATCHDIR}/extra-patch-tty-keys.c
.endif
@@ -59,8 +56,11 @@ post-patch:
@${REINPLACE_CMD} -e 's|/etc/tmux.conf|${PREFIX}/etc/tmux.conf|g' \
${WRKSRC}/tmux.1 ${WRKSRC}/tmux.h ${WRKSRC}/CHANGES
${REINPLACE_CMD} -e '/LIBS=/s/-lrt//' ${WRKSRC}/${CONFIGURE_SCRIPT}
+
+post-configure:
.if defined(WITH_LIBEVENT_STATIC)
- ${REINPLACE_CMD} -e 's|$$LIBEVENT_LIBS |${LESTATIC} |' ${WRKSRC}/configure.ac
+ ${REINPLACE_CMD} -e '/LIBS/s|-levent[^[:blank:]]*|${LESTATIC}|' \
+ ${WRKSRC}/${MAKEFILE}
.endif
do-install:
@@ -82,4 +82,4 @@ post-install:
@${INSTALL_DATA} ${WRKSRC}/examples/* ${EXAMPLESDIR}
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>