Subject: sysutils/whowatch: avoid depend to ncurses (PR 10816)
To: None <rh@netbsd.org>
From: Jun-ichiro itojun Hagino <itojun@itojun.org>
List: tech-pkg
Date: 08/11/2000 22:23:21
the attached patch removes dependency to ncurses, from
sysutils/whowatch. whowatch depends on ncurses/curses
difference, documented in PR10816. the patch removes the
assuption on the behavior.
do you think it useful to apply the patch?
PR10816 should be solved separately, of course.
itojun
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/whowatch/Makefile,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile
--- Makefile 2000/06/12 16:20:53 1.1.1.1
+++ Makefile 2000/08/11 13:21:33
@@ -9,9 +9,15 @@
MAINTAINER= rh@netbsd.org
HOMEPAGE= http://wizard.ae.krakow.pl/~mike/\#whowatch
-DEPENDS+= ncurses-*:../../devel/ncurses
+# ncurses is not required any more
+#
+#DEPENDS+= ncurses-*:../../devel/ncurses
+BUILD_DEPENDS= autoreconf:../../devel/autoconf
GNU_CONFIGURE= YES
CONFIGURE_ENV+= CFLAGS="${CFLAGS} -I${PREFIX}/include"
+
+pre-configure:
+ (cd ${WRKSRC}; autoreconf)
.include "../../mk/bsd.pkg.mk"
Index: files/patch-sum
===================================================================
RCS file: patch-sum
diff -N patch-sum
--- /dev/null Fri Aug 11 15:06:43 2000
+++ patch-sum Fri Aug 11 16:21:33 2000
@@ -0,0 +1,7 @@
+$NetBSD$
+
+MD5 (patch-aa) = ff34b5ff30b83af6e7d3ecbab4896dd4
+MD5 (patch-ab) = 6f43b62c6bccda9f35f489ef43ca54ff
+MD5 (patch-ac) = a12be317d0772b4e649224693da58fbf
+MD5 (patch-ad) = ed9d388f9b924d350fce1ab22b106c7e
+MD5 (patch-ae) = 221f53ce7422c718652f759b400f0679
Index: patches/patch-aa
===================================================================
RCS file: patch-aa
diff -N patch-aa
--- /dev/null Fri Aug 11 15:06:43 2000
+++ patch-aa Fri Aug 11 16:21:33 2000
@@ -0,0 +1,11 @@
+$NetBSD$
+--- whowatch.h.orig Wed Jun 7 02:41:12 2000
++++ whowatch.h Fri Aug 11 22:11:00 2000
+@@ -11,3 +11,7 @@
+ #include <sys/ioctl.h>
++#ifdef USE_NCURSES
+ #include <ncurses.h>
++#else
++#include <curses.h>
++#endif
+ #include <assert.h>
Index: patches/patch-ab
===================================================================
RCS file: patch-ab
diff -N patch-ab
--- /dev/null Fri Aug 11 15:06:43 2000
+++ patch-ab Fri Aug 11 16:21:33 2000
@@ -0,0 +1,9 @@
+$NetBSD$
+--- screen.c- Fri Aug 11 22:05:43 2000
++++ screen.c Fri Aug 11 22:06:00 2000
+@@ -118,3 +118,4 @@
+ i--;
+- waddnstr(w->wd, q, p - q);
++ if (p - q != 0)
++ waddnstr(w->wd, q, p - q);
+ wattrset(w->wd, COLOR_PAIR(*p));
Index: patches/patch-ac
===================================================================
RCS file: patch-ac
diff -N patch-ac
--- /dev/null Fri Aug 11 15:06:43 2000
+++ patch-ac Fri Aug 11 16:21:33 2000
@@ -0,0 +1,25 @@
+$NetBSD$
+--- whowatch.c- Fri Aug 11 22:06:36 2000
++++ whowatch.c Fri Aug 11 22:07:02 2000
+@@ -22,3 +22,3 @@
+
+-enum key { ENTER=0x100, UP, DOWN, LEFT, RIGHT, DELETE, ESC, CTRL_K, CTRL_I,
++enum key { ENTER=0x100, K_UP, K_DOWN, LEFT, RIGHT, DELETE, ESC, CTRL_K, CTRL_I,
+ PG_DOWN, PG_UP, HOME, END };
+@@ -346,4 +346,4 @@
+ switch(c) {
+- case 0x41: return UP;
+- case 0x42: return DOWN;
++ case 0x41: return K_UP;
++ case 0x42: return K_DOWN;
+ case 0x34:
+@@ -476,3 +476,3 @@
+ break;
+- case UP:
++ case K_UP:
+ cursor_up(windows[state]);
+@@ -480,3 +480,3 @@
+ break;
+- case DOWN:
++ case K_DOWN:
+ cursor_down(windows[state]);
Index: patches/patch-ad
===================================================================
RCS file: patch-ad
diff -N patch-ad
--- /dev/null Fri Aug 11 15:06:43 2000
+++ patch-ad Fri Aug 11 16:21:33 2000
@@ -0,0 +1,8 @@
+$NetBSD$
+--- configure.in- Fri Aug 11 22:09:40 2000
++++ configure.in Fri Aug 11 22:09:52 2000
+@@ -19,3 +19,3 @@
+ CURS=0
+-AC_CHECK_LIB(ncurses, scrollok, [CURS=1 ; LIBS="$LIBS -lncurses"])
++AC_CHECK_LIB(ncurses, scrollok, [CURS=1 ; LIBS="$LIBS -lncurses" ; AC_DEFINE(USE_NCURSES)])
+ if test "$CURS" != "1"; then
Index: patches/patch-ae
===================================================================
RCS file: patch-ae
diff -N patch-ae
--- /dev/null Fri Aug 11 15:06:43 2000
+++ patch-ae Fri Aug 11 16:21:33 2000
@@ -0,0 +1,8 @@
+$NetBSD$
+--- acconfig.h- Fri Aug 11 22:10:13 2000
++++ acconfig.h Fri Aug 11 22:10:28 2000
+@@ -22 +22,4 @@
+ #undef HAVE_LIBKVM
++
++/* define if ncurses is used */
++#undef USE_NCURSES