aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorWen Heping <wen@FreeBSD.org>2011-02-21 07:09:49 +0000
committerWen Heping <wen@FreeBSD.org>2011-02-21 07:09:49 +0000
commitcfe1bc584d8faa1f1f7cb9fb9cb4a6b984d3f8d9 (patch)
treefe2ab69d16a43c181c5ac5db03607e563bdc399a /sysutils
parentb675818e4bca127d6b919eb1a268698e158c38fb (diff)
Notes
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/tmux/Makefile21
-rw-r--r--sysutils/tmux/files/extra-patch-fb718
-rw-r--r--sysutils/tmux/files/extra-patch-kqueue10
-rw-r--r--sysutils/tmux/files/extra-patch-kqueue_and_fb720
4 files changed, 66 insertions, 3 deletions
diff --git a/sysutils/tmux/Makefile b/sysutils/tmux/Makefile
index 1909c6d32bb8..5376a41d8bf5 100644
--- a/sysutils/tmux/Makefile
+++ b/sysutils/tmux/Makefile
@@ -7,7 +7,7 @@
PORTNAME= tmux
PORTVERSION= 1.4
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= sysutils
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
@@ -29,11 +29,26 @@ CFLAGS+= -I${LOCALBASE}/include
#LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_ARGS+= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+OPTIONS= KQUEUE "Build without define HAVE_BROKEN_KQUEUE " On
+
+# 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:
+# http://sourceforge.net/mailarchive/forum.php?thread_name=20110125092121.GA15934%40yelena.nicm.ath.cx&forum_name=tmux-users
+
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 702104
-BROKEN= fails to build with closefrom
-# More detailed message: http://svn.freebsd.org/viewvc/base/stable/7/sys/kern/syscalls.master?revision=195694&amp;view=markup
+EXTRA_PATCHES= ${PATCHDIR}/extra-patch-configure
+.endif
+
+.if !defined(WITHOUT_KQUEUE)
+.if ${OSVERSION} < 702104
+EXTRA_PATCHES= ${PATCHDIR}/extra-patch-kqueue_and_fb7
+.else
+EXTRA_PATCHES= ${PATCHDIR}/extra-patch-kqueue
+.endif
+.else
+EXTRA_PATCHES= ${PATCHDIR}/extra-patch-fb7
.endif
post-patch:
diff --git a/sysutils/tmux/files/extra-patch-fb7 b/sysutils/tmux/files/extra-patch-fb7
new file mode 100644
index 000000000000..f6af48b3617d
--- /dev/null
+++ b/sysutils/tmux/files/extra-patch-fb7
@@ -0,0 +1,18 @@
+--- configure.orig 2011-02-21 10:52:19.000000000 +0800
++++ configure 2011-02-21 10:54:29.000000000 +0800
+@@ -224,7 +224,6 @@
+ #define HAVE_ASPRINTF
+ #define HAVE_BROKEN_KQUEUE
+ #define HAVE_BZERO
+-#define HAVE_CLOSEFROM
+ #define HAVE_DAEMON
+ #define HAVE_FGETLN
+ #define HAVE_FORKPTY
+@@ -245,6 +244,7 @@
+ cat <<EOF >>$CONFIG_MK
+ LIBS+= -lcurses -lutil -levent
+ SRCS+= osdep-freebsd.c \
++ compat/closefrom.c \
+ compat/vis.c \
+ compat/unvis.c \
+ compat/imsg-buffer.c \
diff --git a/sysutils/tmux/files/extra-patch-kqueue b/sysutils/tmux/files/extra-patch-kqueue
new file mode 100644
index 000000000000..e71b1f1a4cdb
--- /dev/null
+++ b/sysutils/tmux/files/extra-patch-kqueue
@@ -0,0 +1,10 @@
+--- configure.orig 2011-02-21 14:12:33.000000000 +0800
++++ configure 2011-02-21 14:13:00.000000000 +0800
+@@ -222,7 +222,6 @@
+ FreeBSD|DragonFly)
+ cat <<EOF >>$CONFIG_H
+ #define HAVE_ASPRINTF
+-#define HAVE_BROKEN_KQUEUE
+ #define HAVE_BZERO
+ #define HAVE_CLOSEFROM
+ #define HAVE_DAEMON
diff --git a/sysutils/tmux/files/extra-patch-kqueue_and_fb7 b/sysutils/tmux/files/extra-patch-kqueue_and_fb7
new file mode 100644
index 000000000000..6409a5e11dae
--- /dev/null
+++ b/sysutils/tmux/files/extra-patch-kqueue_and_fb7
@@ -0,0 +1,20 @@
+--- configure.orig 2011-02-21 14:37:37.000000000 +0800
++++ configure 2011-02-21 14:38:21.000000000 +0800
+@@ -222,9 +222,7 @@
+ FreeBSD|DragonFly)
+ cat <<EOF >>$CONFIG_H
+ #define HAVE_ASPRINTF
+-#define HAVE_BROKEN_KQUEUE
+ #define HAVE_BZERO
+-#define HAVE_CLOSEFROM
+ #define HAVE_DAEMON
+ #define HAVE_FGETLN
+ #define HAVE_FORKPTY
+@@ -245,6 +243,7 @@
+ cat <<EOF >>$CONFIG_MK
+ LIBS+= -lcurses -lutil -levent
+ SRCS+= osdep-freebsd.c \
++ compat/closefrom.c \
+ compat/vis.c \
+ compat/unvis.c \
+ compat/imsg-buffer.c \