summaryrefslogtreecommitdiff
path: root/textproc/cityhash
diff options
context:
space:
mode:
authorrodent <rodent>2014-01-19 02:54:56 +0000
committerrodent <rodent>2014-01-19 02:54:56 +0000
commita752e18ec07011edf07f5aaa6b1ab71638f3f7ce (patch)
treead2ae4638f42a8302549e7abe83d7f83f25b3071 /textproc/cityhash
parent49aff8929eb0b446f4d58d5d71ad3850a64a3afd (diff)
downloadpkgsrc-a752e18ec07011edf07f5aaa6b1ab71638f3f7ce.tar.gz
Make this build on FreeBSD. Patch addition taken from FreeBSD's ports.
Diffstat (limited to 'textproc/cityhash')
-rw-r--r--textproc/cityhash/distinfo4
-rw-r--r--textproc/cityhash/patches/patch-src_city.cc9
2 files changed, 9 insertions, 4 deletions
diff --git a/textproc/cityhash/distinfo b/textproc/cityhash/distinfo
index 2c350c03178..b711d72fed9 100644
--- a/textproc/cityhash/distinfo
+++ b/textproc/cityhash/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.2 2013/07/08 00:56:45 rodent Exp $
+$NetBSD: distinfo,v 1.3 2014/01/19 02:54:56 rodent Exp $
SHA1 (cityhash-1.1.1.tar.gz) = 74342b9161bc762e4c14627a9281bef2d3cb5eed
RMD160 (cityhash-1.1.1.tar.gz) = bac8c85686a8153afcc1defd3c93021b1da56f40
Size (cityhash-1.1.1.tar.gz) = 376456 bytes
-SHA1 (patch-src_city.cc) = 9319333f53808ca6396876630c5d2c08bca15f79
+SHA1 (patch-src_city.cc) = 1620e169d4bbabfcc5fb68ec471b6aeac4ae09cc
diff --git a/textproc/cityhash/patches/patch-src_city.cc b/textproc/cityhash/patches/patch-src_city.cc
index ff516d84577..2dad05d2aea 100644
--- a/textproc/cityhash/patches/patch-src_city.cc
+++ b/textproc/cityhash/patches/patch-src_city.cc
@@ -1,10 +1,10 @@
-$NetBSD: patch-src_city.cc,v 1.1 2013/07/08 00:56:45 rodent Exp $
+$NetBSD: patch-src_city.cc,v 1.2 2014/01/19 02:54:56 rodent Exp $
Add support for SunOS.
--- src/city.cc.orig 2013-06-17 19:45:57.000000000 +0000
+++ src/city.cc
-@@ -69,6 +69,11 @@ static uint32 UNALIGNED_LOAD32(const cha
+@@ -69,6 +69,16 @@ static uint32 UNALIGNED_LOAD32(const cha
#define bswap_64(x) bswap64(x)
#endif
@@ -13,6 +13,11 @@ Add support for SunOS.
+#define bswap_32(x) htonl(x)
+#define bswap_64(x) htonll(x)
+
++#elif defined(__FreeBSD__)
++#include <sys/endian.h>
++#define bswap_32(x) bswap32(x)
++#define bswap_64(x) bswap64(x)
++
#else
#include <byteswap.h>