aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2013-02-10 22:30:35 +0800
committermiwi <miwi@FreeBSD.org>2013-02-10 22:30:35 +0800
commit39ab787451e4b91efd1c74fe21a50126d9ce234f (patch)
tree59d5f65cceb91af57f8f88f2acc7b5ba8fd4cbbc
parent1aed5ee7a66ef3356325dcf43d333f5c91f9e99c (diff)
downloadfreebsd-ports-graphics-39ab787451e4b91efd1c74fe21a50126d9ce234f.tar.gz
freebsd-ports-graphics-39ab787451e4b91efd1c74fe21a50126d9ce234f.tar.zst
freebsd-ports-graphics-39ab787451e4b91efd1c74fe21a50126d9ce234f.zip
CityHash provides hash functions for strings. The functions mix the
input bits thoroughly but are not suitable for cryptography. See "Hash Quality," below, for details on how CityHash was tested and so on. Functions by CityHash: - CityHash32() returns a 32-bit hash. - CityHash64() and similar return a 64-bit hash. - CityHash128() and similar return a 128-bit hash and are tuned for strings of at least a few hundred bytes. Depending on your compiler and hardware, it's likely faster than CityHash64() on sufficiently long strings. It's slower than necessary on shorter strings, but we expect that case to be relatively unimportant. - CityHashCrc128() and similar are variants of CityHash128() that depend on _mm_crc32_u64(), an intrinsic that compiles to a CRC32 instruction on some CPUs. However, none of the functions we provide are CRCs. - CityHashCrc256() is a variant of CityHashCrc128() that also depends on _mm_crc32_u64(). It returns a 256-bit hash. All members of the CityHash family were designed with heavy reliance on previous work by Austin Appleby, Bob Jenkins, and others. For example, CityHash32 has many similarities with Murmur3a. WWW: http://code.google.com/p/cityhash/ PR: ports/174793 Submitted by: Gvozdikov Veniamin <g.veniamin@googlemail.com>
-rw-r--r--devel/Makefile1
-rw-r--r--devel/cityhash/Makefile17
-rw-r--r--devel/cityhash/distinfo2
-rw-r--r--devel/cityhash/files/patch-src_city.cc15
-rw-r--r--devel/cityhash/pkg-descr24
-rw-r--r--devel/cityhash/pkg-plist9
6 files changed, 68 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index a66c5ec6ba3..f916c082efb 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -201,6 +201,7 @@
SUBDIR += checkheaders
SUBDIR += chrpath
SUBDIR += cil
+ SUBDIR += cityhash
SUBDIR += cl-alexandria
SUBDIR += cl-alexandria-clisp
SUBDIR += cl-alexandria-sbcl
diff --git a/devel/cityhash/Makefile b/devel/cityhash/Makefile
new file mode 100644
index 00000000000..a1c033ee7fa
--- /dev/null
+++ b/devel/cityhash/Makefile
@@ -0,0 +1,17 @@
+# Created by: Gvozdikov Veniamin <g.veniamin@googlemail.com>
+# $FreeBSD$
+
+PORTNAME= cityhash
+PORTVERSION= 1.1.0
+CATEGORIES= devel
+MASTER_SITES= GOOGLE_CODE
+
+MAINTAINER= g.veniamin@googlemail.com
+COMMENT= Family of hash functions
+
+LICENSE= MIT
+
+GNU_CONFIGURE= yes
+USE_LDCONFIG= yes
+
+.include <bsd.port.mk>
diff --git a/devel/cityhash/distinfo b/devel/cityhash/distinfo
new file mode 100644
index 00000000000..097c405ef9b
--- /dev/null
+++ b/devel/cityhash/distinfo
@@ -0,0 +1,2 @@
+SHA256 (cityhash-1.1.0.tar.gz) = 0d07c13c6caf7c798856efa76df7dd2a8d24539240449538316ba4c3bd084679
+SIZE (cityhash-1.1.0.tar.gz) = 355571
diff --git a/devel/cityhash/files/patch-src_city.cc b/devel/cityhash/files/patch-src_city.cc
new file mode 100644
index 00000000000..ffd593cde1b
--- /dev/null
+++ b/devel/cityhash/files/patch-src_city.cc
@@ -0,0 +1,15 @@
+--- src/city.cc.orig 2012-12-24 12:40:59.863562632 +0400
++++ src/city.cc 2012-12-24 12:48:07.077276386 +0400
+@@ -60,6 +60,12 @@
+ #define bswap_32(x) OSSwapInt32(x)
+ #define bswap_64(x) OSSwapInt64(x)
+
++#elif defined __FreeBSD__
++
++#include <sys/endian.h>
++#define bswap_32(x) bswap32(x)
++#define bswap_64(x) bswap64(x)
++
+ #else
+
+ #include <byteswap.h>
diff --git a/devel/cityhash/pkg-descr b/devel/cityhash/pkg-descr
new file mode 100644
index 00000000000..819df5a7178
--- /dev/null
+++ b/devel/cityhash/pkg-descr
@@ -0,0 +1,24 @@
+CityHash provides hash functions for strings. The functions mix the
+input bits thoroughly but are not suitable for cryptography. See
+"Hash Quality," below, for details on how CityHash was tested and so on.
+
+Functions by CityHash:
+
+- CityHash32() returns a 32-bit hash.
+- CityHash64() and similar return a 64-bit hash.
+- CityHash128() and similar return a 128-bit hash and are tuned for
+strings of at least a few hundred bytes. Depending on your compiler
+and hardware, it's likely faster than CityHash64() on sufficiently long
+strings. It's slower than necessary on shorter strings, but we expect
+that case to be relatively unimportant.
+- CityHashCrc128() and similar are variants of CityHash128() that depend
+on _mm_crc32_u64(), an intrinsic that compiles to a CRC32 instruction
+on some CPUs. However, none of the functions we provide are CRCs.
+- CityHashCrc256() is a variant of CityHashCrc128() that also depends
+on _mm_crc32_u64(). It returns a 256-bit hash.
+
+All members of the CityHash family were designed with heavy reliance
+on previous work by Austin Appleby, Bob Jenkins, and others.
+For example, CityHash32 has many similarities with Murmur3a.
+
+WWW: http://code.google.com/p/cityhash/
diff --git a/devel/cityhash/pkg-plist b/devel/cityhash/pkg-plist
new file mode 100644
index 00000000000..b93170d20fc
--- /dev/null
+++ b/devel/cityhash/pkg-plist
@@ -0,0 +1,9 @@
+include/city.h
+lib/libcityhash.a
+lib/libcityhash.la
+lib/libcityhash.so
+lib/libcityhash.so.0
+%%DOCSDIR%%/COPYING
+%%DOCSDIR%%/NEWS
+%%DOCSDIR%%/README
+@dirrm %%DOCSDIR%%