summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorsborrill <sborrill>2017-04-24 14:35:01 +0000
committersborrill <sborrill>2017-04-24 14:35:01 +0000
commit364b12cd4296186e3e4fbdc37fa5ab9022311a35 (patch)
treee4c6a7164f0aa9f2ede9dfce0d8267baa4d08fdd /www
parentcf7e1113944f36418bed52a3fc46b245acd259dd (diff)
downloadpkgsrc-364b12cd4296186e3e4fbdc37fa5ab9022311a35.tar.gz
Link-test shm_* functions rather than just compile test as this ignores
missing functions. Define MAP_ANONYMOUS as a synonym of MAP_ANON if the former doesn't exist.
Diffstat (limited to 'www')
-rw-r--r--www/c-icap/distinfo5
-rw-r--r--www/c-icap/patches/patch-configure34
-rw-r--r--www/c-icap/patches/patch-os_unix_shared_mem.c16
3 files changed, 47 insertions, 8 deletions
diff --git a/www/c-icap/distinfo b/www/c-icap/distinfo
index e714b8b9eea..fd4700c4985 100644
--- a/www/c-icap/distinfo
+++ b/www/c-icap/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.10 2017/02/09 00:17:07 joerg Exp $
+$NetBSD: distinfo,v 1.11 2017/04/24 14:35:01 sborrill Exp $
SHA1 (c_icap-0.4.4.tar.gz) = c2cf919215812a40053652f9501c1b8d3c40c684
RMD160 (c_icap-0.4.4.tar.gz) = a69c5832951db9c424a3ea748d4512ec1ce313a2
@@ -6,4 +6,5 @@ SHA512 (c_icap-0.4.4.tar.gz) = b98ddbe6da24d3a21d98e1acb72b34f65e115cf98c34a01a1
Size (c_icap-0.4.4.tar.gz) = 636947 bytes
SHA1 (patch-Makefile.in) = 103129c1bd438885290c3712c53b8e9d3cc3b1ab
SHA1 (patch-cfg__param.c) = 005d22a2d0cc0f64b38a14477b1d21c28e361018
-SHA1 (patch-configure) = 0a4e857ef4f6277ba27d3ec33b2797978932f3e5
+SHA1 (patch-configure) = 409424011f1c44ad545c46c8f316a0452fe0db02
+SHA1 (patch-os_unix_shared_mem.c) = eeb40bf55224788743b53be08309c3d3f3fd143d
diff --git a/www/c-icap/patches/patch-configure b/www/c-icap/patches/patch-configure
index 969118d4f24..081367c66a6 100644
--- a/www/c-icap/patches/patch-configure
+++ b/www/c-icap/patches/patch-configure
@@ -1,11 +1,12 @@
-$NetBSD: patch-configure,v 1.7 2017/02/09 00:17:07 joerg Exp $
+$NetBSD: patch-configure,v 1.8 2017/04/24 14:35:01 sborrill Exp $
Detect Berkeley DB.
Link against librt on NetBSD, too.
+Link-test for shm_* functions.
---- configure.orig 2016-09-21 12:09:36.000000000 +0000
-+++ configure
-@@ -13210,12 +13210,11 @@ rm -f core conftest.err conftest.$ac_obj
+--- /pkg_comp/obj/pkgsrc/www/c-icap/default/c_icap-0.4.4/configure.orig 2016-09-21 12:09:36.000000000 +0000
++++ /pkg_comp/obj/pkgsrc/www/c-icap/default/c_icap-0.4.4/configure 2017-04-24 14:23:58.000000000 +0000
+@@ -13210,12 +13210,11 @@
OLDCFLAGS=$CFLAGS
OLDLDFLAGS=$LDFLAGS
OLDLIBS=$LIBS
@@ -20,7 +21,7 @@ Link against librt on NetBSD, too.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-@@ -13229,7 +13228,7 @@ rm -f core conftest.err conftest.$ac_obj
+@@ -13229,7 +13228,7 @@
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
@@ -29,7 +30,28 @@ Link against librt on NetBSD, too.
else
libdb="no"; echo "no";
-@@ -14585,7 +14584,7 @@ if test a"$POSIX_SHARED_MEM" = "a1"; the
+@@ -14546,6 +14545,11 @@
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if posix shared mem works" >&5
+ $as_echo_n "checking if posix shared mem works... " >&6; }
++case "$target_os" in
++linux*|netbsd*)
++ LIBS="-lrt $LIBS"
++ ;;
++esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -14566,7 +14570,7 @@
+ return 0;
+ }
+ _ACEOF
+-if ac_fn_c_try_compile "$LINENO"; then :
++if ac_fn_c_try_link "$LINENO"; then :
+
+ $as_echo "#define HAVE_POSIX_SHARED_MEM 1" >>confdefs.h
+
+@@ -14585,7 +14589,7 @@
# Linux and solaris define the shm_open in -rt library.
# This library already included in LIBS for solaris
case "$target_os" in
diff --git a/www/c-icap/patches/patch-os_unix_shared_mem.c b/www/c-icap/patches/patch-os_unix_shared_mem.c
new file mode 100644
index 00000000000..4253007ad6a
--- /dev/null
+++ b/www/c-icap/patches/patch-os_unix_shared_mem.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-os_unix_shared_mem.c,v 1.1 2017/04/24 14:35:01 sborrill Exp $
+
+Support MAP_ANON as a synonym of MAP_ANONYMOUS
+
+--- /pkg_comp/obj/pkgsrc/www/c-icap/default/c_icap-0.4.4/os/unix/shared_mem.c.orig 2017-04-24 14:00:54.000000000 +0000
++++ /pkg_comp/obj/pkgsrc/www/c-icap/default/c_icap-0.4.4/os/unix/shared_mem.c 2017-04-24 14:00:57.000000000 +0000
+@@ -29,6 +29,9 @@
+ #endif
+ #if defined(USE_POSIX_MAPPED_FILES)
+ #include <sys/mman.h>
++#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
++#define MAP_ANONYMOUS MAP_ANON
++#endif
+ #endif
+ #include <fcntl.h>
+ #include <errno.h>