From 072364db1f9363163915b97827986f8b8cc31cbb Mon Sep 17 00:00:00 2001
From: Jacques Vidrine <nectar@FreeBSD.org>
Date: Sun, 28 Mar 1999 02:53:03 +0000
Subject: graph and set datatypes for Python (C extension)

---
 devel/py-kjbuckets/Makefile       | 30 +++++++++++++
 devel/py-kjbuckets/distinfo       |  1 +
 devel/py-kjbuckets/files/patch-aa | 34 +++++++++++++++
 devel/py-kjbuckets/files/patch-ab | 92 +++++++++++++++++++++++++++++++++++++++
 devel/py-kjbuckets/pkg-comment    |  1 +
 devel/py-kjbuckets/pkg-descr      | 14 ++++++
 devel/py-kjbuckets/pkg-plist      |  2 +
 7 files changed, 174 insertions(+)
 create mode 100644 devel/py-kjbuckets/Makefile
 create mode 100644 devel/py-kjbuckets/distinfo
 create mode 100644 devel/py-kjbuckets/files/patch-aa
 create mode 100644 devel/py-kjbuckets/files/patch-ab
 create mode 100644 devel/py-kjbuckets/pkg-comment
 create mode 100644 devel/py-kjbuckets/pkg-descr
 create mode 100644 devel/py-kjbuckets/pkg-plist

(limited to 'devel')

diff --git a/devel/py-kjbuckets/Makefile b/devel/py-kjbuckets/Makefile
new file mode 100644
index 000000000000..aa53c7cd9b61
--- /dev/null
+++ b/devel/py-kjbuckets/Makefile
@@ -0,0 +1,30 @@
+# Ports collection Makefile for:	kjbuckets
+# Version required:			2.2
+# Date created:				03/27/1999
+# Whom:					nectar@FreeBSD.ORG
+#
+# $Id: Makefile,v 1.1.1.1 1999/03/20 08:50:50 nectar Exp $
+#
+
+DISTNAME=		kjb
+PKGNAME=		py-kjbuckets-2.2
+CATEGORIES=		devel
+MASTER_SITES=		http://www.chordate.com/kjbuckets/             \
+			http://www.nectar.com/distfiles/
+
+MAINTAINER=		nectar@FreeBSD.ORG
+
+BUILD_DEPENDS=		python:${PORTSDIR}/lang/python
+RUN_DEPENDS=		python:${PORTSDIR}/lang/python
+
+MAKEFILE=		makefile
+WRKSRC=			${WRKDIR}
+
+do-install:
+	${INSTALL_DATA} ${WRKSRC}/kjbucketsmodule.so                   \
+		${PREFIX}/lib/python1.5/site-packages
+.if !defined(NOPORTDOCS)
+	${INSTALL_DATA} ${WRKSRC}/kjbuckets.html ${PREFIX}/share/doc/
+.endif
+
+.include <bsd.port.mk>
diff --git a/devel/py-kjbuckets/distinfo b/devel/py-kjbuckets/distinfo
new file mode 100644
index 000000000000..148df49c05ca
--- /dev/null
+++ b/devel/py-kjbuckets/distinfo
@@ -0,0 +1 @@
+MD5 (kjb.tar.gz) = d700e3782d5c8784dc41251f94b1d09a
diff --git a/devel/py-kjbuckets/files/patch-aa b/devel/py-kjbuckets/files/patch-aa
new file mode 100644
index 000000000000..9739c96790ce
--- /dev/null
+++ b/devel/py-kjbuckets/files/patch-aa
@@ -0,0 +1,34 @@
+--- makefile.orig	Wed Jun  4 13:29:23 1997
++++ makefile	Sat Mar 27 20:19:53 1999
+@@ -1,25 +1,18 @@
+ # Makefile for building a shared library containing
+-# the kjbuckets module.  Configured for Linux using gcc
+-# and local paths.
+-
+-CC=gcc -DSOLARIS -Wall
++# the kjbuckets module.  Configured for FreeBSD.
+ 
+ # the src and bld directories for include files and libraries
+-blddir=		/usr/local/lib/python1.4/lib
+-srcdir=		/usr/local/include/python1.4
+-cfgdir=		/usr/local/lib/python1.4/config
+-#objdir=		/big/arw/Python-1.3/Objects
++srcdir=		${PREFIX}/include/python1.5
++cfgdir=		${PREFIX}/lib/python1.5/config
+ 
+ # Compiler flags
+-OPT=		-g
+-INCLUDES=	-I$(srcdir) -I$(blddir) -I$(cfgdir)
++INCLUDES=	-I$(srcdir) -I$(cfgdir)
+ DEFINES=	-DHAVE_CONFIG_H
+-CFLAGS=		$(OPT) $(DEFINES) $(INCLUDES)
+ 
+ all:		kjbucketsmodule.so
+ 
+ kjbucketsmodule.o:	kjbucketsmodule.c
+-		$(CC) $(CFLAGS) -c kjbucketsmodule.c
++		$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -c kjbucketsmodule.c
+ 
+ kjbucketsmodule.so:	kjbucketsmodule.o
+-		$(LD) -G kjbucketsmodule.o -o kjbucketsmodule.so
++		$(CC) $(CFLAGS) -shared kjbucketsmodule.o -o kjbucketsmodule.so
diff --git a/devel/py-kjbuckets/files/patch-ab b/devel/py-kjbuckets/files/patch-ab
new file mode 100644
index 000000000000..58197ca68b1d
--- /dev/null
+++ b/devel/py-kjbuckets/files/patch-ab
@@ -0,0 +1,92 @@
+--- kjbucketsmodule.c.orig	Thu Jun 26 09:06:40 1997
++++ kjbucketsmodule.c	Sat Mar 27 20:27:50 1999
+@@ -157,7 +157,7 @@
+      ( (tp->entries * RESIZEFACTOR) < (tp->size * GSIZE) ) )
+ 
+ /* group states */
+-enum GState { UNKNOWN, FREE, ROOT, OVERFLOW };
++enum GState { UNKNOWN, FREE, ROOT, OVERFLOW_ };
+ 
+ /* bucket behaviors, smaller is less general! */
+ enum BucketFlag { SETFLAG=0, DICTFLAG=1, GRAPHFLAG=2 };
+@@ -607,7 +607,7 @@
+       Nextptr = &(SGptr->mem.free.Next);\
+       break;\
+     case ROOT:\
+-    case OVERFLOW:\
++    case OVERFLOW_:\
+     case UNKNOWN:\
+       templateptr.sbp = &(SGptr->mem.group);\
+       Nextptr = &(SGptr->mem.group.Next);\
+@@ -623,7 +623,7 @@
+       Nextptr = &(DGptr->mem.free.Next);\
+       break;\
+     case ROOT:\
+-    case OVERFLOW:\
++    case OVERFLOW_:\
+     case UNKNOWN:\
+       templateptr.dbp = &(DGptr->mem.group);\
+       Nextptr = &(DGptr->mem.group.Next);\
+@@ -739,7 +739,7 @@
+   GArrayRef(Jarray,Jflag,Jprevious, Jgprev, JPrevState, JNextOfPrev);\
+   GArrayRef(Jarray,Jflag,Jtoindex, Jgother, JOtherState, JNextOfOther);\
+   *JNextOfOther = *JNext;\
+-  *JOtherState = OVERFLOW;\
++  *JOtherState = OVERFLOW_;\
+   GroupCopy(Jgother, Jg, Jflag);\
+   *JNextOfPrev = Jtoindex;\
+   Groupinit(Jg, Jflag);\
+@@ -879,7 +879,7 @@
+       fprintf(fp, "ROOT(next=%ld)",*Next);
+       if (GroupDump(g,flag,fp)!=0) { return -1; }
+       break;
+-    case OVERFLOW:
++    case OVERFLOW_:
+       fprintf(fp, "OVFLW(next=%ld)",*Next);
+       if (GroupDump(g,flag,fp)!=0) { return -1; }
+       break;
+@@ -903,7 +903,7 @@
+   for (i=0; i<size; i++) {
+     Dprint(("greinit at %ld\n",i));
+     GArrayRef(g, flag, i, groupp, State, d);
+-    if ((*State == ROOT) || (*State == OVERFLOW)) {
++    if ((*State == ROOT) || (*State == OVERFLOW_)) {
+       for (j=0; j<GSIZE; j++) {
+ 	GetBucket(Bp,groupp,flag,j);
+ 	BPtrReInit(Bp, flag);
+@@ -1056,7 +1056,7 @@
+       /* lastgroup and lastbucket must be none */
+       lastgroupI = lastbucketI = -1;
+       /* otherwise must force an insert, need root group... */
+-      if (*state == OVERFLOW) {
++      if (*state == OVERFLOW_) {
+ 	/* swap out the overflow group */
+         Dprint(("root is overflow %ld\n",rootgroupI));
+ 	if (tp->Free == -1) {
+@@ -1130,7 +1130,7 @@
+     }
+     UnFreeTableIndex(AvailableI, tp, tp->Free);
+     GArrayRef(groups, flag, AvailableI, avail, availState, availNext);
+-    *availState = OVERFLOW;
++    *availState = OVERFLOW_;
+     *availNext = rootgroupI;
+     *Next = AvailableI;
+     groupmatch(found, avail,flag,hsh,member1,map1,
+@@ -1235,7 +1235,7 @@
+   /* now reinsert all former contents */
+   for (i=0; i<size; i++) {
+     GArrayRef(oldgroups, flag, i, g, State, Next);
+-    if ( (*State == OVERFLOW) || (*State == ROOT) ) {
++    if ( (*State == OVERFLOW_) || (*State == ROOT) ) {
+       if (ReInsertGroup(g, flag, tp) == 0) {
+ 	success = 0;
+ 	break;
+@@ -1401,7 +1401,7 @@
+   found = 0;
+   do {
+     GArrayRef(tp->groups, flag, twp->lastgroup, g, State, Next);
+-    if ((*State==ROOT) || (*State==OVERFLOW)) {
++    if ((*State==ROOT) || (*State==OVERFLOW_)) {
+       dummy = 0;
+       groupmatch(found, g, flag, NOHASH, dummy, dummy, NOFORCE,\
+ 			 (twp->lastbucket), (twp->lastbucket), \
diff --git a/devel/py-kjbuckets/pkg-comment b/devel/py-kjbuckets/pkg-comment
new file mode 100644
index 000000000000..d9c9ddeaa029
--- /dev/null
+++ b/devel/py-kjbuckets/pkg-comment
@@ -0,0 +1 @@
+graph and set datatypes for Python (C extension)
diff --git a/devel/py-kjbuckets/pkg-descr b/devel/py-kjbuckets/pkg-descr
new file mode 100644
index 000000000000..fb445459f0cb
--- /dev/null
+++ b/devel/py-kjbuckets/pkg-descr
@@ -0,0 +1,14 @@
+Author: Aaron Watters <aaron_watters@msn.com>
+
+From the documentation:
+ The kjbuckets module defines three data types for Python: kjSet,
+ kjGraph, and kjDict. These types come with a number of associated
+ methods, including common set theoretical operations such as union,
+ intersection, difference, composition, transposition, reachability
+ sets, and transitive closure.
+
+ For suitably large compute intensive uses these types should provide
+ up to an order of magnitude speedup versus an implementation that uses
+ analogous operations implemented directly in Python.
+
+Jacques Vidrine <nectar@FreeBSD.ORG>
diff --git a/devel/py-kjbuckets/pkg-plist b/devel/py-kjbuckets/pkg-plist
new file mode 100644
index 000000000000..524a67228979
--- /dev/null
+++ b/devel/py-kjbuckets/pkg-plist
@@ -0,0 +1,2 @@
+lib/python1.5/site-packages/kjbucketsmodule.so
+share/doc/kjbuckets.html
-- 
cgit v1.2.3