From fc79d15e0fc30afc16852cf0a8a706840afdfee3 Mon Sep 17 00:00:00 2001
From: omni <omni+alpine@hack.org>
Date: Sat, 6 Apr 2024 20:30:11 +0000
Subject: [PATCH] community/raft-cowsql: upgrade to 0.22.1

---
 community/raft-cowsql/APKBUILD           | 12 ++++++------
 community/raft-cowsql/fix-uv-tests.patch | 22 ++++++++++++++++++++++
 2 files changed, 28 insertions(+), 6 deletions(-)
 create mode 100644 community/raft-cowsql/fix-uv-tests.patch

diff --git a/community/raft-cowsql/APKBUILD b/community/raft-cowsql/APKBUILD
index ca8c15439431..f84c23474953 100644
--- a/community/raft-cowsql/APKBUILD
+++ b/community/raft-cowsql/APKBUILD
@@ -1,7 +1,7 @@
 # Contributor: Francesco Colista <fcolista@alpinelinux.org>
 # Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
 pkgname=raft-cowsql
-pkgver=0.20.0
+pkgver=0.22.1
 pkgrel=0
 pkgdesc="Asynchronous C implementation of the Raft consensus protocol"
 url="https://github.com/cowsql/raft"
@@ -9,12 +9,11 @@ arch="all"
 license="LGPL-3.0-only WITH LGPL-3.0-linking-exception"
 makedepends="linux-headers libuv-dev autoconf automake libtool"
 subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
-case "$CARCH" in
-	armhf|armv7) options="!check" ;; #1 test fails
-esac
 source="$pkgname-$pkgver.tar.gz::https://github.com/cowsql/raft/archive/refs/tags/v$pkgver.tar.gz
 	unistd-include.patch
-	disable-bind-address-test-segfaulting.patch"
+	disable-bind-address-test-segfaulting.patch
+	fix-uv-tests.patch
+	"
 builddir="$srcdir/raft-$pkgver"
 
 prepare() {
@@ -43,7 +42,8 @@ package() {
 }
 
 sha512sums="
-d29fd1e610c7e668a0ca25f60a5644b807a24c642993a3e0b54593f9f640a719bb38a6b45f72ded7fbd332817a1137e2d08bdcc74d2afd675e4d0e3dda27358c  raft-cowsql-0.20.0.tar.gz
+fb4ea98321336daaa605e1c3cd55f672860fc8894d479fdff4e1862a4eb5622dbaf7a943e030dd2bcdaa14cc639e7e11ac43d71f00bdbd27f12c6b67653b70e4  raft-cowsql-0.22.1.tar.gz
 1e0e82e42fb9a65e6135e47ef17494e40f973c9a1af8aab09ff10fdbee83b55183414ec6938205806a9f954bbefaaa5eee776bbd313072ac7ce0105f18a2be03  unistd-include.patch
 b5c6e5a1ae1b6a06005cdbd3d3379e1d0bc6136307578089971f8ac48601958e9d1d31410d26da4cc91206813a56f01ee59fca64cd68e9a37a9921a339b6bf05  disable-bind-address-test-segfaulting.patch
+a1411c8b0e47d8e593dae9d7380e56373399623476d98d5221a59674d380d790cca52bd57713010f600e614319d9f9a43743b3b941bf9d317a40b821676d41f2  fix-uv-tests.patch
 "
diff --git a/community/raft-cowsql/fix-uv-tests.patch b/community/raft-cowsql/fix-uv-tests.patch
new file mode 100644
index 000000000000..30a336f81935
--- /dev/null
+++ b/community/raft-cowsql/fix-uv-tests.patch
@@ -0,0 +1,22 @@
+diff --git a/Makefile.am b/Makefile.am
+index a62ed51..f5f7013 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -202,16 +202,13 @@ test_integration_uv_SOURCES = \
+   test/integration/test_uv_init.c \
+   test/integration/test_uv_append.c \
+   test/integration/test_uv_bootstrap.c \
+-  test/integration/test_uv_load.c \
+   test/integration/test_uv_recover.c \
+   test/integration/test_uv_recv.c \
+   test/integration/test_uv_send.c \
+   test/integration/test_uv_set_term.c \
+   test/integration/test_uv_tcp_connect.c \
+   test/integration/test_uv_tcp_listen.c \
+-  test/integration/test_uv_snapshot_put.c \
+-  test/integration/test_uv_truncate.c \
+-  test/integration/test_uv_truncate_snapshot.c
++  test/integration/test_uv_truncate.c
+ test_integration_uv_CFLAGS = $(AM_CFLAGS) -Wno-type-limits -Wno-conversion
+ test_integration_uv_LDFLAGS = -no-install
+ test_integration_uv_LDADD = libtest.la libraft.la $(UV_LIBS)
-- 
GitLab