Sun Sep 15 12:28:22 2013 UTC ()
Support libc++, which doesn't provide the tr1 headers. Disable the
various sanitzer checks, they are completely broken. Some of them are
fixed in the configure patch, but not all of them.


(joerg)
diff -r1.8 -r1.9 pkgsrc/devel/libmemcached/Makefile
diff -r1.6 -r1.7 pkgsrc/devel/libmemcached/distinfo
diff -r0 -r1.3 pkgsrc/devel/libmemcached/patches/patch-configure
diff -r0 -r1.1 pkgsrc/devel/libmemcached/patches/patch-libmemcached-1.0_memcached.h

cvs diff -r1.8 -r1.9 pkgsrc/devel/libmemcached/Makefile (expand / switch to unified diff)

--- pkgsrc/devel/libmemcached/Makefile 2013/09/13 07:59:01 1.8
+++ pkgsrc/devel/libmemcached/Makefile 2013/09/15 12:28:22 1.9
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.8 2013/09/13 07:59:01 fhajny Exp $ 1# $NetBSD: Makefile,v 1.9 2013/09/15 12:28:22 joerg Exp $
2# 2#
3 3
4DISTNAME= libmemcached-1.0.17 4DISTNAME= libmemcached-1.0.17
5PKGREVISION= 1 5PKGREVISION= 1
6CATEGORIES= devel 6CATEGORIES= devel
7MASTER_SITES= http://launchpad.net/libmemcached/1.0/${PKGVERSION_NOREV}/+download/ 7MASTER_SITES= http://launchpad.net/libmemcached/1.0/${PKGVERSION_NOREV}/+download/
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= http://libmemcached.org/ 10HOMEPAGE= http://libmemcached.org/
11COMMENT= C/C++ client library and tools for the memcached server 11COMMENT= C/C++ client library and tools for the memcached server
12LICENSE= modified-bsd 12LICENSE= modified-bsd
13 13
14GNU_CONFIGURE= yes 14GNU_CONFIGURE= yes
@@ -17,19 +17,30 @@ USE_LANGUAGES= c c++ @@ -17,19 +17,30 @@ USE_LANGUAGES= c c++
17USE_LIBTOOL= yes 17USE_LIBTOOL= yes
18 18
19PKGCONFIG_OVERRIDE+= support/libmemcached.pc.in 19PKGCONFIG_OVERRIDE+= support/libmemcached.pc.in
20 20
21.include "../../mk/bsd.prefs.mk" 21.include "../../mk/bsd.prefs.mk"
22.include "options.mk" 22.include "options.mk"
23 23
24CONFIGURE_ARGS+=--enable-jobserver=no 24CONFIGURE_ARGS+=--enable-jobserver=no
25 25
26CPPFLAGS+= -D__STDC_FORMAT_MACROS 26CPPFLAGS+= -D__STDC_FORMAT_MACROS
27 27
28LIBS.SunOS+= -lsocket 28LIBS.SunOS+= -lsocket
29 29
 30# Disable, the configure check is completely broken.
 31# Some checks are fixed in the local patches, but not enough to get
 32# an actual build running
 33.for sanitizer in address integer thread memory alignment bool bounds enum \
 34 float-cast-overflow float-divide-by-zero integer-divide-by-zero null \
 35 object-size return shift signed-integer-overflow unreachable \
 36 unsigned-integer-overflow vla-bound vptr
 37CONFIGURE_ARGS+= ax_cv_check_cxxflags__Werror__fsanitize_${sanitizer:S/-/_/g}=no
 38CONFIGURE_ARGS+= ax_cv_check_cflags__Werror__fsanitize_${sanitizer:S/-/_/g}=no
 39.endfor
 40
30post-configure: 41post-configure:
31 ${ECHO} '#define HAVE_MEMCACHED_BINARY 1' >> ${WRKSRC}/mem_config.h 42 ${ECHO} '#define HAVE_MEMCACHED_BINARY 1' >> ${WRKSRC}/mem_config.h
32 ${ECHO} '#define MEMCACHED_BINARY "${PREFIX}/bin/memcached"' >> ${WRKSRC}/mem_config.h 43 ${ECHO} '#define MEMCACHED_BINARY "${PREFIX}/bin/memcached"' >> ${WRKSRC}/mem_config.h
33 44
34.include "../../devel/libexecinfo/buildlink3.mk" 45.include "../../devel/libexecinfo/buildlink3.mk"
35.include "../../mk/bsd.pkg.mk" 46.include "../../mk/bsd.pkg.mk"

cvs diff -r1.6 -r1.7 pkgsrc/devel/libmemcached/distinfo (expand / switch to unified diff)

--- pkgsrc/devel/libmemcached/distinfo 2013/09/13 07:59:01 1.6
+++ pkgsrc/devel/libmemcached/distinfo 2013/09/15 12:28:22 1.7
@@ -1,12 +1,14 @@ @@ -1,12 +1,14 @@
1$NetBSD: distinfo,v 1.6 2013/09/13 07:59:01 fhajny Exp $ 1$NetBSD: distinfo,v 1.7 2013/09/15 12:28:22 joerg Exp $
2 2
3SHA1 (libmemcached-1.0.17.tar.gz) = 1023bc8c738b1f5b8ea2cd16d709ec6b47c3efa8 3SHA1 (libmemcached-1.0.17.tar.gz) = 1023bc8c738b1f5b8ea2cd16d709ec6b47c3efa8
4RMD160 (libmemcached-1.0.17.tar.gz) = f0e617e0dc5f2eb27f9da7ea5a9f5a7b043b80a8 4RMD160 (libmemcached-1.0.17.tar.gz) = f0e617e0dc5f2eb27f9da7ea5a9f5a7b043b80a8
5Size (libmemcached-1.0.17.tar.gz) = 1023177 bytes 5Size (libmemcached-1.0.17.tar.gz) = 1023177 bytes
 6SHA1 (patch-configure) = 82c954244cc79f892b3ed08be1b5c8f60bceab1a
6SHA1 (patch-libmemcached-1.0_deprecated__types.h) = bf4c3440b1734bf73f39940c983eb3fb1be171d7 7SHA1 (patch-libmemcached-1.0_deprecated__types.h) = bf4c3440b1734bf73f39940c983eb3fb1be171d7
 8SHA1 (patch-libmemcached-1.0_memcached.h) = 0edfc9d7622fec2b690e2e253f3f8c9aaf4147d5
7SHA1 (patch-libmemcached_byteorder.cc) = 18d5b6447e7457bf35dbac6c693735932871f095 9SHA1 (patch-libmemcached_byteorder.cc) = 18d5b6447e7457bf35dbac6c693735932871f095
8SHA1 (patch-libtest_lite.h) = 6460bd76650111613311c35d3d836674dab0c801 10SHA1 (patch-libtest_lite.h) = 6460bd76650111613311c35d3d836674dab0c801
9SHA1 (patch-libtest_main.cc) = e9c2d88085f2a66b3296f7acd40484e485fd3c16 11SHA1 (patch-libtest_main.cc) = e9c2d88085f2a66b3296f7acd40484e485fd3c16
10SHA1 (patch-libtest_test.hpp) = 684d1dcfe5c6a4b510353bd578c8919da216542b 12SHA1 (patch-libtest_test.hpp) = 684d1dcfe5c6a4b510353bd578c8919da216542b
11SHA1 (patch-tests_libmemcached-1.0_ketama.cc) = 8dacea6366738254e1a71eef8cd4e04329f4e53c 13SHA1 (patch-tests_libmemcached-1.0_ketama.cc) = 8dacea6366738254e1a71eef8cd4e04329f4e53c
12SHA1 (patch-tests_libmemcached-1.0_pool.cc) = d5656a54277f7155b1b78a0f90fd0f939ef39be6 14SHA1 (patch-tests_libmemcached-1.0_pool.cc) = d5656a54277f7155b1b78a0f90fd0f939ef39be6

File Added: pkgsrc/devel/libmemcached/patches/patch-configure
$NetBSD: patch-configure,v 1.3 2013/09/15 12:28:22 joerg Exp $

--- configure.orig	2013-04-03 04:22:41.000000000 +0000
+++ configure
@@ -26555,15 +26555,15 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+int *p;
 int
 main ()
 {
-
-  ;
+  return *p;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -26628,7 +26628,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -26685,15 +26685,17 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+int f;
+
 int
 main ()
 {
-
+  ++f;
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -26750,15 +26752,17 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+#include <stdlib.h>
+
 int
 main ()
 {
-
-  ;
+  int *p = malloc(sizeof(int));
+  return *p;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -26823,7 +26827,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -26888,7 +26892,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -26953,7 +26957,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -27018,7 +27022,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -27083,7 +27087,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -27148,7 +27152,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -27213,7 +27217,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -27278,7 +27282,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -27343,7 +27347,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -27408,7 +27412,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -27473,7 +27477,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -27529,16 +27533,19 @@ else
   CFLAGS="$CFLAGS -Werror $flag"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <unistd.h>
 
 int
 main ()
 {
-
-  ;
+  int i = 0;
+  while (sleep(1))
+    ++i;
+  return i;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -27603,7 +27610,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -27668,7 +27675,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -27733,7 +27740,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -27798,7 +27805,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -31956,16 +31963,16 @@ else
   CXXFLAGS="$CXXFLAGS -Werror $flag"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+int *p;
 
 int
 main ()
 {
-
-  ;
+  return *p;
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -32030,7 +32037,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -32087,15 +32094,17 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+int f;
+
 int
 main ()
 {
 
-  ;
+  ++f;
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -32155,12 +32164,12 @@ else
 int
 main ()
 {
-
-  ;
+  int *p = new int;
+  return *p;
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -32225,7 +32234,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -32290,7 +32299,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -32355,7 +32364,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -32420,7 +32429,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -32485,7 +32494,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -32550,7 +32559,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -32615,7 +32624,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -32680,7 +32689,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -32745,7 +32754,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -32810,7 +32819,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -32875,7 +32884,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -32931,16 +32940,19 @@ else
   CXXFLAGS="$CXXFLAGS -Werror $flag"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <unistd.h>
 
 int
 main ()
 {
-
-  ;
+  int i = 0;
+  while (sleep(1))
+    ++i;
+  return i;
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -33005,7 +33017,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -33070,7 +33082,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -33135,7 +33147,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"
@@ -33200,7 +33212,7 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_link "$LINENO"; then :
   eval "$as_CACHEVAR=yes"
 else
   eval "$as_CACHEVAR=no"

File Added: pkgsrc/devel/libmemcached/patches/Attic/patch-libmemcached-1.0_memcached.h
$NetBSD: patch-libmemcached-1.0_memcached.h,v 1.1 2013/09/15 12:28:22 joerg Exp $

--- libmemcached-1.0/memcached.h.orig	2013-09-14 17:06:48.000000000 +0000
+++ libmemcached-1.0/memcached.h
@@ -43,9 +43,13 @@
 #endif
 
 #ifdef __cplusplus
-#  include <tr1/cinttypes>
 #  include <cstddef>
 #  include <cstdlib>
+#  if __cplusplus >= 201103L || defined(_LIBCPP_VERSION)
+#    include <cinttypes>
+#  else
+#    include <tr1/cinttypes>
+#  endif
 #else
 #  include <inttypes.h>
 #  include <stddef.h>