From 1fc5f42a43d24d8a1f6160c4b1d8894070973d9a Mon Sep 17 00:00:00 2001 From: 4fury-c3440d8 Date: Fri, 7 Oct 2022 06:36:56 +0300 Subject: [PATCH 1/4] geany-plugins libgit rebuild. --- .../files/Add_support_for_libgit2_1_4.patch | 121 ++++++++++++++++++ .../Simplify_libgit2_version_checks.patch | 46 +++++++ editor/geany-plugins/pspec.xml | 2 + 3 files changed, 169 insertions(+) create mode 100644 editor/geany-plugins/files/Add_support_for_libgit2_1_4.patch create mode 100644 editor/geany-plugins/files/Simplify_libgit2_version_checks.patch diff --git a/editor/geany-plugins/files/Add_support_for_libgit2_1_4.patch b/editor/geany-plugins/files/Add_support_for_libgit2_1_4.patch new file mode 100644 index 0000000000..30e9230db9 --- /dev/null +++ b/editor/geany-plugins/files/Add_support_for_libgit2_1_4.patch @@ -0,0 +1,121 @@ +From 5d9f1bc6d010e6b4c6a21af8a39b90922f89a82c Mon Sep 17 00:00:00 2001 +From: Colomban Wendling +Date: Sun, 5 Jun 2022 23:22:59 +0200 +Subject: [PATCH] git-changebar: Add support for libgit2 1.4 + +The buffer API changed a lot in libgit2 1.4, so compatibility is a bit +nastier than one could hope for. + +Fixes #1164. +--- + git-changebar/src/gcb-plugin.c | 76 ++++++++++++++++++++++++---------- + 1 file changed, 54 insertions(+), 22 deletions(-) + +diff --git a/git-changebar/src/gcb-plugin.c b/git-changebar/src/gcb-plugin.c +index bee8c865c..76208cd00 100644 +--- a/git-changebar/src/gcb-plugin.c ++++ b/git-changebar/src/gcb-plugin.c +@@ -219,30 +219,19 @@ static const struct { + }; + + +-/* workaround https://github.com/libgit2/libgit2/pull/3187 */ +-static int +-gcb_git_buf_grow (git_buf *buf, +- size_t target_size) +-{ +- if (buf->asize == 0) { +- if (target_size == 0) { +- target_size = buf->size; +- } +- if ((target_size & 7) == 0) { +- target_size++; +- } +- } +- return git_buf_grow (buf, target_size); +-} +-#define git_buf_grow gcb_git_buf_grow +- + static void + buf_zero (git_buf *buf) + { + if (buf) { + buf->ptr = NULL; + buf->size = 0; ++#if ! CHECK_LIBGIT2_VERSION(1, 4) + buf->asize = 0; ++#else ++ /* we don't really need this field, but the documentation states that all ++ * fields should be set to 0, so fill it as well */ ++ buf->reserved = 0; ++#endif + } + } + +@@ -256,6 +245,52 @@ clear_cached_blob_contents (void) + G_blob_contents_tag = 0; + } + ++/* similar to old git_blob_filtered_content() but makes sure the caller owns ++ * the data in the output buffer -- and uses a boolean return */ ++static gboolean ++get_blob_contents (git_buf *out, ++ git_blob *blob, ++ const char *as_path, ++ int check_for_binary_data) ++{ ++/* libgit2 1.4 changed buffer API quite a bit */ ++#if ! CHECK_LIBGIT2_VERSION(1, 4) ++ gboolean success = TRUE; ++ ++ if (git_blob_filtered_content (out, blob, as_path, ++ check_for_binary_data) != 0) ++ return FALSE; ++ ++ /* Workaround for https://github.com/libgit2/libgit2/pull/3187 ++ * We want to own the buffer, which git_buf_grow(buf, 0) was supposed to do, ++ * but there is a corner case where it doesn't do what it should and ++ * truncates the buffer contents, so we fix this manually. */ ++ if (out->asize == 0) { ++ size_t target_size = out->size; ++ if ((target_size & 7) == 0) { ++ target_size++; ++ } ++ success = (git_buf_grow (out, target_size) == 0); ++ } ++ ++ return success; ++#else /* libgit2 >= 1.4 */ ++ /* Here we can assume we will always get a buffer we own (at least as of ++ * 2022-06-05 it is the case), so there's no need for a pendent to the ++ * previous git_buf_grow() shenanigans. ++ * This code path does the same as the older git_blob_filtered_content() ++ * but with non-deprecated API */ ++ git_blob_filter_options opts = GIT_BLOB_FILTER_OPTIONS_INIT; ++ ++ if (check_for_binary_data) ++ opts.flags |= GIT_BLOB_FILTER_CHECK_FOR_BINARY; ++ else ++ opts.flags &= ~GIT_BLOB_FILTER_CHECK_FOR_BINARY; ++ ++ return git_blob_filter(out, blob, as_path, &opts) == 0; ++#endif ++} ++ + /* get the file blob for @relpath at HEAD */ + static gboolean + repo_get_file_blob_contents (git_repository *repo, +@@ -279,11 +314,8 @@ repo_get_file_blob_contents (git_repository *repo, + git_blob *blob; + + if (git_blob_lookup (&blob, repo, git_tree_entry_id (entry)) == 0) { +- if (git_blob_filtered_content (contents, blob, relpath, +- check_for_binary_data) == 0 && +- git_buf_grow (contents, 0) == 0) { +- success = TRUE; +- } ++ success = get_blob_contents (contents, blob, relpath, ++ check_for_binary_data); + git_blob_free (blob); + } + git_tree_entry_free (entry); diff --git a/editor/geany-plugins/files/Simplify_libgit2_version_checks.patch b/editor/geany-plugins/files/Simplify_libgit2_version_checks.patch new file mode 100644 index 0000000000..b17c9dbdb4 --- /dev/null +++ b/editor/geany-plugins/files/Simplify_libgit2_version_checks.patch @@ -0,0 +1,46 @@ +From 668f5d07eef16e227402eab09141c738b315d94b Mon Sep 17 00:00:00 2001 +From: Colomban Wendling +Date: Sun, 5 Jun 2022 23:11:20 +0200 +Subject: [PATCH] git-changebar: Simplify libgit2 version checks + +Introduce a custom macro for libgit2 version checks for them to be both +easier to read and write. +--- + git-changebar/src/gcb-plugin.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/git-changebar/src/gcb-plugin.c b/git-changebar/src/gcb-plugin.c +index f8ce20cd6..bee8c865c 100644 +--- a/git-changebar/src/gcb-plugin.c ++++ b/git-changebar/src/gcb-plugin.c +@@ -32,11 +32,19 @@ + #include + #include + +-#if ! defined (LIBGIT2_VER_MINOR) || ( (LIBGIT2_VER_MAJOR == 0) && (LIBGIT2_VER_MINOR < 22) ) ++#ifdef LIBGIT2_VER_MINOR ++# define CHECK_LIBGIT2_VERSION(MAJOR, MINOR) \ ++ ((LIBGIT2_VER_MAJOR == (MAJOR) && LIBGIT2_VER_MINOR >= (MINOR)) || \ ++ LIBGIT2_VER_MAJOR > (MAJOR)) ++#else /* ! defined(LIBGIT2_VER_MINOR) */ ++# define CHECK_LIBGIT2_VERSION(MAJOR, MINOR) 0 ++#endif ++ ++#if ! CHECK_LIBGIT2_VERSION(0, 22) + # define git_libgit2_init git_threads_init + # define git_libgit2_shutdown git_threads_shutdown + #endif +-#if ! defined (LIBGIT2_VER_MINOR) || ( (LIBGIT2_VER_MAJOR == 0) && (LIBGIT2_VER_MINOR < 23) ) ++#if ! CHECK_LIBGIT2_VERSION(0, 23) + /* 0.23 added @p binary_cb */ + # define git_diff_buffers(old_buffer, old_len, old_as_path, \ + new_buffer, new_len, new_as_path, options, \ +@@ -45,7 +53,7 @@ + new_buffer, new_len, new_as_path, options, \ + file_cb, hunk_cb, line_cb, payload) + #endif +-#if ! defined (LIBGIT2_VER_MINOR) || ( (LIBGIT2_VER_MAJOR == 0) && (LIBGIT2_VER_MINOR < 28) ) ++#if ! CHECK_LIBGIT2_VERSION(0, 28) + # define git_buf_dispose git_buf_free + # define git_error_last giterr_last + #endif diff --git a/editor/geany-plugins/pspec.xml b/editor/geany-plugins/pspec.xml index dab9795e64..3911468ee8 100644 --- a/editor/geany-plugins/pspec.xml +++ b/editor/geany-plugins/pspec.xml @@ -36,6 +36,8 @@ webkit2gtk-devel + Add_support_for_libgit2_1_4.patch + Simplify_libgit2_version_checks.patch From 85b4f62248df7d2f72615d0428d70c0532fe4707 Mon Sep 17 00:00:00 2001 From: 4fury-c3440d8 Date: Fri, 7 Oct 2022 06:37:20 +0300 Subject: [PATCH 2/4] mupdf. --- office/misc/mupdf/pspec.xml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/office/misc/mupdf/pspec.xml b/office/misc/mupdf/pspec.xml index ba7309984a..bcd8da1bc7 100644 --- a/office/misc/mupdf/pspec.xml +++ b/office/misc/mupdf/pspec.xml @@ -14,8 +14,8 @@ MuPDF is a lightweight open source software framework for viewing and converting PDF, XPS, and E-book documents. - - https://mupdf.com/downloads/archive/mupdf-1.20.0-source.tar.gz + + https://mupdf.com/downloads/archive/mupdf-1.20.3-source.tar.gz zlib-devel @@ -90,6 +90,13 @@ + + 2022-10-07 + 1.20.3 + Version bump. + fury + uglyside@yandex.ru + 2022-07-06 1.20.0 From fb253ebe297d412eb2ab5cc8a073abd3ff68eb64 Mon Sep 17 00:00:00 2001 From: 4fury-c3440d8 Date: Fri, 7 Oct 2022 06:41:08 +0300 Subject: [PATCH 3/4] rebuild. --- editor/geany-plugins/pspec.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/geany-plugins/pspec.xml b/editor/geany-plugins/pspec.xml index 3911468ee8..b2dad12ec2 100644 --- a/editor/geany-plugins/pspec.xml +++ b/editor/geany-plugins/pspec.xml @@ -79,7 +79,7 @@ - 2021-10-15 + 2022-10-07 1.38 Version bump. fury From ceccaf6f0577b95a8382abc17f68e350ebd3ce12 Mon Sep 17 00:00:00 2001 From: 4fury-c3440d8 Date: Sat, 8 Oct 2022 18:49:16 +0300 Subject: [PATCH 4/4] add runtime dep. --- network/chat/telegram-desktop/pspec.xml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/network/chat/telegram-desktop/pspec.xml b/network/chat/telegram-desktop/pspec.xml index 9950e11533..8cc30eaaab 100644 --- a/network/chat/telegram-desktop/pspec.xml +++ b/network/chat/telegram-desktop/pspec.xml @@ -40,7 +40,7 @@ pulseaudio-libs-devel lz4-devel + kwayland-devel libtg_owt-devel xcb-util-keysyms-devel jemalloc-devel @@ -50,7 +50,7 @@ llvm-clang-devel abseil-cpp-devel pipewire-devel - kcoreaddons-devel + kcoreaddons-devel @@ -79,6 +79,7 @@ qt5-base libtg_owt gdk-pixbuf + kcoreaddons libjpeg-turbo qt5-imageformats libdbusmenu-qt @@ -94,9 +95,9 @@ libsigc++ libXdamage libXcomposite - jemalloc - abseil-cpp - pipewire + jemalloc + abseil-cpp + pipewire /usr/bin