wiki:BuildingGtk

Version 37 (modified by jgeboski@gmail.com, 15 years ago) ( diff )

--

Building the GTK+ port

The GTK+ port of WebKit is intended to provide a browser component primarily for users of the portable Gtk+ UI toolkit on platforms like Linux.

Status of the port

The port is actively maintained, and its build state is continuously tested by the WebKit build-bot.

Developers interested in using or contributing to the GTK+ port should be willing to get their hands dirty at this stage. Patches are welcomed on the bug tracker and help is readily available on the IRC channel and mailing list for developers who want to learn the ropes.

It is worth noting that this project is being developed directly in WebKit SVN and is entirely unrelated to the classic Gtk+ WebCore.

A semi-stable branch has been started to evaluate how to handle issues such as stability, and security support.

Distributions

The WebKit/GTK+ API follows a stable additions-only policy. The core engine is continually being stabilised and is suitable for most embedding tasks. Distributors should get in touch with the upstream maintainers to be sure they're packaging the correct version.

We adopt a versioning scheme similar to GTK+'s. This means that, having a version x.y.z, when y is odd, it's a development version. API is still not stable, and may change. When y is an even number, we are in a stable release, which gets only fixes, and small improvements, while keeping API compatibility. When API bits are deprecated for a full release cycle, we drop them.

Debian

Debian Unstable provides experimental WebKit/GTK+ packages by Mike Hommey.

Debian has organised a packaging team for WebKit:

Gentoo

Gentoo have an ebuild for WebkitGTK in testing: http://bugs.gentoo.org/show_bug.cgi?id=190347. You will have to add the testing keyword to your '/etc/portage/package.keywords' file in order to install the package.

# echo 'net-libs/webkit-gtk ~arch' >> /etc/portage/package.keywords

Please remember to change ~arch to the architecture you're using (~x86, ~amd64). The GTK+ port of WebKit is named webkit-gtk. I would invite you to look at the USE flags of the ebuild and add it to the packages.use file depending of your preferences. You can now emerge it normally:

# emerge -va webkit-gtk

You can then regularly update to the latest reviewed revision, which usually belongs to a new nightly build:

# emerge -u webkit-gtk

Lunar-Linux

Lunar provides an experimental/development module for WebKit/GTK+. It can be found in the moonbase in the experimental (zbeta) section under the name 'WebKit.'

Mac OS X

The code on Mac OS X should built like any Linux distribution, as long as you install the build dependencies (in addition to an "ordinary build environment" that includes XCode Tools 2.3 or newer). See bellow.

Dependencies

The code should be easily built on any Linux distribution which has development packages for GTK+ installed. Bellow is a list of Debian package names you will need to install. Although the names of the packages are probably different in non-Debian-based distributions, it should be fairly easy to find the alternative names. Notice that this list may get outdated:

  • autoconf
  • automake
  • libtool
  • libgtk2.0-dev (>= 2.10)
  • libpango1.0-dev (>= 1.16)
  • libicu-dev
  • libxslt-dev
  • libsoup2.4-dev (>= 2.27.4) (*)
  • libsqlite3-dev
  • gperf
  • bison (>= 2.4.1)
  • flex
  • libjpeg62-dev
  • libpng12-dev
  • libxt-dev
  • autotools-dev
  • libgstreamer-plugins-base0.10-dev
  • libenchant-dev
  • libgail-dev
  • gtk-doc-tools

(*) As of change-set 52208 libsoup version 2.28.2 or greater is required.

(*) Libsoup 2.29.3 tar ball release is missing libsoup/soup-content-decoder.h. SOUP_TYPE_CONTENT_DECODER is defined in the header file and it will result in a compilation error: WebKit/gtk/webkit/webkitprivate.cpp:290: error: 'SOUP_TYPE_CONTENT_DECODER' was not declared in this scope. libsoup 2.28.2 works.

Build and Install

The GTK+ port can now be built using autotools (autoconf, automake, libtool). To build the GTK+ port just issue the following commands:

$ ./autogen.sh --prefix=/path/to/install/directory 
$ make

This will build a demo browser that uses the GTK+ port in the Programs/ directory which you can run using the following command:

$ ./Programs/GtkLauncher

To install the WebKit GTK+ library, simply issue

$ make install 

The configure script also supports the different features WebKit/GTK+ provide (e.g., SVG filters and animation features, HTML5 Video element support, etc..). Simply issuing

$ ./configure --help

on the command-line should give you a brief overview of what can be configured. Although you can build with these features enabled, it doesn't mean that the functionality is complete, let alone working properly. Feel free to submit a bug at http://bugs.webkit.org if you find something that is not working.

Further links

Note: See TracWiki for help on using the wiki.