summaryrefslogtreecommitdiff
path: root/textproc/cityhash
diff options
context:
space:
mode:
authorrodent <rodent@pkgsrc.org>2013-07-08 00:56:45 +0000
committerrodent <rodent@pkgsrc.org>2013-07-08 00:56:45 +0000
commite85390f7994ea502d9910720cb5c00e73c2eb70b (patch)
tree716c081901e8c77ceaf55516cf63e5016430ff27 /textproc/cityhash
parent265f1aa717c3cc0d91378d387e02a3a61fc2da06 (diff)
downloadpkgsrc-e85390f7994ea502d9910720cb5c00e73c2eb70b.tar.gz
Fix build on SunOS. Add patch to define bswap_32(x) and bswap_64(x).
Diffstat (limited to 'textproc/cityhash')
-rw-r--r--textproc/cityhash/distinfo3
-rw-r--r--textproc/cityhash/patches/patch-src_city.cc18
2 files changed, 20 insertions, 1 deletions
diff --git a/textproc/cityhash/distinfo b/textproc/cityhash/distinfo
index 543d14c0055..2c350c03178 100644
--- a/textproc/cityhash/distinfo
+++ b/textproc/cityhash/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.1 2013/07/02 11:22:21 rodent Exp $
+$NetBSD: distinfo,v 1.2 2013/07/08 00:56:45 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
diff --git a/textproc/cityhash/patches/patch-src_city.cc b/textproc/cityhash/patches/patch-src_city.cc
new file mode 100644
index 00000000000..ff516d84577
--- /dev/null
+++ b/textproc/cityhash/patches/patch-src_city.cc
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_city.cc,v 1.1 2013/07/08 00:56:45 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
+ #define bswap_64(x) bswap64(x)
+ #endif
+
++#elif defined(__sun)
++#include <sys/byteorder.h>
++#define bswap_32(x) htonl(x)
++#define bswap_64(x) htonll(x)
++
+ #else
+
+ #include <byteswap.h>