From 92cd4679a1d538af6df5a8e2b713a36d67d62470 Mon Sep 17 00:00:00 2001 From: wen Date: Thu, 3 Mar 2011 08:16:59 +0000 Subject: - Add LIBEVENT_STATIC to OPTIONS PR: ports/155080 Submitted by: mm@ --- sysutils/tmux/Makefile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'sysutils/tmux') diff --git a/sysutils/tmux/Makefile b/sysutils/tmux/Makefile index 54f1deb656b6..b1554bf9d320 100644 --- a/sysutils/tmux/Makefile +++ b/sysutils/tmux/Makefile @@ -7,15 +7,13 @@ PORTNAME= tmux PORTVERSION= 1.4 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= sysutils MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} MAINTAINER= wen@FreeBSD.org COMMENT= A Terminal Multiplexer -LIB_DEPENDS= event-1.4:${PORTSDIR}/devel/libevent - HAS_CONFIGURE= yes MAN1= tmux.1 @@ -29,7 +27,8 @@ CFLAGS+= -I${LOCALBASE}/include #LDFLAGS+= -L${LOCALBASE}/lib CONFIGURE_ARGS+= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" -OPTIONS= KQUEUE "Build without define HAVE_BROKEN_KQUEUE " On +OPTIONS= KQUEUE "Build without define HAVE_BROKEN_KQUEUE " On \ + LIBEVENT_STATIC "Build with static libevent" Off # Now I set tmux build without #define HAVE_BROKEN_KQUEUE as default and an option, # If it still hang the system or other run error, try as upstream suggest: @@ -37,6 +36,12 @@ OPTIONS= KQUEUE "Build without define HAVE_BROKEN_KQUEUE " On .include +.if defined(WITH_LIBEVENT_STATIC) +BUILD_DEPENDS+= ${LOCALBASE}/lib/libevent.a:${PORTSDIR}/devel/libevent +.else +LIB_DEPENDS= event-1.4:${PORTSDIR}/devel/libevent +.endif + .if !defined(WITHOUT_KQUEUE) .if ${OSVERSION} < 702104 EXTRA_PATCHES= ${PATCHDIR}/extra-patch-kqueue_and_fb7 @@ -50,6 +55,10 @@ EXTRA_PATCHES= ${PATCHDIR}/extra-patch-fb7 post-patch: @${REINPLACE_CMD} -e 's#/usr/local#${LOCALBASE}#g' \ ${WRKSRC}/Makefile +.if defined(WITH_LIBEVENT_STATIC) + @${REINPLACE_CMD} -e 's|-levent|${LOCALBASE}/lib/libevent.a|g' \ + ${WRKSRC}/configure +.endif do-install: @${INSTALL_PROGRAM} ${WRKSRC}/tmux ${PREFIX}/bin -- cgit