diff options
author | Alexandre Rostovtsev <tetromino@gentoo.org> | 2012-05-03 06:59:47 +0000 |
---|---|---|
committer | Alexandre Rostovtsev <tetromino@gentoo.org> | 2012-05-03 06:59:47 +0000 |
commit | 4c364e8b79526eeb0a5430cc47d8f31c642c8766 (patch) | |
tree | afc728bd95806f58aff4173f1cfb0a339c7d92cc /net-libs/webkit-gtk | |
parent | dev-util/pkgconfig -> virtual/pkgconfig (diff) | |
download | historical-4c364e8b79526eeb0a5430cc47d8f31c642c8766.tar.gz historical-4c364e8b79526eeb0a5430cc47d8f31c642c8766.tar.bz2 historical-4c364e8b79526eeb0a5430cc47d8f31c642c8766.zip |
Fix build failure with USE=-gstreamer (bug #412221, thanks to Paweł Rumian).
Package-Manager: portage-2.2.0_alpha101/cvs/Linux x86_64
Diffstat (limited to 'net-libs/webkit-gtk')
-rw-r--r-- | net-libs/webkit-gtk/ChangeLog | 11 | ||||
-rw-r--r-- | net-libs/webkit-gtk/Manifest | 20 | ||||
-rw-r--r-- | net-libs/webkit-gtk/files/webkit-gtk-1.8.1-CodeGeneratorGObject-properties.patch | 20 | ||||
-rw-r--r-- | net-libs/webkit-gtk/files/webkit-gtk-1.8.1-tests-xvfb.patch | 32 | ||||
-rw-r--r-- | net-libs/webkit-gtk/webkit-gtk-1.8.1-r201.ebuild | 220 | ||||
-rw-r--r-- | net-libs/webkit-gtk/webkit-gtk-1.8.1-r301.ebuild | 231 |
6 files changed, 525 insertions, 9 deletions
diff --git a/net-libs/webkit-gtk/ChangeLog b/net-libs/webkit-gtk/ChangeLog index ffec6e48c5a3..8d4785b619f5 100644 --- a/net-libs/webkit-gtk/ChangeLog +++ b/net-libs/webkit-gtk/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for net-libs/webkit-gtk # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-libs/webkit-gtk/ChangeLog,v 1.160 2012/05/02 06:37:10 tetromino Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-libs/webkit-gtk/ChangeLog,v 1.161 2012/05/03 06:59:47 tetromino Exp $ + +*webkit-gtk-1.8.1-r301 (03 May 2012) +*webkit-gtk-1.8.1-r201 (03 May 2012) + + 03 May 2012; Alexandre Rostovtsev <tetromino@gentoo.org> + +webkit-gtk-1.8.1-r201.ebuild, +webkit-gtk-1.8.1-r301.ebuild, + +files/webkit-gtk-1.8.1-CodeGeneratorGObject-properties.patch, + +files/webkit-gtk-1.8.1-tests-xvfb.patch: + Fix build failure with USE=-gstreamer (bug #412221, thanks to Paweł Rumian). *webkit-gtk-1.8.1-r300 (02 May 2012) *webkit-gtk-1.8.1-r200 (02 May 2012) diff --git a/net-libs/webkit-gtk/Manifest b/net-libs/webkit-gtk/Manifest index 2196c1069733..f5835378141b 100644 --- a/net-libs/webkit-gtk/Manifest +++ b/net-libs/webkit-gtk/Manifest @@ -19,6 +19,8 @@ AUX webkit-gtk-1.7.90-test_garbage_collection.patch 597 RMD160 793b6f75beb80c51b AUX webkit-gtk-1.8.0-no-geoloc.patch 2159 RMD160 d51b010ce7c16781417de977ae9739262f0ee4c1 SHA1 24193bd006a3221d7f9c0eeee3da1fedf2991645 SHA256 ba36752f80d411c76d82d24b8f09d1c9167b452a20c5265a441e3aac82d1f6d8 AUX webkit-gtk-1.8.0-svgimagebuffer-clip.patch 6002 RMD160 8b758f798deeed43aa3233666ce1ad9597b9ab17 SHA1 47a421874cccc13a7c7859d67a2a92b4d2bd235f SHA256 53e1cf793b47e43bc8d62b3a19047c76a757b238797cdbfab0192f92ab7e8129 AUX webkit-gtk-1.8.0-typedef-WebKitWebView.patch 1259 RMD160 3e70db419d0c814055760157c16bf056e2cdb890 SHA1 cd8af6b6cad2d925f467946cfa81ac2087690306 SHA256 7ea519b8212d752c3a794ec7f54b6222defc3c08d8a82b9a11bcea8875e783aa +AUX webkit-gtk-1.8.1-CodeGeneratorGObject-properties.patch 712 RMD160 619fb408a3314f2df44c495f7960373a514f50d3 SHA1 8d17b58d8bc5af62257b84a83b1aab8f235ce730 SHA256 a83c1ac0682598600d15f8e682a24ccb660e21ddedd730bc2f52e20b5d21fc6b +AUX webkit-gtk-1.8.1-tests-xvfb.patch 1391 RMD160 6ef924c708dfb2bffe629541eb063b554c7dd14d SHA1 ec4c3bb8609ccb76ff093ae2a04c53e9c60a152a SHA256 9ba0bd2364b9c766921b2b4440d1921773dd28a323868703dbf7ae495d52487c DIST webkit-1.6.3.tar.xz 6794004 RMD160 cc319ffe4c2810663ae05b90e69d9495f5c3f0aa SHA1 7df69608ef2ce9dd7328353b4ee34f69271cd43b SHA256 12d0dbce6a895c7a8491a028e34a1dc55ae13ab76ac6202b2e489da9468077c3 DIST webkit-1.8.0.tar.xz 7998384 RMD160 f1700350e3447f223e1cf900154adae86ba8a900 SHA1 75f1a7da9097c740c4aa2ccba9470229c0b5cf5c SHA256 8cebd53b412ae9eb192493ad8e41fa8739a7b1a00f74c6b5a69d367709a801bc DIST webkit-1.8.1.tar.xz 7949924 RMD160 ebe10f63e2c514be13c7b61172b11c418d0ca0ff SHA1 d26543baace03c31aa3de82bc24f06f14c6b3052 SHA256 9a126a76b40ca61adb1f1626e1567f976740af2332948cc5189489dbd01e3b28 @@ -30,17 +32,19 @@ EBUILD webkit-gtk-1.6.3-r300.ebuild 5127 RMD160 bb99a6db9ea4bff10165a2b4ac8ae4c7 EBUILD webkit-gtk-1.8.0-r200.ebuild 6732 RMD160 48a99b86aa536f72791dc758fcf9c3fba60dbb9f SHA1 56cf1f4a6fff9642c6e66cbba74fdd2da5bb9cc8 SHA256 78a8a251fe152f05561d878ab363832b4d27f346c9e38584cbc84dba05fd3a1b EBUILD webkit-gtk-1.8.0-r300.ebuild 6844 RMD160 1d1a130118c7467b54a2b2e7623981d6c9420024 SHA1 3cb1937afae638efee36d11e97c4a3b101f1a2ee SHA256 b485b5fc332da2739974eab3f38b789e96b4ab662082975ce8380ee2bdef734d EBUILD webkit-gtk-1.8.1-r200.ebuild 6647 RMD160 d4897f7dd305657f395cf45dba679af69b06427f SHA1 7a707618b5d2f7acf58b0dd112534cb3865ff702 SHA256 9a52b3576de2946013acdecb6f81de2cc536d050335fb3b8b8ae1f1ba2567d89 +EBUILD webkit-gtk-1.8.1-r201.ebuild 6930 RMD160 c65d93427d79e2ef321f469ca81ac555aafcd49b SHA1 3bff0dc54c916b1229fdfa80ed5055463450c106 SHA256 f93bdd166f1f679adcf42ac2c7031135e2621fefa3a2827b311ca15c15785985 EBUILD webkit-gtk-1.8.1-r300.ebuild 6766 RMD160 072eda17cef4ca0cac2fb2cf4611f4b5d875a0c0 SHA1 672521c9302eba9d9976d2f7122fdcfbb2ceba48 SHA256 bf6deb4fc6bfbef4eda6c03935a4d5557128d7df661c39bd3abca5f5aa8a0f5e -MISC ChangeLog 32343 RMD160 e7d21d47f0279fab53e971f7b531d4e3a3a455e6 SHA1 d0abff0e5606cf9cc18ec774d40c1bafb7dcbb43 SHA256 5f1bc25e607c9117077cd0db16eae3175e1394a4ffeb7e374e2fa911a14582b0 +EBUILD webkit-gtk-1.8.1-r301.ebuild 7265 RMD160 8c69426e46950a4c77f1a5361b6f8de9482138aa SHA1 d2a479c1495140d56bdf12724f54105ffa0c3d28 SHA256 25326f28dacf05c465db3d1918abd9e1dbb6fca9749df691be843bcb53680790 +MISC ChangeLog 32731 RMD160 d6616382271ec2f611627b8fe66443782836102b SHA1 8777b632732511b6366aabf70308fad2a26d63b0 SHA256 24cd609de8da429d9f8fa22908b1c773c359ea7b7a113ce6f4530128ed057cc5 MISC metadata.xml 759 RMD160 8f6fe7ef53ac0b8ebf648fa3dcff019d6c806775 SHA1 33b751cd3d5c948455a4117120487fdd5a40fd9f SHA256 7e95cf6779c2de81716bb42246e7669418e15954e67f50ff7904da251e48d3d2 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iQEcBAEBAgAGBQJPoNYcAAoJEJ0WA1zPCt1hBpYH/1O6yhgLwvSc4uFoEU1QXDQZ -GY1KXkFitH67RGMt2uRYa4WQWXjdbJHmvzT1E2qAhh5wTI2ff+kdce0XHDBKmAa1 -OOnho5WN9mXNJREx0as16tKMoJ80QTq8oA9p/5qUoh2NoRXIz2JYmcwWtX4lFimT -fFbONaqMjPxz9CCqowlYz3GYB8k9395LkF5s31YqMQkCMZUOSJYCld+15jTQmdtA -Qf259IGN0hBlQ27NyzGYSK19VZ65wsU5SHp46r9pHpb26e/5FhX6bjYK5MHxtqVC -z3pGVuaLH0ueNqyRbWo6ohjQfkFu3kiXfA8ZcNM3CI7Xe8g1LRlSBV8hv8GxvT4= -=oHqn +iQEcBAEBAgAGBQJPoizpAAoJEJ0WA1zPCt1h77AH/iO8/yKgXOgqOG1aR/V8EgVw +GvcOpGwUUZf1qH8IJBF3ynHlCLpuPK1YZVk/VjMCjuVtGvEL5UqWSzBeiHBbg+fP +q3zeAYXH4IuGllhhAyyWoOYxKZCHjnwQYYNgw9g8YmGRkbkG5t50rOHNV5Lb6SXl +Nvax1LJO+HB0yxKm5KMyhg9JqWK1OnMa7w0ydGXSdHLiVxR3qI8Zf2OaaUx1uW6w +3mhBUPXo4znpoYra+TcgPtZ0xfC6AxYfXkZH/U94JsXxjk2MV99lRSm3mfFjCO4d +bT8bSRAfTNuW8tT6clfDhnfwbxcpxSfHXQFxVl94yBUCTh/YuB67srJWjEm3BMU= +=WAD1 -----END PGP SIGNATURE----- diff --git a/net-libs/webkit-gtk/files/webkit-gtk-1.8.1-CodeGeneratorGObject-properties.patch b/net-libs/webkit-gtk/files/webkit-gtk-1.8.1-CodeGeneratorGObject-properties.patch new file mode 100644 index 000000000000..ff2f5ae5d7ff --- /dev/null +++ b/net-libs/webkit-gtk/files/webkit-gtk-1.8.1-CodeGeneratorGObject-properties.patch @@ -0,0 +1,20 @@ +From: Mikhail Khokhlov <mikhail.khokhlov@lge.com> + +https://bugs.webkit.org/show_bug.cgi?id=84526 + +Index: Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm +=================================================================== +--- Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm (revision 115562) ++++ Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm (working copy) +@@ -1444,9 +1444,10 @@ + print IMPL "namespace WebKit {\n\n"; + print IMPL @cBodyPriv; + print IMPL "} // namespace WebKit\n\n"; ++ ++ print IMPL @cBodyProperties; + print IMPL "#endif // ${conditionalString}\n\n" if $conditionalString; + +- print IMPL @cBodyProperties; + print IMPL @cBody; + + close(IMPL); diff --git a/net-libs/webkit-gtk/files/webkit-gtk-1.8.1-tests-xvfb.patch b/net-libs/webkit-gtk/files/webkit-gtk-1.8.1-tests-xvfb.patch new file mode 100644 index 000000000000..e310c6521c29 --- /dev/null +++ b/net-libs/webkit-gtk/files/webkit-gtk-1.8.1-tests-xvfb.patch @@ -0,0 +1,32 @@ +Rely on virtualx.eclass instead of manually spawning Xvfb. Fixes occasional +test failures. + +--- a/Tools/Scripts/run-gtk-tests ++++ b/Tools/Scripts/run-gtk-tests +@@ -147,18 +147,9 @@ + + def _setup_testing_environment(self): + self._test_env = os.environ +- self._test_env["DISPLAY"] = self._options.display + self._test_env["WEBKIT_INSPECTOR_PATH"] = os.path.abspath(os.path.join(self._programs_path, 'resources', 'inspector')) + self._test_env['GSETTINGS_BACKEND'] = 'memory' + +- try: +- self._xvfb = self._create_process(["Xvfb", self._options.display, "-screen", "0", "800x600x24", "-nolisten", "tcp"], +- stdout=subprocess.PIPE, stderr=subprocess.PIPE) +- except Exception as e: +- sys.stderr.write("Failed to run Xvfb: %s\n", e) +- sys.stderr.flush() +- return False +- + # If we cannot start the accessibility daemons, we can just skip the accessibility tests. + if not self._start_accessibility_daemons(): + print "Could not start accessibility bus, so skipping TestWebKitAccessibility" +@@ -170,7 +161,6 @@ + self._spi_registryd.terminate() + if self._spi_bus_launcher: + self._spi_bus_launcher.terminate() +- self._xvfb.kill(); + + def _remove_skipped_tests(self): + tests_to_remove = [] diff --git a/net-libs/webkit-gtk/webkit-gtk-1.8.1-r201.ebuild b/net-libs/webkit-gtk/webkit-gtk-1.8.1-r201.ebuild new file mode 100644 index 000000000000..5c1641b32198 --- /dev/null +++ b/net-libs/webkit-gtk/webkit-gtk-1.8.1-r201.ebuild @@ -0,0 +1,220 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-libs/webkit-gtk/webkit-gtk-1.8.1-r201.ebuild,v 1.1 2012/05/03 06:59:47 tetromino Exp $ + +EAPI="4" + +# Don't define PYTHON_DEPEND: python only needed at build time +inherit autotools eutils flag-o-matic gnome2-utils pax-utils python virtualx + +MY_P="webkit-${PV}" +DESCRIPTION="Open source web browser engine" +HOMEPAGE="http://www.webkitgtk.org/" +SRC_URI="http://www.webkitgtk.org/releases/${MY_P}.tar.xz" +#SRC_URI="mirror://gentoo/${P}.tar.xz" + +LICENSE="LGPL-2 LGPL-2.1 BSD" +SLOT="2" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos" +# geoclue +IUSE="aqua coverage debug +geoloc +gstreamer +introspection +jit spell +webgl" +# bug 372493 +REQUIRED_USE="introspection? ( gstreamer )" + +# use sqlite, svg by default +# dependency on >=x11-libs/gtk+-2.13:2 for gail +RDEPEND=" + dev-libs/libxml2:2 + dev-libs/libxslt + virtual/jpeg + >=media-libs/libpng-1.4:0 + >=x11-libs/cairo-1.10 + >=dev-libs/glib-2.31.8:2 + >=x11-libs/gtk+-2.13:2[aqua=,introspection?] + >=dev-libs/icu-3.8.1-r1 + >=net-libs/libsoup-2.37.92:2.4[introspection?] + dev-db/sqlite:3 + >=x11-libs/pango-1.21 + x11-libs/libXrender + + geoloc? ( app-misc/geoclue ) + + gstreamer? ( + media-libs/gstreamer:0.10 + >=media-libs/gst-plugins-base-0.10.30:0.10 ) + + introspection? ( >=dev-libs/gobject-introspection-0.9.5 ) + + spell? ( >=app-text/enchant-0.22 ) + + webgl? ( virtual/opengl ) +" +# paxctl needed for bug #407085 +DEPEND="${RDEPEND} + dev-lang/perl + =dev-lang/python-2* + sys-devel/bison + >=sys-devel/flex-2.5.33 + sys-devel/gettext + dev-util/gperf + dev-util/pkgconfig + dev-util/gtk-doc-am + introspection? ( jit? ( sys-apps/paxctl ) ) + test? ( x11-themes/hicolor-icon-theme + jit? ( sys-apps/paxctl ) ) +" +# Need real bison, not yacc + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + # Needed for CodeGeneratorInspector.py + python_set_active_version 2 + python_pkg_setup +} + +src_prepare() { + DOCS="ChangeLog NEWS" # other ChangeLog files handled by src_install + + # FIXME: Fix unaligned accesses on ARM, IA64 and SPARC + # https://bugs.webkit.org/show_bug.cgi?id=19775 + # TODO: FAILS TO APPLY! + #use sparc && epatch "${FILESDIR}"/${PN}-1.2.3-fix-pool-sparc.patch + + # CVE-2011-3064, https://bugzilla.redhat.com/show_bug.cgi?id=807596 + epatch "${FILESDIR}/${PN}-1.8.0-svgimagebuffer-clip.patch" + + # USE=-gstreamer build failure, bug #412221, https://bugs.webkit.org/show_bug.cgi?id=84526 + epatch "${FILESDIR}/${PN}-1.8.1-CodeGeneratorGObject-properties.patch" + + # intermediate MacPorts hack while upstream bug is not fixed properly + # https://bugs.webkit.org/show_bug.cgi?id=28727 + use aqua && epatch "${FILESDIR}"/${PN}-1.6.1-darwin-quartz.patch + + # Bug #403049, https://bugs.webkit.org/show_bug.cgi?id=79605 + epatch "${FILESDIR}/${PN}-1.7.5-linguas.patch" + + # Drop DEPRECATED flags + sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED:$(NULL):g' GNUmakefile.am || die + + # Don't force -O2 + sed -i 's/-O2//g' "${S}"/configure.ac || die + + # Build-time segfaults under PaX with USE="introspection jit", bug #404215 + if use introspection && use jit; then + epatch "${FILESDIR}/${PN}-1.6.3-paxctl-introspection.patch" + cp "${FILESDIR}/gir-paxctl-lt-wrapper" "${S}/" || die + fi + + # We need to reset some variables to prevent permissions problems and failures + # like https://bugs.webkit.org/show_bug.cgi?id=35471 and bug #323669 + gnome2_environment_reset + + # https://bugs.webkit.org/show_bug.cgi?id=79498 + epatch "${FILESDIR}/${PN}-1.7.90-parallel-make-hack.patch" + + # XXX: failing tests + # https://bugs.webkit.org/show_bug.cgi?id=50744 + # testkeyevents is interactive + # mimehandling test sometimes fails under Xvfb (works fine manually) + # datasource test needs a network connection and intermittently fails with + # icedtea-web + sed -e '/Programs\/unittests\/testwebinspector/ d' \ + -e '/Programs\/unittests\/testkeyevents/ d' \ + -e '/Programs\/unittests\/testmimehandling/ d' \ + -e '/Programs\/unittests\/testwebdatasource/ d' \ + -i Source/WebKit/gtk/GNUmakefile.am || die + # garbage collection test fails intermittently if icedtea-web is installed + epatch "${FILESDIR}/${PN}-1.7.90-test_garbage_collection.patch" + + # occasional test failure due to additional Xvfb process spawned + epatch "${FILESDIR}/${PN}-1.8.1-tests-xvfb.patch" + + # Respect CC, otherwise fails on prefix #395875 + tc-export CC + + # Prevent maintainer mode from being triggered during make + AT_M4DIR=Source/autotools eautoreconf + + # Ugly hack of a workaround for bizarre paludis behavior, bug #406117 + # http://paludis.exherbo.org/trac/ticket/1230 + sed -e '/ --\(en\|dis\)able-dependency-tracking/ d' -i configure || die +} + +src_configure() { + # It doesn't compile on alpha without this in LDFLAGS + use alpha && append-ldflags "-Wl,--no-relax" + + # Sigbuses on SPARC with mcpu and co. + use sparc && filter-flags "-mvis" + + # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634 + use ppc64 && append-flags "-mminimal-toc" + + local myconf + + # XXX: Check Web Audio support + # XXX: dependency-tracking is required so parallel builds won't fail + # WebKit2 can only be built with gtk3 + # API documentation (gtk-doc) is built in webkit-gtk:3, always disable here + myconf=" + $(use_enable coverage) + $(use_enable debug) + $(use_enable debug debug-features) + $(use_enable geoloc geolocation) + $(use_enable spell spellcheck) + $(use_enable introspection) + $(use_enable gstreamer video) + $(use_enable jit) + $(use_enable webgl) + --enable-web-sockets + --with-gtk=2.0 + --disable-gtk-doc + --disable-webkit2 + --enable-dependency-tracking + $(use aqua && echo "--with-font-backend=pango --with-target=quartz")" + + econf ${myconf} +} + +src_compile() { + # Horrible failure of a hack to work around parallel make problems, + # see https://bugs.webkit.org/show_bug.cgi?id=79498 + emake -j1 all-built-sources-local + emake all-ltlibraries-local + emake all-programs-local + use introspection && emake WebKit-1.0.gir + emake all-data-local + default +} + +src_test() { + # Tests expect an out-of-source build in WebKitBuild + ln -s . WebKitBuild || die "ln failed" + # Prevents test failures on PaX systems + use jit && pax-mark m $(list-paxables Programs/unittests/test*) \ + Programs/unittests/.libs/test* + unset DISPLAY + # Tests need virtualx, bug #294691, bug #310695 + # Parallel tests sometimes fail + Xemake -j1 check +} + +src_install() { + default + + newdoc Source/WebKit/gtk/ChangeLog ChangeLog.gtk + newdoc Source/WebKit/gtk/po/ChangeLog ChangeLog.gtk-po + newdoc Source/JavaScriptCore/ChangeLog ChangeLog.JavaScriptCore + newdoc Source/WebCore/ChangeLog ChangeLog.WebCore + + # Remove .la files + find "${D}" -name '*.la' -exec rm -f '{}' + + + # Prevents crashes on PaX systems + use jit && pax-mark m "${ED}usr/bin/jsc-1" + + # File collisions with slot 3 + # bug #402699, https://bugs.webkit.org/show_bug.cgi?id=78134 + rm -rf "${ED}usr/share/gtk-doc" || die +} diff --git a/net-libs/webkit-gtk/webkit-gtk-1.8.1-r301.ebuild b/net-libs/webkit-gtk/webkit-gtk-1.8.1-r301.ebuild new file mode 100644 index 000000000000..7602334855d2 --- /dev/null +++ b/net-libs/webkit-gtk/webkit-gtk-1.8.1-r301.ebuild @@ -0,0 +1,231 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-libs/webkit-gtk/webkit-gtk-1.8.1-r301.ebuild,v 1.1 2012/05/03 06:59:47 tetromino Exp $ + +EAPI="4" + +# Don't define PYTHON_DEPEND: python only needed at build time +inherit autotools eutils flag-o-matic gnome2-utils pax-utils python virtualx + +MY_P="webkit-${PV}" +DESCRIPTION="Open source web browser engine" +HOMEPAGE="http://www.webkitgtk.org/" +SRC_URI="http://www.webkitgtk.org/releases/${MY_P}.tar.xz" +#SRC_URI="mirror://gentoo/${P}.tar.xz" + +LICENSE="LGPL-2 LGPL-2.1 BSD" +SLOT="3" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos" +# geoclue +IUSE="aqua coverage debug doc +geoloc +gstreamer +introspection +jit spell +webgl webkit2" +# bug 372493 +REQUIRED_USE="introspection? ( gstreamer )" + +# use sqlite, svg by default +# dependency on >=x11-libs/gtk+-2.13:2 for gail +# Aqua support in gtk3 is untested +# gtk2 is needed for plugin process support +RDEPEND=" + dev-libs/libxml2:2 + dev-libs/libxslt + virtual/jpeg + >=media-libs/libpng-1.4:0 + >=x11-libs/cairo-1.10 + >=dev-libs/glib-2.31.8:2 + >=x11-libs/gtk+-3.0:3[aqua=,introspection?] + >=dev-libs/icu-3.8.1-r1 + >=net-libs/libsoup-2.37.92:2.4[introspection?] + dev-db/sqlite:3 + >=x11-libs/pango-1.21 + x11-libs/libXrender + + geoloc? ( app-misc/geoclue ) + + gstreamer? ( + media-libs/gstreamer:0.10 + >=media-libs/gst-plugins-base-0.10.30:0.10 ) + + introspection? ( >=dev-libs/gobject-introspection-0.9.5 ) + + spell? ( >=app-text/enchant-0.22 ) + + webgl? ( virtual/opengl ) + + webkit2? ( >=x11-libs/gtk+-2.13:2 ) +" +# paxctl needed for bug #407085 +DEPEND="${RDEPEND} + dev-lang/perl + =dev-lang/python-2* + sys-devel/bison + >=sys-devel/flex-2.5.33 + sys-devel/gettext + dev-util/gperf + dev-util/pkgconfig + dev-util/gtk-doc-am + doc? ( >=dev-util/gtk-doc-1.10 ) + introspection? ( jit? ( sys-apps/paxctl ) ) + test? ( + x11-themes/hicolor-icon-theme + jit? ( sys-apps/paxctl ) ) + webkit2? ( app-accessibility/at-spi2-core ) +" +# Need real bison, not yacc + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + # Needed for CodeGeneratorInspector.py + python_set_active_version 2 + python_pkg_setup +} + +src_prepare() { + DOCS="ChangeLog NEWS" # other ChangeLog files handled by src_install + + # FIXME: Fix unaligned accesses on ARM, IA64 and SPARC + # https://bugs.webkit.org/show_bug.cgi?id=19775 + # TODO: FAILS TO APPLY! + #use sparc && epatch "${FILESDIR}"/${PN}-1.2.3-fix-pool-sparc.patch + + # CVE-2011-3064, https://bugzilla.redhat.com/show_bug.cgi?id=807596 + epatch "${FILESDIR}/${PN}-1.8.0-svgimagebuffer-clip.patch" + + # webkit2 build failure with gcc-4.5, bug #412027 + epatch "${FILESDIR}/${PN}-1.8.0-typedef-WebKitWebView.patch" + + # USE=-gstreamer build failure, bug #412221, https://bugs.webkit.org/show_bug.cgi?id=84526 + epatch "${FILESDIR}/${PN}-1.8.1-CodeGeneratorGObject-properties.patch" + + # intermediate MacPorts hack while upstream bug is not fixed properly + # https://bugs.webkit.org/show_bug.cgi?id=28727 + use aqua && epatch "${FILESDIR}"/${PN}-1.6.1-darwin-quartz.patch + + # Bug #403049, https://bugs.webkit.org/show_bug.cgi?id=79605 + epatch "${FILESDIR}/${PN}-1.7.5-linguas.patch" + + # Drop DEPRECATED flags + sed -i -e 's:-D[A-Z_]*DISABLE_DEPRECATED:$(NULL):g' GNUmakefile.am || die + + # Don't force -O2 + sed -i 's/-O2//g' "${S}"/configure.ac || die + + # Build-time segfaults under PaX with USE="introspection jit", bug #404215 + if use introspection && use jit; then + epatch "${FILESDIR}/${PN}-1.6.3-paxctl-introspection.patch" + cp "${FILESDIR}/gir-paxctl-lt-wrapper" "${S}/" || die + fi + + # We need to reset some variables to prevent permissions problems and failures + # like https://bugs.webkit.org/show_bug.cgi?id=35471 and bug #323669 + gnome2_environment_reset + + # https://bugs.webkit.org/show_bug.cgi?id=79498 + epatch "${FILESDIR}/${PN}-1.7.90-parallel-make-hack.patch" + + # XXX: failing tests + # https://bugs.webkit.org/show_bug.cgi?id=50744 + # testkeyevents is interactive + # mimehandling test sometimes fails under Xvfb (works fine manually) + # datasource test needs a network connection and intermittently fails with + # icedtea-web + sed -e '/Programs\/unittests\/testwebinspector/ d' \ + -e '/Programs\/unittests\/testkeyevents/ d' \ + -e '/Programs\/unittests\/testmimehandling/ d' \ + -e '/Programs\/unittests\/testwebdatasource/ d' \ + -i Source/WebKit/gtk/GNUmakefile.am || die + if ! use gstreamer; then + # webkit2's TestWebKitWebView requires <video> support + sed -e '/Programs\/WebKit2APITests\/TestWebKitWebView/ d' \ + -i Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am || die + fi + # garbage collection test fails intermittently if icedtea-web is installed + epatch "${FILESDIR}/${PN}-1.7.90-test_garbage_collection.patch" + + # occasional test failure due to additional Xvfb process spawned + epatch "${FILESDIR}/${PN}-1.8.1-tests-xvfb.patch" + + # Respect CC, otherwise fails on prefix #395875 + tc-export CC + + # Prevent maintainer mode from being triggered during make + AT_M4DIR=Source/autotools eautoreconf + + # Ugly hack of a workaround for bizarre paludis behavior, bug #406117 + # http://paludis.exherbo.org/trac/ticket/1230 + sed -e '/ --\(en\|dis\)able-dependency-tracking/ d' -i configure || die +} + +src_configure() { + # It doesn't compile on alpha without this in LDFLAGS + use alpha && append-ldflags "-Wl,--no-relax" + + # Sigbuses on SPARC with mcpu and co. + use sparc && filter-flags "-mvis" + + # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634 + use ppc64 && append-flags "-mminimal-toc" + + local myconf + + # XXX: Check Web Audio support + # XXX: dependency-tracking is required so parallel builds won't fail + myconf=" + $(use_enable coverage) + $(use_enable debug) + $(use_enable debug debug-features) + $(use_enable doc gtk-doc) + $(use_enable geoloc geolocation) + $(use_enable spell spellcheck) + $(use_enable introspection) + $(use_enable gstreamer video) + $(use_enable jit) + $(use_enable webgl) + $(use_enable webkit2) + --enable-web-sockets + --with-gtk=3.0 + --enable-dependency-tracking + $(use aqua && echo "--with-font-backend=pango --with-target=quartz")" + # Aqua support in gtk3 is untested + + econf ${myconf} +} + +src_compile() { + # Horrible failure of a hack to work around parallel make problems, + # see https://bugs.webkit.org/show_bug.cgi?id=79498 + emake -j1 all-built-sources-local + emake all-ltlibraries-local + emake all-programs-local + use introspection && emake WebKit-3.0.gir + emake all-data-local + default +} + +src_test() { + # Tests expect an out-of-source build in WebKitBuild + ln -s . WebKitBuild || die "ln failed" + + # Prevents test failures on PaX systems + use jit && pax-mark m $(list-paxables Programs/*[Tt]ests/*) \ + Programs/unittests/.libs/test* + unset DISPLAY + # Tests need virtualx, bug #294691, bug #310695 + # Parallel tests sometimes fail + Xemake -j1 check +} + +src_install() { + default + + newdoc Source/WebKit/gtk/ChangeLog ChangeLog.gtk + newdoc Source/WebKit/gtk/po/ChangeLog ChangeLog.gtk-po + newdoc Source/JavaScriptCore/ChangeLog ChangeLog.JavaScriptCore + newdoc Source/WebCore/ChangeLog ChangeLog.WebCore + + # Remove .la files + find "${D}" -name '*.la' -exec rm -f '{}' + + + # Prevents crashes on PaX systems + use jit && pax-mark m "${ED}usr/bin/jsc-3" +} |