From 685ac6ad2e48093d69cccd1d242ed36a326cf90b Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 9 Feb 2022 10:22:53 +0000 Subject: build: fix depends zeromq dash compatibility Picks upstream commit 9a397666d28ca5f3c0d8233be3d39b2206555f45 to fix dash compatibility. This fixes building zeromq in our CentOS 8 CI. This is my preferred fix over backporting a zeromq update (which would contain this change). --- depends/packages/zeromq.mk | 4 +- depends/patches/zeromq/fix_dash_compat.patch | 71 ++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 depends/patches/zeromq/fix_dash_compat.patch diff --git a/depends/packages/zeromq.mk b/depends/packages/zeromq.mk index 3b7f3690a4..01f7e1564d 100644 --- a/depends/packages/zeromq.mk +++ b/depends/packages/zeromq.mk @@ -3,7 +3,7 @@ $(package)_version=4.3.1 $(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/ $(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_sha256_hash=bcbabe1e2c7d0eec4ed612e10b94b112dd5f06fcefa994a0c79a45d835cd21eb -$(package)_patches=remove_libstd_link.patch +$(package)_patches=remove_libstd_link.patch fix_dash_compat.patch define $(package)_set_vars $(package)_config_opts=--without-docs --disable-shared --disable-curve --disable-curve-keygen --disable-perf @@ -17,10 +17,12 @@ endef define $(package)_preprocess_cmds patch -p1 < $($(package)_patch_dir)/remove_libstd_link.patch && \ + patch -p1 < $($(package)_patch_dir)/fix_dash_compat.patch && \ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub config endef define $(package)_config_cmds + ./autogen.sh && \ $($(package)_autoconf) endef diff --git a/depends/patches/zeromq/fix_dash_compat.patch b/depends/patches/zeromq/fix_dash_compat.patch new file mode 100644 index 0000000000..7f4d5eddcc --- /dev/null +++ b/depends/patches/zeromq/fix_dash_compat.patch @@ -0,0 +1,71 @@ +commit 9a397666d28ca5f3c0d8233be3d39b2206555f45 +Author: Alain Kalker +Date: Wed May 22 01:30:54 2019 +0200 + + acinclude.m4, configure.ac: Fix several non-portable uses of `test` + + Fixes #3517 + +diff --git a/acinclude.m4 b/acinclude.m4 +index 036a30a0..4f5ae3c2 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -1058,12 +1058,12 @@ AC_DEFUN([LIBZMQ_CHECK_POLLER], [{ + [AS_HELP_STRING([--with-api-poller], + [choose zmq_poll(er)_* API polling system manually. Valid values are 'poll', 'select', or 'auto'. [default=auto]])]) + +- if test "x$with_poller" == "x"; then ++ if test "x$with_poller" = "x"; then + pollers=auto + else + pollers=$with_poller + fi +- if test "$pollers" == "auto"; then ++ if test "$pollers" = "auto"; then + # We search for pollers in this order + pollers="kqueue epoll devpoll pollset poll select" + fi +@@ -1145,13 +1145,13 @@ AC_DEFUN([LIBZMQ_CHECK_POLLER], [{ + if test $poller_found -eq 0; then + AC_MSG_ERROR([None of '$pollers' are valid pollers on this platform]) + fi +- if test "x$with_api_poller" == "x"; then ++ if test "x$with_api_poller" = "x"; then + with_api_poller=auto + fi +- if test "x$with_api_poller" == "xauto"; then +- if test $poller == "select"; then ++ if test "x$with_api_poller" = "xauto"; then ++ if test $poller = "select"; then + api_poller=select +- elif test $poller == "wepoll"; then ++ elif test $poller = "wepoll"; then + api_poller=select + else + api_poller=poll +@@ -1159,10 +1159,10 @@ AC_DEFUN([LIBZMQ_CHECK_POLLER], [{ + else + api_poller=$with_api_poller + fi +- if test "$api_poller" == "select"; then ++ if test "$api_poller" = "select"; then + AC_MSG_NOTICE([Using 'select' zmq_poll(er)_* API polling system]) + AC_DEFINE(ZMQ_POLL_BASED_ON_SELECT, 1, [Use 'select' zmq_poll(er)_* API polling system]) +- elif test "$api_poller" == "poll"; then ++ elif test "$api_poller" = "poll"; then + AC_MSG_NOTICE([Using 'poll' zmq_poll(er)_* API polling system]) + AC_DEFINE(ZMQ_POLL_BASED_ON_POLL, 1, [Use 'poll' zmq_poll(er)_* API polling system]) + else +diff --git a/configure.ac b/configure.ac +index 5c4e1e45..65bb4e0d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -143,7 +143,7 @@ AC_ARG_ENABLE(address-sanitizer, [AS_HELP_STRING([--enable-address-sanitizer=yes + [Build with GCC Address Sanitizer instrumentation])], + [ZMQ_ASAN="$enableval"]) + +-if test "x${ZMQ_ASAN}" == "xyes"; then ++if test "x${ZMQ_ASAN}" = "xyes"; then + CFLAGS="${CFLAGS} -fsanitize=address" + CXXFLAGS="${CXXFLAGS} -fsanitize=address" + -- cgit v1.2.3