TIP Building Epiphany Webkit from Source
From Gentoo Linux Wiki
Please format this article according to the guidelines and Wikification suggestions, then remove this notice {{Wikify}} from the article
Contents |
[edit] Overview
This page contains details from my experience installing Epiphany from CVS using the Webkit/GTK CVS backend.
[edit] Dependencies
General WebKit/GTK deps listed on the WebKit Trac
dev-libs/icu
dev-libs/libxslt
net-misc/curl
dev-db/sqlite
media-libs/jpeg
media-libs/libpng
dev-util/gperf
sys-devel/bison
sys-devel/flex version 2.5.33 or later
Other WebKit/GTK deps found in this sunrise ebuild
dev-libs/libxml2
For gstreamer support?
media-libs/gstreamer 0.10 or later
media-libs/gst-plugins-base 0.10 or later
gnome-base/gnome-vfs 2.0 or later
Epiphany 2.22 deps as listed here
GTK+ 2.12 or later
glib 2.16 or later
The following command should get you going:
| CLI Command(s): |
emerge ">=x11-libs/gtk+-2.12" ">=dev-libs/glib-2.16" dev-libs/icu ">=net-misc/curl-7.15" media-libs/jpeg media-libs/libpng dev-libs/libxslt dev-libs/libxml2 ">=dev-db/sqlite-3" ">=media-libs/gstreamer-0.10" ">=media-libs/gst-plugins-base-0.10" ">=gnome-base/gnome-vfs-2.0" sys-devel/bison dev-util/gperf ">=sys-devel/flex-2.5.33" -uav |
[edit] Epiphany/WebKit SVN checkout
Alright, so once you have all the dependencies in place, you can start checking out the source for WebKit and Epiphany by issures the following commands:
To check out the latest WebKit source:
| CLI Command(s): |
svn co http://svn.webkit.org/repository/webkit/trunk webkit-trunk |
To check out the latest Epiphany source:
| CLI Command(s): |
svn co http://svn.gnome.org/svn/epiphany/trunk/ epiphany-trunk |
[edit] Building WebKit/GTK+ & Epiphany
first build WebKit as such (if you know what you are doing and have experience with non-standard directories, please feel free to change or omit the --prefix=/usr option. When I tried to build Epiphany against webkit in /usr/local I got lots of errors.) the following section will assume you downloaded the source to your home directory. If this is not the case then adjust your paths accordingly.
To build and install WebKit:
| CLI Command(s): |
cd ~/webkit-trunk/ ./autogen.sh --prefix=/usr make make install |
Once you have WebKit installed you can build and install epiphany against it. (the folowing config command assumes you want to install Epiphany to /usr/local this would be the case if you don't want to overwrite your stable build of Epiphany [assuming you have one installed]. Again, if you know what you want, adjust these commands accordingly.)
To build and install Epiphany with WebKit backend:
| CLI Command(s): |
cd ~/epiphany-trunk/ ./autogen.sh --prefix=/usr/local --with-engine=webkit make make install |
[edit] Quick & Dirty Build Procedures
For the impatient ones who don't like to read and know (or think they know) what they are doing, you can just issue the following command or commands (for the monolithic command you'll need to be root, or have write access to /usr and /usr/local, the with the modular command I think you can figure out when root privileges are needed and act accordingly):
Modular
| CLI Command(s): |
emerge ">=x11-libs/gtk+-2.12" ">=dev-libs/glib-2.16" dev-libs/icu ">=net-misc/curl-7.15" media-libs/jpeg media-libs/libpng dev-libs/libxslt dev-libs/libxml2 ">=dev-db/sqlite-3" ">=media-libs/gstreamer-0.10" ">=media-libs/gst-plugins-base-0.10" ">=gnome-base/gnome-vfs-2.0" sys-devel/bison dev-util/gperf ">=sys-devel/flex-2.5.33" -uav cd ~/ svn co http://svn.webkit.org/repository/webkit/trunk webkit-trunk svn co http://svn.gnome.org/svn/epiphany/trunk/ epiphany-trunk cd ~/webkit-trunk/ ./autogen.sh --prefix=/usr make make install cd ~/epiphany-trunk/ ./autogen.sh --prefix=/usr/local --with-engine=webkit make make install |
Monolithic
| CLI Command(s): |
emerge ">=x11-libs/gtk+-2.12" ">=dev-libs/glib-2.16" dev-libs/icu ">=net-misc/curl-7.15" media-libs/jpeg media-libs/libpng dev-libs/libxslt dev-libs/libxml2 ">=dev-db/sqlite-3" ">=media-libs/gstreamer-0.10" ">=media-libs/gst-plugins-base-0.10" ">=gnome-base/gnome-vfs-2.0" sys-devel/bison dev-util/gperf ">=sys-devel/flex-2.5.33" -u && cd ~/ && svn co http://svn.webkit.org/repository/webkit/trunk webkit-trunk && svn co http://svn.gnome.org/svn/epiphany/trunk/ epiphany-trunk && cd ~/webkit-trunk/ && ./autogen.sh --prefix=/usr && make && make install && cd ~/epiphany-trunk/ && ./autogen.sh --prefix=/usr/local --with-engine=webkit && make && make install |
[edit] Build Errors
on March 18, 2008 the WebKit trunk (revision 8120) had some bugs that seemed to be related to curl. it gave out errors referring to "ResourceHandler". after applying the following patches, it built properly.
Index: platform/network/curl/AuthenticationChallenge.h
===================================================================
--- platform/network/curl/AuthenticationChallenge.h (revision 31143)
+++ platform/network/curl/AuthenticationChallenge.h (working copy)
@@ -26,10 +26,13 @@
#define AuthenticationChallenge_h
#include "AuthenticationChallengeBase.h"
+#include "ResourceHandle.h"
#include <wtf/RefPtr.h>
namespace WebCore {
+class ResourceHandle;
+
class AuthenticationChallenge : public AuthenticationChallengeBase {
public:
AuthenticationChallenge()
@@ -43,7 +46,7 @@
ResourceHandle* sourceHandle() const { return m_sourceHandle.get(); }
- RefPtr<ResourceHandle> m_sourceHandle;
+ RefPtr<ResourceHandle> m_sourceHandle;
};
}
Index: platform/network/curl/ResourceHandleCurl.cpp
===================================================================
--- platform/network/curl/ResourceHandleCurl.cpp (revision 31141)
+++ platform/network/curl/ResourceHandleCurl.cpp (working copy)
@@ -122,10 +122,12 @@
return false;
}
+#if PLATFORM(WIN) && USE(CURL)
void ResourceHandle::setHostAllowsAnyHTTPSCertificate(const String& host)
{
allowsAnyHTTPSCertificateHosts().add(host.lower());
}
+#endif
#if PLATFORM(WIN) && PLATFORM(CF)
// FIXME: The CFDataRef will need to be something else when
save these patches as whatever you like, for the sake of "example" I will name them rhfix1.patch & rhfix2.patch. save them to ...webkit-trunk/WebCore/ then cd into that that directory to apply the patches.
Example
| CLI Command(s): |
cd ~/webkit-trunk/WebCore/ patch -p0 < rhfix1.patch patch -p0 < rhfix2.patch |
