summaryrefslogtreecommitdiff
path: root/devel/mph
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2003-12-04 08:44:58 +0000
committeragc <agc@pkgsrc.org>2003-12-04 08:44:58 +0000
commit77c5659dfeda402dc0d166b2ba65ed2046ef76c0 (patch)
treeea9039dc966023ada8485e4e3615ed0ddac49784 /devel/mph
parentc6c25bc17d1c901c117ce679f4162ffab3ecc5e1 (diff)
downloadpkgsrc-77c5659dfeda402dc0d166b2ba65ed2046ef76c0.tar.gz
Initial import of mph-1.2 into the NetBSD Packages Collection.
The program mph tries to generate an order preserving minimal perfect hashing (MPH) function for the set of keys, one per line, on stdin. Each key can be at most 4095 characters long (see keys.h to increase this limit), and the keys must be unique. If mph terminates, it emits a language independent binary or text representation of the MPH function on stdout. To generate a usable hash function, this output should be fed to a language dependent filter, like emitc. e.g. % mph <foo | emitc >hash.c The algorithm used by mph is probabilistic - it iterates until it finds a MPH function. For each failed iteration, it prints a (cryptic) reason on stderr. There is no no guarantee that mph will terminate. In practice this is unlikely, unless the constants specified with options -c or -m are too small (see below).
Diffstat (limited to 'devel/mph')
-rw-r--r--devel/mph/DESCR16
-rw-r--r--devel/mph/Makefile19
-rw-r--r--devel/mph/PLIST6
-rw-r--r--devel/mph/distinfo4
4 files changed, 45 insertions, 0 deletions
diff --git a/devel/mph/DESCR b/devel/mph/DESCR
new file mode 100644
index 00000000000..0af1e7d8f99
--- /dev/null
+++ b/devel/mph/DESCR
@@ -0,0 +1,16 @@
+The program mph tries to generate an order preserving minimal perfect
+hashing (MPH) function for the set of keys, one per line, on stdin.
+Each key can be at most 4095 characters long (see keys.h to increase
+this limit), and the keys must be unique. If mph terminates, it emits
+a language independent binary or text representation of the MPH
+function on stdout. To generate a usable hash function, this output
+should be fed to a language dependent filter, like emitc.
+
+e.g.
+ % mph <foo | emitc >hash.c
+
+The algorithm used by mph is probabilistic - it iterates until it
+finds a MPH function. For each failed iteration, it prints a
+(cryptic) reason on stderr. There is no no guarantee that mph will
+terminate. In practice this is unlikely, unless the constants
+specified with options -c or -m are too small (see below).
diff --git a/devel/mph/Makefile b/devel/mph/Makefile
new file mode 100644
index 00000000000..0baa18fa59c
--- /dev/null
+++ b/devel/mph/Makefile
@@ -0,0 +1,19 @@
+# $NetBSD: Makefile,v 1.1.1.1 2003/12/04 08:44:58 agc Exp $
+#
+
+DISTNAME= mph-1.2
+CATEGORIES= devel
+MASTER_SITES= http://www.ibiblio.org/pub/Linux/devel/lang/c/
+
+MAINTAINER= tech-pkg@netbsd.org
+#HOMEPAGE= none
+COMMENT= Minimal perfect hashing functionality
+
+do-install:
+ for i in emitc mph mphm; do \
+ ${INSTALL_PROGRAM} ${WRKSRC}/$$i ${PREFIX}/bin; \
+ done
+ ${INSTALL_SCRIPT} ${WRKSRC}/mphminm ${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/mph.doc ${PREFIX}/share/doc
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/devel/mph/PLIST b/devel/mph/PLIST
new file mode 100644
index 00000000000..250db098fa6
--- /dev/null
+++ b/devel/mph/PLIST
@@ -0,0 +1,6 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2003/12/04 08:44:58 agc Exp $
+bin/emitc
+bin/mph
+bin/mphm
+bin/mphminm
+share/doc/mph.doc
diff --git a/devel/mph/distinfo b/devel/mph/distinfo
new file mode 100644
index 00000000000..ea610ea5bec
--- /dev/null
+++ b/devel/mph/distinfo
@@ -0,0 +1,4 @@
+$NetBSD: distinfo,v 1.1.1.1 2003/12/04 08:44:58 agc Exp $
+
+SHA1 (mph-1.2.tar.gz) = 05da8d39b27d5b1d42c52d825f4d2196711a8df5
+Size (mph-1.2.tar.gz) = 22762 bytes