pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/textproc/icu Add NetBSD MI atomic_ops support.
details: https://anonhg.NetBSD.org/pkgsrc/rev/1db99c4f8008
branches: trunk
changeset: 631412:1db99c4f8008
user: obache <obache%pkgsrc.org@localhost>
date: Tue Mar 04 12:07:16 2014 +0000
description:
Add NetBSD MI atomic_ops support.
Based on PR pkg/48608 by Izumi Tsutsui.
diffstat:
textproc/icu/distinfo | 6 ++-
textproc/icu/patches/patch-common_umutex.h | 41 ++++++++++++++++++++++++++++++
textproc/icu/patches/patch-configure | 28 +++++++++++++++++++-
textproc/icu/patches/patch-configure.ac | 36 ++++++++++++++++++++++++++
4 files changed, 107 insertions(+), 4 deletions(-)
diffs (152 lines):
diff -r e1c5055fd839 -r 1db99c4f8008 textproc/icu/distinfo
--- a/textproc/icu/distinfo Tue Mar 04 09:35:15 2014 +0000
+++ b/textproc/icu/distinfo Tue Mar 04 12:07:16 2014 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.43 2013/12/04 21:02:23 richard Exp $
+$NetBSD: distinfo,v 1.44 2014/03/04 12:07:16 obache Exp $
SHA1 (icu4c-52_1-src.tgz) = 6de440b71668f1a65a9344cdaf7a437291416781
RMD160 (icu4c-52_1-src.tgz) = cbfbb18c3991ba55ebb50c607d5208cbfeb9fce3
@@ -11,12 +11,14 @@
SHA1 (patch-af) = dcfbaf16844292a9ae57536ae2fb62fd1659d067
SHA1 (patch-common_Makefile.in) = 20fa472bd0e5e5fac15153774a58a8ce034d1996
SHA1 (patch-common_putilimp.h) = a68faa97c2bffeecaca1586e26f5bbe48e71b262
+SHA1 (patch-common_umutex.h) = 096d3e15ef7b84533456af4570ed70747a4ef70c
SHA1 (patch-common_unicode_platform.h) = 82786dff790782eb07cdc527061de33e771ec63c
SHA1 (patch-common_uposixdefs.h) = abe1989ea4312702e5d0172b662409957b3e2d91
SHA1 (patch-config_icu-config-bottom) = 168b89ee9180d4ae545125866ee91eb004010501
SHA1 (patch-config_mh-cygwin) = e3aa7a926244b448ce12ab2f89156348a02c0659
SHA1 (patch-config_mh-solaris-gcc) = f81fec8f0d232b9125c7ea7ec334b78872aa2025
-SHA1 (patch-configure) = f8151a2b51cdfd1d6a1d9d8cf316a52c5eae7050
+SHA1 (patch-configure) = bea560028b869defa7b5eab8c148aaf6f0e8f3ee
+SHA1 (patch-configure.ac) = d90bf98e97cb2051dd64b847b97092440c1c03f8
SHA1 (patch-data_Makefile.in) = a5dcfe848a0444f0a1c036b7f4e343468bf3b3d1
SHA1 (patch-i18n_Makefile.in) = 935965c0418994271d844a4c908cd9e1fe8279fd
SHA1 (patch-io_Makefile.in) = f5f5eabb31ea7120130d13c397fab1feddd30447
diff -r e1c5055fd839 -r 1db99c4f8008 textproc/icu/patches/patch-common_umutex.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/icu/patches/patch-common_umutex.h Tue Mar 04 12:07:16 2014 +0000
@@ -0,0 +1,41 @@
+$NetBSD: patch-common_umutex.h,v 1.1 2014/03/04 12:07:16 obache Exp $
+
+* Add NetBSD MI atomic_ops(3) support
+
+--- common/umutex.h.orig 2013-10-04 20:49:16.000000000 +0000
++++ common/umutex.h
+@@ -117,6 +117,34 @@ inline int32_t umtx_atomic_dec(u_atomic_
+ U_NAMESPACE_END
+
+
++#elif U_HAVE_NETBSD_ATOMIC_OPS
++/*
++ * NetBSD MI atomic_ops(3)
++ */
++
++U_NAMESPACE_BEGIN
++#include <sys/atomic.h>
++typedef volatile uint32_t u_atomic_int32_t;
++#define ATOMIC_INT32_T_INITIALIZER(val) val
++
++inline int32_t umtx_loadAcquire(u_atomic_int32_t &var) {
++ return atomic_cas_32(&var, 0, 0);
++}
++
++inline void umtx_storeRelease(u_atomic_int32_t &var, int32_t val) {
++ atomic_swap_32(&var, val);
++}
++
++inline int32_t umtx_atomic_inc(u_atomic_int32_t *p) {
++ return atomic_inc_32_nv(p);
++}
++
++inline int32_t umtx_atomic_dec(u_atomic_int32_t *p) {
++ return atomic_dec_32_nv(p);
++}
++U_NAMESPACE_END
++
++
+ #elif U_HAVE_GCC_ATOMICS
+ /*
+ * gcc atomic ops. These are available on several other compilers as well.
diff -r e1c5055fd839 -r 1db99c4f8008 textproc/icu/patches/patch-configure
--- a/textproc/icu/patches/patch-configure Tue Mar 04 09:35:15 2014 +0000
+++ b/textproc/icu/patches/patch-configure Tue Mar 04 12:07:16 2014 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-configure,v 1.2 2013/12/04 21:02:23 richard Exp $
+$NetBSD: patch-configure,v 1.3 2014/03/04 12:07:16 obache Exp $
Portability fix.
Solaris seems to need -std=c99 with recent pkgsrc so keep it
@@ -25,7 +25,31 @@
# 2. try xarch=v9 [deprecated]
## TODO: cross compile: the following won't work.
SPARCV9=`isainfo -n 2>&1 | grep sparcv9`
-@@ -7442,13 +7439,13 @@ fi
+@@ -5452,6 +5449,23 @@ if test "x$ac_cv_header_elf_h" = "xyes";
+ CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_HAVE_ELF_H=1";
+ fi
+
++# check if sys/atomic.h is present.
++for ac_header in sys/atomic.h
++do :
++ ac_fn_c_check_header_mongrel "$LINENO" "sys/atomic.h" "ac_cv_header_sys_atomic_h" "$ac_includes_default"
++if test "x$ac_cv_header_sys_atomic_h" = xyes; then :
++ cat >>confdefs.h <<_ACEOF
++#define HAVE_SYS_ATOMIC_H 1
++_ACEOF
++
++fi
++
++done
++
++if test "x$ac_cv_header_sys_atomic_h" = "xyes"; then
++ CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_HAVE_NETBSD_ATOMIC_OPS=1";
++fi
++
+ U_ENABLE_DYLOAD=1
+ enable=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable dynamic loading of plugins" >&5
+@@ -7442,13 +7456,13 @@ fi
# Now that we're done using CPPFLAGS etc. for tests, we can change it
# for build.
diff -r e1c5055fd839 -r 1db99c4f8008 textproc/icu/patches/patch-configure.ac
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/icu/patches/patch-configure.ac Tue Mar 04 12:07:16 2014 +0000
@@ -0,0 +1,36 @@
+$NetBSD: patch-configure.ac,v 1.1 2014/03/04 12:07:16 obache Exp $
+
+* Detect NetBSD libatomic
+* test(1) portability fix
+
+--- configure.ac.orig 2013-10-04 20:54:58.000000000 +0000
++++ configure.ac
+@@ -407,6 +407,12 @@ if test "x$ac_cv_header_elf_h" = "xyes";
+ CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_HAVE_ELF_H=1";
+ fi
+
++# check if sys/atomic.h is present.
++AC_CHECK_HEADERS([sys/atomic.h])
++if test "x$ac_cv_header_sys_atomic_h" = "xyes"; then
++ CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_HAVE_NETBSD_ATOMIC_OPS=1";
++fi
++
+ U_ENABLE_DYLOAD=1
+ enable=yes
+ AC_MSG_CHECKING([whether to enable dynamic loading of plugins])
+@@ -1249,13 +1255,13 @@ fi
+ # Now that we're done using CPPFLAGS etc. for tests, we can change it
+ # for build.
+
+-if test "${CC}" == "clang"; then
++if test "${CC}" = "clang"; then
+ CLANGCFLAGS="-Qunused-arguments -Wno-parentheses-equality"
+ else
+ CLANGCFLAGS=""
+ fi
+
+-if test "${CXX}" == "clang++"; then
++if test "${CXX}" = "clang++"; then
+ CLANGCXXFLAGS="-Qunused-arguments -Wno-parentheses-equality"
+ else
+ CLANGCXXFLAGS=""
Home |
Main Index |
Thread Index |
Old Index