diff options
author | pat <pat@FreeBSD.org> | 2001-12-31 09:40:18 +0800 |
---|---|---|
committer | pat <pat@FreeBSD.org> | 2001-12-31 09:40:18 +0800 |
commit | 74661dabd6d598514ed9097dc121fe73025d9e0f (patch) | |
tree | 914fdd309164132f82d6b0b26ac9fdcc3229311c /net/wmq3 | |
parent | 09a60336f70d57c3b9c07c4da745e56679ea7e28 (diff) | |
download | freebsd-ports-gnome-74661dabd6d598514ed9097dc121fe73025d9e0f.tar.gz freebsd-ports-gnome-74661dabd6d598514ed9097dc121fe73025d9e0f.tar.zst freebsd-ports-gnome-74661dabd6d598514ed9097dc121fe73025d9e0f.zip |
Add new port wmq3 (sucessor to wmqmon), a dockapp that queries quake 3
servers and display information such as current map and number of players
Diffstat (limited to 'net/wmq3')
-rw-r--r-- | net/wmq3/Makefile | 32 | ||||
-rw-r--r-- | net/wmq3/distinfo | 1 | ||||
-rw-r--r-- | net/wmq3/files/patch-Makefile | 38 | ||||
-rw-r--r-- | net/wmq3/files/patch-wmq3.c | 72 | ||||
-rw-r--r-- | net/wmq3/pkg-comment | 1 | ||||
-rw-r--r-- | net/wmq3/pkg-descr | 5 | ||||
-rw-r--r-- | net/wmq3/pkg-message | 5 | ||||
-rw-r--r-- | net/wmq3/pkg-plist | 3 |
8 files changed, 157 insertions, 0 deletions
diff --git a/net/wmq3/Makefile b/net/wmq3/Makefile new file mode 100644 index 000000000000..bcdc4ca352d7 --- /dev/null +++ b/net/wmq3/Makefile @@ -0,0 +1,32 @@ +# New ports collection makefile for: wmq3 +# Date created: Sat Dec 29 23:19:57 EST 2001 +# Whom: Patrick Li <pat@databits.net> +# +# $FreeBSD$ +# + +PORTNAME= wmq3 +PORTVERSION= 0.2.2 +CATEGORIES= net windowmaker games +MASTER_SITES= http://www.soberart.de/down/ + +MAINTAINER= pat@FreeBSD.org + +RUN_DEPENDS= qstat:${PORTSDIR}/games/qstat + +WRKSRC= ${WRKDIR}/${PORTNAME}/${PORTNAME} +USE_GMAKE= yes +USE_X_PREFIX= yes +USE_XPM= yes + +do-install: + @${INSTALL_PROGRAM} ${WRKSRC}/wmq3 ${PREFIX}/bin + @${MKDIR} ${PREFIX}/share/examples/${PORTNAME} + @${INSTALL_DATA} ${WRKSRC}/wmq3rc \ + ${PREFIX}/share/examples/${PORTNAME} + +post-install: + @${SED} 's|%%EXAMPLEDIR%%|${PREFIX}/share/examples/${PORTNAME}|' \ + ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/net/wmq3/distinfo b/net/wmq3/distinfo new file mode 100644 index 000000000000..e27e8e58c37c --- /dev/null +++ b/net/wmq3/distinfo @@ -0,0 +1 @@ +MD5 (wmq3-0.2.2.tar.gz) = dd7cfe203fbecc11af021f325c408083 diff --git a/net/wmq3/files/patch-Makefile b/net/wmq3/files/patch-Makefile new file mode 100644 index 000000000000..35fb478986d0 --- /dev/null +++ b/net/wmq3/files/patch-Makefile @@ -0,0 +1,38 @@ +--- Makefile.orig Fri Dec 7 03:35:14 2001 ++++ Makefile Sat Dec 29 23:02:58 2001 +@@ -1,30 +1,15 @@ +-LIBDIR = -L/usr/X11R6/lib +-MANDIR = /usr/local/man/man1/ +-INSTALL = install ++LIBDIR = -L${X11BASE}/lib + LIBS = -lXpm -lXext -lX11 ++CFLAGS += -I${X11BASE}/include + OBJS = wmq3.o \ + ../wmgeneral/wmgeneral.o \ + ../wmgeneral/misc.o \ + ../wmgeneral/list.o + +- + .c.o: +- cc -c -O2 -Wall $< -o $*.o ++ ${CC} -c $< -o $*.o $(CFLAGS) + + wmq3: $(OBJS) +- cc -o wmq3 $^ -lXext $(LIBDIR) $(LIBS) +- +-all:: wmifs +- +-clean:: +- for i in $(OBJS) ; do \ +- rm $$i ; \ +- done +- rm wmq3 ++ ${CC} -o wmq3 $^ -lXext $(LIBDIR) $(LIBS) + +-install:: +- cp -f wmq3 /usr/local/bin/ +- cp -f wmq3rc /etc/ +- chmod 755 /usr/local/bin/wmq3 +- chown root:root /usr/local/bin/wmq3 +- $(INSTALL) -m 644 -o root -g root ./wmq3.1 $(MANDIR) ++all: wmq3 diff --git a/net/wmq3/files/patch-wmq3.c b/net/wmq3/files/patch-wmq3.c new file mode 100644 index 000000000000..4d8d2e8da27c --- /dev/null +++ b/net/wmq3/files/patch-wmq3.c @@ -0,0 +1,72 @@ +--- wmq3.c.orig Sun Dec 9 18:34:46 2001 ++++ wmq3.c Sun Dec 30 01:56:37 2001 +@@ -72,6 +72,7 @@ + int TimerDivisor=60; + int WaveForm=0; + int myStatus=0; ++char *rcfilename = NULL; + + // serverstuff + char server[100][10]; +@@ -100,7 +101,7 @@ + void DrawStats(int *, int, int, int, int); + int left(char *mleft, char *line,char limiter); + void strip(char *line); +-int GetConfig(); ++int GetConfig(char *config); + void ButtonUp(int); + void ButtonDown(int); + void execute(); +@@ -118,11 +119,15 @@ + if (strlen(ProgName) >= 4) + ProgName += (strlen(ProgName) - 4); + +- if(GetConfig()<0) +- { +- printf("No servers in configfile\n"); +- exit(0); +- } ++ if (!rcfilename) ++ { ++ char *homedir; ++ homedir = getenv("HOME"); ++ rcfilename = calloc(1, strlen(homedir) + 9); ++ strcat(rcfilename, homedir); ++ strcat(rcfilename, "/.wmq3rc"); ++ } ++ GetConfig(rcfilename); + currserver=0; + wmq3_routine(argc, argv); + return 1; +@@ -476,7 +481,7 @@ + /******************************************************************************* + read config + ******************************************************************************/ +-int GetConfig() ++int GetConfig(char *config) + { + FILE *fh; + char buffer[256]; +@@ -487,8 +492,10 @@ + clickcall = (char **)malloc(30 * sizeof(char*)); + + // read configfile +- fh=fopen("/etc/wmq3rc","r"); ++ fh=fopen(config,"r"); + ++ if(fh) ++ { + memset(buffer,0,sizeof(buffer)); + clickparms=-1; + while(fgets(buffer,255,fh)) +@@ -549,6 +556,10 @@ + + fclose(fh); + return scount; ++ } else { ++ fprintf(stderr,"No config file found.\n"); ++ } ++ + } + void strip(char *line) + { diff --git a/net/wmq3/pkg-comment b/net/wmq3/pkg-comment new file mode 100644 index 000000000000..123d32435dce --- /dev/null +++ b/net/wmq3/pkg-comment @@ -0,0 +1 @@ +Dockapp that query and display information on Quake 3 servers diff --git a/net/wmq3/pkg-descr b/net/wmq3/pkg-descr new file mode 100644 index 000000000000..1d54844991a1 --- /dev/null +++ b/net/wmq3/pkg-descr @@ -0,0 +1,5 @@ +wmq3 queries Quake 3 servers and display information such as what is the +current map and how many people are currently playing. + +WWW: http://www.scriptgott.com/ +Author: Sober <sober@scriptgott.com> diff --git a/net/wmq3/pkg-message b/net/wmq3/pkg-message new file mode 100644 index 000000000000..69b424dae69c --- /dev/null +++ b/net/wmq3/pkg-message @@ -0,0 +1,5 @@ + +==> Example configuration file has been installed to +==> %%EXAMPLEDIR%%/wmq3rc +==> Edit and copy it to ~/.wmq3rc + diff --git a/net/wmq3/pkg-plist b/net/wmq3/pkg-plist new file mode 100644 index 000000000000..8dbb816b3fb7 --- /dev/null +++ b/net/wmq3/pkg-plist @@ -0,0 +1,3 @@ +bin/wmq3 +share/examples/wmq3/wmq3rc +@dirrm share/examples/wmq3 |