Mon Jul 8 00:56:45 2013 UTC ()
Fix build on SunOS. Add patch to define bswap_32(x) and bswap_64(x).


(rodent)
diff -r1.1 -r1.2 pkgsrc/textproc/cityhash/distinfo
diff -r0 -r1.1 pkgsrc/textproc/cityhash/patches/patch-src_city.cc

cvs diff -r1.1 -r1.2 pkgsrc/textproc/cityhash/distinfo (expand / switch to unified diff)

--- pkgsrc/textproc/cityhash/distinfo 2013/07/02 11:22:21 1.1
+++ pkgsrc/textproc/cityhash/distinfo 2013/07/08 00:56:45 1.2
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
1$NetBSD: distinfo,v 1.1 2013/07/02 11:22:21 rodent Exp $ 1$NetBSD: distinfo,v 1.2 2013/07/08 00:56:45 rodent Exp $
2 2
3SHA1 (cityhash-1.1.1.tar.gz) = 74342b9161bc762e4c14627a9281bef2d3cb5eed 3SHA1 (cityhash-1.1.1.tar.gz) = 74342b9161bc762e4c14627a9281bef2d3cb5eed
4RMD160 (cityhash-1.1.1.tar.gz) = bac8c85686a8153afcc1defd3c93021b1da56f40 4RMD160 (cityhash-1.1.1.tar.gz) = bac8c85686a8153afcc1defd3c93021b1da56f40
5Size (cityhash-1.1.1.tar.gz) = 376456 bytes 5Size (cityhash-1.1.1.tar.gz) = 376456 bytes
 6SHA1 (patch-src_city.cc) = 9319333f53808ca6396876630c5d2c08bca15f79

File Added: pkgsrc/textproc/cityhash/patches/patch-src_city.cc
$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>