pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/games/agm



Module Name:    pkgsrc
Committed By:   kamil
Date:           Wed Jul 27 20:37:27 UTC 2016

Added Files:
        pkgsrc/games/agm: DESCR Makefile PLIST distinfo
        pkgsrc/games/agm/patches: patch-Makefile patch-agm.h patch-gobble.c
            patch-listfuncs.c patch-main.c patch-output.c patch-process.c
            patch-progress.c patch-sort.c patch-wordfuncs.c

Log Message:
Import agm-1.3.1 as games/agm

Multiple-word anagram search program.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/games/agm/DESCR pkgsrc/games/agm/Makefile \
    pkgsrc/games/agm/PLIST pkgsrc/games/agm/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/games/agm/patches/patch-Makefile \
    pkgsrc/games/agm/patches/patch-agm.h \
    pkgsrc/games/agm/patches/patch-gobble.c \
    pkgsrc/games/agm/patches/patch-listfuncs.c \
    pkgsrc/games/agm/patches/patch-main.c \
    pkgsrc/games/agm/patches/patch-output.c \
    pkgsrc/games/agm/patches/patch-process.c \
    pkgsrc/games/agm/patches/patch-progress.c \
    pkgsrc/games/agm/patches/patch-sort.c \
    pkgsrc/games/agm/patches/patch-wordfuncs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/games/agm/DESCR
diff -u /dev/null pkgsrc/games/agm/DESCR:1.1
--- /dev/null   Wed Jul 27 20:37:27 2016
+++ pkgsrc/games/agm/DESCR      Wed Jul 27 20:37:27 2016
@@ -0,0 +1 @@
+Multiple-word anagram search program.
Index: pkgsrc/games/agm/Makefile
diff -u /dev/null pkgsrc/games/agm/Makefile:1.1
--- /dev/null   Wed Jul 27 20:37:27 2016
+++ pkgsrc/games/agm/Makefile   Wed Jul 27 20:37:27 2016
@@ -0,0 +1,41 @@
+# $NetBSD: Makefile,v 1.1 2016/07/27 20:37:27 kamil Exp $
+
+DISTNAME=      agm-1.3.1
+CATEGORIES=    games
+MASTER_SITES=  ${MASTER_SITE_SUNSITE:=games/amusements/}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+# Nothing better available
+HOMEPAGE=      ${MASTER_SITE_SUNSITE:=games/amusements/}
+COMMENT=       Multiple-word anagram search program
+LICENSE=       generic-nonlicense
+
+SUBST_CLASSES+=                rcsids
+SUBST_MESSAGE.rcsids=  Strip RCS IDs as they cause problems when patching.
+SUBST_STAGE.rcsids=    pre-patch
+SUBST_FILES.rcsids+=   agm.h
+SUBST_FILES.rcsids+=   gobble.c
+SUBST_FILES.rcsids+=   listfuncs.c
+SUBST_FILES.rcsids+=   main.c
+SUBST_FILES.rcsids+=   output.c
+SUBST_FILES.rcsids+=   process.c
+SUBST_FILES.rcsids+=   progress.c
+SUBST_FILES.rcsids+=   sort.c
+SUBST_FILES.rcsids+=   wordfuncs.c
+SUBST_SED.rcsids=      -e "s!.Revision: !Revision: !"
+
+MAKE_FLAGS+=   BINDIR=${PREFIX}/bin
+MAKE_FLAGS+=   MANDIR=${PREFIX}/${PKGMANDIR}
+MAKE_FLAGS+=   WORDDIR=${PREFIX}/share/agm
+MAKE_FLAGS+=   CC=${CC:Q}
+
+INSTALL_TARGET=                install install-words
+
+REPLACE_INTERPRETER+=  wish
+REPLACE.wish.old=      /usr/bin/wish
+REPLACE.wish.new=      ${PREFIX}/bin/wish
+REPLACE_FILES.wish=    xagm
+
+DEPENDS+=      tk-[0-9]*:../../x11/tk
+
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/games/agm/PLIST
diff -u /dev/null pkgsrc/games/agm/PLIST:1.1
--- /dev/null   Wed Jul 27 20:37:27 2016
+++ pkgsrc/games/agm/PLIST      Wed Jul 27 20:37:27 2016
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST,v 1.1 2016/07/27 20:37:27 kamil Exp $
+bin/agm
+bin/xagm
+man/man6/agm.6
+share/agm/words
Index: pkgsrc/games/agm/distinfo
diff -u /dev/null pkgsrc/games/agm/distinfo:1.1
--- /dev/null   Wed Jul 27 20:37:27 2016
+++ pkgsrc/games/agm/distinfo   Wed Jul 27 20:37:27 2016
@@ -0,0 +1,16 @@
+$NetBSD: distinfo,v 1.1 2016/07/27 20:37:27 kamil Exp $
+
+SHA1 (agm-1.3.1.tar.gz) = 9afcbd47e8bbb79e2f08d009d10e9690ae9f200d
+RMD160 (agm-1.3.1.tar.gz) = b348b99ef9ef58f474d7a0acff572c369bbaf55e
+SHA512 (agm-1.3.1.tar.gz) = 143c6c3a31e542f59bbb0fab4372a2747f78b299fff07b9f136b41c930423b27a56f1c9635efa1248caf05d0449f6e63a0c5ed86d136a1c3ffa6309d64297687
+Size (agm-1.3.1.tar.gz) = 420211 bytes
+SHA1 (patch-Makefile) = c110bb95255a95e704bdf22982e37e70e3f88ea3
+SHA1 (patch-agm.h) = f42842dd674aef9916db797e3129d4f19ed08874
+SHA1 (patch-gobble.c) = 3de1579992333e14ac4b79aa3af769ec8b90a36a
+SHA1 (patch-listfuncs.c) = 5435c91ef466ed5b4d45a07e901719d351aead0c
+SHA1 (patch-main.c) = 2c78fe21976e70c2c4c0901eb43e47e3d1a9c481
+SHA1 (patch-output.c) = d2cef6500c8e3722b2b8585e225404f8eacb4447
+SHA1 (patch-process.c) = e45c178c4222bfe22322a6b021695555dc04292f
+SHA1 (patch-progress.c) = e78a24afff320c0d01431b514a1c61d1c3426a03
+SHA1 (patch-sort.c) = 77f811b6eb166182a0cbe133546a4fc2ac222bac
+SHA1 (patch-wordfuncs.c) = 2b180cbabc3f5c7178b2c52a8deb619ed54c485a

Index: pkgsrc/games/agm/patches/patch-Makefile
diff -u /dev/null pkgsrc/games/agm/patches/patch-Makefile:1.1
--- /dev/null   Wed Jul 27 20:37:27 2016
+++ pkgsrc/games/agm/patches/patch-Makefile     Wed Jul 27 20:37:27 2016
@@ -0,0 +1,45 @@
+$NetBSD: patch-Makefile,v 1.1 2016/07/27 20:37:27 kamil Exp $
+
+Adapt install target for pkgsrc.
+
+--- Makefile.orig      1998-03-18 01:02:29.000000000 +0000
++++ Makefile
+@@ -40,6 +40,7 @@
+ RELEASE=-DRELEASE=\"1.3\"
+ # Set this to the destination directory for the executable
+ #BINDIR=../../bin/`uname`
++DESTDIR?=
+ BINDIR=/usr/local/bin
+ # Location of manual pages
+ #MANDIR=../../man
+@@ -93,18 +94,22 @@ sample_output: agm
+       ./agm -c2 williamshatner leonardnimoy > sample_output
+ 
+ $(MANDIR)/man6:
+-      mkdir $(MANDIR)/man6
++      install -d $(DESTDIR)$(MANDIR)/man6
+ 
+ install: agm agm.6 $(MANDIR)/man6
+-      strip agm
+-      cp {,x}agm $(BINDIR)
+-      chmod 755 $(BINDIR)/{,x}agm
+-      cp agm.6 $(MANDIR)/man6
+-      chmod 644 $(MANDIR)/man6/agm.6
++      install -d $(DESTDIR)$(BINDIR)
++      cp agm $(DESTDIR)$(BINDIR)
++      cp xagm $(DESTDIR)$(BINDIR)
++      chmod 755 $(DESTDIR)$(BINDIR)/agm
++      chmod 755 $(DESTDIR)$(BINDIR)/xagm
++      install -d $(DESTDIR)$(MANDIR)/man6
++      cp agm.6 $(DESTDIR)$(MANDIR)/man6
++      chmod 644 $(DESTDIR)$(MANDIR)/man6/agm.6
+ 
+ install-words:
+-      cp words $(WORDDIR)
+-      chmod 644 $(WORDDIR)/words
++      install -d $(DESTDIR)$(WORDDIR)
++      cp words $(DESTDIR)$(WORDDIR)
++      chmod 644 $(DESTDIR)$(WORDDIR)/words
+ 
+ clean:
+       rm -f agm agm.o agm*.tar* agm*.shar agm.ps *.o
Index: pkgsrc/games/agm/patches/patch-agm.h
diff -u /dev/null pkgsrc/games/agm/patches/patch-agm.h:1.1
--- /dev/null   Wed Jul 27 20:37:27 2016
+++ pkgsrc/games/agm/patches/patch-agm.h        Wed Jul 27 20:37:27 2016
@@ -0,0 +1,24 @@
+$NetBSD: patch-agm.h,v 1.1 2016/07/27 20:37:27 kamil Exp $
+
+Fix K&R code.
+
+--- agm.h.orig 2016-07-27 20:12:55.337407545 +0000
++++ agm.h
+@@ -134,5 +134,15 @@ extern struct wnode *lstart, *lend;
+ extern char main_RCSid[], gobble_RCSid[], listfuncs_RCSid[], output_RCSid[],
+             process_RCSid[], sort_RCSid[], wordfuncs_RCSid[], progress_RCSid[];
+ 
+-extern void copysmall();
+-extern void arm_timer(), disarm_timer();
++extern void copysmall(char *, char *);
++extern void arm_timer(void), disarm_timer(void);
++extern int contains (char *, char *, unsigned int *);
++extern int addword (char *, struct wnode **, struct wnode **);
++extern int eliminate (char *, char *, char *);
++extern void print_prevs (int);
++extern void destroy_list (struct wnode *, struct wnode *);
++extern void gobble_file (char *, char *);
++extern void merge_sort (struct wnode **, int);
++extern void list_dictionary (struct wnode *);
++extern void minus_process (char *, char *);
++extern void process (char *, struct wnode *, struct wnode *, unsigned int, unsigned int, unsigned int);
Index: pkgsrc/games/agm/patches/patch-gobble.c
diff -u /dev/null pkgsrc/games/agm/patches/patch-gobble.c:1.1
--- /dev/null   Wed Jul 27 20:37:27 2016
+++ pkgsrc/games/agm/patches/patch-gobble.c     Wed Jul 27 20:37:27 2016
@@ -0,0 +1,25 @@
+$NetBSD: patch-gobble.c,v 1.1 2016/07/27 20:37:27 kamil Exp $
+
+Fix K&R code.
+
+--- gobble.c.orig      2016-07-27 20:12:55.340913088 +0000
++++ gobble.c
+@@ -22,8 +22,11 @@ char gobble_RCSid[] = "Revision: 1.4 $";
+ 
+ #include "agm.h"
+ 
+-gobble_file (filename, command)
+-    char *filename, *command;
++#include <stdlib.h>
++#include <unistd.h>
++
++void
++gobble_file (char *filename, char *command)
+ {
+   FILE *fp;
+   int is_a_tty2 = 0;
+@@ -81,4 +84,3 @@ gobble_file (filename, command)
+   }
+   if (notquiet) printf (" %d words\n", wordcount - before_count);
+ }
+-
Index: pkgsrc/games/agm/patches/patch-listfuncs.c
diff -u /dev/null pkgsrc/games/agm/patches/patch-listfuncs.c:1.1
--- /dev/null   Wed Jul 27 20:37:27 2016
+++ pkgsrc/games/agm/patches/patch-listfuncs.c  Wed Jul 27 20:37:27 2016
@@ -0,0 +1,30 @@
+$NetBSD: patch-listfuncs.c,v 1.1 2016/07/27 20:37:27 kamil Exp $
+
+Fix K&R code.
+
+--- listfuncs.c.orig   2016-07-27 20:12:55.344357171 +0000
++++ listfuncs.c
+@@ -18,8 +18,10 @@ char listfuncs_RCSid[] = "Revision: 1.3 
+ 
+ #include "agm.h"
+ 
+-destroy_list (ls, le)
+-    struct wnode *ls, *le;
++#include <stdlib.h>
++
++void
++destroy_list (struct wnode *ls, struct wnode *le)
+ {
+   struct wnode *loop = ls, *last;
+ 
+@@ -30,9 +32,7 @@ destroy_list (ls, le)
+   }
+ }
+ 
+-int addword (word, ls, le)
+-    char *word;
+-    struct wnode **ls, **le;
++int addword (char *word, struct wnode **ls, struct wnode **le)
+ {
+   struct wnode *new;
+   int i;
Index: pkgsrc/games/agm/patches/patch-main.c
diff -u /dev/null pkgsrc/games/agm/patches/patch-main.c:1.1
--- /dev/null   Wed Jul 27 20:37:27 2016
+++ pkgsrc/games/agm/patches/patch-main.c       Wed Jul 27 20:37:27 2016
@@ -0,0 +1,26 @@
+$NetBSD: patch-main.c,v 1.1 2016/07/27 20:37:27 kamil Exp $
+
+Fix K&R code.
+
+--- main.c.orig        2016-07-27 20:12:55.347835407 +0000
++++ main.c
+@@ -60,6 +60,7 @@ char main_RCSid[] = "Revision: 1.11 $";
+ #include "agm.h"
+ /* following just for getrusage () */
+ #include <unistd.h>
++#include <stdlib.h>
+ 
+ int listdict = FALSE; /* just output the final word dictionary */
+ int hardmin = FALSE; /* hard minimums on words */
+@@ -86,9 +87,8 @@ struct wnode *lstart = NULL, *lend = NUL
+ 
+ int pct= 0, lastpct = -1; /* percentage complete counters */
+ 
+-main (argc, argv)
+-  int argc;
+-  char **argv;
++int
++main (int argc, char **argv)
+ {
+   int wordno; /* loops along argument list */
+   void matchwords ();
Index: pkgsrc/games/agm/patches/patch-output.c
diff -u /dev/null pkgsrc/games/agm/patches/patch-output.c:1.1
--- /dev/null   Wed Jul 27 20:37:27 2016
+++ pkgsrc/games/agm/patches/patch-output.c     Wed Jul 27 20:37:27 2016
@@ -0,0 +1,28 @@
+$NetBSD: patch-output.c,v 1.1 2016/07/27 20:37:27 kamil Exp $
+
+Fix K&R code.
+
+--- output.c.orig      2016-07-27 20:12:55.351278093 +0000
++++ output.c
+@@ -24,8 +24,8 @@ char output_RCSid[] = "Revision: 1.5 $";
+ 
+ #include "agm.h"
+ 
+-print_prevs (percent)
+-     int percent;
++void
++print_prevs (int percent)
+ {
+   int loop;
+ 
+@@ -46,8 +46,8 @@ print_prevs (percent)
+   spos += totlen + prevcount + 1;
+ }
+ 
+-list_dictionary (p)
+-  struct wnode *p;
++void
++list_dictionary (struct wnode *p)
+ {
+   while (p != NULL) {
+     puts (p->word);
Index: pkgsrc/games/agm/patches/patch-process.c
diff -u /dev/null pkgsrc/games/agm/patches/patch-process.c:1.1
--- /dev/null   Wed Jul 27 20:37:27 2016
+++ pkgsrc/games/agm/patches/patch-process.c    Wed Jul 27 20:37:27 2016
@@ -0,0 +1,23 @@
+$NetBSD: patch-process.c,v 1.1 2016/07/27 20:37:27 kamil Exp $
+
+Fix K&R code.
+
+--- process.c.orig     2016-07-27 20:12:55.354713027 +0000
++++ process.c
+@@ -27,14 +27,11 @@ char process_RCSid[] = "Revision: 1.6 $"
+ 
+ #include "agm.h"
+ 
+-process (word, ls, le, minlen, maxw, depth)
++void
++process (char *word, struct wnode *ls, struct wnode *le, unsigned int minlen, unsigned int maxw, unsigned int depth)
+     /* searches the list ls - le for words which can be extracted from
+        word; if a word extracts exactly, the words in prevs are printed out,
+        otherwise, a sublist is built, and process() called recursively */
+-    char *word;
+-    struct wnode *ls, *le;
+-    unsigned int minlen;
+-    unsigned int depth;
+ {
+   char newword[WORDLEN];
+   struct wnode *loop;
Index: pkgsrc/games/agm/patches/patch-progress.c
diff -u /dev/null pkgsrc/games/agm/patches/patch-progress.c:1.1
--- /dev/null   Wed Jul 27 20:37:27 2016
+++ pkgsrc/games/agm/patches/patch-progress.c   Wed Jul 27 20:37:27 2016
@@ -0,0 +1,49 @@
+$NetBSD: patch-progress.c,v 1.1 2016/07/27 20:37:27 kamil Exp $
+
+Fix K&R code.
+
+--- progress.c.orig    2016-07-27 20:12:55.358141535 +0000
++++ progress.c
+@@ -7,18 +7,20 @@ char progress_RCSid[] = "Revision: 1.1 $
+ 
+ #include "agm.h"
+ 
+-void print_progress () {
++#include <signal.h>
++
++void print_progress (int unused) {
+   printf ("%02d\b\b", pct);
+   fflush (stdout);
+ }
+ 
+-void arm_timer ()
++void arm_timer (void)
+ {
+   struct sigaction action;
+   struct itimerval tmr;
+ 
+-  action.sa_handler = &print_progress;
+-  action.sa_mask = 0;
++  action.sa_handler = print_progress;
++  sigemptyset(&action.sa_mask);
+   action.sa_flags = 0;
+   sigaction (SIGALRM, &action, NULL);
+   
+@@ -29,7 +31,7 @@ void arm_timer ()
+   setitimer (ITIMER_REAL, &tmr, NULL);
+ }
+ 
+-void disarm_timer ()
++void disarm_timer (void)
+ {
+   struct sigaction action;
+   struct itimerval tmr;
+@@ -41,7 +43,7 @@ void disarm_timer ()
+   setitimer (ITIMER_REAL, &tmr, NULL);
+ 
+   action.sa_handler = SIG_DFL;
+-  action.sa_mask = 0;
++  sigemptyset(&action.sa_mask);
+   action.sa_flags = 0;
+   sigaction (SIGALRM, &action, NULL);
+ }
Index: pkgsrc/games/agm/patches/patch-sort.c
diff -u /dev/null pkgsrc/games/agm/patches/patch-sort.c:1.1
--- /dev/null   Wed Jul 27 20:37:27 2016
+++ pkgsrc/games/agm/patches/patch-sort.c       Wed Jul 27 20:37:27 2016
@@ -0,0 +1,18 @@
+$NetBSD: patch-sort.c,v 1.1 2016/07/27 20:37:27 kamil Exp $
+
+Fix K&R code.
+
+--- sort.c.orig        2016-07-27 20:12:55.361585478 +0000
++++ sort.c
+@@ -14,9 +14,8 @@ char sort_RCSid[] = "Revision: 1.2 $";
+ 
+ #include "agm.h"
+ 
+-merge_sort (start, length)
+-    struct wnode **start;
+-    int length;
++void
++merge_sort (struct wnode **start, int length)
+ {
+   struct wnode *p, *q, *s1, *s2;
+   int i, cmp;
Index: pkgsrc/games/agm/patches/patch-wordfuncs.c
diff -u /dev/null pkgsrc/games/agm/patches/patch-wordfuncs.c:1.1
--- /dev/null   Wed Jul 27 20:37:27 2016
+++ pkgsrc/games/agm/patches/patch-wordfuncs.c  Wed Jul 27 20:37:27 2016
@@ -0,0 +1,51 @@
+$NetBSD: patch-wordfuncs.c,v 1.1 2016/07/27 20:37:27 kamil Exp $
+
+Fix K&R code.
+
+--- wordfuncs.c.orig   2016-07-27 20:12:55.365038920 +0000
++++ wordfuncs.c
+@@ -14,9 +14,9 @@ char wordfuncs_RCSid[] = "Revision: 1.2 
+ 
+ #include "agm.h"
+ 
+-int contains (word, subword, length)
+-    char *word, *subword;
+-    unsigned int *length;
++#include <stdlib.h>
++
++int contains (char *word, char *subword, unsigned int *length)
+ {
+   char copyword[WORDLEN];
+   char *cpos, *sloop;
+@@ -36,8 +36,7 @@ int contains (word, subword, length)
+   return TRUE;
+ }
+ 
+-int eliminate (word, subword, remains)
+-    char *word, *subword, *remains;
++int eliminate (char *word, char *subword, char *remains)
+ {
+   char copyword[WORDLEN];
+   char *remloop = remains, *copyloop = copyword;
+@@ -55,8 +54,8 @@ int eliminate (word, subword, remains)
+   *remloop = '\0';
+ }
+ 
+-minus_process (word, command)
+-    char *word, *command;
++void
++minus_process (char *word, char *command)
+ {
+   char *minus_pos, copy[WORDLEN];
+   unsigned int dummy;
+@@ -78,9 +77,7 @@ minus_process (word, command)
+   }
+ }
+ 
+-void copysmall (s1, s2)
+-  char
+-      *s1, *s2;
++void copysmall (char *s1, char *s2)
+ {
+   while (*s2 != '\0') {
+     if (*s2 >= 'A' && *s2 <= 'Z') {



Home | Main Index | Thread Index | Old Index