summaryrefslogtreecommitdiff
path: root/dev-libs/raft
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /dev-libs/raft
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'dev-libs/raft')
-rw-r--r--dev-libs/raft/Manifest3
-rw-r--r--dev-libs/raft/files/raft-0.11.3-disable-automagic-check-for-lz4.patch79
-rw-r--r--dev-libs/raft/raft-0.11.3-r1.ebuild56
3 files changed, 138 insertions, 0 deletions
diff --git a/dev-libs/raft/Manifest b/dev-libs/raft/Manifest
index b6e52304a9f6..dc810078ff3b 100644
--- a/dev-libs/raft/Manifest
+++ b/dev-libs/raft/Manifest
@@ -1,5 +1,8 @@
AUX raft-0.10.0-toggle-zfs.patch 955 BLAKE2B bb9f351a6b7d0b7d95b7cdb6cf89db8963d46c44bd2613c69c7f3bd2c910cc185c8409cd80d218cab1569fe4729f649ac922ad1eb2b5652e5eeba441642e9588 SHA512 907f50fd1dc907d2a9aa1a89601064205c26d48956ddf56389a843e8c81b00acbc461125cbea5caef315be4a4a1d3a8f9bfd0a45ff0dedbeef1e0851e899b277
+AUX raft-0.11.3-disable-automagic-check-for-lz4.patch 2819 BLAKE2B 132e07bd4dc447bb67b2521c89e06c697dce9554d1f2b737aa460a22be9f7a2999f39ebd1b25f81863ebd764ef127856dceeadcb2a12aecdb01cf01f1cc22bc0 SHA512 9de7af38c778366e63e03991fa147844695dd0b4cd2e62559c5f82a0a2e914abf1bab5b905ad3cf26512d6d48670bfdb40a0683ef7dd1383eb0229f6718a70a4
AUX raft-0.9.25-Always-skip-init-oom-test.patch 1140 BLAKE2B 03ee957f5fa7a1ef3c9a5223a5e67df07176110c601f790c905751cfcba7aeb4a160ac2a5547ff6440cd7c292a3e7d1913b3334f24151a288fd2c95e19865b86 SHA512 e138f113fef280fd8bbf8055be6410b81a163ee7813ac13f539e38923062306c6bf37831a298f56530a954d68f3975069af6e31f73679b4924274c5091ae7679
DIST raft-0.11.2.tar.gz 325098 BLAKE2B d9366547440b431edec75a22bca3a50bb6d714b5d950c061723f0585c5ad33704d23c32f2e325dc566ebeab71e15e10f07932c854657837e190901b52c9b4950 SHA512 8be47270cf3b888ff6adeeec2480ccd5065b45c3c546da089cbb326cf429f0bcd4396001e20fbf52587c00d5757337812c834ec5064fafa4815a978a7cf0c35f
+DIST raft-0.11.3.tar.gz 329571 BLAKE2B 08b145bfbcc26b50f69c550599978ed365ccbbd021b9c4699784c08bd7e0f17f366b1709c22df1a467fbdb524668a753f431744419da8f18d57ea52c5b33de38 SHA512 7d1a7455ff8d58ed1f3d259cade1c74fcb22732a55242dcf761cc6554739c0ea1c462aa02591d28d8fa2b343b23e6261a5e15d02e2a31467969b7d9f9f3b5e92
EBUILD raft-0.11.2.ebuild 1031 BLAKE2B c1bb5e5a07ec1d08b60dea5193de4561fdc3e8edadc737af4e6fffdac0d07ea2b204bfd9af9ad62f7e86c9486e978629848773033fc1c1d5a027ed8566c23c52 SHA512 c8322b60b347c6e40fd95c4f54918b5812833e034fe8eeeeae0821ddca0cf76e1b173001b786d42330113353ec742f1a0435b338b9848eeb034791ada3142a1e
+EBUILD raft-0.11.3-r1.ebuild 1096 BLAKE2B 830606018fe823faba2bfba7b1c5d4a4cb4ff9e7ccbc70f2bbcbbfabc100e68723000d225c020fe0b025f758e708353439643d4202b1870fd5872550bc32ad4d SHA512 bc42c406b1bdfe5a86e0bfb9ab78c82b515aba15b90e274924b255ea75c6f23d1bb4339a6f53a4625e0c7cacd3200501fcc6db882a402adba8dea9db92f31b6a
MISC metadata.xml 813 BLAKE2B e2ee68230ca6938ecc09c7cf9a3c4acbe961c1a6c44cfc5521f5d1fca93d7b1a62c1bcf10290207288f3e5c04b8ecebb7d4ee4ba2b1a12326eb58e80e0276ee6 SHA512 e163b16c585f79757c35d5a84ed017cd173a40fdef5ea736f4a01c24ffc3db2f5f0d69486c58217d8910eee47757da5da23e8353f4254990ba13c2cd56ddaa57
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..7cd81e53cea9
--- /dev/null
+++ b/dev-libs/raft/files/raft-0.11.3-disable-automagic-check-for-lz4.patch
@@ -0,0 +1,79 @@
+diff --git a/Makefile.am b/Makefile.am
+index e0dbfc8..e595cb7 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -80,7 +80,9 @@ 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
+@@ -210,6 +212,7 @@ 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
+diff --git a/configure.ac b/configure.ac
+index df7bea9..0e2949f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -23,47 +23,13 @@ AM_CONDITIONAL(UV_ENABLED, test "x$have_uv" = "xyes")
+ # 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")
++AM_CONDITIONAL(LZ4_AVAILABLE, test "x$enable_lz4" != "xno")
+
+ # The fake I/O implementation and associated fixture is built by default, unless
+ # explicitly disabled.
diff --git a/dev-libs/raft/raft-0.11.3-r1.ebuild b/dev-libs/raft/raft-0.11.3-r1.ebuild
new file mode 100644
index 000000000000..bd9c3e128919
--- /dev/null
+++ b/dev-libs/raft/raft-0.11.3-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="C implementation of the Raft consensus protocol"
+HOMEPAGE="https://github.com/canonical/raft"
+SRC_URI="https://github.com/canonical/raft/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-3-with-linking-exception"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="lz4 test zfs"
+RESTRICT="!test? ( test )"
+
+DEPEND="dev-libs/libuv:=
+ lz4? ( app-arch/lz4:= )"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/raft-0.9.25-Always-skip-init-oom-test.patch
+ "${FILESDIR}"/raft-0.10.0-toggle-zfs.patch
+ "${FILESDIR}"/raft-0.11.3-disable-automagic-check-for-lz4.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --enable-uv
+
+ --disable-benchmark
+ --disable-debug
+ --disable-example
+ --disable-sanitize
+ --disable-static
+
+ $(use_enable lz4)
+ $(use_enable test fixture)
+
+ $(use_with zfs)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -delete || die
+}