summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoonas Niilola <juippis@gentoo.org>2022-02-14 11:04:11 +0200
committerJoonas Niilola <juippis@gentoo.org>2022-02-14 11:07:26 +0200
commit5453866a993b63770a3773333ce0b08b320e6248 (patch)
tree932b56bfbd8bf94e17ca91d2ac533d1f2480c423 /dev-libs/raft/files
parentnet-misc/nextcloud-client: drop vulnerable version (diff)
downloadgentoo-5453866a993b63770a3773333ce0b08b320e6248.tar.gz
gentoo-5453866a993b63770a3773333ce0b08b320e6248.tar.bz2
gentoo-5453866a993b63770a3773333ce0b08b320e6248.zip
dev-libs/raft: add 0.11.3
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-libs/raft/files')
-rw-r--r--dev-libs/raft/files/raft-0.11.3-disable-automagic-check-for-lz4.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/dev-libs/raft/files/raft-0.11.3-disable-automagic-check-for-lz4.patch b/dev-libs/raft/files/raft-0.11.3-disable-automagic-check-for-lz4.patch
new file mode 100644
index 000000000000..f16936448091
--- /dev/null
+++ b/dev-libs/raft/files/raft-0.11.3-disable-automagic-check-for-lz4.patch
@@ -0,0 +1,90 @@
+diff -Naur a/configure.ac b/configure.ac
+--- a/configure.ac 2021-12-14 18:47:55.000000000 +0200
++++ b/configure.ac 2022-02-14 10:51:19.908763437 +0200
+@@ -23,47 +23,12 @@
+ # explicitly disabled.
+ AC_ARG_ENABLE(lz4, AS_HELP_STRING([--disable-lz4], [do not use lz4 compression]))
+
+-# Thanks to the OpenVPN configure.ac file for this part.
+-# If this fails, we will do another test next.
+-# We also add set LZ4_LIBS otherwise linker will not know about the lz4 library
+-PKG_CHECK_MODULES(LZ4, [liblz4 >= 1.7.1], [have_lz4="yes"], [LZ4_LIBS="-llz4"])
+-if test "${have_lz4}" != "yes" ; then
+- AC_CHECK_HEADERS([lz4.h],
+- [have_lz4h="yes"],
+- [])
+- if test "${have_lz4h}" = "yes" ; then
+- AC_MSG_CHECKING([additionally if system LZ4 version >= 1.7.1])
+- AC_COMPILE_IFELSE(
+- [AC_LANG_PROGRAM([[
+-#include <lz4.h>
+- ]],
+- [[
+-/* Version encoding: MMNNPP (Major miNor Patch) - see lz4.h for details */
+-#if LZ4_VERSION_NUMBER < 10701L
+-#error LZ4 is too old
+-#endif
+- ]]
+- )],
+- [
+- AC_MSG_RESULT([ok])
+- have_lz4="yes"
+- ],
+- [
+- AC_MSG_RESULT([system LZ4 library is too old])
+- have_lz4="no"
+- ]
+- )
+- fi
+-fi
+-
+-AS_IF([test "x$enable_lz4" != "xno" -a "x$have_lz4" != "xyes"],
+- [AC_MSG_ERROR([liblz4 required but not found])], [])
+-# LZ4 Can be available without being enabled, this allows a user to activate
+-# it at a later stage through an API call.
+-AM_CONDITIONAL(LZ4_AVAILABLE, test "x$have_lz4" = "xyes")
++AS_IF([test "x$enable_lz4" != "xno"], [
++ PKG_CHECK_MODULES(LZ4, [liblz4 >= 1.7.1], [LZ4_LIBS="-llz4"])
++])
+ # `LZ4_ENABLED` will cause the libuv snapshot implementation to use lz4
+ # compression by default.
+-AM_CONDITIONAL(LZ4_ENABLED, test "x$enable_lz4" != "xno" -a "x$have_lz4" = "xyes")
++AM_CONDITIONAL(LZ4_ENABLED, test "x$enable_lz4" != "xno")
+
+ # The fake I/O implementation and associated fixture is built by default, unless
+ # explicitly disabled.
+diff -Naur a/Makefile.am b/Makefile.am
+--- a/Makefile.am 2021-12-14 18:47:55.000000000 +0200
++++ b/Makefile.am 2022-02-14 10:55:37.467978443 +0200
+@@ -72,15 +72,11 @@
+ test_unit_core_CFLAGS = $(AM_CFLAGS) -Wno-conversion
+ test_unit_core_LDADD = libtest.la
+
+-if LZ4_AVAILABLE
+-test_unit_core_CFLAGS += -DLZ4_AVAILABLE
+-test_unit_core_LDFLAGS = $(LZ4_LIBS)
+-libraft_la_CFLAGS += -DLZ4_AVAILABLE
+-libraft_la_LDFLAGS += $(LZ4_LIBS)
+-endif # LZ4_AVAILABLE
+ if LZ4_ENABLED
+ test_unit_core_CFLAGS += -DLZ4_ENABLED
++test_unit_core_LDFLAGS = $(LZ4_LIBS)
+ libraft_la_CFLAGS += -DLZ4_ENABLED
++libraft_la_LDFLAGS += $(LZ4_LIBS)
+ endif # LZ4_ENABLED
+
+ if FIXTURE_ENABLED
+@@ -204,12 +200,9 @@
+
+ AM_CFLAGS += $(UV_CFLAGS)
+
+-if LZ4_AVAILABLE
+-test_integration_uv_CFLAGS += -DLZ4_AVAILABLE
+-test_integration_uv_LDFLAGS += $(LZ4_LIBS)
+-endif # LZ4_AVAILABLE
+ if LZ4_ENABLED
+ test_integration_uv_CFLAGS += -DLZ4_ENABLED
++test_integration_uv_LDFLAGS += $(LZ4_LIBS)
+ endif # LZ4_ENABLED
+
+ endif # UV_ENABLED