From: wen heping on
Based on David's message, I modify the Makefile, the diff is as below,
Would you have a test of it ?

And I found in tmux website that tmux require ncurse while the ports did not
depends, is it possible that lacking of ncurse depends caused the run error ?

Regards,
wen





--- Makefile.orig 2010-03-17 08:14:19.000000000 +0800
+++ Makefile 2010-03-17 08:24:37.000000000 +0800
@@ -7,6 +7,7 @@

PORTNAME= tmux
PORTVERSION= 1.2
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}

@@ -24,9 +25,14 @@
PORTDOCS= CHANGES FAQ NOTES
PORTEXAMPLES= *

+.include <bsd.port.pre.mk>
post-patch:
- @${REINPLACE_CMD} -e '/^#define HAVE_TREE_H/d' \
+.if ${OSVERSION} <= 800000
+ @${REINPLACE_CMD} -e '/^#undef HAVE_BROKEN_KQUEUE/d' \
${WRKSRC}/configure
+.endif
+
+ @${REINPLACE_CMD} -e '/^#define HAVE_TREE_H/d' ${WRKSRC}/configure

do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/tmux ${PREFIX}/bin
@@ -45,4 +51,4 @@
@${INSTALL_DATA} ${WRKSRC}/examples/* ${EXAMPLESDIR}
.endif

-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Barak Michener on
I tried your patch -- it didn't work. However, David's message helps:

Looking inside the configure script for tmux in the source package,
there's a line for Darwin-based systems:

#define HAVE_BROKEN_KQUEUE

copying that line to the FreeBSD section and compiling makes tmux-1.2
work great :)

This is my first email to the ports list, so I don't have much
Makefile-foo. The patch you gave me didn't work, but I think you're on
the right track...
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"

From: Gary Jennejohn on
On Wed, 17 Mar 2010 12:05:08 +0200
Andriy Gapon <avg(a)icyb.net.ua> wrote:

> on 17/03/2010 04:46 wen heping said the following:
> > Hi,
> >
> > Would you test this patch ?
> > If it works, I shall commit it.
> >
>
> I think that it would be interesting/useful to understand in what respect FreeBSD
> kqueue is considered 'broken' by tmux code.
>

Actually it's the kqueue handling in devel/libevent, which is used by tmux,
which considers our kequeue(2) implementation to be broken.

The code in kqueue.c:kq_init() from libevent calls kevent() [kqueue(2)]
with nchanges=1 and nevents=64. It assumes that kevent() will always
return 1 on success. According to kqueue(2) kevent will return up to
nevents on success. I'm not sure whether our kevent() should return 1
because nchanges=1 or not.

So the question is whether kq_init() is making a bad assumption or not.

In any case it seems that devel/libevent should be fixed, if necessary,
rather than applying a bandaid to tmux.

---
Gary Jennejohn
_______________________________________________
freebsd-ports(a)freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe(a)freebsd.org"