GNU bug report logs - #61387
30.0.50; Support webkit2gtk-4.1

Previous Next

Package: emacs;

Reported by: Ulrich Müller <ulm <at> gentoo.org>

Date: Thu, 9 Feb 2023 11:54:02 UTC

Severity: normal

Found in version 30.0.50

Fixed in version 29.1

Done: Ulrich Müller <ulm <at> gentoo.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61387 in the body.
You can then email your comments to 61387 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#61387; Package emacs. (Thu, 09 Feb 2023 11:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ulrich Müller <ulm <at> gentoo.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 09 Feb 2023 11:54:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ulrich Müller <ulm <at> gentoo.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; Support webkit2gtk-4.1
Date: Thu, 09 Feb 2023 12:52:56 +0100
Gentoo is transitioning from webkit2gtk-4.0 to 4.1,
see downstream bug at <https://bugs.gentoo.org/893668>.

Would it be possible to support webkit2gtk-4.1? IIUC there should be
no API differences, so updating configure should be enough.

The patch below adds a configure option --with-webkit2gtk=VALUE that
allows to select version 4.0 or 4.1.

I have tested this with the tip of the master branch (as of today),
and it seems to build and work just fine with webkit2gtk-4.1.


From c3f765e7f987f4c29aaf9df80e304ee24b69427d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm <at> gentoo.org>
Date: Thu, 9 Feb 2023 10:58:48 +0100
Subject: [PATCH] Support webkit2gtk version 4.1

* configure.ac: Add --with-webkit2gtk=VALUE configuration option,
where VALUE can be 4.0 (default) or 4.1.
---
 configure.ac | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index fc17dbd8318..ac0ed8d5d11 100644
--- a/configure.ac
+++ b/configure.ac
@@ -521,6 +521,18 @@ otherwise for the first of 'inotify', 'kqueue' or 'gfile' that is usable.])
 OPTION_DEFAULT_OFF([xwidgets],
   [enable use of xwidgets in Emacs buffers (requires gtk3 or macOS Cocoa)])
 
+AC_ARG_WITH([webkit2gtk],[AS_HELP_STRING([--with-webkit2gtk=VALUE],
+  [version of webkit2gtk to use (VALUE one of: 4.0, 4.1; default 4.0)])],
+  [ case "${withval}" in
+      4.0|4.1) val=$withval ;;
+      *) AC_MSG_ERROR(['--with-webkit2gtk=$withval is invalid;
+this option's value should be '4.0' or '4.1'.])
+      ;;
+    esac
+    with_webkit2gtk=$val
+  ],
+  [with_webkit2gtk=4.0])
+
 OPTION_DEFAULT_OFF([be-app],
   [enable use of Haiku's Application Kit as a window system])
 
@@ -3583,7 +3595,7 @@ XWIDGETS_OBJ=
 if test "$with_xwidgets" != "no"; then
   if test "$USE_GTK_TOOLKIT" = "GTK3" && test "$window_system" != "none"; then
     WEBKIT_REQUIRED=2.12
-    WEBKIT_MODULES="webkit2gtk-4.0 >= $WEBKIT_REQUIRED"
+    WEBKIT_MODULES="webkit2gtk-$with_webkit2gtk >= $WEBKIT_REQUIRED"
     EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES])
     HAVE_XWIDGETS=$HAVE_WEBKIT
     XWIDGETS_OBJ="xwidget.o"
-- 
2.39.1





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61387; Package emacs. (Thu, 09 Feb 2023 12:25:01 GMT) Full text and rfc822 format available.

Message #8 received at 61387 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Ulrich Müller <ulm <at> gentoo.org>
Cc: 61387 <at> debbugs.gnu.org
Subject: Re: bug#61387: 30.0.50; Support webkit2gtk-4.1
Date: Thu, 09 Feb 2023 20:21:55 +0800
Ulrich Müller <ulm <at> gentoo.org> writes:

> Gentoo is transitioning from webkit2gtk-4.0 to 4.1,
> see downstream bug at <https://bugs.gentoo.org/893668>.
>
> Would it be possible to support webkit2gtk-4.1? IIUC there should be
> no API differences, so updating configure should be enough.
>
> The patch below adds a configure option --with-webkit2gtk=VALUE that
> allows to select version 4.0 or 4.1.
>
> I have tested this with the tip of the master branch (as of today),
> and it seems to build and work just fine with webkit2gtk-4.1.

I think it is ok to support both versions.  However, please make
configure search for both versions instead of making the user pick one
at configure time.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61387; Package emacs. (Thu, 09 Feb 2023 13:50:01 GMT) Full text and rfc822 format available.

Message #11 received at 61387 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ulrich Müller <ulm <at> gentoo.org>
Cc: 61387 <at> debbugs.gnu.org
Subject: Re: bug#61387: 30.0.50; Support webkit2gtk-4.1
Date: Thu, 09 Feb 2023 15:49:21 +0200
> From: Ulrich Müller <ulm <at> gentoo.org>
> Date: Thu, 09 Feb 2023 12:52:56 +0100
> 
> Gentoo is transitioning from webkit2gtk-4.0 to 4.1,
> see downstream bug at <https://bugs.gentoo.org/893668>.
> 
> Would it be possible to support webkit2gtk-4.1? IIUC there should be
> no API differences, so updating configure should be enough.

Are you proposing this for Emacs 29 or for Emacs 30?

> The patch below adds a configure option --with-webkit2gtk=VALUE that
> allows to select version 4.0 or 4.1.

Is it really necessary to ask for a specific version?  Why cannot
Emacs use the version that is installed?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61387; Package emacs. (Thu, 09 Feb 2023 14:20:01 GMT) Full text and rfc822 format available.

Message #14 received at 61387 <at> debbugs.gnu.org (full text, mbox):

From: Ulrich Mueller <ulm <at> gentoo.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 61387 <at> debbugs.gnu.org
Subject: Re: bug#61387: 30.0.50; Support webkit2gtk-4.1
Date: Thu, 09 Feb 2023 15:19:37 +0100
>>>>> On Thu, 09 Feb 2023, Eli Zaretskii wrote:

> Are you proposing this for Emacs 29 or for Emacs 30?

Emacs 30, because I thought that it was to late for it to land in the
emacs-29 branch? If it could be included in Emacs 29, I would prefer
that.

>> The patch below adds a configure option --with-webkit2gtk=VALUE that
>> allows to select version 4.0 or 4.1.

> Is it really necessary to ask for a specific version?  Why cannot
> Emacs use the version that is installed?

That could be done as a fallback, but a configure switch is still
needed. Think of a package for a distro, which has to include the
information whether webkit2gtk-4.0 or 4.1 have to be pulled in as
a dependency. There, Emacs has to be built against a well-defined
version, even if both versions of webkit2 are installed on the build
system (for Gentoo, that will be the case for some transition time).

Should I update the patch to allow 3 values "4.0", "4.1", and "auto",
with "auto" being the default? And in the default case, should it
check for 4.0 or 4.1 first?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61387; Package emacs. (Thu, 09 Feb 2023 15:43:01 GMT) Full text and rfc822 format available.

Message #17 received at 61387 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ulrich Mueller <ulm <at> gentoo.org>
Cc: 61387 <at> debbugs.gnu.org
Subject: Re: bug#61387: 30.0.50; Support webkit2gtk-4.1
Date: Thu, 09 Feb 2023 17:41:55 +0200
> From: Ulrich Mueller <ulm <at> gentoo.org>
> Cc: 61387 <at> debbugs.gnu.org
> Date: Thu, 09 Feb 2023 15:19:37 +0100
> 
> >>>>> On Thu, 09 Feb 2023, Eli Zaretskii wrote:
> 
> > Are you proposing this for Emacs 29 or for Emacs 30?
> 
> Emacs 30, because I thought that it was to late for it to land in the
> emacs-29 branch? If it could be included in Emacs 29, I would prefer
> that.

But if Gentoo is transitioning to this new version of webkit, wouldn't
it make sense for Emacs 29 to support that, rather than require users
to have a version of webkit that is considered outdated by Gentoo?

> >> The patch below adds a configure option --with-webkit2gtk=VALUE that
> >> allows to select version 4.0 or 4.1.
> 
> > Is it really necessary to ask for a specific version?  Why cannot
> > Emacs use the version that is installed?
> 
> That could be done as a fallback, but a configure switch is still
> needed. Think of a package for a distro, which has to include the
> information whether webkit2gtk-4.0 or 4.1 have to be pulled in as
> a dependency. There, Emacs has to be built against a well-defined
> version, even if both versions of webkit2 are installed on the build
> system (for Gentoo, that will be the case for some transition time).
> 
> Should I update the patch to allow 3 values "4.0", "4.1", and "auto",
> with "auto" being the default?

Yes, please.

> And in the default case, should it check for 4.0 or 4.1 first?

I think 4.1 first, don't you agree?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61387; Package emacs. (Thu, 09 Feb 2023 15:56:01 GMT) Full text and rfc822 format available.

Message #20 received at 61387 <at> debbugs.gnu.org (full text, mbox):

From: Ulrich Müller <ulm <at> gentoo.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 61387 <at> debbugs.gnu.org
Subject: Re: bug#61387: 30.0.50; Support webkit2gtk-4.1
Date: Thu, 09 Feb 2023 16:54:53 +0100
>>>>> On Thu, 09 Feb 2023, Eli Zaretskii wrote:

> But if Gentoo is transitioning to this new version of webkit, wouldn't
> it make sense for Emacs 29 to support that, rather than require users
> to have a version of webkit that is considered outdated by Gentoo?

We would have backported the patch to the Gentoo package for Emacs 29.
Including it upstream is of course preferable.

>> Should I update the patch to allow 3 values "4.0", "4.1", and "auto",
>> with "auto" being the default?

> Yes, please.

>> And in the default case, should it check for 4.0 or 4.1 first?

> I think 4.1 first, don't you agree?

Yes. Please find the updated patch below. It applies cleanly to both
master and emacs-29.


From 9ac6e3711426eddacd095380b8e7f64a405706b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm <at> gentoo.org>
Date: Thu, 9 Feb 2023 10:58:48 +0100
Subject: [PATCH] Support webkit2gtk version 4.1

* configure.ac: Add --with-webkit2gtk=VALUE configuration option,
where VALUE can be 4.0, 4.1, or auto (default).
---
 configure.ac | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index fc17dbd8318..d951fa84701 100644
--- a/configure.ac
+++ b/configure.ac
@@ -521,6 +521,19 @@ otherwise for the first of 'inotify', 'kqueue' or 'gfile' that is usable.])
 OPTION_DEFAULT_OFF([xwidgets],
   [enable use of xwidgets in Emacs buffers (requires gtk3 or macOS Cocoa)])
 
+AC_ARG_WITH([webkit2gtk],[AS_HELP_STRING([--with-webkit2gtk=VALUE],
+  [version of webkit2gtk API to use (VALUE one of: 4.0, 4.1, auto;
+default auto)])],
+  [ case "${withval}" in
+      4.0|4.1|auto) val=$withval ;;
+      *) AC_MSG_ERROR(['--with-webkit2gtk=$withval' is invalid;
+this option's value should be '4.0', '4.1', or 'auto'.])
+      ;;
+    esac
+    with_webkit2gtk=$val
+  ],
+  [with_webkit2gtk=auto])
+
 OPTION_DEFAULT_OFF([be-app],
   [enable use of Haiku's Application Kit as a window system])
 
@@ -3583,8 +3596,17 @@ XWIDGETS_OBJ=
 if test "$with_xwidgets" != "no"; then
   if test "$USE_GTK_TOOLKIT" = "GTK3" && test "$window_system" != "none"; then
     WEBKIT_REQUIRED=2.12
-    WEBKIT_MODULES="webkit2gtk-4.0 >= $WEBKIT_REQUIRED"
-    EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES])
+    if test "$with_webkit2gtk" = "auto"; then
+      WEBKIT_MODULES="webkit2gtk-4.1 >= $WEBKIT_REQUIRED"
+      EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES])
+      if test "$HAVE_WEBKIT" = "no"; then
+        WEBKIT_MODULES="webkit2gtk-4.0 >= $WEBKIT_REQUIRED"
+        EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES])
+      fi
+    else
+      WEBKIT_MODULES="webkit2gtk-$with_webkit2gtk >= $WEBKIT_REQUIRED"
+      EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES])
+    fi
     HAVE_XWIDGETS=$HAVE_WEBKIT
     XWIDGETS_OBJ="xwidget.o"
     if test "$HAVE_X_WINDOWS" = "yes" && test "${with_cairo}" = "no"; then
-- 
2.39.1





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61387; Package emacs. (Fri, 10 Feb 2023 02:59:01 GMT) Full text and rfc822 format available.

Message #23 received at 61387 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Ulrich Müller <ulm <at> gentoo.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 61387 <at> debbugs.gnu.org
Subject: Re: bug#61387: 30.0.50; Support webkit2gtk-4.1
Date: Fri, 10 Feb 2023 10:56:01 +0800
Ulrich Müller <ulm <at> gentoo.org> writes:

>>>>>> On Thu, 09 Feb 2023, Eli Zaretskii wrote:
>
>> But if Gentoo is transitioning to this new version of webkit, wouldn't
>> it make sense for Emacs 29 to support that, rather than require users
>> to have a version of webkit that is considered outdated by Gentoo?
>
> We would have backported the patch to the Gentoo package for Emacs 29.
> Including it upstream is of course preferable.
>
>>> Should I update the patch to allow 3 values "4.0", "4.1", and "auto",
>>> with "auto" being the default?
>
>> Yes, please.
>
>>> And in the default case, should it check for 4.0 or 4.1 first?
>
>> I think 4.1 first, don't you agree?
>
> Yes. Please find the updated patch below. It applies cleanly to both
> master and emacs-29.
>
>
>>From 9ac6e3711426eddacd095380b8e7f64a405706b2 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm <at> gentoo.org>
> Date: Thu, 9 Feb 2023 10:58:48 +0100
> Subject: [PATCH] Support webkit2gtk version 4.1
>
> * configure.ac: Add --with-webkit2gtk=VALUE configuration option,
> where VALUE can be 4.0, 4.1, or auto (default).
> ---
>  configure.ac | 26 ++++++++++++++++++++++++--
>  1 file changed, 24 insertions(+), 2 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index fc17dbd8318..d951fa84701 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -521,6 +521,19 @@ otherwise for the first of 'inotify', 'kqueue' or 'gfile' that is usable.])
>  OPTION_DEFAULT_OFF([xwidgets],
>    [enable use of xwidgets in Emacs buffers (requires gtk3 or macOS Cocoa)])
>  
> +AC_ARG_WITH([webkit2gtk],[AS_HELP_STRING([--with-webkit2gtk=VALUE],
> +  [version of webkit2gtk API to use (VALUE one of: 4.0, 4.1, auto;
> +default auto)])],
> +  [ case "${withval}" in
> +      4.0|4.1|auto) val=$withval ;;
> +      *) AC_MSG_ERROR(['--with-webkit2gtk=$withval' is invalid;
> +this option's value should be '4.0', '4.1', or 'auto'.])
> +      ;;
> +    esac
> +    with_webkit2gtk=$val
> +  ],
> +  [with_webkit2gtk=auto])
> +
>  OPTION_DEFAULT_OFF([be-app],
>    [enable use of Haiku's Application Kit as a window system])
>  
> @@ -3583,8 +3596,17 @@ XWIDGETS_OBJ=
>  if test "$with_xwidgets" != "no"; then
>    if test "$USE_GTK_TOOLKIT" = "GTK3" && test "$window_system" != "none"; then
>      WEBKIT_REQUIRED=2.12
> -    WEBKIT_MODULES="webkit2gtk-4.0 >= $WEBKIT_REQUIRED"
> -    EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES])
> +    if test "$with_webkit2gtk" = "auto"; then
> +      WEBKIT_MODULES="webkit2gtk-4.1 >= $WEBKIT_REQUIRED"
> +      EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES])
> +      if test "$HAVE_WEBKIT" = "no"; then
> +        WEBKIT_MODULES="webkit2gtk-4.0 >= $WEBKIT_REQUIRED"
> +        EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES])
> +      fi
> +    else
> +      WEBKIT_MODULES="webkit2gtk-$with_webkit2gtk >= $WEBKIT_REQUIRED"
> +      EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES])
> +    fi
>      HAVE_XWIDGETS=$HAVE_WEBKIT
>      XWIDGETS_OBJ="xwidget.o"
>      if test "$HAVE_X_WINDOWS" = "yes" && test "${with_cairo}" = "no"; then

Please make the configure script detect WebKitGTK 4.1 by default, and
fall back to 4.0.

Not many systems will have both installed at the same time, and it is
best for Emacs to use the newer version.

People who want to use the older version can specify the cflags on the
command line to configure.  There is no need for a ``--with-webkit2gtk''
option, which is not very consistent with every other library we support.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61387; Package emacs. (Fri, 10 Feb 2023 05:28:01 GMT) Full text and rfc822 format available.

Message #26 received at 61387 <at> debbugs.gnu.org (full text, mbox):

From: Ulrich Müller <ulm <at> gentoo.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 61387 <at> debbugs.gnu.org
Subject: Re: bug#61387: 30.0.50; Support webkit2gtk-4.1
Date: Fri, 10 Feb 2023 06:27:11 +0100
>>>>> On Fri, 10 Feb 2023, Po Lu wrote:

> Please make the configure script detect WebKitGTK 4.1 by default, and
> fall back to 4.0.

> Not many systems will have both installed at the same time, and it is
> best for Emacs to use the newer version.

> People who want to use the older version can specify the cflags on the
> command line to configure.  There is no need for a ``--with-webkit2gtk''
> option, which is not very consistent with every other library we support.

From be0951e9ddf7cf4d39b8b2328a46cd5cc31ba067 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm <at> gentoo.org>
Date: Thu, 9 Feb 2023 10:58:48 +0100
Subject: [PATCH] Support webkit2gtk-4.1

* configure.ac: Check for webkit2gtk API version 4.1 first, then
fall back to 4.0.
---
 configure.ac | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 645082c9746..bc7e61048c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3613,8 +3613,12 @@ XWIDGETS_OBJ=
 if test "$with_xwidgets" != "no"; then
   if test "$USE_GTK_TOOLKIT" = "GTK3" && test "$window_system" != "none"; then
     WEBKIT_REQUIRED=2.12
-    WEBKIT_MODULES="webkit2gtk-4.0 >= $WEBKIT_REQUIRED"
+    WEBKIT_MODULES="webkit2gtk-4.1 >= $WEBKIT_REQUIRED"
     EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES])
+    if test "$HAVE_WEBKIT" = "no"; then
+      WEBKIT_MODULES="webkit2gtk-4.0 >= $WEBKIT_REQUIRED"
+      EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES])
+    fi
     HAVE_XWIDGETS=$HAVE_WEBKIT
     XWIDGETS_OBJ="xwidget.o"
     if test "$HAVE_X_WINDOWS" = "yes" && test "${with_cairo}" = "no"; then
-- 
2.39.1




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#61387; Package emacs. (Sun, 12 Feb 2023 09:41:01 GMT) Full text and rfc822 format available.

Message #29 received at 61387 <at> debbugs.gnu.org (full text, mbox):

From: Ulrich Müller <ulm <at> gentoo.org>
To: 61387 <at> debbugs.gnu.org
Cc: Po Lu <luangruo <at> yahoo.com>, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#61387: 30.0.50; Support webkit2gtk-4.1
Date: Sun, 12 Feb 2023 10:40:23 +0100
close 61387 29.1
thanks




bug marked as fixed in version 29.1, send any further explanations to 61387 <at> debbugs.gnu.org and Ulrich Müller <ulm <at> gentoo.org> Request was from Ulrich Müller <ulm <at> gentoo.org> to control <at> debbugs.gnu.org. (Sun, 12 Feb 2023 09:47:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 12 Mar 2023 11:24:16 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 44 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.