Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] geany: update to 2.0.
@ 2024-02-26 23:07 oreo639
  2024-02-26 23:27 ` [PR PATCH] [Updated] " oreo639
  2024-02-28 23:36 ` [PR PATCH] [Merged]: " oreo639
  0 siblings, 2 replies; 3+ messages in thread
From: oreo639 @ 2024-02-26 23:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1301 bytes --]

There is a new pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages geany
https://github.com/void-linux/void-packages/pull/48956

geany: update to 2.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

Supersedes: https://github.com/void-linux/void-packages/pull/46783

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48956.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-geany-48956.patch --]
[-- Type: text/x-diff, Size: 11281 bytes --]

From dc0b880963eb881b8ada4fc95ea8c848f4ab1f19 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 26 Feb 2024 14:01:26 -0800
Subject: [PATCH 1/2] geany: update to 2.0.

---
 srcpkgs/geany/template | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/geany/template b/srcpkgs/geany/template
index aee031b264141..d453e4309498e 100644
--- a/srcpkgs/geany/template
+++ b/srcpkgs/geany/template
@@ -1,21 +1,28 @@
 # Template file for 'geany'
 pkgname=geany
-version=1.38
+version=2.0
 revision=1
 build_style=gnu-configure
 configure_args="--enable-vte --enable-gtk3"
-hostmakedepends="pkg-config libtool intltool"
+hostmakedepends="pkg-config libtool gettext"
 makedepends="gtk+3-devel"
 depends="hicolor-icon-theme desktop-file-utils"
+checkdepends="xvfb-run python3"
 short_desc="Fast and lightweight IDE"
 maintainer="Benjamín Albiñana <benalb@gmail.com>"
 license="GPL-2.0-or-later"
 homepage="https://www.geany.org"
 changelog="https://raw.githubusercontent.com/geany/geany/master/NEWS"
-distfiles="https://download.${pkgname}.org/${pkgname}-${version}.tar.bz2"
-checksum=abff176e4d48bea35ee53037c49c82f90b6d4c23e69aed6e4a5ca8ccd3aad546
+distfiles="https://download.geany.org/geany-${version}.tar.bz2"
+checksum=565b4cd2f0311c1e3a167ec71c4a32dba642e0fe554ae5bb6b8177b7a74ccc92
+make_check_pre="xvfb-run"
 python_version=3
 
+pre_check() {
+	# Otherwise gtk will treat / as ~
+	export HOME="/home"
+}
+
 geany-devel_package() {
 	depends="libglib-devel gtk+3-devel ${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - Development files"

From bab633ffecf6ec1779d7d4d11a8a5fcb33c79c6f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 26 Feb 2024 14:01:44 -0800
Subject: [PATCH 2/2] geany-plugins: update to 2.0.

---
 ...ebar-Simplify-libgit2-version-checks.patch |  49 -------
 ...hangebar-Add-support-for-libgit2-1.4.patch | 124 ------------------
 srcpkgs/geany-plugins/template                |  27 ++--
 3 files changed, 17 insertions(+), 183 deletions(-)
 delete mode 100644 srcpkgs/geany-plugins/patches/0001-git-changebar-Simplify-libgit2-version-checks.patch
 delete mode 100644 srcpkgs/geany-plugins/patches/0002-git-changebar-Add-support-for-libgit2-1.4.patch

diff --git a/srcpkgs/geany-plugins/patches/0001-git-changebar-Simplify-libgit2-version-checks.patch b/srcpkgs/geany-plugins/patches/0001-git-changebar-Simplify-libgit2-version-checks.patch
deleted file mode 100644
index 29d3ef78fd90f..0000000000000
--- a/srcpkgs/geany-plugins/patches/0001-git-changebar-Simplify-libgit2-version-checks.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 668f5d07eef16e227402eab09141c738b315d94b Mon Sep 17 00:00:00 2001
-From: Colomban Wendling <ban@herbesfolles.org>
-Date: Sun, 5 Jun 2022 23:11:20 +0200
-Subject: [PATCH 1/2] 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 f8ce20cd..bee8c865 100644
---- a/git-changebar/src/gcb-plugin.c
-+++ b/git-changebar/src/gcb-plugin.c
-@@ -32,11 +32,19 @@
- #include <geany.h>
- #include <document.h>
- 
--#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
--- 
-2.38.0
-
diff --git a/srcpkgs/geany-plugins/patches/0002-git-changebar-Add-support-for-libgit2-1.4.patch b/srcpkgs/geany-plugins/patches/0002-git-changebar-Add-support-for-libgit2-1.4.patch
deleted file mode 100644
index 3de6e09df7cc3..0000000000000
--- a/srcpkgs/geany-plugins/patches/0002-git-changebar-Add-support-for-libgit2-1.4.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-From 5d9f1bc6d010e6b4c6a21af8a39b90922f89a82c Mon Sep 17 00:00:00 2001
-From: Colomban Wendling <ban@herbesfolles.org>
-Date: Sun, 5 Jun 2022 23:22:59 +0200
-Subject: [PATCH 2/2] 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 bee8c865..76208cd0 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);
--- 
-2.38.0
-
diff --git a/srcpkgs/geany-plugins/template b/srcpkgs/geany-plugins/template
index f0bb0b04ed80b..ce34fcfbaff42 100644
--- a/srcpkgs/geany-plugins/template
+++ b/srcpkgs/geany-plugins/template
@@ -1,25 +1,32 @@
 # Template file for 'geany-plugins'
 pkgname=geany-plugins
-version=1.38.0
-revision=3
+version=2.0
+revision=1
 build_style=gnu-configure
-configure_args="--enable-all-plugins --disable-devhelp
- --disable-webhelper --disable-debugger --disable-geanypy --disable-multiterm"
+configure_args="--enable-all-plugins
+ --disable-geniuspaste --disable-updatechecker --disable-debugger"
 hostmakedepends="automake gettext-devel intltool libtool pkg-config vala
  glib-devel"
 makedepends="geany-devel lua51-devel ctpl-devel zlib-devel
- gpgme-devel enchant2-devel libgit2-devel libsoup-devel
- gtkspell-devel webkit2gtk-devel vte3-devel"
+ gpgme-devel enchant2-devel libgit2-devel
+ gtkspell-devel libwebkit2gtk41-devel vte3-devel"
 short_desc="Geany IDE plugins"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://plugins.geany.org"
 changelog="https://raw.githubusercontent.com/geany/geany-plugins/master/NEWS"
-distfiles="https://github.com/geany/${pkgname}/archive/${version}.tar.gz"
-checksum=86d2fe05290136d020b0d22f849a1aaa74b83cb49b767ae2dc19aaedcdf3d469
+distfiles="https://download.geany.org/geany-plugins/geany-plugins-${version}.tar.gz"
+checksum=cd7d27f00aef4afe2040d7e5246a863234c340c8520ef698be9a15005ed8f57e
+
+post_patch() {
+	# Use libwebkit2gtk41, cannot be used with updatechecker or geniuspaste
+	# See: https://github.com/geany/geany-plugins/issues/1302#issuecomment-1925011272
+	vsed -e 's/webkit2gtk-4.0/webkit2gtk-4.1/' -i build/markdown.m4
+	vsed -e 's/webkit2gtk-4.0/webkit2gtk-4.1/' -i build/webhelper.m4
+}
 
 pre_configure() {
-	NOCONFIGURE=1 ./autogen.sh
+	autoreconf -fi
 }
 
 pre_build() {
@@ -32,7 +39,7 @@ geany-plugins-extra_package() {
 	short_desc+=" - extra plugins"
 	pkg_install() {
 		for p in geanygendoc geanylua geanypg geniuspaste \
-			git-changebar pretty-printer spellcheck updatechecker; do
+			git-changebar pretty-printer spellcheck; do
 			if [ -x ${DESTDIR}/usr/lib/geany/${p}.so ]; then
 				vmove usr/lib/geany/${p}.so
 			fi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Updated] geany: update to 2.0.
  2024-02-26 23:07 [PR PATCH] geany: update to 2.0 oreo639
@ 2024-02-26 23:27 ` oreo639
  2024-02-28 23:36 ` [PR PATCH] [Merged]: " oreo639
  1 sibling, 0 replies; 3+ messages in thread
From: oreo639 @ 2024-02-26 23:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1306 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages geany
https://github.com/void-linux/void-packages/pull/48956

geany: update to 2.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

Supersedes: https://github.com/void-linux/void-packages/pull/46783

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48956.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-geany-48956.patch --]
[-- Type: text/x-diff, Size: 11288 bytes --]

From 77bbdc9c0a7f9b424d24eb09288cdbd8f8363503 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 26 Feb 2024 14:01:26 -0800
Subject: [PATCH 1/2] geany: update to 2.0.

---
 srcpkgs/geany/template | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/geany/template b/srcpkgs/geany/template
index aee031b2641418..3061a514762893 100644
--- a/srcpkgs/geany/template
+++ b/srcpkgs/geany/template
@@ -1,21 +1,28 @@
 # Template file for 'geany'
 pkgname=geany
-version=1.38
+version=2.0
 revision=1
 build_style=gnu-configure
 configure_args="--enable-vte --enable-gtk3"
-hostmakedepends="pkg-config libtool intltool"
+hostmakedepends="pkg-config libtool gettext"
 makedepends="gtk+3-devel"
 depends="hicolor-icon-theme desktop-file-utils"
+checkdepends="xvfb-run python3"
 short_desc="Fast and lightweight IDE"
 maintainer="Benjamín Albiñana <benalb@gmail.com>"
 license="GPL-2.0-or-later"
 homepage="https://www.geany.org"
 changelog="https://raw.githubusercontent.com/geany/geany/master/NEWS"
-distfiles="https://download.${pkgname}.org/${pkgname}-${version}.tar.bz2"
-checksum=abff176e4d48bea35ee53037c49c82f90b6d4c23e69aed6e4a5ca8ccd3aad546
+distfiles="https://download.geany.org/geany-${version}.tar.bz2"
+checksum=565b4cd2f0311c1e3a167ec71c4a32dba642e0fe554ae5bb6b8177b7a74ccc92
+make_check_pre="xvfb-run"
 python_version=3
 
+pre_check() {
+	# Otherwise gtk will treat / as ~
+	export HOME="$PWD"
+}
+
 geany-devel_package() {
 	depends="libglib-devel gtk+3-devel ${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - Development files"

From 7d5172534ae68122f1b6373533d7705bda6d833f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Mon, 26 Feb 2024 14:01:44 -0800
Subject: [PATCH 2/2] geany-plugins: update to 2.0.

---
 ...ebar-Simplify-libgit2-version-checks.patch |  49 -------
 ...hangebar-Add-support-for-libgit2-1.4.patch | 124 ------------------
 srcpkgs/geany-plugins/template                |  27 ++--
 3 files changed, 17 insertions(+), 183 deletions(-)
 delete mode 100644 srcpkgs/geany-plugins/patches/0001-git-changebar-Simplify-libgit2-version-checks.patch
 delete mode 100644 srcpkgs/geany-plugins/patches/0002-git-changebar-Add-support-for-libgit2-1.4.patch

diff --git a/srcpkgs/geany-plugins/patches/0001-git-changebar-Simplify-libgit2-version-checks.patch b/srcpkgs/geany-plugins/patches/0001-git-changebar-Simplify-libgit2-version-checks.patch
deleted file mode 100644
index 29d3ef78fd90f9..00000000000000
--- a/srcpkgs/geany-plugins/patches/0001-git-changebar-Simplify-libgit2-version-checks.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 668f5d07eef16e227402eab09141c738b315d94b Mon Sep 17 00:00:00 2001
-From: Colomban Wendling <ban@herbesfolles.org>
-Date: Sun, 5 Jun 2022 23:11:20 +0200
-Subject: [PATCH 1/2] 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 f8ce20cd..bee8c865 100644
---- a/git-changebar/src/gcb-plugin.c
-+++ b/git-changebar/src/gcb-plugin.c
-@@ -32,11 +32,19 @@
- #include <geany.h>
- #include <document.h>
- 
--#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
--- 
-2.38.0
-
diff --git a/srcpkgs/geany-plugins/patches/0002-git-changebar-Add-support-for-libgit2-1.4.patch b/srcpkgs/geany-plugins/patches/0002-git-changebar-Add-support-for-libgit2-1.4.patch
deleted file mode 100644
index 3de6e09df7cc3f..00000000000000
--- a/srcpkgs/geany-plugins/patches/0002-git-changebar-Add-support-for-libgit2-1.4.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-From 5d9f1bc6d010e6b4c6a21af8a39b90922f89a82c Mon Sep 17 00:00:00 2001
-From: Colomban Wendling <ban@herbesfolles.org>
-Date: Sun, 5 Jun 2022 23:22:59 +0200
-Subject: [PATCH 2/2] 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 bee8c865..76208cd0 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);
--- 
-2.38.0
-
diff --git a/srcpkgs/geany-plugins/template b/srcpkgs/geany-plugins/template
index f0bb0b04ed80b8..ce34fcfbaff42b 100644
--- a/srcpkgs/geany-plugins/template
+++ b/srcpkgs/geany-plugins/template
@@ -1,25 +1,32 @@
 # Template file for 'geany-plugins'
 pkgname=geany-plugins
-version=1.38.0
-revision=3
+version=2.0
+revision=1
 build_style=gnu-configure
-configure_args="--enable-all-plugins --disable-devhelp
- --disable-webhelper --disable-debugger --disable-geanypy --disable-multiterm"
+configure_args="--enable-all-plugins
+ --disable-geniuspaste --disable-updatechecker --disable-debugger"
 hostmakedepends="automake gettext-devel intltool libtool pkg-config vala
  glib-devel"
 makedepends="geany-devel lua51-devel ctpl-devel zlib-devel
- gpgme-devel enchant2-devel libgit2-devel libsoup-devel
- gtkspell-devel webkit2gtk-devel vte3-devel"
+ gpgme-devel enchant2-devel libgit2-devel
+ gtkspell-devel libwebkit2gtk41-devel vte3-devel"
 short_desc="Geany IDE plugins"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://plugins.geany.org"
 changelog="https://raw.githubusercontent.com/geany/geany-plugins/master/NEWS"
-distfiles="https://github.com/geany/${pkgname}/archive/${version}.tar.gz"
-checksum=86d2fe05290136d020b0d22f849a1aaa74b83cb49b767ae2dc19aaedcdf3d469
+distfiles="https://download.geany.org/geany-plugins/geany-plugins-${version}.tar.gz"
+checksum=cd7d27f00aef4afe2040d7e5246a863234c340c8520ef698be9a15005ed8f57e
+
+post_patch() {
+	# Use libwebkit2gtk41, cannot be used with updatechecker or geniuspaste
+	# See: https://github.com/geany/geany-plugins/issues/1302#issuecomment-1925011272
+	vsed -e 's/webkit2gtk-4.0/webkit2gtk-4.1/' -i build/markdown.m4
+	vsed -e 's/webkit2gtk-4.0/webkit2gtk-4.1/' -i build/webhelper.m4
+}
 
 pre_configure() {
-	NOCONFIGURE=1 ./autogen.sh
+	autoreconf -fi
 }
 
 pre_build() {
@@ -32,7 +39,7 @@ geany-plugins-extra_package() {
 	short_desc+=" - extra plugins"
 	pkg_install() {
 		for p in geanygendoc geanylua geanypg geniuspaste \
-			git-changebar pretty-printer spellcheck updatechecker; do
+			git-changebar pretty-printer spellcheck; do
 			if [ -x ${DESTDIR}/usr/lib/geany/${p}.so ]; then
 				vmove usr/lib/geany/${p}.so
 			fi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Merged]: geany: update to 2.0.
  2024-02-26 23:07 [PR PATCH] geany: update to 2.0 oreo639
  2024-02-26 23:27 ` [PR PATCH] [Updated] " oreo639
@ 2024-02-28 23:36 ` oreo639
  1 sibling, 0 replies; 3+ messages in thread
From: oreo639 @ 2024-02-28 23:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]

There's a merged pull request on the void-packages repository

geany: update to 2.0.
https://github.com/void-linux/void-packages/pull/48956

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

Supersedes: https://github.com/void-linux/void-packages/pull/46783

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-28 23:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-26 23:07 [PR PATCH] geany: update to 2.0 oreo639
2024-02-26 23:27 ` [PR PATCH] [Updated] " oreo639
2024-02-28 23:36 ` [PR PATCH] [Merged]: " oreo639

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).