summaryrefslogtreecommitdiff
path: root/editors/nvi
diff options
context:
space:
mode:
authorsbd <sbd@pkgsrc.org>2011-12-26 01:54:39 +0000
committersbd <sbd@pkgsrc.org>2011-12-26 01:54:39 +0000
commit8f3890624c549005cab3d03c8442687db0aec5fb (patch)
treed029ee5a8c3ba37ace73620adca68ad8d14b827b /editors/nvi
parent6ef4af5ce4aed9454d74f9d7adc2bc44d7fded9c (diff)
downloadpkgsrc-8f3890624c549005cab3d03c8442687db0aec5fb.tar.gz
Add AC_CHECK_HEADERS for <sys/stropts.h>, ifdef wrap it in ex/ex_script.c and
because it may be called <stropts.h> check for it and alternatively use it. In ex/ex_script.c disable the I_PUSH ioctl call on linux.
Diffstat (limited to 'editors/nvi')
-rw-r--r--editors/nvi/Makefile9
-rw-r--r--editors/nvi/distinfo4
-rw-r--r--editors/nvi/patches/patch-.._dist_configure.in13
-rw-r--r--editors/nvi/patches/patch-.._ex_ex__script.c32
4 files changed, 55 insertions, 3 deletions
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 <sys/select.h>
+ #endif
+ #include <sys/stat.h>
+-#ifdef HAVE_SYS5_PTY
++#ifdef HAVE_SYS_STROPTS_H
+ #include <sys/stropts.h>
++#elif defined(HAVE_STROPTS_H)
++#include <stropts.h>
+ #endif
+ #include <sys/time.h>
+ #include <sys/wait.h>
+@@ -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);
+ }