From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74606: 31.0.50; Another rsvg API change Date: Mon, 02 Dec 2024 15:14:54 +0100 Message-ID: <87ttbmdvdt.fsf@ledu-giraud.fr> References: <87ttbmi9fa.fsf@olaptop-dell.mail-host-address-is-not-set> <8734j6fbaq.fsf@ledu-giraud.fr> <87y10ydvrv.fsf@ledu-giraud.fr> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28111"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 74606-done@debbugs.gnu.org To: Osama Rebach Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 02 15:15:44 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tI7DE-00079M-B5 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 Dec 2024 15:15:44 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tI7Cy-0003Wf-Tg; Mon, 02 Dec 2024 09:15:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tI7CZ-0003H0-3M for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2024 09:15:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tI7CY-0006XU-Jr for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2024 09:15:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=5Sp4SFDjNpgxqKkM56TXOTa2xmwSh7V3/Ior2ERd7Jo=; b=aHJ+nNTFv2HSU6YbZ9Xc1WW0btpF4ayRocsqPL12PWqOWYyih0fvxi7Xod3to9c/n0HDI4sMsDaPBNn8R/C/U8Ig89dfNPV0AJmE3Q4V6u+251RPm169fAQIjBvm+bOs/oRsXS90j5NL68vXPcYp09NzkQ0DXgpR5zMKTjai6Kg5JuTyr8IdmMSjdgn1RbjEJ8n0mgug7h0aXlII11zCeXAy+XkvzoLe/HX9l1RzKSTLfTOeb0UIi7B1tF7PhWygEehGPyi77ladEWYseSNGJYciec4O+oZAcft6ocX8h/l355E27+FIn/NRQhKfTPqMYzDL1qKL6cCDNNejkz1xNw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tI7CY-0002OO-7T for bug-gnu-emacs@gnu.org; Mon, 02 Dec 2024 09:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Dec 2024 14:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74606 X-GNU-PR-Package: emacs Original-Received: via spool by 74606-done@debbugs.gnu.org id=D74606.17331488999173 (code D ref 74606); Mon, 02 Dec 2024 14:15:02 +0000 Original-Received: (at 74606-done) by debbugs.gnu.org; 2 Dec 2024 14:14:59 +0000 Original-Received: from localhost ([127.0.0.1]:54788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tI7CV-0002Nt-6M for submit@debbugs.gnu.org; Mon, 02 Dec 2024 09:14:59 -0500 Original-Received: from ledu-giraud.fr ([51.159.28.247]:8256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tI7CS-0002Ng-Fi for 74606-done@debbugs.gnu.org; Mon, 02 Dec 2024 09:14:58 -0500 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=xhACRhWD gteUywJZPS9grMEoJhchGdBWZ25ryz2iHfE=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=zozibxfppJ0VXRM5xejjPCHpXsbpQg ToAKvtR4zrHpfthMgH+r2xulCQKNeF01XJqB8XkHHCbCzu1xPr6aQVBw== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=xhACRhWDgteUywJZ PS9grMEoJhchGdBWZ25ryz2iHfE=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=2Ip+N6dWK9OdvgqWshp1qqobReYzQolwSWGg1Q swgt16xcyrZmByOpJh3+EBeD+dfkYwfeF7RAaNVyPx8et3TzBPIykrvUMXfAuYbitEaaAh R/pcBTAEo5Qh1U2JCZEOLH2/6W16vmzc5+IqYbIqqmPJFYDhBhDOayowXeBz1sBpfdhsvO KXD3aBAtuqhT01ubmliRQNGWu9dslWR8hP7YWn8oQwzfZtB7XzemEEwOfunzuYJgJhkgLM 5PbiSkHUWEM6WYO8FgbVdqvhSpM4s1V1AqSjO1vtk3N+lQgpMbxGWlkhou31whxbIKe1Ct KbFcgEC92xSNPuymasEiDKpA== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id ec64112f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 2 Dec 2024 15:14:55 +0100 (CET) In-Reply-To: <87y10ydvrv.fsf@ledu-giraud.fr> (Manuel Giraud's message of "Mon, 02 Dec 2024 15:06:28 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296325 Archived-At: --=-=-= Content-Type: text/plain Manuel Giraud writes: > Manuel Giraud writes: > >> Osama Rebach 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. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Fix-the-version-of-librsvg-API-change.patch >From 5ffc64b52427309a9e171d54520ecab2e408d62e Mon Sep 17 00:00:00 2001 From: Manuel Giraud 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 --=-=-= Content-Type: text/plain -- Manuel Giraud --=-=-=--