diff --git a/testing/rofi-blocks/APKBUILD b/testing/rofi-blocks/APKBUILD new file mode 100644 index 00000000000..7aacc84af9c --- /dev/null +++ b/testing/rofi-blocks/APKBUILD @@ -0,0 +1,57 @@ +# Contributor: Jakub Jirutka +# Maintainer: Jakub Jirutka +pkgname=rofi-blocks +pkgver=0_git20210123 +# Upstream doesn't do releases (https://github.com/OmarCastro/rofi-blocks/issues/25). +_gitrev=c84577749f71f6c0836fc7ca7ec0097d2fe66492 +pkgrel=0 +pkgdesc="Rofi modi that allows controlling rofi content throug communication with an external program" +url="https://github.com/OmarCastro/rofi-blocks" +arch="all !riscv64 !s390x" # blocked by rofi -> librsvg -> rust +license="GPL-3.0-or-later" +depends="cmd:rofi" +makedepends=" + autoconf + automake + json-glib-dev + libtool + rofi-dev + " +source="https://github.com/OmarCastro/rofi-blocks/archive/$_gitrev/rofi-blocks-$_gitrev.tar.gz + fix-missing-include.patch + fix-check_page_data.patch + fix-format-long-int.patch + " +builddir="$srcdir/$pkgname-$_gitrev" + +prepare() { + default_prepare + + autoreconf -i +} + +build() { + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var + make -j1 +} + +check() { + make check +} + +package() { + make DESTDIR="$pkgdir" install +} + +sha512sums=" +93f988aee9f1fc333b639acb9c6f3769f8e9b4d3a4ff2b996d8d3866ba69ccbfdbdeecabc66b299d904757626bcf1d283943936dcb09439f0c519ddc813eac04 rofi-blocks-c84577749f71f6c0836fc7ca7ec0097d2fe66492.tar.gz +27c5f88809c2e5da814ed06cc91b82ce1267ae134b9dffa7f1685415f5f2404b7bdd607b075d1aa4fa4bcb6b56d52d2d3c9a32866ee648fd765ee431ab2e4b54 fix-missing-include.patch +3a44de8075338ddce2773960f47d7fa8740229a272bb056c0e742a0755e4fc0aa8dbd3f141c0e8d83f547779ae967836cad7d3c4d274951369d75c2c806a5b80 fix-check_page_data.patch +e3435a639d4ac30e30d897e5a3e7dab5e084ef78006e4def8422d5334c8ed2dc7b0b21f0140c21c264279437c1c8fef1e5d4c577fea4da82e9bf181794c0bdaf fix-format-long-int.patch +" diff --git a/testing/rofi-blocks/fix-check_page_data.patch b/testing/rofi-blocks/fix-check_page_data.patch new file mode 100644 index 00000000000..2f24a6090a7 --- /dev/null +++ b/testing/rofi-blocks/fix-check_page_data.patch @@ -0,0 +1,31 @@ +Patch-Source: https://github.com/OmarCastro/rofi-blocks/pull/28 +-- +From f1b36b2198e9d507903a9d626131f7070a6dfc79 Mon Sep 17 00:00:00 2001 +From: Jakub Jirutka +Date: Tue, 1 Feb 2022 19:16:24 +0100 +Subject: [PATCH] test: Fix outdated page_data_add_line call in check_page_data + + check_page_data.c:18:5: error: too few arguments to function 'page_data_add_line' + 18 | page_data_add_line(page_data, "aaa", true, true, true); + | ^~~~~~~~~~~~~~~~~~ + In file included from check_page_data.c:4: + ../src/page_data.h:58:6: note: declared here + 58 | void page_data_add_line(PageData * pageData, const gchar * label, const gchar * icon, const gchar * data, gboolean urgent, gboolean highlight, gboolean markup); + | ^~~~~~~~~~~~~~~~~~ +--- + tests/check_page_data.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/check_page_data.c b/tests/check_page_data.c +index 23c559a..31e6089 100644 +--- a/tests/check_page_data.c ++++ b/tests/check_page_data.c +@@ -15,7 +15,7 @@ int main(void) + test_uint_equals(.result = page_data_get_number_of_lines(page_data), .expected = 0); + + +- page_data_add_line(page_data, "aaa", true, true, true); ++ page_data_add_line(page_data, "aaa", "any-icon", "any-data", true, true, true); + test_string_equals(.result = page_data_get_line_by_index_or_else(page_data, 0, NULL)->text, .expected= "aaa"); + test_true(page_data_get_line_by_index_or_else(page_data, -1, NULL) == NULL); + test_true(page_data_get_line_by_index_or_else(NULL, 0, NULL) == NULL); diff --git a/testing/rofi-blocks/fix-format-long-int.patch b/testing/rofi-blocks/fix-format-long-int.patch new file mode 100644 index 00000000000..7dbe1b68978 --- /dev/null +++ b/testing/rofi-blocks/fix-format-long-int.patch @@ -0,0 +1,35 @@ +Patch-Source: https://github.com/OmarCastro/rofi-blocks/pull/29 +-- +From 260638614cbe42c06d9ebb651953d6dacf7bab8d Mon Sep 17 00:00:00 2001 +From: Jakub Jirutka +Date: Tue, 1 Feb 2022 19:21:45 +0100 +Subject: [PATCH] fix: Fix format string in blocks.c - use %li instead of %i + + blocks.c:224:21: warning: format '%i' expects argument of type 'int', but argument 4 has type 'gint64' {aka 'long int'} [-Wformat=] + 224 | g_debug("entry_to_focus %i", entry_to_focus); + | ^~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~ + | | + | gint64 {aka long int} + blocks.c:224:38: note: format string is defined here + 224 | g_debug("entry_to_focus %i", entry_to_focus); + | ~^ + | | + | int + | %li +--- + src/blocks.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/blocks.c b/src/blocks.c +index 0fbca76..99274b1 100644 +--- a/src/blocks.c ++++ b/src/blocks.c +@@ -221,7 +221,7 @@ static gboolean on_new_input ( GIOChannel *source, GIOCondition condition, gpoin + + if(willFocusToEntry){ + RofiViewState * rofiViewState = rofi_view_get_active(); +- g_debug("entry_to_focus %i", entry_to_focus); ++ g_debug("entry_to_focus %li", entry_to_focus); + rofi_view_set_selected_line(rofiViewState, (unsigned int) entry_to_focus); + } + diff --git a/testing/rofi-blocks/fix-missing-include.patch b/testing/rofi-blocks/fix-missing-include.patch new file mode 100644 index 00000000000..fe7cba03b2a --- /dev/null +++ b/testing/rofi-blocks/fix-missing-include.patch @@ -0,0 +1,28 @@ +Patch-Source: https://github.com/OmarCastro/rofi-blocks/pull/27 +-- +From 27c812142531ccb2dd8c22406ac85a8aa40fec94 Mon Sep 17 00:00:00 2001 +From: Jakub Jirutka +Date: Tue, 1 Feb 2022 19:06:54 +0100 +Subject: [PATCH] fix: Fix error unknown type name 'JsonNode' in page_data.h + +Fixes the following compile error: + + In file included from check_page_data.c:4: + ../src/page_data.h:59:56: error: unknown type name 'JsonNode' + 59 | void page_data_add_line_json_node(PageData * pageData, JsonNode * element); +--- + src/page_data.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/page_data.h b/src/page_data.h +index 5cd8f46..a4267d7 100644 +--- a/src/page_data.h ++++ b/src/page_data.h +@@ -5,6 +5,7 @@ + #define ROFI_BLOCKS_PAGE_DATA_H + #include + #include ++#include + typedef enum + { + MarkupStatus_UNDEFINED = 0,