View | Details | Raw Unified | Return to bug 158946
Collapse All | Expand All

(-)Makefile (-46 / +16 lines)
Lines 6-17 Link Here
6
#
6
#
7
7
8
PORTNAME=	tmux
8
PORTNAME=	tmux
9
PORTVERSION=	1.4
9
PORTVERSION=	1.5
10
PORTREVISION=	6
11
CATEGORIES=	sysutils
10
CATEGORIES=	sysutils
12
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
11
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
13
12
14
MAINTAINER=	wen@FreeBSD.org
13
MAINTAINER=	gahr@FreeBSD.org
15
COMMENT=	A Terminal Multiplexer
14
COMMENT=	A Terminal Multiplexer
16
15
17
LICENSE=	BSD
16
LICENSE=	BSD
Lines 25-78 Link Here
25
PORTDOCS=	CHANGES FAQ NOTES
24
PORTDOCS=	CHANGES FAQ NOTES
26
PORTEXAMPLES=	*
25
PORTEXAMPLES=	*
27
26
28
OPTIONS=	KQUEUE   	"Build without define HAVE_BROKEN_KQUEUE " On \
27
OPTIONS=	LIBEVENT2	"Use libevent version 2" Off \
29
		LIBEVENT2	"Use libevent version 2" Off \
30
		LIBEVENT_STATIC	"Build with static libevent" Off \
28
		LIBEVENT_STATIC	"Build with static libevent" Off \
31
		BACKSPACE 	"Build with tty/keys patch" Off
29
		BACKSPACE 	"Build with tty/keys patch" Off
32
30
33
# Now I set tmux build without #define HAVE_BROKEN_KQUEUE as default and an option,
34
# If it still hang the system or other run error, try as upstream suggest:
35
# http://sourceforge.net/mailarchive/forum.php?thread_name=20110125092121.GA15934%40yelena.nicm.ath.cx&forum_name=tmux-users
36
37
.include <bsd.port.pre.mk>
31
.include <bsd.port.pre.mk>
38
32
39
.if defined(WITH_LIBEVENT2)
33
.if defined(WITH_LIBEVENT2)
40
EXTRA_CPPFLAGS+=	-I${LOCALBASE}/include/event2/compat -I${LOCALBASE}/include
34
LIB_DEPENDS=	event-2.0:${PORTSDIR}/devel/libevent2
35
CPPFLAGS+=	-I${LOCALBASE}/include/event2/compat -I${LOCALBASE}/include
41
LDFLAGS+=	-L${LOCALBASE}/lib/event2
36
LDFLAGS+=	-L${LOCALBASE}/lib/event2
42
.else
37
. if defined(WITH_LIBEVENT_STATIC)
43
EXTRA_CPPFLAGS+=	-I${LOCALBASE}/include
38
LESTATIC=	${LOCALBASE}/lib/event2/libevent.a
44
LDFLAGS+=	-L${LOCALBASE}/lib
45
.endif
46
47
MAKE_ENV+=	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}" LDFLAGS="${LDFLAGS}"
48
49
.if defined(WITH_LIBEVENT_STATIC)
50
. if defined(WITH_LIBEVENT2)
51
_LEVENT_LIB=	${LOCALBASE}/lib/event2/libevent.a
52
BUILD_DEPENDS+=	${_LEVENT_LIB}:${PORTSDIR}/devel/libevent2
53
. else
54
_LEVENT_LIB=	${LOCALBASE}/lib/libevent.a
55
BUILD_DEPENDS+=	${_LEVENT_LIB}:${PORTSDIR}/devel/libevent
56
. endif
39
. endif
57
.else
40
.else
58
. if defined(WITH_LIBEVENT2)
59
_LEVENT_LIB=	-levent-2.0
60
LIB_DEPENDS=	event-2.0:${PORTSDIR}/devel/libevent2
61
. else
62
_LEVENT_LIB=	-levent-1.4
63
LIB_DEPENDS=	event-1.4:${PORTSDIR}/devel/libevent
41
LIB_DEPENDS=	event-1.4:${PORTSDIR}/devel/libevent
42
CPPFLAGS+=	-I${LOCALBASE}/include
43
LDFLAGS+=	-L${LOCALBASE}/lib
44
. if defined(WITH_LIBEVENT_STATIC)
45
LESTATIC=	${LOCALBASE}/lib/libevent.a
64
. endif
46
. endif
65
.endif
47
.endif
66
48
67
.if !defined(WITHOUT_KQUEUE)
49
CONFIGURE_ENV+=	LDFLAGS="${LDFLAGS}"
68
.if ${OSVERSION} < 702104
69
EXTRA_PATCHES=	${PATCHDIR}/extra-patch-kqueue_and_fb7
70
.else
71
EXTRA_PATCHES=	${PATCHDIR}/extra-patch-kqueue
72
.endif
73
.else
74
EXTRA_PATCHES=	${PATCHDIR}/extra-patch-fb7
75
.endif
76
50
77
.if defined(WITH_BACKSPACE)
51
.if defined(WITH_BACKSPACE)
78
EXTRA_PATCHES=	${PATCHDIR}/extra-patch-tty-keys.c
52
EXTRA_PATCHES=	${PATCHDIR}/extra-patch-tty-keys.c
Lines 80-93 Link Here
80
54
81
post-patch:
55
post-patch:
82
	@${REINPLACE_CMD} -e 's|/etc/tmux.conf|${PREFIX}/etc/tmux.conf|g' \
56
	@${REINPLACE_CMD} -e 's|/etc/tmux.conf|${PREFIX}/etc/tmux.conf|g' \
83
		${WRKSRC}/tmux.1 ${WRKSRC}/tmux.h
57
		${WRKSRC}/tmux.1 ${WRKSRC}/tmux.h ${WRKSRC}/CHANGES
84
	@${REINPLACE_CMD} -e 's|-I/usr/local/include||g' \
58
.if defined(WITH_LIBEVENT_STATIC)
85
		-e 's|/usr/local|${LOCALBASE}|g' \
59
	${REINPLACE_CMD} -e '4534s|$$ac_res |${LESTATIC} |' ${WRKSRC}/${CONFIGURE_SCRIPT}
86
		-e 's|$${CPPFLAGS}$$|${CPPFLAGS} ${EXTRA_CPPFLAGS}|g' \
60
.endif
87
		-e 's|LDFLAGS+=|#LDFLAGS+=|g' \
88
		${WRKSRC}/Makefile
89
	@${REINPLACE_CMD} -e 's|-levent|${_LEVENT_LIB}|g' \
90
		${WRKSRC}/configure
91
61
92
do-install:
62
do-install:
93
	@${INSTALL_PROGRAM} ${WRKSRC}/tmux ${PREFIX}/bin
63
	@${INSTALL_PROGRAM} ${WRKSRC}/tmux ${PREFIX}/bin
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (tmux-1.4.tar.gz) = c7e005f32e256b8ece214b71c51947f4081af8c5f0400083e4adaac2c258bbc7
1
SHA256 (tmux-1.5.tar.gz) = eb8215b57c05b765d2446d9acb2bc5edcdb3eb4ea31af89ee127a27e90056306
2
SIZE (tmux-1.4.tar.gz) = 259614
2
SIZE (tmux-1.5.tar.gz) = 374093
(-)files/extra-patch-fb7 (-18 lines)
Removed Link Here
1
--- configure.orig	2011-02-21 10:52:19.000000000 +0800
2
+++ configure	2011-02-21 10:54:29.000000000 +0800
3
@@ -224,7 +224,6 @@
4
 #define HAVE_ASPRINTF
5
 #define HAVE_BROKEN_KQUEUE
6
 #define HAVE_BZERO
7
-#define HAVE_CLOSEFROM
8
 #define HAVE_DAEMON
9
 #define HAVE_FGETLN
10
 #define HAVE_FORKPTY
11
@@ -245,6 +244,7 @@
12
 	cat <<EOF >>$CONFIG_MK
13
 LIBS+= -lcurses -lutil -levent
14
 SRCS+= osdep-freebsd.c \
15
+	compat/closefrom.c \
16
 	compat/vis.c \
17
 	compat/unvis.c \
18
 	compat/imsg-buffer.c \
(-)files/extra-patch-kqueue (-10 lines)
Removed Link Here
1
--- configure.orig	2011-02-21 14:12:33.000000000 +0800
2
+++ configure	2011-02-21 14:13:00.000000000 +0800
3
@@ -222,7 +222,6 @@
4
     FreeBSD|DragonFly)
5
 	cat <<EOF >>$CONFIG_H
6
 #define HAVE_ASPRINTF
7
-#define HAVE_BROKEN_KQUEUE
8
 #define HAVE_BZERO
9
 #define HAVE_CLOSEFROM
10
 #define HAVE_DAEMON
(-)files/extra-patch-kqueue_and_fb7 (-20 lines)
Removed Link Here
1
--- configure.orig	2011-02-21 14:37:37.000000000 +0800
2
+++ configure	2011-02-21 14:38:21.000000000 +0800
3
@@ -222,9 +222,7 @@
4
     FreeBSD|DragonFly)
5
 	cat <<EOF >>$CONFIG_H
6
 #define HAVE_ASPRINTF
7
-#define HAVE_BROKEN_KQUEUE
8
 #define HAVE_BZERO
9
-#define HAVE_CLOSEFROM
10
 #define HAVE_DAEMON
11
 #define HAVE_FGETLN
12
 #define HAVE_FORKPTY
13
@@ -245,6 +243,7 @@
14
 	cat <<EOF >>$CONFIG_MK
15
 LIBS+= -lcurses -lutil -levent
16
 SRCS+= osdep-freebsd.c \
17
+	compat/closefrom.c \
18
 	compat/vis.c \
19
 	compat/unvis.c \
20
 	compat/imsg-buffer.c \
(-)files/patch-hostname.diff (-32 lines)
Removed Link Here
1
--- status.c.orig	2011/04/18 20:49:05	1.73
2
+++ status.c	2011/04/24 22:32:07	1.74
3
@@ -1,4 +1,4 @@
4
-/* $OpenBSD: status.c,v 1.73 2011/04/18 19:49:05 nicm Exp $ */
5
+/* $OpenBSD: status.c,v 1.74 2011/04/24 21:32:07 nicm Exp $ */
6
 
7
 /*
8
  * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
9
@@ -408,6 +408,13 @@ status_replace1(struct client *c, struct session *s, s
10
 	case 'H':
11
 		if (gethostname(tmp, sizeof tmp) != 0)
12
 			fatal("gethostname failed");
13
+		ptr = tmp;
14
+		goto do_replace;
15
+	case 'h':
16
+		if (gethostname(tmp, sizeof tmp) != 0)
17
+			fatal("gethostname failed");
18
+		if ((ptr = strchr(tmp, '.')) != NULL)
19
+			*ptr = '\0';
20
 		ptr = tmp;
21
 		goto do_replace;
22
 	case 'I':
23
--- tmux.1.orig	2011/04/19 22:31:33	1.223
24
+++ tmux.1	2011/04/24 22:32:07	1.224
25
@@ -2005,6 +2005,7 @@ may contain any of the following special character seq
26
 .It Li "#(shell-command)" Ta "First line of the command's output"
27
 .It Li "#[attributes]" Ta "Colour or attribute change"
28
 .It Li "#H" Ta "Hostname of local host"
29
+.It Li "#h" Ta "Hostname of local host without the domain name"
30
 .It Li "#F" Ta "Current window flag"
31
 .It Li "#I" Ta "Current window index"
32
 .It Li "#P" Ta "Current pane index"

Return to bug 158946