ports/155080: [PATCH] sysutils/tmux: add LIBEVENT_STATIC to OPTIONS

Martin Matuska mm at FreeBSD.org
Sun Feb 27 11:10:08 UTC 2011


>Number:         155080
>Category:       ports
>Synopsis:       [PATCH] sysutils/tmux: add LIBEVENT_STATIC to OPTIONS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 27 11:10:07 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Martin Matuska
>Release:        FreeBSD 8.2-PRERELEASE amd64
>Organization:
>Environment:
System: FreeBSD neo.vx.sk 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #1 r217725M: Sat Jan 22 22:59:27 CET
>Description:
Add optional linkage on static libevent (enables dependency-free package).

Port maintainer (wen at FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:

--- tmux-1.4_4.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/sysutils/tmux/Makefile,v
retrieving revision 1.25
diff -u -r1.25 Makefile
--- Makefile	21 Feb 2011 10:43:38 -0000	1.25
+++ Makefile	27 Feb 2011 10:55:19 -0000
@@ -7,15 +7,13 @@
 
 PORTNAME=	tmux
 PORTVERSION=	1.4
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	sysutils
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
 
 MAINTAINER=	wen at FreeBSD.org
 COMMENT=	A Terminal Multiplexer
 
-LIB_DEPENDS=	event-1.4:${PORTSDIR}/devel/libevent
-
 HAS_CONFIGURE=	yes
 
 MAN1=		tmux.1
@@ -29,7 +27,8 @@
 #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 @@
 
 .include <bsd.port.pre.mk>
 
+.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 @@
 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
--- tmux-1.4_4.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list