diff --git a/dev-util/geany-plugins/geany_plugins-1.38.0.recipe b/dev-util/geany-plugins/geany_plugins-1.38.0.recipe new file mode 100644 index 000000000..45eb8e871 --- /dev/null +++ b/dev-util/geany-plugins/geany_plugins-1.38.0.recipe @@ -0,0 +1,102 @@ +SUMMARY="Plugins for Geany" +DESCRIPTION="The combined Geany Plugin collection." +HOMEPAGE="https://github.com/geany/geany-plugins/" +COPYRIGHT="The geany plugin maintainers" +LICENSE="GNU GPL v3" +REVISION="1" +SOURCE_URI="https://github.com/geany/geany-plugins/archive/refs/tags/1.38.0.tar.gz" +CHECKSUM_SHA256="86d2fe05290136d020b0d22f849a1aaa74b83cb49b767ae2dc19aaedcdf3d469" +SOURCE_DIR="geany-plugins-$portVersion" +SOURCE_FILENAME="geany-plugins-$portVersion.tar.gz" +PATCHES="geany_plugins-$portVersion.patchset" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + geany_plugins$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libatk_1.0$secondaryArchSuffix + lib:libcairo$secondaryArchSuffix + lib:libcairo_gobject$secondaryArchSuffix + lib:libctpl$secondaryArchSuffix + lib:libenchant_2$secondaryArchSuffix + lib:libgdk_pixbuf_2.0$secondaryArchSuffix + lib:libgeany$secondaryArchSuffix + lib:libgit2$secondaryArchSuffix + lib:libglib_2.0$secondaryArchSuffix + lib:libgmodule_2.0$secondaryArchSuffix + lib:libgobject_2.0$secondaryArchSuffix + lib:libgtk_3$secondaryArchSuffix + lib:libgtkspell3_3$secondaryArchSuffix + lib:libharfbuzz$secondaryArchSuffix + lib:libintl$secondaryArchSuffix + lib:liblua$secondaryArchSuffix + lib:libpango_1.0$secondaryArchSuffix + lib:libsoup_2.4$secondaryArchSuffix + lib:libssl$secondaryArchSuffix + lib:libxml2$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libatk_1.0$secondaryArchSuffix + devel:libcairo$secondaryArchSuffix + devel:libcairo_gobject$secondaryArchSuffix + devel:libctpl$secondaryArchSuffix + devel:libenchant_2$secondaryArchSuffix + devel:libgdk_pixbuf_2.0$secondaryArchSuffix + devel:libgeany$secondaryArchSuffix + devel:libgit2$secondaryArchSuffix + devel:libglib_2.0$secondaryArchSuffix + devel:libgmodule_2.0$secondaryArchSuffix + devel:libgobject_2.0$secondaryArchSuffix + devel:libgtk_3$secondaryArchSuffix + devel:libgtkspell3_3$secondaryArchSuffix + devel:libharfbuzz$secondaryArchSuffix + devel:libintl$secondaryArchSuffix + devel:liblua$secondaryArchSuffix >= 5.1 + devel:libpango_1.0$secondaryArchSuffix + devel:libsoup_2.4$secondaryArchSuffix + devel:libssl$secondaryArchSuffix + devel:libxml2$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:aclocal + cmd:autoreconf + cmd:awk + cmd:gcc$secondaryArchSuffix + cmd:intltoolize + cmd:libtoolize$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + NOCONFIGURE=1 ./autogen.sh + + runConfigure ./configure --disable-utilslib \ + --with-geany-libdir=$libDir \ + --disable-debugger --disable-devhelp \ + --disable-geanynumberedbookmarks --disable-geanypy \ + --disable-markdown --disable-webhelper \ + --disable-multiterm --disable-scope \ + --disable-treebrowser --disable-workbench + + make $jobArgs OBJ_DIR=objects +} + +INSTALL() +{ + make install + + rm $libDir/geany/*.la +} + +TEST() +{ + make check +} diff --git a/dev-util/geany-plugins/patches/geany_plugins-1.38.0.patchset b/dev-util/geany-plugins/patches/geany_plugins-1.38.0.patchset new file mode 100644 index 000000000..e610b900e --- /dev/null +++ b/dev-util/geany-plugins/patches/geany_plugins-1.38.0.patchset @@ -0,0 +1,183 @@ +From a143170711a09d751c6ef9b137d0522cab3387cc Mon Sep 17 00:00:00 2001 +From: begasus +Date: Sat, 30 Jul 2022 13:22:57 +0200 +Subject: import open PR (draft) from upstream + + +diff --git a/git-changebar/src/gcb-plugin.c b/git-changebar/src/gcb-plugin.c +index f8ce20c..7427b85 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,11 +53,13 @@ + 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 +- ++#if ! CHECK_LIBGIT2_VERSION(0, 99) ++# define git_diff_options_init git_diff_init_options ++#endif + + GeanyPlugin *geany_plugin; + GeanyData *geany_data; +@@ -211,30 +221,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 + } + } + +@@ -248,6 +247,54 @@ 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 (&opts, GIT_BLOB_FILTER_OPTIONS_VERSION); ++ ++ 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, +@@ -270,12 +317,8 @@ repo_get_file_blob_contents (git_repository *repo, + if (git_tree_entry_bypath (&entry, tree, relpath) == 0) { + 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); +@@ -285,7 +328,6 @@ repo_get_file_blob_contents (git_repository *repo, + git_commit_free (commit); + } + git_reference_free (head); +- } + + return success; + } +@@ -701,7 +743,7 @@ diff_buf_to_doc (const git_buf *old_buf, + void *payload) + { + ScintillaObject *sci = doc->editor->sci; +- git_diff_options opts = GIT_DIFF_OPTIONS_INIT; ++ git_diff_options opts; + gchar *buf; + size_t len; + gboolean free_buf = FALSE; +@@ -721,6 +763,7 @@ diff_buf_to_doc (const git_buf *old_buf, + doc->encoding, "UTF-8", NULL); + } + ++ git_diff_options_init (&opts, GIT_DIFF_OPTIONS_VERSION); + /* no context lines, and no need to bother about binary checks */ + opts.context_lines = 0; + opts.flags = GIT_DIFF_FORCE_TEXT; +-- +2.36.1 +