From 5b32609d2f71e3bfcc6099d219dac0b7a91b29b2 Mon Sep 17 00:00:00 2001 From: Volker Stolz Date: Wed, 23 Jun 2004 12:13:02 +0000 Subject: [PATCH] - Update to 1.1 (keramida) - C89-ify (me) - Grab COMMENT from man-page synopsis (me) PR: ports/66649 Submitted by: keramida Approved by: maintainer timeout --- sysutils/roottail/Makefile | 5 +- sysutils/roottail/distinfo | 4 +- sysutils/roottail/files/patch-aa | 79 ++++++++++++++++++++++---------- 3 files changed, 61 insertions(+), 27 deletions(-) diff --git a/sysutils/roottail/Makefile b/sysutils/roottail/Makefile index 02ce469e5a61..a4c24b00f2cd 100644 --- a/sysutils/roottail/Makefile +++ b/sysutils/roottail/Makefile @@ -6,16 +6,17 @@ # PORTNAME= roottail -PORTVERSION= 0.2 +PORTVERSION= 1.1 CATEGORIES= sysutils MASTER_SITES= http://www.goof.com/pcg/marc/data/ DISTNAME= root-tail-${PORTVERSION} MAINTAINER= jedgar@FreeBSD.org -COMMENT= Simple utility to tail files/logs to a root X window +COMMENT= Print text directly to X11 root window MAN1= root-tail.1 PLIST_FILES= bin/root-tail USE_IMAKE= yes +MAKE_ARGS= CC="${CC}" .include diff --git a/sysutils/roottail/distinfo b/sysutils/roottail/distinfo index 00fc7263ddae..f7276d219b8b 100644 --- a/sysutils/roottail/distinfo +++ b/sysutils/roottail/distinfo @@ -1,2 +1,2 @@ -MD5 (root-tail-0.2.tar.gz) = 92c217c21c4388413b8fb3e0d9ffb6ac -SIZE (root-tail-0.2.tar.gz) = 12014 +MD5 (root-tail-1.1.tar.gz) = adb925c2781892bb5dcbdf9d5e579032 +SIZE (root-tail-1.1.tar.gz) = 20124 diff --git a/sysutils/roottail/files/patch-aa b/sysutils/roottail/files/patch-aa index 2ae41937a887..cc752b4659dc 100644 --- a/sysutils/roottail/files/patch-aa +++ b/sysutils/roottail/files/patch-aa @@ -1,31 +1,64 @@ ---- root-tail.c.orig Wed May 8 22:54:47 2002 -+++ root-tail.c Sun Mar 16 10:41:37 2003 -@@ -86,6 +86,7 @@ - void list_files(int); - void force_reopen(int); - void force_refresh(int); -+void exit_now(int); - void blank_window(int); +--- root-tail.c.orig Thu Apr 8 21:58:28 2004 ++++ root-tail.c Wed Jun 23 14:06:13 2004 +@@ -152,6 +152,7 @@ + void list_files (int); + void force_reopen (int); + void force_refresh (int); ++void exit_now (int); + void blank_window (int); - void InitWindow(void); -@@ -128,6 +129,12 @@ - redraw(); + void InitWindow (void); +@@ -198,6 +199,13 @@ } -+void exit_now(int signal) + void ++exit_now (int signal) +{ -+ fprintf (stderr, "Program exiting due to signal: %d\n", signal); -+ exit(-1); ++ fprintf (stderr, "Program exiting due to signal: %d\n", signal); ++ exit(-1); +} + - void blank_window(int dummy) ++void + blank_window (int dummy) { - XClearWindow(disp, root); -@@ -685,6 +692,7 @@ - install_signal(SIGHUP, force_reopen); - install_signal(SIGUSR1, list_files); - install_signal(SIGUSR2, force_refresh); -+ install_signal(SIGSEGV, exit_now); + XClearArea (disp, root, win_x, win_y, width + MARGIN_OF_ERROR, height, False); +@@ -655,11 +663,12 @@ + char * + concat_line (char *p1, const char *p2) + { ++ int l1,l2; ++ char *r; + assert(p2); - if (opt_daemonize) - daemonize(); +- int l1 = p1 ? strlen (p1) : 0; +- int l2 = strlen (p2); +- char *r; ++ l1 = p1 ? strlen (p1) : 0; ++ l2 = strlen (p2); + + if (p1) + r = xrealloc(p1, l1 + l2 + 1); +@@ -925,6 +934,7 @@ + int wrapped = 0; + char *break_p = NULL; + int width_at_break_p = 0; ++ int prefix_len; + spaces = 0; + + if (opt_justify) +@@ -992,7 +1002,6 @@ + if (!wrapped) + break; + +- int prefix_len; + + /* choose where to break the line */ + if (opt_wordwrap && break_p && break_p != beg) +@@ -1501,6 +1510,7 @@ + install_signal (SIGHUP, force_reopen); + install_signal (SIGUSR1, list_files); + install_signal (SIGUSR2, force_refresh); ++ install_signal (SIGSEGV, exit_now); + + if (opt_daemonize) + daemonize ();