diff --git a/x11/xwrits/Makefile b/x11/xwrits/Makefile new file mode 100644 index 00000000000..9d516c118cd --- /dev/null +++ b/x11/xwrits/Makefile @@ -0,0 +1,24 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2001/04/04 20:29:30 naddy Exp $ + +COMMENT= "typing break alarm and timer" + +DISTNAME= xwrits-2.14 +CATEGORIES= x11 +NEED_VERSION= 1.363 +HOMEPAGE= http://www.lcdf.org/~eddietwo/xwrits/ + +MAINTAINER= Dan Weeks + +# GPL +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +MASTER_SITES= ${HOMEPAGE} + +USE_X11= Yes +SEPARATE_BUILD= concurrent +CONFIGURE_STYLE= gnu + +.include diff --git a/x11/xwrits/files/md5 b/x11/xwrits/files/md5 new file mode 100644 index 00000000000..9835b98bb54 --- /dev/null +++ b/x11/xwrits/files/md5 @@ -0,0 +1,3 @@ +MD5 (xwrits-2.14.tar.gz) = 1e52bd90a8d54f4221dabd5ec7c4177e +RMD160 (xwrits-2.14.tar.gz) = a43b565c8faabf99031e299c9c204a9784720eed +SHA1 (xwrits-2.14.tar.gz) = 43ea733e7dcfa24adf70667de7ccc1aa8f256bd5 diff --git a/x11/xwrits/patches/patch-gifread_c b/x11/xwrits/patches/patch-gifread_c new file mode 100644 index 00000000000..c90c3806b0c --- /dev/null +++ b/x11/xwrits/patches/patch-gifread_c @@ -0,0 +1,12 @@ +$OpenBSD: patch-gifread_c,v 1.1.1.1 2001/04/04 20:29:31 naddy Exp $ +--- gifread.c.orig Mon Mar 19 20:29:27 2001 ++++ gifread.c Mon Mar 19 20:29:29 2001 +@@ -828,7 +828,7 @@ read_gif(Gif_Reader *grr, int read_flags + default: + if (!unknown_block_type) { + char buf[256]; +- sprintf(buf, "unknown block type %d at file offset %d", block, gifgetoffset(grr) - 1); ++ snprintf(buf, sizeof(buf), "unknown block type %d at file offset %d", block, gifgetoffset(grr) - 1); + gif_read_error(&gfc, buf); + unknown_block_type = 1; + } diff --git a/x11/xwrits/patches/patch-lock_c b/x11/xwrits/patches/patch-lock_c new file mode 100644 index 00000000000..c3f07963f89 --- /dev/null +++ b/x11/xwrits/patches/patch-lock_c @@ -0,0 +1,21 @@ +$OpenBSD: patch-lock_c,v 1.1.1.1 2001/04/04 20:29:30 naddy Exp $ +--- lock.c.orig Mon Mar 19 20:12:39 2001 ++++ lock.c Mon Mar 19 20:13:18 2001 +@@ -88,7 +88,7 @@ draw_message(const char *message) + + if (!redraw) { + if (message) +- strcpy(cur_message, message); ++ strlcpy(cur_message, message, sizeof(cur_message)); + else + cur_message[0] = 0; + } +@@ -123,7 +123,7 @@ check_password(XKeyEvent *xkey) + draw_message("Incorrect password! Try again"); + else { + char message[MAX_MESSAGE_SIZE]; +- strcpy(message, "Enter password to unlock screen"); ++ strlcpy(message, "Enter password to unlock screen", sizeof(message)); + if (password_pos > 0) { + int i, pos = strlen(message); + message[pos++] = ':'; diff --git a/x11/xwrits/patches/patch-pictures_c b/x11/xwrits/patches/patch-pictures_c new file mode 100644 index 00000000000..e19647b9099 --- /dev/null +++ b/x11/xwrits/patches/patch-pictures_c @@ -0,0 +1,23 @@ +$OpenBSD: patch-pictures_c,v 1.1.1.1 2001/04/04 20:29:31 naddy Exp $ +--- pictures.c.orig Mon Mar 19 20:10:40 2001 ++++ pictures.c Mon Mar 19 20:11:42 2001 +@@ -223,7 +223,7 @@ parse_slideshow(const char *slideshowtex + int i; + + if (strlen(slideshowtext) >= BUFSIZ) return 0; +- strcpy(buf, slideshowtext); ++ strlcpy(buf, slideshowtext, sizeof(buf)); + s = buf; + + gfs = Gif_NewStream(); +@@ -240,8 +240,8 @@ parse_slideshow(const char *slideshowtex + + if (n[0] == '&') { + /* built-in image */ +- strcpy(name, n + 1); +- if (mono) strcat(name, "mono"); ++ strlcpy(name, n + 1, sizeof(name)); ++ if (mono) strlcat(name, "mono", sizeof(name)); + i = strlen(name); + add = get_built_in_image(name); + /* some images don't have monochromatic versions; fall back on color */ diff --git a/x11/xwrits/pkg/DESCR b/x11/xwrits/pkg/DESCR new file mode 100644 index 00000000000..970c410aa64 --- /dev/null +++ b/x11/xwrits/pkg/DESCR @@ -0,0 +1,9 @@ +Xwrits reminds you to take wrist breaks for prevention or management +of repetitive stress injuries. When you should take a break, it +pops up an X window, the warning window. You click on the warning +window, then take a break. The window changes appearance while you +take the break. It changes again when your break is over. Then +you just resume typing. Xwrits hides itself until you should take +another break. + +WWW: ${HOMEPAGE} diff --git a/x11/xwrits/pkg/PLIST b/x11/xwrits/pkg/PLIST new file mode 100644 index 00000000000..31059d96ad9 --- /dev/null +++ b/x11/xwrits/pkg/PLIST @@ -0,0 +1,3 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2001/04/04 20:29:31 naddy Exp $ +bin/xwrits +man/man1/xwrits.1