From ea7fa5fc674d04b81099a09d9d4fc48da81bba63 Mon Sep 17 00:00:00 2001 From: naddy Date: Sat, 13 Jan 2001 16:12:04 +0000 Subject: [PATCH] Import wmeyes. Submitted by Peter Stromberg . WMeyes is a pretty simple application: it sits in the WindowMaker dock, and a pair of eyes track your cursor. Actually, the program should work in all window managers, but then you don't have a dock to sit it in, in which case you might as well use xeyes. --- games/wmeyes/Makefile | 22 ++++++ games/wmeyes/files/md5 | 3 + games/wmeyes/patches/patch-Imakefile | 9 +++ games/wmeyes/patches/patch-wmeyes_c | 110 +++++++++++++++++++++++++++ games/wmeyes/pkg/COMMENT | 1 + games/wmeyes/pkg/DESCR | 17 +++++ games/wmeyes/pkg/PLIST | 2 + 7 files changed, 164 insertions(+) create mode 100644 games/wmeyes/Makefile create mode 100644 games/wmeyes/files/md5 create mode 100644 games/wmeyes/patches/patch-Imakefile create mode 100644 games/wmeyes/patches/patch-wmeyes_c create mode 100644 games/wmeyes/pkg/COMMENT create mode 100644 games/wmeyes/pkg/DESCR create mode 100644 games/wmeyes/pkg/PLIST diff --git a/games/wmeyes/Makefile b/games/wmeyes/Makefile new file mode 100644 index 00000000000..589d9163c5d --- /dev/null +++ b/games/wmeyes/Makefile @@ -0,0 +1,22 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2001/01/13 16:12:04 naddy Exp $ + +DISTNAME= wmeyes +PKGNAME= ${DISTNAME}-0.0 +CATEGORIES= games x11 +NEED_VERSION= 1.340 +MASTER_SITES= http://home.istar.ca/~jenora/ +EXTRACT_SUFX= .tgz +HOMEPAGE= http://home.istar.ca/~jenora/wmeyes.html + +MAINTAINER= Peter Stromberg + +PERMIT_PACKAGE_CDROM= "no license" +PERMIT_PACKAGE_FTP= "no license" +PERMIT_DISTFILES_CDROM= "no license" +PERMIT_DISTFILES_FTP= "no license" + +WRKDIST= ${WRKDIR} + +CONFIGURE_STYLE= imake noman + +.include diff --git a/games/wmeyes/files/md5 b/games/wmeyes/files/md5 new file mode 100644 index 00000000000..b1a9b6e30c9 --- /dev/null +++ b/games/wmeyes/files/md5 @@ -0,0 +1,3 @@ +MD5 (wmeyes.tgz) = 611509fd1ced9fc90abaa6487ea307eb +RMD160 (wmeyes.tgz) = b3f97f1d445eae5015c62014cfcf704106119ab4 +SHA1 (wmeyes.tgz) = 607312783306dd7dd699d02cadc51f7eb0000fe2 diff --git a/games/wmeyes/patches/patch-Imakefile b/games/wmeyes/patches/patch-Imakefile new file mode 100644 index 00000000000..4a25f648bec --- /dev/null +++ b/games/wmeyes/patches/patch-Imakefile @@ -0,0 +1,9 @@ +$OpenBSD: patch-Imakefile,v 1.1.1.1 2001/01/13 16:12:04 naddy Exp $ +--- Imakefile.orig Mon May 4 05:17:00 1998 ++++ Imakefile Fri Jan 12 14:57:38 2001 +@@ -7,4 +7,4 @@ LOCAL_LIBRARIES = $(XMULIB) $(XTOOLLIB) + SRCS = wmeyes.c + OBJS = wmeyes.o + +-ComplexProgramTarget(wmeyes) ++ComplexProgramTargetNoMan(wmeyes) diff --git a/games/wmeyes/patches/patch-wmeyes_c b/games/wmeyes/patches/patch-wmeyes_c new file mode 100644 index 00000000000..fa498dd28c2 --- /dev/null +++ b/games/wmeyes/patches/patch-wmeyes_c @@ -0,0 +1,110 @@ +$OpenBSD: patch-wmeyes_c,v 1.1.1.1 2001/01/13 16:12:04 naddy Exp $ +--- wmeyes.c.orig Sun May 24 03:44:25 1998 ++++ wmeyes.c Fri Jan 12 15:04:09 2001 +@@ -1,9 +1,9 @@ + #include + #include ++#include + #include + #include + #include +-#include + #include + + #include +@@ -74,7 +74,7 @@ void update(); + void scanArgs(int argc,char *argv[]); + unsigned long getColor(char *colorName); + +-void do_nothing(void) ++void do_nothing(int a) + { + } + +@@ -318,23 +318,11 @@ void update() + void scanArgs(int argc, char *argv[]) + { + int c; +- int opt_index; + bool helpflag = FALSE; + bool errflag = FALSE; + +- static struct option long_opts[] = { +- {"help", no_argument, NULL, 'h'}, +- {"withdrawn", no_argument, NULL, 'w'}, +- {"shape", no_argument, NULL, 's'}, +- {"pupil", required_argument, NULL, 'p'}, +- {"outside", required_argument, NULL, 'o'}, +- {"inside", required_argument, NULL, 'i'}, +- {"time", required_argument, NULL, 't'}, +- {"display", required_argument, NULL, 'd'}}; +- + while(1) { +- opt_index = 0; +- c = getopt_long_only(argc, argv, "hwsp:o:i:d:", long_opts, &opt_index); ++ c = getopt(argc, argv, "hwsp:o:i:d:t:"); + if (c == -1) { + break; + } +@@ -349,23 +337,19 @@ void scanArgs(int argc, char *argv[]) + ushape = TRUE; + break; + case 'p': +- strncpy(eyecol, optarg, 255); +- eyecol[255] = '\0'; ++ strlcpy(eyecol, optarg, sizeof(eyecol)); + break; + case 'o': +- strncpy(outcol, optarg, 255); +- outcol[255] = '\0'; ++ strlcpy(outcol, optarg, sizeof(outcol)); + break; + case 'i': +- strncpy(incol, optarg, 255); +- incol[255] = '\0'; ++ strlcpy(incol, optarg, sizeof(incol)); + break; + case 't': + repmsec = atol(optarg); + break; + case 'd': +- strncpy(dispname, optarg, 255); +- dispname[255] = '\0'; ++ strlcpy(dispname, optarg, sizeof(dispname)); + break; + default: + errflag = TRUE; +@@ -373,23 +357,22 @@ void scanArgs(int argc, char *argv[]) + } + } + if (errflag) { +- fprintf(stderr, "Usage: %s [-h] [-ws] [-p pupclr] [-o outclr] [-i inclr] [-display disp]\n", argv[0]); ++ fprintf(stderr, "Usage: %s [-h] [-w] [-s] [-p pupclr] [-o outclr] [-i inclr] [-d disp] [-t time]\n", argv[0]); + exit(1); + } + if (helpflag) { + fprintf(stderr,"WMeyes 1.0 - The world's most useless WindowMaker dock app.\n"); + fprintf(stderr,"by Bryan Feir (jenora@istar.ca)\n\n"); + fprintf(stderr,"Usage: %s [-h] [-ws] [-p pupclr] [-o outclr] [-i inclr] [-display disp]\n", argv[0]); +- fprintf(stderr,"short long argument description\n"); +- fprintf(stderr," -h --help display this help screen\n"); +- fprintf(stderr," -w --withdrawn withdraw window (for WindowMaker)\n"); +- fprintf(stderr," -s --shape use shaped window\n"); +- fprintf(stderr," -p --pupil pupclr set the colour of the eyes' pupils (default %s)\n", EYECOLOR); +- fprintf(stderr," -o --outside outclr set the outside colour of the eyes (default %s)\n", OUTCOLOR); +- fprintf(stderr," -i --inside inclr set the inside colour of the eyes (default %s)\n", INCOLOR); +- fprintf(stderr," -t --time msec set the interation time in msec (default %d)\n", REPTIME); +- fprintf(stderr," -d --display disp set the X display to use\n"); +- fprintf(stderr," -display disp set the X display to use\n"); ++ fprintf(stderr,"argument description\n"); ++ fprintf(stderr," -h display this help screen\n"); ++ fprintf(stderr," -w withdraw window (for WindowMaker)\n"); ++ fprintf(stderr," -s use shaped window\n"); ++ fprintf(stderr," -p pupclr set the colour of the eyes' pupils (default %s)\n", EYECOLOR); ++ fprintf(stderr," -o outclr set the outside colour of the eyes (default %s)\n", OUTCOLOR); ++ fprintf(stderr," -i inclr set the inside colour of the eyes (default %s)\n", INCOLOR); ++ fprintf(stderr," -t msec set the interation time in msec (default %d)\n", REPTIME); ++ fprintf(stderr," -d disp set the X display to use\n"); + exit(0); + } + } diff --git a/games/wmeyes/pkg/COMMENT b/games/wmeyes/pkg/COMMENT new file mode 100644 index 00000000000..a52723d0f7c --- /dev/null +++ b/games/wmeyes/pkg/COMMENT @@ -0,0 +1 @@ +dockable version of xeyes diff --git a/games/wmeyes/pkg/DESCR b/games/wmeyes/pkg/DESCR new file mode 100644 index 00000000000..923f9b51e21 --- /dev/null +++ b/games/wmeyes/pkg/DESCR @@ -0,0 +1,17 @@ +WMeyes is a pretty simple application: it sits in the +WindowMaker dock, and a pair of eyes track your cursor. +Actually, the program should work in all window managers, +but then you don't have a dock to sit it in, in which case +you might as well use xeyes. + +The 'time' parameter on the command line affects both the +update time of the pupil moving around, and the time it +takes for the eyelids to open or close. These two can't be +separated. + +The standard method of starting it up under WindowMaker is +'wmeyes -w -s &'. + +'wmeyes -h' gives you usage info. + +WWW: ${HOMEPAGE} diff --git a/games/wmeyes/pkg/PLIST b/games/wmeyes/pkg/PLIST new file mode 100644 index 00000000000..e9d51392e2d --- /dev/null +++ b/games/wmeyes/pkg/PLIST @@ -0,0 +1,2 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2001/01/13 16:12:04 naddy Exp $ +bin/wmeyes