Date: Sun, 22 Jul 2012 04:26:16 -0500 From: Jan Beich <jbeich@tormail.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/170064: [patch] sysutils/tmux: simplify libevent flags Message-ID: <1SssQg-0002AC-HL@internal.tormail.org> Resent-Message-ID: <201207220930.q6M9UBtC053863@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 170064 >Category: ports >Synopsis: [patch] sysutils/tmux: simplify libevent flags >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 Jul 22 09:30:10 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Jan Beich >Release: FreeBSD 10.0-CURRENT amd64 >Organization: >Environment: >Description: - leverage pkg-config[1] for libevent2 cflags/libs - make LIBEVENT_(CFLAGS|LIBS) for libevent14 similar[2] to libevent2 - get rid of autoconf [1] http://sourceforge.net/tracker/?func=detail&aid=3427624&group_id=200378&atid=973264 [2] -O2 -fno-strict-aliasing -pipe is not related to libevent >How-To-Repeat: >Fix: --- event.diff begins here --- Index: sysutils/tmux/Makefile =================================================================== --- sysutils/tmux/Makefile (revision 301267) +++ sysutils/tmux/Makefile (working copy) @@ -15,7 +15,7 @@ COMMENT= A Terminal Multiplexer LICENSE= BSD -USE_AUTOTOOLS= autoconf +GNU_CONFIGURE= yes MAN1= tmux.1 @@ -30,22 +30,17 @@ OPTIONS= LIBEVENT2 "Use libevent version 2" Off \ LIBEVENT_STATIC "Build with static libevent" Off \ BACKSPACE "Build with tty/keys patch" Off -CONFIGURE_ENV+= "LIBEVENT_CFLAGS=${CFLAGS}" \ - "LIBEVENT_LIBS=${LDFLAGS} -levent" - .include <bsd.port.pre.mk> .if defined(WITH_LIBEVENT2) 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) 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 @@ -59,8 +54,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: --- event.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1SssQg-0002AC-HL>