unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Osama Rebach <osamarebach@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 74606-done@debbugs.gnu.org
Subject: bug#74606: 31.0.50; Another rsvg API change
Date: Mon, 02 Dec 2024 15:14:54 +0100	[thread overview]
Message-ID: <87ttbmdvdt.fsf@ledu-giraud.fr> (raw)
In-Reply-To: <87y10ydvrv.fsf@ledu-giraud.fr> (Manuel Giraud's message of "Mon,  02 Dec 2024 15:06:28 +0100")

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

Manuel Giraud <manuel@ledu-giraud.fr> writes:

> Manuel Giraud <manuel@ledu-giraud.fr> writes:
>
>> Osama Rebach <osamarebach@gmail.com> writes:
>>
>>> rsvg_handle_get_pixbuf_and_error is defined in librsvg 2.59, so the patch
>>> should guard against 2.59 instead of 2.58
>>
>> Thanks.  I have based my patch on this comment:
>> https://gitlab.gnome.org/GNOME/librsvg/-/blob/main/include/librsvg/rsvg-pixbuf.h?ref_type=heads#L52
>>
>> Now, I'm looking on the librsvg repo for a more valid source of
>> information.
>
> Ok, so if I'm not mistaken the patch that introduces the
> rsvg_handle_get_pixbuf_and_error API (and deprecated the other) is this
> one:
> https://gitlab.gnome.org/GNOME/librsvg/-/commit/85cdba02a3e126c1099a62b3d6421ac0cb2d790b
>
> On this page, when you unfold the link "Tags containing commit", you can
> see that 2.58.90 is the first one.  So maybe, I should use this version
> instead.  WDYT?
>
> The "Deprecated: 2.58" from the header looks like a copy/paste
> mistake.

Here is a patch to be applied on emacs-30.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-the-version-of-librsvg-API-change.patch --]
[-- Type: text/x-patch, Size: 2394 bytes --]

From 5ffc64b52427309a9e171d54520ecab2e408d62e Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@ledu-giraud.fr>
Date: Mon, 2 Dec 2024 15:11:52 +0100
Subject: [PATCH] Fix the version of librsvg API change

* src/image.c (init_svg_functions, svg_load_image): The version
introducing 'rsvg_handle_get_pixbuf_and_error' is 2.58.90 not
2.58.0.
---
 src/image.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/image.c b/src/image.c
index 43220758324..46e8b48aced 100644
--- a/src/image.c
+++ b/src/image.c
@@ -11688,7 +11688,7 @@ DEF_DLL_FN (void, rsvg_handle_get_dimensions,
 DEF_DLL_FN (gboolean, rsvg_handle_set_stylesheet,
 	    (RsvgHandle *, const guint8 *, gsize, GError **));
 #  endif
-#  if LIBRSVG_CHECK_VERSION (2, 58, 0)
+#  if LIBRSVG_CHECK_VERSION (2, 58, 90)
 DEF_DLL_FN (GdkPixbuf *, rsvg_handle_get_pixbuf_and_error, (RsvgHandle *, GError **));
 #  else
 DEF_DLL_FN (GdkPixbuf *, rsvg_handle_get_pixbuf, (RsvgHandle *));
@@ -11751,7 +11751,7 @@ init_svg_functions (void)
 #if LIBRSVG_CHECK_VERSION (2, 48, 0)
   LOAD_DLL_FN (library, rsvg_handle_set_stylesheet);
 #endif
-#if LIBRSVG_CHECK_VERSION (2, 58, 0)
+#if LIBRSVG_CHECK_VERSION (2, 58, 90)
   LOAD_DLL_FN (library, rsvg_handle_get_pixbuf_and_error);
 #else
   LOAD_DLL_FN (library, rsvg_handle_get_pixbuf);
@@ -11800,7 +11800,7 @@ init_svg_functions (void)
 #  if LIBRSVG_CHECK_VERSION (2, 48, 0)
 #   undef rsvg_handle_set_stylesheet
 #  endif
-#  if LIBRSVG_CHECK_VERSION (2, 58, 0)
+#  if LIBRSVG_CHECK_VERSION (2, 58, 90)
 #   undef rsvg_handle_get_pixbuf_and_error
 #  else
 #   undef rsvg_handle_get_pixbuf
@@ -11845,7 +11845,7 @@ init_svg_functions (void)
 #  if LIBRSVG_CHECK_VERSION (2, 48, 0)
 #   define rsvg_handle_set_stylesheet fn_rsvg_handle_set_stylesheet
 #  endif
-#  if LIBRSVG_CHECK_VERSION (2, 58, 0)
+#  if LIBRSVG_CHECK_VERSION (2, 58, 90)
 #   define rsvg_handle_get_pixbuf_and_error fn_rsvg_handle_get_pixbuf_and_error
 #  else
 #   define rsvg_handle_get_pixbuf fn_rsvg_handle_get_pixbuf
@@ -12354,7 +12354,7 @@ svg_load_image (struct frame *f, struct image *img, char *contents,
 
   /* We can now get a valid pixel buffer from the svg file, if all
      went ok.  */
-#if LIBRSVG_CHECK_VERSION (2, 58, 0)
+#if LIBRSVG_CHECK_VERSION (2, 58, 90)
   pixbuf = rsvg_handle_get_pixbuf_and_error (rsvg_handle, &err);
   if (err) goto rsvg_error;
 #else
-- 
2.47.0


[-- Attachment #3: Type: text/plain, Size: 18 bytes --]

-- 
Manuel Giraud

  reply	other threads:[~2024-12-02 14:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-29 16:42 bug#74606: 31.0.50; Another rsvg API change Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-30 11:06 ` Eli Zaretskii
2024-12-01 13:09   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-01 14:55     ` Eli Zaretskii
2024-12-02 11:58       ` Osama Rebach
2024-12-02 13:45         ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-02 14:06           ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-02 14:14             ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-12-02 14:41               ` Eli Zaretskii
2024-12-02 15:02                 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-02 15:11                   ` Eli Zaretskii
2024-12-02 16:03                     ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-02 16:24                       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ttbmdvdt.fsf@ledu-giraud.fr \
    --to=bug-gnu-emacs@gnu.org \
    --cc=74606-done@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=manuel@ledu-giraud.fr \
    --cc=osamarebach@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).