Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Sep 2010 03:23:02 +0400
From:      Anonymous <swell.k@gmail.com>
To:        dlt@mebtel.net
Cc:        freebsd-ports@freebsd.org
Subject:   Re: nmh-1.2 on CURRENT
Message-ID:  <868w2y3acp.fsf@gmail.com>
In-Reply-To: <20100918190115.GA56265@oriental.arm.org> (Derek Tattersall's message of "Sat, 18 Sep 2010 15:01:15 -0400")
References:  <20100918190115.GA56265@oriental.arm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Derek Tattersall <dlt@mebtel.net> writes:

> nmh-1.2 has not been updated for the new utmpx implementation.  The
> patch is not terribly large.  I haven't figured how to conditionally
> patch for Current, vs. leaving it alone on other releases.

How about using AC_CHECK_HEADERS(utmp.h) + #ifdef HAVE_UTMP_H ?

> --- uip/rcvtty.c.orig	2010-09-18 14:23:38.000000000 -0400
> +++ uip/rcvtty.c	2010-09-18 14:27:18.000000000 -0400
> @@ -23,7 +23,7 @@
>  #include <signal.h>
>  #include <fcntl.h>
>  
> -#include <utmp.h>
> +#include <utmpx.h>
>  
>  #ifndef HAVE_GETUTENT
>  # ifndef UTMP_FILE

%%
@@ -23,7 +23,11 @@
 #include <signal.h>
 #include <fcntl.h>
 
+#ifdef HAVE_UTMP_H
 #include <utmp.h>
+#else
+#include <utmpx.h>
+#endif
 
 #ifndef HAVE_GETUTENT
 # ifndef UTMP_FILE
%%

%%
Index: mail/nmh/Makefile
===================================================================
RCS file: /a/.cvsup/ports/mail/nmh/Makefile,v
retrieving revision 1.47
diff -u -p -r1.47 Makefile
--- mail/nmh/Makefile	15 Sep 2010 18:34:44 -0000	1.47
+++ mail/nmh/Makefile	18 Sep 2010 23:16:17 -0000
@@ -63,7 +63,7 @@ COMMENT=	A cleaned up MH mailer suite
 
 USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
-USE_AUTOTOOLS=	autoconf:267
+USE_AUTOTOOLS=	autoconf:267 autoheader:267
 CONFIGURE_ARGS=	--libdir=${PREFIX}/libexec/nmh \
 		--sysconfdir=${PREFIX}/etc/nmh
 .ifdef NMH_EDITOR
Index: mail/nmh/files/patch-configure_in
===================================================================
RCS file: /a/.cvsup/ports/mail/nmh/files/patch-configure_in,v
retrieving revision 1.1
diff -u -p -r1.1 patch-configure_in
--- mail/nmh/files/patch-configure_in	23 Feb 2006 04:37:58 -0000	1.1
+++ mail/nmh/files/patch-configure_in	18 Sep 2010 23:16:41 -0000
@@ -10,3 +10,11 @@ diff -ru ./configure.in ../../work-save/
  
  dnl --------------
  dnl CHECK FOR NDBM
+@@ -807,6 +807,7 @@
+   AC_DEFINE(HAVE_TM_GMTOFF)
+ fi
+ 
++AC_CHECK_HEADERS(utmp.h)
+ AC_CACHE_CHECK(for ut_type in struct utmp, nmh_cv_struct_utmp_ut_type,
+ [AC_TRY_COMPILE(
+ [#include <utmp.h>],
%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?868w2y3acp.fsf>