pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/games/agm Import agm-1.3.1 as games/agm



details:   https://anonhg.NetBSD.org/pkgsrc/rev/178cfd578485
branches:  trunk
changeset: 350420:178cfd578485
user:      kamil <kamil%pkgsrc.org@localhost>
date:      Wed Jul 27 20:37:27 2016 +0000

description:
Import agm-1.3.1 as games/agm

Multiple-word anagram search program.

diffstat:

 games/agm/DESCR                     |   1 +
 games/agm/Makefile                  |  41 +++++++++++++++++++++++++++++
 games/agm/PLIST                     |   5 +++
 games/agm/distinfo                  |  16 +++++++++++
 games/agm/patches/patch-Makefile    |  45 ++++++++++++++++++++++++++++++++
 games/agm/patches/patch-agm.h       |  24 +++++++++++++++++
 games/agm/patches/patch-gobble.c    |  25 ++++++++++++++++++
 games/agm/patches/patch-listfuncs.c |  30 +++++++++++++++++++++
 games/agm/patches/patch-main.c      |  26 ++++++++++++++++++
 games/agm/patches/patch-output.c    |  28 ++++++++++++++++++++
 games/agm/patches/patch-process.c   |  23 ++++++++++++++++
 games/agm/patches/patch-progress.c  |  49 +++++++++++++++++++++++++++++++++++
 games/agm/patches/patch-sort.c      |  18 +++++++++++++
 games/agm/patches/patch-wordfuncs.c |  51 +++++++++++++++++++++++++++++++++++++
 14 files changed, 382 insertions(+), 0 deletions(-)

diffs (truncated from 438 to 300 lines):

diff -r 7569113af35a -r 178cfd578485 games/agm/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/agm/DESCR   Wed Jul 27 20:37:27 2016 +0000
@@ -0,0 +1,1 @@
+Multiple-word anagram search program.
diff -r 7569113af35a -r 178cfd578485 games/agm/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/agm/Makefile        Wed Jul 27 20:37:27 2016 +0000
@@ -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"
diff -r 7569113af35a -r 178cfd578485 games/agm/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/agm/PLIST   Wed Jul 27 20:37:27 2016 +0000
@@ -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
diff -r 7569113af35a -r 178cfd578485 games/agm/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/agm/distinfo        Wed Jul 27 20:37:27 2016 +0000
@@ -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
diff -r 7569113af35a -r 178cfd578485 games/agm/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/agm/patches/patch-Makefile  Wed Jul 27 20:37:27 2016 +0000
@@ -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
diff -r 7569113af35a -r 178cfd578485 games/agm/patches/patch-agm.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/agm/patches/patch-agm.h     Wed Jul 27 20:37:27 2016 +0000
@@ -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);
diff -r 7569113af35a -r 178cfd578485 games/agm/patches/patch-gobble.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/agm/patches/patch-gobble.c  Wed Jul 27 20:37:27 2016 +0000
@@ -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);
+ }
+-
diff -r 7569113af35a -r 178cfd578485 games/agm/patches/patch-listfuncs.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/agm/patches/patch-listfuncs.c       Wed Jul 27 20:37:27 2016 +0000
@@ -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;
diff -r 7569113af35a -r 178cfd578485 games/agm/patches/patch-main.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/agm/patches/patch-main.c    Wed Jul 27 20:37:27 2016 +0000
@@ -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 ();
diff -r 7569113af35a -r 178cfd578485 games/agm/patches/patch-output.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/agm/patches/patch-output.c  Wed Jul 27 20:37:27 2016 +0000
@@ -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);
diff -r 7569113af35a -r 178cfd578485 games/agm/patches/patch-process.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/agm/patches/patch-process.c Wed Jul 27 20:37:27 2016 +0000
@@ -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,



Home | Main Index | Thread Index | Old Index