Bug 121414 - [GTK][2.2] Enable the Wayland target by default if the GTK+ Wayland dependency is available
Summary: [GTK][2.2] Enable the Wayland target by default if the GTK+ Wayland dependenc...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2013-09-16 02:42 PDT by Zan Dobersek
Modified: 2013-09-16 14:03 PDT (History)
3 users (show)

See Also:


Attachments
Patch (6.15 KB, patch)
2013-09-16 03:02 PDT, Zan Dobersek
mrobinson: review+
mrobinson: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2013-09-16 02:42:53 PDT
The Wayland target should be enabled by default if the GTK+ dependency is of version >= 3.10 was produced with the Wayland backend enabled.

This bug covers the 2.2 stable branch. I plan to do the same thing for the trunk, but in a separate bug with hopefully some additional refactoring regarding the --with-target configuration option.
Comment 1 Zan Dobersek 2013-09-16 03:02:56 PDT
Created attachment 211748 [details]
Patch
Comment 2 Gustavo Noronha (kov) 2013-09-16 06:19:48 PDT
Comment on attachment 211748 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=211748&action=review

> Source/autotools/ReadCommandLineArguments.m4:65
> +    if test "$with_wayland_target" != "auto"; then

This would also match no, so wayland ends up being a hard requirement if it was explicitly disabled?
Comment 3 Zan Dobersek 2013-09-16 06:31:47 PDT
Comment on attachment 211748 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=211748&action=review

>> Source/autotools/ReadCommandLineArguments.m4:65
>> +    if test "$with_wayland_target" != "auto"; then
> 
> This would also match no, so wayland ends up being a hard requirement if it was explicitly disabled?

This checks that with_wayland_target wasn't previously set to 'auto', i.e. that it's basically still undefined.
Comment 4 Zan Dobersek 2013-09-16 06:34:01 PDT
Comment on attachment 211748 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=211748&action=review

> Source/autotools/Versions.m4:21
> +m4_define([gtk3_wayland_required_version], [3.9.14])

A question about the version to use here. The idea is to use the 3.10 series, but putting 3.10.0 here isn't possible just yet.
Is 3.9.14 fine here? Will this be bumped to 3.10.0 once 2.2 is released?
Comment 5 Martin Robinson 2013-09-16 11:56:56 PDT
Comment on attachment 211748 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=211748&action=review

Looks good, but please look into removing the unnecessary temporary variable before landing.

> Source/autotools/FindDependencies.m4:223
> +    ], [have_gtk_wayland=yes], [have_gtk_wayland=no])
> +    if test "$have_gtk_wayland" = "no"; then
> +        if test "$with_wayland_target" = "yes"; then
> +            AC_MSG_ERROR([GTK+ Wayland dependency (gtk+-wayland-$GTK_API_VERSION >= gtk3_wayland_required_version) not found.])
> +        else
> +            AC_MSG_WARN([GTK+ Wayland dependency (gtk+-wayland-$GTK_API_VERSION >= gtk3_wayland_required_version) not found, disabling the Wayland target.])
> +            with_wayland_target=no
> +        fi
> +    else
> +        with_wayland_target=yes
> +    fi
>  fi

You don't have to have the temporary variable have_gtk_wayland. Instead you can put the code you want to execute in the square brackets.
Comment 6 Zan Dobersek 2013-09-16 14:03:24 PDT
Landed the adjusted patch in r155899.
http://trac.webkit.org/changeset/155899