From 8f3890624c549005cab3d03c8442687db0aec5fb Mon Sep 17 00:00:00 2001 From: sbd Date: Mon, 26 Dec 2011 01:54:39 +0000 Subject: Add AC_CHECK_HEADERS for , ifdef wrap it in ex/ex_script.c and because it may be called check for it and alternatively use it. In ex/ex_script.c disable the I_PUSH ioctl call on linux. --- editors/nvi/Makefile | 9 ++++++-- editors/nvi/distinfo | 4 +++- editors/nvi/patches/patch-.._dist_configure.in | 13 +++++++++++ editors/nvi/patches/patch-.._ex_ex__script.c | 32 ++++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 editors/nvi/patches/patch-.._dist_configure.in create mode 100644 editors/nvi/patches/patch-.._ex_ex__script.c diff --git a/editors/nvi/Makefile b/editors/nvi/Makefile index 5c0ac889f84..cbcb1b4e045 100644 --- a/editors/nvi/Makefile +++ b/editors/nvi/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.40 2011/01/10 11:06:29 obache Exp $ +# $NetBSD: Makefile,v 1.41 2011/12/26 01:54:39 sbd Exp $ DISTNAME= nvi-1.81.6 PKGREVISION= 6 @@ -16,7 +16,7 @@ PKG_DESTDIR_SUPPORT= user-destdir WRKSRC= ${WRKDIR}/${DISTNAME}/build.unix USE_LIBTOOL= yes -USE_TOOLS+= sh +USE_TOOLS+= sh aclocal automake autoheader autoconf GNU_CONFIGURE= yes CONFIGURE_SCRIPT= ../dist/configure CONFIGURE_ARGS+= --program-transform-name='s,^,n,' @@ -48,4 +48,9 @@ CONFIGURE_ARGS+= --with-db_type=db1 CONFIGURE_ARGS+= --with-db-prefix=${BDBBASE} BUILDLINK_TRANSFORM+= l:db:${BDB_TYPE} .endif + +pre-configure: + ${RUN} cd ${WRKSRC}/../dist && \ + aclocal -I m4 && autoheader && autoconf + .include "../../mk/bsd.pkg.mk" diff --git a/editors/nvi/distinfo b/editors/nvi/distinfo index d14fbdd5456..4dac0b540b2 100644 --- a/editors/nvi/distinfo +++ b/editors/nvi/distinfo @@ -1,8 +1,10 @@ -$NetBSD: distinfo,v 1.13 2010/06/02 13:24:34 adam Exp $ +$NetBSD: distinfo,v 1.14 2011/12/26 01:54:39 sbd Exp $ SHA1 (nvi-1.81.6.tar.bz2) = d3445ed69166102735335a2ff60d092d9a9143c6 RMD160 (nvi-1.81.6.tar.bz2) = 0db8568bea96392d9a027044177c60317c8ade36 Size (nvi-1.81.6.tar.bz2) = 1758309 bytes +SHA1 (patch-.._dist_configure.in) = 0341e7579b123b59f7ac8ecf1b2c4e8695f12118 +SHA1 (patch-.._ex_ex__script.c) = f294a079a4d830604cbf24bb31e89ceeb0f8f354 SHA1 (patch-aa) = 05b8dedd194b09ed5af1fb62273e771ebd7f4326 SHA1 (patch-ab) = 3687d1006015e84c1f9746b84e167602ae37b7fb SHA1 (patch-ac) = 3c345cb8871cb887a07ce83bbd43b1c49ebe4b33 diff --git a/editors/nvi/patches/patch-.._dist_configure.in b/editors/nvi/patches/patch-.._dist_configure.in new file mode 100644 index 00000000000..23788c0d959 --- /dev/null +++ b/editors/nvi/patches/patch-.._dist_configure.in @@ -0,0 +1,13 @@ +$NetBSD: patch-.._dist_configure.in,v 1.1 2011/12/26 01:54:39 sbd Exp $ + +--- ../dist/configure.in.orig 2007-11-18 16:41:42.000000000 +0000 ++++ ../dist/configure.in +@@ -787,6 +787,8 @@ if test "$vi_cv_gettimeofday" = broken; + fi + AC_MSG_RESULT($vi_cv_gettimeofday) + ++AC_CHECK_HEADERS([sys/stropts.h stropts.h]) ++ + dnl Check for which version of openpty to use, System V or Berkeley. + AC_MSG_CHECKING(for System V pty calls) + AC_CACHE_VAL(vi_cv_sys5_pty, [dnl diff --git a/editors/nvi/patches/patch-.._ex_ex__script.c b/editors/nvi/patches/patch-.._ex_ex__script.c new file mode 100644 index 00000000000..1c0c12d6441 --- /dev/null +++ b/editors/nvi/patches/patch-.._ex_ex__script.c @@ -0,0 +1,32 @@ +$NetBSD: patch-.._ex_ex__script.c,v 1.1 2011/12/26 01:54:39 sbd Exp $ + +--- ../ex/ex_script.c.orig 2007-11-18 16:41:42.000000000 +0000 ++++ ../ex/ex_script.c +@@ -23,8 +23,10 @@ static const char sccsid[] = "$Id: ex_sc + #include + #endif + #include +-#ifdef HAVE_SYS5_PTY ++#ifdef HAVE_SYS_STROPTS_H + #include ++#elif defined(HAVE_STROPTS_H) ++#include + #endif + #include + #include +@@ -750,6 +752,7 @@ ptys_open(int fdm, char *pts_name) + return (-5); + } + ++#ifndef __linux__ + if (ioctl(fds, I_PUSH, "ptem") < 0) { + close(fds); + close(fdm); +@@ -767,6 +770,7 @@ ptys_open(int fdm, char *pts_name) + close(fdm); + return (-8); + } ++#endif + + return (fds); + } -- cgit v1.2.3