zmq: update to 4.3.5
authorRosen Penev <rosenp@gmail.com>
Thu, 15 Feb 2024 00:41:59 +0000 (16:41 -0800)
committerRosen Penev <rosenp@gmail.com>
Thu, 15 Feb 2024 01:40:25 +0000 (17:40 -0800)
Remove GCC13 backport.

Refresh other patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
libs/zmq/Makefile
libs/zmq/patches/010-fix-openpgm-linking-for-zeromq.patch
libs/zmq/patches/020-no-libbsd.patch
libs/zmq/patches/030-gcc13-compatibility.patch [deleted file]

index 0c3a7f3e185dc4105051d5cd73119036470a4f3b..c9dccd0a7b3d50c025699983a536ebc2639e1d0f 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zeromq
-PKG_VERSION:=4.3.4
-PKG_RELEASE:=4
+PKG_VERSION:=4.3.5
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/zeromq/libzmq/releases/download/v$(PKG_VERSION)
-PKG_HASH:=c593001a89f5a85dd2ddf564805deb860e02471171b3f204944857336295c3e5
+PKG_HASH:=6653ef5910f17954861fe72332e68b03ca6e4d9c7160eb3a8de5a5a913bfab43
 
 PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
 PKG_LICENSE:=GPL-3.0-or-later
index c699aa2abc0a8e2341b92e087e81bd439c2a6d72..2fc711bdf4bcf0ecf8893f4fcdb21d20c7c32af8 100644 (file)
@@ -9,7 +9,7 @@ Subject: [PATCH] fix-openpgm-linking-for-zeromq
 
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -793,7 +793,7 @@ else()
+@@ -809,7 +809,7 @@ else()
      # message(FATAL_ERROR "WITH_OPENPGM not implemented")
  
      if(NOT OPENPGM_PKGCONFIG_NAME)
@@ -18,7 +18,7 @@ Subject: [PATCH] fix-openpgm-linking-for-zeromq
      endif()
  
      set(OPENPGM_PKGCONFIG_NAME
-@@ -804,6 +804,8 @@ else()
+@@ -820,6 +820,8 @@ else()
  
      if(OPENPGM_FOUND)
        message(STATUS ${OPENPGM_PKGCONFIG_NAME}" found")
@@ -27,7 +27,7 @@ Subject: [PATCH] fix-openpgm-linking-for-zeromq
        set(pkg_config_names_private "${pkg_config_names_private} ${OPENPGM_PKGCONFIG_NAME}")
      else()
        message(
-@@ -1447,6 +1449,10 @@ if(BUILD_SHARED)
+@@ -1494,6 +1496,10 @@ if(BUILD_SHARED)
      endif()
    endif()
  
index 0ed003945ef96ef40a3770c9c447e9ae2c2794e6..641b69b6e55a1ae33c0f260ce2d7102b58d4f3c7 100644 (file)
@@ -7,38 +7,13 @@ libbsd is only used once and as part of a larger, incorrect function.
 I rewrote the code that used it without the need for it.
 ---
  CMakeLists.txt               | 41 ++++++-----------------------
- Makefile.am                  | 12 ++++-----
  builds/cmake/platform.hpp.in |  2 --
- configure.ac                 | 39 +--------------------------
- packaging/debian/control     |  2 --
- packaging/debian/zeromq.dsc  |  2 +-
- packaging/redhat/zeromq.spec |  2 +-
  src/compat.hpp               | 51 +++++++++++++++++++++++-------------
  8 files changed, 50 insertions(+), 101 deletions(-)
 
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -240,19 +240,6 @@ if(NOT ZMQ_USE_GNUTLS)
-   endif()
- endif()
--if(NOT MSVC)
--  option(WITH_LIBBSD "Use libbsd instead of builtin strlcpy" ON)
--  if(WITH_LIBBSD)
--    pkg_check_modules(LIBBSD "libbsd")
--    if(LIBBSD_FOUND)
--      message(STATUS "Using libbsd")
--      set(pkg_config_names_private "${pkg_config_names_private} libbsd")
--      set(ZMQ_HAVE_LIBBSD 1)
--    endif()
--  endif()
--  check_cxx_symbol_exists(strlcpy string.h ZMQ_HAVE_STRLCPY)
--endif()
--
- # Select curve encryption library, defaults to tweetnacl To use libsodium instead, use --with-libsodium(must be
- # installed) To disable curve, use --disable-curve
-@@ -1437,10 +1424,6 @@ if(BUILD_SHARED)
+@@ -1484,10 +1484,6 @@ if(BUILD_SHARED)
      target_link_libraries(libzmq ${NSS3_LIBRARIES})
    endif()
  
@@ -49,8 +24,8 @@ I rewrote the code that used it without the need for it.
    if(SODIUM_FOUND)
      target_link_libraries(libzmq ${SODIUM_LIBRARIES})
      # On Solaris, libsodium depends on libssp
-@@ -1482,10 +1465,6 @@ if(BUILD_STATIC)
-     target_link_libraries(libzmq-static ${GNUTLS_LIBRARIES})
+@@ -1534,10 +1530,6 @@ if(BUILD_STATIC)
+     target_include_directories(libzmq-static PRIVATE "${GNUTLS_INCLUDE_DIR}")
    endif()
  
 -  if(LIBBSD_FOUND)
@@ -60,8 +35,8 @@ I rewrote the code that used it without the need for it.
    if(NSS3_FOUND)
      target_link_libraries(libzmq-static ${NSS3_LIBRARIES})
    endif()
-@@ -1550,10 +1529,6 @@ if(BUILD_SHARED)
-         target_link_libraries(${perf-tool} ${GNUTLS_LIBRARIES})
+@@ -1607,10 +1599,6 @@ if(BUILD_SHARED)
+         target_include_directories(${perf-tool} PRIVATE "${GNUTLS_INCLUDE_DIR}")
        endif()
  
 -      if(LIBBSD_FOUND)
@@ -71,40 +46,9 @@ I rewrote the code that used it without the need for it.
        if(NSS3_FOUND)
          target_link_libraries(${perf-tool} ${NSS3_LIBRARIES})
        endif()
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -351,11 +351,11 @@ if HAVE_VSCRIPT_COMPLEX
- src_libzmq_la_LDFLAGS += $(VSCRIPT_LDFLAGS),$(srcdir)/src/libzmq.vers
- endif
--src_libzmq_la_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS) $(LIBUNWIND_CFLAGS) $(LIBBSD_CFLAGS)
--src_libzmq_la_CFLAGS = $(CODE_COVERAGE_CFLAGS) $(LIBUNWIND_CFLAGS) $(LIBBSD_CFLAGS)
-+src_libzmq_la_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS) $(LIBUNWIND_CFLAGS)
-+src_libzmq_la_CFLAGS = $(CODE_COVERAGE_CFLAGS) $(LIBUNWIND_CFLAGS)
- src_libzmq_la_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ $(CODE_COVERAGE_CXXFLAGS) \
--      $(LIBUNWIND_CFLAGS) $(LIBBSD_CFLAGS)
--src_libzmq_la_LIBADD = $(CODE_COVERAGE_LDFLAGS) $(LIBUNWIND_LIBS) $(LIBBSD_LIBS)
-+      $(LIBUNWIND_CFLAGS)
-+src_libzmq_la_LIBADD = $(CODE_COVERAGE_LDFLAGS) $(LIBUNWIND_LIBS)
- if USE_NSS
- src_libzmq_la_CPPFLAGS += ${NSS3_CFLAGS}
-@@ -849,10 +849,10 @@ tests_test_security_curve_SOURCES += \
- endif
- tests_test_security_curve_LDADD = \
--        ${TESTUTIL_LIBS} src/libzmq.la $(LIBUNWIND_LIBS) $(LIBBSD_LIBS)
-+        ${TESTUTIL_LIBS} src/libzmq.la $(LIBUNWIND_LIBS)
- tests_test_security_curve_CPPFLAGS = \
-         ${TESTUTIL_CPPFLAGS} \
--      ${LIBUNWIND_CFLAGS}  ${LIBBSD_CFLAGS}
-+      ${LIBUNWIND_CFLAGS}
- if USE_LIBSODIUM
- tests_test_security_curve_CPPFLAGS += \
 --- a/builds/cmake/platform.hpp.in
 +++ b/builds/cmake/platform.hpp.in
-@@ -52,8 +52,6 @@
+@@ -56,8 +56,6 @@
  #cmakedefine ZMQ_HAVE_PTHREAD_SET_AFFINITY
  #cmakedefine HAVE_ACCEPT4
  #cmakedefine HAVE_STRNLEN
@@ -112,65 +56,10 @@ I rewrote the code that used it without the need for it.
 -#cmakedefine ZMQ_HAVE_LIBBSD
  
  #cmakedefine ZMQ_HAVE_IPC
---- a/configure.ac
-+++ b/configure.ac
-@@ -12,7 +12,7 @@ AC_CONFIG_AUX_DIR(config)
- AC_CONFIG_MACRO_DIR(config)
- AC_CONFIG_HEADERS([src/platform.hpp])
- AM_INIT_AUTOMAKE(foreign subdir-objects tar-ustar dist-zip)
--# Allow "configure --disable-maintainer-mode" to disable timestamp checking 
-+# Allow "configure --disable-maintainer-mode" to disable timestamp checking
- AM_MAINTAINER_MODE([enable])
- m4_pattern_allow([AC_PROG_CC_C99])
-@@ -806,43 +806,6 @@ AC_COMPILE_IFELSE(
-     ],[
-         AC_MSG_RESULT([no])
- ])
--
--AC_ARG_ENABLE([libbsd],
--    [AS_HELP_STRING([--enable-libbsd],
--        [enable libbsd [default=auto]])],
--    [enable_libbsd=$enableval],
--    [enable_libbsd="auto"])
--
--if test "x$enable_libbsd" != "xno"; then
--    PKG_CHECK_MODULES(LIBBSD, [libbsd],
--        [
--            AC_DEFINE(ZMQ_HAVE_LIBBSD, 1, [The libbsd library is to be used])
--            AC_SUBST([LIBBSD_CFLAGS])
--            AC_SUBST([LIBBSD_LIBS])
--            PKGCFG_NAMES_PRIVATE="$PKGCFG_NAMES_PRIVATE libbsd"
--            found_libbsd="yes"
--        ],
--        [
--            found_libbsd="no"
--            if test "x$enable_libbsd" = "xyes"; then
--                AC_MSG_ERROR([Cannot find libbsd])
--            else
--                AC_MSG_WARN([Cannot find libbsd])
--            fi
--        ])
--fi
--AC_MSG_CHECKING([whether strlcpy is available])
--AC_COMPILE_IFELSE(
--    [AC_LANG_PROGRAM(
--        [[#include <string.h>]],
--        [[char buf [100]; size_t bar = strlcpy (buf, "foo", 100); (void)bar; return 0;]])
--    ],[
--        AC_MSG_RESULT([yes])
--        AC_DEFINE(ZMQ_HAVE_STRLCPY, [1],
--            [strlcpy is available])
--    ],[
--        AC_MSG_RESULT([no])
--])
- # pthread_setname is non-posix, and there are at least 4 different implementations
- AC_MSG_CHECKING([whether signature of pthread_setname_np() has 1 argument])
+ #cmakedefine ZMQ_HAVE_STRUCT_SOCKADDR_UN
 --- a/src/compat.hpp
 +++ b/src/compat.hpp
-@@ -37,26 +37,41 @@
+@@ -10,26 +10,41 @@
  #define strcasecmp _stricmp
  #define strtok_r strtok_s
  #else
diff --git a/libs/zmq/patches/030-gcc13-compatibility.patch b/libs/zmq/patches/030-gcc13-compatibility.patch
deleted file mode 100644 (file)
index b8c7489..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-Patch-Source: https://github.com/zeromq/libzmq/commit/438d5d88392baffa6c2c5e0737d9de19d6686f0d
---
-From 438d5d88392baffa6c2c5e0737d9de19d6686f0d Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <slyich@gmail.com>
-Date: Tue, 20 Dec 2022 21:45:16 +0000
-Subject: [PATCH] src/secure_allocator.hpp: define missing 'rebind' type
-
-`gcc-13` added an assert to standard headers to make sure custom
-allocators have intended implementation of rebind type instead
-of inherited rebind. gcc change:
-    https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=64c986b49558a7
-
-Without the fix build fails on this week's `gcc-13` as:
-
-    [ 92%] Building CXX object tests/CMakeFiles/test_security_curve.dir/test_security_curve.cpp.o
-    In file included from /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/ext/alloc_traits.h:34,
-                     from /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/stl_uninitialized.h:64,
-                     from /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/memory:69,
-                     from tests/../src/secure_allocator.hpp:42,
-                     from tests/../src/curve_client_tools.hpp:49,
-                     from tests/test_security_curve.cpp:53:
-    /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/alloc_traits.h: In instantiation of 'struct std::__allocator_traits_base::__rebind<zmq::secure_allocator_t<unsigned char>, unsigned char, void>':
-    /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/alloc_traits.h:94:11:   required by substitution of 'template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = zmq::secure_allocator_t<unsigned char>; _Up = unsigned char]'
-    /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/alloc_traits.h:228:8:   required by substitution of 'template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = unsigned char; _Alloc = zmq::secure_allocator_t<unsigned char>]'
-    /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/ext/alloc_traits.h:126:65:   required from 'struct __gnu_cxx::__alloc_traits<zmq::secure_allocator_t<unsigned char>, unsigned char>::rebind<unsigned char>'
-    /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/stl_vector.h:88:21:   required from 'struct std::_Vector_base<unsigned char, zmq::secure_allocator_t<unsigned char> >'
-    /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/stl_vector.h:423:11:   required from 'class std::vector<unsigned char, zmq::secure_allocator_t<unsigned char> >'
-    tests/../src/curve_client_tools.hpp:64:76:   required from here
-    /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
-       70 |                         _Tp>::value,
-          |                               ^~~~~
-
-The change adds trivial `rebind` definition with expected return type
-and satisfies conversion requirements.
----
- src/secure_allocator.hpp | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
---- a/src/secure_allocator.hpp
-+++ b/src/secure_allocator.hpp
-@@ -95,6 +95,17 @@ bool operator!= (const secure_allocator_
- #else
- template <typename T> struct secure_allocator_t : std::allocator<T>
- {
-+    secure_allocator_t () ZMQ_DEFAULT;
-+
-+    template <class U>
-+    secure_allocator_t (const secure_allocator_t<U> &) ZMQ_NOEXCEPT
-+    {
-+    }
-+
-+    template <class U> struct rebind
-+    {
-+        typedef secure_allocator_t<U> other;
-+    };
- };
- #endif
- }