diff options
author | Vanilla I. Shu <vanilla@FreeBSD.org> | 2007-06-16 12:51:29 +0000 |
---|---|---|
committer | Vanilla I. Shu <vanilla@FreeBSD.org> | 2007-06-16 12:51:29 +0000 |
commit | 5e1d8860f254906a0ebce23e9e4cb04a2e586204 (patch) | |
tree | cff265dcdafbfa2dbe30ac3a1d0344917333158c /devel/stringencoders | |
parent | f4e93f459e1dc468d70583dfbdd4f865353a27fa (diff) | |
download | ports-5e1d8860f254906a0ebce23e9e4cb04a2e586204.tar.gz ports-5e1d8860f254906a0ebce23e9e4cb04a2e586204.zip |
Notes
Diffstat (limited to 'devel/stringencoders')
-rw-r--r-- | devel/stringencoders/Makefile | 21 | ||||
-rw-r--r-- | devel/stringencoders/distinfo | 3 | ||||
-rw-r--r-- | devel/stringencoders/files/patch-speedtest_ascii.c | 65 | ||||
-rw-r--r-- | devel/stringencoders/files/patch-speedtest_numtoa.c | 200 | ||||
-rw-r--r-- | devel/stringencoders/pkg-descr | 14 | ||||
-rw-r--r-- | devel/stringencoders/pkg-plist | 13 |
6 files changed, 316 insertions, 0 deletions
diff --git a/devel/stringencoders/Makefile b/devel/stringencoders/Makefile new file mode 100644 index 000000000000..b72bc2ccfead --- /dev/null +++ b/devel/stringencoders/Makefile @@ -0,0 +1,21 @@ +# New ports collection makefile for: stringencoders +# Date created: 11 June 2007 +# Whom: Steven Kreuzer <skreuzer@exit2shell.com> +# +# $FreeBSD$ +# + +PORTNAME= stringencoders +PORTVERSION= 3.3.0 +CATEGORIES= devel +MASTER_SITES= http://stringencoders.googlecode.com/files/ +DISTNAME= ${PORTNAME}-v${PORTVERSION} + +MAINTAINER= skreuzer@exit2shell.com +COMMENT= Collection of high performance c-string transformations + +HAS_CONFIGURE= yes +USE_LDCONFIG= yes +USE_AUTOTOOLS= libtool:15 + +.include <bsd.port.mk> diff --git a/devel/stringencoders/distinfo b/devel/stringencoders/distinfo new file mode 100644 index 000000000000..af573673cfcf --- /dev/null +++ b/devel/stringencoders/distinfo @@ -0,0 +1,3 @@ +MD5 (stringencoders-v3.3.0.tar.gz) = 8ba9e6ee3478cb57a26c1cf6ff8c336b +SHA256 (stringencoders-v3.3.0.tar.gz) = af10b06e6306cb1eec8ad0fc70d78319a8fcdfc938142d7b7c427c9869876637 +SIZE (stringencoders-v3.3.0.tar.gz) = 314437 diff --git a/devel/stringencoders/files/patch-speedtest_ascii.c b/devel/stringencoders/files/patch-speedtest_ascii.c new file mode 100644 index 000000000000..6e1f80ae25cc --- /dev/null +++ b/devel/stringencoders/files/patch-speedtest_ascii.c @@ -0,0 +1,65 @@ +--- test/speedtest_ascii.c.orig Wed Jun 6 13:24:30 2007 ++++ test/speedtest_ascii.c Thu Jun 14 05:39:13 2007 +@@ -244,7 +244,7 @@ + } + t1 = clock(); + last = t1 -t0; +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + /** +@@ -255,7 +255,7 @@ + toupper_copy2(obuf, buf, sizeof(buf)); + } + t1 = clock(); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + /** +@@ -266,7 +266,7 @@ + toupper_copy3(obuf, buf, sizeof(buf)); + } + t1 = clock(); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + /** +@@ -277,7 +277,7 @@ + toupper_copy4(obuf, buf, sizeof(buf)); + } + t1 = clock(); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + +@@ -289,7 +289,7 @@ + toupper_copy5(obuf, buf, sizeof(buf)); + } + t1 = clock(); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + /** +@@ -300,7 +300,7 @@ + toupper_copy6(obuf, buf, sizeof(buf)); + } + t1 = clock(); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + /** +@@ -312,7 +312,7 @@ + } + t1 = clock(); + +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + printf("%.1fx\n", last/(t1-t0)); diff --git a/devel/stringencoders/files/patch-speedtest_numtoa.c b/devel/stringencoders/files/patch-speedtest_numtoa.c new file mode 100644 index 000000000000..1214f0613af3 --- /dev/null +++ b/devel/stringencoders/files/patch-speedtest_numtoa.c @@ -0,0 +1,200 @@ +--- test/speedtest_numtoa.c.orig Wed Jun 6 13:24:30 2007 ++++ test/speedtest_numtoa.c Thu Jun 14 05:38:14 2007 +@@ -26,7 +26,7 @@ + sprintf(buf, "%hhu", ju8); + } + t1 = clock(); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + t0 = clock(); +@@ -36,7 +36,7 @@ + } + t1 = clock(); + last = (t1-t0); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + t0 = clock(); +@@ -45,7 +45,7 @@ + modp_uitoa10(ju8, buf); + } + t1 = clock(); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + printf("%.1fx\n", last/(t1-t0)); + fflush(stdout); + +@@ -56,7 +56,7 @@ + sprintf(buf, "%hu", ju16); + } + t1 = clock(); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + t0 = clock(); +@@ -66,7 +66,7 @@ + } + t1 = clock(); + last = (t1-t0); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + t0 = clock(); +@@ -75,7 +75,7 @@ + modp_uitoa10(ju16, buf); + } + t1 = clock(); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + printf("%.1fx\n", last/(t1-t0)); + fflush(stdout); + +@@ -86,7 +86,7 @@ + sprintf(buf, "%u", i); + } + t1 = clock(); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + t0 = clock(); +@@ -95,7 +95,7 @@ + } + t1 = clock(); + last = (t1-t0); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + t0 = clock(); +@@ -103,7 +103,7 @@ + modp_uitoa10(i, buf); + } + t1 = clock(); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + printf("%.1fx\n", last/(t1-t0)); + fflush(stdout); + +@@ -114,7 +114,7 @@ + sprintf(buf, "%hhd", ju8); + } + t1 = clock(); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + t0 = clock(); +@@ -124,7 +124,7 @@ + } + t1 = clock(); + last = (t1-t0); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + t0 = clock(); +@@ -133,7 +133,7 @@ + modp_itoa10(j8, buf); + } + t1 = clock(); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + printf("%.1fx\n", last/(t1-t0)); + fflush(stdout); + +@@ -144,7 +144,7 @@ + sprintf(buf, "%hd", j16); + } + t1 = clock(); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + t0 = clock(); +@@ -154,7 +154,7 @@ + } + t1 = clock(); + last = (t1-t0); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + t0 = clock(); +@@ -163,7 +163,7 @@ + modp_itoa10(j16, buf); + } + t1 = clock(); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + printf("%.1fx\n", last/(t1-t0)); + fflush(stdout); + +@@ -175,7 +175,7 @@ + sprintf(buf, "%d", i); + } + t1 = clock(); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + t0 = clock(); +@@ -184,7 +184,7 @@ + } + t1 = clock(); + last = (t1-t0); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + t0 = clock(); +@@ -192,7 +192,7 @@ + modp_itoa10(i, buf); + } + t1 = clock(); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + printf("%.1fx\n", last/(t1-t0)); + fflush(stdout); + +@@ -203,7 +203,7 @@ + sprintf(buf, "%e", (double)(i)); + } + t1 = clock(); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + t0 = clock(); +@@ -213,7 +213,7 @@ + } + t1 = clock(); + last = (t1-t0); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + t0 = clock(); +@@ -223,7 +223,7 @@ + } + t1 = clock(); + last = (t1-t0); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + fflush(stdout); + + t0 = clock(); +@@ -232,7 +232,7 @@ + modp_dtoa(d, buf, 6); + } + t1 = clock(); +- printf("%lu\t", (t1-t0)); ++ printf("%lu\t", (unsigned long)(t1-t0)); + printf("%.1fx\n", last/(t1-t0)); + fflush(stdout); + diff --git a/devel/stringencoders/pkg-descr b/devel/stringencoders/pkg-descr new file mode 100644 index 000000000000..6450a0d85e6b --- /dev/null +++ b/devel/stringencoders/pkg-descr @@ -0,0 +1,14 @@ +A collection of high performance c-string transformations, frequently 2x faster +than standard implementations. + +including + + * base64, standard + * base64, web/url safe, with configurable alphabet + * base85 (good for http cookies) + * base16 (hex) + * base2 (ascii binary) + * url escaping + * javascript string escaping + * fast number to string conversion, 4-22x faster than sprintf! + * fast ascii upper/lower case conversion, 2-66x faster than stdlib! diff --git a/devel/stringencoders/pkg-plist b/devel/stringencoders/pkg-plist new file mode 100644 index 000000000000..0df9014d62ae --- /dev/null +++ b/devel/stringencoders/pkg-plist @@ -0,0 +1,13 @@ +include/modp_ascii.h +include/modp_b16.h +include/modp_b2.h +include/modp_b64.h +include/modp_b64w.h +include/modp_b85.h +include/modp_bjavascript.h +include/modp_burl.h +include/modp_numtoa.h +lib/libmodpbase64.a +lib/libmodpbase64.la +lib/libmodpbase64.so +lib/libmodpbase64.so.0 |