unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#61387: 30.0.50; Support webkit2gtk-4.1
@ 2023-02-09 11:52 Ulrich Müller
  2023-02-09 12:21 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-02-09 13:49 ` Eli Zaretskii
  0 siblings, 2 replies; 9+ messages in thread
From: Ulrich Müller @ 2023-02-09 11:52 UTC (permalink / raw)
  To: 61387

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@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






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

* bug#61387: 30.0.50; Support webkit2gtk-4.1
  2023-02-09 11:52 bug#61387: 30.0.50; Support webkit2gtk-4.1 Ulrich Müller
@ 2023-02-09 12:21 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-02-09 13:49 ` Eli Zaretskii
  1 sibling, 0 replies; 9+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-02-09 12:21 UTC (permalink / raw)
  To: Ulrich Müller; +Cc: 61387

Ulrich Müller <ulm@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.





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

* bug#61387: 30.0.50; Support webkit2gtk-4.1
  2023-02-09 11:52 bug#61387: 30.0.50; Support webkit2gtk-4.1 Ulrich Müller
  2023-02-09 12:21 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-02-09 13:49 ` Eli Zaretskii
  2023-02-09 14:19   ` Ulrich Mueller
  1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2023-02-09 13:49 UTC (permalink / raw)
  To: Ulrich Müller; +Cc: 61387

> From: Ulrich Müller <ulm@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.





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

* bug#61387: 30.0.50; Support webkit2gtk-4.1
  2023-02-09 13:49 ` Eli Zaretskii
@ 2023-02-09 14:19   ` Ulrich Mueller
  2023-02-09 15:41     ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Ulrich Mueller @ 2023-02-09 14:19 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 61387

>>>>> 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?





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

* bug#61387: 30.0.50; Support webkit2gtk-4.1
  2023-02-09 14:19   ` Ulrich Mueller
@ 2023-02-09 15:41     ` Eli Zaretskii
  2023-02-09 15:54       ` Ulrich Müller
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2023-02-09 15:41 UTC (permalink / raw)
  To: Ulrich Mueller; +Cc: 61387

> From: Ulrich Mueller <ulm@gentoo.org>
> Cc: 61387@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?





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

* bug#61387: 30.0.50; Support webkit2gtk-4.1
  2023-02-09 15:41     ` Eli Zaretskii
@ 2023-02-09 15:54       ` Ulrich Müller
  2023-02-10  2:56         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 9+ messages in thread
From: Ulrich Müller @ 2023-02-09 15:54 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 61387

>>>>> 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@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






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

* bug#61387: 30.0.50; Support webkit2gtk-4.1
  2023-02-09 15:54       ` Ulrich Müller
@ 2023-02-10  2:56         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-02-10  5:27           ` Ulrich Müller
  0 siblings, 1 reply; 9+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-02-10  2:56 UTC (permalink / raw)
  To: Ulrich Müller; +Cc: Eli Zaretskii, 61387

Ulrich Müller <ulm@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@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.





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

* bug#61387: 30.0.50; Support webkit2gtk-4.1
  2023-02-10  2:56         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-02-10  5:27           ` Ulrich Müller
  2023-02-12  9:40             ` Ulrich Müller
  0 siblings, 1 reply; 9+ messages in thread
From: Ulrich Müller @ 2023-02-10  5:27 UTC (permalink / raw)
  To: Po Lu; +Cc: Eli Zaretskii, 61387

>>>>> 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@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





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

* bug#61387: 30.0.50; Support webkit2gtk-4.1
  2023-02-10  5:27           ` Ulrich Müller
@ 2023-02-12  9:40             ` Ulrich Müller
  0 siblings, 0 replies; 9+ messages in thread
From: Ulrich Müller @ 2023-02-12  9:40 UTC (permalink / raw)
  To: 61387; +Cc: Po Lu, Eli Zaretskii

close 61387 29.1
thanks





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

end of thread, other threads:[~2023-02-12  9:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-09 11:52 bug#61387: 30.0.50; Support webkit2gtk-4.1 Ulrich Müller
2023-02-09 12:21 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-09 13:49 ` Eli Zaretskii
2023-02-09 14:19   ` Ulrich Mueller
2023-02-09 15:41     ` Eli Zaretskii
2023-02-09 15:54       ` Ulrich Müller
2023-02-10  2:56         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-10  5:27           ` Ulrich Müller
2023-02-12  9:40             ` Ulrich Müller

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).