aboutsummaryrefslogtreecommitdiffstats
path: root/x11/rxvt-devel
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2010-05-09 18:06:04 +0800
committermiwi <miwi@FreeBSD.org>2010-05-09 18:06:04 +0800
commit8e77f699300a2aed43834e91a3ba2d6df8b3a853 (patch)
tree514720c0f448213ac13472ce9e148ab1c04caf60 /x11/rxvt-devel
parentab8c29bcfcf806ad37b3cda37500fd99537c3011 (diff)
downloadfreebsd-ports-gnome-8e77f699300a2aed43834e91a3ba2d6df8b3a853.tar.gz
freebsd-ports-gnome-8e77f699300a2aed43834e91a3ba2d6df8b3a853.tar.zst
freebsd-ports-gnome-8e77f699300a2aed43834e91a3ba2d6df8b3a853.zip
- Fix build on head
PR: 143954 Submitted by: bf <bf1783@gmail.com> Approved by: maintainer
Diffstat (limited to 'x11/rxvt-devel')
-rw-r--r--x11/rxvt-devel/Makefile10
-rw-r--r--x11/rxvt-devel/files/patch-src::rxvt.h11
-rw-r--r--x11/rxvt-devel/files/utmp_patch-src::logging.c (renamed from x11/rxvt-devel/files/patch-src::logging.c)0
-rw-r--r--x11/rxvt-devel/files/utmpx_patch-src::logging.c50
4 files changed, 68 insertions, 3 deletions
diff --git a/x11/rxvt-devel/Makefile b/x11/rxvt-devel/Makefile
index 3e61c83b1906..76ea1b927add 100644
--- a/x11/rxvt-devel/Makefile
+++ b/x11/rxvt-devel/Makefile
@@ -39,7 +39,7 @@ OPTIONS= 256_COLOR "Build with 256-color support" off \
XIM "Build with XIM support" off \
XTERM "Build with Xterm scrollbar" off
-CONFIGURE_ARGS= --enable-utmp --enable-wtmp --enable-languages \
+CONFIGURE_ARGS= --enable-utmp --enable-lastlog \
--with-xpm --enable-xpm-background --enable-shared \
--enable-mousewheel --disable-languages
USE_LDCONFIG= yes
@@ -48,8 +48,12 @@ MAN1= rxvt.1
.include <bsd.port.pre.mk>
-.if ${OSVERSION} > 900007
-BROKEN= fails to build with new utmpx
+.if ${OSVERSION} >= 900007
+CONFIGURE_ARGS+= --disable-wtmp
+EXTRA_PATCHES+= ${FILESDIR}/utmpx_patch-src::logging.c
+.else
+CONFIGURE_ARGS+= --enable-wtmp
+EXTRA_PATCHES+= ${FILESDIR}/utmp_patch-src::logging.c
.endif
# enable 256 color
diff --git a/x11/rxvt-devel/files/patch-src::rxvt.h b/x11/rxvt-devel/files/patch-src::rxvt.h
new file mode 100644
index 000000000000..c3c5b44495c5
--- /dev/null
+++ b/x11/rxvt-devel/files/patch-src::rxvt.h
@@ -0,0 +1,11 @@
+--- src/rxvt.h
++++ src/rxvt.h
+@@ -804,7 +804,7 @@
+ #define rxvt_Gr_ButtonRelease(x,y) rxvt_Gr_ButtonReport (r, 'R',(x),(y))
+
+ #ifdef UTMP_SUPPORT
+-# if !defined(RXVT_UTMPX_FILE) || !defined(HAVE_STRUCT_UTMPX)
++# if !defined(HAVE_STRUCT_UTMPX)
+ # undef HAVE_UTMPX_H
+ # undef HAVE_STRUCT_UTMPX
+ # endif
diff --git a/x11/rxvt-devel/files/patch-src::logging.c b/x11/rxvt-devel/files/utmp_patch-src::logging.c
index 20f9e436a24a..20f9e436a24a 100644
--- a/x11/rxvt-devel/files/patch-src::logging.c
+++ b/x11/rxvt-devel/files/utmp_patch-src::logging.c
diff --git a/x11/rxvt-devel/files/utmpx_patch-src::logging.c b/x11/rxvt-devel/files/utmpx_patch-src::logging.c
new file mode 100644
index 000000000000..80f1a96def9e
--- /dev/null
+++ b/x11/rxvt-devel/files/utmpx_patch-src::logging.c
@@ -0,0 +1,50 @@
+--- src/logging.c
++++ src/logging.c
+@@ -82,7 +82,8 @@
+ else if (sscanf(pty, "pts/%d", &i) == 1)
+ sprintf(ut_id, "vt%02x", (i & 0xff)); /* sysv naming */
+ #endif
+- else if (STRNCMP(pty, "pty", 3) && STRNCMP(pty, "tty", 3)) {
++ else if (STRNCMP(pty, "pty", 3) && STRNCMP(pty, "tty", 3) &&
++ STRNCMP(pty, "pts/", 4)) {
+ rxvt_print_error("can't parse tty name \"%s\"", pty);
+ return;
+ }
+@@ -137,7 +138,9 @@
+ STRNCPY(utx->ut_user, (pwent && pwent->pw_name) ? pwent->pw_name : "?",
+ sizeof(utx->ut_user));
+ STRNCPY(utx->ut_id, ut_id, sizeof(utx->ut_id));
++#if 0
+ utx->ut_session = getsid(0);
++#endif
+ utx->ut_tv.tv_sec = time(NULL);
+ utx->ut_tv.tv_usec = 0;
+ utx->ut_pid = r->h->cmd_pid;
+@@ -202,7 +205,7 @@
+ rxvt_update_wtmp(RXVT_WTMP_FILE, ut);
+ # endif
+ # endif
+-# ifdef HAVE_STRUCT_UTMPX
++# if 0
+ updwtmpx(RXVT_WTMPX_FILE, utx);
+ # endif
+ }
+@@ -254,7 +257,9 @@
+ if ((tmputx = getutxid(utx))) /* position to entry in utmp file */
+ utx = tmputx;
+ utx->ut_type = DEAD_PROCESS;
++#if 0
+ utx->ut_session = getsid(0);
++#endif
+ utx->ut_tv.tv_sec = time(NULL);
+ utx->ut_tv.tv_usec = 0;
+ #endif
+@@ -274,7 +279,7 @@
+ rxvt_update_wtmp(RXVT_WTMP_FILE, ut);
+ # endif
+ # endif
+-# ifdef HAVE_STRUCT_UTMPX
++# if 0
+ updwtmpx(RXVT_WTMPX_FILE, utx);
+ # endif
+ }