diff options
author | rillig <rillig@pkgsrc.org> | 2006-10-25 21:37:51 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2006-10-25 21:37:51 +0000 |
commit | ebee3c2219621b1cb54eb8e2d721bd5de2034589 (patch) | |
tree | 3840d25a6dd34d877602b1bcd66d104bf50582de /misc/watch | |
parent | d1d51c5b3009c0cc9da827d59f91e468a1fad6d0 (diff) | |
download | pkgsrc-ebee3c2219621b1cb54eb8e2d721bd5de2034589.tar.gz |
Made the package work again on Solaris.
Diffstat (limited to 'misc/watch')
-rw-r--r-- | misc/watch/Makefile | 11 | ||||
-rw-r--r-- | misc/watch/files/Makefile | 8 | ||||
-rw-r--r-- | misc/watch/patches/patch-ab | 29 |
3 files changed, 31 insertions, 17 deletions
diff --git a/misc/watch/Makefile b/misc/watch/Makefile index be9c59fd8b6..fb3e6c3ce49 100644 --- a/misc/watch/Makefile +++ b/misc/watch/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.8 2006/09/09 02:43:11 obache Exp $ +# $NetBSD: Makefile,v 1.9 2006/10/25 21:37:51 rillig Exp $ DISTNAME= procps-3.2.6 +PKGNAME= watch-3.2.6 PKGREVISION= 1 -PKGNAME= ${DISTNAME:S/procps/watch/} CATEGORIES= misc MASTER_SITES= http://procps.sourceforge.net/ @@ -10,9 +10,10 @@ MAINTAINER= simonb@NetBSD.org COMMENT= Watch a program with update intervals MAKE_FILE= ${FILESDIR}/Makefile -MAKE_ENV+= BINOWN=${BINOWN:Q} BINGRP=${BINGRP:Q} -MAKE_ENV+= MANOWN=${MANOWN:Q} MANGRP=${MANGRP:Q} +MAKE_ENV+= ${BSD_MAKE_ENV} +MAKE_ENV+= LIBS=${LIBS} -.include "../../devel/ncurses/buildlink3.mk" +LIBS.SunOS+= -lrt +.include "../../devel/ncurses/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/misc/watch/files/Makefile b/misc/watch/files/Makefile index 3377071b93c..d564e6225c7 100644 --- a/misc/watch/files/Makefile +++ b/misc/watch/files/Makefile @@ -1,10 +1,6 @@ -# $NetBSD: Makefile,v 1.1.1.1 1999/06/16 01:32:51 simonb Exp $ +# $NetBSD: Makefile,v 1.2 2006/10/25 21:37:51 rillig Exp $ PROG= watch -LDADD+= -lcurses -DPADD+= ${LIBCURSES} - -BINDIR= ${PREFIX}/bin -MANDIR= ${PREFIX}/man +LDADD+= -lncurses ${LIBS} .include <bsd.prog.mk> diff --git a/misc/watch/patches/patch-ab b/misc/watch/patches/patch-ab index 5286b95b6fd..4e1a228ffda 100644 --- a/misc/watch/patches/patch-ab +++ b/misc/watch/patches/patch-ab @@ -1,8 +1,8 @@ -$NetBSD: patch-ab,v 1.1 2006/07/11 16:35:24 smb Exp $ +$NetBSD: patch-ab,v 1.2 2006/10/25 21:37:51 rillig Exp $ ---- watch.c.orig 2006-07-09 20:58:47.000000000 -0400 -+++ watch.c 2006-07-09 21:01:56.000000000 -0400 -@@ -142,6 +142,7 @@ +--- watch.c.orig 2006-10-25 23:13:48.793523972 +0200 ++++ watch.c 2006-10-25 23:25:56.542821832 +0200 +@@ -142,6 +142,7 @@ main(int argc, char *argv[]) option_differences_cumulative = 0, option_help = 0, option_version = 0; float interval = 2; @@ -10,7 +10,7 @@ $NetBSD: patch-ab,v 1.1 2006/07/11 16:35:24 smb Exp $ char *command; int command_length = 0; /* not including final \0 */ -@@ -201,6 +202,9 @@ +@@ -199,6 +200,9 @@ main(int argc, char *argv[]) if (optind >= argc) do_usage(); @@ -20,7 +20,24 @@ $NetBSD: patch-ab,v 1.1 2006/07/11 16:35:24 smb Exp $ command = strdup(argv[optind++]); command_length = strlen(command); for (; optind < argc; optind++) { -@@ -315,7 +319,7 @@ +@@ -246,10 +250,16 @@ main(int argc, char *argv[]) + } + + if (show_title) { ++#if defined(__sun) ++ header = malloc(width + 1); ++ if (!header) { perror("malloc"); do_exit(2); } ++ snprintf(header, width + 1, "Every %.1fs: %s", interval, command); ++#else + // left justify interval and command, + // right justify time, clipping all to fit window width + asprintf(&header, "Every %.1fs: %.*s", + interval, min(width - 1, command_length), command); ++#endif + mvaddstr(0, 0, header); + if (strlen(header) > (size_t) (width - tsl - 1)) + mvaddstr(0, width - tsl - 4, "... "); +@@ -313,7 +323,7 @@ main(int argc, char *argv[]) first_screen = 0; refresh(); |