| 1 |
tetromino |
1.1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
tetromino |
1.3 |
# $Header: /var/cvsroot/gentoo-x86/net-libs/webkit-gtk/webkit-gtk-1.8.0-r200.ebuild,v 1.2 2012/04/15 10:19:54 tetromino Exp $
|
| 4 |
tetromino |
1.1 |
|
| 5 |
|
|
EAPI="4"
|
| 6 |
|
|
|
| 7 |
|
|
# Don't define PYTHON_DEPEND: python only needed at build time
|
| 8 |
|
|
inherit autotools eutils flag-o-matic gnome2-utils pax-utils python virtualx
|
| 9 |
|
|
|
| 10 |
|
|
MY_P="webkit-${PV}"
|
| 11 |
|
|
DESCRIPTION="Open source web browser engine"
|
| 12 |
|
|
HOMEPAGE="http://www.webkitgtk.org/"
|
| 13 |
|
|
SRC_URI="http://www.webkitgtk.org/releases/${MY_P}.tar.xz"
|
| 14 |
|
|
#SRC_URI="mirror://gentoo/${P}.tar.xz"
|
| 15 |
|
|
|
| 16 |
|
|
LICENSE="LGPL-2 LGPL-2.1 BSD"
|
| 17 |
|
|
SLOT="2"
|
| 18 |
|
|
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos"
|
| 19 |
|
|
# geoclue
|
| 20 |
|
|
IUSE="aqua coverage debug +geoloc +gstreamer +introspection +jit spell +webgl"
|
| 21 |
|
|
# bug 372493
|
| 22 |
|
|
REQUIRED_USE="introspection? ( gstreamer )"
|
| 23 |
|
|
|
| 24 |
|
|
# use sqlite, svg by default
|
| 25 |
|
|
# dependency on >=x11-libs/gtk+-2.13:2 for gail
|
| 26 |
|
|
RDEPEND="
|
| 27 |
|
|
dev-libs/libxml2:2
|
| 28 |
|
|
dev-libs/libxslt
|
| 29 |
|
|
virtual/jpeg
|
| 30 |
|
|
>=media-libs/libpng-1.4:0
|
| 31 |
|
|
>=x11-libs/cairo-1.10
|
| 32 |
|
|
>=dev-libs/glib-2.31.2:2
|
| 33 |
|
|
>=x11-libs/gtk+-2.13:2[aqua=,introspection?]
|
| 34 |
|
|
>=dev-libs/icu-3.8.1-r1
|
| 35 |
tetromino |
1.2 |
>=net-libs/libsoup-2.37.2.1:2.4[introspection?]
|
| 36 |
tetromino |
1.1 |
dev-db/sqlite:3
|
| 37 |
|
|
>=x11-libs/pango-1.21
|
| 38 |
|
|
x11-libs/libXrender
|
| 39 |
|
|
|
| 40 |
|
|
geoloc? ( app-misc/geoclue )
|
| 41 |
|
|
|
| 42 |
|
|
gstreamer? (
|
| 43 |
|
|
media-libs/gstreamer:0.10
|
| 44 |
|
|
>=media-libs/gst-plugins-base-0.10.30:0.10 )
|
| 45 |
|
|
|
| 46 |
|
|
introspection? ( >=dev-libs/gobject-introspection-0.9.5 )
|
| 47 |
|
|
|
| 48 |
|
|
spell? ( >=app-text/enchant-0.22 )
|
| 49 |
|
|
|
| 50 |
|
|
webgl? ( virtual/opengl )
|
| 51 |
|
|
"
|
| 52 |
|
|
# paxctl needed for bug #407085
|
| 53 |
|
|
DEPEND="${RDEPEND}
|
| 54 |
|
|
dev-lang/perl
|
| 55 |
|
|
=dev-lang/python-2*
|
| 56 |
|
|
sys-devel/bison
|
| 57 |
|
|
>=sys-devel/flex-2.5.33
|
| 58 |
|
|
sys-devel/gettext
|
| 59 |
|
|
dev-util/gperf
|
| 60 |
|
|
dev-util/pkgconfig
|
| 61 |
|
|
dev-util/gtk-doc-am
|
| 62 |
|
|
introspection? ( jit? ( sys-apps/paxctl ) )
|
| 63 |
|
|
test? ( x11-themes/hicolor-icon-theme
|
| 64 |
|
|
jit? ( sys-apps/paxctl ) )
|
| 65 |
|
|
"
|
| 66 |
|
|
# Need real bison, not yacc
|
| 67 |
|
|
|
| 68 |
|
|
S="${WORKDIR}/${MY_P}"
|
| 69 |
|
|
|
| 70 |
|
|
pkg_setup() {
|
| 71 |
|
|
# Needed for CodeGeneratorInspector.py
|
| 72 |
|
|
python_set_active_version 2
|
| 73 |
|
|
python_pkg_setup
|
| 74 |
|
|
}
|
| 75 |
|
|
|
| 76 |
|
|
src_prepare() {
|
| 77 |
|
|
DOCS="ChangeLog NEWS" # other ChangeLog files handled by src_install
|
| 78 |
|
|
|
| 79 |
|
|
# FIXME: Fix unaligned accesses on ARM, IA64 and SPARC
|
| 80 |
|
|
# https://bugs.webkit.org/show_bug.cgi?id=19775
|
| 81 |
|
|
# TODO: FAILS TO APPLY!
|
| 82 |
|
|
#use sparc && epatch "${FILESDIR}"/${PN}-1.2.3-fix-pool-sparc.patch
|
| 83 |
|
|
|
| 84 |
|
|
# CVE-2011-3064, https://bugzilla.redhat.com/show_bug.cgi?id=807596
|
| 85 |
|
|
epatch "${FILESDIR}/${P}-svgimagebuffer-clip.patch"
|
| 86 |
|
|
|
| 87 |
tetromino |
1.3 |
# Build failure with USE=-geoloc, bug #411955
|
| 88 |
|
|
epatch "${FILESDIR}/${P}-no-geoloc.patch"
|
| 89 |
|
|
|
| 90 |
tetromino |
1.1 |
# intermediate MacPorts hack while upstream bug is not fixed properly
|
| 91 |
|
|
# https://bugs.webkit.org/show_bug.cgi?id=28727
|
| 92 |
|
|
use aqua && epatch "${FILESDIR}"/${PN}-1.6.1-darwin-quartz.patch
|
| 93 |
|
|
|
| 94 |
|
|
# Bug #403049, https://bugs.webkit.org/show_bug.cgi?id=79605
|
| 95 |
|
|
epatch "${FILESDIR}/${PN}-1.7.5-linguas.patch"
|
| 96 |
|
|
|
| 97 |
|
|
# Drop DEPRECATED flags
|
| 98 |
|
|
sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED:$(NULL):g' GNUmakefile.am || die
|
| 99 |
|
|
|
| 100 |
|
|
# Don't force -O2
|
| 101 |
|
|
sed -i 's/-O2//g' "${S}"/configure.ac || die
|
| 102 |
|
|
|
| 103 |
|
|
# Build-time segfaults under PaX with USE="introspection jit", bug #404215
|
| 104 |
|
|
if use introspection && use jit; then
|
| 105 |
|
|
epatch "${FILESDIR}/${PN}-1.6.3-paxctl-introspection.patch"
|
| 106 |
|
|
cp "${FILESDIR}/gir-paxctl-lt-wrapper" "${S}/" || die
|
| 107 |
|
|
fi
|
| 108 |
|
|
|
| 109 |
|
|
# We need to reset some variables to prevent permissions problems and failures
|
| 110 |
|
|
# like https://bugs.webkit.org/show_bug.cgi?id=35471 and bug #323669
|
| 111 |
|
|
gnome2_environment_reset
|
| 112 |
|
|
|
| 113 |
|
|
# https://bugs.webkit.org/show_bug.cgi?id=79498
|
| 114 |
|
|
epatch "${FILESDIR}/${PN}-1.7.90-parallel-make-hack.patch"
|
| 115 |
|
|
|
| 116 |
|
|
# XXX: failing tests
|
| 117 |
|
|
# https://bugs.webkit.org/show_bug.cgi?id=50744
|
| 118 |
|
|
# testkeyevents is interactive
|
| 119 |
|
|
# mimehandling test sometimes fails under Xvfb (works fine manually)
|
| 120 |
|
|
# datasource test needs a network connection and intermittently fails with
|
| 121 |
|
|
# icedtea-web
|
| 122 |
|
|
sed -e '/Programs\/unittests\/testwebinspector/ d' \
|
| 123 |
|
|
-e '/Programs\/unittests\/testkeyevents/ d' \
|
| 124 |
|
|
-e '/Programs\/unittests\/testmimehandling/ d' \
|
| 125 |
|
|
-e '/Programs\/unittests\/testwebdatasource/ d' \
|
| 126 |
|
|
-i Source/WebKit/gtk/GNUmakefile.am || die
|
| 127 |
|
|
# garbage collection test fails intermittently if icedtea-web is installed
|
| 128 |
|
|
epatch "${FILESDIR}/${PN}-1.7.90-test_garbage_collection.patch"
|
| 129 |
|
|
|
| 130 |
|
|
# Respect CC, otherwise fails on prefix #395875
|
| 131 |
|
|
tc-export CC
|
| 132 |
|
|
|
| 133 |
|
|
# Prevent maintainer mode from being triggered during make
|
| 134 |
|
|
AT_M4DIR=Source/autotools eautoreconf
|
| 135 |
|
|
|
| 136 |
|
|
# Ugly hack of a workaround for bizarre paludis behavior, bug #406117
|
| 137 |
|
|
# http://paludis.exherbo.org/trac/ticket/1230
|
| 138 |
|
|
sed -e '/ --\(en\|dis\)able-dependency-tracking/ d' -i configure || die
|
| 139 |
|
|
}
|
| 140 |
|
|
|
| 141 |
|
|
src_configure() {
|
| 142 |
|
|
# It doesn't compile on alpha without this in LDFLAGS
|
| 143 |
|
|
use alpha && append-ldflags "-Wl,--no-relax"
|
| 144 |
|
|
|
| 145 |
|
|
# Sigbuses on SPARC with mcpu and co.
|
| 146 |
|
|
use sparc && filter-flags "-mvis"
|
| 147 |
|
|
|
| 148 |
|
|
# https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634
|
| 149 |
|
|
use ppc64 && append-flags "-mminimal-toc"
|
| 150 |
|
|
|
| 151 |
|
|
local myconf
|
| 152 |
|
|
|
| 153 |
|
|
# XXX: Check Web Audio support
|
| 154 |
|
|
# XXX: dependency-tracking is required so parallel builds won't fail
|
| 155 |
|
|
# WebKit2 can only be built with gtk3
|
| 156 |
|
|
# API documentation (gtk-doc) is built in webkit-gtk:3, always disable here
|
| 157 |
|
|
myconf="
|
| 158 |
|
|
$(use_enable coverage)
|
| 159 |
|
|
$(use_enable debug)
|
| 160 |
|
|
$(use_enable debug debug-features)
|
| 161 |
|
|
$(use_enable geoloc geolocation)
|
| 162 |
|
|
$(use_enable spell spellcheck)
|
| 163 |
|
|
$(use_enable introspection)
|
| 164 |
|
|
$(use_enable gstreamer video)
|
| 165 |
|
|
$(use_enable jit)
|
| 166 |
|
|
$(use_enable webgl)
|
| 167 |
|
|
--enable-web-sockets
|
| 168 |
|
|
--with-gtk=2.0
|
| 169 |
|
|
--disable-gtk-doc
|
| 170 |
|
|
--disable-webkit2
|
| 171 |
|
|
--enable-dependency-tracking
|
| 172 |
|
|
$(use aqua && echo "--with-font-backend=pango --with-target=quartz")"
|
| 173 |
|
|
|
| 174 |
|
|
econf ${myconf}
|
| 175 |
|
|
}
|
| 176 |
|
|
|
| 177 |
|
|
src_compile() {
|
| 178 |
|
|
# Horrible failure of a hack to work around parallel make problems,
|
| 179 |
|
|
# see https://bugs.webkit.org/show_bug.cgi?id=79498
|
| 180 |
|
|
emake -j1 all-built-sources-local
|
| 181 |
|
|
emake all-ltlibraries-local
|
| 182 |
|
|
emake all-programs-local
|
| 183 |
|
|
use introspection && emake WebKit-1.0.gir
|
| 184 |
|
|
emake all-data-local
|
| 185 |
|
|
default
|
| 186 |
|
|
}
|
| 187 |
|
|
|
| 188 |
|
|
src_test() {
|
| 189 |
|
|
# Tests expect an out-of-source build in WebKitBuild
|
| 190 |
|
|
ln -s . WebKitBuild || die "ln failed"
|
| 191 |
|
|
# Prevents test failures on PaX systems
|
| 192 |
|
|
use jit && pax-mark m $(list-paxables Programs/unittests/test*) \
|
| 193 |
|
|
Programs/unittests/.libs/test*
|
| 194 |
|
|
unset DISPLAY
|
| 195 |
|
|
# Tests need virtualx, bug #294691, bug #310695
|
| 196 |
|
|
# Parallel tests sometimes fail
|
| 197 |
|
|
Xemake -j1 check
|
| 198 |
|
|
}
|
| 199 |
|
|
|
| 200 |
|
|
src_install() {
|
| 201 |
|
|
default
|
| 202 |
|
|
|
| 203 |
|
|
newdoc Source/WebKit/gtk/ChangeLog ChangeLog.gtk
|
| 204 |
|
|
newdoc Source/WebKit/gtk/po/ChangeLog ChangeLog.gtk-po
|
| 205 |
|
|
newdoc Source/JavaScriptCore/ChangeLog ChangeLog.JavaScriptCore
|
| 206 |
|
|
newdoc Source/WebCore/ChangeLog ChangeLog.WebCore
|
| 207 |
|
|
|
| 208 |
|
|
# Remove .la files
|
| 209 |
|
|
find "${D}" -name '*.la' -exec rm -f '{}' +
|
| 210 |
|
|
|
| 211 |
|
|
# Prevents crashes on PaX systems
|
| 212 |
|
|
use jit && pax-mark m "${ED}usr/bin/jsc-1"
|
| 213 |
|
|
|
| 214 |
|
|
# File collisions with slot 3
|
| 215 |
|
|
# bug #402699, https://bugs.webkit.org/show_bug.cgi?id=78134
|
| 216 |
|
|
rm -rf "${ED}usr/share/gtk-doc" || die
|
| 217 |
|
|
}
|